@dxos/plugin-sheet 0.8.4-main.c85a9c8dae → 0.8.4-main.dfabb4ec29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/{browser/RangeList-S3SHV7T6.mjs → neutral/RangeList-HYB5S6KQ.mjs} +21 -28
- package/dist/lib/neutral/RangeList-HYB5S6KQ.mjs.map +7 -0
- package/dist/lib/neutral/SheetContainer-ZOVKGHLT.mjs +33 -0
- package/dist/lib/neutral/SheetContainer-ZOVKGHLT.mjs.map +7 -0
- package/dist/lib/neutral/SheetPlugin.mjs +48 -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/{browser/anchor-sort-DZ3IHHJJ.mjs → neutral/anchor-sort-TTCKGX7V.mjs} +5 -7
- 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/neutral/chunk-4GWJDLTH.mjs +83 -0
- package/dist/lib/neutral/chunk-4GWJDLTH.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-J5LGTIGS.mjs +10 -0
- package/dist/lib/{browser/chunk-S445OQGW.mjs → neutral/chunk-KC2SMDNF.mjs} +167 -191
- package/dist/lib/neutral/chunk-KC2SMDNF.mjs.map +7 -0
- package/dist/lib/neutral/chunk-YFHTB6MX.mjs +8 -0
- package/dist/lib/neutral/chunk-YFHTB6MX.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ZWOQCLH7.mjs +21 -0
- package/dist/lib/neutral/chunk-ZWOQCLH7.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/SheetContainer-I3NFVVDQ.mjs → neutral/components/index.mjs} +160 -414
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/{browser/compute-graph-registry-W6HO2G3P.mjs → neutral/compute-graph-registry-IEQBF5XZ.mjs} +5 -6
- package/dist/lib/neutral/compute-graph-registry-IEQBF5XZ.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/neutral/drop-axis-G6UOXG54.mjs +23 -0
- package/dist/lib/neutral/drop-axis-G6UOXG54.mjs.map +7 -0
- package/dist/lib/{browser/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-S6GVLHB4.mjs → neutral/markdown-I2AKJYPF.mjs} +5 -6
- 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/neutral/meta.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/{browser/react-surface-KIU6DGKW.mjs → neutral/react-surface-ID4JCAFR.mjs} +12 -19
- package/dist/lib/neutral/react-surface-ID4JCAFR.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/neutral/scroll-to-anchor-WHX3HJC7.mjs +33 -0
- package/dist/lib/neutral/scroll-to-anchor-WHX3HJC7.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 +55 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/{node-esm → neutral}/types/index.mjs +6 -6
- 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 +1 -0
- package/dist/types/src/SheetPlugin.d.ts.map +1 -1
- package/dist/types/src/SheetPlugin.node.d.ts +4 -0
- package/dist/types/src/SheetPlugin.node.d.ts.map +1 -0
- package/dist/types/src/SheetPlugin.test.d.ts +2 -0
- package/dist/types/src/SheetPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/anchor-sort.d.ts.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 +5 -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 -5
- 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.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.map +1 -0
- package/dist/types/src/capabilities/{compute-graph-registry/compute-graph-registry.d.ts → state.d.ts} +3 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts +5 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -0
- package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts +1 -1
- package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts.map +1 -1
- package/dist/types/src/components/ComputeGraph/compute-graph.stories.d.ts.map +1 -1
- package/dist/types/src/components/Sheet/Sheet.d.ts +10 -4
- 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 +4 -3
- package/dist/types/src/components/SheetContent/SheetContent.d.ts.map +1 -1
- package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts +77 -39
- 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 +5 -3
- package/dist/types/src/components/SheetRoot/SheetRoot.d.ts.map +1 -1
- package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts +4 -3
- package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts +5 -8
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts +72 -68
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/align.d.ts +2 -2
- package/dist/types/src/components/SheetToolbar/align.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/style.d.ts +2 -2
- package/dist/types/src/components/SheetToolbar/style.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/useToolbarState.d.ts.map +1 -1
- package/dist/types/src/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/SheetContainer/SheetContainer.d.ts +4 -4
- package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts.map +1 -1
- package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts +74 -38
- package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SheetContainer/index.d.ts +1 -2
- package/dist/types/src/containers/SheetContainer/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 -3
- package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
- package/dist/types/src/model/sheet-model.d.ts +2 -2
- package/dist/types/src/model/sheet-model.d.ts.map +1 -1
- package/dist/types/src/model/testing.d.ts +1 -1
- package/dist/types/src/model/testing.d.ts.map +1 -1
- package/dist/types/src/model/useSheetModel.d.ts +2 -2
- package/dist/types/src/model/useSheetModel.d.ts.map +1 -1
- package/dist/types/src/operations/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/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 +3 -3
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +74 -39
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Sheet.d.ts +2 -2
- package/dist/types/src/types/Sheet.d.ts.map +1 -1
- 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 -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 +0 -92
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/types/util.d.ts +1 -1
- package/dist/types/src/types/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +116 -73
- package/src/SheetPlugin.node.ts +21 -0
- package/src/SheetPlugin.test.ts +30 -0
- package/src/SheetPlugin.tsx +25 -35
- 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/compute-graph-registry.ts → compute-graph-registry.ts} +4 -2
- package/src/capabilities/create-object.ts +30 -0
- package/src/capabilities/index.ts +17 -5
- package/src/capabilities/{markdown/markdown.ts → markdown.ts} +3 -2
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +12 -9
- 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 +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 +40 -23
- package/src/components/SheetContent/util.ts +3 -2
- package/src/components/SheetRoot/SheetRoot.tsx +18 -7
- package/src/components/SheetStatusbar/SheetStatusbar.tsx +15 -8
- package/src/components/SheetToolbar/SheetToolbar.stories.tsx +1 -1
- package/src/components/SheetToolbar/SheetToolbar.tsx +15 -20
- package/src/components/SheetToolbar/align.ts +9 -9
- package/src/components/SheetToolbar/style.ts +7 -7
- package/src/containers/RangeList/RangeList.tsx +17 -17
- package/src/containers/RangeList/index.ts +1 -3
- package/src/containers/SheetContainer/SheetContainer.stories.tsx +36 -20
- package/src/containers/SheetContainer/SheetContainer.tsx +8 -8
- package/src/containers/SheetContainer/index.ts +1 -3
- package/src/extensions/compute.stories.tsx +9 -9
- 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 +7 -39
- package/src/meta.ts +1 -1
- package/src/model/sheet-model.test.ts +5 -5
- 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 +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/playwright/sheet.spec.ts +2 -2
- package/src/plugin.ts +11 -0
- package/src/sanity.test.ts +6 -3
- 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 -36
- package/src/types/Sheet.ts +15 -9
- package/src/types/SheetCapabilities.ts +26 -0
- package/src/types/SheetOperation.ts +75 -0
- package/src/types/index.ts +4 -2
- package/src/types/types.ts +0 -80
- package/src/types/util.ts +1 -1
- package/dist/lib/browser/RangeList-S3SHV7T6.mjs.map +0 -7
- package/dist/lib/browser/SheetContainer-I3NFVVDQ.mjs.map +0 -7
- package/dist/lib/browser/anchor-sort-DZ3IHHJJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-NNWF7EKC.mjs.map +0 -7
- package/dist/lib/browser/chunk-S445OQGW.mjs.map +0 -7
- package/dist/lib/browser/compute-graph-registry-W6HO2G3P.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -145
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/markdown-S6GVLHB4.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operation-resolver-Z4X4UWNR.mjs +0 -79
- package/dist/lib/browser/operation-resolver-Z4X4UWNR.mjs.map +0 -7
- package/dist/lib/browser/react-surface-KIU6DGKW.mjs.map +0 -7
- package/dist/lib/node-esm/RangeList-IB23OJK2.mjs +0 -54
- package/dist/lib/node-esm/RangeList-IB23OJK2.mjs.map +0 -7
- package/dist/lib/node-esm/SheetContainer-KUXNCSFP.mjs +0 -1806
- package/dist/lib/node-esm/SheetContainer-KUXNCSFP.mjs.map +0 -7
- package/dist/lib/node-esm/anchor-sort-24OXMOSX.mjs +0 -25
- package/dist/lib/node-esm/anchor-sort-24OXMOSX.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-NKZ3O4OR.mjs +0 -398
- package/dist/lib/node-esm/chunk-NKZ3O4OR.mjs.map +0 -7
- package/dist/lib/node-esm/compute-graph-registry-2C3Y2RPQ.mjs +0 -22
- package/dist/lib/node-esm/compute-graph-registry-2C3Y2RPQ.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -146
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-YT5KJTQT.mjs +0 -30
- package/dist/lib/node-esm/markdown-YT5KJTQT.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/operation-resolver-7VD2YXSQ.mjs +0 -80
- package/dist/lib/node-esm/operation-resolver-7VD2YXSQ.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-7FZAE3S7.mjs +0 -52
- package/dist/lib/node-esm/react-surface-7FZAE3S7.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.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-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -6
- 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/index.ts +0 -7
- package/src/capabilities/markdown/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -77
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/types/capabilities.ts +0 -14
- /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/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/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.dfabb4ec29",
|
|
4
4
|
"description": "Braneframe sketch plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -12,28 +12,71 @@
|
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
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
|
+
"node": "./src/SheetPlugin.node.ts",
|
|
44
|
+
"default": "./src/SheetPlugin.tsx"
|
|
45
|
+
},
|
|
46
|
+
"types": "./dist/types/src/SheetPlugin.d.ts",
|
|
47
|
+
"node": "./dist/lib/neutral/SheetPlugin.node.mjs",
|
|
48
|
+
"default": "./dist/lib/neutral/SheetPlugin.mjs"
|
|
49
|
+
},
|
|
50
|
+
"#testing": "./src/testing/index.ts",
|
|
51
|
+
"#translations": {
|
|
52
|
+
"source": "./src/translations.ts",
|
|
53
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
54
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
55
|
+
},
|
|
56
|
+
"#types": {
|
|
57
|
+
"source": "./src/types/index.ts",
|
|
58
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
59
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
15
62
|
"exports": {
|
|
16
63
|
".": {
|
|
17
64
|
"source": "./src/index.ts",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"types": "./dist/types/src/index.d.ts"
|
|
65
|
+
"types": "./dist/types/src/index.d.ts",
|
|
66
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
21
67
|
},
|
|
22
|
-
"./
|
|
23
|
-
"source": "./src/
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
68
|
+
"./plugin": {
|
|
69
|
+
"source": "./src/plugin.ts",
|
|
70
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
71
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
72
|
+
},
|
|
73
|
+
"./translations": {
|
|
74
|
+
"source": "./src/translations.ts",
|
|
75
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
76
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
27
77
|
}
|
|
28
78
|
},
|
|
29
79
|
"types": "dist/types/src/index.d.ts",
|
|
30
|
-
"typesVersions": {
|
|
31
|
-
"*": {
|
|
32
|
-
"types": [
|
|
33
|
-
"dist/types/src/types/index.d.ts"
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
80
|
"files": [
|
|
38
81
|
"dist",
|
|
39
82
|
"src"
|
|
@@ -42,7 +85,7 @@
|
|
|
42
85
|
"@codemirror/autocomplete": "^6.19.0",
|
|
43
86
|
"@codemirror/language": "^6.11.3",
|
|
44
87
|
"@codemirror/state": "^6.5.2",
|
|
45
|
-
"@codemirror/view": "^6.38.
|
|
88
|
+
"@codemirror/view": "^6.38.5",
|
|
46
89
|
"@dnd-kit/core": "^6.0.5",
|
|
47
90
|
"@dnd-kit/modifiers": "^6.0.0",
|
|
48
91
|
"@dnd-kit/sortable": "^7.0.1",
|
|
@@ -53,51 +96,51 @@
|
|
|
53
96
|
"@lezer/lr": "^1.4.2",
|
|
54
97
|
"@radix-ui/react-context": "1.1.1",
|
|
55
98
|
"codemirror-lang-spreadsheet": "^1.3.0",
|
|
56
|
-
"date-fns": "^3.
|
|
99
|
+
"date-fns": "^3.6.0",
|
|
57
100
|
"lodash.defaultsdeep": "^4.6.1",
|
|
58
101
|
"re-resizable": "^6.9.17",
|
|
59
102
|
"react-markdown": "^10.1.0",
|
|
60
103
|
"react-resize-detector": "^11.0.1",
|
|
61
|
-
"@dxos/app-
|
|
62
|
-
"@dxos/app-
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/compute": "0.8.4-main.
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/echo": "0.8.4-main.
|
|
70
|
-
"@dxos/echo-db": "0.8.4-main.
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/invariant": "0.8.4-main.
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/log": "0.8.4-main.
|
|
77
|
-
"@dxos/plugin-attention": "0.8.4-main.
|
|
78
|
-
"@dxos/plugin-client": "0.8.4-main.
|
|
79
|
-
"@dxos/plugin-
|
|
80
|
-
"@dxos/plugin-
|
|
81
|
-
"@dxos/plugin-
|
|
82
|
-
"@dxos/plugin-
|
|
83
|
-
"@dxos/plugin-
|
|
84
|
-
"@dxos/plugin-space": "0.8.4-main.
|
|
85
|
-
"@dxos/plugin-stack": "0.8.4-main.
|
|
86
|
-
"@dxos/react-client": "0.8.4-main.
|
|
87
|
-
"@dxos/react-hooks": "0.8.4-main.
|
|
88
|
-
"@dxos/plugin-thread": "0.8.4-main.
|
|
89
|
-
"@dxos/react-ui-attention": "0.8.4-main.
|
|
90
|
-
"@dxos/react-ui-
|
|
91
|
-
"@dxos/react-ui-
|
|
92
|
-
"@dxos/react-ui-
|
|
93
|
-
"@dxos/react-ui-
|
|
94
|
-
"@dxos/react-ui-
|
|
95
|
-
"@dxos/react-ui-mosaic": "0.8.4-main.
|
|
96
|
-
"@dxos/react-ui-stack": "0.8.4-main.
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/ui-editor": "0.8.4-main.
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/
|
|
104
|
+
"@dxos/app-framework": "0.8.4-main.dfabb4ec29",
|
|
105
|
+
"@dxos/app-toolkit": "0.8.4-main.dfabb4ec29",
|
|
106
|
+
"@dxos/client": "0.8.4-main.dfabb4ec29",
|
|
107
|
+
"@dxos/compute": "0.8.4-main.dfabb4ec29",
|
|
108
|
+
"@dxos/compute-hyperformula": "0.8.4-main.dfabb4ec29",
|
|
109
|
+
"@dxos/crypto": "0.8.4-main.dfabb4ec29",
|
|
110
|
+
"@dxos/context": "0.8.4-main.dfabb4ec29",
|
|
111
|
+
"@dxos/debug": "0.8.4-main.dfabb4ec29",
|
|
112
|
+
"@dxos/echo": "0.8.4-main.dfabb4ec29",
|
|
113
|
+
"@dxos/echo-db": "0.8.4-main.dfabb4ec29",
|
|
114
|
+
"@dxos/echo-react": "0.8.4-main.dfabb4ec29",
|
|
115
|
+
"@dxos/invariant": "0.8.4-main.dfabb4ec29",
|
|
116
|
+
"@dxos/keys": "0.8.4-main.dfabb4ec29",
|
|
117
|
+
"@dxos/lit-grid": "0.8.4-main.dfabb4ec29",
|
|
118
|
+
"@dxos/async": "0.8.4-main.dfabb4ec29",
|
|
119
|
+
"@dxos/log": "0.8.4-main.dfabb4ec29",
|
|
120
|
+
"@dxos/plugin-attention": "0.8.4-main.dfabb4ec29",
|
|
121
|
+
"@dxos/plugin-client": "0.8.4-main.dfabb4ec29",
|
|
122
|
+
"@dxos/plugin-graph": "0.8.4-main.dfabb4ec29",
|
|
123
|
+
"@dxos/plugin-markdown": "0.8.4-main.dfabb4ec29",
|
|
124
|
+
"@dxos/plugin-deck": "0.8.4-main.dfabb4ec29",
|
|
125
|
+
"@dxos/plugin-script": "0.8.4-main.dfabb4ec29",
|
|
126
|
+
"@dxos/plugin-automation": "0.8.4-main.dfabb4ec29",
|
|
127
|
+
"@dxos/plugin-space": "0.8.4-main.dfabb4ec29",
|
|
128
|
+
"@dxos/plugin-stack": "0.8.4-main.dfabb4ec29",
|
|
129
|
+
"@dxos/react-client": "0.8.4-main.dfabb4ec29",
|
|
130
|
+
"@dxos/react-hooks": "0.8.4-main.dfabb4ec29",
|
|
131
|
+
"@dxos/plugin-thread": "0.8.4-main.dfabb4ec29",
|
|
132
|
+
"@dxos/react-ui-attention": "0.8.4-main.dfabb4ec29",
|
|
133
|
+
"@dxos/react-ui-editor": "0.8.4-main.dfabb4ec29",
|
|
134
|
+
"@dxos/react-ui-form": "0.8.4-main.dfabb4ec29",
|
|
135
|
+
"@dxos/react-ui-grid": "0.8.4-main.dfabb4ec29",
|
|
136
|
+
"@dxos/react-ui-menu": "0.8.4-main.dfabb4ec29",
|
|
137
|
+
"@dxos/react-ui-list": "0.8.4-main.dfabb4ec29",
|
|
138
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.dfabb4ec29",
|
|
139
|
+
"@dxos/react-ui-stack": "0.8.4-main.dfabb4ec29",
|
|
140
|
+
"@dxos/schema": "0.8.4-main.dfabb4ec29",
|
|
141
|
+
"@dxos/ui-editor": "0.8.4-main.dfabb4ec29",
|
|
142
|
+
"@dxos/util": "0.8.4-main.dfabb4ec29",
|
|
143
|
+
"@dxos/types": "0.8.4-main.dfabb4ec29"
|
|
101
144
|
},
|
|
102
145
|
"devDependencies": {
|
|
103
146
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -107,29 +150,29 @@
|
|
|
107
150
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
108
151
|
"@types/react": "~19.2.7",
|
|
109
152
|
"@types/react-dom": "~19.2.3",
|
|
110
|
-
"effect": "3.
|
|
153
|
+
"effect": "3.20.0",
|
|
111
154
|
"react": "~19.2.3",
|
|
112
155
|
"react-dom": "~19.2.3",
|
|
113
|
-
"vite": "^
|
|
114
|
-
"@dxos/echo-generator": "0.8.4-main.
|
|
115
|
-
"@dxos/lit-grid": "0.8.4-main.
|
|
116
|
-
"@dxos/
|
|
117
|
-
"@dxos/
|
|
118
|
-
"@dxos/
|
|
119
|
-
"@dxos/
|
|
120
|
-
"@dxos/
|
|
121
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
122
|
-
"@dxos/
|
|
123
|
-
"@dxos/ui-types": "0.8.4-main.
|
|
156
|
+
"vite": "^8.0.10",
|
|
157
|
+
"@dxos/echo-generator": "0.8.4-main.dfabb4ec29",
|
|
158
|
+
"@dxos/lit-grid": "0.8.4-main.dfabb4ec29",
|
|
159
|
+
"@dxos/plugin-testing": "0.8.4-main.dfabb4ec29",
|
|
160
|
+
"@dxos/random": "0.8.4-main.dfabb4ec29",
|
|
161
|
+
"@dxos/react-ui": "0.8.4-main.dfabb4ec29",
|
|
162
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.dfabb4ec29",
|
|
163
|
+
"@dxos/storybook-utils": "0.8.4-main.dfabb4ec29",
|
|
164
|
+
"@dxos/ui-theme": "0.8.4-main.dfabb4ec29",
|
|
165
|
+
"@dxos/test-utils": "0.8.4-main.dfabb4ec29",
|
|
166
|
+
"@dxos/ui-types": "0.8.4-main.dfabb4ec29"
|
|
124
167
|
},
|
|
125
168
|
"peerDependencies": {
|
|
126
169
|
"@effect-atom/atom-react": "^0.5.0",
|
|
127
170
|
"@effect/platform": "0.94.4",
|
|
128
|
-
"effect": "3.
|
|
171
|
+
"effect": "3.20.0",
|
|
129
172
|
"react": "~19.2.3",
|
|
130
173
|
"react-dom": "~19.2.3",
|
|
131
|
-
"@dxos/ui
|
|
132
|
-
"@dxos/
|
|
174
|
+
"@dxos/react-ui": "0.8.4-main.dfabb4ec29",
|
|
175
|
+
"@dxos/ui-theme": "0.8.4-main.dfabb4ec29"
|
|
133
176
|
},
|
|
134
177
|
"publishConfig": {
|
|
135
178
|
"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.SetupOperationHandler);
|
|
26
|
+
expect(harness.manager.getActive()).toEqual(
|
|
27
|
+
expect.arrayContaining([moduleId('OperationHandler'), moduleId('UndoMappings')]),
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
});
|
package/src/SheetPlugin.tsx
CHANGED
|
@@ -2,54 +2,42 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
import { ActivationEvent, Capability, Plugin } from '@dxos/app-framework';
|
|
5
|
+
import { ActivationEvent, Plugin } from '@dxos/app-framework';
|
|
8
6
|
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
9
|
-
import { Operation } from '@dxos/operation';
|
|
10
7
|
import { AutomationEvents } from '@dxos/plugin-automation';
|
|
11
8
|
import { ClientEvents } from '@dxos/plugin-client';
|
|
12
9
|
import { MarkdownEvents } from '@dxos/plugin-markdown';
|
|
13
|
-
import { SpaceCapabilities, SpaceEvents } from '@dxos/plugin-space';
|
|
14
|
-
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
15
10
|
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
import {
|
|
12
|
+
AnchorSort,
|
|
13
|
+
CommentConfig,
|
|
14
|
+
ComputeGraphRegistry,
|
|
15
|
+
CreateObject,
|
|
16
|
+
Markdown,
|
|
17
|
+
OperationHandler,
|
|
18
|
+
UndoMappings,
|
|
19
|
+
ReactSurface,
|
|
20
|
+
SheetState,
|
|
21
|
+
} from '#capabilities';
|
|
22
|
+
import { meta } from '#meta';
|
|
23
|
+
import { translations } from '#translations';
|
|
24
|
+
import { Sheet } from '#types';
|
|
21
25
|
|
|
22
26
|
export const SheetPlugin = Plugin.define(meta).pipe(
|
|
23
|
-
AppPlugin.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
label: (object: Sheet.Sheet) => object.name,
|
|
28
|
-
icon: 'ph--grid-nine--regular',
|
|
29
|
-
iconHue: 'indigo',
|
|
30
|
-
serializer,
|
|
31
|
-
comments: 'anchored',
|
|
32
|
-
createObject: ((props) => Effect.sync(() => Sheet.make(props))) satisfies CreateObject,
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
}),
|
|
36
|
-
AppPlugin.addOperationResolverModule({ activate: OperationResolver }),
|
|
27
|
+
AppPlugin.addCommentConfigModule({ activate: CommentConfig }),
|
|
28
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
29
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
30
|
+
AppPlugin.addUndoMappingsModule({ activate: UndoMappings }),
|
|
37
31
|
AppPlugin.addSchemaModule({ schema: [Sheet.Sheet] }),
|
|
38
32
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
39
33
|
AppPlugin.addTranslationsModule({ translations }),
|
|
40
34
|
Plugin.addModule({
|
|
41
|
-
activatesOn:
|
|
42
|
-
activate:
|
|
35
|
+
activatesOn: AppActivationEvents.SetupSettings,
|
|
36
|
+
activate: SheetState,
|
|
43
37
|
}),
|
|
44
38
|
Plugin.addModule({
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
activate: () =>
|
|
48
|
-
Effect.succeed(
|
|
49
|
-
Capability.contributes(SpaceCapabilities.OnCreateSpace, (params) =>
|
|
50
|
-
Operation.invoke(SheetOperation.OnCreateSpace, params),
|
|
51
|
-
),
|
|
52
|
-
),
|
|
39
|
+
activatesOn: ActivationEvent.allOf(ClientEvents.ClientReady, AutomationEvents.ComputeRuntimeReady),
|
|
40
|
+
activate: ComputeGraphRegistry,
|
|
53
41
|
}),
|
|
54
42
|
Plugin.addModule({
|
|
55
43
|
activatesOn: MarkdownEvents.SetupExtensions,
|
|
@@ -62,3 +50,5 @@ export const SheetPlugin = Plugin.define(meta).pipe(
|
|
|
62
50
|
}),
|
|
63
51
|
Plugin.make,
|
|
64
52
|
);
|
|
53
|
+
|
|
54
|
+
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
|
+
);
|
|
@@ -7,7 +7,7 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
8
|
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
9
9
|
|
|
10
|
-
import { SheetCapabilities } from '
|
|
10
|
+
import { SheetCapabilities } from '#types';
|
|
11
11
|
|
|
12
12
|
// Locally declare the Automation ComputeRuntime capability by ID to avoid direct import dependency.
|
|
13
13
|
|
|
@@ -16,7 +16,9 @@ export default Capability.makeModule(
|
|
|
16
16
|
const computeRuntimeResolver = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
|
|
17
17
|
// TODO(wittjosiah): This can probably be a module level import now due to lazy capability loading.
|
|
18
18
|
// Async import removes direct dependency on hyperformula.
|
|
19
|
-
const { defaultPlugins, ComputeGraphRegistry } = yield* Effect.tryPromise(
|
|
19
|
+
const { defaultPlugins, ComputeGraphRegistry } = yield* Effect.tryPromise(
|
|
20
|
+
() => import('@dxos/compute-hyperformula'),
|
|
21
|
+
);
|
|
20
22
|
const computeGraphRegistry = new ComputeGraphRegistry({
|
|
21
23
|
plugins: defaultPlugins,
|
|
22
24
|
computeRuntime: computeRuntimeResolver,
|
|
@@ -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,8 +2,20 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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* () {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
9
|
+
|
|
10
|
+
import { SheetOperationHandlerSet } from '#operations';
|
|
11
|
+
|
|
12
|
+
export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
|
|
13
|
+
Effect.fnUntraced(function* () {
|
|
14
|
+
return Capability.contributes(Capabilities.OperationHandler, SheetOperationHandlerSet);
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
@@ -7,21 +7,24 @@ 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, SheetContainer } from '
|
|
14
|
-
import {
|
|
15
|
-
import { Sheet, SheetCapabilities } from '../../types';
|
|
14
|
+
import { RangeList, SheetContainer } 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
|
-
filter: (data): data is { subject: Sheet.Sheet } =>
|
|
24
|
-
|
|
24
|
+
filter: (data): data is { attendableId: string; subject: Sheet.Sheet } =>
|
|
25
|
+
typeof data.attendableId === 'string' &&
|
|
26
|
+
Obj.instanceOf(Sheet.Sheet, data.subject) &&
|
|
27
|
+
!!getSpace(data.subject),
|
|
25
28
|
component: ({ data, role }) => {
|
|
26
29
|
const computeGraphRegistry = useCapability(SheetCapabilities.ComputeGraphRegistry);
|
|
27
30
|
|
|
@@ -29,6 +32,7 @@ export default Capability.makeModule(() =>
|
|
|
29
32
|
<SheetContainer
|
|
30
33
|
role={role}
|
|
31
34
|
subject={data.subject}
|
|
35
|
+
attendableId={data.attendableId}
|
|
32
36
|
space={getSpace(data.subject)!}
|
|
33
37
|
registry={computeGraphRegistry}
|
|
34
38
|
/>
|
|
@@ -36,9 +40,8 @@ export default Capability.makeModule(() =>
|
|
|
36
40
|
},
|
|
37
41
|
}),
|
|
38
42
|
Surface.create({
|
|
39
|
-
id:
|
|
40
|
-
|
|
41
|
-
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),
|
|
42
45
|
component: ({ data }) => <RangeList sheet={data.subject} />,
|
|
43
46
|
}),
|
|
44
47
|
]),
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
|
|
9
|
+
import { SheetCapabilities } from '#types';
|
|
10
|
+
|
|
11
|
+
const createGridRegistry = (): SheetCapabilities.GridRegistry => {
|
|
12
|
+
const grids = new Map<string, SheetCapabilities.GridEntry>();
|
|
13
|
+
return {
|
|
14
|
+
register: (attendableId, grid, setActiveRefs) => {
|
|
15
|
+
grids.set(attendableId, { grid, setActiveRefs });
|
|
16
|
+
},
|
|
17
|
+
unregister: (attendableId) => {
|
|
18
|
+
grids.delete(attendableId);
|
|
19
|
+
},
|
|
20
|
+
get: (attendableId) => grids.get(attendableId),
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default Capability.makeModule(
|
|
25
|
+
Effect.fnUntraced(function* () {
|
|
26
|
+
const gridInstances = createGridRegistry();
|
|
27
|
+
return Capability.contributes(SheetCapabilities.GridInstances, gridInstances);
|
|
28
|
+
}),
|
|
29
|
+
);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability, UndoMapping } from '@dxos/app-framework';
|
|
8
|
+
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { SheetOperation } from '#types';
|
|
11
|
+
|
|
12
|
+
export default Capability.makeModule(() =>
|
|
13
|
+
Effect.succeed(
|
|
14
|
+
Capability.contributes(Capabilities.UndoMapping, [
|
|
15
|
+
UndoMapping.make({
|
|
16
|
+
operation: SheetOperation.DropAxis,
|
|
17
|
+
inverse: SheetOperation.RestoreAxis,
|
|
18
|
+
deriveContext: (input, output) => ({
|
|
19
|
+
model: input.model,
|
|
20
|
+
axis: output.axis,
|
|
21
|
+
axisIndex: output.axisIndex,
|
|
22
|
+
index: output.index,
|
|
23
|
+
axisMeta: output.axisMeta,
|
|
24
|
+
values: output.values,
|
|
25
|
+
}),
|
|
26
|
+
message: ['axis-dropped.label', { ns: meta.id }],
|
|
27
|
+
}),
|
|
28
|
+
]),
|
|
29
|
+
),
|
|
30
|
+
);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { type PropsWithChildren, createContext, useContext } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type ComputeGraph, type ComputeGraphRegistry } from '@dxos/compute';
|
|
7
|
+
import { type ComputeGraph, type ComputeGraphRegistry } from '@dxos/compute-hyperformula';
|
|
8
8
|
import { raise } from '@dxos/debug';
|
|
9
9
|
import { type Space } from '@dxos/react-client/echo';
|
|
10
10
|
import { useAsyncState } from '@dxos/react-hooks';
|