type StyleType = "PAINT" | "TEXT" | "EFFECT" | "GRID";
interface LibraryStyle {
readonly name: string;
readonly key: string;
readonly thumbnailUrl: string;
readonly description: string;
readonly type: StyleType;
}
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;
}
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;
}
interface LibraryItem {
readonly name: string;
readonly key: string;
readonly type: "ENT" | "TEAM";
readonly teamName: string;
readonly teamID: number;
readonly subscribed: boolean;
}
interface LibraryAssets {
readonly name: string;
readonly key: string;
readonly subscribed: boolean;
readonly componentList: (
| LibraryComponent
| LibraryComponentSetWithVariants
)[];
readonly style: {
paints: ReadonlyArray<LibraryStyle>;
effects: ReadonlyArray<LibraryStyle>;
texts: ReadonlyArray<LibraryStyle>;
grids: ReadonlyArray<LibraryStyle>;
};
}