@sheetxl/react 0.8.0-beta.7 → 1.0.0
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.
- package/LICENSE.md +8 -7
- package/browser/esm/2YDUWXaXpl9cdsk7.mjs +8 -0
- package/browser/esm/64NfoZ1s7Oe3vdpX.mjs +60 -0
- package/browser/esm/BJDz5J4gFUEYi1Wz.mjs +36 -0
- package/browser/esm/B_CI6xMNropeWGgr.mjs +134 -0
- package/browser/esm/BgA4Cz8iMysciFOb.mjs +45 -0
- package/browser/esm/BkG6VuJDmu_hfIo6.mjs +31 -0
- package/browser/esm/BmO7yh4NjxeJylOD.mjs +14092 -0
- package/browser/esm/BwFFSeqtE3TIuvtc.mjs +341 -0
- package/browser/esm/CENTtj0PnF_tvpST.mjs +79 -0
- package/browser/esm/CVY0-_x6IgpdUVNp.mjs +264 -0
- package/browser/esm/CdyivRoMgPXvRiiE.mjs +197 -0
- package/browser/esm/CiylJlRA7mt8yjPD.mjs +128 -0
- package/browser/esm/D9CTIGFUbVGJkeVE.mjs +401 -0
- package/browser/esm/D9NgFucLwPgAQNgf.mjs +19 -0
- package/browser/esm/DdFOaG09eksHtKwT.mjs +145 -0
- package/browser/esm/DdHdNjRkzo1iShOo.mjs +78 -0
- package/browser/esm/DfIvpHB7HDdmIYNm.mjs +9560 -0
- package/browser/esm/DfNDtzixfTPjmoW_.mjs +32 -0
- package/browser/esm/Dtb9bOBjtPdUAr8x.mjs +20 -0
- package/browser/esm/Dz5pGpL4XWXVdntj.mjs +323 -0
- package/browser/esm/SJAlYSFKC-5yNZ-C.mjs +2706 -0
- package/browser/esm/chart.mjs +41 -0
- package/browser/esm/control.mjs +217 -0
- package/browser/esm/group.mjs +123 -0
- package/browser/esm/index.mjs +22289 -13986
- package/browser/esm/jHqSboF5oFvzSM7a.mjs +63 -0
- package/browser/esm/note.mjs +112 -0
- package/browser/esm/oljQE8EpIzoxUjUz.mjs +323 -0
- package/browser/esm/picture.mjs +7 -0
- package/browser/esm/shape.mjs +7 -0
- package/browser/esm/slicer.mjs +282 -0
- package/browser/esm/w8MsScJSe7QxP6jL.mjs +67 -0
- package/browser/esm/yRqWQRSVyiR1kYh8.mjs +42 -0
- package/licenses/dependencies.txt +284 -565
- package/node/esm/1XOgrNXKQF__O9SV.mjs +8 -0
- package/node/esm/Aw6aaKE_YOA1Vi_V.mjs +146 -0
- package/node/esm/B6Oqu2Gw1pwWPf_N.mjs +328 -0
- package/node/esm/BizlElAhqg_Bc624.mjs +198 -0
- package/node/esm/C06Y1xPsbxgn3YX7.mjs +128 -0
- package/node/esm/C2dHN_gvhBxlFFnJ.mjs +45 -0
- package/node/esm/C4_5UcCdys1hzt5E.mjs +68 -0
- package/node/esm/CIidiDtqyubz13ys.mjs +80 -0
- package/node/esm/CTFb8PjwC1q6yilw.mjs +80 -0
- package/node/esm/C_GJPG-BTFhta8GD.mjs +265 -0
- package/node/esm/CdTeYrDgGp-s-KNG.mjs +134 -0
- package/node/esm/CeMKhq6cSxfWzN5H.mjs +2706 -0
- package/node/esm/DJIBAu8bEDmlVjtD.mjs +20 -0
- package/node/esm/DUQ1PY9P63cTe_Es.mjs +37 -0
- package/node/esm/Db8NRp_kZ-FfkZaO.mjs +32 -0
- package/node/esm/Dl2kdvb4G_ddqeDN.mjs +19 -0
- package/node/esm/DlDr-o5nAZgPbn6R.mjs +1697 -0
- package/node/esm/DvRLP1lEBfwHBrEC.mjs +63 -0
- package/node/esm/JVlPlE1ys7DM3yCP.mjs +35 -0
- package/node/esm/NSddS40Vqf1xKdDd.mjs +406 -0
- package/node/esm/QqwCS9GFuDnQausz.mjs +66 -0
- package/node/esm/chart.mjs +41 -0
- package/node/esm/control.mjs +217 -0
- package/node/esm/group.mjs +123 -0
- package/node/esm/index.mjs +18027 -9614
- package/node/esm/note.mjs +113 -0
- package/node/esm/picture.mjs +326 -0
- package/node/esm/shape.mjs +342 -0
- package/node/esm/slicer.mjs +284 -0
- package/package.json +56 -15
- package/resources/contents.json +36 -0
- package/resources/locales/contents.json +84 -0
- package/resources/locales/de/chart.cmd.json +82 -0
- package/resources/locales/de/movable.cmd.json +68 -0
- package/resources/locales/de/picture.cmd.json +188 -0
- package/resources/locales/de/pivot.cmd.json +79 -0
- package/resources/locales/de/shape.cmd.json +17 -0
- package/resources/locales/de/sheet.cmd.json +270 -16
- package/resources/locales/de/slicer.cmd.json +17 -0
- package/resources/locales/de/sparkline.cmd.json +301 -0
- package/resources/locales/de/table.cmd.json +13 -2
- package/resources/locales/de/ui.msg.json +358 -2
- package/resources/locales/de/workbook.cmd.json +8 -1
- package/resources/locales/en/chart.cmd.json +82 -0
- package/resources/locales/en/movable.cmd.json +68 -0
- package/resources/locales/en/picture.cmd.json +188 -0
- package/resources/locales/en/pivot.cmd.json +79 -0
- package/resources/locales/en/shape.cmd.json +17 -0
- package/resources/locales/en/sheet.cmd.json +283 -17
- package/resources/locales/en/slicer.cmd.json +17 -0
- package/resources/locales/en/sparkline.cmd.json +301 -0
- package/resources/locales/en/table.cmd.json +13 -2
- package/resources/locales/en/ui.msg.json +360 -2
- package/resources/locales/en/workbook.cmd.json +8 -1
- package/types/chart.d.ts +2 -0
- package/types/control.d.ts +2 -0
- package/types/group.d.ts +2 -0
- package/types/note.d.ts +2 -0
- package/types/picture.d.ts +2 -0
- package/types/shape.d.ts +2 -0
- package/types/slicer.d.ts +2 -0
- package/types/src/annotation/RangeAnnotationLayer.d.ts +110 -0
- package/types/src/annotation/RangeAnnotationTag.d.ts +23 -0
- package/types/src/annotation/RangeAnnotations.d.ts +180 -0
- package/types/src/annotation/index.d.ts +4 -0
- package/types/src/autoFill/FillMenu.d.ts +2 -2
- package/types/src/autoFill/FillSeries.d.ts +2 -2
- package/types/src/border/StaticBorderRenderer.d.ts +18 -1
- package/types/src/border/useBorders.d.ts +95 -3
- package/types/src/cell/CellCheckboxRenderer.d.ts +20 -0
- package/types/src/cell/CellContent.d.ts +68 -0
- package/types/src/cell/CellControlContext.d.ts +37 -0
- package/types/src/cell/{FormulaCellRenderer.d.ts → CellFormulaRenderer.d.ts} +10 -7
- package/types/src/cell/CellImageRenderer.d.ts +11 -0
- package/types/src/cell/CellRenderers.d.ts +190 -0
- package/types/src/cell/{SheetCellRenderer.d.ts → CellTextRenderer.d.ts} +11 -8
- package/types/src/cell/ColumnButton.d.ts +3 -3
- package/types/src/cell/CornerTriangle.d.ts +2 -1
- package/types/src/cell/OutlineButton.d.ts +123 -0
- package/types/src/cell/PivotButton.d.ts +55 -0
- package/types/src/cell/SheetHeaderRenderer.d.ts +1 -1
- package/types/src/cell/StaticCellRenderer.d.ts +3 -3
- package/types/src/cell/_DropdownFace.d.ts +29 -0
- package/types/src/cell/index.d.ts +10 -2
- package/types/src/cell/useFormulaViewAnchor.d.ts +3 -3
- package/types/src/cell/useInsertableCellControls.d.ts +25 -0
- package/types/src/chart/ChartCommands.d.ts +15 -0
- package/types/src/chart/ChartEditor.d.ts +12 -2
- package/types/src/chart/ChartElement.d.ts +122 -0
- package/types/src/chart/ChartKind.d.ts +7 -0
- package/types/src/chart/PresetChartTypeDescriptors.d.ts +3 -1
- package/types/src/chart/index.d.ts +2 -1
- package/types/src/chart/paint/_fills.d.ts +24 -0
- package/types/src/chart/paint/_graphics.d.ts +38 -0
- package/types/src/chart/paint/_mode.d.ts +6 -0
- package/types/src/chart/paint/echarts.d.ts +33 -0
- package/types/src/chart/paint/index.d.ts +12 -0
- package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +140 -0
- package/types/src/chart/paint/kinds/_Area.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_BoxWhisker.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bubble.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Funnel.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Histogram.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Line.d.ts +10 -0
- package/types/src/chart/paint/kinds/_OfPie.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Pie.d.ts +21 -0
- package/types/src/chart/paint/kinds/_Placeholder.d.ts +7 -0
- package/types/src/chart/paint/kinds/_Radar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Scatter.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Sunburst.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Surface.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Treemap.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Waterfall.d.ts +3 -0
- package/types/src/chart/paint/kinds/_builtIns.d.ts +3 -0
- package/types/src/chart/paint/toEChartsOption.d.ts +42 -0
- package/types/src/checklist/ValueChecklist.d.ts +59 -18
- package/types/src/clipboard/ClipboardCommands.d.ts +3 -3
- package/types/src/clipboard/SheetClipboardLayer.d.ts +2 -2
- package/types/src/commands/ContextualToolbar.d.ts +19 -0
- package/types/src/commands/createTransactionalMiddleware.d.ts +4 -1
- package/types/src/commands/index.d.ts +1 -0
- package/types/src/comment/CommentCardRequest.d.ts +9 -9
- package/types/src/comment/index.d.ts +0 -1
- package/types/src/comment/useSheetComments.d.ts +2 -2
- package/types/src/conditionalFormat/ConditionalFormatPresets.d.ts +6 -6
- package/types/src/context/WorksheetContext.d.ts +18 -0
- package/types/src/context/index.d.ts +1 -1
- package/types/src/control/FormControlRenderers.d.ts +22 -0
- package/types/src/editableLabel/EditableLabel.d.ts +3 -1
- package/types/src/editor/EditorCommands.d.ts +3 -3
- package/types/src/editor/SheetCellEditorLayer.d.ts +2 -7
- package/types/src/editor/SheetCellEditorStartLayer.d.ts +22 -5
- package/types/src/editor/SheetCellInput.d.ts +14 -0
- package/types/src/editor/SheetEditable.d.ts +6 -6
- package/types/src/editor/SheetReferenceHeaderLayer.d.ts +1 -1
- package/types/src/editor/SheetReferenceLayer.d.ts +4 -4
- package/types/src/editor/VirtualKeyboardLayer.d.ts +50 -0
- package/types/src/editor/formulaAnchor.d.ts +12 -0
- package/types/src/editor/formulaPresentation.d.ts +4 -3
- package/types/src/editor/index.d.ts +2 -0
- package/types/src/editor/pickedReference.d.ts +3 -3
- package/types/src/editor/useEditRejectedNotice.d.ts +3 -3
- package/types/src/editor/useFormulaHints.d.ts +3 -3
- package/types/src/editor/useFormulaInput.d.ts +6 -3
- package/types/src/editor/validationAlert.d.ts +24 -0
- package/types/src/form/FormulaInput.d.ts +5 -2
- package/types/src/form/useEditCommit.d.ts +23 -3
- package/types/src/form/useInputField.d.ts +2 -3
- package/types/src/frame/CommandContext.d.ts +101 -3
- package/types/src/group/GroupEditor.d.ts +25 -0
- package/types/src/index.d.ts +10 -1
- package/types/src/layer/BorderLayer.d.ts +5 -2
- package/types/src/layer/CellErrorLayer.d.ts +18 -7
- package/types/src/layer/CellFillLayer.d.ts +2 -2
- package/types/src/layer/CellIndicatorLayer.d.ts +31 -0
- package/types/src/layer/CellInsertLayer.d.ts +71 -0
- package/types/src/layer/CircularIndicatorLayer.d.ts +3 -3
- package/types/src/layer/CommentCardLayer.d.ts +7 -9
- package/types/src/layer/CommentsLayer.d.ts +2 -2
- package/types/src/layer/ConditionalBarLayer.d.ts +2 -2
- package/types/src/layer/ConditionalIcons.d.ts +4 -4
- package/types/src/layer/ConditionalIconsLayer.d.ts +2 -2
- package/types/src/layer/ContextMenuLayer.d.ts +2 -2
- package/types/src/layer/FreezeDragLines.d.ts +17 -0
- package/types/src/layer/GridFreezeLayer.d.ts +11 -0
- package/types/src/layer/HeaderFreezeLayer.d.ts +12 -0
- package/types/src/layer/HeaderResizerLayer.d.ts +2 -1
- package/types/src/layer/HeaderSelectionLayer.d.ts +4 -4
- package/types/src/layer/HyperlinkLayer.d.ts +116 -0
- package/types/src/layer/MovableKindScope.d.ts +17 -0
- package/types/src/layer/PivotLayer.d.ts +47 -0
- package/types/src/layer/PivotToolbar.d.ts +29 -0
- package/types/src/layer/ProtectionLayer.d.ts +4 -5
- package/types/src/layer/RangeToolbar.d.ts +75 -0
- package/types/src/layer/ResizeIndicator.d.ts +11 -10
- package/types/src/layer/ResizeTooltip.d.ts +13 -0
- package/types/src/layer/SheetBackgroundLayer.d.ts +3 -3
- package/types/src/layer/SheetCellLayer.d.ts +15 -8
- package/types/src/layer/SheetColumnButtonLayer.d.ts +2 -2
- package/types/src/layer/SheetGridLineLayer.d.ts +25 -15
- package/types/src/layer/SheetHeaderCellLayer.d.ts +10 -1
- package/types/src/layer/SheetLayers.d.ts +171 -0
- package/types/src/layer/SheetMovableLayer.d.ts +4 -3
- package/types/src/layer/SheetOutlineLayer.d.ts +40 -0
- package/types/src/layer/SheetPivotCommandLayer.d.ts +13 -0
- package/types/src/layer/SheetSparklineCommandLayer.d.ts +14 -0
- package/types/src/layer/SheetTableCommandLayer.d.ts +2 -2
- package/types/src/layer/SparklineLayer.d.ts +32 -0
- package/types/src/layer/SpillLayer.d.ts +2 -2
- package/types/src/layer/TableLayer.d.ts +6 -5
- package/types/src/layer/TableToolbar.d.ts +23 -0
- package/types/src/layer/ValidationDropdownLayer.d.ts +2 -2
- package/types/src/layer/ValidationIndicatorLayer.d.ts +2 -2
- package/types/src/layer/ValidationPromptLayer.d.ts +47 -16
- package/types/src/layer/_sheetBorders.d.ts +6 -0
- package/types/src/layer/_tableColor.d.ts +6 -0
- package/types/src/layer/_visibleCellFeatures.d.ts +11 -0
- package/types/src/layer/cellTip.d.ts +13 -0
- package/types/src/layer/freezeDragState.d.ts +21 -0
- package/types/src/layer/index.d.ts +15 -0
- package/types/src/layer/resizeIndicatorState.d.ts +3 -1
- package/types/src/layer/useFreezeDrag.d.ts +22 -0
- package/types/src/layer/useNormalBorderLines.d.ts +15 -0
- package/types/src/layer/useSheetFeatureRegions.d.ts +2 -2
- package/types/src/layer/useSheetVisibleCells.d.ts +5 -6
- package/types/src/layer/useSheetVisibleDecorations.d.ts +2 -2
- package/types/src/layer/useTableHeaderCells.d.ts +2 -2
- package/types/src/layer/useValidationPicker.d.ts +3 -3
- package/types/src/layer/useVisibleTables.d.ts +2 -2
- package/types/src/layer/validationMark.d.ts +3 -3
- package/types/src/listener/index.d.ts +5 -0
- package/types/src/listener/useCell.d.ts +29 -0
- package/types/src/listener/useCellRange.d.ts +23 -0
- package/types/src/listener/useCellValue.d.ts +26 -0
- package/types/src/listener/useModelListener.d.ts +4 -4
- package/types/src/listener/useRangeListener.d.ts +13 -7
- package/types/src/listener/useRangeSnapshot.d.ts +35 -0
- package/types/src/listener/useTable.d.ts +26 -0
- package/types/src/movable/ConnectionSites.d.ts +18 -0
- package/types/src/movable/DefaultMovable.d.ts +8 -0
- package/types/src/movable/IMovableArea.d.ts +38 -0
- package/types/src/movable/MovableAdornment.d.ts +26 -0
- package/types/src/movable/MovableCommandGroups.d.ts +22 -0
- package/types/src/movable/MovableCommands.d.ts +8 -3
- package/types/src/movable/MovableControl.d.ts +80 -0
- package/types/src/movable/MovableFrame.d.ts +18 -16
- package/types/src/movable/MovableLayer.d.ts +30 -5
- package/types/src/movable/MovableRenderers.d.ts +210 -0
- package/types/src/movable/PlaceholderFrames.d.ts +11 -0
- package/types/src/movable/RotateHandle.d.ts +37 -0
- package/types/src/movable/connect.d.ts +16 -0
- package/types/src/movable/framePlacement.d.ts +72 -0
- package/types/src/movable/geometry.d.ts +61 -0
- package/types/src/movable/index.d.ts +9 -0
- package/types/src/movable/pressTarget.d.ts +20 -0
- package/types/src/movable/useFramePreview.d.ts +17 -0
- package/types/src/picker/cellPickerOpen.d.ts +3 -3
- package/types/src/picker/useCellPicker.d.ts +7 -5
- package/types/src/picture/PictureCommands.d.ts +20 -0
- package/types/src/picture/PictureKind.d.ts +7 -0
- package/types/src/picture/_pictureHyperlink.d.ts +13 -0
- package/types/src/picture/index.d.ts +0 -1
- package/types/src/picture/pictureCrop.d.ts +32 -0
- package/types/src/pivot/PivotAreas.d.ts +16 -0
- package/types/src/pivot/PivotChip.d.ts +33 -0
- package/types/src/pivot/PivotChipMenu.d.ts +74 -0
- package/types/src/pivot/PivotCommands.d.ts +24 -0
- package/types/src/pivot/PivotFieldList.d.ts +14 -0
- package/types/src/pivot/PivotFields.d.ts +47 -0
- package/types/src/pivot/PivotFieldsModel.d.ts +143 -0
- package/types/src/pivot/PivotTablePane.d.ts +47 -0
- package/types/src/pivot/_PivotFieldsContext.d.ts +41 -0
- package/types/src/pivot/_pivotNew.d.ts +12 -0
- package/types/src/pivot/_pivotRegion.d.ts +14 -0
- package/types/src/pivot/index.d.ts +9 -0
- package/types/src/pivot/usePivotFields.d.ts +17 -0
- package/types/src/presence/PresenceCommands.d.ts +35 -0
- package/types/src/presence/PresenceHost.d.ts +58 -0
- package/types/src/presence/PresenceMessages.d.ts +42 -0
- package/types/src/presence/PresenceStore.d.ts +165 -0
- package/types/src/presence/PresenceTypes.d.ts +78 -0
- package/types/src/presence/index.d.ts +7 -0
- package/types/src/presence/usePresence.d.ts +20 -0
- package/types/src/richText/RichTextEditor.d.ts +2 -2
- package/types/src/selection/SelectionCommands.d.ts +2 -2
- package/types/src/selection/SheetSelectionLayer.d.ts +6 -12
- package/types/src/shape/ConnectorControl.d.ts +46 -0
- package/types/src/shape/ShapeCommands.d.ts +11 -0
- package/types/src/shape/ShapeControl.d.ts +8 -0
- package/types/src/shape/ShapeEditor.d.ts +15 -2
- package/types/src/shape/ShapeGallery.d.ts +31 -0
- package/types/src/shape/ShapeHandles.d.ts +28 -0
- package/types/src/shape/ShapeKind.d.ts +7 -0
- package/types/src/shape/ShapeSVG.d.ts +22 -0
- package/types/src/shape/ShapeText.d.ts +17 -0
- package/types/src/shape/icons/ShapeIcons.d.ts +16 -0
- package/types/src/shape/icons/_ShapeIconPack.d.ts +4 -0
- package/types/src/shape/index.d.ts +3 -1
- package/types/src/shape/shapeFrame.d.ts +50 -0
- package/types/src/shape/shapeStyle.d.ts +82 -0
- package/types/src/sheet/ISheetHeaderElement.d.ts +3 -3
- package/types/src/sheet/IWorksheetElement.d.ts +289 -0
- package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
- package/types/src/sheet/SheetCommandProvider.d.ts +14 -6
- package/types/src/sheet/SheetCommands.d.ts +18 -3
- package/types/src/sheet/SheetKindIcon.d.ts +14 -0
- package/types/src/sheet/SheetOutlineElement.d.ts +70 -0
- package/types/src/sheet/SheetPanels.d.ts +11 -0
- package/types/src/sheet/SheetScrollbar.d.ts +4 -13
- package/types/src/sheet/TopLeftCorner.d.ts +2 -2
- package/types/src/sheet/WorksheetElement.d.ts +12 -0
- package/types/src/sheet/_freezeAt.d.ts +10 -0
- package/types/src/sheet/_hyperlinkEdit.d.ts +7 -0
- package/types/src/sheet/_useHeaderMetrics.d.ts +11 -0
- package/types/src/sheet/circularReferences.d.ts +4 -4
- package/types/src/sheet/index.d.ts +5 -2
- package/types/src/sheet/useCycleHighlight.d.ts +2 -2
- package/types/src/slicer/SlicerCommands.d.ts +10 -0
- package/types/src/slicer/SlicerEditor.d.ts +8 -2
- package/types/src/slicer/SlicerKind.d.ts +7 -0
- package/types/src/slicer/SlicerStylePreview.d.ts +18 -0
- package/types/src/slicer/index.d.ts +2 -1
- package/types/src/slicer/slicerStyles.d.ts +32 -0
- package/types/src/sparkline/PictureCache.d.ts +37 -0
- package/types/src/sparkline/SparklineCommands.d.ts +23 -0
- package/types/src/sparkline/SparklinePictures.d.ts +7 -0
- package/types/src/sparkline/paint/_drawing.d.ts +24 -0
- package/types/src/sparkline/paint/echarts.d.ts +8 -0
- package/types/src/sparkline/paint/index.d.ts +8 -0
- package/types/src/tabStrip/SheetTab.d.ts +1 -1
- package/types/src/tabStrip/Sortable.d.ts +5 -5
- package/types/src/tabStrip/TabStrip.d.ts +13 -6
- package/types/src/tabStrip/TabStripItem.d.ts +15 -13
- package/types/src/table/TableCommands.d.ts +2 -2
- package/types/src/taskPane/CellControlPane.d.ts +15 -0
- package/types/src/taskPane/MovablePane.d.ts +15 -0
- package/types/src/taskPane/TaskPaneArea.d.ts +7 -0
- package/types/src/taskPane/TaskPaneFrame.d.ts +4 -4
- package/types/src/taskPane/TaskPaneKeys.d.ts +38 -0
- package/types/src/taskPane/TaskPaneRegistry.d.ts +32 -12
- package/types/src/taskPane/_paneReasons.d.ts +7 -0
- package/types/src/taskPane/index.d.ts +3 -0
- package/types/src/taskPane/useTaskPane.d.ts +6 -3
- package/types/src/theme/ExplicitTokens.d.ts +18 -0
- package/types/src/theme/GridColorSchemeContext.d.ts +8 -0
- package/types/src/theme/ThemeRootStyles.d.ts +31 -0
- package/types/src/theme/ThemeState.d.ts +2 -2
- package/types/src/theme/buildDocThemeCSS.d.ts +4 -1
- package/types/src/theme/buildOOXMLThemeCSS.d.ts +2 -2
- package/types/src/theme/buildTokensCSS.d.ts +15 -0
- package/types/src/theme/index.d.ts +2 -4
- package/types/src/theme/useAppColorScheme.d.ts +4 -1
- package/types/src/theme/useGridColorScheme.d.ts +9 -4
- package/types/src/theme/useSystemColors.d.ts +1 -15
- package/types/src/workbook/DefaultMovableRenderers.d.ts +20 -0
- package/types/src/workbook/DefaultRenderers.d.ts +5 -4
- package/types/src/workbook/IWorkbookElement.d.ts +176 -30
- package/types/src/workbook/WorkbookCommands.d.ts +6 -1
- package/types/src/workbook/WorkbookStrip.d.ts +14 -5
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
- package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +0 -156
- package/browser/cjs/index.cjs +0 -42
- package/browser/esm/CwXbsCWTrl3QB1t6.mjs +0 -6286
- package/node/esm/CZc8rKcLzArmqJz2.mjs +0 -9
- package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-template.json.d.ts +0 -9
- package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-template.json.d.ts +0 -9
- package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-template.json.d.ts +0 -9
- package/types/src/chart/templates/line-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-template.json.d.ts +0 -9
- package/types/src/chart/templates/pie-doughnut-template.json.d.ts +0 -10
- package/types/src/chart/templates/pie-template.json.d.ts +0 -9
- package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-markers-template.json.d.ts +0 -10
- package/types/src/context/SheetContext.d.ts +0 -18
- package/types/src/movable/MoveableBundle.d.ts +0 -4
- package/types/src/sheet/ISheetElement.d.ts +0 -258
- package/types/src/sheet/SheetElement.d.ts +0 -15
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v1.0.0
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: SheetXL EULA — https://www.sheetxl.com/eula
|
|
6
|
+
*/
|
|
7
|
+
import { t as e } from "./BgA4Cz8iMysciFOb.mjs";
|
|
8
|
+
import { n as t } from "./Dtb9bOBjtPdUAr8x.mjs";
|
|
9
|
+
import { t as n } from "./jHqSboF5oFvzSM7a.mjs";
|
|
10
|
+
import { t as r } from "./B_CI6xMNropeWGgr.mjs";
|
|
11
|
+
import { i, n as a, r as o, t as ee } from "./D9CTIGFUbVGJkeVE.mjs";
|
|
12
|
+
import { forwardRef as s, memo as c, useCallback as l, useEffect as u, useMemo as d, useReducer as te, useRef as f, useState as p } from "react";
|
|
13
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
14
|
+
import { messageKey as ne } from "@sheetxl/utils";
|
|
15
|
+
import { ReactUtils as g, tokenVar as _, useImperativeElement as v } from "@sheetxl/utils-react";
|
|
16
|
+
import { createPortal as re } from "react-dom";
|
|
17
|
+
var y = c(({ handles: e, width: t, height: n, zoom: r, onDrag: i }) => {
|
|
18
|
+
let a = f(null), o = f(null), [ee, s] = p(!1), c = l((e) => {
|
|
19
|
+
let t = a.current, n = t?.getScreenCTM();
|
|
20
|
+
if (!t || !n) return null;
|
|
21
|
+
let r = new DOMPoint(e.clientX, e.clientY).matrixTransform(n.inverse());
|
|
22
|
+
return {
|
|
23
|
+
x: r.x,
|
|
24
|
+
y: r.y
|
|
25
|
+
};
|
|
26
|
+
}, []), u = l((e, t) => {
|
|
27
|
+
e.button === 0 && (e.stopPropagation(), e.preventDefault(), o.current = {
|
|
28
|
+
index: t,
|
|
29
|
+
pointerId: e.pointerId
|
|
30
|
+
}, e.currentTarget.setPointerCapture(e.pointerId), s(!0));
|
|
31
|
+
}, []), d = l((e) => {
|
|
32
|
+
let t = o.current;
|
|
33
|
+
if (!t || t.pointerId !== e.pointerId) return;
|
|
34
|
+
e.stopPropagation();
|
|
35
|
+
let n = c(e);
|
|
36
|
+
n && i(t.index, n.x, n.y, "move");
|
|
37
|
+
}, [c, i]), te = l((e) => {
|
|
38
|
+
let t = o.current;
|
|
39
|
+
if (!t || t.pointerId !== e.pointerId) return;
|
|
40
|
+
e.stopPropagation(), o.current = null, s(!1);
|
|
41
|
+
let n = c(e);
|
|
42
|
+
n ? i(t.index, n.x, n.y, "end") : i(t.index, 0, 0, "cancel");
|
|
43
|
+
}, [c, i]), ne = l((e) => {
|
|
44
|
+
let t = o.current;
|
|
45
|
+
t && t.pointerId === e.pointerId && (o.current = null, s(!1), i(t.index, 0, 0, "cancel"));
|
|
46
|
+
}, [i]);
|
|
47
|
+
if (!(e.length !== 0 && t > 0 && n > 0)) return null;
|
|
48
|
+
let g = r > 0 ? r : 1, v = 4.5 / g;
|
|
49
|
+
return m("svg", {
|
|
50
|
+
ref: a,
|
|
51
|
+
className: ee ? "sxl-shape-handles sxl-movable-gesture" : "sxl-shape-handles",
|
|
52
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
53
|
+
width: "100%",
|
|
54
|
+
height: "100%",
|
|
55
|
+
preserveAspectRatio: "none",
|
|
56
|
+
overflow: "visible",
|
|
57
|
+
style: {
|
|
58
|
+
position: "absolute",
|
|
59
|
+
left: 0,
|
|
60
|
+
top: 0,
|
|
61
|
+
display: "block",
|
|
62
|
+
pointerEvents: "none",
|
|
63
|
+
touchAction: "none"
|
|
64
|
+
},
|
|
65
|
+
children: e.map((e) => h("g", {
|
|
66
|
+
className: "sxl-shape-handle",
|
|
67
|
+
style: { "--shape-scale": g },
|
|
68
|
+
children: [m("circle", {
|
|
69
|
+
cx: e.x,
|
|
70
|
+
cy: e.y,
|
|
71
|
+
r: v,
|
|
72
|
+
fill: _("color-accent"),
|
|
73
|
+
stroke: _("color-base-100"),
|
|
74
|
+
strokeWidth: 1 / g,
|
|
75
|
+
style: { pointerEvents: "none" }
|
|
76
|
+
}), m("circle", {
|
|
77
|
+
className: "sxl-shape-handle-hit",
|
|
78
|
+
cx: e.x,
|
|
79
|
+
cy: e.y,
|
|
80
|
+
r: v,
|
|
81
|
+
fill: "transparent",
|
|
82
|
+
style: {
|
|
83
|
+
pointerEvents: "all",
|
|
84
|
+
cursor: "crosshair",
|
|
85
|
+
touchAction: "none"
|
|
86
|
+
},
|
|
87
|
+
onPointerDown: (t) => u(t, e.index),
|
|
88
|
+
onPointerMove: d,
|
|
89
|
+
onPointerUp: te,
|
|
90
|
+
onPointerCancel: ne,
|
|
91
|
+
onMouseDown: (e) => e.stopPropagation()
|
|
92
|
+
})]
|
|
93
|
+
}, e.index))
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
y.displayName = "ShapeHandles";
|
|
97
|
+
var b = (e, t) => e > 0 || t > 0, x = (e, t, n) => !e || e.getWidth() === t && e.getHeight() === n ? e : b(t, n) ? e.resize(t, n) : null, ie = (e) => {
|
|
98
|
+
let t = [];
|
|
99
|
+
return e.forEachConnection((e) => t.push(e)), t;
|
|
100
|
+
}, ae = c(s((s, c) => {
|
|
101
|
+
let { children: ae, disabled: S, style: oe, shape: C, movable: w, zoom: T = 1, isDragging: se, onHide: ce, onShow: le, onDragZone: ue, onTap: de, adornmentHost: E, flip: fe, gesture: D, debugGeometry: pe = !1, ...me } = s, O = t()?.getStyles() ?? null, [he, k] = te((e) => e + 1, 0);
|
|
102
|
+
e(C, { onAnyChange: k }), e(w ?? null, {
|
|
103
|
+
onBoundsChange: k,
|
|
104
|
+
onSelectionChange: k
|
|
105
|
+
});
|
|
106
|
+
let A = C.toJSON(), { width: j, height: M, rotation: ge, content: N } = i(w), P = C.getShapeType(), _e = C.getAdjustments(), F = b(j, M), [I, L] = p(null), R = f(0);
|
|
107
|
+
u(() => {
|
|
108
|
+
if (!F) return void L(null);
|
|
109
|
+
let e = ++R.current, t = C.getShapeType();
|
|
110
|
+
C.getGeometry(j, M).then((n) => {
|
|
111
|
+
R.current === e && L(n ? {
|
|
112
|
+
shapeType: t,
|
|
113
|
+
geometry: n
|
|
114
|
+
} : null);
|
|
115
|
+
}, () => {
|
|
116
|
+
R.current === e && L(null);
|
|
117
|
+
});
|
|
118
|
+
}, [
|
|
119
|
+
C,
|
|
120
|
+
j,
|
|
121
|
+
M,
|
|
122
|
+
he
|
|
123
|
+
]);
|
|
124
|
+
let z = N?.shapeType !== void 0 && N.shapeType !== P ? N.shapeType : null, [B, ve] = p(null);
|
|
125
|
+
u(() => {
|
|
126
|
+
if (!z || !F || B?.shapeType === z) return;
|
|
127
|
+
let e = !0;
|
|
128
|
+
return C.getGeometry(j, M, { shapeType: z }).then((t) => {
|
|
129
|
+
e && t && ve({
|
|
130
|
+
shapeType: z,
|
|
131
|
+
geometry: t
|
|
132
|
+
});
|
|
133
|
+
}, () => {}), () => {
|
|
134
|
+
e = !1;
|
|
135
|
+
};
|
|
136
|
+
}, [
|
|
137
|
+
C,
|
|
138
|
+
z,
|
|
139
|
+
F
|
|
140
|
+
]);
|
|
141
|
+
let V = d(() => {
|
|
142
|
+
let e = I?.shapeType === P ? I : B?.shapeType === P ? B : null;
|
|
143
|
+
return e ? x(e.geometry, j, M)?.withAdjustments(_e) ?? null : x(I?.geometry ?? null, j, M);
|
|
144
|
+
}, [
|
|
145
|
+
I,
|
|
146
|
+
B,
|
|
147
|
+
P,
|
|
148
|
+
_e,
|
|
149
|
+
j,
|
|
150
|
+
M
|
|
151
|
+
]), ye = l((e) => C.getResource(e), [C]);
|
|
152
|
+
u(() => {
|
|
153
|
+
let e = [];
|
|
154
|
+
for (let t = w?.getParent() ?? null; t; t = t.getParent()) e.push(t.getContent().addListeners({ onAnyChange: k }));
|
|
155
|
+
return () => {
|
|
156
|
+
for (let t of e) t();
|
|
157
|
+
};
|
|
158
|
+
}, [w]);
|
|
159
|
+
let be = a(w), H = d(() => o(A, O, ye, be), [
|
|
160
|
+
A,
|
|
161
|
+
O,
|
|
162
|
+
ye,
|
|
163
|
+
be
|
|
164
|
+
]), [xe, U] = p(null), W = N?.adjustments === void 0 ? xe ?? void 0 : N.adjustments, G = d(() => {
|
|
165
|
+
if (z && B?.shapeType !== z) return V;
|
|
166
|
+
let e = z ? x(B.geometry, j, M) : V;
|
|
167
|
+
return e && W !== void 0 ? e.withAdjustments(W) : e;
|
|
168
|
+
}, [
|
|
169
|
+
V,
|
|
170
|
+
z,
|
|
171
|
+
B,
|
|
172
|
+
j,
|
|
173
|
+
M,
|
|
174
|
+
W
|
|
175
|
+
]), K = f(null), [Se, q] = p(!1), Ce = l((e, t, n, r) => {
|
|
176
|
+
if (r === "cancel") return K.current && (K.current = null, q(!1), D?.cancel()), void U(null);
|
|
177
|
+
if (!G || !V) return;
|
|
178
|
+
let i = G.adjustmentsFromHandle(e, t, n);
|
|
179
|
+
if (r === "move") {
|
|
180
|
+
if (D && !S) {
|
|
181
|
+
if (!K.current) {
|
|
182
|
+
let e = { adjustments: i };
|
|
183
|
+
if (!D.start(ne("op.setShapeAdjustments"), (t) => {
|
|
184
|
+
t.getContent().setAdjustments(e.adjustments);
|
|
185
|
+
})) return;
|
|
186
|
+
K.current = e, q(!0);
|
|
187
|
+
}
|
|
188
|
+
K.current.adjustments = i, D.preview({ content: { adjustments: i } });
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
U(i);
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
let a = K.current;
|
|
195
|
+
if (a) return K.current = null, q(!1), a.adjustments = i, void D?.finish();
|
|
196
|
+
U(null), S || C.setAdjustments(i);
|
|
197
|
+
}, [
|
|
198
|
+
G,
|
|
199
|
+
V,
|
|
200
|
+
C,
|
|
201
|
+
S,
|
|
202
|
+
D
|
|
203
|
+
]), we = d(() => {
|
|
204
|
+
let e = [];
|
|
205
|
+
return G?.forEachHandle((t) => e.push(t)), e;
|
|
206
|
+
}, [G]), Te = v(c, () => ({ isShapeEditor: () => !0 }), []), Ee = fe ?? w?.getFlip(), J = Ee?.horizontal ?? !1, Y = Ee?.vertical ?? !1, De = ge % 360 != 0, Oe = d(() => !De && b(j, M) ? {
|
|
207
|
+
dpr: g.getDevicePixelRatio(),
|
|
208
|
+
zoom: T,
|
|
209
|
+
width: j,
|
|
210
|
+
height: M,
|
|
211
|
+
flipH: J,
|
|
212
|
+
flipV: Y
|
|
213
|
+
} : null, [
|
|
214
|
+
De,
|
|
215
|
+
T,
|
|
216
|
+
j,
|
|
217
|
+
M,
|
|
218
|
+
J,
|
|
219
|
+
Y
|
|
220
|
+
]);
|
|
221
|
+
if (C.isDeleted() || !A) return null;
|
|
222
|
+
let X = oe?.pointerEvents === "none", ke = X ? "none" : "visiblePainted", Ae = !X && !S && (!se || Se) && !!w?.isSelected(), je = {
|
|
223
|
+
transform: J || Y ? `scale(${J ? -1 : 1}, ${Y ? -1 : 1})` : void 0,
|
|
224
|
+
transformOrigin: "center"
|
|
225
|
+
}, Z = null;
|
|
226
|
+
Ae && we.length > 0 && (Z = m(y, {
|
|
227
|
+
handles: we,
|
|
228
|
+
width: j,
|
|
229
|
+
height: M,
|
|
230
|
+
zoom: T,
|
|
231
|
+
onDrag: Ce
|
|
232
|
+
}), E && (Z = re(m("div", {
|
|
233
|
+
className: "sxl-shape-adornment",
|
|
234
|
+
style: {
|
|
235
|
+
position: "absolute",
|
|
236
|
+
left: 0,
|
|
237
|
+
top: 0,
|
|
238
|
+
width: "100%",
|
|
239
|
+
height: "100%",
|
|
240
|
+
...je,
|
|
241
|
+
pointerEvents: "none"
|
|
242
|
+
},
|
|
243
|
+
children: Z
|
|
244
|
+
}), E)));
|
|
245
|
+
let Me = J === Y ? void 0 : "scaleX(-1)", Q = G?.getTextRect(), $ = A.text, Ne = !!$ && $.paragraphs.some((e) => e.runs.some((e) => e.text !== ""));
|
|
246
|
+
return h("div", {
|
|
247
|
+
className: "sxl-shape-editor",
|
|
248
|
+
...me,
|
|
249
|
+
ref: Te,
|
|
250
|
+
style: {
|
|
251
|
+
width: "100%",
|
|
252
|
+
height: "100%",
|
|
253
|
+
position: "relative",
|
|
254
|
+
overflow: "visible",
|
|
255
|
+
filter: S ? "blur(1px)" : void 0,
|
|
256
|
+
...je,
|
|
257
|
+
...oe,
|
|
258
|
+
pointerEvents: "none"
|
|
259
|
+
},
|
|
260
|
+
children: [
|
|
261
|
+
b(j, M) ? h("svg", {
|
|
262
|
+
className: "sxl-shape-geometry",
|
|
263
|
+
viewBox: `0 0 ${j > 0 ? j : 1 / T} ${M > 0 ? M : 1 / T}`,
|
|
264
|
+
width: j > 0 ? "100%" : "1px",
|
|
265
|
+
height: M > 0 ? "100%" : "1px",
|
|
266
|
+
preserveAspectRatio: "none",
|
|
267
|
+
overflow: "visible",
|
|
268
|
+
style: {
|
|
269
|
+
position: "absolute",
|
|
270
|
+
left: 0,
|
|
271
|
+
top: 0,
|
|
272
|
+
display: "block",
|
|
273
|
+
pointerEvents: "none",
|
|
274
|
+
filter: Ae ? `drop-shadow(1px 1px 2px ${_("color-shadow")})` : void 0
|
|
275
|
+
},
|
|
276
|
+
children: [G ? m(ee, {
|
|
277
|
+
geometry: G,
|
|
278
|
+
style: H,
|
|
279
|
+
zoom: T,
|
|
280
|
+
grid: Oe,
|
|
281
|
+
hit: ke
|
|
282
|
+
}) : null, pe && G && Q ? h("g", {
|
|
283
|
+
pointerEvents: "none",
|
|
284
|
+
children: [m("rect", {
|
|
285
|
+
x: Q.l,
|
|
286
|
+
y: Q.t,
|
|
287
|
+
width: Math.max(0, Q.r - Q.l),
|
|
288
|
+
height: Math.max(0, Q.b - Q.t),
|
|
289
|
+
fill: "none",
|
|
290
|
+
stroke: _("color-error"),
|
|
291
|
+
strokeWidth: 1 / T,
|
|
292
|
+
strokeDasharray: `${4 / T} ${2 / T}`
|
|
293
|
+
}), ie(G).map((e) => m("rect", {
|
|
294
|
+
x: e.x - 3 / T,
|
|
295
|
+
y: e.y - 3 / T,
|
|
296
|
+
width: 6 / T,
|
|
297
|
+
height: 6 / T,
|
|
298
|
+
fill: _("color-success")
|
|
299
|
+
}, e.index))]
|
|
300
|
+
}) : null]
|
|
301
|
+
}) : null,
|
|
302
|
+
Ne && Q ? m("div", {
|
|
303
|
+
className: "sxl-shape-text-frame",
|
|
304
|
+
style: {
|
|
305
|
+
position: "absolute",
|
|
306
|
+
left: Q.l,
|
|
307
|
+
top: Q.t,
|
|
308
|
+
width: Math.max(0, Q.r - Q.l),
|
|
309
|
+
height: Math.max(0, Q.b - Q.t),
|
|
310
|
+
zoom: T,
|
|
311
|
+
transform: Me,
|
|
312
|
+
transformOrigin: "center",
|
|
313
|
+
pointerEvents: X ? "none" : "auto",
|
|
314
|
+
color: H.textColor ?? void 0
|
|
315
|
+
},
|
|
316
|
+
children: m(n, {
|
|
317
|
+
movable: w,
|
|
318
|
+
disabled: !0,
|
|
319
|
+
style: {
|
|
320
|
+
fontFamily: "Calibri, Carlito, sans-serif",
|
|
321
|
+
fontSize: "11pt",
|
|
322
|
+
lineHeight: 1.2,
|
|
323
|
+
padding: 0
|
|
324
|
+
},
|
|
325
|
+
contentStyle: {
|
|
326
|
+
padding: 0,
|
|
327
|
+
overflow: "hidden"
|
|
328
|
+
},
|
|
329
|
+
children: m(r, {
|
|
330
|
+
text: $,
|
|
331
|
+
styles: O,
|
|
332
|
+
color: H.textColor
|
|
333
|
+
})
|
|
334
|
+
})
|
|
335
|
+
}) : null,
|
|
336
|
+
Z
|
|
337
|
+
]
|
|
338
|
+
});
|
|
339
|
+
}));
|
|
340
|
+
ae.displayName = "ShapeEditor";
|
|
341
|
+
export { ae as t };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v1.0.0
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: SheetXL EULA — https://www.sheetxl.com/eula
|
|
6
|
+
*/
|
|
7
|
+
import { t as e } from "./BkG6VuJDmu_hfIo6.mjs";
|
|
8
|
+
import { forwardRef as t, memo as n, useMemo as r, useRef as i } from "react";
|
|
9
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
10
|
+
var o = "data-run", s = (e) => typeof e == "string" ? e ? [{ text: e }] : [] : e.runs ?? [], c = (e) => {
|
|
11
|
+
if (e.nodeType === 3) return e.nodeValue ?? "";
|
|
12
|
+
if (e.nodeType !== 1) return "";
|
|
13
|
+
if (e.localName === "br") return "\n";
|
|
14
|
+
let t = "", n = e.childNodes;
|
|
15
|
+
for (let e = 0; e < n.length; e++) t += c(n[e]);
|
|
16
|
+
return t;
|
|
17
|
+
}, l = n(t((t, n) => {
|
|
18
|
+
let { value: l, onChange: u, onDone: d, readOnly: f = !1, runStyle: p, style: m, onKeyDown: h, onBlur: g, ..._ } = t, v = i(null), y = r(() => s(l), [l]), b = r(() => JSON.stringify(l), [l]), x = () => {
|
|
19
|
+
let e = v.current;
|
|
20
|
+
if (!e || f) return;
|
|
21
|
+
let t = ((e, t) => {
|
|
22
|
+
let n = [], r = e.childNodes;
|
|
23
|
+
for (let e = 0; e < r.length; e++) {
|
|
24
|
+
let i = r[e], a = c(i);
|
|
25
|
+
if (!a) continue;
|
|
26
|
+
let s = i.nodeType === 1 ? i.getAttribute(o) : null;
|
|
27
|
+
if (s !== null) {
|
|
28
|
+
let e = t[parseInt(s, 10)]?.font;
|
|
29
|
+
n.push(e ? {
|
|
30
|
+
text: a,
|
|
31
|
+
font: e
|
|
32
|
+
} : { text: a });
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
let l = n[n.length - 1];
|
|
36
|
+
l ? l.text += a : n.push({ text: a });
|
|
37
|
+
}
|
|
38
|
+
return n.every((e) => !e.font) ? n.map((e) => e.text).join("") : { runs: n };
|
|
39
|
+
})(e, y);
|
|
40
|
+
JSON.stringify(s(t)) !== JSON.stringify(y) && u?.(t);
|
|
41
|
+
}, S = (e) => {
|
|
42
|
+
e.stopPropagation();
|
|
43
|
+
}, C = e([v, n]);
|
|
44
|
+
return a("div", {
|
|
45
|
+
ref: C,
|
|
46
|
+
contentEditable: !f && "plaintext-only",
|
|
47
|
+
suppressContentEditableWarning: !0,
|
|
48
|
+
spellCheck: !1,
|
|
49
|
+
..._,
|
|
50
|
+
style: {
|
|
51
|
+
width: "100%",
|
|
52
|
+
minHeight: "100%",
|
|
53
|
+
boxSizing: "border-box",
|
|
54
|
+
outline: "none",
|
|
55
|
+
whiteSpace: "pre-wrap",
|
|
56
|
+
overflowWrap: "break-word",
|
|
57
|
+
userSelect: "text",
|
|
58
|
+
cursor: f ? void 0 : "text",
|
|
59
|
+
...m
|
|
60
|
+
},
|
|
61
|
+
onKeyDown: (e) => {
|
|
62
|
+
h?.(e), f || (e.stopPropagation(), e.key === "Escape" && (e.preventDefault(), e.currentTarget.blur(), d?.()));
|
|
63
|
+
},
|
|
64
|
+
onKeyUp: f ? void 0 : S,
|
|
65
|
+
onCopy: f ? void 0 : S,
|
|
66
|
+
onCut: f ? void 0 : S,
|
|
67
|
+
onPaste: f ? void 0 : S,
|
|
68
|
+
onBlur: (e) => {
|
|
69
|
+
x(), g?.(e);
|
|
70
|
+
},
|
|
71
|
+
children: y.map((e, t) => a("span", {
|
|
72
|
+
[o]: t,
|
|
73
|
+
style: e.font ? p?.(e.font) : void 0,
|
|
74
|
+
children: e.text
|
|
75
|
+
}, t))
|
|
76
|
+
}, b);
|
|
77
|
+
}));
|
|
78
|
+
l.displayName = "RichTextEditor";
|
|
79
|
+
export { l as t };
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v1.0.0
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: SheetXL EULA — https://www.sheetxl.com/eula
|
|
6
|
+
*/
|
|
7
|
+
import { t as e } from "./BkG6VuJDmu_hfIo6.mjs";
|
|
8
|
+
import { createContext as t, forwardRef as n, memo as r, useCallback as i, useContext as a, useEffect as o, useLayoutEffect as s, useRef as c, useState as l } from "react";
|
|
9
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
10
|
+
import { CommonUtils as f, defineLazyModule as p } from "@sheetxl/utils";
|
|
11
|
+
import { useImperativeElement as ee, useMeasure as m, usePendingRender as te, usePersistentState as h, useResolvedThemeMode as g } from "@sheetxl/utils-react";
|
|
12
|
+
var _ = {
|
|
13
|
+
Mode: "themeMode",
|
|
14
|
+
DarkGrid: "enableDarkGrid",
|
|
15
|
+
DarkImages: "enableDarkImages"
|
|
16
|
+
}, v = {
|
|
17
|
+
[_.Mode]: null,
|
|
18
|
+
[_.DarkGrid]: !1,
|
|
19
|
+
[_.DarkImages]: !1
|
|
20
|
+
}, y = t(null);
|
|
21
|
+
y.displayName = "GridColorSchemeContext";
|
|
22
|
+
var b = (e) => {
|
|
23
|
+
let t = a(y), [n] = h(_.Mode, v[_.Mode]), [r] = h(_.DarkGrid, v[_.DarkGrid]), { themeMode: i } = g({ mode: e ?? n ?? void 0 });
|
|
24
|
+
return e ? e === "auto" ? i : e : t || (i === "dark" && r ? "dark" : "light");
|
|
25
|
+
}, x = (e) => {
|
|
26
|
+
let [t] = h(_.Mode, v[_.Mode]), { themeMode: n } = g({ mode: e ?? t ?? void 0 });
|
|
27
|
+
return n;
|
|
28
|
+
}, S = p("chart:paint", () => import("./DfIvpHB7HDdmIYNm.mjs")), C = (e, t) => {
|
|
29
|
+
let n = e.getElementType();
|
|
30
|
+
if (n === "point") {
|
|
31
|
+
let n = e.getParent();
|
|
32
|
+
return t === n || t?.getElementType() === "point" && t.getParent() === n ? e : n;
|
|
33
|
+
}
|
|
34
|
+
if (n === "legendEntry") {
|
|
35
|
+
let n = e.getParent();
|
|
36
|
+
return t === n || t?.getElementType() === "legendEntry" ? e : n;
|
|
37
|
+
}
|
|
38
|
+
if (n === "dataLabel") {
|
|
39
|
+
let n = e.getParent()?.getParent(), r = n?.getDataLabels();
|
|
40
|
+
return r ? t === r || t?.getElementType() === "dataLabel" && t.getParent()?.getParent() === n ? e : r : e;
|
|
41
|
+
}
|
|
42
|
+
return e;
|
|
43
|
+
}, w = {
|
|
44
|
+
boxes: [],
|
|
45
|
+
handles: []
|
|
46
|
+
}, T = r(n((t, n) => {
|
|
47
|
+
let { children: r, style: a, chart: p, onChartChange: h, zoom: g = 1, width: _, height: v, selection: y = null, colorScheme: b, onElementPress: T, onPointerDown: E, ...ne } = t, [D, O] = l(() => f.isPromiseLike(p) ? null : p), [k, re] = l(null), A = c(h);
|
|
48
|
+
A.current = h;
|
|
49
|
+
let j = c(null);
|
|
50
|
+
o(() => {
|
|
51
|
+
let e = !0, t = (e, t) => {
|
|
52
|
+
re(t), O(e), j.current !== e && (j.current = e, A.current?.(e));
|
|
53
|
+
};
|
|
54
|
+
if (f.isPromiseLike(p)) return p.then((n) => {
|
|
55
|
+
e && t(n, null);
|
|
56
|
+
}, (n) => {
|
|
57
|
+
e && t(null, n);
|
|
58
|
+
}), () => {
|
|
59
|
+
e = !1;
|
|
60
|
+
};
|
|
61
|
+
t(p, null);
|
|
62
|
+
}, [p]);
|
|
63
|
+
let [ie, M] = m(), N = typeof _ == "number" ? _ : M.width, P = typeof v == "number" ? v : M.height, F = N ? Math.round(N / g) : 0, I = P ? Math.round(P / g) : 0, L = c({
|
|
64
|
+
width: F,
|
|
65
|
+
height: I
|
|
66
|
+
});
|
|
67
|
+
L.current = {
|
|
68
|
+
width: F,
|
|
69
|
+
height: I
|
|
70
|
+
};
|
|
71
|
+
let ae = x(), R = (b ?? ae) === "dark", z = i(async (e) => {
|
|
72
|
+
let t = L.current;
|
|
73
|
+
if (!D || !t.width || !t.height) return null;
|
|
74
|
+
let n = D.getLayout(t);
|
|
75
|
+
return n ? (await S.load()).renderChartToSVG(n, { darkMode: e?.darkMode ?? !1 }) : null;
|
|
76
|
+
}, [D]), B = c(null), V = c(null), H = c(g);
|
|
77
|
+
H.current = g;
|
|
78
|
+
let U = i((e, t) => {
|
|
79
|
+
let n = B.current;
|
|
80
|
+
if (!n) return null;
|
|
81
|
+
let r = n.getBoundingClientRect(), i = H.current || 1;
|
|
82
|
+
return {
|
|
83
|
+
x: (e - r.left) / i,
|
|
84
|
+
y: (t - r.top) / i
|
|
85
|
+
};
|
|
86
|
+
}, []), W = i((e, t) => {
|
|
87
|
+
let n = V.current, r = U(e, t);
|
|
88
|
+
return D && n && r ? D.getElementAt(r, n) : null;
|
|
89
|
+
}, [D, U]), oe = ee(n, () => ({
|
|
90
|
+
isChartElement: () => !0,
|
|
91
|
+
getChart: () => D,
|
|
92
|
+
toSVG: z,
|
|
93
|
+
getElementAt: W
|
|
94
|
+
}), [
|
|
95
|
+
D,
|
|
96
|
+
z,
|
|
97
|
+
W
|
|
98
|
+
]), G = e([
|
|
99
|
+
oe,
|
|
100
|
+
ie,
|
|
101
|
+
B
|
|
102
|
+
]), K = c(null), q = c(null), [J, se] = l(() => S.peek() ?? null), [Y, X] = l(null), [ce, le] = l(0), [Z, ue] = l(w);
|
|
103
|
+
o(() => D?.addListeners({ onLayoutChange: () => le((e) => e + 1) }), [D]), te(!(Y || k || J && D)), o(() => {
|
|
104
|
+
if (J) return;
|
|
105
|
+
let e = !0;
|
|
106
|
+
return S.load().then((t) => {
|
|
107
|
+
e && se(t);
|
|
108
|
+
}, (t) => {
|
|
109
|
+
e && X(t);
|
|
110
|
+
}), () => {
|
|
111
|
+
e = !1;
|
|
112
|
+
};
|
|
113
|
+
}, [J]);
|
|
114
|
+
let Q = i(() => {
|
|
115
|
+
let e = V.current;
|
|
116
|
+
ue(D && e && y && !y.isEmpty() ? ((e, t, n) => {
|
|
117
|
+
let r = [], i = [];
|
|
118
|
+
for (let a of n.getItems()) {
|
|
119
|
+
if (a.getChart() !== e) continue;
|
|
120
|
+
let o = a.getElementType();
|
|
121
|
+
if (o === "series" || o === "dataLabels") {
|
|
122
|
+
let n = o === "series" ? a : a.getParent(), i = o === "series" ? n.getPoints() : n.getPoints().map((e) => e.getDataLabel());
|
|
123
|
+
for (let n of i) {
|
|
124
|
+
let i = e.getElementBounds(n, t);
|
|
125
|
+
i && r.push(i);
|
|
126
|
+
}
|
|
127
|
+
if (r.length > 0) continue;
|
|
128
|
+
}
|
|
129
|
+
let s = e.getElementBounds(a, t);
|
|
130
|
+
if (s && (r.push(s), n.getItems().length === 1)) {
|
|
131
|
+
let e = [
|
|
132
|
+
s.x,
|
|
133
|
+
s.x + s.width / 2,
|
|
134
|
+
s.x + s.width
|
|
135
|
+
], t = [
|
|
136
|
+
s.y,
|
|
137
|
+
s.y + s.height / 2,
|
|
138
|
+
s.y + s.height
|
|
139
|
+
];
|
|
140
|
+
for (let n of e) for (let r of t) n === e[1] && r === t[1] || i.push({
|
|
141
|
+
x: n,
|
|
142
|
+
y: r
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
boxes: r,
|
|
148
|
+
handles: i
|
|
149
|
+
};
|
|
150
|
+
})(D, e, y) : w);
|
|
151
|
+
}, [D, y]);
|
|
152
|
+
o(() => y?.addListeners({ onChange: Q }), [y, Q]), s(() => {
|
|
153
|
+
let e = K.current;
|
|
154
|
+
if (!(J && e && D && F && I)) return;
|
|
155
|
+
let t = D.getLayout({
|
|
156
|
+
width: F,
|
|
157
|
+
height: I
|
|
158
|
+
});
|
|
159
|
+
if (V.current = t, !t) return q.current?.dispose(), q.current = null, e.style.backgroundColor = "", void Q();
|
|
160
|
+
let n = t.chartArea.fill === void 0;
|
|
161
|
+
e.style.backgroundColor = n ? `var(--sxl-color-base-100, ${R ? "#121212" : "#FFFFFF"})` : "", e.style.borderRadius = n ? `${t.chartArea.cornerRadius}px` : "";
|
|
162
|
+
let r = {
|
|
163
|
+
darkMode: R,
|
|
164
|
+
background: "transparent"
|
|
165
|
+
};
|
|
166
|
+
q.current ? q.current.update(t, r) : q.current = J.mountChart(e, t, r), Q();
|
|
167
|
+
}, [
|
|
168
|
+
J,
|
|
169
|
+
D,
|
|
170
|
+
F,
|
|
171
|
+
I,
|
|
172
|
+
ce,
|
|
173
|
+
R,
|
|
174
|
+
Q
|
|
175
|
+
]), o(() => () => {
|
|
176
|
+
q.current?.dispose(), q.current = null, V.current = null;
|
|
177
|
+
}, [D]);
|
|
178
|
+
let de = i((e) => {
|
|
179
|
+
if (E?.(e), e.button !== 0 && e.button !== 2) return;
|
|
180
|
+
let t = V.current, n = U(e.clientX, e.clientY);
|
|
181
|
+
if (!D || !t || !n) return;
|
|
182
|
+
let r = D.getElementAt(n, t);
|
|
183
|
+
if (T?.({
|
|
184
|
+
element: r,
|
|
185
|
+
point: n,
|
|
186
|
+
event: e
|
|
187
|
+
}), !y) return;
|
|
188
|
+
if (!r || r.getElementType() === "chartArea") return void y.clear();
|
|
189
|
+
let i = C(r, y.getActive());
|
|
190
|
+
y.isSelected(i) && y.getItems().length === 1 || y.select([i]);
|
|
191
|
+
}, [
|
|
192
|
+
D,
|
|
193
|
+
y,
|
|
194
|
+
T,
|
|
195
|
+
E,
|
|
196
|
+
U
|
|
197
|
+
]);
|
|
198
|
+
if (D?.isDeleted()) return;
|
|
199
|
+
let $ = Y ?? k;
|
|
200
|
+
return d("div", {
|
|
201
|
+
...ne,
|
|
202
|
+
onPointerDown: de,
|
|
203
|
+
style: {
|
|
204
|
+
..._ === void 0 ? {} : { width: _ },
|
|
205
|
+
...v === void 0 ? {} : { height: v },
|
|
206
|
+
...a,
|
|
207
|
+
overflow: "hidden"
|
|
208
|
+
},
|
|
209
|
+
ref: G,
|
|
210
|
+
children: [
|
|
211
|
+
$ ? u("div", {
|
|
212
|
+
className: "sxl-chart-element-error",
|
|
213
|
+
style: {
|
|
214
|
+
padding: "8px",
|
|
215
|
+
fontSize: "12px",
|
|
216
|
+
color: "var(--sxl-color-error, #b00020)"
|
|
217
|
+
},
|
|
218
|
+
children: $.message
|
|
219
|
+
}) : null,
|
|
220
|
+
u("div", {
|
|
221
|
+
className: "sxl-chart-element",
|
|
222
|
+
ref: K,
|
|
223
|
+
style: {
|
|
224
|
+
width: F || "100%",
|
|
225
|
+
height: I || "100%",
|
|
226
|
+
zoom: g,
|
|
227
|
+
position: "relative"
|
|
228
|
+
}
|
|
229
|
+
}),
|
|
230
|
+
Z.boxes.length > 0 ? d("div", {
|
|
231
|
+
className: "sxl-chart-element-selection",
|
|
232
|
+
style: {
|
|
233
|
+
position: "absolute",
|
|
234
|
+
left: 0,
|
|
235
|
+
top: 0,
|
|
236
|
+
width: F,
|
|
237
|
+
height: I,
|
|
238
|
+
zoom: g,
|
|
239
|
+
pointerEvents: "none"
|
|
240
|
+
},
|
|
241
|
+
children: [Z.boxes.map((e, t) => u("div", { style: {
|
|
242
|
+
position: "absolute",
|
|
243
|
+
left: e.x - 1,
|
|
244
|
+
top: e.y - 1,
|
|
245
|
+
width: Math.max(0, e.width),
|
|
246
|
+
height: Math.max(0, e.height),
|
|
247
|
+
border: "1px solid var(--sxl-color-primary, #1a73e8)",
|
|
248
|
+
boxSizing: "content-box"
|
|
249
|
+
} }, `box-${t}`)), Z.handles.map((e, t) => u("div", { style: {
|
|
250
|
+
position: "absolute",
|
|
251
|
+
left: e.x - 3,
|
|
252
|
+
top: e.y - 3,
|
|
253
|
+
width: 6,
|
|
254
|
+
height: 6,
|
|
255
|
+
background: "var(--sxl-color-base-100, #fff)",
|
|
256
|
+
border: "1px solid var(--sxl-color-primary, #1a73e8)",
|
|
257
|
+
boxSizing: "border-box"
|
|
258
|
+
} }, `handle-${t}`))]
|
|
259
|
+
}) : null
|
|
260
|
+
]
|
|
261
|
+
});
|
|
262
|
+
}));
|
|
263
|
+
T.displayName = "ChartElement";
|
|
264
|
+
export { y as a, b as i, C as n, v as o, x as r, _ as s, T as t };
|