Pixso 开放文档
插件 API
官方工具集
  • 中文
  • English
插件 API
官方工具集
  • 中文
  • English
  • 插件 API

    • 简介
    • 预备知识
    • manifest
    • 开发指南
    • 更新日志
    • Plugin API 文档

      • 概述
      • 全局对象

        • pixso
        • pixso.ui
        • pixso.host
        • pixso.mouse
        • pixso.editor
        • pixso.keyboard
        • pixso.fieldset
        • pixso.viewport
        • pixso.vectorEditor
        • pixso.stickyToolbar
        • pixso.clientStorage
        • pixso.serverStorage
      • 节点类型

        • BooleanOperationNode
        • ComponentNode
        • ComponentSetNode
        • DocumentNode
        • EllipseNode
        • FrameNode
        • GroupNode
        • InstanceNode
        • LineNode
        • PageNode
        • PolygonNode
        • RectangleNode
        • SectionNode
        • SliceNode
        • StarNode
        • TextNode
        • VectorNode
      • 样式类型

        • PaintStyle
        • TextStyle
        • EffectStyle
        • GridStyle
      • 数据类型

        • 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
        • StickyToolbar
        • StrokeCap
        • StrokeJoin
        • StyleChangeProperty
        • TextCase
        • TextDecoration
        • TextListOptions
        • ThemeType
        • ToolType
        • Transition
        • Trigger
        • Vector
    • Host API 文档

      • 概述
      • Host API
  • 服务端 API

    • OpenAPI 文档
    • OpenAPI 文档
    • 事件订阅
    • 事件订阅
  • 客户端 API

    • 简介
    • 唤醒客户端
    • Web API
    • 更新日志

Library

Style

type StyleType = "PAINT" | "TEXT" | "EFFECT" | "GRID";

interface LibraryStyle {
  readonly name: string;
  readonly key: string;
  readonly thumbnailUrl: string;
  readonly description: string;
  readonly type: StyleType;
}

Component

interface LibraryComponent {
  readonly name: string;
  readonly key: string;
  readonly thumbnailUrl: string;
  readonly description: string;
  readonly pageName: string;
  readonly containerName: string;
  readonly categories: string[];
  readonly type: "COMPONENT";
}

interface LocalComponent extends LibraryComponent {
  generateThumbnail: () => Uint8Array;
}

ComponentSet

interface LibraryComponentSet {
  readonly name: string;
  readonly key: string;
  readonly thumbnailUrl: string;
  readonly description: string;
  readonly pageName: string;
  readonly containerName: string;
  readonly categories: string[];
  readonly type: "COMPONENT_SET";
}

interface LibraryComponentSetWithVariants extends LibraryComponentSet {
  readonly variants: LibraryComponent[];
}

interface LocalComponentSet extends LibraryComponentSet {
  generateThumbnail: () => Uint8Array;
}

LibraryItem

interface LibraryItem {
  readonly name: string;
  readonly key: string;
  readonly type: "ENT" | "TEAM";
  readonly teamName: string;
  readonly teamID: number;
  readonly subscribed: boolean;
}

LibraryAssets

interface LibraryAssets {
  readonly name: string;
  readonly key: string; // fileKey
  readonly subscribed: boolean;
  readonly componentList: (
    | LibraryComponent
    | LibraryComponentSetWithVariants
  )[];
  readonly style: {
    paints: ReadonlyArray<LibraryStyle>;
    effects: ReadonlyArray<LibraryStyle>;
    texts: ReadonlyArray<LibraryStyle>;
    grids: ReadonlyArray<LibraryStyle>;
  };
}
Prev
LetterSpacing
Next
LineHeight