@cesdk/engine 1.33.0 → 1.34.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.
package/index.d.ts CHANGED
@@ -385,8 +385,6 @@ export declare interface AssetResult extends Asset {
385
385
  };
386
386
  }
387
387
 
388
- declare type _AssetResult = AssetResult;
389
-
390
388
  /** @public */
391
389
  declare interface AssetResultCredits {
392
390
  name: string;
@@ -467,8 +465,6 @@ export declare interface AssetSource {
467
465
  getSupportedMimeTypes?(): string[] | undefined;
468
466
  }
469
467
 
470
- declare type _AssetSource = AssetSource;
471
-
472
468
  /**
473
469
  * Asset Color payload SpotColor representation
474
470
  * @public
@@ -495,8 +491,6 @@ export declare interface AssetsQueryResult<T extends AssetResult = AssetResult>
495
491
  total: number;
496
492
  }
497
493
 
498
- declare type _AssetsQueryResult = AssetsQueryResult;
499
-
500
494
  /**
501
495
  * Asset string property definition
502
496
  * @public
@@ -2973,225 +2967,6 @@ export declare interface CompleteAssetResult extends AssetResult {
2973
2967
  active: boolean;
2974
2968
  }
2975
2969
 
2976
- /**
2977
- * @deprecated This namespace is not used anymore. Please refer to the
2978
- * deprecation notices on its members to see where they have moved to.
2979
- * @public
2980
- */
2981
- export declare namespace ConfigTypes {
2982
- /**
2983
- * @deprecated This type definition has been removed.
2984
- * Instead of `ConfigTypes.Color`, this can be imported directly as `PaletteColor`.
2985
- */
2986
- export type Color = PaletteColor;
2987
- /**
2988
- * @deprecated This type definition has been moved
2989
- * It can instead be imported directly as `HexColorString`
2990
- */
2991
- export type HexColorString = _HexColorString;
2992
- /**
2993
- * @deprecated
2994
- * This type definition has be removed. Please use the asset api at
2995
- * `cesdk.engine.asset` instead of `config.assetSources`.
2996
- */
2997
- export type AssetSources = {
2998
- [id: string]: AssetSource;
2999
- };
3000
- /**
3001
- * @deprecated
3002
- * This type definition has been moved and can be imported directly as `AssetQueryData`.
3003
- */
3004
- export type QueryData = AssetQueryData;
3005
- /**
3006
- * @deprecated
3007
- * This type definition has been moved and can be imported directly as `AssetResult`.
3008
- */
3009
- export type AssetResult = _AssetResult;
3010
- /**
3011
- * @deprecated
3012
- * This type definition has been moved and can be imported directly as `AssetsQueryResult`.
3013
- */
3014
- export type AssetsQueryResult = _AssetsQueryResult;
3015
- /**
3016
- * @deprecated
3017
- * This type definition has been moved and can be imported directly as `AssetSource`,
3018
- * when working with the asset api.
3019
- * @public
3020
- */
3021
- export type AssetSource = Omit<_AssetSource, 'id'>;
3022
- /**
3023
- * @deprecated This type definition is not used anymore and will be removed.
3024
- */
3025
- export type Preset = {
3026
- meta?: {
3027
- default?: boolean;
3028
- library?: string;
3029
- categories?: string[];
3030
- };
3031
- };
3032
- /**
3033
- * @deprecated This type definition is not used anymore and will be removed.
3034
- */
3035
- export type VariableDefinition = Preset & {
3036
- value: string | number;
3037
- };
3038
- /**
3039
- * @deprecated This type definition is not used anymore and will be removed.
3040
- */
3041
- export type ColorDefinition = Preset & {
3042
- value: Color;
3043
- };
3044
- /**
3045
- * @deprecated This type definition is not used anymore and will be removed.
3046
- */
3047
- export type ColorPaletteDefinition = Preset & {
3048
- entries: Color[];
3049
- };
3050
- /**
3051
- * @deprecated This type definition is not used anymore and will be removed.
3052
- * In the CE.SDK, you can import `PageFormatDefinition` directly.
3053
- */
3054
- export type PageFormatDefinition = Preset & {
3055
- width: number;
3056
- height: number;
3057
- /** @deprecated This property is unused and will be removed */
3058
- dpi?: number;
3059
- /** @deprecated This property is unused and will be removed */
3060
- bleedMargin?: number;
3061
- unit: 'px' | 'mm' | 'in' | DesignUnit;
3062
- fixedOrientation?: boolean;
3063
- };
3064
- /**
3065
- * @deprecated This type definition is not used anymore and will be removed.
3066
- */
3067
- export type TypefaceDefinition = _TypefaceDefinition;
3068
- /**
3069
- * @deprecated This type definition is not used anymore and will be removed.
3070
- */
3071
- export type TemplateDefinition = Preset & {
3072
- label: string;
3073
- scene: string | URL | (() => Promise<string>);
3074
- thumbnailURL?: string | URL;
3075
- };
3076
- /**
3077
- * @deprecated This type definition is not used anymore and will be removed.
3078
- * If you need to reference this type in your code,
3079
- * use `Configuration['presets']` instead of `ConfigTypes.Presets`.
3080
- */
3081
- export type Presets = {
3082
- /**
3083
- * @deprecated The configuration option `presets.colors` does not exist anymore.
3084
- */
3085
- colors?: {
3086
- [id: string]: Color;
3087
- };
3088
- /**
3089
- * @deprecated The configuration option `presets.typefaces` does not exist anymore.
3090
- * Custom typefaces should be defined as asset sources using
3091
- * the `cesdk.engine.asset.addSource` or `cesdk.engine.asset.addLocalSource` instead.
3092
- */
3093
- typefaces?: {
3094
- [id: string]: _TypefaceDefinition;
3095
- };
3096
- /**
3097
- * @deprecated The configuration option `presets.colorPalettes` does not exist anymore.
3098
- */
3099
- colorPalettes?: {
3100
- [id: string]: ColorPaletteDefinition;
3101
- };
3102
- /**
3103
- * @deprecated The configuration option `presets.pageFormats` does not exist anymore.
3104
- */
3105
- pageFormats?: {
3106
- [id: string]: PageFormatDefinition;
3107
- };
3108
- /**
3109
- * @deprecated The configuration option `presets.templates` does not exist anymore.
3110
- * The templates should be defined as asset sources using
3111
- * the `cesdk.engine.asset.addSource` or `cesdk.engine.asset.addLocalSource` instead.
3112
- */
3113
- templates?: {
3114
- [id: string]: TemplateDefinition;
3115
- };
3116
- };
3117
- /**
3118
- * @deprecated This type definition is not used anymore and will be removed.
3119
- */
3120
- export type Variables = {
3121
- [id: string]: VariableDefinition;
3122
- };
3123
- /**
3124
- * @deprecated This type definition is not used anymore and will be removed.
3125
- * The settings that were configured here can be set via the BlockApi on the
3126
- * scene block:
3127
- *
3128
- * ```ts
3129
- * engine.block.setInt(sceneId, 'scene/dpi', dpi);
3130
- * engine.block.setInt(sceneId, 'scene/pixelScaleFactor', factor);
3131
- * ```
3132
- */
3133
- export type Scene = {
3134
- /**
3135
- * @deprecated Setting this value has no effect. You can change the dpi of the
3136
- * current scene via `engine.block.setInt(sceneId, 'scene/dpi', dpi)`
3137
- */
3138
- dpi: number;
3139
- /**
3140
- * @deprecated Setting this value has no effect. You can change the dpi of the
3141
- * current scene via `engine.block.setInt(sceneId, 'scene/pixelScaleFactor', * factor)`
3142
- */
3143
- pixelScaleFactor: number;
3144
- };
3145
- /**
3146
- * @deprecated This type definition is not used anymore and will be removed.
3147
- * The settings that were configured here can be set via the
3148
- * following EditorAPI settings:
3149
- * - `setSettingBool('page/title/show', show)`
3150
- * - `setSettingString('page/title/fontFileUri', uri)`
3151
- * - `setSettingBool('page/dimOutOfPageAreas', dim)`
3152
- * @public
3153
- */
3154
- export type Page = {
3155
- /**
3156
- * @deprecated
3157
- * The settings that were configured here can be set via the
3158
- * following EditorAPI settings:
3159
- * - `setSettingBool('page/title/show', show)`
3160
- * - `setSettingString('page/title/fontFileUri', uri)`
3161
- */
3162
- title: {
3163
- /**
3164
- * @deprecated
3165
- * Use the EditorAPI to set the title visibility:
3166
- * - `setSettingBool('page/title/show', show)`
3167
- */
3168
- show?: boolean;
3169
- /**
3170
- * @deprecated
3171
- * Use the EditorAPI to set the title font:
3172
- * - `setSettingString('page/title/fontFileUri', uri)`
3173
- */
3174
- fontFileUri?: string;
3175
- };
3176
- /**
3177
- * @deprecated
3178
- * Use the EditorAPI to control the opacity of out-of-page areas:
3179
- * - `setSettingBool('page/dimOutOfPageAreas', dim)`
3180
- */
3181
- dimOutOfPageAreas?: boolean;
3182
- };
3183
- /**
3184
- * @deprecated This type definition has been removed
3185
- * @public
3186
- */
3187
- export type Callbacks = {
3188
- /**
3189
- * @deprecated The logger has moved from `config.callbacks.logger` to `config.logger`
3190
- */
3191
- log?: Logger;
3192
- };
3193
- }
3194
-
3195
2970
  /** @public */
3196
2971
  export declare interface Configuration {
3197
2972
  baseURL: string;
@@ -3207,11 +2982,16 @@ export declare interface Configuration {
3207
2982
  /**
3208
2983
  * @deprecated This config key is not used anymore and will be removed.
3209
2984
  */
3210
- presets: ConfigTypes.Presets;
3211
- /**
3212
- * @deprecated This config key is not used anymore.
3213
- */
3214
- defaultFont?: string;
2985
+ presets: {
2986
+ /**
2987
+ * @deprecated The configuration option `presets.typefaces` does not exist anymore.
2988
+ * Custom typefaces should be defined as asset sources using
2989
+ * the `cesdk.engine.asset.addSource` or `cesdk.engine.asset.addLocalSource` instead.
2990
+ */
2991
+ typefaces?: {
2992
+ [id: string]: TypefaceDefinition;
2993
+ };
2994
+ };
3215
2995
  /**
3216
2996
  * By default the engine tries to create a webgl2 context. If this fails it
3217
2997
  * falls back to trying to create a webgl1 context. If this configuration
@@ -3227,45 +3007,6 @@ export declare interface Configuration {
3227
3007
  */
3228
3008
  audioOutput?: 'auto' | 'none';
3229
3009
  role?: RoleString;
3230
- /**
3231
- * @deprecated This config key is not used anymore.
3232
- * The settings that were configured here can be set via the
3233
- * following EditorAPI settings:
3234
- * - `setSettingBool('page/title/show', show)`
3235
- * - `setSettingBool('page/title/showPageTitleTemplate', show)`
3236
- * - `setSettingBool('page/title/appendPageName', append)`
3237
- * - `setSettingBool('page/title/showOnSinglePage', hide)`
3238
- * - `setSettingString('page/title/separator', separator)`
3239
- * - `setSettingString('page/title/fontFileUri', uri)`
3240
- * - `setSettingBool('page/dimOutOfPageAreas', dim)`
3241
- */
3242
- page?: ConfigTypes.Page;
3243
- /**
3244
- * @deprecated This config key is not used anymore.
3245
- * The settings that were configured here can be set via the BlockApi on the scene block
3246
- * @public
3247
- */
3248
- scene?: ConfigTypes.Scene;
3249
- /**
3250
- * @deprecated This config key is not used anymore.
3251
- * Please use the asset api at `cesdk.engine.asset` instead of `config.assetSources`.
3252
- */
3253
- assetSources?: ConfigTypes.AssetSources;
3254
- /**
3255
- * @deprecated This config key is not used anymore.
3256
- * Please use the VariableAPI at `cesdk.engine.variable` instead of `config.variables`.
3257
- */
3258
- variables?: ConfigTypes.Variables;
3259
- /**
3260
- * @deprecated This config key is not used anymore
3261
- * The `config.callbacks.logger` configuration will be moved to `config.logger`
3262
- */
3263
- callbacks?: {
3264
- /**
3265
- * @deprecated The `config.callbacks.logger` has moved to `config.logger`
3266
- */
3267
- log?: Logger;
3268
- };
3269
3010
  }
3270
3011
 
3271
3012
  /**
@@ -3414,6 +3155,9 @@ export declare type CutoutType = 'Solid' | 'Dashed';
3414
3155
  */
3415
3156
  export declare type DefaultAssetSourceId = 'ly.img.sticker' | 'ly.img.vectorpath' | 'ly.img.colors.defaultPalette' | 'ly.img.filter.lut' | 'ly.img.filter.duotone' | 'ly.img.effect' | 'ly.img.blur' | 'ly.img.typeface';
3416
3157
 
3158
+ /** @public */
3159
+ export declare function defaultLogger(message: string, level?: LogLevel): void;
3160
+
3417
3161
  /**
3418
3162
  * @public
3419
3163
  */
@@ -4149,8 +3893,6 @@ a: number
4149
3893
  */
4150
3894
  export declare type HexColorString = string;
4151
3895
 
4152
- declare type _HexColorString = HexColorString;
4153
-
4154
3896
  /**
4155
3897
  * A numerical identifier for a history stack
4156
3898
  * @public
@@ -4753,7 +4495,7 @@ export declare type SceneMode = 'Design' | 'Video';
4753
4495
  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';
4754
4496
 
4755
4497
  /** @public */
4756
- 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';
4498
+ export declare type SettingsBool = 'controlGizmo/blockScaleDownLimit' | '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';
4757
4499
 
4758
4500
  /** @public
4759
4501
  */
@@ -4905,7 +4647,11 @@ export declare interface Typeface {
4905
4647
  */
4906
4648
  export declare type TypefaceDefinition = {
4907
4649
  /** @deprecated The meta field is not used anymore */
4908
- meta?: ConfigTypes.Preset['meta'];
4650
+ meta?: {
4651
+ default?: boolean;
4652
+ library?: string;
4653
+ categories?: string[];
4654
+ };
4909
4655
  family: string;
4910
4656
  fonts: {
4911
4657
  fontURL: string;
@@ -4914,8 +4660,6 @@ export declare type TypefaceDefinition = {
4914
4660
  }[];
4915
4661
  };
4916
4662
 
4917
- declare type _TypefaceDefinition = TypefaceDefinition;
4918
-
4919
4663
  /**
4920
4664
  * @public
4921
4665
  */