@cesdk/engine 1.56.0-nightly.20250711 → 1.57.0-nightly.20250712

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
@@ -1936,7 +1936,7 @@ export declare class BlockAPI {
1936
1936
  */
1937
1937
  supportsContentFillMode(id: DesignBlockId): boolean;
1938
1938
  /**
1939
- * Gets the width of a block.
1939
+ * Gets the width of a block in the current width mode.
1940
1940
  *
1941
1941
  * ```javascript
1942
1942
  * const width = engine.block.getWidth(block);
@@ -1960,7 +1960,7 @@ export declare class BlockAPI {
1960
1960
  */
1961
1961
  getWidthMode(id: DesignBlockId): SizeMode;
1962
1962
  /**
1963
- * Gets the height of a block.
1963
+ * Gets the height of a block in the current height mode.
1964
1964
  *
1965
1965
  * ```javascript
1966
1966
  * const height = engine.block.getHeight(block);
@@ -2008,7 +2008,7 @@ export declare class BlockAPI {
2008
2008
  positionMode?: PositionMode;
2009
2009
  }): void;
2010
2010
  /**
2011
- * Update a block's width and optionally maintain the crop.
2011
+ * Sets the width of a block in the current width mode.
2012
2012
  *
2013
2013
  * If the crop is maintained, the crop values will be automatically adjusted.
2014
2014
  *
@@ -2035,7 +2035,7 @@ export declare class BlockAPI {
2035
2035
  */
2036
2036
  setWidthMode(id: DesignBlockId, mode: SizeMode): void;
2037
2037
  /**
2038
- * Sets the height of a block.
2038
+ * Sets the height of a block in the current height mode.
2039
2039
  *
2040
2040
  * If the crop is maintained, the crop values will be automatically adjusted.
2041
2041
  *
@@ -2799,7 +2799,7 @@ export declare class BlockAPI {
2799
2799
  */
2800
2800
  setCropScaleY(id: DesignBlockId, scaleY: number): void;
2801
2801
  /**
2802
- * Sets the crop rotation of a block.
2802
+ * Sets the crop rotation of a block in radians.
2803
2803
  *
2804
2804
  * ```javascript
2805
2805
  * engine.block.setCropRotation(image, Math.PI);
@@ -2825,7 +2825,7 @@ export declare class BlockAPI {
2825
2825
  */
2826
2826
  setCropScaleRatio(id: DesignBlockId, scaleRatio: number): void;
2827
2827
  /**
2828
- * Sets the horizontal crop translation of a block.
2828
+ * Sets the horizontal crop translation of a block in percentage of the crop frame width.
2829
2829
  *
2830
2830
  * ```javascript
2831
2831
  * engine.block.setCropTranslationX(image, -1.0);
@@ -2837,7 +2837,7 @@ export declare class BlockAPI {
2837
2837
  */
2838
2838
  setCropTranslationX(id: DesignBlockId, translationX: number): void;
2839
2839
  /**
2840
- * Sets the vertical crop translation of a block.
2840
+ * Sets the vertical crop translation of a block in percentage of the crop frame height.
2841
2841
  *
2842
2842
  * ```javascript
2843
2843
  * engine.block.setCropTranslationY(image, 1.0);
@@ -2886,7 +2886,7 @@ export declare class BlockAPI {
2886
2886
  */
2887
2887
  getCropScaleY(id: DesignBlockId): number;
2888
2888
  /**
2889
- * Gets the crop rotation of a block.
2889
+ * Gets the crop rotation of a block in radians.
2890
2890
  *
2891
2891
  * ```javascript
2892
2892
  * const cropRotation = engine.block.getCropRotation(image);
@@ -2910,7 +2910,7 @@ export declare class BlockAPI {
2910
2910
  */
2911
2911
  getCropScaleRatio(id: DesignBlockId): number;
2912
2912
  /**
2913
- * Gets the horizontal crop translation of a block.
2913
+ * Gets the horizontal crop translation of a block in percentage of the crop frame width.
2914
2914
  *
2915
2915
  * ```javascript
2916
2916
  * const cropTranslationX = engine.block.getCropTranslationX(image);
@@ -2922,7 +2922,7 @@ export declare class BlockAPI {
2922
2922
  */
2923
2923
  getCropTranslationX(id: DesignBlockId): number;
2924
2924
  /**
2925
- * Gets the vertical crop translation of a block.
2925
+ * Gets the vertical crop translation of a block in percentage of the crop frame height.
2926
2926
  *
2927
2927
  * ```javascript
2928
2928
  * const cropTranslationY = engine.block.getCropTranslationY(image);
@@ -2934,7 +2934,7 @@ export declare class BlockAPI {
2934
2934
  */
2935
2935
  getCropTranslationY(id: DesignBlockId): number;
2936
2936
  /**
2937
- * Adjusts the crop position and scale to fill the crop frame.
2937
+ * Adjusts the crop position and scale of the given image block to fill its crop frame, while maintaining the position and size of the crop frame.
2938
2938
  *
2939
2939
  * ```javascript
2940
2940
  * const adjustedScaleRatio = engine.block.adjustCropToFillFrame(image, 1.0);
@@ -4069,7 +4069,7 @@ export declare class BlockAPI {
4069
4069
  /**
4070
4070
  * Enables or disables the placeholder function for a block.
4071
4071
  *
4072
- * When set to `true`, the placeholder capabilities are enabled in Adopter mode.
4072
+ * When set to `true`, the given block becomes selectable by users and its placeholder capabilities are enabled in Adopter mode.
4073
4073
  *
4074
4074
  * ```javascript
4075
4075
  * engine.block.setPlaceholderEnabled(block, true);
@@ -4081,7 +4081,7 @@ export declare class BlockAPI {
4081
4081
  */
4082
4082
  setPlaceholderEnabled(id: DesignBlockId, enabled: boolean): void;
4083
4083
  /**
4084
- * Checks if the placeholder function for a block is enabled.
4084
+ * Checks if the placeholder function for a block is enabled and can be selected by users in Adopter mode.
4085
4085
  *
4086
4086
  * ```javascript
4087
4087
  * const placeholderIsEnabled = engine.block.isPlaceholderEnabled(block);
@@ -4116,6 +4116,8 @@ export declare class BlockAPI {
4116
4116
  /**
4117
4117
  * Enables or disables the placeholder behavior for a block.
4118
4118
  *
4119
+ * When its fill block is set to `true`, an image block will act as a placeholder, showing a control overlay and a replacement button.
4120
+ *
4119
4121
  * ```javascript
4120
4122
  * engine.block.setPlaceholderBehaviorEnabled(block, true);
4121
4123
  * ```
@@ -4147,7 +4149,7 @@ export declare class BlockAPI {
4147
4149
  */
4148
4150
  hasPlaceholderControls(id: DesignBlockId): boolean;
4149
4151
  /**
4150
- * Checks if a block supports placeholder controls.
4152
+ * Checks if a block supports placeholder controls, e.g. a control overlay and a replacement button.
4151
4153
  *
4152
4154
  * @category Block Placeholder
4153
4155
  * @param id - The block to query.