@widgetic/editor 4.1.18 → 4.1.20
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/dist/components/WidgetPreview.svelte +77 -14
- package/dist/components/editors/CompositionEditorApp.svelte +71 -35
- package/dist/components/editors/CompositionEditorApp.svelte.d.ts +3 -1
- package/dist/components/editors/ContentTabBulkDrop.svelte +268 -0
- package/dist/components/editors/ContentTabBulkDrop.svelte.d.ts +37 -0
- package/dist/components/editors/EmbedAssistantPanel.svelte +303 -0
- package/dist/components/editors/EmbedAssistantPanel.svelte.d.ts +29 -0
- package/dist/components/editors/EmbedEditor.svelte +221 -15
- package/dist/components/editors/EmbedEditor.svelte.d.ts +31 -3
- package/dist/components/editors/PropsEditor.svelte +223 -30
- package/dist/components/editors/PropsEditor.svelte.d.ts +11 -0
- package/dist/components/editors/propsEditorContentStateFlatten.d.ts +12 -0
- package/dist/components/editors/propsEditorContentStateFlatten.js +40 -0
- package/dist/components/ic/BrowserInputController.svelte +184 -21
- package/dist/components/ic/BrowserInputController.svelte.d.ts +2 -0
- package/dist/components/ic/CheckboxInputController.svelte +11 -0
- package/dist/components/ic/ColorPickerInputController.svelte +2 -1
- package/dist/components/ic/DatePickerInputController.svelte +5 -3
- package/dist/components/ic/FontInputController.svelte +9 -4
- package/dist/components/ic/InputControllerHeader.svelte +4 -3
- package/dist/components/ic/KnowledgeDocumentsInputController.svelte +13 -0
- package/dist/components/ic/NumberControls.svelte +140 -17
- package/dist/components/ic/RadioGroupInputController.svelte +11 -0
- package/dist/components/ic/RangeCalendarInputController.svelte +38 -13
- package/dist/components/ic/TextAreaInputController.svelte +593 -321
- package/dist/components/ic/TextAreaPreviewInputController.svelte +46 -58
- package/dist/components/ic/VectorInputController.svelte +0 -1
- package/dist/components/ic/numberControlsValueArea.d.ts +29 -0
- package/dist/components/ic/numberControlsValueArea.js +51 -0
- package/dist/components/ic/optionGroupCardPointerDown.d.ts +9 -0
- package/dist/components/ic/optionGroupCardPointerDown.js +20 -0
- package/dist/components/ic/shared/EditorFileBrowserOverlay.svelte +48 -6
- package/dist/components/ic/shared/EditorFileBrowserOverlay.svelte.d.ts +4 -1
- package/dist/components/ic/shared/EditorSelectedFilePreviewOverlay.svelte +34 -0
- package/dist/components/ic/shared/EditorSelectedFilePreviewOverlay.svelte.d.ts +24 -0
- package/dist/components/ic/shared/fileBrowserOverlayEscape.d.ts +29 -0
- package/dist/components/ic/shared/fileBrowserOverlayEscape.js +21 -0
- package/dist/composition/compositionApi.d.ts +16 -0
- package/dist/composition/compositionApi.js +16 -1
- package/dist/composition/compositionEditorController.d.ts +46 -0
- package/dist/composition/compositionEditorController.js +277 -5
- package/dist/composition/compositionEditorSchemaCache.d.ts +35 -0
- package/dist/composition/compositionEditorSchemaCache.js +82 -0
- package/dist/contentBulkDrop/applyContentPlan.d.ts +18 -0
- package/dist/contentBulkDrop/applyContentPlan.js +55 -0
- package/dist/contentBulkDrop/bulkDropSummary.d.ts +4 -0
- package/dist/contentBulkDrop/bulkDropSummary.js +12 -0
- package/dist/contentBulkDrop/dragIntent.d.ts +7 -0
- package/dist/contentBulkDrop/dragIntent.js +24 -0
- package/dist/contentBulkDrop/filterDropFiles.d.ts +2 -0
- package/dist/contentBulkDrop/filterDropFiles.js +21 -0
- package/dist/contentBulkDrop/formatFileSize.d.ts +2 -0
- package/dist/contentBulkDrop/formatFileSize.js +13 -0
- package/dist/contentBulkDrop/types.d.ts +34 -0
- package/dist/contentBulkDrop/types.js +1 -0
- package/dist/contentBulkDrop/uploadQueue.d.ts +41 -0
- package/dist/contentBulkDrop/uploadQueue.js +114 -0
- package/dist/drafts/compositionDraft.d.ts +65 -0
- package/dist/drafts/compositionDraft.js +136 -0
- package/dist/drafts/compositionEditorViewState.d.ts +9 -0
- package/dist/drafts/compositionEditorViewState.js +33 -0
- package/dist/drafts/draftJournal.d.ts +59 -0
- package/dist/drafts/draftJournal.js +261 -0
- package/dist/embed/__fixtures__/gatewayGeneratedEmbedCodes.json +25 -0
- package/dist/embed/__fixtures__/generatedEmbedCodes.json +320 -0
- package/dist/embed/embedSchema.json +409 -0
- package/dist/embed/parseCompositionEmbedCode.d.ts +21 -0
- package/dist/embed/parseCompositionEmbedCode.js +379 -0
- package/dist/embedAssistant/embedAssistantEvents.d.ts +22 -0
- package/dist/embedAssistant/embedAssistantEvents.js +39 -0
- package/dist/embedAssistant/embedAssistantStream.d.ts +30 -0
- package/dist/embedAssistant/embedAssistantStream.js +125 -0
- package/dist/embedAssistant/highlightTiming.d.ts +1 -0
- package/dist/embedAssistant/highlightTiming.js +6 -0
- package/dist/embedAssistant/types.d.ts +27 -0
- package/dist/embedAssistant/types.js +1 -0
- package/dist/i18n/labels.js +8 -4
- package/dist/i18n/language.d.ts +38 -2
- package/dist/i18n/messages.d.ts +38 -1
- package/dist/i18n/messages.js +40 -1
- package/dist/i18n/translate.d.ts +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -0
- package/dist/utils/FontManager.d.ts +2 -0
- package/dist/utils/FontManager.js +16 -1
- package/dist/utils/isEditableEventTarget.d.ts +5 -0
- package/dist/utils/isEditableEventTarget.js +25 -0
- package/dist/utils/linkUrlValidation.d.ts +17 -0
- package/dist/utils/linkUrlValidation.js +120 -0
- package/dist/utils/mediaFileValue.d.ts +12 -0
- package/dist/utils/mediaFileValue.js +24 -0
- package/dist/utils/placeRichTextCaretAtDocumentEnd.d.ts +11 -0
- package/dist/utils/placeRichTextCaretAtDocumentEnd.js +26 -0
- package/package.json +7 -7
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "embedding-options-schema-001",
|
|
3
|
+
"name": "Embedding Options Schema",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"componentGroups": [
|
|
6
|
+
{
|
|
7
|
+
"name": "Embed Composition",
|
|
8
|
+
"components": [
|
|
9
|
+
{
|
|
10
|
+
"id": "embed-options",
|
|
11
|
+
"type": "embedOptions",
|
|
12
|
+
"propertyGroups": [
|
|
13
|
+
{
|
|
14
|
+
"name": "Basic options",
|
|
15
|
+
"properties": [
|
|
16
|
+
{
|
|
17
|
+
"name": "useIframe",
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"defaultValue": false,
|
|
20
|
+
"inputController": {
|
|
21
|
+
"type": "switch",
|
|
22
|
+
"helpText": "Embed as an isolated <iframe>. Simplest and safest, but the widget cannot autoscale or listen to page events. Turn this off to use the Widgetic SDK snippet.",
|
|
23
|
+
"description": "Use iframe"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "resizeMode",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"defaultValue": "fillWidth",
|
|
30
|
+
"inputController": {
|
|
31
|
+
"type": "dropdown",
|
|
32
|
+
"helpText": "Choose how the widget should be resized",
|
|
33
|
+
"description": "Resize mode",
|
|
34
|
+
"options": [
|
|
35
|
+
{
|
|
36
|
+
"label": "Fill width",
|
|
37
|
+
"value": "fillWidth"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"label": "Fixed",
|
|
41
|
+
"value": "fixed"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"label": "Responsive",
|
|
45
|
+
"value": "responsive"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"label": "Custom",
|
|
49
|
+
"value": "custom"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"visibilityCondition": {
|
|
54
|
+
"dependsOn": "useIframe",
|
|
55
|
+
"condition": "useIframe === false"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "width",
|
|
60
|
+
"type": "number",
|
|
61
|
+
"defaultValue": 405,
|
|
62
|
+
"inputController": {
|
|
63
|
+
"type": "number",
|
|
64
|
+
"helpText": "Set the width of the widget in pixels",
|
|
65
|
+
"description": "Width",
|
|
66
|
+
"config": {
|
|
67
|
+
"min": 50,
|
|
68
|
+
"max": 4096,
|
|
69
|
+
"step": 1
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"visibilityCondition": {
|
|
73
|
+
"dependsOn": [
|
|
74
|
+
"useIframe",
|
|
75
|
+
"resizeMode"
|
|
76
|
+
],
|
|
77
|
+
"condition": "useIframe === true || resizeMode === 'custom' || resizeMode === 'fixed'"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "height",
|
|
82
|
+
"type": "number",
|
|
83
|
+
"defaultValue": 300,
|
|
84
|
+
"inputController": {
|
|
85
|
+
"type": "number",
|
|
86
|
+
"helpText": "Set the height of the widget in pixels",
|
|
87
|
+
"description": "Height",
|
|
88
|
+
"config": {
|
|
89
|
+
"min": 50,
|
|
90
|
+
"max": 4096,
|
|
91
|
+
"step": 1
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "responsive",
|
|
97
|
+
"type": "number",
|
|
98
|
+
"defaultValue": 480,
|
|
99
|
+
"inputController": {
|
|
100
|
+
"type": "number",
|
|
101
|
+
"helpText": "Below this viewport width the widget switches to the adaptive layout",
|
|
102
|
+
"description": "Adaptive width",
|
|
103
|
+
"config": {
|
|
104
|
+
"min": 0,
|
|
105
|
+
"max": 4096,
|
|
106
|
+
"step": 1
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"visibilityCondition": {
|
|
110
|
+
"dependsOn": [
|
|
111
|
+
"useIframe",
|
|
112
|
+
"resizeMode"
|
|
113
|
+
],
|
|
114
|
+
"condition": "useIframe === false && resizeMode === 'responsive'"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "autoscale",
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"defaultValue": true,
|
|
121
|
+
"inputController": {
|
|
122
|
+
"type": "switch",
|
|
123
|
+
"helpText": "Let the widget report its real height to the page so its container never clips or scrolls",
|
|
124
|
+
"description": "Autoscale"
|
|
125
|
+
},
|
|
126
|
+
"visibilityCondition": {
|
|
127
|
+
"dependsOn": "useIframe",
|
|
128
|
+
"condition": "useIframe === false"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "Advanced settings",
|
|
135
|
+
"properties": [
|
|
136
|
+
{
|
|
137
|
+
"name": "embedTarget",
|
|
138
|
+
"type": "string",
|
|
139
|
+
"defaultValue": "overlay",
|
|
140
|
+
"inputController": {
|
|
141
|
+
"type": "dropdown",
|
|
142
|
+
"helpText": "Choose the embed target",
|
|
143
|
+
"description": "Embed target",
|
|
144
|
+
"options": [
|
|
145
|
+
{
|
|
146
|
+
"label": "Inline",
|
|
147
|
+
"value": "site"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"label": "Overlay",
|
|
151
|
+
"value": "overlay"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"label": "Mixed",
|
|
155
|
+
"value": "mixed"
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "overlayPosition",
|
|
162
|
+
"type": "string",
|
|
163
|
+
"defaultValue": "center-center",
|
|
164
|
+
"inputController": {
|
|
165
|
+
"type": "fixedposition",
|
|
166
|
+
"helpText": "Set the overlay position",
|
|
167
|
+
"description": "Overlay position"
|
|
168
|
+
},
|
|
169
|
+
"visibilityCondition": {
|
|
170
|
+
"dependsOn": "embedTarget",
|
|
171
|
+
"condition": "embedTarget === 'overlay' || embedTarget === 'mixed'"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "eventTriggers",
|
|
176
|
+
"type": "string",
|
|
177
|
+
"defaultValue": "exitIntent",
|
|
178
|
+
"inputController": {
|
|
179
|
+
"type": "dropdown",
|
|
180
|
+
"helpText": "Choose the event trigger",
|
|
181
|
+
"description": "Event triggers",
|
|
182
|
+
"options": [
|
|
183
|
+
{
|
|
184
|
+
"label": "Exit intent",
|
|
185
|
+
"value": "exitIntent"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"label": "Page load",
|
|
189
|
+
"value": "pageLoad"
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
"visibilityCondition": {
|
|
194
|
+
"dependsOn": "embedTarget",
|
|
195
|
+
"condition": "embedTarget === 'overlay'"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "restrictions",
|
|
200
|
+
"type": "boolean",
|
|
201
|
+
"defaultValue": false,
|
|
202
|
+
"inputController": {
|
|
203
|
+
"type": "switch",
|
|
204
|
+
"helpText": "Enable restrictions",
|
|
205
|
+
"description": "Restrictions"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"name": "maxViews",
|
|
210
|
+
"type": "number",
|
|
211
|
+
"defaultValue": 10,
|
|
212
|
+
"inputController": {
|
|
213
|
+
"type": "number",
|
|
214
|
+
"helpText": "Set the maximum number of views",
|
|
215
|
+
"description": "Max # of views",
|
|
216
|
+
"config": {
|
|
217
|
+
"min": 1,
|
|
218
|
+
"max": 100000,
|
|
219
|
+
"step": 1
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"visibilityCondition": {
|
|
223
|
+
"dependsOn": "restrictions",
|
|
224
|
+
"condition": "restrictions === true"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"name": "timePeriod",
|
|
229
|
+
"type": "number",
|
|
230
|
+
"defaultValue": 120,
|
|
231
|
+
"inputController": {
|
|
232
|
+
"type": "number",
|
|
233
|
+
"helpText": "Set the time period in hours",
|
|
234
|
+
"description": "Time period",
|
|
235
|
+
"config": {
|
|
236
|
+
"min": 1,
|
|
237
|
+
"max": 8760,
|
|
238
|
+
"step": 1
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"visibilityCondition": {
|
|
242
|
+
"dependsOn": "restrictions",
|
|
243
|
+
"condition": "restrictions === true"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "displayOnMobile",
|
|
248
|
+
"type": "boolean",
|
|
249
|
+
"defaultValue": true,
|
|
250
|
+
"inputController": {
|
|
251
|
+
"type": "switch",
|
|
252
|
+
"helpText": "Display on mobile devices",
|
|
253
|
+
"description": "Display on mobile"
|
|
254
|
+
},
|
|
255
|
+
"visibilityCondition": {
|
|
256
|
+
"dependsOn": "restrictions",
|
|
257
|
+
"condition": "restrictions === true"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "displayOnDesktop",
|
|
262
|
+
"type": "boolean",
|
|
263
|
+
"defaultValue": true,
|
|
264
|
+
"inputController": {
|
|
265
|
+
"type": "switch",
|
|
266
|
+
"helpText": "Display on desktop devices",
|
|
267
|
+
"description": "Display on desktop"
|
|
268
|
+
},
|
|
269
|
+
"visibilityCondition": {
|
|
270
|
+
"dependsOn": "restrictions",
|
|
271
|
+
"condition": "restrictions === true"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "keepDimensions",
|
|
276
|
+
"type": "boolean",
|
|
277
|
+
"defaultValue": true,
|
|
278
|
+
"inputController": {
|
|
279
|
+
"type": "switch",
|
|
280
|
+
"helpText": "Keep width, height, resize the same",
|
|
281
|
+
"description": "Keep dimensions"
|
|
282
|
+
},
|
|
283
|
+
"visibilityCondition": {
|
|
284
|
+
"dependsOn": "embedTarget",
|
|
285
|
+
"condition": "embedTarget === 'mixed'"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"name": "overlayResizeMode",
|
|
290
|
+
"type": "string",
|
|
291
|
+
"defaultValue": "fillWidth",
|
|
292
|
+
"inputController": {
|
|
293
|
+
"type": "dropdown",
|
|
294
|
+
"helpText": "Choose how the overlay widget should be resized",
|
|
295
|
+
"description": "Overlay resize mode",
|
|
296
|
+
"options": [
|
|
297
|
+
{
|
|
298
|
+
"label": "Fill width",
|
|
299
|
+
"value": "fillWidth"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"label": "Fill height",
|
|
303
|
+
"value": "fillHeight"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"label": "Fixed size",
|
|
307
|
+
"value": "fixedSize"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"label": "Fixed height",
|
|
311
|
+
"value": "fixedHeight"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"label": "Fixed width",
|
|
315
|
+
"value": "fixedWidth"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"label": "Allow scale down",
|
|
319
|
+
"value": "allowScaleDown"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"label": "Fill",
|
|
323
|
+
"value": "fill"
|
|
324
|
+
}
|
|
325
|
+
]
|
|
326
|
+
},
|
|
327
|
+
"visibilityCondition": {
|
|
328
|
+
"dependsOn": ["embedTarget", "keepDimensions"],
|
|
329
|
+
"condition": "embedTarget === 'mixed' && keepDimensions === false"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"name": "overlayWidth",
|
|
334
|
+
"type": "number",
|
|
335
|
+
"defaultValue": 405,
|
|
336
|
+
"inputController": {
|
|
337
|
+
"type": "number",
|
|
338
|
+
"helpText": "Set the width of the overlay widget in pixels",
|
|
339
|
+
"description": "Overlay width",
|
|
340
|
+
"config": {
|
|
341
|
+
"min": 50,
|
|
342
|
+
"max": 4096,
|
|
343
|
+
"step": 1
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"visibilityCondition": {
|
|
347
|
+
"dependsOn": ["embedTarget", "keepDimensions", "overlayResizeMode"],
|
|
348
|
+
"condition": "embedTarget === 'mixed' && keepDimensions === false && (overlayResizeMode === 'fixedSize' || overlayResizeMode === 'fixedWidth' || overlayResizeMode === 'allowScaleDown')"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"name": "overlayHeight",
|
|
353
|
+
"type": "number",
|
|
354
|
+
"defaultValue": 300,
|
|
355
|
+
"inputController": {
|
|
356
|
+
"type": "number",
|
|
357
|
+
"helpText": "Set the height of the overlay widget in pixels",
|
|
358
|
+
"description": "Overlay height",
|
|
359
|
+
"config": {
|
|
360
|
+
"min": 50,
|
|
361
|
+
"max": 4096,
|
|
362
|
+
"step": 1
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
"visibilityCondition": {
|
|
366
|
+
"dependsOn": ["embedTarget", "keepDimensions", "overlayResizeMode"],
|
|
367
|
+
"condition": "embedTarget === 'mixed' && keepDimensions === false && (overlayResizeMode === 'fixedSize' || overlayResizeMode === 'fixedHeight' || overlayResizeMode === 'allowScaleDown')"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"name": "addBackgroundColor",
|
|
372
|
+
"type": "boolean",
|
|
373
|
+
"defaultValue": false,
|
|
374
|
+
"inputController": {
|
|
375
|
+
"type": "switch",
|
|
376
|
+
"helpText": "Add a background color to the overlay. It will prevent click-through.",
|
|
377
|
+
"description": "Add background"
|
|
378
|
+
},
|
|
379
|
+
"visibilityCondition": {
|
|
380
|
+
"dependsOn": "embedTarget",
|
|
381
|
+
"condition": "embedTarget === 'overlay'"
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"name": "overlayBackgroundColor",
|
|
386
|
+
"type": "string",
|
|
387
|
+
"defaultValue": "#000000",
|
|
388
|
+
"inputController": {
|
|
389
|
+
"type": "colorPicker",
|
|
390
|
+
"helpText": "Set the color of the overlay background",
|
|
391
|
+
"description": "Overlay color",
|
|
392
|
+
"config": {
|
|
393
|
+
"showOpacityControls": true,
|
|
394
|
+
"defaultTransparency": 50
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"visibilityCondition": {
|
|
398
|
+
"dependsOn": "addBackgroundColor",
|
|
399
|
+
"condition": "addBackgroundColor === true"
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
]
|
|
403
|
+
}
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
]
|
|
407
|
+
}
|
|
408
|
+
]
|
|
409
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses a paste-ready Widgetic composition embed snippet into embed editor settings.
|
|
3
|
+
* Accepts only output from the site `generateCompositionEmbedCode` and the gateway HTML embed generator.
|
|
4
|
+
*/
|
|
5
|
+
export type ParseCompositionEmbedCodeFailureReason = 'empty' | 'not_widgetic' | 'missing_composition' | 'too_large';
|
|
6
|
+
export type ParseCompositionEmbedCodeResult = {
|
|
7
|
+
ok: true;
|
|
8
|
+
compositionId: string;
|
|
9
|
+
settings: Record<string, unknown>;
|
|
10
|
+
ignored: string[];
|
|
11
|
+
} | {
|
|
12
|
+
ok: false;
|
|
13
|
+
reason: ParseCompositionEmbedCodeFailureReason;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Parse a Widgetic embed snippet pasted from another composition. The returned composition id is informational only and
|
|
17
|
+
* must never replace the composition being edited.
|
|
18
|
+
*/
|
|
19
|
+
export declare function parseCompositionEmbedCode(text: string): ParseCompositionEmbedCodeResult;
|
|
20
|
+
/** Normalise settings for fixture comparison (sorted keys, finite numbers). */
|
|
21
|
+
export declare function normalizeParsedEmbedSettings(settings: Record<string, unknown>): Record<string, unknown>;
|