@sheetxl/react 0.8.0-beta.1 → 0.8.0-beta.11

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 (359) hide show
  1. package/browser/esm/1-LEUre9ZLG0OYYB.mjs +197 -0
  2. package/browser/esm/94dxo1A-z8lgiiGw.mjs +128 -0
  3. package/browser/esm/B26QVfjer2oY2ewK.mjs +32 -0
  4. package/browser/esm/B93LSmhnvkxNXTq-.mjs +42 -0
  5. package/browser/esm/BQYS2Yf-EAV_tBLr.mjs +20 -0
  6. package/{node/esm/DAE_NG8D9uT50zUH.mjs → browser/esm/BegvsXeRs7e-9t8k.mjs} +3 -4
  7. package/browser/esm/Bl2BFCQ00fotauKB.mjs +36 -0
  8. package/browser/esm/Bos4Rkp8UTF7QXUB.mjs +31 -0
  9. package/browser/esm/C1pc9F4Rt2C5FKUo.mjs +45 -0
  10. package/browser/esm/CPnnESfZz2jjJd82.mjs +134 -0
  11. package/browser/esm/CRi6DQ3UXmPEv-w_.mjs +729 -0
  12. package/browser/esm/ClAtIfYbsUPA073B.mjs +2706 -0
  13. package/browser/esm/CzRIbc-Lk__VMLKM.mjs +60 -0
  14. package/browser/esm/D2u6THGErqw64KQI.mjs +63 -0
  15. package/browser/esm/DMdsMPT0fWBbTkNn.mjs +67 -0
  16. package/browser/esm/DS66lAIM-9M-YoZQ.mjs +315 -0
  17. package/browser/esm/DgL7Dy-Lqcr1TvW6.mjs +23528 -0
  18. package/browser/esm/Dnh1kpz3v1JKtRD_.mjs +79 -0
  19. package/browser/esm/cQ6xdPFkEcuDlNTN.mjs +75 -0
  20. package/browser/esm/chart.mjs +40 -0
  21. package/browser/esm/control.mjs +216 -0
  22. package/browser/esm/group.mjs +123 -0
  23. package/browser/esm/index.mjs +15460 -8762
  24. package/browser/esm/note.mjs +112 -0
  25. package/browser/esm/picture.mjs +86 -0
  26. package/browser/esm/shape.mjs +7 -0
  27. package/browser/esm/slicer.mjs +276 -0
  28. package/browser/esm/ugfE7YeZALQURDKF.mjs +241 -0
  29. package/licenses/dependencies.txt +319 -600
  30. package/node/esm/6zApGj9DozhFy-bx.mjs +35 -0
  31. package/node/esm/BMVK5plvmBOAIlxP.mjs +80 -0
  32. package/node/esm/BaRfst1euuhquupX.mjs +66 -0
  33. package/node/esm/Be9c1GwQkPo8Piuh.mjs +134 -0
  34. package/node/esm/BiaDWnN3tT7neoRL.mjs +68 -0
  35. package/node/esm/BlxXufqBBg1PtsXd.mjs +8 -0
  36. package/node/esm/C_SNx7TlFEcwbYjx.mjs +2706 -0
  37. package/node/esm/DJPgbB1X22YmhbaR.mjs +242 -0
  38. package/node/esm/DTMTIrYIK1eZswsM.mjs +37 -0
  39. package/node/esm/D_pCpfdQowV_4Aje.mjs +198 -0
  40. package/node/esm/DgGEHydEjD7nfsDB.mjs +76 -0
  41. package/node/esm/Dj5FM7_-YWhCtCCt.mjs +45 -0
  42. package/node/esm/DxQZmb-j4NLUO9Af.mjs +63 -0
  43. package/node/esm/JiQGhLkoL8CJpVvA.mjs +20 -0
  44. package/node/esm/b-XRVRI1fYQQMkTC.mjs +1664 -0
  45. package/node/esm/chart.mjs +40 -0
  46. package/node/esm/control.mjs +216 -0
  47. package/node/esm/gpD-9LDW92phhoma.mjs +32 -0
  48. package/node/esm/group.mjs +123 -0
  49. package/node/esm/index.mjs +15830 -8966
  50. package/node/esm/note.mjs +113 -0
  51. package/node/esm/picture.mjs +86 -0
  52. package/node/esm/shape.mjs +735 -0
  53. package/node/esm/sigD1UFqvPlWUw_9.mjs +128 -0
  54. package/node/esm/slicer.mjs +278 -0
  55. package/node/esm/umljAT66yb3_rURh.mjs +320 -0
  56. package/package.json +55 -14
  57. package/resources/contents.json +24 -0
  58. package/resources/locales/contents.json +56 -0
  59. package/resources/locales/de/chart.cmd.json +82 -0
  60. package/resources/locales/de/movable.cmd.json +154 -0
  61. package/resources/locales/de/picture.cmd.json +31 -0
  62. package/resources/locales/de/selection.cmd.json +8 -0
  63. package/resources/locales/de/shape.cmd.json +17 -0
  64. package/resources/locales/de/sheet.cmd.json +339 -21
  65. package/resources/locales/de/slicer.cmd.json +17 -0
  66. package/resources/locales/de/table.cmd.json +9 -1
  67. package/resources/locales/de/ui.msg.json +321 -3
  68. package/resources/locales/de/workbook.cmd.json +15 -6
  69. package/resources/locales/en/chart.cmd.json +82 -0
  70. package/resources/locales/en/movable.cmd.json +154 -0
  71. package/resources/locales/en/picture.cmd.json +31 -0
  72. package/resources/locales/en/selection.cmd.json +8 -0
  73. package/resources/locales/en/shape.cmd.json +17 -0
  74. package/resources/locales/en/sheet.cmd.json +353 -22
  75. package/resources/locales/en/slicer.cmd.json +17 -0
  76. package/resources/locales/en/table.cmd.json +9 -1
  77. package/resources/locales/en/ui.msg.json +321 -3
  78. package/resources/locales/en/workbook.cmd.json +16 -7
  79. package/types/chart.d.ts +2 -0
  80. package/types/control.d.ts +2 -0
  81. package/types/group.d.ts +2 -0
  82. package/types/note.d.ts +2 -0
  83. package/types/picture.d.ts +2 -0
  84. package/types/shape.d.ts +2 -0
  85. package/types/slicer.d.ts +2 -0
  86. package/types/src/annotation/RangeAnnotations.d.ts +119 -0
  87. package/types/src/annotation/index.d.ts +2 -0
  88. package/types/src/autoFill/AutoFillPresets.d.ts +14 -0
  89. package/types/src/autoFill/FillMenu.d.ts +36 -0
  90. package/types/src/autoFill/FillSeries.d.ts +38 -0
  91. package/types/src/autoFill/index.d.ts +4 -0
  92. package/types/src/border/StaticBorderRenderer.d.ts +19 -2
  93. package/types/src/border/useBorders.d.ts +81 -8
  94. package/types/src/cell/CornerTriangle.d.ts +6 -0
  95. package/types/src/cell/FormulaCellRenderer.d.ts +6 -3
  96. package/types/src/cell/OutlineButton.d.ts +123 -0
  97. package/types/src/cell/SheetCellRenderer.d.ts +2 -2
  98. package/types/src/cell/SheetHeaderRenderer.d.ts +5 -0
  99. package/types/src/cell/StaticCellRenderer.d.ts +57 -0
  100. package/types/src/cell/index.d.ts +2 -0
  101. package/types/src/cell/useFormulaViewAnchor.d.ts +3 -3
  102. package/types/src/chart/ChartCommands.d.ts +15 -0
  103. package/types/src/chart/ChartEditor.d.ts +10 -2
  104. package/types/src/chart/ChartElement.d.ts +111 -0
  105. package/types/src/chart/ChartKind.d.ts +7 -0
  106. package/types/src/chart/PresetChartTypeDescriptors.d.ts +3 -1
  107. package/types/src/chart/index.d.ts +2 -1
  108. package/types/src/chart/paint/_fills.d.ts +24 -0
  109. package/types/src/chart/paint/_graphics.d.ts +46 -0
  110. package/types/src/chart/paint/echarts.d.ts +30 -0
  111. package/types/src/chart/paint/index.d.ts +12 -0
  112. package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +132 -0
  113. package/types/src/chart/paint/kinds/_Area.d.ts +3 -0
  114. package/types/src/chart/paint/kinds/_Bar.d.ts +3 -0
  115. package/types/src/chart/paint/kinds/_BoxWhisker.d.ts +3 -0
  116. package/types/src/chart/paint/kinds/_Bubble.d.ts +3 -0
  117. package/types/src/chart/paint/kinds/_Funnel.d.ts +3 -0
  118. package/types/src/chart/paint/kinds/_Histogram.d.ts +3 -0
  119. package/types/src/chart/paint/kinds/_Line.d.ts +10 -0
  120. package/types/src/chart/paint/kinds/_OfPie.d.ts +3 -0
  121. package/types/src/chart/paint/kinds/_Pie.d.ts +21 -0
  122. package/types/src/chart/paint/kinds/_Placeholder.d.ts +7 -0
  123. package/types/src/chart/paint/kinds/_Radar.d.ts +3 -0
  124. package/types/src/chart/paint/kinds/_Scatter.d.ts +3 -0
  125. package/types/src/chart/paint/kinds/_Sunburst.d.ts +3 -0
  126. package/types/src/chart/paint/kinds/_Surface.d.ts +3 -0
  127. package/types/src/chart/paint/kinds/_Treemap.d.ts +3 -0
  128. package/types/src/chart/paint/kinds/_Waterfall.d.ts +3 -0
  129. package/types/src/chart/paint/kinds/_builtIns.d.ts +12 -0
  130. package/types/src/chart/paint/toEChartsOption.d.ts +31 -0
  131. package/types/src/checklist/ValueChecklist.d.ts +112 -0
  132. package/types/src/checklist/index.d.ts +2 -0
  133. package/types/src/clipboard/ClipboardCommands.d.ts +3 -3
  134. package/types/src/clipboard/SheetClipboardLayer.d.ts +2 -2
  135. package/types/src/commands/ContextualToolbar.d.ts +19 -0
  136. package/types/src/commands/createTransactionalMiddleware.d.ts +4 -1
  137. package/types/src/commands/index.d.ts +1 -0
  138. package/types/src/comment/CommentCardRequest.d.ts +94 -0
  139. package/types/src/comment/CommentUtils.d.ts +43 -0
  140. package/types/src/comment/NoteEditor.d.ts +20 -0
  141. package/types/src/comment/index.d.ts +5 -0
  142. package/types/src/comment/useCommentThread.d.ts +37 -0
  143. package/types/src/comment/useSheetComments.d.ts +28 -0
  144. package/types/src/{sheet → conditionalFormat}/ConditionalFormatPresets.d.ts +6 -6
  145. package/types/src/conditionalFormat/index.d.ts +1 -0
  146. package/types/src/context/WorksheetContext.d.ts +18 -0
  147. package/types/src/context/index.d.ts +1 -1
  148. package/types/src/control/FormControlRenderers.d.ts +22 -0
  149. package/types/src/editor/EditorCommands.d.ts +3 -3
  150. package/types/src/editor/FunctionPreviewPanel.d.ts +15 -1
  151. package/types/src/editor/NamedItemLabel.d.ts +29 -0
  152. package/types/src/editor/NamedItemsPanel.d.ts +13 -2
  153. package/types/src/editor/SheetCellEditorLayer.d.ts +5 -9
  154. package/types/src/editor/SheetCellEditorStartLayer.d.ts +61 -0
  155. package/types/src/editor/SheetCellInput.d.ts +26 -2
  156. package/types/src/editor/SheetEditable.d.ts +14 -8
  157. package/types/src/editor/SheetReferenceLayer.d.ts +4 -4
  158. package/types/src/editor/VirtualKeyboardLayer.d.ts +49 -0
  159. package/types/src/editor/formulaAnchor.d.ts +12 -0
  160. package/types/src/editor/formulaCaret.d.ts +39 -10
  161. package/types/src/editor/formulaEval.d.ts +9 -5
  162. package/types/src/editor/formulaLint.d.ts +36 -0
  163. package/types/src/editor/formulaPresentation.d.ts +7 -0
  164. package/types/src/editor/formulaText.d.ts +17 -5
  165. package/types/src/editor/functionArgs.d.ts +20 -0
  166. package/types/src/editor/index.d.ts +5 -1
  167. package/types/src/editor/pickedReference.d.ts +76 -0
  168. package/types/src/editor/useEditRejectedNotice.d.ts +32 -0
  169. package/types/src/editor/useFormulaHints.d.ts +95 -5
  170. package/types/src/editor/useFormulaInput.d.ts +30 -4
  171. package/types/src/editor/useReferenceMode.d.ts +12 -0
  172. package/types/src/editor/validationAlert.d.ts +24 -0
  173. package/types/src/externalLink/ExternalLinksPaneArgs.d.ts +23 -0
  174. package/types/src/externalLink/index.d.ts +2 -0
  175. package/types/src/form/FormulaInput.d.ts +18 -2
  176. package/types/src/form/FormulaInputParts.d.ts +10 -1
  177. package/types/src/form/useEditCommit.d.ts +23 -3
  178. package/types/src/form/useInputField.d.ts +2 -3
  179. package/types/src/frame/CommandContext.d.ts +189 -7
  180. package/types/src/group/GroupEditor.d.ts +25 -0
  181. package/types/src/index.d.ts +14 -2
  182. package/types/src/io/WorkbookIO.d.ts +2 -0
  183. package/types/src/layer/BorderLayer.d.ts +2 -2
  184. package/types/src/layer/CellErrorLayer.d.ts +26 -9
  185. package/types/src/layer/CellFillLayer.d.ts +2 -2
  186. package/types/src/layer/CellInsertLayer.d.ts +71 -0
  187. package/types/src/layer/CircularIndicatorLayer.d.ts +2 -2
  188. package/types/src/layer/CommentCardLayer.d.ts +43 -0
  189. package/types/src/layer/CommentsLayer.d.ts +35 -0
  190. package/types/src/layer/ConditionalBarLayer.d.ts +2 -2
  191. package/types/src/layer/ConditionalIcons.d.ts +4 -4
  192. package/types/src/layer/ConditionalIconsLayer.d.ts +2 -2
  193. package/types/src/layer/ContextMenuLayer.d.ts +2 -2
  194. package/types/src/layer/FreezeDragLines.d.ts +17 -0
  195. package/types/src/layer/GridFreezeLayer.d.ts +11 -0
  196. package/types/src/layer/HeaderFreezeLayer.d.ts +12 -0
  197. package/types/src/layer/HeaderResizerLayer.d.ts +2 -1
  198. package/types/src/layer/HyperlinkLayer.d.ts +109 -0
  199. package/types/src/layer/MovableKindScope.d.ts +17 -0
  200. package/types/src/layer/ProtectionLayer.d.ts +52 -0
  201. package/types/src/layer/RangeAnnotationLayer.d.ts +71 -0
  202. package/types/src/layer/ResizeIndicator.d.ts +11 -10
  203. package/types/src/layer/ResizeTooltip.d.ts +13 -0
  204. package/types/src/layer/SheetBackgroundLayer.d.ts +3 -3
  205. package/types/src/layer/SheetCellLayer.d.ts +4 -4
  206. package/types/src/layer/SheetColumnButtonLayer.d.ts +2 -2
  207. package/types/src/layer/SheetGridLineLayer.d.ts +11 -13
  208. package/types/src/layer/SheetHeaderCellLayer.d.ts +10 -1
  209. package/types/src/layer/SheetLayers.d.ts +115 -0
  210. package/types/src/layer/SheetMovableLayer.d.ts +2 -2
  211. package/types/src/layer/SheetOutlineLayer.d.ts +40 -0
  212. package/types/src/layer/SheetTableCommandLayer.d.ts +2 -2
  213. package/types/src/layer/SpillLayer.d.ts +2 -2
  214. package/types/src/layer/TableLayer.d.ts +6 -5
  215. package/types/src/layer/TableToolbar.d.ts +42 -0
  216. package/types/src/layer/ValidationDropdownLayer.d.ts +17 -7
  217. package/types/src/layer/ValidationIndicatorLayer.d.ts +11 -5
  218. package/types/src/layer/ValidationPromptLayer.d.ts +65 -0
  219. package/types/src/layer/_tableColor.d.ts +4 -0
  220. package/types/src/layer/cellTip.d.ts +13 -0
  221. package/types/src/layer/freezeDragState.d.ts +21 -0
  222. package/types/src/layer/index.d.ts +14 -1
  223. package/types/src/layer/resizeIndicatorState.d.ts +3 -1
  224. package/types/src/layer/useFreezeDrag.d.ts +22 -0
  225. package/types/src/layer/useNormalBorderLines.d.ts +15 -0
  226. package/types/src/layer/useSheetFeatureRegions.d.ts +2 -2
  227. package/types/src/layer/useSheetVisibleCells.d.ts +2 -2
  228. package/types/src/layer/useSheetVisibleDecorations.d.ts +2 -2
  229. package/types/src/layer/useTableHeaderCells.d.ts +2 -2
  230. package/types/src/layer/useValidationPicker.d.ts +37 -37
  231. package/types/src/layer/useVisibleTables.d.ts +2 -2
  232. package/types/src/layer/validationMark.d.ts +63 -0
  233. package/types/src/listener/index.d.ts +5 -0
  234. package/types/src/listener/useCell.d.ts +29 -0
  235. package/types/src/listener/useCellRange.d.ts +23 -0
  236. package/types/src/listener/useCellValue.d.ts +26 -0
  237. package/types/src/listener/useModelListener.d.ts +8 -8
  238. package/types/src/listener/useRangeSnapshot.d.ts +35 -0
  239. package/types/src/listener/useTable.d.ts +26 -0
  240. package/types/src/movable/ConnectionSites.d.ts +18 -0
  241. package/types/src/movable/DefaultMovable.d.ts +8 -0
  242. package/types/src/movable/IMovableArea.d.ts +56 -0
  243. package/types/src/movable/MovableAdornment.d.ts +26 -0
  244. package/types/src/movable/MovableCommandGroups.d.ts +40 -0
  245. package/types/src/movable/MovableCommands.d.ts +8 -3
  246. package/types/src/movable/MovableControl.d.ts +78 -0
  247. package/types/src/movable/MovableEdit.d.ts +22 -0
  248. package/types/src/movable/MovableFrame.d.ts +16 -13
  249. package/types/src/movable/MovableLayer.d.ts +25 -7
  250. package/types/src/movable/MovableRenderers.d.ts +210 -0
  251. package/types/src/movable/PlaceholderFrames.d.ts +11 -0
  252. package/types/src/movable/RotateHandle.d.ts +37 -0
  253. package/types/src/movable/TextBox.d.ts +34 -0
  254. package/types/src/movable/connect.d.ts +16 -0
  255. package/types/src/movable/framePlacement.d.ts +72 -0
  256. package/types/src/movable/geometry.d.ts +61 -0
  257. package/types/src/movable/index.d.ts +11 -0
  258. package/types/src/movable/pressTarget.d.ts +20 -0
  259. package/types/src/picker/PickerPanel.d.ts +52 -0
  260. package/types/src/picker/cellPickerOpen.d.ts +6 -0
  261. package/types/src/picker/index.d.ts +4 -0
  262. package/types/src/picker/useCellPicker.d.ts +95 -0
  263. package/types/src/picture/PictureCommands.d.ts +12 -0
  264. package/types/src/picture/PictureKind.d.ts +7 -0
  265. package/types/src/picture/index.d.ts +0 -1
  266. package/types/src/protection/ProtectionPaneArgs.d.ts +31 -0
  267. package/types/src/protection/index.d.ts +3 -0
  268. package/types/src/protection/unlockProtectedRanges.d.ts +23 -0
  269. package/types/src/richText/RichTextEditor.d.ts +41 -0
  270. package/types/src/richText/index.d.ts +2 -0
  271. package/types/src/selection/SelectionCommands.d.ts +2 -2
  272. package/types/src/selection/SheetSelectionLayer.d.ts +16 -12
  273. package/types/src/shape/ConnectorControl.d.ts +46 -0
  274. package/types/src/shape/ShapeCommands.d.ts +11 -0
  275. package/types/src/shape/ShapeControl.d.ts +8 -0
  276. package/types/src/shape/ShapeEditor.d.ts +15 -2
  277. package/types/src/shape/ShapeGallery.d.ts +31 -0
  278. package/types/src/shape/ShapeHandles.d.ts +28 -0
  279. package/types/src/shape/ShapeKind.d.ts +7 -0
  280. package/types/src/shape/ShapeSVG.d.ts +22 -0
  281. package/types/src/shape/ShapeText.d.ts +17 -0
  282. package/types/src/shape/icons/ShapeIcons.d.ts +16 -0
  283. package/types/src/shape/icons/_ShapeIconPack.d.ts +4 -0
  284. package/types/src/shape/index.d.ts +3 -1
  285. package/types/src/shape/shapeFrame.d.ts +50 -0
  286. package/types/src/shape/shapeStyle.d.ts +82 -0
  287. package/types/src/sheet/ISheetHeaderElement.d.ts +1 -1
  288. package/types/src/sheet/{ISheetElement.d.ts → IWorksheetElement.d.ts} +107 -77
  289. package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
  290. package/types/src/sheet/SheetCommandProvider.d.ts +11 -6
  291. package/types/src/sheet/SheetCommands.d.ts +22 -7
  292. package/types/src/sheet/SheetKindIcon.d.ts +14 -0
  293. package/types/src/sheet/SheetOutlineElement.d.ts +70 -0
  294. package/types/src/sheet/SheetPanels.d.ts +11 -0
  295. package/types/src/sheet/SheetScrollbar.d.ts +4 -13
  296. package/types/src/sheet/TopLeftCorner.d.ts +2 -2
  297. package/types/src/sheet/WorksheetElement.d.ts +12 -0
  298. package/types/src/sheet/_freezeAt.d.ts +10 -0
  299. package/types/src/sheet/_useHeaderMetrics.d.ts +11 -0
  300. package/types/src/sheet/circularReferences.d.ts +12 -4
  301. package/types/src/sheet/index.d.ts +6 -3
  302. package/types/src/sheet/useCycleHighlight.d.ts +21 -0
  303. package/types/src/slicer/SlicerCommands.d.ts +10 -0
  304. package/types/src/slicer/SlicerEditor.d.ts +8 -2
  305. package/types/src/slicer/SlicerKind.d.ts +7 -0
  306. package/types/src/slicer/SlicerStylePreview.d.ts +18 -0
  307. package/types/src/slicer/index.d.ts +2 -1
  308. package/types/src/slicer/slicerStyles.d.ts +32 -0
  309. package/types/src/tabStrip/SheetTab.d.ts +1 -1
  310. package/types/src/tabStrip/TabStrip.d.ts +7 -0
  311. package/types/src/table/TableCommands.d.ts +2 -2
  312. package/types/src/taskPane/ITaskPane.d.ts +12 -1
  313. package/types/src/taskPane/MovablePane.d.ts +17 -0
  314. package/types/src/taskPane/TaskPaneArea.d.ts +7 -0
  315. package/types/src/taskPane/index.d.ts +1 -0
  316. package/types/src/theme/ThemeState.d.ts +14 -1
  317. package/types/src/theme/buildOOXMLThemeCSS.d.ts +2 -2
  318. package/types/src/theme/useGridColorScheme.d.ts +2 -2
  319. package/types/src/theme/useSystemColors.d.ts +2 -2
  320. package/types/src/workbook/DefaultMovableRenderers.d.ts +20 -0
  321. package/types/src/workbook/DefaultRenderers.d.ts +3 -2
  322. package/types/src/workbook/IWorkbookElement.d.ts +51 -5
  323. package/types/src/workbook/WorkbookCommands.d.ts +2 -4
  324. package/types/src/workbook/WorkbookStrip.d.ts +9 -0
  325. package/types/src/workbook/_followOrigin.d.ts +9 -0
  326. package/types/src/workbook/useWorkbookFormat.d.ts +3 -3
  327. package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
  328. package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +0 -156
  329. package/browser/cjs/index.cjs +0 -35
  330. package/browser/esm/SJMJzBwlXTJ9QIO5.mjs +0 -6286
  331. package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +0 -10
  332. package/types/src/chart/templates/area-stacked-template.json.d.ts +0 -10
  333. package/types/src/chart/templates/area-template.json.d.ts +0 -9
  334. package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +0 -10
  335. package/types/src/chart/templates/bar-stacked-template.json.d.ts +0 -10
  336. package/types/src/chart/templates/bar-template.json.d.ts +0 -9
  337. package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +0 -10
  338. package/types/src/chart/templates/column-stacked-template.json.d.ts +0 -10
  339. package/types/src/chart/templates/column-template.json.d.ts +0 -9
  340. package/types/src/chart/templates/line-markers-template.json.d.ts +0 -10
  341. package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +0 -11
  342. package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +0 -11
  343. package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +0 -10
  344. package/types/src/chart/templates/line-stacked-template.json.d.ts +0 -10
  345. package/types/src/chart/templates/line-template.json.d.ts +0 -9
  346. package/types/src/chart/templates/pie-doughnut-template.json.d.ts +0 -10
  347. package/types/src/chart/templates/pie-template.json.d.ts +0 -9
  348. package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +0 -10
  349. package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +0 -10
  350. package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +0 -10
  351. package/types/src/chart/templates/scatter-lines-template.json.d.ts +0 -10
  352. package/types/src/chart/templates/scatter-markers-template.json.d.ts +0 -10
  353. package/types/src/context/SheetContext.d.ts +0 -18
  354. package/types/src/editor/useProtectedEditNotice.d.ts +0 -14
  355. package/types/src/layer/validationList.d.ts +0 -84
  356. package/types/src/list/SheetValueList.d.ts +0 -93
  357. package/types/src/list/index.d.ts +0 -2
  358. package/types/src/movable/MoveableBundle.d.ts +0 -4
  359. package/types/src/sheet/SheetElement.d.ts +0 -15
@@ -0,0 +1,197 @@
1
+ /**
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
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 { t as e } from "./C1pc9F4Rt2C5FKUo.mjs";
8
+ import { d as t } from "./DS66lAIM-9M-YoZQ.mjs";
9
+ import { t as n } from "./BegvsXeRs7e-9t8k.mjs";
10
+ import { n as r } from "./Bl2BFCQ00fotauKB.mjs";
11
+ import { t as i } from "./CRi6DQ3UXmPEv-w_.mjs";
12
+ import { memo as a, useCallback as o, useReducer as s, useRef as c } from "react";
13
+ import { jsx as l } from "react/jsx-runtime";
14
+ import { messageKey as u } from "@sheetxl/utils";
15
+ import { useGridPaneOptional as d, useSurfaceStateSetter as f } from "@sheetxl/grid-react";
16
+ var p = (e, t) => {
17
+ let n = [t.horizontal ? 1 : -1, t.vertical ? 1 : -1];
18
+ return e === "start" ? n : [-n[0], -n[1]];
19
+ }, m = (e) => {
20
+ let t = e.getBounds();
21
+ return t ? {
22
+ bounds: t,
23
+ rotation: e.getRotation() || 0,
24
+ flip: e.getFlip()
25
+ } : null;
26
+ }, h = (e, t, n) => {
27
+ let { x: r, y: i, width: a, height: o } = e.bounds, s = -(e.rotation || 0) * Math.PI / 180, c = t.x - (r + a / 2), l = t.y - (i + o / 2), u = c * Math.cos(s) - l * Math.sin(s), d = c * Math.sin(s) + l * Math.cos(s);
28
+ return Math.abs(u) <= a / 2 + n && Math.abs(d) <= o / 2 + n;
29
+ }, g = a((t) => {
30
+ let { movable: r, flip: i, isDragging: a = !1, gesture: g } = t, _ = d(), v = f(n, null), [, y] = s((e) => e + 1, 0), b = r.getContent();
31
+ e(b, { onAnyChange: y });
32
+ let x = b.getConnectorFormat(), S = c(null), C = o((e) => {
33
+ let t = _?.getPanePointFromPointer(e.clientX, e.clientY);
34
+ if (!_ || !t) return null;
35
+ let n = _.toAbsoluteBounds({
36
+ x: t.x,
37
+ y: t.y,
38
+ width: 0,
39
+ height: 0
40
+ });
41
+ return {
42
+ x: n.x,
43
+ y: n.y
44
+ };
45
+ }, [_]), w = o((e) => {
46
+ if (e.button !== 0) return;
47
+ e.stopPropagation(), e.preventDefault();
48
+ let t = e.currentTarget.dataset.end, n = m(r);
49
+ if (!n || !_) return;
50
+ let i = {
51
+ pointerId: e.pointerId,
52
+ end: t,
53
+ placement: n,
54
+ candidates: [],
55
+ hit: null
56
+ };
57
+ g.start(u("op.connectShape"), (e) => {
58
+ let n = e.getContent().getConnectorFormat();
59
+ if (!n) return;
60
+ let r = i.hit, a = t === "start" ? n.getStartConnectedMovable() : n.getEndConnectedMovable(), o = t === "start" ? n.getStartConnectionSite() : n.getEndConnectionSite();
61
+ (r ? a !== r.target || o !== r.index : a !== null) && (r ? t === "start" ? n.startConnect(r.target, r.index) : n.endConnect(r.target, r.index) : t === "start" ? n.startDisconnect() : n.endDisconnect());
62
+ }) && (i.candidates = ((e) => {
63
+ let t = e.getRange().getWorksheet(), n = /* @__PURE__ */ new Set([e]);
64
+ for (let t = e.getParent(); t; t = t.getParent()) n.add(t);
65
+ let r = [];
66
+ for (let e of t.getMovables().getItems({ deep: !0 })) {
67
+ if (n.has(e) || e.isHidden()) continue;
68
+ let t = m(e);
69
+ t && r.push({
70
+ movable: e,
71
+ placement: t
72
+ });
73
+ }
74
+ return r;
75
+ })(r), S.current = i, e.currentTarget.setPointerCapture(e.pointerId), v({
76
+ connector: r.getId(),
77
+ target: null,
78
+ index: null
79
+ }));
80
+ }, [
81
+ r,
82
+ _,
83
+ g,
84
+ v
85
+ ]), T = o((e) => {
86
+ let t = S.current;
87
+ if (!t || t.pointerId !== e.pointerId) return;
88
+ e.stopPropagation();
89
+ let n = C(e);
90
+ if (!n) return;
91
+ let i = ((e, t, n) => {
92
+ let r = 8 / n, i = 10 / n, a = null, o = 1 / 0;
93
+ for (let { movable: n, placement: s } of t) {
94
+ let t = n.getConnectionSites(s);
95
+ if (!t || t.length === 0) continue;
96
+ let c = h(s, e, r);
97
+ for (let r of t) {
98
+ let t = Math.hypot(r.x - e.x, r.y - e.y);
99
+ (c || t <= i) && t < o && (a = {
100
+ target: n,
101
+ index: r.index,
102
+ x: r.x,
103
+ y: r.y
104
+ }, o = t);
105
+ }
106
+ }
107
+ return a;
108
+ })(n, t.candidates, _?.getZoom() || 1);
109
+ t.hit = i;
110
+ let a = r.getContent().getConnectorFormat(), o = a?.getEndPoints(t.placement);
111
+ if (!a || !o) return;
112
+ let s = o[t.end === "start" ? "end" : "start"];
113
+ o[t.end] = i ? {
114
+ x: i.x,
115
+ y: i.y
116
+ } : e.shiftKey ? ((e, t, n = 15) => {
117
+ let r = t.x - e.x, i = t.y - e.y;
118
+ if (r === 0 && i === 0) return t;
119
+ let a = n * Math.PI / 180, o = Math.round(Math.atan2(i, r) / a) * a, s = Math.abs(Math.cos(o)) < 1e-12 ? 0 : Math.cos(o), c = Math.abs(Math.sin(o)) < 1e-12 ? 0 : Math.sin(o), l = r * s + i * c;
120
+ return {
121
+ x: e.x + l * s,
122
+ y: e.y + l * c
123
+ };
124
+ })(s, n) : n;
125
+ let c = a.placeEnds(o.start, o.end);
126
+ v({
127
+ connector: r.getId(),
128
+ target: i ? i.target.getId() : null,
129
+ index: i ? i.index : null
130
+ }), g.preview({
131
+ bounds: c.bounds,
132
+ flip: c.flip,
133
+ grip: {
134
+ kind: "resize",
135
+ direction: p(t.end, c.flip)
136
+ }
137
+ });
138
+ }, [
139
+ C,
140
+ _,
141
+ r,
142
+ g,
143
+ v
144
+ ]), E = o((e) => {
145
+ let t = S.current;
146
+ t && t.pointerId === e.pointerId && (e.stopPropagation(), S.current = null, v(null), g.finish());
147
+ }, [g, v]), D = o((e) => {
148
+ let t = S.current;
149
+ t && t.pointerId === e.pointerId && (S.current = null, v(null), g.cancel());
150
+ }, [g, v]);
151
+ return l("div", {
152
+ className: [
153
+ "movable-control",
154
+ "connector",
155
+ a ? "dragging" : null
156
+ ].filter(Boolean).join(" "),
157
+ children: ["start", "end"].map((e) => {
158
+ let t = p(e, i), n = e === "start" ? !!x?.isStartConnected() : !!x?.isEndConnected();
159
+ return l("div", {
160
+ className: n ? "movable-control-handle connector-end glued" : "movable-control-handle connector-end",
161
+ "data-end": e,
162
+ style: {
163
+ left: 50 * (t[0] + 1) + "%",
164
+ top: 50 * (t[1] + 1) + "%"
165
+ },
166
+ onPointerDown: w,
167
+ onPointerMove: T,
168
+ onPointerUp: E,
169
+ onPointerCancel: D
170
+ }, e);
171
+ })
172
+ });
173
+ });
174
+ g.displayName = "ConnectorControl";
175
+ var _ = a((e) => e.movable.getContent().isConnector() ? l(g, { ...e }) : l(t, { ...e }));
176
+ _.displayName = "ShapeControl";
177
+ var v = {
178
+ renderer: (e) => l(i, {
179
+ ...e,
180
+ shape: e.movable.getContent()
181
+ }),
182
+ control: _,
183
+ commands: (e, t) => {
184
+ let { sheet: n, movable: i, notifier: a } = t, o = i.getContent();
185
+ e.use(r({
186
+ transaction: n,
187
+ notifier: a
188
+ })), e.updateCommand("changeShape", {
189
+ disabledReasons: o.getConnectorFormat() ? [u("reason.connectorShape")] : [],
190
+ callback: (e) => {
191
+ let t = typeof e == "object" && e ? e.geometry : e;
192
+ o.setShapeType(typeof t == "string" ? t : "rect");
193
+ }
194
+ });
195
+ }
196
+ };
197
+ export { v as ShapeKind };
@@ -0,0 +1,128 @@
1
+ /**
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
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 { n as e } from "./Bl2BFCQ00fotauKB.mjs";
8
+ import { ChartEditor as t } from "./chart.mjs";
9
+ import { jsx as n } from "react/jsx-runtime";
10
+ import { messageKey as r, t as i } from "@sheetxl/utils";
11
+ var a = /* @__PURE__ */ new Set([
12
+ "waterfall",
13
+ "histogram",
14
+ "pareto",
15
+ "boxwhisker",
16
+ "treemap",
17
+ "sunburst",
18
+ "funnel",
19
+ "regionMap"
20
+ ]), o = [
21
+ {
22
+ key: "chartTitleToggle",
23
+ state: (e) => e.getTitle().getVisible(),
24
+ show: ["chartTitleAboveChart"],
25
+ hide: ["chartTitleNone"]
26
+ },
27
+ {
28
+ key: "chartLegendToggle",
29
+ state: (e) => e.getLegend().getVisible(),
30
+ show: ["legendRight"],
31
+ hide: ["legendNone"]
32
+ },
33
+ {
34
+ key: "chartDataLabelsToggle",
35
+ state: (e) => e.getDataLabels().getVisible(),
36
+ show: ["dataLabelShow"],
37
+ hide: ["dataLabelNone"]
38
+ },
39
+ {
40
+ key: "chartDataTableToggle",
41
+ state: (e) => e.getDataTable().getVisible(),
42
+ show: ["dataTableShow"],
43
+ hide: ["dataTableNone"]
44
+ },
45
+ {
46
+ key: "chartGridlinesToggle",
47
+ state: (e) => e.getAxes().getValueAxis()?.getMajorGridlines().getVisible() ?? !1,
48
+ show: ["primaryValueGridLinesMajor"],
49
+ hide: ["primaryValueGridLinesNone"]
50
+ },
51
+ {
52
+ key: "chartAxisTitlesToggle",
53
+ state: (e) => e.getAxes().getItems().some((e) => e.getAxisGroup() === "primary" && e.getTitle().getVisible()),
54
+ show: ["primaryCategoryAxisTitleAdjacentToAxis", "primaryValueAxisTitleRotated"],
55
+ hide: ["primaryCategoryAxisTitleNone", "primaryValueAxisTitleNone"]
56
+ }
57
+ ], s = {
58
+ renderer: (e) => n(t, {
59
+ ...e,
60
+ chart: e.movable.getContent()
61
+ }),
62
+ commands: (t, n) => {
63
+ let { sheet: s, movable: c, notifier: l } = n, u = c.getContent();
64
+ t.use(e({
65
+ transaction: s,
66
+ notifier: l
67
+ }));
68
+ let d = () => ({ chart: () => u }), f = () => u.isReadOnly() ? [r("reason.sheetProtected")] : [], p = () => {
69
+ let e = u.isReadOnly() ? [r("reason.sheetProtected")] : a.has(u.getChartType()) ? [r("reason.chartTypeNotEditable")] : [];
70
+ t.updateCommand("chartChangeType", {
71
+ callback: (e) => {
72
+ let t = typeof e == "string" ? e : e?.type;
73
+ t && u.setChartType(t);
74
+ },
75
+ state: u.getChartType(),
76
+ context: d,
77
+ disabledReasons: e
78
+ }), t.updateCommand("chartSwitchRowColumn", {
79
+ callback: () => {
80
+ u.setSeriesBy(u.getSeriesBy() === "rows" ? "columns" : "rows");
81
+ },
82
+ state: u.getSeriesBy(),
83
+ context: d,
84
+ disabledReasons: e
85
+ }), t.updateCommand("chartSelectData", {
86
+ tags: ["noTransaction", "noRepeat"],
87
+ callback: async (e) => {
88
+ if (!e) {
89
+ let t = await l?.showInput?.({
90
+ title: i("dialog.chartSelectData.title"),
91
+ description: i("dialog.chartSelectData.description"),
92
+ inputLabel: i("dialog.chartSelectData.inputLabel"),
93
+ initialValue: u.getSeries()[0]?.getValuesRange()?.getAddress() ?? "",
94
+ options: [{
95
+ id: "Select",
96
+ label: () => i("dialog.select")
97
+ }]
98
+ });
99
+ if (!t || t.option !== "Select" || !t.input) return;
100
+ e = t.input;
101
+ }
102
+ u.setData(e);
103
+ },
104
+ context: d,
105
+ disabledReasons: e
106
+ }), t.updateCommand("chartAddElement", {
107
+ callback: (e) => {
108
+ e && u.setElement(e);
109
+ },
110
+ context: d,
111
+ disabledReasons: e
112
+ });
113
+ for (let n of o) {
114
+ let r = n.state(u);
115
+ t.updateCommand(n.key, {
116
+ callback: () => {
117
+ for (let e of r ? n.hide : n.show) u.setElement(e);
118
+ },
119
+ state: r,
120
+ context: d,
121
+ disabledReasons: n.key === "chartTitleToggle" || n.key === "chartLegendToggle" ? f() : e
122
+ });
123
+ }
124
+ };
125
+ return p(), u.addListeners({ onAnyChange: p });
126
+ }
127
+ };
128
+ export { s as ChartKind };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
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 { SlicerEditor as e } from "./slicer.mjs";
8
+ import { jsx as t } from "react/jsx-runtime";
9
+ import { messageKey as n } from "@sheetxl/utils";
10
+ var r = {
11
+ renderer: (n) => t(e, {
12
+ ...n,
13
+ slicer: n.movable.getContent()
14
+ }),
15
+ commands: (e, t) => {
16
+ let { sheet: r, movable: i } = t, a = i.getContent(), o = () => ({
17
+ slicer: () => a,
18
+ styles: () => r.getStyles()
19
+ }), s = () => {
20
+ e.updateCommand("formatSlicerStyle", {
21
+ callback: (e) => {
22
+ e && a.setStyle(e);
23
+ },
24
+ state: a.getStyle(),
25
+ context: o,
26
+ disabledReasons: a.isReadOnly() ? [n("reason.sheetProtected")] : []
27
+ });
28
+ };
29
+ return s(), a.addListeners({ onAnyChange: s });
30
+ }
31
+ };
32
+ export { r as SlicerKind };
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
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
+ var e, t = Object.defineProperty, n = (e, n) => {
8
+ let r = {};
9
+ for (var i in e) t(r, i, {
10
+ get: e[i],
11
+ enumerable: !0
12
+ });
13
+ return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
14
+ }, r = /* @__PURE__ */ new Map(), i = !1;
15
+ function a(e) {
16
+ for (let t of e.types) r.set(t, e);
17
+ return () => {
18
+ for (let t of e.types) r.get(t) === e && r.delete(t);
19
+ };
20
+ }
21
+ (function(e) {
22
+ function t(e) {
23
+ return e.type === "custom" ? `custom:${e.kind}` : e.type;
24
+ }
25
+ e.register = function(e) {
26
+ return a(e);
27
+ }, e.get = function(e) {
28
+ return r.get(e);
29
+ }, e.has = function(e) {
30
+ return r.has(e);
31
+ }, e.getTypes = function() {
32
+ return [...r.keys()];
33
+ }, e.typeOf = t, e.of = function(e) {
34
+ return r.get(t(e));
35
+ }, e.registerBuiltIns = function(e) {
36
+ i || (i = !0, e((e) => a({
37
+ ...e,
38
+ types: e.types.filter((e) => !r.has(e))
39
+ })));
40
+ };
41
+ })(e ||= {});
42
+ export { n, e as t };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
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 { createContext as e, useContext as t } from "react";
8
+ import { jsx as n } from "react/jsx-runtime";
9
+ var r = e(null);
10
+ function i(e) {
11
+ let { sheet: t, children: i } = e;
12
+ return n(r.Provider, {
13
+ value: t,
14
+ children: i
15
+ });
16
+ }
17
+ function a() {
18
+ return t(r);
19
+ }
20
+ export { a as n, i as t };
@@ -1,9 +1,8 @@
1
1
  /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.1
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
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 { Draggable as a, Resizable as e, makeMoveable as r } from "react-moveable";
8
- var o = r([a, e]);
9
- export { o as default };
7
+ var e = "movable-connect";
8
+ export { e as t };
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
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
+ var e = "command", t = (e, t) => !!e && (e.getTags?.() ?? []).includes(t);
8
+ function n(n) {
9
+ let { transaction: r, notifier: i, manager: a } = n, o = n.isRepeatable ?? ((e) => !t(e, "noRepeat")), s = Promise.resolve();
10
+ return (n) => (c, l) => {
11
+ if (t(l, "noTransaction")) return n(c, l);
12
+ let u = s.then(async () => {
13
+ let t = l?.getLabel?.() ?? void 0, s = l?.getKey?.(), u = i ? await Promise.resolve(i.showBusy(t ?? "Working…")) : null;
14
+ try {
15
+ let i;
16
+ return await r.doBatch(async () => {
17
+ i = await n(c, l);
18
+ }, {
19
+ description: t,
20
+ meta: s ? { [e]: s } : void 0
21
+ }), a && l && o(l) && a.setRepeatableOperation({
22
+ description: t ?? "last action",
23
+ repeat: () => {
24
+ l.execute(c);
25
+ }
26
+ }), i;
27
+ } catch (e) {
28
+ e && i?.showError?.(e);
29
+ } finally {
30
+ u?.();
31
+ }
32
+ });
33
+ return s = u.then(() => {}, () => {}), u;
34
+ };
35
+ }
36
+ export { n, e as t };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
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 { useMemo as e, version as t } from "react";
8
+ function n(e, t) {
9
+ if (typeof e == "function") return e(t);
10
+ e && (e.current = t);
11
+ }
12
+ var r = parseInt(t.split(".")[0], 10) >= 19 ? function(e) {
13
+ return (t) => {
14
+ let r = [];
15
+ for (let i of e) {
16
+ let e = n(i, t), a = typeof e == "function";
17
+ r.push(a ? e : () => n(i, null));
18
+ }
19
+ return () => {
20
+ for (let e of r) e();
21
+ };
22
+ };
23
+ } : function(e) {
24
+ return (t) => {
25
+ for (let r of e) n(r, t);
26
+ };
27
+ };
28
+ function i(t) {
29
+ return e(() => r(t), t);
30
+ }
31
+ export { i as t };
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
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 { useEffect as e, useMemo as t, useReducer as n, useRef as r } from "react";
8
+ var i = (t, n, i) => {
9
+ let a = r(n);
10
+ a.current = n;
11
+ let s = (i = i ? {
12
+ ...o,
13
+ ...i
14
+ } : o).ignoreModelChange;
15
+ e(() => {
16
+ if (!t || !a.current) return;
17
+ let e = Object.keys(a.current), n = {}, r = e.length;
18
+ for (let t = 0; t < r; t++) {
19
+ let r = e[t];
20
+ n[r] = (e, t) => a.current[r]?.(e, t);
21
+ }
22
+ let o = i?.debugText;
23
+ o && console.log("Add: " + o);
24
+ let c = t.addListeners(n, i);
25
+ if (!s) for (let i = 0; i < r; i++) n[e[i]]?.(t);
26
+ return () => {
27
+ o && console.log("Remove: " + o), c?.();
28
+ };
29
+ }, [t]);
30
+ };
31
+ function a(e, r) {
32
+ let [a, o] = n((e) => e + 1, 0);
33
+ i(e, t(() => {
34
+ let e = (e, t) => {
35
+ o();
36
+ }, t = Array.isArray(r) ? r : [r], n = {};
37
+ for (let r of t) n[r] = e;
38
+ return n;
39
+ }, [e, ...Array.isArray(r) ? r : [r]]));
40
+ }
41
+ var o = {
42
+ transactional: !1,
43
+ ignoreModelChange: !1
44
+ };
45
+ export { a as n, i as t };
@@ -0,0 +1,134 @@
1
+ /**
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
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 { Color as e, IFill as t, IFont as n, ITextFrame as r, ShapeStyleUtils as i } from "@sheetxl/sdk";
8
+ import { memo as a, useMemo as o } from "react";
9
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
10
+ var l = (n, r) => {
11
+ let i = r;
12
+ if (r && typeof r == "object") {
13
+ let e = r;
14
+ if (e.type === t.Type.None) return "transparent";
15
+ if (e.type === t.Type.Solid) i = e.color;
16
+ else if (e.type === t.Type.Pattern) i = e.foreground;
17
+ else if (e.type === t.Type.Gradient) {
18
+ let t = e.stops?.[0];
19
+ i = typeof t == "string" ? t : t?.color;
20
+ } else i = void 0;
21
+ }
22
+ if (typeof i == "string" && i) try {
23
+ return (n ? n.parseColor(i) : new e(i))?.toCSS("adaptive") ?? void 0;
24
+ } catch {
25
+ return;
26
+ }
27
+ }, u = {
28
+ top: "flex-start",
29
+ center: "center",
30
+ bottom: "flex-end",
31
+ justify: "space-between",
32
+ distributed: "space-around"
33
+ }, d = {
34
+ left: "left",
35
+ center: "center",
36
+ right: "right",
37
+ justify: "justify",
38
+ justifyLow: "justify",
39
+ distributed: "justify",
40
+ thaiDistributed: "justify"
41
+ }, f = {
42
+ left: 9.6,
43
+ top: 4.8,
44
+ right: 9.6,
45
+ bottom: 4.8
46
+ }, p = (e, t) => e ? "percent" in e ? e.percent / 100 * 1.2 : `${e.points}pt` : t, m = (e, t, r) => {
47
+ let i = [];
48
+ t.underline && t.underline !== "none" && i.push("underline"), t.strike && t.strike !== "none" && i.push("line-through");
49
+ let a = t.font?.family ?? t.font?.fallbacks?.[0];
50
+ return {
51
+ fontSize: typeof t.size == "number" ? `${t.size}pt` : void 0,
52
+ fontWeight: t.weight,
53
+ fontStyle: t.style === n.Style.Italic ? "italic" : void 0,
54
+ textDecoration: i.length ? i.join(" ") : void 0,
55
+ fontFamily: a,
56
+ color: l(e, t.color) ?? r ?? void 0,
57
+ letterSpacing: typeof t.letterSpacing == "number" ? `${t.letterSpacing}pt` : void 0,
58
+ verticalAlign: typeof t.baseline == "number" && t.baseline !== 0 ? `${t.baseline}%` : void 0,
59
+ fontVariant: t.capitals === "small" ? "small-caps" : void 0,
60
+ textTransform: t.capitals === "all" ? "uppercase" : void 0,
61
+ backgroundColor: t.highlight ? l(e, t.highlight) : void 0
62
+ };
63
+ }, h = a(({ text: e, styles: t, color: n }) => {
64
+ let a = e.body, l = {
65
+ ...f,
66
+ ...a?.insets
67
+ }, h = e.listStyle?.levels?.[0] ?? e.listStyle?.default, g = o(() => ({
68
+ display: "flex",
69
+ flexDirection: "column",
70
+ justifyContent: u[a?.anchor ?? "top"],
71
+ alignItems: a?.anchorCenter ? "center" : "stretch",
72
+ boxSizing: "border-box",
73
+ width: "100%",
74
+ height: "100%",
75
+ padding: `${l.top}px ${l.right}px ${l.bottom}px ${l.left}px`,
76
+ whiteSpace: a?.wrap === "none" ? "pre" : "pre-wrap",
77
+ overflowX: (a?.horizontalOverflow ?? i.TEXT_DEFAULTS.horizontalOverflow) === r.Overflow.Visible ? "visible" : "hidden",
78
+ overflowY: (a?.verticalOverflow ?? i.TEXT_DEFAULTS.verticalOverflow) === r.Overflow.Visible ? "visible" : "hidden",
79
+ fontSize: `${i.TEXT_DEFAULTS.size}pt`,
80
+ writingMode: a?.vertical === r.WritingMode.Vertical || a?.vertical === r.WritingMode.EastAsianVertical ? "vertical-rl" : a?.vertical === r.WritingMode.Vertical270 ? "vertical-lr" : void 0,
81
+ color: n ?? void 0
82
+ }), [
83
+ a,
84
+ l.top,
85
+ l.right,
86
+ l.bottom,
87
+ l.left,
88
+ n
89
+ ]);
90
+ return s("div", {
91
+ className: "shape-text",
92
+ style: g,
93
+ children: e.paragraphs.map((r, i) => {
94
+ let a = r.level ? e.listStyle?.levels?.[r.level] : h, o = {
95
+ ...a?.defaultRun,
96
+ ...r.defaultRun
97
+ }, l = r.bullet ?? a?.bullet, u = {
98
+ textAlign: d[r.align ?? a?.align ?? "left"],
99
+ marginLeft: r.marginLeft ?? a?.marginLeft,
100
+ marginRight: r.marginRight ?? a?.marginRight,
101
+ textIndent: r.indent ?? a?.indent,
102
+ marginTop: p(r.spaceBefore, void 0),
103
+ marginBottom: p(r.spaceAfter, void 0),
104
+ lineHeight: p(r.lineSpacing, 1.2),
105
+ minHeight: "1.2em",
106
+ direction: r.rightToLeft ? "rtl" : void 0,
107
+ ...m(t, o, void 0)
108
+ }, f = r.runs.length ? r.runs : r.endRun ? [{
109
+ text: "",
110
+ ...r.endRun
111
+ }] : [];
112
+ return c("div", {
113
+ className: "shape-paragraph",
114
+ style: u,
115
+ children: [l?.type === "char" && l.char ? s("span", {
116
+ style: { marginRight: "0.4em" },
117
+ children: l.char
118
+ }) : null, f.map((e, r) => {
119
+ if (e.text === "\n") return s("br", {}, r);
120
+ let { text: i, field: a, ...c } = e;
121
+ return s("span", {
122
+ style: m(t, {
123
+ ...o,
124
+ ...c
125
+ }, n),
126
+ children: i
127
+ }, r);
128
+ })]
129
+ }, i);
130
+ })
131
+ });
132
+ });
133
+ h.displayName = "ShapeText";
134
+ export { h as t };