Pixso Open Documentation
guide
  • 中文
  • English
guide
  • 中文
  • English
  • Plugin API

    • Brief Introduction
    • Prerequisites
    • manifest
    • Development Guide
    • Change Log
    • Plugin API Documentation

      • Overview
      • Global Object

        • pixso
        • pixso.ui
        • pixso.host
        • pixso.mouse
        • pixso.editor
        • pixso.keyboard
        • pixso.fieldset
        • pixso.viewport
        • pixso.vectorEditor
        • pixso.clientStorage
        • pixso.serverStorage
      • Node Types

        • BooleanOperationNode
        • ComponentNode
        • ComponentSetNode
        • DocumentNode
        • EllipseNode
        • FrameNode
        • GroupNode
        • InstanceNode
        • LineNode
        • PageNode
        • PolygonNode
        • RectangleNode
        • SectionNode
        • SliceNode
        • StarNode
        • TextNode
        • VectorNode
      • Data Types

        • Action
        • ArcData
        • BlendMode
        • CommandItem
        • ComponentProperties-Related
        • Constraints
        • DialogType
        • DocumentationLink
        • Effect
        • EmbedData
        • ExportSettings
        • FontName
        • Guide
        • HandleMirroring
        • HyperlinkTarget
        • Image
        • LayoutGrid
        • LetterSpacing
        • Library
        • LineHeight
        • NodeChangeProperty
        • OverflowDirection
        • Overlay
        • Paint
        • PublishStatus
        • Reaction
        • Rect-related
        • RGB & RGBA
        • StrokeCap
        • StrokeJoin
        • StyleChangeProperty
        • TextCase
        • TextDecoration
        • TextListOptions
        • ThemeType
        • ToolType
        • Transition
        • Trigger
        • Vector
    • Host API Documentation

      • Overview
      • Host API
  • Open API

    • OpenAPI Doc

Event

ArgFreeEventType

type ArgFreeEventType =
  "selectionchange" |
  "currentpagechange" |
  "librarychange" |
  "viewportchange" |
  "close" |

RunEvent

interface RunEvent {
  parameters?: ParameterValues;
  command: string;
}

DropEvent

interface DropEvent {
  node: BaseNode | SceneNode;
  x: number;
  y: number;
  absoluteX: number;
  absoluteY: number;
  items: DropItem[];
  files: DropFile[];
  dropMetadata?: any;
}

EditTypeChangeEvent

interface EditTypeChangeEvent {
  id: string;
  type: "FOCUS" | "BLUR";
}

DetachInstanceEvent

interface DetachInstanceEvent {
  id: string;
  componentId: string;
}

DetachStyleEvent

interface DetachStyleEvent {
  id: string;
  styleId: string;
}

ToptoolselectEvent

interface ToptoolselectEvent {
  command: string;
}

BottomToolSelectEvent

interface BottomToolSelectEvent {
  command: string;
}

ContextMenuSelectEvent

interface ContextMenuSelectEvent {
  command: string;
}

ShortcutHitEvent

interface ShortcutHitEvent {
  command: string;
}

ThemeChangeEvent

interface ThemeChangeEvent {
  theme: ThemeType;
}
type ThemeType = "DARK" | "LIGHT";

DocumentChangeEvent

interface DocumentChangeEvent {
  documentChanges: DocumentChange[];
}

type DocumentChange =
  | CreateChange
  | DeleteChange
  | PropertyChange
  | StyleCreateChange
  | StyleDeleteChange
  | StylePropertyChange;

interface BaseDocumentChange {
  id: string;
}
interface CreateChange extends BaseDocumentChange {
  type: "CREATE";
}
interface DeleteChange extends BaseDocumentChange {
  type: "DELETE";
}
interface PropertyChange extends BaseDocumentChange {
  type: "PROPERTY_CHANGE";
  properties: NodeChangeProperty[];
}
interface StyleCreateChange extends BaseDocumentChange {
  type: "STYLE_CREATE";
}
interface StyleDeleteChange extends BaseDocumentChange {
  type: "STYLE_DELETE";
  style: null;
}
interface StylePropertyChange extends BaseDocumentChange {
  type: "STYLE_PROPERTY_CHANGE";
  properties: StyleChangeProperty[];
}

LibraryEvent

interface LibraryEvent {
  key: string;
}