@dxos/plugin-sheet 0.8.4-main.9735255 → 0.8.4-main.abd8ff62ef
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/dist/lib/browser/SheetPlugin-W4PFP6WG.mjs +92 -0
- package/dist/lib/browser/SheetPlugin-W4PFP6WG.mjs.map +7 -0
- package/dist/lib/browser/chunk-5TXOUIGZ.mjs +118 -0
- package/dist/lib/browser/chunk-5TXOUIGZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-KE3AKN5W.mjs → chunk-SVGX3MWY.mjs} +25 -160
- package/dist/lib/browser/chunk-SVGX3MWY.mjs.map +7 -0
- package/dist/lib/browser/drop-axis-ZLERPPPH.mjs +23 -0
- package/dist/lib/browser/drop-axis-ZLERPPPH.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +24 -135
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/insert-axis-WTRA3HE7.mjs +16 -0
- package/dist/lib/browser/insert-axis-WTRA3HE7.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operations/index.mjs +13 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/restore-axis-PYGPW2TB.mjs +16 -0
- package/dist/lib/browser/restore-axis-PYGPW2TB.mjs.map +7 -0
- package/dist/lib/browser/scroll-to-anchor-6I4DNKBW.mjs +65 -0
- package/dist/lib/browser/scroll-to-anchor-6I4DNKBW.mjs.map +7 -0
- package/dist/lib/browser/translations.mjs +55 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -3
- package/dist/lib/node-esm/SheetPlugin-ZJRSEYHB.mjs +93 -0
- package/dist/lib/node-esm/SheetPlugin-ZJRSEYHB.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-6J5L47IB.mjs → chunk-4A2KAXTF.mjs} +25 -160
- package/dist/lib/node-esm/chunk-4A2KAXTF.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MCZFRYOP.mjs +119 -0
- package/dist/lib/node-esm/chunk-MCZFRYOP.mjs.map +7 -0
- package/dist/lib/node-esm/drop-axis-FV2GXSZP.mjs +24 -0
- package/dist/lib/node-esm/drop-axis-FV2GXSZP.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +24 -135
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/insert-axis-THXK6DCC.mjs +17 -0
- package/dist/lib/node-esm/insert-axis-THXK6DCC.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operations/index.mjs +14 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/restore-axis-JIFT3Q7Z.mjs +17 -0
- package/dist/lib/node-esm/restore-axis-JIFT3Q7Z.mjs.map +7 -0
- package/dist/lib/node-esm/scroll-to-anchor-JRDC5KK2.mjs +66 -0
- package/dist/lib/node-esm/scroll-to-anchor-JRDC5KK2.mjs.map +7 -0
- package/dist/lib/node-esm/translations.mjs +56 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -3
- package/dist/types/src/SheetPlugin.d.ts +1 -0
- package/dist/types/src/SheetPlugin.d.ts.map +1 -1
- package/dist/types/src/SheetPlugin.node.d.ts +4 -0
- package/dist/types/src/SheetPlugin.node.d.ts.map +1 -0
- package/dist/types/src/SheetPlugin.test.d.ts +2 -0
- package/dist/types/src/SheetPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/anchor-sort.d.ts +6 -0
- package/dist/types/src/capabilities/anchor-sort.d.ts.map +1 -0
- package/dist/types/src/capabilities/compute-graph-registry.d.ts +5 -0
- package/dist/types/src/capabilities/compute-graph-registry.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +9 -5
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts +5 -0
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts +6 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts +5 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -0
- package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts +1 -1
- package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts.map +1 -1
- package/dist/types/src/components/ComputeGraph/compute-graph.stories.d.ts.map +1 -1
- package/dist/types/src/components/Sheet/Sheet.d.ts +17 -0
- package/dist/types/src/components/Sheet/Sheet.d.ts.map +1 -0
- package/dist/types/src/components/Sheet/index.d.ts +2 -0
- package/dist/types/src/components/Sheet/index.d.ts.map +1 -0
- package/dist/types/src/components/SheetContent/SheetCellEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/SheetContent/SheetContent.d.ts +6 -0
- package/dist/types/src/components/SheetContent/SheetContent.d.ts.map +1 -0
- package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts +93 -0
- package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts.map +1 -0
- package/dist/types/src/components/SheetContent/index.d.ts +2 -0
- package/dist/types/src/components/SheetContent/index.d.ts.map +1 -0
- package/dist/types/src/components/{GridSheet → SheetContent}/util.d.ts +1 -1
- package/dist/types/src/components/SheetContent/util.d.ts.map +1 -0
- package/dist/types/src/components/{SheetContext/SheetContext.d.ts → SheetRoot/SheetRoot.d.ts} +8 -6
- package/dist/types/src/components/SheetRoot/SheetRoot.d.ts.map +1 -0
- package/dist/types/src/components/SheetRoot/index.d.ts +2 -0
- package/dist/types/src/components/SheetRoot/index.d.ts.map +1 -0
- package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts +6 -0
- package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts.map +1 -0
- package/dist/types/src/components/SheetStatusbar/index.d.ts +2 -0
- package/dist/types/src/components/SheetStatusbar/index.d.ts.map +1 -0
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts +5 -5
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts +72 -68
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/align.d.ts +2 -2
- package/dist/types/src/components/SheetToolbar/align.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/style.d.ts +2 -2
- package/dist/types/src/components/SheetToolbar/style.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/useToolbarState.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/{components → containers}/RangeList/RangeList.d.ts +1 -1
- package/dist/types/src/containers/RangeList/RangeList.d.ts.map +1 -0
- package/dist/types/src/containers/RangeList/index.d.ts +2 -0
- package/dist/types/src/containers/RangeList/index.d.ts.map +1 -0
- package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts +12 -0
- package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts.map +1 -0
- package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts +92 -0
- package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/SheetContainer/index.d.ts +2 -0
- package/dist/types/src/containers/SheetContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +4 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/extensions/compute.d.ts +1 -1
- package/dist/types/src/extensions/compute.d.ts.map +1 -1
- package/dist/types/src/extensions/compute.stories.d.ts.map +1 -1
- package/dist/types/src/extensions/editor/sheet-extension.d.ts +1 -1
- package/dist/types/src/extensions/editor/sheet-extension.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/integrations/thread-ranges.d.ts +1 -3
- package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
- package/dist/types/src/model/sheet-model.d.ts +2 -2
- package/dist/types/src/model/sheet-model.d.ts.map +1 -1
- package/dist/types/src/model/testing.d.ts +1 -1
- package/dist/types/src/model/testing.d.ts.map +1 -1
- package/dist/types/src/model/useSheetModel.d.ts +2 -2
- package/dist/types/src/model/useSheetModel.d.ts.map +1 -1
- package/dist/types/src/operations/definitions.d.ts +45 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/drop-axis.d.ts +5 -0
- package/dist/types/src/operations/drop-axis.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/insert-axis.d.ts +5 -0
- package/dist/types/src/operations/insert-axis.d.ts.map +1 -0
- package/dist/types/src/operations/restore-axis.d.ts +5 -0
- package/dist/types/src/operations/restore-axis.d.ts.map +1 -0
- package/dist/types/src/operations/scroll-to-anchor.d.ts +5 -0
- package/dist/types/src/operations/scroll-to-anchor.d.ts.map +1 -0
- package/dist/types/src/playwright/playwright.config.d.ts.map +1 -1
- package/dist/types/src/playwright/sheet-manager.d.ts.map +1 -1
- package/dist/types/src/serializer.d.ts +1 -1
- package/dist/types/src/serializer.d.ts.map +1 -1
- package/dist/types/src/testing/data.d.ts +1 -1
- package/dist/types/src/testing/data.d.ts.map +1 -1
- package/dist/types/src/testing/testing.d.ts +4 -4
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +74 -39
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Sheet.d.ts +3 -3
- package/dist/types/src/types/Sheet.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +13 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/sheet-range-types.d.ts +1 -1
- package/dist/types/src/types/sheet-range-types.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +0 -92
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/types/util.d.ts +1 -1
- package/dist/types/src/types/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +89 -70
- package/src/SheetPlugin.node.ts +36 -0
- package/src/SheetPlugin.test.ts +30 -0
- package/src/SheetPlugin.tsx +51 -31
- package/src/capabilities/{anchor-sort/anchor-sort.ts → anchor-sort.ts} +4 -3
- package/src/capabilities/{compute-graph-registry/compute-graph-registry.ts → compute-graph-registry.ts} +5 -3
- package/src/capabilities/index.ts +13 -5
- package/src/capabilities/{markdown/markdown.ts → markdown.ts} +4 -3
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +49 -0
- package/src/capabilities/state.ts +29 -0
- package/src/capabilities/undo-mappings.ts +30 -0
- package/src/components/ComputeGraph/ComputeGraphContextProvider.tsx +1 -1
- package/src/components/ComputeGraph/compute-graph.stories.tsx +19 -16
- package/src/components/Sheet/Sheet.tsx +20 -0
- package/src/components/Sheet/index.ts +5 -0
- package/src/components/{GridSheet → SheetContent}/SheetCellEditor.stories.tsx +10 -9
- package/src/components/{GridSheet/GridSheet.stories.tsx → SheetContent/SheetContent.stories.tsx} +20 -19
- package/src/components/{GridSheet/GridSheet.tsx → SheetContent/SheetContent.tsx} +45 -25
- package/src/components/{RangeList → SheetContent}/index.ts +1 -1
- package/src/components/{GridSheet → SheetContent}/util.ts +6 -5
- package/src/components/{SheetContext/SheetContext.tsx → SheetRoot/SheetRoot.tsx} +52 -39
- package/src/components/{GridSheet → SheetRoot}/index.ts +1 -1
- package/src/components/{FunctionEditor/FunctionEditor.tsx → SheetStatusbar/SheetStatusbar.tsx} +20 -8
- package/src/components/{FunctionEditor → SheetStatusbar}/index.ts +1 -1
- package/src/components/SheetToolbar/SheetToolbar.stories.tsx +5 -5
- package/src/components/SheetToolbar/SheetToolbar.tsx +19 -23
- package/src/components/SheetToolbar/align.ts +15 -15
- package/src/components/SheetToolbar/style.ts +12 -12
- package/src/components/index.ts +1 -7
- package/src/{components → containers}/RangeList/RangeList.tsx +17 -16
- package/src/containers/RangeList/index.ts +5 -0
- package/src/{components → containers}/SheetContainer/SheetContainer.stories.tsx +42 -46
- package/src/containers/SheetContainer/SheetContainer.tsx +57 -0
- package/src/containers/SheetContainer/index.ts +5 -0
- package/src/containers/index.ts +8 -0
- package/src/extensions/compute.stories.tsx +17 -16
- package/src/extensions/compute.ts +1 -1
- package/src/extensions/editor/sheet-extension.test.ts +1 -1
- package/src/extensions/editor/sheet-extension.ts +12 -12
- package/src/index.ts +8 -2
- package/src/integrations/thread-ranges.ts +8 -41
- package/src/meta.ts +1 -1
- package/src/model/sheet-model.test.ts +5 -5
- package/src/model/sheet-model.ts +39 -37
- package/src/model/testing.ts +2 -2
- package/src/model/useSheetModel.ts +3 -2
- package/src/operations/definitions.ts +73 -0
- package/src/operations/drop-axis.ts +26 -0
- package/src/operations/index.ts +14 -0
- package/src/operations/insert-axis.ts +19 -0
- package/src/operations/restore-axis.ts +19 -0
- package/src/operations/scroll-to-anchor.ts +31 -0
- package/src/playwright/playwright.config.ts +1 -1
- package/src/playwright/sheet.spec.ts +3 -3
- package/src/sanity.test.ts +6 -3
- package/src/serializer.ts +1 -1
- package/src/testing/data.ts +1 -1
- package/src/testing/testing.tsx +4 -4
- package/src/translations.ts +41 -36
- package/src/types/Sheet.ts +15 -9
- package/src/types/capabilities.ts +15 -3
- package/src/types/sheet-range-types.ts +3 -3
- package/src/types/types.ts +0 -80
- package/src/types/util.ts +1 -1
- package/dist/lib/browser/SheetContainer-J72HS2FI.mjs +0 -397
- package/dist/lib/browser/SheetContainer-J72HS2FI.mjs.map +0 -7
- package/dist/lib/browser/anchor-sort-LLO7PZKF.mjs +0 -23
- package/dist/lib/browser/anchor-sort-LLO7PZKF.mjs.map +0 -7
- package/dist/lib/browser/chunk-IFLWVS2V.mjs +0 -234
- package/dist/lib/browser/chunk-IFLWVS2V.mjs.map +0 -7
- package/dist/lib/browser/chunk-KE3AKN5W.mjs.map +0 -7
- package/dist/lib/browser/chunk-S27QJYTN.mjs +0 -1473
- package/dist/lib/browser/chunk-S27QJYTN.mjs.map +0 -7
- package/dist/lib/browser/compute-graph-registry-RC5L7RE4.mjs +0 -21
- package/dist/lib/browser/compute-graph-registry-RC5L7RE4.mjs.map +0 -7
- package/dist/lib/browser/markdown-D2T2DOVX.mjs +0 -29
- package/dist/lib/browser/markdown-D2T2DOVX.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-YDOW72CN.mjs +0 -79
- package/dist/lib/browser/operation-resolver-YDOW72CN.mjs.map +0 -7
- package/dist/lib/browser/react-surface-JIYVFH42.mjs +0 -51
- package/dist/lib/browser/react-surface-JIYVFH42.mjs.map +0 -7
- package/dist/lib/node-esm/SheetContainer-OGSSDOZU.mjs +0 -398
- package/dist/lib/node-esm/SheetContainer-OGSSDOZU.mjs.map +0 -7
- package/dist/lib/node-esm/anchor-sort-OX5I2YOW.mjs +0 -24
- package/dist/lib/node-esm/anchor-sort-OX5I2YOW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6J5L47IB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PPOYR7DK.mjs +0 -236
- package/dist/lib/node-esm/chunk-PPOYR7DK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Y4V6HVHO.mjs +0 -1474
- package/dist/lib/node-esm/chunk-Y4V6HVHO.mjs.map +0 -7
- package/dist/lib/node-esm/compute-graph-registry-ZGXVLVGD.mjs +0 -22
- package/dist/lib/node-esm/compute-graph-registry-ZGXVLVGD.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-PTV72DLO.mjs +0 -30
- package/dist/lib/node-esm/markdown-PTV72DLO.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-Q63VQBVA.mjs +0 -80
- package/dist/lib/node-esm/operation-resolver-Q63VQBVA.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-SWRZSZVR.mjs +0 -52
- package/dist/lib/node-esm/react-surface-SWRZSZVR.mjs.map +0 -7
- package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts +0 -5
- package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts.map +0 -1
- package/dist/types/src/capabilities/anchor-sort/index.d.ts +0 -3
- package/dist/types/src/capabilities/anchor-sort/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/compute-graph-registry/compute-graph-registry.d.ts +0 -5
- package/dist/types/src/capabilities/compute-graph-registry/compute-graph-registry.d.ts.map +0 -1
- package/dist/types/src/capabilities/compute-graph-registry/index.d.ts +0 -3
- package/dist/types/src/capabilities/compute-graph-registry/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown/index.d.ts +0 -3
- package/dist/types/src/capabilities/markdown/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown/markdown.d.ts +0 -5
- package/dist/types/src/capabilities/markdown/markdown.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts +0 -3
- package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts.map +0 -1
- package/dist/types/src/components/FunctionEditor/index.d.ts +0 -2
- package/dist/types/src/components/FunctionEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/GridSheet/GridSheet.d.ts +0 -3
- package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +0 -1
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts +0 -55
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +0 -1
- package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/GridSheet/index.d.ts +0 -2
- package/dist/types/src/components/GridSheet/index.d.ts.map +0 -1
- package/dist/types/src/components/GridSheet/util.d.ts.map +0 -1
- package/dist/types/src/components/RangeList/RangeList.d.ts.map +0 -1
- package/dist/types/src/components/RangeList/index.d.ts +0 -2
- package/dist/types/src/components/RangeList/index.d.ts.map +0 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts +0 -10
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +0 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts +0 -57
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/SheetContainer/index.d.ts +0 -3
- package/dist/types/src/components/SheetContainer/index.d.ts.map +0 -1
- package/dist/types/src/components/SheetContext/SheetContext.d.ts.map +0 -1
- package/dist/types/src/components/SheetContext/index.d.ts +0 -2
- package/dist/types/src/components/SheetContext/index.d.ts.map +0 -1
- package/src/capabilities/anchor-sort/index.ts +0 -7
- package/src/capabilities/compute-graph-registry/index.ts +0 -7
- package/src/capabilities/markdown/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -77
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -43
- package/src/components/SheetContainer/SheetContainer.tsx +0 -48
- package/src/components/SheetContainer/index.ts +0 -7
- package/src/components/SheetContext/index.ts +0 -5
- /package/dist/types/src/components/{GridSheet → SheetContent}/SheetCellEditor.stories.d.ts +0 -0
package/src/sanity.test.ts
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
import { describe, expect, test } from 'vitest';
|
|
6
6
|
|
|
7
7
|
import { Client } from '@dxos/client';
|
|
8
|
-
import {
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
import { Obj } from '@dxos/echo';
|
|
9
10
|
|
|
10
11
|
// Part 2.
|
|
11
12
|
// TODO(burdon): Cannot test outside of browser.
|
|
@@ -22,7 +23,7 @@ import { Function } from '@dxos/functions';
|
|
|
22
23
|
describe('test', () => {
|
|
23
24
|
test('test', async () => {
|
|
24
25
|
const client = new Client();
|
|
25
|
-
await client.addTypes([
|
|
26
|
+
await client.addTypes([Operation.PersistentOperation]);
|
|
26
27
|
await client.initialize();
|
|
27
28
|
await client.halo.createIdentity();
|
|
28
29
|
|
|
@@ -33,7 +34,9 @@ describe('test', () => {
|
|
|
33
34
|
// - ERROR "process.nextTick is not a function"
|
|
34
35
|
// - ERROR "Identifier 'Buffer' has already been declared" if { nodeExternal: true }
|
|
35
36
|
const space = await client.spaces.create();
|
|
36
|
-
const fn = space.db.add(
|
|
37
|
+
const fn = space.db.add(
|
|
38
|
+
Obj.make(Operation.PersistentOperation, { name: 'test', version: '0.0.1', binding: 'HELLO' }),
|
|
39
|
+
);
|
|
37
40
|
expect(fn).to.exist;
|
|
38
41
|
});
|
|
39
42
|
});
|
package/src/serializer.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { Obj } from '@dxos/echo';
|
|
|
6
6
|
import { getObjectCore } from '@dxos/echo-db';
|
|
7
7
|
import { type TypedObjectSerializer } from '@dxos/plugin-space/types';
|
|
8
8
|
|
|
9
|
-
import { Sheet } from '
|
|
9
|
+
import { Sheet } from '#types';
|
|
10
10
|
|
|
11
11
|
export const serializer: TypedObjectSerializer<Sheet.Sheet> = {
|
|
12
12
|
serialize: async ({ object }): Promise<string> => {
|
package/src/testing/data.ts
CHANGED
package/src/testing/testing.tsx
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
import { type Decorator } from '@storybook/react';
|
|
6
6
|
import React, { useState } from 'react';
|
|
7
7
|
|
|
8
|
-
import { type ComputeGraph, type ComputeGraphOptions, ComputeGraphRegistry } from '@dxos/compute';
|
|
9
|
-
import { createMockedComputeRuntimeProvider } from '@dxos/compute/testing';
|
|
8
|
+
import { type ComputeGraph, type ComputeGraphOptions, ComputeGraphRegistry } from '@dxos/compute-hyperformula';
|
|
9
|
+
import { createMockedComputeRuntimeProvider } from '@dxos/compute-hyperformula/testing';
|
|
10
10
|
import { type Space } from '@dxos/react-client/echo';
|
|
11
11
|
import { useAsyncState } from '@dxos/react-hooks';
|
|
12
12
|
|
|
13
|
-
import { ComputeGraphContextProvider } from '
|
|
14
|
-
import { Sheet } from '
|
|
13
|
+
import { ComputeGraphContextProvider } from '#components';
|
|
14
|
+
import { Sheet } from '#types';
|
|
15
15
|
|
|
16
16
|
export const useTestSheet = (space?: Space, graph?: ComputeGraph, options?: Sheet.SheetProps) => {
|
|
17
17
|
const [sheet] = useAsyncState(async () => {
|
package/src/translations.ts
CHANGED
|
@@ -4,49 +4,54 @@
|
|
|
4
4
|
|
|
5
5
|
import { type Resource } from '@dxos/react-ui';
|
|
6
6
|
|
|
7
|
-
import { meta } from '
|
|
8
|
-
import { Sheet } from '
|
|
7
|
+
import { meta } from '#meta';
|
|
8
|
+
import { Sheet } from '#types';
|
|
9
9
|
|
|
10
10
|
export const translations = [
|
|
11
11
|
{
|
|
12
12
|
'en-US': {
|
|
13
13
|
[Sheet.Sheet.typename]: {
|
|
14
|
-
'typename
|
|
15
|
-
'typename
|
|
16
|
-
'typename
|
|
17
|
-
'typename
|
|
18
|
-
'object
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'object
|
|
14
|
+
'typename.label': 'Sheet',
|
|
15
|
+
'typename.label_zero': 'Sheets',
|
|
16
|
+
'typename.label_one': 'Sheet',
|
|
17
|
+
'typename.label_other': 'Sheets',
|
|
18
|
+
'object-name.placeholder': 'New sheet',
|
|
19
|
+
'add-object.label': 'Add sheet',
|
|
20
|
+
'rename-object.label': 'Rename sheet',
|
|
21
|
+
'delete-object.label': 'Delete sheet',
|
|
22
|
+
'object-deleted.label': 'Sheet deleted',
|
|
22
23
|
},
|
|
23
24
|
[meta.id]: {
|
|
24
|
-
'plugin
|
|
25
|
-
'cell
|
|
26
|
-
|
|
27
|
-
'range
|
|
28
|
-
'range
|
|
29
|
-
|
|
30
|
-
'range
|
|
31
|
-
'range
|
|
32
|
-
'range
|
|
33
|
-
'
|
|
34
|
-
'
|
|
35
|
-
|
|
36
|
-
'
|
|
37
|
-
'
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'add
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'range
|
|
48
|
-
'
|
|
49
|
-
'
|
|
25
|
+
'plugin.name': 'Sheets',
|
|
26
|
+
'cell.placeholder': 'Cell value...',
|
|
27
|
+
|
|
28
|
+
'range-key.alignment.label': 'Align',
|
|
29
|
+
'range-key.style.label': 'Style',
|
|
30
|
+
|
|
31
|
+
'range-value.start.label': 'Align left',
|
|
32
|
+
'range-value.center.label': 'Align center',
|
|
33
|
+
'range-value.end.label': 'Align right',
|
|
34
|
+
'range-value.softwrap.label': 'Wrap text',
|
|
35
|
+
'range-value.highlight.label': 'Highlight',
|
|
36
|
+
|
|
37
|
+
'toolbar-action.label': '{{value}}',
|
|
38
|
+
'selection-overlaps-existing-comment.label': 'Selected cell already has a comment',
|
|
39
|
+
'comment.label': 'Add comment',
|
|
40
|
+
'comment-ranges-not-supported.label': 'Commenting on ranges is not yet supported',
|
|
41
|
+
'no-cursor.label': 'Select a cell to comment',
|
|
42
|
+
'add-col-before.label': 'Add column before',
|
|
43
|
+
'add-col-after.label': 'Add column after',
|
|
44
|
+
'delete-col.label': 'Delete column',
|
|
45
|
+
'add-row-before.label': 'Add row before',
|
|
46
|
+
'add-row-after.label': 'Add row after',
|
|
47
|
+
'delete-row.label': 'Delete row',
|
|
48
|
+
'range-list.heading': 'Ranges',
|
|
49
|
+
'no-ranges.message': 'No ranges',
|
|
50
|
+
'range.title': '{{position}} — {{value}}',
|
|
51
|
+
'col-dropped.label': 'Deleted a column',
|
|
52
|
+
'row-dropped.label': 'Deleted a row',
|
|
53
|
+
'align.label': 'Text align',
|
|
54
|
+
'axis-dropped.label': 'Drop axis', // TODO(burdon): What does this mean?
|
|
50
55
|
},
|
|
51
56
|
},
|
|
52
57
|
},
|
package/src/types/Sheet.ts
CHANGED
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
5
7
|
import * as Schema from 'effect/Schema';
|
|
6
8
|
|
|
7
|
-
import { addressFromA1Notation, isFormula } from '@dxos/compute';
|
|
8
|
-
import { Obj, Type } from '@dxos/echo';
|
|
9
|
+
import { addressFromA1Notation, isFormula } from '@dxos/compute-hyperformula';
|
|
10
|
+
import { Annotation, Obj, Type } from '@dxos/echo';
|
|
9
11
|
import { FormInputAnnotation } from '@dxos/echo/internal';
|
|
10
12
|
|
|
11
13
|
import { addressToIndex, initialize, mapFormulaRefsToIndices } from './util';
|
|
@@ -62,9 +64,13 @@ export const Sheet = Schema.Struct({
|
|
|
62
64
|
ranges: Schema.Array(Range).pipe(FormInputAnnotation.set(false)),
|
|
63
65
|
}).pipe(
|
|
64
66
|
Type.object({
|
|
65
|
-
typename: 'dxos.
|
|
67
|
+
typename: 'org.dxos.type.sheet',
|
|
66
68
|
version: '0.1.0',
|
|
67
69
|
}),
|
|
70
|
+
Annotation.IconAnnotation.set({
|
|
71
|
+
icon: 'ph--grid-nine--regular',
|
|
72
|
+
hue: 'indigo',
|
|
73
|
+
}),
|
|
68
74
|
);
|
|
69
75
|
|
|
70
76
|
export interface Sheet extends Schema.Schema.Type<typeof Sheet> {}
|
|
@@ -77,18 +83,18 @@ export type SheetProps = {
|
|
|
77
83
|
export const make = ({ name, cells = {}, ...size }: SheetProps = {}) => {
|
|
78
84
|
const sheet = Obj.make(Sheet, { name, cells: {}, rows: [], columns: [], rowMeta: {}, columnMeta: {}, ranges: [] });
|
|
79
85
|
|
|
80
|
-
// Initialize and set cells within Obj.
|
|
81
|
-
Obj.
|
|
82
|
-
initialize(
|
|
86
|
+
// Initialize and set cells within Obj.update to satisfy change context requirements.
|
|
87
|
+
Obj.update(sheet, (sheet) => {
|
|
88
|
+
initialize(sheet, size);
|
|
83
89
|
|
|
84
90
|
if (cells) {
|
|
85
91
|
Object.entries(cells).forEach(([key, { value }]) => {
|
|
86
|
-
const idx = addressToIndex(
|
|
92
|
+
const idx = addressToIndex(sheet, addressFromA1Notation(key));
|
|
87
93
|
if (isFormula(value)) {
|
|
88
|
-
value = mapFormulaRefsToIndices(
|
|
94
|
+
value = mapFormulaRefsToIndices(sheet, value);
|
|
89
95
|
}
|
|
90
96
|
|
|
91
|
-
|
|
97
|
+
sheet.cells[idx] = { value };
|
|
92
98
|
});
|
|
93
99
|
}
|
|
94
100
|
});
|
|
@@ -3,12 +3,24 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capability } from '@dxos/app-framework';
|
|
6
|
-
import { type ComputeGraphRegistry } from '@dxos/compute';
|
|
6
|
+
import { type ComputeGraphRegistry } from '@dxos/compute-hyperformula';
|
|
7
|
+
import { type DxGridElement, type GridContentProps } from '@dxos/react-ui-grid';
|
|
7
8
|
|
|
8
|
-
import { meta } from '
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
|
|
11
|
+
export type GridEntry = { grid: DxGridElement; setActiveRefs: (refs: GridContentProps['activeRefs']) => void };
|
|
12
|
+
|
|
13
|
+
export type GridRegistry = {
|
|
14
|
+
register: (attendableId: string, grid: DxGridElement, setActiveRefs: GridEntry['setActiveRefs']) => void;
|
|
15
|
+
unregister: (attendableId: string) => void;
|
|
16
|
+
get: (attendableId: string) => GridEntry | undefined;
|
|
17
|
+
};
|
|
9
18
|
|
|
10
19
|
export namespace SheetCapabilities {
|
|
11
20
|
export const ComputeGraphRegistry = Capability.make<ComputeGraphRegistry>(
|
|
12
|
-
`${meta.id}
|
|
21
|
+
`${meta.id}.capability.compute-graph-registry`,
|
|
13
22
|
);
|
|
23
|
+
|
|
24
|
+
/** Registry of active grid instances keyed by attendable ID. */
|
|
25
|
+
export const GridInstances = Capability.make<GridRegistry>(`${meta.id}.capability.grid-instances`);
|
|
14
26
|
}
|
|
@@ -34,14 +34,14 @@ export const cellClassNameForRange = ({ key, value }: Sheet.Sheet['ranges'][numb
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
case commentKey:
|
|
37
|
-
return 'bg-
|
|
37
|
+
return 'bg-grid-comment';
|
|
38
38
|
|
|
39
39
|
case styleKey:
|
|
40
40
|
switch (value) {
|
|
41
41
|
case 'highlight':
|
|
42
|
-
return '
|
|
42
|
+
return 'bg-grid-highlight!';
|
|
43
43
|
case 'softwrap':
|
|
44
|
-
return '
|
|
44
|
+
return 'whitespace-normal!';
|
|
45
45
|
default:
|
|
46
46
|
return undefined;
|
|
47
47
|
}
|
package/src/types/types.ts
CHANGED
|
@@ -4,13 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import { Operation } from '@dxos/operation';
|
|
9
|
-
import { SpaceSchema } from '@dxos/react-client/echo';
|
|
10
|
-
import { Collection } from '@dxos/schema';
|
|
11
|
-
|
|
12
|
-
import { meta } from '../meta';
|
|
13
|
-
|
|
14
7
|
import * as Sheet from './Sheet';
|
|
15
8
|
|
|
16
9
|
// TODO(wittjosiah): Factor out. This is `DxGridAxis` from `@dxos/react-ui-grid`.
|
|
@@ -27,76 +20,3 @@ export namespace SheetAction {
|
|
|
27
20
|
|
|
28
21
|
export type RestoreAxis = Schema.Schema.Type<typeof RestoreAxis>;
|
|
29
22
|
}
|
|
30
|
-
|
|
31
|
-
const SHEET_OPERATION = `${meta.id}/operation`;
|
|
32
|
-
|
|
33
|
-
// TODO(wittjosiah): Factor out. This is `DxGridAxis` from `@dxos/react-ui-grid`.
|
|
34
|
-
const Axis = Schema.Union(Schema.Literal('row'), Schema.Literal('col'));
|
|
35
|
-
|
|
36
|
-
export namespace SheetOperation {
|
|
37
|
-
export const OnCreateSpace = Operation.make({
|
|
38
|
-
meta: { key: `${SHEET_OPERATION}/on-create-space`, name: 'On Create Space' },
|
|
39
|
-
services: [Capability.Service],
|
|
40
|
-
schema: {
|
|
41
|
-
input: Schema.Struct({
|
|
42
|
-
space: SpaceSchema,
|
|
43
|
-
rootCollection: Collection.Collection,
|
|
44
|
-
isDefault: Schema.optional(Schema.Boolean),
|
|
45
|
-
}),
|
|
46
|
-
output: Schema.Void,
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
export const InsertAxis = Operation.make({
|
|
51
|
-
meta: { key: `${SHEET_OPERATION}/axis-insert`, name: 'Insert Axis' },
|
|
52
|
-
schema: {
|
|
53
|
-
input: Schema.Struct({
|
|
54
|
-
model: Schema.Any,
|
|
55
|
-
axis: Axis,
|
|
56
|
-
index: Schema.Number,
|
|
57
|
-
count: Schema.optional(Schema.Number),
|
|
58
|
-
}),
|
|
59
|
-
output: Schema.Void,
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
export const DropAxisOutput = Schema.Struct({
|
|
64
|
-
axis: Axis.annotations({ description: 'The axis type (row or col).' }),
|
|
65
|
-
axisIndex: Schema.String.annotations({ description: 'The dropped axis index.' }),
|
|
66
|
-
index: Schema.Number.annotations({ description: 'The position the axis was at.' }),
|
|
67
|
-
axisMeta: Schema.Any.annotations({ description: 'The row/column metadata.' }),
|
|
68
|
-
values: Schema.Array(Schema.Any).annotations({ description: 'The cell values that were dropped.' }),
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
export type DropAxisOutput = Schema.Schema.Type<typeof DropAxisOutput>;
|
|
72
|
-
|
|
73
|
-
export const DropAxis = Operation.make({
|
|
74
|
-
meta: { key: `${SHEET_OPERATION}/axis-drop`, name: 'Drop Axis' },
|
|
75
|
-
schema: {
|
|
76
|
-
input: Schema.Struct({
|
|
77
|
-
model: Schema.Any,
|
|
78
|
-
axis: Axis,
|
|
79
|
-
axisIndex: Schema.String,
|
|
80
|
-
}),
|
|
81
|
-
output: DropAxisOutput,
|
|
82
|
-
},
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Restore a dropped axis (inverse of DropAxis).
|
|
87
|
-
*/
|
|
88
|
-
export const RestoreAxis = Operation.make({
|
|
89
|
-
meta: { key: `${SHEET_OPERATION}/restore-axis`, name: 'Restore Axis' },
|
|
90
|
-
schema: {
|
|
91
|
-
input: Schema.Struct({
|
|
92
|
-
model: Schema.Any.annotations({ description: 'The sheet model.' }),
|
|
93
|
-
axis: Axis.annotations({ description: 'The axis type (row or col).' }),
|
|
94
|
-
axisIndex: Schema.String.annotations({ description: 'The axis index to restore.' }),
|
|
95
|
-
index: Schema.Number.annotations({ description: 'The position to restore at.' }),
|
|
96
|
-
axisMeta: Schema.Any.annotations({ description: 'The row/column metadata.' }),
|
|
97
|
-
values: Schema.Array(Schema.Any).annotations({ description: 'The cell values to restore.' }),
|
|
98
|
-
}),
|
|
99
|
-
output: Schema.Void,
|
|
100
|
-
},
|
|
101
|
-
});
|
|
102
|
-
}
|
package/src/types/util.ts
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
addressFromA1Notation,
|
|
10
10
|
addressToA1Notation,
|
|
11
11
|
isFormula,
|
|
12
|
-
} from '@dxos/compute';
|
|
12
|
+
} from '@dxos/compute-hyperformula';
|
|
13
13
|
import { randomBytes } from '@dxos/crypto';
|
|
14
14
|
import { type Obj } from '@dxos/echo';
|
|
15
15
|
import { invariant } from '@dxos/invariant';
|