@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,37 +0,0 @@
1
- /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.10
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 = "movable-connect", t = "command", a = (e, t) => !!e && (e.getTags?.() ?? []).includes(t);
8
- function n(e) {
9
- const { transaction: n, notifier: o, manager: r } = e, s = e.isRepeatable ?? ((e) => !a(e, "noRepeat"));
10
- let i = Promise.resolve();
11
- return (e) => (c, l) => {
12
- if (a(l, "noTransaction")) return e(c, l);
13
- const u = i.then(async () => {
14
- const a = l?.getLabel?.() ?? void 0, i = l?.getKey?.(), u = o ? await Promise.resolve(o.showBusy(a ?? "Working…")) : null;
15
- try {
16
- let o;
17
- return await n.doBatch(async () => {
18
- o = await e(c, l);
19
- }, {
20
- description: a,
21
- meta: i ? { [t]: i } : void 0
22
- }), r && l && s(l) && r.setRepeatableOperation({
23
- description: a ?? "last action",
24
- repeat: () => {
25
- l.execute(c);
26
- }
27
- }), o;
28
- } catch (e) {
29
- e && o?.showError?.(e);
30
- } finally {
31
- u?.();
32
- }
33
- });
34
- return i = u.then(() => {}, () => {}), u;
35
- };
36
- }
37
- export { n, e as r, t };
@@ -1,323 +0,0 @@
1
- /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.10
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 "./CFFlJxNwgyInjEnh.mjs";
8
- import { createContext as t, memo as n, useCallback as o, useEffect as r, useReducer as a, useRef as l } from "react";
9
- import { Fragment as i, jsx as s, jsxs as c } from "react/jsx-runtime";
10
- import { LazyModules as d, defineLazyModule as u } from "@sheetxl/utils";
11
- import { ReactUtils as p } from "@sheetxl/utils-react";
12
- import { useGridPane as m } from "@sheetxl/grid-react";
13
- var h = Object.freeze({
14
- x: 0,
15
- y: 0,
16
- width: 0,
17
- height: 0
18
- }), f = (e, t, n) => {
19
- const o = n?.bounds ?? e.getBounds(), r = o ? t.toPaneBounds(o) : h, a = p.getDevicePixelRatio();
20
- return {
21
- left: p.snapDeviceEdge(r.x, a),
22
- top: p.snapDeviceEdge(r.y, a),
23
- width: r.width,
24
- height: r.height,
25
- rotation: n?.rotation ?? (e.getRotation() || 0),
26
- flip: n?.flip ?? e.getFlip()
27
- };
28
- }, g = "data-movable-id", v = (e) => {
29
- let t = e;
30
- for (let e = t.getParent(); e; e = t.getParent()) t = e;
31
- return t;
32
- }, b = (e, t, n) => {
33
- const o = [];
34
- let r = t;
35
- for (; r && r !== n;) {
36
- const e = r.getAttribute?.(g);
37
- e && o.unshift(e), r = r.parentElement;
38
- }
39
- if (0 === o.length) return e;
40
- const a = [e];
41
- for (const e of o) {
42
- const t = a[a.length - 1].getMovables()?.getItems().find((t) => t.getId() === e);
43
- if (!t) break;
44
- a.push(t);
45
- }
46
- const l = a.length - 1;
47
- for (let e = l; e >= 0; e--) if (a[e].isSelected()) return a[Math.min(e + 1, l)];
48
- const i = e.getRange().getSheet().getView().getMovableSelection().getContainer();
49
- return i && v(i) === e ? a[Math.min(w(i) + 1, l)] : e;
50
- }, w = (e) => {
51
- let t = 0;
52
- for (let n = e.getParent(); n; n = n.getParent()) t++;
53
- return t;
54
- }, C = t(/* @__PURE__ */ new Map()), x = n(({ movable: t, preview: n, onHost: r, children: l }) => {
55
- const i = m(), [, c] = a((e) => e + 1, 0);
56
- e(t, {
57
- onBoundsChange: () => c(),
58
- onAnyChange: () => c()
59
- });
60
- const d = o((e) => {
61
- r(t, e);
62
- }, [t, r]), u = f(t, i, n);
63
- return s("div", {
64
- className: "movable-adornment",
65
- ref: d,
66
- style: {
67
- position: "absolute",
68
- left: u.left,
69
- top: u.top,
70
- width: u.width,
71
- height: u.height,
72
- transform: u.rotation ? `rotate(${u.rotation}deg)` : void 0,
73
- transformOrigin: "center",
74
- zIndex: 3001,
75
- pointerEvents: "none"
76
- },
77
- children: l
78
- });
79
- });
80
- x.displayName = "MovableAdornment";
81
- var y = {
82
- nw: [-1, -1],
83
- n: [0, -1],
84
- ne: [1, -1],
85
- w: [-1, 0],
86
- e: [1, 0],
87
- sw: [-1, 1],
88
- s: [0, 1],
89
- se: [1, 1]
90
- }, M = [
91
- "ew-resize",
92
- "nwse-resize",
93
- "ns-resize",
94
- "nesw-resize"
95
- ], R = (e, t) => {
96
- const n = 180 * Math.atan2(e[1], e[0]) / Math.PI + t;
97
- return M[(Math.round(n / 45) % 4 + 4) % 4];
98
- }, z = n((e) => {
99
- const { directions: t, rotation: n, isDragging: r = !1, onResizeStart: a, onResize: i, onResizeEnd: d, onResizeCancel: u, context: p = !1, onMoveStart: m, children: h } = e, f = l(null), g = o((e) => {
100
- if (0 !== e.button) return;
101
- e.stopPropagation(), e.preventDefault();
102
- const t = y[e.currentTarget.dataset.direction ?? ""];
103
- t && a() && (f.current = {
104
- pointerId: e.pointerId,
105
- direction: t,
106
- press: {
107
- x: e.clientX,
108
- y: e.clientY
109
- }
110
- }, e.currentTarget.setPointerCapture(e.pointerId));
111
- }, [a]), v = o((e) => {
112
- const t = f.current;
113
- t && t.pointerId === e.pointerId && (e.stopPropagation(), i(t.direction, [e.clientX - t.press.x, e.clientY - t.press.y], e.shiftKey));
114
- }, [i]), b = o((e) => {
115
- const t = f.current;
116
- t && t.pointerId === e.pointerId && (e.stopPropagation(), f.current = null, d());
117
- }, [d]), w = o((e) => {
118
- const t = f.current;
119
- t && t.pointerId === e.pointerId && (f.current = null, u());
120
- }, [u]), C = o((e) => {
121
- 0 === e.button && (e.stopPropagation(), e.preventDefault(), m?.(e.nativeEvent));
122
- }, [m]);
123
- return c("div", {
124
- className: [
125
- "movable-control",
126
- r ? "dragging" : null,
127
- p ? "context" : null
128
- ].filter(Boolean).join(" "),
129
- children: [
130
- h,
131
- s("div", { className: "movable-control-outline" }),
132
- t.map((e) => {
133
- const t = y[e];
134
- return t ? s("div", {
135
- className: "movable-control-handle",
136
- "data-direction": e,
137
- style: {
138
- left: 50 * (t[0] + 1) + "%",
139
- top: 50 * (t[1] + 1) + "%",
140
- cursor: R(t, n)
141
- },
142
- onPointerDown: g,
143
- onPointerMove: v,
144
- onPointerUp: b,
145
- onPointerCancel: w
146
- }, e) : null;
147
- }),
148
- m ? s("div", {
149
- className: "movable-move-handle",
150
- onPointerDown: C,
151
- children: s("svg", {
152
- viewBox: "0 0 24 24",
153
- "aria-hidden": "true",
154
- children: s("path", { d: "M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z" })
155
- })
156
- }) : null
157
- ]
158
- });
159
- });
160
- z.displayName = "MovableControl";
161
- var P = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Set(), k = () => {
162
- for (const e of [...j]) e();
163
- }, I = !1, D = () => {
164
- I || (I = !0, function(e) {
165
- e("picture", () => import("./DYosMUJKp-3MSO4q.mjs"), { select: (e) => e.PictureKind }), e("chart", () => import("./chart.mjs"), { select: ({ ChartEditor: e }) => (t) => s(e, {
166
- ...t,
167
- chart: t.movable.getContent()
168
- }) }), e("slicer", () => import("./C_ANM4feA1xV-pri.mjs"), { select: (e) => e.SlicerKind }), e("shape", () => import("./Buw-VKYJy3y5dbaJ.mjs"), {
169
- select: (e) => e.ShapeKind,
170
- selectionShadow: !1
171
- }), e("group", () => import("./group.mjs"), { select: ({ GroupEditor: e }) => (t) => s(e, {
172
- ...t,
173
- container: t.movable.getContent()
174
- }) }), e("note", () => import("./note.mjs"), { select: ({ NoteEditor: e }) => (t) => {
175
- const { onContextMenuCapture: n, ...o } = t;
176
- return s(e, {
177
- ...o,
178
- note: t.movable.getContent()
179
- });
180
- } }), e("error", () => import("./Dxbm6ryIDCEi26RO.mjs").then((e) => e.t), { select: ({ ErrorContentFrame: e }) => (t) => s(e, { ...t }) });
181
- const t = (t, n) => {
182
- e(t, () => import("./control.mjs"), { select: n });
183
- };
184
- t("button", (e) => e.ButtonRenderer), t("checkBox", (e) => e.CheckBoxRenderer), t("optionButton", (e) => e.OptionButtonRenderer), t("listBox", (e) => e.ListBoxRenderer), t("dropDown", (e) => e.DropDownRenderer), t("scrollBar", (e) => e.ScrollBarRenderer), t("spinner", (e) => e.SpinnerRenderer), t("groupBox", (e) => e.GroupBoxRenderer), t("label", (e) => e.LabelRenderer), t("editBox", (e) => e.UnmodeledControlRenderer), t("dialog", (e) => e.UnmodeledControlRenderer), t("formControl", (e) => e.UnmodeledControlRenderer);
185
- }(Y));
186
- }, E = (e) => (D(), B.get(e) ?? P.get(e)), N = (e) => {
187
- const { movable: t, fallback: n, children: o } = e, [, l] = a((e) => e + 1, 0), c = t.isContentLoaded();
188
- return r(() => {
189
- if (c) return;
190
- let e = !0;
191
- return t.whenContentLoaded().then(() => {
192
- e && l();
193
- }), () => {
194
- e = !1;
195
- };
196
- }, [t, c]), s(i, { children: c ? o : n });
197
- }, L = (e) => {
198
- const [, t] = a((e) => e + 1, 0), n = e.module;
199
- return r(() => {
200
- if (n) return;
201
- let o = !0;
202
- const r = O(() => {
203
- o && e.module && t();
204
- });
205
- return e.loadModule().catch(() => {}), () => {
206
- o = !1, r();
207
- };
208
- }, [e, n]), n;
209
- }, A = (e) => {
210
- const t = L(e.kind);
211
- if (!t) return s(i, { children: e.fallback });
212
- const n = t.renderer;
213
- return s(n, { ...e.props });
214
- }, K = (e, t, n, o) => {
215
- const r = u(e, t, {
216
- select: (e) => {
217
- const t = n?.select ? n.select(e) : e, o = "object" == typeof (r = t) && null !== r && "renderer" in r ? t : { renderer: t };
218
- var r;
219
- return c.module = o, c.control = o.control, c.loaded = !0, k(), o;
220
- },
221
- prefetch: !1 !== n?.prefetch && (o ?? !0)
222
- });
223
- let a = null;
224
- const l = n?.fallback ?? null, i = (e) => s(N, {
225
- movable: e.movable,
226
- fallback: l,
227
- children: s(A, {
228
- kind: c,
229
- fallback: l,
230
- props: e
231
- })
232
- }), c = {
233
- Renderer: "content" === n?.hitArea ? i : (e) => s("div", {
234
- className: "movable-content",
235
- style: e.style,
236
- children: i(e)
237
- }),
238
- loaded: !1,
239
- control: void 0,
240
- LazyControl: (e) => {
241
- const t = L(c)?.control ?? z;
242
- return s(t, { ...e });
243
- },
244
- ownShadow: !1 === n?.selectionShadow,
245
- loadModule: () => (a ??= r.load().then((e) => (a = null, e), (t) => {
246
- throw a = null, console.warn(`The renderer '${e}' could not be loaded; its movables are drawn as the fallback.`, t), t;
247
- }), a),
248
- module: void 0,
249
- lazyModule: r
250
- };
251
- return c;
252
- };
253
- function U(e, t, n) {
254
- D();
255
- const o = K(`movable-renderer:${e}`, t, n);
256
- return B.set(e, o), k(), () => {
257
- B.get(e) === o && (B.delete(e), d.remove(o.lazyModule), k());
258
- };
259
- }
260
- function $(e, t) {
261
- let n = null;
262
- const o = {
263
- load: () => (n ??= t().then((t) => {
264
- o.pane = t, S.get(e) === o && k();
265
- }, (e) => {
266
- throw n = null, e;
267
- }), n),
268
- pane: void 0
269
- };
270
- return S.set(e, o), k(), () => {
271
- S.get(e) === o && (S.delete(e), k());
272
- };
273
- }
274
- function F(e) {
275
- const t = E(e);
276
- if (!t?.module) return;
277
- const n = S.get(e);
278
- n && !n.pane && n.load().catch(() => {});
279
- const { control: o, commands: r, toolbar: a, pane: l } = t.module;
280
- return {
281
- type: e,
282
- control: o,
283
- commands: r,
284
- toolbar: a,
285
- pane: n ? n.pane : l
286
- };
287
- }
288
- async function H(e) {
289
- const t = E(e);
290
- if (t) {
291
- try {
292
- await t.loadModule(), await S.get(e)?.load();
293
- } catch {
294
- return;
295
- }
296
- return F(e);
297
- }
298
- }
299
- function O(e) {
300
- return j.add(e), () => {
301
- j.delete(e);
302
- };
303
- }
304
- function T(e) {
305
- return !E(e)?.ownShadow;
306
- }
307
- function V(e) {
308
- const t = E(e);
309
- if (t) return t.loaded ? t.control : t.LazyControl;
310
- }
311
- function G(e) {
312
- return E(e)?.Renderer;
313
- }
314
- function X() {
315
- return D(), [.../* @__PURE__ */ new Set([...P.keys(), ...B.keys()])];
316
- }
317
- function Y(e, t, n) {
318
- P.set(e, K(`movable-renderer:built-in:${e}`, t, {
319
- hitArea: "content",
320
- ...n
321
- }, () => !B.has(e)));
322
- }
323
- export { v as _, X as a, $ as c, z as d, R as f, b as g, g as h, G as i, U as l, x as m, V as n, T as o, C as p, F as r, Y as s, O as t, H as u, f as v };
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "area",
5
- "grouping": "percentStacked"
6
- }
7
- }
8
- };
9
-
10
- export default _default;
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "area",
5
- "grouping": "stacked"
6
- }
7
- }
8
- };
9
-
10
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "area"
5
- }
6
- }
7
- };
8
-
9
- export default _default;
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "bar",
5
- "grouping": "percentStacked"
6
- }
7
- }
8
- };
9
-
10
- export default _default;
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "bar",
5
- "grouping": "stacked"
6
- }
7
- }
8
- };
9
-
10
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "bar"
5
- }
6
- }
7
- };
8
-
9
- export default _default;
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "column",
5
- "grouping": "percentStacked"
6
- }
7
- }
8
- };
9
-
10
- export default _default;
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "column",
5
- "grouping": "stacked"
6
- }
7
- }
8
- };
9
-
10
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "column"
5
- }
6
- }
7
- };
8
-
9
- export default _default;
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "line",
5
- "scatterStyle": "lineMarker"
6
- }
7
- }
8
- };
9
-
10
- export default _default;
@@ -1,11 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "line",
5
- "scatterStyle": "lineMarker",
6
- "grouping": "stacked"
7
- }
8
- }
9
- };
10
-
11
- export default _default;
@@ -1,11 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "line",
5
- "scatterStyle": "lineMarker",
6
- "grouping": "percentStacked"
7
- }
8
- }
9
- };
10
-
11
- export default _default;
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "line",
5
- "grouping": "percentStacked"
6
- }
7
- }
8
- };
9
-
10
- export default _default;
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "line",
5
- "grouping": "stacked"
6
- }
7
- }
8
- };
9
-
10
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "line"
5
- }
6
- }
7
- };
8
-
9
- export default _default;
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "pie",
5
- "holeSize": 50
6
- }
7
- }
8
- };
9
-
10
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "pie"
5
- }
6
- }
7
- };
8
-
9
- export default _default;
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "scatter",
5
- "scatterStyle": "smoothMarker"
6
- }
7
- }
8
- };
9
-
10
- export default _default;
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "scatter",
5
- "scatterStyle": "lineMarker"
6
- }
7
- }
8
- };
9
-
10
- export default _default;
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "scatter",
5
- "scatterStyle": "smooth"
6
- }
7
- }
8
- };
9
-
10
- export default _default;
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "scatter",
5
- "scatterStyle": "line"
6
- }
7
- }
8
- };
9
-
10
- export default _default;
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- "types": {
3
- "0": {
4
- "type": "scatter",
5
- "scatterStyle": "marker"
6
- }
7
- }
8
- };
9
-
10
- export default _default;
@@ -1,18 +0,0 @@
1
- import { default as React, ReactNode } from 'react';
2
- import { ISheet } from '@sheetxl/sdk';
3
- export type SheetProviderProps = {
4
- sheet: ISheet | null;
5
- children: ReactNode;
6
- };
7
- /**
8
- * Provides a sheet to descendants.
9
- *
10
- * Notes:
11
- * - Prefer passing the sheet object as a stable reference from the host.
12
- */
13
- export declare function SheetProvider(props: SheetProviderProps): React.JSX.Element;
14
- /**
15
- * Hook consumers call to access the current sheet.
16
- */
17
- export declare function useSheet(): ISheet | null;
18
- //# sourceMappingURL=SheetContext.d.ts.map
@@ -1,15 +0,0 @@
1
- import { default as React } from 'react';
2
- import { ISheetElement, SheetElementProps } from './ISheetElement';
3
- /**
4
- * @see ISheet
5
- *
6
- * UI representation for ISheet.
7
- *
8
- */
9
- /**
10
- * The grid-facing body of {@link SheetElement} — **consumes** the ambient `sheet` command scope (provided by
11
- * the outer {@link SheetElement} wrapper) to build the grid resolver + per-pane layer scopes. Split from the
12
- * public component because a component can't consume in its body the scope it provides in its own JSX.
13
- */
14
- export declare const SheetElement: React.NamedExoticComponent<Omit<SheetElementProps, "ref"> & React.RefAttributes<ISheetElement>>;
15
- //# sourceMappingURL=SheetElement.d.ts.map