@cesdk/cesdk-js 1.15.0-rc.1 → 1.16.0-rc.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
@@ -23,25 +23,11 @@ export declare interface Asset {
23
23
  */
24
24
  id: string;
25
25
  /** Groups of the asset. */
26
- groups?: Groups;
26
+ groups?: AssetGroups;
27
27
  /** Asset-specific and custom meta information */
28
- meta?: {
29
- /** The mime type of this asset or the data behind the asset's uri. */
30
- mimeType?: string;
31
- /** The type id of the design block that should be created from this asset. */
32
- blockType?: string;
33
- fillType?: string;
34
- shapeType?: string;
35
- kind?: string;
36
- uri?: string;
37
- thumbUri?: string;
38
- previewUri?: string;
39
- filename?: string;
40
- vectorPath?: string;
41
- width?: number;
42
- height?: number;
43
- duration?: string;
44
- } & Record<string, unknown>;
28
+ meta?: AssetMetaData;
29
+ /** Structured asset-specific data */
30
+ payload?: AssetPayload;
45
31
  }
46
32
 
47
33
  /**
@@ -167,6 +153,24 @@ export declare class AssetAPI {
167
153
 
168
154
  }
169
155
 
156
+ /**
157
+ * Asset Color payload CMYK representation
158
+ * @public
159
+ */
160
+ export declare interface AssetCMYKColor {
161
+ colorSpace: 'CMYK';
162
+ c: number;
163
+ m: number;
164
+ y: number;
165
+ k: number;
166
+ }
167
+
168
+ /**
169
+ * Asset Color payload
170
+ * @public
171
+ */
172
+ export declare type AssetColor = AssetRGBColor | AssetCMYKColor | AssetSpotColor;
173
+
170
174
  /**
171
175
  * Definition of an asset used if an asset is added to an asset source.
172
176
  * @public
@@ -186,6 +190,17 @@ export declare interface AssetDefinition extends Asset {
186
190
  tags?: Record<Locale, string[]>;
187
191
  }
188
192
 
193
+ /**
194
+ * An asset can be member of multiple groups. Groups have a semantic meaning
195
+ * used to build and group UIs exploring the assets, e.g.sections in the
196
+ * content library, or for things like topics in Unsplash for instance.
197
+ *
198
+ * Tags in comparison have are more loosely hold meaning used for extended
199
+ * searching/filtering.
200
+ * @public
201
+ */
202
+ export declare type AssetGroups = string[];
203
+
189
204
  /** @public */
190
205
  declare type AssetLibraryEntries = AssetLibraryEntry[] | ((currentAssetLibraryEntries: AssetLibraryEntry[], context: {
191
206
  selectedBlocks: {
@@ -310,6 +325,10 @@ declare interface AssetLibraryEntryView {
310
325
  * Otherwise it will render nothing
311
326
  */
312
327
  cardBackgroundPreferences?: CardBackground[];
328
+ /**
329
+ * Draws a border around the card if set to true
330
+ */
331
+ cardBorder?: boolean;
313
332
  /**
314
333
  * Overwrite the label of a card for a specific asset result
315
334
  */
@@ -322,6 +341,40 @@ declare interface AssetLibraryEntryView {
322
341
  * Add custom styles to a label for a specific asset result
323
342
  */
324
343
  cardLabelStyle?: (assetResult: AssetResult) => Record<string, string | undefined>;
344
+ /**
345
+ * Position the label inside or below the card
346
+ */
347
+ cardLabelPosition?: (assetResult: AssetResult) => 'inside' | 'below';
348
+ }
349
+
350
+ /**
351
+ * AssetColor Meta information
352
+ * @public
353
+ */
354
+ export declare type AssetMetaData = {
355
+ /** The mime type of this asset or the data behind the asset's uri. */
356
+ mimeType?: string;
357
+ /** The type id of the design block that should be created from this asset. */
358
+ blockType?: string;
359
+ fillType?: string;
360
+ shapeType?: string;
361
+ kind?: string;
362
+ uri?: string;
363
+ thumbUri?: string;
364
+ previewUri?: string;
365
+ filename?: string;
366
+ vectorPath?: string;
367
+ width?: number;
368
+ height?: number;
369
+ duration?: string;
370
+ } & Record<string, unknown>;
371
+
372
+ /**
373
+ * Asset payload
374
+ * @public
375
+ */
376
+ export declare interface AssetPayload {
377
+ color?: AssetColor;
325
378
  }
326
379
 
327
380
  /**
@@ -340,9 +393,9 @@ export declare interface AssetQueryData {
340
393
  */
341
394
  tags?: string | string[];
342
395
  /** Query only these groups */
343
- groups?: Groups;
396
+ groups?: AssetGroups;
344
397
  /** Filter out assets with this groups */
345
- excludeGroups?: Groups;
398
+ excludeGroups?: AssetGroups;
346
399
  /** Choose the locale of the labels and tags for localized search and filtering */
347
400
  locale?: Locale;
348
401
  /**
@@ -407,6 +460,17 @@ declare interface AssetResultUtm {
407
460
  medium: string;
408
461
  }
409
462
 
463
+ /**
464
+ * Asset Color payload RGB representation
465
+ * @public
466
+ */
467
+ export declare interface AssetRGBColor {
468
+ colorSpace: 'sRGB';
469
+ r: number;
470
+ g: number;
471
+ b: number;
472
+ }
473
+
410
474
  /**
411
475
  * A source of assets
412
476
  * @public
@@ -466,6 +530,17 @@ export declare interface AssetSource {
466
530
 
467
531
  declare type _AssetSource = AssetSource;
468
532
 
533
+ /**
534
+ * Asset Color payload SpotColor representation
535
+ * @public
536
+ */
537
+ export declare interface AssetSpotColor {
538
+ colorSpace: 'SpotColor';
539
+ name: string;
540
+ externalReference: string;
541
+ representation: AssetRGBColor | AssetCMYKColor;
542
+ }
543
+
469
544
  /**
470
545
  * Return type of a `findAssets` query.
471
546
  * @public
@@ -681,10 +756,10 @@ export declare class BlockAPI {
681
756
  findByType(type: DesignBlockType): DesignBlockId[];
682
757
  /**
683
758
  * Finds all blocks with the given kind.
684
- * @param type - The kind to search for.
759
+ * @param kind - The kind to search for.
685
760
  * @returns A list of block ids.
686
761
  */
687
- findByKind(kind: DesignBlockType): DesignBlockId[];
762
+ findByKind(kind: string): DesignBlockId[];
688
763
  /**
689
764
  * Return all blocks currently known to the engine.
690
765
  * @returns A list of block ids.
@@ -1208,6 +1283,20 @@ export declare class BlockAPI {
1208
1283
  * @returns The value of the property.
1209
1284
  */
1210
1285
  getString(id: DesignBlockId, property: string): string;
1286
+ /**
1287
+ * Set a color property of the given design block to the given value.
1288
+ * @param id - The block whose property should be set.
1289
+ * @param property - The name of the property to set.
1290
+ * @param value - The value to set.
1291
+ */
1292
+ setColor(id: DesignBlockId, property: string, value: Color): void;
1293
+ /**
1294
+ * Get the value of a color property of the given design block.
1295
+ * @param id - The block whose property should be queried.
1296
+ * @param property - The name of the property to query.
1297
+ * @returns The value of the property.
1298
+ */
1299
+ getColor(id: DesignBlockId, property: string): Color;
1211
1300
  /**
1212
1301
  * Set a color property of the given design block to the given value.
1213
1302
  * @param id - The block whose property should be set.
@@ -1216,6 +1305,7 @@ export declare class BlockAPI {
1216
1305
  * @param g - The green color component in the range of 0 to 1.
1217
1306
  * @param b - The blue color component in the range of 0 to 1.
1218
1307
  * @param a - The alpha color component in the range of 0 to 1.
1308
+ * @deprecated Use setColor() instead.
1219
1309
  */
1220
1310
  setColorRGBA(id: DesignBlockId, property: string, r: number, g: number, b: number, a?: number): void;
1221
1311
  /**
@@ -1223,6 +1313,7 @@ export declare class BlockAPI {
1223
1313
  * @param id - The block whose property should be queried.
1224
1314
  * @param property - The name of the property to query.
1225
1315
  * @returns A tuple of channels red, green, blue and alpha in the range of 0 to 1.
1316
+ * @deprecated Use getColor() instead.
1226
1317
  */
1227
1318
  getColorRGBA(id: DesignBlockId, property: string): RGBA;
1228
1319
  /**
@@ -1231,6 +1322,7 @@ export declare class BlockAPI {
1231
1322
  * @param property - The name of the property to set.
1232
1323
  * @param name - The name of the spot color.
1233
1324
  * @param tint - The tint factor in the range of 0 to 1.
1325
+ * @deprecated Use setColor() instead.
1234
1326
  */
1235
1327
  setColorSpot(id: DesignBlockId, property: string, name: string, tint?: number): void;
1236
1328
  /**
@@ -1238,6 +1330,7 @@ export declare class BlockAPI {
1238
1330
  * @param id - The block whose property should be queried.
1239
1331
  * @param property - The name of the property to query.
1240
1332
  * @returns The name of the spot color.
1333
+ * @deprecated Use getColor() instead.
1241
1334
  */
1242
1335
  getColorSpotName(id: DesignBlockId, property: string): string;
1243
1336
  /**
@@ -1245,6 +1338,7 @@ export declare class BlockAPI {
1245
1338
  * @param id - The block whose property should be queried.
1246
1339
  * @param property - The name of the property to query.
1247
1340
  * @returns The tint factor of the spot color.
1341
+ * @deprecated Use getColor() instead.
1248
1342
  */
1249
1343
  getColorSpotTint(id: DesignBlockId, property: string): number;
1250
1344
  /**
@@ -1813,7 +1907,7 @@ export declare class BlockAPI {
1813
1907
  * 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.
1814
1908
  * If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
1815
1909
  */
1816
- setTextColor(id: DesignBlockId, color: RGBAColor | SpotColor, from?: number, to?: number): void;
1910
+ setTextColor(id: DesignBlockId, color: Color, from?: number, to?: number): void;
1817
1911
  /**
1818
1912
  * Returns the ordered unique list of colors of the text in the selected range.
1819
1913
  * @param block - The text block whose colors should be returned.
@@ -1824,7 +1918,7 @@ export declare class BlockAPI {
1824
1918
  * 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.
1825
1919
  * If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
1826
1920
  */
1827
- getTextColors(id: DesignBlockId, from?: number, to?: number): Array<RGBAColor | SpotColor>;
1921
+ getTextColors(id: DesignBlockId, from?: number, to?: number): Array<Color>;
1828
1922
  /**
1829
1923
  * Returns the ordered unique list of font weights of the text in the selected range.
1830
1924
  * @param block - The text block whose font weights should be returned.
@@ -2455,17 +2549,39 @@ declare interface ChannelSync<Out, In = Out> extends Channel<Out, In> {
2455
2549
  value: () => Out;
2456
2550
  }
2457
2551
 
2552
+ /**
2553
+ * @public
2554
+ */
2555
+ export declare type CMYK = [c: number, m: number, y: number, k: number];
2556
+
2458
2557
  /**
2459
2558
  * All components between 0 and 1
2460
2559
  * @public
2461
2560
  */
2462
2561
  export declare interface CMYKColor {
2562
+ /** Cyan */
2463
2563
  c: number;
2564
+ /** Magenta */
2464
2565
  m: number;
2566
+ /** Yellow */
2465
2567
  y: number;
2568
+ /** Black */
2466
2569
  k: number;
2570
+ /** The tint factor */
2571
+ tint: number;
2467
2572
  }
2468
2573
 
2574
+ /**
2575
+ * A type alias for all color types supported by the engine.
2576
+ * @public
2577
+ */
2578
+ declare type Color = RGBAColor | CMYKColor | SpotColor;
2579
+
2580
+ /**
2581
+ * @public
2582
+ */
2583
+ export declare type ColorSpace = 'sRGB' | 'CMYK' | 'SpotColor';
2584
+
2469
2585
  /**
2470
2586
  * Asset results that are returned from the engine.
2471
2587
  *
@@ -2837,7 +2953,7 @@ export declare type _DeepPartial<T> = {
2837
2953
  /**
2838
2954
  * @public
2839
2955
  */
2840
- declare type DefaultAssetSourceId = 'ly.img.sticker' | 'ly.img.vectorpath' | 'ly.img.filter.lut' | 'ly.img.filter.duotone';
2956
+ declare type DefaultAssetSourceId = 'ly.img.sticker' | 'ly.img.vectorpath' | 'ly.img.filter.lut' | 'ly.img.filter.duotone' | 'ly.img.colors.defaultPalette';
2841
2957
 
2842
2958
  /**
2843
2959
  * @public
@@ -3148,6 +3264,13 @@ export declare class EditorAPI {
3148
3264
  * @returns A result holding a float array of the four color components.
3149
3265
  */
3150
3266
  getSpotColorRGBA(name: string): RGBA;
3267
+ /**
3268
+ * Queries the CMYK representation set for a spot color.
3269
+ * If the value of the queried spot color has not been set yet, returns the default CMYK representation (of magenta).
3270
+ * @param name - The name of a spot color.
3271
+ * @returns A result holding a float array of the four color components.
3272
+ */
3273
+ getSpotColorCMYK(name: string): CMYK;
3151
3274
  /**
3152
3275
  * Sets the RGB representation of a spot color.
3153
3276
  * Use this function to both create a new spot color or update an existing spot color.
@@ -3157,6 +3280,16 @@ export declare class EditorAPI {
3157
3280
  * @param b - The blue color component in the range of 0 to 1.
3158
3281
  */
3159
3282
  setSpotColorRGB(name: string, r: number, g: number, b: number): void;
3283
+ /**
3284
+ * Sets the CMYK representation of a spot color.
3285
+ * Use this function to both create a new spot color or update an existing spot color.
3286
+ * @param name - The name of a spot color.
3287
+ * @param c - The cyan color component in the range of 0 to 1.
3288
+ * @param m - The magenta color component in the range of 0 to 1.
3289
+ * @param y - The yellow color component in the range of 0 to 1.
3290
+ * @param k - The key color component in the range of 0 to 1.
3291
+ */
3292
+ setSpotColorCMYK(name: string, c: number, m: number, y: number, k: number): void;
3160
3293
  /**
3161
3294
  * Removes a spot color from the list of set spot colors.
3162
3295
  * @param name - The name of a spot color.
@@ -3176,6 +3309,15 @@ export declare class EditorAPI {
3176
3309
  * @returns The color spot name.
3177
3310
  */
3178
3311
  getSpotColorForCutoutType(type: CutoutType): string;
3312
+ /**
3313
+ * Converts a color to the given color space.
3314
+ * @param color - The color to convert.
3315
+ * @param colorSpace - The color space to convert to.
3316
+ * @returns The converted color.
3317
+ */
3318
+ convertColorToColorSpace(color: Color, colorSpace: 'sRGB'): RGBAColor;
3319
+ convertColorToColorSpace(color: Color, colorSpace: 'CMYK'): CMYKColor;
3320
+ convertColorToColorSpace(color: Color, colorSpace: ColorSpace): never;
3179
3321
  }
3180
3322
 
3181
3323
  /**
@@ -3595,7 +3737,7 @@ export declare type FontWeight = 'thin' | 'extraLight' | 'Light' | 'normal' | 'm
3595
3737
  /** @public */
3596
3738
  export declare interface GradientColorStop {
3597
3739
  /** A color value within a gradient. */
3598
- color: RGBAColor | SpotColor;
3740
+ color: Color;
3599
3741
  /** The relative position of the color within the gradient in the range [0, 1]. */
3600
3742
  stop: number;
3601
3743
  }
@@ -3621,17 +3763,6 @@ a: number
3621
3763
  */
3622
3764
  export declare type GradientType = 'Linear' | 'Radial' | 'Conical';
3623
3765
 
3624
- /**
3625
- * An asset can be member of multiple groups. Groups have a semantic meaning
3626
- * used to build and group UIs exploring the assets, e.g.sections in the
3627
- * content library, or for things like topics in Unsplash for instance.
3628
- *
3629
- * Tags in comparison have are more loosely hold meaning used for extended
3630
- * searching/filtering.
3631
- * @public
3632
- */
3633
- declare type Groups = string[];
3634
-
3635
3766
  /**
3636
3767
  * Will be called by a stream whenever a new value is available.
3637
3768
  * @public
@@ -3896,7 +4027,7 @@ export declare interface _RequiredConfiguration extends Omit<_EngineConfiguratio
3896
4027
  defaultFont?: _EngineConfiguration['defaultFont'];
3897
4028
  presets: Omit<_EngineConfiguration['presets'], 'pageFormats' | 'colorPalettes'> & {
3898
4029
  /**
3899
- * @deprecated The configuration options `presets.colorPalettes` has been moved to `ui.colorPalette`.
4030
+ * @deprecated The configuration options `presets.colorPalettes` has been deprecated. Please use `ui.colorLibraries` and asset sources instead.
3900
4031
  */
3901
4032
  colorPalettes?: {
3902
4033
  [id: string]: _EngineConfigTypes.ColorPaletteDefinition;
@@ -3934,9 +4065,13 @@ export declare type RGBA = [r: number, g: number, b: number, a: number];
3934
4065
  * @public
3935
4066
  */
3936
4067
  export declare interface RGBAColor {
4068
+ /** Red */
3937
4069
  r: number;
4070
+ /** Green */
3938
4071
  g: number;
4072
+ /** Blue */
3939
4073
  b: number;
4074
+ /** Alpha */
3940
4075
  a: number;
3941
4076
  }
3942
4077
 
@@ -3945,8 +4080,11 @@ export declare interface RGBAColor {
3945
4080
  * @public
3946
4081
  */
3947
4082
  export declare interface RGBColor {
4083
+ /** Red */
3948
4084
  r: number;
4085
+ /** Green */
3949
4086
  g: number;
4087
+ /** Blue */
3950
4088
  b: number;
3951
4089
  }
3952
4090
 
@@ -4065,20 +4203,22 @@ export declare class SceneAPI {
4065
4203
  */
4066
4204
  getPages(): DesignBlockId[];
4067
4205
  /**
4068
- * Sets the zoom level of the active scene.
4069
- * Only has an effect if the zoom level is not handled by the UI.
4206
+ * Set the zoom level of the scene, e.g., for headless versions.
4207
+ * This only shows an effect if the zoom level is not handled/overwritten by the UI.
4208
+ * Setting a zoom level of 2.0f results in one dot in the design to be two pixels on the screen.
4070
4209
  *
4071
4210
  * @param zoomLevel - The new zoom level.
4072
4211
  */
4073
4212
  setZoomLevel(zoomLevel?: number): void;
4074
4213
  /**
4075
- * Query a camera zoom level of the active scene.
4214
+ * 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
4215
+ * on the screen.
4076
4216
  * @returns The zoom level of the block's camera.
4077
4217
  */
4078
4218
  getZoomLevel(): number;
4079
4219
  /**
4080
4220
  * Sets the zoom and focus to show a block.
4081
- * Only has an effect if the zoom level is not handled by the UI.
4221
+ * This only shows an effect if the zoom level is not handled/overwritten by the UI.
4082
4222
  * Without padding, this results in a tight view on the block.
4083
4223
  *
4084
4224
  * @param id - The block that should be focused on.
@@ -4091,7 +4231,7 @@ export declare class SceneAPI {
4091
4231
  zoomToBlock(id: DesignBlockId, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): Promise<void>;
4092
4232
  /**
4093
4233
  * Continually adjusts the zoom level to fit the width or height of a block's axis-aligned bounding box.
4094
- * Only has an effect if the zoom level is not handled by the UI.
4234
+ * This only shows an effect if the zoom level is not handled/overwritten by the UI.
4095
4235
  * Without padding, this results in a tight view on the block.
4096
4236
  * No more than one block per scene can have zoom auto-fit enabled.
4097
4237
  * Calling `setZoomLevel` or `zoomToBlock` disables the continuous adjustment.
@@ -4104,7 +4244,7 @@ export declare class SceneAPI {
4104
4244
  enableZoomAutoFit(id: DesignBlockId, axis: 'Horizontal' | 'Vertical', paddingBefore?: number, paddingAfter?: number): void;
4105
4245
  /**
4106
4246
  * Continually adjusts the zoom level to fit the width or height of a block's axis-aligned bounding box.
4107
- * Only has an effect if the zoom level is not handled by the UI.
4247
+ * This only shows an effect if the zoom level is not handled/overwritten by the UI.
4108
4248
  * Without padding, this results in a tight view on the block.
4109
4249
  * Calling `setZoomLevel` or `zoomToBlock` disables the continuous adjustment.
4110
4250
  *
@@ -4119,17 +4259,69 @@ export declare class SceneAPI {
4119
4259
  /**
4120
4260
  * Disables any previously set zoom auto-fit.
4121
4261
  *
4122
- * @param blockOrScene - The scene or a block in the scene for which to disable a zoom auto-fit.
4262
+ * @param blockOrScene - The scene or a block in the scene for which to disable zoom auto-fit.
4123
4263
  */
4124
4264
  disableZoomAutoFit(blockOrScene: DesignBlockId): void;
4125
4265
  /**
4126
4266
  * Queries whether zoom auto-fit is enabled.
4127
4267
  *
4128
- * @param blockOrScene - The scene or a block in the scene for which to disable a zoom auto-fit.
4268
+ * @param blockOrScene - The scene or a block in the scene for which to query the zoom auto-fit.
4129
4269
  * @returns True if the given block has auto-fit set or the scene contains a block for which auto-fit is set, false
4130
4270
  * otherwise.
4131
4271
  */
4132
4272
  isZoomAutoFitEnabled(blockOrScene: DesignBlockId): boolean;
4273
+ /**
4274
+ * Continually ensures the camera position to be within the width and height of a block's axis-aligned bounding box.
4275
+ * Without padding, this results in a tight clamp on the block. With padding, the padded part of the
4276
+ * block is ensured to be visible. No more than one block per scene can have camera position clamping enabled.
4277
+ *
4278
+ * @param id - The block for which the camera position is adjusted to, usually, the scene or a page.
4279
+ * @param paddingLeft - Optional padding in screen pixels to the left of the block.
4280
+ * @param paddingTop - Optional padding in screen pixels to the top of the block.
4281
+ * @param paddingRight - Optional padding in screen pixels to the right of the block.
4282
+ * @param paddingBottom - Optional padding in screen pixels to the bottom of the block.
4283
+ * @param scaledPaddingLeft - Optional padding in pixels to the left of the block that scales with the zoom level.
4284
+ * @param scaledPaddingTop - Optional padding in pixels to the top of the block that scales with the zoom level.
4285
+ * @param scaledPaddingRight - Optional padding in pixels to the right of the block that scales with the zoom level.
4286
+ * @param scaledPaddingBottom - Optional padding in pixels to the bottom of the block that scales with the zoom level.
4287
+ */
4288
+ unstable_enableCameraPositionClamping(id: DesignBlockId, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number, scaledPaddingLeft?: number, scaledPaddingTop?: number, scaledPaddingRight?: number, scaledPaddingBottom?: number): void;
4289
+ /**
4290
+ * Disables any previously set position clamping for the current scene.
4291
+ */
4292
+ unstable_disableCameraPositionClamping(): void;
4293
+ /**
4294
+ * Queries whether position clamping is enabled.
4295
+ *
4296
+ * @param blockOrScene - Optionally, the scene or a block in the scene for which to query the position clamping.
4297
+ * @returns True if the given block has position clamping set or the scene contains a block for which position clamping is set, false
4298
+ * otherwise.
4299
+ */
4300
+ unstable_isCameraPositionClampingEnabled(blockOrScene?: number | null): boolean;
4301
+ /**
4302
+ * Continually ensures the zoom level of the camera in the active scene to be in the given range.
4303
+ *
4304
+ * @param id - The block for which the camera zoom limits are adjusted to, usually, the scene or a page.
4305
+ * @param minZoomLimit - The minimum zoom level limit when zooming out, unlimited when negative.
4306
+ * @param maxZoomLimit - The maximum zoom level limit when zooming in, unlimited when negative.
4307
+ * @param paddingLeft - Optional padding in screen pixels to the left of the block. Only applied when the block is not a camera.
4308
+ * @param paddingTop - Optional padding in screen pixels to the top of the block. Only applied when the block is not a camera.
4309
+ * @param paddingRight - Optional padding in screen pixels to the right of the block. Only applied when the block is not a camera.
4310
+ * @param paddingBottom - Optional padding in screen pixels to the bottom of the block. Only applied when the block is not a camera.
4311
+ *
4312
+ */
4313
+ unstable_enableCameraZoomClamping(id: DesignBlockId, minZoomLimit?: number, maxZoomLimit?: number, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): void;
4314
+ /**
4315
+ * Disables any previously set zoom clamping for the current scene.
4316
+ */
4317
+ unstable_disableCameraZoomClamping(): void;
4318
+ /**
4319
+ * Queries whether zoom clamping is enabled.
4320
+ *
4321
+ * @param blockOrScene - Optionally, the scene or a block for which to query the zoom clamping.
4322
+ * @returns True if the given block has zoom clamping set or the scene contains a block for which zoom clamping is set, false otherwise.
4323
+ */
4324
+ unstable_isCameraZoomClampingEnabled(blockOrScene?: number | null): boolean;
4133
4325
  /**
4134
4326
  * Subscribe to changes to the zoom level.
4135
4327
  * @param callback - This function is called at the end of the engine update, if the zoom level has changed.
@@ -4167,6 +4359,8 @@ export declare type SettingsColorRGBA = 'clearColor' | 'errorStateColor' | 'high
4167
4359
  export declare type SettingsEnum = {
4168
4360
  role: RoleString;
4169
4361
  doubleClickSelectionMode: 'Direct' | 'Hierarchical';
4362
+ 'touch/pinchAction': 'None' | 'Zoom' | 'Scale';
4363
+ 'touch/rotateAction': 'None' | 'Rotate';
4170
4364
  [key: ArbitraryString]: string;
4171
4365
  };
4172
4366
 
@@ -4202,10 +4396,8 @@ declare type Source<T> = (handler: Handler<T>) => UnsubscribeFn;
4202
4396
  /** @public */
4203
4397
  export declare interface SpotColor {
4204
4398
  name: string;
4205
- }
4206
-
4207
- declare interface SpotColorLookup {
4208
- getSpotColorRGBA(name: string): [r: number, g: number, b: number, a: number];
4399
+ tint: number;
4400
+ externalReference: string;
4209
4401
  }
4210
4402
 
4211
4403
  /** @public */
@@ -4301,7 +4493,11 @@ export declare interface UserInterface {
4301
4493
  };
4302
4494
  hide?: boolean;
4303
4495
  smallViewportOptimization?: boolean;
4496
+ /**
4497
+ * @deprecated The configuration options `ui.colorPalette` has been deprecated. Please use `ui.colorLibraries` and asset sources instead.
4498
+ */
4304
4499
  colorPalette?: PaletteColor[];
4500
+ colorLibraries?: string[];
4305
4501
  pageFormats?: {
4306
4502
  [id: string]: PageFormatDefinition;
4307
4503
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cesdk/cesdk-js",
3
- "version": "1.15.0-rc.1",
3
+ "version": "1.16.0-rc.0",
4
4
  "main": "./cesdk.umd.js",
5
5
  "types": "./index.d.ts",
6
6
  "homepage": "https://www.img.ly",