@sheetxl/react 1.0.4 → 1.0.6

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.
Files changed (149) hide show
  1. package/browser/esm/{B5I4vV_DP3EjMFOh.mjs → 4M1ime0lSMPwFdwq.mjs} +1 -1
  2. package/browser/esm/{B41IwWSVZSFBKWbl.mjs → 56NlLn16iTCMXWTn.mjs} +6 -6
  3. package/browser/esm/BBpLlCS6trF9IqY7.mjs +325 -0
  4. package/browser/esm/{DfPC75_EpLobRWyU.mjs → BCGOU0KEA92-tHXw.mjs} +5 -5
  5. package/browser/esm/{D9LWDuiSBP9TanuP.mjs → BPyvBK7c6TKRxVZb.mjs} +1 -1
  6. package/browser/esm/{Cy91S4xWoxd66-_0.mjs → BkkfkHsyalXv3k4Q.mjs} +1 -1
  7. package/browser/esm/{BCViSL9zpUH8tVsE.mjs → Bks84B7NgyzaBVv0.mjs} +1 -1
  8. package/browser/esm/{Vh1oaya1vexsM57z.mjs → Bl0-xYLr5UA_pMTT.mjs} +6 -6
  9. package/browser/esm/{Yzp80cMm3GyMSyGB.mjs → Bp-3XmIZb2fkqunF.mjs} +2 -2
  10. package/browser/esm/{sFi_HFLodIR0bKfI.mjs → C1luDkna9W7PNKrz.mjs} +1 -1
  11. package/browser/esm/{DrVUyngAZ439vUOV.mjs → CKYZvqAf2y2oAkB7.mjs} +1 -1
  12. package/browser/esm/{CclhdAtAI6HRaWjs.mjs → CsGmLR7d80u8xidY.mjs} +1 -1
  13. package/browser/esm/D20ReZZxs2JHIqXW.mjs +1681 -0
  14. package/browser/esm/{BhlDgb8_WVpUrXCE.mjs → D4OKTHNu7UroAOVB.mjs} +1 -1
  15. package/browser/esm/{2d3KRM4JSpo_wPqH.mjs → D9kzGjqEClI2OQO8.mjs} +1 -1
  16. package/browser/esm/{C257AeDQl6k6J19h.mjs → DAGQOiFH2fGWDOqj.mjs} +2 -2
  17. package/browser/esm/{BFUcvh3uC4U54r93.mjs → DBCT8TZn5tx3RRgu.mjs} +1 -1
  18. package/browser/esm/{CBACZ2nUHuOoDHLf.mjs → DIXBmbnM-qkL9ot2.mjs} +8 -6
  19. package/browser/esm/{DMVzoJFREEuE236r.mjs → DpQkiVYU6nJmsEXE.mjs} +3 -3
  20. package/browser/esm/{D2iNsoem4M78aLXn.mjs → Dq9OEmhDbQi90JyF.mjs} +3 -3
  21. package/browser/esm/{BDOdvxrpOY4gcCIl.mjs → Du_yTZVTH9ZhIwVz.mjs} +1 -1
  22. package/browser/esm/DzcsaJD62P_RrIgp.mjs +127 -0
  23. package/browser/esm/{Bs3j5q_SFWPRYcAj.mjs → OYfZSA6eTFsqp5MC.mjs} +1308 -1281
  24. package/browser/esm/{BIunYBnpZF-P8JFl.mjs → X9EpvcUhpbtf95sq.mjs} +1 -1
  25. package/browser/esm/{DO0HWpJD0WrboRDe.mjs → XkePaxnbmJijuUST.mjs} +1 -1
  26. package/browser/esm/chart.mjs +3 -3
  27. package/browser/esm/control.mjs +2 -2
  28. package/browser/esm/{lt-QhChnw2xCbjtV.mjs → dE1dGLDL9PIqTCiM.mjs} +73 -35
  29. package/browser/esm/group.mjs +3 -3
  30. package/browser/esm/index.mjs +8930 -9026
  31. package/browser/esm/note.mjs +4 -4
  32. package/browser/esm/{EJWEWelOH8yX7oez.mjs → pAnBA5Hy2mjpkAWB.mjs} +2 -2
  33. package/browser/esm/picture.mjs +2 -2
  34. package/browser/esm/shape.mjs +2 -2
  35. package/browser/esm/slicer.mjs +4 -4
  36. package/node/esm/{BZK8xNBGYCcvGYr-.mjs → BCTgV60zEAPoPG-u.mjs} +1 -1
  37. package/node/esm/{lAMyxp6V7Yamdtue.mjs → BRsrSOeAgAbh8LCL.mjs} +30 -28
  38. package/node/esm/BSYkbwvzEjg5tnyi.mjs +327 -0
  39. package/node/esm/BXCAuiepvo2pCMA6.mjs +177 -0
  40. package/node/esm/{DYAI1q7pZQijIEuk.mjs → Bf1ybiY9HNcds5_H.mjs} +1 -1
  41. package/node/esm/{BKe0zQV-NngKQLC6.mjs → BkT-mLvzP5h10mLU.mjs} +1 -1
  42. package/node/esm/{gXZTHKanG6sR8nJB.mjs → C-l3nPRIH0q_ucYX.mjs} +1 -1
  43. package/node/esm/{DMccpcT9DZhrCesw.mjs → C0syazJAmS6_LFTY.mjs} +5 -5
  44. package/node/esm/{0XJbNeNNSyYBMnWw.mjs → C3frF4D3I2rcLHK1.mjs} +1 -1
  45. package/node/esm/{Bvq6hR9TahHJQDSE.mjs → CIPjf-XhEAQufN0V.mjs} +1 -1
  46. package/node/esm/{wamMRABbIHPbB6TV.mjs → CJKhZu3BbJY3VsWH.mjs} +1 -1
  47. package/node/esm/CWoaMwpLSM7gBaVh.mjs +1681 -0
  48. package/node/esm/{xaiZuv1DcjoKGxuV.mjs → CcblOBJaE8U6tCWg.mjs} +1 -1
  49. package/node/esm/{EFIovoxkRAaNFoV2.mjs → D5UV0AjhZIYGotrV.mjs} +1 -1
  50. package/node/esm/{eRa_lhdJaHzyCbSo.mjs → D5rzzywf1R4MvJU0.mjs} +1 -1
  51. package/node/esm/{ChvRYQa8Z3QcAih_.mjs → DEH7X3vDYP518pp4.mjs} +1 -1
  52. package/node/esm/{BmwLJCwadUcJzm7_.mjs → DO7K3oDOoCZ4fpv-.mjs} +2 -2
  53. package/node/esm/{BMZIDcAXGazWv925.mjs → DnZ2zYP0QCJWioMW.mjs} +1 -1
  54. package/node/esm/{Bx4zBoy7r3wKhSfW.mjs → DrQEt2TfEEgKvYKL.mjs} +1 -1
  55. package/node/esm/{Drew11dteKH8ST2G.mjs → Dxv-9TQ2qdooz9VX.mjs} +347 -320
  56. package/node/esm/EvhDIPxbJ1B3lfrj.mjs +166 -0
  57. package/node/esm/{CHEbVdYUW8SqO1s1.mjs → KC9JU5CVeDBJ2aHR.mjs} +1 -1
  58. package/node/esm/{DS_Y37x1b6oFkuSX.mjs → WFBPS4qHr0sTxFmI.mjs} +1 -1
  59. package/node/esm/chart.mjs +2 -2
  60. package/node/esm/control.mjs +2 -2
  61. package/node/esm/group.mjs +3 -3
  62. package/node/esm/index.mjs +11035 -11128
  63. package/node/esm/note.mjs +4 -4
  64. package/node/esm/picture.mjs +5 -5
  65. package/node/esm/shape.mjs +6 -6
  66. package/node/esm/slicer.mjs +4 -4
  67. package/package.json +7 -7
  68. package/resources/contents.json +6 -0
  69. package/resources/locales/contents.json +14 -0
  70. package/resources/locales/de/cells.cmd.json +1589 -0
  71. package/resources/locales/de/chart.cmd.json +15 -0
  72. package/resources/locales/de/editor.cmd.json +8 -8
  73. package/resources/locales/de/movable.cmd.json +0 -8
  74. package/resources/locales/de/sheet.cmd.json +190 -1713
  75. package/resources/locales/de/ui.msg.json +67 -0
  76. package/resources/locales/en/cells.cmd.json +1602 -0
  77. package/resources/locales/en/chart.cmd.json +15 -0
  78. package/resources/locales/en/editor.cmd.json +8 -8
  79. package/resources/locales/en/movable.cmd.json +0 -8
  80. package/resources/locales/en/sheet.cmd.json +193 -1729
  81. package/resources/locales/en/ui.msg.json +67 -0
  82. package/types/src/chart/ChartCommands.d.ts +5 -3
  83. package/types/src/chart/ChartElement.d.ts +1 -1
  84. package/types/src/chart/PresetChartTypeDescriptors.d.ts +23 -2
  85. package/types/src/chart/_outlinePath.d.ts +17 -0
  86. package/types/src/chart/paint/_fills.d.ts +4 -1
  87. package/types/src/chart/paint/_graphics.d.ts +5 -2
  88. package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +19 -5
  89. package/types/src/clipboard/ClipboardCommands.d.ts +16 -4
  90. package/types/src/commands/PaneScopeProvider.d.ts +2 -2
  91. package/types/src/editor/EditorCommands.d.ts +3 -3
  92. package/types/src/icons/chart/ChartIcons.d.ts +20 -0
  93. package/types/src/icons/chart/_ChartIconPack.d.ts +4 -0
  94. package/types/src/icons/chart/_chartIconKeys.d.ts +4 -0
  95. package/types/src/icons/chart/index.d.ts +1 -49
  96. package/types/src/index.d.ts +1 -0
  97. package/types/src/layer/MovableKindScope.d.ts +3 -2
  98. package/types/src/layer/MovableToolbar.d.ts +27 -0
  99. package/types/src/layer/RangeToolbar.d.ts +17 -4
  100. package/types/src/layer/SheetMovableLayer.d.ts +6 -0
  101. package/types/src/layer/ValidationDropdownLayer.d.ts +1 -1
  102. package/types/src/layer/index.d.ts +1 -0
  103. package/types/src/movable/MovableCommands.d.ts +8 -2
  104. package/types/src/movable/MovableLayer.d.ts +2 -0
  105. package/types/src/movable/MovableRenderers.d.ts +43 -1
  106. package/types/src/movable/_drawingFormat.d.ts +15 -0
  107. package/types/src/presence/PresenceCommands.d.ts +1 -1
  108. package/types/src/sheet/IWorksheetElement.d.ts +9 -0
  109. package/types/src/sheet/SheetCommandProvider.d.ts +17 -10
  110. package/types/src/sheet/SheetCommands.d.ts +17 -4
  111. package/types/src/taskPane/FormatPane.d.ts +46 -0
  112. package/types/src/taskPane/MovablePane.d.ts +8 -10
  113. package/types/src/taskPane/TaskPaneArea.d.ts +57 -2
  114. package/types/src/taskPane/TaskPaneEmpty.d.ts +14 -0
  115. package/types/src/taskPane/TaskPaneKeys.d.ts +8 -4
  116. package/types/src/taskPane/TaskPaneRegistry.d.ts +2 -1
  117. package/types/src/taskPane/TaskPaneStrip.d.ts +13 -2
  118. package/types/src/taskPane/_taskPaneHost.d.ts +9 -0
  119. package/types/src/taskPane/index.d.ts +2 -0
  120. package/types/src/taskPane/useTaskPane.d.ts +14 -18
  121. package/browser/esm/CNWfLXcWFeRPAr_J.mjs +0 -264
  122. package/node/esm/8ar-ImM_B3-FjI_A.mjs +0 -128
  123. package/node/esm/BwlokhQZotu1DmAO.mjs +0 -265
  124. package/types/src/icons/chart/ChartAreaIcon.d.ts +0 -5
  125. package/types/src/icons/chart/ChartAreaStackedIcon.d.ts +0 -5
  126. package/types/src/icons/chart/ChartAreaStackedPercentIcon.d.ts +0 -5
  127. package/types/src/icons/chart/ChartBarIcon.d.ts +0 -5
  128. package/types/src/icons/chart/ChartBarStackedIcon.d.ts +0 -5
  129. package/types/src/icons/chart/ChartBarStackedPercentIcon.d.ts +0 -5
  130. package/types/src/icons/chart/ChartBubble3DIcon.d.ts +0 -5
  131. package/types/src/icons/chart/ChartBubbleIcon.d.ts +0 -5
  132. package/types/src/icons/chart/ChartColumnIcon.d.ts +0 -5
  133. package/types/src/icons/chart/ChartColumnStackedIcon.d.ts +0 -5
  134. package/types/src/icons/chart/ChartColumnStackedPercentIcon.d.ts +0 -5
  135. package/types/src/icons/chart/ChartLineIcon.d.ts +0 -5
  136. package/types/src/icons/chart/ChartLineMarkersIcon.d.ts +0 -5
  137. package/types/src/icons/chart/ChartLineStackedIcon.d.ts +0 -5
  138. package/types/src/icons/chart/ChartLineStackedMarkersIcon.d.ts +0 -5
  139. package/types/src/icons/chart/ChartLineStackedPercentIcon.d.ts +0 -5
  140. package/types/src/icons/chart/ChartLineStackedPercentMarkersIcon.d.ts +0 -5
  141. package/types/src/icons/chart/ChartPieDoughnutIcon.d.ts +0 -5
  142. package/types/src/icons/chart/ChartPieIcon.d.ts +0 -5
  143. package/types/src/icons/chart/ChartScatterLinesIcon.d.ts +0 -5
  144. package/types/src/icons/chart/ChartScatterLinesMarkersIcon.d.ts +0 -5
  145. package/types/src/icons/chart/ChartScatterLinesMarkersSmoothIcon.d.ts +0 -5
  146. package/types/src/icons/chart/ChartScatterLinesSmoothIcon.d.ts +0 -5
  147. package/types/src/icons/chart/ChartScatterMarkersIcon.d.ts +0 -5
  148. package/types/src/icons/chart/ChartWaterfallIcon.d.ts +0 -5
  149. package/types/src/icons/chart/ThemedChartIcon.d.ts +0 -20
@@ -23,6 +23,19 @@ export type MovableRenderer = React.ComponentType<MovableRendererProps>;
23
23
  export interface MovablePaneProps {
24
24
  movable: IMovable;
25
25
  sheet: IWorksheet;
26
+ /**
27
+ * What the call that opened the format pane asked it to show. An event, not state: a body reacts
28
+ * to the object changing, as a task pane does to its own `args`.
29
+ */
30
+ args?: MovablePaneArgs;
31
+ }
32
+ /**
33
+ * What a command may ask the format pane to open on: `activateTaskPane('format', { args })`,
34
+ * or the `format` command's argument.
35
+ */
36
+ export interface MovablePaneArgs {
37
+ /** The tab to show, by the key the selected drawing's kind gives it. Omit to stay on the tab the pane is on. */
38
+ tab?: string;
26
39
  }
27
40
  /**
28
41
  * The `data` a kind's {@link MovableRendererModule.commands} contributor is handed while a movable of
@@ -37,9 +50,22 @@ export interface MovableKindCommandData {
37
50
  activateTaskPane?: (key: string, options?: ActivateFrameOptions) => void;
38
51
  taskPaneArea?: ITaskPaneArea;
39
52
  }
53
+ /**
54
+ * The toolbar that floats beside the selected movable of a kind: a quick action and a dropdown of
55
+ * commands. Its commands resolve like any other, so they act on the selected movable.
56
+ */
57
+ export interface MovableFloatingToolbar {
58
+ /** The quick action, by key. */
59
+ quickKey: string;
60
+ /** The dropdown's commands, by key, in order. List the quick action too for it to show there. */
61
+ commandKeys: readonly string[];
62
+ /** The quick action's icon in the plain toolbar. */
63
+ iconKey: string;
64
+ }
40
65
  /**
41
66
  * What a kind's loader resolves to when the kind brings more than a renderer: the renderer and
42
- * whichever of its selection control, commands, ribbon tab and format pane it has.
67
+ * whichever of its selection control, commands, ribbon tab, floating toolbar, buttons and format pane
68
+ * it has.
43
69
  */
44
70
  export interface MovableRendererModule {
45
71
  /** Draws a movable of the kind. */
@@ -64,6 +90,18 @@ export interface MovableRendererModule {
64
90
  toolbar?: Command.CommandButtonEntry & {
65
91
  key: string;
66
92
  };
93
+ /**
94
+ * The toolbar that floats beside the selected movable of the kind. Omit for none.
95
+ */
96
+ floatingToolbar?: MovableFloatingToolbar;
97
+ /**
98
+ * Buttons registered while a movable of the kind is the active selection, each landing where its
99
+ * own `contributions` place it: the kind's commands in the drawing's context menu
100
+ * (`movableContextMenu`), which every kind shares.
101
+ */
102
+ buttons?: readonly (Command.CommandButtonEntry & {
103
+ key: string;
104
+ })[];
67
105
  /**
68
106
  * The body the format pane shows while a movable of the kind is the active selection. A host can
69
107
  * supply it without re-registering the renderer, with {@link registerMovablePane}.
@@ -82,6 +120,10 @@ export interface MovableKind {
82
120
  toolbar?: Command.CommandButtonEntry & {
83
121
  key: string;
84
122
  };
123
+ floatingToolbar?: MovableFloatingToolbar;
124
+ buttons?: readonly (Command.CommandButtonEntry & {
125
+ key: string;
126
+ })[];
85
127
  pane?: React.ComponentType<MovablePaneProps>;
86
128
  }
87
129
  /** Resolves a kind's format pane body, as a dynamic `import()` does. */
@@ -0,0 +1,15 @@
1
+ import { IMovable, IWorksheet } from '@sheetxl/sdk';
2
+ import { Command } from '@sheetxl/utils-react';
3
+ /** Runs `update` over every selected drawing as one step to undo; the movable commands' own runner. */
4
+ export type UpdateMovables = (label: string, update: (movable: IMovable) => void) => void;
5
+ /**
6
+ * Contributes the fill and font commands' callbacks for the selected drawings. Call while a drawing
7
+ * is selected; {@link syncDrawingFormatState} keeps their state and enablement.
8
+ */
9
+ export declare function contributeDrawingFormatOps(contribution: Command.CommandContribution, sheet: IWorksheet, updateMovables: UpdateMovables): void;
10
+ /**
11
+ * The fill and font commands' state, read from the anchor, and their enablement: disabled when no
12
+ * selected drawing has a style, or for the font, a style that holds one.
13
+ */
14
+ export declare function syncDrawingFormatState(contribution: Command.CommandContribution, sheet: IWorksheet, selected: readonly IMovable[], active: IMovable | null): void;
15
+ //# sourceMappingURL=_drawingFormat.d.ts.map
@@ -28,7 +28,7 @@ export declare function registerPresenceCommandChrome(): void;
28
28
  * `Command.DefaultCommandRegistry.registerDynamic('workbook', …)`.
29
29
  *
30
30
  * @remarks
31
- * `showAgentPane` is stateful (its state is whether the pane is open), so a quick button on it reads
31
+ * `showAgentPane` is stateful (its state is whether the pane is showing), so a quick button on it reads
32
32
  * as a toggle.
33
33
  */
34
34
  export declare function createPresenceCommands(store: PresenceStore): ComponentType<CommandContributionComponentProps<WorkbookCommandContributorData>>;
@@ -8,6 +8,7 @@ import { HyperlinkCardRenderProps, HyperlinkLayerProps } from '../layer/Hyperlin
8
8
  import { CellErrorTip } from '../layer/CellErrorLayer';
9
9
  import { ValidationPromptRenderProps, ValidationAlertRenderProps } from '../layer/ValidationPromptLayer';
10
10
  import { TableToolbarRenderProps } from '../layer/TableToolbar';
11
+ import { MovableToolbarRenderProps } from '../layer/MovableToolbar';
11
12
  import { PivotToolbarRenderProps } from '../layer/PivotToolbar';
12
13
  import { CommandContext } from '../frame';
13
14
  import { ExplicitTokens } from '../theme';
@@ -211,6 +212,14 @@ export interface WorksheetElementProps extends React.HTMLAttributes<HTMLDivEleme
211
212
  * @param props - {@link PivotToolbarRenderProps}
212
213
  */
213
214
  renderPivotToolbar?: RenderSlotFn<PivotToolbarRenderProps> | null;
215
+ /**
216
+ * Renders the toolbar that floats beside the selected drawing when its kind has one (a chart): a
217
+ * quick action and a dropdown of the kind's commands. Omit for the plain default split
218
+ * button; `null` for none.
219
+ *
220
+ * @param props - {@link MovableToolbarRenderProps}
221
+ */
222
+ renderMovableToolbar?: RenderSlotFn<MovableToolbarRenderProps> | null;
214
223
  /**
215
224
  * Render element(s) directly onto the `GridSurface`, bottom → top — the same {@link LayerNode} the
216
225
  * grid takes for its children (a node or an array of them). Each layer reads its pane from context
@@ -12,11 +12,18 @@ export interface SheetCommandContributorData extends SheetCommandData {
12
12
  ownsUndo?: boolean;
13
13
  }
14
14
  /**
15
- * The `sheet` feature's command contributor: `static` seeds the catalog presentation; `dynamic` attaches the
16
- * behavior — cell/format (transactional middleware over the per-workbook undo manager) + the ready-mode
17
- * `'startEdit'` insert commands. Stateless — the model + services ride in `data`.
15
+ * The `sheet` feature's command contributor: the behavior of the sheet as a whole — its view, its
16
+ * protection, the panes over its rules, the objects inserted onto it (transactional middleware over the
17
+ * per-workbook undo manager) — and undo where the sheet owns it. Stateless — the model + services ride
18
+ * in `data`.
18
19
  */
19
20
  export declare const SheetCommandContributor: Command.CommandContributor<SheetCommandContributorData>;
21
+ /**
22
+ * The `cells` scope's command contributor, a child of `sheet`: the behavior over the cell selection —
23
+ * cell/format, insert and delete, data, notes — and the ready-mode `'startEdit'` insert commands.
24
+ * Stateless — the model + services ride in `data`.
25
+ */
26
+ export declare const CellCommandContributor: Command.CommandContributor<SheetCommandContributorData>;
20
27
  interface SheetCommandProviderProps {
21
28
  /** The active sheet the cell/format commands operate on. */
22
29
  sheet: IWorksheet | null;
@@ -50,15 +57,15 @@ interface SheetCommandProviderProps {
50
57
  }
51
58
  /**
52
59
  * **Per-sheet command provider** — owned by `WorkbookElement` (mounted inside it, wrapping the grid). It
53
- * declares a `sheet` scope as a child of the ambient `workbook` scope (owned by `WorkbookElement`)
54
- * via {@link CommandScopeProvider}'s declarative form, so the anchor chain is `pane → sheet → workbook → app`.
55
- * The pane's command **layers** (selection / clipboard / editor / movable) register as `sheet`-descendant
56
- * leaves below it. Behavior is the {@link SheetCommandContributor}; the static chrome is seeded into the
57
- * shared registry here.
60
+ * declares a `sheet` scope as a child of the ambient `workbook` scope (owned by `WorkbookElement`), and a
61
+ * `cells` scope as its child, via {@link CommandScopeProvider}'s declarative form, so the anchor chain is
62
+ * `pane → cells → sheet → workbook → app`. The pane's command **layers** (selection / clipboard / editor /
63
+ * movable) register as `cells`-descendant leaves below it. Behavior is the {@link SheetCommandContributor}
64
+ * and the {@link CellCommandContributor}; the static chrome is seeded into the shared registry here.
58
65
  *
59
66
  * @remarks
60
- * Only the grid consumes the `sheet` scope, so it lives here (inside the workbook) rather than at studio
61
- * level. Without an ambient command scope (a bare chromeless grid), this is a pass-through.
67
+ * Only the grid consumes the `sheet` and `cells` scopes, so they live here (inside the workbook) rather
68
+ * than at studio level. Without an ambient command scope (a bare chromeless grid), this is a pass-through.
62
69
  */
63
70
  export declare const SheetCommandProvider: ({ sheet, editable, scopeRef, elementRef, viewport, children }: SheetCommandProviderProps) => ReactNode;
64
71
  export {};
@@ -71,8 +71,20 @@ export interface PickerMemory {
71
71
  setLastBorder?: (border: Partial<IBorders.Properties> | null) => void;
72
72
  }
73
73
  /**
74
- * The per-sheet command **behavior** (paired with {@link registerSheetDefinitions}). A plain
75
- * contributor over the {@link Command.CommandContribution authoring facet}:
74
+ * The per-sheet command **behavior** for what belongs to the sheet as a whole: its view, its
75
+ * protection, the panes that list its rules, and the objects inserted onto it. The commands that act
76
+ * on the cell selection are {@link contributeCellCommands}, on the `cells` scope below this one, so a
77
+ * scope that attaches to the sheet (a selected drawing) reaches these and not those.
78
+ *
79
+ * @remarks
80
+ * Installs the **shared transactional middleware** (batch + busy + error + repeatable) via `use()`, so
81
+ * the command callbacks stay pure, and runs the protection half of the **disable reducer**.
82
+ */
83
+ export declare function contributeSheetCommands(contribution: Command.CommandContribution, data: SheetCommandData): RemoveListener;
84
+ /**
85
+ * The per-sheet command **behavior** for the cell selection (paired with {@link registerSheetDefinitions}),
86
+ * on the `cells` scope, a child of `sheet`. A plain contributor over the
87
+ * {@link Command.CommandContribution authoring facet}:
76
88
  * 1. installs the **shared transactional middleware** (batch + busy + error + repeatable) via `use()`,
77
89
  * so the command callbacks stay pure;
78
90
  * 2. runs the **disable reducer** — recomputed on every model tick (the container debounce coalesces
@@ -83,8 +95,9 @@ export interface PickerMemory {
83
95
  * rotation commands' extra `isContinuousSpan` gate) with the **selection-shape** rules (sort needs
84
96
  * a single range; insert/delete by whole-row/column + overlap; merge/header). Both must be computed
85
97
  * *together* per command — within-scope `updateCommand` overrides, so reasons are combined in one
86
- * call, not stacked. Returns a disposer that detaches the model + selection listeners.
98
+ * call, not stacked. Its bulk protection rule covers the `cells` catalog only; the sheet's covers the
99
+ * rest. Returns a disposer that detaches the model + selection listeners.
87
100
  */
88
- export declare function contributeSheetCommands(contribution: Command.CommandContribution, data: SheetCommandData): RemoveListener;
101
+ export declare function contributeCellCommands(contribution: Command.CommandContribution, data: SheetCommandData): RemoveListener;
89
102
  export {};
90
103
  //# sourceMappingURL=SheetCommands.d.ts.map
@@ -0,0 +1,46 @@
1
+ import { default as React } from 'react';
2
+ import { TaskPaneProps } from './ITaskPane';
3
+ /**
4
+ * What a command may ask the format pane to open on: `activateTaskPane('format', { args })`, or the
5
+ * `format` command's argument.
6
+ */
7
+ export interface FormatPaneArgs {
8
+ /**
9
+ * The tab to show, by the key the body showing gives it (the cells' `'number'` or `'font'`, a
10
+ * drawing kind's own). A body without a tab of that key stays on the tab it is on. Omit to stay on
11
+ * the tab the pane is on.
12
+ */
13
+ tab?: string;
14
+ }
15
+ /**
16
+ * Supplies the cells' body of the format pane ({@link FormatPane}): what it shows when no drawing is
17
+ * selected. It is handed the pane's own props. Returns a function that removes it again, if it is
18
+ * still the one supplied.
19
+ *
20
+ * @remarks
21
+ * Without one, the format pane formats drawings only, and the commands that open it on the cells
22
+ * are disabled.
23
+ */
24
+ export declare function registerFormatCellsPane(component: React.ComponentType<TaskPaneProps<any, FormatPaneArgs>>): () => void;
25
+ /** Whether a host has supplied the cells' body of the format pane. */
26
+ export declare function hasFormatCellsPane(): boolean;
27
+ /** Calls `listener` whenever the cells' body is supplied or removed. Returns the remover. */
28
+ export declare function addFormatCellsPaneListener(listener: () => void): () => void;
29
+ /**
30
+ * The **Format** task pane: the format of what is selected. With a drawing selected it shows the
31
+ * drawing's ({@link MovablePane}); with none, the cells' (the body given to
32
+ * {@link registerFormatCellsPane}), or without one says to select a drawing. It follows the
33
+ * selection, so opening it needs no target.
34
+ *
35
+ * @remarks
36
+ * The `args` it is opened with go to the body showing when they arrive, not to the next one: a tab
37
+ * asked of a chart is not asked again of the cells when the chart is deselected.
38
+ */
39
+ export declare const FormatPane: (props: TaskPaneProps<any, FormatPaneArgs>) => React.ReactElement;
40
+ /**
41
+ * Registers the format pane ({@link FormatPane}) with the default task pane registry, unless a pane
42
+ * is already registered under its key. Its title and icon come from the `format` catalog entry. The
43
+ * commands that open it call it first.
44
+ */
45
+ export declare function registerFormatPane(): void;
46
+ //# sourceMappingURL=FormatPane.d.ts.map
@@ -1,15 +1,13 @@
1
1
  import { default as React } from 'react';
2
+ import { MovablePaneArgs } from '../movable';
2
3
  import { TaskPaneProps } from './ITaskPane';
3
4
  /**
4
- * The format pane: follows the movable selection and shows the active movable's kind name above the
5
- * body its kind supplies (`MovableRendererModule.pane`, or one given with `registerMovablePane`). With
6
- * nothing selected, or for a kind without a body, it says so.
5
+ * The drawings' body of the format pane ({@link FormatPane}): follows the movable selection and shows
6
+ * the body the active movable's kind supplies (`MovableRendererModule.pane`, or one given with
7
+ * `registerMovablePane`). With nothing selected, or for a kind without a body, it says so.
8
+ *
9
+ * @remarks
10
+ * A body says what it formats itself: the pane draws no heading over it.
7
11
  */
8
- export declare const MovablePane: (props: TaskPaneProps) => React.ReactElement;
9
- /**
10
- * Registers the format pane ({@link MovablePane}) with the default task pane registry, unless a pane
11
- * is already registered under its key. Its title and icon come from the `formatMovable` catalog
12
- * entry. The `formatMovable` command calls it before opening the pane.
13
- */
14
- export declare function registerFormatMovablePane(): void;
12
+ export declare const MovablePane: (props: TaskPaneProps<any, MovablePaneArgs>) => React.ReactElement;
15
13
  //# sourceMappingURL=MovablePane.d.ts.map
@@ -1,10 +1,14 @@
1
1
  import { default as React } from 'react';
2
2
  import { RemoveListener } from '@sheetxl/utils';
3
- import { FocusWindowOptions } from '@sheetxl/utils-react';
3
+ import { FocusWindowOptions, SplitPaneResizerProps } from '@sheetxl/utils-react';
4
4
  import { ITaskPaneRegistry } from './TaskPaneRegistry';
5
5
  import { TaskPaneStripProps } from './TaskPaneStrip';
6
6
  import { TaskPaneTitleProps } from './TaskPaneTitle';
7
7
  export interface TaskPaneAreaProps<T = any> extends React.HTMLAttributes<HTMLDivElement> {
8
+ /**
9
+ * The main content — the grid. The task panes open in a resizable split beside it.
10
+ */
11
+ children?: React.ReactNode;
8
12
  /**
9
13
  * The model to pass to taskpane
10
14
  */
@@ -68,6 +72,32 @@ export interface TaskPaneAreaProps<T = any> extends React.HTMLAttributes<HTMLDiv
68
72
  * If true always show the strip even with one pane.
69
73
  */
70
74
  alwaysShowStrip?: boolean;
75
+ /**
76
+ * If true, the strip's icons turn with its vertical text.
77
+ */
78
+ rotateStripIcons?: boolean;
79
+ /**
80
+ * When set, the layout is remembered under this key: the panes in the strip, the one selected,
81
+ * whether the area is collapsed, and the size of the split.
82
+ *
83
+ * @remarks
84
+ * Stored with `usePersistentState`, so it goes wherever the surrounding `PersistentStateProvider`
85
+ * keeps state. Panes are restored into the strip without loading their content; only the selected
86
+ * pane is shown, and only if the area was not collapsed. A pane that is no longer registered is
87
+ * dropped.
88
+ */
89
+ persistKey?: string;
90
+ /**
91
+ * The size of the task panes before the user resizes them: a percent as a `number` or `'40%'`,
92
+ * pixels as `'280px'`.
93
+ *
94
+ * @defaultValue '40%'
95
+ */
96
+ position?: number | string;
97
+ /**
98
+ * Props for the bar between the main content and the task panes.
99
+ */
100
+ propsResizer?: SplitPaneResizerProps;
71
101
  /**
72
102
  * Whether the layout should be right to left. This will flip the order of the panes and the direction of the split.
73
103
  *
@@ -120,9 +150,34 @@ export interface ITaskPaneArea {
120
150
  */
121
151
  canActivate: (key: string) => boolean;
122
152
  /**
123
- * Return the key for the currently active task pane.
153
+ * Return the key for the task pane that is showing.
154
+ *
155
+ * @remarks
156
+ * `null` while the area is {@link isCollapsed | collapsed}: the pane is still in the strip (see
157
+ * {@link getSelected}) but is not showing.
124
158
  */
125
159
  getActive: () => string | null;
160
+ /**
161
+ * Return the key for the task pane selected in the strip, whether or not the area is collapsed.
162
+ *
163
+ * @remarks
164
+ * This is the pane that shows when the area expands.
165
+ */
166
+ getSelected: () => string | null;
167
+ /**
168
+ * Whether the area is collapsed to its strip, with no pane showing.
169
+ */
170
+ isCollapsed: () => boolean;
171
+ /**
172
+ * Collapse the area to its strip, or expand it to show the selected pane.
173
+ *
174
+ * @remarks
175
+ * Collapsing hides the showing pane, so that pane is asked first and may refuse. Activating a pane
176
+ * always expands the area.
177
+ *
178
+ * @param collapsed `true` to collapse.
179
+ */
180
+ setCollapsed: (collapsed: boolean) => Promise<void>;
126
181
  /**
127
182
  * Returns the list of currently open task panes.
128
183
  */
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ /**
3
+ * Properties for {@link TaskPaneEmpty}.
4
+ */
5
+ export interface TaskPaneEmptyProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ ref?: React.Ref<HTMLDivElement>;
7
+ }
8
+ /**
9
+ * The message a task pane shows when it has nothing to show, such as "Select a chart to see its
10
+ * details." It fills the space left in the pane and centers the message in it, so every empty pane
11
+ * reads the same way.
12
+ */
13
+ export declare const TaskPaneEmpty: (props: TaskPaneEmptyProps) => React.ReactElement;
14
+ //# sourceMappingURL=TaskPaneEmpty.d.ts.map
@@ -11,8 +11,12 @@
11
11
  * any string; these are the ones this package knows by name.
12
12
  */
13
13
  export declare const TaskPaneKey: {
14
- /** **Format Cells**: the selection's number format, font, alignment, fill and border. A host supplies it. */
15
- readonly FormatCells: "formatCells";
14
+ /**
15
+ * **Format**: the format of what is selected. The selected drawing's, or with no drawing selected
16
+ * the cells' (number format, font, alignment, fill and border). Supplied here; the cells' body a
17
+ * host supplies with `registerFormatCellsPane`.
18
+ */
19
+ readonly Format: "format";
16
20
  /** The sheet's threaded comments. Opened on a thread with a `CommentsPaneArgs`. A host supplies it. */
17
21
  readonly Comments: "comments";
18
22
  /** The details of the table the active cell is in. A host supplies it. */
@@ -31,8 +35,8 @@ export declare const TaskPaneKey: {
31
35
  readonly PivotTable: "pivotTableFields";
32
36
  /** The cell control at the active cell. Supplied here. */
33
37
  readonly CellControl: "formatCellControl";
34
- /** The format of the selected drawing (shape, picture, chart). Supplied here. */
35
- readonly FormatMovable: "formatMovable";
38
+ /** The details of the selected chart: its series, its axes and its other elements. A host supplies it. */
39
+ readonly ChartDetails: "chartDetails";
36
40
  };
37
41
  export type TaskPaneKey = typeof TaskPaneKey[keyof typeof TaskPaneKey];
38
42
  //# sourceMappingURL=TaskPaneKeys.d.ts.map
@@ -23,7 +23,8 @@ export interface TaskPaneEntry {
23
23
  *
24
24
  * @remarks
25
25
  * Omit it to use the label of the command catalog record that shares the pane's key, which is
26
- * translated with the rest of the chrome. With neither, the title is the key.
26
+ * translated with the rest of the chrome; the record's `groupLabels.taskPane`, when it has one, wins
27
+ * over its plain label. With neither, the title is the key.
27
28
  *
28
29
  * @param catalogTitle That record's label, if there is one, for a title that adjusts it.
29
30
  */
@@ -14,9 +14,20 @@ export interface TaskPaneStripProps extends Omit<React.HTMLAttributes<HTMLElemen
14
14
  */
15
15
  iconsOnly?: boolean;
16
16
  /**
17
- * Whether the layout should be right to left. This will flip the order of the panes and the direction of the split.
17
+ * If true, the icons turn with the vertical text. A horizontal strip never turns them.
18
+ */
19
+ rotateIcons?: boolean;
20
+ /**
21
+ * Whether the strip runs down the side of the area or across it. The area lays it across, below
22
+ * or above the panes, once it is too narrow for them to sit beside the main content.
23
+ *
24
+ * @defaultValue 'vertical'
25
+ */
26
+ orientation?: 'vertical' | 'horizontal';
27
+ /**
28
+ * The side of the area the strip is on. On the left a vertical strip's labels read bottom to top.
18
29
  *
19
- * @defaultValue 'left'
30
+ * @defaultValue 'right'
20
31
  */
21
32
  side?: 'left' | 'right';
22
33
  /**
@@ -0,0 +1,9 @@
1
+ import { ITaskPaneArea } from './TaskPaneArea';
2
+ /** How a `TaskPaneArea` under a `TaskPaneProvider` makes itself the area the provider serves. */
3
+ export interface TaskPaneHost {
4
+ register(area: ITaskPaneArea): () => void;
5
+ }
6
+ export declare const TaskPaneHostContext: import('react').Context<TaskPaneHost | null>;
7
+ /** The surrounding provider's registration, or `null` outside one. */
8
+ export declare const useTaskPaneHost: () => TaskPaneHost | null;
9
+ //# sourceMappingURL=_taskPaneHost.d.ts.map
@@ -3,8 +3,10 @@ export * from './useTaskPane';
3
3
  export * from './TaskPaneArea';
4
4
  export * from './TaskPaneTitle';
5
5
  export * from './TaskPaneStrip';
6
+ export * from './TaskPaneEmpty';
6
7
  export * from './TaskPaneRegistry';
7
8
  export * from './TaskPaneKeys';
8
9
  export * from './MovablePane';
10
+ export * from './FormatPane';
9
11
  export * from './CellControlPane';
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1,28 +1,24 @@
1
1
  import { default as React } from 'react';
2
- import { RenderSlotFn } from '@sheetxl/utils-react';
3
- import { ITaskPaneArea, TaskPaneAreaProps } from './TaskPaneArea';
4
- import { ITaskPaneRegistry } from './TaskPaneRegistry';
2
+ import { ITaskPaneArea } from './TaskPaneArea';
3
+ export interface TaskPaneProviderProps {
4
+ children: React.ReactNode;
5
+ }
5
6
  /**
6
- * Context provider for task panes. Allows custom task pane manager
7
- * to be provided to components within the provider tree.
7
+ * Makes a {@link TaskPaneArea} rendered anywhere inside it reachable through {@link useTaskPaneArea}.
8
+ *
9
+ * @remarks
10
+ * The area registers itself when it mounts. An activation that arrives before then is held and
11
+ * replayed once it does.
8
12
  *
9
13
  * ```tsx
10
- * <TaskPaneProvider
11
- * renderArea={(props) => <TaskPaneArea {...props} />}
12
- * onUpdateArea={(area) => { }}
13
- * >
14
- * <App />
14
+ * <TaskPaneProvider>
15
+ * <Toolbar />
16
+ * <TaskPaneArea>
17
+ * <Grid />
18
+ * </TaskPaneArea>
15
19
  * </TaskPaneProvider>
16
20
  * ```
17
21
  */
18
- export interface TaskPaneProviderProps {
19
- children: React.ReactNode;
20
- /** Render the area. Pass `props.ref` on to the {@link ITaskPaneAreaElement}. */
21
- renderArea: RenderSlotFn<TaskPaneAreaProps>;
22
- /** The area to mount, or `null` once it closes. */
23
- onUpdateArea: (area: React.ReactElement | null) => void;
24
- registry?: ITaskPaneRegistry;
25
- }
26
22
  export declare const TaskPaneProvider: React.FC<TaskPaneProviderProps>;
27
23
  /**
28
24
  * Hook to get the task pane manager directly.