@cesdk/cesdk-js 1.65.0-nightly.20251119 → 1.65.0-nightly.20251121

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
@@ -2722,23 +2722,48 @@ declare class CreativeEditorSDK {
2722
2722
  * Load an encoded scene from the provided string.
2723
2723
  * @category Scene Loading
2724
2724
  * @param scene - A string starting with UBQ1 and containing the encoded scene.
2725
+ * @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false.
2725
2726
  * @returns a promise which resolves if the scene was successfully loaded.
2726
2727
  */
2727
- loadFromString(scene: string): Promise<number>;
2728
+ loadFromString(scene: string, overrideEditorConfig?: boolean): Promise<number>;
2728
2729
  /**
2729
2730
  * Load the scene stored in the file at the given URL.
2730
2731
  * @category Scene Loading
2731
2732
  * @param url - The url to fetch to acquire the scene string.
2733
+ * @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false.
2732
2734
  * @returns a promise which resolves if the scene was successfully loaded.
2733
2735
  */
2734
- loadFromURL(url: string): Promise<number>;
2736
+ loadFromURL(url: string, overrideEditorConfig?: boolean): Promise<number>;
2735
2737
  /**
2736
- * Create a scene from the provided image.
2737
- * @category Scene Creation
2738
- * @param url - The url of the image
2738
+ * Load a previously archived scene from the URL to the scene file.
2739
+ * @category Scene Loading
2740
+ * @param url - The URL of the scene archive file.
2741
+ * @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false.
2739
2742
  * @returns a promise which resolves if the scene was successfully loaded.
2740
2743
  */
2741
- createFromImage(url: string): Promise<number>;
2744
+ loadFromArchiveURL(url: string, overrideEditorConfig?: boolean): Promise<number>;
2745
+ /**
2746
+ * Loads the given image and creates a scene with a single page showing the image.
2747
+ *
2748
+ * Fetching the image may take an arbitrary amount of time, so the scene isn't immediately available.
2749
+ *
2750
+ * @category Scene Creation
2751
+ * @param url - The image URL.
2752
+ * @param dpi - The scene's DPI. Defaults to 300.
2753
+ * @param pixelScaleFactor - The display's pixel scale factor. Defaults to 1.
2754
+ * @param sceneLayout - The layout of the scene. Defaults to 'Free'.
2755
+ * @param spacing - Spacing between pages. Defaults to 0.
2756
+ * @param spacingInScreenSpace - Whether spacing is in screen space. Defaults to false.
2757
+ * @returns a promise which resolves if the scene was successfully created.
2758
+ */
2759
+ createFromImage(url: string, dpi?: number, pixelScaleFactor?: number, sceneLayout?: SceneLayout, spacing?: number, spacingInScreenSpace?: boolean): Promise<number>;
2760
+ /**
2761
+ * Create a scene from the provided video.
2762
+ * @category Scene Creation
2763
+ * @param url - The url of the video
2764
+ * @returns a promise which resolves if the scene was successfully created.
2765
+ */
2766
+ createFromVideo(url: string): Promise<number>;
2742
2767
  /**
2743
2768
  * Disable the warning logged when no scene is available.
2744
2769
  *
@@ -4676,7 +4701,7 @@ export declare interface RegisteredActions {
4676
4701
  */
4677
4702
  /** Action for zooming to a specific block */
4678
4703
  'zoom.toBlock': ZoomToBlockAction;
4679
- /** Action for zooming to the current page with optional padding */
4704
+ /** Action for zooming to a page (current, first, last, or by index) with optional padding */
4680
4705
  'zoom.toPage': ZoomToPageAction;
4681
4706
  /** Action for zooming to the current selection */
4682
4707
  'zoom.toSelection': ZoomToSelectionAction;
@@ -4691,6 +4716,8 @@ export declare interface RegisteredActions {
4691
4716
  */
4692
4717
  /** Action for scrolling to a specific page */
4693
4718
  'scroll.toPage': ScrollToPageAction;
4719
+ /** Action for scrolling to a specific block */
4720
+ 'scroll.toBlock': ScrollToBlockAction;
4694
4721
  /**
4695
4722
  * Video timeline zoom actions
4696
4723
  */
@@ -4781,6 +4808,15 @@ export { SceneMode }
4781
4808
 
4782
4809
  export { Scope }
4783
4810
 
4811
+ /**
4812
+ * Action function for scrolling to a specific block
4813
+ * @public
4814
+ */
4815
+ export declare type ScrollToBlockAction = (blockId: number, options?: {
4816
+ /** Whether to animate the scroll (default: false) */
4817
+ animate?: boolean;
4818
+ }) => Promise<void>;
4819
+
4784
4820
  /**
4785
4821
  * Action function for scrolling to a specific page
4786
4822
  * @public
@@ -7091,10 +7127,12 @@ export declare type ZoomToLevelAction = (level: number, options?: {
7091
7127
  }) => void | Promise<void>;
7092
7128
 
7093
7129
  /**
7094
- * Action function for zooming to the current page with optional padding
7130
+ * Action function for zooming to a page with optional padding
7095
7131
  * @public
7096
7132
  */
7097
7133
  export declare type ZoomToPageAction = (options?: {
7134
+ /** The page to zoom to - 'current' (default), 'first', 'last', or a numeric page index (0-based) */
7135
+ page?: 'current' | 'first' | 'last' | number;
7098
7136
  /** Padding configuration around the block */
7099
7137
  padding?: number | {
7100
7138
  x?: number;