@chili-publish/studio-sdk 0.121.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +89 -0
- package/_bundles/main.js +3 -0
- package/_bundles/main.js.LICENSE.txt +14 -0
- package/_bundles/main.js.map +1 -0
- package/_bundles/report.html +38 -0
- package/lib/editor-engine.json +3 -0
- package/lib/package.json +89 -0
- package/lib/src/controllers/ActionController.d.ts +38 -0
- package/lib/src/controllers/ActionController.js +79 -0
- package/lib/src/controllers/ActionController.js.map +1 -0
- package/lib/src/controllers/AnimationController.d.ts +70 -0
- package/lib/src/controllers/AnimationController.js +135 -0
- package/lib/src/controllers/AnimationController.js.map +1 -0
- package/lib/src/controllers/CanvasController.d.ts +34 -0
- package/lib/src/controllers/CanvasController.js +71 -0
- package/lib/src/controllers/CanvasController.js.map +1 -0
- package/lib/src/controllers/CharacterStyleController.d.ts +55 -0
- package/lib/src/controllers/CharacterStyleController.js +107 -0
- package/lib/src/controllers/CharacterStyleController.js.map +1 -0
- package/lib/src/controllers/ColorStyleController.d.ts +62 -0
- package/lib/src/controllers/ColorStyleController.js +113 -0
- package/lib/src/controllers/ColorStyleController.js.map +1 -0
- package/lib/src/controllers/ConfigurationController.d.ts +27 -0
- package/lib/src/controllers/ConfigurationController.js +60 -0
- package/lib/src/controllers/ConfigurationController.js.map +1 -0
- package/lib/src/controllers/ConnectorController.d.ts +90 -0
- package/lib/src/controllers/ConnectorController.js +196 -0
- package/lib/src/controllers/ConnectorController.js.map +1 -0
- package/lib/src/controllers/DebugController.d.ts +33 -0
- package/lib/src/controllers/DebugController.js +72 -0
- package/lib/src/controllers/DebugController.js.map +1 -0
- package/lib/src/controllers/DocumentController.d.ts +40 -0
- package/lib/src/controllers/DocumentController.js +163 -0
- package/lib/src/controllers/DocumentController.js.map +1 -0
- package/lib/src/controllers/ExperimentController.d.ts +39 -0
- package/lib/src/controllers/ExperimentController.js +83 -0
- package/lib/src/controllers/ExperimentController.js.map +1 -0
- package/lib/src/controllers/FontConnectorController.d.ts +95 -0
- package/lib/src/controllers/FontConnectorController.js +168 -0
- package/lib/src/controllers/FontConnectorController.js.map +1 -0
- package/lib/src/controllers/FontController.d.ts +50 -0
- package/lib/src/controllers/FontController.js +95 -0
- package/lib/src/controllers/FontController.js.map +1 -0
- package/lib/src/controllers/FrameController.d.ts +369 -0
- package/lib/src/controllers/FrameController.js +599 -0
- package/lib/src/controllers/FrameController.js.map +1 -0
- package/lib/src/controllers/LayoutController.d.ts +103 -0
- package/lib/src/controllers/LayoutController.js +190 -0
- package/lib/src/controllers/LayoutController.js.map +1 -0
- package/lib/src/controllers/MediaConnectorController.d.ts +95 -0
- package/lib/src/controllers/MediaConnectorController.js +170 -0
- package/lib/src/controllers/MediaConnectorController.js.map +1 -0
- package/lib/src/controllers/PageController.d.ts +40 -0
- package/lib/src/controllers/PageController.js +92 -0
- package/lib/src/controllers/PageController.js.map +1 -0
- package/lib/src/controllers/ParagraphStyleController.d.ts +62 -0
- package/lib/src/controllers/ParagraphStyleController.js +117 -0
- package/lib/src/controllers/ParagraphStyleController.js.map +1 -0
- package/lib/src/controllers/ShapeController.d.ts +104 -0
- package/lib/src/controllers/ShapeController.js +174 -0
- package/lib/src/controllers/ShapeController.js.map +1 -0
- package/lib/src/controllers/SubscriberController.d.ts +143 -0
- package/lib/src/controllers/SubscriberController.js +213 -0
- package/lib/src/controllers/SubscriberController.js.map +1 -0
- package/lib/src/controllers/TextStyleController.d.ts +31 -0
- package/lib/src/controllers/TextStyleController.js +71 -0
- package/lib/src/controllers/TextStyleController.js.map +1 -0
- package/lib/src/controllers/ToolController.d.ts +54 -0
- package/lib/src/controllers/ToolController.js +104 -0
- package/lib/src/controllers/ToolController.js.map +1 -0
- package/lib/src/controllers/UndoManagerController.d.ts +22 -0
- package/lib/src/controllers/UndoManagerController.js +56 -0
- package/lib/src/controllers/UndoManagerController.js.map +1 -0
- package/lib/src/controllers/UtilsController.d.ts +20 -0
- package/lib/src/controllers/UtilsController.js +35 -0
- package/lib/src/controllers/UtilsController.js.map +1 -0
- package/lib/src/controllers/VariableController.d.ts +117 -0
- package/lib/src/controllers/VariableController.js +205 -0
- package/lib/src/controllers/VariableController.js.map +1 -0
- package/lib/src/index.d.ts +93 -0
- package/lib/src/index.js +154 -0
- package/lib/src/index.js.map +1 -0
- package/lib/src/interactions/connector.d.ts +31 -0
- package/lib/src/interactions/connector.js +99 -0
- package/lib/src/interactions/connector.js.map +1 -0
- package/lib/src/setupTests.d.ts +1 -0
- package/lib/src/setupTests.js +2 -0
- package/lib/src/setupTests.js.map +1 -0
- package/lib/src/tests/__mocks__/FrameProperties.d.ts +52 -0
- package/lib/src/tests/__mocks__/FrameProperties.js +20 -0
- package/lib/src/tests/__mocks__/FrameProperties.js.map +1 -0
- package/lib/src/tests/__mocks__/MockImageFrameSource.d.ts +4 -0
- package/lib/src/tests/__mocks__/MockImageFrameSource.js +15 -0
- package/lib/src/tests/__mocks__/MockImageFrameSource.js.map +1 -0
- package/lib/src/tests/__mocks__/animations.d.ts +2 -0
- package/lib/src/tests/__mocks__/animations.js +10 -0
- package/lib/src/tests/__mocks__/animations.js.map +1 -0
- package/lib/src/tests/__mocks__/config.d.ts +5 -0
- package/lib/src/tests/__mocks__/config.js +31 -0
- package/lib/src/tests/__mocks__/config.js.map +1 -0
- package/lib/src/tests/__mocks__/mockDocument.d.ts +1 -0
- package/lib/src/tests/__mocks__/mockDocument.js +2 -0
- package/lib/src/tests/__mocks__/mockDocument.js.map +1 -0
- package/lib/src/tests/controllers/ActionController.test.d.ts +1 -0
- package/lib/src/tests/controllers/ActionController.test.js +61 -0
- package/lib/src/tests/controllers/ActionController.test.js.map +1 -0
- package/lib/src/tests/controllers/AnimationController.test.d.ts +1 -0
- package/lib/src/tests/controllers/AnimationController.test.js +91 -0
- package/lib/src/tests/controllers/AnimationController.test.js.map +1 -0
- package/lib/src/tests/controllers/CanvasController.test.d.ts +1 -0
- package/lib/src/tests/controllers/CanvasController.test.js +50 -0
- package/lib/src/tests/controllers/CanvasController.test.js.map +1 -0
- package/lib/src/tests/controllers/CharacterStyleController.test.d.ts +1 -0
- package/lib/src/tests/controllers/CharacterStyleController.test.js +125 -0
- package/lib/src/tests/controllers/CharacterStyleController.test.js.map +1 -0
- package/lib/src/tests/controllers/ColorStyleController.test.d.ts +1 -0
- package/lib/src/tests/controllers/ColorStyleController.test.js +83 -0
- package/lib/src/tests/controllers/ColorStyleController.test.js.map +1 -0
- package/lib/src/tests/controllers/ConfigurationConnectorController.test.d.ts +1 -0
- package/lib/src/tests/controllers/ConfigurationConnectorController.test.js +39 -0
- package/lib/src/tests/controllers/ConfigurationConnectorController.test.js.map +1 -0
- package/lib/src/tests/controllers/ConnectorController.test.d.ts +1 -0
- package/lib/src/tests/controllers/ConnectorController.test.js +77 -0
- package/lib/src/tests/controllers/ConnectorController.test.js.map +1 -0
- package/lib/src/tests/controllers/DebugController.test.d.ts +1 -0
- package/lib/src/tests/controllers/DebugController.test.js +47 -0
- package/lib/src/tests/controllers/DebugController.test.js.map +1 -0
- package/lib/src/tests/controllers/DocumentController.test.d.ts +1 -0
- package/lib/src/tests/controllers/DocumentController.test.js +170 -0
- package/lib/src/tests/controllers/DocumentController.test.js.map +1 -0
- package/lib/src/tests/controllers/ExperimentController.test.d.ts +1 -0
- package/lib/src/tests/controllers/ExperimentController.test.js +53 -0
- package/lib/src/tests/controllers/ExperimentController.test.js.map +1 -0
- package/lib/src/tests/controllers/FontConnectorController.test.d.ts +1 -0
- package/lib/src/tests/controllers/FontConnectorController.test.js +109 -0
- package/lib/src/tests/controllers/FontConnectorController.test.js.map +1 -0
- package/lib/src/tests/controllers/FontController.test.d.ts +1 -0
- package/lib/src/tests/controllers/FontController.test.js +73 -0
- package/lib/src/tests/controllers/FontController.test.js.map +1 -0
- package/lib/src/tests/controllers/FrameController.test.d.ts +1 -0
- package/lib/src/tests/controllers/FrameController.test.js +408 -0
- package/lib/src/tests/controllers/FrameController.test.js.map +1 -0
- package/lib/src/tests/controllers/LayoutController.test.d.ts +1 -0
- package/lib/src/tests/controllers/LayoutController.test.js +144 -0
- package/lib/src/tests/controllers/LayoutController.test.js.map +1 -0
- package/lib/src/tests/controllers/MediaConnectorController.test.d.ts +1 -0
- package/lib/src/tests/controllers/MediaConnectorController.test.js +109 -0
- package/lib/src/tests/controllers/MediaConnectorController.test.js.map +1 -0
- package/lib/src/tests/controllers/PageController.test.d.ts +1 -0
- package/lib/src/tests/controllers/PageController.test.js +58 -0
- package/lib/src/tests/controllers/PageController.test.js.map +1 -0
- package/lib/src/tests/controllers/ParagraphStyleController.test.d.ts +1 -0
- package/lib/src/tests/controllers/ParagraphStyleController.test.js +139 -0
- package/lib/src/tests/controllers/ParagraphStyleController.test.js.map +1 -0
- package/lib/src/tests/controllers/ShapeController.test.d.ts +1 -0
- package/lib/src/tests/controllers/ShapeController.test.js +102 -0
- package/lib/src/tests/controllers/ShapeController.test.js.map +1 -0
- package/lib/src/tests/controllers/SubscriberContoller.test.d.ts +1 -0
- package/lib/src/tests/controllers/SubscriberContoller.test.js +201 -0
- package/lib/src/tests/controllers/SubscriberContoller.test.js.map +1 -0
- package/lib/src/tests/controllers/TextStyleController.test.d.ts +1 -0
- package/lib/src/tests/controllers/TextStyleController.test.js +43 -0
- package/lib/src/tests/controllers/TextStyleController.test.js.map +1 -0
- package/lib/src/tests/controllers/ToolController.test.d.ts +1 -0
- package/lib/src/tests/controllers/ToolController.test.js +72 -0
- package/lib/src/tests/controllers/ToolController.test.js.map +1 -0
- package/lib/src/tests/controllers/UndoManagerController.test.d.ts +1 -0
- package/lib/src/tests/controllers/UndoManagerController.test.js +35 -0
- package/lib/src/tests/controllers/UndoManagerController.test.js.map +1 -0
- package/lib/src/tests/controllers/UtilsController.test.d.ts +1 -0
- package/lib/src/tests/controllers/UtilsController.test.js +33 -0
- package/lib/src/tests/controllers/UtilsController.test.js.map +1 -0
- package/lib/src/tests/controllers/VariableController.test.d.ts +1 -0
- package/lib/src/tests/controllers/VariableController.test.js +161 -0
- package/lib/src/tests/controllers/VariableController.test.js.map +1 -0
- package/lib/src/tests/index.test.d.ts +1 -0
- package/lib/src/tests/index.test.js +26 -0
- package/lib/src/tests/index.test.js.map +1 -0
- package/lib/src/tests/interactions/connector.test.d.ts +1 -0
- package/lib/src/tests/interactions/connector.test.js +24 -0
- package/lib/src/tests/interactions/connector.test.js.map +1 -0
- package/lib/src/tests/utils/editorResponseData.test.d.ts +1 -0
- package/lib/src/tests/utils/editorResponseData.test.js +48 -0
- package/lib/src/tests/utils/editorResponseData.test.js.map +1 -0
- package/lib/src/tests/utils/getClaculatedValue.test.d.ts +1 -0
- package/lib/src/tests/utils/getClaculatedValue.test.js +78 -0
- package/lib/src/tests/utils/getClaculatedValue.test.js.map +1 -0
- package/lib/src/tests/utils/getFetchUrls.test.d.ts +1 -0
- package/lib/src/tests/utils/getFetchUrls.test.js +10 -0
- package/lib/src/tests/utils/getFetchUrls.test.js.map +1 -0
- package/lib/src/tests/utils/round.test.d.ts +1 -0
- package/lib/src/tests/utils/round.test.js +16 -0
- package/lib/src/tests/utils/round.test.js.map +1 -0
- package/lib/src/types/ActionTypes.d.ts +63 -0
- package/lib/src/types/ActionTypes.js +29 -0
- package/lib/src/types/ActionTypes.js.map +1 -0
- package/lib/src/types/AnimationTypes.d.ts +111 -0
- package/lib/src/types/AnimationTypes.js +49 -0
- package/lib/src/types/AnimationTypes.js.map +1 -0
- package/lib/src/types/CharacterStyleTypes.d.ts +65 -0
- package/lib/src/types/CharacterStyleTypes.js +2 -0
- package/lib/src/types/CharacterStyleTypes.js.map +1 -0
- package/lib/src/types/ColorStyleTypes.d.ts +73 -0
- package/lib/src/types/ColorStyleTypes.js +24 -0
- package/lib/src/types/ColorStyleTypes.js.map +1 -0
- package/lib/src/types/CommonTypes.d.ts +92 -0
- package/lib/src/types/CommonTypes.js +2 -0
- package/lib/src/types/CommonTypes.js.map +1 -0
- package/lib/src/types/ConfigurationTypes.d.ts +6 -0
- package/lib/src/types/ConfigurationTypes.js +8 -0
- package/lib/src/types/ConfigurationTypes.js.map +1 -0
- package/lib/src/types/ConnectorTypes.d.ts +115 -0
- package/lib/src/types/ConnectorTypes.js +94 -0
- package/lib/src/types/ConnectorTypes.js.map +1 -0
- package/lib/src/types/DebugTypes.d.ts +25 -0
- package/lib/src/types/DebugTypes.js +8 -0
- package/lib/src/types/DebugTypes.js.map +1 -0
- package/lib/src/types/DocumentTypes.d.ts +180 -0
- package/lib/src/types/DocumentTypes.js +17 -0
- package/lib/src/types/DocumentTypes.js.map +1 -0
- package/lib/src/types/FontConnectorTypes.d.ts +20 -0
- package/lib/src/types/FontConnectorTypes.js +6 -0
- package/lib/src/types/FontConnectorTypes.js.map +1 -0
- package/lib/src/types/FontTypes.d.ts +15 -0
- package/lib/src/types/FontTypes.js +2 -0
- package/lib/src/types/FontTypes.js.map +1 -0
- package/lib/src/types/FrameTypes.d.ts +156 -0
- package/lib/src/types/FrameTypes.js +63 -0
- package/lib/src/types/FrameTypes.js.map +1 -0
- package/lib/src/types/LayoutTypes.d.ts +61 -0
- package/lib/src/types/LayoutTypes.js +6 -0
- package/lib/src/types/LayoutTypes.js.map +1 -0
- package/lib/src/types/MediaConnectorTypes.d.ts +20 -0
- package/lib/src/types/MediaConnectorTypes.js +6 -0
- package/lib/src/types/MediaConnectorTypes.js.map +1 -0
- package/lib/src/types/PageTypes.d.ts +12 -0
- package/lib/src/types/PageTypes.js +2 -0
- package/lib/src/types/PageTypes.js.map +1 -0
- package/lib/src/types/ParagraphStyleTypes.d.ts +79 -0
- package/lib/src/types/ParagraphStyleTypes.js +2 -0
- package/lib/src/types/ParagraphStyleTypes.js.map +1 -0
- package/lib/src/types/ShapeTypes.d.ts +26 -0
- package/lib/src/types/ShapeTypes.js +13 -0
- package/lib/src/types/ShapeTypes.js.map +1 -0
- package/lib/src/types/TextStyleTypes.d.ts +131 -0
- package/lib/src/types/TextStyleTypes.js +68 -0
- package/lib/src/types/TextStyleTypes.js.map +1 -0
- package/lib/src/types/VariableTypes.d.ts +45 -0
- package/lib/src/types/VariableTypes.js +13 -0
- package/lib/src/types/VariableTypes.js.map +1 -0
- package/lib/src/utils/EditorResponseData.d.ts +3 -0
- package/lib/src/utils/EditorResponseData.js +16 -0
- package/lib/src/utils/EditorResponseData.js.map +1 -0
- package/lib/src/utils/enums.d.ts +30 -0
- package/lib/src/utils/enums.js +36 -0
- package/lib/src/utils/enums.js.map +1 -0
- package/lib/src/utils/getCalculatedValue.d.ts +2 -0
- package/lib/src/utils/getCalculatedValue.js +20 -0
- package/lib/src/utils/getCalculatedValue.js.map +1 -0
- package/lib/src/utils/getFetchUrl.d.ts +2 -0
- package/lib/src/utils/getFetchUrl.js +3 -0
- package/lib/src/utils/getFetchUrl.js.map +1 -0
- package/package.json +89 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export declare enum ColorType {
|
|
2
|
+
rgb = "rgb",
|
|
3
|
+
cmyk = "cmyk",
|
|
4
|
+
lab = "lab",
|
|
5
|
+
gray = "gray",
|
|
6
|
+
xyz = "xyz",
|
|
7
|
+
hls = "hls",
|
|
8
|
+
spotCmyk = "spotCmyk",
|
|
9
|
+
spotRgb = "spotRgb",
|
|
10
|
+
custom = "custom"
|
|
11
|
+
}
|
|
12
|
+
export declare type ColorUpdate = {
|
|
13
|
+
r: number;
|
|
14
|
+
g: number;
|
|
15
|
+
b: number;
|
|
16
|
+
colorType: ColorType;
|
|
17
|
+
};
|
|
18
|
+
export declare type Color = {
|
|
19
|
+
colorType: ColorType;
|
|
20
|
+
r: number;
|
|
21
|
+
g: number;
|
|
22
|
+
b: number;
|
|
23
|
+
displayValue?: string;
|
|
24
|
+
};
|
|
25
|
+
export declare type DocumentColor = {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
color: Color;
|
|
29
|
+
};
|
|
30
|
+
export declare type ColorUsageUpdate = {
|
|
31
|
+
/**
|
|
32
|
+
* Reference to the stylekit color, can only be used if it is a stylekit color.
|
|
33
|
+
*/
|
|
34
|
+
colorId?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The local color object, can only be used if it is a local color.
|
|
37
|
+
*/
|
|
38
|
+
color?: ColorUpdate;
|
|
39
|
+
usageType: ColorUsageType;
|
|
40
|
+
/**
|
|
41
|
+
* Opacity of the color (0-100) where 0 = fully transparent.
|
|
42
|
+
*/
|
|
43
|
+
opacity?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Indicates if the color will be applied or not.
|
|
46
|
+
*/
|
|
47
|
+
isApplied?: boolean;
|
|
48
|
+
};
|
|
49
|
+
export declare type ColorUsage = {
|
|
50
|
+
/**
|
|
51
|
+
* Reference to the stylekit color, can only be used if it is a stylekit color.
|
|
52
|
+
*/
|
|
53
|
+
colorId?: string;
|
|
54
|
+
/**
|
|
55
|
+
* The local color object, can only be used if it is a local color.
|
|
56
|
+
*/
|
|
57
|
+
color?: Color;
|
|
58
|
+
usageType: ColorUsageType;
|
|
59
|
+
/**
|
|
60
|
+
* Opacity of the color (0-100) where 0 = fully transparent.
|
|
61
|
+
*/
|
|
62
|
+
opacity?: number;
|
|
63
|
+
};
|
|
64
|
+
export declare enum ColorUsageType {
|
|
65
|
+
/**
|
|
66
|
+
* The color is defined locally on the object
|
|
67
|
+
*/
|
|
68
|
+
local = "local",
|
|
69
|
+
/**
|
|
70
|
+
* THe color is referencing a stylekit color
|
|
71
|
+
*/
|
|
72
|
+
stylekit = "stylekit"
|
|
73
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export var ColorType;
|
|
2
|
+
(function (ColorType) {
|
|
3
|
+
ColorType["rgb"] = "rgb";
|
|
4
|
+
ColorType["cmyk"] = "cmyk";
|
|
5
|
+
ColorType["lab"] = "lab";
|
|
6
|
+
ColorType["gray"] = "gray";
|
|
7
|
+
ColorType["xyz"] = "xyz";
|
|
8
|
+
ColorType["hls"] = "hls";
|
|
9
|
+
ColorType["spotCmyk"] = "spotCmyk";
|
|
10
|
+
ColorType["spotRgb"] = "spotRgb";
|
|
11
|
+
ColorType["custom"] = "custom";
|
|
12
|
+
})(ColorType || (ColorType = {}));
|
|
13
|
+
export var ColorUsageType;
|
|
14
|
+
(function (ColorUsageType) {
|
|
15
|
+
/**
|
|
16
|
+
* The color is defined locally on the object
|
|
17
|
+
*/
|
|
18
|
+
ColorUsageType["local"] = "local";
|
|
19
|
+
/**
|
|
20
|
+
* THe color is referencing a stylekit color
|
|
21
|
+
*/
|
|
22
|
+
ColorUsageType["stylekit"] = "stylekit";
|
|
23
|
+
})(ColorUsageType || (ColorUsageType = {}));
|
|
24
|
+
//# sourceMappingURL=ColorStyleTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorStyleTypes.js","sourceRoot":"","sources":["../../../src/types/ColorStyleTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,SAUX;AAVD,WAAY,SAAS;IACjB,wBAAW,CAAA;IACX,0BAAa,CAAA;IACb,wBAAW,CAAA;IACX,0BAAa,CAAA;IACb,wBAAW,CAAA;IACX,wBAAW,CAAA;IACX,kCAAqB,CAAA;IACrB,gCAAmB,CAAA;IACnB,8BAAiB,CAAA;AACrB,CAAC,EAVW,SAAS,KAAT,SAAS,QAUpB;AA2DD,MAAM,CAAN,IAAY,cASX;AATD,WAAY,cAAc;IACtB;;OAEG;IACH,iCAAe,CAAA;IACf;;OAEG;IACH,uCAAqB,CAAA;AACzB,CAAC,EATW,cAAc,KAAd,cAAc,QASzB"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { CallSender } from 'penpal';
|
|
2
|
+
import { AnimationPlaybackType, FrameAnimationType } from './AnimationTypes';
|
|
3
|
+
import { LayoutListItemType, LayoutPropertiesType, LayoutWithFrameProperties } from './LayoutTypes';
|
|
4
|
+
import type { FrameType } from './FrameTypes';
|
|
5
|
+
import { Frame, FrameLayoutType, FrameTypeEnum } from './FrameTypes';
|
|
6
|
+
import { Variable } from './VariableTypes';
|
|
7
|
+
import { DocumentAction, ToolType } from '..';
|
|
8
|
+
import { DocumentType, UndoState } from './DocumentTypes';
|
|
9
|
+
import { DocumentColor } from './ColorStyleTypes';
|
|
10
|
+
import { ParagraphStyle } from './ParagraphStyleTypes';
|
|
11
|
+
import { DocumentFont } from './FontTypes';
|
|
12
|
+
import { CharacterStyle } from './CharacterStyleTypes';
|
|
13
|
+
import { ConnectorEvent } from './ConnectorTypes';
|
|
14
|
+
import { PageSize } from './PageTypes';
|
|
15
|
+
import { SelectedTextStyle } from './TextStyleTypes';
|
|
16
|
+
import { CornerRadius } from './ShapeTypes';
|
|
17
|
+
export declare type Id = string;
|
|
18
|
+
export declare type ConfigType = {
|
|
19
|
+
onActionsChanged?: (state: DocumentAction[]) => void;
|
|
20
|
+
onStateChanged?: () => void;
|
|
21
|
+
onDocumentLoaded?: () => void;
|
|
22
|
+
onSelectedFrameLayoutChanged?: (state: FrameLayoutType) => void;
|
|
23
|
+
onSelectedFrameContentChanged?: (state: Frame) => void;
|
|
24
|
+
editorLink?: string;
|
|
25
|
+
editorId?: string;
|
|
26
|
+
chiliEnvironmentUrl?: string;
|
|
27
|
+
documentType?: DocumentType;
|
|
28
|
+
onPageSelectionChanged?: () => void;
|
|
29
|
+
onSelectedLayoutPropertiesChanged?: (state: LayoutPropertiesType) => void;
|
|
30
|
+
onScrubberPositionChanged?: (state: AnimationPlaybackType) => void;
|
|
31
|
+
onFrameAnimationsChanged?: (animationState: FrameAnimationType[]) => void;
|
|
32
|
+
onVariableListChanged?: (variableList: Variable[]) => void;
|
|
33
|
+
onSelectedToolChanged?: (tool: ToolType) => void;
|
|
34
|
+
onUndoStackStateChanged?: (undoStackState: UndoState) => void;
|
|
35
|
+
onSelectedLayoutFramesChanged?: (frames: SelectedLayoutFrame[]) => void;
|
|
36
|
+
onSelectedTextStyleChanged?: (styles: SelectedTextStyle) => void;
|
|
37
|
+
onColorsChanged?: (colors: DocumentColor[]) => void;
|
|
38
|
+
onParagraphStylesChanged?: (paragraphStyles: ParagraphStyle[]) => void;
|
|
39
|
+
onCharacterStylesChanged?: (characterStyles: CharacterStyle[]) => void;
|
|
40
|
+
onFontsChanged?: (fonts: DocumentFont[]) => void;
|
|
41
|
+
onSelectedLayoutIdChanged?: (layoutId: string) => void;
|
|
42
|
+
onLayoutsChanged?: (layouts: LayoutListItemType[]) => void;
|
|
43
|
+
onConnectorEvent?: (event: ConnectorEvent) => void;
|
|
44
|
+
onZoomChanged?: (scaleFactor: number) => void;
|
|
45
|
+
onPageSizeChanged?: (pageSize: PageSize) => void;
|
|
46
|
+
onShapeCornerRadiusChanged?: (cornerRadius: CornerRadius) => void;
|
|
47
|
+
};
|
|
48
|
+
export interface EditorResponse<T> {
|
|
49
|
+
success: boolean;
|
|
50
|
+
status: number;
|
|
51
|
+
data?: string | null;
|
|
52
|
+
error?: string | {
|
|
53
|
+
code: number;
|
|
54
|
+
error: Record<string, unknown>;
|
|
55
|
+
} | null;
|
|
56
|
+
parsedData: T | null;
|
|
57
|
+
}
|
|
58
|
+
export interface EditorRawAPI extends CallSender {
|
|
59
|
+
[index: string]: <T>(...args: unknown[]) => Promise<T>;
|
|
60
|
+
}
|
|
61
|
+
export interface EditorAPI extends CallSender {
|
|
62
|
+
[index: string]: <T>(...args: unknown[]) => Promise<EditorResponse<T>>;
|
|
63
|
+
}
|
|
64
|
+
export declare type PageType = {
|
|
65
|
+
pageId: Id;
|
|
66
|
+
pageNumber: number;
|
|
67
|
+
width: number | null;
|
|
68
|
+
height: number | null;
|
|
69
|
+
frames: FrameType[];
|
|
70
|
+
};
|
|
71
|
+
export declare type InitialStateType = {
|
|
72
|
+
layouts: LayoutWithFrameProperties[];
|
|
73
|
+
selectedLayoutId: Id;
|
|
74
|
+
pages: PageType[];
|
|
75
|
+
variables: Variable[];
|
|
76
|
+
};
|
|
77
|
+
export interface PropertyState<T> {
|
|
78
|
+
value: T;
|
|
79
|
+
isOverride: boolean;
|
|
80
|
+
}
|
|
81
|
+
export interface SelectedLayoutFrame {
|
|
82
|
+
frameId: Id;
|
|
83
|
+
frameName: string;
|
|
84
|
+
frameType: FrameTypeEnum;
|
|
85
|
+
included: boolean;
|
|
86
|
+
}
|
|
87
|
+
export interface MetaData {
|
|
88
|
+
[key: string]: string;
|
|
89
|
+
}
|
|
90
|
+
export interface ConnectorOptions {
|
|
91
|
+
[key: string]: string;
|
|
92
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommonTypes.js","sourceRoot":"","sources":["../../../src/types/CommonTypes.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var WellKnownConfigurationKeys;
|
|
2
|
+
(function (WellKnownConfigurationKeys) {
|
|
3
|
+
WellKnownConfigurationKeys["GraFxStudioEnvironmentApiUrl"] = "ENVIRONMENT_API";
|
|
4
|
+
WellKnownConfigurationKeys["GraFxStudioSdkVersion"] = "SDK_VERSION";
|
|
5
|
+
WellKnownConfigurationKeys["GraFxStudioDocumentType"] = "DOCUMENT_TYPE";
|
|
6
|
+
WellKnownConfigurationKeys["GraFxStudioTemplateId"] = "TEMPLATE_ID";
|
|
7
|
+
})(WellKnownConfigurationKeys || (WellKnownConfigurationKeys = {}));
|
|
8
|
+
//# sourceMappingURL=ConfigurationTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurationTypes.js","sourceRoot":"","sources":["../../../src/types/ConfigurationTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,0BAKX;AALD,WAAY,0BAA0B;IAClC,8EAAgD,CAAA;IAChD,mEAAqC,CAAA;IACrC,uEAAyC,CAAA;IACzC,mEAAqC,CAAA;AACzC,CAAC,EALW,0BAA0B,KAA1B,0BAA0B,QAKrC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
export declare enum DeprecatedMediaType {
|
|
2
|
+
file = 0,
|
|
3
|
+
collection = 1
|
|
4
|
+
}
|
|
5
|
+
export declare enum MediaType {
|
|
6
|
+
file = "file",
|
|
7
|
+
collection = "collection"
|
|
8
|
+
}
|
|
9
|
+
export declare enum SortBy {
|
|
10
|
+
name = "name",
|
|
11
|
+
path = "relativePath",
|
|
12
|
+
id = "id"
|
|
13
|
+
}
|
|
14
|
+
export declare enum SortOrder {
|
|
15
|
+
ascending = "asc",
|
|
16
|
+
descending = "desc"
|
|
17
|
+
}
|
|
18
|
+
export declare type QueryOptions = {
|
|
19
|
+
filter?: string[] | null;
|
|
20
|
+
collection?: string | null;
|
|
21
|
+
pageToken?: string | null;
|
|
22
|
+
pageSize?: number | null;
|
|
23
|
+
sortBy?: SortBy | null;
|
|
24
|
+
sortOrder?: SortOrder | null;
|
|
25
|
+
};
|
|
26
|
+
export declare type ConnectorCapabilities = {
|
|
27
|
+
filtering?: boolean;
|
|
28
|
+
upload?: boolean;
|
|
29
|
+
query?: boolean;
|
|
30
|
+
remove?: boolean;
|
|
31
|
+
copy?: boolean;
|
|
32
|
+
};
|
|
33
|
+
export declare type ConnectorRegistration = {
|
|
34
|
+
id: string;
|
|
35
|
+
source: ConnectorRegistrationSource;
|
|
36
|
+
url: string;
|
|
37
|
+
};
|
|
38
|
+
export declare enum ConnectorRegistrationSource {
|
|
39
|
+
url = "url"
|
|
40
|
+
}
|
|
41
|
+
export declare class ConnectorMapping {
|
|
42
|
+
name: string;
|
|
43
|
+
value: string;
|
|
44
|
+
constructor(mapTo: ConnectorMappingTarget, contextProperty: string, mapFrom: ConnectorMappingSource, sourceValue: string);
|
|
45
|
+
}
|
|
46
|
+
export declare type ConnectorState = {
|
|
47
|
+
id: string;
|
|
48
|
+
type: ConnectorStateType;
|
|
49
|
+
};
|
|
50
|
+
export declare type ConnectorEvent = {
|
|
51
|
+
id: string;
|
|
52
|
+
type: ConnectorEventType;
|
|
53
|
+
};
|
|
54
|
+
export declare type QueryPage<T> = {
|
|
55
|
+
nextPageToken?: string;
|
|
56
|
+
data: T[];
|
|
57
|
+
};
|
|
58
|
+
export declare enum ConnectorMappingTarget {
|
|
59
|
+
query = "query",
|
|
60
|
+
download = "download"
|
|
61
|
+
}
|
|
62
|
+
export declare enum ConnectorMappingSource {
|
|
63
|
+
variable = "var"
|
|
64
|
+
}
|
|
65
|
+
export declare enum ConnectorStateType {
|
|
66
|
+
/**
|
|
67
|
+
* Connector loading process has started.
|
|
68
|
+
* Any SDK methods that required the connector id, will start working now.
|
|
69
|
+
*/
|
|
70
|
+
loading = "loading",
|
|
71
|
+
/**
|
|
72
|
+
* Connector loading completed.
|
|
73
|
+
*/
|
|
74
|
+
loaded = "loaded",
|
|
75
|
+
/**
|
|
76
|
+
* Connector is running in QuickJS.
|
|
77
|
+
*/
|
|
78
|
+
running = "running",
|
|
79
|
+
/**
|
|
80
|
+
* Connector is fully configured and has the correct authentication information.
|
|
81
|
+
* At this point the connector is ready to make requests.
|
|
82
|
+
*/
|
|
83
|
+
ready = "ready",
|
|
84
|
+
/**
|
|
85
|
+
* Something went wrong, the connector is in error state.
|
|
86
|
+
* Check the error message for more information.
|
|
87
|
+
*/
|
|
88
|
+
error = "error"
|
|
89
|
+
}
|
|
90
|
+
export declare enum ConnectorEventType {
|
|
91
|
+
/**
|
|
92
|
+
* This event will be triggered by the following state changes of the connector
|
|
93
|
+
* - loading
|
|
94
|
+
* - loaded
|
|
95
|
+
* - running
|
|
96
|
+
* - ready
|
|
97
|
+
* - error
|
|
98
|
+
*/
|
|
99
|
+
stateChanged = "stateChanged",
|
|
100
|
+
/**
|
|
101
|
+
* Authentication information is changed
|
|
102
|
+
*/
|
|
103
|
+
authChanged = "authChanged",
|
|
104
|
+
/**
|
|
105
|
+
* Connector configuration changed that requires the connector to be reloaded in QuickJS.
|
|
106
|
+
* This will trigger multiple 'stateChanged' events while it is reloading.
|
|
107
|
+
* Wait until 'ready'-stateChanged event is received to start using the connector again.
|
|
108
|
+
*/
|
|
109
|
+
reloadRequired = "reloadRequired",
|
|
110
|
+
/**
|
|
111
|
+
* Connector is unregistered and no longer exists inside the editor engine.
|
|
112
|
+
* Don't use the 'connectorId' after receiving this event.
|
|
113
|
+
*/
|
|
114
|
+
unloaded = "unloaded"
|
|
115
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
export var DeprecatedMediaType;
|
|
2
|
+
(function (DeprecatedMediaType) {
|
|
3
|
+
DeprecatedMediaType[DeprecatedMediaType["file"] = 0] = "file";
|
|
4
|
+
DeprecatedMediaType[DeprecatedMediaType["collection"] = 1] = "collection";
|
|
5
|
+
})(DeprecatedMediaType || (DeprecatedMediaType = {}));
|
|
6
|
+
export var MediaType;
|
|
7
|
+
(function (MediaType) {
|
|
8
|
+
MediaType["file"] = "file";
|
|
9
|
+
MediaType["collection"] = "collection";
|
|
10
|
+
})(MediaType || (MediaType = {}));
|
|
11
|
+
export var SortBy;
|
|
12
|
+
(function (SortBy) {
|
|
13
|
+
SortBy["name"] = "name";
|
|
14
|
+
SortBy["path"] = "relativePath";
|
|
15
|
+
SortBy["id"] = "id";
|
|
16
|
+
})(SortBy || (SortBy = {}));
|
|
17
|
+
export var SortOrder;
|
|
18
|
+
(function (SortOrder) {
|
|
19
|
+
SortOrder["ascending"] = "asc";
|
|
20
|
+
SortOrder["descending"] = "desc";
|
|
21
|
+
})(SortOrder || (SortOrder = {}));
|
|
22
|
+
export var ConnectorRegistrationSource;
|
|
23
|
+
(function (ConnectorRegistrationSource) {
|
|
24
|
+
ConnectorRegistrationSource["url"] = "url";
|
|
25
|
+
})(ConnectorRegistrationSource || (ConnectorRegistrationSource = {}));
|
|
26
|
+
export class ConnectorMapping {
|
|
27
|
+
constructor(mapTo, contextProperty, mapFrom, sourceValue) {
|
|
28
|
+
this.name = `${mapTo}.${contextProperty}`;
|
|
29
|
+
this.value = `${mapFrom}.${sourceValue}`;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export var ConnectorMappingTarget;
|
|
33
|
+
(function (ConnectorMappingTarget) {
|
|
34
|
+
ConnectorMappingTarget["query"] = "query";
|
|
35
|
+
ConnectorMappingTarget["download"] = "download";
|
|
36
|
+
})(ConnectorMappingTarget || (ConnectorMappingTarget = {}));
|
|
37
|
+
export var ConnectorMappingSource;
|
|
38
|
+
(function (ConnectorMappingSource) {
|
|
39
|
+
ConnectorMappingSource["variable"] = "var";
|
|
40
|
+
})(ConnectorMappingSource || (ConnectorMappingSource = {}));
|
|
41
|
+
export var ConnectorStateType;
|
|
42
|
+
(function (ConnectorStateType) {
|
|
43
|
+
/**
|
|
44
|
+
* Connector loading process has started.
|
|
45
|
+
* Any SDK methods that required the connector id, will start working now.
|
|
46
|
+
*/
|
|
47
|
+
ConnectorStateType["loading"] = "loading";
|
|
48
|
+
/**
|
|
49
|
+
* Connector loading completed.
|
|
50
|
+
*/
|
|
51
|
+
ConnectorStateType["loaded"] = "loaded";
|
|
52
|
+
/**
|
|
53
|
+
* Connector is running in QuickJS.
|
|
54
|
+
*/
|
|
55
|
+
ConnectorStateType["running"] = "running";
|
|
56
|
+
/**
|
|
57
|
+
* Connector is fully configured and has the correct authentication information.
|
|
58
|
+
* At this point the connector is ready to make requests.
|
|
59
|
+
*/
|
|
60
|
+
ConnectorStateType["ready"] = "ready";
|
|
61
|
+
/**
|
|
62
|
+
* Something went wrong, the connector is in error state.
|
|
63
|
+
* Check the error message for more information.
|
|
64
|
+
*/
|
|
65
|
+
ConnectorStateType["error"] = "error";
|
|
66
|
+
})(ConnectorStateType || (ConnectorStateType = {}));
|
|
67
|
+
export var ConnectorEventType;
|
|
68
|
+
(function (ConnectorEventType) {
|
|
69
|
+
/**
|
|
70
|
+
* This event will be triggered by the following state changes of the connector
|
|
71
|
+
* - loading
|
|
72
|
+
* - loaded
|
|
73
|
+
* - running
|
|
74
|
+
* - ready
|
|
75
|
+
* - error
|
|
76
|
+
*/
|
|
77
|
+
ConnectorEventType["stateChanged"] = "stateChanged";
|
|
78
|
+
/**
|
|
79
|
+
* Authentication information is changed
|
|
80
|
+
*/
|
|
81
|
+
ConnectorEventType["authChanged"] = "authChanged";
|
|
82
|
+
/**
|
|
83
|
+
* Connector configuration changed that requires the connector to be reloaded in QuickJS.
|
|
84
|
+
* This will trigger multiple 'stateChanged' events while it is reloading.
|
|
85
|
+
* Wait until 'ready'-stateChanged event is received to start using the connector again.
|
|
86
|
+
*/
|
|
87
|
+
ConnectorEventType["reloadRequired"] = "reloadRequired";
|
|
88
|
+
/**
|
|
89
|
+
* Connector is unregistered and no longer exists inside the editor engine.
|
|
90
|
+
* Don't use the 'connectorId' after receiving this event.
|
|
91
|
+
*/
|
|
92
|
+
ConnectorEventType["unloaded"] = "unloaded";
|
|
93
|
+
})(ConnectorEventType || (ConnectorEventType = {}));
|
|
94
|
+
//# sourceMappingURL=ConnectorTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectorTypes.js","sourceRoot":"","sources":["../../../src/types/ConnectorTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC3B,6DAAQ,CAAA;IACR,yEAAc,CAAA;AAClB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B;AAED,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACjB,0BAAa,CAAA;IACb,sCAAyB,CAAA;AAC7B,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAED,MAAM,CAAN,IAAY,MAIX;AAJD,WAAY,MAAM;IACd,uBAAa,CAAA;IACb,+BAAqB,CAAA;IACrB,mBAAS,CAAA;AACb,CAAC,EAJW,MAAM,KAAN,MAAM,QAIjB;AAED,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACjB,8BAAiB,CAAA;IACjB,gCAAmB,CAAA;AACvB,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAyBD,MAAM,CAAN,IAAY,2BAEX;AAFD,WAAY,2BAA2B;IACnC,0CAAW,CAAA;AACf,CAAC,EAFW,2BAA2B,KAA3B,2BAA2B,QAEtC;AAED,MAAM,OAAO,gBAAgB;IAIzB,YACI,KAA6B,EAC7B,eAAuB,EACvB,OAA+B,EAC/B,WAAmB;QAEnB,IAAI,CAAC,IAAI,GAAG,GAAG,KAAK,IAAI,eAAe,EAAE,CAAC;QAC1C,IAAI,CAAC,KAAK,GAAG,GAAG,OAAO,IAAI,WAAW,EAAE,CAAC;IAC7C,CAAC;CACJ;AAiBD,MAAM,CAAN,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAC9B,yCAAe,CAAA;IACf,+CAAqB,CAAA;AACzB,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,QAGjC;AAED,MAAM,CAAN,IAAY,sBAEX;AAFD,WAAY,sBAAsB;IAC9B,0CAAgB,CAAA;AACpB,CAAC,EAFW,sBAAsB,KAAtB,sBAAsB,QAEjC;AAED,MAAM,CAAN,IAAY,kBA6BX;AA7BD,WAAY,kBAAkB;IAC1B;;;OAGG;IACH,yCAAmB,CAAA;IAEnB;;OAEG;IACH,uCAAiB,CAAA;IAEjB;;OAEG;IAEH,yCAAmB,CAAA;IAEnB;;;OAGG;IACH,qCAAe,CAAA;IAEf;;;OAGG;IACH,qCAAe,CAAA;AACnB,CAAC,EA7BW,kBAAkB,KAAlB,kBAAkB,QA6B7B;AAED,MAAM,CAAN,IAAY,kBA4BX;AA5BD,WAAY,kBAAkB;IAC1B;;;;;;;OAOG;IACH,mDAA6B,CAAA;IAE7B;;OAEG;IACH,iDAA2B,CAAA;IAE3B;;;;OAIG;IACH,uDAAiC,CAAA;IAEjC;;;OAGG;IACH,2CAAqB,CAAA;AACzB,CAAC,EA5BW,kBAAkB,KAAlB,kBAAkB,QA4B7B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare enum CallStatus {
|
|
2
|
+
loading = "loading",
|
|
3
|
+
success = "success",
|
|
4
|
+
error = "error"
|
|
5
|
+
}
|
|
6
|
+
declare type DebugVar = {
|
|
7
|
+
name: string;
|
|
8
|
+
type: string;
|
|
9
|
+
};
|
|
10
|
+
declare type ApiResponse = {
|
|
11
|
+
status: number;
|
|
12
|
+
error: string;
|
|
13
|
+
data: string;
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
export declare type DebugData = {
|
|
17
|
+
title: string;
|
|
18
|
+
vars: DebugVar[];
|
|
19
|
+
response: ApiResponse;
|
|
20
|
+
startTime: Date;
|
|
21
|
+
endTime: Date;
|
|
22
|
+
incoming: boolean;
|
|
23
|
+
status: CallStatus;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DebugTypes.js","sourceRoot":"","sources":["../../../src/types/DebugTypes.ts"],"names":[],"mappings":"AAAA,IAAK,UAIJ;AAJD,WAAK,UAAU;IACX,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;IACnB,6BAAe,CAAA;AACnB,CAAC,EAJI,UAAU,KAAV,UAAU,QAId"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { BasicAnimationsEmphasisType, BasicAnimationsIntroType, BasicAnimationsOutroType } from './AnimationTypes';
|
|
2
|
+
import { DocumentColor } from './ColorStyleTypes';
|
|
3
|
+
import { Id } from './CommonTypes';
|
|
4
|
+
import { BlendMode, FrameTypeEnum } from './FrameTypes';
|
|
5
|
+
import { LayoutType } from './LayoutTypes';
|
|
6
|
+
import { ParagraphStyle } from './ParagraphStyleTypes';
|
|
7
|
+
import { Variable } from './VariableTypes';
|
|
8
|
+
import { CharacterStyle } from './CharacterStyleTypes';
|
|
9
|
+
import { DocumentAction } from './ActionTypes';
|
|
10
|
+
import { ShapeProperties, ShapeType } from './ShapeTypes';
|
|
11
|
+
export declare type DocumentError = {
|
|
12
|
+
error: Record<string, unknown>;
|
|
13
|
+
code: number;
|
|
14
|
+
};
|
|
15
|
+
export declare type UndoState = {
|
|
16
|
+
canUndo: boolean;
|
|
17
|
+
canRedo: boolean;
|
|
18
|
+
undoItemName: OperationName;
|
|
19
|
+
redoItemName: OperationName;
|
|
20
|
+
};
|
|
21
|
+
export declare type OperationName = {
|
|
22
|
+
translationKey: number;
|
|
23
|
+
name: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* This type should give a clear indication of how the JSON document is structured. This could help you with building a test document yourself.
|
|
27
|
+
*/
|
|
28
|
+
export interface ChiliDocument {
|
|
29
|
+
selectedLayoutId: string;
|
|
30
|
+
properties?: TemplateDocumentProperties | ProjectDocumentProperties;
|
|
31
|
+
pages: DocumentPage[];
|
|
32
|
+
layouts: (ChildLayout | TopLayout)[];
|
|
33
|
+
styleKit: DocumentStyleKit;
|
|
34
|
+
variables: Variable[];
|
|
35
|
+
actions: DocumentAction[];
|
|
36
|
+
}
|
|
37
|
+
export interface DocumentPage {
|
|
38
|
+
pageId: string;
|
|
39
|
+
pageNumber: number;
|
|
40
|
+
frames: (ImageFrame | TextFrame | ShapeFrame)[];
|
|
41
|
+
}
|
|
42
|
+
export interface DocumentFrame {
|
|
43
|
+
frameId: string;
|
|
44
|
+
frameName: string;
|
|
45
|
+
frameType: FrameTypeEnum;
|
|
46
|
+
blendMode: BlendMode;
|
|
47
|
+
constrainProportions: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface ImageFrame extends DocumentFrame {
|
|
50
|
+
src: VariableImageFrameSource | AssetProviderImageFrameSource | UrlImageFrameSource;
|
|
51
|
+
}
|
|
52
|
+
export interface ShapeFrame extends DocumentFrame {
|
|
53
|
+
shapeType: ShapeType;
|
|
54
|
+
shapeProperties: ShapeProperties;
|
|
55
|
+
}
|
|
56
|
+
export interface TextFrame extends DocumentFrame {
|
|
57
|
+
textContent: string;
|
|
58
|
+
paddingLeft: number;
|
|
59
|
+
paddingTop: number;
|
|
60
|
+
paddingRight: number;
|
|
61
|
+
paddingBottom: number;
|
|
62
|
+
numberOfColumns: number;
|
|
63
|
+
columnGap: number;
|
|
64
|
+
textDirection: string;
|
|
65
|
+
flowDirection: string;
|
|
66
|
+
verticalAlign: string;
|
|
67
|
+
textStroke: boolean;
|
|
68
|
+
textStrokeWeight: number;
|
|
69
|
+
textStrokeColor: number;
|
|
70
|
+
hasClippingPath: boolean;
|
|
71
|
+
}
|
|
72
|
+
export declare enum ImageFrameSourceType {
|
|
73
|
+
url = "url",
|
|
74
|
+
assetProvider = "assetProvider",
|
|
75
|
+
variable = "variable"
|
|
76
|
+
}
|
|
77
|
+
export interface ImageFrameSource {
|
|
78
|
+
sourceType: ImageFrameSourceType;
|
|
79
|
+
}
|
|
80
|
+
export interface UrlImageFrameSource extends ImageFrameSource {
|
|
81
|
+
url: string;
|
|
82
|
+
}
|
|
83
|
+
export interface AssetProviderImageFrameSource extends ImageFrameSource {
|
|
84
|
+
providerId: string;
|
|
85
|
+
assetId: string;
|
|
86
|
+
}
|
|
87
|
+
export interface VariableImageFrameSource extends ImageFrameSource {
|
|
88
|
+
variableId: string;
|
|
89
|
+
}
|
|
90
|
+
export interface Layout {
|
|
91
|
+
layoutId: string;
|
|
92
|
+
layoutName: string;
|
|
93
|
+
frameProperties: (ChildFrameProperty | TopFrameProperty)[];
|
|
94
|
+
width?: number;
|
|
95
|
+
height?: number;
|
|
96
|
+
childLayouts: string[];
|
|
97
|
+
layoutType: LayoutType;
|
|
98
|
+
frameAnimations?: FrameAnimation[];
|
|
99
|
+
timelineLengthMs?: number;
|
|
100
|
+
animated?: boolean;
|
|
101
|
+
}
|
|
102
|
+
export interface TopLayout extends Layout {
|
|
103
|
+
frameAnimations: FrameAnimation[];
|
|
104
|
+
timelineLengthMs: number;
|
|
105
|
+
animated: boolean;
|
|
106
|
+
parentLayoutId: Id;
|
|
107
|
+
width: number;
|
|
108
|
+
height: number;
|
|
109
|
+
}
|
|
110
|
+
export interface ChildLayout extends Layout {
|
|
111
|
+
parentLayoutId: Id;
|
|
112
|
+
}
|
|
113
|
+
export declare enum FramePropertiesType {
|
|
114
|
+
top = "top",
|
|
115
|
+
child = "child"
|
|
116
|
+
}
|
|
117
|
+
export interface FrameProperty {
|
|
118
|
+
frameId: Id;
|
|
119
|
+
x?: number;
|
|
120
|
+
y?: number;
|
|
121
|
+
width?: number;
|
|
122
|
+
height?: number;
|
|
123
|
+
rotationDegrees?: number;
|
|
124
|
+
rotationOriginY?: number;
|
|
125
|
+
scaleX?: number;
|
|
126
|
+
scaleY?: number;
|
|
127
|
+
included?: boolean;
|
|
128
|
+
framePropertiesType: FramePropertiesType;
|
|
129
|
+
}
|
|
130
|
+
export declare type ChildFrameProperty = FrameProperty;
|
|
131
|
+
export interface TopFrameProperty extends FrameProperty {
|
|
132
|
+
x: number;
|
|
133
|
+
y: number;
|
|
134
|
+
width: number;
|
|
135
|
+
height: number;
|
|
136
|
+
rotationDegrees: number;
|
|
137
|
+
rotationOriginY: number;
|
|
138
|
+
scaleX: number;
|
|
139
|
+
scaleY: number;
|
|
140
|
+
included: boolean;
|
|
141
|
+
}
|
|
142
|
+
export interface FrameAnimation {
|
|
143
|
+
frameId: Id;
|
|
144
|
+
from: number;
|
|
145
|
+
to: number;
|
|
146
|
+
basicAnimations: BasicAnimations;
|
|
147
|
+
}
|
|
148
|
+
export interface BasicAnimations {
|
|
149
|
+
intro?: BasicAnimationsIntroType;
|
|
150
|
+
emphasis?: BasicAnimationsEmphasisType;
|
|
151
|
+
outro?: BasicAnimationsOutroType;
|
|
152
|
+
}
|
|
153
|
+
export interface DocumentStyleKit {
|
|
154
|
+
colors: DocumentColor[];
|
|
155
|
+
characterStyles: DocumentCharacterStyle[];
|
|
156
|
+
paragraphStyles: DocumentParagraphStyle[];
|
|
157
|
+
}
|
|
158
|
+
export declare type DocumentCharacterStyle = CharacterStyle;
|
|
159
|
+
export declare type DocumentParagraphStyle = ParagraphStyle;
|
|
160
|
+
export interface DocumentVariable extends Variable {
|
|
161
|
+
parentId: Id;
|
|
162
|
+
name: string;
|
|
163
|
+
label: string;
|
|
164
|
+
isHidden: boolean;
|
|
165
|
+
isReadonly: boolean;
|
|
166
|
+
isRequired: boolean;
|
|
167
|
+
value: string;
|
|
168
|
+
defaultValue: string;
|
|
169
|
+
}
|
|
170
|
+
export declare enum DocumentType {
|
|
171
|
+
project = "project",
|
|
172
|
+
template = "template"
|
|
173
|
+
}
|
|
174
|
+
export interface DocumentProperties {
|
|
175
|
+
type: DocumentType;
|
|
176
|
+
}
|
|
177
|
+
export declare type TemplateDocumentProperties = DocumentProperties;
|
|
178
|
+
export interface ProjectDocumentProperties extends DocumentProperties {
|
|
179
|
+
templateId: string;
|
|
180
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export var ImageFrameSourceType;
|
|
2
|
+
(function (ImageFrameSourceType) {
|
|
3
|
+
ImageFrameSourceType["url"] = "url";
|
|
4
|
+
ImageFrameSourceType["assetProvider"] = "assetProvider";
|
|
5
|
+
ImageFrameSourceType["variable"] = "variable";
|
|
6
|
+
})(ImageFrameSourceType || (ImageFrameSourceType = {}));
|
|
7
|
+
export var FramePropertiesType;
|
|
8
|
+
(function (FramePropertiesType) {
|
|
9
|
+
FramePropertiesType["top"] = "top";
|
|
10
|
+
FramePropertiesType["child"] = "child";
|
|
11
|
+
})(FramePropertiesType || (FramePropertiesType = {}));
|
|
12
|
+
export var DocumentType;
|
|
13
|
+
(function (DocumentType) {
|
|
14
|
+
DocumentType["project"] = "project";
|
|
15
|
+
DocumentType["template"] = "template";
|
|
16
|
+
})(DocumentType || (DocumentType = {}));
|
|
17
|
+
//# sourceMappingURL=DocumentTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentTypes.js","sourceRoot":"","sources":["../../../src/types/DocumentTypes.ts"],"names":[],"mappings":"AA2EA,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC5B,mCAAW,CAAA;IACX,uDAA+B,CAAA;IAC/B,6CAAqB,CAAA;AACzB,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B;AA6CD,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC3B,kCAAW,CAAA;IACX,sCAAe,CAAA;AACnB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B;AA6DD,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;AACzB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB"}
|