api-reference
sdk package
The Kittl SDK used for interacting with projects within the Kittl UI
Abstract Classes
Abstract Class | Description |
|---|---|
Abstract base class for batch operations that allows grouping multiple API calls together for atomic execution and better performance. |
Enumerations
Enumeration | Description |
|---|---|
Interfaces
Interface | Description |
|---|---|
Application context provided to extensions, giving them access to the project SDK and UI panel registration methods. | |
API for managing application state including selection, viewport, active tool, and canvas mode. | |
SDK interface for application state operations. Provides access to selection, viewport, active tool, and other UI state management. | |
Controller interface for collaborating presence / awareness. Extensions can: - subscribe to the state store to render live cursors / avatars - use the API to update their own (local) presence | |
API for creating and managing artboards (design canvases) in the design. | |
API for canvas-related operations. These functions may not have an implementation setup; they require a canvas implementation to register itself as the handler. | |
Interface for listening to viewport changes. | |
API for updating design configuration settings. | |
Defines an item for the Context Menu (right-click menu). | |
Defines a widget for the Context Toolbar that appears when objects are selected. | |
Interface for panel items that can be conditionally shown based on selected object types. Used for performance optimization by filtering which components need to check visibility. | |
Parameters for creating a new loading card placeholder. | |
Main API interface for design manipulation operations. Provides access to all design-related APIs including artboards, objects, text, shapes, images, guides, and canvas operations. | |
Main SDK interface for design projects. Provides access to design, workspace, and app state APIs. | |
SDK interface for design manipulation operations. Provides access to design state and APIs for managing artboards, objects, text, shapes, images, and other design elements. | |
Base interface for all SDK extensions. Extensions allow third-party developers to extend the Kittl editor functionality with custom panels, tools, and features. | |
Metadata describing an extension, including its unique identifier and manifest information. | |
Manager for registering extension UI components in various panels of the Kittl editor. | |
Defines the shape of an item for the Actions Panel (bottom toolbar). | |
Options for exporting. | |
Options for generating preview images. | |
API for creating and managing guides (alignment lines) in the design. | |
API for adding and updating illustrations in the design. | |
API for adding and updating images in the design. | |
API for creating and managing loading card placeholders in the design. | |
Defines the shape of an item for the Navigation Panel (left sidebar). | |
API for managing design objects, including locking and removal operations. | |
Base interface for panel items that can be registered in the Kittl editor UI. | |
Defines an item for the Properties Panel (right sidebar). | |
Parameters for removing an object from the design. | |
Return type for the removeObject operation. | |
Parameters for rotating object. | |
Parameters for object hiding operations. | |
Parameters for object locking operations. | |
Shape API for creating and managing basic geometric shapes in the design canvas. This API provides functionality to create and update basic shapes including rectangles, circles (ellipses), stars, and triangles (polygons). All shapes support standard design properties like position, size, rotation, opacity, fill colors, and borders. **Supported Shape Types:** - **Key Features:** - Developer-friendly input mapping (simplified position/size vs internal coordinates) - Automatic scaling based on default shape dimensions - Support for absolute and relative positioning - Configurable visual properties (opacity, rotation, skew, shadows) - Border and fill customization | |
API for design state operations, including implementing sub-states into the main design. | |
API for creating and managing text elements in the design. | |
Parameters for updating an existing guide. Both top and left are allowed because the orientation is not known at this point. An error will be thrown if the wrong coordinate is provided for the guide's orientation. | |
Parameters for updating an existing loading card. | |
Base interface for view controllers that manage state and provide API access. | |
SDK interface for workspace operations. Currently minimal but will be expanded. |
Variables
Variable | Description |
|---|---|
Metadata key used to store array indices in CRDT structures for Yjs. | |
Available basic shape types that can be created using the ShapeAPI. | |
Metadata key used for indices in CRDT structures. | |
Available sections for the Context Menu. Layers are in top to bottom order as they appear in the context menu. | |
Prefix used for all Yjs metadata keys in CRDT structures. | |
Metadata key used to store parent relationships in CRDT tree structures for Yjs. | |
Metadata key used to identify the root element in CRDT tree structures for Yjs. | |
Available section types for the Actions Panel. These are copy/pasted from editor for now - need to be unified somewhere. | |
Available sections for the Context Toolbar. |
Type Aliases
Type Alias | Description |
|---|---|
Absolute position specification using exact pixel coordinates. | |
Represents the currently active tool in the editor (artboard, move, pen, comment, shape, etc.). | |
Parameters for adding a new illustration to the design. | |
Parameters for adding a new image to the design. | |
Parameters for adding a new text element to the design. | |
Parameters for adding a new video to the design. | |
Generic options for API operations that control how state changes are processed and tracked. **Execution Modes:** - **Batch Mode**: Uses **Change Tracking:** - | |
Application state interface containing selection, viewport, active tool, and other UI state. TODO: The comments on every property in this interface is a carry over from V1 AppStateStore. Some of these comments are related to some optimization techniques and will be verified and updated accordingly when we build Extensions | |
Awareness state holds the presence information for all collaborators. | |
Public API for updating the local user's awareness state. This API only affects the local user; remote users are provided by the collaboration backend via AwarenessState. | |
Type representing a basic shape type. | |
Mode that affects overall canvas interaction - we hard code some here that we know will exist but there's no reason you can't use custom here too as we do allow Strings when its used in AppState. | |
Parameters for cloning an existing artboard. | |
CRDT-enhanced board type that includes array indices metadata for collaborative editing. | |
TODO: generate these docs in https://app.clickup.com/t/86c697rw1 | |
CRDT-enhanced fill type that includes array indices metadata for collaborative editing. | |
CRDT-enhanced group structure type that includes metadata for tree structure and array indices. | |
CRDT-enhanced serialized object type that uses CrdtFill for collaborative editing. | |
Parameters for creating a new artboard. | |
Configuration for creating elements (images, artboards) with position and size specifications. **Positioning System:** - **Absolute**: Exact pixel coordinates from canvas origin - **Relative**: Positioned relative to existing artboards with automatic spacing - **Centered**: Automatically centered within current viewport **Artboard Targeting:** - If **Viewport Scaling:** - When | |
Parameters for creating a new guide. | |
Input parameters for creating a new shape. | |
Options for Design API operations, controlling execution mode and change tracking. This type allows Design API methods to be executed in different contexts: - Batch mode for grouping multiple operations - Direct mode with change tracking for undo/redo functionality - Default mode with standard UI origin and tracked history | |
Element dimensions in pixels. | |
Location reference point for relative positioning ('origin' or 'center'). | |
Type representing a context menu section. | |
Conditional type for guide orientation and position. | |
Horizontal origin for rotation transformations. Determines the horizontal anchor point around which the object rotates. | |
Vertical origin for rotation transformations. Determines the vertical anchor point around which the object rotates. | |
Base interface for project SDKs. Currently empty but will be expanded in the future. | |
Relative position specification for positioning relative to other elements or viewport. | |
Position element relative to another element or artboard. | |
Position element relative to window's viewport coordinates. | |
Type representing a section type in the Actions Panel. | |
Presence information for a single user in a collaborative session. | |
The type for the generate function for the AI generator tool. This is the function that will be called when the user submits their generation request. | |
Type representing a toolbar section. | |
Parameters for updating the background image properties of an existing artboard. | |
Parameters for updating artboard properties. Allows partial updates to any artboard property including nested artboard options. | |
Parameters for updating an existing illustration. | |
Parameters for updating an existing image. | |
Input parameters for updating an existing shape. Shape type cannot be changed. | |
Parameters for updating an existing text element. | |
Parameters for updating an existing video in the design. | |
Represents the viewport of the canvas, including coordinates and zoom level. The coordinates are represented as a transformation matrix. | |
Payload for viewport change events. | |
API for workspace operations. Currently empty but will be expanded in the future. |