@dxos/plugin-sheet 0.8.4-main.dedc0f3 → 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/neutral/RangeList-HYB5S6KQ.mjs +46 -0
- 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/neutral/anchor-sort-TTCKGX7V.mjs +22 -0
- 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-SSN4HYJL.mjs → neutral/chunk-4SBAIU6F.mjs} +19 -19
- package/dist/lib/neutral/chunk-4SBAIU6F.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-KC2SMDNF.mjs +373 -0
- 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/neutral/components/index.mjs +1551 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/compute-graph-registry-IEQBF5XZ.mjs +20 -0
- 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/{node-esm/types → neutral}/index.mjs +16 -13
- package/dist/lib/neutral/insert-axis-ZFFNG22G.mjs +16 -0
- package/dist/lib/neutral/insert-axis-ZFFNG22G.mjs.map +7 -0
- package/dist/lib/neutral/markdown-I2AKJYPF.mjs +28 -0
- 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/neutral/react-surface-ID4JCAFR.mjs +44 -0
- 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/{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/capabilities/anchor-sort.d.ts +4 -4
- package/dist/types/src/capabilities/anchor-sort.d.ts.map +1 -1
- 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 +3 -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 +23 -9
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts +3 -2
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
- 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 +0 -1
- 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/{GridSheet → SheetContent}/SheetCellEditor.stories.d.ts +2 -3
- 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 +73 -68
- 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/SheetContainer/SheetContainer.d.ts +12 -0
- package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts.map +1 -0
- package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts +92 -0
- package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/SheetContainer/index.d.ts +2 -0
- package/dist/types/src/containers/SheetContainer/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 +1 -1
- package/dist/types/src/extensions/compute.d.ts.map +1 -1
- package/dist/types/src/extensions/compute.stories.d.ts +2 -3
- 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/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/model/sheet-model.d.ts +7 -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/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 +76 -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 +131 -81
- package/src/SheetPlugin.node.ts +21 -0
- package/src/SheetPlugin.test.ts +30 -0
- package/src/SheetPlugin.tsx +46 -68
- package/src/capabilities/anchor-sort.ts +20 -15
- package/src/capabilities/comment-config.ts +24 -0
- package/src/capabilities/compute-graph-registry.ts +21 -20
- package/src/capabilities/create-object.ts +30 -0
- package/src/capabilities/index.ts +16 -8
- package/src/capabilities/markdown.ts +21 -13
- 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 +23 -22
- package/src/components/Sheet/Sheet.tsx +20 -0
- package/src/components/Sheet/index.ts +5 -0
- package/src/components/{GridSheet → SheetContent}/SheetCellEditor.stories.tsx +18 -15
- package/src/components/SheetContent/SheetContent.stories.tsx +60 -0
- package/src/components/{GridSheet/GridSheet.tsx → SheetContent/SheetContent.tsx} +84 -54
- 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} +19 -7
- package/src/components/{FunctionEditor → SheetStatusbar}/index.ts +1 -1
- package/src/components/SheetToolbar/SheetToolbar.stories.tsx +11 -8
- package/src/components/SheetToolbar/SheetToolbar.tsx +51 -46
- 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/SheetContainer/SheetContainer.stories.tsx +110 -0
- package/src/containers/SheetContainer/SheetContainer.tsx +57 -0
- package/src/containers/SheetContainer/index.ts +5 -0
- package/src/containers/index.ts +8 -0
- package/src/extensions/compute.stories.tsx +38 -25
- package/src/extensions/compute.ts +2 -2
- package/src/extensions/editor/sheet-extension.test.ts +1 -1
- package/src/extensions/editor/sheet-extension.ts +18 -15
- package/src/index.ts +2 -2
- package/src/integrations/thread-ranges.ts +19 -61
- package/src/meta.ts +9 -7
- package/src/model/sheet-model.test.ts +6 -6
- package/src/model/sheet-model.ts +82 -50
- 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/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 +5 -3
- package/src/serializer.ts +5 -5
- package/src/testing/data.ts +2 -2
- package/src/testing/testing.tsx +13 -7
- package/src/translations.ts +42 -36
- package/src/types/Sheet.ts +103 -0
- package/src/types/SheetCapabilities.ts +26 -0
- package/src/types/SheetOperation.ts +75 -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 +12 -39
- package/dist/lib/browser/SheetContainer-OUN6AARA.mjs +0 -350
- package/dist/lib/browser/SheetContainer-OUN6AARA.mjs.map +0 -7
- package/dist/lib/browser/anchor-sort-7WD2VGXW.mjs +0 -24
- package/dist/lib/browser/anchor-sort-7WD2VGXW.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-KJWZUQVA.mjs +0 -15
- package/dist/lib/browser/chunk-KJWZUQVA.mjs.map +0 -7
- package/dist/lib/browser/chunk-SSN4HYJL.mjs.map +0 -7
- package/dist/lib/browser/chunk-X4EWLDT3.mjs +0 -851
- package/dist/lib/browser/chunk-X4EWLDT3.mjs.map +0 -7
- package/dist/lib/browser/chunk-XSXUU6FO.mjs +0 -906
- package/dist/lib/browser/chunk-XSXUU6FO.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-ROEY4LHM.mjs +0 -56
- package/dist/lib/browser/intent-resolver-ROEY4LHM.mjs.map +0 -7
- package/dist/lib/browser/markdown-VOY636TS.mjs +0 -26
- package/dist/lib/browser/markdown-VOY636TS.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-XCNAVF2M.mjs +0 -53
- package/dist/lib/browser/react-surface-XCNAVF2M.mjs.map +0 -7
- package/dist/lib/node-esm/SheetContainer-NFLLTGNV.mjs +0 -351
- package/dist/lib/node-esm/SheetContainer-NFLLTGNV.mjs.map +0 -7
- package/dist/lib/node-esm/anchor-sort-ACQDUIPU.mjs +0 -25
- package/dist/lib/node-esm/anchor-sort-ACQDUIPU.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-6SK5LJ5S.mjs +0 -16
- package/dist/lib/node-esm/chunk-6SK5LJ5S.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IK4O7FUJ.mjs +0 -236
- package/dist/lib/node-esm/chunk-IK4O7FUJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ODP4L4OV.mjs +0 -907
- package/dist/lib/node-esm/chunk-ODP4L4OV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PYF4ZJXN.mjs +0 -852
- package/dist/lib/node-esm/chunk-PYF4ZJXN.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-HESRI2ML.mjs +0 -57
- package/dist/lib/node-esm/intent-resolver-HESRI2ML.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-P4CLZ24C.mjs +0 -27
- package/dist/lib/node-esm/markdown-P4CLZ24C.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-KE3EEVF4.mjs +0 -54
- package/dist/lib/node-esm/react-surface-KE3EEVF4.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/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 -54
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +0 -1
- package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/GridSheet/index.d.ts +0 -2
- package/dist/types/src/components/GridSheet/index.d.ts.map +0 -1
- package/dist/types/src/components/GridSheet/util.d.ts.map +0 -1
- package/dist/types/src/components/RangeList/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 -55
- 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/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/components/GridSheet/GridSheet.stories.tsx +0 -56
- package/src/components/RangeList/RangeList.tsx +0 -60
- package/src/components/SheetContainer/SheetContainer.stories.tsx +0 -92
- 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,44 +1,91 @@
|
|
|
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",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
7
11
|
"license": "MIT",
|
|
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
|
+
"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
|
+
},
|
|
11
62
|
"exports": {
|
|
12
63
|
".": {
|
|
13
64
|
"source": "./src/index.ts",
|
|
14
65
|
"types": "./dist/types/src/index.d.ts",
|
|
15
|
-
"
|
|
16
|
-
"node": "./dist/lib/node-esm/index.mjs"
|
|
66
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
17
67
|
},
|
|
18
|
-
"./
|
|
19
|
-
"source": "./src/
|
|
20
|
-
"types": "./dist/types/src/
|
|
21
|
-
"
|
|
22
|
-
|
|
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"
|
|
23
77
|
}
|
|
24
78
|
},
|
|
25
79
|
"types": "dist/types/src/index.d.ts",
|
|
26
|
-
"typesVersions": {
|
|
27
|
-
"*": {
|
|
28
|
-
"types": [
|
|
29
|
-
"dist/types/src/types/index.d.ts"
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
80
|
"files": [
|
|
34
81
|
"dist",
|
|
35
82
|
"src"
|
|
36
83
|
],
|
|
37
84
|
"dependencies": {
|
|
38
|
-
"@codemirror/autocomplete": "^6.
|
|
85
|
+
"@codemirror/autocomplete": "^6.19.0",
|
|
39
86
|
"@codemirror/language": "^6.11.3",
|
|
40
87
|
"@codemirror/state": "^6.5.2",
|
|
41
|
-
"@codemirror/view": "^6.38.
|
|
88
|
+
"@codemirror/view": "^6.38.5",
|
|
42
89
|
"@dnd-kit/core": "^6.0.5",
|
|
43
90
|
"@dnd-kit/modifiers": "^6.0.0",
|
|
44
91
|
"@dnd-kit/sortable": "^7.0.1",
|
|
@@ -47,82 +94,85 @@
|
|
|
47
94
|
"@lezer/highlight": "^1.2.1",
|
|
48
95
|
"@lezer/lezer": "^1.1.2",
|
|
49
96
|
"@lezer/lr": "^1.4.2",
|
|
50
|
-
"@preact-signals/safe-react": "^0.9.0",
|
|
51
|
-
"@preact/signals-core": "^1.9.0",
|
|
52
97
|
"@radix-ui/react-context": "1.1.1",
|
|
53
98
|
"codemirror-lang-spreadsheet": "^1.3.0",
|
|
54
|
-
"date-fns": "^3.
|
|
99
|
+
"date-fns": "^3.6.0",
|
|
55
100
|
"lodash.defaultsdeep": "^4.6.1",
|
|
56
101
|
"re-resizable": "^6.9.17",
|
|
57
|
-
"react-markdown": "^
|
|
102
|
+
"react-markdown": "^10.1.0",
|
|
58
103
|
"react-resize-detector": "^11.0.1",
|
|
59
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/client": "0.8.4-main.
|
|
62
|
-
"@dxos/compute": "0.8.4-main.
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/crypto": "0.8.4-main.
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/echo
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/plugin-
|
|
76
|
-
"@dxos/plugin-
|
|
77
|
-
"@dxos/plugin-
|
|
78
|
-
"@dxos/plugin-
|
|
79
|
-
"@dxos/plugin-
|
|
80
|
-
"@dxos/plugin-script": "0.8.4-main.
|
|
81
|
-
"@dxos/plugin-
|
|
82
|
-
"@dxos/plugin-
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/react-
|
|
85
|
-
"@dxos/react-
|
|
86
|
-
"@dxos/
|
|
87
|
-
"@dxos/react-ui-
|
|
88
|
-
"@dxos/react-ui-
|
|
89
|
-
"@dxos/react-ui-
|
|
90
|
-
"@dxos/react-ui-
|
|
91
|
-
"@dxos/
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/react-ui-
|
|
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"
|
|
94
144
|
},
|
|
95
145
|
"devDependencies": {
|
|
96
|
-
"@effect-
|
|
97
|
-
"@effect/platform": "0.
|
|
146
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
147
|
+
"@effect/platform": "0.94.4",
|
|
98
148
|
"@lezer/generator": "^1.7.1",
|
|
99
149
|
"@tldraw/indices": "^2.0.0-alpha.14",
|
|
100
150
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
101
|
-
"@types/react": "~
|
|
102
|
-
"@types/react-dom": "~
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"react": "~
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"@dxos/
|
|
109
|
-
"@dxos/
|
|
110
|
-
"@dxos/
|
|
111
|
-
"@dxos/
|
|
112
|
-
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.
|
|
113
|
-
"@dxos/
|
|
114
|
-
"@dxos/
|
|
115
|
-
"@dxos/
|
|
116
|
-
"@dxos/
|
|
151
|
+
"@types/react": "~19.2.7",
|
|
152
|
+
"@types/react-dom": "~19.2.3",
|
|
153
|
+
"effect": "3.20.0",
|
|
154
|
+
"react": "~19.2.3",
|
|
155
|
+
"react-dom": "~19.2.3",
|
|
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"
|
|
117
167
|
},
|
|
118
168
|
"peerDependencies": {
|
|
119
|
-
"@effect-
|
|
120
|
-
"@effect/platform": "
|
|
121
|
-
"effect": "
|
|
122
|
-
"react": "~
|
|
123
|
-
"react-dom": "~
|
|
124
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
125
|
-
"@dxos/
|
|
169
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
170
|
+
"@effect/platform": "0.94.4",
|
|
171
|
+
"effect": "3.20.0",
|
|
172
|
+
"react": "~19.2.3",
|
|
173
|
+
"react-dom": "~19.2.3",
|
|
174
|
+
"@dxos/react-ui": "0.8.4-main.dfabb4ec29",
|
|
175
|
+
"@dxos/ui-theme": "0.8.4-main.dfabb4ec29"
|
|
126
176
|
},
|
|
127
177
|
"publishConfig": {
|
|
128
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,75 +2,53 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { ActivationEvent, Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
+
import { AutomationEvents } from '@dxos/plugin-automation';
|
|
6
8
|
import { ClientEvents } from '@dxos/plugin-client';
|
|
7
9
|
import { MarkdownEvents } from '@dxos/plugin-markdown';
|
|
8
|
-
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
9
|
-
import { defineObjectForm } from '@dxos/plugin-space/types';
|
|
10
10
|
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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';
|
|
16
25
|
|
|
17
|
-
export const SheetPlugin = ()
|
|
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
|
-
activate: () =>
|
|
47
|
-
contributes(
|
|
48
|
-
SpaceCapabilities.ObjectForm,
|
|
49
|
-
defineObjectForm({
|
|
50
|
-
objectSchema: SheetType,
|
|
51
|
-
getIntent: (props, options) => createIntent(SheetAction.Create, { ...props, space: options.space }),
|
|
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
|
-
]);
|
|
26
|
+
export const SheetPlugin = Plugin.define(meta).pipe(
|
|
27
|
+
AppPlugin.addCommentConfigModule({ activate: CommentConfig }),
|
|
28
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
29
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
30
|
+
AppPlugin.addUndoMappingsModule({ activate: UndoMappings }),
|
|
31
|
+
AppPlugin.addSchemaModule({ schema: [Sheet.Sheet] }),
|
|
32
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
33
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
34
|
+
Plugin.addModule({
|
|
35
|
+
activatesOn: AppActivationEvents.SetupSettings,
|
|
36
|
+
activate: SheetState,
|
|
37
|
+
}),
|
|
38
|
+
Plugin.addModule({
|
|
39
|
+
activatesOn: ActivationEvent.allOf(ClientEvents.ClientReady, AutomationEvents.ComputeRuntimeReady),
|
|
40
|
+
activate: ComputeGraphRegistry,
|
|
41
|
+
}),
|
|
42
|
+
Plugin.addModule({
|
|
43
|
+
activatesOn: MarkdownEvents.SetupExtensions,
|
|
44
|
+
activate: Markdown,
|
|
45
|
+
}),
|
|
46
|
+
Plugin.addModule({
|
|
47
|
+
// TODO(wittjosiah): More relevant event?
|
|
48
|
+
activatesOn: AppActivationEvents.AppGraphReady,
|
|
49
|
+
activate: AnchorSort,
|
|
50
|
+
}),
|
|
51
|
+
Plugin.make,
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
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 } 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: Sheet.Sheet.typename,
|
|
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,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
|
+
);
|
|
@@ -2,27 +2,28 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
7
6
|
|
|
8
|
-
import {
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
return protocol === 'https:' || protocol === 'wss:';
|
|
12
|
-
};
|
|
10
|
+
import { SheetCapabilities } from '#types';
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
const client = context.getCapability(ClientCapabilities.Client);
|
|
16
|
-
let remoteFunctionUrl: string | undefined;
|
|
17
|
-
if (client.config.values.runtime?.services?.edge?.url) {
|
|
18
|
-
const url = new URL('/functions', client.config.values.runtime?.services?.edge?.url);
|
|
19
|
-
url.protocol = isSecure(url.protocol) ? 'https' : 'http';
|
|
20
|
-
remoteFunctionUrl = url.toString();
|
|
21
|
-
}
|
|
12
|
+
// Locally declare the Automation ComputeRuntime capability by ID to avoid direct import dependency.
|
|
22
13
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
14
|
+
export default Capability.makeModule(
|
|
15
|
+
Effect.fnUntraced(function* () {
|
|
16
|
+
const computeRuntimeResolver = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
|
|
17
|
+
// TODO(wittjosiah): This can probably be a module level import now due to lazy capability loading.
|
|
18
|
+
// Async import removes direct dependency on hyperformula.
|
|
19
|
+
const { defaultPlugins, ComputeGraphRegistry } = yield* Effect.tryPromise(
|
|
20
|
+
() => import('@dxos/compute-hyperformula'),
|
|
21
|
+
);
|
|
22
|
+
const computeGraphRegistry = new ComputeGraphRegistry({
|
|
23
|
+
plugins: defaultPlugins,
|
|
24
|
+
computeRuntime: computeRuntimeResolver,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
return Capability.contributes(SheetCapabilities.ComputeGraphRegistry, computeGraphRegistry);
|
|
28
|
+
}),
|
|
29
|
+
);
|
|
@@ -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,12 +2,20 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
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';
|
|
6
9
|
|
|
7
|
-
export const AnchorSort = lazy(() => import('./anchor-sort'));
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
11
|
-
export const
|
|
12
|
-
|
|
13
|
-
|
|
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'));
|