@chili-publish/studio-sdk 1.14.0 → 1.17.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.js +1 -1
- package/_bundles/main.js.map +1 -1
- package/_bundles/report.html +2 -2
- package/lib/editor-engine.json +1 -1
- package/lib/package.json +1 -1
- package/lib/src/controllers/ActionController.d.ts +12 -0
- package/lib/src/controllers/ActionController.js +18 -0
- package/lib/src/controllers/ActionController.js.map +1 -1
- package/lib/src/controllers/ColorStyleController.js +6 -3
- package/lib/src/controllers/ColorStyleController.js.map +1 -1
- package/lib/src/controllers/DataConnectorController.d.ts +69 -0
- package/lib/src/controllers/DataConnectorController.js +134 -0
- package/lib/src/controllers/DataConnectorController.js.map +1 -0
- package/lib/src/controllers/DocumentController.d.ts +7 -0
- package/lib/src/controllers/DocumentController.js +12 -0
- package/lib/src/controllers/DocumentController.js.map +1 -1
- package/lib/src/controllers/FontConnectorController.d.ts +9 -8
- package/lib/src/controllers/FontConnectorController.js +8 -7
- package/lib/src/controllers/FontConnectorController.js.map +1 -1
- package/lib/src/controllers/FrameController.d.ts +132 -82
- package/lib/src/controllers/FrameController.js +97 -21
- package/lib/src/controllers/FrameController.js.map +1 -1
- package/lib/src/controllers/LayoutController.d.ts +2 -2
- package/lib/src/controllers/LayoutController.js +7 -2
- package/lib/src/controllers/LayoutController.js.map +1 -1
- package/lib/src/controllers/MediaConnectorController.d.ts +9 -8
- package/lib/src/controllers/MediaConnectorController.js +8 -7
- package/lib/src/controllers/MediaConnectorController.js.map +1 -1
- package/lib/src/controllers/PageController.d.ts +7 -0
- package/lib/src/controllers/PageController.js +10 -0
- package/lib/src/controllers/PageController.js.map +1 -1
- package/lib/src/controllers/VariableController.d.ts +17 -1
- package/lib/src/controllers/VariableController.js +24 -0
- package/lib/src/controllers/VariableController.js.map +1 -1
- package/lib/src/index.d.ts +10 -6
- package/lib/src/index.js +5 -1
- package/lib/src/index.js.map +1 -1
- package/lib/src/next/index.d.ts +2 -1
- package/lib/src/next/index.js +1 -1
- package/lib/src/next/index.js.map +1 -1
- package/lib/src/next/tests/controllers/ConnectorController.test.js +1 -2
- package/lib/src/next/tests/controllers/ConnectorController.test.js.map +1 -1
- package/lib/src/next/tests/controllers/VariableController.test.js +1 -0
- package/lib/src/next/tests/controllers/VariableController.test.js.map +1 -1
- package/lib/src/next/types/ConnectorTypes.d.ts +2 -1
- package/lib/src/next/types/ConnectorTypes.js +1 -0
- package/lib/src/next/types/ConnectorTypes.js.map +1 -1
- package/lib/src/sdk.d.ts +2 -0
- package/lib/src/sdk.js +3 -0
- package/lib/src/sdk.js.map +1 -1
- package/lib/src/tests/controllers/ActionController.test.js +12 -0
- package/lib/src/tests/controllers/ActionController.test.js.map +1 -1
- package/lib/src/tests/controllers/ColorStyleController.test.js +11 -0
- package/lib/src/tests/controllers/ColorStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/DataConnectorController.test.d.ts +1 -0
- package/lib/src/tests/controllers/DataConnectorController.test.js +102 -0
- package/lib/src/tests/controllers/DataConnectorController.test.js.map +1 -0
- package/lib/src/tests/controllers/DocumentController.test.js +15 -0
- package/lib/src/tests/controllers/DocumentController.test.js.map +1 -1
- package/lib/src/tests/controllers/FrameController.test.js +57 -31
- package/lib/src/tests/controllers/FrameController.test.js.map +1 -1
- package/lib/src/tests/controllers/LayoutController.test.js +23 -1
- package/lib/src/tests/controllers/LayoutController.test.js.map +1 -1
- package/lib/src/tests/controllers/PageController.test.js +7 -0
- package/lib/src/tests/controllers/PageController.test.js.map +1 -1
- package/lib/src/tests/controllers/VariableController.test.js +18 -0
- package/lib/src/tests/controllers/VariableController.test.js.map +1 -1
- package/lib/src/tests/utils/editorResponseData.test.js +45 -1
- package/lib/src/tests/utils/editorResponseData.test.js.map +1 -1
- package/lib/src/types/ColorStyleTypes.d.ts +30 -2
- package/lib/src/types/ColorStyleTypes.js +5 -0
- package/lib/src/types/ColorStyleTypes.js.map +1 -1
- package/lib/src/types/ConnectorTypes.d.ts +2 -13
- package/lib/src/types/ConnectorTypes.js +1 -0
- package/lib/src/types/ConnectorTypes.js.map +1 -1
- package/lib/src/types/DataConnectorTypes.d.ts +35 -0
- package/lib/src/types/DataConnectorTypes.js +2 -0
- package/lib/src/types/DataConnectorTypes.js.map +1 -0
- package/lib/src/types/DocumentTypes.d.ts +0 -1
- package/lib/src/types/DocumentTypes.js.map +1 -1
- package/lib/src/types/FontConnectorTypes.d.ts +6 -0
- package/lib/src/types/FontConnectorTypes.js.map +1 -1
- package/lib/src/types/FrameTypes.d.ts +63 -10
- package/lib/src/types/FrameTypes.js +30 -0
- package/lib/src/types/FrameTypes.js.map +1 -1
- package/lib/src/types/LayoutTypes.d.ts +9 -0
- package/lib/src/types/LayoutTypes.js.map +1 -1
- package/lib/src/types/MediaConnectorTypes.d.ts +6 -0
- package/lib/src/types/MediaConnectorTypes.js.map +1 -1
- package/lib/src/types/VariableTypes.d.ts +2 -0
- package/lib/src/types/VariableTypes.js.map +1 -1
- package/lib/src/utils/EditorResponseData.d.ts +4 -0
- package/lib/src/utils/EditorResponseData.js +19 -2
- package/lib/src/utils/EditorResponseData.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { castToEditorResponse } from '../../utils/EditorResponseData';
|
|
1
|
+
import { castToEditorResponse, ConnectorHttpError, getEditorResponseData } from '../../utils/EditorResponseData';
|
|
2
2
|
const partialMockResult = {
|
|
3
3
|
status: 200,
|
|
4
4
|
success: true,
|
|
@@ -44,5 +44,49 @@ describe('EditorResponseData Util(s)', () => {
|
|
|
44
44
|
expect(result).toMatchObject(Object.assign(Object.assign({}, partialMockResult), { data: '[{"a":"b","c":"d"},{"e":3}]' }));
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
|
+
describe('getEditorResponseData', () => {
|
|
48
|
+
const mockErrorResponse = {
|
|
49
|
+
status: 12345,
|
|
50
|
+
success: false,
|
|
51
|
+
error: 'engine error',
|
|
52
|
+
data: '',
|
|
53
|
+
parsedData: null,
|
|
54
|
+
};
|
|
55
|
+
it('should throw ConnectorHttpError when status matches connectorHttpErrorErrorCode', () => {
|
|
56
|
+
// Do NOT use the value from EditorResponseData file as it will make sure
|
|
57
|
+
// any misalignment with SDK and/or engine is reported.
|
|
58
|
+
const connectorHttpErrorErrorCode = 404075;
|
|
59
|
+
const httpRequestErrorCode = 500;
|
|
60
|
+
const errorMessage = 'Dummy http error message';
|
|
61
|
+
const response = Object.assign(Object.assign({}, mockErrorResponse), { status: connectorHttpErrorErrorCode, error: errorMessage, data: JSON.stringify({ statusCode: httpRequestErrorCode }) });
|
|
62
|
+
expect(() => getEditorResponseData(response)).toThrowError(ConnectorHttpError);
|
|
63
|
+
try {
|
|
64
|
+
getEditorResponseData(response);
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
expect(error).toBeInstanceOf(ConnectorHttpError);
|
|
68
|
+
expect(error.statusCode).toBe(httpRequestErrorCode); // or whatever the httpStatusCode is
|
|
69
|
+
expect(error.message).toBe(errorMessage);
|
|
70
|
+
const cause = error.cause;
|
|
71
|
+
expect(cause.name).toBe(connectorHttpErrorErrorCode.toString());
|
|
72
|
+
expect(cause.message).toBe(errorMessage);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
it('should throw a simple Error when status does NOT match connectorHttpErrorErrorCode', () => {
|
|
76
|
+
const response = mockErrorResponse;
|
|
77
|
+
expect(() => getEditorResponseData(response)).toThrowError(Error);
|
|
78
|
+
try {
|
|
79
|
+
getEditorResponseData(response);
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
expect(error).toBeInstanceOf(Error);
|
|
83
|
+
expect(error).not.toBeInstanceOf(ConnectorHttpError);
|
|
84
|
+
expect(error.message).toBe(mockErrorResponse.error);
|
|
85
|
+
const cause = error.cause;
|
|
86
|
+
expect(cause.name).toBe(mockErrorResponse.status.toString());
|
|
87
|
+
expect(cause.message).toBe(mockErrorResponse.error);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
});
|
|
47
91
|
});
|
|
48
92
|
//# sourceMappingURL=editorResponseData.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editorResponseData.test.js","sourceRoot":"","sources":["../../../../src/tests/utils/editorResponseData.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editorResponseData.test.js","sourceRoot":"","sources":["../../../../src/tests/utils/editorResponseData.test.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEjH,MAAM,iBAAiB,GAAG;IACtB,MAAM,EAAE,GAAG;IACX,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,IAAI;CACnB,CAAC;AAEF,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IACxC,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;QAClC,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;YACjD,MAAM,MAAM,GAAG,OAAO,CAAC;YACvB,MAAM,MAAM,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;YAE5C,MAAM,CAAC,MAAM,CAAC,CAAC,aAAa,iCAAM,iBAAiB,KAAE,IAAI,EAAE,SAAS,IAAG,CAAC;QAC5E,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;YACjD,MAAM,MAAM,GAAG,CAAC,CAAC;YACjB,MAAM,MAAM,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;YAE5C,MAAM,CAAC,MAAM,CAAC,CAAC,aAAa,iCAAM,iBAAiB,KAAE,IAAI,EAAE,GAAG,IAAG,CAAC;QACtE,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;YACjD,MAAM,MAAM,GAAG;gBACX,CAAC,EAAE,GAAG;gBACN,CAAC,EAAE,GAAG;gB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AAC,cAAc,CAAC,KAAK,CAAC,CAAC;gBACpC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;gBACrD,MAAM,CAAE,KAAe,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;gBAE/D,MAAM,KAAK,GAAI,KAAe,CAAC,KAA0C,CAAC;gBAC1E,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAC7D,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;aACvD;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -5,7 +5,12 @@ export declare enum ColorType {
|
|
|
5
5
|
cmyk = "cmyk",
|
|
6
6
|
gray = "gray",
|
|
7
7
|
hsl = "hsl",
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use spotCMYK or spotRGB instead
|
|
10
|
+
*/
|
|
11
|
+
spot = "spot",
|
|
12
|
+
spotCMYK = "spotCMYK",
|
|
13
|
+
spotRGB = "spotRGB"
|
|
9
14
|
}
|
|
10
15
|
export declare type RGBColor = {
|
|
11
16
|
r: number;
|
|
@@ -30,6 +35,9 @@ export declare type GrayColor = {
|
|
|
30
35
|
g: number;
|
|
31
36
|
type: ColorType;
|
|
32
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Use SpotColorCMYK or SpotColorRGB instead
|
|
40
|
+
*/
|
|
33
41
|
export declare type SpotColor = {
|
|
34
42
|
spotName: string;
|
|
35
43
|
c: number;
|
|
@@ -38,11 +46,31 @@ export declare type SpotColor = {
|
|
|
38
46
|
k: number;
|
|
39
47
|
type: ColorType;
|
|
40
48
|
};
|
|
49
|
+
export declare type SpotColorCMYK = {
|
|
50
|
+
spotName: string;
|
|
51
|
+
c: number;
|
|
52
|
+
m: number;
|
|
53
|
+
y: number;
|
|
54
|
+
k: number;
|
|
55
|
+
type: ColorType;
|
|
56
|
+
};
|
|
57
|
+
export declare type SpotColorRGB = {
|
|
58
|
+
spotName: string;
|
|
59
|
+
r: number;
|
|
60
|
+
g: number;
|
|
61
|
+
b: number;
|
|
62
|
+
type: ColorType;
|
|
63
|
+
};
|
|
64
|
+
export declare type SpotColorHEX = {
|
|
65
|
+
spotName: string;
|
|
66
|
+
value: string;
|
|
67
|
+
type: ColorType;
|
|
68
|
+
};
|
|
41
69
|
export declare type HexColor = {
|
|
42
70
|
value: string;
|
|
43
71
|
type: ColorType;
|
|
44
72
|
};
|
|
45
|
-
export declare type Color = RGBColor | CMYKColor | HSLColor | GrayColor | SpotColor | HexColor;
|
|
73
|
+
export declare type Color = RGBColor | CMYKColor | HSLColor | GrayColor | SpotColor | HexColor | SpotColorCMYK | SpotColorRGB | SpotColorHEX;
|
|
46
74
|
export declare type ColorUpdate = Color;
|
|
47
75
|
export declare type DocumentColor = {
|
|
48
76
|
id: string;
|
|
@@ -5,7 +5,12 @@ export var ColorType;
|
|
|
5
5
|
ColorType["cmyk"] = "cmyk";
|
|
6
6
|
ColorType["gray"] = "gray";
|
|
7
7
|
ColorType["hsl"] = "hsl";
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use spotCMYK or spotRGB instead
|
|
10
|
+
*/
|
|
8
11
|
ColorType["spot"] = "spot";
|
|
12
|
+
ColorType["spotCMYK"] = "spotCMYK";
|
|
13
|
+
ColorType["spotRGB"] = "spotRGB";
|
|
9
14
|
})(ColorType || (ColorType = {}));
|
|
10
15
|
export var ColorUsageType;
|
|
11
16
|
(function (ColorUsageType) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorStyleTypes.js","sourceRoot":"","sources":["../../../src/types/ColorStyleTypes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"ColorStyleTypes.js","sourceRoot":"","sources":["../../../src/types/ColorStyleTypes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,SAYX;AAZD,WAAY,SAAS;IACjB,wBAAW,CAAA;IACX,wBAAW,CAAA;IACX,0BAAa,CAAA;IACb,0BAAa,CAAA;IACb,wBAAW,CAAA;IACX;;OAEG;IACH,0BAAa,CAAA;IACb,kCAAqB,CAAA;IACrB,gCAAmB,CAAA;AACvB,CAAC,EAZW,SAAS,KAAT,SAAS,QAYpB;AA4HD,MAAM,CAAN,IAAY,cASX;AATD,WAAY,cAAc;IACtB;;OAEG;IACH,iCAAe,CAAA;IACf;;OAEG;IACH,uCAAqB,CAAA;AACzB,CAAC,EATW,cAAc,KAAd,cAAc,QASzB"}
|
|
@@ -13,7 +13,8 @@ export declare enum MediaType {
|
|
|
13
13
|
}
|
|
14
14
|
export declare enum ConnectorType {
|
|
15
15
|
media = "media",
|
|
16
|
-
fonts = "fonts"
|
|
16
|
+
fonts = "fonts",
|
|
17
|
+
data = "data"
|
|
17
18
|
}
|
|
18
19
|
export declare enum SortBy {
|
|
19
20
|
name = "name",
|
|
@@ -32,18 +33,6 @@ export declare type QueryOptions = {
|
|
|
32
33
|
sortBy?: SortBy | null;
|
|
33
34
|
sortOrder?: SortOrder | null;
|
|
34
35
|
};
|
|
35
|
-
export declare type FontConnectorCapabilities = {
|
|
36
|
-
query: boolean;
|
|
37
|
-
detail: boolean;
|
|
38
|
-
preview: boolean;
|
|
39
|
-
filtering: boolean;
|
|
40
|
-
};
|
|
41
|
-
export declare type MediaConnectorCapabilities = {
|
|
42
|
-
query: boolean;
|
|
43
|
-
detail: boolean;
|
|
44
|
-
filtering: boolean;
|
|
45
|
-
metadata?: boolean;
|
|
46
|
-
};
|
|
47
36
|
interface ConnectorRegistrationBase {
|
|
48
37
|
/**
|
|
49
38
|
* Url to the connector.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectorTypes.js","sourceRoot":"","sources":["../../../src/types/ConnectorTypes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC3B,6DAAQ,CAAA;IACR,yEAAc,CAAA;AAClB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B;AAED,MAAM,CAAN,IAAY,oCAGX;AAHD,WAAY,oCAAoC;IAC5C,sEAA8B,CAAA;IAC9B,wEAAgC,CAAA;AACpC,CAAC,EAHW,oCAAoC,KAApC,oCAAoC,QAG/C;AAED,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACjB,0BAAa,CAAA;IACb,sCAAyB,CAAA;AAC7B,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAED,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"ConnectorTypes.js","sourceRoot":"","sources":["../../../src/types/ConnectorTypes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC3B,6DAAQ,CAAA;IACR,yEAAc,CAAA;AAClB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B;AAED,MAAM,CAAN,IAAY,oCAGX;AAHD,WAAY,oCAAoC;IAC5C,sEAA8B,CAAA;IAC9B,wEAAgC,CAAA;AACpC,CAAC,EAHW,oCAAoC,KAApC,oCAAoC,QAG/C;AAED,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACjB,0BAAa,CAAA;IACb,sCAAyB,CAAA;AAC7B,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAED,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,gCAAe,CAAA;IACf,gCAAe,CAAA;IACf,8BAAa,CAAA;AACjB,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAED,MAAM,CAAN,IAAY,MAIX;AAJD,WAAY,MAAM;IACd,uBAAa,CAAA;I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nectorCapabilities = {
|
|
2
|
+
filtering: boolean;
|
|
3
|
+
sorting: boolean;
|
|
4
|
+
model: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare type PageConfig = {
|
|
7
|
+
filters?: DataFilter[] | null;
|
|
8
|
+
sorting?: DataSorting[] | null;
|
|
9
|
+
continuationToken?: string | null;
|
|
10
|
+
limit: number;
|
|
11
|
+
};
|
|
12
|
+
export declare type DataSorting = {
|
|
13
|
+
property: string;
|
|
14
|
+
direction: 'asc' | 'desc';
|
|
15
|
+
};
|
|
16
|
+
export declare type DataFilter = {
|
|
17
|
+
property: string;
|
|
18
|
+
value: string;
|
|
19
|
+
type: 'contains' | 'exact';
|
|
20
|
+
};
|
|
21
|
+
export declare type DataPage<Item> = {
|
|
22
|
+
data: Item[];
|
|
23
|
+
continuationToken?: string | null;
|
|
24
|
+
};
|
|
25
|
+
export declare type DataItem = {
|
|
26
|
+
[key: string]: string | number | boolean | Date | null;
|
|
27
|
+
};
|
|
28
|
+
export declare type DataModel = {
|
|
29
|
+
properties: DataModelProperty[];
|
|
30
|
+
};
|
|
31
|
+
declare type DataModelProperty = {
|
|
32
|
+
name: string;
|
|
33
|
+
type: 'number' | 'boolean' | 'singleLine' | 'multiLine' | 'date';
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataConnectorTypes.js","sourceRoot":"","sources":["../../../src/types/DataConnectorTypes.ts"],"names":[],"mappings":""}
|
|
@@ -44,7 +44,6 @@ export interface DocumentFrame {
|
|
|
44
44
|
name: string;
|
|
45
45
|
type: FrameTypeEnum;
|
|
46
46
|
blendMode: BlendMode;
|
|
47
|
-
constrainProportions: boolean;
|
|
48
47
|
}
|
|
49
48
|
export interface ImageFrame extends DocumentFrame {
|
|
50
49
|
src: ImageFrameUrlSource | ImageFrameConnectorSource | ImageFrameVariableSource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentTypes.js","sourceRoot":"","sources":["../../../src/types/DocumentTypes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DocumentTypes.js","sourceRoot":"","sources":["../../../src/types/DocumentTypes.ts"],"names":[],"mappings":"AAyEA,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC5B,mCAAW,CAAA;IACX,uDAA+B,CAAA;IAC/B,6CAAqB,CAAA;AACzB,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B;AA8CD,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC3B,kCAAW,CAAA;IACX,sCAAe,CAAA;AACnB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B;AA6DD,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;AACzB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontConnectorTypes.js","sourceRoot":"","sources":["../../../src/types/FontConnectorTypes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FontConnectorTypes.js","sourceRoot":"","sources":["../../../src/types/FontConnectorTypes.ts"],"names":[],"mappings":"AASA,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IACzB,sCAAiB,CAAA;IACjB,kCAAa,CAAA;AACjB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B"}
|
|
@@ -5,6 +5,8 @@ import { CornerRadiusAll, CornerRadiusNone, CornerRadiusOnly, ShapeType } from '
|
|
|
5
5
|
export declare type FrameLayoutType = {
|
|
6
6
|
id: Id;
|
|
7
7
|
layoutId: Id;
|
|
8
|
+
horizontal: FrameAnchor;
|
|
9
|
+
vertical: FrameAnchor;
|
|
8
10
|
x: PropertyState<number>;
|
|
9
11
|
y: PropertyState<number>;
|
|
10
12
|
width: PropertyState<number>;
|
|
@@ -26,8 +28,6 @@ export declare type FrameType = {
|
|
|
26
28
|
type: FrameTypeEnum;
|
|
27
29
|
imageUrl: string;
|
|
28
30
|
blendMode: string;
|
|
29
|
-
constrainProportions: boolean;
|
|
30
|
-
constrainProportionsReadOnly: boolean;
|
|
31
31
|
};
|
|
32
32
|
export declare type Frame = TextFrame | ImageFrame | ShapeFrame | BarcodeFrame;
|
|
33
33
|
export declare type ImageFrameVariableSource = {
|
|
@@ -50,8 +50,6 @@ export declare type ImageFrame = {
|
|
|
50
50
|
type: FrameTypeEnum.image;
|
|
51
51
|
src?: ImageFrameSource;
|
|
52
52
|
blendMode: BlendMode;
|
|
53
|
-
constrainProportions: boolean;
|
|
54
|
-
constrainProportionsReadOnly: boolean;
|
|
55
53
|
crop?: CropSettings | NoCropSettings;
|
|
56
54
|
};
|
|
57
55
|
export declare type ShapeFrame = {
|
|
@@ -59,8 +57,6 @@ export declare type ShapeFrame = {
|
|
|
59
57
|
name: string;
|
|
60
58
|
type: FrameTypeEnum.shape;
|
|
61
59
|
blendMode: BlendMode;
|
|
62
|
-
constrainProportions: boolean;
|
|
63
|
-
constrainProportionsReadOnly: boolean;
|
|
64
60
|
shapeProperties: {
|
|
65
61
|
enableFill: boolean;
|
|
66
62
|
fillColor: ColorUsage;
|
|
@@ -94,16 +90,12 @@ export declare type TextFrame = {
|
|
|
94
90
|
textStrokeColor: number;
|
|
95
91
|
hasClippingPath: boolean;
|
|
96
92
|
blendMode: BlendMode;
|
|
97
|
-
constrainProportions: boolean;
|
|
98
|
-
constrainProportionsReadOnly: boolean;
|
|
99
93
|
};
|
|
100
94
|
export declare type BarcodeFrame = {
|
|
101
95
|
id: Id;
|
|
102
96
|
name: string;
|
|
103
97
|
type: FrameTypeEnum.barcode;
|
|
104
98
|
blendMode: BlendMode;
|
|
105
|
-
constrainProportions: boolean;
|
|
106
|
-
constrainProportionsReadOnly: boolean;
|
|
107
99
|
barcodeProperties: {
|
|
108
100
|
enableBackground: boolean;
|
|
109
101
|
backgroundColor: ColorUsage;
|
|
@@ -241,3 +233,64 @@ export declare enum UpdateZIndexMethod {
|
|
|
241
233
|
bringForward = "bringForward",
|
|
242
234
|
sendBackward = "sendBackward"
|
|
243
235
|
}
|
|
236
|
+
export declare enum FrameAnchorType {
|
|
237
|
+
relative = "relative",
|
|
238
|
+
start = "start",
|
|
239
|
+
end = "end",
|
|
240
|
+
startAndEnd = "startAndEnd",
|
|
241
|
+
center = "center"
|
|
242
|
+
}
|
|
243
|
+
export declare enum AnchorTargetType {
|
|
244
|
+
page = "page",
|
|
245
|
+
frame = "frame"
|
|
246
|
+
}
|
|
247
|
+
export declare enum AnchorTargetEdgeType {
|
|
248
|
+
start = "start",
|
|
249
|
+
end = "end",
|
|
250
|
+
center = "center"
|
|
251
|
+
}
|
|
252
|
+
export declare class PageAnchorTarget {
|
|
253
|
+
type: AnchorTargetType;
|
|
254
|
+
}
|
|
255
|
+
export declare class FrameAnchorTarget {
|
|
256
|
+
frameId: Id;
|
|
257
|
+
edge: AnchorTargetEdgeType;
|
|
258
|
+
type: AnchorTargetType;
|
|
259
|
+
constructor(id: Id, edge: AnchorTargetEdgeType);
|
|
260
|
+
}
|
|
261
|
+
export declare type AnchorTarget = PageAnchorTarget | FrameAnchorTarget;
|
|
262
|
+
export declare type RelativeFrameAnchor = {
|
|
263
|
+
start: PropertyState<number>;
|
|
264
|
+
end: PropertyState<number>;
|
|
265
|
+
target: AnchorTarget;
|
|
266
|
+
type: FrameAnchorType.relative;
|
|
267
|
+
};
|
|
268
|
+
export declare type StartFrameAnchor = {
|
|
269
|
+
offset: PropertyState<number>;
|
|
270
|
+
target: AnchorTarget;
|
|
271
|
+
type: FrameAnchorType.start;
|
|
272
|
+
};
|
|
273
|
+
export declare type EndFrameAnchor = {
|
|
274
|
+
offset: PropertyState<number>;
|
|
275
|
+
target: AnchorTarget;
|
|
276
|
+
type: FrameAnchorType.end;
|
|
277
|
+
};
|
|
278
|
+
export declare type StartAndEndFrameAnchor = {
|
|
279
|
+
start: PropertyState<number>;
|
|
280
|
+
startTarget: AnchorTarget;
|
|
281
|
+
end: PropertyState<number>;
|
|
282
|
+
endTarget: AnchorTarget;
|
|
283
|
+
type: FrameAnchorType.startAndEnd;
|
|
284
|
+
};
|
|
285
|
+
export declare type CenterFrameAnchor = {
|
|
286
|
+
offset: PropertyState<number>;
|
|
287
|
+
target: AnchorTarget;
|
|
288
|
+
type: FrameAnchorType.center;
|
|
289
|
+
};
|
|
290
|
+
export declare type FrameAnchor = RelativeFrameAnchor | StartFrameAnchor | EndFrameAnchor | StartAndEndFrameAnchor | CenterFrameAnchor;
|
|
291
|
+
export declare type FrameAnchorProperties = {
|
|
292
|
+
horizontal: boolean;
|
|
293
|
+
type: FrameAnchorType;
|
|
294
|
+
target: AnchorTarget;
|
|
295
|
+
endTarget?: AnchorTarget | null;
|
|
296
|
+
};
|
|
@@ -73,4 +73,34 @@ export var UpdateZIndexMethod;
|
|
|
73
73
|
UpdateZIndexMethod["bringForward"] = "bringForward";
|
|
74
74
|
UpdateZIndexMethod["sendBackward"] = "sendBackward";
|
|
75
75
|
})(UpdateZIndexMethod || (UpdateZIndexMethod = {}));
|
|
76
|
+
export var FrameAnchorType;
|
|
77
|
+
(function (FrameAnchorType) {
|
|
78
|
+
FrameAnchorType["relative"] = "relative";
|
|
79
|
+
FrameAnchorType["start"] = "start";
|
|
80
|
+
FrameAnchorType["end"] = "end";
|
|
81
|
+
FrameAnchorType["startAndEnd"] = "startAndEnd";
|
|
82
|
+
FrameAnchorType["center"] = "center";
|
|
83
|
+
})(FrameAnchorType || (FrameAnchorType = {}));
|
|
84
|
+
export var AnchorTargetType;
|
|
85
|
+
(function (AnchorTargetType) {
|
|
86
|
+
AnchorTargetType["page"] = "page";
|
|
87
|
+
AnchorTargetType["frame"] = "frame";
|
|
88
|
+
})(AnchorTargetType || (AnchorTargetType = {}));
|
|
89
|
+
export var AnchorTargetEdgeType;
|
|
90
|
+
(function (AnchorTargetEdgeType) {
|
|
91
|
+
AnchorTargetEdgeType["start"] = "start";
|
|
92
|
+
AnchorTargetEdgeType["end"] = "end";
|
|
93
|
+
AnchorTargetEdgeType["center"] = "center";
|
|
94
|
+
})(AnchorTargetEdgeType || (AnchorTargetEdgeType = {}));
|
|
95
|
+
export class PageAnchorTarget {
|
|
96
|
+
constructor() {
|
|
97
|
+
this.type = AnchorTargetType.page;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
export class FrameAnchorTarget {
|
|
101
|
+
constructor(id, edge) {
|
|
102
|
+
this.type = AnchorTargetType.frame;
|
|
103
|
+
(this.frameId = id), (this.edge = edge);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
76
106
|
//# sourceMappingURL=FrameTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameTypes.js","sourceRoot":"","sources":["../../../src/types/FrameTypes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FrameTypes.js","sourceRoot":"","sources":["../../../src/types/FrameTypes.ts"],"names":[],"mappings":"AAkMA,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IACzB,gCAAW,CAAA;IACX,sCAAiB,CAAA;IACjB,kCAAa,CAAA;IACb,oCAAe,CAAA;AACnB,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAED,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC3B,kCAAW,CAAA;IACX,4CAAqB,CAAA;IACrB,8CAAuB,CAAA;AAC3B,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;AAED,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACrB,8BAAa,CAAA;IACb,gCAAe,CAAA;IACf,gCAAe,CAAA;IACf,oCAAmB,CAAA;AACvB,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAED,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC7B,8CAAqB,CAAA;IACrB,sCAAa,CAAA;AACjB,CAA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AK7B;AAED,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IACvB,wCAAqB,CAAA;IACrB,kCAAe,CAAA;IACf,8BAAW,CAAA;IACX,8CAA2B,CAAA;IAC3B,oCAAiB,CAAA;AACrB,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B;AAED,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,iCAAa,CAAA;IACb,mCAAe,CAAA;AACnB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAED,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC5B,uCAAe,CAAA;IACf,mCAAW,CAAA;IACX,yCAAiB,CAAA;AACrB,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B;AAED,MAAM,OAAO,gBAAgB;IAA7B;QACI,SAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC;IACjC,CAAC;CAAA;AAED,MAAM,OAAO,iBAAiB;IAK1B,YAAY,EAAM,EAAE,IAA0B;QAF9C,SAAI,GAAG,gBAAgB,CAAC,KAAK,CAAC;QAG1B,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IAC5C,CAAC;CACJ"}
|
|
@@ -76,6 +76,15 @@ export declare type BleedDeltaUpdate = {
|
|
|
76
76
|
bottom?: string;
|
|
77
77
|
areBleedValuesCombined?: boolean;
|
|
78
78
|
};
|
|
79
|
+
export declare type LayoutPreset = {
|
|
80
|
+
name: string;
|
|
81
|
+
intent: LayoutIntent;
|
|
82
|
+
unit: MeasurementUnit;
|
|
83
|
+
width: string;
|
|
84
|
+
height: string;
|
|
85
|
+
duration?: number;
|
|
86
|
+
bleed?: BleedDeltaUpdate;
|
|
87
|
+
};
|
|
79
88
|
export declare enum PositionEnum {
|
|
80
89
|
top = "top",
|
|
81
90
|
right = "right",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutTypes.js","sourceRoot":"","sources":["../../../src/types/LayoutTypes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LayoutTypes.js","sourceRoot":"","sources":["../../../src/types/LayoutTypes.ts"],"names":[],"mappings":"AA0FA,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACpB,2BAAW,CAAA;IACX,+BAAe,CAAA;IACf,iCAAiB,CAAA;IACjB,6BAAa,CAAA;AACjB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAED,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,yBAAW,CAAA;IACX,6BAAe,CAAA;AACnB,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB;AAED,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IACvB,4BAAS,CAAA;IACT,4BAAS,CAAA;IACT,4BAAS,CAAA;IACT,gCAAa,CAAA;IACb,4BAAS,CAAA;AACb,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B;AAED,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,+BAAe,CAAA;IACf,+CAA+B,CAAA;IAC/B,mDAAmC,CAAA;AACvC,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { Id } from './CommonTypes';
|
|
2
2
|
import { MediaType } from './ConnectorTypes';
|
|
3
|
+
export declare type MediaConnectorCapabilities = {
|
|
4
|
+
query: boolean;
|
|
5
|
+
detail: boolean;
|
|
6
|
+
filtering: boolean;
|
|
7
|
+
metadata?: boolean;
|
|
8
|
+
};
|
|
3
9
|
export declare enum MediaDownloadType {
|
|
4
10
|
thumbnail = "thumbnail",
|
|
5
11
|
mediumres = "mediumres",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaConnectorTypes.js","sourceRoot":"","sources":["../../../src/types/MediaConnectorTypes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MediaConnectorTypes.js","sourceRoot":"","sources":["../../../src/types/MediaConnectorTypes.ts"],"names":[],"mappings":"AAUA,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IACzB,4CAAuB,CAAA;IACvB,4CAAuB,CAAA;IACvB,wCAAmB,CAAA;IACnB,0CAAqB,CAAA;AACzB,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAED,MAAM,CAAN,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC3B,kCAAW,CAAA;AACf,CAAC,EAFW,mBAAmB,KAAnB,mBAAmB,QAE9B"}
|
|
@@ -42,7 +42,9 @@ export interface Variable {
|
|
|
42
42
|
occurrences: number;
|
|
43
43
|
placeholder?: string | null;
|
|
44
44
|
helpText?: string | null;
|
|
45
|
+
privateData: PrivateData;
|
|
45
46
|
}
|
|
47
|
+
export declare type PrivateData = Record<string, string>;
|
|
46
48
|
export interface ImageVariable extends Variable {
|
|
47
49
|
value?: ConnectorImageVariableSource;
|
|
48
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VariableTypes.js","sourceRoot":"","sources":["../../../src/types/VariableTypes.ts"],"names":[],"mappings":"AAwBA,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACpB,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IACf,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf,iCAAiB,CAAA;IACjB,6BAAa,CAAA;AACjB,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB;
|
|
1
|
+
{"version":3,"file":"VariableTypes.js","sourceRoot":"","sources":["../../../src/types/VariableTypes.ts"],"names":[],"mappings":"AAwBA,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACpB,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IACf,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf,iCAAiB,CAAA;IACjB,6BAAa,CAAA;AACjB,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB;AA2FD,MAAM,CAAN,IAAY,GAQX;AARD,WAAY,GAAG;IACX,wBAAiB,CAAA;IACjB,0BAAmB,CAAA;IACnB,8BAAuB,CAAA;IACvB,4BAAqB,CAAA;IACrB,wBAAiB,CAAA;IACjB,4BAAqB,CAAA;IACrB,wBAAiB,CAAA;AACrB,CAAC,EARW,GAAG,KAAH,GAAG,QAQd;AAED,MAAM,CAAN,IAAY,MAcX;AAdD,WAAY,MAAM;IACd,yBAAe,CAAA;IACf,mBAAS,CAAA;IACT,mBAAS,CAAA;IACT,mBAAS,CAAA;IACT,mBAAS,CAAA;IACT,mBAAS,CAAA;IACT,mBAAS,CAAA;IACT,mBAAS,CAAA;IACT,mBAAS,CAAA;IACT,mBAAS,CAAA;IACT,yBAAe,CAAA;IACf,yBAAe,CAAA;IACf,mBAAS,CAAA;AACb,CAAC,EAdW,MAAM,KAAN,MAAM,QAcjB"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import type { EditorResponse } from '../types/CommonTypes';
|
|
2
2
|
export declare function getEditorResponseData<T>(response: EditorResponse<unknown>, parse?: boolean): EditorResponse<T>;
|
|
3
3
|
export declare function castToEditorResponse(toCast: unknown): EditorResponse<unknown>;
|
|
4
|
+
export declare class ConnectorHttpError extends Error {
|
|
5
|
+
statusCode: number;
|
|
6
|
+
constructor(statusCode: number, message?: string, options?: ErrorOptions);
|
|
7
|
+
}
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
+
// This is an error code from the engine exception table, do not change
|
|
2
|
+
const connectorHttpErrorErrorCode = 404075;
|
|
1
3
|
export function getEditorResponseData(response, parse = true) {
|
|
2
4
|
var _a, _b;
|
|
3
5
|
try {
|
|
4
6
|
if (!response.success) {
|
|
5
|
-
|
|
7
|
+
const parsedError = (_a = response.error) !== null && _a !== void 0 ? _a : 'Yikes, something went wrong';
|
|
8
|
+
const parsedCause = {
|
|
6
9
|
cause: {
|
|
7
10
|
name: String(response.status),
|
|
8
11
|
message: (_b = response.error) !== null && _b !== void 0 ? _b : 'Yikes, something went wrong',
|
|
9
12
|
},
|
|
10
|
-
}
|
|
13
|
+
};
|
|
14
|
+
if (response.status === connectorHttpErrorErrorCode) {
|
|
15
|
+
const parsedErrorData = JSON.parse(response.data);
|
|
16
|
+
const httpStatusCode = parsedErrorData['statusCode'];
|
|
17
|
+
throw new ConnectorHttpError(httpStatusCode, parsedError, parsedCause);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
throw new Error(parsedError, parsedCause);
|
|
21
|
+
}
|
|
11
22
|
}
|
|
12
23
|
const dataShouldBeParsed = response.data && parse;
|
|
13
24
|
return Object.assign(Object.assign({}, response), { parsedData: dataShouldBeParsed
|
|
@@ -28,4 +39,10 @@ export function castToEditorResponse(toCast) {
|
|
|
28
39
|
data: JSON.stringify(toCast),
|
|
29
40
|
};
|
|
30
41
|
}
|
|
42
|
+
export class ConnectorHttpError extends Error {
|
|
43
|
+
constructor(statusCode, message, options) {
|
|
44
|
+
super(message, options);
|
|
45
|
+
this.statusCode = statusCode;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
31
48
|
//# sourceMappingURL=EditorResponseData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorResponseData.js","sourceRoot":"","sources":["../../../src/utils/EditorResponseData.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qBAAqB,CAAI,QAAiC,EAAE,KAAK,GAAG,IAAI;;IACpF,IAAI;QACA,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;YACnB,MAAM,
|
|
1
|
+
{"version":3,"file":"EditorResponseData.js","sourceRoot":"","sources":["../../../src/utils/EditorResponseData.ts"],"names":[],"mappings":"AAEA,uEAAuE;AACvE,MAAM,2BAA2B,GAAG,MAAM,CAAC;AAE3C,MAAM,UAAU,qBAAqB,CAAI,QAAiC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