@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,98 @@
|
|
|
1
|
+
import { RemoveListener } from '@sheetxl/utils';
|
|
2
|
+
import { ISheet } from '@sheetxl/sdk';
|
|
3
|
+
import { Command } from '@sheetxl/utils-react';
|
|
4
|
+
import { IEditable, EditorMode, EditorTextSelection } from '@sheetxl/grid-react';
|
|
5
|
+
/**
|
|
6
|
+
* Which flavor an insert command applies — the same command key, resolved by the winning scope:
|
|
7
|
+
* - `'startEdit'` — **sheet** flavor: begin a fresh edit seeded with the text when NOT editing.
|
|
8
|
+
* - `'caret'` — **editor** override: insert at the focused editor's caret while editing.
|
|
9
|
+
*/
|
|
10
|
+
export type InsertFlavor = 'startEdit' | 'caret';
|
|
11
|
+
/** Options for {@link insertEditText}. */
|
|
12
|
+
export interface InsertEditTextOptions {
|
|
13
|
+
/** Editor mode to (re)enter. @defaultValue `'edit'` */
|
|
14
|
+
mode?: EditorMode;
|
|
15
|
+
/** Initial text selection to apply on a fresh `startEdit` (e.g. select the auto-range inside `=SUM(…)`). */
|
|
16
|
+
initialSelection?: EditorTextSelection | null;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* **Sheet flavor** — *begin* a fresh edit on the active cell seeded with `text` (drives the
|
|
20
|
+
* {@link IEditable} model's `startEdit`, NOT any editor view). This is what a **sheet** command does when
|
|
21
|
+
* NOT editing (`insertCurrentTime`, `insertFunction`, …): there is no editor yet, so it starts one.
|
|
22
|
+
*/
|
|
23
|
+
export declare function startEditWith(editable: IEditable<any, any, any>, text: string, options?: InsertEditTextOptions): void;
|
|
24
|
+
/**
|
|
25
|
+
* **Editor flavor** — insert `text` at the **focused editor's caret** in the CURRENT session
|
|
26
|
+
* (`session.getActiveEditor().insertText`). This is the **editor override** a focused editor contributes
|
|
27
|
+
* for the same keys; caret ops are per-editor (two editors on one cell share the value, not the caret).
|
|
28
|
+
* Returns `false` (a no-op) when no edit session is active — the caller falls back to {@link startEditWith}.
|
|
29
|
+
*/
|
|
30
|
+
export declare function insertAtCaret(editable: IEditable<any, any, any>, text: string): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Fused convenience: caret if editing, else start an edit. Prefer {@link startEditWith} (sheet flavor)
|
|
33
|
+
* or {@link insertAtCaret} (editor override) directly so the flavor is chosen by the resolving scope,
|
|
34
|
+
* not a runtime session check; this is kept while the sheet/editor split is wired through.
|
|
35
|
+
*/
|
|
36
|
+
export declare function insertEditText(editable: IEditable<any, any, any>, text: string, options?: InsertEditTextOptions): void;
|
|
37
|
+
/**
|
|
38
|
+
* The **insert** commands' BEHAVIOR — `insertCurrentTime` / `insertCurrentDate` / `insertValueAbove` +
|
|
39
|
+
* the `insertFunctionSum`/`Average`/`Count`/`Max`/`Min` **AutoSum** family. Each computes some text and either
|
|
40
|
+
* **begins an edit** with it (`flavor: 'startEdit'`, the sheet's version when NOT editing) or **inserts it at
|
|
41
|
+
* the caret** (`flavor: 'caret'`, the focused editor's override while editing). Same command keys, resolved by
|
|
42
|
+
* whichever scope wins — the `sheet` contributes `'startEdit'`, the focused editor contributes `'caret'`. All
|
|
43
|
+
* are tagged `noTransaction` (they only seed the edit text; the model mutation commits later in the edit's own
|
|
44
|
+
* transaction), so the sheet scope's transactional middleware never wraps them. The command chrome lives in
|
|
45
|
+
* the catalog under BOTH the `sheet` and `editor` scopes (`sheet.cmd.en.json` / `editor.cmd.en.json`).
|
|
46
|
+
*
|
|
47
|
+
* The fx **picker** (`insertFunction`, with its `searchByCategory` context) is NOT here — it inserts any
|
|
48
|
+
* function (incl. workbook-defined custom ones), so it is a `workbook` command
|
|
49
|
+
* (see `contributeWorkbookCommands`). Still deferred: `insertFunctionDialog` — the "More Functions…"
|
|
50
|
+
* modal is not yet implemented.
|
|
51
|
+
*/
|
|
52
|
+
/** The single `data` bundle {@link contributeInsertCommands} takes (the `DynamicCommandContributor` shape). */
|
|
53
|
+
export interface InsertCommandData {
|
|
54
|
+
editable: IEditable<any, any, any>;
|
|
55
|
+
sheet: ISheet;
|
|
56
|
+
/** `'startEdit'` begins an edit (the sheet's version when NOT editing); `'caret'` inserts at the focused editor's caret. */
|
|
57
|
+
flavor: InsertFlavor;
|
|
58
|
+
}
|
|
59
|
+
export declare function contributeInsertCommands(contribution: Command.CommandContribution, data: InsertCommandData): RemoveListener;
|
|
60
|
+
/**
|
|
61
|
+
* The **while-editing** edit-session commands' BEHAVIOR — `relativeReferencesToggle` (F4) and
|
|
62
|
+
* `toggleEditorFocus`. Unlike the insert commands ({@link contributeInsertCommands}), these only mean anything *during* an
|
|
63
|
+
* active edit, so the caller (the focused editor input, `SheetCellInput`, via {@link contributeEditorCommands})
|
|
64
|
+
* contributes them **only while it is focused** and removes them on blur — the one place in the system where
|
|
65
|
+
* focus/blur drives command *contribution* rather than just enablement. The catalog **chrome** (incl. the F4
|
|
66
|
+
* shortcut) lives in `editor.cmd.en.json`; the caller contributes only the **behavior**, gated on focus, so
|
|
67
|
+
* the active binding appears and disappears with the edit. That's why an idle editor owns no working F4 and
|
|
68
|
+
* it cedes to `redo`: there's no behavior bound, no dispatcher special-casing.
|
|
69
|
+
*/
|
|
70
|
+
/** The single `data` bundle {@link contributeWhileEditingCommands} takes (the `DynamicCommandContributor` shape). */
|
|
71
|
+
export interface WhileEditingCommandData {
|
|
72
|
+
editable: IEditable<any, any, any>;
|
|
73
|
+
}
|
|
74
|
+
export declare function contributeWhileEditingCommands(contribution: Command.CommandContribution, data: WhileEditingCommandData): RemoveListener;
|
|
75
|
+
/**
|
|
76
|
+
* The **focused editor's** behavior — everything a focus-registered `editor` scope contributes:
|
|
77
|
+
* - the insert commands as **caret overrides** (`contributeInsertCommands(..., 'caret')`) — so while editing,
|
|
78
|
+
* date/time/value-above/insert-function insert at *this editor's* caret, overriding the sheet's begin-edit
|
|
79
|
+
* version;
|
|
80
|
+
* - the **while-editing** commands (F4 / toggleEditorFocus).
|
|
81
|
+
*
|
|
82
|
+
* The registration (WHERE this scope lives) is the host's job — a pane layer for the inline editor, a
|
|
83
|
+
* focus region for the FormulaBar — but the behavior is identical, so both call this. Returns a combined
|
|
84
|
+
* disposer.
|
|
85
|
+
*/
|
|
86
|
+
/** The single `data` bundle {@link contributeEditorCommands} takes (the `DynamicCommandContributor` shape). */
|
|
87
|
+
export interface EditorCommandData {
|
|
88
|
+
editable: IEditable<any, any, any>;
|
|
89
|
+
sheet: ISheet;
|
|
90
|
+
/**
|
|
91
|
+
* Contribute the edit-session commands only while an edit is **active** (a session exists). An idle editor
|
|
92
|
+
* owns no F4 / no caret overrides, so they cede to `redo` / the sheet's begin-edit flavor. The host passes
|
|
93
|
+
* its live session state (`!!editable.getSession()`); the provider re-runs on the flip. @defaultValue `true`
|
|
94
|
+
*/
|
|
95
|
+
active?: boolean;
|
|
96
|
+
}
|
|
97
|
+
export declare function contributeEditorCommands(contribution: Command.CommandContribution, data: EditorCommandData): RemoveListener;
|
|
98
|
+
//# sourceMappingURL=EditorCommands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorCommands.d.ts","sourceRoot":"","sources":["../../../../src/editor/EditorCommands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAqB,KAAK,MAAM,EAAmB,MAAM,cAAc,CAAC;AAE/E,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAIhG;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,OAAO,CAAC;AAEjD,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,4GAA4G;IAC5G,gBAAgB,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;CAC/C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAClC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,qBAA0B,GAClC,IAAI,CAGN;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAKvF;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAClC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,qBAA0B,GAClC,IAAI,CAGN;AAmID;;;;;;;;;;;;;;GAcG;AACH,+GAA+G;AAC/G,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,4HAA4H;IAC5H,MAAM,EAAE,YAAY,CAAC;CACtB;AACD,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,OAAO,CAAC,mBAAmB,EACzC,IAAI,EAAE,iBAAiB,GACtB,cAAc,CA0ChB;AAED;;;;;;;;;GASG;AACH,qHAAqH;AACrH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;CACpC;AACD,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,OAAO,CAAC,mBAAmB,EACzC,IAAI,EAAE,uBAAuB,GAC5B,cAAc,CA0BhB;AAED;;;;;;;;;;GAUG;AACH,+GAA+G;AAC/G,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AACD,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,OAAO,CAAC,mBAAmB,EACzC,IAAI,EAAE,iBAAiB,GACtB,cAAc,CAQhB"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { default as React, CSSProperties } from 'react';
|
|
2
|
+
import { IFunction } from '@sheetxl/sdk';
|
|
3
|
+
/**
|
|
4
|
+
* The caret-derived function context that drives the preview: which function the caret is inside
|
|
5
|
+
* (`name`), which argument it's on (`argIndex`), and that function's declared parameters (used to
|
|
6
|
+
* render the signature with the active argument emphasized). Derived synchronously in the editor from
|
|
7
|
+
* the caret token's `context`.
|
|
8
|
+
*/
|
|
9
|
+
export interface FunctionHint {
|
|
10
|
+
/** The function's canonical name (as reported by the SDK) — the identity used to match descriptors. */
|
|
11
|
+
name: string;
|
|
12
|
+
/** The function's name in the user's language (`SUMME`), for DISPLAY; falls back to {@link name}. */
|
|
13
|
+
nameLocal?: string;
|
|
14
|
+
/** The workbook locale's argument separator (`,` or `;`), for the displayed signature. */
|
|
15
|
+
argSeparator?: string;
|
|
16
|
+
/** The zero-based index of the argument the caret currently sits in. */
|
|
17
|
+
argIndex: number;
|
|
18
|
+
/** The function's declared parameters, in order (name / optional / rest). */
|
|
19
|
+
params: readonly IFunction.IParameterType[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The function's self-describing text, loaded lazily (async) from `getDescriptor()`. Keyed by `name`
|
|
23
|
+
* so a stale descriptor (from the previous function) is ignored while the next one loads.
|
|
24
|
+
*/
|
|
25
|
+
export interface FunctionDescriptor {
|
|
26
|
+
/** The function this descriptor belongs to — must match {@link FunctionHint.name} to be shown. */
|
|
27
|
+
name: string;
|
|
28
|
+
/** One-line summary of what the function does. */
|
|
29
|
+
summary: string;
|
|
30
|
+
/** Per-parameter descriptions, keyed by parameter name (each field optional — may be absent). */
|
|
31
|
+
params: Readonly<Record<string, {
|
|
32
|
+
description?: string;
|
|
33
|
+
}>>;
|
|
34
|
+
}
|
|
35
|
+
export declare const argTypeKey: (param: IFunction.IParameterType) => string;
|
|
36
|
+
export interface FunctionArgIconsProps {
|
|
37
|
+
/** The declared parameter — its scalar type names the value icon. */
|
|
38
|
+
param: IFunction.IParameterType;
|
|
39
|
+
/** Whether more of this argument may follow (a rest parameter / repeating group). */
|
|
40
|
+
repeat?: boolean;
|
|
41
|
+
/** Whether it may be omitted. */
|
|
42
|
+
optional?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Show the value-TYPE icon.
|
|
45
|
+
*
|
|
46
|
+
* @defaultValue `true`
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
* `false` leaves only the repeatable/optional markers — the shape a surface wants when it says the
|
|
50
|
+
* type in WORDS somewhere the icon would only repeat (the argument form puts it in the field's
|
|
51
|
+
* placeholder, where an empty field has room for it and a filled one no longer needs it). The type
|
|
52
|
+
* icon is also the least legible of the three: it is the same glyph whatever the type, so it can
|
|
53
|
+
* only ever mean "hover me".
|
|
54
|
+
*/
|
|
55
|
+
showType?: boolean;
|
|
56
|
+
/** Icon size in px. @defaultValue `15` */
|
|
57
|
+
size?: number;
|
|
58
|
+
/** Style for the cluster itself (the preview pushes it to the end of its row). */
|
|
59
|
+
style?: CSSProperties;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The per-argument metadata icons — repeatable / optional / value type, each with a native tooltip.
|
|
63
|
+
*
|
|
64
|
+
* @remarks
|
|
65
|
+
* Exported so the argument FORM can trail the same cluster after each of its labels: an argument
|
|
66
|
+
* carries the same three facts wherever it is met, and the icons are how they are said without
|
|
67
|
+
* spending a line of prose on each.
|
|
68
|
+
*
|
|
69
|
+
* TODO (scheme still to finalize): `Repeat` for a rest parameter, `DataArray` (the `[…]` brackets) for
|
|
70
|
+
* an OPTIONAL slot, and `DataObject` as the generic value/type marker. The scalar-type → icon mapping
|
|
71
|
+
* (number / text / logical / lambda …) is the part we still want to design.
|
|
72
|
+
*/
|
|
73
|
+
export declare const FunctionArgIcons: React.FC<FunctionArgIconsProps>;
|
|
74
|
+
export interface FunctionSignatureProps {
|
|
75
|
+
/** The caret's function context — drives the name + which argument is emphasized. */
|
|
76
|
+
hint: FunctionHint;
|
|
77
|
+
/**
|
|
78
|
+
* Allow the signature to wrap onto more than one line.
|
|
79
|
+
*
|
|
80
|
+
* @defaultValue `false` — one line, as the editor's floating bar needs (it ellipsizes what does
|
|
81
|
+
* not fit rather than growing).
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* `true` for a signature laid out in a fixed-width panel, where a long one (`PV(rate, nper, pmt,
|
|
85
|
+
* [fv], [type])`) should use the second line instead of a horizontal scrollbar. Wrapping also
|
|
86
|
+
* switches the separator's trailing space to a breaking one, so a line ends after `rate,` rather
|
|
87
|
+
* than starting with the comma of the argument below it.
|
|
88
|
+
*/
|
|
89
|
+
wrap?: boolean;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The one-line function **signature** — `NAME(arg1, arg2, …)` with the active argument emphasized and a
|
|
93
|
+
* **rest** parameter expanded into its two slots. Extracted so the same rendering serves the collapsible
|
|
94
|
+
* {@link FunctionPreviewHeader} and a future standalone tooltip (which would stack it over
|
|
95
|
+
* {@link FunctionPreviewContent}). Presentational; nothing here mutates the edit.
|
|
96
|
+
*/
|
|
97
|
+
export declare const FunctionSignature: React.FC<FunctionSignatureProps>;
|
|
98
|
+
export interface FunctionPreviewContentProps {
|
|
99
|
+
/** The caret's current function context. */
|
|
100
|
+
hint: FunctionHint;
|
|
101
|
+
/** The lazily-loaded descriptor text, or `null` until it resolves (or if it fails). */
|
|
102
|
+
descriptor: FunctionDescriptor | null;
|
|
103
|
+
/**
|
|
104
|
+
* Render the stacked argument list under the summary.
|
|
105
|
+
*
|
|
106
|
+
* @defaultValue `true`
|
|
107
|
+
*
|
|
108
|
+
* @remarks
|
|
109
|
+
* `false` leaves just the summary — the shape a BROWSING surface wants (the Insert Function
|
|
110
|
+
* dialog's function list, where the signature above already says what the arguments are and the
|
|
111
|
+
* per-argument prose belongs to the next step). While EDITING, the argument list is the point of
|
|
112
|
+
* the panel, so the editor leaves this alone.
|
|
113
|
+
*/
|
|
114
|
+
showParameters?: boolean;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The function preview **body** — the one-line summary over a stacked argument list (each argument's
|
|
118
|
+
* name above its own description, with type/repeatable icons, inactive ones dimmed RowZero-style). This
|
|
119
|
+
* is the informative half, deliberately free of any collapse/close chrome so it can be reused verbatim
|
|
120
|
+
* as a hover **tooltip** (compose it under a {@link FunctionSignature}); inside the editor it's the
|
|
121
|
+
* collapsible body of {@link FunctionPreviewPanel}. Renders nothing when there's neither a summary nor
|
|
122
|
+
* any arguments. Presentational — nothing here mutates the edit.
|
|
123
|
+
*/
|
|
124
|
+
export declare const FunctionPreviewContent: React.FC<FunctionPreviewContentProps>;
|
|
125
|
+
export interface FunctionPreviewHeaderProps {
|
|
126
|
+
/** The caret's function context — rendered as the signature. */
|
|
127
|
+
hint: FunctionHint;
|
|
128
|
+
/** Whether the body is currently collapsed (drives the chevron direction). */
|
|
129
|
+
collapsed: boolean;
|
|
130
|
+
/** Toggle collapse. Fired by clicking anywhere on the bar (or the chevron). */
|
|
131
|
+
onToggle: () => void;
|
|
132
|
+
/** Optional — dismiss the panel (renders the trailing close affordance when provided). */
|
|
133
|
+
onClose?: () => void;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The collapsible **bar title** of the preview: the function signature with a trailing collapse chevron
|
|
137
|
+
* (and an optional close). The **entire bar** toggles collapse — Excel/RowZero-style — so the chevron is
|
|
138
|
+
* just the affordance, not the only hit target; the close button stops propagation so dismissing never
|
|
139
|
+
* also toggles. `onMouseDown` is prevented throughout so a click never blurs the textarea being edited.
|
|
140
|
+
*/
|
|
141
|
+
export declare const FunctionPreviewHeader: React.FC<FunctionPreviewHeaderProps>;
|
|
142
|
+
export interface FunctionPreviewPanelProps {
|
|
143
|
+
/** The caret's current function context; the panel renders nothing meaningful without it. */
|
|
144
|
+
hint: FunctionHint;
|
|
145
|
+
/** The lazily-loaded descriptor text, or `null` until it resolves (or if it fails). */
|
|
146
|
+
descriptor: FunctionDescriptor | null;
|
|
147
|
+
/** Optional — dismiss the panel (renders the header's close affordance when provided). */
|
|
148
|
+
onClose?: () => void;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* The function **preview panel** shown while editing a formula, modeled after RowZero/Excel Online: a
|
|
152
|
+
* collapsible {@link FunctionPreviewHeader} (the signature with the active argument highlighted, plus an
|
|
153
|
+
* accordion collapse and an optional close) over the {@link FunctionPreviewContent} body (description +
|
|
154
|
+
* stacked argument list). This component is just the composition — the two halves are exported so the
|
|
155
|
+
* body can be reused as a hover tooltip independent of the collapse chrome.
|
|
156
|
+
*
|
|
157
|
+
* @remarks
|
|
158
|
+
* This is the "B" half of the formula-editor hint UI (the autocomplete *list* is "A"). Presentational
|
|
159
|
+
* and props-driven — the editor owns the caret → hint derivation and passes it down. The expand/collapse
|
|
160
|
+
* state persists (via {@link usePersistenceState}); close is delegated via
|
|
161
|
+
* {@link FunctionPreviewPanelProps.onClose}. No **Example** is shown: `IDescriptor` has no function-level
|
|
162
|
+
* example and we won't fabricate one. The active-argument emphasis is driven by `hint.argIndex`. Nothing
|
|
163
|
+
* here mutates the edit.
|
|
164
|
+
*/
|
|
165
|
+
export declare const FunctionPreviewPanel: React.FC<FunctionPreviewPanelProps>;
|
|
166
|
+
//# sourceMappingURL=FunctionPreviewPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FunctionPreviewPanel.d.ts","sourceRoot":"","sources":["../../../../src/editor/FunctionPreviewPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,cAAc,CAAC;AAiC/D;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,uGAAuG;IACvG,IAAI,EAAE,MAAM,CAAC;IACb,qGAAqG;IACrG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0FAA0F;IAC1F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,QAAQ,EAAE,MAAM,CAAC;IACjB,6EAA6E;IAC7E,MAAM,EAAE,SAAS,SAAS,CAAC,cAAc,EAAE,CAAC;CAC7C;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,kGAAkG;IAClG,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,iGAAiG;IACjG,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;CAC5D;AA0KD,eAAO,MAAM,UAAU,GAAI,OAAO,SAAS,CAAC,cAAc,KAAG,MAK5D,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,qEAAqE;IACrE,KAAK,EAAE,SAAS,CAAC,cAAc,CAAC;IAChC,qFAAqF;IACrF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAe5D,CAAC;AAIF,MAAM,WAAW,sBAAsB;IACrC,qFAAqF;IACrF,IAAI,EAAE,YAAY,CAAC;IACnB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAyB9D,CAAC;AAIF,MAAM,WAAW,2BAA2B;IAC1C,4CAA4C;IAC5C,IAAI,EAAE,YAAY,CAAC;IACnB,uFAAuF;IACvF,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACtC;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CA4CxE,CAAC;AAIF,MAAM,WAAW,0BAA0B;IACzC,gEAAgE;IAChE,IAAI,EAAE,YAAY,CAAC;IACnB,8EAA8E;IAC9E,SAAS,EAAE,OAAO,CAAC;IACnB,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,0FAA0F;IAC1F,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CA4BtE,CAAC;AAOF,MAAM,WAAW,yBAAyB;IACxC,6FAA6F;IAC7F,IAAI,EAAE,YAAY,CAAC;IACnB,uFAAuF;IACvF,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACtC,0FAA0F;IAC1F,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAwCpE,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { NamedItem } from './NamedItemsPanel';
|
|
3
|
+
import { FunctionHint, FunctionDescriptor } from './FunctionPreviewPanel';
|
|
4
|
+
/** Autocomplete-list state (the "A" half) — the matches plus the current selection + callbacks. */
|
|
5
|
+
export interface NamedHintList {
|
|
6
|
+
items: readonly NamedItem[];
|
|
7
|
+
selectedIndex: number;
|
|
8
|
+
/** Summary for the selected row only (loaded lazily by the editor). */
|
|
9
|
+
selectedSummary?: string;
|
|
10
|
+
onSelect: (item: NamedItem, index: number) => void;
|
|
11
|
+
onHighlight?: (index: number) => void;
|
|
12
|
+
}
|
|
13
|
+
/** Function-preview state (the "B" half) — the caret's function context + its lazily-loaded copy. */
|
|
14
|
+
export interface NamedHintPreview {
|
|
15
|
+
hint: FunctionHint;
|
|
16
|
+
descriptor: FunctionDescriptor | null;
|
|
17
|
+
}
|
|
18
|
+
export interface NamedHintPanelProps {
|
|
19
|
+
/** Autocomplete matches; when present and non-empty, the list is shown in preference to the preview. */
|
|
20
|
+
list?: NamedHintList | null;
|
|
21
|
+
/** The function preview; shown when there is no active autocomplete list. */
|
|
22
|
+
preview?: NamedHintPreview | null;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The container for the formula-editor hint popup (modeled after Excel Online). It renders exactly one
|
|
26
|
+
* of the two hint surfaces based on caret state:
|
|
27
|
+
*
|
|
28
|
+
* - **List** ({@link NamedItemsPanel}) — while typing a *name* (`=SU`), an autocomplete of matching
|
|
29
|
+
* items (functions today; named ranges / tables later).
|
|
30
|
+
* - **Preview** ({@link FunctionPreviewPanel}) — once inside a call (`=SUM(`), the signature +
|
|
31
|
+
* argument/description panel.
|
|
32
|
+
*
|
|
33
|
+
* The list wins when it has matches — Excel drops the preview while the name-completion list is up.
|
|
34
|
+
* This is the component the editor's float renders; the editor owns caret → state derivation and
|
|
35
|
+
* passes both halves down, letting this stay a pure switch with no SDK/caret coupling.
|
|
36
|
+
*/
|
|
37
|
+
export declare const NamedHintPanel: React.FC<NamedHintPanelProps>;
|
|
38
|
+
//# sourceMappingURL=NamedHintPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamedHintPanel.d.ts","sourceRoot":"","sources":["../../../../src/editor/NamedHintPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACY,KAAK,SAAS,EAChC,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACiB,KAAK,YAAY,EAAE,KAAK,kBAAkB,EACjE,MAAM,wBAAwB,CAAC;AAEhC,mGAAmG;AACnG,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,qGAAqG;AACrG,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,mBAAmB;IAClC,wGAAwG;IACxG,IAAI,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC5B,6EAA6E;IAC7E,OAAO,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACnC;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAoBxD,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a row IS — the leading glyph, and (for the editor) whether accepting it opens a paren.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* `'named'` covers every non-table entry of the workbook's `INamedCollection` (a named range, a named
|
|
6
|
+
* constant, a named formula): they differ in what they resolve to, but not in how they are completed —
|
|
7
|
+
* the name goes in bare and stands on its own.
|
|
8
|
+
*/
|
|
9
|
+
export type NamedItemKind = 'function' | 'named' | 'table';
|
|
10
|
+
/**
|
|
11
|
+
* One row in the formula autocomplete list. Deliberately minimal — the presentational panel needs a
|
|
12
|
+
* display `name`, its {@link NamedItemKind}, and optionally a `category` / an `iconKey` override. The
|
|
13
|
+
* row layout is identical for every kind; only the leading glyph distinguishes them.
|
|
14
|
+
*/
|
|
15
|
+
export interface NamedItem {
|
|
16
|
+
/** The item's canonical name — inserted (with an opening paren, for a function) when the row is chosen. */
|
|
17
|
+
name: string;
|
|
18
|
+
/** What the row is. Defaults to `'function'`, which is what an omitted kind meant before names joined the list. */
|
|
19
|
+
kind?: NamedItemKind;
|
|
20
|
+
/** Optional category (e.g. `Math & Trig`), shown dimmed at the row's trailing edge. */
|
|
21
|
+
category?: string;
|
|
22
|
+
/** Optional icon-pack key for the leading glyph; overrides the {@link NamedItemKind} default. */
|
|
23
|
+
iconKey?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface NamedItemsPanelProps {
|
|
26
|
+
/** The matching items, already filtered/sorted by the editor. */
|
|
27
|
+
items: readonly NamedItem[];
|
|
28
|
+
/** The highlighted row (keyboard/hover selection). Clamped by the caller. */
|
|
29
|
+
selectedIndex: number;
|
|
30
|
+
/**
|
|
31
|
+
* Summary for the **selected** item only, loaded lazily by the editor. Shown as a single dimmed
|
|
32
|
+
* line under the selected row — one at a time (so the panel never bounces) and non-wrapping.
|
|
33
|
+
*/
|
|
34
|
+
selectedSummary?: string;
|
|
35
|
+
/** Commit a row — the editor splices `name(` into the formula at the caret. */
|
|
36
|
+
onSelect: (item: NamedItem, index: number) => void;
|
|
37
|
+
/** Move the highlight (hover). Optional so the panel works read-only. */
|
|
38
|
+
onHighlight?: (index: number) => void;
|
|
39
|
+
/** Cap the visible rows before the list scrolls. */
|
|
40
|
+
maxVisibleRows?: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The formula **autocomplete list** shown while typing a name in a formula (the "A" half of the
|
|
44
|
+
* formula-editor hint UI, modeled after Excel Online). Presentational only: it renders the matches
|
|
45
|
+
* with one highlighted, a leading type glyph per row, and — under the selected row only — that item's
|
|
46
|
+
* summary. The editor owns the caret → matches derivation, the selection index, insertion, and
|
|
47
|
+
* resolving the selected summary. Functions, named ranges and tables all render here, distinguished
|
|
48
|
+
* only by their {@link NamedItemKind} glyph.
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
* Kept mouse-first so it works with the passive (`autoFocus: false`) hint popup — rows use
|
|
52
|
+
* `onMouseDown` + `preventDefault` so choosing one never blurs the textarea being typed in. Keyboard
|
|
53
|
+
* navigation (arrow/enter) is driven by the editor's textarea keymap, which just moves
|
|
54
|
+
* {@link NamedItemsPanelProps.selectedIndex}; nothing here needs to own focus. The summary is shown
|
|
55
|
+
* for exactly one row and forced to a single line, so moving the selection never reflows the panel
|
|
56
|
+
* width (no "bounce").
|
|
57
|
+
*/
|
|
58
|
+
export declare const NamedItemsPanel: React.FC<NamedItemsPanelProps>;
|
|
59
|
+
//# sourceMappingURL=NamedItemsPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamedItemsPanel.d.ts","sourceRoot":"","sources":["../../../../src/editor/NamedItemsPanel.tsx"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC;AAE3D;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,2GAA2G;IAC3G,IAAI,EAAE,MAAM,CAAC;IACb,mHAAmH;IACnH,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iGAAiG;IACjG,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,iEAAiE;IACjE,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;IAC5B,6EAA6E;IAC7E,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+EAA+E;IAC/E,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,yEAAyE;IACzE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,oDAAoD;IACpD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAkBD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAyE1D,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ISheet } from '@sheetxl/sdk';
|
|
3
|
+
import { EditorAlignment, VirtualDivProps } from '@sheetxl/grid-react';
|
|
4
|
+
import { SheetEditable } from './SheetEditable';
|
|
5
|
+
/**
|
|
6
|
+
* Props for {@link SheetCellEditorLayer}.
|
|
7
|
+
*
|
|
8
|
+
* @typeParam C - clean value type. @typeParam D - dirty value type. @typeParam A - commit args.
|
|
9
|
+
*/
|
|
10
|
+
export interface SheetCellEditorLayerProps extends VirtualDivProps {
|
|
11
|
+
/**
|
|
12
|
+
* Stacking override, read by the grid's sorter **off this element** when the editor is a grid
|
|
13
|
+
* child (law 1: z belongs to Layers; the editor's Layer takes its slot from the sorted order).
|
|
14
|
+
*/
|
|
15
|
+
zIndex?: number;
|
|
16
|
+
/** The sheet — its selection drives the input's leave-key nav, its active cell the edit-session commands. */
|
|
17
|
+
sheet: ISheet;
|
|
18
|
+
/** The editable (UI model) — anchor + the single current edit. Shared with peers (the formula bar). */
|
|
19
|
+
editable: SheetEditable;
|
|
20
|
+
/**
|
|
21
|
+
* The grid's light/dark intent — drives the box background resolution (`resolveCellBackground`, which
|
|
22
|
+
* bakes a concrete color). The input's own font/token colors are theme-adaptive (`light-dark()`) and need
|
|
23
|
+
* no flag.
|
|
24
|
+
*/
|
|
25
|
+
darkMode?: boolean;
|
|
26
|
+
/** Horizontal anchor used when the editor grows past its cell (Excel-style overflow). @defaultValue `'left'` */
|
|
27
|
+
alignment?: EditorAlignment;
|
|
28
|
+
/**
|
|
29
|
+
* Notified when a start-edit attempt is rejected (`startEdit` returned `false` — a non-editable
|
|
30
|
+
* cell). The host that mounts one layer per pane (`SheetElement`) passes a SHARED callback
|
|
31
|
+
* ({@link useProtectedEditNotice}) so all panes form one once-per-visit notice scope.
|
|
32
|
+
* @defaultValue this layer's own {@link useProtectedEditNotice}
|
|
33
|
+
*/
|
|
34
|
+
onEditRejected?: () => void;
|
|
35
|
+
}
|
|
36
|
+
export declare function SheetCellEditorLayer(props: SheetCellEditorLayerProps): React.ReactElement;
|
|
37
|
+
export declare namespace SheetCellEditorLayer {
|
|
38
|
+
var displayName: string;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=SheetCellEditorLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SheetCellEditorLayer.d.ts","sourceRoot":"","sources":["../../../../src/editor/SheetCellEditorLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAM5D,OAAO,EAAE,KAAK,MAAM,EAAc,MAAM,cAAc,CAAC;AAMvD,OAAO,EAEL,KAAK,eAAe,EACoB,KAAK,eAAe,EAC7D,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAyB,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAK5E;;;;GAIG;AACH,MAAM,WAAW,yBAA0B,SAAQ,eAAe;IAChE;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6GAA6G;IAC7G,KAAK,EAAE,MAAM,CAAC;IACd,uGAAuG;IACvG,QAAQ,EAAE,aAAa,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gHAAgH;IAChH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAwBD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,KAAK,CAAC,YAAY,CA4RzF;yBA5Re,oBAAoB"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Direction, RangeAxis } from '@sheetxl/utils';
|
|
2
|
+
import { ICell } from '@sheetxl/sdk';
|
|
3
|
+
import { EditorInputProps, IEditable } from '@sheetxl/grid-react';
|
|
4
|
+
/**
|
|
5
|
+
* The minimal selection the input moves on a committed leave-key. Enter/Tab **traverse** — cycle the
|
|
6
|
+
* active cell *within* the current selection (Excel's contract: stay inside a selected range, wrap at
|
|
7
|
+
* its edges); enter-mode arrows **navigate** — a single logical move of the active cell. Both the
|
|
8
|
+
* grid's `ISelection` (e.g. `DefaultSelection`) and the sheet's selection (`sheet.getSelection()`)
|
|
9
|
+
* satisfy this: their `navigate` shares one `Direction` (the SDK's `IRange.Direction` is the same
|
|
10
|
+
* aliased enum) and their `traverse` one `RangeAxis`, so no mapping is needed.
|
|
11
|
+
*/
|
|
12
|
+
export interface NavigableSelection {
|
|
13
|
+
navigate(direction: Direction, select?: boolean): void;
|
|
14
|
+
traverse(axis?: RangeAxis, reverse?: boolean): void;
|
|
15
|
+
}
|
|
16
|
+
/** Options bound once (by the app) when building the input — the SDK context the cell can't supply. */
|
|
17
|
+
export interface SheetCellInputOptions {
|
|
18
|
+
/**
|
|
19
|
+
* The selection moved on a committed leave-key. This is the ONLY thing the input needed the sheet
|
|
20
|
+
* for, so it takes the selection directly — the grid and the editor then move the SAME selection
|
|
21
|
+
* (pass `sheet.getSelection()` for a sheet-backed grid, or the grid's own `DefaultSelection`).
|
|
22
|
+
*/
|
|
23
|
+
selection: NavigableSelection;
|
|
24
|
+
/**
|
|
25
|
+
* **Hack** Ignore fill.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* We should be able to set the fill to none but conditionals and tables are ignoring.
|
|
29
|
+
*/
|
|
30
|
+
fillNone?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The **ghost formula** for a spilled-INTO cell: the spill anchor's formula, as Excel greys it in the
|
|
34
|
+
* formula bar. `null` for every other cell (including the anchor itself, which owns the formula and so
|
|
35
|
+
* shows it as real text via {@link editStringFromCell}).
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* This is the other half of a deliberate SDK contract: `ICell.getText` blanks a spill-overflow cell and
|
|
39
|
+
* `getFormulaText` returns null there (the formula lives only on the anchor), so `editStringFromCell`
|
|
40
|
+
* yields `''` — leaving the field empty for this ghost to fill. Host-called, not called by the input; see
|
|
41
|
+
* {@link SheetCellInputProps.placeholder} for why the grid editor must not use it.
|
|
42
|
+
*/
|
|
43
|
+
export declare const placeholderFromCell: (cell: ICell | null) => string | null;
|
|
44
|
+
/**
|
|
45
|
+
* Build the **cell-aware** editor input —
|
|
46
|
+
* projects the cell's edit string, paints the cell background, and applies the cell's font, horizontal
|
|
47
|
+
* alignment, wrap, insets, and vertical alignment. Lifecycle (open/commit/cancel/placement).
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* `C` = `() => ICell` (a live cell getter — see `createSheetCreateEdit`); `D` = `string`. The factory
|
|
51
|
+
* closes over the SDK context (`sheet`, dark-mode) the per-cell handle can't provide.
|
|
52
|
+
*
|
|
53
|
+
* **Placement** is driven by {@link ICell.getTextPlacement} — the *same* SDK geometry the cell
|
|
54
|
+
* renderer uses — so the editor's text sits exactly where the rendered cell's does. Insets define the
|
|
55
|
+
* content box; the cell's line height sets the line rhythm; vertical alignment is flex `justifyContent`
|
|
56
|
+
* within the content box. Horizontal overflow + wrap ride the `cellSize`/`onNaturalSize` seam: a
|
|
57
|
+
* wrapped cell measures its own height (clip-proof) and reports width 0 so the layer grows the box
|
|
58
|
+
* *down*; an unwrapped cell reports the shrink-to-content width so the layer grows it *across* columns.
|
|
59
|
+
*/
|
|
60
|
+
/** {@link SheetCellInput}'s props: the grid-react editor props plus the shared **edit model**. The host owns
|
|
61
|
+
* the editor's command scope and its edit-session command contribution (`contributeEditorCommands`); the
|
|
62
|
+
* input only renders + marks itself the session's active editor on focus. `editable` absent ⇒ a bare grid. */
|
|
63
|
+
export type SheetCellInputProps = EditorInputProps<() => ICell, string> & {
|
|
64
|
+
/** The shared edit model, provided by the host — the anchor + current edit this input participates in. */
|
|
65
|
+
editable?: IEditable<() => ICell, string, any> | null;
|
|
66
|
+
/**
|
|
67
|
+
* Greyed ghost text shown when the input renders EMPTY — Excel's spilled-into-cell formula bar, which
|
|
68
|
+
* shows the spilling anchor's formula in grey (see {@link placeholderFromCell}).
|
|
69
|
+
*
|
|
70
|
+
* @remarks
|
|
71
|
+
* A **host** concern, deliberately not derived here: only the formula bar wants it. The in-grid editor
|
|
72
|
+
* (`EditorLayer`) must NOT set it — a ghost formula painted over a spilled cell would sit on top of the
|
|
73
|
+
* grid's own rendered spill value. So this stays a prop the formula bar opts into, rather than something
|
|
74
|
+
* the input infers from the cell.
|
|
75
|
+
*/
|
|
76
|
+
placeholder?: string | null;
|
|
77
|
+
/**
|
|
78
|
+
* The widest the editor box may become, in **logical** px — how much room is left on screen from the
|
|
79
|
+
* cell's left edge. Supplied by the host, which is the only side that knows it (the layer owns the pane
|
|
80
|
+
* and the surface); today that's the grid surface, and it becomes the browser width if the editor is ever
|
|
81
|
+
* portaled out. Absent for a box-less host (the formula bar), which simply breaks at its own width.
|
|
82
|
+
*
|
|
83
|
+
* Only a FORMULA uses it, and only as a last resort — see the wrap rules on `formulaBreak`.
|
|
84
|
+
*/
|
|
85
|
+
maxContentWidth?: number;
|
|
86
|
+
/**
|
|
87
|
+
* The line rhythm, in **logical** px, for a **box-less** host (one that passes no `cellSize`). A placed
|
|
88
|
+
* host takes it from the cell's own resolved placement instead, so this is ignored there.
|
|
89
|
+
*
|
|
90
|
+
* @remarks
|
|
91
|
+
* A box-less host wraps (see the wrap rules on `cellWrap`), so its box height is now a count of LINES —
|
|
92
|
+
* the formula bar snaps its resize to a line and reports how many are visible. Left to the browser's
|
|
93
|
+
* `normal`, the rendered line and the host's idea of one differ by a few px and every expanded row shows
|
|
94
|
+
* a sliver of the next; supplying it makes the two exact.
|
|
95
|
+
*/
|
|
96
|
+
lineHeight?: number;
|
|
97
|
+
};
|
|
98
|
+
export declare const createSheetCellInput: (options: SheetCellInputOptions) => React.FC<SheetCellInputProps>;
|
|
99
|
+
//# sourceMappingURL=SheetCellInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SheetCellInput.d.ts","sourceRoot":"","sources":["../../../../src/editor/SheetCellInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EACoB,KAAK,SAAS,EAAE,KAAK,SAAS,EACxD,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAA2E,KAAK,KAAK,EAAwD,MAAM,cAAc,CAAC;AAOzK,OAAO,EAEL,KAAK,gBAAgB,EAA2C,KAAK,SAAS,EAC/E,MAAM,qBAAqB,CAAC;AAkF7B;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACvD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACrD;AAED,uGAAuG;AACvG,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,SAAS,EAAE,kBAAkB,CAAC;IAC9B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAaD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,KAAK,GAAG,IAAI,KAAG,MAAM,GAAG,IASjE,CAAC;AAGF;;;;;;;;;;;;;;;GAeG;AACH;;+GAE+G;AAC/G,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,CAAC,MAAM,KAAK,EAAE,MAAM,CAAC,GAAG;IACxE,0GAA0G;IAC1G,QAAQ,CAAC,EAAE,SAAS,CAAC,MAAM,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACtD;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAgDF,eAAO,MAAM,oBAAoB,GAC/B,SAAS,qBAAqB,KAC7B,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAukD9B,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ISheet, IWorkbook, ICell } from '@sheetxl/sdk';
|
|
2
|
+
import { CreateEdit, IEditable, EditCommitArgs } from '@sheetxl/grid-react';
|
|
3
|
+
import { ReferenceModeHandler } from './useReferenceMode';
|
|
4
|
+
/** The editable shape for a spreadsheet: `clean` is a live cell getter, `dirty` is the working text. */
|
|
5
|
+
export type SheetEditable = IEditable<() => ICell, string, EditCommitArgs>;
|
|
6
|
+
/**
|
|
7
|
+
* The **grid** background a cell renders with, cascading cell fill → the sheet's normal-style fill →
|
|
8
|
+
* the grid body fill. This is the grid's rendering rule (not a cell property), so the grid editor box
|
|
9
|
+
* uses it to cover the cell while editing. The cell-aware input itself paints only the cell's *own*
|
|
10
|
+
* fill; this fallback is the container's job.
|
|
11
|
+
*/
|
|
12
|
+
export declare const resolveCellBackground: (cell: ICell, sheet: ISheet, darkMode?: boolean, bodyFill?: string) => string;
|
|
13
|
+
/**
|
|
14
|
+
* An `ISheet`-backed {@link CreateEdit} for the new {@link DefaultEditable} / {@link EditorLayer}.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* - **clean** is `() => ICell` — a *live* cell getter (not a captured value), so a cell-aware input
|
|
18
|
+
* reads the cell's formula/format/style/fill through to the model even if the handle is replaced.
|
|
19
|
+
* - **commit** writes the dirty string via `range.setValue(text, { autoFit })` — the SDK coerces the
|
|
20
|
+
* string to a formula / number / date / text.
|
|
21
|
+
* - **`null`** ⇒ the cell is not editable (protected / read-only), via {@link ICell.isEditAllowed}.
|
|
22
|
+
* - **scope-aware**: `coords.scope` (a sheet name) picks the sheet to edit, via `workbook.getSheet`,
|
|
23
|
+
* falling back to `sheet`. This is what makes a commit write back to the session's *origin* sheet even
|
|
24
|
+
* if a different sheet is currently displayed — `coords` here is the session's own (fixed) coords, not
|
|
25
|
+
* whatever the anchor currently reports.
|
|
26
|
+
*
|
|
27
|
+
* Construct the editable with it: `new DefaultEditable(anchor, createSheetCreateEdit(sheet))` — or use
|
|
28
|
+
* the {@link createEditable} factory, which wires both.
|
|
29
|
+
*/
|
|
30
|
+
export declare const createSheetCreateEdit: (sheet: ISheet, workbook?: IWorkbook | null) => CreateEdit<() => ICell, string, EditCommitArgs>;
|
|
31
|
+
/**
|
|
32
|
+
* Build the production {@link SheetEditable} for a sheet — the {@link DefaultEditable} wired with a
|
|
33
|
+
* workbook-aware active-cell anchor ({@link createEditableAnchor}) and SDK edit strategy
|
|
34
|
+
* ({@link createSheetCreateEdit}), self-published to the edit-mode bus ({@link publishEditableToBus})
|
|
35
|
+
* and the reference-mode bus ({@link wireReferenceMode}). The one place that composition lives, so call
|
|
36
|
+
* sites (the grid and the app's auto-editable) don't repeat it.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* A factory, not a subclass: the editable's only varying behavior is *how* an edit is created, which
|
|
40
|
+
* is already the injected `CreateEdit` strategy — there is nothing for a subclass to override. Returns
|
|
41
|
+
* the {@link IEditable} interface so callers and props stay implementation-agnostic.
|
|
42
|
+
*/
|
|
43
|
+
export interface CreateEditableOptions {
|
|
44
|
+
/**
|
|
45
|
+
* The reference-mode bus this editable publishes its pick state to. Model-side wiring can't resolve
|
|
46
|
+
* a React context, so a COMPONENT call site under a custom `ReferenceModeProvider` must thread its
|
|
47
|
+
* store through here (`useReferenceModeStore()`). Default: the app-wide default store — zero-config
|
|
48
|
+
* behavior unchanged.
|
|
49
|
+
*/
|
|
50
|
+
referenceMode?: ReferenceModeHandler;
|
|
51
|
+
}
|
|
52
|
+
export declare const createEditable: (sheet: ISheet, options?: CreateEditableOptions) => SheetEditable;
|
|
53
|
+
//# sourceMappingURL=SheetEditable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SheetEditable.d.ts","sourceRoot":"","sources":["../../../../src/editor/SheetEditable.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,SAAS,EAAE,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAEL,KAAK,UAAU,EAAoB,KAAK,SAAS,EACjD,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAsC,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAEnG,wGAAwG;AACxG,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,MAAM,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;AAI3E;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM,KAAK,EAAE,OAAO,MAAM,EAAE,WAAW,OAAO,EAAE,WAAW,MAAM,KAAG,MAKzG,CAAC;AA6GF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,MAAM,EACb,WAAU,SAAS,GAAG,IAA0B,KAC/C,UAAU,CAAC,MAAM,KAAK,EAAE,MAAM,EAAE,cAAc,CA2ChD,CAAC;AA8JF;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,oBAAoB,CAAC;CACtC;AAED,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,EAAE,UAAU,qBAAqB,KAAG,aA6B/E,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IRange } from '@sheetxl/sdk';
|
|
3
|
+
import { CellCoords, RangeCoords } from '@sheetxl/utils';
|
|
4
|
+
import { LayerProps } from '@sheetxl/grid-react';
|
|
5
|
+
/**
|
|
6
|
+
* Props for {@link SheetReferenceHeaderLayer}.
|
|
7
|
+
*/
|
|
8
|
+
export interface SheetReferenceHeaderLayerProps extends LayerProps {
|
|
9
|
+
/** Class forwarded to the inner layer's host box (devtools identification). */
|
|
10
|
+
className?: string;
|
|
11
|
+
/** The axis of the header this overlay sits on (row or column). */
|
|
12
|
+
axis: IRange.Axis;
|
|
13
|
+
/**
|
|
14
|
+
* The body's entire range (full rows × full columns) — the header projects every pick across the
|
|
15
|
+
* opposite axis with it. Typically `sheet.getEntireRange().getCoords()`.
|
|
16
|
+
*/
|
|
17
|
+
entireCoords: RangeCoords;
|
|
18
|
+
/**
|
|
19
|
+
* Scroll a header cell into view during a pick drag (incl. held-still auto-scroll) — routed through the
|
|
20
|
+
* sheet so the body scrolls. Supplied by `SheetHeaderElement`; see {@link HeaderSelectionLayer.scrollIntoView}.
|
|
21
|
+
*/
|
|
22
|
+
scrollIntoView?: (coords: Partial<CellCoords>) => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The **header** counterpart to {@link SheetReferenceLayer}: lets a header click/drag pick a whole
|
|
26
|
+
* row/column reference into the current formula (or chart data range) while POINT mode is armed. A header
|
|
27
|
+
* overlay (mounted per header by `SheetHeaderElement`), it reads the app-wide reference-mode bus
|
|
28
|
+
* ({@link useReferenceMode}) — not any edit session — and drives the SAME picker {@link IRangeSelection}
|
|
29
|
+
* as the body layer, so a header pick and a body draw write back through one model.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Renders **only while `mode === 'point'`** (armed) and only on a sheet the pick is allowed to reach
|
|
33
|
+
* (`ReferenceModeState.scope`). Otherwise it renders nothing and registers no responder, leaving the
|
|
34
|
+
* primary header selection fully in charge. The producer's gates — `scope` and `allowMulti` — are read
|
|
35
|
+
* here exactly as {@link SheetReferenceLayer} reads them for the body: the two surfaces drive one
|
|
36
|
+
* selection, so a gate honored by only one of them is no gate at all. It is a pointer surface
|
|
37
|
+
* only ({@link HeaderSelectionLayer} with `renderBorders={false}`) — the reference rectangles are drawn on
|
|
38
|
+
* the body grid by {@link SheetReferenceLayer}; `preserveFocus` keeps the formula editor focused across a
|
|
39
|
+
* header drag; `replaceActive` re-scopes/inserts the active reference instead of the primary's whole-
|
|
40
|
+
* selection replace.
|
|
41
|
+
*/
|
|
42
|
+
export declare function SheetReferenceHeaderLayer(props: SheetReferenceHeaderLayerProps): React.ReactElement | null;
|
|
43
|
+
export declare namespace SheetReferenceHeaderLayer {
|
|
44
|
+
var displayName: string;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=SheetReferenceHeaderLayer.d.ts.map
|