@cesdk/cesdk-js 1.5.1 → 1.6.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/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- /** A11 Settings
2
- *
1
+ /**
2
+ * A11 Settings
3
+ * @public
3
4
  */
4
5
  declare type A11y = {
5
6
  /**
@@ -14,13 +15,11 @@ export declare class API {
14
15
  scene: SceneAPI;
15
16
  event: EventAPI;
16
17
  variable: VariableAPI;
18
+ editor: EditorAPI;
17
19
  }
18
20
 
19
- declare type Asset = {
20
- src: string;
21
- };
22
-
23
- declare interface AssetElement {
21
+ /** @public */
22
+ export declare interface _AssetElement {
24
23
  id: string;
25
24
  name: string;
26
25
  uri: string;
@@ -29,80 +28,54 @@ declare interface AssetElement {
29
28
 
30
29
  /**
31
30
  * Single asset result of a query from the engine.
31
+ * @public
32
32
  */
33
33
  declare interface AssetResult {
34
- /**
35
- * A unique id of this asset
36
- */
34
+ /** A unique id of this asset */
37
35
  id: string;
38
- /**
39
- * E.g. `ly.img.image`
40
- */
36
+ /** E.g. `ly.img.image` */
41
37
  type: string;
42
- /**
43
- * URI to a thumbnail of the asset used e.g. in the content library UI
44
- */
38
+ /** URI to a thumbnail of the asset used e.g. in the content library UI */
45
39
  thumbUri: string;
46
- /**
47
- * Original size of the asset.
48
- */
40
+ /** Original size of the asset. */
49
41
  size: {
50
42
  width: number;
51
43
  height: number;
52
44
  };
53
- /**
54
- * Asset-specific and custom meta information
55
- */
45
+ /** Asset-specific and custom meta information */
56
46
  meta?: {
57
47
  uri?: string;
58
48
  filename?: string;
59
49
  } & Record<string, unknown>;
60
- /**
61
- * The locale of the label and tags
62
- */
50
+ /** The locale of the label and tags */
63
51
  locale?: string;
64
- /**
65
- * The label of the result. Used for description and tooltips.
66
- */
52
+ /** The label of the result. Used for description and tooltips. */
67
53
  label?: string;
68
- /**
69
- * The tags of this asset. Used for filtering and free-text searching.
70
- */
54
+ /** The tags of this asset. Used for filtering and free-text searching. */
71
55
  tags?: string[];
72
56
  context: {
73
57
  sourceId: string;
74
58
  };
75
- /**
76
- * Credits for the artist of the asset
77
- */
59
+ /** Credits for the artist of the asset */
78
60
  credits?: {
79
61
  name: string;
80
62
  url?: string;
81
63
  };
82
- /**
83
- * License for this asset. Overwrites the source license if present
84
- */
64
+ /** License for this asset. Overwrites the source license if present */
85
65
  license?: {
86
66
  name: string;
87
67
  url?: string;
88
68
  };
89
69
  }
90
70
 
91
- declare type Assets = {
92
- [id: string]: Asset;
93
- };
94
-
95
71
  /**
96
72
  * API to query for assets
73
+ * @public
97
74
  */
98
75
  declare interface AssetSource {
99
- /**
100
- * The asset types returned by this source. Will default to ['ly.img.image'].
101
- */
76
+ /** The asset types returned by this source. Will default to ['ly.img.image']. */
102
77
  types?: string[];
103
- /**
104
- * Find all asset for the given type and the provided query data.
105
- */
78
+ /** Find all asset for the given type and the provided query data. */
106
79
  findAssets(type: string, queryData?: QueryData): Promise<AssetsQueryResult | undefined>;
107
80
  /**
108
81
  * Indicates if the asset shall be downloaded to handle the raw data instead
@@ -112,48 +85,59 @@ declare interface AssetSource {
112
85
  * re-uploading the assets.
113
86
  */
114
87
  downloadAssets?: (asset: AssetResult) => Promise<Blob>;
115
- /**
116
- * Credits for the source/api
117
- */
88
+ /** Credits for the source/api */
118
89
  credits?: {
119
90
  name: string;
120
91
  url?: string;
121
92
  };
122
- /**
123
- * General license for all asset from this source
124
- */
93
+ /** General license for all asset from this source */
125
94
  license?: {
126
95
  name: string;
127
96
  url?: string;
128
97
  };
129
98
  }
130
99
 
100
+ /** @public */
131
101
  declare type AssetSources = {
132
102
  [id: string]: AssetSource;
133
103
  };
134
104
 
135
105
  /**
136
106
  * Return type of a `findAssets` query.
107
+ * @public
137
108
  */
138
109
  declare interface AssetsQueryResult {
139
- /**
140
- * The assets in the requested page
141
- */
110
+ /** The assets in the requested page */
142
111
  assets: AssetResult[];
143
- /**
144
- * The current, requested page
145
- */
112
+ /** The current, requested page */
146
113
  currentPage: number;
114
+ /** The next page to query if it exists */
115
+ nextPage?: number;
116
+ /** How many assets are there in total for the current query regardless of the page */
117
+ total: number;
118
+ }
119
+
120
+ /**
121
+ * Bleed margin configuration options for a single design unit type.
122
+ */
123
+ declare interface BleedMarginOptions {
147
124
  /**
148
- * The next page to query if it exists
125
+ * The bleed margin options that can be selected from a dropdown in the UI.
126
+ * Other bleed margin values can be entered directly using the input field.
149
127
  */
150
- nextPage: number | undefined;
128
+ dropdownOptions: number[];
151
129
  /**
152
- * How many assets are there in total for the current query regardless of the page
130
+ * The default bleed margin value.
153
131
  */
154
- total: number;
132
+ defaultBleedMargin: number;
155
133
  }
156
134
 
135
+ /**
136
+ * @public
137
+ */
138
+ export declare type BlendMode = 'PassThrough' | 'Normal' | 'Darken' | 'Multiply' | 'ColorBurn' | 'Lighten' | 'Screen' | 'ColorDodge' | 'Overlay' | 'SoftLight' | 'HardLight' | 'Difference' | 'Exclusion' | 'Hue' | 'Saturation' | 'Color' | 'Luminosity';
139
+
140
+ /** @public */
157
141
  declare type Block = number;
158
142
 
159
143
  /**
@@ -169,305 +153,323 @@ export declare class BlockAPI {
169
153
  * @param mimeType - The mime type of the output file.
170
154
  * @returns A promise that resolves with the exported image or is rejected with an error.
171
155
  */
172
- export(handle: DesignElementId, mimeType?: MimeType_2): Promise<Blob>;
156
+ export(handle: DesignBlockId, mimeType?: MimeType_2): Promise<Blob>;
157
+
173
158
  /**
174
159
  * Loads existing blocks from the given string.
175
160
  * The blocks are not attached by default and won't be visible until attached to a page or the scene.
176
161
  * @param content - A string representing the given blocks.
177
162
  * @returns A promise that resolves with a list of handles representing the found blocks or an error.
178
163
  */
179
- loadFromString(content: string): Promise<DesignElementId[]>;
164
+ loadFromString(content: string): Promise<DesignBlockId[]>;
180
165
  /**
181
166
  * Saves the given blocks into a string. If given the root of a block hierarchy, e.g. a
182
167
  * page with multiple children, the entire hierarchy is saved.
183
168
  * @param blocks - The blocks to save
184
169
  * @returns A promise that resolves to a string representing the blocks or an error.
185
170
  */
186
- saveToString(blocks: DesignElementId[]): Promise<string>;
171
+ saveToString(blocks: DesignBlockId[]): Promise<string>;
187
172
  /**
188
173
  * Create a new block, fails if type is unknown.
189
174
  * @param type - The type of the block that shall be created.
190
175
  * @returns The created blocks handle.
191
176
  */
192
- create(type: DesignBlockType): DesignElementId;
193
- /**
177
+ create(type: DesignBlockType): DesignBlockId;
194
178
 
179
+ /**
195
180
  * Get the type of the given block, fails if the block is invalid.
196
181
  * @param id - The block to query.
197
182
  * @returns The blocks type.
198
183
  */
199
- getType(id: DesignElementId): DesignBlockType;
184
+ getType(id: DesignBlockId): DesignBlockType;
200
185
  /**
201
186
  * Update the selection state of a block.
202
187
  * Fails for invalid blocks.
203
188
  * @param id - The block to query.
204
189
  * @param selected - Whether or not the block should be selected.
205
190
  */
206
- setSelected(id: DesignElementId, selected: boolean): void;
191
+ setSelected(id: DesignBlockId, selected: boolean): void;
207
192
  /**
208
193
  * Get the selected state of a block.
209
194
  * @param id - The block to query.
210
195
  * @returns True if the block is selected, false otherwise.
211
196
  */
212
- isSelected(id: DesignElementId): boolean;
197
+ isSelected(id: DesignBlockId): boolean;
213
198
  /**
214
199
  * Get all currently selected blocks.
215
200
  * @returns An array of block ids.
216
201
  */
217
- findAllSelected(): DesignElementId[];
202
+ findAllSelected(): DesignBlockId[];
218
203
  /**
219
204
  * Confirms that a given set of blocks can be grouped together.
220
205
  * @param ids - A non-empty array of block ids.
221
206
  * @returns Whether the blocks can be grouped together.
222
207
  */
223
- isGroupable(ids: DesignElementId[]): boolean;
208
+ isGroupable(ids: DesignBlockId[]): boolean;
224
209
  /**
225
210
  * Group blocks together.
226
211
  * @param ids - A non-empty array of block ids.
227
212
  * @returns The block id of the created group.
228
213
  */
229
- group(ids: DesignElementId[]): DesignElementId;
214
+ group(ids: DesignBlockId[]): DesignBlockId;
230
215
  /**
231
216
  * Ungroups a group.
232
217
  * @param id - The group id from a previous call to `group`.
233
218
  */
234
- ungroup(id: DesignElementId): void;
219
+ ungroup(id: DesignBlockId): void;
235
220
  /**
236
221
  * Changes selection from selected group to a block within that group.
237
222
  * Nothing happens if `group` is not a group.
238
223
  * @param id - The group id from a previous call to `group`.
239
224
  */
240
- enterGroup(id: DesignElementId): void;
225
+ enterGroup(id: DesignBlockId): void;
241
226
  /**
242
227
  * Changes selection from a group's selected block to that group.
243
228
  * Nothing happens if the `id` is not part of a group.
244
229
  * @param id - A block id.
245
230
  */
246
- exitGroup(id: DesignElementId): void;
231
+ exitGroup(id: DesignBlockId): void;
247
232
  /**
248
233
  * Update a block's name.
249
234
  * @param id - The block to update.
250
235
  * @param name - The name to set.
251
236
  */
252
- setName(id: DesignElementId, name: string): void;
237
+ setName(id: DesignBlockId, name: string): void;
253
238
  /**
254
239
  * Get a block's name.
255
240
  * @param id - The block to update.
256
241
  */
257
- getName(id: DesignElementId): string;
242
+ getName(id: DesignBlockId): string;
258
243
  /**
259
244
  * Finds all blocks with the given name.
260
245
  * @param name - The name to search for.
261
246
  * @returns A list of block ids.
262
247
  */
263
- findByName(name: string): DesignElementId[];
248
+ findByName(name: string): DesignBlockId[];
264
249
  /**
265
250
  * Finds all blocks with the given type.
266
251
  * @param type - The type to search for.
267
252
  * @returns A list of block ids.
268
253
  */
269
- findByType(type: DesignBlockType): DesignElementId[];
254
+ findByType(type: DesignBlockType): DesignBlockId[];
270
255
  /**
271
256
  * Return all blocks currently known to the engine.
272
257
  * @returns A list of block ids.
273
258
  */
274
- findAll(): DesignElementId[];
259
+ findAll(): DesignBlockId[];
260
+ /**
261
+ * Return all placeholder blocks in the current scene.
262
+ * @returns A list of block ids.
263
+ */
264
+ findAllPlaceholders(): DesignBlockId[];
275
265
  /**
276
266
  * Query a block's visibility.
277
267
  * @param id - The block to query.
278
268
  * @returns True if visible, false otherwise.
279
269
  */
280
- isVisible(id: DesignElementId): boolean;
270
+ isVisible(id: DesignBlockId): boolean;
281
271
  /**
282
272
  * Update a block's visibility.
283
273
  * @param id - The block to update.
284
274
  * @param visible - Whether the block shall be visible.
285
275
  */
286
- setVisible(id: DesignElementId, visible: boolean): void;
276
+ setVisible(id: DesignBlockId, visible: boolean): void;
287
277
  /**
288
278
  * Query a block's clipped state. If true, the block should clip
289
279
  * its contents to its frame.
290
280
  * @param id - The block to query.
291
281
  * @returns True if clipped, false otherwise.
292
282
  */
293
- isClipped(id: DesignElementId): boolean;
283
+ isClipped(id: DesignBlockId): boolean;
294
284
  /**
295
285
  * Update a block's clipped state.
296
286
  * @param id - The block to update.
297
287
  * @param clipped - Whether the block should clips its contents to its frame.
298
288
  */
299
- setClipped(id: DesignElementId, clipped: boolean): void;
289
+ setClipped(id: DesignBlockId, clipped: boolean): void;
300
290
  /**
301
291
  * Query a block's x position.
302
292
  * @param id - The block to query.
303
293
  * @returns The value of the x position.
304
294
  */
305
- getPositionX(id: DesignElementId): number;
295
+ getPositionX(id: DesignBlockId): number;
306
296
  /**
307
297
  * Query a block's mode for its x position.
308
298
  * @param id - The block to query.
309
299
  * @returns The current mode for the x position: absolute, percent or undefined.
310
300
  */
311
- getPositionXMode(id: DesignElementId): PositionMode;
301
+ getPositionXMode(id: DesignBlockId): PositionMode;
312
302
  /**
313
303
  * Query a block's y position.
314
304
  * @param id - The block to query.
315
305
  * @returns The value of the y position.
316
306
  */
317
- getPositionY(id: DesignElementId): number;
307
+ getPositionY(id: DesignBlockId): number;
318
308
  /**
319
309
  * Query a block's mode for its y position.
320
310
  * @param id - The block to query.
321
311
  * @returns The current mode for the y position: absolute, percent or undefined.
322
312
  */
323
- getPositionYMode(id: DesignElementId): PositionMode;
313
+ getPositionYMode(id: DesignBlockId): PositionMode;
324
314
  /**
325
315
  * Update a block's x position.
326
316
  * The position refers to the block's local space, relative to its parent with the origin at the top left.
327
317
  * @param id - The block to update.
328
318
  * @param value - The value of the x position.
329
319
  */
330
- setPositionX(id: DesignElementId, value: number): void;
320
+ setPositionX(id: DesignBlockId, value: number): void;
331
321
  /**
332
322
  * Set a block's mode for its x position.
333
323
  * @param id - The block to update.
334
324
  * @param mode - The x position mode: absolute, percent or undefined.
335
325
  */
336
- setPositionXMode(id: DesignElementId, mode: PositionMode): void;
326
+ setPositionXMode(id: DesignBlockId, mode: PositionMode): void;
337
327
  /**
338
328
  * Update a block's y position.
339
329
  * The position refers to the block's local space, relative to its parent with the origin at the top left.
340
330
  * @param id - The block to update.
341
331
  * @param value - The value of the y position.
342
332
  */
343
- setPositionY(id: DesignElementId, value: number): void;
333
+ setPositionY(id: DesignBlockId, value: number): void;
344
334
  /**
345
335
  * Set a block's mode for its y position.
346
336
  * @param id - The block to update.
347
337
  * @param mode - The y position mode: absolute, percent or undefined.
348
338
  */
349
- setPositionYMode(id: DesignElementId, mode: PositionMode): void;
339
+ setPositionYMode(id: DesignBlockId, mode: PositionMode): void;
350
340
  /**
351
341
  * Query a block's rotation in radians.
352
342
  * @param id - The block to query.
353
343
  * @returns The block's rotation around its center in radians.
354
344
  */
355
- getRotation(id: DesignElementId): number;
345
+ getRotation(id: DesignBlockId): number;
356
346
  /**
357
347
  * Update a block's rotation.
358
348
  * @param id - The block to update.
359
349
  * @param radians - The new rotation in radians. Rotation is applied around the block's center.
360
350
  */
361
- setRotation(id: DesignElementId, radians: number): void;
351
+ setRotation(id: DesignBlockId, radians: number): void;
362
352
  /**
363
353
  * Query a block's horizontal flip state.
364
354
  * @param id - The block to query.
365
355
  * @returns A boolean indicating for whether the block is flipped in the queried direction
366
356
  */
367
- getFlipHorizontal(id: DesignElementId): boolean;
357
+ getFlipHorizontal(id: DesignBlockId): boolean;
368
358
  /**
369
359
  * Query a block's vertical flip state.
370
360
  * @param id - The block to query.
371
361
  * @returns A boolean indicating for whether the block is flipped in the queried direction
372
362
  */
373
- getFlipVertical(id: DesignElementId): boolean;
363
+ getFlipVertical(id: DesignBlockId): boolean;
374
364
  /**
375
365
  * Update a block's horizontal flip.
376
366
  * @param id - The block to update.
377
- * @param horizontal - Whether the block should be flipped along its x-axis.
367
+ * @param flip - If the flip should be enabled.
378
368
  */
379
- setFlipHorizontal(id: DesignElementId, flip: boolean): void;
369
+ setFlipHorizontal(id: DesignBlockId, flip: boolean): void;
380
370
  /**
381
371
  * Update a block's vertical flip.
382
372
  * @param id - The block to update.
383
- * @param vertical - Whether the block should be flipped along its y-axis.
373
+ * @param flip - If the flip should be enabled.
384
374
  */
385
- setFlipVertical(id: DesignElementId, flip: boolean): void;
375
+ setFlipVertical(id: DesignBlockId, flip: boolean): void;
386
376
  /**
387
377
  * Query a block's width.
388
378
  * @param id - The block to query.
389
379
  * @returns The value of the block's width.
390
380
  */
391
- getWidth(id: DesignElementId): number;
381
+ getWidth(id: DesignBlockId): number;
392
382
  /**
393
383
  * Query a block's mode for its width.
394
384
  * @param id - The block to query.
395
385
  * @returns The current mode for the width: absolute, percent or auto.
396
386
  */
397
- getWidthMode(id: DesignElementId): SizeMode;
387
+ getWidthMode(id: DesignBlockId): SizeMode;
398
388
  /**
399
389
  * Query a block's height.
400
390
  * @param id - The block to query.
401
391
  * @returns The value of the block's height.
402
392
  */
403
- getHeight(id: DesignElementId): number;
393
+ getHeight(id: DesignBlockId): number;
404
394
  /**
405
395
  * Query a block's mode for its height.
406
396
  * @param id - The block to query.
407
397
  * @returns The current mode for the height: absolute, percent or auto.
408
398
  */
409
- getHeightMode(id: DesignElementId): SizeMode;
399
+ getHeightMode(id: DesignBlockId): SizeMode;
400
+ /**
401
+ * Query a block's content fill mode.
402
+ * @param id - The block to query.
403
+ * @returns The current mode: crop, cover or contain.
404
+ */
405
+ getContentFillMode(id: DesignBlockId): ContentFillMode;
410
406
  /**
411
407
  * Update a block's width.
412
408
  * @param id - The block to update.
413
409
  * @param value - The new width of the block.
414
410
  */
415
- setWidth(id: DesignElementId, value: number): void;
411
+ setWidth(id: DesignBlockId, value: number): void;
416
412
  /**
417
413
  * Set a block's mode for its width.
418
414
  * @param id - The block to update.
419
415
  * @param mode - The width mode: absolute, percent or auto.
420
416
  */
421
- setWidthMode(id: DesignElementId, mode: SizeMode): void;
417
+ setWidthMode(id: DesignBlockId, mode: SizeMode): void;
422
418
  /**
423
419
  * Update a block's height.
424
420
  * @param id - The block to update.
425
421
  * @param value - The new height of the block.
426
422
  */
427
- setHeight(id: DesignElementId, value: number): void;
423
+ setHeight(id: DesignBlockId, value: number): void;
428
424
  /**
429
425
  * Set a block's mode for its height.
430
426
  * @param id - The block to update.
431
427
  * @param mode - The height mode: absolute, percent or auto.
432
428
  */
433
- setHeightMode(id: DesignElementId, mode: SizeMode): void;
429
+ setHeightMode(id: DesignBlockId, mode: SizeMode): void;
430
+ /**
431
+ * Set a block's content fill mode.
432
+ * @param id - The block to update.
433
+ * @param mode - The content fill mode mode: crop, cover or contain.
434
+ */
435
+ setContentFillMode(id: DesignBlockId, mode: ContentFillMode): void;
434
436
  /**
435
437
  * Get a block's layouted width. The layouted width is only available after an
436
438
  * internal update loop, which may not happen immediately.
437
439
  * @param id - The block to query.
438
440
  * @returns The layouted width.
439
441
  */
440
- getFrameWidth(id: DesignElementId): number;
442
+ getFrameWidth(id: DesignBlockId): number;
441
443
  /**
442
444
  * Get a block's layouted height. The layouted height is only available after an
443
445
  * internal update loop, which may not happen immediately.
444
446
  * @param id - The block to query.
445
447
  * @returns The layouted height.
446
448
  */
447
- getFrameHeight(id: DesignElementId): number;
449
+ getFrameHeight(id: DesignBlockId): number;
448
450
  /**
449
451
  * Duplicates a block including its children.
450
452
  * @param id - The block to duplicate.
451
453
  * @returns The handle of the duplicate.
452
454
  */
453
- duplicate(id: DesignElementId): DesignElementId;
455
+ duplicate(id: DesignBlockId): DesignBlockId;
454
456
  /**
455
457
  * Destroys a block.
456
458
  * @param id - The block to destroy.
457
459
  */
458
- destroy(id: DesignElementId): void;
460
+ destroy(id: DesignBlockId): void;
459
461
  /**
460
462
  * Check if a block is valid. A block becomes invalid once it has been destroyed.
461
463
  * @param id - The block to query.
462
464
  * @returns True, if the block is valid.
463
465
  */
464
- isValid(id: DesignElementId): boolean;
466
+ isValid(id: DesignBlockId): boolean;
465
467
  /**
466
468
  * Query a block's parent.
467
469
  * @param id - The block to query.
468
470
  * @returns The parent's handle.
469
471
  */
470
- getParent(id: DesignElementId): DesignElementId;
472
+ getParent(id: DesignBlockId): DesignBlockId;
471
473
  /**
472
474
  * Get all children of the given block. Children
473
475
  * are sorted in their rendering order: Last child is rendered
@@ -475,60 +477,75 @@ export declare class BlockAPI {
475
477
  * @param id - The block to query.
476
478
  * @returns A list of block ids.
477
479
  */
478
- getChildren(id: DesignElementId): DesignElementId[];
480
+ getChildren(id: DesignBlockId): DesignBlockId[];
479
481
  /**
480
482
  * Insert a new or existing child at a certain position in the parent's children.
481
483
  * @param parent - The block whose children should be updated.
482
484
  * @param child - The child to insert. Can be an existing child of `parent`.
483
485
  * @param index - The index to insert or move to.
484
486
  */
485
- insertChild(parent: DesignElementId, child: DesignElementId, index: number): void;
487
+ insertChild(parent: DesignBlockId, child: DesignBlockId, index: number): void;
486
488
  /**
487
489
  * Appends a new or existing child to a block's children.
488
490
  * @param parent - The block whose children should be updated.
489
491
  * @param child - The child to insert. Can be an existing child of `parent`.
490
492
  */
491
- appendChild(parent: DesignElementId, child: DesignElementId): void;
493
+ appendChild(parent: DesignBlockId, child: DesignBlockId): void;
492
494
  /** Checks whether the given block references any variables. Doesn't check the block's children.
493
495
  *
494
496
  * @param id - The block to inspect.
495
497
  * @returns true if the block references variables and false otherwise.
496
498
  */
497
- referencesAnyVariables(id: DesignElementId): boolean;
499
+ referencesAnyVariables(id: DesignBlockId): boolean;
498
500
  /**
499
501
  * Get the x position of the block's axis-aligned bounding box in the scene's global coordinate space.
500
502
  * The scene's global coordinate space has its origin at the top left.
501
503
  * @param id - The block whose bounding box should be calculated.
502
504
  * @returns float The x coordinate of the position of the axis-aligned bounding box.
503
505
  */
504
- getGlobalBoundingBoxX(id: DesignElementId): number;
506
+ getGlobalBoundingBoxX(id: DesignBlockId): number;
505
507
  /**
506
508
  * Get the y position of the block's axis-aligned bounding box in the scene's global coordinate space.
507
509
  * The scene's global coordinate space has its origin at the top left.
508
510
  * @param id - The block whose bounding box should be calculated.
509
511
  * @returns float The y coordinate of the position of the axis-aligned bounding box.
510
512
  */
511
- getGlobalBoundingBoxY(id: DesignElementId): number;
513
+ getGlobalBoundingBoxY(id: DesignBlockId): number;
512
514
  /**
513
515
  * Get the width of the block's axis-aligned bounding box in the scene's global coordinate space.
514
516
  * The scene's global coordinate space has its origin at the top left.
515
517
  * @param id - The block whose bounding box should be calculated.
516
518
  * @returns float The width of the axis-aligned bounding box.
517
519
  */
518
- getGlobalBoundingBoxWidth(id: DesignElementId): number;
520
+ getGlobalBoundingBoxWidth(id: DesignBlockId): number;
519
521
  /**
520
522
  * Get the height of the block's axis-aligned bounding box in the scene's global coordinate space.
521
523
  * The scene's global coordinate space has its origin at the top left.
522
524
  * @param id - The block whose bounding box should be calculated.
523
525
  * @returns float The height of the axis-aligned bounding box.
524
526
  */
525
- getGlobalBoundingBoxHeight(id: DesignElementId): number;
527
+ getGlobalBoundingBoxHeight(id: DesignBlockId): number;
528
+ /**
529
+ * Scales the block and all of its children proportionally around the specified
530
+ * relative anchor point.
531
+ *
532
+ * This updates the position, size and style properties (e.g. stroke width) of
533
+ * the block and its children.
534
+ *
535
+ * @param id - The block that should be scaled.
536
+ * @param scale - The scale factor to be applied to the current properties of the block.
537
+ * @param anchorX - The relative position along the width of the block around which the
538
+ * scaling should occur. (0 = left edge, 0.5 = center, 1 = right edge)
539
+ * @param anchorY - The relative position along the height of the block around which the
540
+ * scaling should occur. (0 = top edge, 0.5 = center, 1 = bottom edge)
541
+ */
542
+ scale(id: DesignBlockId, scale: number, anchorX?: number, anchorY?: number): void;
526
543
  /**
527
544
  * Get all available properties of a block.
528
545
  * @param id - The block whose properties should be queried.
529
546
  * @returns A list of the property names.
530
547
  */
531
- findAllProperties(id: DesignElementId): string[];
548
+ findAllProperties(id: DesignBlockId): string[];
532
549
  /**
533
550
  * Get the type of a property given its name.
534
551
  * @param property - The name of the property whose type should be queried.
@@ -547,56 +564,56 @@ export declare class BlockAPI {
547
564
  * @param property - The name of the property to set.
548
565
  * @param value - The value to set.
549
566
  */
550
- setBool(id: DesignElementId, property: string, value: boolean): void;
567
+ setBool(id: DesignBlockId, property: string, value: boolean): void;
551
568
  /**
552
569
  * Get the value of a bool property of the given design block.
553
570
  * @param id - The block whose property should be queried.
554
571
  * @param property - The name of the property to query.
555
572
  * @returns The value of the property.
556
573
  */
557
- getBool(id: DesignElementId, property: string): boolean;
574
+ getBool(id: DesignBlockId, property: string): boolean;
558
575
  /**
559
576
  * Set an int property of the given design block to the given value.
560
577
  * @param id - The block whose property should be set.
561
578
  * @param property - The name of the property to set.
562
579
  * @param value - The value to set.
563
580
  */
564
- setInt(id: DesignElementId, property: string, value: number): void;
581
+ setInt(id: DesignBlockId, property: string, value: number): void;
565
582
  /**
566
583
  * Get the value of an int property of the given design block.
567
584
  * @param id - The block whose property should be queried.
568
585
  * @param property - The name of the property to query.
569
586
  * @returns The value of the property.
570
587
  */
571
- getInt(id: DesignElementId, property: string): number;
588
+ getInt(id: DesignBlockId, property: string): number;
572
589
  /**
573
590
  * Set a float property of the given design block to the given value.
574
591
  * @param id - The block whose property should be set.
575
592
  * @param property - The name of the property to set.
576
593
  * @param value - The value to set.
577
594
  */
578
- setFloat(id: DesignElementId, property: string, value: number): void;
595
+ setFloat(id: DesignBlockId, property: string, value: number): void;
579
596
  /**
580
597
  * Get the value of a float property of the given design block.
581
598
  * @param id - The block whose property should be queried.
582
599
  * @param property - The name of the property to query.
583
600
  * @returns The value of the property.
584
601
  */
585
- getFloat(id: DesignElementId, property: string): number;
602
+ getFloat(id: DesignBlockId, property: string): number;
586
603
  /**
587
604
  * Set a string property of the given design block to the given value.
588
605
  * @param id - The block whose property should be set.
589
606
  * @param property - The name of the property to set.
590
607
  * @param value - The value to set.
591
608
  */
592
- setString(id: DesignElementId, property: string, value: string): void;
609
+ setString(id: DesignBlockId, property: string, value: string): void;
593
610
  /**
594
611
  * Get the value of a string property of the given design block.
595
612
  * @param id - The block whose property should be queried.
596
613
  * @param property - The name of the property to query.
597
614
  * @returns The value of the property.
598
615
  */
599
- getString(id: DesignElementId, property: string): string;
616
+ getString(id: DesignBlockId, property: string): string;
600
617
  /**
601
618
  * Set a color property of the given design block to the given value.
602
619
  * @param id - The block whose property should be set.
@@ -606,124 +623,137 @@ export declare class BlockAPI {
606
623
  * @param b - The blue color component in the range of 0 to 1.
607
624
  * @param a - The alpha color component in the range of 0 to 1.
608
625
  */
609
- setColorRGBA(id: DesignElementId, property: string, r: number, g: number, b: number, a: number): void;
626
+ setColorRGBA(id: DesignBlockId, property: string, r: number, g: number, b: number, a: number): void;
610
627
  /**
611
628
  * Get the value of a string property of the given design block.
612
629
  * @param id - The block whose property should be queried.
613
630
  * @param property - The name of the property to query.
614
631
  * @returns A tuple of channels red, green, blue and alpha in the range of 0 to 1.
615
632
  */
616
- getColorRGBA(id: DesignElementId, property: string): RGBA;
633
+ getColorRGBA(id: DesignBlockId, property: string): RGBA;
617
634
  /**
618
635
  * Set an enum property of the given design block to the given value.
619
- * @param block - The block whose property should be set.
636
+ * @param id - The block whose property should be set.
620
637
  * @param property - The name of the property to set.
621
638
  * @param value - The enum value as string.
622
639
  */
623
- setEnum(id: DesignElementId, property: string, value: string): void;
640
+ setEnum(id: DesignBlockId, property: string, value: string): void;
624
641
  /**
625
642
  * Get the value of an enum property of the given design block.
626
- * @param block - The block whose property should be queried.
643
+ * @param id - The block whose property should be queried.
627
644
  * @param property - The name of the property to query.
628
645
  * @returns The value as string.
629
646
  */
630
- getEnum(id: DesignElementId, property: string): string;
647
+ getEnum(id: DesignBlockId, property: string): string;
631
648
  /**
632
649
  * Query if the given block has crop properties.
633
650
  * @param id - The block to query.
634
651
  * @returns true, if the block has crop properties.
635
652
  */
636
- hasCrop(id: DesignElementId): boolean;
653
+ hasCrop(id: DesignBlockId): boolean;
637
654
  /**
638
655
  * Set the crop scale in x direction of the given design block.
639
656
  * @param id - The block whose crop should be set.
640
657
  * @param scaleX - The scale in x direction.
641
658
  */
642
- setCropScaleX(id: DesignElementId, scaleX: number): void;
659
+ setCropScaleX(id: DesignBlockId, scaleX: number): void;
643
660
  /**
644
661
  * Set the crop scale in y direction of the given design block.
645
662
  * @param id - The block whose crop should be set.
646
663
  * @param scaleY - The scale in y direction.
647
664
  */
648
- setCropScaleY(id: DesignElementId, scaleY: number): void;
665
+ setCropScaleY(id: DesignBlockId, scaleY: number): void;
649
666
  /**
650
667
  * Set the crop rotation of the given design block.
651
668
  * @param id - The block whose crop should be set.
652
669
  * @param rotation - The rotation in radians.
653
670
  */
654
- setCropRotation(id: DesignElementId, rotation: number): void;
671
+ setCropRotation(id: DesignBlockId, rotation: number): void;
655
672
  /**
656
673
  * Set the crop translation in x direction of the given design block.
657
674
  * @param id - The block whose crop should be set.
658
- * @param translationY - The translation in x direction.
675
+ * @param translationY - The translation in y direction.
659
676
  */
660
- setCropTranslationX(id: DesignElementId, translationX: number): void;
677
+ setCropTranslationX(id: DesignBlockId, translationX: number): void;
661
678
  /**
662
679
  * Set the crop translation in y direction of the given design block.
663
680
  * @param id - The block whose crop should be set.
664
681
  * @param translationY - The translation in y direction.
665
682
  */
666
- setCropTranslationY(id: DesignElementId, translationY: number): void;
683
+ setCropTranslationY(id: DesignBlockId, translationY: number): void;
667
684
  /**
668
685
  * Resets the manually set crop of the given design block.
669
686
  * The block's content fill mode is set to 'cover'.
670
687
  * @param id - The block whose crop should be reset.
671
688
  */
672
- resetCrop(id: DesignElementId): void;
689
+ resetCrop(id: DesignBlockId): void;
673
690
  /**
674
691
  * Get the crop scale on the x axis of the given design block.
675
692
  * @param id - The block whose scale should be queried.
676
693
  * @returns The scale on the x axis.
677
694
  */
678
- getCropScaleX(id: DesignElementId): number;
695
+ getCropScaleX(id: DesignBlockId): number;
679
696
  /**
680
697
  * Get the crop scale on the y axis of the given design block.
681
698
  * @param id - The block whose scale should be queried.
682
699
  * @returns The scale on the y axis.
683
700
  */
684
- getCropScaleY(id: DesignElementId): number;
701
+ getCropScaleY(id: DesignBlockId): number;
685
702
  /**
686
703
  * Get the crop rotation of the given design block.
687
704
  * @param id - The block whose crop rotation should be queried.
688
705
  * @returns The crop rotation.
689
706
  */
690
- getCropRotation(id: DesignElementId): number;
707
+ getCropRotation(id: DesignBlockId): number;
691
708
  /**
692
709
  * Get the crop translation on the x axis of the given design block.
693
710
  * @param id - The block whose translation should be queried.
694
711
  * @returns The translation on the x axis.
695
712
  */
696
- getCropTranslationX(id: DesignElementId): number;
713
+ getCropTranslationX(id: DesignBlockId): number;
697
714
  /**
698
715
  * Get the crop translation on the y axis of the given design block.
699
716
  * @param id - The block whose translation should be queried.
700
717
  * @returns The translation on the y axis.
701
718
  */
702
- getCropTranslationY(id: DesignElementId): number;
719
+ getCropTranslationY(id: DesignBlockId): number;
703
720
  /**
704
721
  * Query if the given block has an opacity.
705
722
  * @param id - The block to query.
706
- * @returns true, if the block has an opcity.
723
+ * @returns true, if the block has an opacity.
707
724
  */
708
- hasOpacity(id: DesignElementId): boolean;
725
+ hasOpacity(id: DesignBlockId): boolean;
709
726
  /**
710
727
  * Set the opacity of the given design block.
711
728
  * @param id - The block whose opacity should be set.
712
729
  * @param opacity - The opacity to be set. The valid range is 0 to 1.
713
730
  */
714
- setOpacity(id: DesignElementId, opacity: number): void;
731
+ setOpacity(id: DesignBlockId, opacity: number): void;
715
732
  /**
716
733
  * Get the opacity of the given design block.
717
734
  * @param id - The block whose opacity should be queried.
718
735
  * @returns The opacity.
719
736
  */
720
- getOpacity(id: DesignElementId): number;
737
+ getOpacity(id: DesignBlockId): number;
738
+ /**
739
+ * Set the blend mode of the given design block.
740
+ * @param id - The block whose blend mode should be set.
741
+ * @param blendMode - The blend mode to be set.
742
+ * @returns
743
+ */
744
+ setBlendMode(id: DesignBlockId, blendMode: BlendMode): void;
745
+ /**
746
+ * Get the blend mode of the given design block.
747
+ * @param id - The block whose blend mode should be queried.
748
+ * @returns The blend mode.
749
+ */
750
+ getBlendMode(id: DesignBlockId): BlendMode;
721
751
  /**
722
752
  * Query if the given block has fill color properties.
723
753
  * @param id - The block to query.
724
754
  * @returns true, if the block has fill color properties.
725
755
  */
726
- hasFillColor(id: DesignElementId): boolean;
756
+ hasFillColor(id: DesignBlockId): boolean;
727
757
  /**
728
758
  * Set the fill color of the given design block.
729
759
  * @param id - The block whose fill color should be set.
@@ -733,31 +763,31 @@ export declare class BlockAPI {
733
763
  * @param b - The blue color component in the range of 0 to 1.
734
764
  * @param a - The alpha color component in the range of 0 to 1.
735
765
  */
736
- setFillColorRGBA(id: DesignElementId, r: number, g: number, b: number, a: number): void;
766
+ setFillColorRGBA(id: DesignBlockId, r: number, g: number, b: number, a: number): void;
737
767
  /**
738
768
  * Get the fill color of the given design block.
739
769
  * @param id - The block whose fill color should be queried.
740
770
  * @returns The fill color.
741
771
  */
742
- getFillColorRGBA(id: DesignElementId): RGBA;
772
+ getFillColorRGBA(id: DesignBlockId): RGBA;
743
773
  /**
744
774
  * Enable or disable the fill of the given design block.
745
775
  * @param id - The block whose fill should be enabled or disabled.
746
776
  * @param enabled - If true, the fill will be enabled.
747
777
  */
748
- setFillColorEnabled(id: DesignElementId, enabled: boolean): void;
778
+ setFillColorEnabled(id: DesignBlockId, enabled: boolean): void;
749
779
  /**
750
780
  * Query if the fill of the given design block is enabled.
751
781
  * @param id - The block whose fill state should be queried.
752
782
  * @returns True, if fill is enabled.
753
783
  */
754
- isFillColorEnabled(id: DesignElementId): boolean;
784
+ isFillColorEnabled(id: DesignBlockId): boolean;
755
785
  /**
756
786
  * Query if the given block has background color properties.
757
787
  * @param id - The block to query.
758
788
  * @returns true, if the block has background color properties.
759
789
  */
760
- hasBackgroundColor(id: DesignElementId): boolean;
790
+ hasBackgroundColor(id: DesignBlockId): boolean;
761
791
  /**
762
792
  * Set the background color of the given design block.
763
793
  * @param id - The block whose background color should be set.
@@ -767,43 +797,43 @@ export declare class BlockAPI {
767
797
  * @param b - The blue color component in the range of 0 to 1.
768
798
  * @param a - The alpha color component in the range of 0 to 1.
769
799
  */
770
- setBackgroundColorRGBA(id: DesignElementId, r: number, g: number, b: number, a: number): void;
800
+ setBackgroundColorRGBA(id: DesignBlockId, r: number, g: number, b: number, a: number): void;
771
801
  /**
772
802
  * Get the background color of the given design block.
773
803
  * @param id - The block whose background color should be queried.
774
804
  * @returns The background color.
775
805
  */
776
- getBackgroundColorRGBA(id: DesignElementId): RGBA;
806
+ getBackgroundColorRGBA(id: DesignBlockId): RGBA;
777
807
  /**
778
808
  * Enable or disable the background of the given design block.
779
809
  * @param id - The block whose background should be enabled or disabled.
780
810
  * @param enabled - If true, the background will be enabled.
781
811
  */
782
- setBackgroundColorEnabled(id: DesignElementId, enabled: boolean): void;
812
+ setBackgroundColorEnabled(id: DesignBlockId, enabled: boolean): void;
783
813
  /**
784
814
  * Query if the background of the given design block is enabled.
785
815
  * @param id - The block whose background state should be queried.
786
816
  * @returns True, if background is enabled.
787
817
  */
788
- isBackgroundColorEnabled(id: DesignElementId): boolean;
818
+ isBackgroundColorEnabled(id: DesignBlockId): boolean;
789
819
  /**
790
820
  * Query if the given block has a stroke property.
791
821
  * @param id - The block to query.
792
822
  * @returns True if the block has a stroke property.
793
823
  */
794
- hasStroke(id: DesignElementId): boolean;
824
+ hasStroke(id: DesignBlockId): boolean;
795
825
  /**
796
826
  * Enable or disable the stroke of the given design block.
797
827
  * @param id - The block whose stroke should be enabled or disabled.
798
828
  * @param enabled - If true, the stroke will be enabled.
799
829
  */
800
- setStrokeEnabled(id: DesignElementId, enabled: boolean): void;
830
+ setStrokeEnabled(id: DesignBlockId, enabled: boolean): void;
801
831
  /**
802
832
  * Query if the stroke of the given design block is enabled.
803
833
  * @param id - The block whose stroke state should be queried.
804
834
  * @returns True if the block's stroke is enabled.
805
835
  */
806
- isStrokeEnabled(id: DesignElementId): boolean;
836
+ isStrokeEnabled(id: DesignBlockId): boolean;
807
837
  /**
808
838
  * Set the stroke color of the given design block.
809
839
  * @param id - The block whose stroke color should be set.
@@ -812,68 +842,68 @@ export declare class BlockAPI {
812
842
  * @param b - The blue color component in the range of 0 to 1.
813
843
  * @param a - The alpha color component in the range of 0 to 1.
814
844
  */
815
- setStrokeColorRGBA(id: DesignElementId, r: number, g: number, b: number, a: number): void;
845
+ setStrokeColorRGBA(id: DesignBlockId, r: number, g: number, b: number, a: number): void;
816
846
  /**
817
847
  * Get the stroke color of the given design block.
818
848
  * @param id - The block whose background color should be queried.
819
849
  * @returns The background color.
820
850
  */
821
- getStrokeColorRGBA(id: DesignElementId): RGBA;
851
+ getStrokeColorRGBA(id: DesignBlockId): RGBA;
822
852
  /**
823
853
  * Set the stroke width of the given design block.
824
854
  * @param id - The block whose stroke width should be set.
825
855
  * @param width - The stroke width to be set.
826
856
  */
827
- setStrokeWidth(id: DesignElementId, width: number): void;
857
+ setStrokeWidth(id: DesignBlockId, width: number): void;
828
858
  /**
829
859
  * Get the stroke width of the given design block.
830
860
  * @param id - The block whose stroke width should be queried.
831
861
  * @returns The stroke's width.
832
862
  */
833
- getStrokeWidth(id: DesignElementId): number;
863
+ getStrokeWidth(id: DesignBlockId): number;
834
864
  /**
835
865
  * Set the stroke style of the given design block.
836
866
  * @param id - The block whose stroke style should be set.
837
867
  * @param style - The stroke style to be set.
838
868
  */
839
- setStrokeStyle(id: DesignElementId, style: StrokeStyle): void;
869
+ setStrokeStyle(id: DesignBlockId, style: StrokeStyle): void;
840
870
  /**
841
871
  * Get the stroke style of the given design block.
842
872
  * @param id - The block whose stroke style should be queried.
843
873
  * @returns The stroke's style.
844
874
  */
845
- getStrokeStyle(id: DesignElementId): StrokeStyle;
875
+ getStrokeStyle(id: DesignBlockId): StrokeStyle;
846
876
  /**
847
877
  * Set the stroke position of the given design block.
848
878
  * @param id - The block whose stroke position should be set.
849
879
  * @param position - The stroke position to be set.
850
880
  */
851
- setStrokePosition(id: DesignElementId, position: StrokePosition): void;
881
+ setStrokePosition(id: DesignBlockId, position: StrokePosition): void;
852
882
  /**
853
883
  * Get the stroke position of the given design block.
854
884
  * @param id - The block whose stroke position should be queried.
855
885
  * @returns The stroke position.
856
886
  */
857
- getStrokePosition(id: DesignElementId): StrokePosition;
887
+ getStrokePosition(id: DesignBlockId): StrokePosition;
858
888
  /**
859
889
  * Set the stroke corner geometry of the given design block.
860
890
  * @param id - The block whose stroke join geometry should be set.
861
891
  * @param cornerGeometry - The stroke join geometry to be set.
862
892
  */
863
- setStrokeCornerGeometry(id: DesignElementId, cornerGeometry: StrokeCornerGeometry): void;
893
+ setStrokeCornerGeometry(id: DesignBlockId, cornerGeometry: StrokeCornerGeometry): void;
864
894
  /**
865
895
  * Get the stroke corner geometry of the given design block.
866
896
  * @param id - The block whose stroke join geometry should be queried.
867
897
  * @returns The stroke join geometry.
868
898
  */
869
- getStrokeCornerGeometry(id: DesignElementId): StrokeCornerGeometry;
899
+ getStrokeCornerGeometry(id: DesignBlockId): StrokeCornerGeometry;
870
900
  /**
871
901
  * Query if the given block has outline properties.
872
902
  * @param id - The block to query.
873
903
  * @returns true, if the block has outline properties.
874
904
  * @deprecated Use `hasStroke`.
875
905
  */
876
- hasOutline(id: DesignElementId): boolean;
906
+ hasOutline(id: DesignBlockId): boolean;
877
907
  /**
878
908
  * Set the outline color of the given design block.
879
909
  * @param id - The block whose outline color should be set.
@@ -884,35 +914,35 @@ export declare class BlockAPI {
884
914
  * @param a - The alpha color component in the range of 0 to 1.
885
915
  * @deprecated Use `setStrokeColorRGBA`.
886
916
  */
887
- setOutlineColorRGBA(id: DesignElementId, r: number, g: number, b: number, a: number): void;
917
+ setOutlineColorRGBA(id: DesignBlockId, r: number, g: number, b: number, a: number): void;
888
918
  /**
889
919
  * Get the outline color of the given design block.
890
920
  * @param id - The block whose outline color should be queried.
891
921
  * @returns The outline color.
892
922
  * @deprecated Use `getStrokeColorRGBA`.
893
923
  */
894
- getOutlineColorRGBA(id: DesignElementId): RGBA;
924
+ getOutlineColorRGBA(id: DesignBlockId): RGBA;
895
925
  /**
896
926
  * Enable or disable the outline of the given design block.
897
927
  * @param id - The block whose outline should be enabled or disabled.
898
928
  * @param enabled - If true, the outline will be enabled.
899
929
  * @deprecated Use `setStrokeEnabled`.
900
930
  */
901
- setOutlineEnabled(id: DesignElementId, enabled: boolean): void;
931
+ setOutlineEnabled(id: DesignBlockId, enabled: boolean): void;
902
932
  /**
903
933
  * Query if the outline of the given design block is enabled.
904
934
  * @param id - The block whose outline state should be queried.
905
935
  * @returns True, if outline is enabled.
906
936
  * @deprecated Use `isStrokeEnabled`.
907
937
  */
908
- isOutlineEnabled(id: DesignElementId): boolean;
938
+ isOutlineEnabled(id: DesignBlockId): boolean;
909
939
  /**
910
940
  * Set the outline width of the given design block.
911
941
  * @param id - The block whose outline width should be set.
912
942
  * @param width - The outline width to be set.
913
943
  * @deprecated Use `setStrokeWidth`.
914
944
  */
915
- setOutlineWidth(id: DesignElementId, width: number): void;
945
+ setOutlineWidth(id: DesignBlockId, width: number): void;
916
946
  /**
917
947
  * Get the outline width of the given design block.
918
948
  * @param id - The block whose outline width should be queried.
@@ -920,68 +950,222 @@ export declare class BlockAPI {
920
950
  * @deprecated Use the Stroke function
921
951
  * @deprecated Use `getStrokeWidth`.
922
952
  */
923
- getOutlineWidth(id: DesignElementId): number;
924
- }
925
-
926
- declare interface BlockEvent {
927
- block: Block;
928
- type: 'Created' | 'Updated' | 'Destroyed';
953
+ getOutlineWidth(id: DesignBlockId): number;
954
+ /**
955
+ * Query if the given block has fill color properties.
956
+ * @param id - The block to query.
957
+ * @returns true, if the block has fill color properties, an error otherwise.
958
+ */
959
+ hasFill(id: DesignBlockId): boolean;
960
+ /**
961
+ * Query if the fill of the given design block is enabled.
962
+ * @param id - The block whose fill state should be queried.
963
+ * @returns A result holding the fill state or an error.
964
+ */
965
+ isFillEnabled(id: DesignBlockId): boolean;
966
+ /**
967
+ * Enable or disable the fill of the given design block.
968
+ * @param id - The block whose fill should be enabled or disabled.
969
+ * @param enabled - If true, the fill will be enabled.
970
+ * @returns An empty result on success, an error otherwise.
971
+ */
972
+ setFillEnabled(id: DesignBlockId, enabled: boolean): void;
973
+ /**
974
+ * Set the fill type of the given design block.
975
+ * @param id - The block whose fill type should be set.
976
+ * @param type - The fill type to set.
977
+ * @returns An empty result on success, an error otherwise.
978
+ */
979
+ setFillType(id: DesignBlockId, fillType: FillType): void;
980
+ /**
981
+ * Get the fill type of the given design block.
982
+ * @param id - The block whose fill type should be queried.
983
+ * @returns The block's fill type or an error.
984
+ */
985
+ getFillType(id: DesignBlockId): FillType;
986
+ /**
987
+ * Set the fill color of the given design block.
988
+ * @param id - The block whose fill color should be set.
989
+ * @param r - The red color component in the range of 0 to 1.
990
+ * @param g - The green color component in the range of 0 to 1.
991
+ * @param b - The blue color component in the range of 0 to 1.
992
+ * @param a - The alpha color component in the range of 0 to 1.
993
+ * @returns An empty result on success, an error otherwise.
994
+ */
995
+ setFillSolidColor(id: DesignBlockId, r: number, b: number, g: number, a: number): void;
996
+ /**
997
+ * Get the fill color of the given design block.
998
+ * @param id - The block whose fill color should be queried.
999
+ * @returns A result holding the fill color or an error.
1000
+ */
1001
+ getFillSolidColor(id: DesignBlockId): RGBA;
1002
+ /**
1003
+ * Set the gradient type of the given design block.
1004
+ * @param id - The block whose gradient type should be set.
1005
+ * @param type - The gradient type.
1006
+ * @returns An empty result on success, an error otherwise.
1007
+ */
1008
+ setFillGradientType(id: DesignBlockId, gradientType: GradientType): void;
1009
+ /**
1010
+ * Get the gradient type of the given design block.
1011
+ * @param id - The block whose gradient type should be queried.
1012
+ * @returns The gradient type.
1013
+ */
1014
+ getFillGradientType(id: DesignBlockId): GradientType;
1015
+ /**
1016
+ * Add a gradient color stop on a design block.
1017
+ * @param id - The block on which a gradient color stop should be added.
1018
+ * @param stop - Where to add a color stop in the range 0 to 1.
1019
+ * @param r - The red color component in the range of 0 to 1.
1020
+ * @param g - The green color component in the range of 0 to 1.
1021
+ * @param b - The blue color component in the range of 0 to 1.
1022
+ * @param a - The alpha color component in the range of 0 to 1.
1023
+ * @returns An empty result on success, an error otherwise.
1024
+ */
1025
+ addFillGradientColorStop(id: DesignBlockId, stop: number, r: number, g: number, b: number, a: number): void;
1026
+ /**
1027
+ * Remove a previously gradient color stop on a design block.
1028
+ * @param id - The block from which to remvove the gradient color stop.
1029
+ * @param stop - The stop's position.
1030
+ * @returns An empty result on success, an error otherwise.
1031
+ */
1032
+ removeFillGradientColorStop(id: DesignBlockId, stop: number): void;
1033
+ /**
1034
+ * Get the gradient fill color stops of the given design block.
1035
+ * @param id - The block whose gradient color stop should be queried.
1036
+ * @returns All of the design block's gradient color stops.
1037
+ */
1038
+ getFillGradientColorStops(id: DesignBlockId): GradientstopRGBA[];
1039
+ /**
1040
+ * Set the gradient fill color stops of the given design block, overwriting previously set color stops.
1041
+ * @param id - The block whose gradient color stop should be set.
1042
+ * @param stops - The gradient color stops to set.
1043
+ * @returns An empty result on success, an error otherwise.
1044
+ */
1045
+ setFillGradientColorStops(id: DesignBlockId, stops: GradientstopRGBA[]): void;
1046
+ /**
1047
+ * Set the position of a gradient's control point.
1048
+ * Note that Different gradient types of different control points.
1049
+ * @param id - The block whose gradient control point should be set.
1050
+ * @param gradientControlPointType - The type of control point.
1051
+ * @param x - The horizontal component of the control point.
1052
+ * @param y - The vertical component of the control point.
1053
+ * @returns true if the control point was set, an error otherwise.
1054
+ */
1055
+ setFillGradientControlPoint(id: DesignBlockId, gradientControlPointType: GradientControlPointType, x: number, y: number): boolean;
1056
+ /**
1057
+ * Get the horizontal component of a gradient's control point.
1058
+ * @param id - The block whose gradient control point should be queried.
1059
+ * @param gradientControlPointType - The type of control point.
1060
+ * @returns The horizontal component of the control point, an error otherwise.
1061
+ */
1062
+ getFillGradientControlPointX(id: DesignBlockId, gradientControlPointType: GradientControlPointType): number;
1063
+ /**
1064
+ * Get the vertical component of a gradient's control point.
1065
+ * @param id - The block whose gradient control point should be queried.
1066
+ * @param gradientControlPointType - The type of control point.
1067
+ * @returns The vertical component of the control point, an error otherwise.
1068
+ */
1069
+ getFillGradientControlPointY(id: DesignBlockId, gradientControlPointType: GradientControlPointType): number;
1070
+ /**
1071
+ * Set a gradient's radius.
1072
+ * Note that Not all gradients have a radius.
1073
+ * @param id - The block whose gradient radius should be set.
1074
+ * @param radius - The gradient's radius.
1075
+ * @returns true if the control point was set, an error otherwise.
1076
+ */
1077
+ setFillGradientRadius(id: DesignBlockId, radius: number): boolean;
1078
+ /**
1079
+ * Get a gradient's radius.
1080
+ * Note that Not all gradients have a radius.
1081
+ * @param id - The block whose gradient radius should be queried.
1082
+ * @returns the gradient's radius, an error otherwise.
1083
+ */
1084
+ getFillGradientRadius(id: DesignBlockId): number;
929
1085
  }
930
1086
 
931
1087
  /**
932
1088
  * @public
933
1089
  */
934
- declare type BlockEvent_2 = {
935
- block: DesignElementId;
1090
+ export declare type BlockEvent = {
1091
+ block: DesignBlockId;
936
1092
  type: 'Created' | 'Updated' | 'Destroyed';
937
1093
  };
938
1094
 
1095
+ /** @public */
1096
+ declare interface BlockEvent_2 {
1097
+ block: Block;
1098
+ type: 'Created' | 'Updated' | 'Destroyed';
1099
+ }
1100
+
1101
+ /** @public */
939
1102
  declare type Callbacks = {
940
1103
  log?: Logger;
941
1104
  };
942
1105
 
943
- declare type Callbacks_2 = Callbacks & {
1106
+ /** @public */
1107
+ declare type Callbacks_2 = _EngineConfigTypes.Callbacks & {
944
1108
  onBack?: () => void;
945
1109
  onClose?: () => void;
946
1110
  onShare?: (s: string) => void | Promise<void>;
947
1111
  onSave?: (s: string) => void | Promise<void>;
948
1112
  onLoad?: (() => Promise<string>) | 'upload';
949
1113
  onDownload?: ((s: string) => void | Promise<void>) | 'download';
950
- onExport?: ((blobs: Blob[], options: ExportOptions_2) => void | Promise<void>) | 'download';
1114
+ onExport?: ((blobs: Blob[], options: ExportOptions) => void | Promise<void>) | 'download';
951
1115
  onUpload?: OnUploadCallback | 'local' | (Partial<OnUploadOptions> & {
952
1116
  callback: OnUploadCallback;
953
1117
  });
954
1118
  onUnsupportedBrowser?: () => void;
955
1119
  };
956
1120
 
957
- /** All components between 0 and 1 */
958
- declare interface CMYKColor {
1121
+ /**
1122
+ * All components between 0 and 1
1123
+ * @public
1124
+ */
1125
+ export declare interface CMYKColor {
959
1126
  c: number;
960
1127
  m: number;
961
1128
  y: number;
962
1129
  k: number;
963
1130
  }
964
1131
 
965
- declare type ColorDefinition = Preset & {
966
- value: ColorPaletteColor;
967
- };
968
-
969
1132
  /**
970
1133
  * A color definition for the custom color palette.
971
1134
  * The RGB and CMYK components must all be specified in the range [0-1].
1135
+ * @public
972
1136
  */
973
- declare type ColorPaletteColor = HexColorString | RGBColor | RGBAColor | SpotColor;
1137
+ declare type Color = HexColorString | RGBColor | RGBAColor | SpotColor;
974
1138
 
975
- declare type ColorPaletteDefinition = Preset & {
976
- entries: ColorPaletteColor[];
1139
+ /** @public */
1140
+ declare type ColorDefinition = Preset & {
1141
+ value: Color;
977
1142
  };
978
1143
 
979
- declare type Command = {
980
- identifier: string;
981
- argumentTypes: string[];
982
- returnType: string;
1144
+ /** @public */
1145
+ declare type ColorPaletteDefinition = Preset & {
1146
+ entries: Color[];
983
1147
  };
984
1148
 
1149
+ declare namespace ConfigTypes {
1150
+ export {
1151
+ _RequiredConfiguration as Configuration,
1152
+ Theme,
1153
+ Scale,
1154
+ PartialImageElement,
1155
+ I18n,
1156
+ A11y,
1157
+ OnUploadCallback,
1158
+ OnUploadOptions,
1159
+ Callbacks_2 as Callbacks,
1160
+ BleedMarginOptions,
1161
+ FontSizeOptions,
1162
+ UIOptionsForSingleDesignUnit,
1163
+ UIOptionsPerDesignUnit,
1164
+ ViewStyle
1165
+ }
1166
+ }
1167
+ export { ConfigTypes }
1168
+
985
1169
  /**
986
1170
  * @public
987
1171
  *
@@ -990,70 +1174,27 @@ declare type Command = {
990
1174
  * optional and what mandatory. This is Configuration, but `ui` is recursively
991
1175
  * optional, and all other props are non-recursively optional
992
1176
  */
993
- export declare type Configuration = Partial<DeepOptional<Configuration_2, 'ui'>>;
994
-
995
- declare interface Configuration_2 extends Configuration_3 {
996
- initialSceneString?: string;
997
- initialSceneURL?: string;
998
- initialImageURL?: string;
999
- locale: string;
1000
- theme: Theme;
1001
- devMode: boolean;
1002
- ui: UserInterface;
1003
- i18n: I18n;
1004
- a11y: A11y;
1005
- callbacks: Callbacks_2;
1006
- }
1177
+ export declare type Configuration = Partial<_DeepOptional<_RequiredConfiguration, 'ui'>>;
1007
1178
 
1008
1179
  /**
1180
+ * - Crop: Manual crop.
1181
+ * - Cover: Automatically cover the entire frame.
1182
+ * - Contain: Automatically contain content inside frame.
1183
+ *
1009
1184
  * @public
1010
1185
  */
1011
- declare interface Configuration_3 {
1012
- baseURL: string;
1013
- license?: string;
1014
- role: string;
1015
- featureFlags?: Record<string, string | boolean>;
1016
- extensions: Extensions;
1017
- core: Core;
1018
- scene: Scene;
1019
- page: Page;
1020
- assets: Assets;
1021
- assetSources: AssetSources;
1022
- presets: Presets;
1023
- variables: Variables;
1024
- callbacks: Callbacks;
1025
- /**
1026
- * The default font used by a text added to the scene. Needs to be the id of
1027
- * the font from a extension pack including namespace, e.g.
1028
- *
1029
- * '//ly.img.cesdk.fonts/roboto_regular'
1030
- *
1031
- * If not configured the fallback font is used.
1032
- */
1033
- defaultFont?: string;
1034
- }
1186
+ export declare type ContentFillMode = 'Crop' | 'Cover' | 'Contain';
1035
1187
 
1188
+ /** @public */
1036
1189
  declare type Core = {
1037
1190
  baseURL: string;
1038
1191
  };
1039
1192
 
1040
- declare interface CreateSceneOptions {
1041
- layout: SceneLayout;
1042
- }
1043
-
1044
1193
  /**
1045
1194
  * @public
1046
1195
  */
1047
1196
  declare class CreativeEditorSDK {
1048
1197
  #private;
1049
- static PositionMode: typeof PositionMode;
1050
- static SizeMode: typeof SizeMode;
1051
- static PropertyType: typeof PropertyType;
1052
- static DesignBlockType: typeof DesignBlockType;
1053
- static MimeType: typeof MimeType_2;
1054
- static StrokePosition: typeof StrokePosition;
1055
- static StrokeCornerGeometry: typeof StrokeCornerGeometry;
1056
- static StrokeStyle: typeof StrokeStyle;
1057
1198
  engine: API;
1058
1199
  /**
1059
1200
  * Exports one or multiple page(s) as an file in the given mimeType
@@ -1065,9 +1206,9 @@ declare class CreativeEditorSDK {
1065
1206
  *
1066
1207
  * @returns a promise with an object holding `blobs` of the export pages and the provided `options`.
1067
1208
  */
1068
- export(options: ExportOptions_2): Promise<{
1209
+ export(options: ExportOptions): Promise<{
1069
1210
  blobs: Blob[];
1070
- options: ExportOptions_2;
1211
+ options: ExportOptions;
1071
1212
  }>;
1072
1213
  /**
1073
1214
  * Load an encoded scene from the provided string.
@@ -1104,7 +1245,7 @@ declare class CreativeEditorSDK {
1104
1245
  * @returns a resolved promise if all variables were set successfully.
1105
1246
  */
1106
1247
  setVariableDefinitions(definitions: {
1107
- [id: string]: VariableDefinition;
1248
+ [id: string]: _EngineConfigTypes.VariableDefinition;
1108
1249
  }): Promise<void>;
1109
1250
  /**
1110
1251
  * Adds an image definition which can be used in the image library.
@@ -1114,7 +1255,7 @@ declare class CreativeEditorSDK {
1114
1255
  * @returns a resolved promise if all images were add successfully
1115
1256
  */
1116
1257
  setImageDefinitions(definitions: {
1117
- [id: string]: ImageDefinition;
1258
+ [id: string]: _EngineConfigTypes.ImageDefinition;
1118
1259
  }): Promise<void[]>;
1119
1260
  /**
1120
1261
  * Adds translations to be used by the editor.
@@ -1155,18 +1296,29 @@ declare class CreativeEditorSDK {
1155
1296
  }
1156
1297
  export default CreativeEditorSDK;
1157
1298
 
1158
- declare type DeepOptional<T, K extends keyof T> = Pick<DeepPartial<T>, K> & Omit<T, K>;
1299
+ /** @public */
1300
+ export declare type _DeepOptional<T, K extends keyof T> = Pick<_DeepPartial<T>, K> & Omit<T, K>;
1159
1301
 
1160
- /** Recursively makes all properties of an object Partial */
1161
- declare type DeepPartial<T> = {
1162
- [P in keyof T]?: DeepPartial<T[P]>;
1302
+ /**
1303
+ * Recursively makes all properties of an object Partial
1304
+ * @public
1305
+ */
1306
+ export declare type _DeepPartial<T> = {
1307
+ [P in keyof T]?: _DeepPartial<T[P]>;
1163
1308
  };
1164
1309
 
1310
+ /**
1311
+ * A numerical identifier for a design block
1312
+ * @public
1313
+ */
1314
+ export declare type DesignBlockId = number;
1315
+
1165
1316
  /**
1166
1317
  * @public
1167
1318
  */
1168
1319
  export declare enum DesignBlockType {
1169
1320
  Scene = "//ly.img.ubq/scene",
1321
+ Stack = "//ly.img.ubq/stack",
1170
1322
  Camera = "//ly.img.ubq/camera",
1171
1323
  Page = "//ly.img.ubq/page",
1172
1324
  Image = "//ly.img.ubq/image",
@@ -1182,16 +1334,220 @@ export declare enum DesignBlockType {
1182
1334
  Group = "//ly.img.ubq/group"
1183
1335
  }
1184
1336
 
1337
+ /** @public */
1338
+ export declare type DesignUnit = 'mm' | 'px' | 'in';
1339
+
1185
1340
  /**
1186
- * A numerical identifier for a design block
1187
1341
  * @public
1188
1342
  */
1189
- declare type DesignElementId = number;
1343
+ export declare class EditorAPI {
1344
+ #private;
1190
1345
 
1191
- declare enum DesignUnit {
1192
- Pixel = "px",
1193
- Millimeter = "mm",
1194
- Inch = "in"
1346
+ /**
1347
+ * Subscribe to changes to the editor state.
1348
+ * @param callback - This function is called at the end of the engine update, if the editor state has changed.
1349
+ * @returns A method to unsubscribe.
1350
+ */
1351
+ onStateChanged(callback: () => void): () => void;
1352
+ /**
1353
+ * Set the edit mode of the editor.
1354
+ * An edit mode defines what type of content can currently be edited by the user.
1355
+ * Hint: the initial edit mode is "Transform".
1356
+ * @param mode - "Transform", "Crop", "Text", or a custom value.
1357
+ */
1358
+ setEditMode(mode: 'Transform' | 'Crop' | 'Text' | string): void;
1359
+ /**
1360
+ * Get the current edit mode of the editor.
1361
+ * An edit mode defines what type of content can currently be edited by the user.
1362
+ * @returns "Transform", "Crop", "Text", or a custom value.
1363
+ */
1364
+ getEditMode(): 'Transform' | 'Crop' | 'Text' | string;
1365
+ /**
1366
+ * Get the type of cursor that should be displayed by the application.
1367
+ * @returns The cursor type.
1368
+ */
1369
+ getCursorType(): 'Arrow' | 'Move' | 'MoveNotPermitted' | 'Resize' | 'Rotate' | 'Text';
1370
+ /**
1371
+ * Get the rotation with which to render the mouse cursor.
1372
+ * @returns The angle in radians.
1373
+ */
1374
+ getCursorRotation(): number;
1375
+ /**
1376
+ * Get the current text cursor's x position in screen space.
1377
+ * @returns The text cursor's x position in screen space.
1378
+ */
1379
+ getTextCursorPositionInScreenSpaceX(): number;
1380
+ /**
1381
+ * Get the current text cursor's y position in screen space.
1382
+ * @returns The text cursor's y position in screen space.
1383
+ */
1384
+ getTextCursorPositionInScreenSpaceY(): number;
1385
+ /**
1386
+ * Sets the zoom level of the scene.
1387
+ * @param zoomLevel - The new zoom level.
1388
+ */
1389
+ setZoomLevel(zoomLevel?: number): void;
1390
+ /**
1391
+ * Query a camera zoom level.
1392
+ * @returns The zoom level of the block's (main) camera.
1393
+ */
1394
+ getZoomLevel(): number;
1395
+ /**
1396
+ * Adds a new history state to the stack, if undoable changes were made.
1397
+ */
1398
+ addUndoStep(): void;
1399
+ /**
1400
+ * Undo one step in the history if an undo step is available.
1401
+ */
1402
+ undo(): void;
1403
+ /**
1404
+ * Redo one step in the history if a redo step is available.
1405
+ */
1406
+ redo(): void;
1407
+ /**
1408
+ * If an undo step is available.
1409
+ *
1410
+ * @returns True if an undo step is available.
1411
+ */
1412
+ canUndo(): boolean;
1413
+ /**
1414
+ * If a redo step is available.
1415
+ *
1416
+ * @returns True if a redo step is available.
1417
+ */
1418
+ canRedo(): boolean;
1419
+ /**
1420
+ * Set a boolean setting.
1421
+ * @param keypath - The settings keypath, e.g. `ubq://doubleClickToCropEnabled`
1422
+ * @param value - The value to set.
1423
+ * @throws An error, if the keypath is invalid.
1424
+ */
1425
+ setSettingBool(keypath: string, value: boolean): void;
1426
+ /**
1427
+ * Get a boolean setting.
1428
+ * @param keypath - The settings keypath, e.g. `ubq://doubleClickToCropEnabled`
1429
+ * @throws An error, if the keypath is invalid.
1430
+ */
1431
+ getSettingBool(keypath: string): boolean;
1432
+ /**
1433
+ * Set an integer setting.
1434
+ * @param keypath - The settings keypath.
1435
+ * @param value - The value to set.
1436
+ * @throws An error, if the keypath is invalid.
1437
+ */
1438
+ setSettingInt(keypath: string, value: number): void;
1439
+ /**
1440
+ * Get an integer setting.
1441
+ * @param keypath - The settings keypath.
1442
+ * @throws An error, if the keypath is invalid.
1443
+ */
1444
+ getSettingInt(keypath: string): number;
1445
+ /**
1446
+ * Set a float setting.
1447
+ * @param keypath - The settings keypath, e.g. `ubq://positionSnappingThreshold`
1448
+ * @param value - The value to set.
1449
+ * @throws An error, if the keypath is invalid.
1450
+ */
1451
+ setSettingFloat(keypath: string, value: number): void;
1452
+ /**
1453
+ * Get a float setting.
1454
+ * @param keypath - The settings keypath, e.g. `ubq://positionSnappingThreshold`
1455
+ * @throws An error, if the keypath is invalid.
1456
+ */
1457
+ getSettingFloat(keypath: string): number;
1458
+ /**
1459
+ * Set a string setting.
1460
+ * @param keypath - The settings keypath, e.g. `ubq://license`
1461
+ * @param value - The value to set.
1462
+ * @throws An error, if the keypath is invalid.
1463
+ */
1464
+ setSettingString(keypath: string, value: string): void;
1465
+ /**
1466
+ * Get a string setting.
1467
+ * @param keypath - The settings keypath, e.g. `ubq://license`
1468
+ * @throws An error, if the keypath is invalid.
1469
+ */
1470
+ getSettingString(keypath: string): string;
1471
+ /**
1472
+ * Set a color setting.
1473
+ * @param keypath - The settings keypath, e.g. `ubq://highlightColor`.
1474
+ * @param r - The red color component in the range of 0 to 1.
1475
+ * @param g - The green color component in the range of 0 to 1.
1476
+ * @param b - The blue color component in the range of 0 to 1.
1477
+ * @param a - The alpha color component in the range of 0 to 1.
1478
+ */
1479
+ setSettingColorRGBA(keypath: string, r: number, g: number, b: number, a: number): void;
1480
+ /**
1481
+ * Get a color setting.
1482
+ * @param keypath - The settings keypath, e.g. `ubq://highlightColor`.
1483
+ * @returns A tuple of channels red, green, blue and alpha in the range of 0 to 1.
1484
+ */
1485
+ getSettingColorRGBA(keypath: string): RGBA;
1486
+ /**
1487
+ * Set an enum setting.
1488
+ * @param keypath - The settings keypath, e.g. `ubq://role`.
1489
+ * @param value - The enum value as string.
1490
+ */
1491
+ setSettingEnum(keypath: string, value: string): void;
1492
+ /**
1493
+ * Get an enum setting.
1494
+ * @param keypath - The settings keypath, e.g. `ubq://role`.
1495
+ * @returns The value as string.
1496
+ */
1497
+ getSettingEnum(keypath: string): string;
1498
+ }
1499
+
1500
+ declare namespace _EngineConfigTypes {
1501
+ export {
1502
+ HexColorString,
1503
+ Color,
1504
+ AssetSources,
1505
+ AssetSource,
1506
+ AssetResult,
1507
+ AssetsQueryResult,
1508
+ QueryData,
1509
+ Preset,
1510
+ VariableDefinition,
1511
+ ColorDefinition,
1512
+ ColorPaletteDefinition,
1513
+ PageFormatDefinition,
1514
+ TemplateDefinition,
1515
+ TypefaceDefinition,
1516
+ ImageDefinition,
1517
+ Presets,
1518
+ Variables,
1519
+ Core,
1520
+ Extensions,
1521
+ Scene,
1522
+ Page,
1523
+ Callbacks
1524
+ }
1525
+ }
1526
+ export { _EngineConfigTypes }
1527
+
1528
+ /** @public */
1529
+ export declare interface _EngineConfiguration {
1530
+ baseURL: string;
1531
+ license?: string;
1532
+ role: RoleString;
1533
+ featureFlags?: Record<string, string | boolean>;
1534
+ extensions: _EngineConfigTypes.Extensions;
1535
+ core: _EngineConfigTypes.Core;
1536
+ scene: _EngineConfigTypes.Scene;
1537
+ page: _EngineConfigTypes.Page;
1538
+ assetSources: _EngineConfigTypes.AssetSources;
1539
+ presets: _EngineConfigTypes.Presets;
1540
+ variables: _EngineConfigTypes.Variables;
1541
+ callbacks: _EngineConfigTypes.Callbacks;
1542
+ /**
1543
+ * The default font used by a text added to the scene. Needs to be the id of
1544
+ * the font from a extension pack including namespace, e.g.
1545
+ *
1546
+ * '//ly.img.cesdk.fonts/roboto_regular'
1547
+ *
1548
+ * If not configured the fallback font is used.
1549
+ */
1550
+ defaultFont?: string;
1195
1551
  }
1196
1552
 
1197
1553
  /**
@@ -1206,22 +1562,14 @@ export declare class EventAPI {
1206
1562
  * @param callback - The event callback. Events are bundled and sent at the end of each engine update.
1207
1563
  * @returns A method to unsubscribe.
1208
1564
  */
1209
- subscribe(blocks: DesignElementId[], callback: (events: BlockEvent_2[]) => void): () => void;
1565
+ subscribe(blocks: DesignBlockId[], callback: (events: BlockEvent[]) => void): () => void;
1210
1566
  }
1211
1567
 
1212
- declare type EventSubscription = number;
1213
-
1214
- declare type ExportFormat = 'image/png' | 'application/pdf';
1215
-
1216
- declare interface ExportOptions {
1217
- jpegQuality: number;
1218
- pngCompressionLevel: number;
1219
- useTargetSize: boolean;
1220
- targetWidth: number;
1221
- targetHeight: number;
1222
- }
1568
+ /** @public */
1569
+ declare type ExportFormat = 'image/png' | 'video/mp4' | 'application/pdf';
1223
1570
 
1224
- declare interface ExportOptions_2 {
1571
+ /** @public */
1572
+ export declare interface ExportOptions {
1225
1573
  /** The mime type of the exported blob */
1226
1574
  mimeType: MimeType_2;
1227
1575
  'image/png'?: {
@@ -1250,31 +1598,92 @@ declare interface ExportOptions_2 {
1250
1598
  pages?: number[];
1251
1599
  }
1252
1600
 
1601
+ /** @public */
1602
+ declare interface ExportOptions_2 {
1603
+ jpegQuality: number;
1604
+ pngCompressionLevel: number;
1605
+ useTargetSize: boolean;
1606
+ targetWidth: number;
1607
+ targetHeight: number;
1608
+ }
1609
+
1610
+ /** @public */
1611
+ declare interface ExportVideoOptions {
1612
+ h264Profile: number;
1613
+ h264Level: number;
1614
+ framerate: number;
1615
+ useTargetSize: boolean;
1616
+ targetWidth: number;
1617
+ targetHeight: number;
1618
+ }
1619
+
1620
+ /** @public */
1253
1621
  declare type Extensions = {
1254
1622
  baseURL: string;
1255
1623
  entries: string[];
1256
1624
  };
1257
1625
 
1626
+ /**
1627
+ * @public
1628
+ */
1629
+ export declare type FillType = 'Solid' | 'Gradient';
1630
+
1631
+ /** @public */
1258
1632
  declare interface Flip {
1259
1633
  horizontal: boolean;
1260
1634
  vertical: boolean;
1261
1635
  }
1262
1636
 
1263
- declare type FontStyle = 'normal' | 'italic';
1637
+ declare interface FontSizeOptions {
1638
+ /**
1639
+ * The font size options that can be selected from a dropdown in the UI.
1640
+ * Other font size values can be entered directly using the input field.
1641
+ */
1642
+ dropdownOptions: number[];
1643
+ }
1264
1644
 
1265
- declare type FontWeight = 'thin' | 'extraLight' | 'Light' | 'normal' | 'medium' | 'semiBold' | 'bold' | 'extraBold' | 'heavy';
1645
+ /** @public */
1646
+ export declare type FontStyle = 'normal' | 'italic';
1647
+
1648
+ /** @public */
1649
+ export declare type FontWeight = 'thin' | 'extraLight' | 'Light' | 'normal' | 'medium' | 'semiBold' | 'bold' | 'extraBold' | 'heavy';
1650
+
1651
+ /**
1652
+ * @public
1653
+ */
1654
+ export declare type GradientControlPointType = 'Start' | 'End' | 'Center';
1655
+
1656
+ /**
1657
+ * @public
1658
+ */
1659
+ export declare type GradientstopRGBA = [
1660
+ stop: number,
1661
+ r: number,
1662
+ g: number,
1663
+ b: number,
1664
+ a: number
1665
+ ];
1666
+
1667
+ /**
1668
+ * @public
1669
+ */
1670
+ export declare type GradientType = 'Linear' | 'Radial' | 'Conical';
1266
1671
 
1267
1672
  /**
1268
1673
  * A hexadecimal color value (RGB or RGBA) that starts with a '#'
1269
1674
  * @example #6686FF or #6686FFFF
1675
+ * @public
1270
1676
  */
1271
1677
  declare type HexColorString = string;
1272
1678
 
1273
- /** I18n Settings
1679
+ /**
1680
+ * I18n Settings
1274
1681
  * Note: this will append keys and not override keys
1682
+ * @public
1275
1683
  */
1276
1684
  declare type I18n = Record<string, Translations>;
1277
1685
 
1686
+ /** @public */
1278
1687
  declare type ImageDefinition = Preset & {
1279
1688
  imageURL: string;
1280
1689
  thumbnailURL?: string;
@@ -1285,7 +1694,8 @@ declare type ImageDefinition = Preset & {
1285
1694
  };
1286
1695
  };
1287
1696
 
1288
- declare interface ImageElement extends AssetElement {
1697
+ /** @public */
1698
+ export declare interface _ImageElement extends _AssetElement {
1289
1699
  previewUri?: string;
1290
1700
  size: {
1291
1701
  width: number;
@@ -1293,9 +1703,11 @@ declare interface ImageElement extends AssetElement {
1293
1703
  };
1294
1704
  }
1295
1705
 
1296
- declare type Logger = (message: string, level: LogLevel) => void;
1706
+ /** @public */
1707
+ export declare type Logger = (message: string, level: LogLevel) => void;
1297
1708
 
1298
- declare enum LogLevel {
1709
+ /** @public */
1710
+ export declare enum LogLevel {
1299
1711
  Info = "Info",
1300
1712
  Warning = "Warning",
1301
1713
  Error = "Error"
@@ -1306,37 +1718,34 @@ declare enum MimeType_2 {
1306
1718
  Png = "image/png",
1307
1719
  Jpeg = "image/jpeg",
1308
1720
  Tga = "image/x-tga",
1721
+ Mp4 = "video/mp4",
1309
1722
  Binary = "application/octet-stream",
1310
1723
  Pdf = "application/pdf",
1311
1724
  Zip = "application/zip"
1312
1725
  }
1313
1726
  export { MimeType_2 as MimeType }
1314
1727
 
1728
+ /** @public */
1315
1729
  declare enum NavigationPosition {
1316
1730
  Top = "top",
1317
1731
  Bottom = "bottom"
1318
1732
  }
1319
1733
 
1320
- declare interface NotificationEvent {
1321
- type: NotificationType;
1322
- i18n: string;
1323
- }
1324
-
1325
- declare enum NotificationType {
1326
- Information = 0,
1327
- Warning = 1,
1328
- Error = 2
1329
- }
1330
-
1734
+ /** @public */
1331
1735
  declare type OnUploadCallback = (file: File, onProgress: (progress: number) => void) => Promise<PartialImageElement>;
1332
1736
 
1737
+ /** @public */
1333
1738
  declare type OnUploadOptions = {
1334
1739
  supportedMimeTypes: string[];
1335
1740
  };
1336
1741
 
1337
- /** Turn value at K of T into a Partial */
1338
- declare type Optional<T, K extends keyof T> = Omit<T, K> & Partial<T>;
1742
+ /**
1743
+ * Turn value at K of T into a Partial
1744
+ * @public
1745
+ */
1746
+ export declare type Optional<T, K extends keyof T> = Omit<T, K> & Partial<T>;
1339
1747
 
1748
+ /** @public */
1340
1749
  declare type Page = {
1341
1750
  title: {
1342
1751
  /**
@@ -1355,6 +1764,7 @@ declare type Page = {
1355
1764
  dimOutOfPageAreas?: boolean;
1356
1765
  };
1357
1766
 
1767
+ /** @public */
1358
1768
  declare type PageFormatDefinition = Preset & {
1359
1769
  width: number;
1360
1770
  height: number;
@@ -1363,25 +1773,25 @@ declare type PageFormatDefinition = Preset & {
1363
1773
  bleedMargin?: number;
1364
1774
  };
1365
1775
 
1776
+ /** @public */
1366
1777
  declare enum PanelPosition {
1367
1778
  Left = "left",
1368
1779
  Right = "right"
1369
1780
  }
1370
1781
 
1371
- declare type PartialImageElement = Optional<ImageElement, 'size'>;
1782
+ /** @public */
1783
+ declare type PartialImageElement = Optional<_ImageElement, 'size'>;
1372
1784
 
1373
1785
  /**
1786
+ * - Absolute: Position in absolute design units.
1787
+ * - Percent: Position in relation to the block's parent's size in percent, where 1.0 means 100%.
1788
+ * - Auto: Position is automatically determined
1789
+ *
1374
1790
  * @public
1375
1791
  */
1376
- export declare enum PositionMode {
1377
- /** Position in absolute design units. */
1378
- Absolute = "Absolute",
1379
- /** Position in relation to the block's parent's size in percent, where 1.0 means 100%. */
1380
- Percent = "Percent",
1381
- /** Position is automatically determined. */
1382
- Undefined = "Auto"
1383
- }
1792
+ export declare type PositionMode = 'Absolute' | 'Percent' | 'Auto';
1384
1793
 
1794
+ /** @public */
1385
1795
  declare type Preset = {
1386
1796
  meta?: {
1387
1797
  default?: boolean;
@@ -1390,6 +1800,7 @@ declare type Preset = {
1390
1800
  };
1391
1801
  };
1392
1802
 
1803
+ /** @public */
1393
1804
  declare type Presets = {
1394
1805
  colors?: {
1395
1806
  [id: string]: ColorDefinition;
@@ -1411,38 +1822,12 @@ declare type Presets = {
1411
1822
  };
1412
1823
  };
1413
1824
 
1414
- /**
1415
- * @public
1416
- */
1417
- export declare enum PropertyType {
1418
- Bool = "Bool",
1419
- Int = "Int",
1420
- Float = "Float",
1421
- String = "String",
1422
- Color = "Color",
1423
- Enum = "Enum",
1424
- Struct = "Struct"
1425
- }
1825
+ /** @public */
1826
+ export declare type PropertyType = 'Bool' | 'Int' | 'Float' | 'String' | 'Color' | 'Enum' | 'Struct';
1426
1827
 
1427
- /**
1428
- * Please read this before you change anything in this file.
1429
- *
1430
- * Types in here are a sub-set of the types in `api/asset.ts` and are meant to be
1431
- * exposed publicly.
1432
- *
1433
- * We do not use the types from `asset.ts` directly to handle (copy&paste) the
1434
- * syncing of the public type declarations and what we actually use in the config.
1435
- * This makes it easier to ensure that the customer is using the correct types and
1436
- * any missmatch between this and the `asset.ts` file will be shown by our
1437
- * type-checker.
1438
- *
1439
- * PLEASE NOTE: If you change anything in here, make the according changes in
1440
- * the `release/types.d.ts` file.
1441
- */
1828
+ /** @public */
1442
1829
  declare interface QueryData {
1443
- /**
1444
- * A query string used for (fuzzy) searching of labels and tags
1445
- */
1830
+ /** A query string used for (fuzzy) searching of labels and tags */
1446
1831
  query?: string;
1447
1832
  /**
1448
1833
  * The number of results queried. How many assets shall be returned regardless
@@ -1451,43 +1836,59 @@ declare interface QueryData {
1451
1836
  * Together with `page` this can be used for pagination.
1452
1837
  */
1453
1838
  perPage: number;
1454
- /**
1455
- * The current page queried for paginated views.
1456
- */
1839
+ /** The current page queried for paginated views. */
1457
1840
  page: number;
1458
1841
  }
1459
1842
 
1460
- declare type RGBA = [r: number, g: number, b: number, a: number];
1843
+ /** @public */
1844
+ export declare interface _RequiredConfiguration extends _EngineConfiguration {
1845
+ initialSceneString?: string;
1846
+ initialSceneURL?: string;
1847
+ initialImageURL?: string;
1848
+ locale: string;
1849
+ theme: Theme;
1850
+ devMode: boolean;
1851
+ ui: UserInterface;
1852
+ i18n: I18n;
1853
+ a11y: A11y;
1854
+ callbacks: Callbacks_2;
1855
+ }
1856
+
1857
+ /**
1858
+ * @public
1859
+ */
1860
+ export declare type RGBA = [r: number, g: number, b: number, a: number];
1461
1861
 
1462
- /** All components between 0 and 1 */
1463
- declare interface RGBAColor {
1862
+ /**
1863
+ * All components between 0 and 1
1864
+ * @public
1865
+ */
1866
+ export declare interface RGBAColor {
1464
1867
  r: number;
1465
1868
  g: number;
1466
1869
  b: number;
1467
1870
  a: number;
1468
1871
  }
1469
1872
 
1470
- /** All components between 0 and 1 */
1471
- declare interface RGBColor {
1873
+ /**
1874
+ * All components between 0 and 1
1875
+ * @public
1876
+ */
1877
+ export declare interface RGBColor {
1472
1878
  r: number;
1473
1879
  g: number;
1474
1880
  b: number;
1475
1881
  }
1476
1882
 
1477
- /**
1478
- * Enum for the engine-internal numerical representations of the roles
1479
- */
1480
- declare const enum Role {
1481
- Creator = 0,
1482
- Adopter = 1,
1483
- Viewer = 2,
1484
- Presenter = 3
1485
- }
1883
+ /** @public */
1884
+ export declare type RoleString = 'Creator' | 'Adopter' | 'Viewer' | 'Presenter';
1486
1885
 
1886
+ /** @public */
1487
1887
  declare type Scale = 'normal' | 'large';
1488
1888
 
1489
- /** Export Settings
1490
- *
1889
+ /**
1890
+ * Export Settings
1891
+ * @public
1491
1892
  */
1492
1893
  declare type Scene = {
1493
1894
  maskSpotColor?: SpotColor;
@@ -1519,7 +1920,7 @@ export declare class SceneAPI {
1519
1920
  * @param sceneContent - The scene file contents, a base64 string.
1520
1921
  * @returns A handle to the loaded scene.
1521
1922
  */
1522
- loadFromString(sceneContent: string): Promise<DesignElementId>;
1923
+ loadFromString(sceneContent: string): Promise<DesignBlockId>;
1523
1924
  /**
1524
1925
  * Load a scene from the URL to the scene file.
1525
1926
  * The scene file will be fetched asynchronously by the engine. This requires continous `render`
@@ -1527,7 +1928,7 @@ export declare class SceneAPI {
1527
1928
  * @param url - The URL of the scene file.
1528
1929
  * @returns scene A promise that resolves once the scene was loaded or rejects with an error otherwise.
1529
1930
  */
1530
- loadFromURL(url: string): Promise<DesignElementId>;
1931
+ loadFromURL(url: string): Promise<DesignBlockId>;
1531
1932
  /**
1532
1933
  * Serializes the current scene into a string. Selection is discarded.
1533
1934
  * @returns A promise that resolves with a string on success or an error on failure.
@@ -1546,7 +1947,7 @@ export declare class SceneAPI {
1546
1947
  * Create a new scene, along with its own camera.
1547
1948
  * @returns The scenes handle.
1548
1949
  */
1549
- create(): DesignElementId;
1950
+ create(): DesignBlockId;
1550
1951
  /**
1551
1952
  * Loads the given image and creates a scene with a single page showing the image.
1552
1953
  * Fetching the image may take an arbitrary amount of time, so the scene isn't immediately
@@ -1556,84 +1957,86 @@ export declare class SceneAPI {
1556
1957
  * @param pixelScaleFactor - The displays pixel scale factor.
1557
1958
  * @returns A promise that resolves with the scene ID on success or rejected with an error otherwise.
1558
1959
  */
1559
- createFromImage(url: string, dpi?: number, pixelScaleFactor?: number): Promise<DesignElementId>;
1960
+ createFromImage(url: string, dpi?: number, pixelScaleFactor?: number): Promise<DesignBlockId>;
1560
1961
  /**
1561
1962
  * Return the currently active scene.
1562
1963
  * @returns The scene or null, if none was created yet.
1563
1964
  */
1564
- get(): DesignElementId | null;
1565
- }
1566
-
1567
- declare enum SceneLayout {
1568
- Free = 0,
1569
- VerticalStack = 1,
1570
- HorizontalStack = 2
1965
+ get(): DesignBlockId | null;
1966
+ /**
1967
+ * Applies the contents of the given template scene to the currently loaded scene.
1968
+ * This loads the template scene while keeping the design unit and page dimensions
1969
+ * of the current scene. Page contents remain centered when the pages are resized
1970
+ * to fit the new dimensions.
1971
+ * @param content - The template scene file contents, a base64 string.
1972
+ * @returns A Promise that resolves once the template was applied or rejects if there was an error.
1973
+ */
1974
+ applyTemplateFromString(content: string): Promise<void>;
1975
+ /**
1976
+ * Applies the contents of the given template scene to the currently loaded scene.
1977
+ * This loads the template scene while keeping the design unit and page dimensions
1978
+ * of the current scene. Page contents remain centered when the pages are resized
1979
+ * to fit the new dimensions.
1980
+ * @param url - The url to the template scene file.
1981
+ * @returns A Promise that resolves once the template was applied or rejects if there was an error.
1982
+ */
1983
+ applyTemplateFromURL(url: string): Promise<void>;
1984
+ /**
1985
+ * Converts all values of the current scene into the given design unit.
1986
+ * @param designUnit - The new design unit of the scene
1987
+ */
1988
+ unstable_setDesignUnit(designUnit: DesignUnit): void;
1989
+ /**
1990
+ * Returns the design unit of the current scene.
1991
+ * @returns The current design unit.
1992
+ */
1993
+ unstable_getDesignUnit(): DesignUnit;
1571
1994
  }
1572
1995
 
1573
1996
  /**
1997
+ * - Absolute: Size in absolute design units.
1998
+ * - Percent: Size in relation to the block's parent's size in percent, where 1.0 means 100%.
1999
+ * - Auto: Size is automatically determined
2000
+ *
1574
2001
  * @public
1575
2002
  */
1576
- export declare enum SizeMode {
1577
- /** Size in absolute design units. */
1578
- Absolute = "Absolute",
1579
- /** Size in relation to the block's parent's size in percent, where 1.0 means 100%. */
1580
- Percent = "Percent",
1581
- /** Size is determined by the block's content. */
1582
- Auto = "Auto"
1583
- }
2003
+ export declare type SizeMode = 'Absolute' | 'Percent' | 'Auto';
1584
2004
 
1585
- declare type SpotColor = {
2005
+ /** @public */
2006
+ export declare interface SpotColor {
1586
2007
  name: string;
1587
- rgbApproximation: RGBColor;
2008
+ rgbApproximation: RGBAColor;
1588
2009
  cmykApproximation: CMYKColor;
1589
- };
1590
-
1591
- /**
1592
- * @public
1593
- */
1594
- export declare enum StrokeCornerGeometry {
1595
- Bevel = "Bevel",
1596
- Miter = "Miter",
1597
- Round = "Round"
1598
2010
  }
1599
2011
 
1600
- /**
1601
- * @public
1602
- */
1603
- export declare enum StrokePosition {
1604
- Center = "Center",
1605
- Inner = "Inner",
1606
- Outer = "Outer"
1607
- }
2012
+ /** @public */
2013
+ export declare type StrokeCornerGeometry = 'Bevel' | 'Miter' | 'Round';
1608
2014
 
1609
- /**
1610
- * @public
1611
- */
1612
- export declare enum StrokeStyle {
1613
- Dashed = "Dashed",
1614
- DashedRound = "DashedRound",
1615
- Dotted = "Dotted",
1616
- LongDashed = "LongDashed",
1617
- LongDashedRound = "LongDashedRound",
1618
- Solid = "Solid"
1619
- }
2015
+ /** @public */
2016
+ export declare type StrokePosition = 'Center' | 'Inner' | 'Outer';
1620
2017
 
2018
+ /** @public */
2019
+ export declare type StrokeStyle = 'Dashed' | 'DashedRound' | 'Dotted' | 'LongDashed' | 'LongDashedRound' | 'Solid';
2020
+
2021
+ /** @public */
2022
+ declare type Subscription = number;
2023
+
2024
+ /** @public */
1621
2025
  declare type TemplateDefinition = Preset & {
2026
+ label: string;
1622
2027
  scene: string | URL | (() => Promise<string>);
1623
2028
  thumbnailURL?: string | URL;
1624
2029
  };
1625
2030
 
2031
+ /** @public */
1626
2032
  declare type Theme = 'light' | 'dark';
1627
2033
 
1628
- declare interface Translations {
2034
+ /** @public */
2035
+ export declare interface Translations {
1629
2036
  [key: string]: string | Translations;
1630
2037
  }
1631
2038
 
1632
- declare interface TypeDescription {
1633
- name: string;
1634
- members: Array<TypeMemberDescription>;
1635
- }
1636
-
2039
+ /** @public */
1637
2040
  declare type TypefaceDefinition = Preset & {
1638
2041
  family: string;
1639
2042
  fonts: [
@@ -1645,21 +2048,21 @@ declare type TypefaceDefinition = Preset & {
1645
2048
  ];
1646
2049
  };
1647
2050
 
1648
- declare interface TypeMemberDescription {
1649
- name: string;
1650
- type: string;
1651
- props: Array<TypeProp>;
2051
+ declare interface UIOptionsForSingleDesignUnit {
2052
+ bleedMargin: BleedMarginOptions;
1652
2053
  }
1653
2054
 
1654
- declare interface TypeProp {
1655
- key: string;
1656
- value: number | string;
2055
+ declare interface UIOptionsPerDesignUnit {
2056
+ mm: UIOptionsForSingleDesignUnit;
2057
+ px: UIOptionsForSingleDesignUnit;
2058
+ in: UIOptionsForSingleDesignUnit;
1657
2059
  }
1658
2060
 
1659
- declare interface UserInterface {
2061
+ /** @public */
2062
+ export declare interface UserInterface {
1660
2063
  baseURL: string;
1661
2064
  scale?: Scale;
1662
- elements: UserInterfaceElements;
2065
+ elements: UserInterfaceElements_2;
1663
2066
  stylesheets?: {
1664
2067
  disableShadowDOM?: boolean;
1665
2068
  disableTagInsertion?: boolean;
@@ -1668,11 +2071,49 @@ declare interface UserInterface {
1668
2071
  hide?: boolean;
1669
2072
  }
1670
2073
 
2074
+ /** @public */
2075
+ declare interface UserInterfaceAssetLibrary extends UserInterfaceElement {
2076
+ }
2077
+
2078
+ /** @public */
2079
+ declare interface UserInterfaceCustomAction {
2080
+ callback: () => void | Promise<void>;
2081
+ label: string;
2082
+ iconName: UserInterfaceCustomActionIconName;
2083
+ }
2084
+
2085
+ /** @public */
2086
+ declare type UserInterfaceCustomActionIconName = 'default' | 'download' | 'upload' | 'save';
2087
+
2088
+ /** @public */
1671
2089
  declare interface UserInterfaceElement {
1672
2090
  show?: boolean;
1673
2091
  }
1674
2092
 
1675
- declare interface UserInterfaceElements {
2093
+ declare namespace UserInterfaceElements {
2094
+ export {
2095
+ PanelPosition,
2096
+ NavigationPosition,
2097
+ UserInterfaceElement,
2098
+ UserInterfaceInspectorBlocks,
2099
+ UserInterfaceInspectorBlock,
2100
+ UserInterfaceInspectorBlockText,
2101
+ UserInterfaceInspectorBlockImage,
2102
+ UserInterfaceInspector,
2103
+ UserInterfaceSettings,
2104
+ UserInterfaceAssetLibrary,
2105
+ ExportFormat,
2106
+ UserInterfaceExportAction,
2107
+ UserInterfaceCustomActionIconName,
2108
+ UserInterfaceCustomAction,
2109
+ UserInterfaceNavigation,
2110
+ UserInterfaceElements_2 as UserInterfaceElements
2111
+ }
2112
+ }
2113
+ export { UserInterfaceElements }
2114
+
2115
+ /** @public */
2116
+ declare interface UserInterfaceElements_2 {
1676
2117
  view?: {
1677
2118
  adopter?: {
1678
2119
  style?: 'default' | 'advanced';
@@ -1681,7 +2122,7 @@ declare interface UserInterfaceElements {
1681
2122
  panels?: {
1682
2123
  inspector?: UserInterfaceInspector | boolean;
1683
2124
  settings?: UserInterfaceSettings | boolean;
1684
- assetLibrary?: UserInterfaceSettings | boolean;
2125
+ assetLibrary?: UserInterfaceAssetLibrary | boolean;
1685
2126
  };
1686
2127
  templates?: UserInterfaceElement | boolean;
1687
2128
  dock?: {
@@ -1689,25 +2130,38 @@ declare interface UserInterfaceElements {
1689
2130
  hideLabels?: boolean;
1690
2131
  };
1691
2132
  libraries?: {
2133
+ template?: UserInterfaceElement | boolean;
1692
2134
  image?: UserInterfaceElement | boolean;
1693
2135
  text?: UserInterfaceElement | boolean;
1694
2136
  element?: UserInterfaceElement | boolean;
2137
+ panel: {
2138
+ insert: {
2139
+ floating?: boolean;
2140
+ };
2141
+ replace: {
2142
+ floating?: boolean;
2143
+ };
2144
+ };
1695
2145
  };
1696
2146
  blocks?: UserInterfaceInspectorBlocks;
1697
2147
  navigation: UserInterfaceNavigation;
1698
2148
  }
1699
2149
 
2150
+ /** @public */
1700
2151
  declare interface UserInterfaceExportAction extends UserInterfaceElement {
1701
2152
  format?: ExportFormat[];
1702
2153
  }
1703
2154
 
2155
+ /** @public */
1704
2156
  declare interface UserInterfaceInspector extends UserInterfaceElement {
1705
2157
  position?: PanelPosition;
1706
2158
  }
1707
2159
 
2160
+ /** @public */
1708
2161
  declare interface UserInterfaceInspectorBlock {
1709
2162
  }
1710
2163
 
2164
+ /** @public */
1711
2165
  declare interface UserInterfaceInspectorBlockImage extends UserInterfaceInspectorBlock {
1712
2166
  crop?: UserInterfaceElement | boolean;
1713
2167
  filters?: UserInterfaceElement | boolean;
@@ -1716,6 +2170,7 @@ declare interface UserInterfaceInspectorBlockImage extends UserInterfaceInspecto
1716
2170
  blur?: UserInterfaceElement | boolean;
1717
2171
  }
1718
2172
 
2173
+ /** @public */
1719
2174
  declare interface UserInterfaceInspectorBlocks {
1720
2175
  opacity?: UserInterfaceElement | boolean;
1721
2176
  transform?: UserInterfaceElement | boolean;
@@ -1723,12 +2178,14 @@ declare interface UserInterfaceInspectorBlocks {
1723
2178
  '//ly.img.ubq/text': UserInterfaceInspectorBlockText;
1724
2179
  }
1725
2180
 
2181
+ /** @public */
1726
2182
  declare interface UserInterfaceInspectorBlockText extends UserInterfaceInspectorBlock {
1727
2183
  advanced?: UserInterfaceElement | boolean;
1728
2184
  color?: UserInterfaceElement | boolean;
1729
2185
  backgroundColor?: UserInterfaceElement | boolean;
1730
2186
  }
1731
2187
 
2188
+ /** @public */
1732
2189
  declare interface UserInterfaceNavigation extends UserInterfaceElement {
1733
2190
  position: NavigationPosition;
1734
2191
  title?: string | null;
@@ -1740,9 +2197,11 @@ declare interface UserInterfaceNavigation extends UserInterfaceElement {
1740
2197
  share: UserInterfaceElement | boolean;
1741
2198
  load: UserInterfaceElement | boolean;
1742
2199
  download: UserInterfaceElement | boolean;
2200
+ custom: UserInterfaceCustomAction[];
1743
2201
  };
1744
2202
  }
1745
2203
 
2204
+ /** @public */
1746
2205
  declare interface UserInterfaceSettings extends UserInterfaceElement {
1747
2206
  }
1748
2207
 
@@ -1776,29 +2235,33 @@ export declare class VariableAPI {
1776
2235
  remove(key: string): void;
1777
2236
  }
1778
2237
 
2238
+ /** @public */
1779
2239
  declare type VariableDefinition = Preset & {
1780
2240
  value: string | number;
1781
2241
  };
1782
2242
 
2243
+ /** @public */
1783
2244
  declare type Variables = {
1784
2245
  [id: string]: VariableDefinition;
1785
2246
  };
1786
2247
 
2248
+ /** @public */
1787
2249
  declare interface Vec2 {
1788
2250
  x: number;
1789
2251
  y: number;
1790
2252
  }
1791
2253
 
2254
+ /** @public */
1792
2255
  declare interface Vec3 {
1793
2256
  x: number;
1794
2257
  y: number;
1795
2258
  z: number;
1796
2259
  }
1797
2260
 
1798
- declare interface Vector<T> {
1799
- size: () => number;
1800
- get: (index: number) => T;
1801
- delete: () => void;
2261
+ /** @public */
2262
+ declare enum ViewStyle {
2263
+ Advanced = "advanced",
2264
+ Default = "default"
1802
2265
  }
1803
2266
 
1804
2267
  export { }