@i2analyze/notebook-sdk 1.10.0-dev.2 → 1.10.0-dev.20

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.
@@ -68,10 +68,11 @@ export declare namespace app {
68
68
  */
69
69
  readonly serverComponents: IServerComponents;
70
70
  /**
71
- * Queues a function that performs tracked mutations on the application contents at the next available opportunity,
72
- * and can respond to the changes that the mutations cause.
71
+ * Queues a function that performs tracked mutations on the application contents.
73
72
  *
74
73
  * @remarks
74
+ * The mutations are performed at the next available opportunity, and can respond to the changes that they cause.
75
+ *
75
76
  * A mutation is an operation that can read or modify the contents of the application.
76
77
  * A successful set of _tracked_ mutations is added as a single entry to the undo stack.
77
78
  *
@@ -97,10 +98,11 @@ export declare namespace app {
97
98
  */
98
99
  runTrackedMutations(mutationHandler: TrackedMutationHandler, options?: ITransactionOptions): Promise<IMutationResult>;
99
100
  /**
100
- * Queues a function that performs untracked mutations on the application contents at the next available opportunity,
101
- * and can respond to the changes that the mutations cause.
101
+ * Queues a function that performs untracked mutations on the application contents.
102
102
  *
103
103
  * @remarks
104
+ * The mutations are performed at the next available opportunity, and can respond to the changes that they cause.
105
+ *
104
106
  * A mutation is an operation that can read or modify the contents of the application.
105
107
  * _Untracked_ mutations are not added to the undo stack, and therefore cannot be undone.
106
108
  *
@@ -432,6 +434,8 @@ export declare namespace app {
432
434
  *
433
435
  * @remarks
434
436
  *
437
+ * The effect depends on the chosen option:
438
+ *
435
439
  * `addRecordsToSelection` adds the records from the group to the current selection;
436
440
  * `setSelectionToRecords` sets the selection to the records from the group;
437
441
  * `setSelectionToNewRecords` sets the selection to records from the group that were not already on the chart.
@@ -597,17 +601,71 @@ export declare namespace app {
597
601
  }
598
602
  /**
599
603
  * A set of methods for modifying the appearance of an edge summary.
604
+ *
605
+ * @remarks
606
+ * Apart from {@link app.IEdgeSummaryEditor.setLabel | setLabel} (which is tracked,
607
+ * persisted, and undoable), every method on this editor sets or clears an **untracked**
608
+ * style override on the summary line.
609
+ *
610
+ * Each style setter accepts `undefined` to clear that single attribute and revert it to
611
+ * the value derived from the member edges. Every style setter throws if the edge summary
612
+ * is no longer live.
600
613
  * @i2since 1.6
601
614
  */
602
615
  export interface IEdgeSummaryEditor {
603
616
  /**
604
617
  * Sets or resets the label of the edge summary.
605
618
  *
619
+ * @remarks
620
+ * Tracked: the change is persisted to the server and added to the undo stack.
621
+ *
606
622
  * @param label - The label to set, or `undefined` to reset the label to the default.
607
623
  * @returns The edge summary, with its label set to the specified value.
608
624
  * @i2since 1.6
609
625
  */
610
626
  setLabel(label: string | undefined): this;
627
+ /**
628
+ * Sets or clears the color override on the edge summary line.
629
+ *
630
+ * @param color - The color to set, or `undefined` to clear the override.
631
+ * @returns This editor, for chaining.
632
+ * @throws `Error` if the value is not `undefined` or a CSS color string.
633
+ * @throws `Error` if the edge summary is no longer live.
634
+ * @i2since 1.10
635
+ */
636
+ setColor(color: string | undefined): this;
637
+ /**
638
+ * Sets or clears the width override on the edge summary line.
639
+ *
640
+ * @param width - The width to set (1 to 32), or `undefined` to clear the override.
641
+ * @returns This editor, for chaining.
642
+ * @throws `Error` if the value is not `undefined` or a finite number in the range 1 to 32.
643
+ * @throws `Error` if the edge summary is no longer live.
644
+ * @i2since 1.10
645
+ */
646
+ setWidth(width: number | undefined): this;
647
+ /**
648
+ * Sets or clears the line style override on the edge summary line.
649
+ *
650
+ * @param lineStyle - The line style to set, or `undefined` to clear the override.
651
+ * @returns This editor, for chaining.
652
+ * @throws `Error` if the value is not `undefined` or a recognized
653
+ * {@link visual.LineStyle | LineStyle}.
654
+ * @throws `Error` if the edge summary is no longer live.
655
+ * @i2since 1.10
656
+ */
657
+ setLineStyle(lineStyle: visual.LineStyle | undefined): this;
658
+ /**
659
+ * Sets or clears the direction override on the edge summary line.
660
+ *
661
+ * @param direction - The direction to set, or `undefined` to clear the override.
662
+ * @returns This editor, for chaining.
663
+ * @throws `Error` if the value is not `undefined` or a recognized
664
+ * {@link data.LinkDirection | LinkDirection}.
665
+ * @throws `Error` if the edge summary is no longer live.
666
+ * @i2since 1.10
667
+ */
668
+ setDirection(direction: data.LinkDirection | undefined): this;
611
669
  }
612
670
  /**
613
671
  * A set of methods for modifying common record data.
@@ -728,16 +786,52 @@ export declare namespace app {
728
786
  * @i2since 1.5
729
787
  */
730
788
  setLabel(label: string | undefined): this;
789
+ /**
790
+ * Sets a badge icon in the given slot on the element.
791
+ *
792
+ * @param slot - The slot position (0 to 5). Slots 0 to 2 are trailing; slots 3 to 5 are leading.
793
+ * @param href - The URL of the badge icon image.
794
+ * @param description - A description of the badge, used as alternative text and in tooltips.
795
+ * @returns The element, with the badge icon in the specified slot set to the specified value.
796
+ * @i2since 1.10
797
+ */
798
+ setBadge(slot: visual.BadgeSlot, href: string, description?: string): this;
799
+ /**
800
+ * Clears the badge icon in the given slot on the element.
801
+ *
802
+ * @remarks
803
+ * After this call, {@link visual.IElementStyleBase.getBadge | style.getBadge(slot)}
804
+ * returns `undefined` and {@link visual.IElementStyleBase.badges | style.badges}
805
+ * no longer includes an entry for the slot.
806
+ *
807
+ * @param slot - The slot position (0 to 5).
808
+ * @param href - `undefined` is the only valid argument for clearing the slot.
809
+ * @returns The element, with the badge icon in the specified slot cleared.
810
+ * @i2since 1.10
811
+ */
812
+ setBadge(slot: visual.BadgeSlot, href: undefined): this;
813
+ /**
814
+ * Clears all badge icons on the element.
815
+ *
816
+ * @remarks
817
+ * After this call, {@link visual.IElementStyleBase.badges | style.badges} is
818
+ * empty and {@link visual.IElementStyleBase.getBadge | style.getBadge(slot)}
819
+ * returns `undefined` for every slot.
820
+ *
821
+ * @returns The element, with all badge icons cleared.
822
+ * @i2since 1.10
823
+ */
824
+ clearBadges(): this;
731
825
  }
732
826
  /**
733
827
  * A set of methods for modifying the appearance of a node.
734
828
  * @i2since 1.2
735
829
  */
736
- export interface INodeEditor extends Omit<IElementEditorBase, 'setColor'> {
830
+ export interface INodeEditor extends IElementEditorBase {
737
831
  /**
738
832
  * Sets or resets the color of the element.
739
833
  *
740
- * @param color - The color to set, or `undefined` to reset the color to the theme default, or 'null' to remove the color.
834
+ * @param color - The color to set, or `undefined` to reset the color to the theme default, or `null` to remove the color.
741
835
  * @returns The element, with its color set to the specified value.
742
836
  * @throws `Error` if the specified value is not in a form that CSS supports, such as a hexadecimal number, an `rgb()` value, or a color name.
743
837
  * @i2since 1.2
@@ -1173,6 +1267,36 @@ export declare namespace app {
1173
1267
  * @i2since 1.8
1174
1268
  */
1175
1269
  addNodeGroup(nodes: Iterable<NodeSpecifier>): IPendingNodeGroup;
1270
+ /**
1271
+ * Gets an object with methods for hinting the appearance of a new entity record's node.
1272
+ *
1273
+ * @remarks
1274
+ * The record must be a pending record that was created earlier in the same mutation by a call to
1275
+ * {@link app.ITrackedMutations.addEntityRecord}. The hints are applied to the node as the server
1276
+ * creates it, so that the node does not first appear with its default appearance and then change.
1277
+ * If you do not call this method for a record, the server creates a node with the default
1278
+ * appearance.
1279
+ *
1280
+ * @param record - The pending entity record whose node is to be hinted.
1281
+ * @returns An object with methods for hinting the appearance of the node.
1282
+ * @i2since 1.10
1283
+ */
1284
+ createNode(record: IPendingRecord): INodeEditor;
1285
+ /**
1286
+ * Gets an object with methods for hinting the appearance of a new link record's edge.
1287
+ *
1288
+ * @remarks
1289
+ * The record must be a pending record that was created earlier in the same mutation by a call to
1290
+ * {@link app.ITrackedMutations.addLinkRecord}. The hints are applied to the edge as the server
1291
+ * creates it, so that the edge does not first appear with its default appearance and then change.
1292
+ * If you do not call this method for a record, the server creates an edge with the default
1293
+ * appearance.
1294
+ *
1295
+ * @param record - The pending link record whose edge is to be hinted.
1296
+ * @returns An object with methods for hinting the appearance of the edge.
1297
+ * @i2since 1.10
1298
+ */
1299
+ createEdge(record: IPendingRecord): IEdgeEditor;
1176
1300
  /**
1177
1301
  * Gets an object with methods for editing a record.
1178
1302
  *
@@ -1892,6 +2016,17 @@ export declare namespace chart {
1892
2016
  */
1893
2017
  readonly removed: data.IReadOnlyCollection<data.SourceReferenceId>;
1894
2018
  };
2019
+ /**
2020
+ * Gets a value that indicates whether the direction of a link record changed.
2021
+ *
2022
+ * @remarks
2023
+ * This field is present, with a value of `true`, only for link records whose
2024
+ * {@link records.IChartLinkRecord.linkDirection | linkDirection} differs from its previous value.
2025
+ * The field is absent for entity records, and for link records whose direction is unchanged.
2026
+ *
2027
+ * @i2since 1.10
2028
+ */
2029
+ readonly direction?: true;
1895
2030
  }
1896
2031
  /**
1897
2032
  * A change that has occurred to the data in a chart.
@@ -2141,6 +2276,11 @@ export declare namespace chart {
2141
2276
  * @i2since 1.9
2142
2277
  */
2143
2278
  readonly brushsetchange: BrushSetChangeListener;
2279
+ /**
2280
+ * Gets the type of the callback method that listens for "charthoverchange" events.
2281
+ * @i2since 1.10
2282
+ */
2283
+ readonly charthoverchange: HoverChangeListener;
2144
2284
  }
2145
2285
  /**
2146
2286
  * A mapping of chart event types to their listener options types.
@@ -2172,6 +2312,11 @@ export declare namespace chart {
2172
2312
  * @i2since 1.9
2173
2313
  */
2174
2314
  readonly brushsetchange: app.ISubscriptionOptions;
2315
+ /**
2316
+ * Gets the type of the object that provides control over "charthoverchange" event listeners.
2317
+ * @i2since 1.10
2318
+ */
2319
+ readonly charthoverchange: app.ISubscriptionOptions;
2175
2320
  }
2176
2321
  /**
2177
2322
  * A callback function that handles chart selection events.
@@ -2213,6 +2358,18 @@ export declare namespace chart {
2213
2358
  * @i2since 1.9
2214
2359
  */
2215
2360
  export type BrushSetChangeListener = (brushSet: visual.IBrushSet, applicationContents: app.IApplicationContents) => void;
2361
+ /**
2362
+ * A callback function that handles chart hover change events.
2363
+ *
2364
+ * @remarks
2365
+ * This callback fires when the pointer moves over a different chart element, or when it enters or leaves
2366
+ * all chart elements. It does not fire on every `pointermove` — only when the hovered element changes.
2367
+ *
2368
+ * @param element - The chart element now under the pointer, or `null` if the pointer has left all chart elements.
2369
+ * @param applicationContents - The contents of the application, including the current chart.
2370
+ * @i2since 1.10
2371
+ */
2372
+ export type HoverChangeListener = (element: visual.INode | visual.IEdge | visual.IEdgeSummary | visual.INodeGroup | null, applicationContents: app.IApplicationContents) => void;
2216
2373
  /**
2217
2374
  * Constraints that control a view-fitting operation.
2218
2375
  *
@@ -2264,7 +2421,64 @@ export declare namespace commands {
2264
2421
  * A type for a group of actions, which determines how the group is rendered in the user interface.
2265
2422
  * @i2since 1.9
2266
2423
  */
2267
- export type GroupType = 'expanded' | 'collapsed' | 'command';
2424
+ export type GroupType = 'expanded' | 'collapsed' | 'command' | 'stacked';
2425
+ /**
2426
+ * The state of the keyboard modifier keys at the point at which a command was triggered.
2427
+ * @i2since 1.10
2428
+ */
2429
+ export interface IModifierKeys {
2430
+ /**
2431
+ * Indicates whether the <kbd>Ctrl</kbd> key was held when the command was triggered.
2432
+ * @i2since 1.10
2433
+ */
2434
+ readonly ctrl: boolean;
2435
+ /**
2436
+ * Indicates whether the <kbd>Shift</kbd> key was held when the command was triggered.
2437
+ * @i2since 1.10
2438
+ */
2439
+ readonly shift: boolean;
2440
+ /**
2441
+ * Indicates whether the <kbd>Alt</kbd> key (<kbd>Option</kbd> on macOS) was held when the command was triggered.
2442
+ * @i2since 1.10
2443
+ */
2444
+ readonly alt: boolean;
2445
+ /**
2446
+ * Indicates whether the meta key (<kbd>Command</kbd> on macOS, the Windows key on Windows) was held when the
2447
+ * command was triggered.
2448
+ * @i2since 1.10
2449
+ */
2450
+ readonly meta: boolean;
2451
+ }
2452
+ /**
2453
+ * Context that describes where and how a command was triggered.
2454
+ *
2455
+ * @remarks
2456
+ * This context is mixed into the payload that every command receives. Its members are populated when the
2457
+ * command is triggered from a position on the chart, such as when a pop-up (right-click) menu is opened.
2458
+ * They are `undefined` when the command is triggered without a positional origin, for example from a ribbon
2459
+ * or programmatically.
2460
+ * @i2since 1.10
2461
+ */
2462
+ export interface ICommandInvocationContext {
2463
+ /**
2464
+ * Gets the position on the chart at which the command was triggered, in chart coordinates.
2465
+ *
2466
+ * @remarks
2467
+ * This is `undefined` if the command was triggered without a positional origin. For example, when a
2468
+ * command is invoked from a pop-up (right-click) menu, this is the position on the chart at which the
2469
+ * menu was opened.
2470
+ * @i2since 1.10
2471
+ */
2472
+ readonly triggerPosition?: visual.IPosition;
2473
+ /**
2474
+ * Gets the state of the keyboard modifier keys at the point at which the command was triggered.
2475
+ *
2476
+ * @remarks
2477
+ * This is `undefined` if the command was not triggered by a user input event.
2478
+ * @i2since 1.10
2479
+ */
2480
+ readonly modifierKeys?: IModifierKeys;
2481
+ }
2268
2482
  /**
2269
2483
  * A mapping of command types to their payload types.
2270
2484
  * @i2since 1.0
@@ -2286,6 +2500,20 @@ export declare namespace commands {
2286
2500
  */
2287
2501
  readonly unscoped: void;
2288
2502
  }
2503
+ /**
2504
+ * A mapping of command types to the payload that their {@link commands.ICommandConfig.onExecute}
2505
+ * callback receives.
2506
+ *
2507
+ * @remarks
2508
+ * This is the command's base payload from {@link commands.CommandPayloadMap} combined with the
2509
+ * {@link commands.ICommandInvocationContext} that describes where and how the command was triggered.
2510
+ * Unlike {@link commands.CommandPayloadMap}, which also types the `onPopulate` callback of a dynamic
2511
+ * group, this mapping applies only when a command is executed.
2512
+ * @i2since 1.10
2513
+ */
2514
+ export type CommandExecutePayloadMap = {
2515
+ readonly [TCommandType in CommandType]: CommandPayloadMap[TCommandType] extends void ? ICommandInvocationContext : CommandPayloadMap[TCommandType] & ICommandInvocationContext;
2516
+ };
2289
2517
  /**
2290
2518
  * A mapping of command types to the event types that are available to a surfaced command.
2291
2519
  * @i2since 1.0
@@ -2381,7 +2609,10 @@ export declare namespace commands {
2381
2609
  */
2382
2610
  readonly icon: IIcon;
2383
2611
  /**
2384
- * Gets the identifier of the command, which must be a GUID. GUIDs are case-insensitive.
2612
+ * Gets the identifier of the command. This must be a non-empty string.
2613
+ *
2614
+ * @remarks
2615
+ * Using a GUID, or another globally-unique value, is recommended to avoid collisions with other plug-ins.
2385
2616
  * @i2since 1.0
2386
2617
  */
2387
2618
  readonly id: CommandId;
@@ -2409,10 +2640,12 @@ export declare namespace commands {
2409
2640
  /**
2410
2641
  * Runs when the command is executed.
2411
2642
  *
2412
- * @param payload - The payload that i2 Notebook provides to the command.
2643
+ * @param payload - The payload that i2 Notebook provides to the command. As well as the base payload
2644
+ * for the command type, this includes the {@link commands.ICommandInvocationContext}
2645
+ * that describes where and how the command was triggered.
2413
2646
  * @i2since 1.0
2414
2647
  */
2415
- onExecute(payload: CommandPayloadMap[TCommandType]): void;
2648
+ onExecute(payload: CommandExecutePayloadMap[TCommandType]): void;
2416
2649
  /**
2417
2650
  * Runs when an action derived from the command is surfaced, enabling the command to configure the action in response to events.
2418
2651
  *
@@ -2503,11 +2736,29 @@ export declare namespace commands {
2503
2736
  * Adds the specified group of actions to the user interface.
2504
2737
  *
2505
2738
  * @param group - The group to add.
2739
+ * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroupConfigBase.onSurface}.
2506
2740
  * @returns An object that you can use to add actions or a further group to the new group.
2507
2741
  * @throws `Error` if the `group` was not valid, or if a group with the same {@link commands.GroupId} was already present.
2508
2742
  * @i2since 1.0
2509
2743
  */
2510
- addGroup(group: IGroup): IActionArea<undefined>;
2744
+ addGroup<TCommandType extends CommandType = 'unscoped'>(group: IGroup<TCommandType>): IActionArea<undefined>;
2745
+ /**
2746
+ * Adds a dynamic group whose commands are created on demand each time the group is opened.
2747
+ *
2748
+ * @remarks
2749
+ * Unlike {@link commands.IActionArea.addGroup}, the commands in a dynamic group are not created during plug-in
2750
+ * initialization. Instead, the {@link commands.IDynamicGroupConfigBase.onPopulate} callback is called each time the
2751
+ * group is opened, allowing you to create commands that reflect the current application state.
2752
+ *
2753
+ * A dynamic group renders as a popup, never inline: by default a collapsed dropdown/submenu, or — when
2754
+ * `config.type` is `'command'` with a `primaryCommand` — a split button whose dropdown is populated on open.
2755
+ *
2756
+ * @param config - The configuration for the dynamic group, including the `onPopulate` callback.
2757
+ * @typeParam TCommandType - The type of the command-context for the group, which determines what payload is passed to `onPopulate` and what event API is passed to `onSurface`.
2758
+ * @throws `Error` if `config.id` is not a valid {@link commands.GroupId | GroupId}.
2759
+ * @i2since 1.10
2760
+ */
2761
+ addDynamicGroup<TCommandType extends CommandType = CommandType>(config: IDynamicGroupConfig<TCommandType>): void;
2511
2762
  /**
2512
2763
  * Adds the specified group of actions to the user interface, or gets an existing group with the same identifier.
2513
2764
  *
@@ -2517,11 +2768,12 @@ export declare namespace commands {
2517
2768
  * plug-ins that want to use the same group, and these plug-ins can be deployed independently, then you should use this method.
2518
2769
  *
2519
2770
  * @param group - The group to add or get.
2771
+ * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroupConfigBase.onSurface}.
2520
2772
  * @returns An object that you can use to add actions or a further group to the new or existing group.
2521
2773
  * @throws `Error` if the `group` was not valid, or if it was added before by the same plug-in.
2522
2774
  * @i2since 1.0
2523
2775
  */
2524
- addOrGetGroup(group: IGroup): IActionArea<undefined>;
2776
+ addOrGetGroup<TCommandType extends CommandType = 'unscoped'>(group: IGroup<TCommandType>): IActionArea<undefined>;
2525
2777
  /**
2526
2778
  * Locates the area of the user interface that appears immediately after a particular action or group of actions.
2527
2779
  *
@@ -2588,6 +2840,24 @@ export declare namespace commands {
2588
2840
  * @i2since 1.0
2589
2841
  */
2590
2842
  surfaceCommands(...commandsOrCommandIds: (ICommand | CommandId)[]): void;
2843
+ /**
2844
+ * Surfaces a detached group, created with {@link commands.ICommandApi.createGroup}, and its contents into the user interface.
2845
+ *
2846
+ * @remarks
2847
+ * Unlike {@link commands.IActionArea.addGroup}, which builds a group in place, `surfaceGroup` adds a group template
2848
+ * that you built once and can reuse. The group and its descendants are added at this area's location — use
2849
+ * {@link commands.IActionArea.(before:1)} or {@link commands.IActionArea.(after:1)} to position it, just as you
2850
+ * would when surfacing commands.
2851
+ *
2852
+ * The template's group and command identifiers are used as they are, so you can surface the same template into
2853
+ * different areas. Surfacing a template more than once into the same area throws, because the identifiers collide.
2854
+ *
2855
+ * @param group - The detached group template to surface.
2856
+ * @throws `Error` if `group` was not a group template created by {@link commands.ICommandApi.createGroup},
2857
+ * or if a command or group in the template was already surfaced in the area.
2858
+ * @i2since 1.10
2859
+ */
2860
+ surfaceGroup(group: IGroupTemplate): void;
2591
2861
  /**
2592
2862
  * Gets the system groups for the action area, which you can use to specify relative locations for your actions and groups.
2593
2863
  * @i2since 1.0
@@ -2679,7 +2949,10 @@ export declare namespace commands {
2679
2949
  */
2680
2950
  export interface IGroupBase {
2681
2951
  /**
2682
- * Gets the identifier of the group, which should be a GUID. GUIDs are case-insensitive.
2952
+ * Gets the identifier of the group. This must be a non-empty string.
2953
+ *
2954
+ * @remarks
2955
+ * Using a GUID, or another globally-unique value, is recommended to avoid collisions with other plug-ins.
2683
2956
  * @i2since 1.0
2684
2957
  */
2685
2958
  readonly id: GroupId;
@@ -2687,29 +2960,95 @@ export declare namespace commands {
2687
2960
  * Indicates whether the group is initially expanded (`false`) or collapsed (`true`) in the user interface.
2688
2961
  *
2689
2962
  * @remarks
2690
- * This is deprecated in favour of the more explicit {@link commands.IGroup."type"} property.
2963
+ * This is deprecated in favour of the more explicit {@link commands.IStandardGroup."type"} property.
2691
2964
  * When migrating, use `type: 'collapsed'` instead of `isCollapsed: true`, and `type: 'expanded'` instead of
2692
2965
  * `isCollapsed: false` or omitting the property.
2693
- * @deprecated Deprecated since version 1.9. Use {@link commands.IGroup."type"} instead.
2966
+ * @deprecated Deprecated since version 1.9. Use {@link commands.IStandardGroup."type"} instead.
2694
2967
  * @i2since 1.5
2695
2968
  */
2696
2969
  readonly isCollapsed?: boolean;
2697
2970
  }
2698
2971
  /**
2699
- * A group of actions in either the i2 Notebook application ribbon or a popup menu.
2972
+ * Configuration shared by the {@link commands.IGroup} variants.
2973
+ *
2974
+ * @remarks
2975
+ * The fields common to the non-split {@link commands.IStandardGroup} and the split-button
2976
+ * {@link commands.ICommandGroup}.
2977
+ * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to {@link commands.IGroupConfigBase.onSurface}. Defaults to `'unscoped'`.
2700
2978
  * @i2since 1.0
2701
2979
  */
2702
- export interface IGroup extends IGroupBase {
2980
+ export interface IGroupConfigBase<TCommandType extends CommandType = 'unscoped'> extends IGroupBase {
2703
2981
  /**
2704
2982
  * Gets the icon of the group, which is displayed if the group is collapsed.
2705
2983
  * @i2since 1.0
2706
2984
  */
2707
2985
  readonly icon?: IIcon;
2708
2986
  /**
2709
- * Gets the label of the group, which is displayed to users unless the group is both expanded and in a popup menu.
2987
+ * Gets the label of the group.
2988
+ *
2989
+ * @remarks
2990
+ * In an application ribbon the label is shown on the group's button (if the group is collapsed or
2991
+ * stacked) or omitted (if the group is expanded inline).
2992
+ *
2993
+ * In popup menus, a group with a label produces a non-interactive section-header separator above
2994
+ * its children. Groups without a label render their children directly with no separator. By
2995
+ * default groups have no label; set one to opt into this visual grouping cue.
2710
2996
  * @i2since 1.0
2711
2997
  */
2712
2998
  readonly label?: string;
2999
+ /**
3000
+ * Gets the popup style for the group's trigger button.
3001
+ *
3002
+ * @remarks
3003
+ * Only applies to `'collapsed'` and `'command'` group types; ignored for `'expanded'` and `'stacked'`.
3004
+ *
3005
+ * When set to `'ribbon'`, the group opens a floating ribbon-style popup panel that renders its
3006
+ * children as ribbon sections rather than a standard dropdown menu. This is equivalent to how a
3007
+ * minimized ribbon tab expands as a popup.
3008
+ *
3009
+ * If omitted, the group uses a standard dropdown menu.
3010
+ * @i2since 1.10
3011
+ */
3012
+ readonly popoutStyle?: 'ribbon';
3013
+ /**
3014
+ * Gets the command-context type, which determines what event API is passed to {@link commands.IGroupConfigBase.onSurface}.
3015
+ *
3016
+ * @remarks
3017
+ * Mirrors {@link commands.IDynamicGroupConfigBase.context} (and, by analogy, {@link commands.ICommandConfig."type"}).
3018
+ * Defaults to `'unscoped'`, which means {@link commands.IGroupConfigBase.onSurface} receives no event API.
3019
+ * @i2since 1.10
3020
+ */
3021
+ readonly context?: TCommandType;
3022
+ /**
3023
+ * Runs when an action derived from the group is surfaced, enabling the group to configure the action in response to events.
3024
+ *
3025
+ * @remarks
3026
+ * Mirrors {@link commands.ICommandConfig.onSurface} but applies to groups: use the supplied
3027
+ * {@link commands.IGroupAction} to change the group's label, icon, or enabled/hidden state at any
3028
+ * time during its surfaced lifetime. The signal aborts when the group is removed from the user
3029
+ * interface; the optional returned cleanup function runs at the same time.
3030
+ *
3031
+ * If there is no implementation of `onSurface()`, the group renders with its static configuration
3032
+ * and remains enabled.
3033
+ *
3034
+ * @param groupAction - The group action being surfaced.
3035
+ * @param eventApi - The events that the group can subscribe to, keyed by the group's `context`.
3036
+ * @param signal - A signal that the application uses to tell the group that it is removing it from the user interface.
3037
+ *
3038
+ * @returns A function that the application calls when it removes the group from the user interface.
3039
+ * In its implementation, the group must unsubscribe from any events that it has subscribed to.
3040
+ * @i2since 1.10
3041
+ */
3042
+ onSurface?(groupAction: IGroupAction, eventApi: CommandEventsMap[TCommandType], signal: AbortSignal): void | (() => void);
3043
+ }
3044
+ /**
3045
+ * A non-split group of actions: rendered inline (`'expanded'`), as a single dropdown button
3046
+ * (`'collapsed'`), or as a stacked column (`'stacked'`).
3047
+ *
3048
+ * @typeParam TCommandType - The type of the command-context for the group. Defaults to `'unscoped'`.
3049
+ * @i2since 1.0
3050
+ */
3051
+ export interface IStandardGroup<TCommandType extends CommandType = 'unscoped'> extends IGroupConfigBase<TCommandType> {
2713
3052
  /**
2714
3053
  * Gets the render type of the group.
2715
3054
  *
@@ -2717,12 +3056,73 @@ export declare namespace commands {
2717
3056
  * Use this property to explicitly control how the group is presented in the user interface. The options are:
2718
3057
  * - `'expanded'` - shows all commands inline (default)
2719
3058
  * - `'collapsed'` - shows the group as a single icon/label button that opens a dropdown
2720
- * - `'command'` - indicates the group exposes a primary action (the first surfaced command) while also presenting a menu of related actions; user may render this as a split button in a ribbon, or as an actionable menu entry with a submenu in popup menus.
3059
+ * - `'stacked'` - renders the group's children as a vertical column of small (icon + label) buttons that expand inline in the ribbon. A stacked group behaves like an `'expanded'` group but with a compact visual layout; it can collapse under overflow pressure. In popup menus the children render as normal menu items below the group's section-header label.
2721
3060
  *
3061
+ * For a split button that exposes a primary action, use {@link commands.ICommandGroup} (`type: 'command'`).
2722
3062
  * If `type` is specified it takes precedence over the deprecated {@link commands.IGroupBase.isCollapsed} boolean.
2723
3063
  * @i2since 1.9
2724
3064
  */
2725
- readonly type?: GroupType;
3065
+ readonly type?: 'expanded' | 'collapsed' | 'stacked';
3066
+ /**
3067
+ * Gets the primary action, which is not applicable to a non-split group.
3068
+ *
3069
+ * @remarks
3070
+ * Use {@link commands.ICommandGroup} (`type: 'command'`) to specify a primary action.
3071
+ * @i2since 1.10
3072
+ */
3073
+ readonly primaryCommand?: never;
3074
+ }
3075
+ /**
3076
+ * A split-button group.
3077
+ *
3078
+ * @remarks
3079
+ * Exposes a {@link commands.ICommandGroup.primaryCommand | primary action} alongside a menu of related
3080
+ * actions. In a ribbon this renders as a split button; in popup menus, as an actionable menu entry with
3081
+ * a submenu.
3082
+ * @typeParam TCommandType - The type of the command-context for the group. Defaults to `'unscoped'`.
3083
+ * @i2since 1.10
3084
+ */
3085
+ export interface ICommandGroup<TCommandType extends CommandType = 'unscoped'> extends IGroupConfigBase<TCommandType> {
3086
+ /**
3087
+ * Gets the render type, always `'command'` for a split-button group.
3088
+ * @i2since 1.9
3089
+ */
3090
+ readonly type: 'command';
3091
+ /**
3092
+ * Gets the group's primary (face) action, as a command or command identifier.
3093
+ *
3094
+ * @remarks
3095
+ * The primary action is shown on the face of the split button (in a ribbon) or as the actionable
3096
+ * part of the menu entry (in a popup menu). It is *not* part of the group's dropdown list — the
3097
+ * dropdown is formed from the group's surfaced child commands. To repeat the primary in the
3098
+ * dropdown, surface it as a child as well.
3099
+ * @i2since 1.10
3100
+ */
3101
+ readonly primaryCommand: ICommand | CommandId;
3102
+ }
3103
+ /**
3104
+ * A group of actions in either the i2 Notebook application ribbon or a popup menu.
3105
+ *
3106
+ * @remarks
3107
+ * Either a non-split {@link commands.IStandardGroup} (inline, collapsed, or stacked) or a split-button
3108
+ * {@link commands.ICommandGroup} (`type: 'command'` with a `primaryCommand`). The `type` discriminates
3109
+ * between them, so `primaryCommand` is required exactly when `type` is `'command'`.
3110
+ *
3111
+ * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its `onSurface`. Defaults to `'unscoped'`.
3112
+ * @i2since 1.0
3113
+ */
3114
+ export type IGroup<TCommandType extends CommandType = 'unscoped'> = IStandardGroup<TCommandType> | ICommandGroup<TCommandType>;
3115
+ /**
3116
+ * A detached group of actions that you build once and surface into one or more areas.
3117
+ *
3118
+ * @remarks
3119
+ * Create a template with {@link commands.ICommandApi.createGroup}, build its contents using the inherited
3120
+ * {@link commands.IActionArea} methods, then add it to areas with {@link commands.IActionArea.surfaceGroup}.
3121
+ * Because the template carries its own group and command identifiers, a single template can be surfaced into
3122
+ * several areas without rebuilding it. Nothing appears in the user interface until the template is surfaced.
3123
+ * @i2since 1.10
3124
+ */
3125
+ export interface IGroupTemplate extends IActionArea<undefined> {
2726
3126
  }
2727
3127
  /**
2728
3128
  * A group of actions in a popup menu that do not have a label or an icon.
@@ -2731,6 +3131,255 @@ export declare namespace commands {
2731
3131
  */
2732
3132
  export interface IMenuGroup extends IGroupBase {
2733
3133
  }
3134
+ /**
3135
+ * Configuration shared by the {@link commands.IDynamicGroupConfig} variants.
3136
+ *
3137
+ * @remarks
3138
+ * The fields common to the collapsed {@link commands.IStandardDynamicGroup} and the split-button
3139
+ * {@link commands.ICommandDynamicGroup}.
3140
+ * A dynamic group solves the limitation that commands can only be created during plug-in initialization.
3141
+ * Instead, the {@link commands.IDynamicGroupConfigBase.onPopulate} callback is called each time the group is
3142
+ * opened, allowing commands to be created based on the current application state. The group's
3143
+ * popup-button state (label, icon, enabled, hidden) can be driven separately by an optional
3144
+ * {@link commands.IDynamicGroupConfigBase.onSurface} callback that runs once when the group is
3145
+ * surfaced on a host.
3146
+ *
3147
+ * @typeParam TCommandType - The type of the command-context for the group, which determines what payload is passed to {@link commands.IDynamicGroupConfigBase.onPopulate} and what event API is passed to {@link commands.IDynamicGroupConfigBase.onSurface}.
3148
+ * @i2since 1.10
3149
+ */
3150
+ export interface IDynamicGroupConfigBase<TCommandType extends CommandType = CommandType> {
3151
+ /**
3152
+ * Gets the identifier of the group. This must be a non-empty string.
3153
+ *
3154
+ * @remarks
3155
+ * Using a GUID, or another globally-unique value, is recommended to avoid collisions with other plug-ins.
3156
+ * @i2since 1.10
3157
+ */
3158
+ readonly id: GroupId;
3159
+ /**
3160
+ * Gets the label of the group, which is displayed as the button/menu-entry title.
3161
+ * @i2since 1.10
3162
+ */
3163
+ readonly label: string;
3164
+ /**
3165
+ * Gets the icon of the group.
3166
+ * @i2since 1.10
3167
+ */
3168
+ readonly icon?: IIcon;
3169
+ /**
3170
+ * Gets the command-context type for the group.
3171
+ *
3172
+ * @remarks
3173
+ * Determines what payload is passed to {@link commands.IDynamicGroupConfigBase.onPopulate} and what
3174
+ * event API is passed to {@link commands.IDynamicGroupConfigBase.onSurface}.
3175
+ * @i2since 1.10
3176
+ */
3177
+ readonly context: TCommandType;
3178
+ /**
3179
+ * Populates the group's commands each time the group is opened.
3180
+ *
3181
+ * @remarks
3182
+ * May be synchronous or asynchronous. A synchronous callback creates and surfaces every
3183
+ * command before it returns; the host then renders the populated group. An asynchronous
3184
+ * callback returns a `Promise` that resolves once the contents are ready: the host opens the
3185
+ * group immediately with skeleton placeholder rows in place of the real items, and swaps them
3186
+ * in atomically when the promise resolves. If the group closes before the promise resolves
3187
+ * the `signal` is aborted and any surfaced commands are discarded.
3188
+ *
3189
+ * @param commandArea - A scoped area for creating and surfacing commands. Only commands created here are visible in this group.
3190
+ * @param context - The context based on the group's `context` field: `undefined` for `'unscoped'`, {@link commands.IRecordsContext} for `'records'`, the application object for `'application'`.
3191
+ * @param signal - An AbortSignal that is aborted when the group closes. Use it to cancel any async work started in this callback.
3192
+ * @returns An optional cleanup function that is called when the group closes, before the signal is aborted. Async callbacks may resolve with the cleanup function or with `undefined`.
3193
+ * @i2since 1.10
3194
+ */
3195
+ onPopulate(commandArea: IDynamicActionArea, context: CommandPayloadMap[TCommandType], signal: AbortSignal): void | (() => void) | Promise<void | (() => void)>;
3196
+ /**
3197
+ * Runs when the dynamic group's popup button is surfaced, enabling its state to be driven from events.
3198
+ *
3199
+ * @remarks
3200
+ * The lifetime of this callback is the dynamic group's *button* — separate from the per-open
3201
+ * lifecycle of {@link commands.IDynamicGroupConfigBase.onPopulate}, which populates the popup's
3202
+ * contents. Use this callback to react to long-lived application state; populate the popup's
3203
+ * contents in `onPopulate`.
3204
+ *
3205
+ * If there is no implementation of `onSurface()`, the popup button renders with its static
3206
+ * configuration and remains enabled.
3207
+ *
3208
+ * @param groupAction - The group action being surfaced.
3209
+ * @param eventApi - The events that the group can subscribe to, keyed by the group's `context`.
3210
+ * @param signal - A signal that the application uses to tell the group that it is removing the popup button from the user interface.
3211
+ *
3212
+ * @returns A function that the application calls when it removes the popup button from the user interface.
3213
+ * In its implementation, the group must unsubscribe from any events that it has subscribed to.
3214
+ * @i2since 1.10
3215
+ */
3216
+ onSurface?(groupAction: IGroupAction, eventApi: CommandEventsMap[TCommandType], signal: AbortSignal): void | (() => void);
3217
+ }
3218
+ /**
3219
+ * A dynamic group that renders as a collapsed dropdown/submenu, populated on open.
3220
+ *
3221
+ * @typeParam TCommandType - The type of the command-context for the group.
3222
+ * @i2since 1.10
3223
+ */
3224
+ export interface IStandardDynamicGroup<TCommandType extends CommandType = CommandType> extends IDynamicGroupConfigBase<TCommandType> {
3225
+ /**
3226
+ * Gets the render type, `'collapsed'` (the default) for a dropdown/submenu.
3227
+ * @i2since 1.10
3228
+ */
3229
+ readonly type?: 'collapsed';
3230
+ /**
3231
+ * Gets the primary action, which is not applicable to a collapsed dynamic group.
3232
+ *
3233
+ * @remarks
3234
+ * Use {@link commands.ICommandDynamicGroup} (`type: 'command'`) to specify a primary action.
3235
+ * @i2since 1.10
3236
+ */
3237
+ readonly primaryCommand?: never;
3238
+ }
3239
+ /**
3240
+ * A dynamic split-button group: a static {@link commands.ICommandDynamicGroup.primaryCommand | primary action}
3241
+ * (the face) whose dropdown is populated on open.
3242
+ *
3243
+ * @typeParam TCommandType - The type of the command-context for the group.
3244
+ * @i2since 1.10
3245
+ */
3246
+ export interface ICommandDynamicGroup<TCommandType extends CommandType = CommandType> extends IDynamicGroupConfigBase<TCommandType> {
3247
+ /**
3248
+ * Gets the render type, always `'command'` for a split-button dynamic group.
3249
+ * @i2since 1.10
3250
+ */
3251
+ readonly type: 'command';
3252
+ /**
3253
+ * Gets the primary (face) action of the split button, as a command or command identifier.
3254
+ *
3255
+ * @remarks
3256
+ * It is *not* part of the dropdown, which is populated by {@link commands.IDynamicGroupConfigBase.onPopulate}.
3257
+ * Because the face renders before the group is ever opened, the primary command must already exist —
3258
+ * create it during plug-in initialization, not inside `onPopulate`.
3259
+ * @i2since 1.10
3260
+ */
3261
+ readonly primaryCommand: ICommand | CommandId;
3262
+ }
3263
+ /**
3264
+ * Configuration for a dynamic group whose commands are created on demand when the group is opened.
3265
+ *
3266
+ * @remarks
3267
+ * A dynamic group renders as a popup, never inline: either a collapsed {@link commands.IStandardDynamicGroup}
3268
+ * dropdown/submenu, or a split-button {@link commands.ICommandDynamicGroup} (`type: 'command'` with a
3269
+ * `primaryCommand`). The `type` discriminates between them, so `primaryCommand` is required exactly when
3270
+ * `type` is `'command'`.
3271
+ *
3272
+ * @typeParam TCommandType - The type of the command-context for the group, which determines what payload is passed to `onPopulate` and what event API is passed to `onSurface`.
3273
+ * @i2since 1.10
3274
+ */
3275
+ export type IDynamicGroupConfig<TCommandType extends CommandType = CommandType> = IStandardDynamicGroup<TCommandType> | ICommandDynamicGroup<TCommandType>;
3276
+ /**
3277
+ * A scoped area for creating and surfacing commands within a {@link commands.IDynamicGroupConfigBase.onPopulate} callback.
3278
+ *
3279
+ * @remarks
3280
+ * Methods on this interface work like their equivalents on {@link commands.IActionArea}, but are scoped to the
3281
+ * current populate session. Commands created here exist only while the group is open and are automatically
3282
+ * unregistered when it closes.
3283
+ *
3284
+ * `getGroup` is restricted to groups created within the same `onPopulate` call — it throws if you pass an
3285
+ * external group identifier.
3286
+ * @i2since 1.10
3287
+ */
3288
+ export interface IDynamicActionArea extends Pick<ICommandApi, 'createCommand'> {
3289
+ /**
3290
+ * Returns an area positioned immediately before the specified action or group.
3291
+ * @param idOrCommand - The command, command identifier, or group identifier to use as a reference.
3292
+ * @returns A scoped area positioned before the specified item.
3293
+ * @i2since 1.10
3294
+ */
3295
+ before(idOrCommand: CommandId | GroupId | ICommand): IDynamicActionArea;
3296
+ /**
3297
+ * Returns an area positioned immediately after the specified action or group.
3298
+ * @param idOrCommand - The command, command identifier, or group identifier to use as a reference.
3299
+ * @returns A scoped area positioned after the specified item.
3300
+ * @i2since 1.10
3301
+ */
3302
+ after(idOrCommand: CommandId | GroupId | ICommand): IDynamicActionArea;
3303
+ /**
3304
+ * Returns an area scoped to a group created during this `onPopulate` call.
3305
+ *
3306
+ * @param id - The identifier of a group created in this populate session.
3307
+ * @returns A scoped area for the contents of the group.
3308
+ * @throws `Error` if `id` refers to a group that was not created in this populate session.
3309
+ * @i2since 1.10
3310
+ */
3311
+ getGroup(id: GroupId): IDynamicActionArea;
3312
+ /**
3313
+ * Adds a new group.
3314
+ * @param group - The group configuration.
3315
+ * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroupConfigBase.onSurface}.
3316
+ * @returns A scoped area for the contents of the new group.
3317
+ * @i2since 1.10
3318
+ */
3319
+ addGroup<TCommandType extends CommandType = 'unscoped'>(group: IGroup<TCommandType>): IDynamicActionArea;
3320
+ /**
3321
+ * Adds a new group, or returns the existing one if it was already added during this `onPopulate` call.
3322
+ * @param group - The group configuration.
3323
+ * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroupConfigBase.onSurface}.
3324
+ * @returns A scoped area for the contents of the new or existing group.
3325
+ * @i2since 1.10
3326
+ */
3327
+ addOrGetGroup<TCommandType extends CommandType = 'unscoped'>(group: IGroup<TCommandType>): IDynamicActionArea;
3328
+ /**
3329
+ * Surfaces the specified commands in the group.
3330
+ * @param commandsOrCommandIds - The commands or command identifiers to surface.
3331
+ * @i2since 1.10
3332
+ */
3333
+ surfaceCommands(...commandsOrCommandIds: (ICommand | CommandId)[]): void;
3334
+ }
3335
+ /**
3336
+ * A representation of a group of commands in the user interface. A group action is created when a group is surfaced.
3337
+ *
3338
+ * @remarks
3339
+ * Group actions mirror {@link commands.IAction} for individual commands. They are passed to
3340
+ * {@link commands.IGroupConfigBase.onSurface} (for static groups) and {@link commands.IDynamicGroupConfigBase.onSurface}
3341
+ * (for the popup button of a dynamic group), allowing the group's label, icon, and enabled/hidden
3342
+ * state to be driven from application state.
3343
+ *
3344
+ * When a group is disabled and expanded, its immediate children are rendered as disabled too —
3345
+ * disabling the group is therefore a render-time cascade, not a mutation of child state.
3346
+ * @i2since 1.10
3347
+ */
3348
+ export interface IGroupAction {
3349
+ /**
3350
+ * Sets the label of the group. For example, "Layouts".
3351
+ *
3352
+ * @param value - A label for the group.
3353
+ * @i2since 1.10
3354
+ */
3355
+ setName(value: string): void;
3356
+ /**
3357
+ * Sets whether the group is enabled — that is, whether it is available for users to interact with.
3358
+ *
3359
+ * @remarks
3360
+ * When disabled and expanded, the group's immediate child actions render as disabled; when
3361
+ * disabled and collapsed (or a dynamic group), the popup trigger cannot be opened.
3362
+ *
3363
+ * @param value - `true` to enable the group; `false` to disable it.
3364
+ * @i2since 1.10
3365
+ */
3366
+ setEnabled(value: boolean): void;
3367
+ /**
3368
+ * Sets whether the group is hidden — that is, whether it is visible to users at all.
3369
+ * Hidden groups do not render their container, label, or children.
3370
+ *
3371
+ * @param value - `true` to hide the group; `false` to show it.
3372
+ * @i2since 1.10
3373
+ */
3374
+ setHidden(value: boolean): void;
3375
+ /**
3376
+ * Sets the icon for the group.
3377
+ *
3378
+ * @param value - An icon for the group.
3379
+ * @i2since 1.10
3380
+ */
3381
+ setIcon(value: IIcon): void;
3382
+ }
2734
3383
  /**
2735
3384
  * A representation of a command in the user interface. An action is created when a command is surfaced.
2736
3385
  * @i2since 1.0
@@ -2829,6 +3478,22 @@ export declare namespace commands {
2829
3478
  * @i2since 1.0
2830
3479
  */
2831
3480
  createToolViewToggleCommand(config: ICommandConfigBase, toolview: toolview.IToolView): ICommand;
3481
+ /**
3482
+ * Creates a detached group that you build once and surface into one or more areas with {@link commands.IActionArea.surfaceGroup}.
3483
+ *
3484
+ * @remarks
3485
+ * The returned {@link commands.IGroupTemplate} exposes the same methods as an {@link commands.IActionArea}, so you
3486
+ * build its contents — commands and nested groups — exactly as you would in place. Nothing is surfaced into the user
3487
+ * interface until you pass the template to {@link commands.IActionArea.surfaceGroup}, which you can do for several
3488
+ * areas to avoid rebuilding the same group structure in each one.
3489
+ *
3490
+ * @param group - The root group to create.
3491
+ * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroupConfigBase.onSurface}.
3492
+ * @returns A detached group template that you can build on and surface.
3493
+ * @throws `Error` if the `group` was not valid.
3494
+ * @i2since 1.10
3495
+ */
3496
+ createGroup<TCommandType extends CommandType = 'unscoped'>(group: IGroup<TCommandType>): IGroupTemplate;
2832
3497
  /**
2833
3498
  * Unregisters and removes a command and all its actions from the application.
2834
3499
  *
@@ -2945,7 +3610,10 @@ export declare namespace commands {
2945
3610
  */
2946
3611
  export interface IRibbonTabConfig {
2947
3612
  /**
2948
- * Gets the identifier of the tab, which must be a GUID. GUIDs are case-insensitive.
3613
+ * Gets the identifier of the tab. This must be a non-empty string.
3614
+ *
3615
+ * @remarks
3616
+ * Using a GUID, or another globally-unique value, is recommended to avoid collisions with other plug-ins.
2949
3617
  * @i2since 1.6
2950
3618
  */
2951
3619
  readonly id: RibbonTabId;
@@ -3162,9 +3830,18 @@ export declare namespace commands {
3162
3830
  * @i2since 1.8
3163
3831
  */
3164
3832
  readonly resetGroupLabel: CommandId;
3833
+ /**
3834
+ * Gets the identifier of the system command that renames the current chart.
3835
+ * @i2since 1.10
3836
+ */
3837
+ readonly renameChart: CommandId;
3165
3838
  /**
3166
3839
  * Gets the identifier of the system command that saves the current chart.
3167
3840
  * @i2since 1.1
3841
+ * @deprecated Deprecated since version 1.10. The system now saves charts automatically, so there is
3842
+ * no longer a manual save command. Use {@link commands.ISystemCommands.renameChart | renameChart}
3843
+ * to rename a chart, or {@link commands.ISystemCommands.shareChart | shareChart} to manage sharing
3844
+ * and access control.
3168
3845
  */
3169
3846
  readonly saveChart: CommandId;
3170
3847
  /**
@@ -3189,6 +3866,11 @@ export declare namespace commands {
3189
3866
  * @i2since 1.8
3190
3867
  */
3191
3868
  readonly selectUnitedItems: CommandId;
3869
+ /**
3870
+ * Gets the identifier of the system command that manages sharing and access control for the current chart.
3871
+ * @i2since 1.10
3872
+ */
3873
+ readonly shareChart: CommandId;
3192
3874
  /**
3193
3875
  * Gets the identifier of the system command that allows users to share records with each other.
3194
3876
  * @i2since 1.3
@@ -3214,6 +3896,11 @@ export declare namespace commands {
3214
3896
  * @i2since 1.0
3215
3897
  */
3216
3898
  readonly toggleExternalSearches: CommandId;
3899
+ /**
3900
+ * Gets the identifier of the system command that toggles the Find Connecting Networks UI.
3901
+ * @i2since 1.10
3902
+ */
3903
+ readonly toggleFindConnectingNetworks: CommandId;
3217
3904
  /**
3218
3905
  * Gets the identifier of the system command that toggles the lists UI.
3219
3906
  * @i2since 1.3
@@ -3244,6 +3931,11 @@ export declare namespace commands {
3244
3931
  * @i2since 1.0
3245
3932
  */
3246
3933
  readonly toggleRecordInspector: CommandId;
3934
+ /**
3935
+ * Gets the identifier of the system command that toggles the Social Network Analysis UI.
3936
+ * @i2since 1.10
3937
+ */
3938
+ readonly toggleSocialNetworkAnalysis: CommandId;
3247
3939
  /**
3248
3940
  * Gets the identifier of the system command that toggles the style UI.
3249
3941
  * @i2since 1.2
@@ -5035,6 +5727,24 @@ export declare namespace schema {
5035
5727
  * @i2since 1.0
5036
5728
  */
5037
5729
  readonly itemTypes: data.IKeyedReadOnlyCollection<ChartItemTypeIdentifier, IChartItemType>;
5730
+ /**
5731
+ * Gets all the core entity types in the chart schema.
5732
+ *
5733
+ * @remarks
5734
+ * A core entity type is the base concept (such as "Person") that one or more entity types
5735
+ * specialize. Each entity type references its parent through {@link schema.IChartEntityType.coreType}.
5736
+ * @i2since 1.10
5737
+ */
5738
+ readonly coreEntityTypes: data.IKeyedReadOnlyCollection<ChartItemTypeIdentifier, IChartCoreEntityType>;
5739
+ /**
5740
+ * Gets all the core link types in the chart schema.
5741
+ *
5742
+ * @remarks
5743
+ * A core link type is the base concept that one or more link types specialize. Each link type
5744
+ * references its parent through {@link schema.IChartLinkType.coreType}.
5745
+ * @i2since 1.10
5746
+ */
5747
+ readonly coreLinkTypes: data.IKeyedReadOnlyCollection<ChartItemTypeIdentifier, IChartCoreLinkType>;
5038
5748
  /**
5039
5749
  * Gets the item type in the chart schema that has the specified i2 Analyze type identifier.
5040
5750
  * @param analyzeItemTypeId - An i2 Analyze item type identifier.
@@ -5160,6 +5870,14 @@ export declare namespace schema {
5160
5870
  * @i2since 1.0
5161
5871
  */
5162
5872
  readonly image: data.IImage;
5873
+ /**
5874
+ * Gets the core entity type that this entity type specializes, if it has one.
5875
+ *
5876
+ * @remarks
5877
+ * This is absent for entity types from a schema that predates the core type hierarchy.
5878
+ * @i2since 1.10
5879
+ */
5880
+ readonly coreType?: IChartCoreEntityType;
5163
5881
  }
5164
5882
  /**
5165
5883
  * A link type.
@@ -5176,6 +5894,89 @@ export declare namespace schema {
5176
5894
  * @i2since 1.5
5177
5895
  */
5178
5896
  toEntityTypes: data.IReadOnlyCollection<IChartEntityType>;
5897
+ /**
5898
+ * Gets the core link type that this link type specializes, if it has one.
5899
+ *
5900
+ * @remarks
5901
+ * This is absent for link types from a schema that predates the core type hierarchy.
5902
+ * @i2since 1.10
5903
+ */
5904
+ readonly coreType?: IChartCoreLinkType;
5905
+ }
5906
+ /**
5907
+ * The governance tier of a type, which controls who can author and modify its definition.
5908
+ *
5909
+ * @remarks
5910
+ * The tiers, from most to least restricted, are:
5911
+ *
5912
+ * - `i2Ontology` — curated by i2 Group; its structure, identifiers, and semantics are locked.
5913
+ * - `systemGoverned` — modifiable by schema administrators through the schema authoring path.
5914
+ * - `analystGoverned` — created and modified by analysts on an existing core type.
5915
+ * @i2since 1.10
5916
+ */
5917
+ export type GovernanceTier = 'i2Ontology' | 'systemGoverned' | 'analystGoverned';
5918
+ /**
5919
+ * A set of information that is common to all core types in a chart schema.
5920
+ *
5921
+ * @remarks
5922
+ * A core type is the base concept that one or more item types (entity types or link types)
5923
+ * specialize. Core types are the level at which storage, matching, and connector queries
5924
+ * operate; the specializing item types add display configuration and preferred property
5925
+ * selections on top.
5926
+ * @i2since 1.10
5927
+ */
5928
+ export interface IChartCoreItemTypeBase {
5929
+ /**
5930
+ * Gets the identifier of the core type.
5931
+ * @i2since 1.10
5932
+ */
5933
+ readonly id: ChartItemTypeId;
5934
+ /**
5935
+ * Gets the identifier of the core type in the i2 Analyze schema, if it has one.
5936
+ * @i2since 1.10
5937
+ */
5938
+ readonly analyzeId?: AnalyzeItemTypeId;
5939
+ /**
5940
+ * Gets the display name of the core type.
5941
+ * @i2since 1.10
5942
+ */
5943
+ readonly displayName: string;
5944
+ /**
5945
+ * Gets the description of the core type.
5946
+ * @i2since 1.10
5947
+ */
5948
+ readonly description: string;
5949
+ /**
5950
+ * Gets the identifier of the semantic type of the core type.
5951
+ * @i2since 1.10
5952
+ */
5953
+ readonly semanticTypeId: string;
5954
+ /**
5955
+ * Gets all the property types of the core type.
5956
+ *
5957
+ * @remarks
5958
+ * A core type carries the complete set of property types for its concept. Each specializing
5959
+ * item type exposes a subset of these through its preferred property selection.
5960
+ * @i2since 1.10
5961
+ */
5962
+ readonly propertyTypes: data.IKeyedReadOnlyCollection<PropertyTypeIdentifier, IChartPropertyType>;
5963
+ }
5964
+ /**
5965
+ * A core entity type.
5966
+ * @i2since 1.10
5967
+ */
5968
+ export interface IChartCoreEntityType extends IChartCoreItemTypeBase {
5969
+ /**
5970
+ * Gets the image that represents records that have the core entity type.
5971
+ * @i2since 1.10
5972
+ */
5973
+ readonly image: data.IImage;
5974
+ }
5975
+ /**
5976
+ * A core link type.
5977
+ * @i2since 1.10
5978
+ */
5979
+ export interface IChartCoreLinkType extends IChartCoreItemTypeBase {
5179
5980
  }
5180
5981
  /**
5181
5982
  * A part of a label that consists of a literal string.
@@ -5326,6 +6127,34 @@ export declare namespace schema {
5326
6127
  * @i2since 1.5
5327
6128
  */
5328
6129
  readonly origin: ISchemaInfo;
6130
+ /**
6131
+ * Gets the core type that this item type specializes, if it has one.
6132
+ *
6133
+ * @remarks
6134
+ * The core type is the base concept (such as "Person") that this item type refines with
6135
+ * display configuration and a preferred property selection. It is absent for item types that
6136
+ * have no core type, such as those from a schema that predates the core type hierarchy.
6137
+ * @i2since 1.10
6138
+ */
6139
+ readonly coreType?: IChartCoreEntityType | IChartCoreLinkType;
6140
+ /**
6141
+ * Indicates whether this item type is the default specialization of its core type.
6142
+ *
6143
+ * @remarks
6144
+ * Each core type has at most one default item type, which acts as the fallback when a record
6145
+ * references the core type without a more specific item type. This is absent for item types
6146
+ * that have no core type.
6147
+ * @i2since 1.10
6148
+ */
6149
+ readonly isDefault?: boolean;
6150
+ /**
6151
+ * Gets the governance tier of the item type, which controls who can author and modify it.
6152
+ *
6153
+ * @remarks
6154
+ * This is absent for item types from a schema that predates the core type hierarchy.
6155
+ * @i2since 1.10
6156
+ */
6157
+ readonly governanceTier?: GovernanceTier;
5329
6158
  }
5330
6159
  /**
5331
6160
  * Information about a schema in an i2 Analyze deployment.
@@ -5582,6 +6411,11 @@ export declare namespace schema {
5582
6411
  * @i2since 1.0
5583
6412
  */
5584
6413
  readonly analyzeId?: AnalyzePropertyTypeId;
6414
+ /**
6415
+ * Gets the item type or core type that the property type belongs to.
6416
+ * @i2since 1.10
6417
+ */
6418
+ readonly itemType: IChartItemType | IChartCoreItemTypeBase;
5585
6419
  /**
5586
6420
  * Gets the display name of the property type.
5587
6421
  * @i2since 1.0
@@ -6191,6 +7025,15 @@ export declare namespace visual {
6191
7025
  * @i2since 1.9
6192
7026
  */
6193
7027
  export type LineStyle = 'solid' | 'dashed' | 'dotted' | 'dash-dot' | 'dash-dot-dot';
7028
+ /**
7029
+ * The slot position of a badge icon on a node or edge.
7030
+ *
7031
+ * @remarks
7032
+ * Slots 0, 1, and 2 are trailing positions, displayed after the label of the element.
7033
+ * Slots 3, 4, and 5 are leading positions, displayed before the label of the element.
7034
+ * @i2since 1.10
7035
+ */
7036
+ export type BadgeSlot = 0 | 1 | 2 | 3 | 4 | 5;
6194
7037
  /**
6195
7038
  * A label for an element.
6196
7039
  * @i2since 1.5
@@ -6314,6 +7157,11 @@ export declare namespace visual {
6314
7157
  * @i2since 1.2
6315
7158
  */
6316
7159
  readonly style: IEdgeStyle;
7160
+ /**
7161
+ * Gets the edge summary that currently contains this edge, or `undefined` if the edge is not summarized.
7162
+ * @i2since 1.10
7163
+ */
7164
+ readonly summary: IEdgeSummary | undefined;
6317
7165
  }
6318
7166
  /**
6319
7167
  * A position on a chart surface.
@@ -6336,7 +7184,7 @@ export declare namespace visual {
6336
7184
  }
6337
7185
  /**
6338
7186
  * A value for a setting that affects the appearance of an element.
6339
- * @typeParam T - The logical type of the value.
7187
+ * @typeParam T - The type of the value.
6340
7188
  * @i2since 1.2
6341
7189
  */
6342
7190
  export interface IElementSetting<T> {
@@ -6361,6 +7209,23 @@ export declare namespace visual {
6361
7209
  * @i2since 1.2
6362
7210
  */
6363
7211
  readonly color: IElementSetting<string>;
7212
+ /**
7213
+ * Gets the badge icons displayed on the element, in slot order.
7214
+ *
7215
+ * @remarks
7216
+ * The array contains one entry for each populated slot, ordered by slot number.
7217
+ * Empty if no badges are set on the element.
7218
+ * @i2since 1.10
7219
+ */
7220
+ readonly badges: ReadonlyArray<IBadgeIcon>;
7221
+ /**
7222
+ * Gets the badge icon in the given slot.
7223
+ *
7224
+ * @param slot - The slot position to read.
7225
+ * @returns The badge icon in the slot, or `undefined` if the slot is empty.
7226
+ * @i2since 1.10
7227
+ */
7228
+ getBadge(slot: BadgeSlot): IBadgeIcon | undefined;
6364
7229
  }
6365
7230
  /**
6366
7231
  * An image for a node element.
@@ -6373,6 +7238,22 @@ export declare namespace visual {
6373
7238
  */
6374
7239
  readonly isDefault: boolean;
6375
7240
  }
7241
+ /**
7242
+ * A badge icon displayed alongside a node or edge in one of six slot positions.
7243
+ *
7244
+ * @remarks
7245
+ * Extends {@link data.IImage}, so `href` and `description` follow the same
7246
+ * convention as {@link visual.INodeStyle.image}. `description` is required
7247
+ * but may be the empty string.
7248
+ * @i2since 1.10
7249
+ */
7250
+ export interface IBadgeIcon extends data.IImage {
7251
+ /**
7252
+ * Gets the slot position of the badge.
7253
+ * @i2since 1.10
7254
+ */
7255
+ readonly slot: BadgeSlot;
7256
+ }
6376
7257
  /**
6377
7258
  * A style for a node, which affects its appearance.
6378
7259
  * @i2since 1.0
@@ -6476,6 +7357,47 @@ export declare namespace visual {
6476
7357
  * @i2since 1.6
6477
7358
  */
6478
7359
  readonly edges: data.IKeyedReadOnlyCollection<ElementId, IEdge>;
7360
+ /**
7361
+ * Gets the effective style of the edge summary line.
7362
+ *
7363
+ * @remarks
7364
+ * Each attribute defaults to a value computed from the member edges (for example, the
7365
+ * shared color of all members, or `undefined` if the members disagree). A plug-in can
7366
+ * override any attribute through {@link app.IEdgeSummaryEditor | editEdgeSummary(...)};
7367
+ * the override takes precedence over the computed value.
7368
+ *
7369
+ * {@link visual.IElementSetting.isDefault | isDefault} is `true` when the computed value
7370
+ * is in effect, and `false` when an override is. The returned object is a live view.
7371
+ * @i2since 1.10
7372
+ */
7373
+ readonly style: IEdgeSummaryStyle;
7374
+ }
7375
+ /**
7376
+ * The effective style of an edge summary line.
7377
+ * @i2since 1.10
7378
+ */
7379
+ export interface IEdgeSummaryStyle {
7380
+ /**
7381
+ * Gets the color of the edge summary line.
7382
+ * @i2since 1.10
7383
+ */
7384
+ readonly color: IElementSetting<string>;
7385
+ /**
7386
+ * Gets the width of the edge summary line.
7387
+ * @i2since 1.10
7388
+ */
7389
+ readonly width: IElementSetting<number>;
7390
+ /**
7391
+ * Gets the line style of the edge summary line.
7392
+ * @i2since 1.10
7393
+ */
7394
+ readonly lineStyle: IElementSetting<LineStyle>;
7395
+ /**
7396
+ * Gets the direction of the edge summary line, expressed relative to the natural direction
7397
+ * implied by its 'from' and 'to' ends.
7398
+ * @i2since 1.10
7399
+ */
7400
+ readonly direction: IElementSetting<data.LinkDirection>;
6479
7401
  }
6480
7402
  /**
6481
7403
  * A node group, which is a collection of nodes that can be moved and selected together.