TeamLibrary

已订阅的团队库数据,包含所有可用的组件和样式。

type TeamLibrary = ReadonlyArray<{
  readonly name: string;
  readonly id: string;
  readonly componentList: TeamLibraryComponent[]
  readonly style: {
    paints: ReadonlyArray<TeamLibraryStyle>
    effects: ReadonlyArray<TeamLibraryStyle>
    texts: ReadonlyArray<TeamLibraryStyle>
    grids: ReadonlyArray<TeamLibraryStyle>
  }
}>
  • componentList :组件列表,具体可查看类型 TeamLibraryComponent
  • style :样式对象,其中四个字段的值皆为 TeamLibraryStyle,具体可查看类型 TeamLibraryStyle

TeamLibraryComponent

团队库组件/组件集。

interface TeamLibraryComponent {
  readonly id: string;
  readonly name: string;
  readonly ukey: string;
  readonly description: string;
  readonly type: "COMPONENT" | 'COMPONENT_SET'
  readonly cover: string
  readonly width: number
  readonly height: number
}
  • width :组件宽度,部分旧的团队库宽度可能为0。
  • height :组件高度,部分旧的团队库高度可能为0。

TeamLibraryStyle

团队库样式。

interface TeamLibraryStyle {
  readonly id: string;
  readonly name: string;
  readonly ukey: string;
  readonly description: string;
  readonly type: StyleType;
}
  • type :样式类型,具体可查看类型 StyleType

PublishStatus

描述可发布到团队库的元素(即样式和组件)的状态。

type PublishStatus = "UNPUBLISHED" | "CURRENT" | "CHANGED"

可能的值为:

  • UNPUBLISHED:未发布到团队库.
  • CURRENT:已发布,已发布版本与本地版本匹配。
  • CHANGED:已发布,但具有本地更改。

组件文档链接。uri应该是一个有效的uri(例如https://mastergo.com)。

interface DocumentationLink {
  readonly uri: string
}