@cesdk/node 1.32.0-rc.2 → 1.33.0-rc.0
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.
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -286,7 +286,7 @@ export declare type AssetMetaData = {
|
|
|
286
286
|
*/
|
|
287
287
|
export declare interface AssetNumberProperty {
|
|
288
288
|
property: string;
|
|
289
|
-
type: '
|
|
289
|
+
type: 'Int' | 'Float' | 'Double';
|
|
290
290
|
value: number;
|
|
291
291
|
defaultValue: number;
|
|
292
292
|
min: number;
|
|
@@ -3830,6 +3830,28 @@ export declare class EditorAPI {
|
|
|
3830
3830
|
* @throws An error if the resource could not be downloaded or the mimetype could not be determined.
|
|
3831
3831
|
*/
|
|
3832
3832
|
getMimeType(uri: string): Promise<string>;
|
|
3833
|
+
/**
|
|
3834
|
+
* Returns the URLs and sizes of all resources whose data would be lost if the scene was exported.
|
|
3835
|
+
* This function is useful for determining which resources need to be relocated (e.g., to a CDN) before
|
|
3836
|
+
* exporting a scene since the resources are not included in the exported scene.
|
|
3837
|
+
* @returns The URLs and sizes of transient resources.
|
|
3838
|
+
*/
|
|
3839
|
+
findAllTransientResources(): TransientResource[];
|
|
3840
|
+
/**
|
|
3841
|
+
* Provides the data of a resource at the given URL.
|
|
3842
|
+
* @param url - The URL of the resource.
|
|
3843
|
+
* @param chunkSize - The size of the chunks in which the resource data is provided.
|
|
3844
|
+
* @param onData - The callback function that is called with the resource data or an error if an error occurred.
|
|
3845
|
+
* The callback will be called as long as there is data left to provide and the callback returns `true`.
|
|
3846
|
+
*/
|
|
3847
|
+
getResourceData(uri: string, chunkSize: number, onData: (result: Uint8Array) => boolean): void;
|
|
3848
|
+
/**
|
|
3849
|
+
* Changes the URL associated with a resource.
|
|
3850
|
+
* This function can be used change the URL of a resource that has been relocated (e.g., to a CDN).
|
|
3851
|
+
* @param currentURL - The current URL of the resource.
|
|
3852
|
+
* @param relocatedURL - The new URL of the resource.
|
|
3853
|
+
*/
|
|
3854
|
+
relocateResource(currentUrl: string, relocatedUrl: string): void;
|
|
3833
3855
|
}
|
|
3834
3856
|
|
|
3835
3857
|
/**
|
|
@@ -3853,6 +3875,25 @@ export declare type EffectTypeLonghand = `//ly.img.ubq/effect/${EffectTypeShorth
|
|
|
3853
3875
|
*/
|
|
3854
3876
|
export declare type EffectTypeShorthand = 'adjustments' | 'cross_cut' | 'dot_pattern' | 'duotone_filter' | 'extrude_blur' | 'glow' | 'green_screen' | 'half_tone' | 'linocut' | 'liquid' | 'lut_filter' | 'mirror' | 'outliner' | 'pixelize' | 'posterize' | 'radial_pixel' | 'recolor' | 'sharpie' | 'shifter' | 'tilt_shift' | 'tv_glitch' | 'vignette';
|
|
3855
3877
|
|
|
3878
|
+
/** @public */
|
|
3879
|
+
export declare interface EnginePlugin {
|
|
3880
|
+
name: string;
|
|
3881
|
+
version: string;
|
|
3882
|
+
initialize: (context: EnginePluginContext) => void;
|
|
3883
|
+
}
|
|
3884
|
+
|
|
3885
|
+
/** @public */
|
|
3886
|
+
declare type EnginePluginContext = {
|
|
3887
|
+
engine: {
|
|
3888
|
+
asset: AssetAPI;
|
|
3889
|
+
block: BlockAPI;
|
|
3890
|
+
scene: SceneAPI;
|
|
3891
|
+
editor: EditorAPI;
|
|
3892
|
+
event: EventAPI;
|
|
3893
|
+
variable: VariableAPI;
|
|
3894
|
+
};
|
|
3895
|
+
};
|
|
3896
|
+
|
|
3856
3897
|
/**
|
|
3857
3898
|
* @public
|
|
3858
3899
|
*/
|
|
@@ -4058,6 +4099,12 @@ export declare type HistoryId = number;
|
|
|
4058
4099
|
*/
|
|
4059
4100
|
export declare type HorizontalBlockAlignment = 'Left' | 'Right' | 'Center';
|
|
4060
4101
|
|
|
4102
|
+
/**
|
|
4103
|
+
* The horizontal text alignment options.
|
|
4104
|
+
* @public
|
|
4105
|
+
*/
|
|
4106
|
+
export declare type HorizontalTextAlignment = 'Left' | 'Right' | 'Center';
|
|
4107
|
+
|
|
4061
4108
|
/**
|
|
4062
4109
|
* Type guard for {@link CMYKColor}
|
|
4063
4110
|
* @public
|
|
@@ -4326,20 +4373,21 @@ export declare class SceneAPI {
|
|
|
4326
4373
|
*/
|
|
4327
4374
|
getPages(): DesignBlockId[];
|
|
4328
4375
|
/**
|
|
4329
|
-
* Get the current page, i.e., the page
|
|
4376
|
+
* Get the current page, i.e., the page of the first selected element if this page
|
|
4377
|
+
* is at least 25% visible or, otherwise, the page nearest to the viewport center.
|
|
4330
4378
|
* @returns The current page in the scene or null.
|
|
4331
4379
|
*/
|
|
4332
4380
|
getCurrentPage(): DesignBlockId | null;
|
|
4333
4381
|
/**
|
|
4334
|
-
* Find all blocks with the given type sorted by the distance to
|
|
4382
|
+
* Find all blocks with the given type sorted by the distance to viewport center.
|
|
4335
4383
|
* @param type - The type to search for.
|
|
4336
|
-
* @returns A list of block ids sorted by distance to
|
|
4384
|
+
* @returns A list of block ids sorted by distance to viewport center.
|
|
4337
4385
|
*/
|
|
4338
4386
|
findNearestToViewPortCenterByType(type: DesignBlockType): DesignBlockId[];
|
|
4339
4387
|
/**
|
|
4340
|
-
* Find all blocks with the given kind sorted by the distance to
|
|
4388
|
+
* Find all blocks with the given kind sorted by the distance to viewport center.
|
|
4341
4389
|
* @param kind - The kind to search for.
|
|
4342
|
-
* @returns A list of block ids sorted by distance to
|
|
4390
|
+
* @returns A list of block ids sorted by distance to viewport center.
|
|
4343
4391
|
*/
|
|
4344
4392
|
findNearestToViewPortCenterByKind(kind: string): DesignBlockId[];
|
|
4345
4393
|
/**
|
|
@@ -4497,7 +4545,7 @@ export declare type SceneMode = 'Design' | 'Video';
|
|
|
4497
4545
|
export declare type Scope = 'text/edit' | 'text/character' | 'fill/change' | 'fill/changeType' | 'stroke/change' | 'shape/change' | 'layer/move' | 'layer/resize' | 'layer/rotate' | 'layer/flip' | 'layer/crop' | 'layer/opacity' | 'layer/blendMode' | 'layer/visibility' | 'layer/clipping' | 'appearance/adjustments' | 'appearance/filter' | 'appearance/effect' | 'appearance/blur' | 'appearance/shadow' | 'appearance/animation' | 'lifecycle/destroy' | 'lifecycle/duplicate' | 'editor/add' | 'editor/select';
|
|
4498
4546
|
|
|
4499
4547
|
/** @public */
|
|
4500
|
-
export declare type SettingsBool = 'controlGizmo/showCropHandles' | 'controlGizmo/showCropScaleHandles' | 'controlGizmo/showResizeHandles' | 'controlGizmo/showRotateHandles' | 'controlGizmo/showScaleHandles' | 'doubleClickToCropEnabled' | 'features/singlePageModeEnabled' | 'features/pageCarouselEnabled' | 'mouse/enableScroll' | 'mouse/enableZoom' | 'checkScopesInAPIs' | 'page/dimOutOfPageAreas' | 'page/title/appendPageName' | 'page/title/show' | 'page/title/showOnSinglePage' | 'page/title/showPageTitleTemplate' | 'placeholderControls/showButton' | 'placeholderControls/showOverlay' | 'blockAnimations/enabled' | 'showBuildVersion' | 'touch/dragStartCanSelect' | 'touch/singlePointPanning';
|
|
4548
|
+
export declare type SettingsBool = 'controlGizmo/showCropHandles' | 'controlGizmo/showCropScaleHandles' | 'controlGizmo/showMoveHandles' | 'controlGizmo/showResizeHandles' | 'controlGizmo/showRotateHandles' | 'controlGizmo/showScaleHandles' | 'doubleClickToCropEnabled' | 'features/singlePageModeEnabled' | 'features/pageCarouselEnabled' | 'mouse/enableScroll' | 'mouse/enableZoom' | 'checkScopesInAPIs' | 'page/dimOutOfPageAreas' | 'page/title/appendPageName' | 'page/title/show' | 'page/title/showOnSinglePage' | 'page/title/showPageTitleTemplate' | 'placeholderControls/showButton' | 'placeholderControls/showOverlay' | 'blockAnimations/enabled' | 'showBuildVersion' | 'touch/dragStartCanSelect' | 'touch/singlePointPanning';
|
|
4501
4549
|
|
|
4502
4550
|
/** @public
|
|
4503
4551
|
*/
|
|
@@ -4602,6 +4650,12 @@ declare type Subscription = number;
|
|
|
4602
4650
|
*/
|
|
4603
4651
|
export declare type TextCase = 'Normal' | 'Uppercase' | 'Lowercase' | 'Titlecase';
|
|
4604
4652
|
|
|
4653
|
+
/** @public */
|
|
4654
|
+
export declare interface TransientResource {
|
|
4655
|
+
uri: string;
|
|
4656
|
+
size: number;
|
|
4657
|
+
}
|
|
4658
|
+
|
|
4605
4659
|
/** @public */
|
|
4606
4660
|
export declare interface Typeface {
|
|
4607
4661
|
/** The unique name of this typeface */
|
|
@@ -4679,6 +4733,12 @@ export declare interface Vec3 {
|
|
|
4679
4733
|
*/
|
|
4680
4734
|
export declare type VerticalBlockAlignment = 'Top' | 'Bottom' | 'Center';
|
|
4681
4735
|
|
|
4736
|
+
/**
|
|
4737
|
+
* The vertical text alignment options.
|
|
4738
|
+
* @public
|
|
4739
|
+
*/
|
|
4740
|
+
export declare type VerticalTextAlignment = 'Top' | 'Bottom' | 'Center';
|
|
4741
|
+
|
|
4682
4742
|
/**
|
|
4683
4743
|
* @public
|
|
4684
4744
|
*/
|