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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/browser/esm/BHjeSMaycUkS5dVL.mjs +66 -0
  2. package/browser/esm/BZcQ-KYwS62Ut45c.mjs +20 -0
  3. package/browser/esm/Bow9CzRJrYxak2i5.mjs +318 -0
  4. package/browser/esm/BuvXl14hs-1CvjeA.mjs +2706 -0
  5. package/browser/esm/BwRduT8FTrk5n72r.mjs +32 -0
  6. package/browser/esm/C6urN77szrYwODXF.mjs +134 -0
  7. package/browser/esm/CYMRbtPIr6SklGpp.mjs +775 -0
  8. package/browser/esm/CYoUd5KIl7W3AsxH.mjs +196 -0
  9. package/browser/esm/Cfe0kofqVKGxLqO6.mjs +31 -0
  10. package/browser/esm/CiRN-woJZWYOgTn4.mjs +36 -0
  11. package/browser/esm/Dd-ZybXAgoq9pgGv.mjs +45 -0
  12. package/browser/esm/DjiBz4H74I6nPUY6.mjs +79 -0
  13. package/browser/esm/DyU9UInRnfkPYYlR.mjs +63 -0
  14. package/browser/esm/J8cPagZBeXz86Lnd.mjs +777 -0
  15. package/browser/esm/Sp6PJavGKpF8SJzA.mjs +75 -0
  16. package/browser/esm/cYjYjqEsyd63x8t4.mjs +67 -0
  17. package/browser/esm/chart.mjs +60 -0
  18. package/browser/esm/control.mjs +216 -0
  19. package/browser/esm/group.mjs +123 -0
  20. package/browser/esm/index.mjs +14122 -8944
  21. package/browser/esm/note.mjs +86 -0
  22. package/browser/esm/picture.mjs +86 -0
  23. package/{node/esm/Ban9guHVB-Vxa-tq.mjs → browser/esm/shape.mjs} +2 -4
  24. package/browser/esm/slicer.mjs +276 -0
  25. package/licenses/dependencies.txt +6 -599
  26. package/node/esm/BJ7ZZm63j5O6cvrB.mjs +134 -0
  27. package/node/esm/BfRn5S5V4X8xIAEa.mjs +20 -0
  28. package/node/esm/BpwE3HqTnrLLzE3C.mjs +775 -0
  29. package/node/esm/Buw-VKYJy3y5dbaJ.mjs +197 -0
  30. package/node/esm/CFFlJxNwgyInjEnh.mjs +45 -0
  31. package/node/esm/CM5BT7h-hMtST2bE.mjs +2706 -0
  32. package/node/esm/CV3bT3Hql74GcHoU.mjs +37 -0
  33. package/node/esm/C_ANM4feA1xV-pri.mjs +32 -0
  34. package/node/esm/D3YXHeOyFp00Xk3m.mjs +323 -0
  35. package/node/esm/DPN0n6MGYQ9vZ2KO.mjs +80 -0
  36. package/node/esm/DYosMUJKp-3MSO4q.mjs +76 -0
  37. package/node/esm/DhSq680c5tgMFFbj.mjs +68 -0
  38. package/node/esm/Dxbm6ryIDCEi26RO.mjs +66 -0
  39. package/node/esm/GkmuxU7OwRZtm2Rf.mjs +63 -0
  40. package/node/esm/chart.mjs +60 -0
  41. package/node/esm/control.mjs +216 -0
  42. package/node/esm/group.mjs +123 -0
  43. package/node/esm/index.mjs +16649 -11320
  44. package/node/esm/note.mjs +87 -0
  45. package/node/esm/picture.mjs +86 -0
  46. package/node/esm/shape.mjs +783 -0
  47. package/node/esm/slicer.mjs +278 -0
  48. package/package.json +53 -14
  49. package/resources/contents.json +18 -0
  50. package/resources/locales/contents.json +42 -0
  51. package/resources/locales/de/movable.cmd.json +154 -0
  52. package/resources/locales/de/picture.cmd.json +31 -0
  53. package/resources/locales/de/selection.cmd.json +8 -0
  54. package/resources/locales/de/shape.cmd.json +17 -0
  55. package/resources/locales/de/sheet.cmd.json +328 -21
  56. package/resources/locales/de/slicer.cmd.json +17 -0
  57. package/resources/locales/de/table.cmd.json +9 -1
  58. package/resources/locales/de/ui.msg.json +309 -3
  59. package/resources/locales/de/workbook.cmd.json +10 -6
  60. package/resources/locales/en/movable.cmd.json +154 -0
  61. package/resources/locales/en/picture.cmd.json +31 -0
  62. package/resources/locales/en/selection.cmd.json +8 -0
  63. package/resources/locales/en/shape.cmd.json +17 -0
  64. package/resources/locales/en/sheet.cmd.json +342 -22
  65. package/resources/locales/en/slicer.cmd.json +17 -0
  66. package/resources/locales/en/table.cmd.json +9 -1
  67. package/resources/locales/en/ui.msg.json +309 -3
  68. package/resources/locales/en/workbook.cmd.json +11 -7
  69. package/types/chart.d.ts +2 -0
  70. package/types/control.d.ts +2 -0
  71. package/types/group.d.ts +2 -0
  72. package/types/note.d.ts +2 -0
  73. package/types/picture.d.ts +2 -0
  74. package/types/shape.d.ts +2 -0
  75. package/types/slicer.d.ts +2 -0
  76. package/types/src/annotation/RangeAnnotations.d.ts +119 -0
  77. package/types/src/annotation/index.d.ts +2 -0
  78. package/types/src/autoFill/AutoFillPresets.d.ts +14 -0
  79. package/types/src/autoFill/FillMenu.d.ts +36 -0
  80. package/types/src/autoFill/FillSeries.d.ts +38 -0
  81. package/types/src/autoFill/index.d.ts +4 -0
  82. package/types/src/border/StaticBorderRenderer.d.ts +2 -2
  83. package/types/src/border/useBorders.d.ts +7 -7
  84. package/types/src/cell/CornerTriangle.d.ts +6 -0
  85. package/types/src/cell/FormulaCellRenderer.d.ts +1 -1
  86. package/types/src/cell/OutlineButton.d.ts +123 -0
  87. package/types/src/cell/SheetCellRenderer.d.ts +17 -2
  88. package/types/src/cell/SheetHeaderRenderer.d.ts +5 -0
  89. package/types/src/cell/StaticCellRenderer.d.ts +57 -0
  90. package/types/src/cell/index.d.ts +2 -0
  91. package/types/src/cell/useFormulaViewAnchor.d.ts +1 -1
  92. package/types/src/chart/index.d.ts +0 -1
  93. package/types/src/checklist/ValueChecklist.d.ts +112 -0
  94. package/types/src/checklist/index.d.ts +2 -0
  95. package/types/src/commands/ContextualToolbar.d.ts +19 -0
  96. package/types/src/commands/createTransactionalMiddleware.d.ts +4 -1
  97. package/types/src/commands/index.d.ts +1 -0
  98. package/types/src/comment/CommentCardRequest.d.ts +94 -0
  99. package/types/src/comment/CommentUtils.d.ts +43 -0
  100. package/types/src/comment/NoteEditor.d.ts +20 -0
  101. package/types/src/comment/index.d.ts +5 -0
  102. package/types/src/comment/useCommentThread.d.ts +37 -0
  103. package/types/src/comment/useSheetComments.d.ts +28 -0
  104. package/types/src/{sheet → conditionalFormat}/ConditionalFormatPresets.d.ts +6 -6
  105. package/types/src/conditionalFormat/index.d.ts +1 -0
  106. package/types/src/control/FormControlRenderers.d.ts +22 -0
  107. package/types/src/editor/FunctionPreviewPanel.d.ts +15 -1
  108. package/types/src/editor/NamedItemLabel.d.ts +29 -0
  109. package/types/src/editor/NamedItemsPanel.d.ts +13 -2
  110. package/types/src/editor/SheetCellEditorLayer.d.ts +3 -7
  111. package/types/src/editor/SheetCellEditorStartLayer.d.ts +44 -0
  112. package/types/src/editor/SheetCellInput.d.ts +26 -2
  113. package/types/src/editor/SheetEditable.d.ts +8 -2
  114. package/types/src/editor/formulaCaret.d.ts +39 -10
  115. package/types/src/editor/formulaEval.d.ts +9 -5
  116. package/types/src/editor/formulaLint.d.ts +36 -0
  117. package/types/src/editor/formulaPresentation.d.ts +7 -0
  118. package/types/src/editor/formulaText.d.ts +17 -5
  119. package/types/src/editor/functionArgs.d.ts +20 -0
  120. package/types/src/editor/index.d.ts +4 -1
  121. package/types/src/editor/pickedReference.d.ts +76 -0
  122. package/types/src/editor/useEditRejectedNotice.d.ts +32 -0
  123. package/types/src/editor/useFormulaHints.d.ts +93 -3
  124. package/types/src/editor/useFormulaInput.d.ts +30 -4
  125. package/types/src/editor/useReferenceMode.d.ts +12 -0
  126. package/types/src/editor/validationAlert.d.ts +24 -0
  127. package/types/src/externalLink/ExternalLinksPaneArgs.d.ts +23 -0
  128. package/types/src/externalLink/index.d.ts +2 -0
  129. package/types/src/form/FormulaInput.d.ts +18 -2
  130. package/types/src/form/FormulaInputParts.d.ts +10 -1
  131. package/types/src/form/useEditCommit.d.ts +23 -3
  132. package/types/src/form/useInputField.d.ts +2 -3
  133. package/types/src/frame/CommandContext.d.ts +188 -6
  134. package/types/src/group/GroupEditor.d.ts +25 -0
  135. package/types/src/index.d.ts +12 -1
  136. package/types/src/io/WorkbookIO.d.ts +2 -0
  137. package/types/src/layer/CellErrorLayer.d.ts +24 -7
  138. package/types/src/layer/CommentCardLayer.d.ts +43 -0
  139. package/types/src/layer/CommentsLayer.d.ts +35 -0
  140. package/types/src/layer/ConditionalIcons.d.ts +4 -4
  141. package/types/src/layer/FreezeDragLines.d.ts +17 -0
  142. package/types/src/layer/GridFreezeLayer.d.ts +11 -0
  143. package/types/src/layer/HeaderFreezeLayer.d.ts +12 -0
  144. package/types/src/layer/HeaderResizerLayer.d.ts +2 -1
  145. package/types/src/layer/HyperlinkLayer.d.ts +109 -0
  146. package/types/src/layer/MovableKindScope.d.ts +17 -0
  147. package/types/src/layer/ProtectionLayer.d.ts +52 -0
  148. package/types/src/layer/RangeAnnotationLayer.d.ts +71 -0
  149. package/types/src/layer/ResizeIndicator.d.ts +9 -8
  150. package/types/src/layer/ResizeTooltip.d.ts +13 -0
  151. package/types/src/layer/SheetHeaderCellLayer.d.ts +10 -1
  152. package/types/src/layer/SheetOutlineLayer.d.ts +40 -0
  153. package/types/src/layer/TableLayer.d.ts +5 -4
  154. package/types/src/layer/TableToolbar.d.ts +42 -0
  155. package/types/src/layer/ValidationDropdownLayer.d.ts +61 -0
  156. package/types/src/layer/ValidationIndicatorLayer.d.ts +14 -21
  157. package/types/src/layer/ValidationPromptLayer.d.ts +64 -0
  158. package/types/src/layer/_tableColor.d.ts +4 -0
  159. package/types/src/layer/cellTip.d.ts +13 -0
  160. package/types/src/layer/freezeDragState.d.ts +21 -0
  161. package/types/src/layer/index.d.ts +14 -0
  162. package/types/src/layer/resizeIndicatorState.d.ts +3 -1
  163. package/types/src/layer/useFreezeDrag.d.ts +22 -0
  164. package/types/src/layer/useValidationPicker.d.ts +54 -0
  165. package/types/src/layer/validationMark.d.ts +63 -0
  166. package/types/src/listener/useModelListener.d.ts +4 -4
  167. package/types/src/movable/ConnectionSites.d.ts +18 -0
  168. package/types/src/movable/IMovableArea.d.ts +56 -0
  169. package/types/src/movable/MovableAdornment.d.ts +26 -0
  170. package/types/src/movable/MovableCommandGroups.d.ts +40 -0
  171. package/types/src/movable/MovableCommands.d.ts +6 -1
  172. package/types/src/movable/MovableControl.d.ts +78 -0
  173. package/types/src/movable/MovableEdit.d.ts +22 -0
  174. package/types/src/movable/MovableFrame.d.ts +16 -13
  175. package/types/src/movable/MovableLayer.d.ts +25 -7
  176. package/types/src/movable/MovableRenderers.d.ts +210 -0
  177. package/types/src/movable/PlaceholderFrames.d.ts +11 -0
  178. package/types/src/movable/RotateHandle.d.ts +37 -0
  179. package/types/src/movable/TextBox.d.ts +34 -0
  180. package/types/src/movable/connect.d.ts +16 -0
  181. package/types/src/movable/framePlacement.d.ts +72 -0
  182. package/types/src/movable/geometry.d.ts +61 -0
  183. package/types/src/movable/index.d.ts +10 -0
  184. package/types/src/movable/pressTarget.d.ts +20 -0
  185. package/types/src/picker/PickerPanel.d.ts +52 -0
  186. package/types/src/picker/cellPickerOpen.d.ts +6 -0
  187. package/types/src/picker/index.d.ts +4 -0
  188. package/types/src/picker/useCellPicker.d.ts +95 -0
  189. package/types/src/picture/PictureCommands.d.ts +12 -0
  190. package/types/src/picture/PictureKind.d.ts +7 -0
  191. package/types/src/picture/index.d.ts +0 -1
  192. package/types/src/protection/ProtectionPaneArgs.d.ts +31 -0
  193. package/types/src/protection/index.d.ts +3 -0
  194. package/types/src/protection/unlockProtectedRanges.d.ts +23 -0
  195. package/types/src/richText/RichTextEditor.d.ts +41 -0
  196. package/types/src/richText/index.d.ts +2 -0
  197. package/types/src/selection/SheetSelectionLayer.d.ts +14 -10
  198. package/types/src/shape/ConnectorControl.d.ts +46 -0
  199. package/types/src/shape/ShapeCommands.d.ts +11 -0
  200. package/types/src/shape/ShapeControl.d.ts +8 -0
  201. package/types/src/shape/ShapeEditor.d.ts +15 -2
  202. package/types/src/shape/ShapeGallery.d.ts +31 -0
  203. package/types/src/shape/ShapeHandles.d.ts +28 -0
  204. package/types/src/shape/ShapeKind.d.ts +7 -0
  205. package/types/src/shape/ShapeSVG.d.ts +22 -0
  206. package/types/src/shape/ShapeText.d.ts +17 -0
  207. package/types/src/shape/icons/ShapeIcons.d.ts +16 -0
  208. package/types/src/shape/icons/_ShapeIconPack.d.ts +4 -0
  209. package/types/src/shape/index.d.ts +3 -1
  210. package/types/src/shape/shapeFrame.d.ts +50 -0
  211. package/types/src/shape/shapeStyle.d.ts +82 -0
  212. package/types/src/sheet/ISheetElement.d.ts +62 -65
  213. package/types/src/sheet/SheetCommandProvider.d.ts +9 -4
  214. package/types/src/sheet/SheetCommands.d.ts +21 -6
  215. package/types/src/sheet/SheetOutlineElement.d.ts +70 -0
  216. package/types/src/sheet/SheetScrollbar.d.ts +1 -10
  217. package/types/src/sheet/_freezeAt.d.ts +10 -0
  218. package/types/src/sheet/_useHeaderMetrics.d.ts +11 -0
  219. package/types/src/sheet/circularReferences.d.ts +9 -1
  220. package/types/src/sheet/index.d.ts +1 -1
  221. package/types/src/sheet/useCycleHighlight.d.ts +21 -0
  222. package/types/src/slicer/SlicerCommands.d.ts +10 -0
  223. package/types/src/slicer/SlicerEditor.d.ts +8 -2
  224. package/types/src/slicer/SlicerKind.d.ts +7 -0
  225. package/types/src/slicer/SlicerStylePreview.d.ts +18 -0
  226. package/types/src/slicer/index.d.ts +2 -1
  227. package/types/src/slicer/slicerStyles.d.ts +32 -0
  228. package/types/src/tabStrip/TabStrip.d.ts +7 -0
  229. package/types/src/taskPane/ITaskPane.d.ts +12 -1
  230. package/types/src/taskPane/MovablePane.d.ts +17 -0
  231. package/types/src/taskPane/index.d.ts +1 -0
  232. package/types/src/theme/ThemeState.d.ts +14 -1
  233. package/types/src/theme/useGridColorScheme.d.ts +1 -1
  234. package/types/src/workbook/DefaultMovableRenderers.d.ts +20 -0
  235. package/types/src/workbook/IWorkbookElement.d.ts +24 -0
  236. package/types/src/workbook/WorkbookCommands.d.ts +2 -4
  237. package/types/src/workbook/WorkbookStrip.d.ts +9 -0
  238. package/types/src/workbook/_followOrigin.d.ts +9 -0
  239. package/types/src/workbook/useWorkbookFormat.d.ts +3 -3
  240. package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
  241. package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +0 -156
  242. package/browser/cjs/index.cjs +0 -35
  243. package/browser/esm/BdJpSdwyWuh-Te5p.mjs +0 -6286
  244. package/types/src/editor/useProtectedEditNotice.d.ts +0 -14
  245. package/types/src/movable/MoveableBundle.d.ts +0 -4
@@ -0,0 +1,63 @@
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 { forwardRef as e, memo as t, useEffect as r, useLayoutEffect as n, useRef as o } from "react";
8
+ import { jsx as i } from "react/jsx-runtime";
9
+ var d = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakSet(), a = (e) => !!((e) => {
10
+ const t = d.get(e);
11
+ if (!t) return !1;
12
+ for (const e of t) if (e()) return !0;
13
+ return !1;
14
+ })(e) || (l.add(e), !1), s = (e, t) => {
15
+ let r = d.get(e);
16
+ return r || (r = /* @__PURE__ */ new Set(), d.set(e, r)), r.add(t), l.has(e) && (l.delete(e), e.isSelected() && t()), () => {
17
+ r.delete(t);
18
+ };
19
+ }, c = t(e((e, t) => {
20
+ const { children: d, style: l, contentStyle: a, disabled: c = !1, movable: u, onDragZone: f, ...h } = e, b = o(null);
21
+ return n(() => {
22
+ f?.((e) => {
23
+ const t = b.current;
24
+ return !t || !t.contains(e.target);
25
+ });
26
+ }, [f]), r(() => {
27
+ if (u && !c) return s(u, () => ((e) => {
28
+ const t = e?.querySelector("textarea, input, [contenteditable]:not([contenteditable=\"false\"])");
29
+ if (!t) return !1;
30
+ if (t.focus(), t.isContentEditable) {
31
+ const e = t.ownerDocument.getSelection();
32
+ e?.selectAllChildren(t), e?.collapseToEnd();
33
+ }
34
+ return !0;
35
+ })(b.current));
36
+ }, [u, c]), i("div", {
37
+ ref: t,
38
+ ...h,
39
+ style: {
40
+ width: "100%",
41
+ height: "100%",
42
+ boxSizing: "border-box",
43
+ padding: "3px",
44
+ position: "relative",
45
+ overflow: "hidden",
46
+ ...l
47
+ },
48
+ children: i("div", {
49
+ ref: b,
50
+ style: {
51
+ width: "100%",
52
+ height: "100%",
53
+ boxSizing: "border-box",
54
+ overflow: "hidden",
55
+ cursor: c ? void 0 : "text",
56
+ ...a
57
+ },
58
+ children: d
59
+ })
60
+ });
61
+ }));
62
+ c.displayName = "TextBox";
63
+ export { s as n, a as r, c as t };
@@ -0,0 +1,60 @@
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 { 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";
12
+ 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", {
22
+ ...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
+ })
57
+ });
58
+ }));
59
+ m.displayName = "ChartEditor";
60
+ export { m as ChartEditor };
@@ -0,0 +1,216 @@
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 { memo as t, useEffect as n, useReducer as r, useRef as o } from "react";
9
+ import { jsx as i, jsxs as l } from "react/jsx-runtime";
10
+ var d = (e) => {
11
+ const t = e.getFont();
12
+ if (!t) return {};
13
+ const n = {};
14
+ return t.name && (n.fontFamily = t.name), void 0 !== t.size && (n.fontSize = `${t.size}pt`), t.bold && (n.fontWeight = "bold"), t.italic && (n.fontStyle = "italic"), t.color && (n.color = t.color), n;
15
+ }, a = {
16
+ pointerEvents: "none",
17
+ width: "100%",
18
+ height: "100%",
19
+ boxSizing: "border-box",
20
+ margin: 0
21
+ }, s = {
22
+ ...a,
23
+ display: "flex",
24
+ alignItems: "center",
25
+ gap: "0.35em",
26
+ padding: "0 2px",
27
+ overflow: "hidden",
28
+ whiteSpace: "nowrap"
29
+ }, c = (o, l) => {
30
+ const d = t((t) => {
31
+ const { children: l, disabled: d, style: s, movable: c, zoom: g = 1, isDragging: h, onHide: p, onShow: u, onDragZone: x, adornmentHost: m, flip: y, ...f } = t, b = c.getContent(), [, v] = r((e) => e + 1, 0);
32
+ e(b, { onAnyChange() {
33
+ v();
34
+ } });
35
+ const w = b, C = b, I = w.getLinkedCell?.() ?? null;
36
+ n(() => {
37
+ if (I) return w.getLinkedRange?.()?.addListener(() => v(), { ignoreAddressChanges: !0 });
38
+ }, [b, I]);
39
+ const R = C.getListFillRange?.() ?? null;
40
+ if (n(() => {
41
+ if (R) return C.getListSourceRange?.()?.addListener(() => v(), { ignoreAddressChanges: !0 });
42
+ }, [b, R]), b.isDeleted()) return null;
43
+ const S = c.getBounds();
44
+ return i("div", {
45
+ className: "form-control-renderer",
46
+ ...f,
47
+ style: {
48
+ width: "100%",
49
+ height: "100%",
50
+ zoom: g,
51
+ position: "relative",
52
+ boxShadow: h ? "1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))" : void 0,
53
+ overflow: "hidden",
54
+ ...s
55
+ },
56
+ children: i("div", {
57
+ inert: !0,
58
+ style: a,
59
+ children: i(o, {
60
+ control: b,
61
+ width: S?.width ?? 0,
62
+ height: S?.height ?? 0
63
+ })
64
+ })
65
+ });
66
+ });
67
+ return d.displayName = l, d;
68
+ }, g = c(({ control: e }) => i("button", {
69
+ type: "button",
70
+ tabIndex: -1,
71
+ style: {
72
+ ...a,
73
+ ...d(e)
74
+ },
75
+ children: e.getCaption() ?? ""
76
+ }), "ButtonRenderer"), h = c(({ control: e }) => {
77
+ const t = o(null), r = e.isMixed();
78
+ return n(() => {
79
+ t.current && (t.current.indeterminate = r);
80
+ }, [r]), l("label", {
81
+ style: {
82
+ ...s,
83
+ ...d(e)
84
+ },
85
+ children: [i("input", {
86
+ ref: t,
87
+ type: "checkbox",
88
+ checked: e.isChecked(),
89
+ readOnly: !0
90
+ }), i("span", { children: e.getCaption() ?? "" })]
91
+ });
92
+ }, "CheckBoxRenderer"), p = c(({ control: e }) => l("label", {
93
+ style: {
94
+ ...s,
95
+ ...d(e)
96
+ },
97
+ children: [i("input", {
98
+ type: "radio",
99
+ checked: e.isChecked(),
100
+ readOnly: !0
101
+ }), i("span", { children: e.getCaption() ?? "" })]
102
+ }), "OptionButtonRenderer"), u = c(({ control: e }) => {
103
+ const t = e.isHorizontal();
104
+ return i("input", {
105
+ type: "range",
106
+ tabIndex: -1,
107
+ readOnly: !0,
108
+ min: e.getMin() ?? 0,
109
+ max: e.getMax() ?? 100,
110
+ step: e.getIncrement() ?? 1,
111
+ value: e.getValue() ?? e.getMin() ?? 0,
112
+ style: {
113
+ ...a,
114
+ writingMode: t ? void 0 : "vertical-lr"
115
+ }
116
+ });
117
+ }, "ScrollBarRenderer"), x = (e) => {
118
+ const t = {
119
+ up: "2,7 5,4 8,7",
120
+ down: "2,3 5,6 8,3",
121
+ left: "7,2 4,5 7,8",
122
+ right: "3,2 6,5 3,8"
123
+ }[e.direction];
124
+ return i("svg", {
125
+ viewBox: "0 0 10 10",
126
+ style: {
127
+ width: "100%",
128
+ height: "100%",
129
+ maxWidth: 10,
130
+ maxHeight: 10
131
+ },
132
+ children: i("polyline", {
133
+ points: t,
134
+ fill: "none",
135
+ stroke: "currentColor",
136
+ strokeWidth: 1.5
137
+ })
138
+ });
139
+ }, m = {
140
+ flex: "1 1 0",
141
+ minWidth: 0,
142
+ minHeight: 0,
143
+ margin: 0,
144
+ padding: 0,
145
+ display: "flex",
146
+ alignItems: "center",
147
+ justifyContent: "center"
148
+ }, y = c(({ width: e, height: t }) => {
149
+ const n = ((e, t, n) => e > 0 && t > 0 ? e > t : n)(e, t, !1);
150
+ return l("div", {
151
+ style: {
152
+ ...a,
153
+ display: "flex",
154
+ flexDirection: n ? "row" : "column"
155
+ },
156
+ children: [i("button", {
157
+ type: "button",
158
+ tabIndex: -1,
159
+ style: m,
160
+ children: i(x, { direction: n ? "left" : "up" })
161
+ }), i("button", {
162
+ type: "button",
163
+ tabIndex: -1,
164
+ style: m,
165
+ children: i(x, { direction: n ? "right" : "down" })
166
+ })]
167
+ });
168
+ }, "SpinnerRenderer"), f = (e) => e.getListItems().map((e, t) => i("option", {
169
+ value: t,
170
+ children: e
171
+ }, t)), b = c(({ control: e }) => l("select", {
172
+ tabIndex: -1,
173
+ value: e.getSelectedIndex() ?? -1,
174
+ style: a,
175
+ onChange: () => {},
176
+ children: [null === e.getSelectedIndex() ? i("option", { value: -1 }) : null, f(e)]
177
+ }), "DropDownRenderer"), v = c(({ control: e }) => i("select", {
178
+ tabIndex: -1,
179
+ size: Math.max(2, e.getListItems().length),
180
+ value: e.getSelectedIndex() ?? void 0,
181
+ style: a,
182
+ onChange: () => {},
183
+ children: f(e)
184
+ }), "ListBoxRenderer"), w = c(({ control: e }) => i("fieldset", {
185
+ style: {
186
+ ...a,
187
+ padding: 0,
188
+ ...d(e)
189
+ },
190
+ children: i("legend", {
191
+ style: {
192
+ marginLeft: "6px",
193
+ padding: "0 2px"
194
+ },
195
+ children: e.getCaption() ?? ""
196
+ })
197
+ }), "GroupBoxRenderer"), C = c(({ control: e }) => i("span", {
198
+ style: {
199
+ ...s,
200
+ ...d(e)
201
+ },
202
+ children: e.getCaption() ?? ""
203
+ }), "LabelRenderer"), I = c(({ control: e }) => i("div", {
204
+ style: {
205
+ ...a,
206
+ border: "var(--sxl-color-neutral, grey) solid 1px",
207
+ backgroundColor: "var(--sxl-color-base-100, white)",
208
+ display: "flex",
209
+ alignItems: "center",
210
+ justifyContent: "center",
211
+ overflow: "hidden",
212
+ whiteSpace: "nowrap"
213
+ },
214
+ children: e.getName?.() ?? e.getTypeDescription()
215
+ }), "UnmodeledControlRenderer");
216
+ export { g as ButtonRenderer, h as CheckBoxRenderer, b as DropDownRenderer, w as GroupBoxRenderer, C as LabelRenderer, v as ListBoxRenderer, p as OptionButtonRenderer, u as ScrollBarRenderer, y as SpinnerRenderer, I as UnmodeledControlRenderer };
@@ -0,0 +1,123 @@
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 { h as t, i as o, p as n } from "./D3YXHeOyFp00Xk3m.mjs";
9
+ import { forwardRef as i, memo as r, useContext as s, useEffect as l, useReducer as a } from "react";
10
+ import { jsx as d, jsxs as g } from "react/jsx-runtime";
11
+ import { useSurfaceState as h } from "@sheetxl/grid-react";
12
+ var p = r(i((i, r) => {
13
+ const { children: p, disabled: m, style: c, container: u, movable: v, zoom: f = 1, isDragging: y, onHide: b, onShow: w, onDragZone: x, adornmentHost: C, flip: E, gesture: $, ...I } = i, [, j] = a((e) => e + 1, 0);
14
+ e(v ?? null, {
15
+ onBoundsChange: j,
16
+ onSelectionChange: j,
17
+ onAnyChange: j
18
+ });
19
+ const B = v?.getMovables() ?? null;
20
+ e(B, { onCollectionChange: j });
21
+ const [N] = h("movable-drag", null), z = s(n), D = B?.getItems({ ignoreHidden: !0 }) ?? [];
22
+ l(() => {
23
+ const e = D.map((e) => e.addListeners({
24
+ onBoundsChange: j,
25
+ onAnyChange: j,
26
+ onSelectionChange: j
27
+ }));
28
+ return () => {
29
+ for (const t of e) t();
30
+ };
31
+ }, [D.map((e) => e.getId()).join("|")]);
32
+ const H = v?.getBounds();
33
+ if (u.isDeleted() || !v || !H) return null;
34
+ const S = "none" === c?.pointerEvents, k = !S && !m && v.isSelected(), A = N?.[v.getId()] ?? null, F = A?.bounds ?? H, O = v.getFlip(), R = E ?? A?.flip ?? O, G = (H.width > 0 ? F.width / H.width : 1) * (R.horizontal !== O.horizontal ? -1 : 1), L = (H.height > 0 ? F.height / H.height : 1) * (R.vertical !== O.vertical ? -1 : 1), M = v.getRotation() || 0, T = [
35
+ `translate(${F.width * f / 2}px, ${F.height * f / 2}px)`,
36
+ 1 !== G || 1 !== L ? `scale(${G}, ${L})` : "",
37
+ M ? `rotate(${-M}deg)` : "",
38
+ `translate(${-(H.x + H.width / 2) * f}px, ${-(H.y + H.height / 2) * f}px)`
39
+ ].filter(Boolean).join(" ");
40
+ return g("div", {
41
+ className: "group-editor",
42
+ ...I,
43
+ ref: r,
44
+ style: {
45
+ width: "100%",
46
+ height: "100%",
47
+ position: "relative",
48
+ overflow: "visible",
49
+ ...c,
50
+ pointerEvents: "none"
51
+ },
52
+ children: [d("div", {
53
+ className: "group-canvas",
54
+ style: {
55
+ position: "absolute",
56
+ left: 0,
57
+ top: 0,
58
+ transformOrigin: "0 0",
59
+ transform: T,
60
+ pointerEvents: "none"
61
+ },
62
+ children: D.map((e) => {
63
+ const n = o(e.getContent().getType()), i = N?.[e.getId()] ?? null, r = i?.bounds ?? e.getBounds();
64
+ if (!r || !n) return null;
65
+ const s = i?.rotation ?? (e.getRotation() || 0);
66
+ return d("div", {
67
+ className: "group-member",
68
+ [t]: e.getId(),
69
+ style: {
70
+ position: "absolute",
71
+ left: r.x * f,
72
+ top: r.y * f,
73
+ width: r.width * f,
74
+ height: r.height * f,
75
+ transform: s ? `rotate(${s}deg)` : void 0,
76
+ transformOrigin: "center",
77
+ opacity: i ? .7 : void 0,
78
+ pointerEvents: "none"
79
+ },
80
+ children: d(n, {
81
+ movable: e,
82
+ zoom: f,
83
+ flip: i?.flip ?? e.getFlip(),
84
+ disabled: m,
85
+ isDragging: y || !!i,
86
+ adornmentHost: z.get(e) ?? null,
87
+ style: {
88
+ position: "relative",
89
+ left: 0,
90
+ top: 0,
91
+ width: "100%",
92
+ height: "100%",
93
+ pointerEvents: S ? "none" : "auto"
94
+ }
95
+ })
96
+ }, e.getId());
97
+ })
98
+ }), k ? d("svg", {
99
+ className: "group-edge",
100
+ width: "100%",
101
+ height: "100%",
102
+ style: {
103
+ position: "absolute",
104
+ left: 0,
105
+ top: 0,
106
+ overflow: "visible",
107
+ pointerEvents: "none"
108
+ },
109
+ children: d("rect", {
110
+ x: 0,
111
+ y: 0,
112
+ width: "100%",
113
+ height: "100%",
114
+ fill: "none",
115
+ stroke: "transparent",
116
+ pointerEvents: "stroke",
117
+ style: { strokeWidth: "var(--sxl-handle-hit, 11px)" }
118
+ })
119
+ }) : null]
120
+ });
121
+ }));
122
+ p.displayName = "GroupEditor";
123
+ export { p as GroupEditor };