@sheetxl/react 0.7.22 → 0.7.23-beta.2
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/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +1 -0
- package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +156 -0
- package/browser/cjs/index.cjs +24 -24
- package/browser/esm/B5ln1NAKVNy0DKUy.mjs +6286 -0
- package/browser/esm/index.mjs +19258 -4911
- package/licenses/dependencies.txt +42 -214
- package/node/esm/h7d3ckrxRK_JlmsZ.mjs +9 -0
- package/node/esm/index.mjs +17035 -3691
- package/package.json +10 -11
- package/resources/contents.json +60 -0
- package/resources/locales/contents.json +114 -0
- package/resources/locales/de/clipboard.cmd.json +36 -0
- package/resources/locales/de/editor.cmd.json +128 -0
- package/resources/locales/de/movable.cmd.json +123 -0
- package/resources/locales/de/selection.cmd.json +373 -0
- package/resources/locales/de/sheet.cmd.json +1563 -0
- package/resources/locales/de/table.cmd.json +83 -0
- package/resources/locales/de/ui.msg.json +166 -0
- package/resources/locales/de/workbook.cmd.json +282 -0
- package/resources/locales/en/clipboard.cmd.json +36 -0
- package/resources/locales/en/editor.cmd.json +128 -0
- package/resources/locales/en/movable.cmd.json +123 -0
- package/resources/locales/en/selection.cmd.json +373 -0
- package/resources/locales/en/sheet.cmd.json +1563 -0
- package/resources/locales/en/table.cmd.json +83 -0
- package/resources/locales/en/ui.msg.json +166 -0
- package/resources/locales/en/workbook.cmd.json +282 -0
- package/types/index.d.ts +2 -1767
- package/types/src/border/StaticBorderRenderer.d.ts +32 -0
- package/types/src/border/StaticBorderRenderer.d.ts.map +1 -0
- package/types/src/border/StyledStrokePath.d.ts +14 -0
- package/types/src/border/StyledStrokePath.d.ts.map +1 -0
- package/types/src/border/index.d.ts +4 -0
- package/types/src/border/index.d.ts.map +1 -0
- package/types/src/border/useBorders.d.ts +87 -0
- package/types/src/border/useBorders.d.ts.map +1 -0
- package/types/src/cell/ColumnButton.d.ts +45 -0
- package/types/src/cell/ColumnButton.d.ts.map +1 -0
- package/types/src/cell/CornerTriangle.d.ts +27 -0
- package/types/src/cell/CornerTriangle.d.ts.map +1 -0
- package/types/src/cell/FormulaCellRenderer.d.ts +34 -0
- package/types/src/cell/FormulaCellRenderer.d.ts.map +1 -0
- package/types/src/cell/SheetCellRenderer.d.ts +52 -0
- package/types/src/cell/SheetCellRenderer.d.ts.map +1 -0
- package/types/src/cell/SheetHeaderRenderer.d.ts +37 -0
- package/types/src/cell/SheetHeaderRenderer.d.ts.map +1 -0
- package/types/src/cell/index.d.ts +7 -0
- package/types/src/cell/index.d.ts.map +1 -0
- package/types/src/cell/useFormulaViewAnchor.d.ts +42 -0
- package/types/src/cell/useFormulaViewAnchor.d.ts.map +1 -0
- package/types/src/chart/ChartEditor.d.ts +17 -0
- package/types/src/chart/ChartEditor.d.ts.map +1 -0
- package/types/src/chart/PresetChartTypeDescriptors.d.ts +35 -0
- package/types/src/chart/PresetChartTypeDescriptors.d.ts.map +1 -0
- package/types/src/chart/index.d.ts +3 -0
- package/types/src/chart/index.d.ts.map +1 -0
- package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +10 -0
- package/types/src/chart/templates/area-stacked-template.json.d.ts +10 -0
- package/types/src/chart/templates/area-template.json.d.ts +9 -0
- package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +10 -0
- package/types/src/chart/templates/bar-stacked-template.json.d.ts +10 -0
- package/types/src/chart/templates/bar-template.json.d.ts +9 -0
- package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +10 -0
- package/types/src/chart/templates/column-stacked-template.json.d.ts +10 -0
- package/types/src/chart/templates/column-template.json.d.ts +9 -0
- package/types/src/chart/templates/line-markers-template.json.d.ts +10 -0
- package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +11 -0
- package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +11 -0
- package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +10 -0
- package/types/src/chart/templates/line-stacked-template.json.d.ts +10 -0
- package/types/src/chart/templates/line-template.json.d.ts +9 -0
- package/types/src/chart/templates/pie-doughnut-template.json.d.ts +10 -0
- package/types/src/chart/templates/pie-template.json.d.ts +9 -0
- package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +10 -0
- package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +10 -0
- package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +10 -0
- package/types/src/chart/templates/scatter-lines-template.json.d.ts +10 -0
- package/types/src/chart/templates/scatter-markers-template.json.d.ts +10 -0
- package/types/src/clipboard/ClipboardCommands.d.ts +68 -0
- package/types/src/clipboard/ClipboardCommands.d.ts.map +1 -0
- package/types/src/clipboard/SheetClipboardLayer.d.ts +22 -0
- package/types/src/clipboard/SheetClipboardLayer.d.ts.map +1 -0
- package/types/src/clipboard/index.d.ts +3 -0
- package/types/src/clipboard/index.d.ts.map +1 -0
- package/types/src/commands/Catalog.d.ts +8 -0
- package/types/src/commands/Catalog.d.ts.map +1 -0
- package/types/src/commands/CommandRootProvider.d.ts +36 -0
- package/types/src/commands/CommandRootProvider.d.ts.map +1 -0
- package/types/src/commands/InputClipboardCommands.d.ts +41 -0
- package/types/src/commands/InputClipboardCommands.d.ts.map +1 -0
- package/types/src/commands/InputClipboardInjector.d.ts +16 -0
- package/types/src/commands/InputClipboardInjector.d.ts.map +1 -0
- package/types/src/commands/MainFocusContext.d.ts +13 -0
- package/types/src/commands/MainFocusContext.d.ts.map +1 -0
- package/types/src/commands/PaneScopeProvider.d.ts +40 -0
- package/types/src/commands/PaneScopeProvider.d.ts.map +1 -0
- package/types/src/commands/createTransactionalMiddleware.d.ts +49 -0
- package/types/src/commands/createTransactionalMiddleware.d.ts.map +1 -0
- package/types/src/commands/index.d.ts +7 -0
- package/types/src/commands/index.d.ts.map +1 -0
- package/types/src/context/SheetContext.d.ts +18 -0
- package/types/src/context/SheetContext.d.ts.map +1 -0
- package/types/src/context/WorkbookContext.d.ts +20 -0
- package/types/src/context/WorkbookContext.d.ts.map +1 -0
- package/types/src/context/index.d.ts +3 -0
- package/types/src/context/index.d.ts.map +1 -0
- package/types/src/editableLabel/EditableLabel.d.ts +28 -0
- package/types/src/editableLabel/EditableLabel.d.ts.map +1 -0
- package/types/src/editableLabel/index.d.ts +2 -0
- package/types/src/editableLabel/index.d.ts.map +1 -0
- package/types/src/editor/EditorCommands.d.ts +98 -0
- package/types/src/editor/EditorCommands.d.ts.map +1 -0
- package/types/src/editor/FunctionPreviewPanel.d.ts +166 -0
- package/types/src/editor/FunctionPreviewPanel.d.ts.map +1 -0
- package/types/src/editor/NamedHintPanel.d.ts +38 -0
- package/types/src/editor/NamedHintPanel.d.ts.map +1 -0
- package/types/src/editor/NamedItemsPanel.d.ts +59 -0
- package/types/src/editor/NamedItemsPanel.d.ts.map +1 -0
- package/types/src/editor/SheetCellEditorLayer.d.ts +40 -0
- package/types/src/editor/SheetCellEditorLayer.d.ts.map +1 -0
- package/types/src/editor/SheetCellInput.d.ts +99 -0
- package/types/src/editor/SheetCellInput.d.ts.map +1 -0
- package/types/src/editor/SheetEditable.d.ts +53 -0
- package/types/src/editor/SheetEditable.d.ts.map +1 -0
- package/types/src/editor/SheetReferenceHeaderLayer.d.ts +46 -0
- package/types/src/editor/SheetReferenceHeaderLayer.d.ts.map +1 -0
- package/types/src/editor/SheetReferenceLayer.d.ts +55 -0
- package/types/src/editor/SheetReferenceLayer.d.ts.map +1 -0
- package/types/src/editor/formulaCaret.d.ts +84 -0
- package/types/src/editor/formulaCaret.d.ts.map +1 -0
- package/types/src/editor/formulaEval.d.ts +202 -0
- package/types/src/editor/formulaEval.d.ts.map +1 -0
- package/types/src/editor/formulaPresentation.d.ts +136 -0
- package/types/src/editor/formulaPresentation.d.ts.map +1 -0
- package/types/src/editor/formulaText.d.ts +80 -0
- package/types/src/editor/formulaText.d.ts.map +1 -0
- package/types/src/editor/functionArgs.d.ts +111 -0
- package/types/src/editor/functionArgs.d.ts.map +1 -0
- package/types/src/editor/functionHint.d.ts +37 -0
- package/types/src/editor/functionHint.d.ts.map +1 -0
- package/types/src/editor/index.d.ts +18 -0
- package/types/src/editor/index.d.ts.map +1 -0
- package/types/src/editor/referencePointNav.d.ts +39 -0
- package/types/src/editor/referencePointNav.d.ts.map +1 -0
- package/types/src/editor/useFormulaHints.d.ts +126 -0
- package/types/src/editor/useFormulaHints.d.ts.map +1 -0
- package/types/src/editor/useFormulaInput.d.ts +326 -0
- package/types/src/editor/useFormulaInput.d.ts.map +1 -0
- package/types/src/editor/useProtectedEditNotice.d.ts +14 -0
- package/types/src/editor/useProtectedEditNotice.d.ts.map +1 -0
- package/types/src/editor/useReferenceMode.d.ts +177 -0
- package/types/src/editor/useReferenceMode.d.ts.map +1 -0
- package/types/src/form/FormulaInput.d.ts +86 -0
- package/types/src/form/FormulaInput.d.ts.map +1 -0
- package/types/src/form/FormulaInputParts.d.ts +94 -0
- package/types/src/form/FormulaInputParts.d.ts.map +1 -0
- package/types/src/form/index.d.ts +5 -0
- package/types/src/form/index.d.ts.map +1 -0
- package/types/src/form/useEditCommit.d.ts +174 -0
- package/types/src/form/useEditCommit.d.ts.map +1 -0
- package/types/src/form/useInputField.d.ts +86 -0
- package/types/src/form/useInputField.d.ts.map +1 -0
- package/types/src/frame/CommandContext.d.ts +179 -0
- package/types/src/frame/CommandContext.d.ts.map +1 -0
- package/types/src/frame/IFrame.d.ts +17 -0
- package/types/src/frame/IFrame.d.ts.map +1 -0
- package/types/src/frame/index.d.ts +3 -0
- package/types/src/frame/index.d.ts.map +1 -0
- package/types/src/icons/LogoNoPaddingIcon.d.ts +3 -0
- package/types/src/icons/LogoNoPaddingIcon.d.ts.map +1 -0
- package/types/src/icons/LogoTextNoPaddingIcon.d.ts +4 -0
- package/types/src/icons/LogoTextNoPaddingIcon.d.ts.map +1 -0
- package/types/src/icons/WaterMark.d.ts +12 -0
- package/types/src/icons/WaterMark.d.ts.map +1 -0
- package/types/src/icons/chart/ChartAreaIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartAreaIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartAreaStackedIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartAreaStackedIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartAreaStackedPercentIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartAreaStackedPercentIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartBarIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartBarIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartBarStackedIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartBarStackedIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartBarStackedPercentIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartBarStackedPercentIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartBubble3DIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartBubble3DIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartBubbleIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartBubbleIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartColumnIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartColumnIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartColumnStackedIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartColumnStackedIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartColumnStackedPercentIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartColumnStackedPercentIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartLineIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartLineIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartLineMarkersIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartLineMarkersIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartLineStackedIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartLineStackedIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartLineStackedMarkersIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartLineStackedMarkersIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartLineStackedPercentIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartLineStackedPercentIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartLineStackedPercentMarkersIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartLineStackedPercentMarkersIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartPieDoughnutIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartPieDoughnutIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartPieIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartPieIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartScatterLinesIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartScatterLinesIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartScatterLinesMarkersIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartScatterLinesMarkersIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartScatterLinesMarkersSmoothIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartScatterLinesMarkersSmoothIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartScatterLinesSmoothIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartScatterLinesSmoothIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartScatterMarkersIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartScatterMarkersIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ChartWaterfallIcon.d.ts +5 -0
- package/types/src/icons/chart/ChartWaterfallIcon.d.ts.map +1 -0
- package/types/src/icons/chart/ThemedChartIcon.d.ts +20 -0
- package/types/src/icons/chart/ThemedChartIcon.d.ts.map +1 -0
- package/types/src/icons/chart/index.d.ts +50 -0
- package/types/src/icons/chart/index.d.ts.map +1 -0
- package/types/src/icons/index.d.ts +4 -0
- package/types/src/icons/index.d.ts.map +1 -0
- package/types/src/index.d.ts +27 -0
- package/types/src/index.d.ts.map +1 -0
- package/types/src/io/WorkbookIO.d.ts +50 -0
- package/types/src/io/WorkbookIO.d.ts.map +1 -0
- package/types/src/io/index.d.ts +2 -0
- package/types/src/io/index.d.ts.map +1 -0
- package/types/src/layer/BorderLayer.d.ts +14 -0
- package/types/src/layer/BorderLayer.d.ts.map +1 -0
- package/types/src/layer/CellErrorLayer.d.ts +49 -0
- package/types/src/layer/CellErrorLayer.d.ts.map +1 -0
- package/types/src/layer/CellFillLayer.d.ts +15 -0
- package/types/src/layer/CellFillLayer.d.ts.map +1 -0
- package/types/src/layer/ConditionalBarLayer.d.ts +41 -0
- package/types/src/layer/ConditionalBarLayer.d.ts.map +1 -0
- package/types/src/layer/ConditionalIcons.d.ts +34 -0
- package/types/src/layer/ConditionalIcons.d.ts.map +1 -0
- package/types/src/layer/ConditionalIconsLayer.d.ts +31 -0
- package/types/src/layer/ConditionalIconsLayer.d.ts.map +1 -0
- package/types/src/layer/ContextMenuLayer.d.ts +27 -0
- package/types/src/layer/ContextMenuLayer.d.ts.map +1 -0
- package/types/src/layer/HeaderResizerLayer.d.ts +28 -0
- package/types/src/layer/HeaderResizerLayer.d.ts.map +1 -0
- package/types/src/layer/HeaderSelectionLayer.d.ts +89 -0
- package/types/src/layer/HeaderSelectionLayer.d.ts.map +1 -0
- package/types/src/layer/ResizeIndicator.d.ts +19 -0
- package/types/src/layer/ResizeIndicator.d.ts.map +1 -0
- package/types/src/layer/SheetBackgroundLayer.d.ts +22 -0
- package/types/src/layer/SheetBackgroundLayer.d.ts.map +1 -0
- package/types/src/layer/SheetCellLayer.d.ts +49 -0
- package/types/src/layer/SheetCellLayer.d.ts.map +1 -0
- package/types/src/layer/SheetColumnButtonLayer.d.ts +23 -0
- package/types/src/layer/SheetColumnButtonLayer.d.ts.map +1 -0
- package/types/src/layer/SheetGridLineLayer.d.ts +22 -0
- package/types/src/layer/SheetGridLineLayer.d.ts.map +1 -0
- package/types/src/layer/SheetHeaderCellLayer.d.ts +30 -0
- package/types/src/layer/SheetHeaderCellLayer.d.ts.map +1 -0
- package/types/src/layer/SheetMovableLayer.d.ts +26 -0
- package/types/src/layer/SheetMovableLayer.d.ts.map +1 -0
- package/types/src/layer/SheetTableCommandLayer.d.ts +16 -0
- package/types/src/layer/SheetTableCommandLayer.d.ts.map +1 -0
- package/types/src/layer/SpillLayer.d.ts +22 -0
- package/types/src/layer/SpillLayer.d.ts.map +1 -0
- package/types/src/layer/TableLayer.d.ts +22 -0
- package/types/src/layer/TableLayer.d.ts.map +1 -0
- package/types/src/layer/ValidationIndicatorLayer.d.ts +41 -0
- package/types/src/layer/ValidationIndicatorLayer.d.ts.map +1 -0
- package/types/src/layer/index.d.ts +25 -0
- package/types/src/layer/index.d.ts.map +1 -0
- package/types/src/layer/resizeIndicatorState.d.ts +26 -0
- package/types/src/layer/resizeIndicatorState.d.ts.map +1 -0
- package/types/src/layer/useSheetFeatureRegions.d.ts +21 -0
- package/types/src/layer/useSheetFeatureRegions.d.ts.map +1 -0
- package/types/src/layer/useSheetVisibleCells.d.ts +60 -0
- package/types/src/layer/useSheetVisibleCells.d.ts.map +1 -0
- package/types/src/layer/useSheetVisibleDecorations.d.ts +42 -0
- package/types/src/layer/useSheetVisibleDecorations.d.ts.map +1 -0
- package/types/src/layer/useTableHeaderCells.d.ts +22 -0
- package/types/src/layer/useTableHeaderCells.d.ts.map +1 -0
- package/types/src/layer/useVisibleTables.d.ts +27 -0
- package/types/src/layer/useVisibleTables.d.ts.map +1 -0
- package/types/src/listener/index.d.ts +3 -0
- package/types/src/listener/index.d.ts.map +1 -0
- package/types/src/listener/useModelListener.d.ts +67 -0
- package/types/src/listener/useModelListener.d.ts.map +1 -0
- package/types/src/listener/useRangeListener.d.ts +15 -0
- package/types/src/listener/useRangeListener.d.ts.map +1 -0
- package/types/src/movable/EmptyFrame.d.ts +16 -0
- package/types/src/movable/EmptyFrame.d.ts.map +1 -0
- package/types/src/movable/IMovableArea.d.ts +34 -0
- package/types/src/movable/IMovableArea.d.ts.map +1 -0
- package/types/src/movable/MovableCommands.d.ts +22 -0
- package/types/src/movable/MovableCommands.d.ts.map +1 -0
- package/types/src/movable/MovableFrame.d.ts +48 -0
- package/types/src/movable/MovableFrame.d.ts.map +1 -0
- package/types/src/movable/MovableLayer.d.ts +77 -0
- package/types/src/movable/MovableLayer.d.ts.map +1 -0
- package/types/src/movable/MoveableBundle.d.ts +4 -0
- package/types/src/movable/MoveableBundle.d.ts.map +1 -0
- package/types/src/movable/index.d.ts +4 -0
- package/types/src/movable/index.d.ts.map +1 -0
- package/types/src/picture/IPictureEditor.d.ts +39 -0
- package/types/src/picture/IPictureEditor.d.ts.map +1 -0
- package/types/src/picture/PictureEditor.d.ts +4 -0
- package/types/src/picture/PictureEditor.d.ts.map +1 -0
- package/types/src/picture/index.d.ts +3 -0
- package/types/src/picture/index.d.ts.map +1 -0
- package/types/src/selection/SelectionCommands.d.ts +23 -0
- package/types/src/selection/SelectionCommands.d.ts.map +1 -0
- package/types/src/selection/SheetSelection.d.ts +53 -0
- package/types/src/selection/SheetSelection.d.ts.map +1 -0
- package/types/src/selection/SheetSelectionLayer.d.ts +30 -0
- package/types/src/selection/SheetSelectionLayer.d.ts.map +1 -0
- package/types/src/selection/index.d.ts +4 -0
- package/types/src/selection/index.d.ts.map +1 -0
- package/types/src/shape/ShapeEditor.d.ts +16 -0
- package/types/src/shape/ShapeEditor.d.ts.map +1 -0
- package/types/src/shape/index.d.ts +2 -0
- package/types/src/shape/index.d.ts.map +1 -0
- package/types/src/sheet/ConditionalFormatPresets.d.ts +56 -0
- package/types/src/sheet/ConditionalFormatPresets.d.ts.map +1 -0
- package/types/src/sheet/ISheetElement.d.ts +233 -0
- package/types/src/sheet/ISheetElement.d.ts.map +1 -0
- package/types/src/sheet/ISheetHeaderElement.d.ts +138 -0
- package/types/src/sheet/ISheetHeaderElement.d.ts.map +1 -0
- package/types/src/sheet/NotImplemented.d.ts +3 -0
- package/types/src/sheet/NotImplemented.d.ts.map +1 -0
- package/types/src/sheet/SheetCommandProvider.d.ts +57 -0
- package/types/src/sheet/SheetCommandProvider.d.ts.map +1 -0
- package/types/src/sheet/SheetCommands.d.ts +75 -0
- package/types/src/sheet/SheetCommands.d.ts.map +1 -0
- package/types/src/sheet/SheetElement.d.ts +15 -0
- package/types/src/sheet/SheetElement.d.ts.map +1 -0
- package/types/src/sheet/SheetHeaderElement.d.ts +4 -0
- package/types/src/sheet/SheetHeaderElement.d.ts.map +1 -0
- package/types/src/sheet/SheetScrollbar.d.ts +28 -0
- package/types/src/sheet/SheetScrollbar.d.ts.map +1 -0
- package/types/src/sheet/TopLeftCorner.d.ts +17 -0
- package/types/src/sheet/TopLeftCorner.d.ts.map +1 -0
- package/types/src/sheet/index.d.ts +7 -0
- package/types/src/sheet/index.d.ts.map +1 -0
- package/types/src/slicer/SlicerEditor.d.ts +16 -0
- package/types/src/slicer/SlicerEditor.d.ts.map +1 -0
- package/types/src/slicer/index.d.ts +2 -0
- package/types/src/slicer/index.d.ts.map +1 -0
- package/types/src/tabStrip/SheetTab.d.ts +41 -0
- package/types/src/tabStrip/SheetTab.d.ts.map +1 -0
- package/types/src/tabStrip/Sortable.d.ts +66 -0
- package/types/src/tabStrip/Sortable.d.ts.map +1 -0
- package/types/src/tabStrip/Tab.d.ts +19 -0
- package/types/src/tabStrip/Tab.d.ts.map +1 -0
- package/types/src/tabStrip/TabStrip.d.ts +41 -0
- package/types/src/tabStrip/TabStrip.d.ts.map +1 -0
- package/types/src/tabStrip/TabStripItem.d.ts +36 -0
- package/types/src/tabStrip/TabStripItem.d.ts.map +1 -0
- package/types/src/tabStrip/TabStripRow.d.ts +9 -0
- package/types/src/tabStrip/TabStripRow.d.ts.map +1 -0
- package/types/src/tabStrip/index.d.ts +7 -0
- package/types/src/tabStrip/index.d.ts.map +1 -0
- package/types/src/table/TableCommands.d.ts +16 -0
- package/types/src/table/TableCommands.d.ts.map +1 -0
- package/types/src/taskPane/ITaskPane.d.ts +72 -0
- package/types/src/taskPane/ITaskPane.d.ts.map +1 -0
- package/types/src/taskPane/TaskPaneArea.d.ts +144 -0
- package/types/src/taskPane/TaskPaneArea.d.ts.map +1 -0
- package/types/src/taskPane/TaskPaneFrame.d.ts +48 -0
- package/types/src/taskPane/TaskPaneFrame.d.ts.map +1 -0
- package/types/src/taskPane/TaskPaneRegistry.d.ts +108 -0
- package/types/src/taskPane/TaskPaneRegistry.d.ts.map +1 -0
- package/types/src/taskPane/TaskPaneStrip.d.ts +33 -0
- package/types/src/taskPane/TaskPaneStrip.d.ts.map +1 -0
- package/types/src/taskPane/TaskPaneTitle.d.ts +24 -0
- package/types/src/taskPane/TaskPaneTitle.d.ts.map +1 -0
- package/types/src/taskPane/index.d.ts +7 -0
- package/types/src/taskPane/index.d.ts.map +1 -0
- package/types/src/taskPane/useTaskPane.d.ts +29 -0
- package/types/src/taskPane/useTaskPane.d.ts.map +1 -0
- package/types/src/theme/DocThemesContext.d.ts +3 -0
- package/types/src/theme/DocThemesContext.d.ts.map +1 -0
- package/types/src/theme/DocThemesProvider.d.ts +15 -0
- package/types/src/theme/DocThemesProvider.d.ts.map +1 -0
- package/types/src/theme/ThemeState.d.ts +19 -0
- package/types/src/theme/ThemeState.d.ts.map +1 -0
- package/types/src/theme/buildDocThemeCSS.d.ts +16 -0
- package/types/src/theme/buildDocThemeCSS.d.ts.map +1 -0
- package/types/src/theme/buildOOXMLThemeCSS.d.ts +13 -0
- package/types/src/theme/buildOOXMLThemeCSS.d.ts.map +1 -0
- package/types/src/theme/createCSSSystemLookup.d.ts +51 -0
- package/types/src/theme/createCSSSystemLookup.d.ts.map +1 -0
- package/types/src/theme/index.d.ts +11 -0
- package/types/src/theme/index.d.ts.map +1 -0
- package/types/src/theme/useAppColorScheme.d.ts +15 -0
- package/types/src/theme/useAppColorScheme.d.ts.map +1 -0
- package/types/src/theme/useDocThemes.d.ts +3 -0
- package/types/src/theme/useDocThemes.d.ts.map +1 -0
- package/types/src/theme/useGridColorScheme.d.ts +20 -0
- package/types/src/theme/useGridColorScheme.d.ts.map +1 -0
- package/types/src/theme/useSystemColors.d.ts +44 -0
- package/types/src/theme/useSystemColors.d.ts.map +1 -0
- package/types/src/undo/UndoCommands.d.ts +28 -0
- package/types/src/undo/UndoCommands.d.ts.map +1 -0
- package/types/src/undo/UndoManagerContext.d.ts +14 -0
- package/types/src/undo/UndoManagerContext.d.ts.map +1 -0
- package/types/src/undo/index.d.ts +3 -0
- package/types/src/undo/index.d.ts.map +1 -0
- package/types/src/workbook/DefaultRenderers.d.ts +14 -0
- package/types/src/workbook/DefaultRenderers.d.ts.map +1 -0
- package/types/src/workbook/GlobalWorkbookElement.d.ts +10 -0
- package/types/src/workbook/GlobalWorkbookElement.d.ts.map +1 -0
- package/types/src/workbook/IWorkbookElement.d.ts +178 -0
- package/types/src/workbook/IWorkbookElement.d.ts.map +1 -0
- package/types/src/workbook/WindowChrome.d.ts +61 -0
- package/types/src/workbook/WindowChrome.d.ts.map +1 -0
- package/types/src/workbook/WorkbookCommandContributor.d.ts +24 -0
- package/types/src/workbook/WorkbookCommandContributor.d.ts.map +1 -0
- package/types/src/workbook/WorkbookCommands.d.ts +97 -0
- package/types/src/workbook/WorkbookCommands.d.ts.map +1 -0
- package/types/src/workbook/WorkbookElement.d.ts +9 -0
- package/types/src/workbook/WorkbookElement.d.ts.map +1 -0
- package/types/src/workbook/WorkbookStrip.d.ts +73 -0
- package/types/src/workbook/WorkbookStrip.d.ts.map +1 -0
- package/types/src/workbook/index.d.ts +17 -0
- package/types/src/workbook/index.d.ts.map +1 -0
- package/types/src/workbook/resolveWorkbookInput.d.ts +27 -0
- package/types/src/workbook/resolveWorkbookInput.d.ts.map +1 -0
- package/types/src/workbook/useResolvedWorkbook.d.ts +31 -0
- package/types/src/workbook/useResolvedWorkbook.d.ts.map +1 -0
- package/types/src/workbook/useWindowChrome.d.ts +24 -0
- package/types/src/workbook/useWindowChrome.d.ts.map +1 -0
- package/types/src/workbook/useWorkbookApp.d.ts +47 -0
- package/types/src/workbook/useWorkbookApp.d.ts.map +1 -0
- package/types/src/workbook/useWorkbookEncrypted.d.ts +15 -0
- package/types/src/workbook/useWorkbookEncrypted.d.ts.map +1 -0
- package/types/src/workbook/useWorkbookFormat.d.ts +18 -0
- package/types/src/workbook/useWorkbookFormat.d.ts.map +1 -0
- package/types/src/workbook/useWorkbookName.d.ts +13 -0
- package/types/src/workbook/useWorkbookName.d.ts.map +1 -0
- package/types/src/workbook/useWorkbookSaveState.d.ts +29 -0
- package/types/src/workbook/useWorkbookSaveState.d.ts.map +1 -0
- package/browser/cjs/DE4tB6-rHLjtcP1D.cjs +0 -16
- package/browser/cjs/DfFvH5gp0fyrdVBe.cjs +0 -7
- package/browser/cjs/IsZqO9D9KfIS8rJK.cjs +0 -161
- package/browser/esm/B-FEg36883DAwV11.mjs +0 -1377
- package/browser/esm/C07OMiF-GZT09DE8.mjs +0 -394
- package/browser/esm/DpetxHCqcdvCcpAe.mjs +0 -3905
- package/node/assets/style.css +0 -1
- package/node/esm/BzmGjDsMnAeW7Hwa.mjs +0 -11
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ThemeMode } from '@sheetxl/utils-react';
|
|
2
|
+
/**
|
|
3
|
+
* The grid body's resolved light/dark scheme — the single source of the grid's mode.
|
|
4
|
+
*
|
|
5
|
+
* Derived from the shared appearance preference: the user's light/dark override
|
|
6
|
+
* (`ThemeStateKey.Mode`, resolved via `prefers-color-scheme` when unset), gated by *Enable Dark Grid*
|
|
7
|
+
* (`ThemeStateKey.DarkGrid`, default off) so the grid stays light in a dark app unless opted in.
|
|
8
|
+
*
|
|
9
|
+
* Because it reads the shared (module-singleton) preference store, every caller — the grid surface
|
|
10
|
+
* (`SheetElement`) **and** chrome that must match the grid but renders outside its DOM (the table-style
|
|
11
|
+
* preview, the cell-style / color pickers) — resolves the *same* value with no prop-threading and no
|
|
12
|
+
* drift from the studio (which reads the same keys the same way).
|
|
13
|
+
*
|
|
14
|
+
* A consumer uses it to set `data-sxl-theme-surface="grid"` + `data-sxl-theme-mode={scheme}` on its own
|
|
15
|
+
* element, then resolves `--sxl-*` from the cascade / `getComputedStyle`.
|
|
16
|
+
*
|
|
17
|
+
* @param override Optional controlled scheme; when provided it wins over the preference.
|
|
18
|
+
*/
|
|
19
|
+
export declare const useGridColorScheme: (override?: ThemeMode) => ThemeMode;
|
|
20
|
+
//# sourceMappingURL=useGridColorScheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGridColorScheme.d.ts","sourceRoot":"","sources":["../../../../src/theme/useGridColorScheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6C,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAIjG;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,kBAAkB,GAAI,WAAW,SAAS,KAAG,SAMzD,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IColor } from '@sheetxl/sdk';
|
|
2
|
+
import { CSSSystemLookup } from './createCSSSystemLookup';
|
|
3
|
+
/**
|
|
4
|
+
* Injects the default `--sxl-sys-color-*` CSS variables — the built-in (baked) system color
|
|
5
|
+
* definitions — as a low-specificity `:root` stylesheet (idempotent).
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* `IColor.toCSS()` emits `var(--sxl-sys-color-windowtext, …)` for system/auto colors, so the browser
|
|
9
|
+
* resolves them in place — per DOM subtree, exactly like CSS. These defaults make the full
|
|
10
|
+
* `--sxl-sys-color-*` palette a visible, overridable contract: a host (MUI app, VSCode extension)
|
|
11
|
+
* themes the grid (or an individual widget) by overriding the variables on a container. Using a
|
|
12
|
+
* `:root` stylesheet (not inline styles) keeps specificity low so host overrides win.
|
|
13
|
+
*/
|
|
14
|
+
export declare const installSystemColorDefaults: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* Builds `--sxl-sys-color-*` CSS variable overrides from a partial set of {@link IColor.Named} system
|
|
17
|
+
* colors, so that system/auto colors (which `IColor.toCSS()` emits as `var(--sxl-sys-color-*)`) resolve
|
|
18
|
+
* to the provided values rather than the global host mapping.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Used by the grid container ({@link SheetElement}) and by UI rendered *outside* the grid subtree
|
|
22
|
+
* that must still match the grid's light/dark intent — most notably a color picker popup, which is
|
|
23
|
+
* portaled and would otherwise inherit the host's `--sxl-sys-color-*` (e.g. a light grid in a dark host
|
|
24
|
+
* would show the host's dark `auto` color). Names are lower-cased to match the variable
|
|
25
|
+
* `IColor.toCSS()` references; centralizing that here keeps callers from drifting.
|
|
26
|
+
*/
|
|
27
|
+
export declare const createSystemColorVars: (colors: Partial<Record<IColor.Named, string>>) => Record<string, string>;
|
|
28
|
+
/**
|
|
29
|
+
* Ensures the default system-color CSS variables are present (see {@link installSystemColorDefaults}).
|
|
30
|
+
* Wired into `SheetElement`, so the grid themes from `--sxl-sys-color-*` out of the box.
|
|
31
|
+
*/
|
|
32
|
+
export declare const useSystemColors: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Optionally installs a **global** concrete CSS system-color lookup, for `toRGBA`-based
|
|
35
|
+
* consumers (color pickers, contrast via `toBlackOrWhite`) that need an actual number rather
|
|
36
|
+
* than a CSS `var()`.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* Rendering does **not** need this — it uses CSS `var()` (the browser resolves `--sxl-sys-color-*`).
|
|
40
|
+
* This is opt-in for hosts that want concrete system colors resolved from the host theme. Returns
|
|
41
|
+
* the lookup so the host can `invalidate()` it when the theme changes.
|
|
42
|
+
*/
|
|
43
|
+
export declare const installSystemColorLookup: () => CSSSystemLookup;
|
|
44
|
+
//# sourceMappingURL=useSystemColors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSystemColors.d.ts","sourceRoot":"","sources":["../../../../src/theme/useSystemColors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkC,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3E,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAItF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,0BAA0B,QAAO,IAa7C,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,GAChC,QAAQ,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,KAC5C,MAAM,CAAC,MAAM,EAAE,MAAM,CAMvB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAO,IAIlC,CAAA;AAID;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,QAAO,eAM3C,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { RemoveListener, UndoManager } from '@sheetxl/utils';
|
|
2
|
+
import { Command, IReactNotifier } from '@sheetxl/utils-react';
|
|
3
|
+
/**
|
|
4
|
+
* Undo/redo command **behavior**. A **plain function, not a hook**: pure imperative work over two non-React
|
|
5
|
+
* objects (the contribution + the `manager`), so it stays React-free, unit-testable without a renderer, and
|
|
6
|
+
* usable from a non-React host. It takes the **contribution** (the authoring facet), not the raw scope —
|
|
7
|
+
* least privilege, and the contribution is what tracks its keys for automatic teardown. The command chrome
|
|
8
|
+
* (label / description / shortcut / tags) lives in the catalog (`sheet.cmd.en.json`); the cascade merges the
|
|
9
|
+
* two.
|
|
10
|
+
*
|
|
11
|
+
* @returns ONLY its own external-subscription disposer (the stack listener). It does **not** remove the
|
|
12
|
+
* commands — that's the owner's (`dispose()` / `contribution.remove()`).
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Each command's `callback` + dynamic `disabledReasons` (empty stack) + dynamic `description`
|
|
16
|
+
* (`"Undo <top>"`) are **re-contributed on every `onStackChange`** — the definitions model's "dynamic
|
|
17
|
+
* via re-contribute" (`updateCommand` itself bumps; no separate `invalidate()`).
|
|
18
|
+
*
|
|
19
|
+
* Force-disable (e.g. sheet protection) is **not** handled here — it's a cross-cutting concern: add a
|
|
20
|
+
* `disabledReason` from a parent scope (the `mutator`-style reducer), which accumulates with these.
|
|
21
|
+
*/
|
|
22
|
+
/** The single `data` bundle {@link contributeUndoCommands} takes (the `DynamicCommandContributor` shape). */
|
|
23
|
+
export interface UndoCommandData {
|
|
24
|
+
manager: UndoManager | null;
|
|
25
|
+
notifier?: IReactNotifier;
|
|
26
|
+
}
|
|
27
|
+
export declare function contributeUndoCommands(contribution: Command.CommandContribution, data: UndoCommandData): RemoveListener;
|
|
28
|
+
//# sourceMappingURL=UndoCommands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UndoCommands.d.ts","sourceRoot":"","sources":["../../../../src/undo/UndoCommands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAiB,MAAM,gBAAgB,CAAC;AAEtF,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEzE;;;;;;;;;;;;;;;;;;GAkBG;AACH,6GAA6G;AAC7G,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AACD,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,OAAO,CAAC,mBAAmB,EACzC,IAAI,EAAE,eAAe,GACpB,cAAc,CA2ChB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { UndoManager } from '@sheetxl/utils';
|
|
2
|
+
/**
|
|
3
|
+
* The **per-workbook** {@link UndoManager} — published by `WorkbookElement` (which owns it, over its
|
|
4
|
+
* workbook's transactions) and read by the sheet's transactional middleware (in
|
|
5
|
+
* {@link SheetCommandProvider}) so its **F4-repeat** (`setRepeatableOperation`) and the `redo` command
|
|
6
|
+
* (`redo()`) act on the **same** instance. One manager per live workbook (the double-buffer needs this),
|
|
7
|
+
* shared *down* to the sheet layer rather than duplicated.
|
|
8
|
+
*
|
|
9
|
+
* `null` outside a command tree (a bare chromeless grid) — the middleware then simply disables repeat.
|
|
10
|
+
*/
|
|
11
|
+
export declare const UndoManagerContext: import('react').Context<UndoManager | null>;
|
|
12
|
+
/** The nearest per-workbook undo manager, or `null` outside a command tree. */
|
|
13
|
+
export declare const useUndoManager: () => UndoManager | null;
|
|
14
|
+
//# sourceMappingURL=UndoManagerContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UndoManagerContext.d.ts","sourceRoot":"","sources":["../../../../src/undo/UndoManagerContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,6CAA0C,CAAC;AAE1E,+EAA+E;AAC/E,eAAO,MAAM,cAAc,QAAO,WAAW,GAAG,IAAsC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/undo/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LoadingPanelProps } from '@sheetxl/utils-react';
|
|
3
|
+
import { SheetElementProps } from '../sheet';
|
|
4
|
+
import { WorkbookStripProps } from './WorkbookStrip';
|
|
5
|
+
/**
|
|
6
|
+
* Default renderers for {@link WorkbookElement}.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* These can be replaced by host application layers as needed.
|
|
10
|
+
*/
|
|
11
|
+
export declare const renderWorkbookSheet: (props: SheetElementProps) => React.ReactElement;
|
|
12
|
+
export declare const renderWorkbookStrip: (props: WorkbookStripProps) => React.ReactElement;
|
|
13
|
+
export declare const renderWorkbookLoading: (props: LoadingPanelProps) => React.ReactElement;
|
|
14
|
+
//# sourceMappingURL=DefaultRenderers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultRenderers.d.ts","sourceRoot":"","sources":["../../../../src/workbook/DefaultRenderers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEhE,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAIzE;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,iBAAiB,KAAG,KAAK,CAAC,YAGpE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,OAAO,kBAAkB,KAAG,KAAK,CAAC,YAErE,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,OAAO,iBAAiB,KAAG,KAAK,CAAC,YAiBtE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IWorkbookElement } from './IWorkbookElement';
|
|
2
|
+
export declare const setGlobalIWorkbookElement: (workbookElement: IWorkbookElement) => Promise<void>;
|
|
3
|
+
/**
|
|
4
|
+
* By default we will print examples message if dev and eval only
|
|
5
|
+
*
|
|
6
|
+
* @param forcePrintExamples
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export declare const setPrintExamplesOnLoad: (forcePrintExamples: boolean) => void;
|
|
10
|
+
//# sourceMappingURL=GlobalWorkbookElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlobalWorkbookElement.d.ts","sourceRoot":"","sources":["../../../../src/workbook/GlobalWorkbookElement.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA6B3D,eAAO,MAAM,yBAAyB,GAAU,iBAAiB,gBAAgB,kBAgFhF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,oBAAoB,OAAO,SAEjE,CAAA"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { UndoManager } from '@sheetxl/utils';
|
|
3
|
+
import { IWorkbook, IWorkbookIO } from '@sheetxl/sdk';
|
|
4
|
+
import { LoadingPanelProps, ErrorPanelProps, RenderFloatPanel, FloatPanelProps, ThemeMode, Command } from '@sheetxl/utils-react';
|
|
5
|
+
import { SheetElementProps, ISheetElement } from '../sheet';
|
|
6
|
+
import { SheetEditable } from '../editor';
|
|
7
|
+
import { WorkbookStripProps } from './WorkbookStrip';
|
|
8
|
+
/**
|
|
9
|
+
* Workbook specific attributes beyond HTMLDivElement.
|
|
10
|
+
*/
|
|
11
|
+
export interface IWorkbookAttributes {
|
|
12
|
+
/**
|
|
13
|
+
* Retrieve the workbook model associated with this workbook element.
|
|
14
|
+
*/
|
|
15
|
+
getWorkbook: () => IWorkbook;
|
|
16
|
+
/**
|
|
17
|
+
* Retrieve the sheet element associated with this workbook element.
|
|
18
|
+
* `null` before the sheet has mounted.
|
|
19
|
+
*/
|
|
20
|
+
getSheetElement: () => ISheetElement | null;
|
|
21
|
+
/**
|
|
22
|
+
* Retrieve the viewport element associated with this workbook element.
|
|
23
|
+
* `null` before the viewport has mounted.
|
|
24
|
+
*/
|
|
25
|
+
getViewportElement: () => HTMLElement | null;
|
|
26
|
+
/**
|
|
27
|
+
* The per-workbook `workbook` command scope this element owns (per GRID-BUFFERING-PLAN: each
|
|
28
|
+
* `WorkbookElement` owns its own scope + undo manager for safe double-mount). Exposed so an
|
|
29
|
+
* out-of-tree host — e.g. a hoisted task-pane area, which no longer renders inside this element's
|
|
30
|
+
* scope — can bridge it via `CommandScopeContext` and resolve the workbook commands
|
|
31
|
+
* (`insertFunction` / `executeScript` / `undo` / `redo`) against the SHOWN workbook.
|
|
32
|
+
*
|
|
33
|
+
* `null` until the scope is created (or for a bare chromeless grid with no ambient command root).
|
|
34
|
+
*/
|
|
35
|
+
getCommandScope: () => Command.CommandScope | null;
|
|
36
|
+
/**
|
|
37
|
+
* For runtime type checking
|
|
38
|
+
*/
|
|
39
|
+
isWorkbookElement: () => true;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Type returned via ref property
|
|
43
|
+
*/
|
|
44
|
+
export interface IWorkbookElement extends HTMLDivElement, IWorkbookAttributes {
|
|
45
|
+
}
|
|
46
|
+
export type WorkbookLoadEvent = {
|
|
47
|
+
source: IWorkbookElement;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Properties and methods available on the workbook element.
|
|
51
|
+
*/
|
|
52
|
+
export interface WorkbookElementProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'autoFocus'>, React.Attributes {
|
|
53
|
+
/**
|
|
54
|
+
* The workbook to render: a live {@link IWorkbook}, a `Promise` for one, or
|
|
55
|
+
* {@link IWorkbookIO.ReadOptions} to read one from a source. If omitted (or an empty object), a
|
|
56
|
+
* default workbook is created. A promise / read-options input shows the loading panel while
|
|
57
|
+
* resolving and the error panel ({@link WorkbookElementProps.renderWorkbookError}) on failure.
|
|
58
|
+
*
|
|
59
|
+
* This can be accessed (once resolved) via the workbook ref.
|
|
60
|
+
*/
|
|
61
|
+
workbook?: IWorkbook | Promise<IWorkbook> | IWorkbookIO.ReadOptions;
|
|
62
|
+
/**
|
|
63
|
+
* Controlled override for the app (chrome) light/dark scheme. When omitted, the workbook self-sources
|
|
64
|
+
* it from the shared appearance preference (`ThemeStateKey.Mode`, resolved via `prefers-color-scheme`).
|
|
65
|
+
*/
|
|
66
|
+
colorScheme?: ThemeMode;
|
|
67
|
+
/**
|
|
68
|
+
* Controlled override for the grid-body scheme (stays light in a dark app when *Enable Dark Grid* is
|
|
69
|
+
* off). When omitted, derived from {@link colorScheme} + the `ThemeStateKey.DarkGrid` preference.
|
|
70
|
+
*/
|
|
71
|
+
gridColorScheme?: ThemeMode;
|
|
72
|
+
/**
|
|
73
|
+
* Callback for when the workbook is loaded (first render). Useful for hiding/showing
|
|
74
|
+
* loading panels.
|
|
75
|
+
*/
|
|
76
|
+
onWorkbookLoad?: (event: WorkbookLoadEvent) => void | Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* A custom undo manager.
|
|
79
|
+
*
|
|
80
|
+
* @defaultValue A {@link TransactionUndoManager} bound to the workbook's transaction store.
|
|
81
|
+
*/
|
|
82
|
+
undoManager?: UndoManager;
|
|
83
|
+
/**
|
|
84
|
+
* Focus the formula-bar name box (Alt+F3 / `activeNameBox`) — a bridge from a host shell (e.g. studio)
|
|
85
|
+
* to the workbook-ops command, until the name box has a react home. Wired into the per-workbook
|
|
86
|
+
* command scope's workbook commands.
|
|
87
|
+
*/
|
|
88
|
+
focusNameBox?: () => void;
|
|
89
|
+
/**
|
|
90
|
+
* This doesn't influence # of tabs just the visibility of the widget.
|
|
91
|
+
*
|
|
92
|
+
* @defaultValue 'workbook model but can be overridden'
|
|
93
|
+
*/
|
|
94
|
+
showTabs?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Allow for customizations on tabs.
|
|
97
|
+
*/
|
|
98
|
+
propsTabs?: Partial<WorkbookStripProps>;
|
|
99
|
+
/**
|
|
100
|
+
* Render custom tabs.
|
|
101
|
+
*/
|
|
102
|
+
renderTabs?: (props: WorkbookStripProps) => React.ReactElement;
|
|
103
|
+
/**
|
|
104
|
+
* Props for the context menu.
|
|
105
|
+
*/
|
|
106
|
+
propsContextMenu?: any;
|
|
107
|
+
/**
|
|
108
|
+
* Render custom context menu. (chrome - no default)
|
|
109
|
+
*/
|
|
110
|
+
renderContextMenu?: (props: any) => React.ReactElement;
|
|
111
|
+
/**
|
|
112
|
+
* Render custom filter/column menu. (chrome - no default)
|
|
113
|
+
*/
|
|
114
|
+
renderColumnMenu?: (props: any) => React.ReactElement;
|
|
115
|
+
/**
|
|
116
|
+
* Render custom movable menu. (chrome - no default)
|
|
117
|
+
*/
|
|
118
|
+
renderMovableMenu?: (props: any) => React.ReactElement;
|
|
119
|
+
/**
|
|
120
|
+
* Allow for customizations on the floating surface used for the workbook's popups.
|
|
121
|
+
*/
|
|
122
|
+
propsFloatPanel?: Partial<FloatPanelProps>;
|
|
123
|
+
/**
|
|
124
|
+
* Render the floating surface used for the workbook's own popups (e.g. context menus).
|
|
125
|
+
* Defaults to the neutral `FloatPanel`; UI layers inject a themed surface (e.g. MUI Paper).
|
|
126
|
+
*/
|
|
127
|
+
renderFloatPanel?: RenderFloatPanel;
|
|
128
|
+
/**
|
|
129
|
+
* Allow for customizations on loading panels.
|
|
130
|
+
*/
|
|
131
|
+
propsWorkbookLoading?: Partial<LoadingPanelProps>;
|
|
132
|
+
/**
|
|
133
|
+
* Assign a custom loading panel.
|
|
134
|
+
*/
|
|
135
|
+
renderWorkbookLoading?: (props: LoadingPanelProps) => React.ReactElement;
|
|
136
|
+
/**
|
|
137
|
+
* Custom error panel, shown when a `Promise` / {@link IWorkbookIO.ReadOptions} {@link WorkbookElementProps.workbook}
|
|
138
|
+
* fails to resolve. Defaults to a minimal message. (Studio supplies a themed panel.)
|
|
139
|
+
*/
|
|
140
|
+
renderWorkbookError?: (props: ErrorPanelProps) => React.ReactElement;
|
|
141
|
+
/**
|
|
142
|
+
* The app-created editor for the new always-mounted cell editor. Pass the SAME stable
|
|
143
|
+
* {@link IEditable} instance here and to the formula bar for free two-way sync; this forwards it to
|
|
144
|
+
* the sheet's editor layer.
|
|
145
|
+
*/
|
|
146
|
+
editable?: SheetEditable;
|
|
147
|
+
/**
|
|
148
|
+
* Allow for customizations on the sheet.
|
|
149
|
+
*/
|
|
150
|
+
propsSheet?: Partial<SheetElementProps>;
|
|
151
|
+
/**
|
|
152
|
+
* Render custom ISheetElement.
|
|
153
|
+
*/
|
|
154
|
+
renderSheet?: (props: SheetElementProps) => React.ReactElement;
|
|
155
|
+
/**
|
|
156
|
+
* Allows users to Wrap stage children in Top level Context.
|
|
157
|
+
*/
|
|
158
|
+
wrapperMain?: (children: React.ReactNode) => React.ReactElement;
|
|
159
|
+
/**
|
|
160
|
+
* Show the horizontal scrollbar.
|
|
161
|
+
*/
|
|
162
|
+
showHorizontalScrollbar?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* Show the vertical scrollbar.
|
|
165
|
+
*/
|
|
166
|
+
showVerticalScrollbar?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Will autofocus to the sheet.
|
|
169
|
+
*
|
|
170
|
+
* @defaultValue false
|
|
171
|
+
*/
|
|
172
|
+
autoFocus?: boolean | FocusOptions;
|
|
173
|
+
/**
|
|
174
|
+
* Ref for the workbook element.
|
|
175
|
+
*/
|
|
176
|
+
ref?: React.Ref<IWorkbookElement>;
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=IWorkbookElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWorkbookElement.d.ts","sourceRoot":"","sources":["../../../../src/workbook/IWorkbookElement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhE,OAAO,EACL,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EACzF,KAAK,SAAS,EAAE,KAAK,OAAO,EAC7B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AACtE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,WAAW,EAAE,MAAM,SAAS,CAAC;IAC7B;;;OAGG;IACH,eAAe,EAAE,MAAM,aAAa,GAAG,IAAI,CAAC;IAC5C;;;OAGG;IACH,kBAAkB,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;IAC7C;;;;;;;;OAQG;IACH,eAAe,EAAE,MAAM,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IACnD;;OAEG;IACH,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,cAAc,EAAE,mBAAmB;CAAG;AAEhF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,gBAAgB,CAAC;CAC1B,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,UAAU;IACrH;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC,WAAW,CAAC;IACpE;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpE;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACxC;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,KAAK,CAAC,YAAY,CAAC;IAC/D;;OAEG;IACH,gBAAgB,CAAC,EAAE,GAAG,CAAC;IACvB;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,KAAK,CAAC,YAAY,CAAC;IACvD;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,KAAK,CAAC,YAAY,CAAC;IACtD;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,KAAK,CAAC,YAAY,CAAC;IACvD;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC3C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAClD;;OAEG;IACH,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,KAAK,CAAC,YAAY,CAAC;IACzE;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,YAAY,CAAC;IACrE;;;;OAIG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACxC;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,KAAK,CAAC,YAAY,CAAC;IAC/D;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,YAAY,CAAC;IAChE;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,YAAY,CAAC;IACnC;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACnC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export interface WindowChromeOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Manage `document.title` from the workbook name + a leading `●` when there are unsaved changes.
|
|
4
|
+
*
|
|
5
|
+
* - `true` (default): capture the current `document.title` as the base (e.g. the app name).
|
|
6
|
+
* - a string: use it as the base.
|
|
7
|
+
* - `false`: leave `document.title` alone.
|
|
8
|
+
*
|
|
9
|
+
* The title becomes `"<name> - <base>"` (or just `"<base>"` for an unnamed workbook), with a
|
|
10
|
+
* leading `"● "` while dirty.
|
|
11
|
+
*/
|
|
12
|
+
documentTitle?: boolean | string;
|
|
13
|
+
/**
|
|
14
|
+
* When `true` (default), install a `beforeunload` guard that prompts the browser's
|
|
15
|
+
* "leave site / unsaved changes" dialog while the workbook is dirty.
|
|
16
|
+
*/
|
|
17
|
+
confirmOnClose?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Suppress browser keyboard shortcuts so they don't fire the browser instead of the app.
|
|
20
|
+
*
|
|
21
|
+
* - `true` (default): the {@link DEFAULT_GUARD_KEYS} (Ctrl/Cmd + O/S/W/N/T/M) plus Alt+Arrows.
|
|
22
|
+
* - a string array: those keys (with Ctrl/Cmd), plus Alt+Arrows.
|
|
23
|
+
* - `false`: don't touch the keyboard.
|
|
24
|
+
*/
|
|
25
|
+
keyboardGuard?: boolean | string[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Manages the single-per-window app chrome for a workbook: the document/tab title (with an unsaved
|
|
29
|
+
* marker), an unsaved-changes close prompt, and a browser keyboard guard.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Framework-agnostic (no React) — {@link useWindowChrome} drives it for React apps. These are
|
|
33
|
+
* *window-level* concerns that an embeddable widget (e.g. `Studio`) must NOT own, so they live here
|
|
34
|
+
* as an opt-in helper for apps that own the whole window. It is **value-driven**: the consumer
|
|
35
|
+
* pushes the current `(name, dirty)` via {@link update} (from `IWorkbook.onNameChange` and a
|
|
36
|
+
* `TransactionSaveStateManager`) — it holds no model references of its own.
|
|
37
|
+
*/
|
|
38
|
+
export declare class WindowChrome {
|
|
39
|
+
private readonly documentTitle;
|
|
40
|
+
private readonly confirmOnClose;
|
|
41
|
+
private readonly guardKeys;
|
|
42
|
+
private name;
|
|
43
|
+
private dirty;
|
|
44
|
+
private removeLangListener;
|
|
45
|
+
private base;
|
|
46
|
+
private originalTitle;
|
|
47
|
+
private windowInstalled;
|
|
48
|
+
constructor(options?: WindowChromeOptions);
|
|
49
|
+
/**
|
|
50
|
+
* Push the current display state. Window-level listeners (beforeunload, keyboard) are installed
|
|
51
|
+
* on the first call and read the pushed state live.
|
|
52
|
+
*/
|
|
53
|
+
update(name: string | null, dirty: boolean): void;
|
|
54
|
+
/** Remove all listeners and restore the original `document.title`. */
|
|
55
|
+
dispose(): void;
|
|
56
|
+
private installWindowListeners;
|
|
57
|
+
private applyTitle;
|
|
58
|
+
private readonly handleBeforeUnload;
|
|
59
|
+
private readonly handleKey;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=WindowChrome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WindowChrome.d.ts","sourceRoot":"","sources":["../../../../src/workbook/WindowChrome.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;CACpC;AAED;;;;;;;;;;GAUG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAmB;IACjD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAU;IACzC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkB;IAE5C,OAAO,CAAC,IAAI,CAAuB;IACnC,OAAO,CAAC,KAAK,CAAkB;IAE/B,OAAO,CAAC,kBAAkB,CAA6B;IAEvD,OAAO,CAAC,IAAI,CAAuB;IACnC,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,eAAe,CAAS;gBAEpB,OAAO,GAAE,mBAAwB;IAO7C;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAOjD,sEAAsE;IACtE,OAAO,IAAI,IAAI;IAkBf,OAAO,CAAC,sBAAsB;IAe9B,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAMjC;IAEF,OAAO,CAAC,QAAQ,CAAC,SAAS,CAOxB;CACH"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { UndoManager } from '@sheetxl/utils';
|
|
2
|
+
import { Command } from '@sheetxl/utils-react';
|
|
3
|
+
import { WorkbookCommandData } from './WorkbookCommands';
|
|
4
|
+
/**
|
|
5
|
+
* The `data` bundle for the `workbook` contributor — the workbook-command data (incl. the shared cell
|
|
6
|
+
* editable, read by the `insertFunction` picker) plus the per-workbook undo manager (its undo/redo behavior
|
|
7
|
+
* is contributed when present). One bundle carried by the {@link Command.CommandScopeSpec}.
|
|
8
|
+
*/
|
|
9
|
+
export interface WorkbookCommandContributorData extends WorkbookCommandData {
|
|
10
|
+
/** The per-workbook {@link UndoManager}; when present, undo/redo behavior is contributed onto this scope. */
|
|
11
|
+
manager?: UndoManager | null;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The `workbook` feature's command contributor: attaches the per-workbook **behavior** — undo/redo (over
|
|
15
|
+
* `data.manager`) + the workbook model ops (sheet-ops / view / name / style / find). Static chrome is seeded
|
|
16
|
+
* at module init (`registerReactCommandCatalogs`), not here. Stateless — the model + services ride in `data`.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* undo/redo and the workbook ops are **non-transactional** (this scope carries no `tx` middleware): undo
|
|
20
|
+
* runs its own manager, workbook model ops self-transact. undo chrome is registered into both `sheet` (owner)
|
|
21
|
+
* and `workbook` (borrower); its behavior is contributed here on the `workbook` node.
|
|
22
|
+
*/
|
|
23
|
+
export declare const WorkbookCommandContributor: Command.CommandContributor<WorkbookCommandContributorData>;
|
|
24
|
+
//# sourceMappingURL=WorkbookCommandContributor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkbookCommandContributor.d.ts","sourceRoot":"","sources":["../../../../src/workbook/WorkbookCommandContributor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEvE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAIpD,OAAO,EAA8B,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE1F;;;;GAIG;AACH,MAAM,WAAW,8BAA+B,SAAQ,mBAAmB;IACzE,6GAA6G;IAC7G,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,EAAE,OAAO,CAAC,kBAAkB,CAAC,8BAA8B,CAYjG,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { RemoveListener } from '@sheetxl/utils';
|
|
2
|
+
import { IWorkbook, IThemeCollection, ICell, IRange } from '@sheetxl/sdk';
|
|
3
|
+
import { Command, IReactNotifier } from '@sheetxl/utils-react';
|
|
4
|
+
import { CommandContext } from '../frame';
|
|
5
|
+
import { ActivateFrameOptions } from '../taskPane';
|
|
6
|
+
import { SheetEditable } from '../editor';
|
|
7
|
+
/**
|
|
8
|
+
* Workbook-level command **behavior** (pure callbacks) + the structure-protection / sheet-count disable
|
|
9
|
+
* reducer. Workbook model ops are self-transacting, so — unlike the sheet — there is no transactional
|
|
10
|
+
* middleware here. The command chrome (label / description / shortcut / tags) lives in the catalog
|
|
11
|
+
* (`workbook.cmd.en.json`);.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Catalog chrome with **no contributed behavior yet** — commands whose implementation is deliberately
|
|
15
|
+
* deferred, parked here so they aren't lost. Each keeps its chrome (label / description / shortcut)
|
|
16
|
+
* in the catalog, so it resolves but stays disabled until a callback is contributed:
|
|
17
|
+
*
|
|
18
|
+
* - `spellCheck` (F7) — check the workbook for spelling mistakes.
|
|
19
|
+
* - `maximumWorkbookToggle` (Ctrl+F10) — toggle showing the workbook maximized. Note: Excel
|
|
20
|
+
* toggles maximize; ours should maximize within the browser — useful when the sheet is 'windowed'
|
|
21
|
+
* as an embedded component.
|
|
22
|
+
* - `createNamedReferenceFromSelection` (Ctrl+Shift+F3) — auto-generate names from the selected
|
|
23
|
+
* cells (Excel's Create-from-Selection).
|
|
24
|
+
* - `showFormat` (Ctrl+Shift+F) — open the format pane. Should also be available in the status bar.
|
|
25
|
+
|
|
26
|
+
* - `workbookViewToggleExpandFormulaBar` (Ctrl+Shift+U) — expand or collapse the formula bar.
|
|
27
|
+
* F6 - Move focus through primary workbook elements (we can implement this by check each workbook element and moving through)
|
|
28
|
+
* F8 - Extend Selection
|
|
29
|
+
* F10 - Move focus to toolbar
|
|
30
|
+
* F11 - Insert chart as a new tab
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* The **serializable** slice of the last search — what `findNext` / `findPrevious` (and the find window's
|
|
34
|
+
* seed) repeat. Deliberately NOT `ICellRange.FindOptions`: that type carries `matchCustom` (a function),
|
|
35
|
+
* `from` (a live address), and `reverse`, none of which survive a round-trip or mean anything next session.
|
|
36
|
+
* `reverse` in particular is excluded on purpose — direction comes from *which command ran*, not memory.
|
|
37
|
+
*/
|
|
38
|
+
export interface FindMemory {
|
|
39
|
+
/** The search text. */
|
|
40
|
+
text: string;
|
|
41
|
+
matchCase?: boolean;
|
|
42
|
+
matchEntireCell?: boolean;
|
|
43
|
+
useRegex?: boolean;
|
|
44
|
+
fields?: ICell.Content[];
|
|
45
|
+
axis?: IRange.Axis;
|
|
46
|
+
/** Sheet vs whole workbook (the window's "Within"). */
|
|
47
|
+
scope?: CommandContext.FindScopeOptions;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The last-search memory handle — **live getter/setter** over the bridge's `usePersistenceState`, exactly
|
|
51
|
+
* like {@link PickerMemory} for the style pickers. A getter (not the value) so recording a search doesn't
|
|
52
|
+
* change the `data` identity and re-run this whole contributor.
|
|
53
|
+
*/
|
|
54
|
+
export interface FindMemoryHandle {
|
|
55
|
+
getLastFind?: () => FindMemory | null;
|
|
56
|
+
setLastFind?: (value: FindMemory | null) => void;
|
|
57
|
+
}
|
|
58
|
+
/** Options for {@link contributeWorkbookCommands}. */
|
|
59
|
+
export interface ContributeWorkbookCommandsOptions {
|
|
60
|
+
/** Busy / error / dialogs (find, goto, new-style, named-reference). */
|
|
61
|
+
notifier?: IReactNotifier;
|
|
62
|
+
/** Activate a task pane by key (the test `activateTask` command). Threaded from `useTaskPaneArea()`. */
|
|
63
|
+
activateTaskPane?: (key: string, options?: ActivateFrameOptions) => void;
|
|
64
|
+
/** Theme collection for the `selectTheme` picker context. Omit ⇒ the picker has no list to show. */
|
|
65
|
+
themes?: IThemeCollection;
|
|
66
|
+
/**
|
|
67
|
+
* Focus the name box (the formula bar's named-range editor). `activeNameBox` is a **workbook** command (the
|
|
68
|
+
* name box is logically part of the workbook surface), but its editor is currently packaged in the studio
|
|
69
|
+
* formula bar — so the focus is injected as a plain callback (keeps this package free of studio types). This
|
|
70
|
+
* is a **bridge**: when the name-box capability gets a react home (chromeless-workbook track), this becomes a
|
|
71
|
+
* proper imperative handle on `IWorkbookElement`. Omit ⇒ `activeNameBox` stays disabled (no name box).
|
|
72
|
+
*/
|
|
73
|
+
focusNameBox?: () => void;
|
|
74
|
+
/**
|
|
75
|
+
* The shared cell {@link SheetEditable} — the `insertFunction` picker seeds `=FN(` through it (start an edit
|
|
76
|
+
* on the active cell if idle, or insert at the focused editor's caret). Functions are a **workbook** concern
|
|
77
|
+
* (custom functions live in the workbook's scripts, not any one sheet), so the picker resolves here rather
|
|
78
|
+
* than on `sheet`. Omit ⇒ `insertFunction` stays chrome-only (the category list still shows; inserting no-ops).
|
|
79
|
+
*/
|
|
80
|
+
editable?: SheetEditable | null;
|
|
81
|
+
/**
|
|
82
|
+
* Persisted last-search memory (`workbook.lastFind`), owned by the bridge's `usePersistenceState`. Feeds
|
|
83
|
+
* `findNext` / `findPrevious` and the find window's seed. Omit ⇒ those two stay disabled and the window
|
|
84
|
+
* always seeds from the active cell.
|
|
85
|
+
*/
|
|
86
|
+
findMemory?: FindMemoryHandle;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Contribute the workbook **behavior** (pure callbacks) + the structure-protection / sheet-count disable
|
|
90
|
+
* reducer onto `contribution`. Returns a disposer that detaches the model listeners.
|
|
91
|
+
*/
|
|
92
|
+
/** The single `data` bundle {@link contributeWorkbookCommands} takes (the `DynamicCommandContributor` shape). */
|
|
93
|
+
export interface WorkbookCommandData extends ContributeWorkbookCommandsOptions {
|
|
94
|
+
workbook: IWorkbook | null;
|
|
95
|
+
}
|
|
96
|
+
export declare function contributeWorkbookCommands(contribution: Command.CommandContribution, data: WorkbookCommandData): RemoveListener;
|
|
97
|
+
//# sourceMappingURL=WorkbookCommands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkbookCommands.d.ts","sourceRoot":"","sources":["../../../../src/workbook/WorkbookCommands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,cAAc,EAAiB,MAAM,gBAAgB,CAAC;AAElG,OAAO,EACG,KAAK,SAAS,EAAe,KAAK,gBAAgB,EACI,KAAK,KAAK,EACtD,KAAK,MAAM,EAC9B,MAAM,cAAc,CAAC;AAEtB,OAAO,EACS,KAAK,OAAO,EAAE,KAAK,cAAc,EAChD,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAiC,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AAE9E;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC;IACnB,uDAAuD;IACvD,KAAK,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC;CACzC;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,UAAU,GAAG,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;CAClD;AAED,sDAAsD;AACtD,MAAM,WAAW,iCAAiC;IAChD,uEAAuE;IACvE,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,wGAAwG;IACxG,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACzE,oGAAoG;IACpG,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC;;;;OAIG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED;;;GAGG;AACH,iHAAiH;AACjH,MAAM,WAAW,mBAAoB,SAAQ,iCAAiC;IAC5E,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;CAC5B;AACD,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,OAAO,CAAC,mBAAmB,EACzC,IAAI,EAAE,mBAAmB,GACxB,cAAc,CAqdhB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorkbookElement, WorkbookElementProps } from './IWorkbookElement';
|
|
3
|
+
/**
|
|
4
|
+
* The workbook editor/viewer. Resolves a `Promise` / `ReadOptions` workbook input (showing loading /
|
|
5
|
+
* error) before rendering the base element; colors resolve from the injected `--sxl-*` token matrix and
|
|
6
|
+
* the self-sourced color scheme (no theme provider).
|
|
7
|
+
*/
|
|
8
|
+
export declare const WorkbookElement: React.NamedExoticComponent<Omit<WorkbookElementProps, "ref"> & React.RefAttributes<IWorkbookElement>>;
|
|
9
|
+
//# sourceMappingURL=WorkbookElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkbookElement.d.ts","sourceRoot":"","sources":["../../../../src/workbook/WorkbookElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0D/B,OAAO,EACL,KAAK,gBAAgB,EAAE,KAAK,oBAAoB,EACjD,MAAM,oBAAoB,CAAC;AA++B5B;;;;GAIG;AACH,eAAO,MAAM,eAAe,uGAiDzB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorkbook } from '@sheetxl/sdk';
|
|
3
|
+
import { ScrollButtonProps } from '@sheetxl/utils-react';
|
|
4
|
+
import { SheetTabProps } from '../tabStrip';
|
|
5
|
+
/**
|
|
6
|
+
* A table tab strip that operates on an {@link IWorkbook}.
|
|
7
|
+
*/
|
|
8
|
+
export interface WorkbookStripProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
/**
|
|
10
|
+
* The workbook. Required — the strip renders this workbook's sheets and cannot function without it.
|
|
11
|
+
*/
|
|
12
|
+
workbook: IWorkbook;
|
|
13
|
+
/**
|
|
14
|
+
* If true, the tab strip is disabled.
|
|
15
|
+
* @defaultValue false
|
|
16
|
+
*/
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* If true then the tab strips can not be modified but can still be selected.
|
|
20
|
+
* @defaultValue `!workbook.getProtection().isStructureAllowed()`
|
|
21
|
+
*/
|
|
22
|
+
readOnly?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Called when the user has initiated a change to the active tab but before it has
|
|
25
|
+
* been rendered. Return `false` to cancel.
|
|
26
|
+
*/
|
|
27
|
+
onBeforeUserChange?(index: number): boolean | void;
|
|
28
|
+
/**
|
|
29
|
+
* Called after the tab has been changed.
|
|
30
|
+
*/
|
|
31
|
+
onUserChange?(index: number): void;
|
|
32
|
+
/**
|
|
33
|
+
* Condensed (detached) layout: the strip is separated from the grid — e.g. stacked under the
|
|
34
|
+
* scrollbar on a small screen. The selected tab uses a plain rounded tab (rather than the
|
|
35
|
+
* inverted, open-top shape that reads as part of the grid above) and the scroll buttons are
|
|
36
|
+
* hidden. When `false` (default) the strip reads as an extension of the grid.
|
|
37
|
+
*
|
|
38
|
+
* @defaultValue false
|
|
39
|
+
*/
|
|
40
|
+
condensed?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Override how each sheet tab renders. Defaults to a plain {@link SheetTab}. A host with its
|
|
43
|
+
* own tab chrome (e.g. the MUI strip's ripple surface) supplies this rather than re-forking
|
|
44
|
+
* the whole strip. The `sheet`, `inverted` and (when {@link onTabContextMenu} is set)
|
|
45
|
+
* `onContextMenu` are provided; anything else is the underlying {@link TabStrip} tab props.
|
|
46
|
+
*/
|
|
47
|
+
renderSheetTab?: (props: SheetTabProps) => React.ReactElement;
|
|
48
|
+
/**
|
|
49
|
+
* Called on a sheet tab's context-menu (right-click) event, after that tab has been selected.
|
|
50
|
+
* The strip itself renders no menu — a host provides one (e.g. the MUI strip's `SheetTabMenu`).
|
|
51
|
+
*/
|
|
52
|
+
onTabContextMenu?: (event: React.MouseEvent<HTMLElement>, index: number) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Scroll-button renderers forwarded to the underlying {@link TabStrip}. A host can inject
|
|
55
|
+
* styled variants (e.g. the MUI strip's tooltip-wrapped buttons). Only the "edge" button is
|
|
56
|
+
* currently rendered by `TabStrip`; start/end are accepted for parity. Pass `null` to suppress
|
|
57
|
+
* a button (as the strip does for all three in {@link condensed} layout).
|
|
58
|
+
*/
|
|
59
|
+
renderScrollButtonStart?: ((props: ScrollButtonProps) => React.ReactElement) | null;
|
|
60
|
+
renderScrollButtonEnd?: ((props: ScrollButtonProps) => React.ReactElement) | null;
|
|
61
|
+
renderScrollButtonEdge?: ((props: ScrollButtonProps) => React.ReactElement) | null;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Imperative handle for {@link WorkbookStrip}: the root element plus tab-editing methods
|
|
65
|
+
* (delegated to the underlying {@link TabStrip}). A host menu (e.g. the MUI "Rename" action)
|
|
66
|
+
* uses `startEdit` to begin an inline tab rename.
|
|
67
|
+
*/
|
|
68
|
+
export interface WorkbookStripRef extends HTMLDivElement {
|
|
69
|
+
startEdit(index: number): void;
|
|
70
|
+
cancel(index: number): void;
|
|
71
|
+
}
|
|
72
|
+
export declare const WorkbookStrip: React.NamedExoticComponent<WorkbookStripProps & React.RefAttributes<WorkbookStripRef>>;
|
|
73
|
+
//# sourceMappingURL=WorkbookStrip.d.ts.map
|