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