@cesdk/node 1.69.0-rc.0 → 1.69.0-rc.2

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.
@@ -1,781 +0,0 @@
1
- import type { AssetEntryId } from '@cesdk/cesdk-js';
2
- import type { EditorPlugin } from '@cesdk/cesdk-js';
3
- import type { EditorPluginContext } from '@cesdk/cesdk-js';
4
-
5
- /**
6
- * Known blur asset ID patterns for GLOB matching.
7
- */
8
- declare type BlurAssetId = 'ly.img.blur';
9
-
10
- /**
11
- * Provides blur effect assets for the Creative Editor SDK.
12
- * @public
13
- */
14
- export declare class BlurAssetSource implements EditorPlugin {
15
- private config;
16
- name: string;
17
- version: string;
18
- private addedAssetSourceIds;
19
- constructor(config?: BlurAssetSourceConfig);
20
- /**
21
- * Get asset library entry IDs for a given asset source ID.
22
- * Uses custom mapping if provided, otherwise falls back to default mapping.
23
- * Returns an array of library entry IDs.
24
- */
25
- private getAssetLibraryEntries;
26
- initialize({ engine, cesdk }: EditorPluginContext): Promise<void>;
27
- cleanup({ engine }: EditorPluginContext): void;
28
- }
29
-
30
- declare interface BlurAssetSourceConfig {
31
- baseURL?: string;
32
- /**
33
- * Include specific blur assets to load using GLOB patterns.
34
- * Supports wildcards: `*` (match any) and `?` (match one character).
35
- * @example ['ly.img.blur.*'] - Include all blur types
36
- * @example ['ly.img.blur.uniform'] - Include specific blur type
37
- */
38
- include?: (`${BlurAssetId}.*` | (string & {}))[];
39
- /**
40
- * Custom mapping of asset source ID to asset library entry IDs.
41
- * If not specified, default mapping will be used.
42
- */
43
- assetLibraryEntries?: Record<string, AssetEntryId | AssetEntryId[]>;
44
- }
45
-
46
- /**
47
- * Known caption preset asset ID patterns for GLOB matching.
48
- */
49
- declare type CaptionPresetAssetId = 'ly.img.caption.presets';
50
-
51
- /**
52
- * Provides caption preset assets for the Creative Editor SDK.
53
- * @public
54
- */
55
- export declare class CaptionPresetsAssetSource implements EditorPlugin {
56
- private config;
57
- name: string;
58
- version: string;
59
- private addedAssetSourceIds;
60
- constructor(config?: CaptionPresetsAssetSourceConfig);
61
- /**
62
- * Get asset library entry IDs for a given asset source ID.
63
- * Uses custom mapping if provided, otherwise falls back to default mapping.
64
- * Returns an array of library entry IDs.
65
- */
66
- private getAssetLibraryEntries;
67
- initialize({ engine, cesdk }: EditorPluginContext): Promise<void>;
68
- cleanup({ engine }: EditorPluginContext): void;
69
- }
70
-
71
- declare interface CaptionPresetsAssetSourceConfig {
72
- baseURL?: string;
73
- customFetchImpl?: typeof fetch;
74
- /**
75
- * Include specific caption preset assets to load using GLOB patterns.
76
- * Supports wildcards: `*` (match any) and `?` (match one character).
77
- * @example ['ly.img.caption.presets.*'] - Include all caption presets
78
- * @example ['ly.img.caption.presets.glow'] - Include specific preset
79
- */
80
- include?: (`${CaptionPresetAssetId}.*` | (string & {}))[];
81
- /**
82
- * Custom mapping of asset source ID to asset library entry IDs.
83
- * If not specified, default mapping will be used.
84
- */
85
- assetLibraryEntries?: Record<string, AssetEntryId | AssetEntryId[]>;
86
- }
87
-
88
- /**
89
- * Known color palette asset ID patterns for GLOB matching.
90
- */
91
- declare type ColorPaletteAssetId = 'ly.img.color.palette';
92
-
93
- /**
94
- * Provides color palette assets for the Creative Editor SDK.
95
- * @public
96
- */
97
- export declare class ColorPaletteAssetSource implements EditorPlugin {
98
- private config;
99
- name: string;
100
- version: string;
101
- private addedAssetSourceIds;
102
- constructor(config?: ColorPaletteAssetSourceConfig);
103
- /**
104
- * Get asset library entry IDs for a given asset source ID.
105
- * Uses custom mapping if provided, otherwise falls back to default mapping.
106
- * Returns an array of library entry IDs.
107
- */
108
- private getAssetLibraryEntries;
109
- initialize({ engine, cesdk }: EditorPluginContext): Promise<void>;
110
- cleanup({ engine }: EditorPluginContext): void;
111
- }
112
-
113
- declare interface ColorPaletteAssetSourceConfig {
114
- baseURL?: string;
115
- /**
116
- * Include specific color palette assets to load using GLOB patterns.
117
- * Supports wildcards: `*` (match any) and `?` (match one character).
118
- * @example ['ly.img.color.palette.*'] - Include all color palettes
119
- * @example ['ly.img.color.palette.coral'] - Include specific palette
120
- */
121
- include?: (`${ColorPaletteAssetId}.*` | (string & {}))[];
122
- /**
123
- * Custom mapping of asset source ID to asset library entry IDs.
124
- * If not specified, default mapping will be used.
125
- */
126
- assetLibraryEntries?: Record<string, AssetEntryId | AssetEntryId[]>;
127
- }
128
-
129
- /**
130
- * Known crop preset asset ID patterns for GLOB matching.
131
- */
132
- declare type CropPresetAssetId = 'ly.img.crop.presets' | 'ly.img.crop.presets.fixed-ratio';
133
-
134
- /**
135
- * Provides crop preset assets for the Creative Editor SDK.
136
- * @public
137
- */
138
- export declare class CropPresetsAssetSource implements EditorPlugin {
139
- private config;
140
- name: string;
141
- version: string;
142
- private addedAssetSourceIds;
143
- constructor(config?: CropPresetsAssetSourceConfig);
144
- /**
145
- * Get asset library entry IDs for a given asset source ID.
146
- * Uses custom mapping if provided, otherwise falls back to default mapping.
147
- * Returns an array of library entry IDs.
148
- */
149
- private getAssetLibraryEntries;
150
- initialize({ engine, cesdk }: EditorPluginContext): Promise<void>;
151
- cleanup({ engine }: EditorPluginContext): void;
152
- }
153
-
154
- declare interface CropPresetsAssetSourceConfig {
155
- baseURL?: string;
156
- /**
157
- * Include specific crop preset assets to load using GLOB patterns.
158
- * Supports wildcards: `*` (match any) and `?` (match one character).
159
- * @example ['ly.img.crop.presets.*'] - Include all crop presets
160
- * @example ['ly.img.crop.presets.fixed-ratio.*'] - Include all fixed ratio presets
161
- * @example ['ly.img.crop.presets.fixed-ratio.16_9'] - Include specific ratio
162
- */
163
- include?: (`${CropPresetAssetId}.*` | (string & {}))[];
164
- /**
165
- * Custom mapping of asset source ID to asset library entry IDs.
166
- * If not specified, default mapping will be used.
167
- */
168
- assetLibraryEntries?: Record<string, AssetEntryId | AssetEntryId[]>;
169
- }
170
-
171
- /**
172
- * Known demo asset source ID patterns for GLOB matching.
173
- * Templates have subcategories for better filtering.
174
- */
175
- declare type DemoAssetSourceId = 'ly.img.audio' | 'ly.img.video' | 'ly.img.image' | 'ly.img.templates' | 'ly.img.templates.blank' | 'ly.img.templates.social' | 'ly.img.templates.print' | 'ly.img.templates.presentation' | 'ly.img.templates.video';
176
-
177
- /**
178
- * Provides demo assets and templates for testing and development.
179
- * @public
180
- */
181
- export declare class DemoAssetSources implements EditorPlugin {
182
- private config;
183
- name: string;
184
- version: string;
185
- private addedAssetSourceIds;
186
- constructor(config?: DemoAssetSourcesConfig);
187
- /**
188
- * Convert a GLOB pattern to a RegExp.
189
- * Supports: * (any chars), ? (single char), and literal matching.
190
- */
191
- private globToRegex;
192
- /**
193
- * Check if any GLOB pattern could match assets from a given source.
194
- * A source should be loaded if any matcher pattern matches the source ID or starts with it.
195
- *
196
- * Examples for source 'ly.img.templates':
197
- * - 'ly.img.templates' → matches (exact source ID)
198
- * - 'ly.img.templates.*' → matches (starts with source ID)
199
- * - '*.templates.*' → matches (pattern matches source ID)
200
- * - 'ly.img.image.*' → no match
201
- */
202
- private sourceMatchesAnyPattern;
203
- /**
204
- * Filter asset sources based on GLOB matcher patterns.
205
- * Returns which source IDs should be loaded based on pattern matching.
206
- */
207
- private filterAssetSources;
208
- /**
209
- * Filter matchers to only include patterns relevant to a specific source.
210
- * A matcher is relevant if it matches the source ID or starts with it.
211
- *
212
- * Examples for source 'ly.img.templates':
213
- * - 'ly.img.templates' → relevant (exact match)
214
- * - 'ly.img.templates.*' → relevant (starts with source ID)
215
- * - '*.templates.*' → relevant (pattern matches source ID)
216
- * - 'ly.img.image.*' → not relevant
217
- */
218
- private filterMatchersForSource;
219
- /**
220
- * Get asset library entry IDs for a given asset source ID.
221
- * Uses custom mapping if provided, otherwise falls back to default mapping.
222
- * Returns an array of library entry IDs.
223
- */
224
- private getAssetLibraryEntries;
225
- initialize({ engine, cesdk }: EditorPluginContext): Promise<void>;
226
- cleanup({ engine }: EditorPluginContext): void;
227
- }
228
-
229
- declare interface DemoAssetSourcesConfig {
230
- baseURL?: string;
231
- /**
232
- * Include specific asset sources and assets to load using GLOB patterns.
233
- * Can use exact source IDs or patterns with wildcards:
234
- * - Exact: 'ly.img.image' (matches source)
235
- * - Pattern: 'ly.img.image.*' (matches assets from source)
236
- * - Wildcard: 'ly.img.*' (matches all ly.img sources)
237
- * Supports wildcards: * (any characters), ? (single character)
238
- */
239
- include?: (`${DemoAssetSourceId}.*` | (string & {}))[];
240
- /**
241
- * Custom mapping of asset source IDs to asset library entry IDs.
242
- * Key: asset source ID (e.g., 'ly.img.image')
243
- * Value: asset library entry ID or array of IDs (e.g., 'ly.img.image' or ['ly.img.image', 'custom.library'])
244
- * If not specified, default mappings will be used.
245
- */
246
- assetLibraryEntries?: Record<DemoAssetSourceId, AssetEntryId | AssetEntryId[]>;
247
- }
248
-
249
- /**
250
- * Known effect asset ID patterns for GLOB matching.
251
- */
252
- declare type EffectAssetId = 'ly.img.effect';
253
-
254
- /**
255
- * Provides visual effect assets for the Creative Editor SDK.
256
- * @public
257
- */
258
- export declare class EffectsAssetSource implements EditorPlugin {
259
- private config;
260
- name: string;
261
- version: string;
262
- private addedAssetSourceIds;
263
- constructor(config?: EffectsAssetSourceConfig);
264
- /**
265
- * Get asset library entry IDs for a given asset source ID.
266
- * Uses custom mapping if provided, otherwise falls back to default mapping.
267
- * Returns an array of library entry IDs.
268
- */
269
- private getAssetLibraryEntries;
270
- initialize({ engine, cesdk }: EditorPluginContext): Promise<void>;
271
- cleanup({ engine }: EditorPluginContext): void;
272
- }
273
-
274
- declare interface EffectsAssetSourceConfig {
275
- baseURL?: string;
276
- /**
277
- * Include specific effect assets to load using GLOB patterns.
278
- * Supports wildcards: `*` (match any) and `?` (match one character).
279
- * @example ['ly.img.effect.*'] - Include all effects
280
- * @example ['ly.img.effect.pixelize'] - Include specific effect
281
- */
282
- include?: (`${EffectAssetId}.*` | (string & {}))[];
283
- /**
284
- * Custom mapping of asset source ID to asset library entry IDs.
285
- * If not specified, default mapping will be used.
286
- */
287
- assetLibraryEntries?: Record<string, AssetEntryId | AssetEntryId[]>;
288
- }
289
-
290
- /**
291
- * Known filter asset ID patterns for GLOB matching.
292
- * Organized by filter categories for easy selection.
293
- */
294
- declare type FilterAssetId = 'ly.img.filter' | 'ly.img.filter.duotone' | 'ly.img.filter.lut' | 'ly.img.filter.lut.bw' | 'ly.img.filter.lut.retro' | 'ly.img.filter.lut.analog' | 'ly.img.filter.lut.winter' | 'ly.img.filter.lut.summer' | 'ly.img.filter.lut.legacy';
295
-
296
- /**
297
- * Provides filter assets for the Creative Editor SDK.
298
- * @public
299
- */
300
- export declare class FiltersAssetSource implements EditorPlugin {
301
- private config;
302
- name: string;
303
- version: string;
304
- private addedAssetSourceIds;
305
- constructor(config?: FiltersAssetSourceConfig);
306
- /**
307
- * Get asset library entry IDs for a given asset source ID.
308
- * Uses custom mapping if provided, otherwise falls back to default mapping.
309
- * Returns an array of library entry IDs.
310
- */
311
- private getAssetLibraryEntries;
312
- initialize({ engine, cesdk }: EditorPluginContext): Promise<void>;
313
- cleanup({ engine }: EditorPluginContext): void;
314
- }
315
-
316
- declare interface FiltersAssetSourceConfig {
317
- baseURL?: string;
318
- /**
319
- * Include specific filter assets to load using GLOB patterns.
320
- * Supports wildcards: `*` (match any) and `?` (match one character).
321
- * @example ['ly.img.filter.*'] - Include all filters
322
- * @example ['ly.img.filter.duotone.*'] - Include all duotone filters
323
- * @example ['ly.img.filter.lut.winter.*'] - Include all winter LUT filters
324
- * @example ['ly.img.filter.lut.*'] - Include all LUT filters
325
- */
326
- include?: (`${FilterAssetId}.*` | (string & {}))[];
327
- /**
328
- * Custom mapping of asset source ID to asset library entry IDs.
329
- * If not specified, default mapping will be used.
330
- */
331
- assetLibraryEntries?: Record<string, AssetEntryId | AssetEntryId[]>;
332
- }
333
-
334
- /**
335
- * Known page preset asset ID patterns for GLOB matching.
336
- * Organized by platform and print categories.
337
- */
338
- declare type PagePresetAssetId = 'ly.img.page.presets' | 'ly.img.page.presets.facebook' | 'ly.img.page.presets.facebook.video' | 'ly.img.page.presets.instagram' | 'ly.img.page.presets.linkedin' | 'ly.img.page.presets.pinterest' | 'ly.img.page.presets.print' | 'ly.img.page.presets.print.brochure' | 'ly.img.page.presets.print.business_card' | 'ly.img.page.presets.print.flyer' | 'ly.img.page.presets.print.iso' | 'ly.img.page.presets.print.na' | 'ly.img.page.presets.print.postcard' | 'ly.img.page.presets.print.poster' | 'ly.img.page.presets.tiktok' | 'ly.img.page.presets.tiktok.video' | 'ly.img.page.presets.video' | 'ly.img.page.presets.x' | 'ly.img.page.presets.x.video' | 'ly.img.page.presets.youtube';
339
-
340
- /**
341
- * Provides page layout preset assets for the Creative Editor SDK.
342
- * @public
343
- */
344
- export declare class PagePresetsAssetSource implements EditorPlugin {
345
- private config;
346
- name: string;
347
- version: string;
348
- private addedAssetSourceIds;
349
- constructor(config?: PagePresetsAssetSourceConfig);
350
- /**
351
- * Get asset library entry IDs for a given asset source ID.
352
- * Uses custom mapping if provided, otherwise falls back to default mapping.
353
- * Returns an array of library entry IDs.
354
- */
355
- private getAssetLibraryEntries;
356
- initialize({ engine, cesdk }: EditorPluginContext): Promise<void>;
357
- cleanup({ engine }: EditorPluginContext): void;
358
- }
359
-
360
- declare interface PagePresetsAssetSourceConfig {
361
- baseURL?: string;
362
- /**
363
- * Include specific page preset assets to load using GLOB patterns.
364
- * Supports wildcards: `*` (match any) and `?` (match one character).
365
- * @example ['ly.img.page.presets.*'] - Include all page presets
366
- * @example ['ly.img.page.presets.instagram.*'] - Include all Instagram presets
367
- * @example ['ly.img.page.presets.print.iso.a4.*'] - Include all A4 sizes
368
- * @example ['ly.img.page.presets.print.iso.*'] - Include all ISO print sizes
369
- */
370
- include?: (`${PagePresetAssetId}.*` | (string & {}))[];
371
- /**
372
- * Custom mapping of asset source ID to asset library entry IDs.
373
- * If not specified, default mapping will be used.
374
- */
375
- assetLibraryEntries?: Record<string, AssetEntryId | AssetEntryId[]>;
376
- }
377
-
378
- /**
379
- * Known sticker asset ID patterns for GLOB matching.
380
- * Organized by sticker categories.
381
- */
382
- declare type StickerAssetId = 'ly.img.sticker' | 'ly.img.sticker.3Dstickers' | 'ly.img.sticker.craft' | 'ly.img.sticker.doodle' | 'ly.img.sticker.emoji' | 'ly.img.sticker.emoticons' | 'ly.img.sticker.hand';
383
-
384
- /**
385
- * Provides sticker assets for the Creative Editor SDK.
386
- * @public
387
- */
388
- export declare class StickerAssetSource implements EditorPlugin {
389
- private config;
390
- name: string;
391
- version: string;
392
- private addedAssetSourceIds;
393
- constructor(config?: StickerAssetSourceConfig);
394
- /**
395
- * Get asset library entry IDs for a given asset source ID.
396
- * Uses custom mapping if provided, otherwise falls back to default mapping.
397
- * Returns an array of library entry IDs.
398
- */
399
- private getAssetLibraryEntries;
400
- initialize({ engine, cesdk }: EditorPluginContext): Promise<void>;
401
- cleanup({ engine }: EditorPluginContext): void;
402
- }
403
-
404
- declare interface StickerAssetSourceConfig {
405
- baseURL?: string;
406
- /**
407
- * Include specific sticker assets to load using GLOB patterns.
408
- * Supports wildcards: `*` (match any) and `?` (match one character).
409
- * @example ['ly.img.sticker.*'] - Include all stickers
410
- * @example ['ly.img.sticker.emoji.*'] - Include all emoji stickers
411
- * @example ['ly.img.sticker.craft.*'] - Include all craft stickers
412
- */
413
- include?: (`${StickerAssetId}.*` | (string & {}))[];
414
- /**
415
- * Custom mapping of asset source ID to asset library entry IDs.
416
- * If not specified, default mapping will be used.
417
- */
418
- assetLibraryEntries?: Record<string, AssetEntryId | AssetEntryId[]>;
419
- }
420
-
421
- /**
422
- * Known text asset ID patterns for GLOB matching.
423
- * Includes title, headline, and paragraph text presets.
424
- */
425
- declare type TextAssetId = 'ly.img.text';
426
-
427
- /**
428
- * Provides text preset assets for the Creative Editor SDK.
429
- * @public
430
- */
431
- export declare class TextAssetSource implements EditorPlugin {
432
- private config;
433
- name: string;
434
- version: string;
435
- private addedAssetSourceIds;
436
- constructor(config?: TextAssetSourceConfig);
437
- /**
438
- * Get asset library entry IDs for a given asset source ID.
439
- * Uses custom mapping if provided, otherwise falls back to default mapping.
440
- * Returns an array of library entry IDs.
441
- */
442
- private getAssetLibraryEntries;
443
- initialize({ engine, cesdk }: EditorPluginContext): Promise<void>;
444
- cleanup({ engine }: EditorPluginContext): void;
445
- }
446
-
447
- declare interface TextAssetSourceConfig {
448
- baseURL?: string;
449
- /**
450
- * Include specific text assets to load using GLOB patterns.
451
- * Supports wildcards: `*` (match any) and `?` (match one character).
452
- * @example ['ly.img.text.*'] - Include all text presets
453
- */
454
- include?: (`${TextAssetId}.*` | (string & {}))[];
455
- /**
456
- * Custom mapping of asset source ID to asset library entry IDs.
457
- * If not specified, default mapping will be used.
458
- */
459
- assetLibraryEntries?: Record<string, AssetEntryId | AssetEntryId[]>;
460
- }
461
-
462
- /**
463
- * Known text component asset ID patterns for GLOB matching.
464
- */
465
- declare type TextComponentAssetId = 'ly.img.text.components';
466
-
467
- /**
468
- * Provides text component assets for the Creative Editor SDK.
469
- * @public
470
- */
471
- export declare class TextComponentAssetSource implements EditorPlugin {
472
- private config;
473
- name: string;
474
- version: string;
475
- private addedAssetSourceIds;
476
- constructor(config?: TextComponentAssetSourceConfig);
477
- /**
478
- * Get asset library entry IDs for a given asset source ID.
479
- * Uses custom mapping if provided, otherwise falls back to default mapping.
480
- * Returns an array of library entry IDs.
481
- */
482
- private getAssetLibraryEntries;
483
- initialize({ engine, cesdk }: EditorPluginContext): Promise<void>;
484
- cleanup({ engine }: EditorPluginContext): void;
485
- }
486
-
487
- declare interface TextComponentAssetSourceConfig {
488
- baseURL?: string;
489
- /**
490
- * Include specific text component assets to load using GLOB patterns.
491
- * Supports wildcards: `*` (match any) and `?` (match one character).
492
- * @example ['ly.img.text.components.*'] - Include all text components
493
- * @example ['ly.img.text.components.glow'] - Include specific component
494
- */
495
- include?: (`${TextComponentAssetId}.*` | (string & {}))[];
496
- /**
497
- * Custom mapping of asset source ID to asset library entry IDs.
498
- * If not specified, default mapping will be used.
499
- */
500
- assetLibraryEntries?: Record<string, AssetEntryId | AssetEntryId[]>;
501
- }
502
-
503
- /**
504
- * Known typeface asset ID patterns for GLOB matching.
505
- */
506
- declare type TypefaceAssetId = 'ly.img.typeface';
507
-
508
- /**
509
- * Provides typeface and font assets for the Creative Editor SDK.
510
- * @public
511
- */
512
- export declare class TypefaceAssetSource implements EditorPlugin {
513
- private config;
514
- name: string;
515
- version: string;
516
- private addedAssetSourceIds;
517
- constructor(config?: TypefaceAssetSourceConfig);
518
- /**
519
- * Get asset library entry IDs for a given asset source ID.
520
- * Uses custom mapping if provided, otherwise falls back to default mapping.
521
- * Returns an array of library entry IDs.
522
- */
523
- private getAssetLibraryEntries;
524
- initialize({ engine, cesdk }: EditorPluginContext): Promise<void>;
525
- cleanup({ engine }: EditorPluginContext): void;
526
- }
527
-
528
- declare interface TypefaceAssetSourceConfig {
529
- baseURL?: string;
530
- /**
531
- * Include specific typeface assets to load using GLOB patterns.
532
- * Supports wildcards: `*` (match any) and `?` (match one character).
533
- * @example ['ly.img.typeface.*'] - Include all typefaces
534
- * @example ['ly.img.typeface.roboto'] - Include specific font
535
- */
536
- include?: (`${TypefaceAssetId}.*` | (string & {}))[];
537
- /**
538
- * Custom mapping of asset source ID to asset library entry IDs.
539
- * If not specified, default mapping will be used.
540
- */
541
- assetLibraryEntries?: Record<string, AssetEntryId | AssetEntryId[]>;
542
- }
543
-
544
- /**
545
- * Known upload asset source IDs for pattern matching.
546
- */
547
- declare type UploadAssetSourceId = 'ly.img.image.upload' | 'ly.img.video.upload' | 'ly.img.audio.upload';
548
-
549
- /**
550
- * Provides local upload sources for images, videos, audio, and custom file types.
551
- *
552
- * This plugin uses a unified `include` config that handles filtering, customization,
553
- * and adding sources based on what you provide:
554
- * - **Additive mode**: Customize/add to all defaults (when only objects provided)
555
- * - **Explicit mode**: Choose which defaults to include (when any string provided)
556
- *
557
- * @example Basic usage (all defaults)
558
- * ```ts
559
- * plugins: [new UploadAssetSources()]
560
- * ```
561
- *
562
- * @example Additive: Customize one default, keep all others
563
- * ```ts
564
- * plugins: [
565
- * new UploadAssetSources({
566
- * include: [
567
- * {
568
- * id: 'ly.img.image.upload',
569
- * mimeTypes: ['image/jpeg', 'image/png']
570
- * }
571
- * ]
572
- * })
573
- * ]
574
- * // Result: image (customized), video (default), audio (default)
575
- * ```
576
- *
577
- * @example Explicit: Only specific defaults
578
- * ```ts
579
- * plugins: [
580
- * new UploadAssetSources({
581
- * include: ['ly.img.image.upload', 'ly.img.video.upload']
582
- * })
583
- * ]
584
- * // Result: image (default), video (default), audio (excluded)
585
- * ```
586
- *
587
- * @example Explicit: Include and customize
588
- * ```ts
589
- * plugins: [
590
- * new UploadAssetSources({
591
- * include: [
592
- * 'ly.img.image.upload',
593
- * {
594
- * id: 'ly.img.video.upload',
595
- * mimeTypes: ['video/mp4', 'video/webm']
596
- * }
597
- * ]
598
- * })
599
- * ]
600
- * // Result: image (default), video (customized), audio (excluded)
601
- * ```
602
- *
603
- * @example Additive: Add custom source with all defaults
604
- * ```ts
605
- * plugins: [
606
- * new UploadAssetSources({
607
- * include: [
608
- * {
609
- * id: 'custom.pdf.upload',
610
- * mimeTypes: ['application/pdf'],
611
- * assetLibraryEntries: 'custom.documents'
612
- * }
613
- * ]
614
- * })
615
- * ]
616
- * // Result: image (default), video (default), audio (default), pdf (custom)
617
- * ```
618
- *
619
- * @public
620
- */
621
- export declare class UploadAssetSources implements EditorPlugin {
622
- private config;
623
- name: string;
624
- version: string;
625
- private addedAssetSourceIds;
626
- constructor(config?: UploadAssetSourcesConfig);
627
- /**
628
- * Check if the include config is in explicit mode (contains any strings).
629
- */
630
- private isExplicitMode;
631
- /**
632
- * Get the IDs that should be explicitly included (from string entries).
633
- */
634
- private getExplicitIncludes;
635
- /**
636
- * Get the customizations/additions from object entries.
637
- */
638
- private getCustomizations;
639
- /**
640
- * Get asset library entries for a source.
641
- */
642
- private getAssetLibraryEntries;
643
- initialize({ engine, cesdk }: EditorPluginContext): Promise<void>;
644
- cleanup({ engine }: EditorPluginContext): void;
645
- }
646
-
647
- /**
648
- * Configuration for the UploadAssetSources plugin.
649
- */
650
- declare interface UploadAssetSourcesConfig {
651
- /**
652
- * Include upload sources - filter, customize, or add sources.
653
- *
654
- * Supports two modes based on what you provide:
655
- *
656
- * **Additive Mode** (when all entries are objects):
657
- * - All default sources are included
658
- * - Objects customize existing defaults or add new custom sources
659
- *
660
- * **Explicit Mode** (when any string is present):
661
- * - Only explicitly listed sources are included
662
- * - Strings include default sources as-is
663
- * - Objects customize defaults or add custom sources
664
- *
665
- * @example Additive: Customize one default, keep all others
666
- * ```ts
667
- * include: [
668
- * {
669
- * id: 'ly.img.image.upload',
670
- * mimeTypes: ['image/jpeg', 'image/png'] // Customize this one
671
- * }
672
- * // ly.img.video.upload and ly.img.audio.upload still included with defaults
673
- * ]
674
- * ```
675
- *
676
- * @example Explicit: Only include specific defaults
677
- * ```ts
678
- * include: [
679
- * 'ly.img.image.upload', // Include with defaults
680
- * 'ly.img.video.upload' // Include with defaults
681
- * // ly.img.audio.upload is excluded
682
- * ]
683
- * ```
684
- *
685
- * @example Explicit: Include and customize
686
- * ```ts
687
- * include: [
688
- * 'ly.img.image.upload', // Include with defaults
689
- * {
690
- * id: 'ly.img.video.upload',
691
- * mimeTypes: ['video/mp4', 'video/webm'] // Customize this one
692
- * }
693
- * // ly.img.audio.upload is excluded
694
- * ]
695
- * ```
696
- *
697
- * @example Additive: Add custom source
698
- * ```ts
699
- * include: [
700
- * {
701
- * id: 'custom.pdf.upload',
702
- * mimeTypes: ['application/pdf'],
703
- * assetLibraryEntries: 'custom.documents'
704
- * }
705
- * // All defaults still included
706
- * ]
707
- * ```
708
- */
709
- include?: (UploadAssetSourceId | UploadSourceConfig)[];
710
- }
711
-
712
- /**
713
- * Configuration for a single upload asset source.
714
- * Can be used to create new custom sources or extend/customize default sources.
715
- */
716
- declare interface UploadSourceConfig {
717
- /**
718
- * The asset source ID (e.g., 'ly.img.image.upload').
719
- * If this ID matches a default source, it will extend/customize that default.
720
- */
721
- id: string;
722
- /**
723
- * MIME types accepted by this upload source.
724
- * When extending a default source, this completely replaces the default MIME types.
725
- */
726
- mimeTypes: string[];
727
- /**
728
- * Asset library entry IDs where this source should appear.
729
- * Can be a single ID or an array of IDs.
730
- * When extending a default source, this replaces the default library entries.
731
- * @example 'ly.img.image'
732
- * @example ['ly.img.image', 'ly.img.upload']
733
- */
734
- assetLibraryEntries?: AssetEntryId | AssetEntryId[];
735
- }
736
-
737
- /**
738
- * Known vector shape asset ID patterns for GLOB matching.
739
- * Shapes are organized in groups: filled, gradient, image, and outline.
740
- */
741
- declare type VectorShapeAssetId = 'ly.img.vector.shape' | 'ly.img.vector.shape.filled' | 'ly.img.vector.shape.filled.abstract' | 'ly.img.vector.shape.gradient' | 'ly.img.vector.shape.gradient.abstract' | 'ly.img.vector.shape.image' | 'ly.img.vector.shape.image.abstract' | 'ly.img.vector.shape.outline' | 'ly.img.vector.shape.outline.abstract';
742
-
743
- /**
744
- * Provides vector shape assets for the Creative Editor SDK.
745
- * @public
746
- */
747
- export declare class VectorShapeAssetSource implements EditorPlugin {
748
- private config;
749
- name: string;
750
- version: string;
751
- private addedAssetSourceIds;
752
- constructor(config?: VectorShapeAssetSourceConfig);
753
- /**
754
- * Get asset library entry IDs for a given asset source ID.
755
- * Uses custom mapping if provided, otherwise falls back to default mapping.
756
- * Returns an array of library entry IDs.
757
- */
758
- private getAssetLibraryEntries;
759
- initialize({ engine, cesdk }: EditorPluginContext): Promise<void>;
760
- cleanup({ engine }: EditorPluginContext): void;
761
- }
762
-
763
- declare interface VectorShapeAssetSourceConfig {
764
- baseURL?: string;
765
- /**
766
- * Include specific vector shape assets to load using GLOB patterns.
767
- * Supports wildcards: `*` (match any) and `?` (match one character).
768
- * @example ['ly.img.vector.shape.*'] - Include all vector shapes
769
- * @example ['ly.img.vector.shape.filled.*'] - Include all filled shapes
770
- * @example ['ly.img.vector.shape.gradient.abstract.*'] - Include all gradient abstract shapes
771
- * @example ['ly.img.vector.shape.filled.star'] - Include specific filled star shape
772
- */
773
- include?: (`${VectorShapeAssetId}.*` | (string & {}))[];
774
- /**
775
- * Custom mapping of asset source ID to asset library entry IDs.
776
- * If not specified, default mapping will be used.
777
- */
778
- assetLibraryEntries?: Record<string, AssetEntryId | AssetEntryId[]>;
779
- }
780
-
781
- export { }