@i2analyze/notebook-sdk 1.10.0-dev.8 → 1.10.0-dev.9
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.
|
@@ -2376,7 +2376,7 @@ export declare namespace commands {
|
|
|
2376
2376
|
* A type for a group of actions, which determines how the group is rendered in the user interface.
|
|
2377
2377
|
* @i2since 1.9
|
|
2378
2378
|
*/
|
|
2379
|
-
export type GroupType = 'expanded' | 'collapsed' | 'command';
|
|
2379
|
+
export type GroupType = 'expanded' | 'collapsed' | 'command' | 'stacked';
|
|
2380
2380
|
/**
|
|
2381
2381
|
* A mapping of command types to their payload types.
|
|
2382
2382
|
* @i2since 1.0
|
|
@@ -2721,6 +2721,24 @@ export declare namespace commands {
|
|
|
2721
2721
|
* @i2since 1.0
|
|
2722
2722
|
*/
|
|
2723
2723
|
surfaceCommands(...commandsOrCommandIds: (ICommand | CommandId)[]): void;
|
|
2724
|
+
/**
|
|
2725
|
+
* Surfaces a detached group, created with {@link commands.ICommandApi.createGroup}, and its contents into the user interface.
|
|
2726
|
+
*
|
|
2727
|
+
* @remarks
|
|
2728
|
+
* Unlike {@link commands.IActionArea.addGroup}, which builds a group in place, `surfaceGroup` adds a group template
|
|
2729
|
+
* that you built once and can reuse. The group and its descendants are added at this area's location — use
|
|
2730
|
+
* {@link commands.IActionArea.(before:1)} or {@link commands.IActionArea.(after:1)} to position it, just as you
|
|
2731
|
+
* would when surfacing commands.
|
|
2732
|
+
*
|
|
2733
|
+
* The template's group and command identifiers are used as they are, so you can surface the same template into
|
|
2734
|
+
* different areas. Surfacing a template more than once into the same area throws, because the identifiers collide.
|
|
2735
|
+
*
|
|
2736
|
+
* @param group - The detached group template to surface.
|
|
2737
|
+
* @throws `Error` if `group` was not a group template created by {@link commands.ICommandApi.createGroup},
|
|
2738
|
+
* or if a command or group in the template was already surfaced in the area.
|
|
2739
|
+
* @i2since 1.10
|
|
2740
|
+
*/
|
|
2741
|
+
surfaceGroup(group: IGroupTemplate): void;
|
|
2724
2742
|
/**
|
|
2725
2743
|
* Gets the system groups for the action area, which you can use to specify relative locations for your actions and groups.
|
|
2726
2744
|
* @i2since 1.0
|
|
@@ -2844,7 +2862,15 @@ export declare namespace commands {
|
|
|
2844
2862
|
*/
|
|
2845
2863
|
readonly icon?: IIcon;
|
|
2846
2864
|
/**
|
|
2847
|
-
* Gets the label of the group
|
|
2865
|
+
* Gets the label of the group.
|
|
2866
|
+
*
|
|
2867
|
+
* @remarks
|
|
2868
|
+
* In an application ribbon the label is shown on the group's button (if the group is collapsed or
|
|
2869
|
+
* stacked) or omitted (if the group is expanded inline).
|
|
2870
|
+
*
|
|
2871
|
+
* In popup menus, a group with a label produces a non-interactive section-header separator above
|
|
2872
|
+
* its children. Groups without a label render their children directly with no separator. By
|
|
2873
|
+
* default groups have no label; set one to opt into this visual grouping cue.
|
|
2848
2874
|
* @i2since 1.0
|
|
2849
2875
|
*/
|
|
2850
2876
|
readonly label?: string;
|
|
@@ -2856,11 +2882,26 @@ export declare namespace commands {
|
|
|
2856
2882
|
* - `'expanded'` - shows all commands inline (default)
|
|
2857
2883
|
* - `'collapsed'` - shows the group as a single icon/label button that opens a dropdown
|
|
2858
2884
|
* - `'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.
|
|
2885
|
+
* - `'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.
|
|
2859
2886
|
*
|
|
2860
2887
|
* If `type` is specified it takes precedence over the deprecated {@link commands.IGroupBase.isCollapsed} boolean.
|
|
2861
2888
|
* @i2since 1.9
|
|
2862
2889
|
*/
|
|
2863
2890
|
readonly type?: GroupType;
|
|
2891
|
+
/**
|
|
2892
|
+
* Gets the popup style for the group's trigger button.
|
|
2893
|
+
*
|
|
2894
|
+
* @remarks
|
|
2895
|
+
* Only applies to `'collapsed'` and `'command'` group types; ignored for `'expanded'` and `'stacked'`.
|
|
2896
|
+
*
|
|
2897
|
+
* When set to `'ribbon'`, the group opens a floating ribbon-style popup panel that renders its
|
|
2898
|
+
* children as ribbon sections rather than a standard dropdown menu. This is equivalent to how a
|
|
2899
|
+
* minimized ribbon tab expands as a popup.
|
|
2900
|
+
*
|
|
2901
|
+
* If omitted, the group uses a standard dropdown menu.
|
|
2902
|
+
* @i2since 1.10
|
|
2903
|
+
*/
|
|
2904
|
+
readonly popoutStyle?: 'ribbon';
|
|
2864
2905
|
/**
|
|
2865
2906
|
* Gets the command-context type, which determines what event API is passed to {@link commands.IGroup.onSurface}.
|
|
2866
2907
|
*
|
|
@@ -2892,6 +2933,18 @@ export declare namespace commands {
|
|
|
2892
2933
|
*/
|
|
2893
2934
|
onSurface?(groupAction: IGroupAction, eventApi: CommandEventsMap[TCommandType], signal: AbortSignal): void | (() => void);
|
|
2894
2935
|
}
|
|
2936
|
+
/**
|
|
2937
|
+
* A detached group of actions that you build once and surface into one or more areas.
|
|
2938
|
+
*
|
|
2939
|
+
* @remarks
|
|
2940
|
+
* Create a template with {@link commands.ICommandApi.createGroup}, build its contents using the inherited
|
|
2941
|
+
* {@link commands.IActionArea} methods, then add it to areas with {@link commands.IActionArea.surfaceGroup}.
|
|
2942
|
+
* Because the template carries its own group and command identifiers, a single template can be surfaced into
|
|
2943
|
+
* several areas without rebuilding it. Nothing appears in the user interface until the template is surfaced.
|
|
2944
|
+
* @i2since 1.10
|
|
2945
|
+
*/
|
|
2946
|
+
export interface IGroupTemplate extends IActionArea<undefined> {
|
|
2947
|
+
}
|
|
2895
2948
|
/**
|
|
2896
2949
|
* A group of actions in a popup menu that do not have a label or an icon.
|
|
2897
2950
|
* @i2since 1.2
|
|
@@ -3188,6 +3241,22 @@ export declare namespace commands {
|
|
|
3188
3241
|
* @i2since 1.0
|
|
3189
3242
|
*/
|
|
3190
3243
|
createToolViewToggleCommand(config: ICommandConfigBase, toolview: toolview.IToolView): ICommand;
|
|
3244
|
+
/**
|
|
3245
|
+
* Creates a detached group that you build once and surface into one or more areas with {@link commands.IActionArea.surfaceGroup}.
|
|
3246
|
+
*
|
|
3247
|
+
* @remarks
|
|
3248
|
+
* The returned {@link commands.IGroupTemplate} exposes the same methods as an {@link commands.IActionArea}, so you
|
|
3249
|
+
* build its contents — commands and nested groups — exactly as you would in place. Nothing is surfaced into the user
|
|
3250
|
+
* interface until you pass the template to {@link commands.IActionArea.surfaceGroup}, which you can do for several
|
|
3251
|
+
* areas to avoid rebuilding the same group structure in each one.
|
|
3252
|
+
*
|
|
3253
|
+
* @param group - The root group to create.
|
|
3254
|
+
* @typeParam TCommandType - The type of the command-context for the group, which determines what event API is passed to its {@link commands.IGroup.onSurface}.
|
|
3255
|
+
* @returns A detached group template that you can build on and surface.
|
|
3256
|
+
* @throws `Error` if the `group` was not valid.
|
|
3257
|
+
* @i2since 1.10
|
|
3258
|
+
*/
|
|
3259
|
+
createGroup<TCommandType extends CommandType = 'unscoped'>(group: IGroup<TCommandType>): IGroupTemplate;
|
|
3191
3260
|
/**
|
|
3192
3261
|
* Unregisters and removes a command and all its actions from the application.
|
|
3193
3262
|
*
|