@dxos/plugin-sheet 0.8.4-main.7996785055 → 0.8.4-main.8baae0fced
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +102 -5
- package/dist/lib/{browser/RangeList-RRNK4LL5.mjs → neutral/RangeList-HYB5S6KQ.mjs} +20 -24
- package/dist/lib/neutral/RangeList-HYB5S6KQ.mjs.map +7 -0
- package/dist/lib/{browser/SheetContainer-N7GPNSOM.mjs → neutral/SheetArticle-5AJRM3V3.mjs} +8 -19
- package/dist/lib/neutral/SheetArticle-5AJRM3V3.mjs.map +7 -0
- package/dist/lib/neutral/SheetPlugin.mjs +47 -0
- package/dist/lib/neutral/SheetPlugin.mjs.map +7 -0
- package/dist/lib/neutral/SheetPlugin.node.mjs +27 -0
- package/dist/lib/neutral/SheetPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/SheetPlugin.workerd.mjs +21 -0
- package/dist/lib/neutral/SheetPlugin.workerd.mjs.map +7 -0
- package/dist/lib/{browser/anchor-sort-J4Y5NKYR.mjs → neutral/anchor-sort-TTCKGX7V.mjs} +5 -8
- package/dist/lib/neutral/anchor-sort-TTCKGX7V.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +25 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/{browser/chunk-NNWF7EKC.mjs → neutral/chunk-4SBAIU6F.mjs} +3 -3
- package/dist/lib/neutral/chunk-4SBAIU6F.mjs.map +7 -0
- package/dist/lib/neutral/chunk-CGWDLWFZ.mjs +8 -0
- package/dist/lib/neutral/chunk-CGWDLWFZ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/{browser/chunk-BZEV7AQM.mjs → neutral/chunk-KC2SMDNF.mjs} +171 -76
- package/dist/lib/neutral/chunk-KC2SMDNF.mjs.map +7 -0
- package/dist/lib/{browser/chunk-MFMDZ433.mjs → neutral/chunk-UVFW5VID.mjs} +2 -8
- package/dist/lib/neutral/chunk-UVFW5VID.mjs.map +7 -0
- package/dist/lib/neutral/chunk-YFY6U524.mjs +83 -0
- package/dist/lib/neutral/chunk-YFY6U524.mjs.map +7 -0
- package/dist/lib/neutral/comment-config-ZBWNCJMZ.mjs +20 -0
- package/dist/lib/neutral/comment-config-ZBWNCJMZ.mjs.map +7 -0
- package/dist/lib/{browser/chunk-T5XHKC7L.mjs → neutral/components/index.mjs} +80 -300
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/compute-graph-registry-YYINTFC2.mjs +26 -0
- package/dist/lib/neutral/compute-graph-registry-YYINTFC2.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +11 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-object-OKQAXJCW.mjs +27 -0
- package/dist/lib/neutral/create-object-OKQAXJCW.mjs.map +7 -0
- package/dist/lib/{browser/drop-axis-UTOJ5MVT.mjs → neutral/drop-axis-G6UOXG54.mjs} +6 -6
- package/dist/lib/neutral/drop-axis-G6UOXG54.mjs.map +7 -0
- package/dist/lib/{node-esm/types → neutral}/index.mjs +14 -5
- package/dist/lib/neutral/insert-axis-ZFFNG22G.mjs +16 -0
- package/dist/lib/neutral/insert-axis-ZFFNG22G.mjs.map +7 -0
- package/dist/lib/{browser/markdown-ZDM2HMK6.mjs → neutral/markdown-I2AKJYPF.mjs} +5 -7
- package/dist/lib/neutral/markdown-I2AKJYPF.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/{browser/operation-handler-5PGGEH6O.mjs → neutral/operation-handler-TB6LFV2H.mjs} +4 -7
- package/dist/lib/neutral/operation-handler-TB6LFV2H.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/{browser/react-surface-7LK375A6.mjs → neutral/react-surface-VSTQNVPT.mjs} +12 -22
- package/dist/lib/neutral/react-surface-VSTQNVPT.mjs.map +7 -0
- package/dist/lib/neutral/restore-axis-44DM6N54.mjs +16 -0
- package/dist/lib/neutral/restore-axis-44DM6N54.mjs.map +7 -0
- package/dist/lib/{browser/scroll-to-anchor-HNCUXJGW.mjs → neutral/scroll-to-anchor-QPOGMAQG.mjs} +10 -14
- package/dist/lib/neutral/scroll-to-anchor-QPOGMAQG.mjs.map +7 -0
- package/dist/lib/{browser/state-35W4C372.mjs → neutral/state-HPA27MX2.mjs} +4 -6
- package/dist/lib/neutral/state-HPA27MX2.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +103 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +55 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/types/index.mjs +6 -4
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/{browser/undo-mappings-GTX6XUZK.mjs → neutral/undo-mappings-3FQLSTCZ.mjs} +8 -12
- package/dist/lib/neutral/undo-mappings-3FQLSTCZ.mjs.map +7 -0
- 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/SheetPlugin.workerd.d.ts +4 -0
- package/dist/types/src/SheetPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/anchor-sort.d.ts.map +1 -0
- package/dist/types/src/capabilities/comment-config.d.ts +12 -0
- package/dist/types/src/capabilities/comment-config.d.ts.map +1 -0
- package/dist/types/src/capabilities/compute-graph-registry.d.ts +11 -0
- package/dist/types/src/capabilities/compute-graph-registry.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +11 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +23 -7
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/{operation-handler/operation-handler.d.ts → operation-handler.d.ts} +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +2 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -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 +3 -15
- package/dist/types/src/components/Sheet/Sheet.d.ts.map +1 -1
- package/dist/types/src/components/SheetContent/SheetCellEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetContent/SheetContent.d.ts +1 -5
- package/dist/types/src/components/SheetContent/SheetContent.d.ts.map +1 -1
- package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts +75 -44
- package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetContent/util.d.ts +1 -1
- package/dist/types/src/components/SheetContent/util.d.ts.map +1 -1
- package/dist/types/src/components/SheetRoot/SheetRoot.d.ts +2 -2
- package/dist/types/src/components/SheetRoot/SheetRoot.d.ts.map +1 -1
- package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts +1 -5
- package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts +1 -5
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts +72 -70
- 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/containers/RangeList/RangeList.d.ts +2 -2
- package/dist/types/src/containers/RangeList/RangeList.d.ts.map +1 -1
- package/dist/types/src/containers/RangeList/index.d.ts +1 -2
- package/dist/types/src/containers/RangeList/index.d.ts.map +1 -1
- package/dist/types/src/containers/SheetArticle/SheetArticle.d.ts +12 -0
- package/dist/types/src/containers/SheetArticle/SheetArticle.d.ts.map +1 -0
- package/dist/types/src/containers/SheetArticle/SheetArticle.stories.d.ts +92 -0
- package/dist/types/src/containers/SheetArticle/SheetArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/SheetArticle/index.d.ts +2 -0
- package/dist/types/src/containers/SheetArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +1 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- 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 +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/integrations/thread-ranges.d.ts +1 -1
- package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
- 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/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/drop-axis.d.ts +3 -3
- package/dist/types/src/operations/drop-axis.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -2
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/insert-axis.d.ts +3 -3
- package/dist/types/src/operations/insert-axis.d.ts.map +1 -1
- package/dist/types/src/operations/restore-axis.d.ts +3 -3
- package/dist/types/src/operations/restore-axis.d.ts.map +1 -1
- package/dist/types/src/operations/scroll-to-anchor.d.ts +3 -3
- package/dist/types/src/operations/scroll-to-anchor.d.ts.map +1 -1
- 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/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/serializer.d.ts +2 -2
- 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 +5 -5
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +74 -40
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Sheet.d.ts +6 -6
- package/dist/types/src/types/Sheet.d.ts.map +1 -1
- package/dist/types/src/types/{capabilities.d.ts → SheetCapabilities.d.ts} +5 -7
- package/dist/types/src/types/SheetCapabilities.d.ts.map +1 -0
- package/dist/types/src/{operations/definitions.d.ts → types/SheetOperation.d.ts} +12 -12
- package/dist/types/src/types/SheetOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -2
- package/dist/types/src/types/index.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.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 +116 -80
- package/src/SheetPlugin.node.ts +21 -0
- package/src/SheetPlugin.test.ts +30 -0
- package/src/SheetPlugin.tsx +13 -40
- package/src/SheetPlugin.workerd.ts +18 -0
- package/src/capabilities/{anchor-sort/anchor-sort.ts → anchor-sort.ts} +1 -1
- package/src/capabilities/comment-config.ts +24 -0
- package/src/capabilities/compute-graph-registry.ts +42 -0
- package/src/capabilities/create-object.ts +30 -0
- package/src/capabilities/index.ts +17 -7
- package/src/capabilities/{markdown/markdown.ts → markdown.ts} +3 -2
- package/src/capabilities/{operation-handler/operation-handler.ts → operation-handler.ts} +2 -2
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +9 -9
- package/src/capabilities/{state/state.ts → state.ts} +3 -3
- package/src/capabilities/{undo-mappings/undo-mappings.ts → undo-mappings.ts} +3 -3
- package/src/components/ComputeGraph/ComputeGraphContextProvider.tsx +1 -1
- package/src/components/ComputeGraph/compute-graph.stories.tsx +17 -14
- package/src/components/SheetContent/SheetCellEditor.stories.tsx +8 -7
- package/src/components/SheetContent/SheetContent.stories.tsx +10 -10
- package/src/components/SheetContent/SheetContent.tsx +10 -10
- package/src/components/SheetContent/util.ts +3 -2
- package/src/components/SheetRoot/SheetRoot.tsx +8 -2
- package/src/components/SheetStatusbar/SheetStatusbar.tsx +3 -3
- package/src/components/SheetToolbar/SheetToolbar.stories.tsx +1 -1
- package/src/components/SheetToolbar/SheetToolbar.tsx +1 -2
- package/src/components/SheetToolbar/align.ts +9 -9
- package/src/components/SheetToolbar/style.ts +7 -7
- package/src/containers/RangeList/RangeList.tsx +16 -15
- package/src/containers/RangeList/index.ts +1 -3
- package/src/containers/{SheetContainer/SheetContainer.stories.tsx → SheetArticle/SheetArticle.stories.tsx} +20 -19
- package/src/containers/{SheetContainer/SheetContainer.tsx → SheetArticle/SheetArticle.tsx} +9 -9
- package/src/containers/SheetArticle/index.ts +5 -0
- package/src/containers/index.ts +1 -1
- package/src/extensions/compute.stories.tsx +10 -10
- package/src/extensions/compute.ts +1 -1
- package/src/extensions/editor/sheet-extension.test.ts +1 -1
- package/src/extensions/editor/sheet-extension.ts +2 -2
- package/src/index.ts +2 -2
- package/src/integrations/thread-ranges.ts +9 -9
- package/src/meta.ts +1 -0
- package/src/model/sheet-model.test.ts +4 -4
- package/src/model/sheet-model.ts +17 -17
- package/src/model/testing.ts +2 -2
- package/src/model/useSheetModel.ts +3 -2
- package/src/operations/drop-axis.ts +5 -5
- package/src/operations/index.ts +1 -3
- package/src/operations/insert-axis.ts +5 -5
- package/src/operations/restore-axis.ts +5 -5
- package/src/operations/scroll-to-anchor.ts +3 -4
- package/src/playwright/sheet.spec.ts +3 -3
- package/src/plugin.ts +11 -0
- package/src/sanity.test.ts +6 -2
- package/src/serializer.ts +2 -2
- package/src/testing/data.ts +1 -1
- package/src/testing/testing.tsx +4 -4
- package/src/translations.ts +41 -37
- package/src/types/Sheet.ts +7 -7
- package/src/types/{capabilities.ts → SheetCapabilities.ts} +9 -9
- package/src/{operations/definitions.ts → types/SheetOperation.ts} +4 -2
- package/src/types/index.ts +4 -2
- package/src/types/util.ts +1 -1
- package/dist/lib/browser/RangeList-RRNK4LL5.mjs.map +0 -7
- package/dist/lib/browser/SheetContainer-N7GPNSOM.mjs.map +0 -7
- package/dist/lib/browser/anchor-sort-J4Y5NKYR.mjs.map +0 -7
- package/dist/lib/browser/chunk-AIOU5OTJ.mjs +0 -118
- package/dist/lib/browser/chunk-AIOU5OTJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-BZEV7AQM.mjs.map +0 -7
- package/dist/lib/browser/chunk-MFMDZ433.mjs.map +0 -7
- package/dist/lib/browser/chunk-NNWF7EKC.mjs.map +0 -7
- package/dist/lib/browser/chunk-T5XHKC7L.mjs.map +0 -7
- package/dist/lib/browser/chunk-UZ4SHAES.mjs +0 -8
- package/dist/lib/browser/chunk-UZ4SHAES.mjs.map +0 -7
- package/dist/lib/browser/compute-graph-registry-FEG3DN5R.mjs +0 -22
- package/dist/lib/browser/compute-graph-registry-FEG3DN5R.mjs.map +0 -7
- package/dist/lib/browser/drop-axis-UTOJ5MVT.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -172
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/insert-axis-OS5VFQDK.mjs +0 -16
- package/dist/lib/browser/insert-axis-OS5VFQDK.mjs.map +0 -7
- package/dist/lib/browser/markdown-ZDM2HMK6.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operation-handler-5PGGEH6O.mjs.map +0 -7
- package/dist/lib/browser/operations/index.mjs +0 -12
- package/dist/lib/browser/react-surface-7LK375A6.mjs.map +0 -7
- package/dist/lib/browser/restore-axis-O7PHU7ON.mjs +0 -16
- package/dist/lib/browser/restore-axis-O7PHU7ON.mjs.map +0 -7
- package/dist/lib/browser/scroll-to-anchor-HNCUXJGW.mjs.map +0 -7
- package/dist/lib/browser/state-35W4C372.mjs.map +0 -7
- package/dist/lib/browser/undo-mappings-GTX6XUZK.mjs.map +0 -7
- package/dist/lib/node-esm/RangeList-X6IU5QKI.mjs +0 -51
- package/dist/lib/node-esm/RangeList-X6IU5QKI.mjs.map +0 -7
- package/dist/lib/node-esm/SheetContainer-QFRHGZZE.mjs +0 -45
- package/dist/lib/node-esm/SheetContainer-QFRHGZZE.mjs.map +0 -7
- package/dist/lib/node-esm/anchor-sort-XLGKHSB4.mjs +0 -26
- package/dist/lib/node-esm/anchor-sort-XLGKHSB4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HI3E7P4K.mjs +0 -10
- package/dist/lib/node-esm/chunk-HI3E7P4K.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-J7XCAKTA.mjs +0 -279
- package/dist/lib/node-esm/chunk-J7XCAKTA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-M52YLLWU.mjs +0 -236
- package/dist/lib/node-esm/chunk-M52YLLWU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PK76XIMN.mjs +0 -1772
- package/dist/lib/node-esm/chunk-PK76XIMN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UMXU7BDG.mjs +0 -29
- package/dist/lib/node-esm/chunk-UMXU7BDG.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Z4BXHF76.mjs +0 -119
- package/dist/lib/node-esm/chunk-Z4BXHF76.mjs.map +0 -7
- package/dist/lib/node-esm/compute-graph-registry-TOMM5AGM.mjs +0 -23
- package/dist/lib/node-esm/compute-graph-registry-TOMM5AGM.mjs.map +0 -7
- package/dist/lib/node-esm/drop-axis-XFFTKE4J.mjs +0 -24
- package/dist/lib/node-esm/drop-axis-XFFTKE4J.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -173
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/insert-axis-QYN6V3NH.mjs +0 -17
- package/dist/lib/node-esm/insert-axis-QYN6V3NH.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-TTSQDUPW.mjs +0 -31
- package/dist/lib/node-esm/markdown-TTSQDUPW.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/operation-handler-G6SZSFCD.mjs +0 -17
- package/dist/lib/node-esm/operation-handler-G6SZSFCD.mjs.map +0 -7
- package/dist/lib/node-esm/operations/index.mjs +0 -13
- package/dist/lib/node-esm/react-surface-OVBFWYD7.mjs +0 -55
- package/dist/lib/node-esm/react-surface-OVBFWYD7.mjs.map +0 -7
- package/dist/lib/node-esm/restore-axis-WUXX5KAE.mjs +0 -17
- package/dist/lib/node-esm/restore-axis-WUXX5KAE.mjs.map +0 -7
- package/dist/lib/node-esm/scroll-to-anchor-UUXINUVP.mjs +0 -38
- package/dist/lib/node-esm/scroll-to-anchor-UUXINUVP.mjs.map +0 -7
- package/dist/lib/node-esm/state-L3SAQ6V7.mjs +0 -32
- package/dist/lib/node-esm/state-L3SAQ6V7.mjs.map +0 -7
- package/dist/lib/node-esm/undo-mappings-CQIVZKAC.mjs +0 -36
- package/dist/lib/node-esm/undo-mappings-CQIVZKAC.mjs.map +0 -7
- 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.map +0 -1
- package/dist/types/src/capabilities/operation-handler/index.d.ts +0 -4
- package/dist/types/src/capabilities/operation-handler/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-handler/operation-handler.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.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -3
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/capabilities/undo-mappings/index.d.ts +0 -3
- package/dist/types/src/capabilities/undo-mappings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/undo-mappings/undo-mappings.d.ts.map +0 -1
- package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts +0 -12
- package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts.map +0 -1
- package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts +0 -57
- package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts.map +0 -1
- package/dist/types/src/containers/SheetContainer/index.d.ts +0 -3
- package/dist/types/src/containers/SheetContainer/index.d.ts.map +0 -1
- package/dist/types/src/operations/definitions.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/src/capabilities/anchor-sort/index.ts +0 -7
- package/src/capabilities/compute-graph-registry/compute-graph-registry.ts +0 -27
- package/src/capabilities/compute-graph-registry/index.ts +0 -7
- package/src/capabilities/markdown/index.ts +0 -7
- package/src/capabilities/operation-handler/index.ts +0 -11
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -7
- package/src/capabilities/undo-mappings/index.ts +0 -7
- package/src/containers/SheetContainer/index.ts +0 -7
- /package/dist/lib/{browser/operations/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/operations/index.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral/operations}/index.mjs.map +0 -0
- /package/dist/types/src/capabilities/{anchor-sort/anchor-sort.d.ts → anchor-sort.d.ts} +0 -0
- /package/dist/types/src/capabilities/{markdown/markdown.d.ts → markdown.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
- /package/dist/types/src/capabilities/{undo-mappings/undo-mappings.d.ts → undo-mappings.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.8baae0fced",
|
|
4
4
|
"description": "Braneframe sketch plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -8,41 +8,77 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/dxos/dxos"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"source": "./src/index.ts",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
15
|
+
"imports": {
|
|
16
|
+
"#capabilities": {
|
|
17
|
+
"source": "./src/capabilities/index.ts",
|
|
18
|
+
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
19
|
+
"default": "./dist/lib/neutral/capabilities/index.mjs"
|
|
20
|
+
},
|
|
21
|
+
"#components": {
|
|
22
|
+
"source": "./src/components/index.ts",
|
|
23
|
+
"types": "./dist/types/src/components/index.d.ts",
|
|
24
|
+
"default": "./dist/lib/neutral/components/index.mjs"
|
|
21
25
|
},
|
|
22
|
-
"
|
|
26
|
+
"#containers": {
|
|
27
|
+
"source": "./src/containers/index.ts",
|
|
28
|
+
"types": "./dist/types/src/containers/index.d.ts",
|
|
29
|
+
"default": "./dist/lib/neutral/containers/index.mjs"
|
|
30
|
+
},
|
|
31
|
+
"#meta": {
|
|
32
|
+
"source": "./src/meta.ts",
|
|
33
|
+
"types": "./dist/types/src/meta.d.ts",
|
|
34
|
+
"default": "./dist/lib/neutral/meta.mjs"
|
|
35
|
+
},
|
|
36
|
+
"#operations": {
|
|
23
37
|
"source": "./src/operations/index.ts",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
38
|
+
"types": "./dist/types/src/operations/index.d.ts",
|
|
39
|
+
"default": "./dist/lib/neutral/operations/index.mjs"
|
|
40
|
+
},
|
|
41
|
+
"#plugin": {
|
|
42
|
+
"source": {
|
|
43
|
+
"workerd": "./src/SheetPlugin.workerd.ts",
|
|
44
|
+
"node": "./src/SheetPlugin.node.ts",
|
|
45
|
+
"default": "./src/SheetPlugin.tsx"
|
|
46
|
+
},
|
|
47
|
+
"types": "./dist/types/src/SheetPlugin.d.ts",
|
|
48
|
+
"workerd": "./dist/lib/neutral/SheetPlugin.workerd.mjs",
|
|
49
|
+
"node": "./dist/lib/neutral/SheetPlugin.node.mjs",
|
|
50
|
+
"default": "./dist/lib/neutral/SheetPlugin.mjs"
|
|
51
|
+
},
|
|
52
|
+
"#testing": "./src/testing/index.ts",
|
|
53
|
+
"#translations": {
|
|
54
|
+
"source": "./src/translations.ts",
|
|
55
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
56
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
27
57
|
},
|
|
28
|
-
"
|
|
58
|
+
"#types": {
|
|
29
59
|
"source": "./src/types/index.ts",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"types": "./dist/types/src/types/index.d.ts"
|
|
60
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
61
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
33
62
|
}
|
|
34
63
|
},
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
64
|
+
"exports": {
|
|
65
|
+
".": {
|
|
66
|
+
"source": "./src/index.ts",
|
|
67
|
+
"types": "./dist/types/src/index.d.ts",
|
|
68
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
69
|
+
},
|
|
70
|
+
"./plugin": {
|
|
71
|
+
"source": "./src/plugin.ts",
|
|
72
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
73
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
74
|
+
},
|
|
75
|
+
"./translations": {
|
|
76
|
+
"source": "./src/translations.ts",
|
|
77
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
78
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
44
79
|
}
|
|
45
80
|
},
|
|
81
|
+
"types": "dist/types/src/index.d.ts",
|
|
46
82
|
"files": [
|
|
47
83
|
"dist",
|
|
48
84
|
"src"
|
|
@@ -51,7 +87,7 @@
|
|
|
51
87
|
"@codemirror/autocomplete": "^6.19.0",
|
|
52
88
|
"@codemirror/language": "^6.11.3",
|
|
53
89
|
"@codemirror/state": "^6.5.2",
|
|
54
|
-
"@codemirror/view": "^6.38.
|
|
90
|
+
"@codemirror/view": "^6.38.5",
|
|
55
91
|
"@dnd-kit/core": "^6.0.5",
|
|
56
92
|
"@dnd-kit/modifiers": "^6.0.0",
|
|
57
93
|
"@dnd-kit/sortable": "^7.0.1",
|
|
@@ -62,51 +98,51 @@
|
|
|
62
98
|
"@lezer/lr": "^1.4.2",
|
|
63
99
|
"@radix-ui/react-context": "1.1.1",
|
|
64
100
|
"codemirror-lang-spreadsheet": "^1.3.0",
|
|
65
|
-
"date-fns": "^3.
|
|
101
|
+
"date-fns": "^3.6.0",
|
|
66
102
|
"lodash.defaultsdeep": "^4.6.1",
|
|
67
103
|
"re-resizable": "^6.9.17",
|
|
68
104
|
"react-markdown": "^10.1.0",
|
|
69
105
|
"react-resize-detector": "^11.0.1",
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/crypto": "0.8.4-main.
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/
|
|
87
|
-
"@dxos/plugin-automation": "0.8.4-main.
|
|
88
|
-
"@dxos/plugin-client": "0.8.4-main.
|
|
89
|
-
"@dxos/plugin-graph": "0.8.4-main.
|
|
90
|
-
"@dxos/plugin-
|
|
91
|
-
"@dxos/plugin-
|
|
92
|
-
"@dxos/plugin-
|
|
93
|
-
"@dxos/plugin-
|
|
94
|
-
"@dxos/plugin-
|
|
95
|
-
"@dxos/
|
|
96
|
-
"@dxos/react-
|
|
97
|
-
"@dxos/react-
|
|
98
|
-
"@dxos/react-ui-
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/react-ui-form": "0.8.4-main.
|
|
101
|
-
"@dxos/react-ui-
|
|
102
|
-
"@dxos/react-ui-
|
|
103
|
-
"@dxos/react-ui-
|
|
104
|
-
"@dxos/react-ui-
|
|
105
|
-
"@dxos/react-ui-
|
|
106
|
-
"@dxos/
|
|
107
|
-
"@dxos/
|
|
108
|
-
"@dxos/
|
|
109
|
-
"@dxos/
|
|
106
|
+
"@dxos/async": "0.8.4-main.8baae0fced",
|
|
107
|
+
"@dxos/app-framework": "0.8.4-main.8baae0fced",
|
|
108
|
+
"@dxos/app-toolkit": "0.8.4-main.8baae0fced",
|
|
109
|
+
"@dxos/client": "0.8.4-main.8baae0fced",
|
|
110
|
+
"@dxos/compute": "0.8.4-main.8baae0fced",
|
|
111
|
+
"@dxos/crypto": "0.8.4-main.8baae0fced",
|
|
112
|
+
"@dxos/compute-hyperformula": "0.8.4-main.8baae0fced",
|
|
113
|
+
"@dxos/context": "0.8.4-main.8baae0fced",
|
|
114
|
+
"@dxos/debug": "0.8.4-main.8baae0fced",
|
|
115
|
+
"@dxos/echo": "0.8.4-main.8baae0fced",
|
|
116
|
+
"@dxos/echo-db": "0.8.4-main.8baae0fced",
|
|
117
|
+
"@dxos/invariant": "0.8.4-main.8baae0fced",
|
|
118
|
+
"@dxos/keys": "0.8.4-main.8baae0fced",
|
|
119
|
+
"@dxos/echo-react": "0.8.4-main.8baae0fced",
|
|
120
|
+
"@dxos/lit-grid": "0.8.4-main.8baae0fced",
|
|
121
|
+
"@dxos/log": "0.8.4-main.8baae0fced",
|
|
122
|
+
"@dxos/plugin-attention": "0.8.4-main.8baae0fced",
|
|
123
|
+
"@dxos/plugin-automation": "0.8.4-main.8baae0fced",
|
|
124
|
+
"@dxos/plugin-client": "0.8.4-main.8baae0fced",
|
|
125
|
+
"@dxos/plugin-graph": "0.8.4-main.8baae0fced",
|
|
126
|
+
"@dxos/plugin-markdown": "0.8.4-main.8baae0fced",
|
|
127
|
+
"@dxos/plugin-deck": "0.8.4-main.8baae0fced",
|
|
128
|
+
"@dxos/plugin-script": "0.8.4-main.8baae0fced",
|
|
129
|
+
"@dxos/plugin-space": "0.8.4-main.8baae0fced",
|
|
130
|
+
"@dxos/plugin-stack": "0.8.4-main.8baae0fced",
|
|
131
|
+
"@dxos/plugin-thread": "0.8.4-main.8baae0fced",
|
|
132
|
+
"@dxos/react-client": "0.8.4-main.8baae0fced",
|
|
133
|
+
"@dxos/react-hooks": "0.8.4-main.8baae0fced",
|
|
134
|
+
"@dxos/react-ui-attention": "0.8.4-main.8baae0fced",
|
|
135
|
+
"@dxos/react-ui-editor": "0.8.4-main.8baae0fced",
|
|
136
|
+
"@dxos/react-ui-form": "0.8.4-main.8baae0fced",
|
|
137
|
+
"@dxos/react-ui-grid": "0.8.4-main.8baae0fced",
|
|
138
|
+
"@dxos/react-ui-list": "0.8.4-main.8baae0fced",
|
|
139
|
+
"@dxos/react-ui-menu": "0.8.4-main.8baae0fced",
|
|
140
|
+
"@dxos/react-ui-stack": "0.8.4-main.8baae0fced",
|
|
141
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.8baae0fced",
|
|
142
|
+
"@dxos/schema": "0.8.4-main.8baae0fced",
|
|
143
|
+
"@dxos/ui-editor": "0.8.4-main.8baae0fced",
|
|
144
|
+
"@dxos/types": "0.8.4-main.8baae0fced",
|
|
145
|
+
"@dxos/util": "0.8.4-main.8baae0fced"
|
|
110
146
|
},
|
|
111
147
|
"devDependencies": {
|
|
112
148
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -119,17 +155,17 @@
|
|
|
119
155
|
"effect": "3.20.0",
|
|
120
156
|
"react": "~19.2.3",
|
|
121
157
|
"react-dom": "~19.2.3",
|
|
122
|
-
"vite": "^
|
|
123
|
-
"@dxos/
|
|
124
|
-
"@dxos/
|
|
125
|
-
"@dxos/plugin-testing": "0.8.4-main.
|
|
126
|
-
"@dxos/random": "0.8.4-main.
|
|
127
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
128
|
-
"@dxos/
|
|
129
|
-
"@dxos/ui-
|
|
130
|
-
"@dxos/
|
|
131
|
-
"@dxos/ui-
|
|
132
|
-
"@dxos/
|
|
158
|
+
"vite": "^8.0.13",
|
|
159
|
+
"@dxos/echo-generator": "0.8.4-main.8baae0fced",
|
|
160
|
+
"@dxos/lit-grid": "0.8.4-main.8baae0fced",
|
|
161
|
+
"@dxos/plugin-testing": "0.8.4-main.8baae0fced",
|
|
162
|
+
"@dxos/random": "0.8.4-main.8baae0fced",
|
|
163
|
+
"@dxos/react-ui": "0.8.4-main.8baae0fced",
|
|
164
|
+
"@dxos/storybook-utils": "0.8.4-main.8baae0fced",
|
|
165
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.8baae0fced",
|
|
166
|
+
"@dxos/test-utils": "0.8.4-main.8baae0fced",
|
|
167
|
+
"@dxos/ui-theme": "0.8.4-main.8baae0fced",
|
|
168
|
+
"@dxos/ui-types": "0.8.4-main.8baae0fced"
|
|
133
169
|
},
|
|
134
170
|
"peerDependencies": {
|
|
135
171
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -137,8 +173,8 @@
|
|
|
137
173
|
"effect": "3.20.0",
|
|
138
174
|
"react": "~19.2.3",
|
|
139
175
|
"react-dom": "~19.2.3",
|
|
140
|
-
"@dxos/ui
|
|
141
|
-
"@dxos/
|
|
176
|
+
"@dxos/react-ui": "0.8.4-main.8baae0fced",
|
|
177
|
+
"@dxos/ui-theme": "0.8.4-main.8baae0fced"
|
|
142
178
|
},
|
|
143
179
|
"publishConfig": {
|
|
144
180
|
"access": "public"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
+
|
|
8
|
+
import { CommentConfig, CreateObject, OperationHandler, UndoMappings } from '#capabilities';
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { Sheet } from '#types';
|
|
11
|
+
|
|
12
|
+
export const SheetPlugin = Plugin.define(meta).pipe(
|
|
13
|
+
AppPlugin.addCommentConfigModule({ activate: CommentConfig }),
|
|
14
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
15
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
16
|
+
AppPlugin.addUndoMappingsModule({ activate: UndoMappings }),
|
|
17
|
+
AppPlugin.addSchemaModule({ schema: [Sheet.Sheet] }),
|
|
18
|
+
Plugin.make,
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
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/plugin';
|
|
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('CreateObject'), moduleId('schema')]));
|
|
24
|
+
|
|
25
|
+
await harness.fire(ActivationEvents.SetupProcessManager);
|
|
26
|
+
expect(harness.manager.getActive()).toEqual(
|
|
27
|
+
expect.arrayContaining([moduleId('OperationHandler'), moduleId('UndoMappings')]),
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
});
|
package/src/SheetPlugin.tsx
CHANGED
|
@@ -2,60 +2,31 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import * as Option from 'effect/Option';
|
|
7
|
-
|
|
8
|
-
import { ActivationEvent, Plugin } from '@dxos/app-framework';
|
|
5
|
+
import { ActivationEvent, ActivationEvents, Plugin } from '@dxos/app-framework';
|
|
9
6
|
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
10
|
-
import { Annotation } from '@dxos/echo';
|
|
11
|
-
import { Operation } from '@dxos/operation';
|
|
12
|
-
import { AutomationEvents } from '@dxos/plugin-automation';
|
|
13
7
|
import { ClientEvents } from '@dxos/plugin-client';
|
|
14
8
|
import { MarkdownEvents } from '@dxos/plugin-markdown';
|
|
15
|
-
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
16
|
-
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
17
9
|
|
|
18
10
|
import {
|
|
19
11
|
AnchorSort,
|
|
12
|
+
CommentConfig,
|
|
20
13
|
ComputeGraphRegistry,
|
|
14
|
+
CreateObject,
|
|
21
15
|
Markdown,
|
|
22
16
|
OperationHandler,
|
|
23
17
|
UndoMappings,
|
|
24
18
|
ReactSurface,
|
|
25
19
|
SheetState,
|
|
26
|
-
} from '
|
|
27
|
-
import { meta } from '
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import { Sheet } from './types';
|
|
31
|
-
import { SheetOperation } from './operations';
|
|
20
|
+
} from '#capabilities';
|
|
21
|
+
import { meta } from '#meta';
|
|
22
|
+
import { translations } from '#translations';
|
|
23
|
+
import { Sheet } from '#types';
|
|
32
24
|
|
|
33
25
|
export const SheetPlugin = Plugin.define(meta).pipe(
|
|
34
|
-
AppPlugin.
|
|
35
|
-
|
|
36
|
-
id: Sheet.Sheet.typename,
|
|
37
|
-
metadata: {
|
|
38
|
-
label: (object: Sheet.Sheet) => object.name,
|
|
39
|
-
icon: Annotation.IconAnnotation.get(Sheet.Sheet).pipe(Option.getOrThrow).icon,
|
|
40
|
-
iconHue: Annotation.IconAnnotation.get(Sheet.Sheet).pipe(Option.getOrThrow).hue ?? 'white',
|
|
41
|
-
serializer,
|
|
42
|
-
comments: 'anchored',
|
|
43
|
-
createObject: ((props, options) =>
|
|
44
|
-
Effect.gen(function* () {
|
|
45
|
-
const object = Sheet.make(props);
|
|
46
|
-
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
47
|
-
object,
|
|
48
|
-
target: options.target,
|
|
49
|
-
hidden: true,
|
|
50
|
-
targetNodeId: options.targetNodeId,
|
|
51
|
-
});
|
|
52
|
-
})) satisfies CreateObject,
|
|
53
|
-
scrollToAnchor: SheetOperation.ScrollToAnchor,
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
}),
|
|
26
|
+
AppPlugin.addCommentConfigModule({ activate: CommentConfig }),
|
|
27
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
57
28
|
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
58
|
-
AppPlugin.
|
|
29
|
+
AppPlugin.addUndoMappingsModule({ activate: UndoMappings }),
|
|
59
30
|
AppPlugin.addSchemaModule({ schema: [Sheet.Sheet] }),
|
|
60
31
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
61
32
|
AppPlugin.addTranslationsModule({ translations }),
|
|
@@ -64,7 +35,7 @@ export const SheetPlugin = Plugin.define(meta).pipe(
|
|
|
64
35
|
activate: SheetState,
|
|
65
36
|
}),
|
|
66
37
|
Plugin.addModule({
|
|
67
|
-
activatesOn: ActivationEvent.allOf(ClientEvents.ClientReady,
|
|
38
|
+
activatesOn: ActivationEvent.allOf(ClientEvents.ClientReady, ActivationEvents.ProcessManagerReady),
|
|
68
39
|
activate: ComputeGraphRegistry,
|
|
69
40
|
}),
|
|
70
41
|
Plugin.addModule({
|
|
@@ -78,3 +49,5 @@ export const SheetPlugin = Plugin.define(meta).pipe(
|
|
|
78
49
|
}),
|
|
79
50
|
Plugin.make,
|
|
80
51
|
);
|
|
52
|
+
|
|
53
|
+
export default SheetPlugin;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
+
|
|
8
|
+
import { OperationHandler } from '#capabilities';
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { Sheet } from '#types';
|
|
11
|
+
|
|
12
|
+
export const SheetPlugin = Plugin.define(meta).pipe(
|
|
13
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
14
|
+
AppPlugin.addSchemaModule({ schema: [Sheet.Sheet] }),
|
|
15
|
+
Plugin.make,
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
export default SheetPlugin;
|
|
@@ -8,7 +8,7 @@ import { Capability } from '@dxos/app-framework';
|
|
|
8
8
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
9
|
import { Relation } from '@dxos/echo';
|
|
10
10
|
|
|
11
|
-
import { Sheet, compareIndexPositions } from '
|
|
11
|
+
import { Sheet, compareIndexPositions } from '#types';
|
|
12
12
|
|
|
13
13
|
export default Capability.makeModule(() =>
|
|
14
14
|
Effect.succeed(
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
10
|
+
import type { Operation } from '@dxos/compute';
|
|
11
|
+
|
|
12
|
+
import { SheetOperation } from '#types';
|
|
13
|
+
import { Sheet } from '#types';
|
|
14
|
+
|
|
15
|
+
export default Capability.makeModule(
|
|
16
|
+
Effect.fnUntraced(function* () {
|
|
17
|
+
const config: AppCapabilities.CommentConfig = {
|
|
18
|
+
id: Sheet.Sheet.typename,
|
|
19
|
+
comments: 'anchored',
|
|
20
|
+
scrollToAnchor: SheetOperation.ScrollToAnchor,
|
|
21
|
+
};
|
|
22
|
+
return Capability.contributes(AppCapabilities.CommentConfig, config);
|
|
23
|
+
}),
|
|
24
|
+
);
|
|
@@ -0,0 +1,42 @@
|
|
|
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 { Operation, ServiceResolver } from '@dxos/compute';
|
|
9
|
+
import { type SpaceId } from '@dxos/keys';
|
|
10
|
+
|
|
11
|
+
import { SheetCapabilities } from '#types';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Builds the per-space compute graph registry by adapting the shared
|
|
15
|
+
* {@link Capabilities.ProcessManagerRuntime} into a
|
|
16
|
+
* {@link FunctionsRuntimeProvider} that resolves {@link Operation.Service}
|
|
17
|
+
* from the space's service layer.
|
|
18
|
+
*/
|
|
19
|
+
export default Capability.makeModule(
|
|
20
|
+
Effect.fnUntraced(function* () {
|
|
21
|
+
const processManagerRuntime = yield* Capability.get(Capabilities.ProcessManagerRuntime);
|
|
22
|
+
|
|
23
|
+
// Async import removes direct dependency on hyperformula.
|
|
24
|
+
const { defaultPlugins, ComputeGraphRegistry } = yield* Effect.tryPromise(
|
|
25
|
+
() => import('@dxos/compute-hyperformula'),
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
const computeGraphRegistry = new ComputeGraphRegistry({
|
|
29
|
+
plugins: defaultPlugins,
|
|
30
|
+
computeRuntime: {
|
|
31
|
+
getRuntime: (spaceId: SpaceId) => ({
|
|
32
|
+
runPromise: <A, E>(effect: Effect.Effect<A, E, Operation.Service>) =>
|
|
33
|
+
processManagerRuntime.runPromise(
|
|
34
|
+
effect.pipe(Effect.provide(ServiceResolver.provide({ space: spaceId }, Operation.Service))),
|
|
35
|
+
),
|
|
36
|
+
}),
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
return Capability.contributes(SheetCapabilities.ComputeGraphRegistry, computeGraphRegistry);
|
|
41
|
+
}),
|
|
42
|
+
);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
import { SpaceOperation } from '@dxos/plugin-space';
|
|
10
|
+
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
11
|
+
|
|
12
|
+
import { Sheet } from '#types';
|
|
13
|
+
|
|
14
|
+
export default Capability.makeModule(
|
|
15
|
+
Effect.fnUntraced(function* () {
|
|
16
|
+
return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
17
|
+
id: Sheet.Sheet.typename,
|
|
18
|
+
createObject: (props, options) =>
|
|
19
|
+
Effect.gen(function* () {
|
|
20
|
+
const object = Sheet.make(props);
|
|
21
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
22
|
+
object,
|
|
23
|
+
target: options.target,
|
|
24
|
+
hidden: true,
|
|
25
|
+
targetNodeId: options.targetNodeId,
|
|
26
|
+
});
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
29
|
+
}),
|
|
30
|
+
);
|
|
@@ -2,10 +2,20 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
7
|
+
import type { Operation } from '@dxos/compute';
|
|
8
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
9
|
+
|
|
10
|
+
export const AnchorSort = Capability.lazy('AnchorSort', () => import('./anchor-sort'));
|
|
11
|
+
export const CommentConfig = Capability.lazy('CommentConfig', () => import('./comment-config'));
|
|
12
|
+
export const ComputeGraphRegistry = Capability.lazy('ComputeGraphRegistry', () => import('./compute-graph-registry'));
|
|
13
|
+
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
14
|
+
export const Markdown = Capability.lazy('Markdown', () => import('./markdown'));
|
|
15
|
+
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
16
|
+
'OperationHandler',
|
|
17
|
+
() => import('./operation-handler'),
|
|
18
|
+
);
|
|
19
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
20
|
+
export const SheetState = Capability.lazy('SheetState', () => import('./state'));
|
|
21
|
+
export const UndoMappings = Capability.lazy('UndoMappings', () => import('./undo-mappings'));
|
|
@@ -8,8 +8,9 @@ import { Capability } from '@dxos/app-framework';
|
|
|
8
8
|
import { getSpace } from '@dxos/client/echo';
|
|
9
9
|
import { MarkdownCapabilities } from '@dxos/plugin-markdown';
|
|
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* () {
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
-
import type { OperationHandlerSet } from '@dxos/
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
9
9
|
|
|
10
|
-
import { SheetOperationHandlerSet } from '
|
|
10
|
+
import { SheetOperationHandlerSet } from '#operations';
|
|
11
11
|
|
|
12
12
|
export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
|
|
13
13
|
Effect.fnUntraced(function* () {
|
|
@@ -7,28 +7,29 @@ import React from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { Surface, useCapability } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
10
11
|
import { Obj } from '@dxos/echo';
|
|
11
12
|
import { getSpace } from '@dxos/react-client/echo';
|
|
12
13
|
|
|
13
|
-
import { RangeList,
|
|
14
|
-
import {
|
|
15
|
-
import { Sheet, SheetCapabilities } from '../../types';
|
|
14
|
+
import { RangeList, SheetArticle } from '#containers';
|
|
15
|
+
import { Sheet, SheetCapabilities } from '#types';
|
|
16
16
|
|
|
17
17
|
export default Capability.makeModule(() =>
|
|
18
18
|
Effect.succeed(
|
|
19
19
|
Capability.contributes(Capabilities.ReactSurface, [
|
|
20
20
|
Surface.create({
|
|
21
|
-
id:
|
|
21
|
+
id: 'sheet',
|
|
22
|
+
// TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
|
|
22
23
|
role: ['article', 'section'],
|
|
23
24
|
filter: (data): data is { attendableId: string; subject: Sheet.Sheet } =>
|
|
24
25
|
typeof data.attendableId === 'string' &&
|
|
25
26
|
Obj.instanceOf(Sheet.Sheet, data.subject) &&
|
|
26
|
-
!!
|
|
27
|
+
!!Obj.getDatabase(data.subject),
|
|
27
28
|
component: ({ data, role }) => {
|
|
28
29
|
const computeGraphRegistry = useCapability(SheetCapabilities.ComputeGraphRegistry);
|
|
29
30
|
|
|
30
31
|
return (
|
|
31
|
-
<
|
|
32
|
+
<SheetArticle
|
|
32
33
|
role={role}
|
|
33
34
|
subject={data.subject}
|
|
34
35
|
attendableId={data.attendableId}
|
|
@@ -39,9 +40,8 @@ export default Capability.makeModule(() =>
|
|
|
39
40
|
},
|
|
40
41
|
}),
|
|
41
42
|
Surface.create({
|
|
42
|
-
id:
|
|
43
|
-
|
|
44
|
-
filter: (data): data is { subject: Sheet.Sheet } => Obj.instanceOf(Sheet.Sheet, data.subject),
|
|
43
|
+
id: 'object-properties',
|
|
44
|
+
filter: AppSurface.object(AppSurface.ObjectProperties, Sheet.Sheet),
|
|
45
45
|
component: ({ data }) => <RangeList sheet={data.subject} />,
|
|
46
46
|
}),
|
|
47
47
|
]),
|
|
@@ -6,10 +6,10 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { SheetCapabilities } from '#types';
|
|
10
10
|
|
|
11
|
-
const createGridRegistry = (): GridRegistry => {
|
|
12
|
-
const grids = new Map<string, GridEntry>();
|
|
11
|
+
const createGridRegistry = (): SheetCapabilities.GridRegistry => {
|
|
12
|
+
const grids = new Map<string, SheetCapabilities.GridEntry>();
|
|
13
13
|
return {
|
|
14
14
|
register: (attendableId, grid, setActiveRefs) => {
|
|
15
15
|
grids.set(attendableId, { grid, setActiveRefs });
|