@cesdk/cesdk-js 1.77.0-rc.4 → 1.77.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
@@ -362,7 +362,7 @@ export { AssetDefinition }
362
362
  * Asset library entry IDs that can be used with asset library APIs.
363
363
  * Includes built-in entry IDs registered by the SDK, and allows custom entry IDs.
364
364
  */
365
- export declare type AssetEntryId = 'ly.img.templates' | 'ly.img.upload' | 'ly.img.image' | 'ly.img.video' | 'ly.img.audio' | 'ly.img.text' | 'ly.img.vector.shape' | 'ly.img.sticker' | 'ly.img.colors' | 'ly.img.typefaces' | 'ly.img.pagePresets' | 'ly.img.cropPresets' | 'ly.img.library.captionPresets' | 'ly.img.text.presets' | 'ly.img.animations' | 'ly.img.textAnimations' | (string & {});
365
+ export declare type AssetEntryId = 'ly.img.templates' | 'ly.img.upload' | 'ly.img.image' | 'ly.img.video' | 'ly.img.audio' | 'ly.img.text' | 'ly.img.vector.shape' | 'ly.img.sticker' | 'ly.img.colors' | 'ly.img.typefaces' | 'ly.img.pagePresets' | 'ly.img.cropPresets' | 'ly.img.library.captionPresets' | 'ly.img.animations' | 'ly.img.textAnimations' | (string & {});
366
366
 
367
367
  /**
368
368
  * @public
@@ -507,6 +507,19 @@ declare interface AssetLibraryEntryData {
507
507
  canRemove?: boolean | ((sourceId: string) => boolean);
508
508
  }
509
509
 
510
+ /**
511
+ * @public
512
+ * A reference to an asset library entry to display. Either an entry ID, or an object that names the
513
+ * entry plus source IDs to hide for this display only — for example a replace panel that shows a
514
+ * library with a non-applicable source hidden (the text "Styles" panel shows `ly.img.text` but
515
+ * hides its text-combinations source). This per-display `excludeSourceIds` is distinct from the
516
+ * entry's own `includeGroups`/`excludeGroups`, which apply wherever the entry is shown.
517
+ */
518
+ export declare type AssetLibraryEntryInput = AssetEntryId | {
519
+ entry: AssetEntryId;
520
+ excludeSourceIds?: string[];
521
+ };
522
+
510
523
  /**
511
524
  * @public
512
525
  * Interface representing the view configuration for an asset library entry.
@@ -1623,12 +1636,11 @@ export declare interface BuiltinTranslations {
1623
1636
  'libraries.ly.img.crop.presets.label': string;
1624
1637
  'libraries.ly.img.image.label': string;
1625
1638
  'libraries.ly.img.image.upload.label': string;
1626
- 'libraries.ly.img.text.presets.label': string;
1627
- 'libraries.ly.img.text.presets.textStyles.label': string;
1628
- 'libraries.ly.img.text.presets.paragraphDefault.label': string;
1629
- 'libraries.ly.img.text.presets.paragraphElegant.label': string;
1630
- 'libraries.ly.img.text.presets.paragraphModernTech.label': string;
1631
- 'libraries.ly.img.text.presets.curves.label': string;
1639
+ 'libraries.ly.img.text.default.label': string;
1640
+ 'libraries.ly.img.text.elegant.label': string;
1641
+ 'libraries.ly.img.text.modernTech.label': string;
1642
+ 'libraries.ly.img.text.styles.label': string;
1643
+ 'libraries.ly.img.text.curves.label': string;
1632
1644
  'libraries.ly.img.local.label': string;
1633
1645
  'libraries.ly.img.page.presets.facebook.label': string;
1634
1646
  'libraries.ly.img.page.presets.hd-video.label': string;
@@ -1668,10 +1680,8 @@ export declare interface BuiltinTranslations {
1668
1680
  'libraries.ly.img.templates.premium.professional.label': string;
1669
1681
  'libraries.ly.img.templates.premium.socials.label': string;
1670
1682
  'libraries.ly.img.text.components.label': string;
1671
- 'libraries.ly.img.text.headline.label': string;
1672
1683
  'libraries.ly.img.text.label': string;
1673
- 'libraries.ly.img.text.paragraph.label': string;
1674
- 'libraries.ly.img.text.title.label': string;
1684
+ 'libraries.ly.img.text.plain.label': string;
1675
1685
  'libraries.ly.img.textAnimations.ly.img.animations.in.label': string;
1676
1686
  'libraries.ly.img.textAnimations.ly.img.animations.label': string;
1677
1687
  'libraries.ly.img.textAnimations.ly.img.animations.loop.label': string;
@@ -5148,13 +5158,13 @@ export declare class KeyboardShortcutsAPI {
5148
5158
  */
5149
5159
  set(shortcut: KeyboardShortcut | KeyboardShortcut[]): () => void;
5150
5160
  /**
5151
- * List the keyboard shortcuts matching `options` (`keys` AND `scopes`,
5152
- * glob-matched). Both fields are required and must be non-empty; using `'*'`
5153
- * for both `keys` and `scopes` lists everything. Throws on an empty field.
5161
+ * List the keyboard shortcuts whose scope matches `options.scopes`
5162
+ * (glob-matched). `scopes` is required and must be non-empty; `{ scopes: '*' }`
5163
+ * lists everything. Throws on an empty `scopes`. To find a shortcut by chord
5164
+ * use `get`/`has`.
5154
5165
  * @public
5155
5166
  */
5156
5167
  list(options: {
5157
- keys: string | string[];
5158
5168
  scopes: ShortcutScopeId | ShortcutScopeId[];
5159
5169
  }): KeyboardShortcut[];
5160
5170
  /**
@@ -5217,7 +5227,7 @@ export declare class KeyboardShortcutsAPI {
5217
5227
  * @returns A disposer that stops listening.
5218
5228
  * @public
5219
5229
  */
5220
- setRoot(target?: ShortcutRoot): () => void;
5230
+ setRoot(target: ShortcutRoot): () => void;
5221
5231
  }
5222
5232
 
5223
5233
  /**
@@ -6055,7 +6065,8 @@ export declare interface RemoveResult<A extends UIArea = UIArea> {
6055
6065
 
6056
6066
  /**
6057
6067
  * @public
6058
- * Provides context for replacing asset library entries, including selected blocks and default entry IDs.
6068
+ * Provides context for replacing asset library entries, including the selected blocks and the
6069
+ * default entries (each may carry per-entry source exclusions).
6059
6070
  */
6060
6071
  export declare interface ReplaceAssetLibraryEntriesContext {
6061
6072
  selectedBlocks: {
@@ -6064,7 +6075,7 @@ export declare interface ReplaceAssetLibraryEntriesContext {
6064
6075
  fillType?: FillTypeLonghand;
6065
6076
  supportsShape?: boolean;
6066
6077
  }[];
6067
- defaultEntryIds: string[];
6078
+ defaultEntryIds: AssetLibraryEntryInput[];
6068
6079
  /**
6069
6080
  * The intent of the replacement operation.
6070
6081
  * - `'shape'`: User explicitly wants to replace the shape (e.g., from shape options panel)
@@ -8180,13 +8191,14 @@ export declare class UserInterfaceAPI {
8180
8191
  /**
8181
8192
  * Sets a function that determines which asset library entries to use for replacement operations.
8182
8193
  *
8183
- * The function receives context information (like selected blocks or default entry IDs)
8184
- * and returns the appropriate asset library entry IDs for replacement.
8194
+ * The function receives context (selected blocks, the default entries, the replace intent) and
8195
+ * returns the entries to show. Each entry is either an entry ID, or `{ entry, excludeSourceIds }`
8196
+ * to show that entry with specific sources hidden for this replacement only.
8185
8197
  *
8186
8198
  * @category Asset Library
8187
- * @param replaceAssetLibraryEntries - Function that receives context and returns an array of asset library entry IDs for replacement.
8199
+ * @param replaceAssetLibraryEntries - Function that receives context and returns the asset library entries (IDs, or `{ entry, excludeSourceIds }`) to show when replacing.
8188
8200
  */
8189
- setReplaceAssetLibraryEntries(replaceAssetLibraryEntries: (context: ReplaceAssetLibraryEntriesContext) => AssetEntryId[]): void;
8201
+ setReplaceAssetLibraryEntries(replaceAssetLibraryEntries: (context: ReplaceAssetLibraryEntriesContext) => AssetLibraryEntryInput[]): void;
8190
8202
  /**
8191
8203
  * Gets the current view style of the editor interface.
8192
8204
  *
@@ -8318,6 +8330,7 @@ declare namespace UserInterfaceElements {
8318
8330
  AssetLibraryEntryData,
8319
8331
  AssetLibraryEntry,
8320
8332
  AssetLibraryEntries,
8333
+ AssetLibraryEntryInput,
8321
8334
  ReplaceAssetLibraryEntriesContext,
8322
8335
  UserInterfaceElements_2 as UserInterfaceElements
8323
8336
  }