@i2analyze/notebook-sdk 1.10.0-dev.8 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md ADDED
@@ -0,0 +1,179 @@
1
+ # AGENTS.md — i2 Notebook Web SDK
2
+
3
+ Guidance for AI coding assistants (Claude Code, Cursor, Copilot, etc.) writing i2 Analyst's
4
+ Notebook **web client plug-ins** with `@i2analyze/notebook-sdk`. Follow this over habits learned
5
+ from other SDKs. If a rule here conflicts with a code sample you found online, this file wins.
6
+
7
+ Docs: https://i2group.github.io/notebook-sdk/ · API reference: https://i2group.github.io/notebook-sdk/api/ · Machine-readable: https://i2group.github.io/notebook-sdk/llms.txt
8
+
9
+ ---
10
+
11
+ ## 0. The one rule that matters most: how to start a plug-in
12
+
13
+ **To create a NEW plug-in project, ALWAYS scaffold with the tool. Never hand-write a project
14
+ skeleton, and never copy a sample or tutorial as the starting boilerplate.**
15
+
16
+ ```sh
17
+ npm create @i2analyze/notebook-plugin # or: npx @i2analyze/create-notebook-plugin
18
+ ```
19
+
20
+ Templates (pass `--template=`):
21
+
22
+ - `plugin` (default) — headless plug-in with an `entrypoint.ts`, no UI.
23
+ - `plugin-with-toolview` — adds a React tool view (`ToolView` component + `index.html`).
24
+
25
+ ```sh
26
+ npm create @i2analyze/notebook-plugin -- --template=plugin-with-toolview
27
+ ```
28
+
29
+ The scaffold wires up TypeScript, ESLint, Prettier, webpack production bundling, the dev proxy
30
+ (`devproxy.json`), and a correct `plugin.json` manifest. Reproducing this by hand gets the manifest,
31
+ CSP, version pinning, and build config subtly wrong.
32
+
33
+ > ❌ **Do NOT** treat `samples/basic-plugin` or the guide page **"Creating a basic plug-in for the
34
+ > i2 Web Client"** (`tutorials/basic-plugin.md`) as the recommended boilerplate. Those exist to
35
+ > *explain concepts from first principles*. The recommended path for real plug-ins is the
36
+ > **`create-notebook-plugin` tool** and its tutorial (`tutorials/create-notebook-plugin.md`).
37
+ > When a user asks you to "make a plug-in", scaffold with the tool, then edit `src/entrypoint.ts`.
38
+
39
+ If you cannot run the scaffolder (e.g. offline), say so explicitly and reproduce the generated
40
+ `plugin/` template structure faithfully rather than inventing a layout.
41
+
42
+ ---
43
+
44
+ ## 1. Mental model
45
+
46
+ A plug-in is static assets (JS + a `plugin.json` manifest) served to the i2 Web Client. Three parts:
47
+
48
+ 1. **Manifest** (`public/plugin.json`) — identity (`pluginId`, `name`, `pluginVersion`), the
49
+ `entryPointUrl`, and CSP. Schema:
50
+ `https://i2group.github.io/notebook-sdk/schemas/plugin-manifest.json` (keep the `$schema` line —
51
+ it gives editors and agents live validation).
52
+ 2. **Entry point** (`src/entrypoint.ts`) — runs on load. Acquires the versioned API, registers
53
+ capabilities (commands, tool views), then calls `api.initializationComplete()`.
54
+ 3. **Tool views** (optional) — iframed HTML/JS UIs (React in the template) for richer interaction.
55
+
56
+ ## 2. Acquiring the API — the version you request is a minimum, not "your SDK version"
57
+
58
+ ```ts
59
+ import { NotebookStatic } from '@i2analyze/notebook-sdk';
60
+ declare const notebook: NotebookStatic;
61
+
62
+ async function main() {
63
+ const api = await notebook.getEntryPointApi('<your-plugin-id>', '1.3'); // minimum API version required
64
+ // ...register capabilities...
65
+ api.initializationComplete();
66
+ }
67
+ main();
68
+ ```
69
+
70
+ - The `major.minor` you pass is the **minimum API version your plug-in needs from the deployed
71
+ i2 Notebook backend** — *not* the version of the SDK you happened to install. The call asks the
72
+ running server "do you serve a client that supports at least this API version?" and **rejects** if
73
+ the server is older than requested (or if `pluginId` is absent from the manifest).
74
+ - **Choose the lowest version that includes every API you actually use.** A lower number runs on a
75
+ wider range of i2 Analyze servers; a higher number requires a newer server but unlocks newer APIs.
76
+ See the SDK ↔ i2 Analyze compatibility table in the *SDK and API versioning* guide.
77
+ - Ceiling: it can't exceed the API version of the installed `@i2analyze/notebook-sdk` (you can only
78
+ call types the SDK ships). Within that ceiling, prefer the floor. The `create-notebook-plugin`
79
+ scaffold sets a deliberately low default (currently `1.3`) for broad compatibility — only raise it
80
+ when you adopt an API introduced in a later version. **Do not "upgrade" it to match the SDK.**
81
+ - (The templates use the unbundled global `notebook`, so you choose the version explicitly. If you
82
+ instead `import { getEntryPointApi }` from the SDK and bundle it, that entry point uses the SDK's
83
+ own version automatically.)
84
+ - Keep the `pluginId` identical in code and manifest.
85
+ - You **must** call `api.initializationComplete()` once setup is done, or the plug-in never finishes loading.
86
+
87
+ ## 3. Commands (the primary way to add behaviour)
88
+
89
+ Create with `api.commands.createCommand({...})`, then *surface* it into one or more UI locations.
90
+ Command `type` scopes the execution context: `'unscoped'`, `'records'`, etc. The scaffold uses
91
+ `'unscoped'`; switch to `'records'` when you act on the current selection.
92
+
93
+ ```ts
94
+ const cmd = api.commands.createCommand({
95
+ id: 'view-on-map',
96
+ name: 'View on map',
97
+ icon: { type: 'inlineSvg', svg: commandSvg },
98
+ type: 'records',
99
+ onExecute(payload: commands.IRecordsContext) { /* ... */ },
100
+ onSurface(action, eventApi, signal) {
101
+ // Control enablement per surfacing. dispatchNow runs the callback immediately;
102
+ // forwarding `signal` auto-unsubscribes when this surfacing is removed.
103
+ eventApi.addEventListener('recordscontextchange',
104
+ (ctx) => action.setEnabled(/* predicate over ctx.records */ true),
105
+ { dispatchNow: true, signal });
106
+ },
107
+ });
108
+
109
+ api.commands.applicationRibbon.homeTab.surfaceCommands(cmd);
110
+ api.commands.chartPopupMenu.surfaceCommands(cmd); // same command, multiple places
111
+ ```
112
+
113
+ **Best practice:** gate enablement in `onSurface` via events rather than leaving buttons always-on;
114
+ always forward `signal` to listeners so they clean up on unsurface.
115
+
116
+ ## 4. Reading data
117
+
118
+ Access via the versioned `data` / `records` / `chart` namespaces. Records expose typed properties
119
+ through their `itemType`.
120
+
121
+ - Iterate `record.itemType.propertyTypes`; read with `record.getProperty(propertyType)`.
122
+ - **Check `record.isValueUnfetched(property)` before use** — the client lazily loads values, and an
123
+ unfetched value is not the same as an empty one. See guide: *Unfetched property values*.
124
+ - Collections are `data.IReadOnlyCollection<T>` (use `.size`, `.firstOrDefault(undefined)`), not JS arrays.
125
+
126
+ ## 5. Changing data — tracked vs untracked mutations
127
+
128
+ All writes go through a mutation callback; never mutate model objects directly.
129
+
130
+ - **`runTrackedMutations`** — for changes that modify data (add/edit/delete records, notes, etc.).
131
+ These are undoable and validated. Return `{ type: 'commit' }` or `{ type: 'rollback' }`.
132
+ - **`runUntrackedMutations`** — for view-only changes that don't touch data, e.g. selection or
133
+ untracked element style. Lighter weight; not part of undo history.
134
+
135
+ ```ts
136
+ await api.runTrackedMutations(async (application, mutations, cancelation) => {
137
+ if (application.chart.selection.records.size === 0) return { type: 'rollback' }; // no-op, not an error
138
+ const id = mutations.addEntityRecord({ itemType, properties: {}, notes: [], security, sourceReferences: [] });
139
+ return { type: 'commit' };
140
+ });
141
+ ```
142
+
143
+ Guides: *Changing data from a plug-in*, *Supported mutation operations*, *Untracked element style editing*.
144
+
145
+ ## 6. Dev loop, build, deploy
146
+
147
+ - `npm run dev` — dev server + `notebook-sdk-plugin-proxy` (proxies to your i2 Analyze server; edit
148
+ `devproxy.json` to change the target). Open the Web Client and look for your ribbon button /
149
+ console message.
150
+ - `npm run build` — production webpack bundle into `dist/`.
151
+ - **Deploy:** copy `dist/` into the server's
152
+ `toolkit/configuration/fragments/opal-services/plugins/<your-plugin>/`, then
153
+ `setup -t stopLiberty && setup -t deployLiberty && setup -t startLiberty` (repeat on every Liberty
154
+ node in HA). Guide: *Deploying to an i2 Analyze server*.
155
+
156
+ ## 7. Versioned API namespaces
157
+
158
+ Import types from `@i2analyze/notebook-sdk`; the runtime API is grouped into:
159
+ `app`, `chart`, `commands`, `data`, `dialog`, `records`, `schema`, `toolview`, `visual`
160
+ (plus `ILogger`, `IEntryPointApi`, `LogLevel`). Prefer these typed namespaces over `any`.
161
+
162
+ ## 8. Footguns / anti-patterns
163
+
164
+ - ❌ Hand-rolling the project or copying `basic-plugin` — see §0.
165
+ - ❌ Guessing the API version, or letting manifest `pluginId` drift from the code id.
166
+ - ❌ Forgetting `api.initializationComplete()`.
167
+ - ❌ Reading a property without an `isValueUnfetched` check.
168
+ - ❌ Using `runTrackedMutations` for selection-only changes (use untracked), or mutating model objects outside a mutation callback.
169
+ - ❌ Leaving commands always-enabled instead of gating in `onSurface`.
170
+ - ⚠️ Before relying on a member, check its `@i2since` tag in the API reference: it names the API
171
+ version that introduced it. If you use it, the plug-in's requested minimum version (§2) must be at
172
+ least that value. The public API is a single stable surface — there are no `@beta`/`@alpha` tiers.
173
+
174
+ ## 9. When unsure
175
+
176
+ Prefer these accurate sources over memory: the API reference
177
+ (https://i2group.github.io/notebook-sdk/api/), the guide, the `samples/` directory, and
178
+ `packages/notebook-sdk/src/use-the-api.ts` (worked mutation examples). For machine ingestion, fetch
179
+ `https://i2group.github.io/notebook-sdk/llms-full.txt`.
package/README.md CHANGED
@@ -8,6 +8,7 @@ This npm package provides the JavaScript library for developing plug-ins and a t
8
8
 
9
9
  | `@i2analyze/notebook-sdk` version | i2 Analyze version |
10
10
  | --------------------------------- | ------------------ |
11
+ | 1.10.\* | 4.4.8.\* and later |
11
12
  | 1.9.\* | 4.4.7.\* and later |
12
13
  | 1.8.\* | 4.4.6.\* and later |
13
14
  | 1.7.\* | 4.4.5.\* and later |
@@ -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.
@@ -823,11 +827,11 @@ export declare namespace app {
823
827
  * A set of methods for modifying the appearance of a node.
824
828
  * @i2since 1.2
825
829
  */
826
- export interface INodeEditor extends Omit<IElementEditorBase, 'setColor'> {
830
+ export interface INodeEditor extends IElementEditorBase {
827
831
  /**
828
832
  * Sets or resets the color of the element.
829
833
  *
830
- * @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.
831
835
  * @returns The element, with its color set to the specified value.
832
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.
833
837
  * @i2since 1.2
@@ -1263,6 +1267,36 @@ export declare namespace app {
1263
1267
  * @i2since 1.8
1264
1268
  */
1265
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;
1266
1300
  /**
1267
1301
  * Gets an object with methods for editing a record.
1268
1302
  *
@@ -1755,6 +1789,20 @@ export declare namespace chart {
1755
1789
  * @i2since 1.0
1756
1790
  */
1757
1791
  readonly name: string;
1792
+ /**
1793
+ * Indicates whether the chart is read-only for the current user.
1794
+ *
1795
+ * @remarks
1796
+ * A chart is read-only when the current user opened it as a read-only snapshot, for example because they
1797
+ * have view-only access to it, or because another user is editing it. The value is fixed for as long as the
1798
+ * chart remains open; the user must reopen the chart to change it.
1799
+ *
1800
+ * On a read-only chart, the application rolls back any mutation that would change the chart.
1801
+ * The mutation does not report an error; its promise resolves with a result that contains no changes.
1802
+ * Changes to the selection and to the view of the chart still apply for the current user.
1803
+ * @i2since 1.10
1804
+ */
1805
+ readonly isReadOnly: boolean;
1758
1806
  /**
1759
1807
  * Gets the schema of the chart, which describes the types and properties that records in the chart can have.
1760
1808
  * @i2since 1.0
@@ -1982,6 +2030,17 @@ export declare namespace chart {
1982
2030
  */
1983
2031
  readonly removed: data.IReadOnlyCollection<data.SourceReferenceId>;
1984
2032
  };
2033
+ /**
2034
+ * Gets a value that indicates whether the direction of a link record changed.
2035
+ *
2036
+ * @remarks
2037
+ * This field is present, with a value of `true`, only for link records whose
2038
+ * {@link records.IChartLinkRecord.linkDirection | linkDirection} differs from its previous value.
2039
+ * The field is absent for entity records, and for link records whose direction is unchanged.
2040
+ *
2041
+ * @i2since 1.10
2042
+ */
2043
+ readonly direction?: true;
1985
2044
  }
1986
2045
  /**
1987
2046
  * A change that has occurred to the data in a chart.
@@ -2376,7 +2435,64 @@ export declare namespace commands {
2376
2435
  * A type for a group of actions, which determines how the group is rendered in the user interface.
2377
2436
  * @i2since 1.9
2378
2437
  */
2379
- export type GroupType = 'expanded' | 'collapsed' | 'command';
2438
+ export type GroupType = 'expanded' | 'collapsed' | 'command' | 'stacked';
2439
+ /**
2440
+ * The state of the keyboard modifier keys at the point at which a command was triggered.
2441
+ * @i2since 1.10
2442
+ */
2443
+ export interface IModifierKeys {
2444
+ /**
2445
+ * Indicates whether the <kbd>Ctrl</kbd> key was held when the command was triggered.
2446
+ * @i2since 1.10
2447
+ */
2448
+ readonly ctrl: boolean;
2449
+ /**
2450
+ * Indicates whether the <kbd>Shift</kbd> key was held when the command was triggered.
2451
+ * @i2since 1.10
2452
+ */
2453
+ readonly shift: boolean;
2454
+ /**
2455
+ * Indicates whether the <kbd>Alt</kbd> key (<kbd>Option</kbd> on macOS) was held when the command was triggered.
2456
+ * @i2since 1.10
2457
+ */
2458
+ readonly alt: boolean;
2459
+ /**
2460
+ * Indicates whether the meta key (<kbd>Command</kbd> on macOS, the Windows key on Windows) was held when the
2461
+ * command was triggered.
2462
+ * @i2since 1.10
2463
+ */
2464
+ readonly meta: boolean;
2465
+ }
2466
+ /**
2467
+ * Context that describes where and how a command was triggered.
2468
+ *
2469
+ * @remarks
2470
+ * This context is mixed into the payload that every command receives. Its members are populated when the
2471
+ * command is triggered from a position on the chart, such as when a pop-up (right-click) menu is opened.
2472
+ * They are `undefined` when the command is triggered without a positional origin, for example from a ribbon
2473
+ * or programmatically.
2474
+ * @i2since 1.10
2475
+ */
2476
+ export interface ICommandInvocationContext {
2477
+ /**
2478
+ * Gets the position on the chart at which the command was triggered, in chart coordinates.
2479
+ *
2480
+ * @remarks
2481
+ * This is `undefined` if the command was triggered without a positional origin. For example, when a
2482
+ * command is invoked from a pop-up (right-click) menu, this is the position on the chart at which the
2483
+ * menu was opened.
2484
+ * @i2since 1.10
2485
+ */
2486
+ readonly triggerPosition?: visual.IPosition;
2487
+ /**
2488
+ * Gets the state of the keyboard modifier keys at the point at which the command was triggered.
2489
+ *
2490
+ * @remarks
2491
+ * This is `undefined` if the command was not triggered by a user input event.
2492
+ * @i2since 1.10
2493
+ */
2494
+ readonly modifierKeys?: IModifierKeys;
2495
+ }
2380
2496
  /**
2381
2497
  * A mapping of command types to their payload types.
2382
2498
  * @i2since 1.0
@@ -2398,6 +2514,20 @@ export declare namespace commands {
2398
2514
  */
2399
2515
  readonly unscoped: void;
2400
2516
  }
2517
+ /**
2518
+ * A mapping of command types to the payload that their {@link commands.ICommandConfig.onExecute}
2519
+ * callback receives.
2520
+ *
2521
+ * @remarks
2522
+ * This is the command's base payload from {@link commands.CommandPayloadMap} combined with the
2523
+ * {@link commands.ICommandInvocationContext} that describes where and how the command was triggered.
2524
+ * Unlike {@link commands.CommandPayloadMap}, which also types the `onPopulate` callback of a dynamic
2525
+ * group, this mapping applies only when a command is executed.
2526
+ * @i2since 1.10
2527
+ */
2528
+ export type CommandExecutePayloadMap = {
2529
+ readonly [TCommandType in CommandType]: CommandPayloadMap[TCommandType] extends void ? ICommandInvocationContext : CommandPayloadMap[TCommandType] & ICommandInvocationContext;
2530
+ };
2401
2531
  /**
2402
2532
  * A mapping of command types to the event types that are available to a surfaced command.
2403
2533
  * @i2since 1.0
@@ -2524,10 +2654,16 @@ export declare namespace commands {
2524
2654
  /**
2525
2655
  * Runs when the command is executed.
2526
2656
  *
2527
- * @param payload - The payload that i2 Notebook provides to the command.
2657
+ * @remarks
2658
+ * For "records" and "application" commands, the single payload argument combines the base payload
2659
+ * for the command type with the {@link commands.ICommandInvocationContext} that describes where and
2660
+ * how the command was triggered. For "unscoped" commands the invocation context is the only
2661
+ * argument and is optional, so the callback can be defined and invoked with no arguments.
2662
+ * @param args - The command payload for "records" and "application" commands, or the optional
2663
+ * invocation context for "unscoped" commands, as determined by the command type.
2528
2664
  * @i2since 1.0
2529
2665
  */
2530
- onExecute(payload: CommandPayloadMap[TCommandType]): void;
2666
+ onExecute(...args: TCommandType extends 'unscoped' ? [invocationContext?: CommandExecutePayloadMap['unscoped']] : [payload: CommandExecutePayloadMap[TCommandType]]): void;
2531
2667
  /**
2532
2668
  * Runs when an action derived from the command is surfaced, enabling the command to configure the action in response to events.
2533
2669
  *
@@ -2618,7 +2754,7 @@ export declare namespace commands {
2618
2754
  * Adds the specified group of actions to the user interface.
2619
2755
  *
2620
2756
  * @param group - The group to add.
2621
- * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroup.onSurface}.
2757
+ * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroupConfigBase.onSurface}.
2622
2758
  * @returns An object that you can use to add actions or a further group to the new group.
2623
2759
  * @throws `Error` if the `group` was not valid, or if a group with the same {@link commands.GroupId} was already present.
2624
2760
  * @i2since 1.0
@@ -2629,10 +2765,11 @@ export declare namespace commands {
2629
2765
  *
2630
2766
  * @remarks
2631
2767
  * Unlike {@link commands.IActionArea.addGroup}, the commands in a dynamic group are not created during plug-in
2632
- * initialization. Instead, the {@link commands.IDynamicGroupConfig.onPopulate} callback is called each time the
2768
+ * initialization. Instead, the {@link commands.IDynamicGroupConfigBase.onPopulate} callback is called each time the
2633
2769
  * group is opened, allowing you to create commands that reflect the current application state.
2634
2770
  *
2635
- * Dynamic groups are always collapsed — they render as a dropdown or submenu.
2771
+ * A dynamic group renders as a popup, never inline: by default a collapsed dropdown/submenu, or — when
2772
+ * `config.type` is `'command'` with a `primaryCommand` — a split button whose dropdown is populated on open.
2636
2773
  *
2637
2774
  * @param config - The configuration for the dynamic group, including the `onPopulate` callback.
2638
2775
  * @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`.
@@ -2649,7 +2786,7 @@ export declare namespace commands {
2649
2786
  * plug-ins that want to use the same group, and these plug-ins can be deployed independently, then you should use this method.
2650
2787
  *
2651
2788
  * @param group - The group to add or get.
2652
- * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroup.onSurface}.
2789
+ * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroupConfigBase.onSurface}.
2653
2790
  * @returns An object that you can use to add actions or a further group to the new or existing group.
2654
2791
  * @throws `Error` if the `group` was not valid, or if it was added before by the same plug-in.
2655
2792
  * @i2since 1.0
@@ -2721,6 +2858,24 @@ export declare namespace commands {
2721
2858
  * @i2since 1.0
2722
2859
  */
2723
2860
  surfaceCommands(...commandsOrCommandIds: (ICommand | CommandId)[]): void;
2861
+ /**
2862
+ * Surfaces a detached group, created with {@link commands.ICommandApi.createGroup}, and its contents into the user interface.
2863
+ *
2864
+ * @remarks
2865
+ * Unlike {@link commands.IActionArea.addGroup}, which builds a group in place, `surfaceGroup` adds a group template
2866
+ * that you built once and can reuse. The group and its descendants are added at this area's location — use
2867
+ * {@link commands.IActionArea.(before:1)} or {@link commands.IActionArea.(after:1)} to position it, just as you
2868
+ * would when surfacing commands.
2869
+ *
2870
+ * The template's group and command identifiers are used as they are, so you can surface the same template into
2871
+ * different areas. Surfacing a template more than once into the same area throws, because the identifiers collide.
2872
+ *
2873
+ * @param group - The detached group template to surface.
2874
+ * @throws `Error` if `group` was not a group template created by {@link commands.ICommandApi.createGroup},
2875
+ * or if a command or group in the template was already surfaced in the area.
2876
+ * @i2since 1.10
2877
+ */
2878
+ surfaceGroup(group: IGroupTemplate): void;
2724
2879
  /**
2725
2880
  * Gets the system groups for the action area, which you can use to specify relative locations for your actions and groups.
2726
2881
  * @i2since 1.0
@@ -2823,50 +2978,62 @@ export declare namespace commands {
2823
2978
  * Indicates whether the group is initially expanded (`false`) or collapsed (`true`) in the user interface.
2824
2979
  *
2825
2980
  * @remarks
2826
- * This is deprecated in favour of the more explicit {@link commands.IGroup."type"} property.
2981
+ * This is deprecated in favour of the more explicit {@link commands.IStandardGroup."type"} property.
2827
2982
  * When migrating, use `type: 'collapsed'` instead of `isCollapsed: true`, and `type: 'expanded'` instead of
2828
2983
  * `isCollapsed: false` or omitting the property.
2829
- * @deprecated Deprecated since version 1.9. Use {@link commands.IGroup."type"} instead.
2984
+ * @deprecated Deprecated since version 1.9. Use {@link commands.IStandardGroup."type"} instead.
2830
2985
  * @i2since 1.5
2831
2986
  */
2832
2987
  readonly isCollapsed?: boolean;
2833
2988
  }
2834
2989
  /**
2835
- * A group of actions in either the i2 Notebook application ribbon or a popup menu.
2990
+ * Configuration shared by the {@link commands.IGroup} variants.
2836
2991
  *
2837
- * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to {@link commands.IGroup.onSurface}. Defaults to `'unscoped'`.
2992
+ * @remarks
2993
+ * The fields common to the non-split {@link commands.IStandardGroup} and the split-button
2994
+ * {@link commands.ICommandGroup}.
2995
+ * @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'`.
2838
2996
  * @i2since 1.0
2839
2997
  */
2840
- export interface IGroup<TCommandType extends CommandType = 'unscoped'> extends IGroupBase {
2998
+ export interface IGroupConfigBase<TCommandType extends CommandType = 'unscoped'> extends IGroupBase {
2841
2999
  /**
2842
3000
  * Gets the icon of the group, which is displayed if the group is collapsed.
2843
3001
  * @i2since 1.0
2844
3002
  */
2845
3003
  readonly icon?: IIcon;
2846
3004
  /**
2847
- * Gets the label of the group, which is displayed to users unless the group is both expanded and in a popup menu.
3005
+ * Gets the label of the group.
3006
+ *
3007
+ * @remarks
3008
+ * In an application ribbon the label is shown on the group's button (if the group is collapsed or
3009
+ * stacked) or omitted (if the group is expanded inline).
3010
+ *
3011
+ * In popup menus, a group with a label produces a non-interactive section-header separator above
3012
+ * its children. Groups without a label render their children directly with no separator. By
3013
+ * default groups have no label; set one to opt into this visual grouping cue.
2848
3014
  * @i2since 1.0
2849
3015
  */
2850
3016
  readonly label?: string;
2851
3017
  /**
2852
- * Gets the render type of the group.
3018
+ * Gets the popup style for the group's trigger button.
2853
3019
  *
2854
3020
  * @remarks
2855
- * Use this property to explicitly control how the group is presented in the user interface. The options are:
2856
- * - `'expanded'` - shows all commands inline (default)
2857
- * - `'collapsed'` - shows the group as a single icon/label button that opens a dropdown
2858
- * - `'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.
3021
+ * Only applies to `'collapsed'` and `'command'` group types; ignored for `'expanded'` and `'stacked'`.
2859
3022
  *
2860
- * If `type` is specified it takes precedence over the deprecated {@link commands.IGroupBase.isCollapsed} boolean.
2861
- * @i2since 1.9
3023
+ * When set to `'ribbon'`, the group opens a floating ribbon-style popup panel that renders its
3024
+ * children as ribbon sections rather than a standard dropdown menu. This is equivalent to how a
3025
+ * minimized ribbon tab expands as a popup.
3026
+ *
3027
+ * If omitted, the group uses a standard dropdown menu.
3028
+ * @i2since 1.10
2862
3029
  */
2863
- readonly type?: GroupType;
3030
+ readonly popoutStyle?: 'ribbon';
2864
3031
  /**
2865
- * Gets the command-context type, which determines what event API is passed to {@link commands.IGroup.onSurface}.
3032
+ * Gets the command-context type, which determines what event API is passed to {@link commands.IGroupConfigBase.onSurface}.
2866
3033
  *
2867
3034
  * @remarks
2868
- * Mirrors {@link commands.IDynamicGroupConfig.context} (and, by analogy, {@link commands.ICommandConfig."type"}).
2869
- * Defaults to `'unscoped'`, which means {@link commands.IGroup.onSurface} receives no event API.
3035
+ * Mirrors {@link commands.IDynamicGroupConfigBase.context} (and, by analogy, {@link commands.ICommandConfig."type"}).
3036
+ * Defaults to `'unscoped'`, which means {@link commands.IGroupConfigBase.onSurface} receives no event API.
2870
3037
  * @i2since 1.10
2871
3038
  */
2872
3039
  readonly context?: TCommandType;
@@ -2892,6 +3059,92 @@ export declare namespace commands {
2892
3059
  */
2893
3060
  onSurface?(groupAction: IGroupAction, eventApi: CommandEventsMap[TCommandType], signal: AbortSignal): void | (() => void);
2894
3061
  }
3062
+ /**
3063
+ * A non-split group of actions: rendered inline (`'expanded'`), as a single dropdown button
3064
+ * (`'collapsed'`), or as a stacked column (`'stacked'`).
3065
+ *
3066
+ * @typeParam TCommandType - The type of the command-context for the group. Defaults to `'unscoped'`.
3067
+ * @i2since 1.0
3068
+ */
3069
+ export interface IStandardGroup<TCommandType extends CommandType = 'unscoped'> extends IGroupConfigBase<TCommandType> {
3070
+ /**
3071
+ * Gets the render type of the group.
3072
+ *
3073
+ * @remarks
3074
+ * Use this property to explicitly control how the group is presented in the user interface. The options are:
3075
+ * - `'expanded'` - shows all commands inline (default)
3076
+ * - `'collapsed'` - shows the group as a single icon/label button that opens a dropdown
3077
+ * - `'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.
3078
+ *
3079
+ * For a split button that has a primary command, use {@link commands.ICommandGroup} (`type: 'command'`).
3080
+ * If `type` is specified it takes precedence over the deprecated {@link commands.IGroupBase.isCollapsed} boolean.
3081
+ * @i2since 1.9
3082
+ */
3083
+ readonly type?: 'expanded' | 'collapsed' | 'stacked';
3084
+ /**
3085
+ * Gets the primary command, which is not applicable to a non-split group.
3086
+ *
3087
+ * @remarks
3088
+ * Use {@link commands.ICommandGroup} (`type: 'command'`) to specify a primary command.
3089
+ * @i2since 1.10
3090
+ */
3091
+ readonly primaryCommand?: never;
3092
+ }
3093
+ /**
3094
+ * A split-button group.
3095
+ *
3096
+ * @remarks
3097
+ * Has a {@link commands.ICommandGroup.primaryCommand | primary command} and a drop-down menu of related
3098
+ * commands. In the ribbon this is displayed as a split button; in pop-up menus, as a menu entry that runs
3099
+ * the primary command and has a submenu.
3100
+ * @typeParam TCommandType - The type of the command-context for the group. Defaults to `'unscoped'`.
3101
+ * @i2since 1.10
3102
+ */
3103
+ export interface ICommandGroup<TCommandType extends CommandType = 'unscoped'> extends IGroupConfigBase<TCommandType> {
3104
+ /**
3105
+ * Gets the render type, always `'command'` for a split-button group.
3106
+ * @i2since 1.9
3107
+ */
3108
+ readonly type: 'command';
3109
+ /**
3110
+ * Gets the group's primary command, as a command or command identifier.
3111
+ *
3112
+ * @remarks
3113
+ * The primary command runs when users click the main part of the split button in the ribbon, or the
3114
+ * group's entry in a pop-up menu. The drop-down menu lists the commands that are surfaced in the group,
3115
+ * so it includes the primary command only if you also surface it there.
3116
+ *
3117
+ * If omitted, the first command that is surfaced in the group is the primary command, as in
3118
+ * versions before 1.10.
3119
+ * @i2since 1.10
3120
+ */
3121
+ readonly primaryCommand?: ICommand | CommandId;
3122
+ }
3123
+ /**
3124
+ * A group of actions in either the i2 Notebook application ribbon or a popup menu.
3125
+ *
3126
+ * @remarks
3127
+ * Either a non-split {@link commands.IStandardGroup} (inline, collapsed, or stacked) or a split-button
3128
+ * {@link commands.ICommandGroup} (`type: 'command'`). The `type` discriminates between them, so
3129
+ * `primaryCommand` is allowed only when `type` is `'command'`. If a command group omits
3130
+ * `primaryCommand`, the first command that is surfaced in it is the primary command.
3131
+ *
3132
+ * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its `onSurface`. Defaults to `'unscoped'`.
3133
+ * @i2since 1.0
3134
+ */
3135
+ export type IGroup<TCommandType extends CommandType = 'unscoped'> = IStandardGroup<TCommandType> | ICommandGroup<TCommandType>;
3136
+ /**
3137
+ * A detached group of actions that you build once and surface into one or more areas.
3138
+ *
3139
+ * @remarks
3140
+ * Create a template with {@link commands.ICommandApi.createGroup}, build its contents using the inherited
3141
+ * {@link commands.IActionArea} methods, then add it to areas with {@link commands.IActionArea.surfaceGroup}.
3142
+ * Because the template carries its own group and command identifiers, a single template can be surfaced into
3143
+ * several areas without rebuilding it. Nothing appears in the user interface until the template is surfaced.
3144
+ * @i2since 1.10
3145
+ */
3146
+ export interface IGroupTemplate extends IActionArea<undefined> {
3147
+ }
2895
3148
  /**
2896
3149
  * A group of actions in a popup menu that do not have a label or an icon.
2897
3150
  * @i2since 1.2
@@ -2900,22 +3153,22 @@ export declare namespace commands {
2900
3153
  export interface IMenuGroup extends IGroupBase {
2901
3154
  }
2902
3155
  /**
2903
- * Configuration for a dynamic group whose commands are created on demand when the group is opened.
3156
+ * Configuration shared by the {@link commands.IDynamicGroupConfig} variants.
2904
3157
  *
2905
3158
  * @remarks
3159
+ * The fields common to the collapsed {@link commands.IStandardDynamicGroup} and the split-button
3160
+ * {@link commands.ICommandDynamicGroup}.
2906
3161
  * A dynamic group solves the limitation that commands can only be created during plug-in initialization.
2907
- * Instead, the {@link commands.IDynamicGroupConfig.onPopulate} callback is called each time the group is
3162
+ * Instead, the {@link commands.IDynamicGroupConfigBase.onPopulate} callback is called each time the group is
2908
3163
  * opened, allowing commands to be created based on the current application state. The group's
2909
3164
  * popup-button state (label, icon, enabled, hidden) can be driven separately by an optional
2910
- * {@link commands.IDynamicGroupConfig.onSurface} callback that runs once when the group is
3165
+ * {@link commands.IDynamicGroupConfigBase.onSurface} callback that runs once when the group is
2911
3166
  * surfaced on a host.
2912
3167
  *
2913
- * Dynamic groups are always collapsed — they render as a dropdown/submenu that opens on click.
2914
- *
2915
- * @typeParam TCommandType - The type of the command-context for the group, which determines what payload is passed to {@link commands.IDynamicGroupConfig.onPopulate} and what event API is passed to {@link commands.IDynamicGroupConfig.onSurface}.
3168
+ * @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}.
2916
3169
  * @i2since 1.10
2917
3170
  */
2918
- export interface IDynamicGroupConfig<TCommandType extends CommandType = CommandType> {
3171
+ export interface IDynamicGroupConfigBase<TCommandType extends CommandType = CommandType> {
2919
3172
  /**
2920
3173
  * Gets the identifier of the group. This must be a non-empty string.
2921
3174
  *
@@ -2938,8 +3191,8 @@ export declare namespace commands {
2938
3191
  * Gets the command-context type for the group.
2939
3192
  *
2940
3193
  * @remarks
2941
- * Determines what payload is passed to {@link commands.IDynamicGroupConfig.onPopulate} and what
2942
- * event API is passed to {@link commands.IDynamicGroupConfig.onSurface}.
3194
+ * Determines what payload is passed to {@link commands.IDynamicGroupConfigBase.onPopulate} and what
3195
+ * event API is passed to {@link commands.IDynamicGroupConfigBase.onSurface}.
2943
3196
  * @i2since 1.10
2944
3197
  */
2945
3198
  readonly context: TCommandType;
@@ -2966,7 +3219,7 @@ export declare namespace commands {
2966
3219
  *
2967
3220
  * @remarks
2968
3221
  * The lifetime of this callback is the dynamic group's *button* — separate from the per-open
2969
- * lifecycle of {@link commands.IDynamicGroupConfig.onPopulate}, which populates the popup's
3222
+ * lifecycle of {@link commands.IDynamicGroupConfigBase.onPopulate}, which populates the popup's
2970
3223
  * contents. Use this callback to react to long-lived application state; populate the popup's
2971
3224
  * contents in `onPopulate`.
2972
3225
  *
@@ -2974,7 +3227,7 @@ export declare namespace commands {
2974
3227
  * configuration and remains enabled.
2975
3228
  *
2976
3229
  * @param groupAction - The group action being surfaced.
2977
- * @param eventApi - The events that the group can subscribe to, keyed by the group's `type`.
3230
+ * @param eventApi - The events that the group can subscribe to, keyed by the group's `context`.
2978
3231
  * @param signal - A signal that the application uses to tell the group that it is removing the popup button from the user interface.
2979
3232
  *
2980
3233
  * @returns A function that the application calls when it removes the popup button from the user interface.
@@ -2984,7 +3237,68 @@ export declare namespace commands {
2984
3237
  onSurface?(groupAction: IGroupAction, eventApi: CommandEventsMap[TCommandType], signal: AbortSignal): void | (() => void);
2985
3238
  }
2986
3239
  /**
2987
- * A scoped area for creating and surfacing commands within a {@link commands.IDynamicGroupConfig.onPopulate} callback.
3240
+ * A dynamic group that renders as a collapsed dropdown/submenu, populated on open.
3241
+ *
3242
+ * @typeParam TCommandType - The type of the command-context for the group.
3243
+ * @i2since 1.10
3244
+ */
3245
+ export interface IStandardDynamicGroup<TCommandType extends CommandType = CommandType> extends IDynamicGroupConfigBase<TCommandType> {
3246
+ /**
3247
+ * Gets the render type, `'collapsed'` (the default) for a dropdown/submenu.
3248
+ * @i2since 1.10
3249
+ */
3250
+ readonly type?: 'collapsed';
3251
+ /**
3252
+ * Gets the primary command, which is not applicable to a collapsed dynamic group.
3253
+ *
3254
+ * @remarks
3255
+ * Use {@link commands.ICommandDynamicGroup} (`type: 'command'`) to specify a primary command.
3256
+ * @i2since 1.10
3257
+ */
3258
+ readonly primaryCommand?: never;
3259
+ }
3260
+ /**
3261
+ * A dynamic split-button group.
3262
+ *
3263
+ * @remarks
3264
+ * Has a fixed {@link commands.ICommandDynamicGroup.primaryCommand | primary command} and a drop-down
3265
+ * menu that is populated each time it opens.
3266
+ *
3267
+ * @typeParam TCommandType - The type of the command-context for the group.
3268
+ * @i2since 1.10
3269
+ */
3270
+ export interface ICommandDynamicGroup<TCommandType extends CommandType = CommandType> extends IDynamicGroupConfigBase<TCommandType> {
3271
+ /**
3272
+ * Gets the render type, always `'command'` for a split-button dynamic group.
3273
+ * @i2since 1.10
3274
+ */
3275
+ readonly type: 'command';
3276
+ /**
3277
+ * Gets the split button's primary command, as a command or command identifier.
3278
+ *
3279
+ * @remarks
3280
+ * The primary command is not in the drop-down menu, which {@link commands.IDynamicGroupConfigBase.onPopulate}
3281
+ * populates. The split button is displayed before the group is first opened, so the primary command must
3282
+ * already exist: create it during plug-in initialization, not inside `onPopulate`.
3283
+ * @i2since 1.10
3284
+ */
3285
+ readonly primaryCommand: ICommand | CommandId;
3286
+ }
3287
+ /**
3288
+ * Configuration for a dynamic group whose commands are created on demand when the group is opened.
3289
+ *
3290
+ * @remarks
3291
+ * A dynamic group renders as a popup, never inline: either a collapsed {@link commands.IStandardDynamicGroup}
3292
+ * dropdown/submenu, or a split-button {@link commands.ICommandDynamicGroup} (`type: 'command'` with a
3293
+ * `primaryCommand`). The `type` discriminates between them, so `primaryCommand` is required exactly when
3294
+ * `type` is `'command'`.
3295
+ *
3296
+ * @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`.
3297
+ * @i2since 1.10
3298
+ */
3299
+ export type IDynamicGroupConfig<TCommandType extends CommandType = CommandType> = IStandardDynamicGroup<TCommandType> | ICommandDynamicGroup<TCommandType>;
3300
+ /**
3301
+ * A scoped area for creating and surfacing commands within a {@link commands.IDynamicGroupConfigBase.onPopulate} callback.
2988
3302
  *
2989
3303
  * @remarks
2990
3304
  * Methods on this interface work like their equivalents on {@link commands.IActionArea}, but are scoped to the
@@ -3022,7 +3336,7 @@ export declare namespace commands {
3022
3336
  /**
3023
3337
  * Adds a new group.
3024
3338
  * @param group - The group configuration.
3025
- * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroup.onSurface}.
3339
+ * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroupConfigBase.onSurface}.
3026
3340
  * @returns A scoped area for the contents of the new group.
3027
3341
  * @i2since 1.10
3028
3342
  */
@@ -3030,7 +3344,7 @@ export declare namespace commands {
3030
3344
  /**
3031
3345
  * Adds a new group, or returns the existing one if it was already added during this `onPopulate` call.
3032
3346
  * @param group - The group configuration.
3033
- * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroup.onSurface}.
3347
+ * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroupConfigBase.onSurface}.
3034
3348
  * @returns A scoped area for the contents of the new or existing group.
3035
3349
  * @i2since 1.10
3036
3350
  */
@@ -3047,7 +3361,7 @@ export declare namespace commands {
3047
3361
  *
3048
3362
  * @remarks
3049
3363
  * Group actions mirror {@link commands.IAction} for individual commands. They are passed to
3050
- * {@link commands.IGroup.onSurface} (for static groups) and {@link commands.IDynamicGroupConfig.onSurface}
3364
+ * {@link commands.IGroupConfigBase.onSurface} (for static groups) and {@link commands.IDynamicGroupConfigBase.onSurface}
3051
3365
  * (for the popup button of a dynamic group), allowing the group's label, icon, and enabled/hidden
3052
3366
  * state to be driven from application state.
3053
3367
  *
@@ -3188,6 +3502,22 @@ export declare namespace commands {
3188
3502
  * @i2since 1.0
3189
3503
  */
3190
3504
  createToolViewToggleCommand(config: ICommandConfigBase, toolview: toolview.IToolView): ICommand;
3505
+ /**
3506
+ * Creates a detached group that you build once and surface into one or more areas with {@link commands.IActionArea.surfaceGroup}.
3507
+ *
3508
+ * @remarks
3509
+ * The returned {@link commands.IGroupTemplate} exposes the same methods as an {@link commands.IActionArea}, so you
3510
+ * build its contents — commands and nested groups — exactly as you would in place. Nothing is surfaced into the user
3511
+ * interface until you pass the template to {@link commands.IActionArea.surfaceGroup}, which you can do for several
3512
+ * areas to avoid rebuilding the same group structure in each one.
3513
+ *
3514
+ * @param group - The root group to create.
3515
+ * @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroupConfigBase.onSurface}.
3516
+ * @returns A detached group template that you can build on and surface.
3517
+ * @throws `Error` if the `group` was not valid.
3518
+ * @i2since 1.10
3519
+ */
3520
+ createGroup<TCommandType extends CommandType = 'unscoped'>(group: IGroup<TCommandType>): IGroupTemplate;
3191
3521
  /**
3192
3522
  * Unregisters and removes a command and all its actions from the application.
3193
3523
  *
@@ -3382,6 +3712,12 @@ export declare namespace commands {
3382
3712
  * @i2since 1.3
3383
3713
  */
3384
3714
  readonly exportPdf: CommandId;
3715
+ /**
3716
+ * Gets the identifier of the system command that matches the current selection against the
3717
+ * Information Store and unites any matching records.
3718
+ * @i2since 1.10
3719
+ */
3720
+ readonly getMatches: CommandId;
3385
3721
  /**
3386
3722
  * Gets the identifier of the "Get paths" system command.
3387
3723
  * @i2since 1.0
@@ -3524,9 +3860,18 @@ export declare namespace commands {
3524
3860
  * @i2since 1.8
3525
3861
  */
3526
3862
  readonly resetGroupLabel: CommandId;
3863
+ /**
3864
+ * Gets the identifier of the system command that renames the current chart.
3865
+ * @i2since 1.10
3866
+ */
3867
+ readonly renameChart: CommandId;
3527
3868
  /**
3528
3869
  * Gets the identifier of the system command that saves the current chart.
3529
3870
  * @i2since 1.1
3871
+ * @deprecated Deprecated since version 1.10. The system now saves charts automatically, so there is
3872
+ * no longer a manual save command. Use {@link commands.ISystemCommands.renameChart | renameChart}
3873
+ * to rename a chart, or {@link commands.ISystemCommands.shareChart | shareChart} to manage sharing
3874
+ * and access control.
3530
3875
  */
3531
3876
  readonly saveChart: CommandId;
3532
3877
  /**
@@ -3551,6 +3896,11 @@ export declare namespace commands {
3551
3896
  * @i2since 1.8
3552
3897
  */
3553
3898
  readonly selectUnitedItems: CommandId;
3899
+ /**
3900
+ * Gets the identifier of the system command that manages sharing and access control for the current chart.
3901
+ * @i2since 1.10
3902
+ */
3903
+ readonly shareChart: CommandId;
3554
3904
  /**
3555
3905
  * Gets the identifier of the system command that allows users to share records with each other.
3556
3906
  * @i2since 1.3
@@ -3576,6 +3926,11 @@ export declare namespace commands {
3576
3926
  * @i2since 1.0
3577
3927
  */
3578
3928
  readonly toggleExternalSearches: CommandId;
3929
+ /**
3930
+ * Gets the identifier of the system command that toggles the Find Connecting Networks UI.
3931
+ * @i2since 1.10
3932
+ */
3933
+ readonly toggleFindConnectingNetworks: CommandId;
3579
3934
  /**
3580
3935
  * Gets the identifier of the system command that toggles the lists UI.
3581
3936
  * @i2since 1.3
@@ -3606,6 +3961,11 @@ export declare namespace commands {
3606
3961
  * @i2since 1.0
3607
3962
  */
3608
3963
  readonly toggleRecordInspector: CommandId;
3964
+ /**
3965
+ * Gets the identifier of the system command that toggles the Social Network Analysis UI.
3966
+ * @i2since 1.10
3967
+ */
3968
+ readonly toggleSocialNetworkAnalysis: CommandId;
3609
3969
  /**
3610
3970
  * Gets the identifier of the system command that toggles the style UI.
3611
3971
  * @i2since 1.2
@@ -4682,9 +5042,63 @@ export declare namespace data {
4682
5042
  export declare namespace dialog {
4683
5043
  /**
4684
5044
  * A size for a dialog window.
5045
+ *
5046
+ * @remarks
5047
+ * The `'xmedium'` size requires version 1.10 or later.
4685
5048
  * @i2since 1.4
4686
5049
  */
4687
- export type DialogSize = 'small' | 'medium' | 'large';
5050
+ export type DialogSize = 'small' | 'medium' | 'xmedium' | 'large';
5051
+ /**
5052
+ * Explicit dimensions for a dialog window, as CSS length strings.
5053
+ *
5054
+ * @remarks
5055
+ * Both axes are required. Each axis is independent and is clamped to the `'large'` size
5056
+ * (approximately the size of the viewport): a larger value is reduced to it. To size the dialog's
5057
+ * height to fit its content, use {@link dialog.IDialogAutoHeightSize} instead.
5058
+ *
5059
+ * Each value must be an unsigned number followed by one of the units `px`, `rem`, `em`, `vh`,
5060
+ * `vw`, or `%` (for example, `'600px'`, `'40rem'`, or `'75%'`).
5061
+ * @i2since 1.10
5062
+ */
5063
+ export interface IDialogDimensions {
5064
+ /**
5065
+ * Gets the width of the dialog. Clamped to the `'large'` size.
5066
+ * @i2since 1.10
5067
+ */
5068
+ readonly width: string;
5069
+ /**
5070
+ * Gets the height of the dialog. Clamped to the `'large'` size.
5071
+ * @i2since 1.10
5072
+ */
5073
+ readonly height: string;
5074
+ }
5075
+ /**
5076
+ * A size for a dialog window that has a preset width and a height that fits its content.
5077
+ *
5078
+ * @remarks
5079
+ * The dialog's height follows the height of the content that it hosts, and changes as the content
5080
+ * changes. The height is at least a small minimum, and at most the `'large'` size (approximately
5081
+ * the size of the viewport); content that is taller than that scrolls.
5082
+ *
5083
+ * Either the dialog determines the size of the content, as with a preset or explicit dimensions,
5084
+ * or the content determines the size of the dialog, as it does here. The content must therefore
5085
+ * determine its own height. Content whose height depends on the height of the dialog, such as a
5086
+ * root element with `height: 100%` or a height in `vh` units, keeps the dialog at its current
5087
+ * height.
5088
+ * @i2since 1.10
5089
+ */
5090
+ export interface IDialogAutoHeightSize {
5091
+ /**
5092
+ * Gets the preset that sets the width of the dialog.
5093
+ * @i2since 1.10
5094
+ */
5095
+ readonly width: DialogSize;
5096
+ /**
5097
+ * Gets the value that makes the height of the dialog fit its content.
5098
+ * @i2since 1.10
5099
+ */
5100
+ readonly height: 'auto';
5101
+ }
4688
5102
  /**
4689
5103
  * An identifier of a dialog action.
4690
5104
  * @i2since 1.4
@@ -4738,10 +5152,15 @@ export declare namespace dialog {
4738
5152
  */
4739
5153
  readonly path: string;
4740
5154
  /**
4741
- * Gets the size of the dialog.
5155
+ * Gets the size of the dialog, as a named preset, as a preset width with a height that fits the
5156
+ * content, or as explicit dimensions.
5157
+ *
5158
+ * @remarks
5159
+ * The `'xmedium'` preset, {@link dialog.IDialogAutoHeightSize | auto-height sizes}, and explicit
5160
+ * {@link dialog.IDialogDimensions | dimensions} require version 1.10 or later.
4742
5161
  * @i2since 1.4
4743
5162
  */
4744
- readonly size: DialogSize;
5163
+ readonly size: DialogSize | IDialogAutoHeightSize | IDialogDimensions;
4745
5164
  /**
4746
5165
  * Gets the data for populating the dialog when it's first displayed.
4747
5166
  *
@@ -5092,7 +5511,7 @@ export declare interface NotebookStatic {
5092
5511
  * @public
5093
5512
  * @i2since 1.0
5094
5513
  */
5095
- getEntryPointApi(pluginId: string, apiVersion: '1.0' | '1.1' | '1.2' | '1.3' | '1.4' | '1.5' | '1.6' | '1.7' | '1.8' | '1.9'): Promise<IEntryPointApi>;
5514
+ getEntryPointApi(pluginId: string, apiVersion: '1.0' | '1.1' | '1.2' | '1.3' | '1.4' | '1.5' | '1.6' | '1.7' | '1.8' | '1.9' | '1.10'): Promise<IEntryPointApi>;
5096
5515
  }
5097
5516
 
5098
5517
  /**
@@ -5944,6 +6363,11 @@ export declare namespace schema {
5944
6363
  * @i2since 1.0
5945
6364
  */
5946
6365
  readonly analyzeId?: AnalyzePropertyTypeId;
6366
+ /**
6367
+ * Gets the item type that the property type belongs to.
6368
+ * @i2since 1.10
6369
+ */
6370
+ readonly itemType: IChartItemType;
5947
6371
  /**
5948
6372
  * Gets the display name of the property type.
5949
6373
  * @i2since 1.0
@@ -6712,7 +7136,7 @@ export declare namespace visual {
6712
7136
  }
6713
7137
  /**
6714
7138
  * A value for a setting that affects the appearance of an element.
6715
- * @typeParam T - The logical type of the value.
7139
+ * @typeParam T - The type of the value.
6716
7140
  * @i2since 1.2
6717
7141
  */
6718
7142
  export interface IElementSetting<T> {
package/lib/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * i2, i2 Group, the i2 Group logo, and i2group.com are trademarks of N.Harris Computer Corporation.
3
3
  * © N.Harris Computer Corporation (2022)
4
4
  */
5
- const apiVersion = '1.9';
5
+ const apiVersion = '1.10';
6
6
  /**
7
7
  * Retrieves the plug-in entry point API.
8
8
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i2analyze/notebook-sdk",
3
- "version": "1.10.0-dev.8",
3
+ "version": "1.10.0",
4
4
  "description": "i2 Notebook SDK",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -12,35 +12,37 @@
12
12
  "url": "https://i2group.github.io/notebook-sdk/"
13
13
  },
14
14
  "devDependencies": {
15
- "@ibmi2/eslint-config": "^13.0.0",
16
- "@ibmi2/webui-lerna-build-scripts": "^6.0.1",
17
- "@microsoft/api-documenter": "7.19.28",
18
- "@microsoft/api-extractor": "7.33.8",
15
+ "@ibmi2/webui-lerna-build-scripts": "^6.0.2",
16
+ "@microsoft/api-documenter": "^7.26.0",
17
+ "@microsoft/api-extractor": "^7.58.11",
19
18
  "concurrently": "^7.3.0",
20
19
  "copyfiles": "^2.4.1",
21
20
  "rimraf": "^3.0.0",
22
- "typescript": "^4.3.5"
21
+ "typescript": "^6.0.3",
22
+ "@i2internal/eslint-plugin": "^11.5.0"
23
23
  },
24
24
  "sideEffects": [
25
25
  "**/*.spec.*"
26
26
  ],
27
27
  "scripts": {
28
28
  "compile": "concurrently \"npm:compile:*\"",
29
- "compile:typescript-es": "webui-lerna-build-scripts",
30
- "compile:copy-es": "webui-lerna-build-scripts src \"**/*.d.ts\"",
31
- "compile:eslint": "webui-lerna-build-scripts \"src/**/*.{ts,tsx}\"",
29
+ "compile:typescript-es": "tsc -p tsconfig-tsc.json --module esnext --outDir dist/es",
30
+ "compile:copy-es": "copyfiles -u 1 \"src/**/*.d.ts\" dist/es",
31
+ "compile:eslint": "eslint src --no-error-on-unmatched-pattern --max-warnings 0",
32
32
  "postcompile": "node scripts/run-api-extractor.js",
33
33
  "api-extractor:dev": "api-extractor run --local --verbose --config scripts/api-extractor.json",
34
34
  "api-extractor:ci": "api-extractor run --verbose --config scripts/api-extractor.json",
35
35
  "build": "npm run compile",
36
- "clean": "rimraf bld dist doc/obj",
37
- "prepare": "copyfiles --flat dist/es/index.js lib/"
36
+ "clean": "rimraf bld dist doc/obj AGENTS.md",
37
+ "prepare": "copyfiles --flat dist/es/index.js lib/",
38
+ "prepack": "node scripts/copy-agents-md.js"
38
39
  },
39
40
  "files": [
40
41
  "lib/index.js",
41
42
  "lib/index.d.ts",
42
43
  "lib/gen/notebook-sdk-public.d.ts",
43
- "lib/tsdoc-metadata.json"
44
+ "lib/tsdoc-metadata.json",
45
+ "AGENTS.md"
44
46
  ],
45
47
  "main": "",
46
48
  "module": "lib/index.js",
@@ -49,6 +51,6 @@
49
51
  "extends": "../../package.json"
50
52
  },
51
53
  "engines": {
52
- "node": ">=18"
54
+ "node": ">=20.19.0"
53
55
  }
54
56
  }