@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,143 @@
|
|
|
1
|
+
import { ConfigType } from '../types/CommonTypes';
|
|
2
|
+
/**
|
|
3
|
+
* The SubscriberController is responsible for all listeners which can influence the aplication-state from outside.
|
|
4
|
+
* Callbacks inside this controller can be set by `window.SDK.subscriber.{method-name}`
|
|
5
|
+
*/
|
|
6
|
+
export declare class SubscriberController {
|
|
7
|
+
/**
|
|
8
|
+
* @ignore
|
|
9
|
+
*/
|
|
10
|
+
private config;
|
|
11
|
+
/**
|
|
12
|
+
* @ignore
|
|
13
|
+
*/
|
|
14
|
+
constructor(config: ConfigType);
|
|
15
|
+
/**
|
|
16
|
+
* Listener on actions, if this changes, this listener will get triggered with the updates
|
|
17
|
+
* @param actions Stringified array of DocumentAction type
|
|
18
|
+
*/
|
|
19
|
+
onActionsChanged: (actions: string) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Listener on when a certain animation gets changed
|
|
22
|
+
* @param animation Stringified array of FrameAnimationType
|
|
23
|
+
*/
|
|
24
|
+
onAnimationChanged: (animation: string) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Listener on the playbackstate of the animation, it contains the current time of the playback (in miliseconds) and a flag that describes if the animation is currently playing
|
|
27
|
+
* @param animationPlaybackState Stringified array of AnimationPlaybackType
|
|
28
|
+
*/
|
|
29
|
+
onAnimationPlaybackChanged: (animationPlaybackState: string) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Listener on the state of the currently selected layout, if its properties are changed, this listener will get triggered with the new properties
|
|
32
|
+
* @param properties Stringified object of LayoutPropertiesType
|
|
33
|
+
*/
|
|
34
|
+
onSelectedLayoutPropertiesChanged: (properties: string) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Listener on the state of the currently selected frame, if this changes, this listener will get triggered with the updates
|
|
37
|
+
* @param layout Stringified object of FrameLayoutType
|
|
38
|
+
*/
|
|
39
|
+
onSelectedFrameLayoutChanged: (frame: string) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Listener on the state of the currently selected frame, it contains some basic information on the type of frame it is
|
|
42
|
+
* @param layout Stringified object of FrameType
|
|
43
|
+
*/
|
|
44
|
+
onSelectedFrameContentChanged: (frame: string) => void;
|
|
45
|
+
/**
|
|
46
|
+
* A listener on the general state of the document, gets triggered everytime a change is done on the document.
|
|
47
|
+
*/
|
|
48
|
+
onStateChanged: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* A listener on when the document is fully loaded.
|
|
51
|
+
*/
|
|
52
|
+
onDocumentLoaded: () => void;
|
|
53
|
+
/**
|
|
54
|
+
* To be implemented, gets triggered when clicking on the pageTitle on the canvas.
|
|
55
|
+
*/
|
|
56
|
+
onPageSelectionChanged: () => void;
|
|
57
|
+
/**
|
|
58
|
+
* Listener on when variables change
|
|
59
|
+
* @param variablesJson Stringified array of Variable
|
|
60
|
+
*/
|
|
61
|
+
onVariableListChanged: (variablesJson: string) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Listener on when the tool has changed by the canvas
|
|
64
|
+
* @param tool The string representation of a certain tool
|
|
65
|
+
*/
|
|
66
|
+
onSelectedToolChanged: (tool: string) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Listener on state changes
|
|
69
|
+
* @param undoState Stringified object of UndoState
|
|
70
|
+
*/
|
|
71
|
+
onUndoStateChanged: (undoState: string) => void;
|
|
72
|
+
/**
|
|
73
|
+
* Listener on the state of the currently selected layout's frames, if this changes, this listener will get triggered with the updates
|
|
74
|
+
* @param frames Stringified object of Frames
|
|
75
|
+
*/
|
|
76
|
+
onSelectedLayoutFramesChanged: (frames: string) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Listener on the state of the currently selected text's styles, if this changes, this listener will get triggered with the updates
|
|
79
|
+
* @param styles Stringified object of styles
|
|
80
|
+
*/
|
|
81
|
+
onSelectedTextStyleChanged: (styles: string) => void;
|
|
82
|
+
/**
|
|
83
|
+
* Listener on the state of the currently selected color's styles, if this changes, this listener will get triggered with the updates
|
|
84
|
+
* @param colors Stringified object of colors
|
|
85
|
+
*/
|
|
86
|
+
onColorsChanged: (colors: string) => void;
|
|
87
|
+
/**
|
|
88
|
+
* Listener on paragraph styles, if this changes, this listener will get triggered with the updates
|
|
89
|
+
* @param paragraphStyles Stringified object of paragraph styles
|
|
90
|
+
*/
|
|
91
|
+
onParagraphStylesChanged: (paragraphStyles: string) => void;
|
|
92
|
+
/**
|
|
93
|
+
* Listener on character styles, if this changes, this listener will get triggered with the updates
|
|
94
|
+
* @param characterStyles Stringified object of character styles
|
|
95
|
+
*/
|
|
96
|
+
onCharacterStylesChanged: (characterStyles: string) => void;
|
|
97
|
+
/**
|
|
98
|
+
* Listener on fonts, if this changes, this listener will get triggered with the updates
|
|
99
|
+
* @param fonts Stringified object of fonts
|
|
100
|
+
*/
|
|
101
|
+
onFontsChanged: (fonts: string) => void;
|
|
102
|
+
/**
|
|
103
|
+
* Listener on selected layout id, this listener will get triggered when a different layout is selected.
|
|
104
|
+
* @param layoutId the currently selected layout id
|
|
105
|
+
*/
|
|
106
|
+
onSelectedLayoutIdChanged: (layoutId: string) => void;
|
|
107
|
+
/**
|
|
108
|
+
* Listener on layouts, this listener will get triggered when a (sub)layout is
|
|
109
|
+
* - added
|
|
110
|
+
* - removed
|
|
111
|
+
* - renamed
|
|
112
|
+
* - duplicted
|
|
113
|
+
* @param layouts Stringified object of layouts
|
|
114
|
+
*/
|
|
115
|
+
onLayoutsChanged: (layouts: string) => void;
|
|
116
|
+
/**
|
|
117
|
+
* Listener on scale factor of the canvas, this listener will get triggered when a zoom is applied to the canvas
|
|
118
|
+
* @param zoomEvent Stringified scale factor
|
|
119
|
+
*/
|
|
120
|
+
onZoomChanged: (zoomEvent: string) => void;
|
|
121
|
+
/**
|
|
122
|
+
* Listener on connector events, this listener will get triggered when a connector emits one of those events
|
|
123
|
+
* - reloadRequired
|
|
124
|
+
* - authChanged
|
|
125
|
+
* - unloaded
|
|
126
|
+
* - stateChanged
|
|
127
|
+
*
|
|
128
|
+
* stateChanged - this event will be triggered by connector states: loading, loaded, running, ready, error
|
|
129
|
+
* @param connectorEvent Stringified object of ConnectorEvent
|
|
130
|
+
*/
|
|
131
|
+
onConnectorEvent: (connectorEvent: string) => void;
|
|
132
|
+
/**
|
|
133
|
+
* Listener on page size, this listener will get triggered when the page size is changed, while the document is a `project`.
|
|
134
|
+
* This will not emit anything if your document is a `template`.
|
|
135
|
+
* @param pageSize Stringified object of the PageSize
|
|
136
|
+
*/
|
|
137
|
+
onPageSizeChanged: (pageSize: string) => void;
|
|
138
|
+
/**
|
|
139
|
+
* Listener on corner radii of rectangle and polygon shapes, this listener will get triggered when any corner radius is changed
|
|
140
|
+
* @param cornerRadius Stringified object of the CornerRadius
|
|
141
|
+
*/
|
|
142
|
+
onShapeCornerRadiusChanged: (cornerRadius: string) => void;
|
|
143
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The SubscriberController is responsible for all listeners which can influence the aplication-state from outside.
|
|
3
|
+
* Callbacks inside this controller can be set by `window.SDK.subscriber.{method-name}`
|
|
4
|
+
*/
|
|
5
|
+
export class SubscriberController {
|
|
6
|
+
/**
|
|
7
|
+
* @ignore
|
|
8
|
+
*/
|
|
9
|
+
constructor(config) {
|
|
10
|
+
/**
|
|
11
|
+
* Listener on actions, if this changes, this listener will get triggered with the updates
|
|
12
|
+
* @param actions Stringified array of DocumentAction type
|
|
13
|
+
*/
|
|
14
|
+
this.onActionsChanged = (actions) => {
|
|
15
|
+
const callBack = this.config.onActionsChanged;
|
|
16
|
+
callBack && callBack(JSON.parse(actions));
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Listener on when a certain animation gets changed
|
|
20
|
+
* @param animation Stringified array of FrameAnimationType
|
|
21
|
+
*/
|
|
22
|
+
this.onAnimationChanged = (animation) => {
|
|
23
|
+
const callBack = this.config.onFrameAnimationsChanged;
|
|
24
|
+
callBack && callBack(JSON.parse(animation));
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Listener on the playbackstate of the animation, it contains the current time of the playback (in miliseconds) and a flag that describes if the animation is currently playing
|
|
28
|
+
* @param animationPlaybackState Stringified array of AnimationPlaybackType
|
|
29
|
+
*/
|
|
30
|
+
this.onAnimationPlaybackChanged = (animationPlaybackState) => {
|
|
31
|
+
const callBack = this.config.onScrubberPositionChanged;
|
|
32
|
+
callBack && callBack(JSON.parse(animationPlaybackState));
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Listener on the state of the currently selected layout, if its properties are changed, this listener will get triggered with the new properties
|
|
36
|
+
* @param properties Stringified object of LayoutPropertiesType
|
|
37
|
+
*/
|
|
38
|
+
this.onSelectedLayoutPropertiesChanged = (properties) => {
|
|
39
|
+
const callBack = this.config.onSelectedLayoutPropertiesChanged;
|
|
40
|
+
callBack && callBack(JSON.parse(properties));
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Listener on the state of the currently selected frame, if this changes, this listener will get triggered with the updates
|
|
44
|
+
* @param layout Stringified object of FrameLayoutType
|
|
45
|
+
*/
|
|
46
|
+
this.onSelectedFrameLayoutChanged = (frame) => {
|
|
47
|
+
const callBack = this.config.onSelectedFrameLayoutChanged;
|
|
48
|
+
callBack && callBack(JSON.parse(frame));
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Listener on the state of the currently selected frame, it contains some basic information on the type of frame it is
|
|
52
|
+
* @param layout Stringified object of FrameType
|
|
53
|
+
*/
|
|
54
|
+
this.onSelectedFrameContentChanged = (frame) => {
|
|
55
|
+
const callBack = this.config.onSelectedFrameContentChanged;
|
|
56
|
+
callBack && callBack(JSON.parse(frame));
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* A listener on the general state of the document, gets triggered everytime a change is done on the document.
|
|
60
|
+
*/
|
|
61
|
+
this.onStateChanged = () => {
|
|
62
|
+
const callBack = this.config.onStateChanged;
|
|
63
|
+
callBack && callBack();
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* A listener on when the document is fully loaded.
|
|
67
|
+
*/
|
|
68
|
+
this.onDocumentLoaded = () => {
|
|
69
|
+
const callBack = this.config.onDocumentLoaded;
|
|
70
|
+
callBack && callBack();
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* To be implemented, gets triggered when clicking on the pageTitle on the canvas.
|
|
74
|
+
*/
|
|
75
|
+
this.onPageSelectionChanged = () => {
|
|
76
|
+
const callBack = this.config.onPageSelectionChanged;
|
|
77
|
+
callBack && callBack();
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Listener on when variables change
|
|
81
|
+
* @param variablesJson Stringified array of Variable
|
|
82
|
+
*/
|
|
83
|
+
this.onVariableListChanged = (variablesJson) => {
|
|
84
|
+
const callBack = this.config.onVariableListChanged;
|
|
85
|
+
callBack && callBack(JSON.parse(variablesJson));
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Listener on when the tool has changed by the canvas
|
|
89
|
+
* @param tool The string representation of a certain tool
|
|
90
|
+
*/
|
|
91
|
+
this.onSelectedToolChanged = (tool) => {
|
|
92
|
+
const callBack = this.config.onSelectedToolChanged;
|
|
93
|
+
callBack && callBack(tool);
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Listener on state changes
|
|
97
|
+
* @param undoState Stringified object of UndoState
|
|
98
|
+
*/
|
|
99
|
+
this.onUndoStateChanged = (undoState) => {
|
|
100
|
+
const callBack = this.config.onUndoStackStateChanged;
|
|
101
|
+
callBack && callBack(JSON.parse(undoState));
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Listener on the state of the currently selected layout's frames, if this changes, this listener will get triggered with the updates
|
|
105
|
+
* @param frames Stringified object of Frames
|
|
106
|
+
*/
|
|
107
|
+
this.onSelectedLayoutFramesChanged = (frames) => {
|
|
108
|
+
const callBack = this.config.onSelectedLayoutFramesChanged;
|
|
109
|
+
callBack && callBack(JSON.parse(frames));
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Listener on the state of the currently selected text's styles, if this changes, this listener will get triggered with the updates
|
|
113
|
+
* @param styles Stringified object of styles
|
|
114
|
+
*/
|
|
115
|
+
this.onSelectedTextStyleChanged = (styles) => {
|
|
116
|
+
const callBack = this.config.onSelectedTextStyleChanged;
|
|
117
|
+
callBack && callBack(JSON.parse(styles));
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Listener on the state of the currently selected color's styles, if this changes, this listener will get triggered with the updates
|
|
121
|
+
* @param colors Stringified object of colors
|
|
122
|
+
*/
|
|
123
|
+
this.onColorsChanged = (colors) => {
|
|
124
|
+
const callBack = this.config.onColorsChanged;
|
|
125
|
+
callBack && callBack(JSON.parse(colors));
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Listener on paragraph styles, if this changes, this listener will get triggered with the updates
|
|
129
|
+
* @param paragraphStyles Stringified object of paragraph styles
|
|
130
|
+
*/
|
|
131
|
+
this.onParagraphStylesChanged = (paragraphStyles) => {
|
|
132
|
+
const callBack = this.config.onParagraphStylesChanged;
|
|
133
|
+
callBack && callBack(JSON.parse(paragraphStyles));
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Listener on character styles, if this changes, this listener will get triggered with the updates
|
|
137
|
+
* @param characterStyles Stringified object of character styles
|
|
138
|
+
*/
|
|
139
|
+
this.onCharacterStylesChanged = (characterStyles) => {
|
|
140
|
+
const callBack = this.config.onCharacterStylesChanged;
|
|
141
|
+
callBack && callBack(JSON.parse(characterStyles));
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Listener on fonts, if this changes, this listener will get triggered with the updates
|
|
145
|
+
* @param fonts Stringified object of fonts
|
|
146
|
+
*/
|
|
147
|
+
this.onFontsChanged = (fonts) => {
|
|
148
|
+
const callBack = this.config.onFontsChanged;
|
|
149
|
+
callBack && callBack(JSON.parse(fonts));
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Listener on selected layout id, this listener will get triggered when a different layout is selected.
|
|
153
|
+
* @param layoutId the currently selected layout id
|
|
154
|
+
*/
|
|
155
|
+
this.onSelectedLayoutIdChanged = (layoutId) => {
|
|
156
|
+
const callBack = this.config.onSelectedLayoutIdChanged;
|
|
157
|
+
callBack && callBack(layoutId);
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* Listener on layouts, this listener will get triggered when a (sub)layout is
|
|
161
|
+
* - added
|
|
162
|
+
* - removed
|
|
163
|
+
* - renamed
|
|
164
|
+
* - duplicted
|
|
165
|
+
* @param layouts Stringified object of layouts
|
|
166
|
+
*/
|
|
167
|
+
this.onLayoutsChanged = (layouts) => {
|
|
168
|
+
const callBack = this.config.onLayoutsChanged;
|
|
169
|
+
callBack && callBack(JSON.parse(layouts));
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Listener on scale factor of the canvas, this listener will get triggered when a zoom is applied to the canvas
|
|
173
|
+
* @param zoomEvent Stringified scale factor
|
|
174
|
+
*/
|
|
175
|
+
this.onZoomChanged = (zoomEvent) => {
|
|
176
|
+
const callBack = this.config.onZoomChanged;
|
|
177
|
+
callBack && callBack(JSON.parse(zoomEvent));
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Listener on connector events, this listener will get triggered when a connector emits one of those events
|
|
181
|
+
* - reloadRequired
|
|
182
|
+
* - authChanged
|
|
183
|
+
* - unloaded
|
|
184
|
+
* - stateChanged
|
|
185
|
+
*
|
|
186
|
+
* stateChanged - this event will be triggered by connector states: loading, loaded, running, ready, error
|
|
187
|
+
* @param connectorEvent Stringified object of ConnectorEvent
|
|
188
|
+
*/
|
|
189
|
+
this.onConnectorEvent = (connectorEvent) => {
|
|
190
|
+
const callBack = this.config.onConnectorEvent;
|
|
191
|
+
callBack && callBack(JSON.parse(connectorEvent));
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* Listener on page size, this listener will get triggered when the page size is changed, while the document is a `project`.
|
|
195
|
+
* This will not emit anything if your document is a `template`.
|
|
196
|
+
* @param pageSize Stringified object of the PageSize
|
|
197
|
+
*/
|
|
198
|
+
this.onPageSizeChanged = (pageSize) => {
|
|
199
|
+
const callBack = this.config.onPageSizeChanged;
|
|
200
|
+
callBack && callBack(JSON.parse(pageSize));
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* Listener on corner radii of rectangle and polygon shapes, this listener will get triggered when any corner radius is changed
|
|
204
|
+
* @param cornerRadius Stringified object of the CornerRadius
|
|
205
|
+
*/
|
|
206
|
+
this.onShapeCornerRadiusChanged = (cornerRadius) => {
|
|
207
|
+
const callBack = this.config.onShapeCornerRadiusChanged;
|
|
208
|
+
callBack && callBack(JSON.parse(cornerRadius));
|
|
209
|
+
};
|
|
210
|
+
this.config = config;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
//# sourceMappingURL=SubscriberController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscriberController.js","sourceRoot":"","sources":["../../../src/controllers/SubscriberController.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAM7B;;OAEG;IACH,YAAY,MAAkB;QAI9B;;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AAC,YAAoB,EAAE,EAAE;YAClD,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,0BAA0B,CAAC;YACxD,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;QACnD,CAAC,CAAC;QAlOE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;CAkOJ"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EditorAPI } from '../types/CommonTypes';
|
|
2
|
+
import { SelectedTextStyle, TextStyleUpdateType } from '../types/TextStyleTypes';
|
|
3
|
+
/**
|
|
4
|
+
* The TextStyleController is responsible for all communication regarding text styles.
|
|
5
|
+
* Methods inside this controller can be called by `window.SDK.textStyle.{method-name}`
|
|
6
|
+
*/
|
|
7
|
+
export declare class TextStyleController {
|
|
8
|
+
#private;
|
|
9
|
+
/**
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
constructor(editorAPI: EditorAPI);
|
|
13
|
+
/**
|
|
14
|
+
* This method updates a selected Text's style properties
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
setTextStyleProperties: (style: TextStyleUpdateType) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
18
|
+
/**
|
|
19
|
+
* This method clears a selected Text's style properties
|
|
20
|
+
* If the text is selected, then the inline style properties will be cleared
|
|
21
|
+
* If the text is not selected and user tried to change any style property, the temporary style will be cleared
|
|
22
|
+
* if there is no text selection and there is no temporary style, the inline paragraph properties will be cleared
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
clearTextStyleProperties: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
26
|
+
/**
|
|
27
|
+
* This method gets a selected Text's style properties
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
getSelectedTextStyle: () => Promise<import("../types/CommonTypes").EditorResponse<SelectedTextStyle>>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
11
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
14
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
15
|
+
};
|
|
16
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
17
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
18
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
19
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
20
|
+
};
|
|
21
|
+
var _TextStyleController_editorAPI;
|
|
22
|
+
import { getEditorResponseData } from '../utils/EditorResponseData';
|
|
23
|
+
/**
|
|
24
|
+
* The TextStyleController is responsible for all communication regarding text styles.
|
|
25
|
+
* Methods inside this controller can be called by `window.SDK.textStyle.{method-name}`
|
|
26
|
+
*/
|
|
27
|
+
export class TextStyleController {
|
|
28
|
+
/**
|
|
29
|
+
* @ignore
|
|
30
|
+
*/
|
|
31
|
+
constructor(editorAPI) {
|
|
32
|
+
/**
|
|
33
|
+
* @ignore
|
|
34
|
+
*/
|
|
35
|
+
_TextStyleController_editorAPI.set(this, void 0);
|
|
36
|
+
/**
|
|
37
|
+
* This method updates a selected Text's style properties
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
this.setTextStyleProperties = (style) => __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
const res = yield __classPrivateFieldGet(this, _TextStyleController_editorAPI, "f");
|
|
42
|
+
return res
|
|
43
|
+
.selectedTextStyleDeltaUpdate(JSON.stringify(style))
|
|
44
|
+
.then((result) => getEditorResponseData(result));
|
|
45
|
+
});
|
|
46
|
+
/**
|
|
47
|
+
* This method clears a selected Text's style properties
|
|
48
|
+
* If the text is selected, then the inline style properties will be cleared
|
|
49
|
+
* If the text is not selected and user tried to change any style property, the temporary style will be cleared
|
|
50
|
+
* if there is no text selection and there is no temporary style, the inline paragraph properties will be cleared
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
53
|
+
this.clearTextStyleProperties = () => __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const res = yield __classPrivateFieldGet(this, _TextStyleController_editorAPI, "f");
|
|
55
|
+
return res.selectedTextStyleClean().then((result) => getEditorResponseData(result));
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* This method gets a selected Text's style properties
|
|
59
|
+
* @returns
|
|
60
|
+
*/
|
|
61
|
+
this.getSelectedTextStyle = () => __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
const res = yield __classPrivateFieldGet(this, _TextStyleController_editorAPI, "f");
|
|
63
|
+
return res
|
|
64
|
+
.getSelectedTextStyle()
|
|
65
|
+
.then((result) => getEditorResponseData(result));
|
|
66
|
+
});
|
|
67
|
+
__classPrivateFieldSet(this, _TextStyleController_editorAPI, editorAPI, "f");
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
_TextStyleController_editorAPI = new WeakMap();
|
|
71
|
+
//# sourceMappingURL=TextStyleController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextStyleController.js","sourceRoot":"","sources":["../../../src/controllers/TextStyleController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAM5B;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,iDAA+B;QAS/B;;;WAGG;QACH,2BAAsB,GAAG,CAAO,KAA0B,EAAE,EAAE;YAC1D,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAClC,OAAO,GAAG;iBACL,4BAA4B,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;iBACnD,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAC/D,CAAC,CAAA,CAAC;QAEF;;;;;;WAMG;QACH,6BAAwB,GAAG,GAAS,EAAE;YAClC,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,sBAAsB,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAC9F,CAAC,CAAA,CAAC;QAEF;;;UAGE;QACF,yBAAoB,GAAG,GAAS,EAAE;YAC9B,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAClC,OAAO,GAAG;iBACL,oBAAoB,EAAE;iBACtB,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAoB,MAAM,CAAC,CAAC,CAAC;QAC5E,CAAC,CAAA,CAAC;QAnCE,uBAAA,IAAI,kCAAc,SAAS,MAAA,CAAC;IAChC,CAAC;CAmCJ"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { EditorAPI } from '../types/CommonTypes';
|
|
2
|
+
import { ToolType } from '../utils/enums';
|
|
3
|
+
/**
|
|
4
|
+
* The ToolController is responsible for all communication regarding the tools.
|
|
5
|
+
* Methods inside this controller can be called by `window.SDK.tool.{method-name}`
|
|
6
|
+
*/
|
|
7
|
+
export declare class ToolController {
|
|
8
|
+
#private;
|
|
9
|
+
/**
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
constructor(editorAPI: EditorAPI);
|
|
13
|
+
/**
|
|
14
|
+
* This method sets the currently used tool
|
|
15
|
+
* @param tool
|
|
16
|
+
*/
|
|
17
|
+
private setTool;
|
|
18
|
+
/**
|
|
19
|
+
* This method returns selected tool
|
|
20
|
+
*/
|
|
21
|
+
getSelectedTool: () => Promise<import("../types/CommonTypes").EditorResponse<ToolType>>;
|
|
22
|
+
/**
|
|
23
|
+
* This method sets the used tool to a Pointer tool
|
|
24
|
+
*/
|
|
25
|
+
setSelectTool: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
26
|
+
/**
|
|
27
|
+
* This method sets the used tool to a Move tool
|
|
28
|
+
*/
|
|
29
|
+
setHandTool: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
30
|
+
/**
|
|
31
|
+
* This method sets the used tool to a Zoom tool
|
|
32
|
+
*/
|
|
33
|
+
setZoomTool: () => Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* This method sets the used tool to a TextFrame tool
|
|
36
|
+
*/
|
|
37
|
+
setTextFrameTool: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
38
|
+
/**
|
|
39
|
+
* This method sets the used tool to a ImageFrame tool
|
|
40
|
+
*/
|
|
41
|
+
setImageFrameTool: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
42
|
+
/**
|
|
43
|
+
* This method sets the used tool to a ShapeRectangle tool
|
|
44
|
+
*/
|
|
45
|
+
setShapeRectTool: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
46
|
+
/**
|
|
47
|
+
* This method sets the used tool to a ShapeEllipse tool
|
|
48
|
+
*/
|
|
49
|
+
setShapeEllipseTool: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
50
|
+
/**
|
|
51
|
+
* This method sets the used tool to a ShapePolygon tool
|
|
52
|
+
*/
|
|
53
|
+
setShapePolygonTool: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
54
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
11
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
14
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
15
|
+
};
|
|
16
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
17
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
18
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
19
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
20
|
+
};
|
|
21
|
+
var _ToolController_editorAPI;
|
|
22
|
+
import { ToolType } from '../utils/enums';
|
|
23
|
+
import { getEditorResponseData } from '../utils/EditorResponseData';
|
|
24
|
+
/**
|
|
25
|
+
* The ToolController is responsible for all communication regarding the tools.
|
|
26
|
+
* Methods inside this controller can be called by `window.SDK.tool.{method-name}`
|
|
27
|
+
*/
|
|
28
|
+
export class ToolController {
|
|
29
|
+
/**
|
|
30
|
+
* @ignore
|
|
31
|
+
*/
|
|
32
|
+
constructor(editorAPI) {
|
|
33
|
+
/**
|
|
34
|
+
* @ignore
|
|
35
|
+
*/
|
|
36
|
+
_ToolController_editorAPI.set(this, void 0);
|
|
37
|
+
/**
|
|
38
|
+
* This method sets the currently used tool
|
|
39
|
+
* @param tool
|
|
40
|
+
*/
|
|
41
|
+
this.setTool = (tool) => __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const res = yield __classPrivateFieldGet(this, _ToolController_editorAPI, "f");
|
|
43
|
+
return res.setTool(tool).then((result) => getEditorResponseData(result));
|
|
44
|
+
});
|
|
45
|
+
/**
|
|
46
|
+
* This method returns selected tool
|
|
47
|
+
*/
|
|
48
|
+
this.getSelectedTool = () => __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
const res = yield __classPrivateFieldGet(this, _ToolController_editorAPI, "f");
|
|
50
|
+
return res.getSelectedTool().then((result) => getEditorResponseData(result));
|
|
51
|
+
});
|
|
52
|
+
/**
|
|
53
|
+
* This method sets the used tool to a Pointer tool
|
|
54
|
+
*/
|
|
55
|
+
this.setSelectTool = () => __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
return this.setTool(ToolType.SELECT);
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* This method sets the used tool to a Move tool
|
|
60
|
+
*/
|
|
61
|
+
this.setHandTool = () => __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
return this.setTool(ToolType.HAND);
|
|
63
|
+
});
|
|
64
|
+
/**
|
|
65
|
+
* This method sets the used tool to a Zoom tool
|
|
66
|
+
*/
|
|
67
|
+
this.setZoomTool = () => __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
yield this.setTool(ToolType.ZOOM);
|
|
69
|
+
});
|
|
70
|
+
/**
|
|
71
|
+
* This method sets the used tool to a TextFrame tool
|
|
72
|
+
*/
|
|
73
|
+
this.setTextFrameTool = () => __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
return this.setTool(ToolType.TEXT_FRAME);
|
|
75
|
+
});
|
|
76
|
+
/**
|
|
77
|
+
* This method sets the used tool to a ImageFrame tool
|
|
78
|
+
*/
|
|
79
|
+
this.setImageFrameTool = () => __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
return this.setTool(ToolType.IMAGE_FRAME);
|
|
81
|
+
});
|
|
82
|
+
/**
|
|
83
|
+
* This method sets the used tool to a ShapeRectangle tool
|
|
84
|
+
*/
|
|
85
|
+
this.setShapeRectTool = () => __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
return this.setTool(ToolType.SHAPE_RECT);
|
|
87
|
+
});
|
|
88
|
+
/**
|
|
89
|
+
* This method sets the used tool to a ShapeEllipse tool
|
|
90
|
+
*/
|
|
91
|
+
this.setShapeEllipseTool = () => __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
return this.setTool(ToolType.SHAPE_ELLIPSE);
|
|
93
|
+
});
|
|
94
|
+
/**
|
|
95
|
+
* This method sets the used tool to a ShapePolygon tool
|
|
96
|
+
*/
|
|
97
|
+
this.setShapePolygonTool = () => __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
return this.setTool(ToolType.SHAPE_POLYGON);
|
|
99
|
+
});
|
|
100
|
+
__classPrivateFieldSet(this, _ToolController_editorAPI, editorAPI, "f");
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
_ToolController_editorAPI = new WeakMap();
|
|
104
|
+
//# sourceMappingURL=ToolController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolController.js","sourceRoot":"","sources":["../../../src/controllers/ToolController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,cAAc;IAMvB;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,4CAAsB;QAStB;;;WAGG;QACK,YAAO,GAAG,CAAO,IAAc,EAAE,EAAE;YACvC,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,iCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACnF,CAAC,CAAA,CAAC;QAEF;;WAEG;QACH,oBAAe,GAAG,GAAS,EAAE;YACzB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,iCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,eAAe,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAW,MAAM,CAAC,CAAC,CAAC;QAC3F,CAAC,CAAA,CAAC;QAEF;;WAEG;QACH,kBAAa,GAAG,GAAS,EAAE;YACvB,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACzC,CAAC,CAAA,CAAC;QAEF;;WAEG;QACH,gBAAW,GAAG,GAAS,EAAE;YACrB,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACvC,CAAC,CAAA,CAAC;QAEF;;WAEG;QACH,gBAAW,GAAG,GAAS,EAAE;YACrB,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACtC,CAAC,CAAA,CAAC;QAEF;;WAEG;QACH,qBAAgB,GAAG,GAAS,EAAE;YAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC7C,CAAC,CAAA,CAAC;QAEF;;WAEG;QACH,sBAAiB,GAAG,GAAS,EAAE;YAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAC9C,CAAC,CAAA,CAAC;QAEF;;WAEG;QACH,qBAAgB,GAAG,GAAS,EAAE;YAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC7C,CAAC,CAAA,CAAC;QAEF;;WAEG;QACH,wBAAmB,GAAG,GAAS,EAAE;YAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;QAChD,CAAC,CAAA,CAAC;QAEF;;WAEG;QACH,wBAAmB,GAAG,GAAS,EAAE;YAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;QAChD,CAAC,CAAA,CAAC;QA1EE,uBAAA,IAAI,6BAAc,SAAS,MAAA,CAAC;IAChC,CAAC;CA0EJ"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EditorAPI } from '../types/CommonTypes';
|
|
2
|
+
/**
|
|
3
|
+
* The UndoManagerController is responsible for all communication regarding the Undo-Manager.
|
|
4
|
+
* Methods inside this controller can be called by `window.SDK.undoManager.{method-name}`
|
|
5
|
+
*/
|
|
6
|
+
export declare class UndoManagerController {
|
|
7
|
+
#private;
|
|
8
|
+
/**
|
|
9
|
+
* @ignore
|
|
10
|
+
*/
|
|
11
|
+
constructor(children: EditorAPI);
|
|
12
|
+
/**
|
|
13
|
+
* This method undoes the last operation
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
undo: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
17
|
+
/**
|
|
18
|
+
* This method redoes the last operation
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
redo: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
22
|
+
}
|