@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
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { OperationHandlerSet } from '@dxos/operation';
|
|
6
|
+
|
|
7
|
+
export * as SheetOperation from './definitions';
|
|
8
|
+
|
|
9
|
+
export const SheetOperationHandlerSet = OperationHandlerSet.lazy(
|
|
10
|
+
() => import('./drop-axis'),
|
|
11
|
+
() => import('./insert-axis'),
|
|
12
|
+
() => import('./restore-axis'),
|
|
13
|
+
() => import('./scroll-to-anchor'),
|
|
14
|
+
);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Operation } from '@dxos/operation';
|
|
8
|
+
|
|
9
|
+
import { InsertAxis } from './definitions';
|
|
10
|
+
|
|
11
|
+
const handler: Operation.WithHandler<typeof InsertAxis> = InsertAxis.pipe(
|
|
12
|
+
Operation.withHandler(({ model, axis, index, count }) =>
|
|
13
|
+
Effect.sync(() => {
|
|
14
|
+
model[axis === 'col' ? 'insertColumns' : 'insertRows'](index, count);
|
|
15
|
+
}),
|
|
16
|
+
),
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export default handler;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Operation } from '@dxos/operation';
|
|
8
|
+
|
|
9
|
+
import { RestoreAxis } from './definitions';
|
|
10
|
+
|
|
11
|
+
const handler: Operation.WithHandler<typeof RestoreAxis> = RestoreAxis.pipe(
|
|
12
|
+
Operation.withHandler(({ model, axis, ...restoreData }) =>
|
|
13
|
+
Effect.sync(() => {
|
|
14
|
+
model[axis === 'col' ? 'restoreColumn' : 'restoreRow'](restoreData);
|
|
15
|
+
}),
|
|
16
|
+
),
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export default handler;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
9
|
+
|
|
10
|
+
import { parseThreadAnchorAsCellRange } from '../integrations/thread-ranges';
|
|
11
|
+
import { SheetCapabilities } from '../types';
|
|
12
|
+
import { ScrollToAnchor } from './definitions';
|
|
13
|
+
|
|
14
|
+
const handler: Operation.WithHandler<typeof ScrollToAnchor> = ScrollToAnchor.pipe(
|
|
15
|
+
Operation.withHandler(
|
|
16
|
+
Effect.fnUntraced(function* ({ subject, cursor, ref }) {
|
|
17
|
+
const gridInstances = yield* Capability.get(SheetCapabilities.GridInstances);
|
|
18
|
+
const entry = gridInstances.get(subject);
|
|
19
|
+
if (!entry) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
entry.setActiveRefs(ref);
|
|
23
|
+
const range = parseThreadAnchorAsCellRange(cursor);
|
|
24
|
+
if (range) {
|
|
25
|
+
entry.grid.setFocus({ ...range.to, plane: 'grid' }, true);
|
|
26
|
+
}
|
|
27
|
+
}),
|
|
28
|
+
),
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
export default handler;
|
|
@@ -10,7 +10,7 @@ export default defineConfig({
|
|
|
10
10
|
...e2ePreset(import.meta.dirname),
|
|
11
11
|
// TODO(wittjosiah): Avoid hard-coding ports.
|
|
12
12
|
webServer: {
|
|
13
|
-
command: '
|
|
13
|
+
command: 'pnpm storybook dev --ci --quiet --port=9005 --config-dir=.storybook',
|
|
14
14
|
port: 9005,
|
|
15
15
|
reuseExistingServer: false,
|
|
16
16
|
},
|
|
@@ -15,7 +15,8 @@ test.describe('plugin-sheet', () => {
|
|
|
15
15
|
|
|
16
16
|
test.beforeEach(async ({ browser }) => {
|
|
17
17
|
const setup = await setupPage(browser, {
|
|
18
|
-
url: storybookUrl('plugins-plugin-sheet-sheetcontainer--spec', 9005),
|
|
18
|
+
url: storybookUrl('plugins-plugin-sheet-containers-sheetcontainer--spec', 9005),
|
|
19
|
+
viewportSize: { width: 1280, height: 720 },
|
|
19
20
|
});
|
|
20
21
|
page = setup.page;
|
|
21
22
|
sheet = new SheetManager(page);
|
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 { Obj } from '@dxos/echo';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
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
|
-
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
package/src/translations.ts
CHANGED
|
@@ -16,8 +16,10 @@ export const translations = [
|
|
|
16
16
|
'typename label_one': 'Sheet',
|
|
17
17
|
'typename label_other': 'Sheets',
|
|
18
18
|
'object name placeholder': 'New sheet',
|
|
19
|
+
'add object label': 'Add sheet',
|
|
19
20
|
'rename object label': 'Rename sheet',
|
|
20
21
|
'delete object label': 'Delete sheet',
|
|
22
|
+
'object deleted label': 'Sheet deleted',
|
|
21
23
|
},
|
|
22
24
|
[meta.id]: {
|
|
23
25
|
'plugin name': 'Sheets',
|
package/src/types/Sheet.ts
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
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
9
|
import { addressFromA1Notation, isFormula } from '@dxos/compute';
|
|
8
|
-
import { Obj, Type } from '@dxos/echo';
|
|
9
|
-
import {
|
|
10
|
+
import { Annotation, Obj, Type } from '@dxos/echo';
|
|
11
|
+
import { FormInputAnnotation } from '@dxos/echo/internal';
|
|
10
12
|
|
|
11
13
|
import { addressToIndex, initialize, mapFormulaRefsToIndices } from './util';
|
|
12
14
|
|
|
@@ -44,36 +46,31 @@ export const Sheet = Schema.Struct({
|
|
|
44
46
|
name: Schema.optional(Schema.String),
|
|
45
47
|
|
|
46
48
|
// Sparse map of cells referenced by index.
|
|
47
|
-
cells: Schema.Record({ key: Schema.String, value:
|
|
48
|
-
Schema.mutable,
|
|
49
|
-
FormAnnotation.set(false),
|
|
50
|
-
),
|
|
49
|
+
cells: Schema.Record({ key: Schema.String, value: CellValue }).pipe(FormInputAnnotation.set(false)),
|
|
51
50
|
|
|
52
51
|
// Ordered row indices.
|
|
53
|
-
rows: Schema.Array(Schema.String).pipe(
|
|
52
|
+
rows: Schema.Array(Schema.String).pipe(FormInputAnnotation.set(false)),
|
|
54
53
|
|
|
55
54
|
// Ordered column indices.
|
|
56
|
-
columns: Schema.Array(Schema.String).pipe(
|
|
55
|
+
columns: Schema.Array(Schema.String).pipe(FormInputAnnotation.set(false)),
|
|
57
56
|
|
|
58
57
|
// Row metadata referenced by index.
|
|
59
|
-
rowMeta: Schema.Record({ key: Schema.String, value:
|
|
60
|
-
Schema.mutable,
|
|
61
|
-
FormAnnotation.set(false),
|
|
62
|
-
),
|
|
58
|
+
rowMeta: Schema.Record({ key: Schema.String, value: RowColumnMeta }).pipe(FormInputAnnotation.set(false)),
|
|
63
59
|
|
|
64
60
|
// Column metadata referenced by index.
|
|
65
|
-
columnMeta: Schema.Record({ key: Schema.String, value:
|
|
66
|
-
Schema.mutable,
|
|
67
|
-
FormAnnotation.set(false),
|
|
68
|
-
),
|
|
61
|
+
columnMeta: Schema.Record({ key: Schema.String, value: RowColumnMeta }).pipe(FormInputAnnotation.set(false)),
|
|
69
62
|
|
|
70
63
|
// Cell formatting referenced by indexed range.
|
|
71
|
-
ranges: Schema.Array(Range).pipe(
|
|
64
|
+
ranges: Schema.Array(Range).pipe(FormInputAnnotation.set(false)),
|
|
72
65
|
}).pipe(
|
|
73
|
-
Type.
|
|
74
|
-
typename: 'dxos.
|
|
66
|
+
Type.object({
|
|
67
|
+
typename: 'org.dxos.type.sheet',
|
|
75
68
|
version: '0.1.0',
|
|
76
69
|
}),
|
|
70
|
+
Annotation.IconAnnotation.set({
|
|
71
|
+
icon: 'ph--grid-nine--regular',
|
|
72
|
+
hue: 'indigo',
|
|
73
|
+
}),
|
|
77
74
|
);
|
|
78
75
|
|
|
79
76
|
export interface Sheet extends Schema.Schema.Type<typeof Sheet> {}
|
|
@@ -86,18 +83,21 @@ export type SheetProps = {
|
|
|
86
83
|
export const make = ({ name, cells = {}, ...size }: SheetProps = {}) => {
|
|
87
84
|
const sheet = Obj.make(Sheet, { name, cells: {}, rows: [], columns: [], rowMeta: {}, columnMeta: {}, ranges: [] });
|
|
88
85
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
86
|
+
// Initialize and set cells within Obj.change to satisfy change context requirements.
|
|
87
|
+
Obj.change(sheet, (obj) => {
|
|
88
|
+
initialize(obj, size);
|
|
89
|
+
|
|
90
|
+
if (cells) {
|
|
91
|
+
Object.entries(cells).forEach(([key, { value }]) => {
|
|
92
|
+
const idx = addressToIndex(obj, addressFromA1Notation(key));
|
|
93
|
+
if (isFormula(value)) {
|
|
94
|
+
value = mapFormulaRefsToIndices(obj, value);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
obj.cells[idx] = { value };
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
101
|
|
|
102
102
|
return sheet;
|
|
103
103
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import { type ComputeGraphRegistry } from '@dxos/compute';
|
|
7
|
+
import { type DxGridElement, type GridContentProps } from '@dxos/react-ui-grid';
|
|
8
|
+
|
|
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
|
+
};
|
|
18
|
+
|
|
19
|
+
export namespace SheetCapabilities {
|
|
20
|
+
export const ComputeGraphRegistry = Capability.make<ComputeGraphRegistry>(
|
|
21
|
+
`${meta.id}.capability.compute-graph-registry`,
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
/** Registry of active grid instances keyed by attendable ID. */
|
|
25
|
+
export const GridInstances = Capability.make<GridRegistry>(`${meta.id}.capability.grid-instances`);
|
|
26
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -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,39 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import { meta } from '../meta';
|
|
8
|
-
import { SheetModel } from '../model';
|
|
9
|
-
|
|
10
7
|
import * as Sheet from './Sheet';
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export class Create extends Schema.TaggedClass<Create>()(`${SHEET_ACTION}/create`, {
|
|
16
|
-
input: Schema.Struct({
|
|
17
|
-
name: Schema.optional(Schema.String),
|
|
18
|
-
}),
|
|
19
|
-
output: Schema.Struct({
|
|
20
|
-
object: Sheet.Sheet,
|
|
21
|
-
}),
|
|
22
|
-
}) {}
|
|
23
|
-
|
|
24
|
-
// TODO(wittjosiah): Factor out. This is `DxGridAxis` from `@dxos/react-ui-grid`.
|
|
25
|
-
const Axis = Schema.Union(Schema.Literal('row'), Schema.Literal('col'));
|
|
26
|
-
|
|
27
|
-
export class InsertAxis extends Schema.TaggedClass<InsertAxis>()(`${SHEET_ACTION}/axis-insert`, {
|
|
28
|
-
input: Schema.Struct({
|
|
29
|
-
// TODO(wittjosiah): Schema.instanceOf(SheetModel) throws when running tests.
|
|
30
|
-
model: Schema.Any.pipe(Schema.filter((model) => model instanceof SheetModel)) as Schema.Schema<SheetModel>,
|
|
31
|
-
axis: Axis,
|
|
32
|
-
index: Schema.Number,
|
|
33
|
-
count: Schema.optional(Schema.Number),
|
|
34
|
-
}),
|
|
35
|
-
output: Schema.Void,
|
|
36
|
-
}) {}
|
|
9
|
+
// TODO(wittjosiah): Factor out. This is `DxGridAxis` from `@dxos/react-ui-grid`.
|
|
10
|
+
const ActionAxis = Schema.Union(Schema.Literal('row'), Schema.Literal('col'));
|
|
37
11
|
|
|
12
|
+
export namespace SheetAction {
|
|
38
13
|
export const RestoreAxis = Schema.Struct({
|
|
39
|
-
axis:
|
|
14
|
+
axis: ActionAxis,
|
|
40
15
|
axisIndex: Schema.String,
|
|
41
16
|
index: Schema.Number,
|
|
42
17
|
axisMeta: Sheet.RowColumnMeta,
|
|
@@ -44,15 +19,4 @@ export namespace SheetAction {
|
|
|
44
19
|
});
|
|
45
20
|
|
|
46
21
|
export type RestoreAxis = Schema.Schema.Type<typeof RestoreAxis>;
|
|
47
|
-
|
|
48
|
-
export class DropAxis extends Schema.TaggedClass<DropAxis>()(`${SHEET_ACTION}/axis-drop`, {
|
|
49
|
-
input: Schema.Struct({
|
|
50
|
-
// TODO(wittjosiah): Schema.instanceOf(SheetModel) throws when running tests.
|
|
51
|
-
model: Schema.Any.pipe(Schema.filter((model) => model instanceof SheetModel)) as Schema.Schema<SheetModel>,
|
|
52
|
-
axis: Axis,
|
|
53
|
-
axisIndex: Schema.String,
|
|
54
|
-
deletionData: Schema.optional(RestoreAxis),
|
|
55
|
-
}),
|
|
56
|
-
output: Schema.Void,
|
|
57
|
-
}) {}
|
|
58
22
|
}
|
package/src/types/util.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
isFormula,
|
|
12
12
|
} from '@dxos/compute';
|
|
13
13
|
import { randomBytes } from '@dxos/crypto';
|
|
14
|
+
import { type Obj } from '@dxos/echo';
|
|
14
15
|
import { invariant } from '@dxos/invariant';
|
|
15
16
|
|
|
16
17
|
import { type Sheet } from '../types';
|
|
@@ -55,7 +56,7 @@ export const insertIndices = (indices: string[], i: number, n: number, max: numb
|
|
|
55
56
|
};
|
|
56
57
|
|
|
57
58
|
export const initialize = (
|
|
58
|
-
sheet: Sheet.Sheet
|
|
59
|
+
sheet: Obj.Mutable<Sheet.Sheet>,
|
|
59
60
|
{ rows = DEFAULT_ROWS, columns = DEFAULT_COLS }: Partial<Sheet.SheetSize> = {},
|
|
60
61
|
) => {
|
|
61
62
|
if (!sheet.rows.length) {
|