@cesdk/cesdk-js 1.55.0 → 1.56.0-nightly.20250628
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.55.0-RRSU4U7H.wasm → cesdk-v1.56.0-nightly.20250628-KUANQCXE.wasm} +0 -0
- package/assets/core/worker-host-v1.56.0-nightly.20250628.js +1 -0
- package/cesdk.umd.js +1 -1
- package/index.d.ts +241 -537
- package/index.js +1 -1
- package/package.json +2 -2
- package/assets/core/worker-host-v1.55.0.js +0 -1
- /package/assets/core/{cesdk-v1.55.0-44YCFRT6.data → cesdk-v1.56.0-nightly.20250628-44YCFRT6.data} +0 -0
package/index.d.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import { AddImageOptions } from '@cesdk/engine';
|
|
2
|
-
import { AddVideoOptions } from '@cesdk/engine';
|
|
3
|
-
import { AnimationEasing } from '@cesdk/engine';
|
|
4
|
-
import { AnimationEntry } from '@cesdk/engine';
|
|
5
|
-
import { AnimationOptions } from '@cesdk/engine';
|
|
6
1
|
import { AnimationType } from '@cesdk/engine';
|
|
7
2
|
import { AnimationTypeLonghand } from '@cesdk/engine';
|
|
8
3
|
import { AnimationTypeShorthand } from '@cesdk/engine';
|
|
@@ -51,7 +46,6 @@ import type { Color } from '@cesdk/engine';
|
|
|
51
46
|
import { ColorSpace } from '@cesdk/engine';
|
|
52
47
|
import { CompleteAssetResult } from '@cesdk/engine';
|
|
53
48
|
import { ContentFillMode } from '@cesdk/engine';
|
|
54
|
-
import { CreateSceneOptions } from '@cesdk/engine';
|
|
55
49
|
import { default as CreativeEngine } from '@cesdk/engine';
|
|
56
50
|
import { default as CreativeEngine_2 } from '@cesdk/engine';
|
|
57
51
|
import { CutoutOperation } from '@cesdk/engine';
|
|
@@ -63,7 +57,6 @@ import { DesignBlockType } from '@cesdk/engine';
|
|
|
63
57
|
import { DesignBlockTypeLonghand } from '@cesdk/engine';
|
|
64
58
|
import { DesignBlockTypeShorthand } from '@cesdk/engine';
|
|
65
59
|
import { DesignUnit } from '@cesdk/engine';
|
|
66
|
-
import { DropShadowOptions } from '@cesdk/engine';
|
|
67
60
|
import { EditMode } from '@cesdk/engine';
|
|
68
61
|
import { EditorAPI } from '@cesdk/engine';
|
|
69
62
|
import { EffectType } from '@cesdk/engine';
|
|
@@ -133,11 +126,9 @@ import { Typeface } from '@cesdk/engine';
|
|
|
133
126
|
import { TypefaceDefinition } from '@cesdk/engine';
|
|
134
127
|
import { VariableAPI } from '@cesdk/engine';
|
|
135
128
|
import { VerticalBlockAlignment } from '@cesdk/engine';
|
|
136
|
-
import { VideoExportOptions } from '@cesdk/engine';
|
|
137
129
|
import { VideoMimeType } from '@cesdk/engine';
|
|
138
130
|
import { XYWH } from '@cesdk/engine';
|
|
139
131
|
import { ZoomAutoFitAxis } from '@cesdk/engine';
|
|
140
|
-
import { ZoomOptions } from '@cesdk/engine';
|
|
141
132
|
|
|
142
133
|
/**
|
|
143
134
|
* A11 Settings
|
|
@@ -150,16 +141,6 @@ declare type A11y = {
|
|
|
150
141
|
headingsHierarchyStart: 1 | 2 | 3 | 4 | 5 | 6;
|
|
151
142
|
};
|
|
152
143
|
|
|
153
|
-
export { AddImageOptions }
|
|
154
|
-
|
|
155
|
-
export { AddVideoOptions }
|
|
156
|
-
|
|
157
|
-
export { AnimationEasing }
|
|
158
|
-
|
|
159
|
-
export { AnimationEntry }
|
|
160
|
-
|
|
161
|
-
export { AnimationOptions }
|
|
162
|
-
|
|
163
144
|
export { AnimationType }
|
|
164
145
|
|
|
165
146
|
export { AnimationTypeLonghand }
|
|
@@ -609,39 +590,11 @@ declare const CANVAS_MENU_TEXT_ORDER_DEFAULT: readonly ["ly.img.text.color.canva
|
|
|
609
590
|
declare const CANVAS_MENU_TRANSFORM_ORDER_DEFAULT: readonly ["ly.img.group.enter.canvasMenu", "ly.img.group.select.canvasMenu", "ly.img.page.moveUp.canvasMenu", "ly.img.page.moveDown.canvasMenu", "ly.img.separator", "ly.img.text.edit.canvasMenu", "ly.img.replace.canvasMenu", "ly.img.separator", "ly.img.placeholder.canvasMenu", "ly.img.separator", "ly.img.bringForward.canvasMenu", "ly.img.sendBackward.canvasMenu", "ly.img.separator", "ly.img.duplicate.canvasMenu", "ly.img.delete.canvasMenu", "ly.img.separator", "ly.img.options.canvasMenu"];
|
|
610
591
|
|
|
611
592
|
/**
|
|
612
|
-
* A list of the component IDs that can be used in the canvas bar.
|
|
613
|
-
*
|
|
614
|
-
* Includes the following IDs:
|
|
615
|
-
* - 'ly.img.separator'
|
|
616
|
-
* - 'ly.img.spacer'
|
|
617
|
-
* - 'ly.img.settings.canvasBar'
|
|
618
|
-
* - 'ly.img.page.add.canvasBar'
|
|
619
593
|
* @public
|
|
620
594
|
*/
|
|
621
595
|
export declare type CanvasBarComponentId = 'ly.img.separator' | 'ly.img.spacer' | (typeof CANVAS_BAR_ORDER_DEFAULT)[number] | (string & {});
|
|
622
596
|
|
|
623
597
|
/**
|
|
624
|
-
* A list of the component IDs that can be used in the canvas menu.
|
|
625
|
-
*
|
|
626
|
-
* Includes the following IDs:
|
|
627
|
-
* - 'ly.img.separator'
|
|
628
|
-
* - 'ly.img.spacer'
|
|
629
|
-
* - 'ly.img.group.enter.canvasMenu'
|
|
630
|
-
* - 'ly.img.group.select.canvasMenu'
|
|
631
|
-
* - 'ly.img.page.moveUp.canvasMenu'
|
|
632
|
-
* - 'ly.img.page.moveDown.canvasMenu'
|
|
633
|
-
* - 'ly.img.text.edit.canvasMenu'
|
|
634
|
-
* - 'ly.img.replace.canvasMenu'
|
|
635
|
-
* - 'ly.img.placeholder.canvasMenu'
|
|
636
|
-
* - 'ly.img.bringForward.canvasMenu'
|
|
637
|
-
* - 'ly.img.sendBackward.canvasMenu'
|
|
638
|
-
* - 'ly.img.duplicate.canvasMenu'
|
|
639
|
-
* - 'ly.img.delete.canvasMenu'
|
|
640
|
-
* - 'ly.img.options.canvasMenu'
|
|
641
|
-
* - 'ly.img.text.color.canvasMenu'
|
|
642
|
-
* - 'ly.img.text.bold.canvasMenu'
|
|
643
|
-
* - 'ly.img.text.italic.canvasMenu'
|
|
644
|
-
* - 'ly.img.text.variables.canvasMenu'
|
|
645
598
|
* @public
|
|
646
599
|
*/
|
|
647
600
|
export declare type CanvasMenuComponentId = 'ly.img.separator' | 'ly.img.spacer' | (typeof CANVAS_MENU_TRANSFORM_ORDER_DEFAULT)[number] | (typeof CANVAS_MENU_TEXT_ORDER_DEFAULT)[number] | (string & {});
|
|
@@ -759,99 +712,40 @@ export declare type Configuration = Partial<CombinedConfiguration>;
|
|
|
759
712
|
|
|
760
713
|
export { ContentFillMode }
|
|
761
714
|
|
|
762
|
-
export { CreateSceneOptions }
|
|
763
|
-
|
|
764
715
|
/**
|
|
765
|
-
* The main entry point for the Creative Editor SDK.
|
|
766
|
-
*
|
|
767
|
-
* This class provides a comprehensive interface for creating, configuring, and managing
|
|
768
|
-
* creative editing experiences using our ready-made editor. The SDK can be configured to
|
|
769
|
-
* serve a multitude of use cases, offering a wide range of features such as asset management,
|
|
770
|
-
* scene creation, export operations, and plugin management.
|
|
771
|
-
*
|
|
772
|
-
* ## Categories
|
|
773
|
-
* @categoryDescription Members
|
|
774
|
-
* Instance members that allow access to the underlying engine, user interface, and configuration APIs.
|
|
775
|
-
* @categoryDescription Asset Management
|
|
776
|
-
* Methods for registering, managing, and refreshing asset sources including default assets,
|
|
777
|
-
* demo assets, and custom asset libraries.
|
|
778
|
-
* @categoryDescription Scene Creation
|
|
779
|
-
* Methods for creating new scenes from scratch, including design scenes, video scenes,
|
|
780
|
-
* and scenes from existing images.
|
|
781
|
-
* @categoryDescription Scene Loading
|
|
782
|
-
* Methods for loading existing scenes from various sources including strings, URLs,
|
|
783
|
-
* and encoded scene data.
|
|
784
|
-
* @categoryDescription Scene Saving
|
|
785
|
-
* Methods for persisting and exporting scene data as strings or files.
|
|
786
|
-
* @categoryDescription Export Operations
|
|
787
|
-
* Methods for exporting scenes and pages as files in various formats and mimeTypes.
|
|
788
|
-
* @categoryDescription Configuration
|
|
789
|
-
* Methods for configuring SDK behavior, translations, and runtime settings.
|
|
790
|
-
* @categoryDescription Page Management
|
|
791
|
-
* Methods for managing multiple pages within scenes, including navigation and visibility control.
|
|
792
|
-
* @categoryDescription Plugin Management
|
|
793
|
-
* Methods for extending SDK functionality through plugins and custom integrations.
|
|
794
|
-
* @categoryDescription Upload Operations
|
|
795
|
-
* Methods for handling file uploads and asset creation from user-provided files.
|
|
796
|
-
* @categoryDescription Lifecycle Management
|
|
797
|
-
* Methods for SDK initialization, cleanup, and resource management.
|
|
798
|
-
*
|
|
799
716
|
* @public
|
|
800
717
|
*/
|
|
801
718
|
declare class CreativeEditorSDK {
|
|
802
719
|
#private;
|
|
803
|
-
/**
|
|
804
|
-
* Access to the CreativeEngine instance that powers the editor.
|
|
805
|
-
* @category Members
|
|
806
|
-
*/
|
|
807
720
|
engine: CreativeEngine_2;
|
|
808
|
-
/**
|
|
809
|
-
* Access to the {@link UserInterfaceAPI} for controlling the editor's user interface
|
|
810
|
-
* @category Members
|
|
811
|
-
*/
|
|
812
721
|
ui: UserInterfaceAPI;
|
|
813
|
-
|
|
814
|
-
* Access to the {@link InternationalizationAPI} to control locale and translations
|
|
815
|
-
* @category Members
|
|
816
|
-
*/
|
|
817
|
-
i18n: InternationalizationAPI;
|
|
818
|
-
/**
|
|
819
|
-
* Access to the {@link FeatureAPI} to control feature availability
|
|
820
|
-
* @category Members
|
|
821
|
-
* */
|
|
722
|
+
i18n: InternationalisationAPI;
|
|
822
723
|
feature: FeatureAPI;
|
|
823
|
-
/**
|
|
824
|
-
* The version of the Creative Editor SDK
|
|
825
|
-
* @category Members
|
|
826
|
-
*/
|
|
827
724
|
version: string;
|
|
828
725
|
/**
|
|
829
|
-
* Convenience function
|
|
830
|
-
*
|
|
831
|
-
* The sources contain our example assets. These are:
|
|
726
|
+
* Convenience function that registers a set of asset sources containing our
|
|
727
|
+
* example assets. These are
|
|
832
728
|
*
|
|
833
729
|
* - `'ly.img.sticker'` - Various stickers
|
|
834
730
|
* - `'ly.img.vectorpath'` - Shapes and arrows
|
|
835
|
-
* - `'ly.img.filter.lut'` - LUT effects of various kinds
|
|
836
|
-
* - `'ly.img.filter.duotone'` - Color effects of various kinds
|
|
731
|
+
* - `'ly.img.filter.lut'` - LUT effects of various kinds.
|
|
732
|
+
* - `'ly.img.filter.duotone'` - Color effects of various kinds.
|
|
837
733
|
*
|
|
838
|
-
* These assets are parsed from the IMG.LY CDN at
|
|
839
|
-
* `
|
|
734
|
+
* These assets are parsed from the IMG.LY CDN at \{\{base_url\}\}/<id>/content.json, where
|
|
735
|
+
* `base_url` defaults to 'https://cdn.img.ly/assets/v3'.
|
|
840
736
|
* Each source is created via `addLocalSource` and populated with the parsed assets. To modify the available
|
|
841
737
|
* assets, you may either exclude certain IDs via `excludeAssetSourceIds` or alter the sources after creation.
|
|
842
738
|
*
|
|
843
|
-
* @
|
|
844
|
-
* @param
|
|
845
|
-
* @param excludeAssetSourceIds - A list of IDs that will be ignored during load.
|
|
739
|
+
* @param baseURL - The source of the asset definitions, must be absolute. Defaults to `'https://cdn.img.ly/assets/v3'`.
|
|
740
|
+
* @param excludeAssetSourceIds - A list of IDs, that will be ignored during load.
|
|
846
741
|
*/
|
|
847
742
|
addDefaultAssetSources({ baseURL, excludeAssetSourceIds }?: {
|
|
848
743
|
baseURL?: string;
|
|
849
744
|
excludeAssetSourceIds?: DefaultAssetSourceId[];
|
|
850
745
|
}): Promise<void>;
|
|
851
746
|
/**
|
|
852
|
-
* Convenience function that registers a set of demo asset sources
|
|
853
|
-
*
|
|
854
|
-
* These contain our example assets. These are not to meant to be used in your production code.
|
|
747
|
+
* Convenience function that registers a set of demo asset sources containing our
|
|
748
|
+
* example assets. These are not to meant to be used in your production code.
|
|
855
749
|
*
|
|
856
750
|
* These are
|
|
857
751
|
*
|
|
@@ -862,10 +756,8 @@ declare class CreativeEditorSDK {
|
|
|
862
756
|
* - `'ly.img.video'` - Sample videos
|
|
863
757
|
* - `'ly.img.video.upload'` - Demo source to upload video assets
|
|
864
758
|
*
|
|
865
|
-
* @
|
|
866
|
-
* @param
|
|
867
|
-
* @param excludeAssetSourceIds - A list of IDs that will be ignored during load.
|
|
868
|
-
* @param sceneMode - If 'Video', video specific demo asset sources will be loaded as well. Parsed from global configuration if not set.
|
|
759
|
+
* @param excludeAssetSourceIds - A list of IDs, that will be ignored during load.
|
|
760
|
+
* @param sceneMode - if 'Video' video specific demo asset sources will be loaded as well. Parsed from global configuration if not set.
|
|
869
761
|
*/
|
|
870
762
|
addDemoAssetSources({ baseURL, excludeAssetSourceIds, sceneMode }?: {
|
|
871
763
|
baseURL?: string;
|
|
@@ -878,7 +770,6 @@ declare class CreativeEditorSDK {
|
|
|
878
770
|
* Please note: the `onExport` callback provided in the configuration will be
|
|
879
771
|
* not called. This callback is for exports triggered by an user interaction.
|
|
880
772
|
*
|
|
881
|
-
* @category Export Operations
|
|
882
773
|
* @param options - options for the export
|
|
883
774
|
*
|
|
884
775
|
* @returns a promise with an object holding `blobs` of the export pages and the provided `options`.
|
|
@@ -889,13 +780,11 @@ declare class CreativeEditorSDK {
|
|
|
889
780
|
}>;
|
|
890
781
|
/**
|
|
891
782
|
* Create a scene with a single empty page with the given format.
|
|
892
|
-
* @category Scene Creation
|
|
893
783
|
* @param format - A `PageFormatDefinition` object specifying the page format to use.
|
|
894
784
|
*/
|
|
895
785
|
createDesignScene(format?: PageFormatDefinition): Promise<number>;
|
|
896
786
|
/**
|
|
897
787
|
* Create a scene with a single empty page with the given format.
|
|
898
|
-
* @category Scene Creation
|
|
899
788
|
* @param format - The page format to use. Can be either a string, identifying
|
|
900
789
|
* a page format that has been configured or a `PageFormatDefinition` object.
|
|
901
790
|
*/
|
|
@@ -903,53 +792,44 @@ declare class CreativeEditorSDK {
|
|
|
903
792
|
/**
|
|
904
793
|
* Load an encoded scene from the provided string.
|
|
905
794
|
* @deprecated Use `loadFromString` instead.
|
|
906
|
-
* @category Scene Loading
|
|
907
795
|
* @param scene - A string starting with UBQ1 and containing the encoded scene.
|
|
908
796
|
*/
|
|
909
797
|
load(scene: string): Promise<number>;
|
|
910
798
|
/**
|
|
911
799
|
* Load an encoded scene from the provided string.
|
|
912
|
-
* @category Scene Loading
|
|
913
800
|
* @param scene - A string starting with UBQ1 and containing the encoded scene.
|
|
914
801
|
* @returns a promise which resolves if the scene was successfully loaded.
|
|
915
802
|
*/
|
|
916
803
|
loadFromString(scene: string): Promise<number>;
|
|
917
804
|
/**
|
|
918
805
|
* Load the scene stored in the file at the given URL.
|
|
919
|
-
* @category Scene Loading
|
|
920
806
|
* @param url - The url to fetch to acquire the scene string.
|
|
921
807
|
* @returns a promise which resolves if the scene was successfully loaded.
|
|
922
808
|
*/
|
|
923
809
|
loadFromURL(url: string): Promise<number>;
|
|
924
810
|
/**
|
|
925
811
|
* Create a scene from the provided image.
|
|
926
|
-
* @category Scene Creation
|
|
927
812
|
* @param url - The url of the image
|
|
928
813
|
* @returns a promise which resolves if the scene was successfully loaded.
|
|
929
814
|
*/
|
|
930
815
|
createFromImage(url: string): Promise<number>;
|
|
931
816
|
/**
|
|
932
|
-
* Disable the warning logged when no scene is available.
|
|
933
|
-
*
|
|
934
817
|
* If no scene is available, 2 seconds after `CreativeEditorSDK.create()`,
|
|
935
818
|
* a warning is shown on the console. This method disables this warning.
|
|
936
819
|
* That can be useful in situation where you are waiting for long running
|
|
937
820
|
* async processes to finish before creating the scene.
|
|
938
|
-
* @category Configuration
|
|
939
821
|
*/
|
|
940
822
|
disableNoSceneWarning(): void;
|
|
941
823
|
/**
|
|
942
824
|
* Save and return a scene as a base64 encoded string.
|
|
943
825
|
*
|
|
944
|
-
* @category Scene Saving
|
|
945
826
|
* @returns a promise with the scene as a string
|
|
946
827
|
*/
|
|
947
828
|
save(): Promise<string>;
|
|
948
829
|
/**
|
|
949
830
|
* Adds translations to be used by the editor.
|
|
950
831
|
*
|
|
951
|
-
* @
|
|
952
|
-
* @param definition - locale to a translation object
|
|
832
|
+
* @param translations - locale to a translation object
|
|
953
833
|
*
|
|
954
834
|
* @example
|
|
955
835
|
* ```
|
|
@@ -965,46 +845,25 @@ declare class CreativeEditorSDK {
|
|
|
965
845
|
setTranslations(definition: {
|
|
966
846
|
[locale: string]: object;
|
|
967
847
|
}): void;
|
|
968
|
-
/**
|
|
969
|
-
* @category Page Management
|
|
970
|
-
* @experimental This API is experimental and may change or be removed in future versions.
|
|
971
|
-
*/
|
|
972
848
|
unstable_switchPage(pageId: number): Promise<void>;
|
|
973
|
-
/**
|
|
974
|
-
* @category Page Management
|
|
975
|
-
* @experimental This API is experimental and may change or be removed in future versions.
|
|
976
|
-
*/
|
|
977
849
|
unstable_getPages(): Promise<number[]>;
|
|
978
|
-
/**
|
|
979
|
-
* @category Page Management
|
|
980
|
-
* @experimental This API is experimental and may change or be removed in future versions.
|
|
981
|
-
*/
|
|
982
850
|
unstable_onActivePageChanged(callback: (id: number) => void): () => void;
|
|
983
|
-
/**
|
|
984
|
-
* @category Page Management
|
|
985
|
-
* @experimental This API is experimental and may change or be removed in future versions.
|
|
986
|
-
*/
|
|
987
851
|
unstable_focusPage(pageId: number): Promise<void>;
|
|
988
852
|
/**
|
|
989
853
|
* Adds and initializes a plugin to the editor.
|
|
990
|
-
* @category Plugin Management
|
|
991
854
|
*/
|
|
992
855
|
addPlugin(plugin: EditorPlugin): void;
|
|
993
856
|
/**
|
|
994
857
|
* Returns true if a upload handler was configured. If mime types are given
|
|
995
858
|
* as an argument, it will return true if the upload handler supports all of
|
|
996
859
|
* the given mime types.
|
|
997
|
-
* @category Upload Operations
|
|
998
|
-
* @experimental This API is experimental and may change or be removed in future versions.
|
|
999
860
|
*/
|
|
1000
861
|
unstable_supportsUpload(mimeTypes?: string | string[]): boolean;
|
|
1001
862
|
/**
|
|
1002
863
|
* Uses the configured upload handler to upload the given file.
|
|
1003
864
|
*
|
|
1004
|
-
* @category Upload Operations
|
|
1005
865
|
* @param file - The file to upload
|
|
1006
866
|
* @param onProgress - A callback to track the progress of the upload
|
|
1007
|
-
* @experimental This API is experimental and may change or be removed in future versions.
|
|
1008
867
|
*/
|
|
1009
868
|
unstable_upload(file: File, onProgress: (progress: number) => void): Promise<AssetDefinition>;
|
|
1010
869
|
/**
|
|
@@ -1013,12 +872,10 @@ declare class CreativeEditorSDK {
|
|
|
1013
872
|
* @param sourceId - The ID or IDs of the asset sources to refetch. If not provided, all asset sources will be refetched.
|
|
1014
873
|
*
|
|
1015
874
|
* @deprecated Please use `cesdk.engine.asset.assetSourceContentsChanged` instead.
|
|
1016
|
-
* @category Asset Management
|
|
1017
875
|
*/
|
|
1018
876
|
refetchAssetSources(sourceId?: string | string[]): void;
|
|
1019
877
|
/**
|
|
1020
878
|
* Disposes the editor and engine if no longer needed.
|
|
1021
|
-
* @category Lifecycle Management
|
|
1022
879
|
*/
|
|
1023
880
|
dispose(): void;
|
|
1024
881
|
/**
|
|
@@ -1036,7 +893,6 @@ declare class CreativeEditorSDK {
|
|
|
1036
893
|
* load or create an initial scene. Until then the CreativeEditorSDK will
|
|
1037
894
|
* display a loading spinner
|
|
1038
895
|
*
|
|
1039
|
-
* @category Lifecycle Management
|
|
1040
896
|
* @param container - the container to mount the editor as a HTML element or selector
|
|
1041
897
|
* @param config - the initial configuration to create the editor
|
|
1042
898
|
*
|
|
@@ -1211,8 +1067,6 @@ export declare interface DropdownOptions {
|
|
|
1211
1067
|
suffix?: Suffix;
|
|
1212
1068
|
}
|
|
1213
1069
|
|
|
1214
|
-
export { DropShadowOptions }
|
|
1215
|
-
|
|
1216
1070
|
export { EditMode }
|
|
1217
1071
|
|
|
1218
1072
|
export { EditorAPI }
|
|
@@ -1224,8 +1078,7 @@ export declare interface EditorPlugin {
|
|
|
1224
1078
|
initialize: (context: EditorPluginContext) => void;
|
|
1225
1079
|
}
|
|
1226
1080
|
|
|
1227
|
-
|
|
1228
|
-
export declare type EditorPluginContext = EnginePluginContext & {
|
|
1081
|
+
declare type EditorPluginContext = EnginePluginContext & {
|
|
1229
1082
|
cesdk?: CreativeEditorSDK;
|
|
1230
1083
|
};
|
|
1231
1084
|
|
|
@@ -1443,55 +1296,31 @@ export declare interface ExportOptions extends Pick<EngineExportOptions, 'pngCom
|
|
|
1443
1296
|
}
|
|
1444
1297
|
|
|
1445
1298
|
/**
|
|
1446
|
-
*
|
|
1447
|
-
*
|
|
1448
|
-
* The FeatureAPI allows you to enable or disable specific functionality
|
|
1449
|
-
* within the editor based on custom conditions or user permissions.
|
|
1450
|
-
*
|
|
1451
|
-
* @categoryDescription Feature Control
|
|
1452
|
-
* Methods for enabling and checking the status of editor features based on custom predicates.
|
|
1299
|
+
* A public interface for enable/disable features of the Creative Editor SDK
|
|
1453
1300
|
*
|
|
1454
1301
|
* @public
|
|
1455
1302
|
*/
|
|
1456
|
-
|
|
1303
|
+
declare class FeatureAPI {
|
|
1457
1304
|
#private;
|
|
1458
1305
|
/**
|
|
1459
|
-
* Enables
|
|
1460
|
-
*
|
|
1461
|
-
*
|
|
1462
|
-
* is enabled or disabled, a function that receives a context object and
|
|
1463
|
-
* returns a boolean, or omitted to get the default behavior. The context contains
|
|
1464
|
-
* the `isPreviousEnabled` function
|
|
1465
|
-
* which allows you to check if a feature was previously enabled by other
|
|
1466
|
-
* enable calls, including the CE.SDK editor defaults. This enables you to
|
|
1467
|
-
* further restrict features without reimplementing existing logic.
|
|
1306
|
+
* Enables a feature with the given predicate. The predicate is either a
|
|
1307
|
+
* boolean that enforces if the features is enabled or not or a function
|
|
1308
|
+
* that takes a context and returns a boolean value.
|
|
1468
1309
|
*
|
|
1469
|
-
*
|
|
1470
|
-
*
|
|
1471
|
-
*
|
|
1472
|
-
*
|
|
1473
|
-
* ```
|
|
1474
|
-
*
|
|
1475
|
-
* You can also extend the default predicate provided for built-in features.
|
|
1476
|
-
*
|
|
1477
|
-
* ```javascript
|
|
1478
|
-
* cesdk.feature.enable('ly.img.delete', ({ defaultPredicate }) =>
|
|
1479
|
-
* return defaultPredicate() && (new Date().getHours() >= 22);
|
|
1480
|
-
* );
|
|
1481
|
-
* ```
|
|
1310
|
+
* The context contains the `isPreviousEnable` function that can be used to
|
|
1311
|
+
* query if a feature was enabled before by other `enable` calls, e.g. the
|
|
1312
|
+
* defaults from the CE.SDK editor itself. This can be used to further
|
|
1313
|
+
* restrict a feature without re-implementing the existing logic.
|
|
1482
1314
|
*
|
|
1483
|
-
* @
|
|
1484
|
-
* @param
|
|
1485
|
-
* @param predicate - The condition that determines if the feature is enabled.
|
|
1315
|
+
* @param featureId - The feature ID to enable
|
|
1316
|
+
* @param predicate - The predicate to enable the feature
|
|
1486
1317
|
*/
|
|
1487
1318
|
enable(featureId: FeatureId | FeatureId[], predicate?: FeaturePredicate): void;
|
|
1488
1319
|
/**
|
|
1489
|
-
*
|
|
1320
|
+
* Queries if the feature is currently enabled.
|
|
1490
1321
|
*
|
|
1491
|
-
* @
|
|
1492
|
-
* @param
|
|
1493
|
-
* @param context - The context object containing a reference to the underlying engine.
|
|
1494
|
-
* @returns True if the feature is enabled, false otherwise.
|
|
1322
|
+
* @param featureId - The feature ID to query
|
|
1323
|
+
* @param context - The context to query, mainly an instance of the engine
|
|
1495
1324
|
*/
|
|
1496
1325
|
isEnabled(featureId: FeatureId, context: IsEnabledFeatureContext): boolean;
|
|
1497
1326
|
}
|
|
@@ -1501,7 +1330,7 @@ export declare class FeatureAPI {
|
|
|
1501
1330
|
*
|
|
1502
1331
|
* @public
|
|
1503
1332
|
*/
|
|
1504
|
-
export declare type FeatureId = 'ly.img.navigationBar' | 'ly.img.navigate.back' | 'ly.img.navigate.close' | 'ly.img.navigate.undoRedo' | 'ly.img.navigate.zoom' | 'ly.img.navigate.actions' | 'ly.img.delete' | 'ly.img.duplicate' | 'ly.img.placeholder' | 'ly.img.preview' | 'ly.img.page.move' | 'ly.img.page.add' | 'ly.img.group' | 'ly.img.replace' | 'ly.img.text.edit' | 'ly.img.text.typeface' | 'ly.img.text.fontSize' | 'ly.img.text.fontStyle' | 'ly.img.text.alignment' | 'ly.img.text.advanced' | 'ly.img.text.background' | 'ly.img.adjustment' | 'ly.img.filter' | 'ly.img.effect' | 'ly.img.blur' | 'ly.img.shadow' | 'ly.img.cutout' | 'ly.img.fill' | 'ly.img.shape.options' | 'ly.img.combine' | 'ly.img.trim' | 'ly.img.crop' | 'ly.img.volume' | 'ly.img.stroke' | 'ly.img.position' | 'ly.img.animations' | 'ly.img.opacity' | 'ly.img.blendMode' | 'ly.img.videoTimeline' | 'ly.img.video.caption' | 'ly.img.transform.position' | 'ly.img.transform.size' | 'ly.img.transform.rotation' | 'ly.img.transform.flip' | 'ly.img.inspectorBar' | 'ly.img.inspectorToggle' | 'ly.img.page.resize' | 'ly.img.dock' |
|
|
1333
|
+
export declare type FeatureId = 'ly.img.navigationBar' | 'ly.img.navigate.back' | 'ly.img.navigate.close' | 'ly.img.navigate.undoRedo' | 'ly.img.navigate.zoom' | 'ly.img.navigate.actions' | 'ly.img.delete' | 'ly.img.duplicate' | 'ly.img.placeholder' | 'ly.img.preview' | 'ly.img.page.move' | 'ly.img.page.add' | 'ly.img.group' | 'ly.img.replace' | 'ly.img.text.edit' | 'ly.img.text.typeface' | 'ly.img.text.fontSize' | 'ly.img.text.fontStyle' | 'ly.img.text.alignment' | 'ly.img.text.advanced' | 'ly.img.text.background' | 'ly.img.adjustment' | 'ly.img.filter' | 'ly.img.effect' | 'ly.img.blur' | 'ly.img.shadow' | 'ly.img.cutout' | 'ly.img.fill' | 'ly.img.shape.options' | 'ly.img.combine' | 'ly.img.trim' | 'ly.img.crop' | 'ly.img.volume' | 'ly.img.stroke' | 'ly.img.position' | 'ly.img.animations' | 'ly.img.opacity' | 'ly.img.blendMode' | 'ly.img.videoTimeline' | 'ly.img.video.caption' | 'ly.img.transform.position' | 'ly.img.transform.size' | 'ly.img.transform.rotation' | 'ly.img.transform.flip' | 'ly.img.inspectorBar' | 'ly.img.inspectorToggle' | 'ly.img.page.resize' | 'ly.img.dock' | (string & {});
|
|
1505
1334
|
|
|
1506
1335
|
/**
|
|
1507
1336
|
* The feature predicate is used to enable or disable a feature
|
|
@@ -1589,86 +1418,26 @@ declare const INSPECTOR_BAR_TRANSFORM_ORDER_DEFAULT: readonly ["ly.img.spacer",
|
|
|
1589
1418
|
declare const INSPECTOR_BAR_TRIM_ORDER_DEFAULT: readonly ["ly.img.trimControls.inspectorBar"];
|
|
1590
1419
|
|
|
1591
1420
|
/**
|
|
1592
|
-
* A list of the component IDs that can be used in the inspector bar.
|
|
1593
|
-
*
|
|
1594
|
-
* Includes the following IDs:
|
|
1595
|
-
* - 'ly.img.separator'
|
|
1596
|
-
* - 'ly.img.spacer'
|
|
1597
|
-
* - 'ly.img.video.caption.inspectorBar',
|
|
1598
|
-
* - 'ly.img.shape.options.inspectorBar',
|
|
1599
|
-
* - 'ly.img.cutout.type.inspectorBar',
|
|
1600
|
-
* - 'ly.img.cutout.offset.inspectorBar',
|
|
1601
|
-
* - 'ly.img.cutout.smoothing.inspectorBar',
|
|
1602
|
-
* - 'ly.img.group.create.inspectorBar',
|
|
1603
|
-
* - 'ly.img.group.ungroup.inspectorBar',
|
|
1604
|
-
* - 'ly.img.audio.replace.inspectorBar',
|
|
1605
|
-
* - 'ly.img.text.typeFace.inspectorBar',
|
|
1606
|
-
* - 'ly.img.text.style.inspectorBar',
|
|
1607
|
-
* - 'ly.img.text.bold.inspectorBar',
|
|
1608
|
-
* - 'ly.img.text.italic.inspectorBar',
|
|
1609
|
-
* - 'ly.img.text.fontSize.inspectorBar',
|
|
1610
|
-
* - 'ly.img.text.alignHorizontal.inspectorBar',
|
|
1611
|
-
* - 'ly.img.text.advanced.inspectorBar',
|
|
1612
|
-
* - 'ly.img.combine.inspectorBar',
|
|
1613
|
-
* - 'ly.img.fill.inspectorBar',
|
|
1614
|
-
* - 'ly.img.trim.inspectorBar',
|
|
1615
|
-
* - 'ly.img.volume.inspectorBar',
|
|
1616
|
-
* - 'ly.img.crop.inspectorBar',
|
|
1617
|
-
* - 'ly.img.stroke.inspectorBar',
|
|
1618
|
-
* - 'ly.img.text.background.inspectorBar',
|
|
1619
|
-
* - 'ly.img.animations.inspectorBar',
|
|
1620
|
-
* - 'ly.img.adjustment.inspectorBar',
|
|
1621
|
-
* - 'ly.img.filter.inspectorBar',
|
|
1622
|
-
* - 'ly.img.effect.inspectorBar',
|
|
1623
|
-
* - 'ly.img.blur.inspectorBar',
|
|
1624
|
-
* - 'ly.img.shadow.inspectorBar',
|
|
1625
|
-
* - 'ly.img.opacityOptions.inspectorBar',
|
|
1626
|
-
* - 'ly.img.position.inspectorBar',
|
|
1627
|
-
* - 'ly.img.inspectorToggle.inspectorBar'
|
|
1628
|
-
* - 'ly.img.trimControls.inspectorBar',
|
|
1629
|
-
* - 'ly.img.cropControls.inspectorBar'
|
|
1630
1421
|
* @public
|
|
1631
1422
|
*/
|
|
1632
1423
|
export declare type InspectorBarComponentId = 'ly.img.separator' | 'ly.img.spacer' | (typeof INSPECTOR_BAR_TRANSFORM_ORDER_DEFAULT)[number] | (typeof INSPECTOR_BAR_TRIM_ORDER_DEFAULT)[number] | (typeof INSPECTOR_BAR_CROP_ORDER_DEFAULT)[number] | (string & {});
|
|
1633
1424
|
|
|
1634
|
-
|
|
1635
|
-
* Manages localization and internationalization settings for the Creative Editor SDK.
|
|
1636
|
-
*
|
|
1637
|
-
* The InternationalisationAPI provides methods to get and set the current locale,
|
|
1638
|
-
* as well as add custom translations for the editor interface.
|
|
1639
|
-
*
|
|
1640
|
-
* @categoryDescription Localization
|
|
1641
|
-
* Methods for managing locale settings and custom translations within the editor.
|
|
1642
|
-
*
|
|
1643
|
-
* @public
|
|
1644
|
-
*/
|
|
1645
|
-
export declare class InternationalizationAPI {
|
|
1425
|
+
declare class InternationalisationAPI {
|
|
1646
1426
|
#private;
|
|
1647
1427
|
/**
|
|
1648
|
-
*
|
|
1649
|
-
*
|
|
1650
|
-
* @category Localization
|
|
1651
|
-
* @returns The currently set locale as a string, or the fallback locale if none is set.
|
|
1428
|
+
* Returns the currently set locale.
|
|
1429
|
+
* @returns Currently set locale as string
|
|
1652
1430
|
*/
|
|
1653
1431
|
getLocale(): string;
|
|
1654
1432
|
/**
|
|
1655
|
-
*
|
|
1656
|
-
*
|
|
1657
|
-
* This will **not check** whether translations for the given locale are available.
|
|
1658
|
-
*
|
|
1659
|
-
* @category Localization
|
|
1660
|
-
* @param locale - The locale string to set as active (e.g., 'en', 'de', 'fr').
|
|
1433
|
+
* Updates the current locale to the one passed as parameter.
|
|
1434
|
+
* @param locale - String to which the locale should be updated to
|
|
1661
1435
|
*/
|
|
1662
1436
|
setLocale: (locale: string) => void;
|
|
1663
1437
|
/**
|
|
1664
|
-
* Adds
|
|
1665
|
-
*
|
|
1666
|
-
* This method allows you to provide custom translations that will be used
|
|
1667
|
-
* by the editor interface. Translations are organized by locale and can
|
|
1668
|
-
* override or extend the default editor translations.
|
|
1438
|
+
* Adds translations to be used by the editor.
|
|
1669
1439
|
*
|
|
1670
|
-
* @
|
|
1671
|
-
* @param definition - An object mapping locale strings to translation objects.
|
|
1440
|
+
* @param translations - locale to a translation object
|
|
1672
1441
|
*
|
|
1673
1442
|
* @example
|
|
1674
1443
|
* ```
|
|
@@ -1686,8 +1455,7 @@ export declare class InternationalizationAPI {
|
|
|
1686
1455
|
}): void;
|
|
1687
1456
|
}
|
|
1688
1457
|
|
|
1689
|
-
|
|
1690
|
-
export declare type IsEnabledFeatureContext = {
|
|
1458
|
+
declare type IsEnabledFeatureContext = {
|
|
1691
1459
|
engine: CreativeEngine_2;
|
|
1692
1460
|
};
|
|
1693
1461
|
|
|
@@ -1725,20 +1493,6 @@ export { MimeType_2 as MimeType }
|
|
|
1725
1493
|
declare const NAVIGATION_BAR_ORDER_DEFAULT: readonly ["ly.img.back.navigationBar", "ly.img.undoRedo.navigationBar", "ly.img.pageResize.navigationBar", "ly.img.spacer", "ly.img.title.navigationBar", "ly.img.spacer", "ly.img.zoom.navigationBar", "ly.img.preview.navigationBar", "ly.img.actions.navigationBar", "ly.img.close.navigationBar"];
|
|
1726
1494
|
|
|
1727
1495
|
/**
|
|
1728
|
-
* A list of the component IDs that can be used in the navigation bar.
|
|
1729
|
-
*
|
|
1730
|
-
* Includes the following IDs:
|
|
1731
|
-
* - 'ly.img.separator'
|
|
1732
|
-
* - 'ly.img.spacer'
|
|
1733
|
-
* - 'ly.img.back.navigationBar'
|
|
1734
|
-
* - 'ly.img.undoRedo.navigationBar'
|
|
1735
|
-
* - 'ly.img.pageResize.navigationBar'
|
|
1736
|
-
* - 'ly.img.title.navigationBar'
|
|
1737
|
-
* - 'ly.img.zoom.navigationBar'
|
|
1738
|
-
* - 'ly.img.preview.navigationBar'
|
|
1739
|
-
* - 'ly.img.actions.navigationBar'
|
|
1740
|
-
* - 'ly.img.close.navigationBar'
|
|
1741
|
-
*
|
|
1742
1496
|
* @public
|
|
1743
1497
|
*/
|
|
1744
1498
|
export declare type NavigationBarComponentId = 'ly.img.separator' | 'ly.img.spacer' | (typeof NAVIGATION_BAR_ORDER_DEFAULT)[number] | (string & {});
|
|
@@ -2096,36 +1850,11 @@ export declare interface UserInterface {
|
|
|
2096
1850
|
}
|
|
2097
1851
|
|
|
2098
1852
|
/**
|
|
2099
|
-
*
|
|
2100
|
-
*
|
|
2101
|
-
* The UserInterfaceAPI provides comprehensive methods for managing panels,
|
|
2102
|
-
* notifications, dialogs, component registration, UI ordering, asset libraries,
|
|
2103
|
-
* and custom interface elements within the editor.
|
|
2104
|
-
*
|
|
2105
|
-
* @categoryDescription Panel Management
|
|
2106
|
-
* Methods for opening, closing, and configuring panels within the editor interface.
|
|
2107
|
-
*
|
|
2108
|
-
* @categoryDescription Notifications
|
|
2109
|
-
* Methods for displaying and managing user notifications and messages.
|
|
2110
|
-
*
|
|
2111
|
-
* @categoryDescription Dialogs
|
|
2112
|
-
* Methods for showing, updating, and closing modal dialogs.
|
|
2113
|
-
*
|
|
2114
|
-
* @categoryDescription Component Registration
|
|
2115
|
-
* Methods for registering custom components and panels in the editor.
|
|
2116
|
-
*
|
|
2117
|
-
* @categoryDescription UI Layout
|
|
2118
|
-
* Methods for controlling the order and arrangement of UI components.
|
|
2119
|
-
*
|
|
2120
|
-
* @categoryDescription Asset Library
|
|
2121
|
-
* Methods for managing asset library entries and configurations.
|
|
2122
|
-
*
|
|
2123
|
-
* @categoryDescription Experimental Features
|
|
2124
|
-
* Experimental APIs that may change or be removed in future versions.
|
|
1853
|
+
* A public interface for controlling the UI of the Creative Editor SDK
|
|
2125
1854
|
*
|
|
2126
1855
|
* @public
|
|
2127
1856
|
*/
|
|
2128
|
-
|
|
1857
|
+
declare class UserInterfaceAPI {
|
|
2129
1858
|
#private;
|
|
2130
1859
|
/**
|
|
2131
1860
|
* PLEASE NOTE: This contains experimental APIs.
|
|
@@ -2137,170 +1866,157 @@ export declare class UserInterfaceAPI {
|
|
|
2137
1866
|
*/
|
|
2138
1867
|
experimental: ExperimentalUserInterfaceAPI.UserInterfaceAPI;
|
|
2139
1868
|
/**
|
|
2140
|
-
* Opens a panel if it exists, is not
|
|
1869
|
+
* Opens a panel with the given id if and only if it exists, is not open and
|
|
1870
|
+
* currently registered (known to the UI). Otherwise the method does nothing
|
|
1871
|
+
* and is a noop.
|
|
2141
1872
|
*
|
|
2142
|
-
*
|
|
1873
|
+
* Available panel ids beside custom panel ids:
|
|
1874
|
+
* - `//ly.img.panel/inspector`
|
|
1875
|
+
* opening the inspector panel for the current selected block
|
|
1876
|
+
* - `//ly.img.panel/assetLibrary.replace`
|
|
1877
|
+
* opening the library with asset to replace the currently selected block.
|
|
1878
|
+
* Beware that the library might show nothing depending on how it configured.
|
|
2143
1879
|
*
|
|
2144
|
-
*
|
|
2145
|
-
*
|
|
2146
|
-
* - `//ly.img.panel/assetLibrary.replace` - Opens the asset library for replacing the selected block. Beware that the library might show nothing depending on how it was configured.
|
|
2147
|
-
*
|
|
2148
|
-
* @category Panel Management
|
|
2149
|
-
* @param panelId - The ID of the panel to open.
|
|
2150
|
-
* @param options - Optional configuration for panel position and floating state.
|
|
1880
|
+
* @param panelId - The id of the panel to open.
|
|
1881
|
+
* @param options - Options to override the position and floating state of the panel.
|
|
2151
1882
|
*/
|
|
2152
1883
|
openPanel<T extends PanelId>(panelId: T, options?: PanelOptions<T>): void;
|
|
2153
1884
|
/**
|
|
2154
|
-
* Closes a panel if it exists and is
|
|
2155
|
-
*
|
|
1885
|
+
* Closes a panel with the given id if and only if it exists and is open.
|
|
2156
1886
|
* Otherwise the method does nothing and is a noop.
|
|
2157
1887
|
*
|
|
2158
|
-
* Available
|
|
2159
|
-
* - `//ly.img.panel/inspector`
|
|
2160
|
-
*
|
|
2161
|
-
* - `//ly.img.panel/assetLibrary
|
|
1888
|
+
* Available panel ids beside custom panel ids:
|
|
1889
|
+
* - `//ly.img.panel/inspector`
|
|
1890
|
+
* closing the inspector panel for the current selected block
|
|
1891
|
+
* - `//ly.img.panel/assetLibrary`
|
|
1892
|
+
* closing the currently open library
|
|
1893
|
+
* - `//ly.img.panel/assetLibrary.replace`
|
|
1894
|
+
* closing the library with asset to replace the currently selected block.
|
|
2162
1895
|
*
|
|
2163
|
-
* @
|
|
2164
|
-
* @param panelId - The ID of the panel to close.
|
|
1896
|
+
* @param panelId - The id of the panel to close.
|
|
2165
1897
|
*/
|
|
2166
1898
|
closePanel(panelId: string): void;
|
|
2167
1899
|
/**
|
|
2168
|
-
*
|
|
1900
|
+
* Returns `true` if and only if a panel with the given id is open.
|
|
2169
1901
|
*
|
|
2170
|
-
* Available
|
|
2171
|
-
* - `//ly.img.panel/inspector`
|
|
2172
|
-
*
|
|
2173
|
-
* - `//ly.img.panel/assetLibrary
|
|
1902
|
+
* Available panel ids beside custom panel ids:
|
|
1903
|
+
* - `//ly.img.panel/inspector`
|
|
1904
|
+
* inspector panel for the current selected block
|
|
1905
|
+
* - `//ly.img.panel/assetLibrary`
|
|
1906
|
+
* the asset library
|
|
1907
|
+
* - `//ly.img.panel/assetLibrary.replace`
|
|
1908
|
+
* closing the library with asset to replace the currently selected block.
|
|
2174
1909
|
*
|
|
2175
|
-
* @
|
|
2176
|
-
* @param
|
|
2177
|
-
* @param options - Optional criteria to match against the panel's current state.
|
|
2178
|
-
* @returns True if the panel is open and matches the specified options, false otherwise.
|
|
1910
|
+
* @param panelId - The id of a panel that might be open
|
|
1911
|
+
* @param options - Check if the panel is open with these specific options
|
|
2179
1912
|
*/
|
|
2180
1913
|
isPanelOpen<T extends PanelId>(panelId: T, options?: PanelOptions<T>): boolean;
|
|
2181
1914
|
/**
|
|
2182
|
-
*
|
|
1915
|
+
* Returns all panel ids. An optional filter can be applied to only
|
|
1916
|
+
* return panels that are open or have a specific position.
|
|
2183
1917
|
*
|
|
2184
|
-
*
|
|
2185
|
-
* @param options - Optional filter criteria for panel state and position.
|
|
2186
|
-
* @returns Array of panel IDs matching the specified criteria.
|
|
2187
|
-
*
|
|
2188
|
-
* @example
|
|
1918
|
+
* E.g.:
|
|
2189
1919
|
* ```
|
|
2190
1920
|
* cesdk.ui.findAllPanels();
|
|
2191
1921
|
* cesdk.ui.findAllPanels({ open: true, position: 'left' });
|
|
2192
1922
|
* ```
|
|
1923
|
+
*
|
|
1924
|
+
* @param options - Return panel ids with these specific options
|
|
1925
|
+
* @returns All panel ids (that match the given options if provided)
|
|
2193
1926
|
*/
|
|
2194
1927
|
findAllPanels<T extends PanelId>(options?: PanelOptions<T> & {
|
|
2195
1928
|
open?: boolean;
|
|
2196
1929
|
}): string[];
|
|
2197
1930
|
/**
|
|
2198
|
-
*
|
|
1931
|
+
* Set the position of the panel in the editor
|
|
2199
1932
|
*
|
|
2200
|
-
* @
|
|
2201
|
-
* @param
|
|
2202
|
-
* @param panelPosition - The position ('left' or 'right') or a function returning the position.
|
|
1933
|
+
* @param panelId - The id of a panel to set the position
|
|
1934
|
+
* @param panelPosition - either `left` or `right`
|
|
2203
1935
|
*/
|
|
2204
1936
|
setPanelPosition(panelId: string, panelPosition: PanelPosition | (() => PanelPosition)): void;
|
|
2205
1937
|
/**
|
|
2206
|
-
*
|
|
1938
|
+
* Returns the position for a panel either `left` or `right`
|
|
2207
1939
|
*
|
|
2208
|
-
* @
|
|
2209
|
-
* @param panelId - The ID of the panel.
|
|
2210
|
-
* @returns The panel's position ('left' or 'right').
|
|
1940
|
+
* @param panelId - The id of a panel to get the position
|
|
2211
1941
|
*/
|
|
2212
1942
|
getPanelPosition(panelId: string): PanelPosition;
|
|
2213
1943
|
/**
|
|
2214
|
-
*
|
|
1944
|
+
* Set if the panel is floating over the canvas
|
|
2215
1945
|
*
|
|
2216
|
-
* @
|
|
2217
|
-
* @param
|
|
2218
|
-
* @param floating - True to make the panel float over the canvas, false to dock it.
|
|
1946
|
+
* @param panelId - The id of a panel to set the position
|
|
1947
|
+
* @param floating - A boolean that determines if the panel is floating over the canvas
|
|
2219
1948
|
*/
|
|
2220
1949
|
setPanelFloating(panelId: string, floating: boolean | (() => boolean)): void;
|
|
2221
1950
|
/**
|
|
2222
|
-
*
|
|
1951
|
+
* Returns if the given panel is floating over the canvas
|
|
2223
1952
|
*
|
|
2224
|
-
* @
|
|
2225
|
-
* @param panelId - The ID of the panel to check.
|
|
2226
|
-
* @returns True if the panel is floating, false if it's docked.
|
|
1953
|
+
* @param panelId - The id of a panel to determine if it is floating
|
|
2227
1954
|
*/
|
|
2228
1955
|
getPanelFloating(panelId: string): boolean;
|
|
2229
1956
|
/**
|
|
2230
|
-
*
|
|
2231
|
-
*
|
|
2232
|
-
*
|
|
2233
|
-
* They support different types (info, success, warning, error) and durations.
|
|
1957
|
+
* Shows a notification to the user. A notification is a non-blocking
|
|
1958
|
+
* message that is shown to the user for a certain amount of time.
|
|
1959
|
+
* The user can dismiss the notification.
|
|
2234
1960
|
*
|
|
2235
|
-
* @
|
|
2236
|
-
* @
|
|
2237
|
-
* @returns The notification ID for programmatic updates or dismissal.
|
|
1961
|
+
* @param notification - The notification to show. Can be a string or an notification object.
|
|
1962
|
+
* @returns The id of the notification that is shown. Can be used to programmatically update or dismiss the notification.
|
|
2238
1963
|
*/
|
|
2239
1964
|
showNotification(notification: string | Notification_2): string;
|
|
2240
1965
|
/**
|
|
2241
|
-
*
|
|
1966
|
+
* Programmatically dismisses a notification with the given id.
|
|
2242
1967
|
*
|
|
2243
|
-
* @
|
|
2244
|
-
* @param id - The ID of the notification to dismiss.
|
|
1968
|
+
* @param id - The id of the notification to dismiss.
|
|
2245
1969
|
*/
|
|
2246
1970
|
dismissNotification(id: string): void;
|
|
2247
1971
|
/**
|
|
2248
|
-
*
|
|
1972
|
+
* Programmatically updates a notification with the given id. The
|
|
1973
|
+
* notification object will be merged into the existing notification.
|
|
2249
1974
|
*
|
|
2250
|
-
*
|
|
2251
|
-
* If the
|
|
2252
|
-
*
|
|
1975
|
+
* If the duration is updated, the current timeout will be cleared and set to
|
|
1976
|
+
* the new duration. If the notification is already dismissed, the update is
|
|
1977
|
+
* a noop.
|
|
2253
1978
|
*
|
|
2254
|
-
* @
|
|
2255
|
-
* @param
|
|
2256
|
-
* @param notification - Partial notification properties to merge.
|
|
1979
|
+
* @param id - The id of the notification to dismiss.
|
|
1980
|
+
* @param notification - The partial notification object that will be merged into the notification.
|
|
2257
1981
|
*/
|
|
2258
1982
|
updateNotification(id: string, notification: Partial<Notification_2>): void;
|
|
2259
1983
|
/**
|
|
2260
|
-
*
|
|
1984
|
+
* Programmatically show a dialog with the given content. The dialog
|
|
1985
|
+
* can be of different types (e.g. `info`, `success`, `warning`, `error`,
|
|
1986
|
+
* `loading`) and can have different actions (e.g. `OK`, `Cancel`).
|
|
2261
1987
|
*
|
|
2262
|
-
*
|
|
2263
|
-
*
|
|
2264
|
-
*
|
|
2265
|
-
* @category Dialogs
|
|
2266
|
-
* @param dialog - The dialog content as a string or dialog object.
|
|
2267
|
-
* @returns The dialog ID for programmatic updates or closure.
|
|
1988
|
+
* @param dialog - The dialog to show. Can be a string or a dialog object.
|
|
1989
|
+
* @returns - The id of the dialog. Can be used to programmatically close or update the dialog.
|
|
2268
1990
|
*/
|
|
2269
1991
|
showDialog(dialog: string | Dialog): string;
|
|
2270
1992
|
/**
|
|
2271
|
-
*
|
|
2272
|
-
*
|
|
2273
|
-
* The dialog properties will be merged with the existing dialog configuration.
|
|
1993
|
+
* Update a dialog with the given id. The dialog will be updated with the
|
|
1994
|
+
* given partial dialog object. The dialog will be merged with the existing dialog.
|
|
2274
1995
|
*
|
|
2275
|
-
* @
|
|
2276
|
-
* @param
|
|
2277
|
-
* @param dialog - Partial dialog properties to merge, or a function that receives the current dialog and returns updates.
|
|
1996
|
+
* @param id - The id of the dialog to update.
|
|
1997
|
+
* @param dialog - The partial dialog object that will be merged into the dialog.
|
|
2278
1998
|
*/
|
|
2279
1999
|
updateDialog(id: string, dialog: Partial<Dialog> | ((dialog: Dialog) => Partial<Dialog>)): void;
|
|
2280
2000
|
/**
|
|
2281
|
-
*
|
|
2001
|
+
* Programmatically close a registered dialog with the given id. If the dialog is already closed, the close call is a noop.
|
|
2282
2002
|
*
|
|
2283
|
-
*
|
|
2284
|
-
* Closing an already closed dialog has no effect.
|
|
2285
|
-
*
|
|
2286
|
-
* @category Dialogs
|
|
2287
|
-
* @param id - The ID of the dialog to close.
|
|
2003
|
+
* @param id - The id of the dialog to close.
|
|
2288
2004
|
*/
|
|
2289
2005
|
closeDialog(id: string): void;
|
|
2290
2006
|
/**
|
|
2291
|
-
*
|
|
2007
|
+
* Registeres a custom panel to hook into a dom element and render any
|
|
2008
|
+
* custom UI code.
|
|
2292
2009
|
*
|
|
2293
|
-
* The onMount function
|
|
2294
|
-
*
|
|
2010
|
+
* The `onMount` function will be called if the panel is opened (e.g. via the `openPanel` API).
|
|
2011
|
+
* The returned function of the `onMount` call will be called once the panels closes.
|
|
2295
2012
|
*
|
|
2296
|
-
*
|
|
2297
|
-
*
|
|
2298
|
-
* @param onMount - Function called when the panel is mounted, should return a cleanup function.
|
|
2299
|
-
* @experimental This API may change or be removed in future versions.
|
|
2013
|
+
* Please be aware that this is experimental right now. This API can change or
|
|
2014
|
+
* be replaced or even removed completely in future versions.
|
|
2300
2015
|
*/
|
|
2301
2016
|
unstable_registerCustomPanel(panelId: string, onMount: CustomPanelMountFunction): void;
|
|
2302
2017
|
/**
|
|
2303
|
-
* Registers a panel with
|
|
2018
|
+
* Registers a panel which content can be rendered with a panel builder,
|
|
2019
|
+
* comparable to the way we register custom components.
|
|
2304
2020
|
*
|
|
2305
2021
|
* The builder render function will be called with a builder and the engine
|
|
2306
2022
|
* as arguments. The builder object is used to defined what base components
|
|
@@ -2308,22 +2024,17 @@ export declare class UserInterfaceAPI {
|
|
|
2308
2024
|
* state from the engine. The render function will be re-called if anything
|
|
2309
2025
|
* in the engine changes regarding the made engine calls.
|
|
2310
2026
|
*
|
|
2311
|
-
* @
|
|
2312
|
-
* @param
|
|
2313
|
-
* @param renderPanel - Function that renders the panel content using the builder system.
|
|
2027
|
+
* @param panelId - The id of the panel that can be used in with the Panel APIs.
|
|
2028
|
+
* @param renderPanel - The render function that will be called to render the content of the panel
|
|
2314
2029
|
*/
|
|
2315
2030
|
registerPanel<P extends ComponentPayload = ComponentPayload>(panelId: string, renderPanel: BuilderRenderFunction<P>): void;
|
|
2316
2031
|
/**
|
|
2317
|
-
* Registers a panel with builder-based rendering system.
|
|
2318
|
-
*
|
|
2319
|
-
* @category Component Registration
|
|
2320
|
-
* @param panelId - The panel ID for use with panel management APIs.
|
|
2321
|
-
* @param renderComponent - Function that renders the panel content using the builder system.
|
|
2322
2032
|
* @deprecated Use `registerPanel` instead.
|
|
2323
2033
|
*/
|
|
2324
2034
|
unstable_registerPanel<P extends ComponentPayload = ComponentPayload>(panelId: string, renderComponent: BuilderRenderFunction<P>): void;
|
|
2325
2035
|
/**
|
|
2326
|
-
* Registers a component that can be rendered at different
|
|
2036
|
+
* Registers a component that can be used and rendered at different
|
|
2037
|
+
* locations in the UI.
|
|
2327
2038
|
*
|
|
2328
2039
|
* The builder render function will be called with a builder and the engine
|
|
2329
2040
|
* as arguments. The builder object is used to defined what base components
|
|
@@ -2331,28 +2042,25 @@ export declare class UserInterfaceAPI {
|
|
|
2331
2042
|
* state from the engine. The render function will be re-called if anything
|
|
2332
2043
|
* in the engine changes regarding the made engine calls.
|
|
2333
2044
|
*
|
|
2334
|
-
* @
|
|
2335
|
-
* @param
|
|
2336
|
-
* @param renderComponent - Function that renders the component using the builder system.
|
|
2045
|
+
* @param id - The id of the component that can be used in the order APIs. Might be an array of ids. In this case the component is registered for all ids.
|
|
2046
|
+
* @param renderComponent - The render function that will be called to render the component
|
|
2337
2047
|
*/
|
|
2338
2048
|
registerComponent<P extends ComponentPayload = ComponentPayload>(ids: string | string[], renderComponent: BuilderRenderFunction<P>): void;
|
|
2339
2049
|
/**
|
|
2340
|
-
*
|
|
2341
|
-
*
|
|
2342
|
-
* The ids in this order refer to registered default components or custom components
|
|
2050
|
+
* Defines in what order components are rendered in the dock. The
|
|
2051
|
+
* id in this order refer to registered default components or custom components
|
|
2343
2052
|
* registered in `registerComponent`.
|
|
2344
2053
|
*
|
|
2345
2054
|
* Different orders can be set depending on different contexts. The context
|
|
2346
2055
|
* consists of the edit mode (e.g. `Transform` or `Text`) right now. If no
|
|
2347
2056
|
* context is given, the default order is set for the `Transform` edit mode.
|
|
2348
2057
|
*
|
|
2349
|
-
* @
|
|
2350
|
-
* @param
|
|
2351
|
-
* @param orderContext - Optional context specifying when this order applies.
|
|
2058
|
+
* @param dockOrder - The order of components in the dock
|
|
2059
|
+
* @param orderContext - The context in which the order should be set
|
|
2352
2060
|
*/
|
|
2353
2061
|
setDockOrder(dockOrder: (DockOrderComponentId | DockOrderComponent)[], orderContext?: OrderContext): void;
|
|
2354
2062
|
/**
|
|
2355
|
-
*
|
|
2063
|
+
* Returns the current order of components that are rendered in the dock.
|
|
2356
2064
|
*
|
|
2357
2065
|
* The id in this order refer to registered default components or custom components
|
|
2358
2066
|
* registered in `registerComponent`.
|
|
@@ -2362,15 +2070,12 @@ export declare class UserInterfaceAPI {
|
|
|
2362
2070
|
* If no context is given, the default order (with `Transform` edit mode) is
|
|
2363
2071
|
* returned.
|
|
2364
2072
|
*
|
|
2365
|
-
* @
|
|
2366
|
-
* @
|
|
2367
|
-
* @returns Array of component configurations defining the dock order.
|
|
2073
|
+
* @param orderContext - The context for the requested order
|
|
2074
|
+
* @returns The order of components in the dock
|
|
2368
2075
|
*/
|
|
2369
2076
|
getDockOrder(orderContext?: OrderContext): DockOrderComponent[];
|
|
2370
2077
|
/**
|
|
2371
|
-
*
|
|
2372
|
-
*
|
|
2373
|
-
* The
|
|
2078
|
+
* Defines in what order components are rendered in the inspector bar. The
|
|
2374
2079
|
* id in this order refer to registered default components or custom components
|
|
2375
2080
|
* registered in `registerComponent`.
|
|
2376
2081
|
*
|
|
@@ -2378,189 +2083,192 @@ export declare class UserInterfaceAPI {
|
|
|
2378
2083
|
* consists of the edit mode (e.g. `Transform` or `Text`) right now. If no
|
|
2379
2084
|
* context is given, the default order is set for the `Transform` edit mode.
|
|
2380
2085
|
*
|
|
2381
|
-
* @
|
|
2382
|
-
* @param
|
|
2383
|
-
* @param orderContext - Optional context specifying when this order applies.
|
|
2086
|
+
* @param inspectorBarOrder - The order of components in the inspector bar
|
|
2087
|
+
* @param orderContext - The context in which the order should be set
|
|
2384
2088
|
*/
|
|
2385
2089
|
setInspectorBarOrder(inspectorBarOrder: (InspectorBarComponentId | OrderComponent<InspectorBarComponentId>)[], orderContext?: OrderContext): void;
|
|
2386
2090
|
/**
|
|
2387
|
-
*
|
|
2091
|
+
* Returns the current order of components that are rendered in the inspector bar.
|
|
2092
|
+
*
|
|
2093
|
+
* The id in this order refer to registered default components or custom components
|
|
2094
|
+
* registered in `registerComponent`.
|
|
2388
2095
|
*
|
|
2389
|
-
*
|
|
2390
|
-
*
|
|
2391
|
-
*
|
|
2096
|
+
* Different orders could have been set depending on different contexts.
|
|
2097
|
+
* The context consists of the edit mode (e.g. `Transform` or `Text`) right now.
|
|
2098
|
+
* If no context is given, the default order (with `Transform` edit mode) is
|
|
2099
|
+
* returned.
|
|
2392
2100
|
*
|
|
2393
|
-
* @
|
|
2394
|
-
* @
|
|
2395
|
-
* @returns Array of component configurations defining the inspector bar order.
|
|
2101
|
+
* @param orderContext - The context for the requested order
|
|
2102
|
+
* @returns The order of components in the inspector bar
|
|
2396
2103
|
*/
|
|
2397
2104
|
getInspectorBarOrder(orderContext?: OrderContext): OrderComponent[];
|
|
2398
2105
|
/**
|
|
2399
|
-
*
|
|
2106
|
+
* Defines what in what order components are rendered in the canvas menu. The
|
|
2107
|
+
* id in this order refer to registered default components or custom components
|
|
2108
|
+
* registered in `registerComponent`.
|
|
2400
2109
|
*
|
|
2401
|
-
*
|
|
2402
|
-
*
|
|
2403
|
-
*
|
|
2110
|
+
* Different orders can be set depending on different contexts. The context
|
|
2111
|
+
* consists of the edit mode (e.g. `Transform` or `Text`) right now. If no
|
|
2112
|
+
* context is given, the default order is set for the `Transform` edit mode.
|
|
2404
2113
|
*
|
|
2405
|
-
* @
|
|
2406
|
-
* @param
|
|
2407
|
-
* @param orderContext - Optional context specifying when this order applies.
|
|
2114
|
+
* @param canvasMenuOrder - The order of components in the canvas menu
|
|
2115
|
+
* @param orderContext - The context in which the order should be set
|
|
2408
2116
|
*/
|
|
2409
2117
|
setCanvasMenuOrder(canvasMenuOrder: (CanvasMenuComponentId | OrderComponent<CanvasMenuComponentId>)[], orderContext?: OrderContext): void;
|
|
2410
2118
|
/**
|
|
2411
|
-
*
|
|
2119
|
+
* Returns the current order of components that are rendered in the canvas menu.
|
|
2120
|
+
*
|
|
2121
|
+
* The id in this order refer to registered default components or custom components
|
|
2122
|
+
* registered in `registerComponent`.
|
|
2412
2123
|
*
|
|
2413
|
-
*
|
|
2414
|
-
*
|
|
2415
|
-
*
|
|
2124
|
+
* Different orders could have been set depending on different contexts.
|
|
2125
|
+
* The context consists of the edit mode (e.g. `Transform` or `Text`) right now.
|
|
2126
|
+
* If no context is given, the default order (with `Transform` edit mode) is
|
|
2127
|
+
* returned.
|
|
2416
2128
|
*
|
|
2417
|
-
* @
|
|
2418
|
-
* @
|
|
2419
|
-
* @returns Array of component configurations defining the canvas menu order.
|
|
2129
|
+
* @param orderContext - The context for the requested order
|
|
2130
|
+
* @returns The order of components in the canvas menu
|
|
2420
2131
|
*/
|
|
2421
2132
|
getCanvasMenuOrder(orderContext?: OrderContext): OrderComponent[];
|
|
2422
2133
|
/**
|
|
2423
|
-
*
|
|
2134
|
+
* Defines the order in which components are rendered in the navigation bar. The
|
|
2135
|
+
* id in this order refer to registered default components or custom components
|
|
2136
|
+
* registered in `registerComponent`.
|
|
2424
2137
|
*
|
|
2425
|
-
*
|
|
2426
|
-
*
|
|
2427
|
-
*
|
|
2138
|
+
* Different orders can be set depending on different contexts. The context
|
|
2139
|
+
* consists of the edit mode (e.g. `Transform` or `Text`) right now. If no
|
|
2140
|
+
* context is given, the default order is set for the `Transform` edit mode.
|
|
2428
2141
|
*
|
|
2429
|
-
* @
|
|
2430
|
-
* @param
|
|
2431
|
-
* @param orderContext - Optional context specifying when this order applies.
|
|
2142
|
+
* @param navigationBarOrder - The order of components in the navigation bar
|
|
2143
|
+
* @param orderContext - The context in which the order should be set
|
|
2432
2144
|
*/
|
|
2433
2145
|
setNavigationBarOrder(navigationBarOrder: (NavigationBarComponentId | OrderComponent<NavigationBarComponentId>)[], orderContext?: OrderContext): void;
|
|
2434
2146
|
/**
|
|
2435
|
-
*
|
|
2147
|
+
* Returns the current order of components that are rendered in the navigation bar.
|
|
2148
|
+
*
|
|
2149
|
+
* The id in this order refer to registered default components or custom components
|
|
2150
|
+
* registered in `registerComponent`.
|
|
2436
2151
|
*
|
|
2437
|
-
*
|
|
2438
|
-
*
|
|
2439
|
-
*
|
|
2152
|
+
* Different orders could have been set depending on different contexts.
|
|
2153
|
+
* The context consists of the edit mode (e.g. `Transform` or `Text`) right now.
|
|
2154
|
+
* If no context is given, the default order (with `Transform` edit mode) is
|
|
2155
|
+
* returned.
|
|
2440
2156
|
*
|
|
2441
|
-
* @
|
|
2442
|
-
* @
|
|
2443
|
-
* @returns Array of component configurations defining the navigation bar order.
|
|
2157
|
+
* @param orderContext - The context for the requested order
|
|
2158
|
+
* @returns The order of components in the navigation bar
|
|
2444
2159
|
*/
|
|
2445
2160
|
getNavigationBarOrder(orderContext?: OrderContext): OrderComponent[];
|
|
2446
2161
|
/**
|
|
2447
|
-
*
|
|
2162
|
+
* Defines the order in which components are rendered in the canvas bar. The
|
|
2163
|
+
* id in this order refer to registered default components or custom components
|
|
2164
|
+
* registered in `registerComponent`.
|
|
2448
2165
|
*
|
|
2449
|
-
*
|
|
2450
|
-
*
|
|
2451
|
-
* of the canvas. Different orders can be set for different contexts
|
|
2452
|
-
* (e.g., Transform or Text edit modes). Defaults to Transform mode if no context is provided.
|
|
2166
|
+
* There are two different canvas bar positioned at the top and the bottom
|
|
2167
|
+
* of the canvas. The position can be set with the `position` parameter.
|
|
2453
2168
|
*
|
|
2454
|
-
*
|
|
2455
|
-
*
|
|
2456
|
-
*
|
|
2457
|
-
*
|
|
2169
|
+
* Different orders can be set depending on different contexts. The context
|
|
2170
|
+
* consists of the edit mode (e.g. `Transform` or `Text`) right now. If no
|
|
2171
|
+
* context is given, the default order is set for the `Transform` edit mode.
|
|
2172
|
+
*
|
|
2173
|
+
* @param canvasBarOrder - The order of components in the canvas bar
|
|
2174
|
+
* @param position - The position of the canvas bar (`top` or `bottom`)
|
|
2175
|
+
* @param orderContext - The context in which the order should be set
|
|
2458
2176
|
*/
|
|
2459
2177
|
setCanvasBarOrder(canvasBarOrder: (CanvasBarComponentId | OrderComponent<CanvasBarComponentId>)[], position: 'top' | 'bottom', orderContext?: OrderContext): void;
|
|
2460
2178
|
/**
|
|
2461
|
-
*
|
|
2179
|
+
* Returns the current order of components that are rendered in the canvas bar at
|
|
2180
|
+
* the given position (either `top` or `bottom`).
|
|
2462
2181
|
*
|
|
2463
|
-
*
|
|
2464
|
-
*
|
|
2465
|
-
* defaults to Transform mode if no context is provided.
|
|
2182
|
+
* The id in this order refer to registered default components or custom components
|
|
2183
|
+
* registered in `registerComponent`.
|
|
2466
2184
|
*
|
|
2467
|
-
*
|
|
2468
|
-
*
|
|
2469
|
-
*
|
|
2470
|
-
*
|
|
2185
|
+
* Different orders could have been set depending on different contexts.
|
|
2186
|
+
* The context consists of the edit mode (e.g. `Transform` or `Text`) right now.
|
|
2187
|
+
* If no context is given, the default order (with `Transform` edit mode) is
|
|
2188
|
+
* returned.
|
|
2189
|
+
*
|
|
2190
|
+
* @param position - The position of the canvas bar (`top` or `bottom`)
|
|
2191
|
+
* @param orderContext - The context for the requested order
|
|
2471
2192
|
*/
|
|
2472
2193
|
getCanvasBarOrder(position: 'top' | 'bottom', orderContext?: OrderContext): OrderComponent[];
|
|
2473
2194
|
/**
|
|
2474
|
-
* Adds a new asset library entry
|
|
2475
|
-
*
|
|
2476
|
-
* If an entry with the same ID already exists, it will be replaced.
|
|
2477
|
-
* The method validates sorting configurations and warns about duplicates.
|
|
2195
|
+
* Adds a new asset library entry that can be used to be displayed
|
|
2196
|
+
* by an asset library. An existing entry view will be replaced.
|
|
2478
2197
|
*
|
|
2479
|
-
* @
|
|
2480
|
-
* @param AssetLibraryEntry - The asset library entry configuration to add.
|
|
2198
|
+
* @param AssetLibraryEntry - The asset library entry
|
|
2481
2199
|
*/
|
|
2482
2200
|
addAssetLibraryEntry(AssetLibraryEntry: AssetLibraryEntry): void;
|
|
2483
2201
|
/**
|
|
2484
|
-
* Updates an
|
|
2202
|
+
* Updates an asset library entry that can be used to be displayed
|
|
2203
|
+
* by an asset library.
|
|
2485
2204
|
*
|
|
2486
|
-
* The
|
|
2487
|
-
*
|
|
2488
|
-
* @category Asset Library
|
|
2489
|
-
* @param id - The ID of the asset library entry to update.
|
|
2490
|
-
* @param assetLibraryEntry - Partial entry properties to merge with the existing entry.
|
|
2205
|
+
* @param id - The id of the asset library entry to be updated
|
|
2206
|
+
* @param AssetLibraryEntry - The asset library entry updates
|
|
2491
2207
|
*/
|
|
2492
2208
|
updateAssetLibraryEntry(id: string, assetLibraryEntry: Partial<Omit<AssetLibraryEntry, 'id'>>): void;
|
|
2493
2209
|
/**
|
|
2494
|
-
* Removes an asset library entry
|
|
2210
|
+
* Removes an asset library entry that can be used to be displayed
|
|
2211
|
+
* by an asset library.
|
|
2495
2212
|
*
|
|
2496
|
-
* @
|
|
2497
|
-
* @param id - The ID of the asset library entry to remove.
|
|
2213
|
+
* @param id - The id of the asset library entry to be removed
|
|
2498
2214
|
*/
|
|
2499
2215
|
removeAssetLibraryEntry(id: string): void;
|
|
2500
2216
|
/**
|
|
2501
|
-
*
|
|
2217
|
+
* Returns the current asset library entry that is used to be displayed
|
|
2218
|
+
* by an asset library.
|
|
2502
2219
|
*
|
|
2503
|
-
* @
|
|
2504
|
-
* @
|
|
2505
|
-
* @returns The asset library entry configuration, or undefined if not found.
|
|
2220
|
+
* @param id - The id of the asset library entry
|
|
2221
|
+
* @returns The asset library entry
|
|
2506
2222
|
*/
|
|
2507
2223
|
getAssetLibraryEntry(id: string): AssetLibraryEntry | undefined;
|
|
2508
2224
|
/**
|
|
2509
|
-
*
|
|
2225
|
+
* Returns all currently added asset library entries.
|
|
2510
2226
|
*
|
|
2511
|
-
* @
|
|
2512
|
-
* @returns Array of asset library entry IDs.
|
|
2227
|
+
* @returns All asset library entries
|
|
2513
2228
|
*/
|
|
2514
2229
|
findAllAssetLibraryEntries(): string[];
|
|
2515
2230
|
/**
|
|
2516
|
-
* Sets the asset library
|
|
2231
|
+
* Sets the asset library entry ids that should be used for the background track
|
|
2517
2232
|
*
|
|
2518
|
-
*
|
|
2233
|
+
* Please note that this has only an effect for video scenes
|
|
2519
2234
|
*
|
|
2520
|
-
* @
|
|
2521
|
-
* @param backgroundTrackAssetLibraryEntries - Array of asset library entry IDs for the background track.
|
|
2235
|
+
* @param backgroundTrackAssetLibraryEntries - The asset library entry ids that should be used for the background track
|
|
2522
2236
|
*/
|
|
2523
2237
|
setBackgroundTrackAssetLibraryEntries(backgroundTrackAssetLibraryEntries: string[]): void;
|
|
2524
2238
|
/**
|
|
2525
|
-
*
|
|
2239
|
+
* Returns the asset library entry ids that should be used for the background track
|
|
2526
2240
|
*
|
|
2527
|
-
*
|
|
2241
|
+
* Please note that this has only an effect for video scenes
|
|
2528
2242
|
*
|
|
2529
|
-
* @
|
|
2530
|
-
* @returns Array of asset library entry IDs configured for the background track.
|
|
2243
|
+
* @returns The asset library entry ids that should be used for the background track
|
|
2531
2244
|
*/
|
|
2532
2245
|
getBackgroundTrackAssetLibraryEntries(): string[];
|
|
2533
2246
|
/**
|
|
2534
|
-
* Sets
|
|
2535
|
-
*
|
|
2536
|
-
* The function receives context information (like selected blocks or default entry IDs)
|
|
2537
|
-
* and returns the appropriate asset library entry IDs for replacement.
|
|
2247
|
+
* Sets the asset library entry ids that should be used for replacement. It is a function
|
|
2248
|
+
* that is called with the current context (e.g. selected blocks, or default entry ids).
|
|
2538
2249
|
*
|
|
2539
|
-
* @
|
|
2540
|
-
* @param replaceAssetLibraryEntries - Function that receives context and returns an array of asset library entry IDs for replacement.
|
|
2250
|
+
* @returns a function that returns an array of asset library entry ids that should be used for replacement
|
|
2541
2251
|
*/
|
|
2542
2252
|
setReplaceAssetLibraryEntries(replaceAssetLibraryEntries: (context: ReplaceAssetLibraryEntriesContext) => string[]): void;
|
|
2543
2253
|
/**
|
|
2544
|
-
*
|
|
2254
|
+
* Returns the current view of the editor.
|
|
2545
2255
|
*
|
|
2546
|
-
* @
|
|
2547
|
-
* @returns The current view style ('default' or 'advanced').
|
|
2548
|
-
* @experimental This API may change or be removed in future versions.
|
|
2256
|
+
* @returns either `default` or `advanced`
|
|
2549
2257
|
*/
|
|
2550
2258
|
unstable_getView(): ViewStyle;
|
|
2551
2259
|
/**
|
|
2552
|
-
* Adds
|
|
2260
|
+
* Adds an icon set to the editor. The icon set is a string containing a SVG
|
|
2261
|
+
* sprite with symbols. The id of each symbol is used to reference the icon
|
|
2262
|
+
* in the editor. These ids need to start with a `@` to be recognized in the
|
|
2263
|
+
* editor.
|
|
2553
2264
|
*
|
|
2554
|
-
* The
|
|
2555
|
-
*
|
|
2265
|
+
* PLEASE NOTE: The SVG sprite will be injected into the (shadow) DOM without
|
|
2266
|
+
* any sanitization. Make sure to only use trusted sources to prevent e.g. XSS
|
|
2267
|
+
* attacks. If you are unsure about the source of the sprite, consider using
|
|
2268
|
+
* libraries like DOMPurify to sanitize the SVG string before adding it.
|
|
2556
2269
|
*
|
|
2557
|
-
*
|
|
2558
|
-
*
|
|
2559
|
-
* Consider using libraries like DOMPurify for untrusted content.
|
|
2560
|
-
*
|
|
2561
|
-
* @category UI Layout
|
|
2562
|
-
* @param id - The unique identifier for the icon set.
|
|
2563
|
-
* @param svgSprite - The SVG sprite string containing symbol definitions.
|
|
2270
|
+
* @param id - The id of the icon set
|
|
2271
|
+
* @param svgSprite - The SVG sprite containing symbols for icons.
|
|
2564
2272
|
*/
|
|
2565
2273
|
addIconSet(id: string, svgSprite: string): void;
|
|
2566
2274
|
}
|
|
@@ -2783,8 +2491,6 @@ export { VariableAPI }
|
|
|
2783
2491
|
|
|
2784
2492
|
export { VerticalBlockAlignment }
|
|
2785
2493
|
|
|
2786
|
-
export { VideoExportOptions }
|
|
2787
|
-
|
|
2788
2494
|
export { VideoMimeType }
|
|
2789
2495
|
|
|
2790
2496
|
/** @public */
|
|
@@ -2797,6 +2503,4 @@ export { XYWH }
|
|
|
2797
2503
|
|
|
2798
2504
|
export { ZoomAutoFitAxis }
|
|
2799
2505
|
|
|
2800
|
-
export { ZoomOptions }
|
|
2801
|
-
|
|
2802
2506
|
export { }
|