@cesdk/node 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
|
@@ -12,7 +12,7 @@ export declare interface Asset {
|
|
|
12
12
|
*/
|
|
13
13
|
id: string;
|
|
14
14
|
/** Groups of the asset. */
|
|
15
|
-
groups?:
|
|
15
|
+
groups?: AssetGroups;
|
|
16
16
|
/** Asset-specific and custom meta information */
|
|
17
17
|
meta?: {
|
|
18
18
|
/** The mime type of this asset or the data behind the asset's uri. */
|
|
@@ -50,7 +50,7 @@ export declare class AssetAPI {
|
|
|
50
50
|
* @param applyAssetToBlock - An optional callback that can be used to override the default behavior of applying
|
|
51
51
|
* an asset result to a given block.
|
|
52
52
|
*/
|
|
53
|
-
addLocalSource(id: string, supportedMimeTypes?: string[], applyAsset?: (asset:
|
|
53
|
+
addLocalSource(id: string, supportedMimeTypes?: string[], applyAsset?: (asset: CompleteAssetResult) => Promise<DesignBlockId | undefined>, applyAssetToBlock?: (asset: CompleteAssetResult, block: DesignBlockId) => Promise<void>): void;
|
|
54
54
|
/**
|
|
55
55
|
* Removes an asset source with the given ID.
|
|
56
56
|
* @param id - The ID to refer to the asset source.
|
|
@@ -67,7 +67,7 @@ export declare class AssetAPI {
|
|
|
67
67
|
* @param query - All the options to filter the search results by.
|
|
68
68
|
* @returns The search results.
|
|
69
69
|
*/
|
|
70
|
-
findAssets(sourceId: string, query: AssetQueryData): Promise<AssetsQueryResult
|
|
70
|
+
findAssets(sourceId: string, query: AssetQueryData): Promise<AssetsQueryResult<CompleteAssetResult>>;
|
|
71
71
|
/**
|
|
72
72
|
* Queries the asset source's groups for a certain asset type.
|
|
73
73
|
* @param id - The ID of the asset source.
|
|
@@ -167,6 +167,17 @@ export declare interface AssetDefinition extends Asset {
|
|
|
167
167
|
tags?: Record<Locale, string[]>;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
/**
|
|
171
|
+
* An asset can be member of multiple groups. Groups have a semantic meaning
|
|
172
|
+
* used to build and group UIs exploring the assets, e.g.sections in the
|
|
173
|
+
* content library, or for things like topics in Unsplash for instance.
|
|
174
|
+
*
|
|
175
|
+
* Tags in comparison have are more loosely hold meaning used for extended
|
|
176
|
+
* searching/filtering.
|
|
177
|
+
* @public
|
|
178
|
+
*/
|
|
179
|
+
export declare type AssetGroups = string[];
|
|
180
|
+
|
|
170
181
|
/**
|
|
171
182
|
* Defines a request for querying assets
|
|
172
183
|
* @public
|
|
@@ -183,9 +194,9 @@ export declare interface AssetQueryData {
|
|
|
183
194
|
*/
|
|
184
195
|
tags?: string | string[];
|
|
185
196
|
/** Query only these groups */
|
|
186
|
-
groups?:
|
|
197
|
+
groups?: AssetGroups;
|
|
187
198
|
/** Filter out assets with this groups */
|
|
188
|
-
excludeGroups?:
|
|
199
|
+
excludeGroups?: AssetGroups;
|
|
189
200
|
/** Choose the locale of the labels and tags for localized search and filtering */
|
|
190
201
|
locale?: Locale;
|
|
191
202
|
/**
|
|
@@ -208,7 +219,6 @@ export declare interface AssetResult extends Asset {
|
|
|
208
219
|
label?: string;
|
|
209
220
|
/** The tags of this asset. Used for filtering and free-text searching. */
|
|
210
221
|
tags?: string[];
|
|
211
|
-
|
|
212
222
|
/** Credits for the artist of the asset */
|
|
213
223
|
credits?: {
|
|
214
224
|
name: string;
|
|
@@ -226,44 +236,27 @@ export declare interface AssetResult extends Asset {
|
|
|
226
236
|
};
|
|
227
237
|
}
|
|
228
238
|
|
|
229
|
-
/**
|
|
230
|
-
* Single asset result of a query from the engine.
|
|
231
|
-
* @public
|
|
232
|
-
*/
|
|
233
|
-
declare interface AssetResult_2 {
|
|
234
|
-
/** A unique id of this asset */
|
|
235
|
-
id: string;
|
|
236
|
-
/** Asset-specific and custom meta information */
|
|
237
|
-
meta?: {
|
|
238
|
-
uri?: string;
|
|
239
|
-
filename?: string;
|
|
240
|
-
duration?: string;
|
|
241
|
-
} & Record<string, unknown>;
|
|
242
|
-
/** The locale of the label and tags */
|
|
243
|
-
locale?: string;
|
|
244
|
-
/** The label of the result. Used for description and tooltips. */
|
|
245
|
-
label?: string;
|
|
246
|
-
/** The tags of this asset. Used for filtering and free-text searching. */
|
|
247
|
-
tags?: string[];
|
|
248
|
-
context: {
|
|
249
|
-
sourceId: string;
|
|
250
|
-
};
|
|
251
|
-
/** Credits for the artist of the asset */
|
|
252
|
-
credits?: {
|
|
253
|
-
name: string;
|
|
254
|
-
url?: string;
|
|
255
|
-
};
|
|
256
|
-
/** License for this asset. Overwrites the source license if present */
|
|
257
|
-
license?: {
|
|
258
|
-
name: string;
|
|
259
|
-
url?: string;
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
|
|
263
239
|
/** @public */
|
|
264
240
|
declare interface AssetResultContext {
|
|
265
241
|
sourceId: string;
|
|
266
|
-
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/** @public */
|
|
245
|
+
declare interface AssetResultCredits {
|
|
246
|
+
name: string;
|
|
247
|
+
url: string;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/** @public */
|
|
251
|
+
declare interface AssetResultLicense {
|
|
252
|
+
name: string;
|
|
253
|
+
url: string;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/** @public */
|
|
257
|
+
declare interface AssetResultUtm {
|
|
258
|
+
source: string;
|
|
259
|
+
medium: string;
|
|
267
260
|
}
|
|
268
261
|
|
|
269
262
|
/**
|
|
@@ -274,7 +267,7 @@ export declare interface AssetSource {
|
|
|
274
267
|
/** The unique id of the API */
|
|
275
268
|
id: string;
|
|
276
269
|
/** Find all asset for the given type and the provided query data. */
|
|
277
|
-
findAssets(queryData: AssetQueryData): Promise<AssetsQueryResult>;
|
|
270
|
+
findAssets(queryData: AssetQueryData): Promise<AssetsQueryResult | undefined>;
|
|
278
271
|
/** Return every available group */
|
|
279
272
|
getGroups?: () => Promise<string[]>;
|
|
280
273
|
/** Credits for the source/api */
|
|
@@ -287,10 +280,6 @@ export declare interface AssetSource {
|
|
|
287
280
|
name: string;
|
|
288
281
|
url?: string;
|
|
289
282
|
};
|
|
290
|
-
/**
|
|
291
|
-
* @returns the asset or undefined if no asset with the given id could be found
|
|
292
|
-
*/
|
|
293
|
-
getAsset?(id: string): Promise<AssetResult | undefined>;
|
|
294
283
|
/**
|
|
295
284
|
* Can the source add and remove assets dynamically? If `false`
|
|
296
285
|
* methods like `addAsset` and `removeAsset` will throw an
|
|
@@ -304,12 +293,12 @@ export declare interface AssetSource {
|
|
|
304
293
|
* You can override this with custom behavior.
|
|
305
294
|
* @returns the id of a new block if one was created from the asset.
|
|
306
295
|
*/
|
|
307
|
-
applyAsset?: (asset:
|
|
296
|
+
applyAsset?: (asset: CompleteAssetResult) => Promise<DesignBlockId | undefined>;
|
|
308
297
|
/**
|
|
309
298
|
* Apply the given asset result to the given block.
|
|
310
299
|
* You can override this with custom behavior.
|
|
311
300
|
*/
|
|
312
|
-
applyAssetToBlock?: (asset:
|
|
301
|
+
applyAssetToBlock?: (asset: CompleteAssetResult, block: DesignBlockId) => Promise<void>;
|
|
313
302
|
/**
|
|
314
303
|
* Adds the given asset to this source. Throws an error if the asset source
|
|
315
304
|
* does not support adding assets.
|
|
@@ -327,72 +316,13 @@ export declare interface AssetSource {
|
|
|
327
316
|
getSupportedMimeTypes?(): string[] | undefined;
|
|
328
317
|
}
|
|
329
318
|
|
|
330
|
-
/**
|
|
331
|
-
* API to query for assets
|
|
332
|
-
* @public
|
|
333
|
-
*/
|
|
334
|
-
declare interface AssetSource_2 {
|
|
335
|
-
/** Find all asset for the given type and the provided query data. */
|
|
336
|
-
findAssets(queryData?: QueryData): Promise<AssetsQueryResult_2 | undefined>;
|
|
337
|
-
/**
|
|
338
|
-
* Apply the given asset result to the active scene.
|
|
339
|
-
* You can override this with custom behavior.
|
|
340
|
-
*/
|
|
341
|
-
applyAsset?: (asset: AssetResult_2) => Promise<DesignBlockId | undefined>;
|
|
342
|
-
/**
|
|
343
|
-
* Apply the given asset result to the given block.
|
|
344
|
-
* You can override this with custom behavior.
|
|
345
|
-
*/
|
|
346
|
-
applyAssetToBlock?: (asset: AssetResult_2, block: number) => Promise<void>;
|
|
347
|
-
|
|
348
|
-
/** Return every available group */
|
|
349
|
-
getGroups?: () => Promise<string[]>;
|
|
350
|
-
/** Credits for the source/api */
|
|
351
|
-
credits?: {
|
|
352
|
-
name: string;
|
|
353
|
-
url?: string;
|
|
354
|
-
};
|
|
355
|
-
/** General license for all asset from this source */
|
|
356
|
-
license?: {
|
|
357
|
-
name: string;
|
|
358
|
-
url?: string;
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
/**
|
|
362
|
-
* Generates a list of supported mime types for this source.
|
|
363
|
-
*
|
|
364
|
-
* @returns a list of the mime types should be supported by this source
|
|
365
|
-
*/
|
|
366
|
-
getSupportedMimeTypes?(): string[] | undefined;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
/** @public */
|
|
370
|
-
declare type AssetSources = {
|
|
371
|
-
[id: string]: AssetSource_2;
|
|
372
|
-
};
|
|
373
|
-
|
|
374
|
-
/**
|
|
375
|
-
* Return type of a `findAssets` query.
|
|
376
|
-
* @public
|
|
377
|
-
*/
|
|
378
|
-
export declare interface AssetsQueryResult {
|
|
379
|
-
/** The assets in the requested page */
|
|
380
|
-
assets: AssetResult[];
|
|
381
|
-
/** The current, requested page */
|
|
382
|
-
currentPage: number;
|
|
383
|
-
/** The next page to query if it exists */
|
|
384
|
-
nextPage?: number;
|
|
385
|
-
/** How many assets are there in total for the current query regardless of the page */
|
|
386
|
-
total: number;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
319
|
/**
|
|
390
320
|
* Return type of a `findAssets` query.
|
|
391
321
|
* @public
|
|
392
322
|
*/
|
|
393
|
-
declare interface
|
|
323
|
+
export declare interface AssetsQueryResult<T extends AssetResult = AssetResult> {
|
|
394
324
|
/** The assets in the requested page */
|
|
395
|
-
assets:
|
|
325
|
+
assets: T[];
|
|
396
326
|
/** The current, requested page */
|
|
397
327
|
currentPage: number;
|
|
398
328
|
/** The next page to query if it exists */
|
|
@@ -902,13 +832,13 @@ export declare class BlockAPI {
|
|
|
902
832
|
*/
|
|
903
833
|
getScreenSpaceBoundingBoxXYWH(ids: DesignBlockId[]): XYWH;
|
|
904
834
|
/**
|
|
905
|
-
* Align multiple blocks horizontally within their bounding box
|
|
835
|
+
* Align multiple blocks horizontally within their bounding box or a single block to its parent.
|
|
906
836
|
* @param ids - A non-empty array of block ids.
|
|
907
837
|
* @param alignment - How they should be aligned: left, right, or center
|
|
908
838
|
*/
|
|
909
839
|
alignHorizontally(ids: DesignBlockId[], horizontalBlockAlignment: HorizontalBlockAlignment): void;
|
|
910
840
|
/**
|
|
911
|
-
* Align multiple blocks vertically within their bounding box
|
|
841
|
+
* Align multiple blocks vertically within their bounding box or a single block to its parent.
|
|
912
842
|
* @param ids - A non-empty array of block ids.
|
|
913
843
|
* @param alignment - How they should be aligned: top, bottom, or center
|
|
914
844
|
*/
|
|
@@ -919,6 +849,31 @@ export declare class BlockAPI {
|
|
|
919
849
|
* @returns Whether the blocks can be aligned.
|
|
920
850
|
*/
|
|
921
851
|
isAlignable(ids: DesignBlockId[]): boolean;
|
|
852
|
+
/**
|
|
853
|
+
* Distribute multiple blocks horizontally within their bounding box so that the space between them is even.
|
|
854
|
+
*
|
|
855
|
+
* @param ids - A non-empty array of block ids.
|
|
856
|
+
*/
|
|
857
|
+
distributeHorizontally(ids: DesignBlockId[]): void;
|
|
858
|
+
/**
|
|
859
|
+
* Distribute multiple blocks vertically within their bounding box so that the space between them is even.
|
|
860
|
+
* @param ids - A non-empty array of block ids.
|
|
861
|
+
*/
|
|
862
|
+
distributeVertically(ids: DesignBlockId[]): void;
|
|
863
|
+
/**
|
|
864
|
+
* Confirms that a given set of blocks can be distributed.
|
|
865
|
+
* @param ids - A non-empty array of block ids.
|
|
866
|
+
* @returns Whether the blocks can be distributed.
|
|
867
|
+
*/
|
|
868
|
+
isDistributable(ids: DesignBlockId[]): boolean;
|
|
869
|
+
/**
|
|
870
|
+
* Resize all blocks to the given size. The content of the blocks is automatically adjusted
|
|
871
|
+
* to fit the new dimensions.
|
|
872
|
+
* @param ids - The blocks to resize.
|
|
873
|
+
* @param width - The new width of the blocks.
|
|
874
|
+
* @param height - The new height of the blocks.
|
|
875
|
+
*/
|
|
876
|
+
resizeContentAware(ids: DesignBlockId[], width: number, height: number): void;
|
|
922
877
|
/**
|
|
923
878
|
* Scales the block and all of its children proportionally around the specified
|
|
924
879
|
* relative anchor point.
|
|
@@ -1752,6 +1707,12 @@ export declare class BlockAPI {
|
|
|
1752
1707
|
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
1753
1708
|
*/
|
|
1754
1709
|
setTextCase(id: DesignBlockId, textCase: TextCase, from?: number, to?: number): void;
|
|
1710
|
+
/**
|
|
1711
|
+
* Returns the UTF-16 indices of the selected range of the text block that is currently being edited.
|
|
1712
|
+
* If both the start and end index of the returned range have the same value, then the text cursor is positioned at that index.
|
|
1713
|
+
* @returns The selected UTF-16 range or \{ from: -1, to: -1 \} if no text block is currently being edited.
|
|
1714
|
+
*/
|
|
1715
|
+
getTextCursorRange(): Range_2;
|
|
1755
1716
|
/**
|
|
1756
1717
|
* Query if the given block has fill color properties.
|
|
1757
1718
|
* @param id - The block to query.
|
|
@@ -2232,11 +2193,6 @@ export declare interface BlockEvent {
|
|
|
2232
2193
|
type: 'Created' | 'Updated' | 'Destroyed';
|
|
2233
2194
|
}
|
|
2234
2195
|
|
|
2235
|
-
/** @public */
|
|
2236
|
-
declare type Callbacks = {
|
|
2237
|
-
log?: Logger;
|
|
2238
|
-
};
|
|
2239
|
-
|
|
2240
2196
|
/**
|
|
2241
2197
|
* All components between 0 and 1
|
|
2242
2198
|
* @public
|
|
@@ -2249,78 +2205,256 @@ export declare interface CMYKColor {
|
|
|
2249
2205
|
}
|
|
2250
2206
|
|
|
2251
2207
|
/**
|
|
2252
|
-
*
|
|
2253
|
-
*
|
|
2254
|
-
*
|
|
2255
|
-
*/
|
|
2256
|
-
declare type Color_2 = PaletteColor;
|
|
2257
|
-
|
|
2258
|
-
/**
|
|
2259
|
-
* @deprecated This type definition is not used anymore and will be removed.
|
|
2208
|
+
* Asset results that are returned from the engine.
|
|
2209
|
+
*
|
|
2210
|
+
* They contain additional information about the context of the asset.
|
|
2260
2211
|
* @public
|
|
2261
2212
|
*/
|
|
2262
|
-
declare
|
|
2263
|
-
|
|
2264
|
-
|
|
2213
|
+
export declare interface CompleteAssetResult extends AssetResult {
|
|
2214
|
+
/**
|
|
2215
|
+
* Context how an asset was added or shall be used in the future.
|
|
2216
|
+
* This is added to all assets coming from the engine.
|
|
2217
|
+
*/
|
|
2218
|
+
context: {
|
|
2219
|
+
sourceId: string;
|
|
2220
|
+
};
|
|
2221
|
+
}
|
|
2265
2222
|
|
|
2266
2223
|
/**
|
|
2267
|
-
* @deprecated This
|
|
2224
|
+
* @deprecated This namespace is not used anymore. Please refer to the
|
|
2225
|
+
* deprecation notices on its members to see where they have moved to.
|
|
2268
2226
|
* @public
|
|
2269
2227
|
*/
|
|
2270
|
-
declare
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
export
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2228
|
+
export declare namespace ConfigTypes {
|
|
2229
|
+
/**
|
|
2230
|
+
* @deprecated This type definition has been removed.
|
|
2231
|
+
* Instead of `ConfigTypes.Color`, this can be imported directly as `PaletteColor`.
|
|
2232
|
+
*/
|
|
2233
|
+
export type Color = PaletteColor;
|
|
2234
|
+
/**
|
|
2235
|
+
* @deprecated This type definition has been moved
|
|
2236
|
+
* It can instead be imported directly as `HexColorString`
|
|
2237
|
+
*/
|
|
2238
|
+
export type HexColorString = HexColorString;
|
|
2239
|
+
/**
|
|
2240
|
+
* @deprecated
|
|
2241
|
+
* This type definition has be removed. Please use the asset api at
|
|
2242
|
+
* `cesdk.engine.asset` instead of `config.assetSources`.
|
|
2243
|
+
*/
|
|
2244
|
+
export type AssetSources = {
|
|
2245
|
+
[id: string]: AssetSource;
|
|
2246
|
+
};
|
|
2247
|
+
/**
|
|
2248
|
+
* @deprecated
|
|
2249
|
+
* This type definition has been moved and can be imported directly as `AssetQueryData`.
|
|
2250
|
+
*/
|
|
2251
|
+
export type QueryData = AssetQueryData;
|
|
2252
|
+
/**
|
|
2253
|
+
* @deprecated
|
|
2254
|
+
* This type definition has been moved and can be imported directly as `AssetResult`.
|
|
2255
|
+
*/
|
|
2256
|
+
export type AssetResult = AssetResult;
|
|
2257
|
+
/**
|
|
2258
|
+
* @deprecated
|
|
2259
|
+
* This type definition has been moved and can be imported directly as `AssetsQueryResult`.
|
|
2260
|
+
*/
|
|
2261
|
+
export type AssetsQueryResult = AssetsQueryResult;
|
|
2262
|
+
/**
|
|
2263
|
+
* @deprecated
|
|
2264
|
+
* This type definition has been moved and can be imported directly as `AssetSource`,
|
|
2265
|
+
* when working with the asset api.
|
|
2266
|
+
* @public
|
|
2267
|
+
*/
|
|
2268
|
+
export type AssetSource = Omit<AssetSource, 'id'>;
|
|
2269
|
+
/**
|
|
2270
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2271
|
+
*/
|
|
2272
|
+
export type Preset = {
|
|
2273
|
+
meta?: {
|
|
2274
|
+
default?: boolean;
|
|
2275
|
+
library?: string;
|
|
2276
|
+
categories?: string[];
|
|
2277
|
+
};
|
|
2278
|
+
};
|
|
2279
|
+
/**
|
|
2280
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2281
|
+
*/
|
|
2282
|
+
export type VariableDefinition = Preset & {
|
|
2283
|
+
value: string | number;
|
|
2284
|
+
};
|
|
2285
|
+
/**
|
|
2286
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2287
|
+
*/
|
|
2288
|
+
export type ColorDefinition = Preset & {
|
|
2289
|
+
value: Color;
|
|
2290
|
+
};
|
|
2291
|
+
/**
|
|
2292
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2293
|
+
*/
|
|
2294
|
+
export type ColorPaletteDefinition = Preset & {
|
|
2295
|
+
entries: Color[];
|
|
2296
|
+
};
|
|
2297
|
+
/**
|
|
2298
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2299
|
+
* In the CE.SDK, you can import `PageFormatDefinition` directly.
|
|
2300
|
+
*/
|
|
2301
|
+
export type PageFormatDefinition = Preset & {
|
|
2302
|
+
width: number;
|
|
2303
|
+
height: number;
|
|
2304
|
+
/** @deprecated This property is unused and will be removed */
|
|
2305
|
+
dpi?: number;
|
|
2306
|
+
/** @deprecated This property is unused and will be removed */
|
|
2307
|
+
bleedMargin?: number;
|
|
2308
|
+
unit: 'px' | 'mm' | 'in' | DesignUnit;
|
|
2309
|
+
fixedOrientation?: boolean;
|
|
2310
|
+
};
|
|
2311
|
+
/**
|
|
2312
|
+
* @deprecated This type definition has moved and can be imported directly as `TypefaceDefinition`.
|
|
2313
|
+
*/
|
|
2314
|
+
export type TypefaceDefinition = _TypefaceDefinition;
|
|
2315
|
+
/**
|
|
2316
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2317
|
+
*/
|
|
2318
|
+
export type TemplateDefinition = Preset & {
|
|
2319
|
+
label: string;
|
|
2320
|
+
scene: string | URL | (() => Promise<string>);
|
|
2321
|
+
thumbnailURL?: string | URL;
|
|
2322
|
+
};
|
|
2323
|
+
/**
|
|
2324
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2325
|
+
* If you need to reference this type in your code,
|
|
2326
|
+
* use `Configuration['presets']` instead of `ConfigTypes.Presets`.
|
|
2327
|
+
*/
|
|
2328
|
+
export type Presets = {
|
|
2329
|
+
/**
|
|
2330
|
+
* @deprecated The configuration option `presets.colors` does not exist anymore.
|
|
2331
|
+
*/
|
|
2332
|
+
colors?: {
|
|
2333
|
+
[id: string]: Color;
|
|
2334
|
+
};
|
|
2335
|
+
typefaces?: {
|
|
2336
|
+
[id: string]: _TypefaceDefinition;
|
|
2337
|
+
};
|
|
2338
|
+
/**
|
|
2339
|
+
* @deprecated The configuration option `presets.colorPalettes` does not exist anymore.
|
|
2340
|
+
*/
|
|
2341
|
+
colorPalettes?: {
|
|
2342
|
+
[id: string]: ColorPaletteDefinition;
|
|
2343
|
+
};
|
|
2344
|
+
/**
|
|
2345
|
+
* @deprecated The configuration option `presets.pageFormats` does not exist anymore.
|
|
2346
|
+
*/
|
|
2347
|
+
pageFormats?: {
|
|
2348
|
+
[id: string]: PageFormatDefinition;
|
|
2349
|
+
};
|
|
2350
|
+
/**
|
|
2351
|
+
* @deprecated The configuration option `presets.templates` does not exist anymore.
|
|
2352
|
+
* The templates should be defined as asset sources using
|
|
2353
|
+
* the `cesdk.engine.asset.addSource` or `cesdk.engine.asset.addLocalSource` instead.
|
|
2354
|
+
*/
|
|
2355
|
+
templates?: {
|
|
2356
|
+
[id: string]: TemplateDefinition;
|
|
2357
|
+
};
|
|
2358
|
+
};
|
|
2359
|
+
/**
|
|
2360
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2361
|
+
*/
|
|
2362
|
+
export type Variables = {
|
|
2363
|
+
[id: string]: VariableDefinition;
|
|
2364
|
+
};
|
|
2365
|
+
/**
|
|
2366
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2367
|
+
* The settings that were configured here can be set via the BlockApi on the
|
|
2368
|
+
* scene block:
|
|
2369
|
+
*
|
|
2370
|
+
* ```ts
|
|
2371
|
+
* engine.block.setInt(sceneId, 'scene/dpi', dpi);
|
|
2372
|
+
* engine.block.setInt(sceneId, 'scene/pixelScaleFactor', factor);
|
|
2373
|
+
* ```
|
|
2374
|
+
*/
|
|
2375
|
+
export type Scene = {
|
|
2376
|
+
/**
|
|
2377
|
+
* @deprecated Setting this value has no effect. You can change the dpi of the
|
|
2378
|
+
* current scene via `engine.block.setInt(sceneId, 'scene/dpi', dpi)`
|
|
2379
|
+
*/
|
|
2380
|
+
dpi: number;
|
|
2381
|
+
/**
|
|
2382
|
+
* @deprecated Setting this value has no effect. You can change the dpi of the
|
|
2383
|
+
* current scene via `engine.block.setInt(sceneId, 'scene/pixelScaleFactor', * factor)`
|
|
2384
|
+
*/
|
|
2385
|
+
pixelScaleFactor: number;
|
|
2386
|
+
};
|
|
2387
|
+
/**
|
|
2388
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2389
|
+
* The settings that were configured here can be set via the
|
|
2390
|
+
* following EditorAPI settings:
|
|
2391
|
+
* - `setSettingBool('page/title/show', show)`
|
|
2392
|
+
* - `setSettingString('page/title/fontFileUri', uri)`
|
|
2393
|
+
* - `setSettingBool('page/dimOutOfPageAreas', dim)`
|
|
2394
|
+
* @public
|
|
2395
|
+
*/
|
|
2396
|
+
export type Page = {
|
|
2397
|
+
/**
|
|
2398
|
+
* @deprecated
|
|
2399
|
+
* The settings that were configured here can be set via the
|
|
2400
|
+
* following EditorAPI settings:
|
|
2401
|
+
* - `setSettingBool('page/title/show', show)`
|
|
2402
|
+
* - `setSettingString('page/title/fontFileUri', uri)`
|
|
2403
|
+
*/
|
|
2404
|
+
title: {
|
|
2405
|
+
/**
|
|
2406
|
+
* @deprecated
|
|
2407
|
+
* Use the EditorAPI to set the title visibility:
|
|
2408
|
+
* - `setSettingBool('page/title/show', show)`
|
|
2409
|
+
*/
|
|
2410
|
+
show?: boolean;
|
|
2411
|
+
/**
|
|
2412
|
+
* @deprecated
|
|
2413
|
+
* Use the EditorAPI to set the title font:
|
|
2414
|
+
* - `setSettingString('page/title/fontFileUri', uri)`
|
|
2415
|
+
*/
|
|
2416
|
+
fontFileUri?: string;
|
|
2417
|
+
};
|
|
2418
|
+
/**
|
|
2419
|
+
* @deprecated
|
|
2420
|
+
* Use the EditorAPI to control the opacity of out-of-page areas:
|
|
2421
|
+
* - `setSettingBool('page/dimOutOfPageAreas', dim)`
|
|
2422
|
+
*/
|
|
2423
|
+
dimOutOfPageAreas?: boolean;
|
|
2424
|
+
};
|
|
2425
|
+
/**
|
|
2426
|
+
* @deprecated This type definition has been removed
|
|
2427
|
+
* @public
|
|
2428
|
+
*/
|
|
2429
|
+
export type Callbacks = {
|
|
2430
|
+
/**
|
|
2431
|
+
* @deprecated The logger has moved from `config.callbacks.logger` to `config.logger`
|
|
2432
|
+
*/
|
|
2433
|
+
log?: Logger;
|
|
2434
|
+
};
|
|
2298
2435
|
}
|
|
2299
|
-
export { ConfigTypes }
|
|
2300
2436
|
|
|
2301
2437
|
/** @public */
|
|
2302
2438
|
export declare interface Configuration {
|
|
2303
2439
|
baseURL: string;
|
|
2304
2440
|
license?: string;
|
|
2441
|
+
core: {
|
|
2442
|
+
baseURL: string;
|
|
2443
|
+
};
|
|
2444
|
+
logger: Logger;
|
|
2305
2445
|
featureFlags?: {
|
|
2306
2446
|
[flag: string]: boolean | string;
|
|
2307
2447
|
};
|
|
2308
2448
|
/**
|
|
2309
2449
|
* @deprecated Extensions have been superseded by AssetSources and should no longer be used.
|
|
2310
2450
|
*/
|
|
2311
|
-
extensions:
|
|
2312
|
-
|
|
2313
|
-
|
|
2451
|
+
extensions: {
|
|
2452
|
+
baseURL: string;
|
|
2453
|
+
entries: string[];
|
|
2454
|
+
};
|
|
2314
2455
|
presets: ConfigTypes.Presets;
|
|
2315
|
-
variables: ConfigTypes.Variables;
|
|
2316
|
-
callbacks: ConfigTypes.Callbacks;
|
|
2317
2456
|
/**
|
|
2318
|
-
*
|
|
2319
|
-
* the font from a extension pack including namespace, e.g.
|
|
2320
|
-
*
|
|
2321
|
-
* '//ly.img.cesdk.fonts/roboto_regular'
|
|
2322
|
-
*
|
|
2323
|
-
* If not configured the fallback font is used.
|
|
2457
|
+
* @deprecated This config key is not used anymore.
|
|
2324
2458
|
*/
|
|
2325
2459
|
defaultFont?: string;
|
|
2326
2460
|
/**
|
|
@@ -2337,6 +2471,47 @@ export declare interface Configuration {
|
|
|
2337
2471
|
* If not configured the fallback value is 'auto'.
|
|
2338
2472
|
*/
|
|
2339
2473
|
audioOutput?: 'auto' | 'none';
|
|
2474
|
+
/**
|
|
2475
|
+
* @deprecated This config key is not used anymore.
|
|
2476
|
+
* You can configure a role via `setSettingEnum('role', role)` in the
|
|
2477
|
+
* EditorAPI.
|
|
2478
|
+
*/
|
|
2479
|
+
role?: RoleString;
|
|
2480
|
+
/**
|
|
2481
|
+
* @deprecated This config key is not used anymore.
|
|
2482
|
+
* The settings that were configured here can be set via the
|
|
2483
|
+
* following EditorAPI settings:
|
|
2484
|
+
* - `setSettingBool('page/title/show', show)`
|
|
2485
|
+
* - `setSettingString('page/title/fontFileUri', uri)`
|
|
2486
|
+
* - `setSettingBool('page/dimOutOfPageAreas', dim)`
|
|
2487
|
+
*/
|
|
2488
|
+
page?: ConfigTypes.Page;
|
|
2489
|
+
/**
|
|
2490
|
+
* @deprecated This config key is not used anymore.
|
|
2491
|
+
* The settings that were configured here can be set via the BlockApi on the scene block
|
|
2492
|
+
* @public
|
|
2493
|
+
*/
|
|
2494
|
+
scene?: ConfigTypes.Scene;
|
|
2495
|
+
/**
|
|
2496
|
+
* @deprecated This config key is not used anymore.
|
|
2497
|
+
* Please use the asset api at `cesdk.engine.asset` instead of `config.assetSources`.
|
|
2498
|
+
*/
|
|
2499
|
+
assetSources?: ConfigTypes.AssetSources;
|
|
2500
|
+
/**
|
|
2501
|
+
* @deprecated This config key is not used anymore.
|
|
2502
|
+
* Please use the VariableAPI at `cesdk.engine.variable` instead of `config.variables`.
|
|
2503
|
+
*/
|
|
2504
|
+
variables?: ConfigTypes.Variables;
|
|
2505
|
+
/**
|
|
2506
|
+
* @deprecated This config key is not used anymore
|
|
2507
|
+
* The `config.callbacks.logger` configuration will be moved to `config.logger`
|
|
2508
|
+
*/
|
|
2509
|
+
callbacks?: {
|
|
2510
|
+
/**
|
|
2511
|
+
* @deprecated The `config.callbacks.logger` has moved to `config.logger`
|
|
2512
|
+
*/
|
|
2513
|
+
log?: Logger;
|
|
2514
|
+
};
|
|
2340
2515
|
}
|
|
2341
2516
|
|
|
2342
2517
|
/**
|
|
@@ -2348,11 +2523,6 @@ export declare interface Configuration {
|
|
|
2348
2523
|
*/
|
|
2349
2524
|
export declare type ContentFillMode = 'Crop' | 'Cover' | 'Contain';
|
|
2350
2525
|
|
|
2351
|
-
/** @public */
|
|
2352
|
-
declare type Core = {
|
|
2353
|
-
baseURL: string;
|
|
2354
|
-
};
|
|
2355
|
-
|
|
2356
2526
|
/**
|
|
2357
2527
|
* A headless implementation that just initializes & exposes the Document API
|
|
2358
2528
|
*
|
|
@@ -2381,7 +2551,7 @@ declare class CreativeEngine {
|
|
|
2381
2551
|
* @param config - An optional configuration object.
|
|
2382
2552
|
* @returns An engine instance.
|
|
2383
2553
|
*/
|
|
2384
|
-
static init(config?: Partial<Configuration>
|
|
2554
|
+
static init(config?: Partial<Configuration>): Promise<CreativeEngine>;
|
|
2385
2555
|
/**
|
|
2386
2556
|
* Convenience function that registers a set of asset sources containing our
|
|
2387
2557
|
* default assets. These are
|
|
@@ -2389,7 +2559,7 @@ declare class CreativeEngine {
|
|
|
2389
2559
|
* - `'ly.img.sticker'` - Various stickers
|
|
2390
2560
|
* - `'ly.img.vectorpath'` - Shapes and arrows
|
|
2391
2561
|
* - `'ly.img.filter.lut'` - LUT effects of various kinds.
|
|
2392
|
-
* - `'ly.img.filter.duotone'` -
|
|
2562
|
+
* - `'ly.img.filter.duotone'` - Color effects of various kinds.
|
|
2393
2563
|
*
|
|
2394
2564
|
* These assets are parsed from the IMG.LY CDN at \{\{base_url\}\}/<id>/content.json, where
|
|
2395
2565
|
* `base_url` defaults to 'https://cdn.img.ly/assets/v1'.
|
|
@@ -2444,7 +2614,7 @@ export declare type DefaultAssetSourceId = 'ly.img.sticker' | 'ly.img.vectorpath
|
|
|
2444
2614
|
/**
|
|
2445
2615
|
* @public
|
|
2446
2616
|
*/
|
|
2447
|
-
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';
|
|
2617
|
+
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';
|
|
2448
2618
|
|
|
2449
2619
|
/**
|
|
2450
2620
|
* A numerical identifier for a design block
|
|
@@ -2832,12 +3002,6 @@ declare interface ExportVideoOptions {
|
|
|
2832
3002
|
targetHeight: number;
|
|
2833
3003
|
}
|
|
2834
3004
|
|
|
2835
|
-
/** @public */
|
|
2836
|
-
declare type Extensions = {
|
|
2837
|
-
baseURL: string;
|
|
2838
|
-
entries: string[];
|
|
2839
|
-
};
|
|
2840
|
-
|
|
2841
3005
|
/**
|
|
2842
3006
|
* @public
|
|
2843
3007
|
*/
|
|
@@ -2887,17 +3051,6 @@ a: number
|
|
|
2887
3051
|
*/
|
|
2888
3052
|
export declare type GradientType = 'Linear' | 'Radial' | 'Conical';
|
|
2889
3053
|
|
|
2890
|
-
/**
|
|
2891
|
-
* An asset can be member of multiple groups. Groups have a semantic meaning
|
|
2892
|
-
* used to build and group UIs exploring the assets, e.g.sections in the
|
|
2893
|
-
* content library, or for things like topics in Unsplash for instance.
|
|
2894
|
-
*
|
|
2895
|
-
* Tags in comparison have are more loosely hold meaning used for extended
|
|
2896
|
-
* searching/filtering.
|
|
2897
|
-
* @public
|
|
2898
|
-
*/
|
|
2899
|
-
declare type Groups = string[];
|
|
2900
|
-
|
|
2901
3054
|
/**
|
|
2902
3055
|
* A hexadecimal color value (RGB or RGBA) that starts with a '#'
|
|
2903
3056
|
* @example #6686FF or #6686FFFF
|
|
@@ -2905,13 +3058,6 @@ declare type Groups = string[];
|
|
|
2905
3058
|
*/
|
|
2906
3059
|
export declare type HexColorString = string;
|
|
2907
3060
|
|
|
2908
|
-
/**
|
|
2909
|
-
* @deprecated This type definition has been moved
|
|
2910
|
-
* It can instead be imported directly as `HexColorString`
|
|
2911
|
-
* @public
|
|
2912
|
-
*/
|
|
2913
|
-
declare type HexColorString_2 = HexColorString;
|
|
2914
|
-
|
|
2915
3061
|
/**
|
|
2916
3062
|
* A numerical identifier for a history stack
|
|
2917
3063
|
* @public
|
|
@@ -2934,14 +3080,23 @@ export declare type HorizontalBlockAlignment = 'Left' | 'Right' | 'Center';
|
|
|
2934
3080
|
declare type Locale = string;
|
|
2935
3081
|
|
|
2936
3082
|
/** @public */
|
|
2937
|
-
export declare
|
|
3083
|
+
export declare interface Logger {
|
|
3084
|
+
(message: string, level?: LogLevel): void;
|
|
3085
|
+
}
|
|
2938
3086
|
|
|
2939
3087
|
/** @public */
|
|
2940
|
-
export declare
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
3088
|
+
export declare type LogLevel = 'Info' | 'Warning' | 'Error';
|
|
3089
|
+
|
|
3090
|
+
/**
|
|
3091
|
+
* @public
|
|
3092
|
+
* @deprecated Specifying log levels via `LogLevel.Info` has been deprecated.
|
|
3093
|
+
* Please use the desired LogLevel string directly.
|
|
3094
|
+
*/
|
|
3095
|
+
export declare const LogLevel: {
|
|
3096
|
+
readonly Info: "Info";
|
|
3097
|
+
readonly Warning: "Warning";
|
|
3098
|
+
readonly Error: "Error";
|
|
3099
|
+
};
|
|
2945
3100
|
|
|
2946
3101
|
/** @public */
|
|
2947
3102
|
declare enum MimeType_2 {
|
|
@@ -2956,63 +3111,6 @@ declare enum MimeType_2 {
|
|
|
2956
3111
|
}
|
|
2957
3112
|
export { MimeType_2 as MimeType }
|
|
2958
3113
|
|
|
2959
|
-
/**
|
|
2960
|
-
* Contains configuration keys that have been removed from the actual
|
|
2961
|
-
* configuration, but are still supported publicly
|
|
2962
|
-
* @public
|
|
2963
|
-
*/
|
|
2964
|
-
export declare interface OldConfiguration {
|
|
2965
|
-
/**
|
|
2966
|
-
* @deprecated This config key has been removed.
|
|
2967
|
-
* You can configure a role via `setSettingEnum('role', role)` in the
|
|
2968
|
-
* EditorAPI.
|
|
2969
|
-
*/
|
|
2970
|
-
role?: RoleString;
|
|
2971
|
-
/**
|
|
2972
|
-
* @deprecated This config key has been removed completely.
|
|
2973
|
-
* The settings that were configured here can be set via the
|
|
2974
|
-
* following EditorAPI settings:
|
|
2975
|
-
* - `setSettingBool('page/title/show', show)`
|
|
2976
|
-
* - `setSettingString('page/title/fontFileUri', uri)`
|
|
2977
|
-
* - `setSettingBool('page/title/dimOutOfPageAreas', dim)`
|
|
2978
|
-
*/
|
|
2979
|
-
page?: Page;
|
|
2980
|
-
/**
|
|
2981
|
-
* @deprecated This type definition has been removed
|
|
2982
|
-
* The settings that were configured here can be set via the
|
|
2983
|
-
* BlockApi on the scene block
|
|
2984
|
-
* @public
|
|
2985
|
-
*/
|
|
2986
|
-
scene?: Scene;
|
|
2987
|
-
}
|
|
2988
|
-
|
|
2989
|
-
/**
|
|
2990
|
-
* @deprecated This type definition has been removed
|
|
2991
|
-
* The settings that were configured here can be set via the
|
|
2992
|
-
* following EditorAPI settings:
|
|
2993
|
-
* - `setSettingBool('page/title/show', show)`
|
|
2994
|
-
* - `setSettingString('page/title/fontFileUri', uri)`
|
|
2995
|
-
* - `setSettingBool('page/title/dimOutOfPageAreas', dim)`
|
|
2996
|
-
* @public
|
|
2997
|
-
*/
|
|
2998
|
-
declare type Page = {
|
|
2999
|
-
title: {
|
|
3000
|
-
/**
|
|
3001
|
-
* Whether newly created pages should show a title.
|
|
3002
|
-
*/
|
|
3003
|
-
show?: boolean;
|
|
3004
|
-
/**
|
|
3005
|
-
* The font file to use to render the page titles.
|
|
3006
|
-
*/
|
|
3007
|
-
fontFileUri?: string;
|
|
3008
|
-
};
|
|
3009
|
-
/**
|
|
3010
|
-
* Whether the opacity of the region outside of all
|
|
3011
|
-
* pages should be reduced.
|
|
3012
|
-
*/
|
|
3013
|
-
dimOutOfPageAreas?: boolean;
|
|
3014
|
-
};
|
|
3015
|
-
|
|
3016
3114
|
/** @public */
|
|
3017
3115
|
export declare interface PageDuration {
|
|
3018
3116
|
pageId: DesignBlockId;
|
|
@@ -3021,21 +3119,6 @@ export declare interface PageDuration {
|
|
|
3021
3119
|
end: number;
|
|
3022
3120
|
}
|
|
3023
3121
|
|
|
3024
|
-
/**
|
|
3025
|
-
* @deprecated This type definition is unused and will be removed
|
|
3026
|
-
* @public
|
|
3027
|
-
*/
|
|
3028
|
-
declare type PageFormatDefinition = Preset & {
|
|
3029
|
-
width: number;
|
|
3030
|
-
height: number;
|
|
3031
|
-
/** @deprecated This property is unused and will be removed */
|
|
3032
|
-
dpi?: number;
|
|
3033
|
-
/** @deprecated This property is unused and will be removed */
|
|
3034
|
-
bleedMargin?: number;
|
|
3035
|
-
unit: 'px' | 'mm' | 'in' | DesignUnit;
|
|
3036
|
-
fixedOrientation?: boolean;
|
|
3037
|
-
};
|
|
3038
|
-
|
|
3039
3122
|
/**
|
|
3040
3123
|
* A color definition for the custom color palette.
|
|
3041
3124
|
* The RGB and CMYK components must all be specified in the range [0-1].
|
|
@@ -3052,62 +3135,20 @@ export declare type PaletteColor = HexColorString | RGBColor | RGBAColor | SpotC
|
|
|
3052
3135
|
*/
|
|
3053
3136
|
export declare type PositionMode = 'Absolute' | 'Percent' | 'Auto';
|
|
3054
3137
|
|
|
3055
|
-
/**
|
|
3056
|
-
* @deprecated This type definition is not used anymore and will be removed.
|
|
3057
|
-
* @public
|
|
3058
|
-
*/
|
|
3059
|
-
declare type Preset = {
|
|
3060
|
-
meta?: {
|
|
3061
|
-
default?: boolean;
|
|
3062
|
-
library?: string;
|
|
3063
|
-
categories?: string[];
|
|
3064
|
-
};
|
|
3065
|
-
};
|
|
3066
|
-
|
|
3067
|
-
/**
|
|
3068
|
-
* @deprecated This type definition will be removed.
|
|
3069
|
-
* If you need to reference this type in your code,
|
|
3070
|
-
* use `Configuration['presets']` instead of `ConfigTypes.Presets`.
|
|
3071
|
-
* @public
|
|
3072
|
-
*/
|
|
3073
|
-
declare type Presets = {
|
|
3074
|
-
/**
|
|
3075
|
-
* @deprecated The configuration option `presets.colors` does not exist anymore.
|
|
3076
|
-
*/
|
|
3077
|
-
colors?: {
|
|
3078
|
-
[id: string]: Color_2;
|
|
3079
|
-
};
|
|
3080
|
-
typefaces?: {
|
|
3081
|
-
[id: string]: TypefaceDefinition;
|
|
3082
|
-
};
|
|
3083
|
-
colorPalettes?: {
|
|
3084
|
-
[id: string]: ColorPaletteDefinition;
|
|
3085
|
-
};
|
|
3086
|
-
pageFormats?: {
|
|
3087
|
-
[id: string]: PageFormatDefinition;
|
|
3088
|
-
};
|
|
3089
|
-
templates?: {
|
|
3090
|
-
[id: string]: TemplateDefinition;
|
|
3091
|
-
};
|
|
3092
|
-
};
|
|
3093
|
-
|
|
3094
3138
|
/** @public */
|
|
3095
3139
|
export declare type PropertyType = 'Bool' | 'Int' | 'Float' | 'String' | 'Color' | 'Enum' | 'Struct' | 'Double';
|
|
3096
3140
|
|
|
3097
|
-
/**
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
*/
|
|
3107
|
-
perPage: number;
|
|
3108
|
-
/** The current page queried for paginated views. */
|
|
3109
|
-
page: number;
|
|
3141
|
+
/**
|
|
3142
|
+
* An open range.
|
|
3143
|
+
* @public
|
|
3144
|
+
* */
|
|
3145
|
+
declare interface Range_2 {
|
|
3146
|
+
/** The starting value of the range */
|
|
3147
|
+
from: number;
|
|
3148
|
+
/** The non-inclusive ending value of the range */
|
|
3149
|
+
to: number;
|
|
3110
3150
|
}
|
|
3151
|
+
export { Range_2 as Range }
|
|
3111
3152
|
|
|
3112
3153
|
/**
|
|
3113
3154
|
* @public
|
|
@@ -3138,31 +3179,6 @@ export declare interface RGBColor {
|
|
|
3138
3179
|
/** @public */
|
|
3139
3180
|
export declare type RoleString = 'Creator' | 'Adopter' | 'Viewer' | 'Presenter';
|
|
3140
3181
|
|
|
3141
|
-
/**
|
|
3142
|
-
* @deprecated This type definition is not used anymore and will be removed
|
|
3143
|
-
* in the future. The settings that were configured here can be set via the
|
|
3144
|
-
* BlockApi on the scene block:
|
|
3145
|
-
*
|
|
3146
|
-
* ```ts
|
|
3147
|
-
* engine.block.setInt(sceneId, 'scene/dpi', dpi);
|
|
3148
|
-
* engine.block.setInt(sceneId, 'scene/pixelScaleFactor', factor);
|
|
3149
|
-
* ```
|
|
3150
|
-
*
|
|
3151
|
-
* @public
|
|
3152
|
-
*/
|
|
3153
|
-
declare type Scene = {
|
|
3154
|
-
/**
|
|
3155
|
-
* @deprecated Setting this value has no effect. You can change the dpi of the
|
|
3156
|
-
* current scene via `engine.block.setInt(sceneId, 'scene/dpi', dpi)`
|
|
3157
|
-
*/
|
|
3158
|
-
dpi: number;
|
|
3159
|
-
/**
|
|
3160
|
-
* @deprecated Setting this value has no effect. You can change the dpi of the
|
|
3161
|
-
* current scene via `engine.block.setInt(sceneId, 'scene/pixelScaleFactor', * factor)`
|
|
3162
|
-
*/
|
|
3163
|
-
pixelScaleFactor: number;
|
|
3164
|
-
};
|
|
3165
|
-
|
|
3166
3182
|
/**
|
|
3167
3183
|
* @public
|
|
3168
3184
|
*/
|
|
@@ -3233,8 +3249,8 @@ export declare class SceneAPI {
|
|
|
3233
3249
|
/**
|
|
3234
3250
|
* Applies the contents of the given template scene to the currently loaded scene.
|
|
3235
3251
|
* This loads the template scene while keeping the design unit and page dimensions
|
|
3236
|
-
* of the current scene.
|
|
3237
|
-
*
|
|
3252
|
+
* of the current scene. The content of the pages is automatically adjusted to fit
|
|
3253
|
+
* the new dimensions.
|
|
3238
3254
|
* @param content - The template scene file contents, a base64 string.
|
|
3239
3255
|
* @returns A Promise that resolves once the template was applied or rejects if there was an error.
|
|
3240
3256
|
*/
|
|
@@ -3242,8 +3258,8 @@ export declare class SceneAPI {
|
|
|
3242
3258
|
/**
|
|
3243
3259
|
* Applies the contents of the given template scene to the currently loaded scene.
|
|
3244
3260
|
* This loads the template scene while keeping the design unit and page dimensions
|
|
3245
|
-
* of the current scene.
|
|
3246
|
-
*
|
|
3261
|
+
* of the current scene. The content of the pages is automatically adjusted to fit
|
|
3262
|
+
* the new dimensions.
|
|
3247
3263
|
* @param url - The url to the template scene file.
|
|
3248
3264
|
* @returns A Promise that resolves once the template was applied or rejects if there was an error.
|
|
3249
3265
|
*/
|
|
@@ -3416,24 +3432,15 @@ export declare type StrokeStyle = 'Dashed' | 'DashedRound' | 'Dotted' | 'LongDas
|
|
|
3416
3432
|
/** @public */
|
|
3417
3433
|
declare type Subscription = number;
|
|
3418
3434
|
|
|
3419
|
-
/** @public */
|
|
3420
|
-
declare type TemplateDefinition = {
|
|
3421
|
-
/** @deprecated The meta field is not used anymore */
|
|
3422
|
-
meta?: Preset['meta'];
|
|
3423
|
-
label: string;
|
|
3424
|
-
scene: string | URL | (() => Promise<string>);
|
|
3425
|
-
thumbnailURL?: string | URL;
|
|
3426
|
-
};
|
|
3427
|
-
|
|
3428
3435
|
/**
|
|
3429
3436
|
* @public
|
|
3430
3437
|
*/
|
|
3431
3438
|
export declare type TextCase = 'Normal' | 'Uppercase' | 'Lowercase' | 'Titlecase';
|
|
3432
3439
|
|
|
3433
3440
|
/** @public */
|
|
3434
|
-
declare type TypefaceDefinition = {
|
|
3441
|
+
export declare type TypefaceDefinition = {
|
|
3435
3442
|
/** @deprecated The meta field is not used anymore */
|
|
3436
|
-
meta?: Preset['meta'];
|
|
3443
|
+
meta?: ConfigTypes.Preset['meta'];
|
|
3437
3444
|
family: string;
|
|
3438
3445
|
fonts: {
|
|
3439
3446
|
fontURL: string;
|
|
@@ -3442,6 +3449,8 @@ declare type TypefaceDefinition = {
|
|
|
3442
3449
|
}[];
|
|
3443
3450
|
};
|
|
3444
3451
|
|
|
3452
|
+
declare type _TypefaceDefinition = TypefaceDefinition;
|
|
3453
|
+
|
|
3445
3454
|
/**
|
|
3446
3455
|
* @public
|
|
3447
3456
|
*/
|
|
@@ -3472,16 +3481,6 @@ export declare class VariableAPI {
|
|
|
3472
3481
|
remove(key: string): void;
|
|
3473
3482
|
}
|
|
3474
3483
|
|
|
3475
|
-
/** @public */
|
|
3476
|
-
declare type VariableDefinition = Preset & {
|
|
3477
|
-
value: string | number;
|
|
3478
|
-
};
|
|
3479
|
-
|
|
3480
|
-
/** @public */
|
|
3481
|
-
declare type Variables = {
|
|
3482
|
-
[id: string]: VariableDefinition;
|
|
3483
|
-
};
|
|
3484
|
-
|
|
3485
3484
|
/** @public */
|
|
3486
3485
|
export declare interface Vec2 {
|
|
3487
3486
|
x: number;
|