@dxos/plugin-sheet 0.8.4-main.72ec0f3 → 0.8.4-main.7996785055
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/RangeList-RRNK4LL5.mjs +50 -0
- package/dist/lib/browser/RangeList-RRNK4LL5.mjs.map +7 -0
- package/dist/lib/browser/SheetContainer-N7GPNSOM.mjs +44 -0
- package/dist/lib/browser/SheetContainer-N7GPNSOM.mjs.map +7 -0
- package/dist/lib/browser/{anchor-sort-FCQ5OZZK.mjs → anchor-sort-J4Y5NKYR.mjs} +9 -7
- package/dist/lib/browser/anchor-sort-J4Y5NKYR.mjs.map +7 -0
- package/dist/lib/browser/chunk-AIOU5OTJ.mjs +118 -0
- package/dist/lib/browser/chunk-AIOU5OTJ.mjs.map +7 -0
- package/dist/lib/browser/chunk-BZEV7AQM.mjs +278 -0
- package/dist/lib/browser/chunk-BZEV7AQM.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FWFAAGXL.mjs → chunk-MFMDZ433.mjs} +2 -2
- package/dist/lib/browser/chunk-MFMDZ433.mjs.map +7 -0
- package/dist/lib/browser/{chunk-7VEWYJJN.mjs → chunk-NNWF7EKC.mjs} +13 -13
- package/dist/lib/browser/chunk-NNWF7EKC.mjs.map +7 -0
- package/dist/lib/browser/chunk-T5XHKC7L.mjs +1771 -0
- package/dist/lib/browser/chunk-T5XHKC7L.mjs.map +7 -0
- package/dist/lib/browser/chunk-UZ4SHAES.mjs +8 -0
- package/dist/lib/browser/chunk-UZ4SHAES.mjs.map +7 -0
- package/dist/lib/browser/compute-graph-registry-FEG3DN5R.mjs +22 -0
- package/dist/lib/browser/compute-graph-registry-FEG3DN5R.mjs.map +7 -0
- package/dist/lib/browser/drop-axis-UTOJ5MVT.mjs +23 -0
- package/dist/lib/browser/drop-axis-UTOJ5MVT.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +94 -76
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/insert-axis-OS5VFQDK.mjs +16 -0
- package/dist/lib/browser/insert-axis-OS5VFQDK.mjs.map +7 -0
- package/dist/lib/browser/markdown-ZDM2HMK6.mjs +30 -0
- package/dist/lib/browser/markdown-ZDM2HMK6.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-handler-5PGGEH6O.mjs +16 -0
- package/dist/lib/browser/operation-handler-5PGGEH6O.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +12 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/react-surface-7LK375A6.mjs +54 -0
- package/dist/lib/browser/react-surface-7LK375A6.mjs.map +7 -0
- package/dist/lib/browser/restore-axis-O7PHU7ON.mjs +16 -0
- package/dist/lib/browser/restore-axis-O7PHU7ON.mjs.map +7 -0
- package/dist/lib/browser/scroll-to-anchor-HNCUXJGW.mjs +37 -0
- package/dist/lib/browser/scroll-to-anchor-HNCUXJGW.mjs.map +7 -0
- package/dist/lib/browser/state-35W4C372.mjs +31 -0
- package/dist/lib/browser/state-35W4C372.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +4 -2
- package/dist/lib/browser/undo-mappings-GTX6XUZK.mjs +35 -0
- package/dist/lib/browser/undo-mappings-GTX6XUZK.mjs.map +7 -0
- package/dist/lib/node-esm/RangeList-X6IU5QKI.mjs +51 -0
- package/dist/lib/node-esm/RangeList-X6IU5QKI.mjs.map +7 -0
- package/dist/lib/node-esm/SheetContainer-QFRHGZZE.mjs +45 -0
- package/dist/lib/node-esm/SheetContainer-QFRHGZZE.mjs.map +7 -0
- package/dist/lib/node-esm/{anchor-sort-ZE7IS7SH.mjs → anchor-sort-XLGKHSB4.mjs} +9 -7
- package/dist/lib/node-esm/anchor-sort-XLGKHSB4.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HI3E7P4K.mjs +10 -0
- package/dist/lib/node-esm/chunk-HI3E7P4K.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-J7XCAKTA.mjs +279 -0
- package/dist/lib/node-esm/chunk-J7XCAKTA.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-4QV4AGWK.mjs → chunk-M52YLLWU.mjs} +13 -13
- package/dist/lib/node-esm/chunk-M52YLLWU.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-PK76XIMN.mjs +1772 -0
- package/dist/lib/node-esm/chunk-PK76XIMN.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-HILDMVPL.mjs → chunk-UMXU7BDG.mjs} +2 -2
- package/dist/lib/node-esm/chunk-UMXU7BDG.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-Z4BXHF76.mjs +119 -0
- package/dist/lib/node-esm/chunk-Z4BXHF76.mjs.map +7 -0
- package/dist/lib/node-esm/compute-graph-registry-TOMM5AGM.mjs +23 -0
- package/dist/lib/node-esm/compute-graph-registry-TOMM5AGM.mjs.map +7 -0
- package/dist/lib/node-esm/drop-axis-XFFTKE4J.mjs +24 -0
- package/dist/lib/node-esm/drop-axis-XFFTKE4J.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +94 -76
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/insert-axis-QYN6V3NH.mjs +17 -0
- package/dist/lib/node-esm/insert-axis-QYN6V3NH.mjs.map +7 -0
- package/dist/lib/node-esm/markdown-TTSQDUPW.mjs +31 -0
- package/dist/lib/node-esm/markdown-TTSQDUPW.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-handler-G6SZSFCD.mjs +17 -0
- package/dist/lib/node-esm/operation-handler-G6SZSFCD.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +13 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-OVBFWYD7.mjs +55 -0
- package/dist/lib/node-esm/react-surface-OVBFWYD7.mjs.map +7 -0
- package/dist/lib/node-esm/restore-axis-WUXX5KAE.mjs +17 -0
- package/dist/lib/node-esm/restore-axis-WUXX5KAE.mjs.map +7 -0
- package/dist/lib/node-esm/scroll-to-anchor-UUXINUVP.mjs +38 -0
- package/dist/lib/node-esm/scroll-to-anchor-UUXINUVP.mjs.map +7 -0
- package/dist/lib/node-esm/state-L3SAQ6V7.mjs +32 -0
- package/dist/lib/node-esm/state-L3SAQ6V7.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +4 -2
- package/dist/lib/node-esm/undo-mappings-CQIVZKAC.mjs +36 -0
- package/dist/lib/node-esm/undo-mappings-CQIVZKAC.mjs.map +7 -0
- package/dist/types/src/SheetPlugin.d.ts +2 -1
- package/dist/types/src/SheetPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts +6 -0
- package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts.map +1 -0
- package/dist/types/src/capabilities/anchor-sort/index.d.ts +3 -0
- package/dist/types/src/capabilities/anchor-sort/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/compute-graph-registry/compute-graph-registry.d.ts +5 -0
- package/dist/types/src/capabilities/compute-graph-registry/compute-graph-registry.d.ts.map +1 -0
- package/dist/types/src/capabilities/compute-graph-registry/index.d.ts +3 -0
- package/dist/types/src/capabilities/compute-graph-registry/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +7 -6
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown/index.d.ts +3 -0
- package/dist/types/src/capabilities/markdown/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/markdown/markdown.d.ts +5 -0
- package/dist/types/src/capabilities/markdown/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler/index.d.ts +4 -0
- package/dist/types/src/capabilities/operation-handler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +3 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +6 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/undo-mappings/index.d.ts +3 -0
- package/dist/types/src/capabilities/undo-mappings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/undo-mappings/undo-mappings.d.ts +5 -0
- package/dist/types/src/capabilities/undo-mappings/undo-mappings.d.ts.map +1 -0
- package/dist/types/src/components/ComputeGraph/compute-graph.stories.d.ts.map +1 -1
- package/dist/types/src/components/Sheet/Sheet.d.ts +29 -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/{GridSheet → SheetContent}/SheetCellEditor.stories.d.ts +1 -1
- package/dist/types/src/components/SheetContent/SheetCellEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/SheetContent/SheetContent.d.ts +10 -0
- package/dist/types/src/components/SheetContent/SheetContent.d.ts.map +1 -0
- package/dist/types/src/components/{GridSheet/GridSheet.stories.d.ts → SheetContent/SheetContent.stories.d.ts} +10 -2
- 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/SheetContent/util.d.ts.map +1 -0
- package/dist/types/src/components/{SheetContext/SheetContext.d.ts → SheetRoot/SheetRoot.d.ts} +6 -4
- 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 +10 -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 +9 -5
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts +4 -0
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/align.d.ts +12 -19
- package/dist/types/src/components/SheetToolbar/align.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/style.d.ts +12 -18
- package/dist/types/src/components/SheetToolbar/style.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/useToolbarState.d.ts +14 -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.map +1 -1
- package/dist/types/src/containers/RangeList/index.d.ts +3 -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/{components → containers}/SheetContainer/SheetContainer.stories.d.ts +3 -1
- package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/SheetContainer/index.d.ts.map +1 -1
- 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.stories.d.ts.map +1 -1
- package/dist/types/src/extensions/editor/sheet-extension.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/integrations/thread-ranges.d.ts +0 -2
- package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.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/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/serializer.d.ts.map +1 -1
- package/dist/types/src/testing/testing.d.ts +15 -15
- package/dist/types/src/translations.d.ts +2 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Sheet.d.ts +41 -35
- package/dist/types/src/types/Sheet.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +18 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +2 -68
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/types/util.d.ts +2 -1
- package/dist/types/src/types/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +83 -68
- package/src/SheetPlugin.tsx +59 -64
- package/src/capabilities/anchor-sort/anchor-sort.ts +27 -0
- package/src/capabilities/anchor-sort/index.ts +7 -0
- package/src/capabilities/compute-graph-registry/compute-graph-registry.ts +27 -0
- package/src/capabilities/compute-graph-registry/index.ts +7 -0
- package/src/capabilities/index.ts +7 -9
- package/src/capabilities/markdown/index.ts +7 -0
- package/src/capabilities/markdown/markdown.ts +30 -0
- package/src/capabilities/operation-handler/index.ts +11 -0
- package/src/capabilities/operation-handler/operation-handler.ts +16 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +49 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +29 -0
- package/src/capabilities/undo-mappings/index.ts +7 -0
- package/src/capabilities/undo-mappings/undo-mappings.ts +30 -0
- package/src/components/ComputeGraph/compute-graph.stories.tsx +11 -6
- package/src/components/Sheet/Sheet.tsx +20 -0
- package/src/components/Sheet/index.ts +5 -0
- package/src/components/{GridSheet → SheetContent}/SheetCellEditor.stories.tsx +9 -6
- package/src/components/{GridSheet/GridSheet.stories.tsx → SheetContent/SheetContent.stories.tsx} +14 -13
- package/src/components/{GridSheet/GridSheet.tsx → SheetContent/SheetContent.tsx} +62 -44
- package/src/components/{RangeList → SheetContent}/index.ts +1 -1
- package/src/components/{GridSheet → SheetContent}/util.ts +5 -5
- package/src/components/{SheetContext/SheetContext.tsx → SheetRoot/SheetRoot.tsx} +47 -40
- package/src/components/{GridSheet → SheetRoot}/index.ts +1 -1
- package/src/components/{FunctionEditor/FunctionEditor.tsx → SheetStatusbar/SheetStatusbar.tsx} +18 -6
- package/src/components/{FunctionEditor → SheetStatusbar}/index.ts +1 -1
- package/src/components/SheetToolbar/SheetToolbar.stories.tsx +4 -4
- package/src/components/SheetToolbar/SheetToolbar.tsx +45 -37
- package/src/components/SheetToolbar/align.ts +44 -19
- package/src/components/SheetToolbar/style.ts +48 -18
- package/src/components/SheetToolbar/useToolbarState.ts +22 -5
- package/src/components/index.ts +1 -7
- package/src/{components → containers}/RangeList/RangeList.tsx +12 -8
- package/src/containers/RangeList/index.ts +7 -0
- package/src/containers/SheetContainer/SheetContainer.stories.tsx +109 -0
- package/src/containers/SheetContainer/SheetContainer.tsx +57 -0
- package/src/{components → containers}/SheetContainer/index.ts +1 -1
- package/src/containers/index.ts +8 -0
- package/src/extensions/compute.stories.tsx +26 -16
- package/src/extensions/compute.ts +1 -1
- package/src/extensions/editor/sheet-extension.ts +16 -13
- package/src/index.ts +1 -1
- package/src/integrations/thread-ranges.ts +16 -53
- package/src/meta.ts +3 -3
- package/src/model/sheet-model.test.ts +2 -2
- package/src/model/sheet-model.ts +77 -45
- 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 +2 -1
- package/src/sanity.test.ts +6 -3
- package/src/serializer.ts +1 -1
- package/src/translations.ts +2 -0
- package/src/types/Sheet.ts +31 -31
- package/src/types/capabilities.ts +26 -0
- package/src/types/index.ts +1 -0
- package/src/types/sheet-range-types.ts +3 -3
- package/src/types/types.ts +4 -40
- package/src/types/util.ts +2 -1
- package/dist/lib/browser/SheetContainer-66BNB3XG.mjs +0 -349
- package/dist/lib/browser/SheetContainer-66BNB3XG.mjs.map +0 -7
- package/dist/lib/browser/anchor-sort-FCQ5OZZK.mjs.map +0 -7
- package/dist/lib/browser/chunk-73AV3NH6.mjs +0 -15
- package/dist/lib/browser/chunk-73AV3NH6.mjs.map +0 -7
- package/dist/lib/browser/chunk-7VEWYJJN.mjs.map +0 -7
- package/dist/lib/browser/chunk-DVJ3QW3F.mjs +0 -907
- package/dist/lib/browser/chunk-DVJ3QW3F.mjs.map +0 -7
- package/dist/lib/browser/chunk-FWFAAGXL.mjs.map +0 -7
- package/dist/lib/browser/chunk-OU5KTWY3.mjs +0 -852
- package/dist/lib/browser/chunk-OU5KTWY3.mjs.map +0 -7
- package/dist/lib/browser/compute-graph-registry-AP5RA7W3.mjs +0 -21
- package/dist/lib/browser/compute-graph-registry-AP5RA7W3.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-66OAYVQF.mjs +0 -56
- package/dist/lib/browser/intent-resolver-66OAYVQF.mjs.map +0 -7
- package/dist/lib/browser/markdown-B6VKYY2S.mjs +0 -26
- package/dist/lib/browser/markdown-B6VKYY2S.mjs.map +0 -7
- package/dist/lib/browser/react-surface-5GYLVSMR.mjs +0 -54
- package/dist/lib/browser/react-surface-5GYLVSMR.mjs.map +0 -7
- package/dist/lib/node-esm/SheetContainer-NWEQETAY.mjs +0 -350
- package/dist/lib/node-esm/SheetContainer-NWEQETAY.mjs.map +0 -7
- package/dist/lib/node-esm/anchor-sort-ZE7IS7SH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-44YTKTMP.mjs +0 -16
- package/dist/lib/node-esm/chunk-44YTKTMP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4H2EHVWE.mjs +0 -908
- package/dist/lib/node-esm/chunk-4H2EHVWE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4MT3JJU2.mjs +0 -853
- package/dist/lib/node-esm/chunk-4MT3JJU2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4QV4AGWK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HILDMVPL.mjs.map +0 -7
- package/dist/lib/node-esm/compute-graph-registry-UMQ5UYCL.mjs +0 -22
- package/dist/lib/node-esm/compute-graph-registry-UMQ5UYCL.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-VNKIMQQT.mjs +0 -57
- package/dist/lib/node-esm/intent-resolver-VNKIMQQT.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-VKY7HXU2.mjs +0 -27
- package/dist/lib/node-esm/markdown-VKY7HXU2.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-RK32YZWR.mjs +0 -55
- package/dist/lib/node-esm/react-surface-RK32YZWR.mjs.map +0 -7
- package/dist/types/src/capabilities/anchor-sort.d.ts +0 -4
- package/dist/types/src/capabilities/anchor-sort.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -5
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/compute-graph-registry.d.ts +0 -4
- package/dist/types/src/capabilities/compute-graph-registry.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown.d.ts +0 -4
- package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/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.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/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 -11
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +0 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.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.ts +0 -21
- package/src/capabilities/capabilities.ts +0 -14
- package/src/capabilities/compute-graph-registry.ts +0 -23
- package/src/capabilities/intent-resolver.ts +0 -38
- package/src/capabilities/markdown.ts +0 -23
- package/src/capabilities/react-surface.tsx +0 -41
- package/src/components/SheetContainer/SheetContainer.stories.tsx +0 -93
- package/src/components/SheetContainer/SheetContainer.tsx +0 -41
- package/src/components/SheetContext/index.ts +0 -5
- /package/dist/types/src/components/{GridSheet → SheetContent}/util.d.ts +0 -0
- /package/dist/types/src/{components → containers}/RangeList/RangeList.d.ts +0 -0
- /package/dist/types/src/{components → containers}/SheetContainer/index.d.ts +0 -0
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Capabilities, type Capability, contributes } from '@dxos/app-framework';
|
|
6
|
-
import { Relation } from '@dxos/echo';
|
|
7
|
-
|
|
8
|
-
import { Sheet, compareIndexPositions } from '../types';
|
|
9
|
-
|
|
10
|
-
export default (): Capability<typeof Capabilities.AnchorSort> =>
|
|
11
|
-
contributes(Capabilities.AnchorSort, {
|
|
12
|
-
key: Sheet.Sheet.typename,
|
|
13
|
-
sort: (anchorA, anchorB) => {
|
|
14
|
-
const sheet = Relation.getTarget(anchorA) as Sheet.Sheet;
|
|
15
|
-
if (sheet !== Relation.getTarget(anchorB)) {
|
|
16
|
-
return 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return !anchorA.anchor || !anchorB.anchor ? 0 : compareIndexPositions(sheet, anchorA.anchor, anchorB.anchor);
|
|
20
|
-
},
|
|
21
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { defineCapability } from '@dxos/app-framework';
|
|
6
|
-
import { type ComputeGraphRegistry } from '@dxos/compute';
|
|
7
|
-
|
|
8
|
-
import { meta } from '../meta';
|
|
9
|
-
|
|
10
|
-
export namespace SheetCapabilities {
|
|
11
|
-
export const ComputeGraphRegistry = defineCapability<ComputeGraphRegistry>(
|
|
12
|
-
`${meta.id}/capability/compute-graph-registry`,
|
|
13
|
-
);
|
|
14
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type PluginContext, contributes } from '@dxos/app-framework';
|
|
6
|
-
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
7
|
-
|
|
8
|
-
import { SheetCapabilities } from './capabilities';
|
|
9
|
-
|
|
10
|
-
// Locally declare the Automation ComputeRuntime capability by ID to avoid direct import dependency.
|
|
11
|
-
|
|
12
|
-
export default async (context: PluginContext) => {
|
|
13
|
-
// TODO(wittjosiah): This can probably be a module level import now due to lazy capability loading.
|
|
14
|
-
// Async import removes direct dependency on hyperformula.
|
|
15
|
-
const { defaultPlugins, ComputeGraphRegistry } = await import('@dxos/compute');
|
|
16
|
-
const computeRuntimeResolver = context.getCapability(AutomationCapabilities.ComputeRuntime);
|
|
17
|
-
const computeGraphRegistry = new ComputeGraphRegistry({
|
|
18
|
-
plugins: defaultPlugins,
|
|
19
|
-
computeRuntime: computeRuntimeResolver,
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
return contributes(SheetCapabilities.ComputeGraphRegistry, computeGraphRegistry);
|
|
23
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Capabilities, contributes, createResolver } from '@dxos/app-framework';
|
|
6
|
-
|
|
7
|
-
import { meta } from '../meta';
|
|
8
|
-
import { Sheet, SheetAction } from '../types';
|
|
9
|
-
|
|
10
|
-
export default () =>
|
|
11
|
-
contributes(Capabilities.IntentResolver, [
|
|
12
|
-
createResolver({
|
|
13
|
-
intent: SheetAction.Create,
|
|
14
|
-
resolve: ({ name }) => ({ data: { object: Sheet.make({ name }) } }),
|
|
15
|
-
}),
|
|
16
|
-
createResolver({
|
|
17
|
-
intent: SheetAction.InsertAxis,
|
|
18
|
-
resolve: ({ model, axis, index, count }) => {
|
|
19
|
-
const _indices = model[axis === 'col' ? 'insertColumns' : 'insertRows'](index, count);
|
|
20
|
-
},
|
|
21
|
-
}),
|
|
22
|
-
createResolver({
|
|
23
|
-
intent: SheetAction.DropAxis,
|
|
24
|
-
resolve: ({ model, axis, axisIndex, deletionData }, undo) => {
|
|
25
|
-
if (!undo) {
|
|
26
|
-
const undoData = model[axis === 'col' ? 'dropColumn' : 'dropRow'](axisIndex);
|
|
27
|
-
return {
|
|
28
|
-
undoable: {
|
|
29
|
-
message: [`${axis} dropped label`, { ns: meta.id }],
|
|
30
|
-
data: { ...undoData, model },
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
} else if (undo && deletionData) {
|
|
34
|
-
model[deletionData.axis === 'col' ? 'restoreColumn' : 'restoreRow'](deletionData);
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
}),
|
|
38
|
-
]);
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type PluginContext, contributes } from '@dxos/app-framework';
|
|
6
|
-
import { getSpace } from '@dxos/client/echo';
|
|
7
|
-
import { MarkdownCapabilities } from '@dxos/plugin-markdown';
|
|
8
|
-
|
|
9
|
-
import { computeGraphFacet } from '../extensions';
|
|
10
|
-
|
|
11
|
-
import { SheetCapabilities } from './capabilities';
|
|
12
|
-
|
|
13
|
-
export default (context: PluginContext) =>
|
|
14
|
-
contributes(MarkdownCapabilities.Extensions, [
|
|
15
|
-
({ document: doc }) => {
|
|
16
|
-
const computeGraphRegistry = context.getCapability(SheetCapabilities.ComputeGraphRegistry);
|
|
17
|
-
const space = getSpace(doc);
|
|
18
|
-
if (space) {
|
|
19
|
-
const computeGraph = computeGraphRegistry.getOrCreateGraph(space);
|
|
20
|
-
return computeGraphFacet.of(computeGraph);
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
]);
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
|
-
import { useCapability } from '@dxos/app-framework/react';
|
|
9
|
-
import { Obj } from '@dxos/echo';
|
|
10
|
-
import { getSpace } from '@dxos/react-client/echo';
|
|
11
|
-
|
|
12
|
-
import { ComputeGraphContextProvider, RangeList, SheetContainer } from '../components';
|
|
13
|
-
import { meta } from '../meta';
|
|
14
|
-
import { Sheet } from '../types';
|
|
15
|
-
|
|
16
|
-
import { SheetCapabilities } from './capabilities';
|
|
17
|
-
|
|
18
|
-
export default () =>
|
|
19
|
-
contributes(Capabilities.ReactSurface, [
|
|
20
|
-
createSurface({
|
|
21
|
-
id: `${meta.id}/sheet`,
|
|
22
|
-
role: ['article', 'section'],
|
|
23
|
-
filter: (data): data is { subject: Sheet.Sheet } =>
|
|
24
|
-
Obj.instanceOf(Sheet.Sheet, data.subject) && !!getSpace(data.subject),
|
|
25
|
-
component: ({ data, role }) => {
|
|
26
|
-
const computeGraphRegistry = useCapability(SheetCapabilities.ComputeGraphRegistry);
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<ComputeGraphContextProvider registry={computeGraphRegistry}>
|
|
30
|
-
<SheetContainer space={getSpace(data.subject)!} sheet={data.subject} role={role} />
|
|
31
|
-
</ComputeGraphContextProvider>
|
|
32
|
-
);
|
|
33
|
-
},
|
|
34
|
-
}),
|
|
35
|
-
createSurface({
|
|
36
|
-
id: `${meta.id}/object-settings`,
|
|
37
|
-
role: 'object-settings',
|
|
38
|
-
filter: (data): data is { subject: Sheet.Sheet } => Obj.instanceOf(Sheet.Sheet, data.subject),
|
|
39
|
-
component: ({ data }) => <RangeList sheet={data.subject} />,
|
|
40
|
-
}),
|
|
41
|
-
]);
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Meta } from '@storybook/react-vite';
|
|
6
|
-
import React from 'react';
|
|
7
|
-
|
|
8
|
-
import { Capabilities, IntentPlugin, contributes, createResolver } from '@dxos/app-framework';
|
|
9
|
-
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
-
import { Obj } from '@dxos/echo';
|
|
11
|
-
import { GraphPlugin } from '@dxos/plugin-graph';
|
|
12
|
-
import { useSpace } from '@dxos/react-client/echo';
|
|
13
|
-
import { withClientProvider } from '@dxos/react-client/testing';
|
|
14
|
-
import { withTheme } from '@dxos/react-ui/testing';
|
|
15
|
-
import { AttendableContainer } from '@dxos/react-ui-attention';
|
|
16
|
-
import { withAttention } from '@dxos/react-ui-attention/testing';
|
|
17
|
-
|
|
18
|
-
import { createTestCells, useTestSheet, withComputeGraphDecorator } from '../../testing';
|
|
19
|
-
import { translations } from '../../translations';
|
|
20
|
-
import { Sheet, SheetAction } from '../../types';
|
|
21
|
-
import { useComputeGraph } from '../ComputeGraph';
|
|
22
|
-
import { RangeList } from '../RangeList';
|
|
23
|
-
|
|
24
|
-
import { SheetContainer } from './SheetContainer';
|
|
25
|
-
|
|
26
|
-
const meta = {
|
|
27
|
-
title: 'plugins/plugin-sheet/SheetContainer',
|
|
28
|
-
component: SheetContainer,
|
|
29
|
-
decorators: [
|
|
30
|
-
withTheme,
|
|
31
|
-
withClientProvider({ types: [Sheet.Sheet], createSpace: true }),
|
|
32
|
-
withComputeGraphDecorator(),
|
|
33
|
-
withAttention,
|
|
34
|
-
// TODO(wittjosiah): Consider whether we should refactor component so story doesn't need to depend on intents.
|
|
35
|
-
withPluginManager({
|
|
36
|
-
plugins: [IntentPlugin(), GraphPlugin()],
|
|
37
|
-
capabilities: [
|
|
38
|
-
contributes(
|
|
39
|
-
Capabilities.IntentResolver,
|
|
40
|
-
createResolver({
|
|
41
|
-
intent: SheetAction.DropAxis,
|
|
42
|
-
resolve: ({ model, axis, axisIndex }) => {
|
|
43
|
-
model[axis === 'col' ? 'dropColumn' : 'dropRow'](axisIndex);
|
|
44
|
-
},
|
|
45
|
-
}),
|
|
46
|
-
),
|
|
47
|
-
],
|
|
48
|
-
}),
|
|
49
|
-
],
|
|
50
|
-
parameters: {
|
|
51
|
-
layout: 'fullscreen',
|
|
52
|
-
translations,
|
|
53
|
-
},
|
|
54
|
-
} satisfies Meta<typeof SheetContainer>;
|
|
55
|
-
|
|
56
|
-
export default meta;
|
|
57
|
-
|
|
58
|
-
export const Default = () => {
|
|
59
|
-
const space = useSpace();
|
|
60
|
-
const graph = useComputeGraph(space);
|
|
61
|
-
const sheet = useTestSheet(space, graph, { cells: createTestCells() });
|
|
62
|
-
if (!sheet || !space) {
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<AttendableContainer id={Obj.getDXN(sheet).toString()} classNames='contents'>
|
|
68
|
-
<SheetContainer space={space} sheet={sheet} role='story' ignoreAttention />
|
|
69
|
-
</AttendableContainer>
|
|
70
|
-
);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export const Spec = () => {
|
|
74
|
-
const space = useSpace();
|
|
75
|
-
const graph = useComputeGraph(space);
|
|
76
|
-
const sheet = useTestSheet(space, graph, {
|
|
77
|
-
cells: { A1: { value: 'Ready' } },
|
|
78
|
-
});
|
|
79
|
-
if (!sheet || !space) {
|
|
80
|
-
return null;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return (
|
|
84
|
-
<AttendableContainer id={Obj.getDXN(sheet).toString()} classNames='contents'>
|
|
85
|
-
<div role='none' className='grid grid-rows-[66%_33%] bs-full grid-cols-1'>
|
|
86
|
-
<SheetContainer space={space} sheet={sheet} role='story' ignoreAttention />
|
|
87
|
-
<div role='none' data-testid='grid.range-list'>
|
|
88
|
-
<RangeList sheet={sheet} />
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
</AttendableContainer>
|
|
92
|
-
);
|
|
93
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { Obj } from '@dxos/echo';
|
|
8
|
-
import { type Space } from '@dxos/react-client/echo';
|
|
9
|
-
import { StackItem } from '@dxos/react-ui-stack';
|
|
10
|
-
|
|
11
|
-
import { type Sheet } from '../../types';
|
|
12
|
-
import { useComputeGraph } from '../ComputeGraph';
|
|
13
|
-
import { FunctionEditor } from '../FunctionEditor';
|
|
14
|
-
import { GridSheet } from '../GridSheet';
|
|
15
|
-
import { SheetProvider } from '../SheetContext';
|
|
16
|
-
import { SheetToolbar } from '../SheetToolbar';
|
|
17
|
-
|
|
18
|
-
export type SheetContainerProps = {
|
|
19
|
-
space: Space;
|
|
20
|
-
sheet: Sheet.Sheet;
|
|
21
|
-
role?: string;
|
|
22
|
-
ignoreAttention?: boolean;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const SheetContainer = ({ space, sheet, role, ignoreAttention }: SheetContainerProps) => {
|
|
26
|
-
const graph = useComputeGraph(space);
|
|
27
|
-
|
|
28
|
-
return graph ? (
|
|
29
|
-
<SheetProvider sheet={sheet} graph={graph} ignoreAttention={ignoreAttention}>
|
|
30
|
-
<StackItem.Content
|
|
31
|
-
toolbar
|
|
32
|
-
statusbar
|
|
33
|
-
classNames={[role === 'section' && 'aspect-video', role === 'story' && 'bs-full']}
|
|
34
|
-
>
|
|
35
|
-
<SheetToolbar id={Obj.getDXN(sheet).toString()} />
|
|
36
|
-
<GridSheet />
|
|
37
|
-
<FunctionEditor />
|
|
38
|
-
</StackItem.Content>
|
|
39
|
-
</SheetProvider>
|
|
40
|
-
) : null;
|
|
41
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|