@sheetxl/react 0.7.28-beta.4 → 0.8.0-beta.10

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 (245) hide show
  1. package/browser/esm/BHjeSMaycUkS5dVL.mjs +66 -0
  2. package/browser/esm/BZcQ-KYwS62Ut45c.mjs +20 -0
  3. package/browser/esm/Bow9CzRJrYxak2i5.mjs +318 -0
  4. package/browser/esm/BuvXl14hs-1CvjeA.mjs +2706 -0
  5. package/browser/esm/BwRduT8FTrk5n72r.mjs +32 -0
  6. package/browser/esm/C6urN77szrYwODXF.mjs +134 -0
  7. package/browser/esm/CYMRbtPIr6SklGpp.mjs +775 -0
  8. package/browser/esm/CYoUd5KIl7W3AsxH.mjs +196 -0
  9. package/browser/esm/Cfe0kofqVKGxLqO6.mjs +31 -0
  10. package/browser/esm/CiRN-woJZWYOgTn4.mjs +36 -0
  11. package/browser/esm/Dd-ZybXAgoq9pgGv.mjs +45 -0
  12. package/browser/esm/DjiBz4H74I6nPUY6.mjs +79 -0
  13. package/browser/esm/DyU9UInRnfkPYYlR.mjs +63 -0
  14. package/browser/esm/J8cPagZBeXz86Lnd.mjs +777 -0
  15. package/browser/esm/Sp6PJavGKpF8SJzA.mjs +75 -0
  16. package/browser/esm/cYjYjqEsyd63x8t4.mjs +67 -0
  17. package/browser/esm/chart.mjs +60 -0
  18. package/browser/esm/control.mjs +216 -0
  19. package/browser/esm/group.mjs +123 -0
  20. package/browser/esm/index.mjs +14122 -8944
  21. package/browser/esm/note.mjs +86 -0
  22. package/browser/esm/picture.mjs +86 -0
  23. package/{node/esm/Ban9guHVB-Vxa-tq.mjs → browser/esm/shape.mjs} +2 -4
  24. package/browser/esm/slicer.mjs +276 -0
  25. package/licenses/dependencies.txt +6 -599
  26. package/node/esm/BJ7ZZm63j5O6cvrB.mjs +134 -0
  27. package/node/esm/BfRn5S5V4X8xIAEa.mjs +20 -0
  28. package/node/esm/BpwE3HqTnrLLzE3C.mjs +775 -0
  29. package/node/esm/Buw-VKYJy3y5dbaJ.mjs +197 -0
  30. package/node/esm/CFFlJxNwgyInjEnh.mjs +45 -0
  31. package/node/esm/CM5BT7h-hMtST2bE.mjs +2706 -0
  32. package/node/esm/CV3bT3Hql74GcHoU.mjs +37 -0
  33. package/node/esm/C_ANM4feA1xV-pri.mjs +32 -0
  34. package/node/esm/D3YXHeOyFp00Xk3m.mjs +323 -0
  35. package/node/esm/DPN0n6MGYQ9vZ2KO.mjs +80 -0
  36. package/node/esm/DYosMUJKp-3MSO4q.mjs +76 -0
  37. package/node/esm/DhSq680c5tgMFFbj.mjs +68 -0
  38. package/node/esm/Dxbm6ryIDCEi26RO.mjs +66 -0
  39. package/node/esm/GkmuxU7OwRZtm2Rf.mjs +63 -0
  40. package/node/esm/chart.mjs +60 -0
  41. package/node/esm/control.mjs +216 -0
  42. package/node/esm/group.mjs +123 -0
  43. package/node/esm/index.mjs +16649 -11320
  44. package/node/esm/note.mjs +87 -0
  45. package/node/esm/picture.mjs +86 -0
  46. package/node/esm/shape.mjs +783 -0
  47. package/node/esm/slicer.mjs +278 -0
  48. package/package.json +53 -14
  49. package/resources/contents.json +18 -0
  50. package/resources/locales/contents.json +42 -0
  51. package/resources/locales/de/movable.cmd.json +154 -0
  52. package/resources/locales/de/picture.cmd.json +31 -0
  53. package/resources/locales/de/selection.cmd.json +8 -0
  54. package/resources/locales/de/shape.cmd.json +17 -0
  55. package/resources/locales/de/sheet.cmd.json +328 -21
  56. package/resources/locales/de/slicer.cmd.json +17 -0
  57. package/resources/locales/de/table.cmd.json +9 -1
  58. package/resources/locales/de/ui.msg.json +309 -3
  59. package/resources/locales/de/workbook.cmd.json +10 -6
  60. package/resources/locales/en/movable.cmd.json +154 -0
  61. package/resources/locales/en/picture.cmd.json +31 -0
  62. package/resources/locales/en/selection.cmd.json +8 -0
  63. package/resources/locales/en/shape.cmd.json +17 -0
  64. package/resources/locales/en/sheet.cmd.json +342 -22
  65. package/resources/locales/en/slicer.cmd.json +17 -0
  66. package/resources/locales/en/table.cmd.json +9 -1
  67. package/resources/locales/en/ui.msg.json +309 -3
  68. package/resources/locales/en/workbook.cmd.json +11 -7
  69. package/types/chart.d.ts +2 -0
  70. package/types/control.d.ts +2 -0
  71. package/types/group.d.ts +2 -0
  72. package/types/note.d.ts +2 -0
  73. package/types/picture.d.ts +2 -0
  74. package/types/shape.d.ts +2 -0
  75. package/types/slicer.d.ts +2 -0
  76. package/types/src/annotation/RangeAnnotations.d.ts +119 -0
  77. package/types/src/annotation/index.d.ts +2 -0
  78. package/types/src/autoFill/AutoFillPresets.d.ts +14 -0
  79. package/types/src/autoFill/FillMenu.d.ts +36 -0
  80. package/types/src/autoFill/FillSeries.d.ts +38 -0
  81. package/types/src/autoFill/index.d.ts +4 -0
  82. package/types/src/border/StaticBorderRenderer.d.ts +2 -2
  83. package/types/src/border/useBorders.d.ts +7 -7
  84. package/types/src/cell/CornerTriangle.d.ts +6 -0
  85. package/types/src/cell/FormulaCellRenderer.d.ts +1 -1
  86. package/types/src/cell/OutlineButton.d.ts +123 -0
  87. package/types/src/cell/SheetCellRenderer.d.ts +17 -2
  88. package/types/src/cell/SheetHeaderRenderer.d.ts +5 -0
  89. package/types/src/cell/StaticCellRenderer.d.ts +57 -0
  90. package/types/src/cell/index.d.ts +2 -0
  91. package/types/src/cell/useFormulaViewAnchor.d.ts +1 -1
  92. package/types/src/chart/index.d.ts +0 -1
  93. package/types/src/checklist/ValueChecklist.d.ts +112 -0
  94. package/types/src/checklist/index.d.ts +2 -0
  95. package/types/src/commands/ContextualToolbar.d.ts +19 -0
  96. package/types/src/commands/createTransactionalMiddleware.d.ts +4 -1
  97. package/types/src/commands/index.d.ts +1 -0
  98. package/types/src/comment/CommentCardRequest.d.ts +94 -0
  99. package/types/src/comment/CommentUtils.d.ts +43 -0
  100. package/types/src/comment/NoteEditor.d.ts +20 -0
  101. package/types/src/comment/index.d.ts +5 -0
  102. package/types/src/comment/useCommentThread.d.ts +37 -0
  103. package/types/src/comment/useSheetComments.d.ts +28 -0
  104. package/types/src/{sheet → conditionalFormat}/ConditionalFormatPresets.d.ts +6 -6
  105. package/types/src/conditionalFormat/index.d.ts +1 -0
  106. package/types/src/control/FormControlRenderers.d.ts +22 -0
  107. package/types/src/editor/FunctionPreviewPanel.d.ts +15 -1
  108. package/types/src/editor/NamedItemLabel.d.ts +29 -0
  109. package/types/src/editor/NamedItemsPanel.d.ts +13 -2
  110. package/types/src/editor/SheetCellEditorLayer.d.ts +3 -7
  111. package/types/src/editor/SheetCellEditorStartLayer.d.ts +44 -0
  112. package/types/src/editor/SheetCellInput.d.ts +26 -2
  113. package/types/src/editor/SheetEditable.d.ts +8 -2
  114. package/types/src/editor/formulaCaret.d.ts +39 -10
  115. package/types/src/editor/formulaEval.d.ts +9 -5
  116. package/types/src/editor/formulaLint.d.ts +36 -0
  117. package/types/src/editor/formulaPresentation.d.ts +7 -0
  118. package/types/src/editor/formulaText.d.ts +17 -5
  119. package/types/src/editor/functionArgs.d.ts +20 -0
  120. package/types/src/editor/index.d.ts +4 -1
  121. package/types/src/editor/pickedReference.d.ts +76 -0
  122. package/types/src/editor/useEditRejectedNotice.d.ts +32 -0
  123. package/types/src/editor/useFormulaHints.d.ts +93 -3
  124. package/types/src/editor/useFormulaInput.d.ts +30 -4
  125. package/types/src/editor/useReferenceMode.d.ts +12 -0
  126. package/types/src/editor/validationAlert.d.ts +24 -0
  127. package/types/src/externalLink/ExternalLinksPaneArgs.d.ts +23 -0
  128. package/types/src/externalLink/index.d.ts +2 -0
  129. package/types/src/form/FormulaInput.d.ts +18 -2
  130. package/types/src/form/FormulaInputParts.d.ts +10 -1
  131. package/types/src/form/useEditCommit.d.ts +23 -3
  132. package/types/src/form/useInputField.d.ts +2 -3
  133. package/types/src/frame/CommandContext.d.ts +188 -6
  134. package/types/src/group/GroupEditor.d.ts +25 -0
  135. package/types/src/index.d.ts +12 -1
  136. package/types/src/io/WorkbookIO.d.ts +2 -0
  137. package/types/src/layer/CellErrorLayer.d.ts +24 -7
  138. package/types/src/layer/CommentCardLayer.d.ts +43 -0
  139. package/types/src/layer/CommentsLayer.d.ts +35 -0
  140. package/types/src/layer/ConditionalIcons.d.ts +4 -4
  141. package/types/src/layer/FreezeDragLines.d.ts +17 -0
  142. package/types/src/layer/GridFreezeLayer.d.ts +11 -0
  143. package/types/src/layer/HeaderFreezeLayer.d.ts +12 -0
  144. package/types/src/layer/HeaderResizerLayer.d.ts +2 -1
  145. package/types/src/layer/HyperlinkLayer.d.ts +109 -0
  146. package/types/src/layer/MovableKindScope.d.ts +17 -0
  147. package/types/src/layer/ProtectionLayer.d.ts +52 -0
  148. package/types/src/layer/RangeAnnotationLayer.d.ts +71 -0
  149. package/types/src/layer/ResizeIndicator.d.ts +9 -8
  150. package/types/src/layer/ResizeTooltip.d.ts +13 -0
  151. package/types/src/layer/SheetHeaderCellLayer.d.ts +10 -1
  152. package/types/src/layer/SheetOutlineLayer.d.ts +40 -0
  153. package/types/src/layer/TableLayer.d.ts +5 -4
  154. package/types/src/layer/TableToolbar.d.ts +42 -0
  155. package/types/src/layer/ValidationDropdownLayer.d.ts +61 -0
  156. package/types/src/layer/ValidationIndicatorLayer.d.ts +14 -21
  157. package/types/src/layer/ValidationPromptLayer.d.ts +64 -0
  158. package/types/src/layer/_tableColor.d.ts +4 -0
  159. package/types/src/layer/cellTip.d.ts +13 -0
  160. package/types/src/layer/freezeDragState.d.ts +21 -0
  161. package/types/src/layer/index.d.ts +14 -0
  162. package/types/src/layer/resizeIndicatorState.d.ts +3 -1
  163. package/types/src/layer/useFreezeDrag.d.ts +22 -0
  164. package/types/src/layer/useValidationPicker.d.ts +54 -0
  165. package/types/src/layer/validationMark.d.ts +63 -0
  166. package/types/src/listener/useModelListener.d.ts +4 -4
  167. package/types/src/movable/ConnectionSites.d.ts +18 -0
  168. package/types/src/movable/IMovableArea.d.ts +56 -0
  169. package/types/src/movable/MovableAdornment.d.ts +26 -0
  170. package/types/src/movable/MovableCommandGroups.d.ts +40 -0
  171. package/types/src/movable/MovableCommands.d.ts +6 -1
  172. package/types/src/movable/MovableControl.d.ts +78 -0
  173. package/types/src/movable/MovableEdit.d.ts +22 -0
  174. package/types/src/movable/MovableFrame.d.ts +16 -13
  175. package/types/src/movable/MovableLayer.d.ts +25 -7
  176. package/types/src/movable/MovableRenderers.d.ts +210 -0
  177. package/types/src/movable/PlaceholderFrames.d.ts +11 -0
  178. package/types/src/movable/RotateHandle.d.ts +37 -0
  179. package/types/src/movable/TextBox.d.ts +34 -0
  180. package/types/src/movable/connect.d.ts +16 -0
  181. package/types/src/movable/framePlacement.d.ts +72 -0
  182. package/types/src/movable/geometry.d.ts +61 -0
  183. package/types/src/movable/index.d.ts +10 -0
  184. package/types/src/movable/pressTarget.d.ts +20 -0
  185. package/types/src/picker/PickerPanel.d.ts +52 -0
  186. package/types/src/picker/cellPickerOpen.d.ts +6 -0
  187. package/types/src/picker/index.d.ts +4 -0
  188. package/types/src/picker/useCellPicker.d.ts +95 -0
  189. package/types/src/picture/PictureCommands.d.ts +12 -0
  190. package/types/src/picture/PictureKind.d.ts +7 -0
  191. package/types/src/picture/index.d.ts +0 -1
  192. package/types/src/protection/ProtectionPaneArgs.d.ts +31 -0
  193. package/types/src/protection/index.d.ts +3 -0
  194. package/types/src/protection/unlockProtectedRanges.d.ts +23 -0
  195. package/types/src/richText/RichTextEditor.d.ts +41 -0
  196. package/types/src/richText/index.d.ts +2 -0
  197. package/types/src/selection/SheetSelectionLayer.d.ts +14 -10
  198. package/types/src/shape/ConnectorControl.d.ts +46 -0
  199. package/types/src/shape/ShapeCommands.d.ts +11 -0
  200. package/types/src/shape/ShapeControl.d.ts +8 -0
  201. package/types/src/shape/ShapeEditor.d.ts +15 -2
  202. package/types/src/shape/ShapeGallery.d.ts +31 -0
  203. package/types/src/shape/ShapeHandles.d.ts +28 -0
  204. package/types/src/shape/ShapeKind.d.ts +7 -0
  205. package/types/src/shape/ShapeSVG.d.ts +22 -0
  206. package/types/src/shape/ShapeText.d.ts +17 -0
  207. package/types/src/shape/icons/ShapeIcons.d.ts +16 -0
  208. package/types/src/shape/icons/_ShapeIconPack.d.ts +4 -0
  209. package/types/src/shape/index.d.ts +3 -1
  210. package/types/src/shape/shapeFrame.d.ts +50 -0
  211. package/types/src/shape/shapeStyle.d.ts +82 -0
  212. package/types/src/sheet/ISheetElement.d.ts +62 -65
  213. package/types/src/sheet/SheetCommandProvider.d.ts +9 -4
  214. package/types/src/sheet/SheetCommands.d.ts +21 -6
  215. package/types/src/sheet/SheetOutlineElement.d.ts +70 -0
  216. package/types/src/sheet/SheetScrollbar.d.ts +1 -10
  217. package/types/src/sheet/_freezeAt.d.ts +10 -0
  218. package/types/src/sheet/_useHeaderMetrics.d.ts +11 -0
  219. package/types/src/sheet/circularReferences.d.ts +9 -1
  220. package/types/src/sheet/index.d.ts +1 -1
  221. package/types/src/sheet/useCycleHighlight.d.ts +21 -0
  222. package/types/src/slicer/SlicerCommands.d.ts +10 -0
  223. package/types/src/slicer/SlicerEditor.d.ts +8 -2
  224. package/types/src/slicer/SlicerKind.d.ts +7 -0
  225. package/types/src/slicer/SlicerStylePreview.d.ts +18 -0
  226. package/types/src/slicer/index.d.ts +2 -1
  227. package/types/src/slicer/slicerStyles.d.ts +32 -0
  228. package/types/src/tabStrip/TabStrip.d.ts +7 -0
  229. package/types/src/taskPane/ITaskPane.d.ts +12 -1
  230. package/types/src/taskPane/MovablePane.d.ts +17 -0
  231. package/types/src/taskPane/index.d.ts +1 -0
  232. package/types/src/theme/ThemeState.d.ts +14 -1
  233. package/types/src/theme/useGridColorScheme.d.ts +1 -1
  234. package/types/src/workbook/DefaultMovableRenderers.d.ts +20 -0
  235. package/types/src/workbook/IWorkbookElement.d.ts +24 -0
  236. package/types/src/workbook/WorkbookCommands.d.ts +2 -4
  237. package/types/src/workbook/WorkbookStrip.d.ts +9 -0
  238. package/types/src/workbook/_followOrigin.d.ts +9 -0
  239. package/types/src/workbook/useWorkbookFormat.d.ts +3 -3
  240. package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
  241. package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +0 -156
  242. package/browser/cjs/index.cjs +0 -35
  243. package/browser/esm/BdJpSdwyWuh-Te5p.mjs +0 -6286
  244. package/types/src/editor/useProtectedEditNotice.d.ts +0 -14
  245. package/types/src/movable/MoveableBundle.d.ts +0 -4
@@ -0,0 +1,36 @@
1
+ import { IRange, ISheet } from '@sheetxl/sdk';
2
+ import { IReactNotifier } from '@sheetxl/utils-react';
3
+ import { CommandContext } from '../frame';
4
+ /**
5
+ * The drag {@link createFillMenu} builds a menu for.
6
+ */
7
+ export interface CreateFillMenuOptions {
8
+ sheet: ISheet;
9
+ /** The cells the fill reads — the selection the handle was dragged from. */
10
+ template: IRange.Coords;
11
+ /** The cells the fill covers, the template included — where the handle was released. */
12
+ destination: IRange.Coords;
13
+ /** Reports a rejected fill, shows the busy state, and opens the Series dialog. */
14
+ notifier?: IReactNotifier;
15
+ /**
16
+ * The drag is over: a fill ran, the Series dialog closed, or the menu closed without choosing.
17
+ * Called once — the grid drops the drag's dashed preview here.
18
+ */
19
+ onSettled?: () => void;
20
+ }
21
+ /**
22
+ * The fill menu's context for a right-drag of the fill handle from `template` to `destination` —
23
+ * Excel's menu of Copy Cells / Fill Series / Fill Formatting Only / … / Series…
24
+ *
25
+ * @returns `null` where there is nothing to offer: the destination does not extend the template (a
26
+ * release on the handle's own corner, or a shrink), in which case the drag is best treated as a
27
+ * left-drag — a shrink clears whichever way the button was held.
28
+ *
29
+ * @remarks
30
+ * Every question the menu has is answered here so the menu itself renders labels and calls back:
31
+ * which types apply is {@link ICellRange.getDefaultAutoFillCriteria} asked in its drag form, and a
32
+ * chosen entry runs through the same `autoFill` a left-drag runs, with the destination selected the
33
+ * same way afterwards.
34
+ */
35
+ export declare function createFillMenu(options: CreateFillMenuOptions): CommandContext.FillMenu | null;
36
+ //# sourceMappingURL=FillMenu.d.ts.map
@@ -0,0 +1,38 @@
1
+ import { IRange, IAutoFill, ICellRange, ISheet } from '@sheetxl/sdk';
2
+ import { IReactNotifier } from '@sheetxl/utils-react';
3
+ import { CommandContext } from '../frame';
4
+ /**
5
+ * What the Series dialog is opened on — see {@link openFillSeries}.
6
+ */
7
+ export interface OpenFillSeriesOptions {
8
+ sheet: ISheet;
9
+ /** Shows the dialog; nothing opens without one. */
10
+ notifier?: IReactNotifier;
11
+ /** The range the dialog reports as the selection. */
12
+ range: ICellRange;
13
+ /**
14
+ * The fill each direction implies — what the dialog offers, resolves and previews per radio. A
15
+ * direction that is absent, or `null`, has no room and its radio is disabled.
16
+ */
17
+ byDirection: ReadonlyMap<IRange.Direction, IAutoFill.DefaultCriteria | null>;
18
+ /** The direction to open on. */
19
+ direction: IRange.Direction;
20
+ /** The {@link IAutoFill.Preset.id} to open on. */
21
+ presetId: string;
22
+ /** The dialog closed — after its fill ran, or without one. */
23
+ onClosed?: () => void;
24
+ }
25
+ /**
26
+ * Open the Series dialog and run the fill it answers with.
27
+ *
28
+ * @remarks
29
+ * Two surfaces reach the dialog: the `fillSeries` command, which infers the template and both
30
+ * directions from the selection, and the fill menu's `Series…`, where a drag has already said which
31
+ * cells are read, which are covered and which way — so only that direction is offered. Both hand the
32
+ * criteria over here and share everything else: the context the dialog asks its questions of, and
33
+ * what happens when it answers.
34
+ */
35
+ export declare function openFillSeries(options: OpenFillSeriesOptions): void;
36
+ /** The `autoFill` options a dialog result names — resolving the preset the surface named it by. */
37
+ export declare function fillOptionsOf(options: CommandContext.FillSeriesOptions): ICellRange.AutoFillOptions;
38
+ //# sourceMappingURL=FillSeries.d.ts.map
@@ -0,0 +1,4 @@
1
+ export * from './AutoFillPresets';
2
+ export * from './FillSeries';
3
+ export * from './FillMenu';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import { default as React } from 'react';
2
- import { IBorder } from '@sheetxl/sdk';
2
+ import { IBorders } from '@sheetxl/sdk';
3
3
  export interface StaticBorderRendererProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  /**
5
5
  * Returns a border for the given value and index.
6
6
  */
7
- getBorderAt?: (value: any, index: number) => IBorder;
7
+ getBorderAt?: (value: any, index: number) => IBorders;
8
8
  rowCount?: number;
9
9
  columnCount?: number;
10
10
  /**
@@ -1,8 +1,8 @@
1
1
  import { default as React } from 'react';
2
- import { IBorder, IRange, ICell } from '@sheetxl/sdk';
2
+ import { IBorders, IRange, ICell } from '@sheetxl/sdk';
3
3
  import { IGridPane, IGridMetrics } from '@sheetxl/grid-react';
4
4
  export interface BorderRenderProps {
5
- stroke: IBorder.IStroke;
5
+ stroke: IBorders.IStroke;
6
6
  range: IRange.Coords;
7
7
  points: number[];
8
8
  key: string;
@@ -10,7 +10,7 @@ export interface BorderRenderProps {
10
10
  * Which cell edge this stroke belongs to. Trailing edges (right/bottom) are
11
11
  * shifted to sit after the divider; leading edges (left/top) sit before it.
12
12
  */
13
- edge?: IBorder.Edge;
13
+ edge?: IBorders.Edge;
14
14
  /**
15
15
  * Int Hint to tell the border the direction that it is rendering
16
16
  */
@@ -27,8 +27,8 @@ export interface BorderRenderProps {
27
27
  * Used for generating corners for wide borders. If not provided then borders will simply overlap.
28
28
  */
29
29
  intersections?: {
30
- stroke: IBorder.IStroke;
31
- edge?: IBorder.Edge;
30
+ stroke: IBorders.IStroke;
31
+ edge?: IBorders.Edge;
32
32
  range: IRange.Coords;
33
33
  }[];
34
34
  /**
@@ -58,9 +58,9 @@ export interface UseBorderOptions {
58
58
  *
59
59
  * @param value - ?
60
60
  * @param index - ?
61
- * @returns The IBorder at the location.
61
+ * @returns The IBorders at the location.
62
62
  */
63
- getBorderAt?: (value: any, index: number) => IBorder;
63
+ getBorderAt?: (value: any, index: number) => IBorders;
64
64
  /**
65
65
  * Allow users to customize border rendering.
66
66
  * Note - This is wrapped in a single SVG so must be an SVG Element type (like a path).
@@ -21,6 +21,12 @@ export interface CornerTriangleProps extends React.SVGProps<SVGSVGElement> {
21
21
  inset?: number;
22
22
  cellWidth?: number;
23
23
  cellHeight?: number;
24
+ /**
25
+ * `'bubble'` draws a speech-bubble corner, Excel's mark for a threaded comment, in place of the
26
+ * triangle. Top right only.
27
+ * @defaultValue 'triangle'
28
+ */
29
+ shape?: 'triangle' | 'bubble';
24
30
  propsPath?: React.SVGProps<SVGPathElement>;
25
31
  }
26
32
  export declare const CornerTriangle: React.MemoExoticComponent<(props: CornerTriangleProps) => React.JSX.Element>;
@@ -7,7 +7,7 @@ export interface FormulaCellRendererProps extends React.HTMLAttributes<HTMLDivEl
7
7
  /** The formula cell being rendered (styling source: font, alignment, insets). */
8
8
  cell: ICell;
9
9
  /**
10
- * The formula's tokens (`createFormula('=' + cell.getFormulaText(), …).getTokens()`).
10
+ * The formula's tokens (`createFormula(cell.getFormulaText(), …).getTokens()`).
11
11
  * Rendered verbatim after a leading `=`, each span colored by {@link tokenColor} — reference
12
12
  * tokens rotate the shared `--sxl-color-series-*` palette by `referenceIndex`, the SAME hues the
13
13
  * range picker outlines with, so text and rectangle always match.
@@ -0,0 +1,123 @@
1
+ import { default as React } from 'react';
2
+ import { IRange } from '@sheetxl/sdk';
3
+ /**
4
+ * Props for the button that collapses or expands one row or column group.
5
+ */
6
+ export interface OutlineButtonProps {
7
+ /** Rows or columns. */
8
+ axis: IRange.Axis;
9
+ /** The group's level, from `1`. */
10
+ level: number;
11
+ /** Whether the group's details are collapsed: the button expands it. */
12
+ collapsed: boolean;
13
+ /** The edge of the square the button fills, in pixels. */
14
+ size: number;
15
+ /** A localized description of what a press does. */
16
+ title: string;
17
+ /** Collapses or expands the group. */
18
+ onToggle: () => void;
19
+ /** Whether a press would be refused (the sheet is protected); the button shows it. */
20
+ disabled?: boolean;
21
+ }
22
+ /**
23
+ * Props for one of the level buttons `1`..`n`.
24
+ */
25
+ export interface OutlineLevelButtonProps {
26
+ /** Rows or columns. */
27
+ axis: IRange.Axis;
28
+ /** The level the button shows, from `1`. */
29
+ level: number;
30
+ /**
31
+ * Whether the headers this level reveals are showing somewhere: its button, and every one below
32
+ * it, would show nothing new. The default renderer does not mark these; it sets `data-shown`.
33
+ */
34
+ shown: boolean;
35
+ /** The edge of the square the button fills, in pixels. */
36
+ size: number;
37
+ /** A localized description of what a press does. */
38
+ title: string;
39
+ /** Shows the groups above this level and collapses the rest. */
40
+ onShowLevel: () => void;
41
+ /** Whether a press would be refused (the sheet is protected); the button shows it. */
42
+ disabled?: boolean;
43
+ }
44
+ /**
45
+ * Props for the outline: the row and column gutters and their level buttons.
46
+ *
47
+ * @remarks
48
+ * The HTML attributes (`className`, `style`, …) apply to each of the outline's boxes: both gutters
49
+ * and both level strips. Where they sit in the sheet is not theirs to change.
50
+ */
51
+ export interface OutlineProps extends React.HTMLAttributes<HTMLDivElement> {
52
+ /**
53
+ * Renders a group's collapse / expand button, filling the square it is placed in. Defaults to
54
+ * {@link OutlineButton}.
55
+ */
56
+ renderButton?: (props: OutlineButtonProps) => React.ReactNode;
57
+ /**
58
+ * Renders a level button, filling the square it is placed in. Defaults to
59
+ * {@link OutlineLevelButton}.
60
+ */
61
+ renderLevelButton?: (props: OutlineLevelButtonProps) => React.ReactNode;
62
+ /**
63
+ * The size of one level's lane across the gutter, in pixels at 100% zoom. A button fills its lane,
64
+ * less {@link laneGap}.
65
+ *
66
+ * @defaultValue 18
67
+ *
68
+ * @remarks
69
+ * The default button is Excel desktop's 17 pixels. Keep the button odd (`laneSize - laneGap`) and
70
+ * the `+` or `−` sits on its center pixel.
71
+ */
72
+ laneSize?: number;
73
+ /**
74
+ * The space around the buttons, in pixels: between neighbors, and before the first and after the
75
+ * last. Not scaled by zoom.
76
+ *
77
+ * @defaultValue 1
78
+ */
79
+ laneGap?: number;
80
+ /**
81
+ * Space between a bracket's end and its button, in pixels.
82
+ *
83
+ * @defaultValue 0
84
+ */
85
+ bracketGap?: number;
86
+ }
87
+ /**
88
+ * The edge of an outline button: it fills its lane, less the gap to its neighbor.
89
+ */
90
+ export declare const outlineButtonSize: (laneSize: number, laneGap: number) => number;
91
+ /**
92
+ * Props for {@link OutlineGlyph}.
93
+ */
94
+ export interface OutlineGlyphProps {
95
+ /** `+` when collapsed, `−` when not. */
96
+ collapsed: boolean;
97
+ /** The glyph's box, in pixels; odd keeps it symmetric. */
98
+ size: number;
99
+ }
100
+ /**
101
+ * The `+` or `−` of an outline button, drawn on whole pixels with a one-pixel stroke.
102
+ */
103
+ export declare const OutlineGlyph: React.MemoExoticComponent<(props: OutlineGlyphProps) => React.JSX.Element>;
104
+ /**
105
+ * The edge and fill of a level button: those of the sheet's corner select-all knob when the sheet is
106
+ * not selected, resolved on the header surface the strip sits on.
107
+ */
108
+ export declare const outlineLevelColors: React.CSSProperties;
109
+ /**
110
+ * The text of a level button: the digit centered in a box of `size` (border included).
111
+ */
112
+ export declare const outlineLevelTextStyle: (size: number) => React.CSSProperties;
113
+ /**
114
+ * The chromeless collapse / expand button: a square with a `+` or a `−`.
115
+ */
116
+ export declare const OutlineButton: React.MemoExoticComponent<(props: OutlineButtonProps) => React.JSX.Element>;
117
+ /**
118
+ * The chromeless level button: a square with its level number, in the corner knob's colors.
119
+ */
120
+ export declare const OutlineLevelButton: React.MemoExoticComponent<(props: OutlineLevelButtonProps) => React.JSX.Element>;
121
+ export declare const renderOutlineButton: (props: OutlineButtonProps) => React.ReactNode;
122
+ export declare const renderOutlineLevelButton: (props: OutlineLevelButtonProps) => React.ReactNode;
123
+ //# sourceMappingURL=OutlineButton.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { ICell, IStyle, ITheme } from '@sheetxl/sdk';
2
+ import { ICell, ICellStyle, ITheme } from '@sheetxl/sdk';
3
3
  import { CellRendererProps } from '@sheetxl/grid-react';
4
4
  export interface SheetCellRendererProps extends CellRendererProps<ICell> {
5
5
  /**
@@ -10,6 +10,21 @@ export interface SheetCellRendererProps extends CellRendererProps<ICell> {
10
10
  * If true, show zero values
11
11
  */
12
12
  showZeros?: boolean;
13
+ /**
14
+ * Allow text that does not fit to paint over its empty neighbors, as it does in a sheet.
15
+ *
16
+ * @defaultValue true
17
+ *
18
+ * @remarks
19
+ * Set `false` when the cell is being drawn somewhere its own sheet's geometry does not apply — a
20
+ * list or menu built from real cells. The extrusion the SDK reports (`ICell.getTextOverflow`) is
21
+ * measured against the SOURCE column's width and ITS neighbors, so away from the sheet it places
22
+ * text against a geometry the surrounding pixels do not have. With this off the renderer lays out
23
+ * purely in the bounds it is given, and text that does not fit is clipped.
24
+ *
25
+ * Only text can extrude — a number or date that does not fit is replaced by `#` either way.
26
+ */
27
+ allowTextOverflow?: boolean;
13
28
  /**
14
29
  * Ability to query the theme colors.
15
30
  * Note - There are also css variables that can be used to style using doc theme colors
@@ -20,7 +35,7 @@ export interface SheetCellRendererProps extends CellRendererProps<ICell> {
20
35
  * An optimization that tells the render all of the styling is normal. And doesn't need to
21
36
  * be overwritten.
22
37
  */
23
- normalStyle?: IStyle;
38
+ normalStyle?: ICellStyle;
24
39
  /**
25
40
  * Callback for when a link has been clicked.
26
41
  *
@@ -11,6 +11,11 @@ export interface SheetHeaderRendererProps extends CellRendererProps {
11
11
  headerText?: (index: number) => string;
12
12
  isSelected?: (index: number) => boolean;
13
13
  isSelectedAll?: (index: number) => boolean;
14
+ /**
15
+ * Whether a filter holds a condition over this header ({@link ISheetHeader.getFilteredRanges}):
16
+ * a row header draws it as filtered, as Excel's blue row numbers.
17
+ */
18
+ isFiltered?: (index: number) => boolean;
14
19
  /**
15
20
  * This is not the default grid zoom this is just for rendering.
16
21
  * @defaultValue 100
@@ -0,0 +1,57 @@
1
+ import { default as React } from 'react';
2
+ import { ICellStyle, ICell } from '@sheetxl/sdk';
3
+ import { StaticBorderRendererProps } from '../border';
4
+ export interface StaticCellRendererProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ /**
6
+ * The text to render. Ignored when {@link cell} is given (the cell's own display text is used).
7
+ */
8
+ value?: string;
9
+ /**
10
+ * The style to preview, applied on top of the cell {@link createCell} mints.
11
+ */
12
+ cellStyle?: ICellStyle.Update;
13
+ /**
14
+ * Mints the cell that backs the preview — a workbook-attached factory, so theme colors, named
15
+ * styles and the number format resolve exactly as they would in the grid.
16
+ *
17
+ * @remarks
18
+ * Usually `(update) => sheet.createCell(update)`. Without one nothing is rendered but the frame:
19
+ * a style has no meaning detached from the workbook that defines its theme.
20
+ */
21
+ createCell?: (update: ICell.Update) => ICell | null;
22
+ /**
23
+ * Render this ALREADY-BUILT cell instead of minting one — what the format panels preview (the
24
+ * live selected cell), where `createCell` would only re-derive what the caller already holds.
25
+ *
26
+ * @remarks
27
+ * Wins over `value`/`cellStyle`/`createCell` when present.
28
+ */
29
+ cell?: ICell | null;
30
+ /**
31
+ * Props forwarded to the border renderer that draws the cell's edges.
32
+ */
33
+ propsBorder?: Partial<StaticBorderRendererProps>;
34
+ /**
35
+ * Dim the preview, matching a disabled control it labels.
36
+ */
37
+ disabled?: boolean;
38
+ /**
39
+ * Ref to the root element (React 19 ref-as-prop).
40
+ */
41
+ ref?: React.Ref<HTMLDivElement>;
42
+ }
43
+ /**
44
+ * A single cell rendered as plain DOM from the model's own CSS — the swatch behind the cell-styles
45
+ * gallery and the format panels' preview.
46
+ *
47
+ * @remarks
48
+ * This is a PREVIEW, not the grid renderer: one cell, no measurement, no editing, no overflow into
49
+ * neighbors. It reads fill / font / border / alignment off an `ICellStyle` and paints them directly, so
50
+ * it stays truthful to the workbook's theme without paying for a grid.
51
+ *
52
+ * It adopts the GRID surface (`data-sxl-theme-surface="grid"`) and the grid's light/dark mode even
53
+ * when it renders inside app chrome — a preview of a cell has to resolve `auto` colors the way that
54
+ * cell will, not the way the toolbar around it does.
55
+ */
56
+ export declare const StaticCellRenderer: React.MemoExoticComponent<(props: StaticCellRendererProps) => React.JSX.Element>;
57
+ //# sourceMappingURL=StaticCellRenderer.d.ts.map
@@ -1,7 +1,9 @@
1
1
  export * from './SheetCellRenderer';
2
+ export * from './StaticCellRenderer';
2
3
  export * from './FormulaCellRenderer';
3
4
  export * from './useFormulaViewAnchor';
4
5
  export * from './SheetHeaderRenderer';
5
6
  export * from './ColumnButton';
7
+ export * from './OutlineButton';
6
8
  export * from './CornerTriangle';
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -11,7 +11,7 @@ export interface FormulaViewAnchor {
11
11
  /** The anchor cell itself (styling source for the overlay renderer). */
12
12
  cell: ICell;
13
13
  /**
14
- * The formula's tokens (resilient tokenizer over `'=' + getFormulaText()`), index-aligned with
14
+ * The formula's tokens (resilient tokenizer over `getFormulaText()`), index-aligned with
15
15
  * {@link ranges} via each token's `referenceIndex`.
16
16
  */
17
17
  tokens: readonly ICalculation.FormulaToken[];
@@ -1,3 +1,2 @@
1
- export * from './ChartEditor';
2
1
  export * from './PresetChartTypeDescriptors';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,112 @@
1
+ import { default as React } from 'react';
2
+ import { Scalar, IFilter } from '@sheetxl/sdk';
3
+ import { CheckboxListProps } from '@sheetxl/grid-react';
4
+ /** One value the checklist offers. */
5
+ export interface ValueChecklistItem {
6
+ /** The value as shown, and the identity a check is kept by unless `key` says otherwise. */
7
+ text: string;
8
+ /**
9
+ * The identity a check is kept by, when two rows may show the same text (by value, the number
10
+ * `1` and the text `'1`). Defaults to `text`.
11
+ */
12
+ key?: string;
13
+ /** The value the text stands for, when a host needs it back (a filter writes it). */
14
+ value?: Scalar;
15
+ /** How many cells hold it, when the host knows. */
16
+ count?: number;
17
+ /** The `(Blank)` row: a blank is a value, listed last, and shown apart from the texts. */
18
+ blank?: boolean;
19
+ }
20
+ /**
21
+ * Props for {@link ValueChecklist}.
22
+ */
23
+ export interface ValueChecklistProps {
24
+ /** The values, in the order shown. */
25
+ items: readonly ValueChecklistItem[];
26
+ /**
27
+ * The date tree over the leading items, as `IFilter.getItems` answers it: one level per entry,
28
+ * each the runs of items its nodes span. Listed as Excel's tree: a row per node with a
29
+ * disclosure, the deepest level's nodes as the leaves, and the items past the tree flat under
30
+ * it. While a search is typed the dates list flat by their text.
31
+ */
32
+ dates?: readonly IFilter.DateLevel[];
33
+ /** The checked values, by their key (`text` unless an item gives a `key`). */
34
+ checked: ReadonlySet<string>;
35
+ /**
36
+ * `texts` were set to `checked` — one on a click, the highlighted rows on Space, every row in
37
+ * view on Select All, every item of a node on its row. Rows out of the view (narrowed away by
38
+ * the search) are never named, so they keep their state.
39
+ */
40
+ onCheckedChange: (texts: readonly string[], checked: boolean) => void;
41
+ /**
42
+ * Whether the items are the texts cells show (a spreadsheet's list) or their values. In value
43
+ * mode rows align by type, numbers to the right, so `1` and the text `'1` read apart.
44
+ *
45
+ * @defaultValue `true`
46
+ */
47
+ byDisplay?: boolean;
48
+ /** Offered as a "By value" option under the search field's glyph when given. */
49
+ onByDisplayChange?: (byDisplay: boolean) => void;
50
+ /**
51
+ * The typed text is to join the values. Given, the search line offers an Add while the text
52
+ * is not already a value, and Enter adds it.
53
+ */
54
+ onAdd?: (text: string) => void;
55
+ /** The host stopped listing values at its cap: the count says so, the reason in its tooltip. */
56
+ truncated?: boolean;
57
+ /** A search field above the list. @defaultValue true */
58
+ search?: boolean;
59
+ /** Enter in the search field, with nothing to add: the host applies. */
60
+ onApply?: () => void;
61
+ /** Escape with no search text to clear: the host closes. */
62
+ onClose?: () => void;
63
+ /** Take the focus on mount. @defaultValue true */
64
+ autoFocus?: boolean;
65
+ /**
66
+ * Where the focus lands on mount: the list, so the arrows, Space and Enter work at once and a
67
+ * typed character moves to the search field; or the search field.
68
+ *
69
+ * @defaultValue 'list'
70
+ */
71
+ focusOn?: 'list' | 'search';
72
+ /** See `CheckboxListProps.renderCheckbox`: a styled control (MUI) in place of the native one. */
73
+ renderCheckbox?: CheckboxListProps['renderCheckbox'];
74
+ /** Render a value row's label. @defaultValue the text */
75
+ renderItem?: (item: ValueChecklistItem) => React.ReactNode;
76
+ /** Uniform row height in px. @defaultValue 24 */
77
+ itemHeight?: number;
78
+ /** Class for the root. */
79
+ className?: string;
80
+ /** Style for the root. */
81
+ style?: React.CSSProperties;
82
+ /** See `ListSurfaceProps.viewport`. */
83
+ viewport?: CheckboxListProps['viewport'];
84
+ }
85
+ /**
86
+ * A searchable **checklist of values** under a tri-state Select All — the filter dropdown's
87
+ * Values body, and any other "which of these" choice.
88
+ *
89
+ * @remarks
90
+ * The list holds values and nothing else. Over them, pinned above the scroll, is the root: one
91
+ * tri-state checkbox for every row in view, labeled by the count of checked values over the
92
+ * values in view. Add, for a host that takes typed values, sits after the search field. A blank
93
+ * is a value: a host that has one lists it last as its `blank` row, which the root and the count
94
+ * cover like any other.
95
+ *
96
+ * Reads no cells: the host supplies the items and owns the checked set (by text). The search
97
+ * narrows the VIEW only: the root acts on the rows in view, rows narrowed away keep their state,
98
+ * and what the host applies is the whole set (Sheets' rule, not Excel's replace-with-results).
99
+ * The list has the focus on open: Up/Down move its highlight, Space toggles the highlighted rows,
100
+ * Enter applies, Tab leaves it, and a typed character moves to the search field. From the field
101
+ * the same keys reach the list, Enter applies, and Escape clears the search and then closes.
102
+ *
103
+ * With `dates`, the leading items are listed as a tree (Excel's year › month › day): a node's
104
+ * checkbox is the state of its items, its row toggles them all, and its disclosure (or Left and
105
+ * Right on the highlighted row, with nothing typed) folds it. Collapsing hides the member rows
106
+ * from the view; they keep their state.
107
+ *
108
+ * The root wears the grid's surface and mode, so the list looks like the cells it stands for even
109
+ * inside chrome of another color.
110
+ */
111
+ export declare const ValueChecklist: React.FC<ValueChecklistProps>;
112
+ //# sourceMappingURL=ValueChecklist.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './ValueChecklist';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,19 @@
1
+ import { Command } from '@sheetxl/utils-react';
2
+ /**
3
+ * Key of the **main toolbar strip**: the registered entry whose members are the ordered ribbon tabs.
4
+ * A contextual tab contributes into it (`contributions: { [WORKBOOK_TOOLBARS_KEY]: { order } }`) and
5
+ * is shown with {@link contributeContextualToolbar}.
6
+ */
7
+ export declare const WORKBOOK_TOOLBARS_KEY = "workbookToolbars";
8
+ /**
9
+ * Registers `entry` in the default button registry for as long as at least one caller holds it, and
10
+ * returns the release. Several holders of the same key (several panes showing one table, a transient
11
+ * re-mount) share one registration; the last release unregisters it. Calling a release more than once
12
+ * is a no-op.
13
+ *
14
+ * Use this for a contextual tab and for any group only that tab references.
15
+ */
16
+ export declare function contributeContextualToolbar(entry: Command.CommandButtonEntry & {
17
+ key: string;
18
+ }): () => void;
19
+ //# sourceMappingURL=ContextualToolbar.d.ts.map
@@ -23,12 +23,15 @@ export interface TransactionalMiddlewareOptions {
23
23
  */
24
24
  isRepeatable?: (command: Command.ResolvedCommand<any, any, any>) => boolean;
25
25
  }
26
+ /** The commit meta entry naming the command that made the commit. */
27
+ export declare const COMMAND_META_KEY = "command";
26
28
  /**
27
29
  * The **shared transactional command wrapper** — one `CommandMiddleware` every feature reuses via
28
30
  * `contribution.use(...)` (sheet, movable, …) instead of re-implementing (or copying) it. Each
29
31
  * wrapped callback stays **pure**; the middleware adds, uniformly:
30
32
  *
31
- * - **batch** — runs the work in `transaction.doBatch(..., label)` so it's one undo entry;
33
+ * - **batch** — runs the work in `transaction.doBatch(..., label)` so it's one undo entry, recording
34
+ * the command's key in the commit's meta (`command`) so a view of the history can show its icon;
32
35
  * - **busy** — `notifier.showBusy(label)` for the duration;
33
36
  * - **error** — a thrown error is reported via `notifier.showError` (a *falsy* throw = user cancel ⇒ swallowed);
34
37
  * - **repeatable** — after success, sets `manager.setRepeatableOperation` so F4 / redo-when-empty
@@ -1,4 +1,5 @@
1
1
  export * from './createTransactionalMiddleware';
2
+ export * from './ContextualToolbar';
2
3
  export * from './InputClipboardCommands';
3
4
  export * from './InputClipboardInjector';
4
5
  export * from './MainFocusContext';