@chili-publish/studio-sdk 1.25.0 → 1.26.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/_bundles/main.es.js +2391 -0
- package/_bundles/main.es.js.map +1 -0
- package/_bundles/main.js +22 -2
- package/_bundles/main.js.map +1 -1
- package/connector-types/src/Connector.Shared.d.ts +30 -0
- package/connector-types/src/Connector.Shared.js +2 -0
- package/connector-types/src/Connector.Shared.js.map +1 -0
- package/connector-types/src/DataConnector.d.ts +34 -0
- package/connector-types/src/DataConnector.js +2 -0
- package/connector-types/src/DataConnector.js.map +1 -0
- package/connector-types/src/FontConnector.d.ts +20 -0
- package/connector-types/src/FontConnector.js +2 -0
- package/connector-types/src/FontConnector.js.map +1 -0
- package/connector-types/src/MediaConnector.d.ts +20 -0
- package/connector-types/src/MediaConnector.js +2 -0
- package/connector-types/src/MediaConnector.js.map +1 -0
- package/connector-types/src/index.d.ts +4 -0
- package/connector-types/src/index.js +5 -0
- package/connector-types/src/index.js.map +1 -0
- package/lib/editor-engine.json +1 -1
- package/lib/package.json +10 -18
- package/lib/src/controllers/ActionController.d.ts +13 -13
- package/lib/src/controllers/ActionController.js.map +1 -1
- package/lib/src/controllers/AnimationController.d.ts +10 -10
- package/lib/src/controllers/AnimationController.js.map +1 -1
- package/lib/src/controllers/BarcodeController.d.ts +15 -15
- package/lib/src/controllers/BarcodeController.js.map +1 -1
- package/lib/src/controllers/BrandKitController.d.ts +57 -0
- package/lib/src/controllers/BrandKitController.js +275 -0
- package/lib/src/controllers/BrandKitController.js.map +1 -0
- package/lib/src/controllers/CanvasController.d.ts +4 -4
- package/lib/src/controllers/CanvasController.js.map +1 -1
- package/lib/src/controllers/CharacterStyleController.d.ts +8 -8
- package/lib/src/controllers/CharacterStyleController.js.map +1 -1
- package/lib/src/controllers/ClipboardController.d.ts +4 -4
- package/lib/src/controllers/ClipboardController.js.map +1 -1
- package/lib/src/controllers/ColorConversionController.d.ts +1 -1
- package/lib/src/controllers/ColorConversionController.js.map +1 -1
- package/lib/src/controllers/ColorStyleController.d.ts +8 -8
- package/lib/src/controllers/ColorStyleController.js.map +1 -1
- package/lib/src/controllers/ConfigurationController.d.ts +4 -4
- package/lib/src/controllers/ConfigurationController.js.map +1 -1
- package/lib/src/controllers/ConnectorController.d.ts +3 -3
- package/lib/src/controllers/ConnectorController.js +1 -1
- package/lib/src/controllers/ConnectorController.js.map +1 -1
- package/lib/src/controllers/DataConnectorController.d.ts +4 -3
- package/lib/src/controllers/DataConnectorController.js.map +1 -1
- package/lib/src/controllers/DataSourceController.d.ts +4 -4
- package/lib/src/controllers/DataSourceController.js.map +1 -1
- package/lib/src/controllers/DebugController.d.ts +4 -4
- package/lib/src/controllers/DebugController.js.map +1 -1
- package/lib/src/controllers/DocumentController.d.ts +4 -4
- package/lib/src/controllers/DocumentController.js.map +1 -1
- package/lib/src/controllers/ExperimentController.d.ts +8 -8
- package/lib/src/controllers/ExperimentController.js.map +1 -1
- package/lib/src/controllers/FontConnectorController.d.ts +2 -2
- package/lib/src/controllers/FontConnectorController.js +1 -1
- package/lib/src/controllers/FontConnectorController.js.map +1 -1
- package/lib/src/controllers/FontController.d.ts +13 -13
- package/lib/src/controllers/FontController.js.map +1 -1
- package/lib/src/controllers/FrameController.d.ts +1 -1
- package/lib/src/controllers/FrameController.js.map +1 -1
- package/lib/src/controllers/InfoController.js.map +1 -1
- package/lib/src/controllers/LayoutController.d.ts +1 -1
- package/lib/src/controllers/LayoutController.js.map +1 -1
- package/lib/src/controllers/MediaConnectorController.d.ts +9 -9
- package/lib/src/controllers/MediaConnectorController.js +8 -8
- package/lib/src/controllers/MediaConnectorController.js.map +1 -1
- package/lib/src/controllers/PageController.js.map +1 -1
- package/lib/src/controllers/ParagraphStyleController.d.ts +8 -8
- package/lib/src/controllers/ParagraphStyleController.js.map +1 -1
- package/lib/src/controllers/ShapeController.d.ts +11 -11
- package/lib/src/controllers/ShapeController.js.map +1 -1
- package/lib/src/controllers/SubscriberController.js.map +1 -1
- package/lib/src/controllers/TextStyleController.d.ts +3 -3
- package/lib/src/controllers/TextStyleController.js.map +1 -1
- package/lib/src/controllers/ToolController.d.ts +11 -11
- package/lib/src/controllers/ToolController.js.map +1 -1
- package/lib/src/controllers/UndoManagerController.d.ts +9 -9
- package/lib/src/controllers/UndoManagerController.js.map +1 -1
- package/lib/src/controllers/UtilsController.d.ts +3 -3
- package/lib/src/controllers/UtilsController.js.map +1 -1
- package/lib/src/controllers/VariableController.d.ts +50 -50
- package/lib/src/controllers/VariableController.js +3 -1
- package/lib/src/controllers/VariableController.js.map +1 -1
- package/lib/src/index.d.ts +5 -3
- package/lib/src/index.js +3 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/interactions/Connector.js.map +1 -1
- package/lib/src/next/NextInitiator.js.map +1 -1
- package/lib/src/next/controllers/CanvasController.d.ts +1 -1
- package/lib/src/next/controllers/CanvasController.js.map +1 -1
- package/lib/src/next/controllers/ConnectorController.d.ts +3 -3
- package/lib/src/next/controllers/ConnectorController.js.map +1 -1
- package/lib/src/next/controllers/PageController.d.ts +2 -2
- package/lib/src/next/controllers/PageController.js.map +1 -1
- package/lib/src/next/controllers/SubscriberController.js.map +1 -1
- package/lib/src/next/controllers/VariableController.d.ts +8 -8
- package/lib/src/next/controllers/VariableController.js +3 -1
- package/lib/src/next/controllers/VariableController.js.map +1 -1
- package/lib/src/next/index.d.ts +2 -2
- package/lib/src/next/index.js.map +1 -1
- package/lib/src/next/tests/controllers/CanvasController.test.js.map +1 -1
- package/lib/src/next/tests/controllers/ConnectorController.test.js.map +1 -1
- package/lib/src/next/tests/controllers/PageController.test.js.map +1 -1
- package/lib/src/next/tests/controllers/SubscriberContoller.test.js.map +1 -1
- package/lib/src/next/tests/controllers/VariableController.test.js.map +1 -1
- package/lib/src/next/types/ConnectorTypes.js.map +1 -1
- package/lib/src/next/types/NextSubscribers.js.map +1 -1
- package/lib/src/next/types/PageTypes.js.map +1 -1
- package/lib/src/next/types/VariableTypes.js.map +1 -1
- package/lib/src/sdk.d.ts +3 -1
- package/lib/src/sdk.js +3 -0
- package/lib/src/sdk.js.map +1 -1
- package/lib/src/setupTests.js.map +1 -1
- package/lib/src/tests/__mocks__/Animations.js.map +1 -1
- package/lib/src/tests/__mocks__/Brandkit.js +374 -0
- package/lib/src/tests/__mocks__/Brandkit.js.map +1 -0
- package/lib/src/tests/__mocks__/Config.js.map +1 -1
- package/lib/src/tests/__mocks__/FrameProperties.js.map +1 -1
- package/lib/src/tests/__mocks__/MockImageFrameSource.js.map +1 -1
- package/lib/src/tests/__mocks__/localConfig.js.map +1 -1
- package/lib/src/tests/__mocks__/mockDocument.js.map +1 -1
- package/lib/src/tests/controllers/ActionController.test.js.map +1 -1
- package/lib/src/tests/controllers/AnimationController.test.js.map +1 -1
- package/lib/src/tests/controllers/BarcodeController.test.js.map +1 -1
- package/lib/src/tests/controllers/BrandKitController.test.js +213 -0
- package/lib/src/tests/controllers/BrandKitController.test.js.map +1 -0
- package/lib/src/tests/controllers/CanvasController.test.js.map +1 -1
- package/lib/src/tests/controllers/CharacterStyleController.test.js +22 -0
- package/lib/src/tests/controllers/CharacterStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ClipboardController.test.js.map +1 -1
- package/lib/src/tests/controllers/ColorConversionController.test.js.map +1 -1
- package/lib/src/tests/controllers/ColorStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ConnectorController.test.js.map +1 -1
- package/lib/src/tests/controllers/DataConnectorController.test.js +1 -1
- package/lib/src/tests/controllers/DataConnectorController.test.js.map +1 -1
- package/lib/src/tests/controllers/DataSourceController.test.js.map +1 -1
- package/lib/src/tests/controllers/DebugController.test.js.map +1 -1
- package/lib/src/tests/controllers/DocumentController.test.js.map +1 -1
- package/lib/src/tests/controllers/ExperimentController.test.js.map +1 -1
- package/lib/src/tests/controllers/FontConnectorController.test.js.map +1 -1
- package/lib/src/tests/controllers/FontController.test.js.map +1 -1
- package/lib/src/tests/controllers/FrameController.test.js.map +1 -1
- package/lib/src/tests/controllers/InfoController.test.js.map +1 -1
- package/lib/src/tests/controllers/LayoutController.test.js.map +1 -1
- package/lib/src/tests/controllers/MediaConnectorController.test.js.map +1 -1
- package/lib/src/tests/controllers/PageController.test.js.map +1 -1
- package/lib/src/tests/controllers/ParagraphStyleController.test.js +25 -0
- package/lib/src/tests/controllers/ParagraphStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ShapeController.test.js.map +1 -1
- package/lib/src/tests/controllers/SubscriberContoller.test.js.map +1 -1
- package/lib/src/tests/controllers/TextStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ToolController.test.js.map +1 -1
- package/lib/src/tests/controllers/UndoManagerController.test.js.map +1 -1
- package/lib/src/tests/controllers/UtilsController.test.js.map +1 -1
- package/lib/src/tests/controllers/VariableController.test.js.map +1 -1
- package/lib/src/tests/index.test.js.map +1 -1
- package/lib/src/tests/interactions/Connector.test.js.map +1 -1
- package/lib/src/tests/utils/ConnectorCompatibilityTools.test.js.map +1 -1
- package/lib/src/tests/utils/EditorResponseData.test.js.map +1 -1
- package/lib/src/tests/utils/EventSubscription.test.js.map +1 -1
- package/lib/src/tests/utils/LocalConfigurationDecorator.test.js.map +1 -1
- package/lib/src/tests/utils/Logging.test.js.map +1 -1
- package/lib/src/tests/utils/Round.test.js.map +1 -1
- package/lib/src/types/ActionTypes.js.map +1 -1
- package/lib/src/types/AnimationTypes.js.map +1 -1
- package/lib/src/types/BarcodeTypes.js.map +1 -1
- package/lib/src/types/BrandKitTypes.d.ts +122 -0
- package/lib/src/types/BrandKitTypes.js +2 -0
- package/lib/src/types/BrandKitTypes.js.map +1 -0
- package/lib/src/types/CharacterStyleTypes.d.ts +29 -14
- package/lib/src/types/CharacterStyleTypes.js.map +1 -1
- package/lib/src/types/ClipboardTypes.js.map +1 -1
- package/lib/src/types/ColorStyleTypes.d.ts +20 -5
- package/lib/src/types/ColorStyleTypes.js +18 -2
- package/lib/src/types/ColorStyleTypes.js.map +1 -1
- package/lib/src/types/CommonTypes.d.ts +1 -28
- package/lib/src/types/CommonTypes.js +0 -10
- package/lib/src/types/CommonTypes.js.map +1 -1
- package/lib/src/types/ConfigurationTypes.js.map +1 -1
- package/lib/src/types/ConnectorTypes.d.ts +16 -13
- package/lib/src/types/ConnectorTypes.js +10 -0
- package/lib/src/types/ConnectorTypes.js.map +1 -1
- package/lib/src/types/DataConnectorTypes.d.ts +2 -32
- package/lib/src/types/DataConnectorTypes.js.map +1 -1
- package/lib/src/types/DebugTypes.js.map +1 -1
- package/lib/src/types/DocumentTypes.d.ts +83 -4
- package/lib/src/types/DocumentTypes.js +6 -0
- package/lib/src/types/DocumentTypes.js.map +1 -1
- package/lib/src/types/EngineEditModeTypes.js.map +1 -1
- package/lib/src/types/FontConnectorTypes.d.ts +1 -19
- package/lib/src/types/FontConnectorTypes.js.map +1 -1
- package/lib/src/types/FontTypes.js.map +1 -1
- package/lib/src/types/FrameTypes.js +0 -1
- package/lib/src/types/FrameTypes.js.map +1 -1
- package/lib/src/types/LayoutTypes.d.ts +18 -17
- package/lib/src/types/LayoutTypes.js.map +1 -1
- package/lib/src/types/MediaConnectorTypes.d.ts +7 -23
- package/lib/src/types/MediaConnectorTypes.js +2 -0
- package/lib/src/types/MediaConnectorTypes.js.map +1 -1
- package/lib/src/types/PageTypes.js.map +1 -1
- package/lib/src/types/ParagraphStyleTypes.d.ts +35 -17
- package/lib/src/types/ParagraphStyleTypes.js.map +1 -1
- package/lib/src/types/ShapeTypes.js.map +1 -1
- package/lib/src/types/TextStyleTypes.d.ts +8 -2
- package/lib/src/types/TextStyleTypes.js +2 -0
- package/lib/src/types/TextStyleTypes.js.map +1 -1
- package/lib/src/types/TextTypes.js.map +1 -1
- package/lib/src/types/VariableTypes.js.map +1 -1
- package/lib/src/types/ViewModeTypes.js.map +1 -1
- package/lib/src/types/ViewportTypes.js.map +1 -1
- package/lib/src/utils/BrandKitHelper.d.ts +9 -0
- package/lib/src/utils/BrandKitHelper.js +72 -0
- package/lib/src/utils/BrandKitHelper.js.map +1 -0
- package/lib/src/utils/ConfigHelper.js.map +1 -1
- package/lib/src/utils/ConnectorCompatibilityTools.js.map +1 -1
- package/lib/src/utils/DataItemMappingTools.js.map +1 -1
- package/lib/src/utils/EditorResponseData.d.ts +1 -1
- package/lib/src/utils/EditorResponseData.js.map +1 -1
- package/lib/src/utils/EngineCallbackHandler.js.map +1 -1
- package/lib/src/utils/EngineEvent.js.map +1 -1
- package/lib/src/utils/EngineEventTrigger.js.map +1 -1
- package/lib/src/utils/Enums.js.map +1 -1
- package/lib/src/utils/LocalConfigurationDecorator.d.ts +2 -2
- package/lib/src/utils/LocalConfigurationDecorator.js.map +1 -1
- package/lib/src/utils/MathUtils.js.map +1 -1
- package/package.json +10 -18
- package/_bundles/report.html +0 -38
- package/lib/src/next/tests/controllers/CanvasController.test.d.ts +0 -1
- package/lib/src/next/tests/controllers/ConnectorController.test.d.ts +0 -1
- package/lib/src/next/tests/controllers/PageController.test.d.ts +0 -1
- package/lib/src/next/tests/controllers/SubscriberContoller.test.d.ts +0 -1
- package/lib/src/next/tests/controllers/VariableController.test.d.ts +0 -1
- package/lib/src/setupTests.d.ts +0 -1
- package/lib/src/tests/__mocks__/Animations.d.ts +0 -2
- package/lib/src/tests/__mocks__/Config.d.ts +0 -4
- package/lib/src/tests/__mocks__/FrameProperties.d.ts +0 -52
- package/lib/src/tests/__mocks__/MockImageFrameSource.d.ts +0 -4
- package/lib/src/tests/__mocks__/localConfig.d.ts +0 -2
- package/lib/src/tests/__mocks__/mockDocument.d.ts +0 -1
- package/lib/src/tests/controllers/ActionController.test.d.ts +0 -1
- package/lib/src/tests/controllers/AnimationController.test.d.ts +0 -1
- package/lib/src/tests/controllers/BarcodeController.test.d.ts +0 -1
- package/lib/src/tests/controllers/CanvasController.test.d.ts +0 -1
- package/lib/src/tests/controllers/CharacterStyleController.test.d.ts +0 -1
- package/lib/src/tests/controllers/ClipboardController.test.d.ts +0 -1
- package/lib/src/tests/controllers/ColorConversionController.test.d.ts +0 -1
- package/lib/src/tests/controllers/ColorStyleController.test.d.ts +0 -1
- package/lib/src/tests/controllers/ConnectorController.test.d.ts +0 -1
- package/lib/src/tests/controllers/DataConnectorController.test.d.ts +0 -1
- package/lib/src/tests/controllers/DataSourceController.test.d.ts +0 -1
- package/lib/src/tests/controllers/DebugController.test.d.ts +0 -1
- package/lib/src/tests/controllers/DocumentController.test.d.ts +0 -1
- package/lib/src/tests/controllers/ExperimentController.test.d.ts +0 -1
- package/lib/src/tests/controllers/FontConnectorController.test.d.ts +0 -1
- package/lib/src/tests/controllers/FontController.test.d.ts +0 -1
- package/lib/src/tests/controllers/FrameController.test.d.ts +0 -1
- package/lib/src/tests/controllers/InfoController.test.d.ts +0 -1
- package/lib/src/tests/controllers/LayoutController.test.d.ts +0 -1
- package/lib/src/tests/controllers/MediaConnectorController.test.d.ts +0 -1
- package/lib/src/tests/controllers/PageController.test.d.ts +0 -1
- package/lib/src/tests/controllers/ParagraphStyleController.test.d.ts +0 -1
- package/lib/src/tests/controllers/ShapeController.test.d.ts +0 -1
- package/lib/src/tests/controllers/SubscriberContoller.test.d.ts +0 -1
- package/lib/src/tests/controllers/TextStyleController.test.d.ts +0 -1
- package/lib/src/tests/controllers/ToolController.test.d.ts +0 -1
- package/lib/src/tests/controllers/UndoManagerController.test.d.ts +0 -1
- package/lib/src/tests/controllers/UtilsController.test.d.ts +0 -1
- package/lib/src/tests/controllers/VariableController.test.d.ts +0 -1
- package/lib/src/tests/index.test.d.ts +0 -1
- package/lib/src/tests/interactions/Connector.test.d.ts +0 -1
- package/lib/src/tests/utils/ConnectorCompatibilityTools.test.d.ts +0 -1
- package/lib/src/tests/utils/EditorResponseData.test.d.ts +0 -1
- package/lib/src/tests/utils/EventSubscription.test.d.ts +0 -1
- package/lib/src/tests/utils/LocalConfigurationDecorator.test.d.ts +0 -1
- package/lib/src/tests/utils/Logging.test.d.ts +0 -1
- package/lib/src/tests/utils/Round.test.d.ts +0 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { default as SDK } from '..';
|
|
2
|
+
import { BrandKitInternal, StudioBrandKit } from '../types/BrandKitTypes';
|
|
3
|
+
import { EditorAPI, EditorResponse } from '../types/CommonTypes';
|
|
4
|
+
/**
|
|
5
|
+
* The BrandKitController is responsible for all communication regarding Brand Kits.
|
|
6
|
+
* Methods inside this controller can be called by `window.SDK.brandKit.{method-name}`
|
|
7
|
+
*/
|
|
8
|
+
export declare class BrandKitController {
|
|
9
|
+
#private;
|
|
10
|
+
/**
|
|
11
|
+
* @ignore
|
|
12
|
+
*/
|
|
13
|
+
constructor(editorAPI: EditorAPI, sdk: SDK);
|
|
14
|
+
private colorStyleController;
|
|
15
|
+
private fontController;
|
|
16
|
+
private mediaController;
|
|
17
|
+
private paragraphStyleController;
|
|
18
|
+
private characterStyleController;
|
|
19
|
+
private undoManagerController;
|
|
20
|
+
/**
|
|
21
|
+
* This method returns the current brand kit id.
|
|
22
|
+
* @returns current brand kit id
|
|
23
|
+
*/
|
|
24
|
+
getId: () => Promise<EditorResponse<string>>;
|
|
25
|
+
/**
|
|
26
|
+
* This method returns the current brand kit version.
|
|
27
|
+
* @returns current brand kit version
|
|
28
|
+
*/
|
|
29
|
+
getVersion: () => Promise<EditorResponse<string>>;
|
|
30
|
+
/**
|
|
31
|
+
* This method updates both the brand kit id and version.
|
|
32
|
+
* @param id - The new brand kit id
|
|
33
|
+
* @param version - The new brand kit version
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
updateIdAndVersion: (id: string, version: string) => Promise<EditorResponse<null>>;
|
|
37
|
+
/**
|
|
38
|
+
* @experimental This method returns the local brandkit
|
|
39
|
+
* @returns brandkit with all assigned resources
|
|
40
|
+
*/
|
|
41
|
+
get: () => Promise<EditorResponse<StudioBrandKit>>;
|
|
42
|
+
/**
|
|
43
|
+
* @experimental This method removes a brand kit and all related resources assigned to it
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
remove: () => Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* @experimental This method updates a brand kit and all related resources assigned to it
|
|
49
|
+
* @param studioBrandKit the content of the brand kit
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
set: (studioBrandKit: StudioBrandKit) => Promise<EditorResponse<BrandKitInternal>>;
|
|
53
|
+
private setColors;
|
|
54
|
+
private setFonts;
|
|
55
|
+
private setParagraphStyles;
|
|
56
|
+
private setCharacterStyles;
|
|
57
|
+
}
|
|
@@ -0,0 +1,275 @@
|
|
|
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 _BrandKitController_editorAPI;
|
|
22
|
+
import { getColorById, getFontKey, mapBrandKitColorToLocal, mapBrandKitStyleToLocal } from '../utils/BrandKitHelper';
|
|
23
|
+
import { getEditorResponseData } from '../utils/EditorResponseData';
|
|
24
|
+
/**
|
|
25
|
+
* The BrandKitController is responsible for all communication regarding Brand Kits.
|
|
26
|
+
* Methods inside this controller can be called by `window.SDK.brandKit.{method-name}`
|
|
27
|
+
*/
|
|
28
|
+
export class BrandKitController {
|
|
29
|
+
/**
|
|
30
|
+
* @ignore
|
|
31
|
+
*/
|
|
32
|
+
constructor(editorAPI, sdk) {
|
|
33
|
+
/**
|
|
34
|
+
* @ignore
|
|
35
|
+
*/
|
|
36
|
+
_BrandKitController_editorAPI.set(this, void 0);
|
|
37
|
+
/**
|
|
38
|
+
* This method returns the current brand kit id.
|
|
39
|
+
* @returns current brand kit id
|
|
40
|
+
*/
|
|
41
|
+
this.getId = () => __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const res = yield __classPrivateFieldGet(this, _BrandKitController_editorAPI, "f");
|
|
43
|
+
return res.getBrandKitId().then((result) => getEditorResponseData(result));
|
|
44
|
+
});
|
|
45
|
+
/**
|
|
46
|
+
* This method returns the current brand kit version.
|
|
47
|
+
* @returns current brand kit version
|
|
48
|
+
*/
|
|
49
|
+
this.getVersion = () => __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
const res = yield __classPrivateFieldGet(this, _BrandKitController_editorAPI, "f");
|
|
51
|
+
return res.getBrandKitVersion().then((result) => getEditorResponseData(result));
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* This method updates both the brand kit id and version.
|
|
55
|
+
* @param id - The new brand kit id
|
|
56
|
+
* @param version - The new brand kit version
|
|
57
|
+
* @returns
|
|
58
|
+
*/
|
|
59
|
+
this.updateIdAndVersion = (id, version) => __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
const res = yield __classPrivateFieldGet(this, _BrandKitController_editorAPI, "f");
|
|
61
|
+
return res.updateBrandKitIdAndVersion(id, version).then((result) => getEditorResponseData(result));
|
|
62
|
+
});
|
|
63
|
+
/**
|
|
64
|
+
* @experimental This method returns the local brandkit
|
|
65
|
+
* @returns brandkit with all assigned resources
|
|
66
|
+
*/
|
|
67
|
+
this.get = () => __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
const brandKitId = yield this.getId();
|
|
69
|
+
const brandKitVersion = yield this.getVersion();
|
|
70
|
+
const colorsPromise = this.colorStyleController.getAll();
|
|
71
|
+
const fontsPromise = this.fontController.getFontFamilies();
|
|
72
|
+
const characterStylesPromise = this.characterStyleController.getAll();
|
|
73
|
+
const paragraphStylesPromise = this.paragraphStyleController.getAll();
|
|
74
|
+
const [colors, fonts, paragraphStyles, characterStyles] = yield Promise.all([
|
|
75
|
+
colorsPromise,
|
|
76
|
+
fontsPromise,
|
|
77
|
+
paragraphStylesPromise,
|
|
78
|
+
characterStylesPromise,
|
|
79
|
+
]);
|
|
80
|
+
const studioBrandKit = {
|
|
81
|
+
id: brandKitId.parsedData,
|
|
82
|
+
brandKit: {
|
|
83
|
+
id: brandKitId.parsedData,
|
|
84
|
+
lastModifiedDate: brandKitVersion.parsedData,
|
|
85
|
+
colors: colors.parsedData,
|
|
86
|
+
fonts: fonts.parsedData,
|
|
87
|
+
paragraphStyles: paragraphStyles.parsedData,
|
|
88
|
+
characterStyles: characterStyles.parsedData,
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
const editorResponse = {
|
|
92
|
+
success: true,
|
|
93
|
+
data: JSON.stringify(studioBrandKit),
|
|
94
|
+
parsedData: studioBrandKit,
|
|
95
|
+
status: 200,
|
|
96
|
+
};
|
|
97
|
+
return getEditorResponseData(editorResponse);
|
|
98
|
+
});
|
|
99
|
+
/**
|
|
100
|
+
* @experimental This method removes a brand kit and all related resources assigned to it
|
|
101
|
+
* @returns
|
|
102
|
+
*/
|
|
103
|
+
this.remove = () => __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
const colors = yield this.colorStyleController.getAll();
|
|
105
|
+
const colorsList = colors.parsedData || [];
|
|
106
|
+
const paragraphStyles = yield this.paragraphStyleController.getAll();
|
|
107
|
+
const paragraphStylesList = paragraphStyles.parsedData || [];
|
|
108
|
+
const characterStyles = yield this.characterStyleController.getAll();
|
|
109
|
+
const characterStylesList = characterStyles.parsedData || [];
|
|
110
|
+
const fonts = yield this.fontController.getFontFamilies();
|
|
111
|
+
const fontsList = fonts.parsedData || [];
|
|
112
|
+
try {
|
|
113
|
+
yield this.undoManagerController.record('brandKit.remove', (sdk) => __awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
for (const color of colorsList) {
|
|
115
|
+
yield sdk.colorStyle.remove(color.id);
|
|
116
|
+
}
|
|
117
|
+
for (const style of paragraphStylesList) {
|
|
118
|
+
yield sdk.paragraphStyle.remove(style.id);
|
|
119
|
+
}
|
|
120
|
+
for (const style of characterStylesList) {
|
|
121
|
+
yield sdk.characterStyle.remove(style.id);
|
|
122
|
+
}
|
|
123
|
+
for (const font of fontsList) {
|
|
124
|
+
yield sdk.font.removeFontFamily(font.id);
|
|
125
|
+
}
|
|
126
|
+
}));
|
|
127
|
+
}
|
|
128
|
+
catch (err) {
|
|
129
|
+
this.undoManagerController.undo();
|
|
130
|
+
throw err;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
/**
|
|
134
|
+
* @experimental This method updates a brand kit and all related resources assigned to it
|
|
135
|
+
* @param studioBrandKit the content of the brand kit
|
|
136
|
+
* @returns
|
|
137
|
+
*/
|
|
138
|
+
this.set = (studioBrandKit) => __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
try {
|
|
140
|
+
let result = {
|
|
141
|
+
success: true,
|
|
142
|
+
status: 200,
|
|
143
|
+
parsedData: {
|
|
144
|
+
id: studioBrandKit.id,
|
|
145
|
+
version: studioBrandKit.brandKit.lastModifiedDate,
|
|
146
|
+
colors: [],
|
|
147
|
+
fonts: [],
|
|
148
|
+
paragraphStyles: [],
|
|
149
|
+
characterStyles: [],
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
yield this.undoManagerController.record('brandKit.set', (sdk) => __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
const localColorGuidMap = yield this.setColors(studioBrandKit, sdk);
|
|
154
|
+
const localFontGuidMap = yield this.setFonts(studioBrandKit, sdk);
|
|
155
|
+
const { parsedData: localColors = [] } = yield sdk.colorStyle.getAll();
|
|
156
|
+
const { parsedData: localFonts } = yield sdk.font.getFontFamilies();
|
|
157
|
+
yield this.setParagraphStyles(studioBrandKit, sdk, {
|
|
158
|
+
localColors,
|
|
159
|
+
localFonts,
|
|
160
|
+
localColorGuidMap,
|
|
161
|
+
localFontGuidMap,
|
|
162
|
+
});
|
|
163
|
+
yield this.setCharacterStyles(studioBrandKit, sdk, {
|
|
164
|
+
localColors,
|
|
165
|
+
localFonts,
|
|
166
|
+
localColorGuidMap,
|
|
167
|
+
localFontGuidMap,
|
|
168
|
+
});
|
|
169
|
+
const { parsedData: allParagraphStyles } = yield sdk.paragraphStyle.getAll();
|
|
170
|
+
const { parsedData: allCharacterStyles } = yield sdk.characterStyle.getAll();
|
|
171
|
+
yield sdk.brandKit.updateIdAndVersion(studioBrandKit.id, studioBrandKit.brandKit.lastModifiedDate);
|
|
172
|
+
result = {
|
|
173
|
+
success: true,
|
|
174
|
+
status: 200,
|
|
175
|
+
parsedData: {
|
|
176
|
+
id: studioBrandKit.id,
|
|
177
|
+
version: studioBrandKit.brandKit.lastModifiedDate,
|
|
178
|
+
colors: localColors || [],
|
|
179
|
+
fonts: localFonts || [],
|
|
180
|
+
paragraphStyles: allParagraphStyles || [],
|
|
181
|
+
characterStyles: allCharacterStyles || [],
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
}));
|
|
185
|
+
return result;
|
|
186
|
+
}
|
|
187
|
+
catch (err) {
|
|
188
|
+
this.undoManagerController.undo();
|
|
189
|
+
throw err;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
__classPrivateFieldSet(this, _BrandKitController_editorAPI, editorAPI, "f");
|
|
193
|
+
this.colorStyleController = sdk.colorStyle;
|
|
194
|
+
this.fontController = sdk.font;
|
|
195
|
+
this.mediaController = sdk.mediaConnector;
|
|
196
|
+
this.paragraphStyleController = sdk.paragraphStyle;
|
|
197
|
+
this.characterStyleController = sdk.characterStyle;
|
|
198
|
+
this.undoManagerController = sdk.undoManager;
|
|
199
|
+
}
|
|
200
|
+
setColors(studioBrandKit, sdk) {
|
|
201
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
202
|
+
const localColorGuidsMap = new Map();
|
|
203
|
+
for (const color of studioBrandKit.brandKit.colors || []) {
|
|
204
|
+
const { parsedData: localColorId } = yield sdk.colorStyle.create();
|
|
205
|
+
if (!localColorId)
|
|
206
|
+
continue;
|
|
207
|
+
localColorGuidsMap.set(color.guid, localColorId);
|
|
208
|
+
const localColor = mapBrandKitColorToLocal(color);
|
|
209
|
+
yield sdk.colorStyle.rename(localColorId, color.name);
|
|
210
|
+
yield sdk.colorStyle.update(localColorId, localColor);
|
|
211
|
+
}
|
|
212
|
+
return localColorGuidsMap;
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
setFonts(studioBrandKit, sdk) {
|
|
216
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
217
|
+
const fontConnectorId = studioBrandKit.fontConnectorId;
|
|
218
|
+
const guidFontFamilyIdMap = new Map();
|
|
219
|
+
for (const font of studioBrandKit.brandKit.fonts || []) {
|
|
220
|
+
const { parsedData: fontStyles = [] } = yield sdk.fontConnector.detail(fontConnectorId, font.fontFamilyId);
|
|
221
|
+
if (!(fontStyles === null || fontStyles === void 0 ? void 0 : fontStyles[0]))
|
|
222
|
+
throw new Error(`No font styles for family ID: ${font.fontFamilyId}`);
|
|
223
|
+
const { parsedData: localFontId } = yield sdk.font.addFontFamily(fontConnectorId, {
|
|
224
|
+
name: fontStyles[0].familyName,
|
|
225
|
+
fontFamilyId: font.fontFamilyId,
|
|
226
|
+
});
|
|
227
|
+
if (localFontId)
|
|
228
|
+
guidFontFamilyIdMap.set(font.fontFamilyBrandKitGuid, localFontId);
|
|
229
|
+
}
|
|
230
|
+
return guidFontFamilyIdMap;
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
setParagraphStyles(studioBrandKit, sdk, resources) {
|
|
234
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
235
|
+
const { localColors, localFonts, localColorGuidMap, localFontGuidMap } = resources;
|
|
236
|
+
for (const style of studioBrandKit.brandKit.paragraphStyles || []) {
|
|
237
|
+
const localColorId = localColorGuidMap.get(style.brandKitColorGuid);
|
|
238
|
+
const fontFamilyId = localFontGuidMap.get(style.brandKitFontFamilyGuid);
|
|
239
|
+
const fontKey = getFontKey(localFonts, fontFamilyId, style.fontStyleId);
|
|
240
|
+
if (!fontFamilyId || !fontKey)
|
|
241
|
+
throw new Error(`Paragraph style could not be created with an empty font family: ${style.name}`);
|
|
242
|
+
const localColor = getColorById(localColors, localColorId);
|
|
243
|
+
if (!localColor)
|
|
244
|
+
throw new Error(`Paragraph style could not be created with an empty color: ${style.name}`);
|
|
245
|
+
const { parsedData: styleId } = yield sdk.paragraphStyle.create();
|
|
246
|
+
const paragraphStyleUpdate = mapBrandKitStyleToLocal(style, localColor, `${fontKey}`);
|
|
247
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
248
|
+
yield sdk.paragraphStyle.rename(styleId, style.name);
|
|
249
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
250
|
+
yield sdk.paragraphStyle.update(styleId, paragraphStyleUpdate);
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
setCharacterStyles(studioBrandKit, sdk, resources) {
|
|
255
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
256
|
+
const { localColors, localFonts, localColorGuidMap, localFontGuidMap } = resources;
|
|
257
|
+
for (const style of studioBrandKit.brandKit.characterStyles || []) {
|
|
258
|
+
const localColorId = style.brandKitColorGuid ? localColorGuidMap.get(style.brandKitColorGuid) : undefined;
|
|
259
|
+
const fontFamilyId = style.brandKitFontFamilyGuid
|
|
260
|
+
? localFontGuidMap.get(style.brandKitFontFamilyGuid)
|
|
261
|
+
: undefined;
|
|
262
|
+
const localColor = getColorById(localColors, localColorId);
|
|
263
|
+
const fontKey = getFontKey(localFonts, fontFamilyId, style.fontStyleId);
|
|
264
|
+
const { parsedData: styleId } = yield sdk.characterStyle.create();
|
|
265
|
+
const characterStyleUpdate = mapBrandKitStyleToLocal(style, localColor, fontKey);
|
|
266
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
267
|
+
yield sdk.characterStyle.rename(styleId, style.name);
|
|
268
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
269
|
+
yield sdk.characterStyle.update(styleId, characterStyleUpdate);
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
_BrandKitController_editorAPI = new WeakMap();
|
|
275
|
+
//# sourceMappingURL=BrandKitController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrandKitController.js","sourceRoot":"","sources":["../../../../src/controllers/BrandKitController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAQA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACrH,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAQpE;;;GAGG;AAEH,MAAM,OAAO,kBAAkB;IAM3B;;OAEG;IACH,YAAY,SAAoB,EAAE,GAAQ;QAR1C;;WAEG;QACH,gDAAsB;QA4B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(_id?: Id | null, left?: number | null, top?: number | null, width?: number | null, height?: number | null) => Promise<import(
|
|
24
|
+
zoomToPage: (_id?: Id | null, left?: number | null, top?: number | null, width?: number | null, height?: number | null) => Promise<import('../types/CommonTypes').EditorResponse<null>>;
|
|
25
25
|
/**
|
|
26
26
|
* This method gets the scale factor of the canvas
|
|
27
27
|
* @returns scale factor in percents
|
|
28
28
|
*/
|
|
29
|
-
getZoomPercentage: () => Promise<import(
|
|
29
|
+
getZoomPercentage: () => Promise<import('../types/CommonTypes').EditorResponse<number>>;
|
|
30
30
|
/**
|
|
31
31
|
* This method sets the scale factor to the canvas and re-centers the page
|
|
32
32
|
* @param scaleFactor scale factor in percents
|
|
33
33
|
* @returns
|
|
34
34
|
*/
|
|
35
|
-
setZoomPercentage: (scaleFactor: number) => Promise<import(
|
|
35
|
+
setZoomPercentage: (scaleFactor: number) => Promise<import('../types/CommonTypes').EditorResponse<null>>;
|
|
36
36
|
/**
|
|
37
37
|
* This method sets a new view mode
|
|
38
38
|
* @param viewMode view mode of the editor
|
|
39
39
|
* @returns
|
|
40
40
|
*/
|
|
41
|
-
setViewMode: (viewMode: ViewMode) => Promise<import(
|
|
41
|
+
setViewMode: (viewMode: ViewMode) => Promise<import('../types/CommonTypes').EditorResponse<null>>;
|
|
42
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasController.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"CanvasController.js","sourceRoot":"","sources":["../../../../src/controllers/CanvasController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IAMzB;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,8CAAsB;QAStB;;;;;;;;;;WAUG;QACH,eAAU,GAAG,CACT,GAAe,EACf,IAAoB,EACpB,GAAmB,EACnB,KAAqB,EAC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AC;IAChC,CAAC;CAuDJ"}
|
|
@@ -14,49 +14,49 @@ export declare class CharacterStyleController {
|
|
|
14
14
|
* This method returns the list of character styles
|
|
15
15
|
* @returns list of all character styles
|
|
16
16
|
*/
|
|
17
|
-
getAll: () => Promise<import(
|
|
17
|
+
getAll: () => Promise<import('../types/CommonTypes').EditorResponse<CharacterStyle[]>>;
|
|
18
18
|
/**
|
|
19
19
|
* This method returns a character style by the id
|
|
20
20
|
* @param characterStyleId the id of a specific character style
|
|
21
21
|
* @returns character style for given id
|
|
22
22
|
*/
|
|
23
|
-
getById: (characterStyleId: Id) => Promise<import(
|
|
23
|
+
getById: (characterStyleId: Id) => Promise<import('../types/CommonTypes').EditorResponse<CharacterStyle>>;
|
|
24
24
|
/**
|
|
25
25
|
* This method creates a new character style
|
|
26
26
|
* @returns the id of new character style
|
|
27
27
|
*/
|
|
28
|
-
create: () => Promise<import(
|
|
28
|
+
create: () => Promise<import('../types/CommonTypes').EditorResponse<string>>;
|
|
29
29
|
/**
|
|
30
30
|
* This method updates a character style by the id and provided properties
|
|
31
31
|
* @param characterStyleId the id of a specific character style
|
|
32
32
|
* @param characterStyle the new character style properties
|
|
33
33
|
* @returns
|
|
34
34
|
*/
|
|
35
|
-
update: (characterStyleId: Id, characterStyle: CharacterStyleUpdate) => Promise<import(
|
|
35
|
+
update: (characterStyleId: Id, characterStyle: CharacterStyleUpdate) => Promise<import('../types/CommonTypes').EditorResponse<null>>;
|
|
36
36
|
/**
|
|
37
37
|
* This method removes a character style by the id
|
|
38
38
|
* @param characterStyleId the id of a specific character style
|
|
39
39
|
* @returns
|
|
40
40
|
*/
|
|
41
|
-
remove: (characterStyleId: Id) => Promise<import(
|
|
41
|
+
remove: (characterStyleId: Id) => Promise<import('../types/CommonTypes').EditorResponse<null>>;
|
|
42
42
|
/**
|
|
43
43
|
* This method duplicates a character style by the id
|
|
44
44
|
* @param characterStyleId the id of a specific character style
|
|
45
45
|
* @returns id of the duplicated character style
|
|
46
46
|
*/
|
|
47
|
-
duplicate: (characterStyleId: Id) => Promise<import(
|
|
47
|
+
duplicate: (characterStyleId: Id) => Promise<import('../types/CommonTypes').EditorResponse<string>>;
|
|
48
48
|
/**
|
|
49
49
|
* This method renames a character style by the id
|
|
50
50
|
* @param characterStyleId the id of a specific character style
|
|
51
51
|
* @param characterStyleName the new name of the character style
|
|
52
52
|
* @returns
|
|
53
53
|
*/
|
|
54
|
-
rename: (characterStyleId: Id, characterStyleName: string) => Promise<import(
|
|
54
|
+
rename: (characterStyleId: Id, characterStyleName: string) => Promise<import('../types/CommonTypes').EditorResponse<null>>;
|
|
55
55
|
/**
|
|
56
56
|
* This method changes positions of character styles
|
|
57
57
|
* @param order the position of the character styles
|
|
58
58
|
* @param ids the list of character style ids
|
|
59
59
|
* @returns
|
|
60
60
|
*/
|
|
61
|
-
move: (order: number, ids: Id[]) => Promise<import(
|
|
61
|
+
move: (order: number, ids: Id[]) => Promise<import('../types/CommonTypes').EditorResponse<null>>;
|
|
62
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CharacterStyleController.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"CharacterStyleController.js","sourceRoot":"","sources":["../../../../src/controllers/CharacterStyleController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGpE;;;GAGG;AACH,MAAM,OAAO,wBAAwB;IAMjC;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,sDAAsB;QAStB;;;WAGG;QACH,WAAM,GAAG,GAAS,EAAE;YAChB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,2CAAW,CAAC;YAClC,OAAO,GAAG,CAAC,kBAAkB,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAmB,MAAM,CAAC,CAAC,CAAC;QACtG,CAAC,CAAA,CAAC;QAEF;;;;WAIG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,IAAI,2CAAW,CAAC;YAClC,OAAO,GAAG,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAK,MAAM,CAAC,CAAC,CAAC;QAC7G,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACH,WAAM,GAAG,CAAO,gBAAoB,EAAE,kBAA0B,EAAE,EAAE;YAChE,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,2CAAW,CAAC;YAClC,OAAO,GAAG;iBACL,oBAAoB,CAAC,gBAAgB,EAAE,kBAAkB,CAAC;iBAC1D,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAC/D,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACH,SAAI,GAAG,CAAO,KAAa,EAAE,GAAS,EAAE,EAAE;YACtC,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,2CAAW,CAAC;YAClC,OAAO,GAAG,CAAC,mBAAmB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACrG,CAAC,CAAA,CAAC;QAxFE,uBAAA,IAAI,uCAAc,SAAS,MAAA,CAAC;IAChC,CAAC;CAwFJ"}
|
|
@@ -15,22 +15,22 @@ export declare class ClipboardController {
|
|
|
15
15
|
* @param ids An array of all frame ids you want to copy
|
|
16
16
|
* @returns
|
|
17
17
|
*/
|
|
18
|
-
copyFrames: (ids: Id[]) => Promise<import(
|
|
18
|
+
copyFrames: (ids: Id[]) => Promise<import('../types/CommonTypes').EditorResponse<null>>;
|
|
19
19
|
/**
|
|
20
20
|
* This method will remove the frames and store them to the OS clipboard as
|
|
21
21
|
* a json frame
|
|
22
22
|
* @param ids An array of all frame ids you want to cut
|
|
23
23
|
* @returns
|
|
24
24
|
*/
|
|
25
|
-
cutFrames: (ids: Id[]) => Promise<import(
|
|
25
|
+
cutFrames: (ids: Id[]) => Promise<import('../types/CommonTypes').EditorResponse<null>>;
|
|
26
26
|
/**
|
|
27
27
|
* This method will paste the OS clipboard content to the editor as frames
|
|
28
28
|
* @returns
|
|
29
29
|
*/
|
|
30
|
-
pasteFrames: () => Promise<import(
|
|
30
|
+
pasteFrames: () => Promise<import('../types/CommonTypes').EditorResponse<null>>;
|
|
31
31
|
/**
|
|
32
32
|
* This method will get the content type of the OS clipboard
|
|
33
33
|
* @returns content type
|
|
34
34
|
*/
|
|
35
|
-
getContentType: () => Promise<import(
|
|
35
|
+
getContentType: () => Promise<import('../types/CommonTypes').EditorResponse<ClipboardContentType>>;
|
|
36
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClipboardController.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"ClipboardController.js","sourceRoot":"","sources":["../../../../src/controllers/ClipboardController.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,iDAAsB;QAStB;;;;WAIG;QACH,eAAU,GAAG,CAAO,GAAS,EAAE,EAAE;YAC7B,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAClC,MAAM,SAAS,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YAE5C,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC;gBACjB,MAAM,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACxD,CAAC;YAED,OAAO,qBAAqB,CAAO,SAAS,CAAC,CAAC;QAClD,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACH,cAAS,GAAG,CAAO,GAAS,EAAE,EAAE;YAC5B,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAClC,MAAM,SAAS,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YAE3C,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC;gBACjB,MAAM,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACxD,CAAC;YAED,OAAO,qBAAqB,CAAO,SAAS,CAAC,CAAC;QAClD,CAAC,CAAA,CAAC;QAEF;;;WAGG;QACH,gBAAW,GAAG,GAAS,EAAE;YACrB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAElC,MAAM,aAAa,GAAG,MAAM,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;YAC3D,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;YAEpD,OAAO,qBAAqB,CAAO,MAAM,CAAC,CAAC;QAC/C,CAAC,CAAA,CAAC;QAEF;;;WAGG;QACH,mBAAc,GAAG,GAAS,EAAE;YACxB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAElC,MAAM,aAAa,GAAG,MAAM,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;YAC3D,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,uBAAuB,CAAC,aAAa,CAAC,CAAC;YAEhE,OAAO,qBAAqB,CAAuB,MAAM,CAAC,CAAC;QAC/D,CAAC,CAAA,CAAC;QA5DE,uBAAA,IAAI,kCAAc,SAAS,MAAA,CAAC;IAChC,CAAC;CA4DJ"}
|
|
@@ -15,5 +15,5 @@ export declare class ColorConversionController {
|
|
|
15
15
|
* @param color the color to convert
|
|
16
16
|
* @returns the rgb representation of the given color
|
|
17
17
|
*/
|
|
18
|
-
convertToRgb: (color: Color) => Promise<import(
|
|
18
|
+
convertToRgb: (color: Color) => Promise<import('../types/CommonTypes').EditorResponse<RGBColor>>;
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorConversionController.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"ColorConversionController.js","sourceRoot":"","sources":["../../../../src/controllers/ColorConversionController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGpE;;;GAGG;AACH,MAAM,OAAO,yBAAyB;IAMlC;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,uDAAsB;QAStB;;;;WAIG;QACH,iBAAY,GAAG,CAAO,KAAY,EAAE,EAAE;YAClC,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,4CAAW,CAAC;YAClC,OAAO,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAW,MAAM,CAAC,CAAC,CAAC;QAC3G,CAAC,CAAA,CAAC;QAXE,uBAAA,IAAI,wCAAc,SAAS,MAAA,CAAC;IAChC,CAAC;CAWJ"}
|
|
@@ -14,49 +14,49 @@ export declare class ColorStyleController {
|
|
|
14
14
|
* This method returns the list of colors
|
|
15
15
|
* @returns list of all colors
|
|
16
16
|
*/
|
|
17
|
-
getAll: () => Promise<import(
|
|
17
|
+
getAll: () => Promise<import('../types/CommonTypes').EditorResponse<DocumentColor[]>>;
|
|
18
18
|
/**
|
|
19
19
|
* This method returns a color by id
|
|
20
20
|
* @param id the id of a specific color
|
|
21
21
|
* @returns color properties for given id
|
|
22
22
|
*/
|
|
23
|
-
getById: (id: string) => Promise<import(
|
|
23
|
+
getById: (id: string) => Promise<import('../types/CommonTypes').EditorResponse<DocumentColor>>;
|
|
24
24
|
/**
|
|
25
25
|
* This method creates a new color
|
|
26
26
|
* @returns the new created color id
|
|
27
27
|
*/
|
|
28
|
-
create: () => Promise<import(
|
|
28
|
+
create: () => Promise<import('../types/CommonTypes').EditorResponse<string>>;
|
|
29
29
|
/**
|
|
30
30
|
* This method duplicates a color by the id
|
|
31
31
|
* @param id the id of a specific color
|
|
32
32
|
* @returns id of the duplicated color
|
|
33
33
|
*/
|
|
34
|
-
duplicate: (id: string) => Promise<import(
|
|
34
|
+
duplicate: (id: string) => Promise<import('../types/CommonTypes').EditorResponse<string>>;
|
|
35
35
|
/**
|
|
36
36
|
* This method changes positions of colors
|
|
37
37
|
* @param order the position of the colors
|
|
38
38
|
* @param ids the list of color IDs
|
|
39
39
|
* @returns
|
|
40
40
|
*/
|
|
41
|
-
move: (order: number, ids: string[]) => Promise<import(
|
|
41
|
+
move: (order: number, ids: string[]) => Promise<import('../types/CommonTypes').EditorResponse<null>>;
|
|
42
42
|
/**
|
|
43
43
|
* This method renames a color
|
|
44
44
|
* @param id the id of a specific color
|
|
45
45
|
* @param newColorName the new name of the color
|
|
46
46
|
* @returns
|
|
47
47
|
*/
|
|
48
|
-
rename: (id: string, newColorName: string) => Promise<import(
|
|
48
|
+
rename: (id: string, newColorName: string) => Promise<import('../types/CommonTypes').EditorResponse<null>>;
|
|
49
49
|
/**
|
|
50
50
|
* This method updates a color
|
|
51
51
|
* @param id the id of a specific color
|
|
52
52
|
* @param newColorProperties the new color properties
|
|
53
53
|
* @returns
|
|
54
54
|
*/
|
|
55
|
-
update: (id: string, newColorProperties: ColorUpdate) => Promise<import(
|
|
55
|
+
update: (id: string, newColorProperties: ColorUpdate) => Promise<import('../types/CommonTypes').EditorResponse<null>>;
|
|
56
56
|
/**
|
|
57
57
|
* This method removes a color
|
|
58
58
|
* @param id the id of a specific color
|
|
59
59
|
* @returns
|
|
60
60
|
*/
|
|
61
|
-
remove: (id: string) => Promise<import(
|
|
61
|
+
remove: (id: string) => Promise<import('../types/CommonTypes').EditorResponse<null>>;
|
|
62
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorStyleController.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"ColorStyleController.js","sourceRoot":"","sources":["../../../../src/controllers/ColorStyleController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,SAAS,EAA8B,MAAM,0BAA0B,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAM7B;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,kDAAsB;QAStB;;;WAGG;QACH,WAAM,GAAG,GAAS,EAAE;YAChB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,uCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAkB,MAAM,CAAC,CAAC,CAAC;QAC5F,CAAC,CAAA,CAAC;QAEF;;;;WAIG;QACH,YAAO,GAAG,CAAO,EAAU,EAAE,EAAE;YAC3B,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,uCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAgB,MAAM,CAAC,CAAC,CAAC;QAC/F,CAAC,CAAA,CAAC;QAEF;;;WAGG;QACH,WAAM,GAAG,GAAS,EAAE;YAChB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,uCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAK,MAAM,CAAC,CAAC,CAAC;QACjF,CAAC,CAAA,CAAC;QAEF;;;;WAIG;QACH,cAAS,GAAG,CAAO,EAAU,EAAE,EAAE;YAC7B,MAAM,GAAG,GAAG,MAAM,uBAAA,IA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M,CAAC,CAAC,CAAC;QACjH,CAAC,CAAA,CAAC;QAEF;;;;WAIG;QACH,WAAM,GAAG,CAAO,EAAU,EAAE,EAAE;YAC1B,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,uCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACrF,CAAC,CAAA,CAAC;QAtFE,uBAAA,IAAI,mCAAc,SAAS,MAAA,CAAC;IAChC,CAAC;CAsFJ"}
|
|
@@ -17,21 +17,21 @@ export declare abstract class ConfigurationController {
|
|
|
17
17
|
* this method returns an error. The key cannot be null.
|
|
18
18
|
* @returns value for a given configuration key
|
|
19
19
|
*/
|
|
20
|
-
getValue(key: WellKnownConfigurationKeys | string): Promise<import(
|
|
20
|
+
getValue(key: WellKnownConfigurationKeys | string): Promise<import('../types/CommonTypes').EditorResponse<string>>;
|
|
21
21
|
/**
|
|
22
22
|
* This method sets, or overrides the value for a given key. Null values are not allowed for both key and value,
|
|
23
23
|
* using them will result in an error.
|
|
24
24
|
* @returns
|
|
25
25
|
*/
|
|
26
|
-
setValue(key: WellKnownConfigurationKeys | string, value: string): Promise<import(
|
|
26
|
+
setValue(key: WellKnownConfigurationKeys | string, value: string): Promise<import('../types/CommonTypes').EditorResponse<null>>;
|
|
27
27
|
/**
|
|
28
28
|
* This method updates the studio options. Only defined options are updated, null values are ignored.
|
|
29
29
|
* @returns
|
|
30
30
|
*/
|
|
31
|
-
updateStudioOptions(options: StudioOptionsDeltaUpdate): Promise<import(
|
|
31
|
+
updateStudioOptions(options: StudioOptionsDeltaUpdate): Promise<import('../types/CommonTypes').EditorResponse<null>>;
|
|
32
32
|
/**
|
|
33
33
|
* This method returns the engine session id. This id is unique for this engine session
|
|
34
34
|
* @returns the engine session id
|
|
35
35
|
*/
|
|
36
|
-
getEngineSessionId(): Promise<import(
|
|
36
|
+
getEngineSessionId(): Promise<import('../types/CommonTypes').EditorResponse<string>>;
|
|
37
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurationController.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"ConfigurationController.js","sourceRoot":"","sources":["../../../../src/controllers/ConfigurationController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGpE;;;;;GAKG;AACH,MAAM,OAAgB,uBAAuB;IAMzC;;OAEG;IACH,YAAsB,SAAoB;QAR1C;;WAEG;QACH,qDAAsB;QAMlB,uBAAA,IAAI,sCAAc,SAAS,MAAA,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACG,QAAQ,CAAC,GAAwC;;YACnD,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,0CAAW,CAAC;YAClC,OAAO,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAS,MAAM,CAAC,CAAC,CAAC;QAC3F,CAAC;KAAA;IAED;;;;OAIG;IACG,QAAQ,CAAC,GAAwC,EAAE,KAAa;;YAClE,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,0CAAW,CAAC;YAClC,OAAO,GAAG,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAChG,CAAC;KAAA;IAED;;;OAGG;IACG,mBAAmB,CAAC,OAAiC;;YACvD,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,0CAAW,CAAC;YAClC,OAAO,GAAG,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBA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