sdk.appstateapi
Home > @kittl/sdk > AppStateAPI
AppStateAPI interface
API for managing application state including selection, viewport, active tool, and canvas mode.
Signature:
export interface AppStateAPI
Methods
Method | Description |
|---|---|
Gets the currently active tool (artboard, move, pen, comment, shape, etc.). | |
Gets all selected object IDs including objects, artboards, and artboard objects. | |
Gets the current canvas mode (erase, crop, reframe, or null). | |
Gets the viewport corner coordinates. | |
Gets the ID of the currently hovered object. | |
Gets the IDs of selected artboards. | |
Gets the object IDs within selected artboards. | |
Gets the IDs of selected layers (all items are on the same level; may include group IDs). | |
Gets the IDs of all selected objects (includes all selected objects regardless of group structure). | |
Gets the viewport transformation matrix. | |
Gets the current viewport state. | |
Gets the current zoom level. | |
Sets the active tool. | |
Sets all selected object IDs. | |
Sets the canvas mode. | |
Sets the viewport corner coordinates. | |
Sets the hovered object ID. | |
Updates multiple app state fields at once. | |
Sets the selected artboard IDs. | |
Sets the object IDs within selected artboards. | |
Sets the selected layer IDs. | |
Sets the selected object IDs. | |
Sets the viewport transformation matrix. | |
Sets the viewport state. | |
Sets the zoom level. |