UNPKG

@mcastiello/figmatic

Version:

27 lines (26 loc) 1.34 kB
import type { EventOf, SubscriptionConfig, SubscriptionOf } from "@mcastiello/event-bus"; import { ExportFormat } from "../types"; import { Channels, type FigmaticBusDefinition } from "../types/events"; import type { FigmaNode } from "../nodes"; import type { ExportPlugin } from "./parse"; declare class FigmaLoader { private file; private branch; private pageFilters; private data; private variables; private getDuration; subscribe<Event extends EventOf<FigmaticBusDefinition, Channels.Figmatic>>(event: Event, subscription: SubscriptionOf<FigmaticBusDefinition, Channels.Figmatic, Event>, options?: SubscriptionConfig): import("@mcastiello/event-bus/dist/types/internal").ClearFunction; load(file: string, token: string, pageFilters?: (string | RegExp)[]): Promise<void>; get selectedBranch(): string | undefined; private downloadBranch; private downloadSelectedBranch; private parseFigmaFile; clear(): void; downloadGraphics(nodes: FigmaNode[], format?: ExportFormat, scale?: number): Promise<Record<string, string | ArrayBuffer>>; selectBranch(branch?: string): Promise<void>; registerExportPlugin(plugin: ExportPlugin, name?: string): void; generateExport(pluginName?: string): Promise<Record<string, string>>; } export declare const Figmatic: FigmaLoader; export {};