UNPKG

989 BTypeScriptView Raw
1export declare type Config = IFrameConfig | FigmaConfig | FigspecConfig | ImageConfig | LinkConfig;
2export interface ConfigBase {
3 name?: string;
4 offscreen?: boolean;
5}
6export interface IFrameConfigBase extends ConfigBase {
7 url: string;
8 allowFullscreen?: boolean;
9}
10export interface IFrameConfig extends IFrameConfigBase {
11 type: 'iframe';
12}
13export interface FigmaConfig extends IFrameConfigBase {
14 type: 'figma';
15 embedHost?: string;
16}
17export interface FigspecConfig extends ConfigBase {
18 type: 'figspec' | 'experimental-figspec';
19 url: string;
20 accessToken: string;
21}
22export interface TransformableConfigBase extends ConfigBase {
23 scale?: number;
24 offset?: [number, number];
25}
26export interface ImageConfig extends TransformableConfigBase {
27 type: 'image';
28 url: string;
29}
30export interface LinkConfig extends ConfigBase {
31 type: 'link';
32 url: string;
33 label?: string;
34 showArrow?: boolean;
35 target?: string;
36 rel?: string;
37}