@cesdk/cesdk-js 1.69.0-nightly.20260129 → 1.69.0-nightly.20260131

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
@@ -288,6 +288,13 @@ export { AnimationTypeLonghand }
288
288
 
289
289
  export { AnimationTypeShorthand }
290
290
 
291
+ /**
292
+ * Union type for location options that handles canvas bar's special `at` requirement.
293
+ *
294
+ * @public
295
+ */
296
+ export declare type AnyUILocationOptions<A extends UIArea = UIArea> = A extends 'ly.img.canvas.bar' ? CanvasBarLocationOptions : UILocationOptions<A>;
297
+
291
298
  export { ApplicationMimeType }
292
299
 
293
300
  export { ApplyAssetOptions }
@@ -643,6 +650,30 @@ export { AudioExportOptions }
643
650
 
644
651
  export { AudioMimeType }
645
652
 
653
+ /**
654
+ * Base insert options for non-positional areas.
655
+ * @public
656
+ */
657
+ export declare interface BaseInsertOptions<A extends Exclude<UIArea, PositionalUIArea> = Exclude<UIArea, PositionalUIArea>> {
658
+ /** The UI area to insert into. */
659
+ in: A;
660
+ /** Optional context for conditional ordering. */
661
+ when?: OrderContextFor<A>;
662
+ }
663
+
664
+ /**
665
+ * Base insert options for positional areas (require `at`).
666
+ * @public
667
+ */
668
+ export declare interface BasePositionalInsertOptions<A extends PositionalUIArea> {
669
+ /** The UI area to insert into. */
670
+ in: A;
671
+ /** Which slot within the area (e.g., 'top' or 'bottom' for canvas bar). */
672
+ at: PositionFor<A>;
673
+ /** Optional context for conditional ordering. */
674
+ when?: OrderContextFor<A>;
675
+ }
676
+
646
677
  /**
647
678
  * Represents the bleed margin configuration options for a single design unit type in the Creative Editor SDK.
648
679
  * This interface defines the dropdown options and the default bleed margin value.
@@ -2242,6 +2273,20 @@ export { Canvas }
2242
2273
  */
2243
2274
  export declare type CanvasBarComponentId = 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.settings.canvasBar' | 'ly.img.page.add.canvasBar' | (string & {});
2244
2275
 
2276
+ /**
2277
+ * Location options specifically for the canvas bar, which requires a position.
2278
+ *
2279
+ * @public
2280
+ */
2281
+ export declare interface CanvasBarLocationOptions {
2282
+ /** Target the canvas bar. */
2283
+ in: 'ly.img.canvas.bar';
2284
+ /** Position within the canvas bar. Required for canvas bar operations. */
2285
+ at: 'top' | 'bottom';
2286
+ /** Optional context for conditional ordering. */
2287
+ when?: OrderContext;
2288
+ }
2289
+
2245
2290
  /**
2246
2291
  * @public
2247
2292
  * Base interface for action buttons in the canvas menu.
@@ -2313,6 +2358,27 @@ export declare interface CanvasMenuOptionsComponent extends OrderComponentWithCh
2313
2358
  */
2314
2359
  export declare type CanvasMenuOrderComponent = CanvasMenuComponents | OrderComponentWithChildren<CanvasMenuComponentId, CanvasMenuComponents>;
2315
2360
 
2361
+ /**
2362
+ * Represents the ID of a caption panel component.
2363
+ *
2364
+ * The CaptionPanelComponentId type defines the possible IDs for components that can be used in the caption panel.
2365
+ * It includes predefined IDs for sections, separators, spacers, and various caption panel items, as well as a catch-all type for custom IDs.
2366
+ *
2367
+ * @public
2368
+ */
2369
+ export declare type CaptionPanelComponentId = 'ly.img.section' | 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.caption.panel.create' | 'ly.img.caption.panel.import' | 'ly.img.caption.panel.tabs' | 'ly.img.caption.panel.captions' | 'ly.img.caption.panel.add' | 'ly.img.caption.panel.presets' | (string & {});
2370
+
2371
+ /**
2372
+ * Context for the caption panel which adds view-based filtering.
2373
+ *
2374
+ * @public
2375
+ */
2376
+ export declare interface CaptionPanelOrderContext extends OrderContext {
2377
+ view?: 'create' | 'edit' | 'style' | (string & {});
2378
+ /** Whether to show timing information for each caption in edit view. */
2379
+ showTimings?: boolean;
2380
+ }
2381
+
2316
2382
  /**
2317
2383
  * @public
2318
2384
  * Type representing the background of a card.
@@ -2442,6 +2508,17 @@ declare type CombinedConfiguration = CESDKConfiguration & Omit<_EngineConfigurat
2442
2508
 
2443
2509
  export { CompleteAssetResult }
2444
2510
 
2511
+ /**
2512
+ * A glob pattern for matching component IDs.
2513
+ *
2514
+ * Examples:
2515
+ * - `'ly.img.*'` matches all ly.img components
2516
+ * - `'*.separator'` matches all separator components
2517
+ *
2518
+ * @public
2519
+ */
2520
+ export declare type ComponentGlobPattern = `${string}*` | `*${string}` | `*${string}*`;
2521
+
2445
2522
  /**
2446
2523
  * Represents the ID of a component.
2447
2524
  *
@@ -2450,7 +2527,56 @@ export { CompleteAssetResult }
2450
2527
  *
2451
2528
  * @public
2452
2529
  */
2453
- export declare type ComponentId = DockOrderComponentId | CanvasMenuComponentId | NavigationBarComponentId | CanvasBarComponentId | InspectorBarComponentId;
2530
+ export declare type ComponentId = DockOrderComponentId | CanvasMenuComponentId | NavigationBarComponentId | CanvasBarComponentId | InspectorBarComponentId | CaptionPanelComponentId;
2531
+
2532
+ /**
2533
+ * Maps UI areas to their component ID types.
2534
+ *
2535
+ * @public
2536
+ */
2537
+ export declare type ComponentIdFor<A extends UIArea> = {
2538
+ 'ly.img.dock': DockOrderComponentId;
2539
+ 'ly.img.inspector.bar': InspectorBarComponentId;
2540
+ 'ly.img.canvas.menu': CanvasMenuComponentId;
2541
+ 'ly.img.navigation.bar': NavigationBarComponentId;
2542
+ 'ly.img.canvas.bar': CanvasBarComponentId;
2543
+ 'ly.img.caption.panel': CaptionPanelComponentId;
2544
+ }[A];
2545
+
2546
+ /**
2547
+ * Unified component matcher type supporting all matching strategies.
2548
+ *
2549
+ * - `'first'` / `'last'` - Match first or last component
2550
+ * - `number` - Match by index (0, 1, -1, etc.)
2551
+ * - `C['id']` - Match by exact ID (with autocomplete for known IDs)
2552
+ * - `ComponentGlobPattern` - Match by glob pattern (e.g., `'ly.img.*'`)
2553
+ * - `Partial<C>` - Match by partial properties (e.g., `{ id: 'x', key: 'y' }`)
2554
+ * - `(component, index) => boolean` - Custom predicate function
2555
+ *
2556
+ * @public
2557
+ */
2558
+ export declare type ComponentMatcher<C extends OrderComponent = OrderComponent> = 'first' | 'last' | number | C['id'] | ComponentGlobPattern | Partial<C> | ((component: C, index: number) => boolean);
2559
+
2560
+ /**
2561
+ * Options for update and remove operations.
2562
+ * Supports multi-area operations via arrays or glob patterns.
2563
+ *
2564
+ * @public
2565
+ */
2566
+ export declare interface ComponentMatchOptions<A extends UIAreaSpecifier = UIAreaSpecifier> {
2567
+ /** The UI area(s) to operate on. Can be a single area, array, or glob pattern. */
2568
+ in: A;
2569
+ /** The matcher to find components. Autocomplete is area-specific when targeting a single area. */
2570
+ match: ComponentMatcher<InferComponentType<A>>;
2571
+ /** Optional context filter. */
2572
+ when?: InferOrderContext<A>;
2573
+ /**
2574
+ * Position for canvas bar operations.
2575
+ * - For update/remove: Optional. If omitted, operates on BOTH top and bottom bars.
2576
+ * - For insert: Required (enforced by InsertComponentOptions type).
2577
+ */
2578
+ at?: 'top' | 'bottom';
2579
+ }
2454
2580
 
2455
2581
  /**
2456
2582
  * Represents options for a component.
@@ -2488,6 +2614,20 @@ export declare interface ComponentPayload {
2488
2614
  [key: string]: unknown;
2489
2615
  }
2490
2616
 
2617
+ /**
2618
+ * Specifies a component either by ID or as a full component object.
2619
+ *
2620
+ * @public
2621
+ */
2622
+ export declare type ComponentSpec<A extends UIArea = UIArea> = ComponentIdFor<A> | OrderComponentFor<A>;
2623
+
2624
+ /**
2625
+ * Specifies one or more components for insertion.
2626
+ *
2627
+ * @public
2628
+ */
2629
+ export declare type ComponentSpecOrArray<A extends UIArea = UIArea> = ComponentSpec<A> | ComponentSpec<A>[];
2630
+
2491
2631
  declare namespace ConfigTypes {
2492
2632
  export {
2493
2633
  CombinedConfiguration,
@@ -3001,7 +3141,7 @@ declare type CustomCardSvgVectorPathBackground = {
3001
3141
  * @public
3002
3142
  */
3003
3143
  export declare interface CustomDockComponent extends ComponentPayload {
3004
- id: ComponentId;
3144
+ id: DockOrderComponentId;
3005
3145
  }
3006
3146
 
3007
3147
  /**
@@ -3188,7 +3328,7 @@ export declare type DockOrderComponent = CustomDockComponent | AssetLibraryDockC
3188
3328
  *
3189
3329
  * @public
3190
3330
  */
3191
- export declare type DockOrderComponentId = 'ly.img.separator' | 'ly.img.spacer' | (string & {});
3331
+ export declare type DockOrderComponentId = 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.assetLibrary.dock' | (string & {});
3192
3332
 
3193
3333
  /**
3194
3334
  * Represents the context for the children of a dropdown.
@@ -3222,6 +3362,8 @@ export declare interface DropdownOptions {
3222
3362
  color?: 'accent' | 'danger';
3223
3363
  size?: 'normal' | 'large';
3224
3364
  icon?: CustomIcon;
3365
+ isActive?: boolean;
3366
+ activeStateStyle?: 'outline' | 'pill' | 'none';
3225
3367
  isDisabled?: boolean;
3226
3368
  isLoading?: boolean;
3227
3369
  loadingProgress?: number;
@@ -4012,6 +4154,27 @@ export { FontStyle }
4012
4154
 
4013
4155
  export { FontWeight }
4014
4156
 
4157
+ /**
4158
+ * Options for getting component order.
4159
+ * Only single area queries are supported to ensure type-safe returns.
4160
+ *
4161
+ * @public
4162
+ */
4163
+ export declare type GetOrderOptions<A extends UIArea = UIArea> = AnyUILocationOptions<A>;
4164
+
4165
+ /**
4166
+ * A glob pattern string for matching UI areas or component IDs.
4167
+ * Supports `*` as a wildcard.
4168
+ *
4169
+ * Examples:
4170
+ * - `'ly.img.canvas.*'` matches 'ly.img.canvas.bar' and 'ly.img.canvas.menu'
4171
+ * - `'ly.img.*.bar'` matches 'ly.img.canvas.bar', 'ly.img.inspector.bar', 'ly.img.navigation.bar'
4172
+ * - `'*'` matches all areas
4173
+ *
4174
+ * @public
4175
+ */
4176
+ export declare type GlobPattern = `${string}*` | `*${string}` | `*${string}*` | '*';
4177
+
4015
4178
  export { GradientColorStop }
4016
4179
 
4017
4180
  export { GradientstopRGBA }
@@ -4060,6 +4223,26 @@ export declare type ImportSceneAction = (options: {
4060
4223
  format?: 'scene' | 'archive';
4061
4224
  }) => void | Promise<void>;
4062
4225
 
4226
+ /**
4227
+ * Infers the component type from a UI area specifier.
4228
+ * - Single area: returns area-specific component type
4229
+ * - Array of areas: returns union of component types
4230
+ * - Glob pattern: returns base OrderComponent (all IDs)
4231
+ *
4232
+ * @public
4233
+ */
4234
+ export declare type InferComponentType<A extends UIAreaSpecifier> = A extends UIArea ? OrderComponentFor<A> : A extends UIArea[] ? OrderComponentFor<A[number]> : OrderComponent;
4235
+
4236
+ /**
4237
+ * Infers the order context type from a UI area specifier.
4238
+ * - Single area: returns area-specific context type
4239
+ * - Array of areas: returns union of context types
4240
+ * - Glob pattern: returns base OrderContext (all areas)
4241
+ *
4242
+ * @public
4243
+ */
4244
+ export declare type InferOrderContext<A extends UIAreaSpecifier> = A extends UIArea ? OrderContextFor<A> : A extends UIArea[] ? OrderContextFor<A[number]> : OrderContext;
4245
+
4063
4246
  /**
4064
4247
  * Represents options for an input.
4065
4248
  *
@@ -4078,6 +4261,58 @@ export declare interface InputOptions<T, P = 'top' | 'left'> {
4078
4261
  suffix?: Suffix;
4079
4262
  }
4080
4263
 
4264
+ /**
4265
+ * Insert after a matched component.
4266
+ * @public
4267
+ */
4268
+ export declare interface InsertAfterOptions<A extends Exclude<UIArea, PositionalUIArea> = Exclude<UIArea, PositionalUIArea>> extends BaseInsertOptions<A> {
4269
+ /** Insert after this component. */
4270
+ after: ComponentMatcher;
4271
+ before?: never;
4272
+ position?: never;
4273
+ }
4274
+
4275
+ /**
4276
+ * Append to end (default behavior).
4277
+ * @public
4278
+ */
4279
+ export declare interface InsertAppendOptions<A extends Exclude<UIArea, PositionalUIArea> = Exclude<UIArea, PositionalUIArea>> extends BaseInsertOptions<A> {
4280
+ before?: never;
4281
+ after?: never;
4282
+ position?: never;
4283
+ }
4284
+
4285
+ /**
4286
+ * Insert at a specific position.
4287
+ * @public
4288
+ */
4289
+ export declare interface InsertAtPositionOptions<A extends Exclude<UIArea, PositionalUIArea> = Exclude<UIArea, PositionalUIArea>> extends BaseInsertOptions<A> {
4290
+ /** Insert at 'start', 'end', or a specific index. Negative indexes count from end. */
4291
+ position: 'start' | 'end' | number;
4292
+ before?: never;
4293
+ after?: never;
4294
+ }
4295
+
4296
+ /**
4297
+ * Insert before a matched component.
4298
+ * @public
4299
+ */
4300
+ export declare interface InsertBeforeOptions<A extends Exclude<UIArea, PositionalUIArea> = Exclude<UIArea, PositionalUIArea>> extends BaseInsertOptions<A> {
4301
+ /** Insert before this component. */
4302
+ before: ComponentMatcher;
4303
+ after?: never;
4304
+ position?: never;
4305
+ }
4306
+
4307
+ /**
4308
+ * Options for inserting a component into a UI area.
4309
+ * Supports mutual exclusion: only one of `before`, `after`, or `position` can be specified.
4310
+ * Positional areas (like canvas bar) require the `at` property to specify which slot.
4311
+ *
4312
+ * @public
4313
+ */
4314
+ export declare type InsertComponentOptions<A extends UIArea = UIArea> = A extends PositionalUIArea ? PositionalInsertBeforeOptions<A> | PositionalInsertAfterOptions<A> | PositionalInsertAtPositionOptions<A> | PositionalInsertAppendOptions<A> : A extends Exclude<UIArea, PositionalUIArea> ? InsertBeforeOptions<A> | InsertAfterOptions<A> | InsertAtPositionOptions<A> | InsertAppendOptions<A> : never;
4315
+
4081
4316
  /**
4082
4317
  * Represents the location for inserting an order component.
4083
4318
  *
@@ -4093,6 +4328,20 @@ export declare interface InputOptions<T, P = 'top' | 'left'> {
4093
4328
  */
4094
4329
  export declare type InsertOrderComponentLocation = 'before' | 'after' | 'replace' | 'asChild';
4095
4330
 
4331
+ /**
4332
+ * Result of an insert operation.
4333
+ *
4334
+ * @public
4335
+ */
4336
+ export declare interface InsertResult<A extends UIArea = UIArea> {
4337
+ /** Whether at least one component was successfully inserted. False if target not found. */
4338
+ inserted: boolean;
4339
+ /** Number of components that were inserted. */
4340
+ insertedCount: number;
4341
+ /** The new order after the insert. */
4342
+ order: OrderComponentFor<A>[];
4343
+ }
4344
+
4096
4345
  /**
4097
4346
  * Represents the ID of an inspector bar component.
4098
4347
  *
@@ -4101,7 +4350,7 @@ export declare type InsertOrderComponentLocation = 'before' | 'after' | 'replace
4101
4350
  *
4102
4351
  * @public
4103
4352
  */
4104
- export declare type InspectorBarComponentId = 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.spacer' | 'ly.img.video.caption.inspectorBar' | 'ly.img.shape.options.inspectorBar' | 'ly.img.cutout.type.inspectorBar' | 'ly.img.cutout.offset.inspectorBar' | 'ly.img.cutout.smoothing.inspectorBar' | 'ly.img.group.create.inspectorBar' | 'ly.img.group.ungroup.inspectorBar' | 'ly.img.audio.replace.inspectorBar' | 'ly.img.separator' | 'ly.img.text.typeFace.inspectorBar' | 'ly.img.text.style.inspectorBar' | 'ly.img.text.bold.inspectorBar' | 'ly.img.text.italic.inspectorBar' | 'ly.img.text.fontSize.inspectorBar' | 'ly.img.text.alignHorizontal.inspectorBar' | 'ly.img.text.advanced.inspectorBar' | 'ly.img.combine.inspectorBar' | 'ly.img.separator' | 'ly.img.fill.inspectorBar' | 'ly.img.trim.inspectorBar' | 'ly.img.volume.inspectorBar' | 'ly.img.crop.inspectorBar' | 'ly.img.separator' | 'ly.img.stroke.inspectorBar' | 'ly.img.separator' | 'ly.img.text.background.inspectorBar' | 'ly.img.separator' | 'ly.img.animations.inspectorBar' | 'ly.img.separator' | 'ly.img.adjustment.inspectorBar' | 'ly.img.filter.inspectorBar' | 'ly.img.effect.inspectorBar' | 'ly.img.blur.inspectorBar' | 'ly.img.separator' | 'ly.img.shadow.inspectorBar' | 'ly.img.separator' | 'ly.img.opacityOptions.inspectorBar' | 'ly.img.separator' | 'ly.img.position.inspectorBar' | 'ly.img.spacer' | 'ly.img.separator' | 'ly.img.inspectorToggle.inspectorBar' | 'ly.img.trimControls.inspectorBar' | 'ly.img.cropControls.inspectorBar' | (string & {});
4353
+ export declare type InspectorBarComponentId = 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.spacer' | 'ly.img.video.caption.inspectorBar' | 'ly.img.shape.options.inspectorBar' | 'ly.img.cutout.type.inspectorBar' | 'ly.img.cutout.offset.inspectorBar' | 'ly.img.cutout.smoothing.inspectorBar' | 'ly.img.group.create.inspectorBar' | 'ly.img.group.ungroup.inspectorBar' | 'ly.img.audio.replace.inspectorBar' | 'ly.img.separator' | 'ly.img.text.typeFace.inspectorBar' | 'ly.img.text.style.inspectorBar' | 'ly.img.text.bold.inspectorBar' | 'ly.img.text.italic.inspectorBar' | 'ly.img.text.fontSize.inspectorBar' | 'ly.img.text.alignHorizontal.inspectorBar' | 'ly.img.text.advanced.inspectorBar' | 'ly.img.combine.inspectorBar' | 'ly.img.separator' | 'ly.img.fill.inspectorBar' | 'ly.img.trim.inspectorBar' | 'ly.img.volume.inspectorBar' | 'ly.img.crop.inspectorBar' | 'ly.img.separator' | 'ly.img.stroke.inspectorBar' | 'ly.img.separator' | 'ly.img.text.background.inspectorBar' | 'ly.img.separator' | 'ly.img.animations.inspectorBar' | 'ly.img.separator' | 'ly.img.appearance.inspectorBar' | 'ly.img.adjustment.inspectorBar' | 'ly.img.filter.inspectorBar' | 'ly.img.effect.inspectorBar' | 'ly.img.blur.inspectorBar' | 'ly.img.separator' | 'ly.img.shadow.inspectorBar' | 'ly.img.separator' | 'ly.img.opacityOptions.inspectorBar' | 'ly.img.separator' | 'ly.img.position.inspectorBar' | 'ly.img.spacer' | 'ly.img.separator' | 'ly.img.inspectorToggle.inspectorBar' | 'ly.img.trimControls.inspectorBar' | 'ly.img.cropControls.inspectorBar' | (string & {});
4105
4354
 
4106
4355
  /**
4107
4356
  * Manages localization and internationalization settings for the Creative Editor SDK.
@@ -4227,6 +4476,16 @@ export declare type IsEnabledFeatureContext = {
4227
4476
  engine: CreativeEngine_2;
4228
4477
  };
4229
4478
 
4479
+ /**
4480
+ * Checks if a string is a glob pattern (contains `*`).
4481
+ *
4482
+ * @param str - The string to check
4483
+ * @returns True if the string contains a wildcard
4484
+ *
4485
+ * @public
4486
+ */
4487
+ export declare function isGlobPattern(str: string): str is GlobPattern;
4488
+
4230
4489
  /**
4231
4490
  * Represents options for a library.
4232
4491
  *
@@ -4262,6 +4521,17 @@ declare type Logger_2 = (message: string, level: 'Warning' | 'Error') => void;
4262
4521
 
4263
4522
  export { LogLevel }
4264
4523
 
4524
+ /**
4525
+ * Matches a value against a glob pattern.
4526
+ *
4527
+ * @param pattern - The glob pattern (e.g., 'ly.img.*', '*.separator')
4528
+ * @param value - The value to match against
4529
+ * @returns True if the value matches the pattern
4530
+ *
4531
+ * @public
4532
+ */
4533
+ export declare function matchGlob(pattern: string, value: string): boolean;
4534
+
4265
4535
  /**
4266
4536
  * Represents options for a media preview.
4267
4537
  *
@@ -4279,6 +4549,24 @@ export declare interface MediaPreviewOptions {
4279
4549
 
4280
4550
  export { MimeType_2 as MimeType }
4281
4551
 
4552
+ /**
4553
+ * Result of a multi-area remove operation.
4554
+ *
4555
+ * @public
4556
+ */
4557
+ export declare type MultiAreaRemoveResult = {
4558
+ [K in UIArea]?: RemoveResult<K>;
4559
+ };
4560
+
4561
+ /**
4562
+ * Result of a multi-area update operation.
4563
+ *
4564
+ * @public
4565
+ */
4566
+ export declare type MultiAreaUpdateResult = {
4567
+ [K in UIArea]?: UpdateResult<K>;
4568
+ };
4569
+
4282
4570
  /**
4283
4571
  * @public
4284
4572
  * Base interface for action buttons in the navigation bar.
@@ -4508,6 +4796,20 @@ export declare interface OrderComponent<I = ComponentId> extends ComponentPayloa
4508
4796
  key?: string;
4509
4797
  }
4510
4798
 
4799
+ /**
4800
+ * Maps UI areas to their order component types.
4801
+ *
4802
+ * @public
4803
+ */
4804
+ export declare type OrderComponentFor<A extends UIArea> = {
4805
+ 'ly.img.dock': DockOrderComponent;
4806
+ 'ly.img.inspector.bar': OrderComponent<InspectorBarComponentId>;
4807
+ 'ly.img.canvas.menu': CanvasMenuOrderComponent;
4808
+ 'ly.img.navigation.bar': NavigationBarOrderComponent;
4809
+ 'ly.img.canvas.bar': OrderComponent<CanvasBarComponentId>;
4810
+ 'ly.img.caption.panel': OrderComponent<CaptionPanelComponentId>;
4811
+ }[A];
4812
+
4511
4813
  /**
4512
4814
  * Represents a matcher for order components.
4513
4815
  *
@@ -4532,16 +4834,24 @@ export declare interface OrderComponentWithChildren<I extends ComponentId, C = O
4532
4834
  }
4533
4835
 
4534
4836
  /**
4535
- * Interface representing the context for ordering components.
4536
- *
4537
- * - `editMode`: The current edit mode.
4837
+ * Context for ordering components.
4838
+ * Contains editMode which is used by most UI areas.
4538
4839
  *
4539
4840
  * @public
4540
4841
  */
4541
4842
  export declare interface OrderContext {
4542
- editMode: EditMode;
4843
+ editMode?: EditMode;
4543
4844
  }
4544
4845
 
4846
+ /**
4847
+ * Maps a UI area to its appropriate order context type for public API usage.
4848
+ * - Caption panel uses CaptionPanelOrderContext (adds view property)
4849
+ * - All other areas use OrderContext (editMode only)
4850
+ *
4851
+ * @public
4852
+ */
4853
+ export declare type OrderContextFor<A extends UIArea> = A extends 'ly.img.caption.panel' ? CaptionPanelOrderContext : OrderContext;
4854
+
4545
4855
  /**
4546
4856
  * Represents the definition of a page format in the Creative Editor SDK.
4547
4857
  * This interface defines the width, height, unit, and optional fixed orientation for a page format.
@@ -4644,6 +4954,62 @@ declare type PanelStates<T extends PanelId> = {
4644
4954
  */
4645
4955
  export declare type PasteAction = () => void | Promise<void>;
4646
4956
 
4957
+ /**
4958
+ * Insert after a matched component (positional areas).
4959
+ * @public
4960
+ */
4961
+ export declare interface PositionalInsertAfterOptions<A extends PositionalUIArea> extends BasePositionalInsertOptions<A> {
4962
+ /** Insert after this component. */
4963
+ after: ComponentMatcher;
4964
+ before?: never;
4965
+ position?: never;
4966
+ }
4967
+
4968
+ /**
4969
+ * Append to end (positional areas).
4970
+ * @public
4971
+ */
4972
+ export declare interface PositionalInsertAppendOptions<A extends PositionalUIArea> extends BasePositionalInsertOptions<A> {
4973
+ before?: never;
4974
+ after?: never;
4975
+ position?: never;
4976
+ }
4977
+
4978
+ /**
4979
+ * Insert at a specific position (positional areas).
4980
+ * @public
4981
+ */
4982
+ export declare interface PositionalInsertAtPositionOptions<A extends PositionalUIArea> extends BasePositionalInsertOptions<A> {
4983
+ /** Insert at 'start', 'end', or a specific index. Negative indexes count from end. */
4984
+ position: 'start' | 'end' | number;
4985
+ before?: never;
4986
+ after?: never;
4987
+ }
4988
+
4989
+ /**
4990
+ * Insert before a matched component (positional areas).
4991
+ * @public
4992
+ */
4993
+ export declare interface PositionalInsertBeforeOptions<A extends PositionalUIArea> extends BasePositionalInsertOptions<A> {
4994
+ /** Insert before this component. */
4995
+ before: ComponentMatcher;
4996
+ after?: never;
4997
+ position?: never;
4998
+ }
4999
+
5000
+ /**
5001
+ * UI areas that are positional (require `at` to specify which slot).
5002
+ * @public
5003
+ */
5004
+ export declare type PositionalUIArea = 'ly.img.canvas.bar';
5005
+
5006
+ /**
5007
+ * Maps positional UI areas to their valid `at` values.
5008
+ * Extend this type when adding new positional areas.
5009
+ * @public
5010
+ */
5011
+ export declare type PositionFor<A extends PositionalUIArea> = A extends 'ly.img.canvas.bar' ? 'top' | 'bottom' : never;
5012
+
4647
5013
  export { PositionMode }
4648
5014
 
4649
5015
  /**
@@ -4772,6 +5138,18 @@ export declare interface RegisteredActions {
4772
5138
  'video.encode.checkSupport': VideoEncodeCheckSupportAction;
4773
5139
  }
4774
5140
 
5141
+ /**
5142
+ * Result of a remove operation on a single area.
5143
+ *
5144
+ * @public
5145
+ */
5146
+ export declare interface RemoveResult<A extends UIArea = UIArea> {
5147
+ /** Number of components that were removed. */
5148
+ removed: number;
5149
+ /** The new order after the removal. */
5150
+ order: OrderComponentFor<A>[];
5151
+ }
5152
+
4775
5153
  /**
4776
5154
  * @public
4777
5155
  * Provides context for replacing asset library entries, including selected blocks and default entry IDs.
@@ -4865,13 +5243,14 @@ export declare type ScrollToPageAction = (options?: {
4865
5243
  *
4866
5244
  * The `SectionOptions` interface provides a set of properties that control the
4867
5245
  * behavior and appearance of a section. These options include settings for the
4868
- * title and children.
5246
+ * title, children, and scrollable behavior.
4869
5247
  *
4870
5248
  * @public
4871
5249
  */
4872
5250
  export declare interface SectionOptions {
4873
5251
  title?: string;
4874
- children?: () => void;
5252
+ children?: (() => void) | ChildrenOrder;
5253
+ scrollable?: boolean;
4875
5254
  }
4876
5255
 
4877
5256
  /**
@@ -4909,6 +5288,14 @@ export declare interface SelectValue {
4909
5288
  icon?: CustomIcon;
4910
5289
  }
4911
5290
 
5291
+ /**
5292
+ * Options for setting component order.
5293
+ * Single area only for type safety with area-specific component types.
5294
+ *
5295
+ * @public
5296
+ */
5297
+ export declare type SetOrderOptions<A extends UIArea = UIArea> = AnyUILocationOptions<A>;
5298
+
4912
5299
  export { SettingsBool }
4913
5300
 
4914
5301
  export { SettingsColor }
@@ -5127,6 +5514,46 @@ export { Typeface }
5127
5514
 
5128
5515
  export { TypefaceDefinition }
5129
5516
 
5517
+ /**
5518
+ * Represents a UI area where components can be ordered.
5519
+ *
5520
+ * Uses the `ly.img.*` naming convention consistent with Feature IDs.
5521
+ *
5522
+ * @public
5523
+ */
5524
+ export declare type UIArea = 'ly.img.dock' | 'ly.img.inspector.bar' | 'ly.img.canvas.menu' | 'ly.img.navigation.bar' | 'ly.img.canvas.bar' | 'ly.img.caption.panel';
5525
+
5526
+ /**
5527
+ * UI area-specific context - excludes base OrderContext properties (like editMode)
5528
+ * that are read-only and derived from the engine.
5529
+ *
5530
+ * For 'ly.img.caption.panel': `\{ view?: 'create' | 'edit' | 'style' \}`
5531
+ * For other areas: `\{\}` (nothing area-specific)
5532
+ *
5533
+ * @public
5534
+ */
5535
+ export declare type UIAreaContext<A extends UIArea> = Omit<OrderContextFor<A>, keyof OrderContext>;
5536
+
5537
+ /**
5538
+ * Specifies which UI area(s) to target.
5539
+ * Can be a single area, an array of areas, or a glob pattern.
5540
+ *
5541
+ * @public
5542
+ */
5543
+ export declare type UIAreaSpecifier = UIArea | UIArea[] | GlobPattern;
5544
+
5545
+ /**
5546
+ * Location options for non-canvas-bar UI areas.
5547
+ *
5548
+ * @public
5549
+ */
5550
+ export declare interface UILocationOptions<A extends UIArea = UIArea> {
5551
+ /** The UI area to target. Cannot be 'ly.img.canvas.bar' - use CanvasBarLocationOptions instead. */
5552
+ in: A extends 'ly.img.canvas.bar' ? never : A;
5553
+ /** Optional context for conditional ordering. */
5554
+ when?: OrderContextFor<A>;
5555
+ }
5556
+
5130
5557
  /**
5131
5558
  * Represents the UI options for a single design unit type in the Creative Editor SDK.
5132
5559
  * This interface defines the bleed margin options for a single design unit.
@@ -5167,6 +5594,25 @@ export declare type UnknownTranslations = {
5167
5594
  [key: string]: string | {};
5168
5595
  };
5169
5596
 
5597
+ /**
5598
+ * Result of an update operation on a single area.
5599
+ *
5600
+ * @public
5601
+ */
5602
+ export declare interface UpdateResult<A extends UIArea = UIArea> {
5603
+ /** Number of components that were updated. */
5604
+ updated: number;
5605
+ /** The new order after the update. */
5606
+ order: OrderComponentFor<A>[];
5607
+ }
5608
+
5609
+ /**
5610
+ * Specifies an update either as a new ID, partial update, or updater function.
5611
+ *
5612
+ * @public
5613
+ */
5614
+ export declare type UpdateSpec<A extends UIArea = UIArea> = ComponentIdFor<A> | Partial<OrderComponentFor<A>> | ((component: OrderComponentFor<A>) => Partial<OrderComponentFor<A>>);
5615
+
5170
5616
  /**
5171
5617
  * Action function for uploading files to asset sources.
5172
5618
  *
@@ -5189,6 +5635,29 @@ declare interface UploadCallbackContext {
5189
5635
  group?: string;
5190
5636
  }
5191
5637
 
5638
+ /**
5639
+ * Hook for reading and setting order context for a UI area.
5640
+ *
5641
+ * Components wrapped with `observer` will automatically re-render when the context changes.
5642
+ *
5643
+ * @param area - The UI area to get/set context for
5644
+ * @returns Object with `context` and `setContext`
5645
+ *
5646
+ * @example
5647
+ * ```tsx
5648
+ * function MyCaptionStyleButton() {
5649
+ * const { context, setContext } = useOrderContext('ly.img.caption.panel');
5650
+ * return <button onClick={() => setContext({ view: 'style' })}>Styles</button>;
5651
+ * }
5652
+ * ```
5653
+ *
5654
+ * @public
5655
+ */
5656
+ export declare function useOrderContext<A extends UIArea>(area: A): {
5657
+ context: UIAreaContext<A> | undefined;
5658
+ setContext: (ctx: Partial<UIAreaContext<A>>) => void;
5659
+ };
5660
+
5192
5661
  /**
5193
5662
  * Specifies the configuration for the user interface of the Creative Editor SDK.
5194
5663
  *
@@ -5830,6 +6299,7 @@ export declare class UserInterfaceAPI {
5830
6299
  * consists of the edit mode (e.g. `Transform` or `Text`) right now. If no
5831
6300
  * context is given, the default order is set for the `Transform` edit mode.
5832
6301
  *
6302
+ * @deprecated Use `setComponentOrder({ in: 'ly.img.dock' }, order)` instead.
5833
6303
  * @category UI Layout
5834
6304
  * @param dockOrder - Array of component IDs defining the dock order.
5835
6305
  * @param orderContext - Optional context specifying when this order applies.
@@ -5846,6 +6316,7 @@ export declare class UserInterfaceAPI {
5846
6316
  * If no context is given, the default order (with `Transform` edit mode) is
5847
6317
  * returned.
5848
6318
  *
6319
+ * @deprecated Use `getComponentOrder({ in: 'ly.img.dock' })` instead.
5849
6320
  * @category UI Layout
5850
6321
  * @param orderContext - Optional context specifying which order to retrieve.
5851
6322
  * @returns Array of component configurations defining the dock order.
@@ -5862,6 +6333,7 @@ export declare class UserInterfaceAPI {
5862
6333
  *
5863
6334
  * The update API can be used in different contexts (such as edit modes).
5864
6335
  *
6336
+ * @deprecated Use `updateOrderComponent({ in: 'ly.img.dock', match }, update)` instead.
5865
6337
  * @category UI Layout
5866
6338
  * @param matcher - Function or object to match the component to update.
5867
6339
  * @param update - New ID, partial properties, or updater function for the component.
@@ -5880,6 +6352,7 @@ export declare class UserInterfaceAPI {
5880
6352
  *
5881
6353
  * The remove API can be used in different contexts (such as edit modes).
5882
6354
  *
6355
+ * @deprecated Use `removeOrderComponent({ in: 'ly.img.dock', match })` instead.
5883
6356
  * @category UI Layout
5884
6357
  * @param matcher - Function or object to match the component to remove.
5885
6358
  * @param orderContext - Optional context specifying which order to update.
@@ -5892,12 +6365,13 @@ export declare class UserInterfaceAPI {
5892
6365
  /**
5893
6366
  * Inserts a component into the render order of the dock area.
5894
6367
  *
5895
- * This method inserts a new dock order component before, after, or to replace a component matching
6368
+ * This method inserts a new dock order component before or after a component matching
5896
6369
  * the provided matcher. The matcher can be a function or an object describing the component to match.
5897
- * The location can be 'before', 'after', or 'replace'.
6370
+ * The location can be 'before' or 'after'.
5898
6371
  *
5899
6372
  * The insert API can be used in different contexts (such as edit modes).
5900
6373
  *
6374
+ * @deprecated Use `insertOrderComponent({ in: 'ly.img.dock', before/after }, component)` instead.
5901
6375
  * @category UI Layout
5902
6376
  * @param component - The component ID or configuration to insert.
5903
6377
  * @param matcher - Function or object to match the component to insert relative to.
@@ -5907,7 +6381,9 @@ export declare class UserInterfaceAPI {
5907
6381
  */
5908
6382
  insertDockOrderComponent(matcher: OrderComponentMatcher<OrderComponent<DockOrderComponentId>>, component: DockOrderComponentId | OrderComponent<DockOrderComponentId>, location?: InsertOrderComponentLocation, orderContext?: OrderContext): {
5909
6383
  inserted: boolean;
5910
- order: DockOrderComponent[];
6384
+ order: (OrderComponent<string> | {
6385
+ id: string;
6386
+ })[];
5911
6387
  };
5912
6388
  /**
5913
6389
  * Sets the rendering order of components in the inspector bar.
@@ -5920,6 +6396,7 @@ export declare class UserInterfaceAPI {
5920
6396
  * consists of the edit mode (e.g. `Transform` or `Text`) right now. If no
5921
6397
  * context is given, the default order is set for the `Transform` edit mode.
5922
6398
  *
6399
+ * @deprecated Use `setComponentOrder({ in: 'ly.img.inspector.bar' }, order)` instead.
5923
6400
  * @category UI Layout
5924
6401
  * @param inspectorBarOrder - Array of component IDs defining the inspector bar order.
5925
6402
  * @param orderContext - Optional context specifying when this order applies.
@@ -5932,6 +6409,7 @@ export declare class UserInterfaceAPI {
5932
6409
  * registerComponent. Returns the order for the specified context, or
5933
6410
  * defaults to Transform mode if no context is provided.
5934
6411
  *
6412
+ * @deprecated Use `getComponentOrder({ in: 'ly.img.inspector.bar' })` instead.
5935
6413
  * @category UI Layout
5936
6414
  * @param orderContext - Optional context specifying which order to retrieve.
5937
6415
  * @returns Array of component configurations defining the inspector bar order.
@@ -5948,6 +6426,7 @@ export declare class UserInterfaceAPI {
5948
6426
  *
5949
6427
  * The update API can be used in different contexts (such as edit modes).
5950
6428
  *
6429
+ * @deprecated Use `updateOrderComponent({ in: 'ly.img.inspector.bar', match }, update)` instead.
5951
6430
  * @category UI Layout
5952
6431
  * @param matcher - Function or object to match the component to update.
5953
6432
  * @param update - New ID, partial properties, or updater function for the component.
@@ -5966,6 +6445,7 @@ export declare class UserInterfaceAPI {
5966
6445
  *
5967
6446
  * The remove API can be used in different contexts (such as edit modes).
5968
6447
  *
6448
+ * @deprecated Use `removeOrderComponent({ in: 'ly.img.inspector.bar', match })` instead.
5969
6449
  * @category UI Layout
5970
6450
  * @param matcher - Function or object to match the component to remove.
5971
6451
  * @param orderContext - Optional context specifying which order to update.
@@ -5978,12 +6458,13 @@ export declare class UserInterfaceAPI {
5978
6458
  /**
5979
6459
  * Inserts a component into the render order of the inspector bar.
5980
6460
  *
5981
- * This method inserts a new inspector bar order component before, after, or to replace a component matching
6461
+ * This method inserts a new inspector bar order component before or after a component matching
5982
6462
  * the provided matcher. The matcher can be a function or an object describing the component to match.
5983
- * The location can be 'before', 'after', or 'replace'.
6463
+ * The location can be 'before' or 'after'.
5984
6464
  *
5985
6465
  * The insert API can be used in different contexts (such as edit modes).
5986
6466
  *
6467
+ * @deprecated Use `insertOrderComponent({ in: 'ly.img.inspector.bar', before/after }, component)` instead.
5987
6468
  * @category UI Layout
5988
6469
  * @param component - The component ID or configuration to insert.
5989
6470
  * @param matcher - Function or object to match the component to insert relative to.
@@ -5993,7 +6474,9 @@ export declare class UserInterfaceAPI {
5993
6474
  */
5994
6475
  insertInspectorBarOrderComponent(matcher: OrderComponentMatcher<OrderComponent<InspectorBarComponentId>>, component: InspectorBarComponentId | OrderComponent<InspectorBarComponentId>, location?: InsertOrderComponentLocation, orderContext?: OrderContext): {
5995
6476
  inserted: boolean;
5996
- order: OrderComponent<InspectorBarComponentId>[];
6477
+ order: (OrderComponent<string> | {
6478
+ id: string;
6479
+ })[];
5997
6480
  };
5998
6481
  /**
5999
6482
  * Sets the rendering order of components in the canvas menu.
@@ -6002,6 +6485,7 @@ export declare class UserInterfaceAPI {
6002
6485
  * registerComponent. Different orders can be set for different contexts
6003
6486
  * (e.g., Transform or Text edit modes). Defaults to Transform mode if no context is provided.
6004
6487
  *
6488
+ * @deprecated Use `setComponentOrder({ in: 'ly.img.canvas.menu' }, order)` instead.
6005
6489
  * @category UI Layout
6006
6490
  * @param canvasMenuOrder - Array of component IDs defining the canvas menu order.
6007
6491
  * @param orderContext - Optional context specifying when this order applies.
@@ -6014,6 +6498,7 @@ export declare class UserInterfaceAPI {
6014
6498
  * registerComponent. Returns the order for the specified context, or
6015
6499
  * defaults to Transform mode if no context is provided.
6016
6500
  *
6501
+ * @deprecated Use `getComponentOrder({ in: 'ly.img.canvas.menu' })` instead.
6017
6502
  * @category UI Layout
6018
6503
  * @param orderContext - Optional context specifying which order to retrieve.
6019
6504
  * @returns Array of component configurations defining the canvas menu order.
@@ -6030,6 +6515,7 @@ export declare class UserInterfaceAPI {
6030
6515
  *
6031
6516
  * The update API can be used in different contexts (such as edit modes).
6032
6517
  *
6518
+ * @deprecated Use `updateOrderComponent({ in: 'ly.img.canvas.menu', match }, update)` instead.
6033
6519
  * @category UI Layout
6034
6520
  * @param matcher - Function or object to match the component to update.
6035
6521
  * @param update - New ID, partial properties, or updater function for the component.
@@ -6048,6 +6534,7 @@ export declare class UserInterfaceAPI {
6048
6534
  *
6049
6535
  * The remove API can be used in different contexts (such as edit modes).
6050
6536
  *
6537
+ * @deprecated Use `removeOrderComponent({ in: 'ly.img.canvas.menu', match })` instead.
6051
6538
  * @category UI Layout
6052
6539
  * @param matcher - Function or object to match the component to remove.
6053
6540
  * @param orderContext - Optional context specifying which order to update.
@@ -6060,12 +6547,13 @@ export declare class UserInterfaceAPI {
6060
6547
  /**
6061
6548
  * Inserts a component into the render order of the canvas menu.
6062
6549
  *
6063
- * This method inserts a new canvas menu order component before, after, or to replace a component matching
6550
+ * This method inserts a new canvas menu order component before or after a component matching
6064
6551
  * the provided matcher. The matcher can be a function or an object describing the component to match.
6065
- * The location can be 'before', 'after', or 'replace'.
6552
+ * The location can be 'before' or 'after'.
6066
6553
  *
6067
6554
  * The insert API can be used in different contexts (such as edit modes).
6068
6555
  *
6556
+ * @deprecated Use `insertOrderComponent({ in: 'ly.img.canvas.menu', before/after }, component)` instead.
6069
6557
  * @category UI Layout
6070
6558
  * @param component - The component ID or configuration to insert.
6071
6559
  * @param matcher - Function or object to match the component to insert relative to.
@@ -6075,7 +6563,9 @@ export declare class UserInterfaceAPI {
6075
6563
  */
6076
6564
  insertCanvasMenuOrderComponent(matcher: OrderComponentMatcher<OrderComponent<CanvasMenuComponentId>>, component: CanvasMenuComponentId | CanvasMenuOrderComponent, location?: InsertOrderComponentLocation, orderContext?: OrderContext): {
6077
6565
  inserted: boolean;
6078
- order: OrderComponent<CanvasMenuComponentId>[];
6566
+ order: (OrderComponent<string> | {
6567
+ id: string;
6568
+ })[];
6079
6569
  };
6080
6570
  /**
6081
6571
  * Sets the rendering order of components in the navigation bar.
@@ -6084,6 +6574,7 @@ export declare class UserInterfaceAPI {
6084
6574
  * registerComponent. Different orders can be set for different contexts
6085
6575
  * (e.g., Transform or Text edit modes). Defaults to Transform mode if no context is provided.
6086
6576
  *
6577
+ * @deprecated Use `setComponentOrder({ in: 'ly.img.navigation.bar' }, order)` instead.
6087
6578
  * @category UI Layout
6088
6579
  * @param navigationBarOrder - Array of component IDs defining the navigation bar order.
6089
6580
  * @param orderContext - Optional context specifying when this order applies.
@@ -6100,6 +6591,7 @@ export declare class UserInterfaceAPI {
6100
6591
  *
6101
6592
  * The update API can be used in different contexts (such as edit modes).
6102
6593
  *
6594
+ * @deprecated Use `updateOrderComponent({ in: 'ly.img.navigation.bar', match }, update)` instead.
6103
6595
  * @category UI Layout
6104
6596
  * @param matcher - Function or object to match the component to update.
6105
6597
  * @param update - New ID, partial properties, or updater function for the component.
@@ -6118,6 +6610,7 @@ export declare class UserInterfaceAPI {
6118
6610
  *
6119
6611
  * The remove API can be used in different contexts (such as edit modes).
6120
6612
  *
6613
+ * @deprecated Use `removeOrderComponent({ in: 'ly.img.navigation.bar', match })` instead.
6121
6614
  * @category UI Layout
6122
6615
  * @param matcher - Function or object to match the component to remove.
6123
6616
  * @param orderContext - Optional context specifying which order to update.
@@ -6130,12 +6623,13 @@ export declare class UserInterfaceAPI {
6130
6623
  /**
6131
6624
  * Inserts a component into the render order of the navigation bar.
6132
6625
  *
6133
- * This method inserts a new navigation bar order component before, after, or to replace a component matching
6626
+ * This method inserts a new navigation bar order component before or after a component matching
6134
6627
  * the provided matcher. The matcher can be a function or an object describing the component to match.
6135
- * The location can be 'before', 'after', or 'replace'.
6628
+ * The location can be 'before' or 'after'.
6136
6629
  *
6137
6630
  * The insert API can be used in different contexts (such as edit modes).
6138
6631
  *
6632
+ * @deprecated Use `insertOrderComponent({ in: 'ly.img.navigation.bar', before/after }, component)` instead.
6139
6633
  * @category UI Layout
6140
6634
  * @param component - The component ID or configuration to insert.
6141
6635
  * @param matcher - Function or object to match the component to insert relative to.
@@ -6145,7 +6639,9 @@ export declare class UserInterfaceAPI {
6145
6639
  */
6146
6640
  insertNavigationBarOrderComponent(matcher: OrderComponentMatcher<OrderComponent<NavigationBarComponentId>>, component: NavigationBarComponentId | NavigationBarOrderComponent, location?: InsertOrderComponentLocation, orderContext?: OrderContext): {
6147
6641
  inserted: boolean;
6148
- order: OrderComponent<NavigationBarComponentId>[];
6642
+ order: (OrderComponent<string> | {
6643
+ id: string;
6644
+ })[];
6149
6645
  };
6150
6646
  /**
6151
6647
  * Gets the current rendering order of navigation bar components.
@@ -6154,6 +6650,7 @@ export declare class UserInterfaceAPI {
6154
6650
  * registerComponent. Returns the order for the specified context, or
6155
6651
  * defaults to Transform mode if no context is provided.
6156
6652
  *
6653
+ * @deprecated Use `getComponentOrder({ in: 'ly.img.navigation.bar' })` instead.
6157
6654
  * @category UI Layout
6158
6655
  * @param orderContext - Optional context specifying which order to retrieve.
6159
6656
  * @returns Array of component configurations defining the navigation bar order.
@@ -6167,6 +6664,7 @@ export declare class UserInterfaceAPI {
6167
6664
  * of the canvas. Different orders can be set for different contexts
6168
6665
  * (e.g., Transform or Text edit modes). Defaults to Transform mode if no context is provided.
6169
6666
  *
6667
+ * @deprecated Use `setComponentOrder({ in: 'ly.img.canvas.bar', at: position }, order)` instead.
6170
6668
  * @category UI Layout
6171
6669
  * @param canvasBarOrder - Array of component IDs defining the canvas bar order.
6172
6670
  * @param position - The canvas bar position ('top' or 'bottom').
@@ -6180,6 +6678,7 @@ export declare class UserInterfaceAPI {
6180
6678
  * registerComponent. Returns the order for the specified context, or
6181
6679
  * defaults to Transform mode if no context is provided.
6182
6680
  *
6681
+ * @deprecated Use `getComponentOrder({ in: 'ly.img.canvas.bar', at: position })` instead.
6183
6682
  * @category UI Layout
6184
6683
  * @param position - The canvas bar position ('top' or 'bottom').
6185
6684
  * @param orderContext - Optional context specifying which order to retrieve.
@@ -6197,6 +6696,7 @@ export declare class UserInterfaceAPI {
6197
6696
  *
6198
6697
  * The update API can be used in different contexts (such as edit modes and bar positions).
6199
6698
  *
6699
+ * @deprecated Use `updateOrderComponent({ in: 'ly.img.canvas.bar', at: position, match }, update)` instead.
6200
6700
  * @category UI Layout
6201
6701
  * @param matcher - Function or object to match the component to update.
6202
6702
  * @param update - New ID, partial properties, or updater function for the component.
@@ -6216,6 +6716,7 @@ export declare class UserInterfaceAPI {
6216
6716
  *
6217
6717
  * The remove API can be used in different contexts (such as edit modes and bar positions).
6218
6718
  *
6719
+ * @deprecated Use `removeOrderComponent({ in: 'ly.img.canvas.bar', at: position, match })` instead.
6219
6720
  * @category UI Layout
6220
6721
  * @param matcher - Function or object to match the component to remove.
6221
6722
  * @param position - The canvas bar position ('top' or 'bottom').
@@ -6229,12 +6730,13 @@ export declare class UserInterfaceAPI {
6229
6730
  /**
6230
6731
  * Inserts a component into the render order of the canvas bar.
6231
6732
  *
6232
- * This method inserts a new canvas bar order component before, after, or to replace a component matching
6733
+ * This method inserts a new canvas bar order component before or after a component matching
6233
6734
  * the provided matcher. The matcher can be a function or an object describing the component to match.
6234
- * The location can be 'before', 'after', or 'replace'.
6735
+ * The location can be 'before' or 'after'.
6235
6736
  *
6236
6737
  * The insert API can be used in different contexts (such as edit modes and bar positions).
6237
6738
  *
6739
+ * @deprecated Use `insertOrderComponent({ in: 'ly.img.canvas.bar', at: position, before/after }, component)` instead.
6238
6740
  * @category UI Layout
6239
6741
  * @param component - The component ID or configuration to insert.
6240
6742
  * @param matcher - Function or object to match the component to insert relative to.
@@ -6245,8 +6747,247 @@ export declare class UserInterfaceAPI {
6245
6747
  */
6246
6748
  insertCanvasBarOrderComponent(matcher: OrderComponentMatcher<OrderComponent<CanvasBarComponentId>>, component: CanvasBarComponentId | OrderComponent<CanvasBarComponentId>, position: 'top' | 'bottom', location?: InsertOrderComponentLocation, orderContext?: OrderContext): {
6247
6749
  inserted: boolean;
6248
- order: OrderComponent<CanvasBarComponentId>[];
6750
+ order: (OrderComponent<string> | {
6751
+ id: string;
6752
+ })[];
6249
6753
  };
6754
+ /**
6755
+ * Sets the rendering order of components in a UI area.
6756
+ *
6757
+ * This unified method replaces area-specific methods like `setDockOrder`,
6758
+ * `setInspectorBarOrder`, etc. It provides a consistent API for all UI areas.
6759
+ *
6760
+ * @category Unified Component Order API
6761
+ * @param options - Location options specifying which area to set. For canvas bar, requires `at` position.
6762
+ * @param order - Array of component IDs or component objects defining the order.
6763
+ *
6764
+ * @example
6765
+ * ```typescript
6766
+ * // Set dock order
6767
+ * cesdk.ui.setComponentOrder({ in: 'ly.img.dock' }, ['ly.img.spacer', 'my.button']);
6768
+ *
6769
+ * // Set canvas bar order (requires position)
6770
+ * cesdk.ui.setComponentOrder(
6771
+ * { in: 'ly.img.canvas.bar', at: 'top' },
6772
+ * ['ly.img.settings.canvasBar']
6773
+ * );
6774
+ *
6775
+ * // Set order with edit mode context
6776
+ * cesdk.ui.setComponentOrder(
6777
+ * { in: 'ly.img.inspector.bar', when: { editMode: 'Text' } },
6778
+ * ['ly.img.text.typeFace.inspectorBar', 'ly.img.text.bold.inspectorBar']
6779
+ * );
6780
+ * ```
6781
+ */
6782
+ setComponentOrder<A extends UIArea>(options: SetOrderOptions<A>, order: ComponentSpec<A>[]): void;
6783
+ /**
6784
+ * Gets the current rendering order of components in a UI area.
6785
+ *
6786
+ * This unified method replaces area-specific methods like `getDockOrder`,
6787
+ * `getInspectorBarOrder`, etc.
6788
+ *
6789
+ * @category Unified Component Order API
6790
+ * @param options - Location options specifying which area to get. For canvas bar, requires `at` position.
6791
+ * @returns Array of components in the specified area.
6792
+ *
6793
+ * @example
6794
+ * ```typescript
6795
+ * // Get dock order
6796
+ * const dockOrder = cesdk.ui.getComponentOrder({ in: 'ly.img.dock' });
6797
+ *
6798
+ * // Get canvas bar order (requires position)
6799
+ * const canvasBarTop = cesdk.ui.getComponentOrder({ in: 'ly.img.canvas.bar', at: 'top' });
6800
+ *
6801
+ * // Get order with edit mode context
6802
+ * const cropOrder = cesdk.ui.getComponentOrder({
6803
+ * in: 'ly.img.inspector.bar',
6804
+ * when: { editMode: 'Crop' }
6805
+ * });
6806
+ * ```
6807
+ */
6808
+ getComponentOrder<A extends UIArea>(options: GetOrderOptions<A>): OrderComponentFor<A>[];
6809
+ /**
6810
+ * Updates components matching a criteria in one or more UI areas.
6811
+ *
6812
+ * This unified method replaces area-specific update methods. Supports glob
6813
+ * patterns for both areas and component matching.
6814
+ *
6815
+ * **Canvas Bar Note:** For `ly.img.canvas.bar`, if `options.at` is omitted,
6816
+ * the update applies to BOTH top and bottom bars and results are combined.
6817
+ *
6818
+ * @category Unified Component Order API
6819
+ * @param options - Match options specifying where and what to update.
6820
+ * @param update - New ID, partial properties, or updater function.
6821
+ * @returns For single area: UpdateResult. For multi-area: MultiAreaUpdateResult.
6822
+ *
6823
+ * @example
6824
+ * ```typescript
6825
+ * // Update by exact ID
6826
+ * cesdk.ui.updateOrderComponent(
6827
+ * { in: 'ly.img.dock', match: 'ly.img.separator' },
6828
+ * { key: 'my-separator' }
6829
+ * );
6830
+ *
6831
+ * // Update by glob pattern
6832
+ * cesdk.ui.updateOrderComponent(
6833
+ * { in: 'ly.img.dock', match: 'ly.img.*' },
6834
+ * { disabled: true }
6835
+ * );
6836
+ *
6837
+ * // Update using function
6838
+ * cesdk.ui.updateOrderComponent(
6839
+ * { in: 'ly.img.inspector.bar', match: 'first' },
6840
+ * (component) => ({ key: `${component.id}-modified` })
6841
+ * );
6842
+ *
6843
+ * // Update across multiple areas
6844
+ * const results = cesdk.ui.updateOrderComponent(
6845
+ * { in: '*', match: 'ly.img.separator' },
6846
+ * { key: 'global-sep' }
6847
+ * );
6848
+ * ```
6849
+ */
6850
+ updateOrderComponent<A extends UIAreaSpecifier>(options: ComponentMatchOptions<A>, update: UpdateSpec<UIArea>): A extends UIArea ? UpdateResult<A> : MultiAreaUpdateResult;
6851
+ /**
6852
+ * Removes components matching a criteria from one or more UI areas.
6853
+ *
6854
+ * This unified method replaces area-specific remove methods. Supports glob
6855
+ * patterns for both areas and component matching.
6856
+ *
6857
+ * **Canvas Bar Note:** For `ly.img.canvas.bar`, if `options.at` is omitted,
6858
+ * the removal applies to BOTH top and bottom bars and results are combined.
6859
+ *
6860
+ * @category Unified Component Order API
6861
+ * @param options - Match options specifying where and what to remove.
6862
+ * @returns For single area: RemoveResult. For multi-area: MultiAreaRemoveResult.
6863
+ *
6864
+ * @example
6865
+ * ```typescript
6866
+ * // Remove by exact ID
6867
+ * cesdk.ui.removeOrderComponent({ in: 'ly.img.dock', match: 'ly.img.separator' });
6868
+ *
6869
+ * // Remove by position
6870
+ * cesdk.ui.removeOrderComponent({ in: 'ly.img.inspector.bar', match: 'last' });
6871
+ *
6872
+ * // Remove by glob pattern
6873
+ * cesdk.ui.removeOrderComponent({ in: 'ly.img.dock', match: 'ly.img.*' });
6874
+ *
6875
+ * // Remove from all areas
6876
+ * const results = cesdk.ui.removeOrderComponent({
6877
+ * in: '*',
6878
+ * match: 'ly.img.separator'
6879
+ * });
6880
+ * ```
6881
+ */
6882
+ removeOrderComponent<A extends UIAreaSpecifier>(options: ComponentMatchOptions<A>): A extends UIArea ? RemoveResult<A> : MultiAreaRemoveResult;
6883
+ /**
6884
+ * Inserts one or more components into a UI area at a specified position.
6885
+ *
6886
+ * This unified method replaces area-specific insert methods. Supports
6887
+ * inserting before, after, or at a specific index. When inserting multiple
6888
+ * components, they are inserted in order at the specified position.
6889
+ *
6890
+ * **Canvas Bar Note:** For `ly.img.canvas.bar`, `options.at` is required
6891
+ * and must specify either 'top' or 'bottom'.
6892
+ *
6893
+ * @category Unified Component Order API
6894
+ * @param options - Insert options specifying where to insert.
6895
+ * @param components - The component ID(s) or object(s) to insert. Can be a single component or an array.
6896
+ * @returns InsertResult with success status, count, and new order.
6897
+ *
6898
+ * @example
6899
+ * ```typescript
6900
+ * // Append single component to end (default)
6901
+ * cesdk.ui.insertOrderComponent({ in: 'ly.img.dock' }, 'my.button');
6902
+ *
6903
+ * // Insert multiple components at once
6904
+ * cesdk.ui.insertOrderComponent(
6905
+ * { in: 'ly.img.dock', after: 'ly.img.spacer' },
6906
+ * ['my.button.1', 'my.button.2', 'my.button.3']
6907
+ * );
6908
+ *
6909
+ * // Insert before a component
6910
+ * cesdk.ui.insertOrderComponent(
6911
+ * { in: 'ly.img.dock', before: 'ly.img.separator' },
6912
+ * 'my.button'
6913
+ * );
6914
+ *
6915
+ * // Insert after a component
6916
+ * cesdk.ui.insertOrderComponent(
6917
+ * { in: 'ly.img.inspector.bar', after: 'ly.img.fill.inspectorBar' },
6918
+ * 'my.fill.tool'
6919
+ * );
6920
+ *
6921
+ * // Insert at specific position
6922
+ * cesdk.ui.insertOrderComponent(
6923
+ * { in: 'ly.img.dock', position: 'start' },
6924
+ * ['first.button', 'second.button']
6925
+ * );
6926
+ *
6927
+ * // Insert at index
6928
+ * cesdk.ui.insertOrderComponent(
6929
+ * { in: 'ly.img.dock', position: 2 },
6930
+ * 'my.third.button'
6931
+ * );
6932
+ *
6933
+ * // Insert at negative index (from end)
6934
+ * cesdk.ui.insertOrderComponent(
6935
+ * { in: 'ly.img.dock', position: -1 },
6936
+ * 'my.before.last.button'
6937
+ * );
6938
+ * ```
6939
+ */
6940
+ insertOrderComponent<A extends UIArea>(options: InsertComponentOptions<A>, components: ComponentSpec<A> | ComponentSpec<A>[]): InsertResult<A>;
6941
+ /**
6942
+ * Gets the active order context for a UI area.
6943
+ *
6944
+ * Returns the full context including both settable properties (like `view` for
6945
+ * the caption panel) and engine-derived properties (like `editMode`).
6946
+ *
6947
+ * @category Unified Component Order API
6948
+ * @param options - Location options specifying which area to get context for.
6949
+ * @returns The full order context for the area, or undefined if no context has been set.
6950
+ *
6951
+ * @example
6952
+ * ```typescript
6953
+ * // Get caption panel context
6954
+ * const context = cesdk.ui.getOrderContext({ in: 'ly.img.caption.panel' });
6955
+ * // → { view: 'edit', editMode: 'Transform' } | undefined
6956
+ *
6957
+ * // Get inspector bar context (editMode only, derived from engine)
6958
+ * const inspectorContext = cesdk.ui.getOrderContext({ in: 'ly.img.inspector.bar' });
6959
+ * // → { editMode: 'Crop' } | undefined
6960
+ * ```
6961
+ */
6962
+ getOrderContext<A extends UIArea>(options: {
6963
+ in: A;
6964
+ }): OrderContextFor<A> | undefined;
6965
+ /**
6966
+ * Sets the active order context for a UI area.
6967
+ *
6968
+ * Only accepts settable properties (excludes base OrderContext properties like
6969
+ * `editMode` which are derived from the engine). For the caption panel, this
6970
+ * means you can set the `view` property.
6971
+ *
6972
+ * @category Unified Component Order API
6973
+ * @param options - Location options specifying which area to set context for.
6974
+ * @param context - The context properties to set. Only settable properties are accepted.
6975
+ *
6976
+ * @example
6977
+ * ```typescript
6978
+ * // Set caption panel to style view
6979
+ * cesdk.ui.setOrderContext(
6980
+ * { in: 'ly.img.caption.panel' },
6981
+ * { view: 'style' }
6982
+ * );
6983
+ *
6984
+ * // Note: editMode cannot be set via this API - it's engine-derived
6985
+ * // Use cesdk.engine.editor.setEditMode('Crop') instead
6986
+ * ```
6987
+ */
6988
+ setOrderContext<A extends UIArea>(options: {
6989
+ in: A;
6990
+ }, context: UIAreaContext<A>): void;
6250
6991
  /**
6251
6992
  * Adds a new asset library entry for display in asset libraries.
6252
6993
  *