@cesdk/engine 1.11.1 → 1.12.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
|
@@ -14,7 +14,7 @@ export declare interface Asset {
|
|
|
14
14
|
*/
|
|
15
15
|
id: string;
|
|
16
16
|
/** Groups of the asset. */
|
|
17
|
-
groups?:
|
|
17
|
+
groups?: AssetGroups;
|
|
18
18
|
/** Asset-specific and custom meta information */
|
|
19
19
|
meta?: {
|
|
20
20
|
/** The mime type of this asset or the data behind the asset's uri. */
|
|
@@ -52,7 +52,7 @@ export declare class AssetAPI {
|
|
|
52
52
|
* @param applyAssetToBlock - An optional callback that can be used to override the default behavior of applying
|
|
53
53
|
* an asset result to a given block.
|
|
54
54
|
*/
|
|
55
|
-
addLocalSource(id: string, supportedMimeTypes?: string[], applyAsset?: (asset:
|
|
55
|
+
addLocalSource(id: string, supportedMimeTypes?: string[], applyAsset?: (asset: CompleteAssetResult) => Promise<DesignBlockId | undefined>, applyAssetToBlock?: (asset: CompleteAssetResult, block: DesignBlockId) => Promise<void>): void;
|
|
56
56
|
/**
|
|
57
57
|
* Removes an asset source with the given ID.
|
|
58
58
|
* @param id - The ID to refer to the asset source.
|
|
@@ -69,7 +69,7 @@ export declare class AssetAPI {
|
|
|
69
69
|
* @param query - All the options to filter the search results by.
|
|
70
70
|
* @returns The search results.
|
|
71
71
|
*/
|
|
72
|
-
findAssets(sourceId: string, query: AssetQueryData): Promise<AssetsQueryResult
|
|
72
|
+
findAssets(sourceId: string, query: AssetQueryData): Promise<AssetsQueryResult<CompleteAssetResult>>;
|
|
73
73
|
/**
|
|
74
74
|
* Queries the asset source's groups for a certain asset type.
|
|
75
75
|
* @param id - The ID of the asset source.
|
|
@@ -169,6 +169,17 @@ export declare interface AssetDefinition extends Asset {
|
|
|
169
169
|
tags?: Record<Locale, string[]>;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
/**
|
|
173
|
+
* An asset can be member of multiple groups. Groups have a semantic meaning
|
|
174
|
+
* used to build and group UIs exploring the assets, e.g.sections in the
|
|
175
|
+
* content library, or for things like topics in Unsplash for instance.
|
|
176
|
+
*
|
|
177
|
+
* Tags in comparison have are more loosely hold meaning used for extended
|
|
178
|
+
* searching/filtering.
|
|
179
|
+
* @public
|
|
180
|
+
*/
|
|
181
|
+
export declare type AssetGroups = string[];
|
|
182
|
+
|
|
172
183
|
/**
|
|
173
184
|
* Defines a request for querying assets
|
|
174
185
|
* @public
|
|
@@ -185,9 +196,9 @@ export declare interface AssetQueryData {
|
|
|
185
196
|
*/
|
|
186
197
|
tags?: string | string[];
|
|
187
198
|
/** Query only these groups */
|
|
188
|
-
groups?:
|
|
199
|
+
groups?: AssetGroups;
|
|
189
200
|
/** Filter out assets with this groups */
|
|
190
|
-
excludeGroups?:
|
|
201
|
+
excludeGroups?: AssetGroups;
|
|
191
202
|
/** Choose the locale of the labels and tags for localized search and filtering */
|
|
192
203
|
locale?: Locale;
|
|
193
204
|
/**
|
|
@@ -210,7 +221,6 @@ export declare interface AssetResult extends Asset {
|
|
|
210
221
|
label?: string;
|
|
211
222
|
/** The tags of this asset. Used for filtering and free-text searching. */
|
|
212
223
|
tags?: string[];
|
|
213
|
-
|
|
214
224
|
/** Credits for the artist of the asset */
|
|
215
225
|
credits?: {
|
|
216
226
|
name: string;
|
|
@@ -228,44 +238,27 @@ export declare interface AssetResult extends Asset {
|
|
|
228
238
|
};
|
|
229
239
|
}
|
|
230
240
|
|
|
231
|
-
/**
|
|
232
|
-
* Single asset result of a query from the engine.
|
|
233
|
-
* @public
|
|
234
|
-
*/
|
|
235
|
-
declare interface AssetResult_2 {
|
|
236
|
-
/** A unique id of this asset */
|
|
237
|
-
id: string;
|
|
238
|
-
/** Asset-specific and custom meta information */
|
|
239
|
-
meta?: {
|
|
240
|
-
uri?: string;
|
|
241
|
-
filename?: string;
|
|
242
|
-
duration?: string;
|
|
243
|
-
} & Record<string, unknown>;
|
|
244
|
-
/** The locale of the label and tags */
|
|
245
|
-
locale?: string;
|
|
246
|
-
/** The label of the result. Used for description and tooltips. */
|
|
247
|
-
label?: string;
|
|
248
|
-
/** The tags of this asset. Used for filtering and free-text searching. */
|
|
249
|
-
tags?: string[];
|
|
250
|
-
context: {
|
|
251
|
-
sourceId: string;
|
|
252
|
-
};
|
|
253
|
-
/** Credits for the artist of the asset */
|
|
254
|
-
credits?: {
|
|
255
|
-
name: string;
|
|
256
|
-
url?: string;
|
|
257
|
-
};
|
|
258
|
-
/** License for this asset. Overwrites the source license if present */
|
|
259
|
-
license?: {
|
|
260
|
-
name: string;
|
|
261
|
-
url?: string;
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
|
|
265
241
|
/** @public */
|
|
266
242
|
declare interface AssetResultContext {
|
|
267
243
|
sourceId: string;
|
|
268
|
-
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/** @public */
|
|
247
|
+
declare interface AssetResultCredits {
|
|
248
|
+
name: string;
|
|
249
|
+
url: string;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/** @public */
|
|
253
|
+
declare interface AssetResultLicense {
|
|
254
|
+
name: string;
|
|
255
|
+
url: string;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/** @public */
|
|
259
|
+
declare interface AssetResultUtm {
|
|
260
|
+
source: string;
|
|
261
|
+
medium: string;
|
|
269
262
|
}
|
|
270
263
|
|
|
271
264
|
/**
|
|
@@ -276,7 +269,7 @@ export declare interface AssetSource {
|
|
|
276
269
|
/** The unique id of the API */
|
|
277
270
|
id: string;
|
|
278
271
|
/** Find all asset for the given type and the provided query data. */
|
|
279
|
-
findAssets(queryData: AssetQueryData): Promise<AssetsQueryResult>;
|
|
272
|
+
findAssets(queryData: AssetQueryData): Promise<AssetsQueryResult | undefined>;
|
|
280
273
|
/** Return every available group */
|
|
281
274
|
getGroups?: () => Promise<string[]>;
|
|
282
275
|
/** Credits for the source/api */
|
|
@@ -289,10 +282,6 @@ export declare interface AssetSource {
|
|
|
289
282
|
name: string;
|
|
290
283
|
url?: string;
|
|
291
284
|
};
|
|
292
|
-
/**
|
|
293
|
-
* @returns the asset or undefined if no asset with the given id could be found
|
|
294
|
-
*/
|
|
295
|
-
getAsset?(id: string): Promise<AssetResult | undefined>;
|
|
296
285
|
/**
|
|
297
286
|
* Can the source add and remove assets dynamically? If `false`
|
|
298
287
|
* methods like `addAsset` and `removeAsset` will throw an
|
|
@@ -306,12 +295,12 @@ export declare interface AssetSource {
|
|
|
306
295
|
* You can override this with custom behavior.
|
|
307
296
|
* @returns the id of a new block if one was created from the asset.
|
|
308
297
|
*/
|
|
309
|
-
applyAsset?: (asset:
|
|
298
|
+
applyAsset?: (asset: CompleteAssetResult) => Promise<DesignBlockId | undefined>;
|
|
310
299
|
/**
|
|
311
300
|
* Apply the given asset result to the given block.
|
|
312
301
|
* You can override this with custom behavior.
|
|
313
302
|
*/
|
|
314
|
-
applyAssetToBlock?: (asset:
|
|
303
|
+
applyAssetToBlock?: (asset: CompleteAssetResult, block: DesignBlockId) => Promise<void>;
|
|
315
304
|
/**
|
|
316
305
|
* Adds the given asset to this source. Throws an error if the asset source
|
|
317
306
|
* does not support adding assets.
|
|
@@ -329,72 +318,13 @@ export declare interface AssetSource {
|
|
|
329
318
|
getSupportedMimeTypes?(): string[] | undefined;
|
|
330
319
|
}
|
|
331
320
|
|
|
332
|
-
/**
|
|
333
|
-
* API to query for assets
|
|
334
|
-
* @public
|
|
335
|
-
*/
|
|
336
|
-
declare interface AssetSource_2 {
|
|
337
|
-
/** Find all asset for the given type and the provided query data. */
|
|
338
|
-
findAssets(queryData?: QueryData): Promise<AssetsQueryResult_2 | undefined>;
|
|
339
|
-
/**
|
|
340
|
-
* Apply the given asset result to the active scene.
|
|
341
|
-
* You can override this with custom behavior.
|
|
342
|
-
*/
|
|
343
|
-
applyAsset?: (asset: AssetResult_2) => Promise<DesignBlockId | undefined>;
|
|
344
|
-
/**
|
|
345
|
-
* Apply the given asset result to the given block.
|
|
346
|
-
* You can override this with custom behavior.
|
|
347
|
-
*/
|
|
348
|
-
applyAssetToBlock?: (asset: AssetResult_2, block: number) => Promise<void>;
|
|
349
|
-
|
|
350
|
-
/** Return every available group */
|
|
351
|
-
getGroups?: () => Promise<string[]>;
|
|
352
|
-
/** Credits for the source/api */
|
|
353
|
-
credits?: {
|
|
354
|
-
name: string;
|
|
355
|
-
url?: string;
|
|
356
|
-
};
|
|
357
|
-
/** General license for all asset from this source */
|
|
358
|
-
license?: {
|
|
359
|
-
name: string;
|
|
360
|
-
url?: string;
|
|
361
|
-
};
|
|
362
|
-
|
|
363
|
-
/**
|
|
364
|
-
* Generates a list of supported mime types for this source.
|
|
365
|
-
*
|
|
366
|
-
* @returns a list of the mime types should be supported by this source
|
|
367
|
-
*/
|
|
368
|
-
getSupportedMimeTypes?(): string[] | undefined;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
/** @public */
|
|
372
|
-
declare type AssetSources = {
|
|
373
|
-
[id: string]: AssetSource_2;
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* Return type of a `findAssets` query.
|
|
378
|
-
* @public
|
|
379
|
-
*/
|
|
380
|
-
export declare interface AssetsQueryResult {
|
|
381
|
-
/** The assets in the requested page */
|
|
382
|
-
assets: AssetResult[];
|
|
383
|
-
/** The current, requested page */
|
|
384
|
-
currentPage: number;
|
|
385
|
-
/** The next page to query if it exists */
|
|
386
|
-
nextPage?: number;
|
|
387
|
-
/** How many assets are there in total for the current query regardless of the page */
|
|
388
|
-
total: number;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
321
|
/**
|
|
392
322
|
* Return type of a `findAssets` query.
|
|
393
323
|
* @public
|
|
394
324
|
*/
|
|
395
|
-
declare interface
|
|
325
|
+
export declare interface AssetsQueryResult<T extends AssetResult = AssetResult> {
|
|
396
326
|
/** The assets in the requested page */
|
|
397
|
-
assets:
|
|
327
|
+
assets: T[];
|
|
398
328
|
/** The current, requested page */
|
|
399
329
|
currentPage: number;
|
|
400
330
|
/** The next page to query if it exists */
|
|
@@ -904,13 +834,13 @@ export declare class BlockAPI {
|
|
|
904
834
|
*/
|
|
905
835
|
getScreenSpaceBoundingBoxXYWH(ids: DesignBlockId[]): XYWH;
|
|
906
836
|
/**
|
|
907
|
-
* Align multiple blocks horizontally within their bounding box
|
|
837
|
+
* Align multiple blocks horizontally within their bounding box or a single block to its parent.
|
|
908
838
|
* @param ids - A non-empty array of block ids.
|
|
909
839
|
* @param alignment - How they should be aligned: left, right, or center
|
|
910
840
|
*/
|
|
911
841
|
alignHorizontally(ids: DesignBlockId[], horizontalBlockAlignment: HorizontalBlockAlignment): void;
|
|
912
842
|
/**
|
|
913
|
-
* Align multiple blocks vertically within their bounding box
|
|
843
|
+
* Align multiple blocks vertically within their bounding box or a single block to its parent.
|
|
914
844
|
* @param ids - A non-empty array of block ids.
|
|
915
845
|
* @param alignment - How they should be aligned: top, bottom, or center
|
|
916
846
|
*/
|
|
@@ -921,6 +851,31 @@ export declare class BlockAPI {
|
|
|
921
851
|
* @returns Whether the blocks can be aligned.
|
|
922
852
|
*/
|
|
923
853
|
isAlignable(ids: DesignBlockId[]): boolean;
|
|
854
|
+
/**
|
|
855
|
+
* Distribute multiple blocks horizontally within their bounding box so that the space between them is even.
|
|
856
|
+
*
|
|
857
|
+
* @param ids - A non-empty array of block ids.
|
|
858
|
+
*/
|
|
859
|
+
distributeHorizontally(ids: DesignBlockId[]): void;
|
|
860
|
+
/**
|
|
861
|
+
* Distribute multiple blocks vertically within their bounding box so that the space between them is even.
|
|
862
|
+
* @param ids - A non-empty array of block ids.
|
|
863
|
+
*/
|
|
864
|
+
distributeVertically(ids: DesignBlockId[]): void;
|
|
865
|
+
/**
|
|
866
|
+
* Confirms that a given set of blocks can be distributed.
|
|
867
|
+
* @param ids - A non-empty array of block ids.
|
|
868
|
+
* @returns Whether the blocks can be distributed.
|
|
869
|
+
*/
|
|
870
|
+
isDistributable(ids: DesignBlockId[]): boolean;
|
|
871
|
+
/**
|
|
872
|
+
* Resize all blocks to the given size. The content of the blocks is automatically adjusted
|
|
873
|
+
* to fit the new dimensions.
|
|
874
|
+
* @param ids - The blocks to resize.
|
|
875
|
+
* @param width - The new width of the blocks.
|
|
876
|
+
* @param height - The new height of the blocks.
|
|
877
|
+
*/
|
|
878
|
+
resizeContentAware(ids: DesignBlockId[], width: number, height: number): void;
|
|
924
879
|
/**
|
|
925
880
|
* Scales the block and all of its children proportionally around the specified
|
|
926
881
|
* relative anchor point.
|
|
@@ -1754,6 +1709,12 @@ export declare class BlockAPI {
|
|
|
1754
1709
|
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
1755
1710
|
*/
|
|
1756
1711
|
setTextCase(id: DesignBlockId, textCase: TextCase, from?: number, to?: number): void;
|
|
1712
|
+
/**
|
|
1713
|
+
* Returns the UTF-16 indices of the selected range of the text block that is currently being edited.
|
|
1714
|
+
* If both the start and end index of the returned range have the same value, then the text cursor is positioned at that index.
|
|
1715
|
+
* @returns The selected UTF-16 range or \{ from: -1, to: -1 \} if no text block is currently being edited.
|
|
1716
|
+
*/
|
|
1717
|
+
getTextCursorRange(): Range_2;
|
|
1757
1718
|
/**
|
|
1758
1719
|
* Query if the given block has fill color properties.
|
|
1759
1720
|
* @param id - The block to query.
|
|
@@ -2247,11 +2208,6 @@ export declare interface BlurEvent extends CustomEvent<EventTarget | null> {
|
|
|
2247
2208
|
preventDefault(): void;
|
|
2248
2209
|
}
|
|
2249
2210
|
|
|
2250
|
-
/** @public */
|
|
2251
|
-
declare type Callbacks = {
|
|
2252
|
-
log?: Logger;
|
|
2253
|
-
};
|
|
2254
|
-
|
|
2255
2211
|
declare type CameraSettings = {
|
|
2256
2212
|
/** Horizontal resolution in physical pixels */
|
|
2257
2213
|
width: number;
|
|
@@ -2299,78 +2255,256 @@ export declare interface CMYKColor {
|
|
|
2299
2255
|
}
|
|
2300
2256
|
|
|
2301
2257
|
/**
|
|
2302
|
-
*
|
|
2303
|
-
*
|
|
2304
|
-
*
|
|
2305
|
-
*/
|
|
2306
|
-
declare type Color_2 = PaletteColor;
|
|
2307
|
-
|
|
2308
|
-
/**
|
|
2309
|
-
* @deprecated This type definition is not used anymore and will be removed.
|
|
2258
|
+
* Asset results that are returned from the engine.
|
|
2259
|
+
*
|
|
2260
|
+
* They contain additional information about the context of the asset.
|
|
2310
2261
|
* @public
|
|
2311
2262
|
*/
|
|
2312
|
-
declare
|
|
2313
|
-
|
|
2314
|
-
|
|
2263
|
+
export declare interface CompleteAssetResult extends AssetResult {
|
|
2264
|
+
/**
|
|
2265
|
+
* Context how an asset was added or shall be used in the future.
|
|
2266
|
+
* This is added to all assets coming from the engine.
|
|
2267
|
+
*/
|
|
2268
|
+
context: {
|
|
2269
|
+
sourceId: string;
|
|
2270
|
+
};
|
|
2271
|
+
}
|
|
2315
2272
|
|
|
2316
2273
|
/**
|
|
2317
|
-
* @deprecated This
|
|
2274
|
+
* @deprecated This namespace is not used anymore. Please refer to the
|
|
2275
|
+
* deprecation notices on its members to see where they have moved to.
|
|
2318
2276
|
* @public
|
|
2319
2277
|
*/
|
|
2320
|
-
declare
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
export
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2278
|
+
export declare namespace ConfigTypes {
|
|
2279
|
+
/**
|
|
2280
|
+
* @deprecated This type definition has been removed.
|
|
2281
|
+
* Instead of `ConfigTypes.Color`, this can be imported directly as `PaletteColor`.
|
|
2282
|
+
*/
|
|
2283
|
+
export type Color = PaletteColor;
|
|
2284
|
+
/**
|
|
2285
|
+
* @deprecated This type definition has been moved
|
|
2286
|
+
* It can instead be imported directly as `HexColorString`
|
|
2287
|
+
*/
|
|
2288
|
+
export type HexColorString = HexColorString;
|
|
2289
|
+
/**
|
|
2290
|
+
* @deprecated
|
|
2291
|
+
* This type definition has be removed. Please use the asset api at
|
|
2292
|
+
* `cesdk.engine.asset` instead of `config.assetSources`.
|
|
2293
|
+
*/
|
|
2294
|
+
export type AssetSources = {
|
|
2295
|
+
[id: string]: AssetSource;
|
|
2296
|
+
};
|
|
2297
|
+
/**
|
|
2298
|
+
* @deprecated
|
|
2299
|
+
* This type definition has been moved and can be imported directly as `AssetQueryData`.
|
|
2300
|
+
*/
|
|
2301
|
+
export type QueryData = AssetQueryData;
|
|
2302
|
+
/**
|
|
2303
|
+
* @deprecated
|
|
2304
|
+
* This type definition has been moved and can be imported directly as `AssetResult`.
|
|
2305
|
+
*/
|
|
2306
|
+
export type AssetResult = AssetResult;
|
|
2307
|
+
/**
|
|
2308
|
+
* @deprecated
|
|
2309
|
+
* This type definition has been moved and can be imported directly as `AssetsQueryResult`.
|
|
2310
|
+
*/
|
|
2311
|
+
export type AssetsQueryResult = AssetsQueryResult;
|
|
2312
|
+
/**
|
|
2313
|
+
* @deprecated
|
|
2314
|
+
* This type definition has been moved and can be imported directly as `AssetSource`,
|
|
2315
|
+
* when working with the asset api.
|
|
2316
|
+
* @public
|
|
2317
|
+
*/
|
|
2318
|
+
export type AssetSource = Omit<AssetSource, 'id'>;
|
|
2319
|
+
/**
|
|
2320
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2321
|
+
*/
|
|
2322
|
+
export type Preset = {
|
|
2323
|
+
meta?: {
|
|
2324
|
+
default?: boolean;
|
|
2325
|
+
library?: string;
|
|
2326
|
+
categories?: string[];
|
|
2327
|
+
};
|
|
2328
|
+
};
|
|
2329
|
+
/**
|
|
2330
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2331
|
+
*/
|
|
2332
|
+
export type VariableDefinition = Preset & {
|
|
2333
|
+
value: string | number;
|
|
2334
|
+
};
|
|
2335
|
+
/**
|
|
2336
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2337
|
+
*/
|
|
2338
|
+
export type ColorDefinition = Preset & {
|
|
2339
|
+
value: Color;
|
|
2340
|
+
};
|
|
2341
|
+
/**
|
|
2342
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2343
|
+
*/
|
|
2344
|
+
export type ColorPaletteDefinition = Preset & {
|
|
2345
|
+
entries: Color[];
|
|
2346
|
+
};
|
|
2347
|
+
/**
|
|
2348
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2349
|
+
* In the CE.SDK, you can import `PageFormatDefinition` directly.
|
|
2350
|
+
*/
|
|
2351
|
+
export type PageFormatDefinition = Preset & {
|
|
2352
|
+
width: number;
|
|
2353
|
+
height: number;
|
|
2354
|
+
/** @deprecated This property is unused and will be removed */
|
|
2355
|
+
dpi?: number;
|
|
2356
|
+
/** @deprecated This property is unused and will be removed */
|
|
2357
|
+
bleedMargin?: number;
|
|
2358
|
+
unit: 'px' | 'mm' | 'in' | DesignUnit;
|
|
2359
|
+
fixedOrientation?: boolean;
|
|
2360
|
+
};
|
|
2361
|
+
/**
|
|
2362
|
+
* @deprecated This type definition has moved and can be imported directly as `TypefaceDefinition`.
|
|
2363
|
+
*/
|
|
2364
|
+
export type TypefaceDefinition = _TypefaceDefinition;
|
|
2365
|
+
/**
|
|
2366
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2367
|
+
*/
|
|
2368
|
+
export type TemplateDefinition = Preset & {
|
|
2369
|
+
label: string;
|
|
2370
|
+
scene: string | URL | (() => Promise<string>);
|
|
2371
|
+
thumbnailURL?: string | URL;
|
|
2372
|
+
};
|
|
2373
|
+
/**
|
|
2374
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2375
|
+
* If you need to reference this type in your code,
|
|
2376
|
+
* use `Configuration['presets']` instead of `ConfigTypes.Presets`.
|
|
2377
|
+
*/
|
|
2378
|
+
export type Presets = {
|
|
2379
|
+
/**
|
|
2380
|
+
* @deprecated The configuration option `presets.colors` does not exist anymore.
|
|
2381
|
+
*/
|
|
2382
|
+
colors?: {
|
|
2383
|
+
[id: string]: Color;
|
|
2384
|
+
};
|
|
2385
|
+
typefaces?: {
|
|
2386
|
+
[id: string]: _TypefaceDefinition;
|
|
2387
|
+
};
|
|
2388
|
+
/**
|
|
2389
|
+
* @deprecated The configuration option `presets.colorPalettes` does not exist anymore.
|
|
2390
|
+
*/
|
|
2391
|
+
colorPalettes?: {
|
|
2392
|
+
[id: string]: ColorPaletteDefinition;
|
|
2393
|
+
};
|
|
2394
|
+
/**
|
|
2395
|
+
* @deprecated The configuration option `presets.pageFormats` does not exist anymore.
|
|
2396
|
+
*/
|
|
2397
|
+
pageFormats?: {
|
|
2398
|
+
[id: string]: PageFormatDefinition;
|
|
2399
|
+
};
|
|
2400
|
+
/**
|
|
2401
|
+
* @deprecated The configuration option `presets.templates` does not exist anymore.
|
|
2402
|
+
* The templates should be defined as asset sources using
|
|
2403
|
+
* the `cesdk.engine.asset.addSource` or `cesdk.engine.asset.addLocalSource` instead.
|
|
2404
|
+
*/
|
|
2405
|
+
templates?: {
|
|
2406
|
+
[id: string]: TemplateDefinition;
|
|
2407
|
+
};
|
|
2408
|
+
};
|
|
2409
|
+
/**
|
|
2410
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2411
|
+
*/
|
|
2412
|
+
export type Variables = {
|
|
2413
|
+
[id: string]: VariableDefinition;
|
|
2414
|
+
};
|
|
2415
|
+
/**
|
|
2416
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2417
|
+
* The settings that were configured here can be set via the BlockApi on the
|
|
2418
|
+
* scene block:
|
|
2419
|
+
*
|
|
2420
|
+
* ```ts
|
|
2421
|
+
* engine.block.setInt(sceneId, 'scene/dpi', dpi);
|
|
2422
|
+
* engine.block.setInt(sceneId, 'scene/pixelScaleFactor', factor);
|
|
2423
|
+
* ```
|
|
2424
|
+
*/
|
|
2425
|
+
export type Scene = {
|
|
2426
|
+
/**
|
|
2427
|
+
* @deprecated Setting this value has no effect. You can change the dpi of the
|
|
2428
|
+
* current scene via `engine.block.setInt(sceneId, 'scene/dpi', dpi)`
|
|
2429
|
+
*/
|
|
2430
|
+
dpi: number;
|
|
2431
|
+
/**
|
|
2432
|
+
* @deprecated Setting this value has no effect. You can change the dpi of the
|
|
2433
|
+
* current scene via `engine.block.setInt(sceneId, 'scene/pixelScaleFactor', * factor)`
|
|
2434
|
+
*/
|
|
2435
|
+
pixelScaleFactor: number;
|
|
2436
|
+
};
|
|
2437
|
+
/**
|
|
2438
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2439
|
+
* The settings that were configured here can be set via the
|
|
2440
|
+
* following EditorAPI settings:
|
|
2441
|
+
* - `setSettingBool('page/title/show', show)`
|
|
2442
|
+
* - `setSettingString('page/title/fontFileUri', uri)`
|
|
2443
|
+
* - `setSettingBool('page/dimOutOfPageAreas', dim)`
|
|
2444
|
+
* @public
|
|
2445
|
+
*/
|
|
2446
|
+
export type Page = {
|
|
2447
|
+
/**
|
|
2448
|
+
* @deprecated
|
|
2449
|
+
* The settings that were configured here can be set via the
|
|
2450
|
+
* following EditorAPI settings:
|
|
2451
|
+
* - `setSettingBool('page/title/show', show)`
|
|
2452
|
+
* - `setSettingString('page/title/fontFileUri', uri)`
|
|
2453
|
+
*/
|
|
2454
|
+
title: {
|
|
2455
|
+
/**
|
|
2456
|
+
* @deprecated
|
|
2457
|
+
* Use the EditorAPI to set the title visibility:
|
|
2458
|
+
* - `setSettingBool('page/title/show', show)`
|
|
2459
|
+
*/
|
|
2460
|
+
show?: boolean;
|
|
2461
|
+
/**
|
|
2462
|
+
* @deprecated
|
|
2463
|
+
* Use the EditorAPI to set the title font:
|
|
2464
|
+
* - `setSettingString('page/title/fontFileUri', uri)`
|
|
2465
|
+
*/
|
|
2466
|
+
fontFileUri?: string;
|
|
2467
|
+
};
|
|
2468
|
+
/**
|
|
2469
|
+
* @deprecated
|
|
2470
|
+
* Use the EditorAPI to control the opacity of out-of-page areas:
|
|
2471
|
+
* - `setSettingBool('page/dimOutOfPageAreas', dim)`
|
|
2472
|
+
*/
|
|
2473
|
+
dimOutOfPageAreas?: boolean;
|
|
2474
|
+
};
|
|
2475
|
+
/**
|
|
2476
|
+
* @deprecated This type definition has been removed
|
|
2477
|
+
* @public
|
|
2478
|
+
*/
|
|
2479
|
+
export type Callbacks = {
|
|
2480
|
+
/**
|
|
2481
|
+
* @deprecated The logger has moved from `config.callbacks.logger` to `config.logger`
|
|
2482
|
+
*/
|
|
2483
|
+
log?: Logger;
|
|
2484
|
+
};
|
|
2348
2485
|
}
|
|
2349
|
-
export { ConfigTypes }
|
|
2350
2486
|
|
|
2351
2487
|
/** @public */
|
|
2352
2488
|
export declare interface Configuration {
|
|
2353
2489
|
baseURL: string;
|
|
2354
2490
|
license?: string;
|
|
2491
|
+
core: {
|
|
2492
|
+
baseURL: string;
|
|
2493
|
+
};
|
|
2494
|
+
logger: Logger;
|
|
2355
2495
|
featureFlags?: {
|
|
2356
2496
|
[flag: string]: boolean | string;
|
|
2357
2497
|
};
|
|
2358
2498
|
/**
|
|
2359
2499
|
* @deprecated Extensions have been superseded by AssetSources and should no longer be used.
|
|
2360
2500
|
*/
|
|
2361
|
-
extensions:
|
|
2362
|
-
|
|
2363
|
-
|
|
2501
|
+
extensions: {
|
|
2502
|
+
baseURL: string;
|
|
2503
|
+
entries: string[];
|
|
2504
|
+
};
|
|
2364
2505
|
presets: ConfigTypes.Presets;
|
|
2365
|
-
variables: ConfigTypes.Variables;
|
|
2366
|
-
callbacks: ConfigTypes.Callbacks;
|
|
2367
2506
|
/**
|
|
2368
|
-
*
|
|
2369
|
-
* the font from a extension pack including namespace, e.g.
|
|
2370
|
-
*
|
|
2371
|
-
* '//ly.img.cesdk.fonts/roboto_regular'
|
|
2372
|
-
*
|
|
2373
|
-
* If not configured the fallback font is used.
|
|
2507
|
+
* @deprecated This config key is not used anymore.
|
|
2374
2508
|
*/
|
|
2375
2509
|
defaultFont?: string;
|
|
2376
2510
|
/**
|
|
@@ -2387,6 +2521,47 @@ export declare interface Configuration {
|
|
|
2387
2521
|
* If not configured the fallback value is 'auto'.
|
|
2388
2522
|
*/
|
|
2389
2523
|
audioOutput?: 'auto' | 'none';
|
|
2524
|
+
/**
|
|
2525
|
+
* @deprecated This config key is not used anymore.
|
|
2526
|
+
* You can configure a role via `setSettingEnum('role', role)` in the
|
|
2527
|
+
* EditorAPI.
|
|
2528
|
+
*/
|
|
2529
|
+
role?: RoleString;
|
|
2530
|
+
/**
|
|
2531
|
+
* @deprecated This config key is not used anymore.
|
|
2532
|
+
* The settings that were configured here can be set via the
|
|
2533
|
+
* following EditorAPI settings:
|
|
2534
|
+
* - `setSettingBool('page/title/show', show)`
|
|
2535
|
+
* - `setSettingString('page/title/fontFileUri', uri)`
|
|
2536
|
+
* - `setSettingBool('page/dimOutOfPageAreas', dim)`
|
|
2537
|
+
*/
|
|
2538
|
+
page?: ConfigTypes.Page;
|
|
2539
|
+
/**
|
|
2540
|
+
* @deprecated This config key is not used anymore.
|
|
2541
|
+
* The settings that were configured here can be set via the BlockApi on the scene block
|
|
2542
|
+
* @public
|
|
2543
|
+
*/
|
|
2544
|
+
scene?: ConfigTypes.Scene;
|
|
2545
|
+
/**
|
|
2546
|
+
* @deprecated This config key is not used anymore.
|
|
2547
|
+
* Please use the asset api at `cesdk.engine.asset` instead of `config.assetSources`.
|
|
2548
|
+
*/
|
|
2549
|
+
assetSources?: ConfigTypes.AssetSources;
|
|
2550
|
+
/**
|
|
2551
|
+
* @deprecated This config key is not used anymore.
|
|
2552
|
+
* Please use the VariableAPI at `cesdk.engine.variable` instead of `config.variables`.
|
|
2553
|
+
*/
|
|
2554
|
+
variables?: ConfigTypes.Variables;
|
|
2555
|
+
/**
|
|
2556
|
+
* @deprecated This config key is not used anymore
|
|
2557
|
+
* The `config.callbacks.logger` configuration will be moved to `config.logger`
|
|
2558
|
+
*/
|
|
2559
|
+
callbacks?: {
|
|
2560
|
+
/**
|
|
2561
|
+
* @deprecated The `config.callbacks.logger` has moved to `config.logger`
|
|
2562
|
+
*/
|
|
2563
|
+
log?: Logger;
|
|
2564
|
+
};
|
|
2390
2565
|
}
|
|
2391
2566
|
|
|
2392
2567
|
/**
|
|
@@ -2398,11 +2573,6 @@ export declare interface Configuration {
|
|
|
2398
2573
|
*/
|
|
2399
2574
|
export declare type ContentFillMode = 'Crop' | 'Cover' | 'Contain';
|
|
2400
2575
|
|
|
2401
|
-
/** @public */
|
|
2402
|
-
declare type Core = {
|
|
2403
|
-
baseURL: string;
|
|
2404
|
-
};
|
|
2405
|
-
|
|
2406
2576
|
/**
|
|
2407
2577
|
* A headless implementation that just initializes & exposes the Document API
|
|
2408
2578
|
*
|
|
@@ -2428,7 +2598,7 @@ declare class CreativeEngine {
|
|
|
2428
2598
|
* @param config - An optional configuration object.
|
|
2429
2599
|
* @returns An engine instance.
|
|
2430
2600
|
*/
|
|
2431
|
-
static init<C extends Partial<Configuration
|
|
2601
|
+
static init<C extends Partial<Configuration>>(config?: C): Promise<CreativeEngine & (C extends {
|
|
2432
2602
|
readonly canvas: any;
|
|
2433
2603
|
} ? {
|
|
2434
2604
|
readonly element: undefined;
|
|
@@ -2442,7 +2612,7 @@ declare class CreativeEngine {
|
|
|
2442
2612
|
* - `'ly.img.sticker'` - Various stickers
|
|
2443
2613
|
* - `'ly.img.vectorpath'` - Shapes and arrows
|
|
2444
2614
|
* - `'ly.img.filter.lut'` - LUT effects of various kinds.
|
|
2445
|
-
* - `'ly.img.filter.duotone'` -
|
|
2615
|
+
* - `'ly.img.filter.duotone'` - Color effects of various kinds.
|
|
2446
2616
|
*
|
|
2447
2617
|
* These assets are parsed from the IMG.LY CDN at \{\{base_url\}\}/<id>/content.json, where
|
|
2448
2618
|
* `base_url` defaults to 'https://cdn.img.ly/assets/v1'.
|
|
@@ -2512,7 +2682,7 @@ export declare type DefaultAssetSourceId = 'ly.img.sticker' | 'ly.img.vectorpath
|
|
|
2512
2682
|
/**
|
|
2513
2683
|
* @public
|
|
2514
2684
|
*/
|
|
2515
|
-
export declare type DemoAssetSourceId = 'ly.img.image.upload' | 'ly.img.video.upload' | 'ly.img.audio.upload' | 'ly.img.image' | 'ly.img.video' | 'ly.img.audio';
|
|
2685
|
+
export declare type DemoAssetSourceId = 'ly.img.template' | 'ly.img.image.upload' | 'ly.img.video.upload' | 'ly.img.audio.upload' | 'ly.img.image' | 'ly.img.video' | 'ly.img.audio';
|
|
2516
2686
|
|
|
2517
2687
|
/**
|
|
2518
2688
|
* A numerical identifier for a design block
|
|
@@ -2900,12 +3070,6 @@ declare interface ExportVideoOptions {
|
|
|
2900
3070
|
targetHeight: number;
|
|
2901
3071
|
}
|
|
2902
3072
|
|
|
2903
|
-
/** @public */
|
|
2904
|
-
declare type Extensions = {
|
|
2905
|
-
baseURL: string;
|
|
2906
|
-
entries: string[];
|
|
2907
|
-
};
|
|
2908
|
-
|
|
2909
3073
|
/**
|
|
2910
3074
|
* @public
|
|
2911
3075
|
*/
|
|
@@ -2955,17 +3119,6 @@ a: number
|
|
|
2955
3119
|
*/
|
|
2956
3120
|
export declare type GradientType = 'Linear' | 'Radial' | 'Conical';
|
|
2957
3121
|
|
|
2958
|
-
/**
|
|
2959
|
-
* An asset can be member of multiple groups. Groups have a semantic meaning
|
|
2960
|
-
* used to build and group UIs exploring the assets, e.g.sections in the
|
|
2961
|
-
* content library, or for things like topics in Unsplash for instance.
|
|
2962
|
-
*
|
|
2963
|
-
* Tags in comparison have are more loosely hold meaning used for extended
|
|
2964
|
-
* searching/filtering.
|
|
2965
|
-
* @public
|
|
2966
|
-
*/
|
|
2967
|
-
declare type Groups = string[];
|
|
2968
|
-
|
|
2969
3122
|
/**
|
|
2970
3123
|
* Will be called by a stream whenever a new value is available.
|
|
2971
3124
|
* @public
|
|
@@ -2979,13 +3132,6 @@ declare type Handler<T> = (v: T) => void;
|
|
|
2979
3132
|
*/
|
|
2980
3133
|
export declare type HexColorString = string;
|
|
2981
3134
|
|
|
2982
|
-
/**
|
|
2983
|
-
* @deprecated This type definition has been moved
|
|
2984
|
-
* It can instead be imported directly as `HexColorString`
|
|
2985
|
-
* @public
|
|
2986
|
-
*/
|
|
2987
|
-
declare type HexColorString_2 = HexColorString;
|
|
2988
|
-
|
|
2989
3135
|
/**
|
|
2990
3136
|
* A numerical identifier for a history stack
|
|
2991
3137
|
* @public
|
|
@@ -3038,14 +3184,23 @@ export declare interface HTMLCreativeEngineCanvasElement extends HTMLElement {
|
|
|
3038
3184
|
declare type Locale = string;
|
|
3039
3185
|
|
|
3040
3186
|
/** @public */
|
|
3041
|
-
export declare
|
|
3187
|
+
export declare interface Logger {
|
|
3188
|
+
(message: string, level?: LogLevel): void;
|
|
3189
|
+
}
|
|
3042
3190
|
|
|
3043
3191
|
/** @public */
|
|
3044
|
-
export declare
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3192
|
+
export declare type LogLevel = 'Info' | 'Warning' | 'Error';
|
|
3193
|
+
|
|
3194
|
+
/**
|
|
3195
|
+
* @public
|
|
3196
|
+
* @deprecated Specifying log levels via `LogLevel.Info` has been deprecated.
|
|
3197
|
+
* Please use the desired LogLevel string directly.
|
|
3198
|
+
*/
|
|
3199
|
+
export declare const LogLevel: {
|
|
3200
|
+
readonly Info: "Info";
|
|
3201
|
+
readonly Warning: "Warning";
|
|
3202
|
+
readonly Error: "Error";
|
|
3203
|
+
};
|
|
3049
3204
|
|
|
3050
3205
|
/** @public */
|
|
3051
3206
|
declare enum MimeType_2 {
|
|
@@ -3060,63 +3215,6 @@ declare enum MimeType_2 {
|
|
|
3060
3215
|
}
|
|
3061
3216
|
export { MimeType_2 as MimeType }
|
|
3062
3217
|
|
|
3063
|
-
/**
|
|
3064
|
-
* Contains configuration keys that have been removed from the actual
|
|
3065
|
-
* configuration, but are still supported publicly
|
|
3066
|
-
* @public
|
|
3067
|
-
*/
|
|
3068
|
-
export declare interface OldConfiguration {
|
|
3069
|
-
/**
|
|
3070
|
-
* @deprecated This config key has been removed.
|
|
3071
|
-
* You can configure a role via `setSettingEnum('role', role)` in the
|
|
3072
|
-
* EditorAPI.
|
|
3073
|
-
*/
|
|
3074
|
-
role?: RoleString;
|
|
3075
|
-
/**
|
|
3076
|
-
* @deprecated This config key has been removed completely.
|
|
3077
|
-
* The settings that were configured here can be set via the
|
|
3078
|
-
* following EditorAPI settings:
|
|
3079
|
-
* - `setSettingBool('page/title/show', show)`
|
|
3080
|
-
* - `setSettingString('page/title/fontFileUri', uri)`
|
|
3081
|
-
* - `setSettingBool('page/title/dimOutOfPageAreas', dim)`
|
|
3082
|
-
*/
|
|
3083
|
-
page?: Page;
|
|
3084
|
-
/**
|
|
3085
|
-
* @deprecated This type definition has been removed
|
|
3086
|
-
* The settings that were configured here can be set via the
|
|
3087
|
-
* BlockApi on the scene block
|
|
3088
|
-
* @public
|
|
3089
|
-
*/
|
|
3090
|
-
scene?: Scene;
|
|
3091
|
-
}
|
|
3092
|
-
|
|
3093
|
-
/**
|
|
3094
|
-
* @deprecated This type definition has been removed
|
|
3095
|
-
* The settings that were configured here can be set via the
|
|
3096
|
-
* following EditorAPI settings:
|
|
3097
|
-
* - `setSettingBool('page/title/show', show)`
|
|
3098
|
-
* - `setSettingString('page/title/fontFileUri', uri)`
|
|
3099
|
-
* - `setSettingBool('page/title/dimOutOfPageAreas', dim)`
|
|
3100
|
-
* @public
|
|
3101
|
-
*/
|
|
3102
|
-
declare type Page = {
|
|
3103
|
-
title: {
|
|
3104
|
-
/**
|
|
3105
|
-
* Whether newly created pages should show a title.
|
|
3106
|
-
*/
|
|
3107
|
-
show?: boolean;
|
|
3108
|
-
/**
|
|
3109
|
-
* The font file to use to render the page titles.
|
|
3110
|
-
*/
|
|
3111
|
-
fontFileUri?: string;
|
|
3112
|
-
};
|
|
3113
|
-
/**
|
|
3114
|
-
* Whether the opacity of the region outside of all
|
|
3115
|
-
* pages should be reduced.
|
|
3116
|
-
*/
|
|
3117
|
-
dimOutOfPageAreas?: boolean;
|
|
3118
|
-
};
|
|
3119
|
-
|
|
3120
3218
|
/** @public */
|
|
3121
3219
|
export declare interface PageDuration {
|
|
3122
3220
|
pageId: DesignBlockId;
|
|
@@ -3125,21 +3223,6 @@ export declare interface PageDuration {
|
|
|
3125
3223
|
end: number;
|
|
3126
3224
|
}
|
|
3127
3225
|
|
|
3128
|
-
/**
|
|
3129
|
-
* @deprecated This type definition is unused and will be removed
|
|
3130
|
-
* @public
|
|
3131
|
-
*/
|
|
3132
|
-
declare type PageFormatDefinition = Preset & {
|
|
3133
|
-
width: number;
|
|
3134
|
-
height: number;
|
|
3135
|
-
/** @deprecated This property is unused and will be removed */
|
|
3136
|
-
dpi?: number;
|
|
3137
|
-
/** @deprecated This property is unused and will be removed */
|
|
3138
|
-
bleedMargin?: number;
|
|
3139
|
-
unit: 'px' | 'mm' | 'in' | DesignUnit;
|
|
3140
|
-
fixedOrientation?: boolean;
|
|
3141
|
-
};
|
|
3142
|
-
|
|
3143
3226
|
/**
|
|
3144
3227
|
* A color definition for the custom color palette.
|
|
3145
3228
|
* The RGB and CMYK components must all be specified in the range [0-1].
|
|
@@ -3156,62 +3239,20 @@ export declare type PaletteColor = HexColorString | RGBColor | RGBAColor | SpotC
|
|
|
3156
3239
|
*/
|
|
3157
3240
|
export declare type PositionMode = 'Absolute' | 'Percent' | 'Auto';
|
|
3158
3241
|
|
|
3159
|
-
/**
|
|
3160
|
-
* @deprecated This type definition is not used anymore and will be removed.
|
|
3161
|
-
* @public
|
|
3162
|
-
*/
|
|
3163
|
-
declare type Preset = {
|
|
3164
|
-
meta?: {
|
|
3165
|
-
default?: boolean;
|
|
3166
|
-
library?: string;
|
|
3167
|
-
categories?: string[];
|
|
3168
|
-
};
|
|
3169
|
-
};
|
|
3170
|
-
|
|
3171
|
-
/**
|
|
3172
|
-
* @deprecated This type definition will be removed.
|
|
3173
|
-
* If you need to reference this type in your code,
|
|
3174
|
-
* use `Configuration['presets']` instead of `ConfigTypes.Presets`.
|
|
3175
|
-
* @public
|
|
3176
|
-
*/
|
|
3177
|
-
declare type Presets = {
|
|
3178
|
-
/**
|
|
3179
|
-
* @deprecated The configuration option `presets.colors` does not exist anymore.
|
|
3180
|
-
*/
|
|
3181
|
-
colors?: {
|
|
3182
|
-
[id: string]: Color_2;
|
|
3183
|
-
};
|
|
3184
|
-
typefaces?: {
|
|
3185
|
-
[id: string]: TypefaceDefinition;
|
|
3186
|
-
};
|
|
3187
|
-
colorPalettes?: {
|
|
3188
|
-
[id: string]: ColorPaletteDefinition;
|
|
3189
|
-
};
|
|
3190
|
-
pageFormats?: {
|
|
3191
|
-
[id: string]: PageFormatDefinition;
|
|
3192
|
-
};
|
|
3193
|
-
templates?: {
|
|
3194
|
-
[id: string]: TemplateDefinition;
|
|
3195
|
-
};
|
|
3196
|
-
};
|
|
3197
|
-
|
|
3198
3242
|
/** @public */
|
|
3199
3243
|
export declare type PropertyType = 'Bool' | 'Int' | 'Float' | 'String' | 'Color' | 'Enum' | 'Struct' | 'Double';
|
|
3200
3244
|
|
|
3201
|
-
/**
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
*/
|
|
3211
|
-
perPage: number;
|
|
3212
|
-
/** The current page queried for paginated views. */
|
|
3213
|
-
page: number;
|
|
3245
|
+
/**
|
|
3246
|
+
* An open range.
|
|
3247
|
+
* @public
|
|
3248
|
+
* */
|
|
3249
|
+
declare interface Range_2 {
|
|
3250
|
+
/** The starting value of the range */
|
|
3251
|
+
from: number;
|
|
3252
|
+
/** The non-inclusive ending value of the range */
|
|
3253
|
+
to: number;
|
|
3214
3254
|
}
|
|
3255
|
+
export { Range_2 as Range }
|
|
3215
3256
|
|
|
3216
3257
|
/**
|
|
3217
3258
|
* A Read only {@link Channel}
|
|
@@ -3293,31 +3334,6 @@ export declare interface RGBColor {
|
|
|
3293
3334
|
/** @public */
|
|
3294
3335
|
export declare type RoleString = 'Creator' | 'Adopter' | 'Viewer' | 'Presenter';
|
|
3295
3336
|
|
|
3296
|
-
/**
|
|
3297
|
-
* @deprecated This type definition is not used anymore and will be removed
|
|
3298
|
-
* in the future. The settings that were configured here can be set via the
|
|
3299
|
-
* BlockApi on the scene block:
|
|
3300
|
-
*
|
|
3301
|
-
* ```ts
|
|
3302
|
-
* engine.block.setInt(sceneId, 'scene/dpi', dpi);
|
|
3303
|
-
* engine.block.setInt(sceneId, 'scene/pixelScaleFactor', factor);
|
|
3304
|
-
* ```
|
|
3305
|
-
*
|
|
3306
|
-
* @public
|
|
3307
|
-
*/
|
|
3308
|
-
declare type Scene = {
|
|
3309
|
-
/**
|
|
3310
|
-
* @deprecated Setting this value has no effect. You can change the dpi of the
|
|
3311
|
-
* current scene via `engine.block.setInt(sceneId, 'scene/dpi', dpi)`
|
|
3312
|
-
*/
|
|
3313
|
-
dpi: number;
|
|
3314
|
-
/**
|
|
3315
|
-
* @deprecated Setting this value has no effect. You can change the dpi of the
|
|
3316
|
-
* current scene via `engine.block.setInt(sceneId, 'scene/pixelScaleFactor', * factor)`
|
|
3317
|
-
*/
|
|
3318
|
-
pixelScaleFactor: number;
|
|
3319
|
-
};
|
|
3320
|
-
|
|
3321
3337
|
/**
|
|
3322
3338
|
* @public
|
|
3323
3339
|
*/
|
|
@@ -3388,8 +3404,8 @@ export declare class SceneAPI {
|
|
|
3388
3404
|
/**
|
|
3389
3405
|
* Applies the contents of the given template scene to the currently loaded scene.
|
|
3390
3406
|
* This loads the template scene while keeping the design unit and page dimensions
|
|
3391
|
-
* of the current scene.
|
|
3392
|
-
*
|
|
3407
|
+
* of the current scene. The content of the pages is automatically adjusted to fit
|
|
3408
|
+
* the new dimensions.
|
|
3393
3409
|
* @param content - The template scene file contents, a base64 string.
|
|
3394
3410
|
* @returns A Promise that resolves once the template was applied or rejects if there was an error.
|
|
3395
3411
|
*/
|
|
@@ -3397,8 +3413,8 @@ export declare class SceneAPI {
|
|
|
3397
3413
|
/**
|
|
3398
3414
|
* Applies the contents of the given template scene to the currently loaded scene.
|
|
3399
3415
|
* This loads the template scene while keeping the design unit and page dimensions
|
|
3400
|
-
* of the current scene.
|
|
3401
|
-
*
|
|
3416
|
+
* of the current scene. The content of the pages is automatically adjusted to fit
|
|
3417
|
+
* the new dimensions.
|
|
3402
3418
|
* @param url - The url to the template scene file.
|
|
3403
3419
|
* @returns A Promise that resolves once the template was applied or rejects if there was an error.
|
|
3404
3420
|
*/
|
|
@@ -3600,24 +3616,15 @@ export declare function supportsVideo(): boolean;
|
|
|
3600
3616
|
*/
|
|
3601
3617
|
export declare function supportsWasm(): boolean;
|
|
3602
3618
|
|
|
3603
|
-
/** @public */
|
|
3604
|
-
declare type TemplateDefinition = {
|
|
3605
|
-
/** @deprecated The meta field is not used anymore */
|
|
3606
|
-
meta?: Preset['meta'];
|
|
3607
|
-
label: string;
|
|
3608
|
-
scene: string | URL | (() => Promise<string>);
|
|
3609
|
-
thumbnailURL?: string | URL;
|
|
3610
|
-
};
|
|
3611
|
-
|
|
3612
3619
|
/**
|
|
3613
3620
|
* @public
|
|
3614
3621
|
*/
|
|
3615
3622
|
export declare type TextCase = 'Normal' | 'Uppercase' | 'Lowercase' | 'Titlecase';
|
|
3616
3623
|
|
|
3617
3624
|
/** @public */
|
|
3618
|
-
declare type TypefaceDefinition = {
|
|
3625
|
+
export declare type TypefaceDefinition = {
|
|
3619
3626
|
/** @deprecated The meta field is not used anymore */
|
|
3620
|
-
meta?: Preset['meta'];
|
|
3627
|
+
meta?: ConfigTypes.Preset['meta'];
|
|
3621
3628
|
family: string;
|
|
3622
3629
|
fonts: {
|
|
3623
3630
|
fontURL: string;
|
|
@@ -3626,6 +3633,8 @@ declare type TypefaceDefinition = {
|
|
|
3626
3633
|
}[];
|
|
3627
3634
|
};
|
|
3628
3635
|
|
|
3636
|
+
declare type _TypefaceDefinition = TypefaceDefinition;
|
|
3637
|
+
|
|
3629
3638
|
/**
|
|
3630
3639
|
* Invoke to unsubscribe from a stream.
|
|
3631
3640
|
* @public
|
|
@@ -3662,16 +3671,6 @@ export declare class VariableAPI {
|
|
|
3662
3671
|
remove(key: string): void;
|
|
3663
3672
|
}
|
|
3664
3673
|
|
|
3665
|
-
/** @public */
|
|
3666
|
-
declare type VariableDefinition = Preset & {
|
|
3667
|
-
value: string | number;
|
|
3668
|
-
};
|
|
3669
|
-
|
|
3670
|
-
/** @public */
|
|
3671
|
-
declare type Variables = {
|
|
3672
|
-
[id: string]: VariableDefinition;
|
|
3673
|
-
};
|
|
3674
|
-
|
|
3675
3674
|
/** @public */
|
|
3676
3675
|
export declare interface Vec2 {
|
|
3677
3676
|
x: number;
|