@dxos/plugin-sheet 0.8.4-main.fd6878d → 0.8.4-staging.60fe92afc8
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/PLUGIN.mdl +359 -0
- package/dist/lib/neutral/RangeList-HYB5S6KQ.mjs +46 -0
- package/dist/lib/neutral/RangeList-HYB5S6KQ.mjs.map +7 -0
- package/dist/lib/neutral/SheetArticle-5AJRM3V3.mjs +33 -0
- package/dist/lib/neutral/SheetArticle-5AJRM3V3.mjs.map +7 -0
- package/dist/lib/neutral/SheetPlugin.mjs +63 -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/neutral/anchor-sort-2POWTKTD.mjs +22 -0
- package/dist/lib/neutral/anchor-sort-2POWTKTD.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-2QP6GYB2.mjs +67 -0
- package/dist/lib/neutral/app-graph-builder-2QP6GYB2.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +29 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-BGR7FVNF.mjs +8 -0
- package/dist/lib/neutral/chunk-BGR7FVNF.mjs.map +7 -0
- package/dist/lib/{browser/chunk-VTTKAHAY.mjs → neutral/chunk-ERHMBRSU.mjs} +16 -16
- package/dist/lib/neutral/chunk-ERHMBRSU.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FQHTXKMF.mjs +34 -0
- package/dist/lib/neutral/chunk-FQHTXKMF.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HEN74ZWI.mjs +83 -0
- package/dist/lib/neutral/chunk-HEN74ZWI.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-KUWATEHB.mjs +374 -0
- package/dist/lib/neutral/chunk-KUWATEHB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-S2UNH6VD.mjs +10 -0
- package/dist/lib/neutral/chunk-S2UNH6VD.mjs.map +7 -0
- package/dist/lib/neutral/comment-config-WGXXX5FG.mjs +22 -0
- package/dist/lib/neutral/comment-config-WGXXX5FG.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +1552 -0
- 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-TDQQ24IB.mjs +31 -0
- package/dist/lib/neutral/create-object-TDQQ24IB.mjs.map +7 -0
- package/dist/lib/neutral/drop-axis-WSWFOLQN.mjs +23 -0
- package/dist/lib/neutral/drop-axis-WSWFOLQN.mjs.map +7 -0
- package/dist/lib/{node-esm/types → neutral}/index.mjs +22 -13
- package/dist/lib/neutral/insert-axis-6UQJTIWC.mjs +16 -0
- package/dist/lib/neutral/insert-axis-6UQJTIWC.mjs.map +7 -0
- package/dist/lib/neutral/markdown-extension-HTJDICGT.mjs +28 -0
- package/dist/lib/neutral/markdown-extension-HTJDICGT.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/navigation-resolver-FXEZYO7G.mjs +14 -0
- package/dist/lib/neutral/navigation-resolver-FXEZYO7G.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-TB6LFV2H.mjs +13 -0
- package/dist/lib/neutral/operation-handler-TB6LFV2H.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-4H3PC4WG.mjs +44 -0
- package/dist/lib/neutral/react-surface-4H3PC4WG.mjs.map +7 -0
- package/dist/lib/neutral/restore-axis-AMMVTPS3.mjs +16 -0
- package/dist/lib/neutral/restore-axis-AMMVTPS3.mjs.map +7 -0
- package/dist/lib/neutral/scroll-to-anchor-FK2CXCQR.mjs +33 -0
- package/dist/lib/neutral/scroll-to-anchor-FK2CXCQR.mjs.map +7 -0
- package/dist/lib/neutral/state-HPA27MX2.mjs +29 -0
- 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 +56 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/types/index.mjs +8 -12
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/neutral/undo-mappings-3FQLSTCZ.mjs +31 -0
- package/dist/lib/neutral/undo-mappings-3FQLSTCZ.mjs.map +7 -0
- package/dist/types/src/SheetPlugin.d.ts +3 -1
- 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 +4 -4
- package/dist/types/src/capabilities/anchor-sort.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/comment-config.d.ts +6 -0
- package/dist/types/src/capabilities/comment-config.d.ts.map +1 -0
- package/dist/types/src/capabilities/compute-graph-registry.d.ts +9 -2
- package/dist/types/src/capabilities/compute-graph-registry.d.ts.map +1 -1
- 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 +19 -11
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown-extension.d.ts +5 -0
- package/dist/types/src/capabilities/markdown-extension.d.ts.map +1 -0
- package/dist/types/src/capabilities/navigation-resolver.d.ts +6 -0
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +6 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts +5 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -0
- package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts +1 -1
- package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts.map +1 -1
- package/dist/types/src/components/ComputeGraph/compute-graph.stories.d.ts +9 -4
- package/dist/types/src/components/ComputeGraph/compute-graph.stories.d.ts.map +1 -1
- package/dist/types/src/components/Sheet/Sheet.d.ts +17 -0
- package/dist/types/src/components/Sheet/Sheet.d.ts.map +1 -0
- package/dist/types/src/components/Sheet/index.d.ts +2 -0
- package/dist/types/src/components/Sheet/index.d.ts.map +1 -0
- package/dist/types/src/components/SheetContent/SheetCellEditor.stories.d.ts +16 -0
- package/dist/types/src/components/SheetContent/SheetCellEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/SheetContent/SheetContent.d.ts +6 -0
- package/dist/types/src/components/SheetContent/SheetContent.d.ts.map +1 -0
- package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts +93 -0
- package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts.map +1 -0
- package/dist/types/src/components/SheetContent/index.d.ts +2 -0
- package/dist/types/src/components/SheetContent/index.d.ts.map +1 -0
- package/dist/types/src/components/{GridSheet → SheetContent}/util.d.ts +1 -1
- package/dist/types/src/components/SheetContent/util.d.ts.map +1 -0
- package/dist/types/src/components/{SheetContext/SheetContext.d.ts → SheetRoot/SheetRoot.d.ts} +9 -7
- package/dist/types/src/components/SheetRoot/SheetRoot.d.ts.map +1 -0
- package/dist/types/src/components/SheetRoot/index.d.ts +2 -0
- package/dist/types/src/components/SheetRoot/index.d.ts.map +1 -0
- package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts +6 -0
- package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts.map +1 -0
- package/dist/types/src/components/SheetStatusbar/index.d.ts +2 -0
- package/dist/types/src/components/SheetStatusbar/index.d.ts.map +1 -0
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts +5 -6
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts +92 -4
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/align.d.ts +14 -21
- package/dist/types/src/components/SheetToolbar/align.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/style.d.ts +14 -20
- 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/containers/RangeList/RangeList.d.ts +7 -0
- package/dist/types/src/containers/RangeList/RangeList.d.ts.map +1 -0
- package/dist/types/src/containers/RangeList/index.d.ts +2 -0
- package/dist/types/src/containers/RangeList/index.d.ts.map +1 -0
- package/dist/types/src/containers/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 +4 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/extensions/compute.d.ts +2 -2
- package/dist/types/src/extensions/compute.d.ts.map +1 -1
- package/dist/types/src/extensions/compute.stories.d.ts +10 -13
- package/dist/types/src/extensions/compute.stories.d.ts.map +1 -1
- package/dist/types/src/extensions/editor/index.d.ts +1 -1
- package/dist/types/src/extensions/editor/index.d.ts.map +1 -1
- package/dist/types/src/extensions/editor/{extension.d.ts → sheet-extension.d.ts} +2 -2
- package/dist/types/src/extensions/editor/sheet-extension.d.ts.map +1 -0
- package/dist/types/src/extensions/editor/sheet-extension.test.d.ts +2 -0
- package/dist/types/src/extensions/editor/sheet-extension.test.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/integrations/thread-ranges.d.ts +1 -3
- package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/model/sheet-model.d.ts +31 -7
- package/dist/types/src/model/sheet-model.d.ts.map +1 -1
- package/dist/types/src/model/testing.d.ts +2 -2
- package/dist/types/src/model/testing.d.ts.map +1 -1
- package/dist/types/src/model/useSheetModel.d.ts +3 -3
- package/dist/types/src/model/useSheetModel.d.ts.map +1 -1
- 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 +3 -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/paths.d.ts +3 -0
- package/dist/types/src/paths.d.ts.map +1 -0
- package/dist/types/src/playwright/playwright.config.d.ts.map +1 -1
- package/dist/types/src/playwright/sheet-manager.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/serializer.d.ts +3 -3
- package/dist/types/src/serializer.d.ts.map +1 -1
- package/dist/types/src/testing/data.d.ts +2 -2
- package/dist/types/src/testing/data.d.ts.map +1 -1
- package/dist/types/src/testing/testing.d.ts +28 -4
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +74 -38
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Sheet.d.ts +75 -0
- package/dist/types/src/types/Sheet.d.ts.map +1 -0
- package/dist/types/src/types/SheetCapabilities.d.ts +16 -0
- package/dist/types/src/types/SheetCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/SheetOperation.d.ts +45 -0
- package/dist/types/src/types/SheetOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/sheet-range-types.d.ts +2 -2
- package/dist/types/src/types/sheet-range-types.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +3 -78
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/types/util.d.ts +11 -11
- package/dist/types/src/types/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +132 -98
- package/src/SheetPlugin.node.ts +21 -0
- package/src/SheetPlugin.test.ts +30 -0
- package/src/SheetPlugin.tsx +55 -68
- package/src/SheetPlugin.workerd.ts +18 -0
- package/src/capabilities/anchor-sort.ts +20 -15
- package/src/capabilities/app-graph-builder.ts +63 -0
- package/src/capabilities/comment-config.ts +28 -0
- package/src/capabilities/compute-graph-registry.ts +34 -20
- package/src/capabilities/create-object.ts +33 -0
- package/src/capabilities/index.ts +22 -8
- package/src/capabilities/markdown-extension.ts +31 -0
- package/src/capabilities/navigation-resolver.ts +16 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +38 -29
- package/src/capabilities/state.ts +29 -0
- package/src/capabilities/undo-mappings.ts +30 -0
- package/src/components/ComputeGraph/ComputeGraphContextProvider.tsx +1 -1
- package/src/components/ComputeGraph/compute-graph.stories.tsx +35 -27
- package/src/components/Sheet/Sheet.tsx +20 -0
- package/src/components/Sheet/index.ts +5 -0
- package/src/components/SheetContent/SheetCellEditor.stories.tsx +95 -0
- package/src/components/SheetContent/SheetContent.stories.tsx +60 -0
- package/src/components/{GridSheet/GridSheet.tsx → SheetContent/SheetContent.tsx} +88 -58
- package/src/components/{RangeList → SheetContent}/index.ts +1 -1
- package/src/components/{GridSheet → SheetContent}/util.ts +17 -10
- package/src/components/{SheetContext/SheetContext.tsx → SheetRoot/SheetRoot.tsx} +55 -42
- package/src/components/{GridSheet → SheetRoot}/index.ts +1 -1
- package/src/components/{FunctionEditor/FunctionEditor.tsx → SheetStatusbar/SheetStatusbar.tsx} +20 -7
- package/src/components/{FunctionEditor → SheetStatusbar}/index.ts +1 -1
- package/src/components/SheetToolbar/SheetToolbar.stories.tsx +19 -14
- package/src/components/SheetToolbar/SheetToolbar.tsx +61 -56
- package/src/components/SheetToolbar/align.ts +50 -25
- package/src/components/SheetToolbar/style.ts +52 -22
- package/src/components/SheetToolbar/useToolbarState.ts +22 -5
- package/src/components/index.ts +1 -7
- package/src/containers/RangeList/RangeList.tsx +65 -0
- package/src/containers/RangeList/index.ts +5 -0
- package/src/containers/SheetArticle/SheetArticle.stories.tsx +110 -0
- package/src/containers/SheetArticle/SheetArticle.tsx +57 -0
- package/src/containers/SheetArticle/index.ts +5 -0
- package/src/containers/index.ts +8 -0
- package/src/extensions/compute.stories.tsx +49 -36
- package/src/extensions/compute.ts +3 -4
- package/src/extensions/editor/index.ts +1 -1
- package/src/extensions/editor/{extension.test.ts → sheet-extension.test.ts} +2 -2
- package/src/extensions/editor/{extension.ts → sheet-extension.ts} +18 -15
- package/src/index.ts +3 -2
- package/src/integrations/thread-ranges.ts +20 -62
- package/src/meta.ts +22 -8
- package/src/model/sheet-model.test.ts +34 -6
- package/src/model/sheet-model.ts +84 -52
- package/src/model/testing.ts +5 -5
- package/src/model/useSheetModel.ts +4 -3
- package/src/operations/drop-axis.ts +26 -0
- package/src/operations/index.ts +12 -0
- package/src/operations/insert-axis.ts +19 -0
- package/src/operations/restore-axis.ts +19 -0
- package/src/operations/scroll-to-anchor.ts +30 -0
- package/src/paths.ts +11 -0
- package/src/playwright/playwright.config.ts +1 -1
- package/src/playwright/sheet.spec.ts +4 -3
- package/src/plugin.ts +11 -0
- package/src/sanity.test.ts +9 -3
- package/src/serializer.ts +4 -12
- package/src/testing/data.ts +2 -2
- package/src/testing/testing.tsx +13 -7
- package/src/translations.ts +43 -36
- package/src/types/Sheet.ts +97 -0
- package/src/types/SheetCapabilities.ts +26 -0
- package/src/types/SheetOperation.ts +84 -0
- package/src/types/index.ts +4 -1
- package/src/types/sheet-range-types.ts +5 -5
- package/src/types/types.ts +6 -52
- package/src/types/util.ts +15 -42
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/SheetContainer-JZNFXBW3.mjs +0 -351
- package/dist/lib/browser/SheetContainer-JZNFXBW3.mjs.map +0 -7
- package/dist/lib/browser/anchor-sort-VRX3YZKT.mjs +0 -24
- package/dist/lib/browser/anchor-sort-VRX3YZKT.mjs.map +0 -7
- package/dist/lib/browser/chunk-6AKBCBL4.mjs +0 -18
- package/dist/lib/browser/chunk-6AKBCBL4.mjs.map +0 -7
- package/dist/lib/browser/chunk-BVTHIA5U.mjs +0 -847
- package/dist/lib/browser/chunk-BVTHIA5U.mjs.map +0 -7
- package/dist/lib/browser/chunk-ELAASQ5H.mjs +0 -899
- package/dist/lib/browser/chunk-ELAASQ5H.mjs.map +0 -7
- package/dist/lib/browser/chunk-KJWZUQVA.mjs +0 -15
- package/dist/lib/browser/chunk-KJWZUQVA.mjs.map +0 -7
- package/dist/lib/browser/chunk-VTTKAHAY.mjs.map +0 -7
- package/dist/lib/browser/compute-graph-registry-6YJHXORG.mjs +0 -30
- package/dist/lib/browser/compute-graph-registry-6YJHXORG.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -155
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-SSLPTP5O.mjs +0 -56
- package/dist/lib/browser/intent-resolver-SSLPTP5O.mjs.map +0 -7
- package/dist/lib/browser/markdown-3VPZYNGU.mjs +0 -26
- package/dist/lib/browser/markdown-3VPZYNGU.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-Y7KTPJW2.mjs +0 -53
- package/dist/lib/browser/react-surface-Y7KTPJW2.mjs.map +0 -7
- package/dist/lib/node-esm/SheetContainer-GOIBAE2P.mjs +0 -352
- package/dist/lib/node-esm/SheetContainer-GOIBAE2P.mjs.map +0 -7
- package/dist/lib/node-esm/anchor-sort-YM2UBIKL.mjs +0 -25
- package/dist/lib/node-esm/anchor-sort-YM2UBIKL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3K5VNYOF.mjs +0 -20
- package/dist/lib/node-esm/chunk-3K5VNYOF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4L5CIB7E.mjs +0 -900
- package/dist/lib/node-esm/chunk-4L5CIB7E.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-56HYMW55.mjs +0 -848
- package/dist/lib/node-esm/chunk-56HYMW55.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6SK5LJ5S.mjs +0 -16
- package/dist/lib/node-esm/chunk-6SK5LJ5S.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FXRXBHWM.mjs +0 -236
- package/dist/lib/node-esm/chunk-FXRXBHWM.mjs.map +0 -7
- package/dist/lib/node-esm/compute-graph-registry-ET5KJNLV.mjs +0 -31
- package/dist/lib/node-esm/compute-graph-registry-ET5KJNLV.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -156
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-5P6DBGK2.mjs +0 -57
- package/dist/lib/node-esm/intent-resolver-5P6DBGK2.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-SFDGQWYE.mjs +0 -27
- package/dist/lib/node-esm/markdown-SFDGQWYE.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-6Z5FAOBH.mjs +0 -54
- package/dist/lib/node-esm/react-surface-6Z5FAOBH.mjs.map +0 -7
- 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/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 -6
- package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
- package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts +0 -3
- package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts.map +0 -1
- package/dist/types/src/components/FunctionEditor/index.d.ts +0 -2
- package/dist/types/src/components/FunctionEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/GridSheet/GridSheet.d.ts +0 -3
- package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +0 -1
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts +0 -7
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +0 -1
- package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts +0 -25
- package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/GridSheet/index.d.ts +0 -2
- package/dist/types/src/components/GridSheet/index.d.ts.map +0 -1
- package/dist/types/src/components/GridSheet/util.d.ts.map +0 -1
- package/dist/types/src/components/RangeList/RangeList.d.ts +0 -7
- package/dist/types/src/components/RangeList/RangeList.d.ts.map +0 -1
- package/dist/types/src/components/RangeList/index.d.ts +0 -2
- package/dist/types/src/components/RangeList/index.d.ts.map +0 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts +0 -11
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +0 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts +0 -8
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/SheetContainer/index.d.ts +0 -3
- package/dist/types/src/components/SheetContainer/index.d.ts.map +0 -1
- package/dist/types/src/components/SheetContext/SheetContext.d.ts.map +0 -1
- package/dist/types/src/components/SheetContext/index.d.ts +0 -2
- package/dist/types/src/components/SheetContext/index.d.ts.map +0 -1
- package/dist/types/src/extensions/editor/extension.d.ts.map +0 -1
- package/dist/types/src/extensions/editor/extension.test.d.ts +0 -2
- package/dist/types/src/extensions/editor/extension.test.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -37
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -14
- package/src/capabilities/intent-resolver.ts +0 -38
- package/src/capabilities/markdown.ts +0 -23
- package/src/components/GridSheet/GridSheet.stories.tsx +0 -54
- package/src/components/GridSheet/SheetCellEditor.stories.tsx +0 -93
- package/src/components/RangeList/RangeList.tsx +0 -60
- package/src/components/SheetContainer/SheetContainer.stories.tsx +0 -90
- package/src/components/SheetContainer/SheetContainer.tsx +0 -36
- package/src/components/SheetContainer/index.ts +0 -7
- package/src/components/SheetContext/index.ts +0 -5
- package/src/types/schema.ts +0 -61
- /package/dist/lib/{browser/types/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
package/package.json
CHANGED
|
@@ -1,128 +1,162 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-sheet",
|
|
3
|
-
"version": "0.8.4-
|
|
3
|
+
"version": "0.8.4-staging.60fe92afc8",
|
|
4
4
|
"description": "Braneframe sketch plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
-
"
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
8
12
|
"author": "DXOS.org",
|
|
9
13
|
"sideEffects": true,
|
|
10
14
|
"type": "module",
|
|
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"
|
|
25
|
+
},
|
|
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": {
|
|
37
|
+
"source": "./src/operations/index.ts",
|
|
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"
|
|
57
|
+
},
|
|
58
|
+
"#types": {
|
|
59
|
+
"source": "./src/types/index.ts",
|
|
60
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
61
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
11
64
|
"exports": {
|
|
12
65
|
".": {
|
|
13
66
|
"source": "./src/index.ts",
|
|
14
67
|
"types": "./dist/types/src/index.d.ts",
|
|
15
|
-
"
|
|
16
|
-
"node": "./dist/lib/node-esm/index.mjs"
|
|
68
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
17
69
|
},
|
|
18
|
-
"./
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
70
|
+
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
71
|
+
"./plugin": {
|
|
72
|
+
"source": "./src/plugin.ts",
|
|
73
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
74
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
75
|
+
},
|
|
76
|
+
"./translations": {
|
|
77
|
+
"source": "./src/translations.ts",
|
|
78
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
79
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
23
80
|
}
|
|
24
81
|
},
|
|
25
82
|
"types": "dist/types/src/index.d.ts",
|
|
26
|
-
"typesVersions": {
|
|
27
|
-
"*": {
|
|
28
|
-
"types": [
|
|
29
|
-
"dist/types/src/types/index.d.ts"
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
83
|
"files": [
|
|
34
84
|
"dist",
|
|
35
|
-
"src"
|
|
85
|
+
"src",
|
|
86
|
+
"PLUGIN.mdl"
|
|
36
87
|
],
|
|
37
88
|
"dependencies": {
|
|
38
|
-
"@codemirror/autocomplete": "^6.
|
|
39
|
-
"@codemirror/language": "^6.
|
|
40
|
-
"@codemirror/state": "^6.
|
|
41
|
-
"@codemirror/view": "^6.
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@dnd-kit/sortable": "^7.0.1",
|
|
45
|
-
"@dnd-kit/utilities": "^3.2.0",
|
|
46
|
-
"@lezer/common": "^1.2.2",
|
|
47
|
-
"@lezer/highlight": "^1.2.1",
|
|
48
|
-
"@lezer/lezer": "^1.1.2",
|
|
49
|
-
"@lezer/lr": "^1.4.2",
|
|
50
|
-
"@preact-signals/safe-react": "^0.9.0",
|
|
51
|
-
"@preact/signals-core": "^1.9.0",
|
|
52
|
-
"@radix-ui/react-context": "1.1.1",
|
|
89
|
+
"@codemirror/autocomplete": "^6.20.2",
|
|
90
|
+
"@codemirror/language": "^6.12.3",
|
|
91
|
+
"@codemirror/state": "^6.6.0",
|
|
92
|
+
"@codemirror/view": "^6.43.0",
|
|
93
|
+
"@lezer/common": "^1.5.2",
|
|
94
|
+
"@lezer/highlight": "^1.2.3",
|
|
53
95
|
"codemirror-lang-spreadsheet": "^1.3.0",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/plugin-
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/react-client": "0.8.4-main.fd6878d",
|
|
87
|
-
"@dxos/react-ui-grid": "0.8.4-main.fd6878d",
|
|
88
|
-
"@dxos/react-ui-form": "0.8.4-main.fd6878d",
|
|
89
|
-
"@dxos/react-ui-list": "0.8.4-main.fd6878d",
|
|
90
|
-
"@dxos/react-ui-menu": "0.8.4-main.fd6878d",
|
|
91
|
-
"@dxos/react-ui-stack": "0.8.4-main.fd6878d",
|
|
92
|
-
"@dxos/schema": "0.8.4-main.fd6878d",
|
|
93
|
-
"@dxos/util": "0.8.4-main.fd6878d"
|
|
96
|
+
"@dxos/async": "0.8.4-staging.60fe92afc8",
|
|
97
|
+
"@dxos/app-framework": "0.8.4-staging.60fe92afc8",
|
|
98
|
+
"@dxos/app-toolkit": "0.8.4-staging.60fe92afc8",
|
|
99
|
+
"@dxos/compute": "0.8.4-staging.60fe92afc8",
|
|
100
|
+
"@dxos/client": "0.8.4-staging.60fe92afc8",
|
|
101
|
+
"@dxos/context": "0.8.4-staging.60fe92afc8",
|
|
102
|
+
"@dxos/crypto": "0.8.4-staging.60fe92afc8",
|
|
103
|
+
"@dxos/compute-hyperformula": "0.8.4-staging.60fe92afc8",
|
|
104
|
+
"@dxos/debug": "0.8.4-staging.60fe92afc8",
|
|
105
|
+
"@dxos/echo-client": "0.8.4-staging.60fe92afc8",
|
|
106
|
+
"@dxos/echo": "0.8.4-staging.60fe92afc8",
|
|
107
|
+
"@dxos/invariant": "0.8.4-staging.60fe92afc8",
|
|
108
|
+
"@dxos/lit-grid": "0.8.4-staging.60fe92afc8",
|
|
109
|
+
"@dxos/keys": "0.8.4-staging.60fe92afc8",
|
|
110
|
+
"@dxos/echo-react": "0.8.4-staging.60fe92afc8",
|
|
111
|
+
"@dxos/plugin-client": "0.8.4-staging.60fe92afc8",
|
|
112
|
+
"@dxos/log": "0.8.4-staging.60fe92afc8",
|
|
113
|
+
"@dxos/plugin-comments": "0.8.4-staging.60fe92afc8",
|
|
114
|
+
"@dxos/plugin-graph": "0.8.4-staging.60fe92afc8",
|
|
115
|
+
"@dxos/plugin-markdown": "0.8.4-staging.60fe92afc8",
|
|
116
|
+
"@dxos/plugin-space": "0.8.4-staging.60fe92afc8",
|
|
117
|
+
"@dxos/react-client": "0.8.4-staging.60fe92afc8",
|
|
118
|
+
"@dxos/react-ui-attention": "0.8.4-staging.60fe92afc8",
|
|
119
|
+
"@dxos/react-hooks": "0.8.4-staging.60fe92afc8",
|
|
120
|
+
"@dxos/react-ui-editor": "0.8.4-staging.60fe92afc8",
|
|
121
|
+
"@dxos/react-ui-form": "0.8.4-staging.60fe92afc8",
|
|
122
|
+
"@dxos/react-ui-grid": "0.8.4-staging.60fe92afc8",
|
|
123
|
+
"@dxos/react-ui-menu": "0.8.4-staging.60fe92afc8",
|
|
124
|
+
"@dxos/react-ui-list": "0.8.4-staging.60fe92afc8",
|
|
125
|
+
"@dxos/util": "0.8.4-staging.60fe92afc8",
|
|
126
|
+
"@dxos/ui-editor": "0.8.4-staging.60fe92afc8",
|
|
127
|
+
"@dxos/types": "0.8.4-staging.60fe92afc8"
|
|
94
128
|
},
|
|
95
129
|
"devDependencies": {
|
|
96
|
-
"@effect-
|
|
97
|
-
"@effect/platform": "0.
|
|
98
|
-
"@lezer/generator": "^1.
|
|
130
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
131
|
+
"@effect/platform": "0.96.1",
|
|
132
|
+
"@lezer/generator": "^1.8.0",
|
|
99
133
|
"@tldraw/indices": "^2.0.0-alpha.14",
|
|
100
134
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
101
|
-
"@types/react": "~
|
|
102
|
-
"@types/react-dom": "~
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"react": "~
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"@dxos/lit-grid": "0.8.4-
|
|
109
|
-
"@dxos/
|
|
110
|
-
"@dxos/
|
|
111
|
-
"@dxos/react-ui": "0.8.4-
|
|
112
|
-
"@dxos/
|
|
113
|
-
"@dxos/react-ui-syntax-highlighter": "0.8.4-
|
|
114
|
-
"@dxos/
|
|
115
|
-
"@dxos/
|
|
116
|
-
"@dxos/
|
|
135
|
+
"@types/react": "~19.2.7",
|
|
136
|
+
"@types/react-dom": "~19.2.3",
|
|
137
|
+
"effect": "3.21.3",
|
|
138
|
+
"react": "~19.2.3",
|
|
139
|
+
"react-dom": "~19.2.3",
|
|
140
|
+
"vite": "^8.0.16",
|
|
141
|
+
"@dxos/echo-generator": "0.8.4-staging.60fe92afc8",
|
|
142
|
+
"@dxos/lit-grid": "0.8.4-staging.60fe92afc8",
|
|
143
|
+
"@dxos/random": "0.8.4-staging.60fe92afc8",
|
|
144
|
+
"@dxos/plugin-testing": "0.8.4-staging.60fe92afc8",
|
|
145
|
+
"@dxos/react-ui": "0.8.4-staging.60fe92afc8",
|
|
146
|
+
"@dxos/storybook-utils": "0.8.4-staging.60fe92afc8",
|
|
147
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-staging.60fe92afc8",
|
|
148
|
+
"@dxos/test-utils": "0.8.4-staging.60fe92afc8",
|
|
149
|
+
"@dxos/ui-theme": "0.8.4-staging.60fe92afc8",
|
|
150
|
+
"@dxos/ui-types": "0.8.4-staging.60fe92afc8"
|
|
117
151
|
},
|
|
118
152
|
"peerDependencies": {
|
|
119
|
-
"@effect-
|
|
120
|
-
"@effect/platform": "
|
|
121
|
-
"effect": "
|
|
122
|
-
"react": "~
|
|
123
|
-
"react-dom": "~
|
|
124
|
-
"@dxos/react-ui
|
|
125
|
-
"@dxos/
|
|
153
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
154
|
+
"@effect/platform": "0.96.1",
|
|
155
|
+
"effect": "3.21.3",
|
|
156
|
+
"react": "~19.2.3",
|
|
157
|
+
"react-dom": "~19.2.3",
|
|
158
|
+
"@dxos/react-ui": "0.8.4-staging.60fe92afc8",
|
|
159
|
+
"@dxos/ui-theme": "0.8.4-staging.60fe92afc8"
|
|
126
160
|
},
|
|
127
161
|
"publishConfig": {
|
|
128
162
|
"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,75 +2,62 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { ActivationEvent, ActivationEvents, Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
6
7
|
import { ClientEvents } from '@dxos/plugin-client';
|
|
7
8
|
import { MarkdownEvents } from '@dxos/plugin-markdown';
|
|
8
|
-
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
9
|
-
import { defineObjectForm } from '@dxos/plugin-space/types';
|
|
10
9
|
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
import {
|
|
11
|
+
AnchorSort,
|
|
12
|
+
AppGraphBuilder,
|
|
13
|
+
NavigationResolver,
|
|
14
|
+
CommentConfig,
|
|
15
|
+
ComputeGraphRegistry,
|
|
16
|
+
CreateObject,
|
|
17
|
+
Markdown,
|
|
18
|
+
OperationHandler,
|
|
19
|
+
UndoMappings,
|
|
20
|
+
ReactSurface,
|
|
21
|
+
SheetState,
|
|
22
|
+
} from '#capabilities';
|
|
23
|
+
import { meta } from '#meta';
|
|
24
|
+
import { translations } from '#translations';
|
|
25
|
+
import { Sheet } from '#types';
|
|
16
26
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}),
|
|
55
|
-
defineModule({
|
|
56
|
-
id: `${meta.id}/module/markdown`,
|
|
57
|
-
activatesOn: MarkdownEvents.SetupExtensions,
|
|
58
|
-
activate: Markdown,
|
|
59
|
-
}),
|
|
60
|
-
defineModule({
|
|
61
|
-
id: `${meta.id}/module/anchor-sort`,
|
|
62
|
-
// TODO(wittjosiah): More relevant event?
|
|
63
|
-
activatesOn: Events.AppGraphReady,
|
|
64
|
-
activate: AnchorSort,
|
|
65
|
-
}),
|
|
66
|
-
defineModule({
|
|
67
|
-
id: `${meta.id}/module/react-surface`,
|
|
68
|
-
activatesOn: Events.SetupReactSurface,
|
|
69
|
-
activate: ReactSurface,
|
|
70
|
-
}),
|
|
71
|
-
defineModule({
|
|
72
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
73
|
-
activatesOn: Events.SetupIntentResolver,
|
|
74
|
-
activate: IntentResolver,
|
|
75
|
-
}),
|
|
76
|
-
]);
|
|
27
|
+
// eslint-disable-next-line import/no-relative-packages
|
|
28
|
+
import pluginSpec from '../PLUGIN.mdl?raw';
|
|
29
|
+
|
|
30
|
+
export const SheetPlugin = Plugin.define(meta).pipe(
|
|
31
|
+
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
32
|
+
AppPlugin.addNavigationResolverModule({ activate: NavigationResolver }),
|
|
33
|
+
AppPlugin.addCommentConfigModule({ activate: CommentConfig }),
|
|
34
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
35
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
36
|
+
AppPlugin.addUndoMappingsModule({ activate: UndoMappings }),
|
|
37
|
+
AppPlugin.addSchemaModule({ schema: [Sheet.Sheet] }),
|
|
38
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
39
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
40
|
+
Plugin.addModule({
|
|
41
|
+
activatesOn: AppActivationEvents.SetupSettings,
|
|
42
|
+
activate: SheetState,
|
|
43
|
+
}),
|
|
44
|
+
Plugin.addModule({
|
|
45
|
+
activatesOn: ActivationEvent.allOf(ClientEvents.ClientReady, ActivationEvents.ProcessManagerReady),
|
|
46
|
+
activate: ComputeGraphRegistry,
|
|
47
|
+
}),
|
|
48
|
+
Plugin.addModule({
|
|
49
|
+
activatesOn: MarkdownEvents.SetupExtensions,
|
|
50
|
+
activate: Markdown,
|
|
51
|
+
}),
|
|
52
|
+
Plugin.addModule({
|
|
53
|
+
// TODO(wittjosiah): More relevant event?
|
|
54
|
+
activatesOn: AppActivationEvents.AppGraphReady,
|
|
55
|
+
activate: AnchorSort,
|
|
56
|
+
}),
|
|
57
|
+
AppPlugin.addPluginAssetModule({
|
|
58
|
+
asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
|
|
59
|
+
}),
|
|
60
|
+
Plugin.make,
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
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;
|
|
@@ -2,21 +2,26 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import { Type } from '@dxos/echo';
|
|
7
|
-
import { getTarget } from '@dxos/react-client/echo';
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
8
6
|
|
|
9
|
-
import {
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
import { Relation, Type } from '@dxos/echo';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
contributes(Capabilities.AnchorSort, {
|
|
13
|
-
key: Type.getTypename(SheetType)!,
|
|
14
|
-
sort: (anchorA, anchorB) => {
|
|
15
|
-
const sheet = getTarget(anchorA) as SheetType;
|
|
16
|
-
if (sheet !== getTarget(anchorB)) {
|
|
17
|
-
return 0;
|
|
18
|
-
}
|
|
11
|
+
import { Sheet, compareIndexPositions } from '#types';
|
|
19
12
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
export default Capability.makeModule(() =>
|
|
14
|
+
Effect.succeed(
|
|
15
|
+
Capability.contributes(AppCapabilities.AnchorSort, {
|
|
16
|
+
key: Type.getTypename(Sheet.Sheet),
|
|
17
|
+
sort: (anchorA, anchorB) => {
|
|
18
|
+
const sheet = Relation.getTarget(anchorA) as Sheet.Sheet;
|
|
19
|
+
if (sheet !== Relation.getTarget(anchorB)) {
|
|
20
|
+
return 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return !anchorA.anchor || !anchorB.anchor ? 0 : compareIndexPositions(sheet, anchorA.anchor, anchorB.anchor);
|
|
24
|
+
},
|
|
25
|
+
}),
|
|
26
|
+
),
|
|
27
|
+
);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Option from 'effect/Option';
|
|
7
|
+
|
|
8
|
+
import { Capability } from '@dxos/app-framework';
|
|
9
|
+
import { AppCapabilities, LayoutOperation, createTypeSectionExtension } from '@dxos/app-toolkit';
|
|
10
|
+
import { isSpace } from '@dxos/client/echo';
|
|
11
|
+
import { Operation } from '@dxos/compute';
|
|
12
|
+
import { Type } from '@dxos/echo';
|
|
13
|
+
import { GraphBuilder, Node } from '@dxos/plugin-graph';
|
|
14
|
+
import { SpaceOperation } from '@dxos/plugin-space';
|
|
15
|
+
|
|
16
|
+
import { Sheet } from '#types';
|
|
17
|
+
|
|
18
|
+
import { getSheetsPath } from '../paths';
|
|
19
|
+
|
|
20
|
+
const sheetTypename = Type.getTypename(Sheet.Sheet);
|
|
21
|
+
|
|
22
|
+
export default Capability.makeModule(
|
|
23
|
+
Effect.fnUntraced(function* () {
|
|
24
|
+
const extensions = yield* Effect.all([
|
|
25
|
+
createTypeSectionExtension(Sheet.Sheet),
|
|
26
|
+
|
|
27
|
+
GraphBuilder.createExtension({
|
|
28
|
+
id: 'sheetsSectionActions',
|
|
29
|
+
match: (node) => {
|
|
30
|
+
const space = isSpace(node.properties.space) ? node.properties.space : undefined;
|
|
31
|
+
return node.type === sheetTypename && space ? Option.some(space) : Option.none();
|
|
32
|
+
},
|
|
33
|
+
actions: (space) =>
|
|
34
|
+
Effect.succeed([
|
|
35
|
+
Node.makeAction({
|
|
36
|
+
id: 'create-sheet',
|
|
37
|
+
data: () =>
|
|
38
|
+
Effect.gen(function* () {
|
|
39
|
+
const sheet = Sheet.make({});
|
|
40
|
+
const { subject } = yield* Operation.invoke(
|
|
41
|
+
SpaceOperation.AddObject,
|
|
42
|
+
{ object: sheet, target: space.db, hidden: true, targetNodeId: getSheetsPath(space.db.spaceId) },
|
|
43
|
+
{ spaceId: space.db.spaceId },
|
|
44
|
+
);
|
|
45
|
+
yield* Operation.invoke(
|
|
46
|
+
LayoutOperation.Open,
|
|
47
|
+
{ subject: [...subject] },
|
|
48
|
+
{ spaceId: space.db.spaceId },
|
|
49
|
+
);
|
|
50
|
+
}),
|
|
51
|
+
properties: {
|
|
52
|
+
label: ['add-object.label', { ns: sheetTypename }],
|
|
53
|
+
icon: 'ph--plus--regular',
|
|
54
|
+
disposition: 'list-item-primary',
|
|
55
|
+
},
|
|
56
|
+
}),
|
|
57
|
+
]),
|
|
58
|
+
}),
|
|
59
|
+
]);
|
|
60
|
+
|
|
61
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
62
|
+
}),
|
|
63
|
+
);
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
import { Type } from '@dxos/echo';
|
|
10
|
+
|
|
11
|
+
import { SheetOperation } from '#types';
|
|
12
|
+
import { Sheet } from '#types';
|
|
13
|
+
|
|
14
|
+
// NOTE: Explicit annotation required: d.ts emit cannot portably name the inferred @dxos/compute types (TS2883).
|
|
15
|
+
const activate: () => Effect.Effect<
|
|
16
|
+
Capability.Capability<typeof AppCapabilities.CommentConfig>,
|
|
17
|
+
never,
|
|
18
|
+
Capability.Service
|
|
19
|
+
> = Effect.fnUntraced(function* () {
|
|
20
|
+
const config: AppCapabilities.CommentConfig = {
|
|
21
|
+
id: Type.getTypename(Sheet.Sheet),
|
|
22
|
+
comments: 'anchored',
|
|
23
|
+
scrollToAnchor: SheetOperation.ScrollToAnchor,
|
|
24
|
+
};
|
|
25
|
+
return Capability.contributes(AppCapabilities.CommentConfig, config);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export default activate;
|