@cesdk/engine 1.15.0 → 1.16.0-rc.1

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
@@ -14,23 +14,9 @@ export declare interface Asset {
14
14
  /** Groups of the asset. */
15
15
  groups?: AssetGroups;
16
16
  /** Asset-specific and custom meta information */
17
- meta?: {
18
- /** The mime type of this asset or the data behind the asset's uri. */
19
- mimeType?: string;
20
- /** The type id of the design block that should be created from this asset. */
21
- blockType?: string;
22
- fillType?: string;
23
- shapeType?: string;
24
- kind?: string;
25
- uri?: string;
26
- thumbUri?: string;
27
- previewUri?: string;
28
- filename?: string;
29
- vectorPath?: string;
30
- width?: number;
31
- height?: number;
32
- duration?: string;
33
- } & Record<string, unknown>;
17
+ meta?: AssetMetaData;
18
+ /** Structured asset-specific data */
19
+ payload?: AssetPayload;
34
20
  }
35
21
 
36
22
  /**
@@ -156,6 +142,24 @@ export declare class AssetAPI {
156
142
 
157
143
  }
158
144
 
145
+ /**
146
+ * Asset Color payload CMYK representation
147
+ * @public
148
+ */
149
+ export declare interface AssetCMYKColor {
150
+ colorSpace: 'CMYK';
151
+ c: number;
152
+ m: number;
153
+ y: number;
154
+ k: number;
155
+ }
156
+
157
+ /**
158
+ * Asset Color payload
159
+ * @public
160
+ */
161
+ export declare type AssetColor = AssetRGBColor | AssetCMYKColor | AssetSpotColor;
162
+
159
163
  /**
160
164
  * Definition of an asset used if an asset is added to an asset source.
161
165
  * @public
@@ -186,6 +190,36 @@ export declare interface AssetDefinition extends Asset {
186
190
  */
187
191
  export declare type AssetGroups = string[];
188
192
 
193
+ /**
194
+ * AssetColor Meta information
195
+ * @public
196
+ */
197
+ export declare type AssetMetaData = {
198
+ /** The mime type of this asset or the data behind the asset's uri. */
199
+ mimeType?: string;
200
+ /** The type id of the design block that should be created from this asset. */
201
+ blockType?: string;
202
+ fillType?: string;
203
+ shapeType?: string;
204
+ kind?: string;
205
+ uri?: string;
206
+ thumbUri?: string;
207
+ previewUri?: string;
208
+ filename?: string;
209
+ vectorPath?: string;
210
+ width?: number;
211
+ height?: number;
212
+ duration?: string;
213
+ } & Record<string, unknown>;
214
+
215
+ /**
216
+ * Asset payload
217
+ * @public
218
+ */
219
+ export declare interface AssetPayload {
220
+ color?: AssetColor;
221
+ }
222
+
189
223
  /**
190
224
  * Defines a request for querying assets
191
225
  * @public
@@ -269,6 +303,17 @@ declare interface AssetResultUtm {
269
303
  medium: string;
270
304
  }
271
305
 
306
+ /**
307
+ * Asset Color payload RGB representation
308
+ * @public
309
+ */
310
+ export declare interface AssetRGBColor {
311
+ colorSpace: 'sRGB';
312
+ r: number;
313
+ g: number;
314
+ b: number;
315
+ }
316
+
272
317
  /**
273
318
  * A source of assets
274
319
  * @public
@@ -328,6 +373,17 @@ export declare interface AssetSource {
328
373
 
329
374
  declare type _AssetSource = AssetSource;
330
375
 
376
+ /**
377
+ * Asset Color payload SpotColor representation
378
+ * @public
379
+ */
380
+ export declare interface AssetSpotColor {
381
+ colorSpace: 'SpotColor';
382
+ name: string;
383
+ externalReference: string;
384
+ representation: AssetRGBColor | AssetCMYKColor;
385
+ }
386
+
331
387
  /**
332
388
  * Return type of a `findAssets` query.
333
389
  * @public
@@ -527,10 +583,10 @@ export declare class BlockAPI {
527
583
  findByType(type: DesignBlockType): DesignBlockId[];
528
584
  /**
529
585
  * Finds all blocks with the given kind.
530
- * @param type - The kind to search for.
586
+ * @param kind - The kind to search for.
531
587
  * @returns A list of block ids.
532
588
  */
533
- findByKind(kind: DesignBlockType): DesignBlockId[];
589
+ findByKind(kind: string): DesignBlockId[];
534
590
  /**
535
591
  * Return all blocks currently known to the engine.
536
592
  * @returns A list of block ids.
@@ -1054,6 +1110,20 @@ export declare class BlockAPI {
1054
1110
  * @returns The value of the property.
1055
1111
  */
1056
1112
  getString(id: DesignBlockId, property: string): string;
1113
+ /**
1114
+ * Set a color property of the given design block to the given value.
1115
+ * @param id - The block whose property should be set.
1116
+ * @param property - The name of the property to set.
1117
+ * @param value - The value to set.
1118
+ */
1119
+ setColor(id: DesignBlockId, property: string, value: Color): void;
1120
+ /**
1121
+ * Get the value of a color property of the given design block.
1122
+ * @param id - The block whose property should be queried.
1123
+ * @param property - The name of the property to query.
1124
+ * @returns The value of the property.
1125
+ */
1126
+ getColor(id: DesignBlockId, property: string): Color;
1057
1127
  /**
1058
1128
  * Set a color property of the given design block to the given value.
1059
1129
  * @param id - The block whose property should be set.
@@ -1062,6 +1132,7 @@ export declare class BlockAPI {
1062
1132
  * @param g - The green color component in the range of 0 to 1.
1063
1133
  * @param b - The blue color component in the range of 0 to 1.
1064
1134
  * @param a - The alpha color component in the range of 0 to 1.
1135
+ * @deprecated Use setColor() instead.
1065
1136
  */
1066
1137
  setColorRGBA(id: DesignBlockId, property: string, r: number, g: number, b: number, a?: number): void;
1067
1138
  /**
@@ -1069,6 +1140,7 @@ export declare class BlockAPI {
1069
1140
  * @param id - The block whose property should be queried.
1070
1141
  * @param property - The name of the property to query.
1071
1142
  * @returns A tuple of channels red, green, blue and alpha in the range of 0 to 1.
1143
+ * @deprecated Use getColor() instead.
1072
1144
  */
1073
1145
  getColorRGBA(id: DesignBlockId, property: string): RGBA;
1074
1146
  /**
@@ -1077,6 +1149,7 @@ export declare class BlockAPI {
1077
1149
  * @param property - The name of the property to set.
1078
1150
  * @param name - The name of the spot color.
1079
1151
  * @param tint - The tint factor in the range of 0 to 1.
1152
+ * @deprecated Use setColor() instead.
1080
1153
  */
1081
1154
  setColorSpot(id: DesignBlockId, property: string, name: string, tint?: number): void;
1082
1155
  /**
@@ -1084,6 +1157,7 @@ export declare class BlockAPI {
1084
1157
  * @param id - The block whose property should be queried.
1085
1158
  * @param property - The name of the property to query.
1086
1159
  * @returns The name of the spot color.
1160
+ * @deprecated Use getColor() instead.
1087
1161
  */
1088
1162
  getColorSpotName(id: DesignBlockId, property: string): string;
1089
1163
  /**
@@ -1091,6 +1165,7 @@ export declare class BlockAPI {
1091
1165
  * @param id - The block whose property should be queried.
1092
1166
  * @param property - The name of the property to query.
1093
1167
  * @returns The tint factor of the spot color.
1168
+ * @deprecated Use getColor() instead.
1094
1169
  */
1095
1170
  getColorSpotTint(id: DesignBlockId, property: string): number;
1096
1171
  /**
@@ -1405,12 +1480,14 @@ export declare class BlockAPI {
1405
1480
  * @param g - The green color component in the range of 0 to 1.
1406
1481
  * @param b - The blue color component in the range of 0 to 1.
1407
1482
  * @param a - The alpha color component in the range of 0 to 1.
1483
+ * @deprecated Use `Use setColor() with the key path 'backgroundColor/color' instead.`.
1408
1484
  */
1409
1485
  setBackgroundColorRGBA(id: DesignBlockId, r: number, g: number, b: number, a?: number): void;
1410
1486
  /**
1411
1487
  * Get the background color of the given design block.
1412
1488
  * @param id - The block whose background color should be queried.
1413
1489
  * @returns The background color.
1490
+ * @deprecated Use `Use getColor() with the key path 'backgroundColor/color' instead.`.
1414
1491
  */
1415
1492
  getBackgroundColorRGBA(id: DesignBlockId): RGBA;
1416
1493
  /**
@@ -1450,14 +1527,28 @@ export declare class BlockAPI {
1450
1527
  * @param g - The green color component in the range of 0 to 1.
1451
1528
  * @param b - The blue color component in the range of 0 to 1.
1452
1529
  * @param a - The alpha color component in the range of 0 to 1.
1530
+ * @deprecated Use setStrokeColor() instead.
1453
1531
  */
1454
1532
  setStrokeColorRGBA(id: DesignBlockId, r: number, g: number, b: number, a?: number): void;
1533
+ /**
1534
+ * Set the stroke color of the given design block.
1535
+ * @param id - The block whose stroke color should be set.
1536
+ * @param color - The color to set.
1537
+ */
1538
+ setStrokeColor(id: DesignBlockId, color: Color): void;
1455
1539
  /**
1456
1540
  * Get the stroke color of the given design block.
1457
- * @param id - The block whose background color should be queried.
1458
- * @returns The background color.
1541
+ * @param id - The block whose stroke color should be queried.
1542
+ * @returns The stroke color.
1543
+ * @deprecated Use getStrokeColor() instead.
1459
1544
  */
1460
1545
  getStrokeColorRGBA(id: DesignBlockId): RGBA;
1546
+ /**
1547
+ * Get the stroke color of the given design block.
1548
+ * @param id - The block whose stroke color should be queried.
1549
+ * @returns The stroke color.
1550
+ */
1551
+ getStrokeColor(id: DesignBlockId): Color;
1461
1552
  /**
1462
1553
  * Set the stroke width of the given design block.
1463
1554
  * @param id - The block whose stroke width should be set.
@@ -1531,14 +1622,28 @@ export declare class BlockAPI {
1531
1622
  * @param g - The green color component in the range of 0 to 1.
1532
1623
  * @param b - The blue color component in the range of 0 to 1.
1533
1624
  * @param a - The alpha color component in the range of 0 to 1.
1625
+ * @deprecated Use setDropShadowColor() instead.
1534
1626
  */
1535
1627
  setDropShadowColorRGBA(id: DesignBlockId, r: number, g: number, b: number, a?: number): void;
1628
+ /**
1629
+ * Set the drop shadow color of the given design block.
1630
+ * @param id - The block whose drop shadow color should be set.
1631
+ * @param color - The color to set.
1632
+ */
1633
+ setDropShadowColor(id: DesignBlockId, color: Color): void;
1536
1634
  /**
1537
1635
  * Get the drop shadow color of the given design block.
1538
- * @param id - The block whose background color should be queried.
1539
- * @returns The background color.
1636
+ * @param id - The block whose drop shadow color should be queried.
1637
+ * @returns The drop shadow color.
1638
+ * @deprecated Use getDropShadowColor() instead.
1540
1639
  */
1541
1640
  getDropShadowColorRGBA(id: DesignBlockId): RGBA;
1641
+ /**
1642
+ * Get the drop shadow color of the given design block.
1643
+ * @param id - The block whose drop shadow color should be queried.
1644
+ * @returns The drop shadow color.
1645
+ */
1646
+ getDropShadowColor(id: DesignBlockId): Color;
1542
1647
  /**
1543
1648
  * Set the drop shadow's X offset of the given design block.
1544
1649
  * @param id - The block whose drop shadow's X offset should be set.
@@ -1659,7 +1764,7 @@ export declare class BlockAPI {
1659
1764
  * If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected grapheme range.
1660
1765
  * If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
1661
1766
  */
1662
- setTextColor(id: DesignBlockId, color: RGBAColor | SpotColor, from?: number, to?: number): void;
1767
+ setTextColor(id: DesignBlockId, color: Color, from?: number, to?: number): void;
1663
1768
  /**
1664
1769
  * Returns the ordered unique list of colors of the text in the selected range.
1665
1770
  * @param block - The text block whose colors should be returned.
@@ -1670,7 +1775,7 @@ export declare class BlockAPI {
1670
1775
  * If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected grapheme range.
1671
1776
  * If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
1672
1777
  */
1673
- getTextColors(id: DesignBlockId, from?: number, to?: number): Array<RGBAColor | SpotColor>;
1778
+ getTextColors(id: DesignBlockId, from?: number, to?: number): Array<Color>;
1674
1779
  /**
1675
1780
  * Returns the ordered unique list of font weights of the text in the selected range.
1676
1781
  * @param block - The text block whose font weights should be returned.
@@ -2294,17 +2399,39 @@ declare interface ChannelSync<Out, In = Out> extends Channel<Out, In> {
2294
2399
  value: () => Out;
2295
2400
  }
2296
2401
 
2402
+ /**
2403
+ * @public
2404
+ */
2405
+ export declare type CMYK = [c: number, m: number, y: number, k: number];
2406
+
2297
2407
  /**
2298
2408
  * All components between 0 and 1
2299
2409
  * @public
2300
2410
  */
2301
2411
  export declare interface CMYKColor {
2412
+ /** Cyan */
2302
2413
  c: number;
2414
+ /** Magenta */
2303
2415
  m: number;
2416
+ /** Yellow */
2304
2417
  y: number;
2418
+ /** Black */
2305
2419
  k: number;
2420
+ /** The tint factor */
2421
+ tint: number;
2306
2422
  }
2307
2423
 
2424
+ /**
2425
+ * A type alias for all color types supported by the engine.
2426
+ * @public
2427
+ */
2428
+ export declare type Color = RGBAColor | CMYKColor | SpotColor;
2429
+
2430
+ /**
2431
+ * @public
2432
+ */
2433
+ export declare type ColorSpace = 'sRGB' | 'CMYK' | 'SpotColor';
2434
+
2308
2435
  /**
2309
2436
  * Asset results that are returned from the engine.
2310
2437
  *
@@ -2728,7 +2855,7 @@ export declare type CutoutType = 'Solid' | 'Dashed';
2728
2855
  /**
2729
2856
  * @public
2730
2857
  */
2731
- export declare type DefaultAssetSourceId = 'ly.img.sticker' | 'ly.img.vectorpath' | 'ly.img.filter.lut' | 'ly.img.filter.duotone';
2858
+ export declare type DefaultAssetSourceId = 'ly.img.sticker' | 'ly.img.vectorpath' | 'ly.img.filter.lut' | 'ly.img.filter.duotone' | 'ly.img.colors.defaultPalette';
2732
2859
 
2733
2860
  /**
2734
2861
  * @public
@@ -2929,6 +3056,18 @@ export declare class EditorAPI {
2929
3056
  * @throws An error, if the keypath is invalid.
2930
3057
  */
2931
3058
  getSettingString(keypath: SettingsString): string;
3059
+ /**
3060
+ * Set a color setting.
3061
+ * @param keypath - The settings keypath, e.g. `highlightColor`.
3062
+ * @param value - The The value to set.
3063
+ */
3064
+ setSettingColor(keypath: SettingsColor, value: Color): void;
3065
+ /**
3066
+ * Get a color setting.
3067
+ * @param keypath - The settings keypath, e.g. `highlightColor`.
3068
+ * @throws An error, if the keypath is invalid.
3069
+ */
3070
+ getSettingColor(keypath: SettingsColor): Color;
2932
3071
  /**
2933
3072
  * Set a color setting.
2934
3073
  * @param keypath - The settings keypath, e.g. `highlightColor`.
@@ -2936,12 +3075,14 @@ export declare class EditorAPI {
2936
3075
  * @param g - The green color component in the range of 0 to 1.
2937
3076
  * @param b - The blue color component in the range of 0 to 1.
2938
3077
  * @param a - The alpha color component in the range of 0 to 1.
3078
+ * @deprecated Use setSettingColor() instead.
2939
3079
  */
2940
3080
  setSettingColorRGBA(keypath: SettingsColorRGBA, r: number, g: number, b: number, a?: number): void;
2941
3081
  /**
2942
3082
  * Get a color setting.
2943
3083
  * @param keypath - The settings keypath, e.g. `highlightColor`.
2944
3084
  * @returns A tuple of channels red, green, blue and alpha in the range of 0 to 1.
3085
+ * @deprecated Use getSettingColor() instead.
2945
3086
  */
2946
3087
  getSettingColorRGBA(keypath: SettingsColorRGBA): RGBA;
2947
3088
  /**
@@ -3032,6 +3173,13 @@ export declare class EditorAPI {
3032
3173
  * @returns A result holding a float array of the four color components.
3033
3174
  */
3034
3175
  getSpotColorRGBA(name: string): RGBA;
3176
+ /**
3177
+ * Queries the CMYK representation set for a spot color.
3178
+ * If the value of the queried spot color has not been set yet, returns the default CMYK representation (of magenta).
3179
+ * @param name - The name of a spot color.
3180
+ * @returns A result holding a float array of the four color components.
3181
+ */
3182
+ getSpotColorCMYK(name: string): CMYK;
3035
3183
  /**
3036
3184
  * Sets the RGB representation of a spot color.
3037
3185
  * Use this function to both create a new spot color or update an existing spot color.
@@ -3041,6 +3189,16 @@ export declare class EditorAPI {
3041
3189
  * @param b - The blue color component in the range of 0 to 1.
3042
3190
  */
3043
3191
  setSpotColorRGB(name: string, r: number, g: number, b: number): void;
3192
+ /**
3193
+ * Sets the CMYK representation of a spot color.
3194
+ * Use this function to both create a new spot color or update an existing spot color.
3195
+ * @param name - The name of a spot color.
3196
+ * @param c - The cyan color component in the range of 0 to 1.
3197
+ * @param m - The magenta color component in the range of 0 to 1.
3198
+ * @param y - The yellow color component in the range of 0 to 1.
3199
+ * @param k - The key color component in the range of 0 to 1.
3200
+ */
3201
+ setSpotColorCMYK(name: string, c: number, m: number, y: number, k: number): void;
3044
3202
  /**
3045
3203
  * Removes a spot color from the list of set spot colors.
3046
3204
  * @param name - The name of a spot color.
@@ -3060,6 +3218,15 @@ export declare class EditorAPI {
3060
3218
  * @returns The color spot name.
3061
3219
  */
3062
3220
  getSpotColorForCutoutType(type: CutoutType): string;
3221
+ /**
3222
+ * Converts a color to the given color space.
3223
+ * @param color - The color to convert.
3224
+ * @param colorSpace - The color space to convert to.
3225
+ * @returns The converted color.
3226
+ */
3227
+ convertColorToColorSpace(color: Color, colorSpace: 'sRGB'): RGBAColor;
3228
+ convertColorToColorSpace(color: Color, colorSpace: 'CMYK'): CMYKColor;
3229
+ convertColorToColorSpace(color: Color, colorSpace: ColorSpace): never;
3063
3230
  }
3064
3231
 
3065
3232
  /**
@@ -3170,7 +3337,7 @@ export declare type FontWeight = 'thin' | 'extraLight' | 'Light' | 'normal' | 'm
3170
3337
  /** @public */
3171
3338
  export declare interface GradientColorStop {
3172
3339
  /** A color value within a gradient. */
3173
- color: RGBAColor | SpotColor;
3340
+ color: Color;
3174
3341
  /** The relative position of the color within the gradient in the range [0, 1]. */
3175
3342
  stop: number;
3176
3343
  }
@@ -3407,9 +3574,13 @@ export declare type RGBA = [r: number, g: number, b: number, a: number];
3407
3574
  * @public
3408
3575
  */
3409
3576
  export declare interface RGBAColor {
3577
+ /** Red */
3410
3578
  r: number;
3579
+ /** Green */
3411
3580
  g: number;
3581
+ /** Blue */
3412
3582
  b: number;
3583
+ /** Alpha */
3413
3584
  a: number;
3414
3585
  }
3415
3586
 
@@ -3418,8 +3589,11 @@ export declare interface RGBAColor {
3418
3589
  * @public
3419
3590
  */
3420
3591
  export declare interface RGBColor {
3592
+ /** Red */
3421
3593
  r: number;
3594
+ /** Green */
3422
3595
  g: number;
3596
+ /** Blue */
3423
3597
  b: number;
3424
3598
  }
3425
3599
 
@@ -3532,20 +3706,22 @@ export declare class SceneAPI {
3532
3706
  */
3533
3707
  getPages(): DesignBlockId[];
3534
3708
  /**
3535
- * Sets the zoom level of the active scene.
3536
- * Only has an effect if the zoom level is not handled by the UI.
3709
+ * Set the zoom level of the scene, e.g., for headless versions.
3710
+ * This only shows an effect if the zoom level is not handled/overwritten by the UI.
3711
+ * Setting a zoom level of 2.0f results in one dot in the design to be two pixels on the screen.
3537
3712
  *
3538
3713
  * @param zoomLevel - The new zoom level.
3539
3714
  */
3540
3715
  setZoomLevel(zoomLevel?: number): void;
3541
3716
  /**
3542
- * Query a camera zoom level of the active scene.
3717
+ * Get the zoom level of the scene or for a camera in the scene in unit `dpx/dot`. A zoom level of 2.0 results in one pixel in the design to be two pixels
3718
+ * on the screen.
3543
3719
  * @returns The zoom level of the block's camera.
3544
3720
  */
3545
3721
  getZoomLevel(): number;
3546
3722
  /**
3547
3723
  * Sets the zoom and focus to show a block.
3548
- * Only has an effect if the zoom level is not handled by the UI.
3724
+ * This only shows an effect if the zoom level is not handled/overwritten by the UI.
3549
3725
  * Without padding, this results in a tight view on the block.
3550
3726
  *
3551
3727
  * @param id - The block that should be focused on.
@@ -3558,7 +3734,7 @@ export declare class SceneAPI {
3558
3734
  zoomToBlock(id: DesignBlockId, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): Promise<void>;
3559
3735
  /**
3560
3736
  * Continually adjusts the zoom level to fit the width or height of a block's axis-aligned bounding box.
3561
- * Only has an effect if the zoom level is not handled by the UI.
3737
+ * This only shows an effect if the zoom level is not handled/overwritten by the UI.
3562
3738
  * Without padding, this results in a tight view on the block.
3563
3739
  * No more than one block per scene can have zoom auto-fit enabled.
3564
3740
  * Calling `setZoomLevel` or `zoomToBlock` disables the continuous adjustment.
@@ -3571,7 +3747,7 @@ export declare class SceneAPI {
3571
3747
  enableZoomAutoFit(id: DesignBlockId, axis: 'Horizontal' | 'Vertical', paddingBefore?: number, paddingAfter?: number): void;
3572
3748
  /**
3573
3749
  * Continually adjusts the zoom level to fit the width or height of a block's axis-aligned bounding box.
3574
- * Only has an effect if the zoom level is not handled by the UI.
3750
+ * This only shows an effect if the zoom level is not handled/overwritten by the UI.
3575
3751
  * Without padding, this results in a tight view on the block.
3576
3752
  * Calling `setZoomLevel` or `zoomToBlock` disables the continuous adjustment.
3577
3753
  *
@@ -3586,17 +3762,69 @@ export declare class SceneAPI {
3586
3762
  /**
3587
3763
  * Disables any previously set zoom auto-fit.
3588
3764
  *
3589
- * @param blockOrScene - The scene or a block in the scene for which to disable a zoom auto-fit.
3765
+ * @param blockOrScene - The scene or a block in the scene for which to disable zoom auto-fit.
3590
3766
  */
3591
3767
  disableZoomAutoFit(blockOrScene: DesignBlockId): void;
3592
3768
  /**
3593
3769
  * Queries whether zoom auto-fit is enabled.
3594
3770
  *
3595
- * @param blockOrScene - The scene or a block in the scene for which to disable a zoom auto-fit.
3771
+ * @param blockOrScene - The scene or a block in the scene for which to query the zoom auto-fit.
3596
3772
  * @returns True if the given block has auto-fit set or the scene contains a block for which auto-fit is set, false
3597
3773
  * otherwise.
3598
3774
  */
3599
3775
  isZoomAutoFitEnabled(blockOrScene: DesignBlockId): boolean;
3776
+ /**
3777
+ * Continually ensures the camera position to be within the width and height of a block's axis-aligned bounding box.
3778
+ * Without padding, this results in a tight clamp on the block. With padding, the padded part of the
3779
+ * block is ensured to be visible. No more than one block per scene can have camera position clamping enabled.
3780
+ *
3781
+ * @param id - The block for which the camera position is adjusted to, usually, the scene or a page.
3782
+ * @param paddingLeft - Optional padding in screen pixels to the left of the block.
3783
+ * @param paddingTop - Optional padding in screen pixels to the top of the block.
3784
+ * @param paddingRight - Optional padding in screen pixels to the right of the block.
3785
+ * @param paddingBottom - Optional padding in screen pixels to the bottom of the block.
3786
+ * @param scaledPaddingLeft - Optional padding in pixels to the left of the block that scales with the zoom level.
3787
+ * @param scaledPaddingTop - Optional padding in pixels to the top of the block that scales with the zoom level.
3788
+ * @param scaledPaddingRight - Optional padding in pixels to the right of the block that scales with the zoom level.
3789
+ * @param scaledPaddingBottom - Optional padding in pixels to the bottom of the block that scales with the zoom level.
3790
+ */
3791
+ unstable_enableCameraPositionClamping(id: DesignBlockId, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number, scaledPaddingLeft?: number, scaledPaddingTop?: number, scaledPaddingRight?: number, scaledPaddingBottom?: number): void;
3792
+ /**
3793
+ * Disables any previously set position clamping for the current scene.
3794
+ */
3795
+ unstable_disableCameraPositionClamping(): void;
3796
+ /**
3797
+ * Queries whether position clamping is enabled.
3798
+ *
3799
+ * @param blockOrScene - Optionally, the scene or a block in the scene for which to query the position clamping.
3800
+ * @returns True if the given block has position clamping set or the scene contains a block for which position clamping is set, false
3801
+ * otherwise.
3802
+ */
3803
+ unstable_isCameraPositionClampingEnabled(blockOrScene?: number | null): boolean;
3804
+ /**
3805
+ * Continually ensures the zoom level of the camera in the active scene to be in the given range.
3806
+ *
3807
+ * @param id - The block for which the camera zoom limits are adjusted to, usually, the scene or a page.
3808
+ * @param minZoomLimit - The minimum zoom level limit when zooming out, unlimited when negative.
3809
+ * @param maxZoomLimit - The maximum zoom level limit when zooming in, unlimited when negative.
3810
+ * @param paddingLeft - Optional padding in screen pixels to the left of the block. Only applied when the block is not a camera.
3811
+ * @param paddingTop - Optional padding in screen pixels to the top of the block. Only applied when the block is not a camera.
3812
+ * @param paddingRight - Optional padding in screen pixels to the right of the block. Only applied when the block is not a camera.
3813
+ * @param paddingBottom - Optional padding in screen pixels to the bottom of the block. Only applied when the block is not a camera.
3814
+ *
3815
+ */
3816
+ unstable_enableCameraZoomClamping(id: DesignBlockId, minZoomLimit?: number, maxZoomLimit?: number, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): void;
3817
+ /**
3818
+ * Disables any previously set zoom clamping for the current scene.
3819
+ */
3820
+ unstable_disableCameraZoomClamping(): void;
3821
+ /**
3822
+ * Queries whether zoom clamping is enabled.
3823
+ *
3824
+ * @param blockOrScene - Optionally, the scene or a block for which to query the zoom clamping.
3825
+ * @returns True if the given block has zoom clamping set or the scene contains a block for which zoom clamping is set, false otherwise.
3826
+ */
3827
+ unstable_isCameraZoomClampingEnabled(blockOrScene?: number | null): boolean;
3600
3828
  /**
3601
3829
  * Subscribe to changes to the zoom level.
3602
3830
  * @param callback - This function is called at the end of the engine update, if the zoom level has changed.
@@ -3627,13 +3855,21 @@ export declare type SceneMode = 'Design' | 'Video';
3627
3855
  /** @public */
3628
3856
  export declare type SettingsBool = 'doubleClickToCropEnabled' | 'features/effectsEnabled' | 'features/hspSelectiveAdjustmentsEnabled' | 'features/layerListEnabled' | 'features/singlePageModeEnabled' | 'features/templatingEnabled' | 'page/dimOutOfPageAreas' | 'page/title/show' | 'placeholderControls/showButton' | 'placeholderControls/showOverlay' | 'showBuildVersion' | 'touch/dragStartCanSelect' | 'touch/singlePointPanning' | 'trackActivePage' | ArbitraryString;
3629
3857
 
3630
- /** @public */
3631
- export declare type SettingsColorRGBA = 'clearColor' | 'errorStateColor' | 'highlightColor' | 'page/title/color' | 'placeholderHighlightColor' | 'progressColor' | ArbitraryString;
3858
+ /** @public
3859
+ */
3860
+ declare type SettingsColor = 'clearColor' | 'errorStateColor' | 'highlightColor' | 'page/title/color' | 'placeholderHighlightColor' | 'progressColor' | ArbitraryString;
3861
+
3862
+ /** @public
3863
+ * @deprecated Use SettingsColor instead.
3864
+ */
3865
+ export declare type SettingsColorRGBA = SettingsColor;
3632
3866
 
3633
3867
  /** @public */
3634
3868
  export declare type SettingsEnum = {
3635
3869
  role: RoleString;
3636
3870
  doubleClickSelectionMode: 'Direct' | 'Hierarchical';
3871
+ 'touch/pinchAction': 'None' | 'Zoom' | 'Scale';
3872
+ 'touch/rotateAction': 'None' | 'Rotate';
3637
3873
  [key: ArbitraryString]: string;
3638
3874
  };
3639
3875
 
@@ -3675,10 +3911,8 @@ declare type Source<T> = (handler: Handler<T>) => UnsubscribeFn;
3675
3911
  /** @public */
3676
3912
  export declare interface SpotColor {
3677
3913
  name: string;
3678
- }
3679
-
3680
- declare interface SpotColorLookup {
3681
- getSpotColorRGBA(name: string): [r: number, g: number, b: number, a: number];
3914
+ tint: number;
3915
+ externalReference: string;
3682
3916
  }
3683
3917
 
3684
3918
  /** @public */