@cesdk/node 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.
@@ -2240,17 +2345,39 @@ export declare interface BlockEvent {
2240
2345
  type: 'Created' | 'Updated' | 'Destroyed';
2241
2346
  }
2242
2347
 
2348
+ /**
2349
+ * @public
2350
+ */
2351
+ export declare type CMYK = [c: number, m: number, y: number, k: number];
2352
+
2243
2353
  /**
2244
2354
  * All components between 0 and 1
2245
2355
  * @public
2246
2356
  */
2247
2357
  export declare interface CMYKColor {
2358
+ /** Cyan */
2248
2359
  c: number;
2360
+ /** Magenta */
2249
2361
  m: number;
2362
+ /** Yellow */
2250
2363
  y: number;
2364
+ /** Black */
2251
2365
  k: number;
2366
+ /** The tint factor */
2367
+ tint: number;
2252
2368
  }
2253
2369
 
2370
+ /**
2371
+ * A type alias for all color types supported by the engine.
2372
+ * @public
2373
+ */
2374
+ export declare type Color = RGBAColor | CMYKColor | SpotColor;
2375
+
2376
+ /**
2377
+ * @public
2378
+ */
2379
+ export declare type ColorSpace = 'sRGB' | 'CMYK' | 'SpotColor';
2380
+
2254
2381
  /**
2255
2382
  * Asset results that are returned from the engine.
2256
2383
  *
@@ -2651,7 +2778,7 @@ export declare type CutoutType = 'Solid' | 'Dashed';
2651
2778
  /**
2652
2779
  * @public
2653
2780
  */
2654
- export declare type DefaultAssetSourceId = 'ly.img.sticker' | 'ly.img.vectorpath' | 'ly.img.filter.lut' | 'ly.img.filter.duotone';
2781
+ export declare type DefaultAssetSourceId = 'ly.img.sticker' | 'ly.img.vectorpath' | 'ly.img.filter.lut' | 'ly.img.filter.duotone' | 'ly.img.colors.defaultPalette';
2655
2782
 
2656
2783
  /**
2657
2784
  * @public
@@ -2852,6 +2979,18 @@ export declare class EditorAPI {
2852
2979
  * @throws An error, if the keypath is invalid.
2853
2980
  */
2854
2981
  getSettingString(keypath: SettingsString): string;
2982
+ /**
2983
+ * Set a color setting.
2984
+ * @param keypath - The settings keypath, e.g. `highlightColor`.
2985
+ * @param value - The The value to set.
2986
+ */
2987
+ setSettingColor(keypath: SettingsColor, value: Color): void;
2988
+ /**
2989
+ * Get a color setting.
2990
+ * @param keypath - The settings keypath, e.g. `highlightColor`.
2991
+ * @throws An error, if the keypath is invalid.
2992
+ */
2993
+ getSettingColor(keypath: SettingsColor): Color;
2855
2994
  /**
2856
2995
  * Set a color setting.
2857
2996
  * @param keypath - The settings keypath, e.g. `highlightColor`.
@@ -2859,12 +2998,14 @@ export declare class EditorAPI {
2859
2998
  * @param g - The green color component in the range of 0 to 1.
2860
2999
  * @param b - The blue color component in the range of 0 to 1.
2861
3000
  * @param a - The alpha color component in the range of 0 to 1.
3001
+ * @deprecated Use setSettingColor() instead.
2862
3002
  */
2863
3003
  setSettingColorRGBA(keypath: SettingsColorRGBA, r: number, g: number, b: number, a?: number): void;
2864
3004
  /**
2865
3005
  * Get a color setting.
2866
3006
  * @param keypath - The settings keypath, e.g. `highlightColor`.
2867
3007
  * @returns A tuple of channels red, green, blue and alpha in the range of 0 to 1.
3008
+ * @deprecated Use getSettingColor() instead.
2868
3009
  */
2869
3010
  getSettingColorRGBA(keypath: SettingsColorRGBA): RGBA;
2870
3011
  /**
@@ -2955,6 +3096,13 @@ export declare class EditorAPI {
2955
3096
  * @returns A result holding a float array of the four color components.
2956
3097
  */
2957
3098
  getSpotColorRGBA(name: string): RGBA;
3099
+ /**
3100
+ * Queries the CMYK representation set for a spot color.
3101
+ * If the value of the queried spot color has not been set yet, returns the default CMYK representation (of magenta).
3102
+ * @param name - The name of a spot color.
3103
+ * @returns A result holding a float array of the four color components.
3104
+ */
3105
+ getSpotColorCMYK(name: string): CMYK;
2958
3106
  /**
2959
3107
  * Sets the RGB representation of a spot color.
2960
3108
  * Use this function to both create a new spot color or update an existing spot color.
@@ -2964,6 +3112,16 @@ export declare class EditorAPI {
2964
3112
  * @param b - The blue color component in the range of 0 to 1.
2965
3113
  */
2966
3114
  setSpotColorRGB(name: string, r: number, g: number, b: number): void;
3115
+ /**
3116
+ * Sets the CMYK representation of a spot color.
3117
+ * Use this function to both create a new spot color or update an existing spot color.
3118
+ * @param name - The name of a spot color.
3119
+ * @param c - The cyan color component in the range of 0 to 1.
3120
+ * @param m - The magenta color component in the range of 0 to 1.
3121
+ * @param y - The yellow color component in the range of 0 to 1.
3122
+ * @param k - The key color component in the range of 0 to 1.
3123
+ */
3124
+ setSpotColorCMYK(name: string, c: number, m: number, y: number, k: number): void;
2967
3125
  /**
2968
3126
  * Removes a spot color from the list of set spot colors.
2969
3127
  * @param name - The name of a spot color.
@@ -2983,6 +3141,15 @@ export declare class EditorAPI {
2983
3141
  * @returns The color spot name.
2984
3142
  */
2985
3143
  getSpotColorForCutoutType(type: CutoutType): string;
3144
+ /**
3145
+ * Converts a color to the given color space.
3146
+ * @param color - The color to convert.
3147
+ * @param colorSpace - The color space to convert to.
3148
+ * @returns The converted color.
3149
+ */
3150
+ convertColorToColorSpace(color: Color, colorSpace: 'sRGB'): RGBAColor;
3151
+ convertColorToColorSpace(color: Color, colorSpace: 'CMYK'): CMYKColor;
3152
+ convertColorToColorSpace(color: Color, colorSpace: ColorSpace): never;
2986
3153
  }
2987
3154
 
2988
3155
  /**
@@ -3093,7 +3260,7 @@ export declare type FontWeight = 'thin' | 'extraLight' | 'Light' | 'normal' | 'm
3093
3260
  /** @public */
3094
3261
  export declare interface GradientColorStop {
3095
3262
  /** A color value within a gradient. */
3096
- color: RGBAColor | SpotColor;
3263
+ color: Color;
3097
3264
  /** The relative position of the color within the gradient in the range [0, 1]. */
3098
3265
  stop: number;
3099
3266
  }
@@ -3230,9 +3397,13 @@ export declare type RGBA = [r: number, g: number, b: number, a: number];
3230
3397
  * @public
3231
3398
  */
3232
3399
  export declare interface RGBAColor {
3400
+ /** Red */
3233
3401
  r: number;
3402
+ /** Green */
3234
3403
  g: number;
3404
+ /** Blue */
3235
3405
  b: number;
3406
+ /** Alpha */
3236
3407
  a: number;
3237
3408
  }
3238
3409
 
@@ -3241,8 +3412,11 @@ export declare interface RGBAColor {
3241
3412
  * @public
3242
3413
  */
3243
3414
  export declare interface RGBColor {
3415
+ /** Red */
3244
3416
  r: number;
3417
+ /** Green */
3245
3418
  g: number;
3419
+ /** Blue */
3246
3420
  b: number;
3247
3421
  }
3248
3422
 
@@ -3355,20 +3529,22 @@ export declare class SceneAPI {
3355
3529
  */
3356
3530
  getPages(): DesignBlockId[];
3357
3531
  /**
3358
- * Sets the zoom level of the active scene.
3359
- * Only has an effect if the zoom level is not handled by the UI.
3532
+ * Set the zoom level of the scene, e.g., for headless versions.
3533
+ * This only shows an effect if the zoom level is not handled/overwritten by the UI.
3534
+ * Setting a zoom level of 2.0f results in one dot in the design to be two pixels on the screen.
3360
3535
  *
3361
3536
  * @param zoomLevel - The new zoom level.
3362
3537
  */
3363
3538
  setZoomLevel(zoomLevel?: number): void;
3364
3539
  /**
3365
- * Query a camera zoom level of the active scene.
3540
+ * 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
3541
+ * on the screen.
3366
3542
  * @returns The zoom level of the block's camera.
3367
3543
  */
3368
3544
  getZoomLevel(): number;
3369
3545
  /**
3370
3546
  * Sets the zoom and focus to show a block.
3371
- * Only has an effect if the zoom level is not handled by the UI.
3547
+ * This only shows an effect if the zoom level is not handled/overwritten by the UI.
3372
3548
  * Without padding, this results in a tight view on the block.
3373
3549
  *
3374
3550
  * @param id - The block that should be focused on.
@@ -3381,7 +3557,7 @@ export declare class SceneAPI {
3381
3557
  zoomToBlock(id: DesignBlockId, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): Promise<void>;
3382
3558
  /**
3383
3559
  * Continually adjusts the zoom level to fit the width or height of a block's axis-aligned bounding box.
3384
- * Only has an effect if the zoom level is not handled by the UI.
3560
+ * This only shows an effect if the zoom level is not handled/overwritten by the UI.
3385
3561
  * Without padding, this results in a tight view on the block.
3386
3562
  * No more than one block per scene can have zoom auto-fit enabled.
3387
3563
  * Calling `setZoomLevel` or `zoomToBlock` disables the continuous adjustment.
@@ -3394,7 +3570,7 @@ export declare class SceneAPI {
3394
3570
  enableZoomAutoFit(id: DesignBlockId, axis: 'Horizontal' | 'Vertical', paddingBefore?: number, paddingAfter?: number): void;
3395
3571
  /**
3396
3572
  * Continually adjusts the zoom level to fit the width or height of a block's axis-aligned bounding box.
3397
- * Only has an effect if the zoom level is not handled by the UI.
3573
+ * This only shows an effect if the zoom level is not handled/overwritten by the UI.
3398
3574
  * Without padding, this results in a tight view on the block.
3399
3575
  * Calling `setZoomLevel` or `zoomToBlock` disables the continuous adjustment.
3400
3576
  *
@@ -3409,17 +3585,69 @@ export declare class SceneAPI {
3409
3585
  /**
3410
3586
  * Disables any previously set zoom auto-fit.
3411
3587
  *
3412
- * @param blockOrScene - The scene or a block in the scene for which to disable a zoom auto-fit.
3588
+ * @param blockOrScene - The scene or a block in the scene for which to disable zoom auto-fit.
3413
3589
  */
3414
3590
  disableZoomAutoFit(blockOrScene: DesignBlockId): void;
3415
3591
  /**
3416
3592
  * Queries whether zoom auto-fit is enabled.
3417
3593
  *
3418
- * @param blockOrScene - The scene or a block in the scene for which to disable a zoom auto-fit.
3594
+ * @param blockOrScene - The scene or a block in the scene for which to query the zoom auto-fit.
3419
3595
  * @returns True if the given block has auto-fit set or the scene contains a block for which auto-fit is set, false
3420
3596
  * otherwise.
3421
3597
  */
3422
3598
  isZoomAutoFitEnabled(blockOrScene: DesignBlockId): boolean;
3599
+ /**
3600
+ * Continually ensures the camera position to be within the width and height of a block's axis-aligned bounding box.
3601
+ * Without padding, this results in a tight clamp on the block. With padding, the padded part of the
3602
+ * block is ensured to be visible. No more than one block per scene can have camera position clamping enabled.
3603
+ *
3604
+ * @param id - The block for which the camera position is adjusted to, usually, the scene or a page.
3605
+ * @param paddingLeft - Optional padding in screen pixels to the left of the block.
3606
+ * @param paddingTop - Optional padding in screen pixels to the top of the block.
3607
+ * @param paddingRight - Optional padding in screen pixels to the right of the block.
3608
+ * @param paddingBottom - Optional padding in screen pixels to the bottom of the block.
3609
+ * @param scaledPaddingLeft - Optional padding in pixels to the left of the block that scales with the zoom level.
3610
+ * @param scaledPaddingTop - Optional padding in pixels to the top of the block that scales with the zoom level.
3611
+ * @param scaledPaddingRight - Optional padding in pixels to the right of the block that scales with the zoom level.
3612
+ * @param scaledPaddingBottom - Optional padding in pixels to the bottom of the block that scales with the zoom level.
3613
+ */
3614
+ unstable_enableCameraPositionClamping(id: DesignBlockId, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number, scaledPaddingLeft?: number, scaledPaddingTop?: number, scaledPaddingRight?: number, scaledPaddingBottom?: number): void;
3615
+ /**
3616
+ * Disables any previously set position clamping for the current scene.
3617
+ */
3618
+ unstable_disableCameraPositionClamping(): void;
3619
+ /**
3620
+ * Queries whether position clamping is enabled.
3621
+ *
3622
+ * @param blockOrScene - Optionally, the scene or a block in the scene for which to query the position clamping.
3623
+ * @returns True if the given block has position clamping set or the scene contains a block for which position clamping is set, false
3624
+ * otherwise.
3625
+ */
3626
+ unstable_isCameraPositionClampingEnabled(blockOrScene?: number | null): boolean;
3627
+ /**
3628
+ * Continually ensures the zoom level of the camera in the active scene to be in the given range.
3629
+ *
3630
+ * @param id - The block for which the camera zoom limits are adjusted to, usually, the scene or a page.
3631
+ * @param minZoomLimit - The minimum zoom level limit when zooming out, unlimited when negative.
3632
+ * @param maxZoomLimit - The maximum zoom level limit when zooming in, unlimited when negative.
3633
+ * @param paddingLeft - Optional padding in screen pixels to the left of the block. Only applied when the block is not a camera.
3634
+ * @param paddingTop - Optional padding in screen pixels to the top of the block. Only applied when the block is not a camera.
3635
+ * @param paddingRight - Optional padding in screen pixels to the right of the block. Only applied when the block is not a camera.
3636
+ * @param paddingBottom - Optional padding in screen pixels to the bottom of the block. Only applied when the block is not a camera.
3637
+ *
3638
+ */
3639
+ unstable_enableCameraZoomClamping(id: DesignBlockId, minZoomLimit?: number, maxZoomLimit?: number, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): void;
3640
+ /**
3641
+ * Disables any previously set zoom clamping for the current scene.
3642
+ */
3643
+ unstable_disableCameraZoomClamping(): void;
3644
+ /**
3645
+ * Queries whether zoom clamping is enabled.
3646
+ *
3647
+ * @param blockOrScene - Optionally, the scene or a block for which to query the zoom clamping.
3648
+ * @returns True if the given block has zoom clamping set or the scene contains a block for which zoom clamping is set, false otherwise.
3649
+ */
3650
+ unstable_isCameraZoomClampingEnabled(blockOrScene?: number | null): boolean;
3423
3651
  /**
3424
3652
  * Subscribe to changes to the zoom level.
3425
3653
  * @param callback - This function is called at the end of the engine update, if the zoom level has changed.
@@ -3450,13 +3678,21 @@ export declare type SceneMode = 'Design' | 'Video';
3450
3678
  /** @public */
3451
3679
  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;
3452
3680
 
3453
- /** @public */
3454
- export declare type SettingsColorRGBA = 'clearColor' | 'errorStateColor' | 'highlightColor' | 'page/title/color' | 'placeholderHighlightColor' | 'progressColor' | ArbitraryString;
3681
+ /** @public
3682
+ */
3683
+ declare type SettingsColor = 'clearColor' | 'errorStateColor' | 'highlightColor' | 'page/title/color' | 'placeholderHighlightColor' | 'progressColor' | ArbitraryString;
3684
+
3685
+ /** @public
3686
+ * @deprecated Use SettingsColor instead.
3687
+ */
3688
+ export declare type SettingsColorRGBA = SettingsColor;
3455
3689
 
3456
3690
  /** @public */
3457
3691
  export declare type SettingsEnum = {
3458
3692
  role: RoleString;
3459
3693
  doubleClickSelectionMode: 'Direct' | 'Hierarchical';
3694
+ 'touch/pinchAction': 'None' | 'Zoom' | 'Scale';
3695
+ 'touch/rotateAction': 'None' | 'Rotate';
3460
3696
  [key: ArbitraryString]: string;
3461
3697
  };
3462
3698
 
@@ -3487,10 +3723,8 @@ export declare type SizeMode = 'Absolute' | 'Percent' | 'Auto';
3487
3723
  /** @public */
3488
3724
  export declare interface SpotColor {
3489
3725
  name: string;
3490
- }
3491
-
3492
- declare interface SpotColorLookup {
3493
- getSpotColorRGBA(name: string): [r: number, g: number, b: number, a: number];
3726
+ tint: number;
3727
+ externalReference: string;
3494
3728
  }
3495
3729
 
3496
3730
  /** @public */