@sheetxl/react 0.8.0-beta.2 → 0.8.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +8 -7
- package/browser/esm/6lfBozPNyWlFBEDn.mjs +19 -0
- package/browser/esm/B7TCFLHs7nnOgLMi.mjs +79 -0
- package/browser/esm/BQur1iFrng9Y4kh4.mjs +2706 -0
- package/browser/esm/BjnWnPjhT1QFkbUC.mjs +60 -0
- package/browser/esm/BwMC6jAg2neI4LTH.mjs +32 -0
- package/browser/esm/BzCq_Z7J2qQlY4Dp.mjs +134 -0
- package/browser/esm/BzFKdDmdCdg3cXdh.mjs +262 -0
- package/browser/esm/C2HjD-DbaqXq93R7.mjs +45 -0
- package/browser/esm/C46qV9hBGqlz6_Kt.mjs +323 -0
- package/browser/esm/C9dHNoiKtX9PLY1g.mjs +20 -0
- package/browser/esm/CA6w64diOtRCgr4n.mjs +67 -0
- package/browser/esm/CCL3pFmdsuwahoCR.mjs +42 -0
- package/browser/esm/CHgyrBEiFmspcFXV.mjs +8 -0
- package/browser/esm/CPwcEeQtvkrESNEy.mjs +303 -0
- package/browser/esm/CdE8JeJkTtdh5qqp.mjs +78 -0
- package/browser/esm/CkYId3pjG9v3XZM2.mjs +36 -0
- package/browser/esm/Co65nK3fyBcyVzrS.mjs +401 -0
- package/browser/esm/DG1f60gvSkz8Y3qb.mjs +197 -0
- package/browser/esm/DL2WZkJdK1lZfpJo.mjs +341 -0
- package/browser/esm/Dl0ye0MfTml4mjhA.mjs +9560 -0
- package/browser/esm/_T8e_9xhVAagwkPD.mjs +31 -0
- package/browser/esm/chart.mjs +41 -0
- package/browser/esm/control.mjs +217 -0
- package/browser/esm/fHDciYUZvXpLzoID.mjs +128 -0
- package/browser/esm/group.mjs +123 -0
- package/browser/esm/index.mjs +22374 -13204
- package/browser/esm/k1IvXgw5-153QQUo.mjs +14092 -0
- package/browser/esm/mOYnwl3MMod-yX7a.mjs +63 -0
- package/browser/esm/note.mjs +112 -0
- package/browser/esm/picture.mjs +7 -0
- package/browser/esm/shape.mjs +7 -0
- package/browser/esm/slicer.mjs +277 -0
- package/browser/esm/zTaXN_1rvsoWg94m.mjs +145 -0
- package/licenses/dependencies.txt +284 -565
- package/node/esm/8PerdW56-NyRf0pg.mjs +134 -0
- package/node/esm/B2a1mRx9B8XMRd8H.mjs +2706 -0
- package/node/esm/B4qJFO-8Vml8JbaC.mjs +146 -0
- package/node/esm/BBBfGP0lLhBFoR9F.mjs +198 -0
- package/node/esm/BQpm93aEyzN5TiU6.mjs +8 -0
- package/node/esm/BadjRr_jKKGvmEW-.mjs +80 -0
- package/node/esm/Bzuh8HcJcFD2dYTY.mjs +128 -0
- package/node/esm/CD1OBtF4vEthYy6e.mjs +35 -0
- package/node/esm/CGEbcsNJ40cYQEWX.mjs +1697 -0
- package/node/esm/CNYzecnb2TInTI8p.mjs +80 -0
- package/node/esm/COg8aOu0d67g_Pg5.mjs +37 -0
- package/node/esm/CdKkuM4Yy04LbhRL.mjs +19 -0
- package/node/esm/Df-nWyFJwXaVd79x.mjs +263 -0
- package/node/esm/DtrPF3bSD4CZC5VG.mjs +45 -0
- package/node/esm/EXPN4LM0alUK5Zw7.mjs +20 -0
- package/node/esm/JrDkDzP0l4TgHusH.mjs +32 -0
- package/node/esm/Mq8a4csdTfwY5CnZ.mjs +63 -0
- package/node/esm/cgqViNUwnlIX8-UW.mjs +328 -0
- package/node/esm/chart.mjs +41 -0
- package/node/esm/control.mjs +217 -0
- package/node/esm/fM9xnrz0LJWdndYE.mjs +68 -0
- package/node/esm/group.mjs +123 -0
- package/node/esm/index.mjs +18717 -9431
- package/node/esm/note.mjs +113 -0
- package/node/esm/picture.mjs +305 -0
- package/node/esm/shape.mjs +342 -0
- package/node/esm/slicer.mjs +279 -0
- package/node/esm/tRhXTPxocmY7ZY3z.mjs +66 -0
- package/node/esm/uzlKB6H0b-ol8pDK.mjs +406 -0
- package/package.json +56 -15
- package/resources/contents.json +36 -0
- package/resources/locales/contents.json +84 -0
- package/resources/locales/de/chart.cmd.json +82 -0
- package/resources/locales/de/movable.cmd.json +68 -0
- package/resources/locales/de/picture.cmd.json +188 -0
- package/resources/locales/de/pivot.cmd.json +79 -0
- package/resources/locales/de/shape.cmd.json +17 -0
- package/resources/locales/de/sheet.cmd.json +314 -27
- package/resources/locales/de/slicer.cmd.json +17 -0
- package/resources/locales/de/sparkline.cmd.json +301 -0
- package/resources/locales/de/table.cmd.json +13 -2
- package/resources/locales/de/ui.msg.json +367 -3
- package/resources/locales/de/workbook.cmd.json +8 -1
- package/resources/locales/en/chart.cmd.json +82 -0
- package/resources/locales/en/movable.cmd.json +68 -0
- package/resources/locales/en/picture.cmd.json +188 -0
- package/resources/locales/en/pivot.cmd.json +79 -0
- package/resources/locales/en/shape.cmd.json +17 -0
- package/resources/locales/en/sheet.cmd.json +328 -29
- package/resources/locales/en/slicer.cmd.json +17 -0
- package/resources/locales/en/sparkline.cmd.json +301 -0
- package/resources/locales/en/table.cmd.json +13 -2
- package/resources/locales/en/ui.msg.json +369 -3
- package/resources/locales/en/workbook.cmd.json +8 -1
- package/types/chart.d.ts +2 -0
- package/types/control.d.ts +2 -0
- package/types/group.d.ts +2 -0
- package/types/note.d.ts +2 -0
- package/types/picture.d.ts +2 -0
- package/types/shape.d.ts +2 -0
- package/types/slicer.d.ts +2 -0
- package/types/src/annotation/RangeAnnotationLayer.d.ts +110 -0
- package/types/src/annotation/RangeAnnotationTag.d.ts +23 -0
- package/types/src/annotation/RangeAnnotations.d.ts +180 -0
- package/types/src/annotation/index.d.ts +4 -0
- package/types/src/autoFill/FillMenu.d.ts +2 -2
- package/types/src/autoFill/FillSeries.d.ts +2 -2
- package/types/src/border/StaticBorderRenderer.d.ts +18 -1
- package/types/src/border/useBorders.d.ts +95 -3
- package/types/src/cell/CellCheckboxRenderer.d.ts +20 -0
- package/types/src/cell/CellContent.d.ts +68 -0
- package/types/src/cell/CellControlContext.d.ts +37 -0
- package/types/src/cell/{FormulaCellRenderer.d.ts → CellFormulaRenderer.d.ts} +10 -7
- package/types/src/cell/CellImageRenderer.d.ts +11 -0
- package/types/src/cell/CellRenderers.d.ts +190 -0
- package/types/src/cell/{SheetCellRenderer.d.ts → CellTextRenderer.d.ts} +11 -8
- package/types/src/cell/ColumnButton.d.ts +3 -3
- package/types/src/cell/CornerTriangle.d.ts +6 -0
- package/types/src/cell/OutlineButton.d.ts +123 -0
- package/types/src/cell/PivotButton.d.ts +55 -0
- package/types/src/cell/SheetHeaderRenderer.d.ts +6 -1
- package/types/src/cell/StaticCellRenderer.d.ts +3 -3
- package/types/src/cell/_DropdownFace.d.ts +29 -0
- package/types/src/cell/index.d.ts +10 -2
- package/types/src/cell/useFormulaViewAnchor.d.ts +3 -3
- package/types/src/cell/useInsertableCellControls.d.ts +25 -0
- package/types/src/chart/ChartCommands.d.ts +15 -0
- package/types/src/chart/ChartEditor.d.ts +12 -2
- package/types/src/chart/ChartElement.d.ts +122 -0
- package/types/src/chart/ChartKind.d.ts +7 -0
- package/types/src/chart/PresetChartTypeDescriptors.d.ts +3 -1
- package/types/src/chart/index.d.ts +2 -1
- package/types/src/chart/paint/_fills.d.ts +24 -0
- package/types/src/chart/paint/_graphics.d.ts +38 -0
- package/types/src/chart/paint/_mode.d.ts +6 -0
- package/types/src/chart/paint/echarts.d.ts +33 -0
- package/types/src/chart/paint/index.d.ts +12 -0
- package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +140 -0
- package/types/src/chart/paint/kinds/_Area.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_BoxWhisker.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bubble.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Funnel.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Histogram.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Line.d.ts +10 -0
- package/types/src/chart/paint/kinds/_OfPie.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Pie.d.ts +21 -0
- package/types/src/chart/paint/kinds/_Placeholder.d.ts +7 -0
- package/types/src/chart/paint/kinds/_Radar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Scatter.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Sunburst.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Surface.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Treemap.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Waterfall.d.ts +3 -0
- package/types/src/chart/paint/kinds/_builtIns.d.ts +3 -0
- package/types/src/chart/paint/toEChartsOption.d.ts +42 -0
- package/types/src/checklist/ValueChecklist.d.ts +60 -19
- 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/conditionalFormat/ConditionalFormatPresets.d.ts +6 -6
- package/types/src/context/WorksheetContext.d.ts +18 -0
- package/types/src/context/index.d.ts +1 -1
- package/types/src/control/FormControlRenderers.d.ts +22 -0
- package/types/src/editableLabel/EditableLabel.d.ts +3 -1
- package/types/src/editor/EditorCommands.d.ts +3 -3
- package/types/src/editor/FunctionPreviewPanel.d.ts +1 -1
- package/types/src/editor/SheetCellEditorLayer.d.ts +2 -10
- package/types/src/editor/SheetCellEditorStartLayer.d.ts +61 -0
- package/types/src/editor/SheetCellInput.d.ts +14 -0
- package/types/src/editor/SheetEditable.d.ts +6 -6
- package/types/src/editor/SheetReferenceHeaderLayer.d.ts +1 -1
- package/types/src/editor/SheetReferenceLayer.d.ts +4 -4
- package/types/src/editor/VirtualKeyboardLayer.d.ts +50 -0
- package/types/src/editor/formulaAnchor.d.ts +12 -0
- package/types/src/editor/index.d.ts +3 -0
- package/types/src/editor/pickedReference.d.ts +3 -3
- package/types/src/editor/useEditRejectedNotice.d.ts +3 -3
- package/types/src/editor/useFormulaHints.d.ts +3 -3
- package/types/src/editor/useFormulaInput.d.ts +15 -3
- package/types/src/editor/validationAlert.d.ts +24 -0
- package/types/src/form/FormulaInput.d.ts +5 -2
- package/types/src/form/useEditCommit.d.ts +23 -3
- package/types/src/form/useInputField.d.ts +2 -3
- package/types/src/frame/CommandContext.d.ts +101 -3
- package/types/src/group/GroupEditor.d.ts +25 -0
- package/types/src/index.d.ts +12 -1
- package/types/src/layer/BorderLayer.d.ts +5 -2
- package/types/src/layer/CellErrorLayer.d.ts +18 -7
- package/types/src/layer/CellFillLayer.d.ts +2 -2
- package/types/src/layer/CellIndicatorLayer.d.ts +31 -0
- package/types/src/layer/CellInsertLayer.d.ts +71 -0
- package/types/src/layer/CircularIndicatorLayer.d.ts +3 -3
- package/types/src/layer/CommentCardLayer.d.ts +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/HeaderSelectionLayer.d.ts +4 -4
- package/types/src/layer/HyperlinkLayer.d.ts +116 -0
- package/types/src/layer/MovableKindScope.d.ts +17 -0
- package/types/src/layer/PivotLayer.d.ts +47 -0
- package/types/src/layer/PivotToolbar.d.ts +29 -0
- package/types/src/layer/ProtectionLayer.d.ts +4 -5
- package/types/src/layer/RangeToolbar.d.ts +75 -0
- package/types/src/layer/ResizeIndicator.d.ts +11 -10
- package/types/src/layer/ResizeTooltip.d.ts +13 -0
- package/types/src/layer/SheetBackgroundLayer.d.ts +3 -3
- package/types/src/layer/SheetCellLayer.d.ts +15 -8
- package/types/src/layer/SheetColumnButtonLayer.d.ts +2 -2
- package/types/src/layer/SheetGridLineLayer.d.ts +25 -15
- package/types/src/layer/SheetHeaderCellLayer.d.ts +10 -1
- package/types/src/layer/SheetLayers.d.ts +171 -0
- package/types/src/layer/SheetMovableLayer.d.ts +4 -3
- package/types/src/layer/SheetOutlineLayer.d.ts +40 -0
- package/types/src/layer/SheetPivotCommandLayer.d.ts +13 -0
- package/types/src/layer/SheetSparklineCommandLayer.d.ts +14 -0
- package/types/src/layer/SheetTableCommandLayer.d.ts +2 -2
- package/types/src/layer/SparklineLayer.d.ts +32 -0
- package/types/src/layer/SpillLayer.d.ts +2 -2
- package/types/src/layer/TableLayer.d.ts +6 -5
- package/types/src/layer/TableToolbar.d.ts +23 -0
- package/types/src/layer/ValidationDropdownLayer.d.ts +2 -2
- package/types/src/layer/ValidationIndicatorLayer.d.ts +2 -2
- package/types/src/layer/ValidationPromptLayer.d.ts +47 -16
- package/types/src/layer/_sheetBorders.d.ts +6 -0
- package/types/src/layer/_tableColor.d.ts +6 -0
- package/types/src/layer/_visibleCellFeatures.d.ts +11 -0
- package/types/src/layer/cellTip.d.ts +13 -0
- package/types/src/layer/freezeDragState.d.ts +21 -0
- package/types/src/layer/index.d.ts +17 -0
- package/types/src/layer/resizeIndicatorState.d.ts +3 -1
- package/types/src/layer/useFreezeDrag.d.ts +22 -0
- package/types/src/layer/useNormalBorderLines.d.ts +15 -0
- package/types/src/layer/useSheetFeatureRegions.d.ts +2 -2
- package/types/src/layer/useSheetVisibleCells.d.ts +5 -6
- package/types/src/layer/useSheetVisibleDecorations.d.ts +2 -2
- package/types/src/layer/useTableHeaderCells.d.ts +2 -2
- package/types/src/layer/useValidationPicker.d.ts +3 -3
- package/types/src/layer/useVisibleTables.d.ts +2 -2
- package/types/src/layer/validationMark.d.ts +3 -3
- package/types/src/listener/index.d.ts +5 -0
- package/types/src/listener/useCell.d.ts +29 -0
- package/types/src/listener/useCellRange.d.ts +23 -0
- package/types/src/listener/useCellValue.d.ts +26 -0
- package/types/src/listener/useModelListener.d.ts +8 -8
- package/types/src/listener/useRangeListener.d.ts +13 -7
- package/types/src/listener/useRangeSnapshot.d.ts +35 -0
- package/types/src/listener/useTable.d.ts +26 -0
- package/types/src/movable/ConnectionSites.d.ts +18 -0
- package/types/src/movable/DefaultMovable.d.ts +8 -0
- package/types/src/movable/IMovableArea.d.ts +56 -0
- package/types/src/movable/MovableAdornment.d.ts +26 -0
- package/types/src/movable/MovableCommandGroups.d.ts +22 -0
- package/types/src/movable/MovableCommands.d.ts +8 -3
- package/types/src/movable/MovableControl.d.ts +80 -0
- package/types/src/movable/MovableEdit.d.ts +22 -0
- package/types/src/movable/MovableFrame.d.ts +18 -14
- package/types/src/movable/MovableLayer.d.ts +30 -5
- package/types/src/movable/MovableRenderers.d.ts +210 -0
- package/types/src/movable/PlaceholderFrames.d.ts +11 -0
- package/types/src/movable/RotateHandle.d.ts +37 -0
- package/types/src/movable/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/movable/useFramePreview.d.ts +17 -0
- package/types/src/picker/cellPickerOpen.d.ts +3 -3
- package/types/src/picker/useCellPicker.d.ts +7 -5
- package/types/src/picture/PictureCommands.d.ts +20 -0
- package/types/src/picture/PictureKind.d.ts +7 -0
- package/types/src/picture/_pictureHyperlink.d.ts +13 -0
- package/types/src/picture/index.d.ts +0 -1
- package/types/src/picture/pictureCrop.d.ts +32 -0
- package/types/src/pivot/PivotAreas.d.ts +16 -0
- package/types/src/pivot/PivotChip.d.ts +33 -0
- package/types/src/pivot/PivotChipMenu.d.ts +74 -0
- package/types/src/pivot/PivotCommands.d.ts +24 -0
- package/types/src/pivot/PivotFieldList.d.ts +14 -0
- package/types/src/pivot/PivotFields.d.ts +47 -0
- package/types/src/pivot/PivotFieldsModel.d.ts +143 -0
- package/types/src/pivot/PivotTablePane.d.ts +47 -0
- package/types/src/pivot/_PivotFieldsContext.d.ts +41 -0
- package/types/src/pivot/_pivotNew.d.ts +12 -0
- package/types/src/pivot/_pivotRegion.d.ts +14 -0
- package/types/src/pivot/index.d.ts +9 -0
- package/types/src/pivot/usePivotFields.d.ts +17 -0
- package/types/src/presence/PresenceCommands.d.ts +35 -0
- package/types/src/presence/PresenceHost.d.ts +58 -0
- package/types/src/presence/PresenceMessages.d.ts +42 -0
- package/types/src/presence/PresenceStore.d.ts +165 -0
- package/types/src/presence/PresenceTypes.d.ts +78 -0
- package/types/src/presence/index.d.ts +7 -0
- package/types/src/presence/usePresence.d.ts +20 -0
- package/types/src/richText/RichTextEditor.d.ts +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 +6 -12
- package/types/src/shape/ConnectorControl.d.ts +46 -0
- package/types/src/shape/ShapeCommands.d.ts +11 -0
- package/types/src/shape/ShapeControl.d.ts +8 -0
- package/types/src/shape/ShapeEditor.d.ts +15 -2
- package/types/src/shape/ShapeGallery.d.ts +31 -0
- package/types/src/shape/ShapeHandles.d.ts +28 -0
- package/types/src/shape/ShapeKind.d.ts +7 -0
- package/types/src/shape/ShapeSVG.d.ts +22 -0
- package/types/src/shape/ShapeText.d.ts +17 -0
- package/types/src/shape/icons/ShapeIcons.d.ts +16 -0
- package/types/src/shape/icons/_ShapeIconPack.d.ts +4 -0
- package/types/src/shape/index.d.ts +3 -1
- package/types/src/shape/shapeFrame.d.ts +50 -0
- package/types/src/shape/shapeStyle.d.ts +82 -0
- package/types/src/sheet/ISheetHeaderElement.d.ts +3 -3
- package/types/src/sheet/{ISheetElement.d.ts → IWorksheetElement.d.ts} +111 -81
- package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
- package/types/src/sheet/SheetCommandProvider.d.ts +14 -6
- package/types/src/sheet/SheetCommands.d.ts +20 -5
- package/types/src/sheet/SheetKindIcon.d.ts +14 -0
- package/types/src/sheet/SheetOutlineElement.d.ts +70 -0
- package/types/src/sheet/SheetPanels.d.ts +11 -0
- package/types/src/sheet/SheetScrollbar.d.ts +4 -13
- package/types/src/sheet/TopLeftCorner.d.ts +2 -2
- package/types/src/sheet/WorksheetElement.d.ts +12 -0
- package/types/src/sheet/_freezeAt.d.ts +10 -0
- package/types/src/sheet/_hyperlinkEdit.d.ts +7 -0
- package/types/src/sheet/_useHeaderMetrics.d.ts +11 -0
- package/types/src/sheet/circularReferences.d.ts +4 -4
- package/types/src/sheet/index.d.ts +5 -2
- package/types/src/sheet/useCycleHighlight.d.ts +2 -2
- package/types/src/slicer/SlicerCommands.d.ts +10 -0
- package/types/src/slicer/SlicerEditor.d.ts +8 -2
- package/types/src/slicer/SlicerKind.d.ts +7 -0
- package/types/src/slicer/SlicerStylePreview.d.ts +18 -0
- package/types/src/slicer/index.d.ts +2 -1
- package/types/src/slicer/slicerStyles.d.ts +32 -0
- package/types/src/sparkline/PictureCache.d.ts +37 -0
- package/types/src/sparkline/SparklineCommands.d.ts +23 -0
- package/types/src/sparkline/SparklinePictures.d.ts +7 -0
- package/types/src/sparkline/paint/_drawing.d.ts +24 -0
- package/types/src/sparkline/paint/echarts.d.ts +8 -0
- package/types/src/sparkline/paint/index.d.ts +8 -0
- package/types/src/tabStrip/SheetTab.d.ts +1 -1
- package/types/src/tabStrip/Sortable.d.ts +5 -5
- package/types/src/tabStrip/TabStrip.d.ts +13 -6
- package/types/src/tabStrip/TabStripItem.d.ts +15 -13
- package/types/src/table/TableCommands.d.ts +2 -2
- package/types/src/taskPane/CellControlPane.d.ts +15 -0
- package/types/src/taskPane/MovablePane.d.ts +15 -0
- package/types/src/taskPane/TaskPaneArea.d.ts +7 -0
- package/types/src/taskPane/TaskPaneFrame.d.ts +4 -4
- package/types/src/taskPane/TaskPaneKeys.d.ts +38 -0
- package/types/src/taskPane/TaskPaneRegistry.d.ts +32 -12
- package/types/src/taskPane/_paneReasons.d.ts +7 -0
- package/types/src/taskPane/index.d.ts +3 -0
- package/types/src/taskPane/useTaskPane.d.ts +6 -3
- package/types/src/theme/ThemeState.d.ts +15 -2
- package/types/src/theme/buildDocThemeCSS.d.ts +4 -1
- package/types/src/theme/buildOOXMLThemeCSS.d.ts +2 -2
- package/types/src/theme/useGridColorScheme.d.ts +3 -3
- 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 +5 -4
- package/types/src/workbook/IWorkbookElement.d.ts +108 -23
- package/types/src/workbook/WorkbookCommands.d.ts +8 -3
- package/types/src/workbook/WorkbookStrip.d.ts +14 -5
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
- package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +0 -156
- package/browser/cjs/index.cjs +0 -41
- package/browser/esm/Dsn3z1hmkv-bWGVr.mjs +0 -6286
- package/node/esm/CyU4sKDpHyc6kF7j.mjs +0 -9
- package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-template.json.d.ts +0 -9
- package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-template.json.d.ts +0 -9
- package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-template.json.d.ts +0 -9
- package/types/src/chart/templates/line-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-template.json.d.ts +0 -9
- package/types/src/chart/templates/pie-doughnut-template.json.d.ts +0 -10
- package/types/src/chart/templates/pie-template.json.d.ts +0 -9
- package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-markers-template.json.d.ts +0 -10
- package/types/src/context/SheetContext.d.ts +0 -18
- package/types/src/movable/MoveableBundle.d.ts +0 -4
- package/types/src/sheet/SheetElement.d.ts +0 -15
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IMovable, IWorksheet } from '@sheetxl/sdk';
|
|
3
|
+
import { Command, IReactNotifier } from '@sheetxl/utils-react';
|
|
4
|
+
import { ActivateFrameOptions, ITaskPaneArea } from '../taskPane';
|
|
5
|
+
import { MovableElementProps } from './IMovableArea';
|
|
6
|
+
import { ContentControlProps } from './MovableControl';
|
|
7
|
+
/**
|
|
8
|
+
* What a movable's renderer is given: the element props the movable layer hands every movable,
|
|
9
|
+
* with the movable itself always present.
|
|
10
|
+
*/
|
|
11
|
+
export interface MovableRendererProps extends MovableElementProps {
|
|
12
|
+
movable: IMovable;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Draws the content of one kind of movable (`IMovable.IContent.getType()`) inside the frame the
|
|
16
|
+
* movable layer gives it.
|
|
17
|
+
*/
|
|
18
|
+
export type MovableRenderer = React.ComponentType<MovableRendererProps>;
|
|
19
|
+
/**
|
|
20
|
+
* What a kind's {@link MovableRendererModule.pane} is given: the selected movable it formats and
|
|
21
|
+
* the sheet that holds it.
|
|
22
|
+
*/
|
|
23
|
+
export interface MovablePaneProps {
|
|
24
|
+
movable: IMovable;
|
|
25
|
+
sheet: IWorksheet;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The `data` a kind's {@link MovableRendererModule.commands} contributor is handed while a movable of
|
|
29
|
+
* the kind is the active selection. The contributor runs again, with fresh data, whenever another
|
|
30
|
+
* movable of the kind becomes the active one, so it never tracks the selection itself.
|
|
31
|
+
*/
|
|
32
|
+
export interface MovableKindCommandData {
|
|
33
|
+
sheet: IWorksheet;
|
|
34
|
+
/** The active selected movable, always of this kind. */
|
|
35
|
+
movable: IMovable;
|
|
36
|
+
notifier?: IReactNotifier;
|
|
37
|
+
activateTaskPane?: (key: string, options?: ActivateFrameOptions) => void;
|
|
38
|
+
taskPaneArea?: ITaskPaneArea;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* What a kind's loader resolves to when the kind brings more than a renderer: the renderer and
|
|
42
|
+
* whichever of its selection control, commands, ribbon tab and format pane it has.
|
|
43
|
+
*/
|
|
44
|
+
export interface MovableRendererModule {
|
|
45
|
+
/** Draws a movable of the kind. */
|
|
46
|
+
renderer: MovableRenderer;
|
|
47
|
+
/**
|
|
48
|
+
* The kind's own selection control: what replaces the outline, resize and rotate handles when a
|
|
49
|
+
* movable of the kind is selected (a connector's two endpoint handles). It is handed the generic
|
|
50
|
+
* control's props and may render the generic control itself for the movables it has nothing
|
|
51
|
+
* special for. Omit it for a kind the generic control serves.
|
|
52
|
+
*/
|
|
53
|
+
control?: React.ComponentType<ContentControlProps>;
|
|
54
|
+
/**
|
|
55
|
+
* The kind's command behavior, contributed into a scope named for the content type while a
|
|
56
|
+
* movable of the kind is the active selection. The scope's chrome comes from the catalog
|
|
57
|
+
* registered under the content type.
|
|
58
|
+
*/
|
|
59
|
+
commands?: Command.DynamicCommandContributor<MovableKindCommandData>;
|
|
60
|
+
/**
|
|
61
|
+
* The kind's contextual ribbon tab, shown while a movable of the kind is the active selection.
|
|
62
|
+
* By convention keyed `${type}Toolbar` and contributing into the main toolbar strip.
|
|
63
|
+
*/
|
|
64
|
+
toolbar?: Command.CommandButtonEntry & {
|
|
65
|
+
key: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* The body the format pane shows while a movable of the kind is the active selection. A host can
|
|
69
|
+
* supply it without re-registering the renderer, with {@link registerMovablePane}.
|
|
70
|
+
*/
|
|
71
|
+
pane?: React.ComponentType<MovablePaneProps>;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* A kind's slots once its module has loaded: everything {@link MovableRendererModule} carries but
|
|
75
|
+
* the renderer, with the pane taken from {@link registerMovablePane} when a host supplied one.
|
|
76
|
+
*/
|
|
77
|
+
export interface MovableKind {
|
|
78
|
+
/** The content type. */
|
|
79
|
+
type: string;
|
|
80
|
+
control?: React.ComponentType<ContentControlProps>;
|
|
81
|
+
commands?: Command.DynamicCommandContributor<MovableKindCommandData>;
|
|
82
|
+
toolbar?: Command.CommandButtonEntry & {
|
|
83
|
+
key: string;
|
|
84
|
+
};
|
|
85
|
+
pane?: React.ComponentType<MovablePaneProps>;
|
|
86
|
+
}
|
|
87
|
+
/** Resolves a kind's format pane body, as a dynamic `import()` does. */
|
|
88
|
+
export type MovablePaneLoader = () => Promise<React.ComponentType<MovablePaneProps>>;
|
|
89
|
+
/**
|
|
90
|
+
* Imports a kind's module: one dynamic `import()`, resolving to the module itself, with what the
|
|
91
|
+
* kind needs picked by {@link MovableRendererOptions.select}. After a failed fetch the module is
|
|
92
|
+
* imported again without the loader, so the loader must not pick an export itself. Called the first
|
|
93
|
+
* time a movable of the kind is drawn, or ahead of use by `LazyModules.prefetch`
|
|
94
|
+
* (`@sheetxl/utils`); a movable is drawn before it can be selected, so the control arrives with the
|
|
95
|
+
* renderer and is in hand by the first selection.
|
|
96
|
+
*/
|
|
97
|
+
export type MovableRendererLoader<M = MovableRenderer | MovableRendererModule> = () => Promise<M>;
|
|
98
|
+
/**
|
|
99
|
+
* How a renderer is registered: what the layer needs to know before the kind's module has loaded.
|
|
100
|
+
*/
|
|
101
|
+
export interface MovableRendererOptions<M = MovableRenderer | MovableRendererModule> {
|
|
102
|
+
/**
|
|
103
|
+
* Picks the kind's renderer, or its renderer and control together ({@link MovableRendererModule}),
|
|
104
|
+
* from the imported module.
|
|
105
|
+
* @defaultValue the module itself, for a loader that resolves to the renderer or the record
|
|
106
|
+
*/
|
|
107
|
+
select?: (module: M) => MovableRenderer | MovableRendererModule;
|
|
108
|
+
/**
|
|
109
|
+
* Whether the kind may be loaded ahead of use (`LazyModules.prefetch` in `@sheetxl/utils`).
|
|
110
|
+
* @defaultValue true
|
|
111
|
+
*/
|
|
112
|
+
prefetch?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* What is drawn while the renderer loads.
|
|
115
|
+
* @defaultValue nothing — the movable's frame is there already.
|
|
116
|
+
*/
|
|
117
|
+
fallback?: React.ReactNode;
|
|
118
|
+
/**
|
|
119
|
+
* Whether the layer shades a selected movable of the kind with a shadow on its frame. A kind
|
|
120
|
+
* that shades what it paints itself, as a shape does along its outline, says `false`.
|
|
121
|
+
* @defaultValue true
|
|
122
|
+
*/
|
|
123
|
+
selectionShadow?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* What a press on the movable hits.
|
|
126
|
+
*
|
|
127
|
+
* - `'frame'`: the whole frame, as a plain `div` is. The renderer draws whatever it likes inside a
|
|
128
|
+
* box that fills the frame and takes the presses.
|
|
129
|
+
* - `'content'`: only what the renderer marks. It applies `props.style` to its root, which carries
|
|
130
|
+
* the layer's `pointerEvents`, and may set `none` on the parts a press should pass through, as an
|
|
131
|
+
* unfilled shape does for its interior.
|
|
132
|
+
*
|
|
133
|
+
* @defaultValue `'frame'`
|
|
134
|
+
*/
|
|
135
|
+
hitArea?: 'frame' | 'content';
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Registers the renderer for a kind of movable content, replacing the built-in one.
|
|
139
|
+
*
|
|
140
|
+
* @param type The content type (`picture`, `chart`, `shape`, `checkBox`, …), as registered with
|
|
141
|
+
* `MovableContentRegistry` in the SDK.
|
|
142
|
+
* @param load Imports the kind's module when first needed ({@link MovableRendererLoader}).
|
|
143
|
+
* @param options How the kind is drawn before it loads, and `select` to pick from the module the
|
|
144
|
+
* component, or a record with the component and the kind's other slots (selection control,
|
|
145
|
+
* commands, ribbon tab, format pane).
|
|
146
|
+
* @returns A function that removes the registration.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```ts
|
|
150
|
+
* registerMovableRenderer('map', () => import('./MapRenderer'), { select: (m) => m.MapRenderer });
|
|
151
|
+
* // With a selection control of its own:
|
|
152
|
+
* registerMovableRenderer('map', () => import('./MapRenderer'), {
|
|
153
|
+
* select: (m) => ({ renderer: m.MapRenderer, control: m.MapControl })
|
|
154
|
+
* });
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
export declare function registerMovableRenderer<M>(type: string, load: MovableRendererLoader<M>, options?: MovableRendererOptions<M>): () => void;
|
|
158
|
+
/**
|
|
159
|
+
* Supplies the format pane body for a kind of movable content, in place of the one its module
|
|
160
|
+
* carries, without touching the kind's renderer. This is how a host with its own widgets gives a
|
|
161
|
+
* built-in kind a pane.
|
|
162
|
+
*
|
|
163
|
+
* @param type The content type.
|
|
164
|
+
* @param load Resolves the body; called once, when the kind's slots are first asked for.
|
|
165
|
+
* @returns A function that removes the registration.
|
|
166
|
+
*/
|
|
167
|
+
export declare function registerMovablePane(type: string, load: MovablePaneLoader): () => void;
|
|
168
|
+
/**
|
|
169
|
+
* The slots of a kind of movable content, or `undefined` while its module has not loaded (or for
|
|
170
|
+
* a type with no renderer). A pane registered with {@link registerMovablePane} wins over the
|
|
171
|
+
* module's; while it is still loading the record has no pane.
|
|
172
|
+
*/
|
|
173
|
+
export declare function getMovableKind(type: string): MovableKind | undefined;
|
|
174
|
+
/**
|
|
175
|
+
* Resolves with the slots of a kind of movable content ({@link getMovableKind}) once its module,
|
|
176
|
+
* and any pane registered for it, have loaded; loads them if nothing has yet. Resolves `undefined`
|
|
177
|
+
* for a type with no renderer, or when a load fails.
|
|
178
|
+
*/
|
|
179
|
+
export declare function whenMovableKindLoaded(type: string): Promise<MovableKind | undefined>;
|
|
180
|
+
/**
|
|
181
|
+
* Calls `listener` whenever what {@link getMovableKind} answers may have changed: a kind or pane
|
|
182
|
+
* registered or removed, or a module or pane finished loading.
|
|
183
|
+
*
|
|
184
|
+
* @returns A function that removes the listener.
|
|
185
|
+
*/
|
|
186
|
+
export declare function addMovableKindListener(listener: () => void): () => void;
|
|
187
|
+
/** Whether the layer shades a selected movable of the kind with a shadow on its frame. */
|
|
188
|
+
export declare function hasSelectionShadow(type: string): boolean;
|
|
189
|
+
/**
|
|
190
|
+
* The selection control a kind of movable content brings for itself, or `undefined` for the
|
|
191
|
+
* generic one. Until the kind's module has loaded this is a component that draws the generic
|
|
192
|
+
* control, and the kind's own once the module arrives.
|
|
193
|
+
*/
|
|
194
|
+
export declare function getMovableControl(type: string): React.ComponentType<ContentControlProps> | undefined;
|
|
195
|
+
/**
|
|
196
|
+
* The renderer for a kind of movable content: the registered one, else the built-in one, else
|
|
197
|
+
* `undefined`.
|
|
198
|
+
*/
|
|
199
|
+
export declare function getMovableRenderer(type: string): ((props: MovableRendererProps) => React.ReactElement) | undefined;
|
|
200
|
+
/**
|
|
201
|
+
* The content types with a renderer, built-in or registered, loaded or not.
|
|
202
|
+
*/
|
|
203
|
+
export declare function getMovableRendererTypes(): string[];
|
|
204
|
+
/**
|
|
205
|
+
* Registers a built-in renderer. A registered renderer always wins over it, and a built-in that
|
|
206
|
+
* one has replaced is not loaded ahead of use.
|
|
207
|
+
* @internal
|
|
208
|
+
*/
|
|
209
|
+
export declare function registerBuiltInMovableRenderer<M>(type: string, load: MovableRendererLoader<M>, options?: MovableRendererOptions<M>): void;
|
|
210
|
+
//# sourceMappingURL=MovableRenderers.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MovableRendererProps } from './MovableRenderers';
|
|
3
|
+
/**
|
|
4
|
+
* Draws a movable whose content could not be made ({@link IErrorContent}): which kind, and why.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ErrorContentFrame: React.MemoExoticComponent<(props: MovableRendererProps) => React.ReactElement>;
|
|
7
|
+
/**
|
|
8
|
+
* Draws a movable whose content's type has no renderer.
|
|
9
|
+
*/
|
|
10
|
+
export declare const UnsupportedContentFrame: React.MemoExoticComponent<(props: MovableRendererProps) => React.ReactElement>;
|
|
11
|
+
//# sourceMappingURL=PlaceholderFrames.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface RotateHandleProps {
|
|
3
|
+
/**
|
|
4
|
+
* Fade the handle, as during any gesture. It stays mounted: while it turns the frame it holds
|
|
5
|
+
* the pointer capture.
|
|
6
|
+
*/
|
|
7
|
+
isDragging?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* A press on the handle. `radius` is the handle's distance from the frame's center (px). Return
|
|
10
|
+
* `false` to refuse the gesture.
|
|
11
|
+
*/
|
|
12
|
+
onStart: (radius: number) => boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The pointer moved: `degrees` is the angle swept about the frame's center since the press,
|
|
15
|
+
* clockwise; `snap` is whether the rotation should snap (Shift).
|
|
16
|
+
*/
|
|
17
|
+
onRotate: (degrees: number, snap: boolean) => void;
|
|
18
|
+
/** The pointer was released. */
|
|
19
|
+
onEnd: () => void;
|
|
20
|
+
/** The gesture was lost (`pointercancel`). */
|
|
21
|
+
onCancel: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Draw the handle below the bottom edge: the frame is mirrored top to bottom, so its top is
|
|
24
|
+
* drawn there, as Excel draws it.
|
|
25
|
+
*/
|
|
26
|
+
below?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The handle that turns a selected frame, drawn in its adornment box above the top edge (below
|
|
30
|
+
* the bottom one when the frame is mirrored top to bottom) so it turns with the frame. Its size and offset are set by the movable layer's stylesheet.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* The angle is measured about the center of the adornment box, which is the frame's center at any
|
|
34
|
+
* rotation. The pointer is captured for the gesture, so it keeps rotating outside the handle.
|
|
35
|
+
*/
|
|
36
|
+
export declare const RotateHandle: React.FC<RotateHandleProps>;
|
|
37
|
+
//# sourceMappingURL=RotateHandle.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IMovable } from '@sheetxl/sdk';
|
|
3
|
+
import { MovableElementProps } from './IMovableArea';
|
|
4
|
+
export interface TextBoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/**
|
|
6
|
+
* The movable this is the text of. With it, a request to edit the movable
|
|
7
|
+
* ({@link requestMovableEdit}) puts the caret at the end of the text.
|
|
8
|
+
*/
|
|
9
|
+
movable?: IMovable;
|
|
10
|
+
/**
|
|
11
|
+
* The movable's drag-zone registration, passed through from {@link MovableElementProps}.
|
|
12
|
+
*/
|
|
13
|
+
onDragZone?: MovableElementProps['onDragZone'];
|
|
14
|
+
/**
|
|
15
|
+
* Styles the text area inside the drag band: the text's own padding, alignment and overflow.
|
|
16
|
+
*/
|
|
17
|
+
contentStyle?: React.CSSProperties;
|
|
18
|
+
/**
|
|
19
|
+
* If true, the text area shows no text cursor.
|
|
20
|
+
* @defaultValue false
|
|
21
|
+
*/
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A movable's text box: a band along its edge that drags it, and a text area inside that does not.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* A press on the text area still selects the movable (see {@link MovableElementProps.onDragZone})
|
|
30
|
+
* and is left to the text, which is where an editor puts its caret. Notes and shapes with text share
|
|
31
|
+
* it. The box's own look (border, fill, font) is the caller's `style`.
|
|
32
|
+
*/
|
|
33
|
+
export declare const TextBox: React.NamedExoticComponent<Omit<TextBoxProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
+
//# sourceMappingURL=TextBox.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The surface state a connector's end drag publishes, under {@link CONNECT_STATE_KEY}: every shape
|
|
3
|
+
* drawn on the surface shows its connection sites while it is set, and the site the end would
|
|
4
|
+
* glue to if released now is marked.
|
|
5
|
+
*/
|
|
6
|
+
export interface ConnectState {
|
|
7
|
+
/** The movable whose end is being dragged, by id. */
|
|
8
|
+
connector: string;
|
|
9
|
+
/** The movable the end would glue to, by id; `null` when it would be free. */
|
|
10
|
+
target: string | null;
|
|
11
|
+
/** The site on that movable, numbered as `IShape.IConnectorFormat` takes it. */
|
|
12
|
+
index: number | null;
|
|
13
|
+
}
|
|
14
|
+
/** The surface state key of {@link ConnectState}; `null` while no end is dragged. */
|
|
15
|
+
export declare const CONNECT_STATE_KEY = "movable-connect";
|
|
16
|
+
//# sourceMappingURL=connect.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Bounds, Point } from '@sheetxl/utils';
|
|
2
|
+
import { IMovable } from '@sheetxl/sdk';
|
|
3
|
+
import { IGridPane } from '@sheetxl/grid-react';
|
|
4
|
+
import { ResizeDirection } from './geometry';
|
|
5
|
+
/** Where a movable's frame sits in a pane: its pane box and its turn about the box's center. */
|
|
6
|
+
export interface FramePlacement {
|
|
7
|
+
left: number;
|
|
8
|
+
top: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
/** Degrees, clockwise. */
|
|
12
|
+
rotation: number;
|
|
13
|
+
/** How the content is mirrored within the box. */
|
|
14
|
+
flip: IMovable.Flip;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* An in-flight gesture's view of one movable, drawn in place of the model until the gesture
|
|
18
|
+
* commits. What it leaves out is read from the model.
|
|
19
|
+
*/
|
|
20
|
+
export interface MovablePreview {
|
|
21
|
+
/** The unrotated frame, absolute. */
|
|
22
|
+
bounds?: Bounds;
|
|
23
|
+
/** Degrees, clockwise. */
|
|
24
|
+
rotation?: number;
|
|
25
|
+
/** How the content is mirrored within the frame. */
|
|
26
|
+
flip?: IMovable.Flip;
|
|
27
|
+
/** What the gesture holds — a handle, or for a move the point of the frame it was grabbed by. */
|
|
28
|
+
grip?: MovableGrip;
|
|
29
|
+
/** What the content draws in place of its own until the gesture commits. */
|
|
30
|
+
content?: MovableContentPreview;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A content's own state as a gesture previews it: a shape's adjust values while one of its handles
|
|
34
|
+
* is dragged, or the route a glued connector takes while the shape it is glued to moves.
|
|
35
|
+
*/
|
|
36
|
+
export interface MovableContentPreview {
|
|
37
|
+
/** A shape's preset, as `IShape.getShapeType` answers. */
|
|
38
|
+
shapeType?: string;
|
|
39
|
+
/** A shape's adjust values; `null` for the preset's defaults. */
|
|
40
|
+
adjustments?: Readonly<Record<string, number>> | null;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* What an in-flight gesture holds, so the readout can sit by it wherever the frame has turned: a resize
|
|
44
|
+
* handle by its direction, the rotate handle by its distance from the frame's center (pane px) and
|
|
45
|
+
* whether it is drawn below the frame (mirrored top to bottom), a move by where it was grabbed — the
|
|
46
|
+
* press's offset from the unrotated frame's top-left (pane px), which a move never changes, so it stays
|
|
47
|
+
* under the pointer.
|
|
48
|
+
*/
|
|
49
|
+
export type MovableGrip = {
|
|
50
|
+
kind: 'resize';
|
|
51
|
+
direction: ResizeDirection;
|
|
52
|
+
} | {
|
|
53
|
+
kind: 'rotate';
|
|
54
|
+
radius: number;
|
|
55
|
+
below: boolean;
|
|
56
|
+
} | {
|
|
57
|
+
kind: 'move';
|
|
58
|
+
at: Point;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* The placement of a movable's frame in `pane`, from the drag preview when there is one, else the
|
|
62
|
+
* model. The frame and everything drawn in register with it (adornments) use this, so they cannot
|
|
63
|
+
* disagree.
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* The frame's corner sits on a device pixel, as Excel places a drawing and as the grid places a
|
|
67
|
+
* fill: a drawing that lands its lines on the device grid (a shape's thin strokes) then needs only
|
|
68
|
+
* the zoom and the device pixel ratio to do so, and the frame scrolls under it by whole device
|
|
69
|
+
* pixels. The size is not snapped; the drawing's zoom stays exact.
|
|
70
|
+
*/
|
|
71
|
+
export declare const framePlacement: (movable: IMovable, pane: IGridPane, preview?: MovablePreview | null) => FramePlacement;
|
|
72
|
+
//# sourceMappingURL=framePlacement.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Bounds } from '@sheetxl/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Which handle a resize drags, per axis: `-1` the left or top edge, `1` the right or bottom edge,
|
|
4
|
+
* `0` neither (an edge handle on the other axis).
|
|
5
|
+
*/
|
|
6
|
+
export type ResizeDirection = readonly [number, number];
|
|
7
|
+
/** What dragging a resize handle made of a frame. */
|
|
8
|
+
export interface ResizedFrame {
|
|
9
|
+
/** The unrotated frame, turned by the same rotation about its own center as the start frame. */
|
|
10
|
+
bounds: Bounds;
|
|
11
|
+
/**
|
|
12
|
+
* Per axis, whether the dragged side was pulled through the held one, so the frame now lies on
|
|
13
|
+
* the other side of it: what mirrors the content, as in Excel.
|
|
14
|
+
*/
|
|
15
|
+
crossed: readonly [boolean, boolean];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The frame after dragging a resize handle, with the opposite edge or corner held still on screen.
|
|
19
|
+
*
|
|
20
|
+
* @param start - The unrotated frame when the drag started.
|
|
21
|
+
* @param direction - The handle being dragged.
|
|
22
|
+
* @param dist - How much the frame has grown along its own (unrotated) axes, positive when larger,
|
|
23
|
+
* whichever side is dragged. An axis the handle does not drag is ignored.
|
|
24
|
+
* @param rotation - Degrees clockwise the frame is turned about its center.
|
|
25
|
+
* @param keepAspect - Keep `start`'s aspect ratio. Only a corner drag keeps it.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* A handle dragged through the held side keeps going: the frame is then the box between the held
|
|
29
|
+
* side and the pointer, and that axis is reported crossed. The frame's size is never negative.
|
|
30
|
+
*/
|
|
31
|
+
export declare const resizeFrame: (start: Bounds, direction: ResizeDirection, dist: readonly [number, number], rotation: number, keepAspect: boolean) => ResizedFrame;
|
|
32
|
+
/**
|
|
33
|
+
* How much a resize handle's drag grows its frame, the `dist` that `resizeFrame` takes.
|
|
34
|
+
*
|
|
35
|
+
* @param direction - The handle being dragged.
|
|
36
|
+
* @param delta - How far the pointer is from the press, on screen.
|
|
37
|
+
* @param rotation - Degrees clockwise the frame is turned about its center.
|
|
38
|
+
* @returns The growth along the frame's own axes, positive when larger.
|
|
39
|
+
*/
|
|
40
|
+
export declare const resizeGrowth: (direction: ResizeDirection, delta: readonly [number, number], rotation: number) => [number, number];
|
|
41
|
+
/** The step a rotation snaps to while Shift is held, in degrees. */
|
|
42
|
+
export declare const ROTATION_SNAP = 15;
|
|
43
|
+
/**
|
|
44
|
+
* A rotation in `[0, 360)`, optionally snapped to the nearest multiple of `snap` degrees.
|
|
45
|
+
*/
|
|
46
|
+
export declare const normalizeRotation: (degrees: number, snap?: number) => number;
|
|
47
|
+
/**
|
|
48
|
+
* The angle, in degrees clockwise on screen, a pointer has swept about `center` since `press`,
|
|
49
|
+
* in `(-180, 180]`.
|
|
50
|
+
*/
|
|
51
|
+
export declare const sweptAngle: (center: {
|
|
52
|
+
x: number;
|
|
53
|
+
y: number;
|
|
54
|
+
}, press: {
|
|
55
|
+
x: number;
|
|
56
|
+
y: number;
|
|
57
|
+
}, pointer: {
|
|
58
|
+
x: number;
|
|
59
|
+
y: number;
|
|
60
|
+
}) => number;
|
|
61
|
+
//# sourceMappingURL=geometry.d.ts.map
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
export * from './IMovableArea';
|
|
2
2
|
export * from './MovableLayer';
|
|
3
|
+
export * from './MovableAdornment';
|
|
4
|
+
export * from './framePlacement';
|
|
5
|
+
export * from './connect';
|
|
6
|
+
export * from './MovableControl';
|
|
7
|
+
export * from './pressTarget';
|
|
8
|
+
export * from './MovableEdit';
|
|
3
9
|
export * from './EmptyFrame';
|
|
10
|
+
export * from './TextBox';
|
|
11
|
+
export * from './MovableRenderers';
|
|
12
|
+
export * from './DefaultMovable';
|
|
13
|
+
export * from './MovableCommandGroups';
|
|
14
|
+
export * from './ConnectionSites';
|
|
4
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IMovable } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* The attribute a container renderer puts on each member's box (with the member's id), so a press
|
|
4
|
+
* inside a group's frame finds the member it landed on.
|
|
5
|
+
*/
|
|
6
|
+
export declare const MEMBER_ATTRIBUTE = "data-movable-id";
|
|
7
|
+
/** The movable at the top of `movable`'s parent chain: itself when it has no parent. */
|
|
8
|
+
export declare const rootOf: (movable: IMovable) => IMovable;
|
|
9
|
+
/**
|
|
10
|
+
* The movable a press on `root`'s frame selects, as Excel's two-step: the first press selects the
|
|
11
|
+
* root; a press while the root is selected selects the member under the pointer; a press while a
|
|
12
|
+
* member is selected selects the member at that depth under the pointer, or one deeper when the
|
|
13
|
+
* selected member is the one pressed into.
|
|
14
|
+
*
|
|
15
|
+
* @param root The movable whose frame was pressed.
|
|
16
|
+
* @param target The element the press landed on.
|
|
17
|
+
* @param frame The frame's element, where the walk up stops.
|
|
18
|
+
*/
|
|
19
|
+
export declare const resolvePressedMovable: (root: IMovable, target: Element | null, frame: Element) => IMovable;
|
|
20
|
+
//# sourceMappingURL=pressTarget.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IMovable } from '@sheetxl/sdk';
|
|
2
|
+
import { MovableContentPreview } from './framePlacement';
|
|
3
|
+
/**
|
|
4
|
+
* The unzoomed, unrotated size a movable is drawn at: its frame on the canvas (for a member of a
|
|
5
|
+
* group, already mapped through the group's scale, so its line keeps its width), or the size an
|
|
6
|
+
* in-flight resize has it at, so its content is laid out again as the pointer moves rather than
|
|
7
|
+
* stretched, as Excel draws it. With it, the turn the frame is drawn at, and what an in-flight gesture
|
|
8
|
+
* draws the content as: adjust values a handle drag has it at, or the route a glued connector is
|
|
9
|
+
* taking.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useFramePreview: (movable: IMovable | undefined) => {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
rotation: number;
|
|
15
|
+
content: MovableContentPreview | null;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=useFramePreview.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
2
2
|
/** Record that `sheet`'s picker opened, or (`null`) that the open one closed. */
|
|
3
|
-
export declare const setCellPickerOpen: (sheet:
|
|
3
|
+
export declare const setCellPickerOpen: (sheet: IWorksheet | null) => void;
|
|
4
4
|
/** Whether `sheet` has a cell picker open (reactive). */
|
|
5
|
-
export declare const useCellPickerOpen: (sheet:
|
|
5
|
+
export declare const useCellPickerOpen: (sheet: IWorksheet) => boolean;
|
|
6
6
|
//# sourceMappingURL=cellPickerOpen.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { CellCoords } from '@sheetxl/utils';
|
|
3
|
-
import {
|
|
2
|
+
import { CellCoords, MaybePromise } from '@sheetxl/utils';
|
|
3
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
4
4
|
import { GridAnchor, IEditable } from '@sheetxl/grid-react';
|
|
5
5
|
import { PickerItem } from './PickerPanel';
|
|
6
6
|
/**
|
|
@@ -10,7 +10,7 @@ import { PickerItem } from './PickerPanel';
|
|
|
10
10
|
*/
|
|
11
11
|
export interface CellPickerOptions {
|
|
12
12
|
/** The sheet the cell is on: its `Normal` font, its current text, and the open flag. */
|
|
13
|
-
sheet:
|
|
13
|
+
sheet: IWorksheet;
|
|
14
14
|
/**
|
|
15
15
|
* The editable a default choice is entered through — the same path as typing the item's text, so
|
|
16
16
|
* the value coerces and formats as a typed one does. Not needed when {@link onChoose} is given.
|
|
@@ -73,9 +73,11 @@ export interface CellPicker {
|
|
|
73
73
|
* Enter `text` into `cell` as a typed entry: an edit session seeded with the text and committed at
|
|
74
74
|
* once, so the value coerces, formats and is checked exactly as if it had been typed.
|
|
75
75
|
*
|
|
76
|
-
* @returns Whether the entry was written
|
|
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.
|
|
77
79
|
*/
|
|
78
|
-
export declare const commitListPick: (editable: IEditable<any, string, any>, cell: CellCoords, text: string) => boolean
|
|
80
|
+
export declare const commitListPick: (editable: IEditable<any, string, any>, cell: CellCoords, text: string) => MaybePromise<boolean>;
|
|
79
81
|
/**
|
|
80
82
|
* A **cell picker** — a menu through the shared float stack (so it gets the portal, stacking,
|
|
81
83
|
* light-dismiss and Escape every other popup in the app has), positioned by the grid on the cell it is
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Command } from '@sheetxl/utils-react';
|
|
2
|
+
import { MovableKindCommandData } from '../movable';
|
|
3
|
+
/** Excel's Crop > Aspect Ratio, by command: width over height. */
|
|
4
|
+
export declare const PictureCropAspects: Readonly<Record<string, readonly [width: number, height: number]>>;
|
|
5
|
+
/**
|
|
6
|
+
* The picture kind's commands, for the active picture. Chrome is the `picture` catalog.
|
|
7
|
+
*
|
|
8
|
+
* Change Picture shows another image in the same frame, as Excel's does: from a file
|
|
9
|
+
* (`changePictureFromFile`, a file dialog) or from the web (`changePictureFromURL`, an input
|
|
10
|
+
* dialog). The image is read before the picture takes it, so a bad address or an unreadable file
|
|
11
|
+
* changes nothing. Dialog-driven and self-committing, so `noTransaction` / `noRepeat`.
|
|
12
|
+
*
|
|
13
|
+
* The crop commands are Excel's Crop menu: Crop to Shape takes what a shape gallery entry states,
|
|
14
|
+
* Aspect Ratio frames the picture at a ratio, and Fill and Fit place the image in the frame. A picture
|
|
15
|
+
* that locks its crop (`noCrop`) offers none of them.
|
|
16
|
+
*
|
|
17
|
+
* The link commands add, change, follow and remove the hyperlink a click on the picture follows.
|
|
18
|
+
*/
|
|
19
|
+
export declare const contributePictureCommands: Command.DynamicCommandContributor<MovableKindCommandData>;
|
|
20
|
+
//# 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,13 @@
|
|
|
1
|
+
import { IPicture, IWorksheet } from '@sheetxl/sdk';
|
|
2
|
+
import { IReactNotifier } from '@sheetxl/utils-react';
|
|
3
|
+
/**
|
|
4
|
+
* The surface state that holds the linked picture under the pointer: a frame takes the pointer before
|
|
5
|
+
* the cells do, so the picture says it is hovered and the hyperlink layer draws its card.
|
|
6
|
+
*/
|
|
7
|
+
export declare const HOVERED_PICTURE_LINK = "hovered-picture-link";
|
|
8
|
+
/**
|
|
9
|
+
* Opens the hyperlink dialog on a picture. There is no text to show, so the dialog offers none; a link
|
|
10
|
+
* emptied there is removed. The dialog is read-only for a picture that cannot change.
|
|
11
|
+
*/
|
|
12
|
+
export declare const showPictureHyperlink: (picture: IPicture, sheet: IWorksheet, notifier: IReactNotifier | undefined) => void;
|
|
13
|
+
//# sourceMappingURL=_pictureHyperlink.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Bounds, Size } from '@sheetxl/utils';
|
|
2
|
+
import { IFill } from '@sheetxl/sdk';
|
|
3
|
+
/**
|
|
4
|
+
* Excel's Crop > Fill: the image covers the frame, keeping its proportions and centered. What
|
|
5
|
+
* overflows the frame is cropped; the frame stays.
|
|
6
|
+
*/
|
|
7
|
+
export declare const fillCrop: (frame: Size, natural: Size) => IFill.RectInsets;
|
|
8
|
+
/**
|
|
9
|
+
* Excel's Crop > Fit: the whole image shows in the frame, keeping its proportions and centered. Where
|
|
10
|
+
* it falls short of the frame the crop is negative; the frame stays.
|
|
11
|
+
*/
|
|
12
|
+
export declare const fitCrop: (frame: Size, natural: Size) => IFill.RectInsets;
|
|
13
|
+
/**
|
|
14
|
+
* Excel's Crop > Aspect Ratio: the largest frame of that ratio inside the frame, about the same center.
|
|
15
|
+
* The image keeps its scale and position on the sheet, so the crop takes up what the frame gave up.
|
|
16
|
+
*
|
|
17
|
+
* @param bounds The frame.
|
|
18
|
+
* @param crop The crop now.
|
|
19
|
+
* @param ratio Width over height.
|
|
20
|
+
*/
|
|
21
|
+
export declare const aspectCrop: (bounds: Bounds, crop: IFill.RectInsets, ratio: number) => {
|
|
22
|
+
bounds: Bounds;
|
|
23
|
+
crop: IFill.RectInsets;
|
|
24
|
+
};
|
|
25
|
+
/** Where the whole image lies when `crop` of it covers a box, in percentages of the box. */
|
|
26
|
+
export declare const imagePlacement: (crop: IFill.RectInsets | undefined) => {
|
|
27
|
+
left: string;
|
|
28
|
+
top: string;
|
|
29
|
+
width: string;
|
|
30
|
+
height: string;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=pictureCrop.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Props for {@link PivotAreas}. */
|
|
3
|
+
export interface PivotAreasProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The four areas, Excel's Filters, Columns, Rows and Values, each a list of chips in the table's
|
|
7
|
+
* order. A chip drags within its area or to another one, and its ▾ menu (also a right-click, or
|
|
8
|
+
* Shift+F10) moves it, takes it off, or changes a value's function. A focused chip moves with
|
|
9
|
+
* Alt+↑ / Alt+↓, comes off the table with Delete, and is renamed with F2 or a double-click; Space or
|
|
10
|
+
* Enter picks it up to move with the arrow keys.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* Goes inside a {@link PivotDragContext}.
|
|
14
|
+
*/
|
|
15
|
+
export declare const PivotAreas: (props: PivotAreasProps) => React.ReactElement;
|
|
16
|
+
//# sourceMappingURL=PivotAreas.d.ts.map
|