@sheetxl/react 0.8.0-beta.10 → 0.8.0-beta.12

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 (261) hide show
  1. package/browser/esm/B4mT3G7GHwgDYFGP.mjs +128 -0
  2. package/browser/esm/{BwRduT8FTrk5n72r.mjs → BDlpRkuBok0Uu4Hn.mjs} +1 -1
  3. package/browser/esm/BR-AiOwuQlYh5-tr.mjs +730 -0
  4. package/browser/esm/{BuvXl14hs-1CvjeA.mjs → BapujiblfiXDlu67.mjs} +1 -1
  5. package/browser/esm/{DyU9UInRnfkPYYlR.mjs → CSFORKZ8zrVL_Y0w.mjs} +1 -1
  6. package/browser/esm/CUekkfE6uwwsdQpc.mjs +36 -0
  7. package/browser/esm/C_LUq-BnguetvGZz.mjs +23561 -0
  8. package/browser/esm/{BZcQ-KYwS62Ut45c.mjs → Ck1LbcsdSfKNi6xq.mjs} +1 -1
  9. package/browser/esm/{CYoUd5KIl7W3AsxH.mjs → Cslk_qRdBSuJIi1O.mjs} +24 -23
  10. package/browser/esm/CtGhA0kS2MCfEsHN.mjs +262 -0
  11. package/browser/esm/D22NJmTiky4NL8tM.mjs +8 -0
  12. package/browser/esm/D2GydDzPuvIjdpok.mjs +42 -0
  13. package/browser/esm/DGG1auUKsjFbAazu.mjs +60 -0
  14. package/browser/esm/{Cfe0kofqVKGxLqO6.mjs → DN3lqq95KY0K6f1x.mjs} +1 -1
  15. package/browser/esm/{DjiBz4H74I6nPUY6.mjs → D_usN3pWuCJU2GN-.mjs} +2 -2
  16. package/browser/esm/{Sp6PJavGKpF8SJzA.mjs → DhYQRc8L2kALmFNz.mjs} +1 -1
  17. package/browser/esm/{Bow9CzRJrYxak2i5.mjs → DxEczXCHTerDemDP.mjs} +113 -108
  18. package/browser/esm/{Dd-ZybXAgoq9pgGv.mjs → LBQDhVhz7S7i6a8i.mjs} +1 -1
  19. package/browser/esm/{C6urN77szrYwODXF.mjs → ZoS0cpNEBcv6p-Z1.mjs} +1 -1
  20. package/browser/esm/{cYjYjqEsyd63x8t4.mjs → _6Sb6ElRcZftxMNh.mjs} +1 -1
  21. package/browser/esm/chart.mjs +33 -52
  22. package/browser/esm/control.mjs +2 -2
  23. package/browser/esm/group.mjs +3 -3
  24. package/browser/esm/index.mjs +8074 -5647
  25. package/browser/esm/note.mjs +73 -47
  26. package/browser/esm/picture.mjs +41 -41
  27. package/browser/esm/shape.mjs +2 -2
  28. package/browser/esm/slicer.mjs +5 -5
  29. package/licenses/dependencies.txt +313 -1
  30. package/node/esm/{Dxbm6ryIDCEi26RO.mjs → Apcuz4_QtBHt7G47.mjs} +1 -1
  31. package/node/esm/Bi2Jwc0zpweaNzKc.mjs +1697 -0
  32. package/node/esm/{Buw-VKYJy3y5dbaJ.mjs → C0KLMCRb3sbd5Q20.mjs} +23 -22
  33. package/node/esm/CH1DVfFhjdd_3pw1.mjs +128 -0
  34. package/node/esm/{BJ7ZZm63j5O6cvrB.mjs → CNOLkUDURBElaaIf.mjs} +1 -1
  35. package/node/esm/{DhSq680c5tgMFFbj.mjs → CalVk3o4-kX79s3v.mjs} +1 -1
  36. package/node/esm/{DYosMUJKp-3MSO4q.mjs → Cp1DuCae46eQKzWy.mjs} +1 -1
  37. package/node/esm/CzN6c6KyxVmNvayz.mjs +8 -0
  38. package/node/esm/DKqdv5JubgVaq-g9.mjs +35 -0
  39. package/node/esm/DWkPWuf5ZrLRMixG.mjs +328 -0
  40. package/node/esm/{BfRn5S5V4X8xIAEa.mjs → DXiNwr6ZnXBe7TlG.mjs} +1 -1
  41. package/node/esm/DayGI0Bt57FDNbVF.mjs +37 -0
  42. package/node/esm/{CM5BT7h-hMtST2bE.mjs → DyetXBW7vFLJWB22.mjs} +1 -1
  43. package/node/esm/{CFFlJxNwgyInjEnh.mjs → MWges5ywL3aEdChp.mjs} +1 -1
  44. package/node/esm/{DPN0n6MGYQ9vZ2KO.mjs → T5lfCrudsUnOTxEn.mjs} +1 -1
  45. package/node/esm/YB_qExw23Ci4nMYy.mjs +263 -0
  46. package/node/esm/{GkmuxU7OwRZtm2Rf.mjs → bRD1KCpSpAYTEs50.mjs} +1 -1
  47. package/node/esm/chart.mjs +32 -51
  48. package/node/esm/control.mjs +2 -2
  49. package/node/esm/group.mjs +3 -3
  50. package/node/esm/{C_ANM4feA1xV-pri.mjs → iL9jKJcnED6oi0B4.mjs} +1 -1
  51. package/node/esm/index.mjs +10998 -8556
  52. package/node/esm/note.mjs +86 -60
  53. package/node/esm/picture.mjs +41 -41
  54. package/node/esm/shape.mjs +285 -332
  55. package/node/esm/slicer.mjs +15 -15
  56. package/package.json +8 -6
  57. package/resources/contents.json +6 -0
  58. package/resources/locales/contents.json +14 -0
  59. package/resources/locales/de/chart.cmd.json +82 -0
  60. package/resources/locales/de/sheet.cmd.json +32 -0
  61. package/resources/locales/de/table.cmd.json +1 -1
  62. package/resources/locales/de/ui.msg.json +12 -0
  63. package/resources/locales/de/workbook.cmd.json +11 -0
  64. package/resources/locales/en/chart.cmd.json +82 -0
  65. package/resources/locales/en/sheet.cmd.json +32 -0
  66. package/resources/locales/en/table.cmd.json +1 -1
  67. package/resources/locales/en/ui.msg.json +14 -0
  68. package/resources/locales/en/workbook.cmd.json +11 -0
  69. package/types/src/autoFill/FillMenu.d.ts +2 -2
  70. package/types/src/autoFill/FillSeries.d.ts +2 -2
  71. package/types/src/border/StaticBorderRenderer.d.ts +18 -1
  72. package/types/src/border/useBorders.d.ts +76 -3
  73. package/types/src/cell/CellCheckboxRenderer.d.ts +20 -0
  74. package/types/src/cell/CellContent.d.ts +68 -0
  75. package/types/src/cell/CellControlContext.d.ts +37 -0
  76. package/types/src/cell/{FormulaCellRenderer.d.ts → CellFormulaRenderer.d.ts} +10 -7
  77. package/types/src/cell/CellImageRenderer.d.ts +11 -0
  78. package/types/src/cell/CellRenderers.d.ts +190 -0
  79. package/types/src/cell/{SheetCellRenderer.d.ts → CellTextRenderer.d.ts} +9 -6
  80. package/types/src/cell/ColumnButton.d.ts +3 -3
  81. package/types/src/cell/OutlineButton.d.ts +4 -4
  82. package/types/src/cell/SheetHeaderRenderer.d.ts +1 -1
  83. package/types/src/cell/index.d.ts +8 -2
  84. package/types/src/cell/useFormulaViewAnchor.d.ts +3 -3
  85. package/types/src/cell/useInsertableCellControls.d.ts +25 -0
  86. package/types/src/chart/ChartCommands.d.ts +15 -0
  87. package/types/src/chart/ChartEditor.d.ts +12 -2
  88. package/types/src/chart/ChartElement.d.ts +122 -0
  89. package/types/src/chart/ChartKind.d.ts +7 -0
  90. package/types/src/chart/PresetChartTypeDescriptors.d.ts +3 -1
  91. package/types/src/chart/index.d.ts +2 -0
  92. package/types/src/chart/paint/_fills.d.ts +24 -0
  93. package/types/src/chart/paint/_graphics.d.ts +46 -0
  94. package/types/src/chart/paint/_mode.d.ts +6 -0
  95. package/types/src/chart/paint/echarts.d.ts +33 -0
  96. package/types/src/chart/paint/index.d.ts +12 -0
  97. package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +140 -0
  98. package/types/src/chart/paint/kinds/_Area.d.ts +3 -0
  99. package/types/src/chart/paint/kinds/_Bar.d.ts +3 -0
  100. package/types/src/chart/paint/kinds/_BoxWhisker.d.ts +3 -0
  101. package/types/src/chart/paint/kinds/_Bubble.d.ts +3 -0
  102. package/types/src/chart/paint/kinds/_Funnel.d.ts +3 -0
  103. package/types/src/chart/paint/kinds/_Histogram.d.ts +3 -0
  104. package/types/src/chart/paint/kinds/_Line.d.ts +10 -0
  105. package/types/src/chart/paint/kinds/_OfPie.d.ts +3 -0
  106. package/types/src/chart/paint/kinds/_Pie.d.ts +21 -0
  107. package/types/src/chart/paint/kinds/_Placeholder.d.ts +7 -0
  108. package/types/src/chart/paint/kinds/_Radar.d.ts +3 -0
  109. package/types/src/chart/paint/kinds/_Scatter.d.ts +3 -0
  110. package/types/src/chart/paint/kinds/_Sunburst.d.ts +3 -0
  111. package/types/src/chart/paint/kinds/_Surface.d.ts +3 -0
  112. package/types/src/chart/paint/kinds/_Treemap.d.ts +3 -0
  113. package/types/src/chart/paint/kinds/_Waterfall.d.ts +3 -0
  114. package/types/src/chart/paint/kinds/_builtIns.d.ts +12 -0
  115. package/types/src/chart/paint/toEChartsOption.d.ts +42 -0
  116. package/types/src/clipboard/ClipboardCommands.d.ts +3 -3
  117. package/types/src/clipboard/SheetClipboardLayer.d.ts +2 -2
  118. package/types/src/comment/CommentCardRequest.d.ts +9 -9
  119. package/types/src/comment/useSheetComments.d.ts +2 -2
  120. package/types/src/context/WorksheetContext.d.ts +18 -0
  121. package/types/src/context/index.d.ts +1 -1
  122. package/types/src/editableLabel/EditableLabel.d.ts +3 -1
  123. package/types/src/editor/EditorCommands.d.ts +3 -3
  124. package/types/src/editor/SheetCellEditorLayer.d.ts +2 -2
  125. package/types/src/editor/SheetCellEditorStartLayer.d.ts +22 -5
  126. package/types/src/editor/SheetEditable.d.ts +6 -6
  127. package/types/src/editor/SheetReferenceHeaderLayer.d.ts +1 -1
  128. package/types/src/editor/SheetReferenceLayer.d.ts +4 -4
  129. package/types/src/editor/VirtualKeyboardLayer.d.ts +49 -0
  130. package/types/src/editor/formulaAnchor.d.ts +12 -0
  131. package/types/src/editor/index.d.ts +1 -0
  132. package/types/src/editor/pickedReference.d.ts +3 -3
  133. package/types/src/editor/useEditRejectedNotice.d.ts +3 -3
  134. package/types/src/editor/useFormulaHints.d.ts +3 -3
  135. package/types/src/editor/validationAlert.d.ts +3 -3
  136. package/types/src/frame/CommandContext.d.ts +7 -7
  137. package/types/src/index.d.ts +2 -0
  138. package/types/src/layer/BorderLayer.d.ts +2 -2
  139. package/types/src/layer/CellErrorLayer.d.ts +5 -4
  140. package/types/src/layer/CellFillLayer.d.ts +2 -2
  141. package/types/src/layer/CellIndicatorLayer.d.ts +31 -0
  142. package/types/src/layer/CellInsertLayer.d.ts +71 -0
  143. package/types/src/layer/CircularIndicatorLayer.d.ts +2 -2
  144. package/types/src/layer/CommentCardLayer.d.ts +2 -2
  145. package/types/src/layer/CommentsLayer.d.ts +2 -2
  146. package/types/src/layer/ConditionalBarLayer.d.ts +2 -2
  147. package/types/src/layer/ConditionalIconsLayer.d.ts +2 -2
  148. package/types/src/layer/ContextMenuLayer.d.ts +2 -2
  149. package/types/src/layer/GridFreezeLayer.d.ts +2 -2
  150. package/types/src/layer/HeaderSelectionLayer.d.ts +4 -4
  151. package/types/src/layer/HyperlinkLayer.d.ts +11 -8
  152. package/types/src/layer/MovableKindScope.d.ts +2 -2
  153. package/types/src/layer/ProtectionLayer.d.ts +4 -5
  154. package/types/src/layer/RangeAnnotationLayer.d.ts +2 -2
  155. package/types/src/layer/ResizeIndicator.d.ts +2 -2
  156. package/types/src/layer/SheetBackgroundLayer.d.ts +3 -3
  157. package/types/src/layer/SheetCellLayer.d.ts +15 -8
  158. package/types/src/layer/SheetColumnButtonLayer.d.ts +2 -2
  159. package/types/src/layer/SheetGridLineLayer.d.ts +11 -13
  160. package/types/src/layer/SheetLayers.d.ts +115 -0
  161. package/types/src/layer/SheetMovableLayer.d.ts +4 -3
  162. package/types/src/layer/SheetOutlineLayer.d.ts +3 -3
  163. package/types/src/layer/SheetTableCommandLayer.d.ts +2 -2
  164. package/types/src/layer/SpillLayer.d.ts +2 -2
  165. package/types/src/layer/TableLayer.d.ts +3 -3
  166. package/types/src/layer/TableToolbar.d.ts +4 -4
  167. package/types/src/layer/ValidationDropdownLayer.d.ts +2 -2
  168. package/types/src/layer/ValidationIndicatorLayer.d.ts +2 -2
  169. package/types/src/layer/ValidationPromptLayer.d.ts +21 -8
  170. package/types/src/layer/_tableColor.d.ts +2 -2
  171. package/types/src/layer/index.d.ts +3 -0
  172. package/types/src/layer/useFreezeDrag.d.ts +2 -2
  173. package/types/src/layer/useNormalBorderLines.d.ts +15 -0
  174. package/types/src/layer/useSheetFeatureRegions.d.ts +2 -2
  175. package/types/src/layer/useSheetVisibleCells.d.ts +2 -2
  176. package/types/src/layer/useSheetVisibleDecorations.d.ts +2 -2
  177. package/types/src/layer/useTableHeaderCells.d.ts +2 -2
  178. package/types/src/layer/useValidationPicker.d.ts +2 -2
  179. package/types/src/layer/useVisibleTables.d.ts +2 -2
  180. package/types/src/layer/validationMark.d.ts +3 -3
  181. package/types/src/listener/index.d.ts +5 -0
  182. package/types/src/listener/useCell.d.ts +29 -0
  183. package/types/src/listener/useCellRange.d.ts +23 -0
  184. package/types/src/listener/useCellValue.d.ts +26 -0
  185. package/types/src/listener/useModelListener.d.ts +4 -4
  186. package/types/src/listener/useRangeListener.d.ts +13 -7
  187. package/types/src/listener/useRangeSnapshot.d.ts +35 -0
  188. package/types/src/listener/useTable.d.ts +26 -0
  189. package/types/src/movable/DefaultMovable.d.ts +8 -0
  190. package/types/src/movable/MovableCommands.d.ts +2 -2
  191. package/types/src/movable/MovableControl.d.ts +3 -1
  192. package/types/src/movable/MovableFrame.d.ts +2 -1
  193. package/types/src/movable/MovableLayer.d.ts +6 -3
  194. package/types/src/movable/MovableRenderers.d.ts +3 -3
  195. package/types/src/movable/index.d.ts +1 -0
  196. package/types/src/picker/cellPickerOpen.d.ts +3 -3
  197. package/types/src/picker/useCellPicker.d.ts +2 -2
  198. package/types/src/richText/RichTextEditor.d.ts +2 -2
  199. package/types/src/selection/SelectionCommands.d.ts +2 -2
  200. package/types/src/selection/SheetSelectionLayer.d.ts +2 -2
  201. package/types/src/sheet/ISheetHeaderElement.d.ts +3 -3
  202. package/types/src/sheet/{ISheetElement.d.ts → IWorksheetElement.d.ts} +64 -32
  203. package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
  204. package/types/src/sheet/SheetCommandProvider.d.ts +5 -2
  205. package/types/src/sheet/SheetCommands.d.ts +2 -2
  206. package/types/src/sheet/SheetKindIcon.d.ts +14 -0
  207. package/types/src/sheet/SheetOutlineElement.d.ts +6 -6
  208. package/types/src/sheet/SheetPanels.d.ts +11 -0
  209. package/types/src/sheet/SheetScrollbar.d.ts +3 -3
  210. package/types/src/sheet/TopLeftCorner.d.ts +2 -2
  211. package/types/src/sheet/WorksheetElement.d.ts +12 -0
  212. package/types/src/sheet/_freezeAt.d.ts +2 -2
  213. package/types/src/sheet/circularReferences.d.ts +3 -3
  214. package/types/src/sheet/index.d.ts +5 -2
  215. package/types/src/sheet/useCycleHighlight.d.ts +2 -2
  216. package/types/src/tabStrip/SheetTab.d.ts +1 -1
  217. package/types/src/tabStrip/Sortable.d.ts +5 -5
  218. package/types/src/tabStrip/TabStrip.d.ts +6 -6
  219. package/types/src/tabStrip/TabStripItem.d.ts +15 -13
  220. package/types/src/table/TableCommands.d.ts +2 -2
  221. package/types/src/taskPane/CellControlPane.d.ts +17 -0
  222. package/types/src/taskPane/TaskPaneArea.d.ts +7 -0
  223. package/types/src/taskPane/index.d.ts +1 -0
  224. package/types/src/taskPane/useTaskPane.d.ts +6 -3
  225. package/types/src/theme/buildOOXMLThemeCSS.d.ts +2 -2
  226. package/types/src/theme/useGridColorScheme.d.ts +1 -1
  227. package/types/src/theme/useSystemColors.d.ts +2 -2
  228. package/types/src/workbook/DefaultRenderers.d.ts +5 -4
  229. package/types/src/workbook/IWorkbookElement.d.ts +76 -22
  230. package/types/src/workbook/WorkbookStrip.d.ts +5 -5
  231. package/browser/esm/BHjeSMaycUkS5dVL.mjs +0 -66
  232. package/browser/esm/CYMRbtPIr6SklGpp.mjs +0 -775
  233. package/browser/esm/CiRN-woJZWYOgTn4.mjs +0 -36
  234. package/browser/esm/J8cPagZBeXz86Lnd.mjs +0 -777
  235. package/node/esm/BpwE3HqTnrLLzE3C.mjs +0 -775
  236. package/node/esm/CV3bT3Hql74GcHoU.mjs +0 -37
  237. package/node/esm/D3YXHeOyFp00Xk3m.mjs +0 -323
  238. package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +0 -10
  239. package/types/src/chart/templates/area-stacked-template.json.d.ts +0 -10
  240. package/types/src/chart/templates/area-template.json.d.ts +0 -9
  241. package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +0 -10
  242. package/types/src/chart/templates/bar-stacked-template.json.d.ts +0 -10
  243. package/types/src/chart/templates/bar-template.json.d.ts +0 -9
  244. package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +0 -10
  245. package/types/src/chart/templates/column-stacked-template.json.d.ts +0 -10
  246. package/types/src/chart/templates/column-template.json.d.ts +0 -9
  247. package/types/src/chart/templates/line-markers-template.json.d.ts +0 -10
  248. package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +0 -11
  249. package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +0 -11
  250. package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +0 -10
  251. package/types/src/chart/templates/line-stacked-template.json.d.ts +0 -10
  252. package/types/src/chart/templates/line-template.json.d.ts +0 -9
  253. package/types/src/chart/templates/pie-doughnut-template.json.d.ts +0 -10
  254. package/types/src/chart/templates/pie-template.json.d.ts +0 -9
  255. package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +0 -10
  256. package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +0 -10
  257. package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +0 -10
  258. package/types/src/chart/templates/scatter-lines-template.json.d.ts +0 -10
  259. package/types/src/chart/templates/scatter-markers-template.json.d.ts +0 -10
  260. package/types/src/context/SheetContext.d.ts +0 -18
  261. package/types/src/sheet/SheetElement.d.ts +0 -15
@@ -1,10 +1,15 @@
1
1
  import { default as React } from 'react';
2
- import { IBorders } from '@sheetxl/sdk';
2
+ import { IRange, IBorders } from '@sheetxl/sdk';
3
+ import { UseBordersMode, BorderNormalLine } from './useBorders';
3
4
  export interface StaticBorderRendererProps extends React.HTMLAttributes<HTMLDivElement> {
4
5
  /**
5
6
  * Returns a border for the given value and index.
6
7
  */
7
8
  getBorderAt?: (value: any, index: number) => IBorders;
9
+ /**
10
+ * {@inheritDoc UseBorderOptions.getMergeAt}
11
+ */
12
+ getMergeAt?: (value: any, index: number) => IRange.Coords | null;
8
13
  rowCount?: number;
9
14
  columnCount?: number;
10
15
  /**
@@ -22,6 +27,18 @@ export interface StaticBorderRendererProps extends React.HTMLAttributes<HTMLDivE
22
27
  */
23
28
  height?: number;
24
29
  forceThinBorder?: boolean;
30
+ /**
31
+ * {@inheritDoc UseBorderOptions.mode}
32
+ */
33
+ mode?: UseBordersMode;
34
+ /**
35
+ * {@inheritDoc UseBorderOptions.normalRows}
36
+ */
37
+ normalRows?: BorderNormalLine | null;
38
+ /**
39
+ * {@inheritDoc UseBorderOptions.normalColumns}
40
+ */
41
+ normalColumns?: BorderNormalLine | null;
25
42
  }
26
43
  /**
27
44
  * Render a grid border using a border property as an input. Useful
@@ -1,14 +1,19 @@
1
1
  import { default as React } from 'react';
2
2
  import { IBorders, IRange, ICell } from '@sheetxl/sdk';
3
+ import { ReactUtils } from '@sheetxl/utils-react';
3
4
  import { IGridPane, IGridMetrics } from '@sheetxl/grid-react';
4
5
  export interface BorderRenderProps {
5
6
  stroke: IBorders.IStroke;
6
7
  range: IRange.Coords;
8
+ /**
9
+ * `[x, y, x2, y2]`. For a diagonal these are its two corners.
10
+ */
7
11
  points: number[];
8
12
  key: string;
9
13
  /**
10
14
  * Which cell edge this stroke belongs to. Trailing edges (right/bottom) are
11
15
  * shifted to sit after the divider; leading edges (left/top) sit before it.
16
+ * {@link IBorders.Edge.DiagonalUp} and {@link IBorders.Edge.DiagonalDown} run corner to corner.
12
17
  */
13
18
  edge?: IBorders.Edge;
14
19
  /**
@@ -41,6 +46,47 @@ export interface BorderRenderProps {
41
46
  */
42
47
  endExtend?: number;
43
48
  }
49
+ /**
50
+ * Which lines a {@link useBorders} layer draws.
51
+ *
52
+ * - `direct`: the borders cells carry, plus {@link UseBorderOptions.normalRows} /
53
+ * {@link UseBorderOptions.normalColumns} as the Normal style's border — a border on every cell,
54
+ * blank ones included, so it draws above the fills like any other border.
55
+ * - `normal`: only the normal lines, below the cell fills so a fill hides them — the gridlines.
56
+ *
57
+ * Either way a normal line is drawn only where no cell border owns the edge.
58
+ */
59
+ export type UseBordersMode = 'direct' | 'normal';
60
+ /**
61
+ * One axis' line for a {@link UseBordersMode | normal} layer.
62
+ */
63
+ export interface BorderNormalLine {
64
+ /** CSS color. */
65
+ color: string;
66
+ /**
67
+ * Width in device pixels.
68
+ *
69
+ * @defaultValue 1
70
+ */
71
+ width?: number;
72
+ /** Dash pattern in CSS px; solid when omitted. */
73
+ dashArray?: readonly number[] | null;
74
+ /** Two parallel lines, open where they cross. */
75
+ isDouble?: boolean;
76
+ /**
77
+ * The side of the boundary an even width grows toward.
78
+ *
79
+ * @defaultValue 'leading'
80
+ */
81
+ edge?: ReactUtils.EdgeKind;
82
+ }
83
+ /**
84
+ * The {@link BorderNormalLine} that draws `stroke`, or `null` for none.
85
+ *
86
+ * @param stroke The stroke.
87
+ * @param edge The edge the stroke comes from; decides which way an even width grows.
88
+ */
89
+ export declare const toBorderNormalLine: (stroke: IBorders.IStroke | null | undefined, edge: IBorders.Edge) => BorderNormalLine | null;
44
90
  export interface UseBorderOptions {
45
91
  /**
46
92
  * Returns a list of visible cells.
@@ -61,6 +107,14 @@ export interface UseBorderOptions {
61
107
  * @returns The IBorders at the location.
62
108
  */
63
109
  getBorderAt?: (value: any, index: number) => IBorders;
110
+ /**
111
+ * The merged range a cell belongs to, or `null` when it is not merged. A merged cell's diagonals
112
+ * run corner to corner across the whole merge. When omitted every cell is its own box.
113
+ *
114
+ * @param value The value returned from `getVisibleCells`.
115
+ * @param index The index of that value.
116
+ */
117
+ getMergeAt?: (value: any, index: number) => IRange.Coords | null;
64
118
  /**
65
119
  * Allow users to customize border rendering.
66
120
  * Note - This is wrapped in a single SVG so must be an SVG Element type (like a path).
@@ -72,16 +126,35 @@ export interface UseBorderOptions {
72
126
  * Use for previews.
73
127
  */
74
128
  forceThinBorder?: boolean;
129
+ /**
130
+ * @defaultValue 'direct'
131
+ */
132
+ mode?: UseBordersMode;
133
+ /**
134
+ * The horizontal line drawn where no cell border owns the boundary (see {@link UseBordersMode}).
135
+ * `null` draws none.
136
+ */
137
+ normalRows?: BorderNormalLine | null;
138
+ /**
139
+ * The vertical line drawn where no cell border owns the boundary (see {@link UseBordersMode}).
140
+ * `null` draws none.
141
+ */
142
+ normalColumns?: BorderNormalLine | null;
75
143
  }
76
144
  export interface UseBorderResults {
77
145
  /**
78
- * Array of functions that return components to overlay
146
+ * Draws a pane's borders, or `null` when it has none.
79
147
  */
80
- renderLayer?: (props: React.HTMLProps<HTMLDivElement>, pane: IGridPane) => React.ReactNode;
148
+ renderLayer?: (pane: IGridPane) => React.ReactNode;
81
149
  }
82
150
  /**
83
151
  * useBorders
84
152
  * Renders borders by combining individual cells border attributes.
153
+ *
154
+ * @remarks
155
+ * A double is drawn as one solid band with its center cut out by a mask. Each cut runs to the
156
+ * center of the double it meets, so two doubles open into each other where they cross, tee or
157
+ * turn a corner. Strokes that are not double are outside the mask and never cut.
85
158
  */
86
- export declare const useBorders: ({ getBorderAt, rendererBorder, getVisibleCells: propGetVisibleCells, forceThinBorder, defaultColor, }: UseBorderOptions) => UseBorderResults;
159
+ export declare const useBorders: ({ getBorderAt, getMergeAt, rendererBorder, getVisibleCells: propGetVisibleCells, forceThinBorder, defaultColor, mode, normalRows, normalColumns }: UseBorderOptions) => UseBorderResults;
87
160
  //# sourceMappingURL=useBorders.d.ts.map
@@ -0,0 +1,20 @@
1
+ import { default as React } from 'react';
2
+ import { CellContentEntry, CellContentRendererProps } from './CellRenderers';
3
+ /**
4
+ * The checkbox cell control: `TRUE` draws checked, `FALSE` and blank draw unchecked, and a press on
5
+ * the box writes the other.
6
+ *
7
+ * @remarks
8
+ * The box takes the cell's font color and scales with its font size, and sits centered on the line
9
+ * the cell's text would paint in. Under General alignment it is centered, as Excel centers a
10
+ * boolean; an explicit left or right alignment moves it to that edge.
11
+ * A formula cell draws the box but takes no press: it is drawn disabled, and a press on it selects
12
+ * the cell as a press on any cell does.
13
+ */
14
+ export declare const CellCheckboxRenderer: (props: CellContentRendererProps) => React.ReactElement;
15
+ /**
16
+ * What the checkbox control contributes to the UI: the box, the press that writes the other value,
17
+ * and Space, which toggles every checkbox the selection touches.
18
+ */
19
+ export declare const CheckboxCellContent: CellContentEntry;
20
+ //# sourceMappingURL=CellCheckboxRenderer.d.ts.map
@@ -0,0 +1,68 @@
1
+ import { default as React } from 'react';
2
+ import { CellContentRendererProps } from './CellRenderers';
3
+ /**
4
+ * The value type whose General alignment {@link CellContent} follows: text sits left, a number
5
+ * right, a boolean centered.
6
+ */
7
+ export type CellContentAlignAs = 'text' | 'number' | 'boolean';
8
+ /**
9
+ * Props for {@link CellContent}: the renderer's own props, spread whole, plus what the host should
10
+ * do with them.
11
+ */
12
+ export interface CellContentProps extends CellContentRendererProps {
13
+ /**
14
+ * Where General alignment places the children: where it would place a value of this type. An
15
+ * explicit horizontal alignment on the cell places them instead.
16
+ *
17
+ * @defaultValue 'boolean'
18
+ */
19
+ alignAs?: CellContentAlignAs;
20
+ /**
21
+ * Makes the whole cell the hit region: the root carries
22
+ * {@link CellContentRendererProps.interactiveProps}. Leave it off and spread the props on the
23
+ * element inside that should take the pointer instead (a checkbox's box, a rating's stars).
24
+ */
25
+ interactive?: boolean;
26
+ /**
27
+ * Centers the children on the line the cell's text would paint in, rather than placing them
28
+ * against the content box: the cell's vertical alignment, font and row height move them as they
29
+ * move text. For content sized to the font that sits beside text (a checkbox, a slider). Content
30
+ * taller than the room about the line is centered on it and may be shrunk by `max-height`.
31
+ */
32
+ centerOnTextLine?: boolean;
33
+ /**
34
+ * Places the children inside the cell's text insets, the padding text gets. Turn it off for
35
+ * content that runs to the cell's edges, such as a picture or a button.
36
+ *
37
+ * @defaultValue true
38
+ */
39
+ inset?: boolean;
40
+ /** The cell's content. */
41
+ children?: React.ReactNode;
42
+ }
43
+ /**
44
+ * The host a content renderer draws into: the cell's root, placed by the layer, with the renderer's
45
+ * props stripped of what is not for the DOM, its children placed in the cell's content box by the
46
+ * cell's alignment, in the cell's font color and size.
47
+ *
48
+ * @remarks
49
+ * Spread the renderer's props onto it whole and put what the cell shows inside:
50
+ *
51
+ * ```tsx
52
+ * const StarsRenderer: CellContentRenderer = (props) => (
53
+ * <CellContent {...props} alignAs="text">
54
+ * <div {...props.interactiveProps}>★★★☆☆</div>
55
+ * </CellContent>
56
+ * );
57
+ * ```
58
+ *
59
+ * It is a component, so a renderer that uses it is one fiber per cell inside a cached tile; the
60
+ * layer calls the renderer itself as a plain function. A renderer that replaces the text and
61
+ * positions nothing of its own needs nothing else; one that decorates the text wraps
62
+ * {@link CellContentRendererProps.Default} instead, which is its own root.
63
+ */
64
+ export declare const CellContent: {
65
+ (props: CellContentProps): React.ReactElement;
66
+ displayName: string;
67
+ };
68
+ //# sourceMappingURL=CellContent.d.ts.map
@@ -0,0 +1,37 @@
1
+ import { ICell, ICellRange, IWorksheet, Scalar } from '@sheetxl/sdk';
2
+ import { IReactNotifier } from '@sheetxl/utils-react';
3
+ import { EditRejectedNotice } from '../editor/useEditRejectedNotice';
4
+ /**
5
+ * What a cell content entry writes through: guarded writes into the sheet, and the notifier for
6
+ * anything else it has to say. One per layer; every entry of the layer shares it.
7
+ */
8
+ export interface CellControlContext {
9
+ sheet: IWorksheet;
10
+ notifier: IReactNotifier;
11
+ /**
12
+ * Writes `value` into `cell`.
13
+ *
14
+ * @returns `false` when the cell refuses the write: it holds a formula, or it is locked on a
15
+ * protected sheet (the user is told why).
16
+ */
17
+ setCellValue(cell: ICell, value: Scalar): boolean;
18
+ /**
19
+ * Writes `value` into every cell of `range` that holds no formula, in one operation.
20
+ *
21
+ * @returns `false` when nothing was written: every cell holds a formula, or the sheet refused
22
+ * (a locked cell on a protected sheet; the user is told why).
23
+ */
24
+ setRangeValue(range: ICellRange, value: Scalar): boolean;
25
+ }
26
+ /** What {@link createCellControlContext} binds. */
27
+ export interface CellControlContextOptions {
28
+ sheet: IWorksheet;
29
+ notifier: IReactNotifier;
30
+ /** The Excel-style heads-up for a write the sheet's protection refuses. */
31
+ notifyEditRejected: EditRejectedNotice;
32
+ }
33
+ /**
34
+ * Creates the {@link CellControlContext} of a layer.
35
+ */
36
+ export declare function createCellControlContext(options: CellControlContextOptions): CellControlContext;
37
+ //# sourceMappingURL=CellControlContext.d.ts.map
@@ -1,9 +1,9 @@
1
1
  import { default as React } from 'react';
2
- import { ICalculation, ICell } from '@sheetxl/sdk';
2
+ import { ICalculation, ICell, Size } from '@sheetxl/sdk';
3
3
  /**
4
- * Props for {@link FormulaCellRenderer}.
4
+ * Props for {@link CellFormulaRenderer}.
5
5
  */
6
- export interface FormulaCellRendererProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ export interface CellFormulaRendererProps extends React.HTMLAttributes<HTMLDivElement> {
7
7
  /** The formula cell being rendered (styling source: font, alignment, insets). */
8
8
  cell: ICell;
9
9
  /**
@@ -13,6 +13,8 @@ export interface FormulaCellRendererProps extends React.HTMLAttributes<HTMLDivEl
13
13
  * range picker outlines with, so text and rectangle always match.
14
14
  */
15
15
  tokens: readonly ICalculation.FormulaToken[];
16
+ /** The cell's unzoomed size — what the text is placed against (`ICell.getTextPlacement`). */
17
+ size: Size;
16
18
  /** The pane's zoom (the hosting box's bounds are zoomed; fonts must match). */
17
19
  zoom: number;
18
20
  }
@@ -20,15 +22,16 @@ export interface FormulaCellRendererProps extends React.HTMLAttributes<HTMLDivEl
20
22
  * The **formula-view** cell renderer: the anchor cell's formula as tokenized, syntax-colored text.
21
23
  *
22
24
  * @remarks
23
- * The live counterpart of `SheetCellRenderer`'s (plain) `showFormulas` path: the tiled layer keeps
25
+ * The live counterpart of `CellTextRenderer`'s (plain) `showFormulas` path: the tiled layer keeps
24
26
  * every formula cell as an immutable plain-text snapshot, and `SheetCellLayer` suppresses the
25
27
  * ANCHOR cell (the live `data-rc` CSS channel) and overlays this renderer in its place — so
26
28
  * selection moves never invalidate a tile. Colors are emitted as theme tokens (`light-dark()`
27
29
  * aware), so a mode flip re-resolves in pure CSS here too.
28
30
  *
29
31
  * Layout mirrors the plain formula path's rules: forced left alignment, no rotation, no overflow
30
- * past the cell box (clipped by the hosting box), vertical alignment from the cell style.
32
+ * past the cell box (clipped by the hosting box), the vertical position from the SDK placement, and
33
+ * the letter-spacing that paints the text at its measured width.
31
34
  * (2nd pass: hover highlight/eval tooltips like the editor's overlay.)
32
35
  */
33
- export declare const FormulaCellRenderer: React.FC<FormulaCellRendererProps>;
34
- //# sourceMappingURL=FormulaCellRenderer.d.ts.map
36
+ export declare const CellFormulaRenderer: React.FC<CellFormulaRendererProps>;
37
+ //# sourceMappingURL=CellFormulaRenderer.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { CellContentEntry, CellContentRendererProps } from './CellRenderers';
3
+ /**
4
+ * Draws an image value: the picture in the cell, edge to edge, placed by the cell's alignment
5
+ * (left under General, as text is) and sized by the value's sizing. Nothing draws until the bytes are in;
6
+ * a source with no picture draws `#VALUE!`.
7
+ */
8
+ export declare const CellImageRenderer: (props: CellContentRendererProps) => React.ReactElement;
9
+ /** What an image value contributes to the UI: its picture. */
10
+ export declare const CellImageContent: CellContentEntry;
11
+ //# sourceMappingURL=CellImageRenderer.d.ts.map
@@ -0,0 +1,190 @@
1
+ import { default as React } from 'react';
2
+ import { ICell, ICellControl, IRangeSelection, IWorksheet } from '@sheetxl/sdk';
3
+ import { CellRendererProps } from '@sheetxl/grid-react';
4
+ import { CellTextRendererProps } from './CellTextRenderer';
5
+ import { CellControlContext } from './CellControlContext';
6
+ /**
7
+ * The props spread onto the element of a cell's content that takes the pointer (see
8
+ * {@link CellContentRendererProps.interactiveProps}). A marker only: one frozen object for every
9
+ * cell, no handlers.
10
+ */
11
+ export type CellInteractiveProps = Readonly<Record<string, string>>;
12
+ /**
13
+ * The props of the default text renderer as a content renderer receives it
14
+ * ({@link CellContentRendererProps.Default}): the content props may be spread straight onto it.
15
+ */
16
+ export type DefaultCellContentProps = Omit<CellContentRendererProps, keyof CellContentOnlyProps> & Partial<CellContentOnlyProps> & Partial<Omit<CellTextRendererProps, keyof CellRendererProps<ICell>>>;
17
+ /** The props a content renderer has that the default text renderer does not. */
18
+ export interface CellContentOnlyProps {
19
+ control: ICellControl | null;
20
+ context: CellControlContext;
21
+ interactiveProps: CellInteractiveProps;
22
+ Default: React.ComponentType<DefaultCellContentProps>;
23
+ }
24
+ /**
25
+ * What a cell content renderer is given: the cell layer's props for the cell, the layer's write
26
+ * context, the props that make an element interactive, and the default text renderer.
27
+ *
28
+ * @remarks
29
+ * A renderer is a pure function of these props: it is rendered inside the cell layer's cached
30
+ * tiles and calls no hook.
31
+ */
32
+ export interface CellContentRendererProps extends CellRendererProps<ICell> {
33
+ /**
34
+ * The control the renderer draws for, when it was chosen by the cell's control; `null` when it
35
+ * was chosen by the value's rich data type.
36
+ */
37
+ control: ICellControl | null;
38
+ /**
39
+ * The layer's write context, one for every cell of the layer: guarded writes
40
+ * (`setCellValue(cell, value)`) for a renderer that writes from its own pointer handlers, such
41
+ * as a slider's drag. A press and a key write through the entry instead.
42
+ */
43
+ context: CellControlContext;
44
+ /**
45
+ * Spread onto the element that takes the pointer: the box of a checkbox, a button, the track of a
46
+ * slider. It marks the element, nothing more. A plain press on a marked element selects the cell
47
+ * and then reaches the element; the cell layer runs the entry's {@link CellContentEntry.onPress}
48
+ * for it and stops the press, and keeps a double-click on it from opening the editor. For a drag
49
+ * or hover add your own handlers on the element (capture the pointer on it for a drag); a handler
50
+ * that stops the press keeps the layer out of it.
51
+ */
52
+ interactiveProps: CellInteractiveProps;
53
+ /**
54
+ * The default text renderer, bound to this layer's theme, Normal style and view flags. For a
55
+ * renderer that decorates the text rather than replacing it: `<Default {...props}>{badge}</Default>`.
56
+ */
57
+ Default: React.ComponentType<DefaultCellContentProps>;
58
+ }
59
+ /**
60
+ * Draws a cell's content in place of its text.
61
+ *
62
+ * @remarks
63
+ * A pure function of its props: the layer calls it directly inside its cached tiles, not as a
64
+ * component, so it can hold no state and call no hook (a hook throws). It returns the cell's root,
65
+ * which applies `props.style` to place itself in the cell; `CellContent` is that root ready-made.
66
+ * The layer takes no pointer events; the part that should take the pointer spreads
67
+ * `props.interactiveProps`.
68
+ */
69
+ export type CellContentRenderer = (props: CellContentRendererProps) => React.ReactNode;
70
+ /** What a key offered to a content entry is about: the selection it acts on. */
71
+ export interface CellKeyTarget {
72
+ sheet: IWorksheet;
73
+ selection: IRangeSelection;
74
+ /** The selection's anchor cell. */
75
+ anchor: ICell;
76
+ /** The controls of the entry's type that the selection touches; empty for a rich data entry. */
77
+ controls: ICellControl[];
78
+ }
79
+ /** Props of a content entry's task pane body ({@link CellContentEntry.pane}). */
80
+ export interface CellControlPaneProps {
81
+ sheet: IWorksheet;
82
+ /** The anchor cell. */
83
+ cell: ICell;
84
+ /** The cell's control; `null` for a rich data entry. */
85
+ control: ICellControl | null;
86
+ }
87
+ /**
88
+ * What a type of cell control, or of rich data value, contributes to the UI: how its cells draw,
89
+ * what a press and a key do to them, and the task pane body for them. Every field is optional; a
90
+ * type registered with none draws as text.
91
+ */
92
+ export interface CellContentEntry {
93
+ /** Draws the cell in place of its text. Without it the cell draws as text. */
94
+ renderer?: CellContentRenderer;
95
+ /**
96
+ * A press on the content: a primary press on an element carrying
97
+ * {@link CellContentRendererProps.interactiveProps}. A checkbox writes the other value. The
98
+ * event says what was pressed: a renderer with several hit zones in one cell (the stars of a
99
+ * rating) marks them with attributes of its own and reads `event.target`.
100
+ */
101
+ onPress?: (cell: ICell, ctx: CellControlContext, event: CellPressEvent) => void;
102
+ /**
103
+ * A printable key, Space included, typed on the grid while the selection touches cells of this
104
+ * type. Never Enter, Tab, an arrow, Escape or a function key, and never a key with a modifier.
105
+ * Return `true` when consumed: the key then never starts an edit. Return `false` to let the key
106
+ * start the normal edit of the anchor cell. Offered once per type with the whole selection; a
107
+ * checkbox toggles every checkbox cell of it on Space.
108
+ */
109
+ onKey?: (key: string, target: CellKeyTarget, ctx: CellControlContext) => boolean;
110
+ /** The body the cell control pane shows while a cell of this type is the selection's anchor. */
111
+ pane?: React.ComponentType<CellControlPaneProps>;
112
+ /**
113
+ * The icon where a UI lists the types that can be inserted: a `DynamicIcon` key or an element.
114
+ * The name comes from the sdk kind's `label`.
115
+ */
116
+ icon?: string | React.ReactElement;
117
+ /**
118
+ * Whether a UI lists the type among those that can be inserted. Off for a type whose default
119
+ * value shows nothing, such as an image, which needs a source.
120
+ *
121
+ * @defaultValue true
122
+ */
123
+ insertable?: boolean;
124
+ }
125
+ /** The press handed to {@link CellContentEntry.onPress}: the pointer event, already consumed. */
126
+ export type CellPressEvent = Pick<React.PointerEvent, 'button' | 'target' | 'clientX' | 'clientY' | 'shiftKey' | 'ctrlKey' | 'metaKey' | 'altKey'>;
127
+ /** A cell's content entry and what chose it, as {@link getCellContent} answers it. */
128
+ export interface ResolvedCellContent {
129
+ entry: CellContentEntry;
130
+ /** {@inheritDoc CellContentRendererProps.control} */
131
+ control: ICellControl | null;
132
+ }
133
+ /**
134
+ * Registers what a type of cell control contributes to the UI, replacing the built-in entry.
135
+ *
136
+ * @param type The control type (`ICellControl.getType()`), as registered with `CellControlRegistry`
137
+ * in the SDK.
138
+ * @returns A function that removes the registration.
139
+ */
140
+ export declare function registerCellControl(type: string, entry: CellContentEntry): () => void;
141
+ /**
142
+ * Registers what a type of rich data value contributes to the UI, used when the cell's control
143
+ * does not draw the value. Replaces the built-in entry (`image`).
144
+ *
145
+ * @param type The rich data type (`IRichData.getKind().getName()`), as registered with `RichDataRegistry` in
146
+ * the SDK.
147
+ * @returns A function that removes the registration.
148
+ */
149
+ export declare function registerRichData(type: string, entry: CellContentEntry): () => void;
150
+ /** The entry registered for a rich data type, built-in or not, or `undefined`. */
151
+ export declare function getRichDataEntry(type: string): CellContentEntry | undefined;
152
+ /** The entry registered for a control type, built-in or not, or `undefined`. */
153
+ export declare function getCellControlEntry(type: string): CellContentEntry | undefined;
154
+ /**
155
+ * The content entry for `cell`, or `null` for plain text.
156
+ *
157
+ * @remarks
158
+ * The cell's control comes first, when it accepts the cell's value and an entry is registered for
159
+ * its type; then the entry for the value's rich data type. The entry may still have no renderer,
160
+ * in which case the cell draws as text.
161
+ */
162
+ export declare function getCellContent(cell: ICell): ResolvedCellContent | null;
163
+ /**
164
+ * Calls `listener` whenever what {@link getCellContent} answers may have changed: an entry
165
+ * registered or removed.
166
+ *
167
+ * @returns A function that removes the listener.
168
+ */
169
+ export declare function addCellContentListener(listener: () => void): () => void;
170
+ /**
171
+ * Changes whenever an entry is registered or removed, for `useSyncExternalStore`.
172
+ * @internal
173
+ */
174
+ export declare function getCellContentVersion(): number;
175
+ /**
176
+ * A primary press that reached the cell layer: when it is on interactive content whose entry has a
177
+ * press, runs the press and consumes the event. The layer's own handler, so no cell carries one.
178
+ *
179
+ * @returns Whether the press was taken.
180
+ */
181
+ export declare function pressCellContent(e: CellPressEvent & Pick<React.PointerEvent, 'stopPropagation' | 'preventDefault'>, sheet: IWorksheet, ctx: CellControlContext): boolean;
182
+ /**
183
+ * Offers a printable key typed on the grid to the content entries the selection touches, once per
184
+ * type with the whole selection (the selection's controls grouped by type, then the anchor's rich
185
+ * data type).
186
+ *
187
+ * @returns Whether an entry consumed it. The caller then never starts an edit with the key.
188
+ */
189
+ export declare function offerCellKey(key: string, sheet: IWorksheet, ctx: CellControlContext): boolean;
190
+ //# sourceMappingURL=CellRenderers.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { ICell, ICellStyle, ITheme } from '@sheetxl/sdk';
3
3
  import { CellRendererProps } from '@sheetxl/grid-react';
4
- export interface SheetCellRendererProps extends CellRendererProps<ICell> {
4
+ export interface CellTextRendererProps extends CellRendererProps<ICell> {
5
5
  /**
6
6
  * If true, prefer to show the formulas over values
7
7
  */
@@ -37,14 +37,17 @@ export interface SheetCellRendererProps extends CellRendererProps<ICell> {
37
37
  */
38
38
  normalStyle?: ICellStyle;
39
39
  /**
40
- * Callback for when a link has been clicked.
40
+ * Called when the cell's hyperlink is clicked: on release, as Excel follows a link on mouse up
41
+ * (the press itself selects the cell). The link text is interactive content of the cell.
41
42
  *
42
43
  * @param event - The mouse event
43
44
  */
44
- onLinkMouseDown?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
45
+ onLinkClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
45
46
  }
46
47
  /**
47
- * CellRender is used for rendering text values on ICell.
48
+ * Paints a cell's value as text: the formatted value (or its formula in formula view), laid out
49
+ * and decorated the way the sheet shows it. Everything else a cell shows (fill, borders,
50
+ * conditional icons and bars, column buttons, indicators) is a layer of its own.
48
51
  *
49
52
  * Some of the features are:
50
53
  * 1. Text Color
@@ -63,5 +66,5 @@ export interface SheetCellRendererProps extends CellRendererProps<ICell> {
63
66
  *
64
67
  * @param props
65
68
  */
66
- export declare const SheetCellRenderer: React.FC<SheetCellRendererProps>;
67
- //# sourceMappingURL=SheetCellRenderer.d.ts.map
69
+ export declare const CellTextRenderer: React.FC<CellTextRendererProps>;
70
+ //# sourceMappingURL=CellTextRenderer.d.ts.map
@@ -24,15 +24,15 @@ export interface ColumnButtonConfigProps {
24
24
  /**
25
25
  * Callback for creating a custom column button.
26
26
  *
27
- * @returns A React Element representing the ColumnButton.
28
27
  */
29
- renderColumnButton?: (props: ColumnButtonProps) => React.ReactElement;
28
+ renderColumnButton?: (props: ColumnButtonProps) => React.ReactNode;
30
29
  }
31
30
  /**
32
31
  * Property for the filter button
33
32
  */
34
33
  export interface ColumnButtonProps extends React.HTMLAttributes<HTMLElement> {
35
- renderBounds: Bounds;
34
+ /** The header cell's box the button pins itself into. */
35
+ bounds: Bounds;
36
36
  zoom: number;
37
37
  disabled: boolean;
38
38
  column: ITable.IColumn;
@@ -53,12 +53,12 @@ export interface OutlineProps extends React.HTMLAttributes<HTMLDivElement> {
53
53
  * Renders a group's collapse / expand button, filling the square it is placed in. Defaults to
54
54
  * {@link OutlineButton}.
55
55
  */
56
- renderButton?: (props: OutlineButtonProps) => React.ReactNode;
56
+ renderButton?: ((props: OutlineButtonProps) => React.ReactNode) | null;
57
57
  /**
58
58
  * Renders a level button, filling the square it is placed in. Defaults to
59
59
  * {@link OutlineLevelButton}.
60
60
  */
61
- renderLevelButton?: (props: OutlineLevelButtonProps) => React.ReactNode;
61
+ renderLevelButton?: ((props: OutlineLevelButtonProps) => React.ReactNode) | null;
62
62
  /**
63
63
  * The size of one level's lane across the gutter, in pixels at 100% zoom. A button fills its lane,
64
64
  * less {@link laneGap}.
@@ -118,6 +118,6 @@ export declare const OutlineButton: React.MemoExoticComponent<(props: OutlineBut
118
118
  * The chromeless level button: a square with its level number, in the corner knob's colors.
119
119
  */
120
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;
121
+ export declare const defaultRenderOutlineButton: (props: OutlineButtonProps) => React.ReactNode;
122
+ export declare const defaultRenderOutlineLevelButton: (props: OutlineLevelButtonProps) => React.ReactNode;
123
123
  //# sourceMappingURL=OutlineButton.d.ts.map
@@ -36,7 +36,7 @@ export interface SheetHeaderRendererProps extends CellRendererProps {
36
36
  *
37
37
  * @returns A React Element representing the ColumnButton.
38
38
  */
39
- renderColumnButton?: (props: ColumnButtonProps) => React.ReactElement;
39
+ renderColumnButton?: (props: ColumnButtonProps) => React.ReactNode;
40
40
  }
41
41
  export declare const SheetHeaderRenderer: React.MemoExoticComponent<(props: SheetHeaderRendererProps) => React.JSX.Element>;
42
42
  //# sourceMappingURL=SheetHeaderRenderer.d.ts.map
@@ -1,6 +1,12 @@
1
- export * from './SheetCellRenderer';
1
+ export * from './CellTextRenderer';
2
+ export { registerCellControl, registerRichData, getCellContent, getCellControlEntry, addCellContentListener, type CellContentEntry, type CellContentRenderer, type CellContentRendererProps, type CellInteractiveProps, type CellPressEvent, type CellKeyTarget, type CellControlPaneProps, type DefaultCellContentProps, type ResolvedCellContent } from './CellRenderers';
3
+ export * from './CellControlContext';
4
+ export * from './CellContent';
5
+ export * from './CellCheckboxRenderer';
6
+ export * from './CellImageRenderer';
7
+ export * from './useInsertableCellControls';
2
8
  export * from './StaticCellRenderer';
3
- export * from './FormulaCellRenderer';
9
+ export * from './CellFormulaRenderer';
4
10
  export * from './useFormulaViewAnchor';
5
11
  export * from './SheetHeaderRenderer';
6
12
  export * from './ColumnButton';