@cesdk/engine 1.11.0-preview.0 → 1.11.0-preview.2

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
@@ -903,6 +903,24 @@ export declare class BlockAPI {
903
903
  * @returns The position and size of the bounding box.
904
904
  */
905
905
  getScreenSpaceBoundingBoxXYWH(ids: DesignBlockId[]): XYWH;
906
+ /**
907
+ * Align multiple blocks horizontally within their bounding box (or group) or a single block to its parent.
908
+ * @param ids - A non-empty array of block ids.
909
+ * @param alignment - How they should be aligned: left, right, or center
910
+ */
911
+ alignHorizontally(ids: DesignBlockId[], horizontalBlockAlignment: HorizontalBlockAlignment): void;
912
+ /**
913
+ * Align multiple blocks vertically within their bounding box (or group) or a single block to its parent.
914
+ * @param ids - A non-empty array of block ids.
915
+ * @param alignment - How they should be aligned: top, bottom, or center
916
+ */
917
+ alignVertically(ids: DesignBlockId[], verticalBlockAlignment: VerticalBlockAlignment): void;
918
+ /**
919
+ * Confirms that a given set of blocks can be aligned.
920
+ * @param ids - A non-empty array of block ids.
921
+ * @returns Whether the blocks can be aligned.
922
+ */
923
+ isAlignable(ids: DesignBlockId[]): boolean;
906
924
  /**
907
925
  * Scales the block and all of its children proportionally around the specified
908
926
  * relative anchor point.
@@ -2266,7 +2284,6 @@ export declare interface Configuration {
2266
2284
  */
2267
2285
  extensions: ConfigTypes.Extensions;
2268
2286
  core: ConfigTypes.Core;
2269
- scene: ConfigTypes.Scene;
2270
2287
  assetSources: ConfigTypes.AssetSources;
2271
2288
  presets: ConfigTypes.Presets;
2272
2289
  variables: ConfigTypes.Variables;
@@ -2355,12 +2372,11 @@ declare class CreativeEngine {
2355
2372
  * `base_url` defaults to 'https://cdn.img.ly/assets/v1'.
2356
2373
  * Each source is created via `addLocalSource` and populated with the parsed assets. To modify the available
2357
2374
  * assets, you may either exclude certain IDs via `excludeAssetSourceIds` or alter the sources after creation.
2358
- *
2359
- * @param baseURL - The source of the asset definitions, must be absolute. Defaults to `'https://cdn.img.ly/assets/v1'`.
2360
- * @param excludeAssetSourceIds - A list of IDs, that will be ignored during load.
2361
2375
  */
2362
2376
  addDefaultAssetSources({ baseURL, excludeAssetSourceIds }?: {
2377
+ /** The source of the asset definitions, must be absolute. Defaults to `'https://cdn.img.ly/assets/v1'`. */
2363
2378
  baseURL?: string;
2379
+ /** A list of IDs, that will be ignored during load. */
2364
2380
  excludeAssetSourceIds?: DefaultAssetSourceId[];
2365
2381
  }): Promise<void>;
2366
2382
  /**
@@ -2375,14 +2391,13 @@ declare class CreativeEngine {
2375
2391
  * - `'ly.img.audio.upload'` - Demo source to upload audio assets
2376
2392
  * - `'ly.img.video'` - Sample videos
2377
2393
  * - `'ly.img.video.upload'` - Demo source to upload video assets
2378
- *
2379
- * @param excludeAssetSourceIds - A list of IDs, that will be ignored during load.
2380
- * @param sceneMode - if 'Video' video specific demo asset sources will be loaded as well (default 'Design')
2381
- * @param withUploadAssetSources - if 'true' asset sources for uploads are added (default false)
2382
2394
  */
2383
2395
  addDemoAssetSources({ excludeAssetSourceIds, sceneMode, withUploadAssetSources }?: {
2396
+ /** A list of IDs, that will be ignored during load */
2384
2397
  excludeAssetSourceIds?: DemoAssetSourceId[];
2398
+ /** If 'Video' video specific demo asset sources will be loaded as well (default 'Design') */
2385
2399
  sceneMode?: SceneMode;
2400
+ /** If 'true' asset sources for uploads are added (default false) */
2386
2401
  withUploadAssetSources?: boolean;
2387
2402
  }): Promise<void>;
2388
2403
 
@@ -2793,7 +2808,7 @@ declare type Extensions = {
2793
2808
  /**
2794
2809
  * @public
2795
2810
  */
2796
- export declare type FillType = 'Solid' | 'Gradient' | 'Video';
2811
+ export declare type FillType = 'Solid' | 'Gradient' | 'Video' | 'Image';
2797
2812
 
2798
2813
  /** @public */
2799
2814
  declare interface FindAssetsQuery {
@@ -2869,6 +2884,15 @@ declare type HexColorString = string;
2869
2884
  */
2870
2885
  export declare type HistoryId = number;
2871
2886
 
2887
+ /**
2888
+ * - Left: The blocks get left aligned.
2889
+ * - Right: The blocks get right aligned.
2890
+ * - Center: The blocks get center aligned.
2891
+ *
2892
+ * @public
2893
+ */
2894
+ export declare type HorizontalBlockAlignment = 'Left' | 'Right' | 'Center';
2895
+
2872
2896
  /** @public */
2873
2897
  export declare type HorizontalTextAlignment = 'Left' | 'Right' | 'Center';
2874
2898
 
@@ -2921,6 +2945,7 @@ declare enum MimeType_2 {
2921
2945
  Jpeg = "image/jpeg",
2922
2946
  Tga = "image/x-tga",
2923
2947
  Mp4 = "video/mp4",
2948
+ QuickTime = "video/quicktime",
2924
2949
  Binary = "application/octet-stream",
2925
2950
  Pdf = "application/pdf",
2926
2951
  Zip = "application/zip"
@@ -2948,6 +2973,13 @@ export declare interface OldConfiguration {
2948
2973
  * - `setSettingBool('page/title/dimOutOfPageAreas', dim)`
2949
2974
  */
2950
2975
  page?: Page;
2976
+ /**
2977
+ * @deprecated This type definition has been removed
2978
+ * The settings that were configured here can be set via the
2979
+ * BlockApi on the scene block
2980
+ * @public
2981
+ */
2982
+ scene?: Scene;
2951
2983
  }
2952
2984
 
2953
2985
  /**
@@ -3129,23 +3161,26 @@ export declare interface RGBColor {
3129
3161
  export declare type RoleString = 'Creator' | 'Adopter' | 'Viewer' | 'Presenter';
3130
3162
 
3131
3163
  /**
3132
- * Export Settings
3164
+ * @deprecated This type definition is not used anymore and will be removed
3165
+ * in the future. The settings that were configured here can be set via the
3166
+ * BlockApi on the scene block:
3167
+ *
3168
+ * ```ts
3169
+ * engine.block.setInt(sceneId, 'scene/dpi', dpi);
3170
+ * engine.block.setInt(sceneId, 'scene/pixelScaleFactor', factor);
3171
+ * ```
3172
+ *
3133
3173
  * @public
3134
3174
  */
3135
3175
  declare type Scene = {
3136
3176
  /**
3137
- * The DPI value to use when exporting and when converting between pixels and inches or millimeter units.
3138
- * (In the CESDK, this value is synonymous with PPI).
3139
- *
3140
- * This is only relevant for new scenes that are created in the editor. Loaded scenes will use the
3141
- * value stored in their serialization file.
3177
+ * @deprecated Setting this value has no effect. You can change the dpi of the
3178
+ * current scene via `engine.block.setInt(sceneId, 'scene/dpi', dpi)`
3142
3179
  */
3143
3180
  dpi: number;
3144
3181
  /**
3145
- * A scale factor that is applied to the final export resolution.
3146
- *
3147
- * This is only relevant for new scenes that are created in the editor. Loaded scenes will use the
3148
- * value stored in their serialization file.
3182
+ * @deprecated Setting this value has no effect. You can change the dpi of the
3183
+ * current scene via `engine.block.setInt(sceneId, 'scene/pixelScaleFactor', * factor)`
3149
3184
  */
3150
3185
  pixelScaleFactor: number;
3151
3186
  };
@@ -3516,6 +3551,15 @@ export declare interface Vec4 {
3516
3551
  w: number;
3517
3552
  }
3518
3553
 
3554
+ /**
3555
+ * - Top: The blocks get top aligned.
3556
+ * - Bottom: The blocks get bottom aligned.
3557
+ * - Center: The blocks get center aligned.
3558
+ *
3559
+ * @public
3560
+ */
3561
+ export declare type VerticalBlockAlignment = 'Top' | 'Bottom' | 'Center';
3562
+
3519
3563
  /** @public */
3520
3564
  export declare type VerticalTextAlignment = 'Top' | 'Bottom' | 'Center';
3521
3565