@cesdk/cesdk-js 1.64.0-nightly.20251025 → 1.64.0-nightly.20251027
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/assets/core/{cesdk-v1.64.0-nightly.20251025-XKAIKMTO.wasm → cesdk-v1.64.0-nightly.20251027-4YHFACU6.wasm} +0 -0
- package/assets/core/{worker-host-v1.64.0-nightly.20251025.js → worker-host-v1.64.0-nightly.20251027.js} +1 -1
- package/cesdk.umd.js +1 -1
- package/index.d.ts +255 -0
- package/index.js +1 -1
- package/package.json +2 -2
- /package/assets/core/{cesdk-v1.64.0-nightly.20251025-44YCFRT6.data → cesdk-v1.64.0-nightly.20251027-44YCFRT6.data} +0 -0
package/index.d.ts
CHANGED
|
@@ -2709,6 +2709,9 @@ declare class CreativeEditorSDK {
|
|
|
2709
2709
|
*/
|
|
2710
2710
|
unstable_onActivePageChanged(callback: (id: number) => void): () => void;
|
|
2711
2711
|
/**
|
|
2712
|
+
* Focus on a specific page and zoom to fit it in the viewport.
|
|
2713
|
+
* @param pageId - The ID of the page to focus on
|
|
2714
|
+
* @returns A promise that resolves when the focus operation is complete
|
|
2712
2715
|
* @category Page Management
|
|
2713
2716
|
* @experimental This API is experimental and may change or be removed in future versions.
|
|
2714
2717
|
*/
|
|
@@ -4360,6 +4363,39 @@ export declare interface RegisteredActions {
|
|
|
4360
4363
|
* Action invoked when the add clip button is pressed in the video timeline
|
|
4361
4364
|
*/
|
|
4362
4365
|
addClip: VoidFunction;
|
|
4366
|
+
/**
|
|
4367
|
+
* Zoom actions for explicit zoom control
|
|
4368
|
+
*/
|
|
4369
|
+
/** Action for zooming to a specific block */
|
|
4370
|
+
'zoom.toBlock': ZoomToBlockAction;
|
|
4371
|
+
/** Action for zooming to the current page with optional padding */
|
|
4372
|
+
'zoom.toPage': ZoomToPageAction;
|
|
4373
|
+
/** Action for zooming to the current selection */
|
|
4374
|
+
'zoom.toSelection': ZoomToSelectionAction;
|
|
4375
|
+
/** Action for zooming in by one step */
|
|
4376
|
+
'zoom.in': ZoomInAction;
|
|
4377
|
+
/** Action for zooming out by one step */
|
|
4378
|
+
'zoom.out': ZoomOutAction;
|
|
4379
|
+
/** Action for setting zoom to a specific level */
|
|
4380
|
+
'zoom.toLevel': ZoomToLevelAction;
|
|
4381
|
+
/**
|
|
4382
|
+
* Scroll actions
|
|
4383
|
+
*/
|
|
4384
|
+
/** Action for scrolling to a specific page */
|
|
4385
|
+
'scroll.toPage': ScrollToPageAction;
|
|
4386
|
+
/**
|
|
4387
|
+
* Video timeline zoom actions
|
|
4388
|
+
*/
|
|
4389
|
+
/** Action for zooming in the video timeline */
|
|
4390
|
+
'timeline.zoom.in': TimelineZoomInAction;
|
|
4391
|
+
/** Action for zooming out the video timeline */
|
|
4392
|
+
'timeline.zoom.out': TimelineZoomOutAction;
|
|
4393
|
+
/** Action for fitting the video timeline to show all content */
|
|
4394
|
+
'timeline.zoom.fit': TimelineZoomToFitAction;
|
|
4395
|
+
/** Action for setting the video timeline zoom to a specific level */
|
|
4396
|
+
'timeline.zoom.toLevel': TimelineZoomToLevelAction;
|
|
4397
|
+
/** Action for resetting the video timeline zoom to default */
|
|
4398
|
+
'timeline.zoom.reset': TimelineZoomResetAction;
|
|
4363
4399
|
}
|
|
4364
4400
|
|
|
4365
4401
|
/**
|
|
@@ -4430,6 +4466,17 @@ export { SceneMode }
|
|
|
4430
4466
|
|
|
4431
4467
|
export { Scope }
|
|
4432
4468
|
|
|
4469
|
+
/**
|
|
4470
|
+
* Action function for scrolling to a specific page
|
|
4471
|
+
* @public
|
|
4472
|
+
*/
|
|
4473
|
+
export declare type ScrollToPageAction = (options?: {
|
|
4474
|
+
/** The page ID to scroll to (defaults to current page) */
|
|
4475
|
+
pageId?: number;
|
|
4476
|
+
/** Whether to animate the scroll (default: false) */
|
|
4477
|
+
animate?: boolean;
|
|
4478
|
+
}) => Promise<void>;
|
|
4479
|
+
|
|
4433
4480
|
/**
|
|
4434
4481
|
* Represents options for a section.
|
|
4435
4482
|
*
|
|
@@ -4631,6 +4678,39 @@ declare type ThemeConfig = Theme | ThemeFn | 'system';
|
|
|
4631
4678
|
*/
|
|
4632
4679
|
declare type ThemeFn = () => Theme;
|
|
4633
4680
|
|
|
4681
|
+
/**
|
|
4682
|
+
* Video timeline zoom action types
|
|
4683
|
+
*/
|
|
4684
|
+
/**
|
|
4685
|
+
* Action function for zooming in the video timeline by one step
|
|
4686
|
+
* @public
|
|
4687
|
+
*/
|
|
4688
|
+
export declare type TimelineZoomInAction = () => void;
|
|
4689
|
+
|
|
4690
|
+
/**
|
|
4691
|
+
* Action function for zooming out the video timeline by one step
|
|
4692
|
+
* @public
|
|
4693
|
+
*/
|
|
4694
|
+
export declare type TimelineZoomOutAction = () => void;
|
|
4695
|
+
|
|
4696
|
+
/**
|
|
4697
|
+
* Action function for resetting the video timeline zoom to default level (1.0)
|
|
4698
|
+
* @public
|
|
4699
|
+
*/
|
|
4700
|
+
export declare type TimelineZoomResetAction = () => void;
|
|
4701
|
+
|
|
4702
|
+
/**
|
|
4703
|
+
* Action function for fitting the video timeline to show all content
|
|
4704
|
+
* @public
|
|
4705
|
+
*/
|
|
4706
|
+
export declare type TimelineZoomToFitAction = () => void;
|
|
4707
|
+
|
|
4708
|
+
/**
|
|
4709
|
+
* Action function for setting the video timeline zoom to a specific level
|
|
4710
|
+
* @public
|
|
4711
|
+
*/
|
|
4712
|
+
export declare type TimelineZoomToLevelAction = (level: number) => void;
|
|
4713
|
+
|
|
4634
4714
|
export { TransientResource }
|
|
4635
4715
|
|
|
4636
4716
|
/**
|
|
@@ -6534,6 +6614,34 @@ export declare class UtilsAPI {
|
|
|
6534
6614
|
* @public
|
|
6535
6615
|
*/
|
|
6536
6616
|
localUpload(file: File, context?: UploadCallbackContext): Promise<AssetDefinition>;
|
|
6617
|
+
/**
|
|
6618
|
+
* Calculates the recommended viewport padding based on current viewport size and settings.
|
|
6619
|
+
* This utility matches the internal padding used by the SDK for zoom operations.
|
|
6620
|
+
*
|
|
6621
|
+
* @param width - Optional viewport width to use instead of current camera width
|
|
6622
|
+
* @param height - Optional viewport height to use instead of current camera height
|
|
6623
|
+
* @returns An object containing paddingX and paddingY values
|
|
6624
|
+
*
|
|
6625
|
+
* @example
|
|
6626
|
+
* ```typescript
|
|
6627
|
+
* const padding = cesdk.utils.calculateViewportPadding();
|
|
6628
|
+
* console.log(`Padding: ${padding.paddingX}x${padding.paddingY}`);
|
|
6629
|
+
*
|
|
6630
|
+
* // Use with custom zoom
|
|
6631
|
+
* await cesdk.engine.scene.zoomToBlock(
|
|
6632
|
+
* pageId,
|
|
6633
|
+
* padding.paddingX,
|
|
6634
|
+
* padding.paddingY,
|
|
6635
|
+
* padding.paddingX,
|
|
6636
|
+
* padding.paddingY
|
|
6637
|
+
* );
|
|
6638
|
+
* ```
|
|
6639
|
+
* @public
|
|
6640
|
+
*/
|
|
6641
|
+
calculateViewportPadding(width?: number, height?: number): {
|
|
6642
|
+
paddingX: number;
|
|
6643
|
+
paddingY: number;
|
|
6644
|
+
};
|
|
6537
6645
|
}
|
|
6538
6646
|
|
|
6539
6647
|
export { VariableAPI }
|
|
@@ -6556,6 +6664,153 @@ export { XYWH }
|
|
|
6556
6664
|
|
|
6557
6665
|
export { ZoomAutoFitAxis }
|
|
6558
6666
|
|
|
6667
|
+
/**
|
|
6668
|
+
* Action function for zooming in by one step
|
|
6669
|
+
* @public
|
|
6670
|
+
*/
|
|
6671
|
+
export declare type ZoomInAction = (options?: {
|
|
6672
|
+
/** Custom step size for zoom in (default uses predefined steps) */
|
|
6673
|
+
stepSize?: number;
|
|
6674
|
+
/** Animation configuration - boolean for default animation or object for custom settings */
|
|
6675
|
+
animate?: boolean | {
|
|
6676
|
+
/** Duration of the animation in seconds */
|
|
6677
|
+
duration?: number;
|
|
6678
|
+
/** Easing function for the animation */
|
|
6679
|
+
easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut';
|
|
6680
|
+
/** Whether the animation can be interrupted */
|
|
6681
|
+
interruptible?: boolean;
|
|
6682
|
+
};
|
|
6683
|
+
/** Maximum allowed zoom level (default: 32) */
|
|
6684
|
+
maxZoom?: number;
|
|
6685
|
+
}) => void | Promise<void>;
|
|
6686
|
+
|
|
6559
6687
|
export { ZoomOptions }
|
|
6560
6688
|
|
|
6689
|
+
/**
|
|
6690
|
+
* Action function for zooming out by one step
|
|
6691
|
+
* @public
|
|
6692
|
+
*/
|
|
6693
|
+
export declare type ZoomOutAction = (options?: {
|
|
6694
|
+
/** Custom step size for zoom out (default uses predefined steps) */
|
|
6695
|
+
stepSize?: number;
|
|
6696
|
+
/** Animation configuration - boolean for default animation or object for custom settings */
|
|
6697
|
+
animate?: boolean | {
|
|
6698
|
+
/** Duration of the animation in seconds */
|
|
6699
|
+
duration?: number;
|
|
6700
|
+
/** Easing function for the animation */
|
|
6701
|
+
easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut';
|
|
6702
|
+
/** Whether the animation can be interrupted */
|
|
6703
|
+
interruptible?: boolean;
|
|
6704
|
+
};
|
|
6705
|
+
/** Minimum allowed zoom level (default: 0.125) */
|
|
6706
|
+
minZoom?: number;
|
|
6707
|
+
}) => void | Promise<void>;
|
|
6708
|
+
|
|
6709
|
+
/**
|
|
6710
|
+
* Zoom action types for explicit zoom control
|
|
6711
|
+
*/
|
|
6712
|
+
/**
|
|
6713
|
+
* Action function for zooming to a specific block
|
|
6714
|
+
* @public
|
|
6715
|
+
*/
|
|
6716
|
+
export declare type ZoomToBlockAction = (blockId: number, options?: {
|
|
6717
|
+
/** Padding configuration around the block */
|
|
6718
|
+
padding?: number | {
|
|
6719
|
+
x?: number;
|
|
6720
|
+
y?: number;
|
|
6721
|
+
} | {
|
|
6722
|
+
top?: number;
|
|
6723
|
+
bottom?: number;
|
|
6724
|
+
left?: number;
|
|
6725
|
+
right?: number;
|
|
6726
|
+
};
|
|
6727
|
+
/** Animation configuration - boolean for default animation or object for custom settings */
|
|
6728
|
+
animate?: boolean | {
|
|
6729
|
+
/** Duration of the animation in seconds */
|
|
6730
|
+
duration?: number;
|
|
6731
|
+
/** Easing function for the animation */
|
|
6732
|
+
easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut';
|
|
6733
|
+
/** Whether the animation can be interrupted */
|
|
6734
|
+
interruptible?: boolean;
|
|
6735
|
+
};
|
|
6736
|
+
/** Whether to enable auto-fit mode after zooming (default: false) */
|
|
6737
|
+
autoFit?: boolean;
|
|
6738
|
+
}) => Promise<void>;
|
|
6739
|
+
|
|
6740
|
+
/**
|
|
6741
|
+
* Action function for setting zoom to a specific level
|
|
6742
|
+
* @public
|
|
6743
|
+
*/
|
|
6744
|
+
export declare type ZoomToLevelAction = (level: number, options?: {
|
|
6745
|
+
/** Animation configuration - boolean for default animation or object for custom settings */
|
|
6746
|
+
animate?: boolean | {
|
|
6747
|
+
/** Duration of the animation in seconds */
|
|
6748
|
+
duration?: number;
|
|
6749
|
+
/** Easing function for the animation */
|
|
6750
|
+
easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut';
|
|
6751
|
+
/** Whether the animation can be interrupted */
|
|
6752
|
+
interruptible?: boolean;
|
|
6753
|
+
};
|
|
6754
|
+
/** Minimum allowed zoom level (default: 0.125) */
|
|
6755
|
+
minZoom?: number;
|
|
6756
|
+
/** Maximum allowed zoom level (default: 32) */
|
|
6757
|
+
maxZoom?: number;
|
|
6758
|
+
}) => void | Promise<void>;
|
|
6759
|
+
|
|
6760
|
+
/**
|
|
6761
|
+
* Action function for zooming to the current page with optional padding
|
|
6762
|
+
* @public
|
|
6763
|
+
*/
|
|
6764
|
+
export declare type ZoomToPageAction = (options?: {
|
|
6765
|
+
/** Padding configuration around the block */
|
|
6766
|
+
padding?: number | {
|
|
6767
|
+
x?: number;
|
|
6768
|
+
y?: number;
|
|
6769
|
+
} | {
|
|
6770
|
+
top?: number;
|
|
6771
|
+
bottom?: number;
|
|
6772
|
+
left?: number;
|
|
6773
|
+
right?: number;
|
|
6774
|
+
};
|
|
6775
|
+
/** Animation configuration - boolean for default animation or object for custom settings */
|
|
6776
|
+
animate?: boolean | {
|
|
6777
|
+
/** Duration of the animation in seconds */
|
|
6778
|
+
duration?: number;
|
|
6779
|
+
/** Easing function for the animation */
|
|
6780
|
+
easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut';
|
|
6781
|
+
/** Whether the animation can be interrupted */
|
|
6782
|
+
interruptible?: boolean;
|
|
6783
|
+
};
|
|
6784
|
+
/** Whether to enable auto-fit mode after zooming (default: false) */
|
|
6785
|
+
autoFit?: boolean;
|
|
6786
|
+
}) => Promise<void>;
|
|
6787
|
+
|
|
6788
|
+
/**
|
|
6789
|
+
* Action function for zooming to the current selection
|
|
6790
|
+
* @public
|
|
6791
|
+
*/
|
|
6792
|
+
export declare type ZoomToSelectionAction = (options?: {
|
|
6793
|
+
/** Padding configuration around the block */
|
|
6794
|
+
padding?: number | {
|
|
6795
|
+
x?: number;
|
|
6796
|
+
y?: number;
|
|
6797
|
+
} | {
|
|
6798
|
+
top?: number;
|
|
6799
|
+
bottom?: number;
|
|
6800
|
+
left?: number;
|
|
6801
|
+
right?: number;
|
|
6802
|
+
};
|
|
6803
|
+
/** Animation configuration - boolean for default animation or object for custom settings */
|
|
6804
|
+
animate?: boolean | {
|
|
6805
|
+
/** Duration of the animation in seconds */
|
|
6806
|
+
duration?: number;
|
|
6807
|
+
/** Easing function for the animation */
|
|
6808
|
+
easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut';
|
|
6809
|
+
/** Whether the animation can be interrupted */
|
|
6810
|
+
interruptible?: boolean;
|
|
6811
|
+
};
|
|
6812
|
+
/** Whether to enable auto-fit mode after zooming (default: false) */
|
|
6813
|
+
autoFit?: boolean;
|
|
6814
|
+
}) => Promise<void>;
|
|
6815
|
+
|
|
6561
6816
|
export { }
|