@sheetxl/react 0.8.0-beta.1 → 0.8.0-beta.11
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/esm/1-LEUre9ZLG0OYYB.mjs +197 -0
- package/browser/esm/94dxo1A-z8lgiiGw.mjs +128 -0
- package/browser/esm/B26QVfjer2oY2ewK.mjs +32 -0
- package/browser/esm/B93LSmhnvkxNXTq-.mjs +42 -0
- package/browser/esm/BQYS2Yf-EAV_tBLr.mjs +20 -0
- package/{node/esm/DAE_NG8D9uT50zUH.mjs → browser/esm/BegvsXeRs7e-9t8k.mjs} +3 -4
- package/browser/esm/Bl2BFCQ00fotauKB.mjs +36 -0
- package/browser/esm/Bos4Rkp8UTF7QXUB.mjs +31 -0
- package/browser/esm/C1pc9F4Rt2C5FKUo.mjs +45 -0
- package/browser/esm/CPnnESfZz2jjJd82.mjs +134 -0
- package/browser/esm/CRi6DQ3UXmPEv-w_.mjs +729 -0
- package/browser/esm/ClAtIfYbsUPA073B.mjs +2706 -0
- package/browser/esm/CzRIbc-Lk__VMLKM.mjs +60 -0
- package/browser/esm/D2u6THGErqw64KQI.mjs +63 -0
- package/browser/esm/DMdsMPT0fWBbTkNn.mjs +67 -0
- package/browser/esm/DS66lAIM-9M-YoZQ.mjs +315 -0
- package/browser/esm/DgL7Dy-Lqcr1TvW6.mjs +23528 -0
- package/browser/esm/Dnh1kpz3v1JKtRD_.mjs +79 -0
- package/browser/esm/cQ6xdPFkEcuDlNTN.mjs +75 -0
- package/browser/esm/chart.mjs +40 -0
- package/browser/esm/control.mjs +216 -0
- package/browser/esm/group.mjs +123 -0
- package/browser/esm/index.mjs +15460 -8762
- package/browser/esm/note.mjs +112 -0
- package/browser/esm/picture.mjs +86 -0
- package/browser/esm/shape.mjs +7 -0
- package/browser/esm/slicer.mjs +276 -0
- package/browser/esm/ugfE7YeZALQURDKF.mjs +241 -0
- package/licenses/dependencies.txt +319 -600
- package/node/esm/6zApGj9DozhFy-bx.mjs +35 -0
- package/node/esm/BMVK5plvmBOAIlxP.mjs +80 -0
- package/node/esm/BaRfst1euuhquupX.mjs +66 -0
- package/node/esm/Be9c1GwQkPo8Piuh.mjs +134 -0
- package/node/esm/BiaDWnN3tT7neoRL.mjs +68 -0
- package/node/esm/BlxXufqBBg1PtsXd.mjs +8 -0
- package/node/esm/C_SNx7TlFEcwbYjx.mjs +2706 -0
- package/node/esm/DJPgbB1X22YmhbaR.mjs +242 -0
- package/node/esm/DTMTIrYIK1eZswsM.mjs +37 -0
- package/node/esm/D_pCpfdQowV_4Aje.mjs +198 -0
- package/node/esm/DgGEHydEjD7nfsDB.mjs +76 -0
- package/node/esm/Dj5FM7_-YWhCtCCt.mjs +45 -0
- package/node/esm/DxQZmb-j4NLUO9Af.mjs +63 -0
- package/node/esm/JiQGhLkoL8CJpVvA.mjs +20 -0
- package/node/esm/b-XRVRI1fYQQMkTC.mjs +1664 -0
- package/node/esm/chart.mjs +40 -0
- package/node/esm/control.mjs +216 -0
- package/node/esm/gpD-9LDW92phhoma.mjs +32 -0
- package/node/esm/group.mjs +123 -0
- package/node/esm/index.mjs +15830 -8966
- package/node/esm/note.mjs +113 -0
- package/node/esm/picture.mjs +86 -0
- package/node/esm/shape.mjs +735 -0
- package/node/esm/sigD1UFqvPlWUw_9.mjs +128 -0
- package/node/esm/slicer.mjs +278 -0
- package/node/esm/umljAT66yb3_rURh.mjs +320 -0
- package/package.json +55 -14
- package/resources/contents.json +24 -0
- package/resources/locales/contents.json +56 -0
- package/resources/locales/de/chart.cmd.json +82 -0
- package/resources/locales/de/movable.cmd.json +154 -0
- package/resources/locales/de/picture.cmd.json +31 -0
- package/resources/locales/de/selection.cmd.json +8 -0
- package/resources/locales/de/shape.cmd.json +17 -0
- package/resources/locales/de/sheet.cmd.json +339 -21
- package/resources/locales/de/slicer.cmd.json +17 -0
- package/resources/locales/de/table.cmd.json +9 -1
- package/resources/locales/de/ui.msg.json +321 -3
- package/resources/locales/de/workbook.cmd.json +15 -6
- package/resources/locales/en/chart.cmd.json +82 -0
- package/resources/locales/en/movable.cmd.json +154 -0
- package/resources/locales/en/picture.cmd.json +31 -0
- package/resources/locales/en/selection.cmd.json +8 -0
- package/resources/locales/en/shape.cmd.json +17 -0
- package/resources/locales/en/sheet.cmd.json +353 -22
- package/resources/locales/en/slicer.cmd.json +17 -0
- package/resources/locales/en/table.cmd.json +9 -1
- package/resources/locales/en/ui.msg.json +321 -3
- package/resources/locales/en/workbook.cmd.json +16 -7
- package/types/chart.d.ts +2 -0
- package/types/control.d.ts +2 -0
- package/types/group.d.ts +2 -0
- package/types/note.d.ts +2 -0
- package/types/picture.d.ts +2 -0
- package/types/shape.d.ts +2 -0
- package/types/slicer.d.ts +2 -0
- package/types/src/annotation/RangeAnnotations.d.ts +119 -0
- package/types/src/annotation/index.d.ts +2 -0
- package/types/src/autoFill/AutoFillPresets.d.ts +14 -0
- package/types/src/autoFill/FillMenu.d.ts +36 -0
- package/types/src/autoFill/FillSeries.d.ts +38 -0
- package/types/src/autoFill/index.d.ts +4 -0
- package/types/src/border/StaticBorderRenderer.d.ts +19 -2
- package/types/src/border/useBorders.d.ts +81 -8
- package/types/src/cell/CornerTriangle.d.ts +6 -0
- package/types/src/cell/FormulaCellRenderer.d.ts +6 -3
- package/types/src/cell/OutlineButton.d.ts +123 -0
- package/types/src/cell/SheetCellRenderer.d.ts +2 -2
- package/types/src/cell/SheetHeaderRenderer.d.ts +5 -0
- package/types/src/cell/StaticCellRenderer.d.ts +57 -0
- package/types/src/cell/index.d.ts +2 -0
- package/types/src/cell/useFormulaViewAnchor.d.ts +3 -3
- package/types/src/chart/ChartCommands.d.ts +15 -0
- package/types/src/chart/ChartEditor.d.ts +10 -2
- package/types/src/chart/ChartElement.d.ts +111 -0
- package/types/src/chart/ChartKind.d.ts +7 -0
- package/types/src/chart/PresetChartTypeDescriptors.d.ts +3 -1
- package/types/src/chart/index.d.ts +2 -1
- package/types/src/chart/paint/_fills.d.ts +24 -0
- package/types/src/chart/paint/_graphics.d.ts +46 -0
- package/types/src/chart/paint/echarts.d.ts +30 -0
- package/types/src/chart/paint/index.d.ts +12 -0
- package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +132 -0
- package/types/src/chart/paint/kinds/_Area.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_BoxWhisker.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bubble.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Funnel.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Histogram.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Line.d.ts +10 -0
- package/types/src/chart/paint/kinds/_OfPie.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Pie.d.ts +21 -0
- package/types/src/chart/paint/kinds/_Placeholder.d.ts +7 -0
- package/types/src/chart/paint/kinds/_Radar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Scatter.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Sunburst.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Surface.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Treemap.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Waterfall.d.ts +3 -0
- package/types/src/chart/paint/kinds/_builtIns.d.ts +12 -0
- package/types/src/chart/paint/toEChartsOption.d.ts +31 -0
- package/types/src/checklist/ValueChecklist.d.ts +112 -0
- package/types/src/checklist/index.d.ts +2 -0
- package/types/src/clipboard/ClipboardCommands.d.ts +3 -3
- package/types/src/clipboard/SheetClipboardLayer.d.ts +2 -2
- package/types/src/commands/ContextualToolbar.d.ts +19 -0
- package/types/src/commands/createTransactionalMiddleware.d.ts +4 -1
- package/types/src/commands/index.d.ts +1 -0
- package/types/src/comment/CommentCardRequest.d.ts +94 -0
- package/types/src/comment/CommentUtils.d.ts +43 -0
- package/types/src/comment/NoteEditor.d.ts +20 -0
- package/types/src/comment/index.d.ts +5 -0
- package/types/src/comment/useCommentThread.d.ts +37 -0
- package/types/src/comment/useSheetComments.d.ts +28 -0
- package/types/src/{sheet → conditionalFormat}/ConditionalFormatPresets.d.ts +6 -6
- package/types/src/conditionalFormat/index.d.ts +1 -0
- package/types/src/context/WorksheetContext.d.ts +18 -0
- package/types/src/context/index.d.ts +1 -1
- package/types/src/control/FormControlRenderers.d.ts +22 -0
- package/types/src/editor/EditorCommands.d.ts +3 -3
- package/types/src/editor/FunctionPreviewPanel.d.ts +15 -1
- package/types/src/editor/NamedItemLabel.d.ts +29 -0
- package/types/src/editor/NamedItemsPanel.d.ts +13 -2
- package/types/src/editor/SheetCellEditorLayer.d.ts +5 -9
- package/types/src/editor/SheetCellEditorStartLayer.d.ts +61 -0
- package/types/src/editor/SheetCellInput.d.ts +26 -2
- package/types/src/editor/SheetEditable.d.ts +14 -8
- package/types/src/editor/SheetReferenceLayer.d.ts +4 -4
- package/types/src/editor/VirtualKeyboardLayer.d.ts +49 -0
- package/types/src/editor/formulaAnchor.d.ts +12 -0
- package/types/src/editor/formulaCaret.d.ts +39 -10
- package/types/src/editor/formulaEval.d.ts +9 -5
- package/types/src/editor/formulaLint.d.ts +36 -0
- package/types/src/editor/formulaPresentation.d.ts +7 -0
- package/types/src/editor/formulaText.d.ts +17 -5
- package/types/src/editor/functionArgs.d.ts +20 -0
- package/types/src/editor/index.d.ts +5 -1
- package/types/src/editor/pickedReference.d.ts +76 -0
- package/types/src/editor/useEditRejectedNotice.d.ts +32 -0
- package/types/src/editor/useFormulaHints.d.ts +95 -5
- package/types/src/editor/useFormulaInput.d.ts +30 -4
- package/types/src/editor/useReferenceMode.d.ts +12 -0
- package/types/src/editor/validationAlert.d.ts +24 -0
- package/types/src/externalLink/ExternalLinksPaneArgs.d.ts +23 -0
- package/types/src/externalLink/index.d.ts +2 -0
- package/types/src/form/FormulaInput.d.ts +18 -2
- package/types/src/form/FormulaInputParts.d.ts +10 -1
- package/types/src/form/useEditCommit.d.ts +23 -3
- package/types/src/form/useInputField.d.ts +2 -3
- package/types/src/frame/CommandContext.d.ts +189 -7
- package/types/src/group/GroupEditor.d.ts +25 -0
- package/types/src/index.d.ts +14 -2
- package/types/src/io/WorkbookIO.d.ts +2 -0
- package/types/src/layer/BorderLayer.d.ts +2 -2
- package/types/src/layer/CellErrorLayer.d.ts +26 -9
- package/types/src/layer/CellFillLayer.d.ts +2 -2
- package/types/src/layer/CellInsertLayer.d.ts +71 -0
- package/types/src/layer/CircularIndicatorLayer.d.ts +2 -2
- package/types/src/layer/CommentCardLayer.d.ts +43 -0
- package/types/src/layer/CommentsLayer.d.ts +35 -0
- package/types/src/layer/ConditionalBarLayer.d.ts +2 -2
- package/types/src/layer/ConditionalIcons.d.ts +4 -4
- package/types/src/layer/ConditionalIconsLayer.d.ts +2 -2
- package/types/src/layer/ContextMenuLayer.d.ts +2 -2
- package/types/src/layer/FreezeDragLines.d.ts +17 -0
- package/types/src/layer/GridFreezeLayer.d.ts +11 -0
- package/types/src/layer/HeaderFreezeLayer.d.ts +12 -0
- package/types/src/layer/HeaderResizerLayer.d.ts +2 -1
- package/types/src/layer/HyperlinkLayer.d.ts +109 -0
- package/types/src/layer/MovableKindScope.d.ts +17 -0
- package/types/src/layer/ProtectionLayer.d.ts +52 -0
- package/types/src/layer/RangeAnnotationLayer.d.ts +71 -0
- package/types/src/layer/ResizeIndicator.d.ts +11 -10
- package/types/src/layer/ResizeTooltip.d.ts +13 -0
- package/types/src/layer/SheetBackgroundLayer.d.ts +3 -3
- package/types/src/layer/SheetCellLayer.d.ts +4 -4
- package/types/src/layer/SheetColumnButtonLayer.d.ts +2 -2
- package/types/src/layer/SheetGridLineLayer.d.ts +11 -13
- package/types/src/layer/SheetHeaderCellLayer.d.ts +10 -1
- package/types/src/layer/SheetLayers.d.ts +115 -0
- package/types/src/layer/SheetMovableLayer.d.ts +2 -2
- package/types/src/layer/SheetOutlineLayer.d.ts +40 -0
- package/types/src/layer/SheetTableCommandLayer.d.ts +2 -2
- package/types/src/layer/SpillLayer.d.ts +2 -2
- package/types/src/layer/TableLayer.d.ts +6 -5
- package/types/src/layer/TableToolbar.d.ts +42 -0
- package/types/src/layer/ValidationDropdownLayer.d.ts +17 -7
- package/types/src/layer/ValidationIndicatorLayer.d.ts +11 -5
- package/types/src/layer/ValidationPromptLayer.d.ts +65 -0
- package/types/src/layer/_tableColor.d.ts +4 -0
- package/types/src/layer/cellTip.d.ts +13 -0
- package/types/src/layer/freezeDragState.d.ts +21 -0
- package/types/src/layer/index.d.ts +14 -1
- package/types/src/layer/resizeIndicatorState.d.ts +3 -1
- package/types/src/layer/useFreezeDrag.d.ts +22 -0
- package/types/src/layer/useNormalBorderLines.d.ts +15 -0
- package/types/src/layer/useSheetFeatureRegions.d.ts +2 -2
- package/types/src/layer/useSheetVisibleCells.d.ts +2 -2
- package/types/src/layer/useSheetVisibleDecorations.d.ts +2 -2
- package/types/src/layer/useTableHeaderCells.d.ts +2 -2
- package/types/src/layer/useValidationPicker.d.ts +37 -37
- package/types/src/layer/useVisibleTables.d.ts +2 -2
- package/types/src/layer/validationMark.d.ts +63 -0
- package/types/src/listener/index.d.ts +5 -0
- package/types/src/listener/useCell.d.ts +29 -0
- package/types/src/listener/useCellRange.d.ts +23 -0
- package/types/src/listener/useCellValue.d.ts +26 -0
- package/types/src/listener/useModelListener.d.ts +8 -8
- package/types/src/listener/useRangeSnapshot.d.ts +35 -0
- package/types/src/listener/useTable.d.ts +26 -0
- package/types/src/movable/ConnectionSites.d.ts +18 -0
- package/types/src/movable/DefaultMovable.d.ts +8 -0
- package/types/src/movable/IMovableArea.d.ts +56 -0
- package/types/src/movable/MovableAdornment.d.ts +26 -0
- package/types/src/movable/MovableCommandGroups.d.ts +40 -0
- package/types/src/movable/MovableCommands.d.ts +8 -3
- package/types/src/movable/MovableControl.d.ts +78 -0
- package/types/src/movable/MovableEdit.d.ts +22 -0
- package/types/src/movable/MovableFrame.d.ts +16 -13
- package/types/src/movable/MovableLayer.d.ts +25 -7
- package/types/src/movable/MovableRenderers.d.ts +210 -0
- package/types/src/movable/PlaceholderFrames.d.ts +11 -0
- package/types/src/movable/RotateHandle.d.ts +37 -0
- package/types/src/movable/TextBox.d.ts +34 -0
- package/types/src/movable/connect.d.ts +16 -0
- package/types/src/movable/framePlacement.d.ts +72 -0
- package/types/src/movable/geometry.d.ts +61 -0
- package/types/src/movable/index.d.ts +11 -0
- package/types/src/movable/pressTarget.d.ts +20 -0
- package/types/src/picker/PickerPanel.d.ts +52 -0
- package/types/src/picker/cellPickerOpen.d.ts +6 -0
- package/types/src/picker/index.d.ts +4 -0
- package/types/src/picker/useCellPicker.d.ts +95 -0
- package/types/src/picture/PictureCommands.d.ts +12 -0
- package/types/src/picture/PictureKind.d.ts +7 -0
- package/types/src/picture/index.d.ts +0 -1
- package/types/src/protection/ProtectionPaneArgs.d.ts +31 -0
- package/types/src/protection/index.d.ts +3 -0
- package/types/src/protection/unlockProtectedRanges.d.ts +23 -0
- package/types/src/richText/RichTextEditor.d.ts +41 -0
- package/types/src/richText/index.d.ts +2 -0
- package/types/src/selection/SelectionCommands.d.ts +2 -2
- package/types/src/selection/SheetSelectionLayer.d.ts +16 -12
- package/types/src/shape/ConnectorControl.d.ts +46 -0
- package/types/src/shape/ShapeCommands.d.ts +11 -0
- package/types/src/shape/ShapeControl.d.ts +8 -0
- package/types/src/shape/ShapeEditor.d.ts +15 -2
- package/types/src/shape/ShapeGallery.d.ts +31 -0
- package/types/src/shape/ShapeHandles.d.ts +28 -0
- package/types/src/shape/ShapeKind.d.ts +7 -0
- package/types/src/shape/ShapeSVG.d.ts +22 -0
- package/types/src/shape/ShapeText.d.ts +17 -0
- package/types/src/shape/icons/ShapeIcons.d.ts +16 -0
- package/types/src/shape/icons/_ShapeIconPack.d.ts +4 -0
- package/types/src/shape/index.d.ts +3 -1
- package/types/src/shape/shapeFrame.d.ts +50 -0
- package/types/src/shape/shapeStyle.d.ts +82 -0
- package/types/src/sheet/ISheetHeaderElement.d.ts +1 -1
- package/types/src/sheet/{ISheetElement.d.ts → IWorksheetElement.d.ts} +107 -77
- package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
- package/types/src/sheet/SheetCommandProvider.d.ts +11 -6
- package/types/src/sheet/SheetCommands.d.ts +22 -7
- package/types/src/sheet/SheetKindIcon.d.ts +14 -0
- package/types/src/sheet/SheetOutlineElement.d.ts +70 -0
- package/types/src/sheet/SheetPanels.d.ts +11 -0
- package/types/src/sheet/SheetScrollbar.d.ts +4 -13
- package/types/src/sheet/TopLeftCorner.d.ts +2 -2
- package/types/src/sheet/WorksheetElement.d.ts +12 -0
- package/types/src/sheet/_freezeAt.d.ts +10 -0
- package/types/src/sheet/_useHeaderMetrics.d.ts +11 -0
- package/types/src/sheet/circularReferences.d.ts +12 -4
- package/types/src/sheet/index.d.ts +6 -3
- package/types/src/sheet/useCycleHighlight.d.ts +21 -0
- package/types/src/slicer/SlicerCommands.d.ts +10 -0
- package/types/src/slicer/SlicerEditor.d.ts +8 -2
- package/types/src/slicer/SlicerKind.d.ts +7 -0
- package/types/src/slicer/SlicerStylePreview.d.ts +18 -0
- package/types/src/slicer/index.d.ts +2 -1
- package/types/src/slicer/slicerStyles.d.ts +32 -0
- package/types/src/tabStrip/SheetTab.d.ts +1 -1
- package/types/src/tabStrip/TabStrip.d.ts +7 -0
- package/types/src/table/TableCommands.d.ts +2 -2
- package/types/src/taskPane/ITaskPane.d.ts +12 -1
- package/types/src/taskPane/MovablePane.d.ts +17 -0
- package/types/src/taskPane/TaskPaneArea.d.ts +7 -0
- package/types/src/taskPane/index.d.ts +1 -0
- package/types/src/theme/ThemeState.d.ts +14 -1
- package/types/src/theme/buildOOXMLThemeCSS.d.ts +2 -2
- package/types/src/theme/useGridColorScheme.d.ts +2 -2
- package/types/src/theme/useSystemColors.d.ts +2 -2
- package/types/src/workbook/DefaultMovableRenderers.d.ts +20 -0
- package/types/src/workbook/DefaultRenderers.d.ts +3 -2
- package/types/src/workbook/IWorkbookElement.d.ts +51 -5
- package/types/src/workbook/WorkbookCommands.d.ts +2 -4
- package/types/src/workbook/WorkbookStrip.d.ts +9 -0
- package/types/src/workbook/_followOrigin.d.ts +9 -0
- package/types/src/workbook/useWorkbookFormat.d.ts +3 -3
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
- package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +0 -156
- package/browser/cjs/index.cjs +0 -35
- package/browser/esm/SJMJzBwlXTJ9QIO5.mjs +0 -6286
- package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-template.json.d.ts +0 -9
- package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-template.json.d.ts +0 -9
- package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-template.json.d.ts +0 -9
- package/types/src/chart/templates/line-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-template.json.d.ts +0 -9
- package/types/src/chart/templates/pie-doughnut-template.json.d.ts +0 -10
- package/types/src/chart/templates/pie-template.json.d.ts +0 -9
- package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-markers-template.json.d.ts +0 -10
- package/types/src/context/SheetContext.d.ts +0 -18
- package/types/src/editor/useProtectedEditNotice.d.ts +0 -14
- package/types/src/layer/validationList.d.ts +0 -84
- package/types/src/list/SheetValueList.d.ts +0 -93
- package/types/src/list/index.d.ts +0 -2
- package/types/src/movable/MoveableBundle.d.ts +0 -4
- package/types/src/sheet/SheetElement.d.ts +0 -15
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CellCoords, MaybePromise } from '@sheetxl/utils';
|
|
3
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
4
|
+
import { GridAnchor, IEditable } from '@sheetxl/grid-react';
|
|
5
|
+
import { PickerItem } from './PickerPanel';
|
|
6
|
+
/**
|
|
7
|
+
* What a cell picker needs. Deliberately only an anchor, an item source and where a choice goes:
|
|
8
|
+
* the picker does not care who opened it, so a dropdown button, a Sheets-mode in-cell triangle and
|
|
9
|
+
* an Alt+Down command all open the identical component.
|
|
10
|
+
*/
|
|
11
|
+
export interface CellPickerOptions {
|
|
12
|
+
/** The sheet the cell is on: its `Normal` font, its current text, and the open flag. */
|
|
13
|
+
sheet: IWorksheet;
|
|
14
|
+
/**
|
|
15
|
+
* The editable a default choice is entered through — the same path as typing the item's text, so
|
|
16
|
+
* the value coerces and formats as a typed one does. Not needed when {@link onChoose} is given.
|
|
17
|
+
*/
|
|
18
|
+
editable?: IEditable<any, string, any> | null;
|
|
19
|
+
/** The cell the picker is for. `null` offers nothing until {@link CellPicker.open} is given one. */
|
|
20
|
+
cell: CellCoords | null;
|
|
21
|
+
/**
|
|
22
|
+
* What the menu drops under — the **cell / merge** range, not a button. Excel anchors a list to the
|
|
23
|
+
* cell, and it is what every opener can supply. `null` until there is a cell.
|
|
24
|
+
*/
|
|
25
|
+
anchor: GridAnchor | null;
|
|
26
|
+
/** The anchored cell / merge width (px): the menu's width floor (see `PickerPanelProps.minWidth`). */
|
|
27
|
+
minWidth?: number;
|
|
28
|
+
/** The rows to offer at `cell`, asked when the menu opens. */
|
|
29
|
+
resolveItems: (cell: CellCoords) => Promise<readonly PickerItem[]>;
|
|
30
|
+
/**
|
|
31
|
+
* The text of the row highlighted when the menu opens, when that is not the cell's text (a totals
|
|
32
|
+
* cell shows its result, but its row is the function). @defaultValue the cell's text
|
|
33
|
+
*/
|
|
34
|
+
getCurrentText?: (cell: CellCoords) => string | null;
|
|
35
|
+
/**
|
|
36
|
+
* What a choice does. @defaultValue the item's text entered into the cell through the editable
|
|
37
|
+
* ({@link commitListPick}).
|
|
38
|
+
*/
|
|
39
|
+
onChoose?: (item: PickerItem, cell: CellCoords) => void;
|
|
40
|
+
/** A search field above the list. @defaultValue false */
|
|
41
|
+
search?: boolean;
|
|
42
|
+
/** Rows shown before the list scrolls. See `PickerPanelProps.visibleRows`. */
|
|
43
|
+
visibleRows?: number;
|
|
44
|
+
/** The float's label, for the stack's bookkeeping. @defaultValue `'cell-picker'` */
|
|
45
|
+
label?: string;
|
|
46
|
+
}
|
|
47
|
+
/** Where a picker opens, when its host has more than one cell to offer it at. */
|
|
48
|
+
export interface CellPickerTarget {
|
|
49
|
+
/** See {@link CellPickerOptions.cell}. */
|
|
50
|
+
cell: CellCoords;
|
|
51
|
+
/** See {@link CellPickerOptions.anchor}. */
|
|
52
|
+
anchor: GridAnchor;
|
|
53
|
+
/** See {@link CellPickerOptions.minWidth}. */
|
|
54
|
+
minWidth?: number;
|
|
55
|
+
}
|
|
56
|
+
/** The picker, ready to drop into JSX and drive. */
|
|
57
|
+
export interface CellPicker {
|
|
58
|
+
/** Render this. */
|
|
59
|
+
component: React.ReactNode;
|
|
60
|
+
/**
|
|
61
|
+
* Open the menu. Resolves the items first, so the menu appears filled.
|
|
62
|
+
*
|
|
63
|
+
* @param target Where to open it, in place of the options' `cell`, `anchor` and `minWidth` — for a
|
|
64
|
+
* host that keeps one picker for many cells.
|
|
65
|
+
*/
|
|
66
|
+
open: (target?: CellPickerTarget) => Promise<void>;
|
|
67
|
+
/** Close it. */
|
|
68
|
+
close: () => void;
|
|
69
|
+
/** Whether it is currently open (reactive). */
|
|
70
|
+
isOpen: boolean;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Enter `text` into `cell` as a typed entry: an edit session seeded with the text and committed at
|
|
74
|
+
* once, so the value coerces, formats and is checked exactly as if it had been typed.
|
|
75
|
+
*
|
|
76
|
+
* @returns Whether the entry was written, or a promise of that while the entry is checked. A refused
|
|
77
|
+
* entry leaves the cell as it was; a pick that opened its own edit closes it, and the alert it raised
|
|
78
|
+
* stays up.
|
|
79
|
+
*/
|
|
80
|
+
export declare const commitListPick: (editable: IEditable<any, string, any>, cell: CellCoords, text: string) => MaybePromise<boolean>;
|
|
81
|
+
/**
|
|
82
|
+
* A **cell picker** — a menu through the shared float stack (so it gets the portal, stacking,
|
|
83
|
+
* light-dismiss and Escape every other popup in the app has), positioned by the grid on the cell it is
|
|
84
|
+
* for (`renderGridFloatPanel`), so it moves with the cell as the grid scrolls, as the cell's button does.
|
|
85
|
+
*
|
|
86
|
+
* @remarks
|
|
87
|
+
* The menu wears the GRID's theme, not the app's: it is part of the cell it drops from, so the grid
|
|
88
|
+
* float carries the grid surface and the grid's own mode (a dark menu over a dark grid in a light app).
|
|
89
|
+
*
|
|
90
|
+
* The items are asked of `resolveItems` when the menu opens, for this cell — a relative source gives
|
|
91
|
+
* each row its own list. A choice goes to `onChoose`, or by default is entered through the editable
|
|
92
|
+
* ({@link commitListPick}), never written to the cell directly.
|
|
93
|
+
*/
|
|
94
|
+
export declare const useCellPicker: (options: CellPickerOptions) => CellPicker;
|
|
95
|
+
//# sourceMappingURL=useCellPicker.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command } from '@sheetxl/utils-react';
|
|
2
|
+
import { MovableKindCommandData } from '../movable';
|
|
3
|
+
/**
|
|
4
|
+
* The picture kind's commands, for the active picture. Chrome is the `picture` catalog.
|
|
5
|
+
*
|
|
6
|
+
* Change Picture shows another image in the same frame, as Excel's does: from a file
|
|
7
|
+
* (`changePictureFromFile`, a file dialog) or from the web (`changePictureFromURL`, an input
|
|
8
|
+
* dialog). The image is read before the picture takes it, so a bad address or an unreadable file
|
|
9
|
+
* changes nothing. Dialog-driven and self-committing, so `noTransaction` / `noRepeat`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const contributePictureCommands: Command.DynamicCommandContributor<MovableKindCommandData>;
|
|
12
|
+
//# sourceMappingURL=PictureCommands.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MovableRendererModule } from '../movable/MovableRenderers';
|
|
2
|
+
/**
|
|
3
|
+
* The picture kind, as the renderer registry loads it: one module, so a failed fetch can be
|
|
4
|
+
* imported again whole.
|
|
5
|
+
*/
|
|
6
|
+
export declare const PictureKind: MovableRendererModule;
|
|
7
|
+
//# sourceMappingURL=PictureKind.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ItemsPaneArgs } from '../taskPane';
|
|
2
|
+
/**
|
|
3
|
+
* The activation argument the **Manage Protection** pane understands.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Lives with the protection feature rather than with the task-pane primitives: `taskPane` is the
|
|
7
|
+
* generic host and knows nothing about what any particular pane shows.
|
|
8
|
+
*
|
|
9
|
+
* The pane consolidates several subjects that used to live in separate places, so every command
|
|
10
|
+
* that opens it says which one it means. Absent ⇒ the pane keeps whichever tab it is on (`sheet` on a
|
|
11
|
+
* fresh open). It is scoped to ONE activation, like every `args` payload — see
|
|
12
|
+
* `TaskPaneProps.args`.
|
|
13
|
+
*/
|
|
14
|
+
export interface ProtectionPaneArgs {
|
|
15
|
+
/** Which tab to show. */
|
|
16
|
+
tab?: ProtectionPaneArgs.Tab;
|
|
17
|
+
/**
|
|
18
|
+
* Forwarded to the Ranges list — `{ insert: true }` opens it on a NEW range anchored to
|
|
19
|
+
* the selection, which is what an "Unlock Range…" command asks for.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Kept as a nested field rather than folded into this one: it is the generic items contract, and
|
|
23
|
+
* the other tabs have nothing to do with it.
|
|
24
|
+
*/
|
|
25
|
+
items?: ItemsPaneArgs;
|
|
26
|
+
}
|
|
27
|
+
export declare namespace ProtectionPaneArgs {
|
|
28
|
+
/** In display order. `ranges` is Excel's "Allow Edit Ranges": the ranges that stay editable. */
|
|
29
|
+
type Tab = 'sheet' | 'ranges' | 'cells' | 'workbook';
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=ProtectionPaneArgs.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IProtectedRange } from '@sheetxl/sdk';
|
|
2
|
+
import { IReactNotifier } from '@sheetxl/utils-react';
|
|
3
|
+
/**
|
|
4
|
+
* Excel's **Unlock Range** dialog: asks for the password of a protected range and grants session
|
|
5
|
+
* access to it (`IProtectedRange.unlock`).
|
|
6
|
+
*
|
|
7
|
+
* @param notifier The host's notifier; without one there is no way to ask, and this resolves `false`.
|
|
8
|
+
* @param ranges The ranges in question — typically the ones covering one cell. Those that need no
|
|
9
|
+
* password, or are already unlocked, are ignored.
|
|
10
|
+
* @returns `true` when the cell is editable afterwards — every range was already open, or the
|
|
11
|
+
* password matched at least one of them. `false` on cancel.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* A wrong password keeps the dialog open with a message rather than closing it and re-asking, so
|
|
15
|
+
* the check runs inside the dialog's submit validation — where an async password derivation
|
|
16
|
+
* belongs (the dialog shows a spinner while it runs).
|
|
17
|
+
*
|
|
18
|
+
* When several password-bearing ranges cover the cell, one password is asked for and tried against
|
|
19
|
+
* all of them: ANY covering range being unlocked is what makes the cell editable (Excel's rule, and
|
|
20
|
+
* the write path's), so there is no reason to ask which.
|
|
21
|
+
*/
|
|
22
|
+
export declare const promptUnlockProtectedRanges: (notifier: IReactNotifier | null | undefined, ranges: readonly IProtectedRange[]) => Promise<boolean>;
|
|
23
|
+
//# sourceMappingURL=unlockProtectedRanges.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IRichText, IFontStyle } from '@sheetxl/sdk';
|
|
3
|
+
/**
|
|
4
|
+
* The contract of a rich text editor: text in, edited text out. A host may supply its own in place
|
|
5
|
+
* of the default {@link RichTextEditor}.
|
|
6
|
+
*/
|
|
7
|
+
export interface RichTextEditorProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
8
|
+
/**
|
|
9
|
+
* The text: plain, or formatting runs.
|
|
10
|
+
*/
|
|
11
|
+
value: IRichText.JSON | string;
|
|
12
|
+
/**
|
|
13
|
+
* Called with the edited text when the edit is committed, which is when the editor loses focus.
|
|
14
|
+
* Not called when nothing changed.
|
|
15
|
+
*/
|
|
16
|
+
onChange?: (value: IRichText.JSON | string) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Called when the person leaves the editor with Escape, after the commit.
|
|
19
|
+
*/
|
|
20
|
+
onDone?: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* If true, the text is shown but cannot be edited.
|
|
23
|
+
* @defaultValue false
|
|
24
|
+
*/
|
|
25
|
+
readOnly?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The CSS for the font properties a run sets.
|
|
28
|
+
*/
|
|
29
|
+
runStyle?: (font: IFontStyle.JSON) => React.CSSProperties | undefined;
|
|
30
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The default rich text editor: the runs drawn as they are formatted, edited in place.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* Typing keeps the formatting of the run it is in; it does not apply formatting. The edit is
|
|
37
|
+
* committed when the editor loses focus. Keystrokes and clipboard events stay in the editor, so the
|
|
38
|
+
* grid and the surrounding movable do not act on them.
|
|
39
|
+
*/
|
|
40
|
+
export declare const RichTextEditor: React.NamedExoticComponent<Omit<RichTextEditorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
//# sourceMappingURL=RichTextEditor.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RemoveListener } from '@sheetxl/utils';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
import { Command } from '@sheetxl/utils-react';
|
|
4
4
|
import { SelectionNavigation } from '@sheetxl/grid-react';
|
|
5
5
|
/** The single `data` bundle {@link contributeSelectionCommands} takes (the `DynamicCommandContributor` shape). */
|
|
6
6
|
export interface SelectionCommandData {
|
|
7
7
|
/** `null` on the first render — the layer's `SelectionNavigation` is produced by its child via a ref. */
|
|
8
8
|
navigation: SelectionNavigation | null;
|
|
9
|
-
sheet?:
|
|
9
|
+
sheet?: IWorksheet;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Contribute the selection **behavior** onto `contribution` (a per-pane layer scope's contribution), as thin
|
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { IShowToolTipProperties } from '@sheetxl/utils-react';
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
4
3
|
import { LayerProps } from '@sheetxl/grid-react';
|
|
4
|
+
import { CommandContext } from '../frame';
|
|
5
|
+
import { SheetLocation } from '../sheet';
|
|
5
6
|
export interface SheetSelectionLayerProps extends LayerProps {
|
|
6
7
|
/** The sheet whose `getSelection()` this layer drives. */
|
|
7
|
-
sheet:
|
|
8
|
+
sheet: IWorksheet;
|
|
8
9
|
/** Whether this sheet/pane is the active one (gates move/fill interaction). */
|
|
9
10
|
isActive?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
/**
|
|
12
|
+
* A right-button drag of the fill handle was released: show the fill menu at `location` and run
|
|
13
|
+
* whatever `menu` entry is chosen. The menu is chrome, so the consumer renders it (MUI in the
|
|
14
|
+
* studio); `menu` answers every question it has. Call `menu.cancel()` when the menu closes, so a
|
|
15
|
+
* dismissal ends the drag (the dashed preview stays up until it does). Omit to leave the
|
|
16
|
+
* right-drag inert.
|
|
17
|
+
*/
|
|
18
|
+
onFillMenu?: (location: SheetLocation, menu: CommandContext.FillMenu) => void;
|
|
14
19
|
}
|
|
15
20
|
/**
|
|
16
21
|
* Renders the generic grid-react {@link SelectionLayer} wired with the
|
|
17
22
|
* sheet interaction config — a {@link SheetSelection} model, the **move grip** (`onMove`: move/copy/insert
|
|
18
|
-
* with an overwrite-confirm), the **fill handle** (`onFill`: auto-fill,
|
|
19
|
-
* drag
|
|
20
|
-
*
|
|
23
|
+
* with an overwrite-confirm), the **fill handle** (`onFill`: auto-fill), the **gesture tips** (a
|
|
24
|
+
* drag-select's size, a move's destination, the value a fill would write), the drag **edit modes**
|
|
25
|
+
* (cursor/description while dragging the grip or fill), and the enable gating — and, when a command
|
|
26
|
+
* scope is present, contributes the selection nav onto it (yielding the layer's keyboard).
|
|
21
27
|
*
|
|
22
28
|
* @remarks
|
|
23
29
|
* The *smart* selection logic (merge / hidden / contentful nav, bounds) lives in the model
|
|
24
30
|
* ({@link SheetSelection} → `IRangeSelection`); this layer only wires the view-side interactions the model
|
|
25
31
|
* doesn't own.
|
|
26
|
-
* The fill preview tooltip is threaded via `onShowTooltip`/`onCloseTooltip` — a float
|
|
27
|
-
* provider would eventually replace that prop-drilling.
|
|
28
32
|
*/
|
|
29
33
|
export declare const SheetSelectionLayer: React.FC<SheetSelectionLayerProps>;
|
|
30
34
|
//# sourceMappingURL=SheetSelectionLayer.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Point } from '@sheetxl/utils';
|
|
3
|
+
import { IMovable } from '@sheetxl/sdk';
|
|
4
|
+
import { ContentControlProps } from '../movable/MovableControl';
|
|
5
|
+
/** A movable the dragged end may glue to, where it is now. */
|
|
6
|
+
export interface Candidate {
|
|
7
|
+
movable: IMovable;
|
|
8
|
+
placement: IMovable.Placement;
|
|
9
|
+
}
|
|
10
|
+
/** The site a dragged end would glue to if released now. */
|
|
11
|
+
export interface Hit {
|
|
12
|
+
target: IMovable;
|
|
13
|
+
index: number;
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The movables on the sheet a connector may glue to: every one but itself and the groups it is
|
|
19
|
+
* in. Which of them offer sites is the model's to say (a group and a connector offer none).
|
|
20
|
+
*/
|
|
21
|
+
export declare const collectCandidates: (connector: IMovable) => Candidate[];
|
|
22
|
+
/**
|
|
23
|
+
* The site the end snaps to from `point`: the nearest site of a movable the point is on (inside
|
|
24
|
+
* its frame, grown by a margin), else the nearest site within reach; `null` for none.
|
|
25
|
+
*/
|
|
26
|
+
export declare const snapToSite: (point: Point, candidates: readonly Candidate[], zoom: number) => Hit | null;
|
|
27
|
+
/**
|
|
28
|
+
* Where a dragged end goes when its direction from `from` is held to a multiple of `step` degrees:
|
|
29
|
+
* `to` projected onto the nearest allowed direction, so a level or upright line ends where the
|
|
30
|
+
* pointer is along it.
|
|
31
|
+
*/
|
|
32
|
+
export declare const constrainAngle: (from: Point, to: Point, step?: number) => Point;
|
|
33
|
+
/**
|
|
34
|
+
* A selected connector's control: a round handle at each end in place of the outline and resize
|
|
35
|
+
* handles, as Excel draws it. Dragging one runs the line from the other end to the pointer, and
|
|
36
|
+
* glues it to a movable's connection site when released on one: every movable shows its sites
|
|
37
|
+
* while the end is held (the layer's `ConnectionSites`), and the site the end would take is
|
|
38
|
+
* marked. Shift holds a free end to steps of 15 degrees about the other end; a site still wins.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* An end is a corner of the connector's frame; the frame between the two ends is what the SDK's
|
|
42
|
+
* connector placement answers, so the drag previews through the layer's resize loop and commits
|
|
43
|
+
* the placement with the glued end in one step.
|
|
44
|
+
*/
|
|
45
|
+
export declare const ConnectorControl: React.FC<ContentControlProps>;
|
|
46
|
+
//# sourceMappingURL=ConnectorControl.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Command } from '@sheetxl/utils-react';
|
|
2
|
+
import { MovableKindCommandData } from '../movable';
|
|
3
|
+
/**
|
|
4
|
+
* The shape kind's commands, for the active shape. Chrome is the `shape` catalog.
|
|
5
|
+
*
|
|
6
|
+
* `changeShape` takes what an Insert > Shapes gallery entry states (a preset name, or the entry's
|
|
7
|
+
* JSON) and makes the shape that preset, as Excel's Change Shape does. A line or connector has none:
|
|
8
|
+
* its preset is what joins its ends.
|
|
9
|
+
*/
|
|
10
|
+
export declare const contributeShapeCommands: Command.DynamicCommandContributor<MovableKindCommandData>;
|
|
11
|
+
//# sourceMappingURL=ShapeCommands.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ContentControlProps } from '../movable/MovableControl';
|
|
3
|
+
/**
|
|
4
|
+
* The selection control of a shape: a connector gets its endpoint handles, every other shape the
|
|
5
|
+
* generic outline, resize and rotate handles.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ShapeControl: React.FC<ContentControlProps>;
|
|
8
|
+
//# sourceMappingURL=ShapeControl.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { IShape } from '@sheetxl/sdk';
|
|
2
3
|
import { MovableElementProps } from '../movable';
|
|
3
4
|
export interface ShapeEditorAttributes {
|
|
4
5
|
isShapeEditor: () => true;
|
|
@@ -6,11 +7,23 @@ export interface ShapeEditorAttributes {
|
|
|
6
7
|
export interface IShapeEditorElement extends HTMLDivElement, ShapeEditorAttributes {
|
|
7
8
|
}
|
|
8
9
|
export interface ShapeEditorProps extends MovableElementProps {
|
|
9
|
-
shape:
|
|
10
|
+
shape: IShape;
|
|
11
|
+
/**
|
|
12
|
+
* Draws the geometry's text rectangle and connection sites over the shape.
|
|
13
|
+
* @defaultValue false
|
|
14
|
+
*/
|
|
15
|
+
debugGeometry?: boolean;
|
|
10
16
|
ref?: React.Ref<IShapeEditorElement>;
|
|
11
17
|
}
|
|
12
18
|
/**
|
|
13
|
-
*
|
|
19
|
+
* A shape in the sheet: its geometry as one SVG that fills the movable's frame, its text at the
|
|
20
|
+
* geometry's text rectangle, and its adjustment handles while it is selected.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* The frame owns position, size and zoom; the drawing is a `viewBox` of the movable's unzoomed
|
|
24
|
+
* bounds stretched to fill it, so a resize re-evaluates the geometry (adjust values are ratios,
|
|
25
|
+
* and the shape stretches as it does in Excel) and zoom thickens lines as Excel's does. A custom
|
|
26
|
+
* geometry is evaluated like a preset, from the definition the file states.
|
|
14
27
|
*/
|
|
15
28
|
export declare const ShapeEditor: React.NamedExoticComponent<Omit<ShapeEditorProps, "ref"> & React.RefAttributes<IShapeEditorElement>>;
|
|
16
29
|
//# sourceMappingURL=ShapeEditor.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IShape } from '@sheetxl/sdk';
|
|
2
|
+
/** One entry of the Insert > Shapes gallery: what it is called and what it inserts. */
|
|
3
|
+
export interface ShapeGalleryEntry {
|
|
4
|
+
/** Unique in the gallery: the entry's icon is `shape:<key>`, and a host remembers it by this. */
|
|
5
|
+
key: string;
|
|
6
|
+
/** The message key of its name. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** What the entry inserts, as `insertShape` takes it. */
|
|
9
|
+
json: IShape.JSON;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* One section of the Insert > Shapes gallery: its heading and its entries in display order.
|
|
13
|
+
*/
|
|
14
|
+
export interface ShapeGalleryCategory {
|
|
15
|
+
key: string;
|
|
16
|
+
label: string;
|
|
17
|
+
entries: readonly ShapeGalleryEntry[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* What a new shape of a preset states: only its intent, the preset (none for `rect`) and, for a
|
|
21
|
+
* line or connector, `type: 'connector'`. Fill, line and text come from the theme's shape style
|
|
22
|
+
* when it is written.
|
|
23
|
+
*/
|
|
24
|
+
export declare const presetShapeJSON: (preset: string) => IShape.JSON;
|
|
25
|
+
/**
|
|
26
|
+
* The Insert > Shapes gallery: Excel's sections, order and names, then a section of the presets
|
|
27
|
+
* Excel's gallery leaves out (`funnel`, the tabs, the gears, the action buttons). Every entry has
|
|
28
|
+
* an icon in the `shape` pack, under its key.
|
|
29
|
+
*/
|
|
30
|
+
export declare const ShapeGallery: readonly ShapeGalleryCategory[];
|
|
31
|
+
//# sourceMappingURL=ShapeGallery.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IGeometry } from '@sheetxl/sdk';
|
|
3
|
+
export type HandleDragPhase = 'move' | 'end' | 'cancel';
|
|
4
|
+
export interface ShapeHandlesProps {
|
|
5
|
+
/** The handles' positions, in the shape's frame. */
|
|
6
|
+
handles: readonly IGeometry.IHandle[];
|
|
7
|
+
/** The shape's frame: the overlay's `viewBox`, so a handle lands exactly on the geometry. */
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
/** Device px per shape px, for a handle that stays the same size on screen at any zoom. */
|
|
11
|
+
zoom: number;
|
|
12
|
+
/**
|
|
13
|
+
* A handle being dragged: its index and where the pointer is, in the shape's frame. `'move'`
|
|
14
|
+
* while the pointer moves, `'end'` when it is released there, `'cancel'` when the drag is lost.
|
|
15
|
+
*/
|
|
16
|
+
onDrag: (index: number, x: number, y: number, phase: HandleDragPhase) => void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The adjustment handles of a selected shape, drawn over its geometry in the same `viewBox`.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Pointer positions are mapped through the overlay's own screen matrix, which folds in the
|
|
23
|
+
* frame's size, the view's zoom and any rotation, so a drag reads in shape-local px however the
|
|
24
|
+
* frame is placed. The overlay itself is pointer-transparent; only the dots take presses, which
|
|
25
|
+
* do not bubble to the frame as a move.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ShapeHandles: React.FC<ShapeHandlesProps>;
|
|
28
|
+
//# sourceMappingURL=ShapeHandles.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MovableRendererModule } from '../movable/MovableRenderers';
|
|
2
|
+
/**
|
|
3
|
+
* The shape kind, as the renderer registry loads it: one module, so a failed fetch can be imported
|
|
4
|
+
* again whole.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ShapeKind: MovableRendererModule;
|
|
7
|
+
//# sourceMappingURL=ShapeKind.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IGeometry, IResource } from '@sheetxl/sdk';
|
|
3
|
+
import { ResolvedShapeStyle } from './shapeStyle';
|
|
4
|
+
import { DeviceGrid } from './shapeFrame';
|
|
5
|
+
/** `pointer-events` for a drawn part: hit where painted, or not at all while the frame is hidden. */
|
|
6
|
+
export type PartHit = 'visiblePainted' | 'none';
|
|
7
|
+
/** A URL an `<image>` can load a resource from: its external URI, or its bytes as a data URL. */
|
|
8
|
+
export declare const resourceUrl: (resource: IResource) => Promise<string>;
|
|
9
|
+
export interface ShapePathsProps {
|
|
10
|
+
geometry: IGeometry;
|
|
11
|
+
/** The shape's style. */
|
|
12
|
+
style: ResolvedShapeStyle;
|
|
13
|
+
zoom: number;
|
|
14
|
+
/** Where the frame lies on the device pixel grid, for the lines to land on it; `null` to draw as evaluated. */
|
|
15
|
+
grid?: DeviceGrid | null;
|
|
16
|
+
hit: PartHit;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Everything a geometry draws: the shape's paths in its style.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ShapePaths: React.FC<ShapePathsProps>;
|
|
22
|
+
//# sourceMappingURL=ShapeSVG.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ITextFrame, IStyleCollection } from '@sheetxl/sdk';
|
|
3
|
+
export interface ShapeTextProps {
|
|
4
|
+
/** The text written on the shape, by paragraph, with how its body sits in the shape. */
|
|
5
|
+
text: ITextFrame.JSON;
|
|
6
|
+
/** Resolves colors through the workbook's theme; `null` reads them without one. */
|
|
7
|
+
styles: IStyleCollection | null;
|
|
8
|
+
/** The color the shape's theme style gives its text, used where a run states none. */
|
|
9
|
+
color?: string | null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The text written on a shape: its paragraphs laid out as the body says — anchored, inset,
|
|
13
|
+
* aligned, spaced — with what formatting its runs carry. Text layout stays in the DOM; nothing
|
|
14
|
+
* here is measured.
|
|
15
|
+
*/
|
|
16
|
+
export declare const ShapeText: React.FC<ShapeTextProps>;
|
|
17
|
+
//# sourceMappingURL=ShapeText.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The icon pack holding one 24x24 icon per preset shape, keyed by the preset name
|
|
3
|
+
* (`IGeometry.Preset`). Separate from the base pack and loaded only when one of its icons is asked
|
|
4
|
+
* for. The icons are generated from the geometry engine (`pnpm gen:shapes:icons` in the SDK).
|
|
5
|
+
*/
|
|
6
|
+
export declare const SHAPE_ICON_PACK = "shape";
|
|
7
|
+
/**
|
|
8
|
+
* The icon key of a preset shape, for `DynamicIcon` or any command or menu that takes an icon key.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <DynamicIcon iconKey={shapeIconKey(IGeometry.Preset.RoundRect)} />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare const shapeIconKey: (preset: string) => string;
|
|
16
|
+
//# sourceMappingURL=ShapeIcons.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Point } from '@sheetxl/utils';
|
|
2
|
+
/**
|
|
3
|
+
* A stroke width in shape px snapped to whole device pixels, never thinner than one: a 1 pt line
|
|
4
|
+
* is 1 px at 100% and 3 px at 200%, as Excel draws it. A width of zero is Excel's hairline, one
|
|
5
|
+
* device pixel at any zoom; a line that is not drawn has no stroke color, not a width of zero.
|
|
6
|
+
*/
|
|
7
|
+
export declare const snapStrokeWidth: (width: number, zoom: number, dpr?: number) => number;
|
|
8
|
+
/**
|
|
9
|
+
* How a shape's drawing lies on the device pixel grid: what it takes to land a line on it. The
|
|
10
|
+
* drawing is in shape px, scaled by `zoom` into the view from the frame's corner, which is on a
|
|
11
|
+
* device pixel, and mirrored about the frame's center where flipped.
|
|
12
|
+
*/
|
|
13
|
+
export interface DeviceGrid {
|
|
14
|
+
/** Device px per view px. */
|
|
15
|
+
dpr: number;
|
|
16
|
+
/** View px per shape px. */
|
|
17
|
+
zoom: number;
|
|
18
|
+
/** The frame, in shape px: what a mirrored drawing is measured from. */
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
flipH: boolean;
|
|
22
|
+
flipV: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** Where a path's end moved when it was snapped: `by`, from `at` (shape px, before the snap). */
|
|
25
|
+
export interface SnappedEnd {
|
|
26
|
+
at: Point;
|
|
27
|
+
by: Point;
|
|
28
|
+
}
|
|
29
|
+
export interface SnappedPath {
|
|
30
|
+
d: string;
|
|
31
|
+
/** The ends of the path's subpaths, for what is drawn at them (a line end) to follow. */
|
|
32
|
+
ends: SnappedEnd[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Path data with every level and upright straight line moved onto the device pixel grid, so a
|
|
36
|
+
* thin stroke along it is crisp rather than smeared over two rows of pixels, as a gridline is. A
|
|
37
|
+
* line's ends go with it, so the lines that meet it stay joined; a curve keeps its control points
|
|
38
|
+
* and bends by the fraction of a pixel its end moved. Slanted lines and curves are left alone.
|
|
39
|
+
*
|
|
40
|
+
* @param d SVG path data in shape px, as {@link IGeometry.forEachPath} gives it.
|
|
41
|
+
* @param strokeWidth The stroke's width in shape px, already snapped to whole device px.
|
|
42
|
+
*/
|
|
43
|
+
export declare const snapPathToDevice: (d: string, grid: DeviceGrid, strokeWidth: number) => SnappedPath;
|
|
44
|
+
/**
|
|
45
|
+
* Path data moved to follow snapped line ends: each subpath by the move of the nearest end in
|
|
46
|
+
* `ends`, so a line end drawn as its own path (an arrowhead) stays on the line it was drawn for.
|
|
47
|
+
* Unchanged when no end moved.
|
|
48
|
+
*/
|
|
49
|
+
export declare const followSnappedEnds: (d: string, ends: readonly SnappedEnd[]) => string;
|
|
50
|
+
//# sourceMappingURL=shapeFrame.d.ts.map
|