@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-sheet",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.abd8ff62ef",
|
|
4
4
|
"description": "Braneframe sketch plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -12,28 +12,48 @@
|
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#plugin": {
|
|
17
|
+
"browser": "./src/SheetPlugin.tsx",
|
|
18
|
+
"node": "./src/SheetPlugin.node.ts",
|
|
19
|
+
"default": "./src/SheetPlugin.tsx"
|
|
20
|
+
},
|
|
21
|
+
"#capabilities": "./src/capabilities/index.ts",
|
|
22
|
+
"#components": "./src/components/index.ts",
|
|
23
|
+
"#containers": "./src/containers/index.ts",
|
|
24
|
+
"#meta": "./src/meta.ts",
|
|
25
|
+
"#operations": "./src/operations/index.ts",
|
|
26
|
+
"#testing": "./src/testing/index.ts",
|
|
27
|
+
"#translations": "./src/translations.ts",
|
|
28
|
+
"#types": "./src/types/index.ts"
|
|
29
|
+
},
|
|
15
30
|
"exports": {
|
|
16
31
|
".": {
|
|
32
|
+
"source": "./src/index.ts",
|
|
17
33
|
"browser": "./dist/lib/browser/index.mjs",
|
|
18
34
|
"node": "./dist/lib/node-esm/index.mjs",
|
|
19
|
-
"source": "./src/index.ts",
|
|
20
35
|
"types": "./dist/types/src/index.d.ts"
|
|
21
36
|
},
|
|
37
|
+
"./operations": {
|
|
38
|
+
"source": "./src/operations/index.ts",
|
|
39
|
+
"browser": "./dist/lib/browser/operations/index.mjs",
|
|
40
|
+
"node": "./dist/lib/node-esm/operations/index.mjs",
|
|
41
|
+
"types": "./dist/types/src/operations/index.d.ts"
|
|
42
|
+
},
|
|
43
|
+
"./translations": {
|
|
44
|
+
"source": "./src/translations.ts",
|
|
45
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
46
|
+
"browser": "./dist/lib/browser/translations.mjs",
|
|
47
|
+
"node": "./dist/lib/node-esm/translations.mjs"
|
|
48
|
+
},
|
|
22
49
|
"./types": {
|
|
50
|
+
"source": "./src/types/index.ts",
|
|
23
51
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
24
52
|
"node": "./dist/lib/node-esm/types/index.mjs",
|
|
25
|
-
"source": "./src/types/index.ts",
|
|
26
53
|
"types": "./dist/types/src/types/index.d.ts"
|
|
27
54
|
}
|
|
28
55
|
},
|
|
29
56
|
"types": "dist/types/src/index.d.ts",
|
|
30
|
-
"typesVersions": {
|
|
31
|
-
"*": {
|
|
32
|
-
"types": [
|
|
33
|
-
"dist/types/src/types/index.d.ts"
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
57
|
"files": [
|
|
38
58
|
"dist",
|
|
39
59
|
"src"
|
|
@@ -53,83 +73,82 @@
|
|
|
53
73
|
"@lezer/lr": "^1.4.2",
|
|
54
74
|
"@radix-ui/react-context": "1.1.1",
|
|
55
75
|
"codemirror-lang-spreadsheet": "^1.3.0",
|
|
56
|
-
"date-fns": "^3.
|
|
76
|
+
"date-fns": "^3.6.0",
|
|
57
77
|
"lodash.defaultsdeep": "^4.6.1",
|
|
58
78
|
"re-resizable": "^6.9.17",
|
|
59
79
|
"react-markdown": "^10.1.0",
|
|
60
80
|
"react-resize-detector": "^11.0.1",
|
|
61
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
62
|
-
"@dxos/async": "0.8.4-main.
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/lit-grid": "0.8.4-main.
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/plugin-
|
|
77
|
-
"@dxos/plugin-automation": "0.8.4-main.
|
|
78
|
-
"@dxos/plugin-
|
|
79
|
-
"@dxos/plugin-
|
|
80
|
-
"@dxos/plugin-
|
|
81
|
-
"@dxos/plugin-markdown": "0.8.4-main.
|
|
82
|
-
"@dxos/plugin-
|
|
83
|
-
"@dxos/plugin-
|
|
84
|
-
"@dxos/plugin-stack": "0.8.4-main.
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/react-
|
|
87
|
-
"@dxos/react-
|
|
88
|
-
"@dxos/react-ui-
|
|
89
|
-
"@dxos/react-ui-
|
|
90
|
-
"@dxos/react-ui-
|
|
91
|
-
"@dxos/
|
|
92
|
-
"@dxos/react-ui-list": "0.8.4-main.
|
|
93
|
-
"@dxos/react-ui-
|
|
94
|
-
"@dxos/react-ui-stack": "0.8.4-main.
|
|
95
|
-
"@dxos/
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/
|
|
99
|
-
"@dxos/util": "0.8.4-main.
|
|
81
|
+
"@dxos/app-framework": "0.8.4-main.abd8ff62ef",
|
|
82
|
+
"@dxos/async": "0.8.4-main.abd8ff62ef",
|
|
83
|
+
"@dxos/app-toolkit": "0.8.4-main.abd8ff62ef",
|
|
84
|
+
"@dxos/client": "0.8.4-main.abd8ff62ef",
|
|
85
|
+
"@dxos/compute": "0.8.4-main.abd8ff62ef",
|
|
86
|
+
"@dxos/context": "0.8.4-main.abd8ff62ef",
|
|
87
|
+
"@dxos/compute-hyperformula": "0.8.4-main.abd8ff62ef",
|
|
88
|
+
"@dxos/debug": "0.8.4-main.abd8ff62ef",
|
|
89
|
+
"@dxos/echo": "0.8.4-main.abd8ff62ef",
|
|
90
|
+
"@dxos/crypto": "0.8.4-main.abd8ff62ef",
|
|
91
|
+
"@dxos/echo-db": "0.8.4-main.abd8ff62ef",
|
|
92
|
+
"@dxos/invariant": "0.8.4-main.abd8ff62ef",
|
|
93
|
+
"@dxos/lit-grid": "0.8.4-main.abd8ff62ef",
|
|
94
|
+
"@dxos/keys": "0.8.4-main.abd8ff62ef",
|
|
95
|
+
"@dxos/log": "0.8.4-main.abd8ff62ef",
|
|
96
|
+
"@dxos/plugin-client": "0.8.4-main.abd8ff62ef",
|
|
97
|
+
"@dxos/plugin-automation": "0.8.4-main.abd8ff62ef",
|
|
98
|
+
"@dxos/plugin-deck": "0.8.4-main.abd8ff62ef",
|
|
99
|
+
"@dxos/plugin-graph": "0.8.4-main.abd8ff62ef",
|
|
100
|
+
"@dxos/plugin-script": "0.8.4-main.abd8ff62ef",
|
|
101
|
+
"@dxos/plugin-markdown": "0.8.4-main.abd8ff62ef",
|
|
102
|
+
"@dxos/plugin-space": "0.8.4-main.abd8ff62ef",
|
|
103
|
+
"@dxos/plugin-attention": "0.8.4-main.abd8ff62ef",
|
|
104
|
+
"@dxos/plugin-stack": "0.8.4-main.abd8ff62ef",
|
|
105
|
+
"@dxos/react-client": "0.8.4-main.abd8ff62ef",
|
|
106
|
+
"@dxos/react-hooks": "0.8.4-main.abd8ff62ef",
|
|
107
|
+
"@dxos/react-ui-attention": "0.8.4-main.abd8ff62ef",
|
|
108
|
+
"@dxos/react-ui-editor": "0.8.4-main.abd8ff62ef",
|
|
109
|
+
"@dxos/react-ui-form": "0.8.4-main.abd8ff62ef",
|
|
110
|
+
"@dxos/react-ui-grid": "0.8.4-main.abd8ff62ef",
|
|
111
|
+
"@dxos/plugin-thread": "0.8.4-main.abd8ff62ef",
|
|
112
|
+
"@dxos/react-ui-list": "0.8.4-main.abd8ff62ef",
|
|
113
|
+
"@dxos/react-ui-menu": "0.8.4-main.abd8ff62ef",
|
|
114
|
+
"@dxos/react-ui-stack": "0.8.4-main.abd8ff62ef",
|
|
115
|
+
"@dxos/schema": "0.8.4-main.abd8ff62ef",
|
|
116
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.abd8ff62ef",
|
|
117
|
+
"@dxos/ui-editor": "0.8.4-main.abd8ff62ef",
|
|
118
|
+
"@dxos/types": "0.8.4-main.abd8ff62ef",
|
|
119
|
+
"@dxos/util": "0.8.4-main.abd8ff62ef"
|
|
100
120
|
},
|
|
101
121
|
"devDependencies": {
|
|
102
|
-
"@effect-atom/atom-react": "^0.
|
|
103
|
-
"@effect/platform": "0.
|
|
122
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
123
|
+
"@effect/platform": "0.94.4",
|
|
104
124
|
"@lezer/generator": "^1.7.1",
|
|
105
125
|
"@tldraw/indices": "^2.0.0-alpha.14",
|
|
106
126
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
107
127
|
"@types/react": "~19.2.7",
|
|
108
128
|
"@types/react-dom": "~19.2.3",
|
|
109
|
-
"
|
|
110
|
-
"effect": "3.19.11",
|
|
129
|
+
"effect": "3.20.0",
|
|
111
130
|
"react": "~19.2.3",
|
|
112
131
|
"react-dom": "~19.2.3",
|
|
113
|
-
"vite": "
|
|
114
|
-
"@dxos/lit-grid": "0.8.4-main.
|
|
115
|
-
"@dxos/
|
|
116
|
-
"@dxos/
|
|
117
|
-
"@dxos/
|
|
118
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
119
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
120
|
-
"@dxos/
|
|
121
|
-
"@dxos/
|
|
122
|
-
"@dxos/
|
|
123
|
-
"@dxos/ui-types": "0.8.4-main.
|
|
132
|
+
"vite": "^8.0.10",
|
|
133
|
+
"@dxos/lit-grid": "0.8.4-main.abd8ff62ef",
|
|
134
|
+
"@dxos/echo-generator": "0.8.4-main.abd8ff62ef",
|
|
135
|
+
"@dxos/random": "0.8.4-main.abd8ff62ef",
|
|
136
|
+
"@dxos/plugin-testing": "0.8.4-main.abd8ff62ef",
|
|
137
|
+
"@dxos/react-ui": "0.8.4-main.abd8ff62ef",
|
|
138
|
+
"@dxos/storybook-utils": "0.8.4-main.abd8ff62ef",
|
|
139
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.abd8ff62ef",
|
|
140
|
+
"@dxos/test-utils": "0.8.4-main.abd8ff62ef",
|
|
141
|
+
"@dxos/ui-theme": "0.8.4-main.abd8ff62ef",
|
|
142
|
+
"@dxos/ui-types": "0.8.4-main.abd8ff62ef"
|
|
124
143
|
},
|
|
125
144
|
"peerDependencies": {
|
|
126
|
-
"@effect-atom/atom-react": "^0.
|
|
127
|
-
"@effect/platform": "0.
|
|
128
|
-
"effect": "3.
|
|
145
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
146
|
+
"@effect/platform": "0.94.4",
|
|
147
|
+
"effect": "3.20.0",
|
|
129
148
|
"react": "~19.2.3",
|
|
130
149
|
"react-dom": "~19.2.3",
|
|
131
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
132
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
150
|
+
"@dxos/react-ui": "0.8.4-main.abd8ff62ef",
|
|
151
|
+
"@dxos/ui-theme": "0.8.4-main.abd8ff62ef"
|
|
133
152
|
},
|
|
134
153
|
"publishConfig": {
|
|
135
154
|
"access": "public"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Option from 'effect/Option';
|
|
6
|
+
|
|
7
|
+
import { Plugin } from '@dxos/app-framework';
|
|
8
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
9
|
+
import { Annotation } from '@dxos/echo';
|
|
10
|
+
|
|
11
|
+
import { OperationHandler, UndoMappings } from '#capabilities';
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
import { Sheet } from '#types';
|
|
14
|
+
|
|
15
|
+
import { serializer } from './serializer';
|
|
16
|
+
|
|
17
|
+
export const SheetPlugin = Plugin.define(meta).pipe(
|
|
18
|
+
AppPlugin.addMetadataModule({
|
|
19
|
+
metadata: {
|
|
20
|
+
id: Sheet.Sheet.typename,
|
|
21
|
+
metadata: {
|
|
22
|
+
label: (object: Sheet.Sheet) => object.name,
|
|
23
|
+
icon: Annotation.IconAnnotation.get(Sheet.Sheet).pipe(Option.getOrThrow).icon,
|
|
24
|
+
iconHue: Annotation.IconAnnotation.get(Sheet.Sheet).pipe(Option.getOrThrow).hue ?? 'white',
|
|
25
|
+
serializer,
|
|
26
|
+
comments: 'anchored',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
}),
|
|
30
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
31
|
+
AppPlugin.addUndoMappingsModule({ activate: UndoMappings }),
|
|
32
|
+
AppPlugin.addSchemaModule({ schema: [Sheet.Sheet] }),
|
|
33
|
+
Plugin.make,
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
export default SheetPlugin;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { ActivationEvents } from '@dxos/app-framework';
|
|
8
|
+
import { ClientPlugin } from '@dxos/plugin-client';
|
|
9
|
+
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
10
|
+
|
|
11
|
+
import { SheetPlugin } from '#plugin';
|
|
12
|
+
|
|
13
|
+
import { meta } from './meta';
|
|
14
|
+
|
|
15
|
+
const moduleId = (name: string) => `${meta.id}.module.${name}`;
|
|
16
|
+
|
|
17
|
+
describe('SheetPlugin', () => {
|
|
18
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
19
|
+
await using harness = await createComposerTestApp({
|
|
20
|
+
plugins: [ClientPlugin({}), SheetPlugin()],
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
expect(harness.manager.getActive()).toEqual(expect.arrayContaining([moduleId('metadata'), moduleId('schema')]));
|
|
24
|
+
|
|
25
|
+
await harness.fire(ActivationEvents.SetupOperationHandler);
|
|
26
|
+
expect(harness.manager.getActive()).toEqual(
|
|
27
|
+
expect.arrayContaining([moduleId('OperationHandler'), moduleId('UndoMappings')]),
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
});
|
package/src/SheetPlugin.tsx
CHANGED
|
@@ -3,50 +3,70 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Option from 'effect/Option';
|
|
6
7
|
|
|
7
|
-
import { ActivationEvent,
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
8
|
+
import { ActivationEvent, Plugin } from '@dxos/app-framework';
|
|
9
|
+
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
11
|
+
import { Annotation } from '@dxos/echo';
|
|
12
|
+
import { AutomationEvents } from '@dxos/plugin-automation/types';
|
|
13
|
+
import { ClientEvents } from '@dxos/plugin-client/types';
|
|
14
|
+
import { MarkdownEvents } from '@dxos/plugin-markdown/types';
|
|
15
|
+
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
13
16
|
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
14
17
|
|
|
15
|
-
import {
|
|
16
|
-
|
|
18
|
+
import {
|
|
19
|
+
AnchorSort,
|
|
20
|
+
ComputeGraphRegistry,
|
|
21
|
+
Markdown,
|
|
22
|
+
OperationHandler,
|
|
23
|
+
UndoMappings,
|
|
24
|
+
ReactSurface,
|
|
25
|
+
SheetState,
|
|
26
|
+
} from '#capabilities';
|
|
27
|
+
import { meta } from '#meta';
|
|
28
|
+
import { SheetOperation } from '#operations';
|
|
29
|
+
import { translations } from '#translations';
|
|
30
|
+
import { Sheet } from '#types';
|
|
31
|
+
|
|
17
32
|
import { serializer } from './serializer';
|
|
18
|
-
import { translations } from './translations';
|
|
19
|
-
import { Sheet, SheetOperation } from './types';
|
|
20
33
|
|
|
21
34
|
export const SheetPlugin = Plugin.define(meta).pipe(
|
|
22
|
-
|
|
23
|
-
activatesOn: ActivationEvent.allOf(ClientEvents.ClientReady, AutomationEvents.ComputeRuntimeReady),
|
|
24
|
-
activate: ComputeGraphRegistry,
|
|
25
|
-
}),
|
|
26
|
-
Common.Plugin.addTranslationsModule({ translations }),
|
|
27
|
-
Common.Plugin.addMetadataModule({
|
|
35
|
+
AppPlugin.addMetadataModule({
|
|
28
36
|
metadata: {
|
|
29
37
|
id: Sheet.Sheet.typename,
|
|
30
38
|
metadata: {
|
|
31
39
|
label: (object: Sheet.Sheet) => object.name,
|
|
32
|
-
icon:
|
|
33
|
-
iconHue: '
|
|
40
|
+
icon: Annotation.IconAnnotation.get(Sheet.Sheet).pipe(Option.getOrThrow).icon,
|
|
41
|
+
iconHue: Annotation.IconAnnotation.get(Sheet.Sheet).pipe(Option.getOrThrow).hue ?? 'white',
|
|
34
42
|
serializer,
|
|
35
43
|
comments: 'anchored',
|
|
36
|
-
createObject: ((props
|
|
44
|
+
createObject: ((props, options) =>
|
|
45
|
+
Effect.gen(function* () {
|
|
46
|
+
const object = Sheet.make(props);
|
|
47
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
48
|
+
object,
|
|
49
|
+
target: options.target,
|
|
50
|
+
hidden: true,
|
|
51
|
+
targetNodeId: options.targetNodeId,
|
|
52
|
+
});
|
|
53
|
+
})) satisfies CreateObject,
|
|
54
|
+
scrollToAnchor: SheetOperation.ScrollToAnchor,
|
|
37
55
|
},
|
|
38
56
|
},
|
|
39
57
|
}),
|
|
40
|
-
|
|
58
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
59
|
+
AppPlugin.addUndoMappingsModule({ activate: UndoMappings }),
|
|
60
|
+
AppPlugin.addSchemaModule({ schema: [Sheet.Sheet] }),
|
|
61
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
62
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
41
63
|
Plugin.addModule({
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
),
|
|
49
|
-
),
|
|
64
|
+
activatesOn: AppActivationEvents.SetupSettings,
|
|
65
|
+
activate: SheetState,
|
|
66
|
+
}),
|
|
67
|
+
Plugin.addModule({
|
|
68
|
+
activatesOn: ActivationEvent.allOf(ClientEvents.ClientReady, AutomationEvents.ComputeRuntimeReady),
|
|
69
|
+
activate: ComputeGraphRegistry,
|
|
50
70
|
}),
|
|
51
71
|
Plugin.addModule({
|
|
52
72
|
activatesOn: MarkdownEvents.SetupExtensions,
|
|
@@ -54,10 +74,10 @@ export const SheetPlugin = Plugin.define(meta).pipe(
|
|
|
54
74
|
}),
|
|
55
75
|
Plugin.addModule({
|
|
56
76
|
// TODO(wittjosiah): More relevant event?
|
|
57
|
-
activatesOn:
|
|
77
|
+
activatesOn: AppActivationEvents.AppGraphReady,
|
|
58
78
|
activate: AnchorSort,
|
|
59
79
|
}),
|
|
60
|
-
Common.Plugin.addSurfaceModule({ activate: ReactSurface }),
|
|
61
|
-
Common.Plugin.addOperationResolverModule({ activate: OperationResolver }),
|
|
62
80
|
Plugin.make,
|
|
63
81
|
);
|
|
82
|
+
|
|
83
|
+
export default SheetPlugin;
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import { Capability
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
8
9
|
import { Relation } from '@dxos/echo';
|
|
9
10
|
|
|
10
|
-
import { Sheet, compareIndexPositions } from '
|
|
11
|
+
import { Sheet, compareIndexPositions } from '#types';
|
|
11
12
|
|
|
12
13
|
export default Capability.makeModule(() =>
|
|
13
14
|
Effect.succeed(
|
|
14
|
-
Capability.contributes(
|
|
15
|
+
Capability.contributes(AppCapabilities.AnchorSort, {
|
|
15
16
|
key: Sheet.Sheet.typename,
|
|
16
17
|
sort: (anchorA, anchorB) => {
|
|
17
18
|
const sheet = Relation.getTarget(anchorA) as Sheet.Sheet;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
8
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation/types';
|
|
9
9
|
|
|
10
|
-
import { SheetCapabilities } from '
|
|
10
|
+
import { SheetCapabilities } from '#types';
|
|
11
11
|
|
|
12
12
|
// Locally declare the Automation ComputeRuntime capability by ID to avoid direct import dependency.
|
|
13
13
|
|
|
@@ -16,7 +16,9 @@ export default Capability.makeModule(
|
|
|
16
16
|
const computeRuntimeResolver = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
|
|
17
17
|
// TODO(wittjosiah): This can probably be a module level import now due to lazy capability loading.
|
|
18
18
|
// Async import removes direct dependency on hyperformula.
|
|
19
|
-
const { defaultPlugins, ComputeGraphRegistry } = yield* Effect.tryPromise(
|
|
19
|
+
const { defaultPlugins, ComputeGraphRegistry } = yield* Effect.tryPromise(
|
|
20
|
+
() => import('@dxos/compute-hyperformula'),
|
|
21
|
+
);
|
|
20
22
|
const computeGraphRegistry = new ComputeGraphRegistry({
|
|
21
23
|
plugins: defaultPlugins,
|
|
22
24
|
computeRuntime: computeRuntimeResolver,
|
|
@@ -2,8 +2,16 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
export
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
7
|
+
|
|
8
|
+
export const AnchorSort = Capability.lazy('AnchorSort', () => import('./anchor-sort'));
|
|
9
|
+
export const ComputeGraphRegistry = Capability.lazy('ComputeGraphRegistry', () => import('./compute-graph-registry'));
|
|
10
|
+
export const Markdown = Capability.lazy('Markdown', () => import('./markdown'));
|
|
11
|
+
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
12
|
+
'OperationHandler',
|
|
13
|
+
() => import('./operation-handler'),
|
|
14
|
+
);
|
|
15
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
16
|
+
export const SheetState = Capability.lazy('SheetState', () => import('./state'));
|
|
17
|
+
export const UndoMappings = Capability.lazy('UndoMappings', () => import('./undo-mappings'));
|
|
@@ -6,10 +6,11 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
8
|
import { getSpace } from '@dxos/client/echo';
|
|
9
|
-
import { MarkdownCapabilities } from '@dxos/plugin-markdown';
|
|
9
|
+
import { MarkdownCapabilities } from '@dxos/plugin-markdown/types';
|
|
10
10
|
|
|
11
|
-
import {
|
|
12
|
-
|
|
11
|
+
import { SheetCapabilities } from '#types';
|
|
12
|
+
|
|
13
|
+
import { computeGraphFacet } from '../extensions';
|
|
13
14
|
|
|
14
15
|
export default Capability.makeModule(
|
|
15
16
|
Effect.fnUntraced(function* () {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
9
|
+
|
|
10
|
+
import { SheetOperationHandlerSet } from '#operations';
|
|
11
|
+
|
|
12
|
+
export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
|
|
13
|
+
Effect.fnUntraced(function* () {
|
|
14
|
+
return Capability.contributes(Capabilities.OperationHandler, SheetOperationHandlerSet);
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface, useCapability } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
11
|
+
import { Obj } from '@dxos/echo';
|
|
12
|
+
import { getSpace } from '@dxos/react-client/echo';
|
|
13
|
+
|
|
14
|
+
import { RangeList, SheetContainer } from '#containers';
|
|
15
|
+
import { Sheet, SheetCapabilities } from '#types';
|
|
16
|
+
|
|
17
|
+
export default Capability.makeModule(() =>
|
|
18
|
+
Effect.succeed(
|
|
19
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
20
|
+
Surface.create({
|
|
21
|
+
id: 'sheet',
|
|
22
|
+
// TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
|
|
23
|
+
role: ['article', 'section'],
|
|
24
|
+
filter: (data): data is { attendableId: string; subject: Sheet.Sheet } =>
|
|
25
|
+
typeof data.attendableId === 'string' &&
|
|
26
|
+
Obj.instanceOf(Sheet.Sheet, data.subject) &&
|
|
27
|
+
!!getSpace(data.subject),
|
|
28
|
+
component: ({ data, role }) => {
|
|
29
|
+
const computeGraphRegistry = useCapability(SheetCapabilities.ComputeGraphRegistry);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<SheetContainer
|
|
33
|
+
role={role}
|
|
34
|
+
subject={data.subject}
|
|
35
|
+
attendableId={data.attendableId}
|
|
36
|
+
space={getSpace(data.subject)!}
|
|
37
|
+
registry={computeGraphRegistry}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
},
|
|
41
|
+
}),
|
|
42
|
+
Surface.create({
|
|
43
|
+
id: 'object-properties',
|
|
44
|
+
filter: AppSurface.object(AppSurface.ObjectProperties, Sheet.Sheet),
|
|
45
|
+
component: ({ data }) => <RangeList sheet={data.subject} />,
|
|
46
|
+
}),
|
|
47
|
+
]),
|
|
48
|
+
),
|
|
49
|
+
);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
|
|
9
|
+
import { type GridEntry, type GridRegistry, SheetCapabilities } from '#types';
|
|
10
|
+
|
|
11
|
+
const createGridRegistry = (): GridRegistry => {
|
|
12
|
+
const grids = new Map<string, GridEntry>();
|
|
13
|
+
return {
|
|
14
|
+
register: (attendableId, grid, setActiveRefs) => {
|
|
15
|
+
grids.set(attendableId, { grid, setActiveRefs });
|
|
16
|
+
},
|
|
17
|
+
unregister: (attendableId) => {
|
|
18
|
+
grids.delete(attendableId);
|
|
19
|
+
},
|
|
20
|
+
get: (attendableId) => grids.get(attendableId),
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default Capability.makeModule(
|
|
25
|
+
Effect.fnUntraced(function* () {
|
|
26
|
+
const gridInstances = createGridRegistry();
|
|
27
|
+
return Capability.contributes(SheetCapabilities.GridInstances, gridInstances);
|
|
28
|
+
}),
|
|
29
|
+
);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability, UndoMapping } from '@dxos/app-framework';
|
|
8
|
+
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { SheetOperation } from '#operations';
|
|
11
|
+
|
|
12
|
+
export default Capability.makeModule(() =>
|
|
13
|
+
Effect.succeed(
|
|
14
|
+
Capability.contributes(Capabilities.UndoMapping, [
|
|
15
|
+
UndoMapping.make({
|
|
16
|
+
operation: SheetOperation.DropAxis,
|
|
17
|
+
inverse: SheetOperation.RestoreAxis,
|
|
18
|
+
deriveContext: (input, output) => ({
|
|
19
|
+
model: input.model,
|
|
20
|
+
axis: output.axis,
|
|
21
|
+
axisIndex: output.axisIndex,
|
|
22
|
+
index: output.index,
|
|
23
|
+
axisMeta: output.axisMeta,
|
|
24
|
+
values: output.values,
|
|
25
|
+
}),
|
|
26
|
+
message: ['axis-dropped.label', { ns: meta.id }],
|
|
27
|
+
}),
|
|
28
|
+
]),
|
|
29
|
+
),
|
|
30
|
+
);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { type PropsWithChildren, createContext, useContext } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type ComputeGraph, type ComputeGraphRegistry } from '@dxos/compute';
|
|
7
|
+
import { type ComputeGraph, type ComputeGraphRegistry } from '@dxos/compute-hyperformula';
|
|
8
8
|
import { raise } from '@dxos/debug';
|
|
9
9
|
import { type Space } from '@dxos/react-client/echo';
|
|
10
10
|
import { useAsyncState } from '@dxos/react-hooks';
|