@cesdk/node 1.11.0-preview.0 → 1.11.0-preview.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
@@ -901,6 +901,24 @@ export declare class BlockAPI {
901
901
  * @returns The position and size of the bounding box.
902
902
  */
903
903
  getScreenSpaceBoundingBoxXYWH(ids: DesignBlockId[]): XYWH;
904
+ /**
905
+ * Align multiple blocks horizontally within their bounding box (or group) or a single block to its parent.
906
+ * @param ids - A non-empty array of block ids.
907
+ * @param alignment - How they should be aligned: left, right, or center
908
+ */
909
+ alignHorizontally(ids: DesignBlockId[], horizontalBlockAlignment: HorizontalBlockAlignment): void;
910
+ /**
911
+ * Align multiple blocks vertically within their bounding box (or group) or a single block to its parent.
912
+ * @param ids - A non-empty array of block ids.
913
+ * @param alignment - How they should be aligned: top, bottom, or center
914
+ */
915
+ alignVertically(ids: DesignBlockId[], verticalBlockAlignment: VerticalBlockAlignment): void;
916
+ /**
917
+ * Confirms that a given set of blocks can be aligned.
918
+ * @param ids - A non-empty array of block ids.
919
+ * @returns Whether the blocks can be aligned.
920
+ */
921
+ isAlignable(ids: DesignBlockId[]): boolean;
904
922
  /**
905
923
  * Scales the block and all of its children proportionally around the specified
906
924
  * relative anchor point.
@@ -2216,7 +2234,6 @@ export declare interface Configuration {
2216
2234
  */
2217
2235
  extensions: ConfigTypes.Extensions;
2218
2236
  core: ConfigTypes.Core;
2219
- scene: ConfigTypes.Scene;
2220
2237
  assetSources: ConfigTypes.AssetSources;
2221
2238
  presets: ConfigTypes.Presets;
2222
2239
  variables: ConfigTypes.Variables;
@@ -2672,7 +2689,7 @@ declare type Extensions = {
2672
2689
  /**
2673
2690
  * @public
2674
2691
  */
2675
- export declare type FillType = 'Solid' | 'Gradient' | 'Video';
2692
+ export declare type FillType = 'Solid' | 'Gradient' | 'Video' | 'Image';
2676
2693
 
2677
2694
  /** @public */
2678
2695
  declare interface FindAssetsQuery {
@@ -2742,6 +2759,15 @@ declare type HexColorString = string;
2742
2759
  */
2743
2760
  export declare type HistoryId = number;
2744
2761
 
2762
+ /**
2763
+ * - Left: The blocks get left aligned.
2764
+ * - Right: The blocks get right aligned.
2765
+ * - Center: The blocks get center aligned.
2766
+ *
2767
+ * @public
2768
+ */
2769
+ export declare type HorizontalBlockAlignment = 'Left' | 'Right' | 'Center';
2770
+
2745
2771
  /**
2746
2772
  * e.g. `en`, `de`, etc.
2747
2773
  * @public
@@ -2791,6 +2817,13 @@ export declare interface OldConfiguration {
2791
2817
  * - `setSettingBool('page/title/dimOutOfPageAreas', dim)`
2792
2818
  */
2793
2819
  page?: Page;
2820
+ /**
2821
+ * @deprecated This type definition has been removed
2822
+ * The settings that were configured here can be set via the
2823
+ * BlockApi on the scene block
2824
+ * @public
2825
+ */
2826
+ scene?: Scene;
2794
2827
  }
2795
2828
 
2796
2829
  /**
@@ -2921,23 +2954,26 @@ export declare interface RGBColor {
2921
2954
  export declare type RoleString = 'Creator' | 'Adopter' | 'Viewer' | 'Presenter';
2922
2955
 
2923
2956
  /**
2924
- * Export Settings
2957
+ * @deprecated This type definition is not used anymore and will be removed
2958
+ * in the future. The settings that were configured here can be set via the
2959
+ * BlockApi on the scene block:
2960
+ *
2961
+ * ```ts
2962
+ * engine.block.setInt(sceneId, 'scene/dpi', dpi);
2963
+ * engine.block.setInt(sceneId, 'scene/pixelScaleFactor', factor);
2964
+ * ```
2965
+ *
2925
2966
  * @public
2926
2967
  */
2927
2968
  declare type Scene = {
2928
2969
  /**
2929
- * The DPI value to use when exporting and when converting between pixels and inches or millimeter units.
2930
- * (In the CESDK, this value is synonymous with PPI).
2931
- *
2932
- * This is only relevant for new scenes that are created in the editor. Loaded scenes will use the
2933
- * value stored in their serialization file.
2970
+ * @deprecated Setting this value has no effect. You can change the dpi of the
2971
+ * current scene via `engine.block.setInt(sceneId, 'scene/dpi', dpi)`
2934
2972
  */
2935
2973
  dpi: number;
2936
2974
  /**
2937
- * A scale factor that is applied to the final export resolution.
2938
- *
2939
- * This is only relevant for new scenes that are created in the editor. Loaded scenes will use the
2940
- * value stored in their serialization file.
2975
+ * @deprecated Setting this value has no effect. You can change the dpi of the
2976
+ * current scene via `engine.block.setInt(sceneId, 'scene/pixelScaleFactor', * factor)`
2941
2977
  */
2942
2978
  pixelScaleFactor: number;
2943
2979
  };
@@ -3273,6 +3309,15 @@ export declare interface Vec4 {
3273
3309
  w: number;
3274
3310
  }
3275
3311
 
3312
+ /**
3313
+ * - Top: The blocks get top aligned.
3314
+ * - Bottom: The blocks get bottom aligned.
3315
+ * - Center: The blocks get center aligned.
3316
+ *
3317
+ * @public
3318
+ */
3319
+ export declare type VerticalBlockAlignment = 'Top' | 'Bottom' | 'Center';
3320
+
3276
3321
  /**
3277
3322
  * @public
3278
3323
  */