@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,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.10
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.10
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.10
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -0,0 +1,263 @@
1
+ /**
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { forwardRef as e, memo as t, useCallback as r, useEffect as n, useLayoutEffect as o, useRef as l, useState as s } from "react";
8
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
9
+ import { CommonUtils as c, defineLazyModule as d } from "@sheetxl/utils";
10
+ import { useImperativeElement as u, useMeasure as h, usePendingRender as g, usePersistentState as m, useResolvedThemeMode as p } from "@sheetxl/utils-react";
11
+ import { useMergeRefs as f } from "react-merge-refs";
12
+ var y = {
13
+ Mode: "themeMode",
14
+ DarkGrid: "enableDarkGrid",
15
+ DarkImages: "enableDarkImages"
16
+ }, b = {
17
+ [y.Mode]: null,
18
+ [y.DarkGrid]: !1,
19
+ [y.DarkImages]: !1
20
+ }, x = (e) => {
21
+ const [t] = m(y.Mode, b[y.Mode]), [r] = m(y.DarkGrid, b[y.DarkGrid]), { themeMode: n } = p({ mode: e ?? t ?? void 0 });
22
+ return e || ("dark" === n && r ? "dark" : "light");
23
+ }, v = () => {
24
+ const [e] = m(y.Mode, b[y.Mode]), { themeMode: t } = p({ mode: e ?? void 0 });
25
+ return t;
26
+ }, k = d("chart:paint", () => import("./Bi2Jwc0zpweaNzKc.mjs")), w = (e, t) => {
27
+ const r = e.getElementType();
28
+ if ("point" === r) {
29
+ const r = e.getParent();
30
+ return t === r || "point" === t?.getElementType() && t.getParent() === r ? e : r;
31
+ }
32
+ if ("legendEntry" === r) {
33
+ const r = e.getParent();
34
+ return t === r || "legendEntry" === t?.getElementType() ? e : r;
35
+ }
36
+ if ("dataLabel" === r) {
37
+ const r = e.getParent()?.getParent(), n = r?.getDataLabels();
38
+ return n ? t === n || "dataLabel" === t?.getElementType() && t.getParent()?.getParent() === r ? e : n : e;
39
+ }
40
+ return e;
41
+ }, E = {
42
+ boxes: [],
43
+ handles: []
44
+ }, M = t(e((e, t) => {
45
+ const { children: d, style: m, chart: p, onChartChange: y, zoom: b = 1, width: x, height: M, selection: P = null, colorScheme: C, onElementPress: D, onPointerDown: L, ...A } = e, [G, S] = s(() => c.isPromiseLike(p) ? null : p), [T, z] = s(null), F = l(y);
46
+ F.current = y;
47
+ const I = l(null);
48
+ n(() => {
49
+ let e = !0;
50
+ const t = (e, t) => {
51
+ z(t), S(e), I.current !== e && (I.current = e, F.current?.(e));
52
+ };
53
+ if (c.isPromiseLike(p)) return p.then((r) => {
54
+ e && t(r, null);
55
+ }, (r) => {
56
+ e && t(null, r);
57
+ }), () => {
58
+ e = !1;
59
+ };
60
+ t(p, null);
61
+ }, [p]);
62
+ const [N, $] = h(), B = "number" == typeof x ? x : $.width, R = "number" == typeof M ? M : $.height, j = B ? Math.round(B / b) : 0, V = R ? Math.round(R / b) : 0, X = l({
63
+ width: j,
64
+ height: V
65
+ });
66
+ X.current = {
67
+ width: j,
68
+ height: V
69
+ };
70
+ const Y = v(), q = "dark" === (C ?? Y), H = r(async (e) => {
71
+ const t = X.current;
72
+ if (!G || !t.width || !t.height) return null;
73
+ const r = G.getLayout(t);
74
+ return r ? (await k.load()).renderChartToSVG(r, { darkMode: e?.darkMode ?? !1 }) : null;
75
+ }, [G]), J = l(null), K = l(null), O = l(b);
76
+ O.current = b;
77
+ const Q = r((e, t) => {
78
+ const r = J.current;
79
+ if (!r) return null;
80
+ const n = r.getBoundingClientRect(), o = O.current || 1;
81
+ return {
82
+ x: (e - n.left) / o,
83
+ y: (t - n.top) / o
84
+ };
85
+ }, []), U = r((e, t) => {
86
+ const r = K.current, n = Q(e, t);
87
+ return G && r && n ? G.getElementAt(n, r) : null;
88
+ }, [G, Q]), W = u(t, () => ({
89
+ isChartElement: () => !0,
90
+ getChart: () => G,
91
+ toSVG: H,
92
+ getElementAt: U
93
+ }), [
94
+ G,
95
+ H,
96
+ U
97
+ ]), Z = f([
98
+ W,
99
+ N,
100
+ J
101
+ ]), _ = l(null), ee = l(null), [te, re] = s(() => k.peek() ?? null), [ne, oe] = s(null), [le, se] = s(0), [ie, ae] = s(E);
102
+ n(() => G?.addListeners({ onLayoutChange: () => se((e) => e + 1) }), [G]), g(!(ne || T || te && G)), n(() => {
103
+ if (te) return;
104
+ let e = !0;
105
+ return k.load().then((t) => {
106
+ e && re(t);
107
+ }, (t) => {
108
+ e && oe(t);
109
+ }), () => {
110
+ e = !1;
111
+ };
112
+ }, [te]);
113
+ const ce = r(() => {
114
+ const e = K.current;
115
+ ae(G && e && P && !P.isEmpty() ? ((e, t, r) => {
116
+ const n = [], o = [];
117
+ for (const l of r.getItems()) {
118
+ if (l.getChart() !== e) continue;
119
+ const s = l.getElementType();
120
+ if ("series" === s || "dataLabels" === s) {
121
+ const r = "series" === s ? l : l.getParent(), o = "series" === s ? r.getPoints() : r.getPoints().map((e) => e.getDataLabel());
122
+ for (const r of o) {
123
+ const o = e.getElementBounds(r, t);
124
+ o && n.push(o);
125
+ }
126
+ if (n.length > 0) continue;
127
+ }
128
+ const i = e.getElementBounds(l, t);
129
+ if (i && (n.push(i), 1 === r.getItems().length)) {
130
+ const e = [
131
+ i.x,
132
+ i.x + i.width / 2,
133
+ i.x + i.width
134
+ ], t = [
135
+ i.y,
136
+ i.y + i.height / 2,
137
+ i.y + i.height
138
+ ];
139
+ for (const r of e) for (const n of t) r === e[1] && n === t[1] || o.push({
140
+ x: r,
141
+ y: n
142
+ });
143
+ }
144
+ }
145
+ return {
146
+ boxes: n,
147
+ handles: o
148
+ };
149
+ })(G, e, P) : E);
150
+ }, [G, P]);
151
+ n(() => P?.addListeners({ onChange: ce }), [P, ce]), o(() => {
152
+ const e = _.current;
153
+ if (!(te && e && G && j && V)) return;
154
+ const t = G.getLayout({
155
+ width: j,
156
+ height: V
157
+ });
158
+ if (K.current = t, !t) return ee.current?.dispose(), ee.current = null, e.style.backgroundColor = "", void ce();
159
+ const r = void 0 === t.chartArea.fill;
160
+ e.style.backgroundColor = r ? `var(--sxl-color-base-100, ${q ? "#121212" : "#FFFFFF"})` : "", e.style.borderRadius = r ? `${t.chartArea.cornerRadius}px` : "";
161
+ const n = {
162
+ darkMode: q,
163
+ background: "transparent"
164
+ };
165
+ ee.current ? ee.current.update(t, n) : ee.current = te.mountChart(e, t, n), ce();
166
+ }, [
167
+ te,
168
+ G,
169
+ j,
170
+ V,
171
+ le,
172
+ q,
173
+ ce
174
+ ]), n(() => () => {
175
+ ee.current?.dispose(), ee.current = null, K.current = null;
176
+ }, [G]);
177
+ const de = r((e) => {
178
+ if (L?.(e), 0 !== e.button && 2 !== e.button) return;
179
+ const t = K.current, r = Q(e.clientX, e.clientY);
180
+ if (!G || !t || !r) return;
181
+ const n = G.getElementAt(r, t);
182
+ if (D?.({
183
+ element: n,
184
+ point: r,
185
+ event: e
186
+ }), !P) return;
187
+ if (!n || "chartArea" === n.getElementType()) return void P.clear();
188
+ const o = w(n, P.getActive());
189
+ P.isSelected(o) && 1 === P.getItems().length || P.select([o]);
190
+ }, [
191
+ G,
192
+ P,
193
+ D,
194
+ L,
195
+ Q
196
+ ]);
197
+ if (G?.isDeleted()) return;
198
+ const ue = ne ?? T;
199
+ return a("div", {
200
+ ...A,
201
+ onPointerDown: de,
202
+ style: {
203
+ ...void 0 !== x ? { width: x } : {},
204
+ ...void 0 !== M ? { height: M } : {},
205
+ ...m,
206
+ overflow: "hidden"
207
+ },
208
+ ref: Z,
209
+ children: [
210
+ ue ? i("div", {
211
+ className: "chart-element-error",
212
+ style: {
213
+ padding: "8px",
214
+ fontSize: "12px",
215
+ color: "var(--sxl-color-error, #b00020)"
216
+ },
217
+ children: ue.message
218
+ }) : null,
219
+ i("div", {
220
+ className: "chart-element",
221
+ ref: _,
222
+ style: {
223
+ width: j || "100%",
224
+ height: V || "100%",
225
+ zoom: b,
226
+ position: "relative"
227
+ }
228
+ }),
229
+ ie.boxes.length > 0 ? a("div", {
230
+ className: "chart-element-selection",
231
+ style: {
232
+ position: "absolute",
233
+ left: 0,
234
+ top: 0,
235
+ width: j,
236
+ height: V,
237
+ zoom: b,
238
+ pointerEvents: "none"
239
+ },
240
+ children: [ie.boxes.map((e, t) => i("div", { style: {
241
+ position: "absolute",
242
+ left: e.x - 1,
243
+ top: e.y - 1,
244
+ width: Math.max(0, e.width),
245
+ height: Math.max(0, e.height),
246
+ border: "1px solid var(--sxl-color-primary, #1a73e8)",
247
+ boxSizing: "content-box"
248
+ } }, `box-${t}`)), ie.handles.map((e, t) => i("div", { style: {
249
+ position: "absolute",
250
+ left: e.x - 3,
251
+ top: e.y - 3,
252
+ width: 6,
253
+ height: 6,
254
+ background: "var(--sxl-color-base-100, #fff)",
255
+ border: "1px solid var(--sxl-color-primary, #1a73e8)",
256
+ boxSizing: "border-box"
257
+ } }, `handle-${t}`))]
258
+ }) : null
259
+ ]
260
+ });
261
+ }));
262
+ M.displayName = "ChartElement";
263
+ export { b as a, x as i, w as n, y as o, v as r, M as t };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.10
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,60 +1,41 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.10
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { n as e, t as r } from "./BpwE3HqTnrLLzE3C.mjs";
8
- import { forwardRef as t, memo as o, useEffect as i } from "react";
9
- import { jsx as a, jsxs as l } from "react/jsx-runtime";
10
- import { CommonUtils as n } from "@sheetxl/utils";
11
- import { useImperativeElement as s, useMeasure as d } from "@sheetxl/utils-react";
7
+ import { i as e, n as t, t as r } from "./YB_qExw23Ci4nMYy.mjs";
8
+ import { forwardRef as o, memo as n, useCallback as l, useLayoutEffect as i, useRef as s } from "react";
9
+ import { jsx as a } from "react/jsx-runtime";
10
+ import { useImperativeElement as m } from "@sheetxl/utils-react";
12
11
  import { useMergeRefs as c } from "react-merge-refs";
13
- var m = o(t((t, o) => {
14
- const { children: m, disabled: p, chart: h, zoom: g = 1, isDragging: x, onHide: f, onShow: u, onDragZone: y, adornmentHost: v, flip: b, gesture: C, ...w } = t;
15
- i(() => {}, [h]);
16
- const T = s(o, () => ({ isChartEditor: () => !0 }), []), [D, { height: j, width: k }] = d(), I = c([T, D]);
17
- if (h.isDeleted()) return;
18
- let z = e(h.getChartType());
19
- z || (z = e(r.Column));
20
- const E = z.Icon;
21
- return a("div", {
12
+ var g = n(o((t, o) => {
13
+ const { children: n, disabled: g, style: h, chart: p, zoom: d = 1, isDragging: u, movable: f, onHide: x, onShow: E, onDragZone: v, adornmentHost: b, flip: y, gesture: S, ...w } = t, A = m(o, () => ({ isChartEditor: () => !0 }), []), C = s(null), D = c([A, C]), j = e(), z = f?.getRange()?.getWorksheet()?.getView()?.getChartElementSelection() ?? null;
14
+ i(() => {
15
+ v?.((e) => {
16
+ const t = "touches" in e ? e.touches[0] : e;
17
+ if (!t) return !0;
18
+ const r = C.current?.getElementAt(t.clientX, t.clientY) ?? null;
19
+ return !r || "chartArea" === r.getElementType();
20
+ });
21
+ }, [v]);
22
+ const H = l((e) => {
23
+ !g && e.element && "chartArea" !== e.element.getElementType() && (e.event.stopPropagation(), f && !f.isSelected() && f.select());
24
+ }, [f, g]);
25
+ if (!p.isDeleted()) return a(r, {
22
26
  ...w,
23
- ref: I,
24
- children: l("div", {
25
- className: "chart-editor",
26
- style: {
27
- width: "100%",
28
- height: "100%",
29
- paddingTop: "20px",
30
- paddingBottom: "20px",
31
- backgroundColor: "var(--sxl-color-base-100, white)",
32
- backgroundImage: "var(--sxl-image-background)",
33
- alignItems: "center",
34
- justifyContent: "center",
35
- zoom: g,
36
- display: "flex",
37
- flexDirection: "column",
38
- rowGap: "8px",
39
- position: "relative",
40
- border: "var(--sxl-color-neutral, grey) solid 1px",
41
- filter: p ? "blur(1px)" : void 0,
42
- boxShadow: x ? "1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))" : void 0
43
- },
44
- children: [
45
- h.getChartTitle(),
46
- a(E, { style: {
47
- maxWidth: "260px",
48
- fill: "grey",
49
- opacity: .4
50
- } }),
51
- a("div", {
52
- style: { textAlign: "center" },
53
- children: n.camelToPrettyCase(h.getChartType())
54
- })
55
- ]
56
- })
27
+ chart: p,
28
+ zoom: d,
29
+ colorScheme: j,
30
+ selection: g ? null : z,
31
+ onElementPress: H,
32
+ style: {
33
+ ...h,
34
+ filter: g ? "blur(1px)" : void 0,
35
+ boxShadow: u ? "1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))" : void 0
36
+ },
37
+ ref: D
57
38
  });
58
39
  }));
59
- m.displayName = "ChartEditor";
60
- export { m as ChartEditor };
40
+ g.displayName = "ChartEditor";
41
+ export { g as ChartEditor, r as ChartElement, t as nextSelected };
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.10
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { t as e } from "./CFFlJxNwgyInjEnh.mjs";
7
+ import { t as e } from "./MWges5ywL3aEdChp.mjs";
8
8
  import { memo as t, useEffect as n, useReducer as r, useRef as o } from "react";
9
9
  import { jsx as i, jsxs as l } from "react/jsx-runtime";
10
10
  var d = (e) => {
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.10
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { t as e } from "./CFFlJxNwgyInjEnh.mjs";
8
- import { h as t, i as o, p as n } from "./D3YXHeOyFp00Xk3m.mjs";
7
+ import { t as e } from "./MWges5ywL3aEdChp.mjs";
8
+ import { h as t, i as o, p as n } from "./DWkPWuf5ZrLRMixG.mjs";
9
9
  import { forwardRef as i, memo as r, useContext as s, useEffect as l, useReducer as a } from "react";
10
10
  import { jsx as d, jsxs as g } from "react/jsx-runtime";
11
11
  import { useSurfaceState as h } from "@sheetxl/grid-react";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.10
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.