@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
|
@@ -2,22 +2,30 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
8
|
import { getSpace } from '@dxos/client/echo';
|
|
7
9
|
import { MarkdownCapabilities } from '@dxos/plugin-markdown';
|
|
8
10
|
|
|
11
|
+
import { SheetCapabilities } from '#types';
|
|
12
|
+
|
|
9
13
|
import { computeGraphFacet } from '../extensions';
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
export default Capability.makeModule(
|
|
16
|
+
Effect.fnUntraced(function* () {
|
|
17
|
+
// Get context for lazy capability access in callbacks.
|
|
18
|
+
const capabilities = yield* Capability.Service;
|
|
12
19
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
return Capability.contributes(MarkdownCapabilities.Extensions, [
|
|
21
|
+
({ document: doc }) => {
|
|
22
|
+
const computeGraphRegistry = capabilities.get(SheetCapabilities.ComputeGraphRegistry);
|
|
23
|
+
const space = getSpace(doc);
|
|
24
|
+
if (space) {
|
|
25
|
+
const computeGraph = computeGraphRegistry.getOrCreateGraph(space);
|
|
26
|
+
return computeGraphFacet.of(computeGraph);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
]);
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
@@ -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
|
+
);
|
|
@@ -2,39 +2,48 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
|
|
7
|
-
import { Capabilities,
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface, useCapability } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
8
11
|
import { Obj } from '@dxos/echo';
|
|
9
12
|
import { getSpace } from '@dxos/react-client/echo';
|
|
10
13
|
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { SheetType } from '../types';
|
|
14
|
+
import { RangeList, SheetContainer } from '#containers';
|
|
15
|
+
import { Sheet, SheetCapabilities } from '#types';
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
export default Capability.makeModule(() =>
|
|
18
|
+
Effect.succeed(
|
|
19
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
20
|
+
Surface.create({
|
|
21
|
+
id: 'sheet',
|
|
22
|
+
// TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
|
|
23
|
+
role: ['article', 'section'],
|
|
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),
|
|
28
|
+
component: ({ data, role }) => {
|
|
29
|
+
const computeGraphRegistry = useCapability(SheetCapabilities.ComputeGraphRegistry);
|
|
16
30
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
)
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
role: 'object-settings',
|
|
37
|
-
filter: (data): data is { subject: SheetType } => Obj.instanceOf(SheetType, data.subject),
|
|
38
|
-
component: ({ data }) => <RangeList sheet={data.subject} />,
|
|
39
|
-
}),
|
|
40
|
-
]);
|
|
31
|
+
return (
|
|
32
|
+
<SheetContainer
|
|
33
|
+
role={role}
|
|
34
|
+
subject={data.subject}
|
|
35
|
+
attendableId={data.attendableId}
|
|
36
|
+
space={getSpace(data.subject)!}
|
|
37
|
+
registry={computeGraphRegistry}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
},
|
|
41
|
+
}),
|
|
42
|
+
Surface.create({
|
|
43
|
+
id: 'object-properties',
|
|
44
|
+
filter: AppSurface.object(AppSurface.ObjectProperties, Sheet.Sheet),
|
|
45
|
+
component: ({ data }) => <RangeList sheet={data.subject} />,
|
|
46
|
+
}),
|
|
47
|
+
]),
|
|
48
|
+
),
|
|
49
|
+
);
|
|
@@ -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';
|
|
@@ -2,38 +2,37 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React, { useEffect, useRef, useState } from 'react';
|
|
9
7
|
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
import { testFunctionPlugins } from '@dxos/compute-hyperformula/testing';
|
|
10
|
+
import { Filter } from '@dxos/echo';
|
|
11
|
+
import { Obj } from '@dxos/echo';
|
|
12
|
+
import { useSpaces } from '@dxos/react-client/echo';
|
|
14
13
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
15
14
|
import { Button, Input, Toolbar } from '@dxos/react-ui';
|
|
16
|
-
import {
|
|
17
|
-
import { withTheme } from '@dxos/
|
|
15
|
+
import { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';
|
|
16
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
18
17
|
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { SheetType, createSheet } from '../../types';
|
|
18
|
+
import { withComputeGraphDecorator } from '#testing';
|
|
19
|
+
import { Sheet } from '#types';
|
|
22
20
|
|
|
21
|
+
import { useSheetModel } from '../../model';
|
|
23
22
|
import { useComputeGraph } from './ComputeGraphContextProvider';
|
|
24
23
|
|
|
25
24
|
const FUNCTION_NAME = 'TEST';
|
|
26
25
|
|
|
27
26
|
const DefaultStory = () => {
|
|
28
|
-
const space =
|
|
27
|
+
const [space] = useSpaces();
|
|
29
28
|
const graph = useComputeGraph(space);
|
|
30
|
-
const [sheet, setSheet] = useState<
|
|
29
|
+
const [sheet, setSheet] = useState<Sheet.Sheet>();
|
|
31
30
|
const [text, setText] = useState(`${FUNCTION_NAME}(100)`);
|
|
32
31
|
const [result, setResult] = useState<any>();
|
|
33
32
|
const model = useSheetModel(graph, sheet);
|
|
34
33
|
useEffect(() => {
|
|
35
34
|
if (space) {
|
|
36
|
-
const sheet = space.db.add(
|
|
35
|
+
const sheet = space.db.add(Sheet.make());
|
|
37
36
|
setSheet(sheet);
|
|
38
37
|
}
|
|
39
38
|
}, [space]);
|
|
@@ -46,14 +45,14 @@ const DefaultStory = () => {
|
|
|
46
45
|
setResult({ functions: { standard: f1.length, echo: f2.length } });
|
|
47
46
|
});
|
|
48
47
|
|
|
49
|
-
space.db.add(Obj.make(
|
|
48
|
+
space.db.add(Obj.make(Operation.PersistentOperation, { name: 'test', version: '0.0.1', binding: FUNCTION_NAME }));
|
|
50
49
|
}
|
|
51
50
|
}, [space, graph]);
|
|
52
51
|
|
|
53
52
|
const inputRef = useRef<HTMLInputElement | null>(null);
|
|
54
53
|
const handleTest = async () => {
|
|
55
54
|
if (space && graph) {
|
|
56
|
-
const
|
|
55
|
+
const objects = await space.db.query(Filter.type(Operation.PersistentOperation)).run();
|
|
57
56
|
const mapped = graph.mapFunctionBindingToId(text);
|
|
58
57
|
const unmapped = graph.mapFunctionBindingFromId(mapped);
|
|
59
58
|
const internal = graph.mapFormulaToNative(text);
|
|
@@ -76,9 +75,7 @@ const DefaultStory = () => {
|
|
|
76
75
|
</Input.Root>
|
|
77
76
|
<Button onClick={handleTest}>Test</Button>
|
|
78
77
|
</Toolbar.Root>
|
|
79
|
-
<
|
|
80
|
-
{JSON.stringify({ space: space?.id, graph: graph?.id, sheet: sheet?.id, model: model?.id, result }, null, 2)}
|
|
81
|
-
</SyntaxHighlighter>
|
|
78
|
+
<JsonHighlighter data={{ space: space?.id, graph: graph?.id, sheet: sheet?.id, model: model?.id, result }} />
|
|
82
79
|
</div>
|
|
83
80
|
);
|
|
84
81
|
};
|
|
@@ -86,12 +83,16 @@ const DefaultStory = () => {
|
|
|
86
83
|
export const Default: Story = {};
|
|
87
84
|
|
|
88
85
|
const meta = {
|
|
89
|
-
title: 'plugins/plugin-sheet/functions',
|
|
86
|
+
title: 'plugins/plugin-sheet/components/functions',
|
|
90
87
|
render: DefaultStory,
|
|
91
88
|
decorators: [
|
|
92
|
-
|
|
89
|
+
withTheme(),
|
|
90
|
+
withClientProvider({
|
|
91
|
+
types: [Operation.PersistentOperation, Sheet.Sheet],
|
|
92
|
+
createIdentity: true,
|
|
93
|
+
createSpace: true,
|
|
94
|
+
}),
|
|
93
95
|
withComputeGraphDecorator({ plugins: testFunctionPlugins }),
|
|
94
|
-
withTheme,
|
|
95
96
|
],
|
|
96
97
|
} satisfies Meta<typeof DefaultStory>;
|
|
97
98
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { SheetContent } from '../SheetContent';
|
|
6
|
+
import { SheetRoot } from '../SheetRoot';
|
|
7
|
+
import { SheetStatusbar } from '../SheetStatusbar';
|
|
8
|
+
import { SheetToolbar } from '../SheetToolbar';
|
|
9
|
+
|
|
10
|
+
export { useSheetContext, type SheetContextValue, type SheetRootProps } from '../SheetRoot';
|
|
11
|
+
export { type SheetContentProps } from '../SheetContent';
|
|
12
|
+
export { type SheetToolbarProps } from '../SheetToolbar';
|
|
13
|
+
export { type SheetStatusbarProps } from '../SheetStatusbar';
|
|
14
|
+
|
|
15
|
+
export const Sheet = {
|
|
16
|
+
Root: SheetRoot,
|
|
17
|
+
Toolbar: SheetToolbar,
|
|
18
|
+
Content: SheetContent,
|
|
19
|
+
Statusbar: SheetStatusbar,
|
|
20
|
+
};
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React, { useMemo, useState } from 'react';
|
|
9
7
|
|
|
10
8
|
import { Client } from '@dxos/client';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
9
|
+
import { defaultFunctions } from '@dxos/compute-hyperformula';
|
|
10
|
+
import { getRegisteredFunctionNames } from '@dxos/compute-hyperformula/testing';
|
|
11
|
+
import { Obj } from '@dxos/echo';
|
|
12
|
+
import { createDocAccessor } from '@dxos/echo-db';
|
|
14
13
|
import { useAsyncEffect } from '@dxos/react-hooks';
|
|
15
|
-
import { automerge } from '@dxos/react-ui-editor';
|
|
16
14
|
import { CellEditor, type CellEditorProps } from '@dxos/react-ui-grid';
|
|
17
|
-
import { withTheme } from '@dxos/
|
|
15
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
16
|
+
import { automerge } from '@dxos/ui-editor';
|
|
17
|
+
|
|
18
|
+
import { Sheet } from '#types';
|
|
18
19
|
|
|
19
20
|
import { sheetExtension } from '../../extensions';
|
|
20
|
-
import { SheetType, createSheet } from '../../types';
|
|
21
21
|
|
|
22
22
|
const DefaultStory = ({ value, ...props }: CellEditorProps) => {
|
|
23
23
|
const extensions = useMemo(() => {
|
|
@@ -31,16 +31,18 @@ const DefaultStory = ({ value, ...props }: CellEditorProps) => {
|
|
|
31
31
|
|
|
32
32
|
const AutomergeStory = ({ value, ...props }: CellEditorProps) => {
|
|
33
33
|
const cell = 'A1';
|
|
34
|
-
const [object, setObject] = useState<
|
|
34
|
+
const [object, setObject] = useState<Sheet.Sheet>();
|
|
35
35
|
useAsyncEffect(async () => {
|
|
36
|
-
const client = new Client({ types: [
|
|
36
|
+
const client = new Client({ types: [Sheet.Sheet] });
|
|
37
37
|
await client.initialize();
|
|
38
38
|
await client.halo.createIdentity();
|
|
39
39
|
const space = await client.spaces.create();
|
|
40
40
|
|
|
41
|
-
const sheet =
|
|
42
|
-
sheet
|
|
43
|
-
|
|
41
|
+
const sheet = Sheet.make();
|
|
42
|
+
Obj.update(sheet, (sheet) => {
|
|
43
|
+
sheet.name = 'Test';
|
|
44
|
+
sheet.cells[cell] = { value };
|
|
45
|
+
});
|
|
44
46
|
space.db.add(sheet);
|
|
45
47
|
setObject(sheet);
|
|
46
48
|
}, [value]);
|
|
@@ -60,10 +62,11 @@ const AutomergeStory = ({ value, ...props }: CellEditorProps) => {
|
|
|
60
62
|
};
|
|
61
63
|
|
|
62
64
|
const meta = {
|
|
63
|
-
title: 'plugins/plugin-sheet/CellEditor',
|
|
65
|
+
title: 'plugins/plugin-sheet/components/CellEditor',
|
|
66
|
+
|
|
67
|
+
decorators: [withTheme()],
|
|
64
68
|
component: CellEditor,
|
|
65
69
|
render: DefaultStory,
|
|
66
|
-
decorators: [withTheme],
|
|
67
70
|
} satisfies Meta<typeof DefaultStory>;
|
|
68
71
|
|
|
69
72
|
export default meta;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { OperationPlugin, RuntimePlugin } from '@dxos/app-framework';
|
|
9
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
+
import { testFunctionPlugins } from '@dxos/compute-hyperformula/testing';
|
|
11
|
+
import { useSpaces } from '@dxos/react-client/echo';
|
|
12
|
+
import { withClientProvider } from '@dxos/react-client/testing';
|
|
13
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
14
|
+
|
|
15
|
+
import { createTestCells, useTestSheet, withComputeGraphDecorator } from '#testing';
|
|
16
|
+
import { translations } from '#translations';
|
|
17
|
+
import { Sheet } from '#types';
|
|
18
|
+
|
|
19
|
+
import { useComputeGraph } from '../ComputeGraph';
|
|
20
|
+
import { SheetRoot } from '../SheetRoot';
|
|
21
|
+
import { SheetContent } from './SheetContent';
|
|
22
|
+
|
|
23
|
+
export const Basic = () => {
|
|
24
|
+
const [space] = useSpaces();
|
|
25
|
+
const graph = useComputeGraph(space);
|
|
26
|
+
const sheet = useTestSheet(space, graph, { cells: createTestCells() });
|
|
27
|
+
if (!sheet || !graph) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<SheetRoot graph={graph} sheet={sheet} attendableId='test' ignoreAttention>
|
|
33
|
+
<div className='grid h-full w-full'>
|
|
34
|
+
<SheetContent />
|
|
35
|
+
</div>
|
|
36
|
+
</SheetRoot>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const meta = {
|
|
41
|
+
title: 'plugins/plugin-sheet/components/SheetContent',
|
|
42
|
+
component: SheetContent,
|
|
43
|
+
decorators: [
|
|
44
|
+
withTheme(),
|
|
45
|
+
withLayout({ layout: 'fullscreen' }),
|
|
46
|
+
withClientProvider({ types: [Sheet.Sheet], createSpace: true }),
|
|
47
|
+
withComputeGraphDecorator({ plugins: testFunctionPlugins }),
|
|
48
|
+
withPluginManager({
|
|
49
|
+
plugins: [OperationPlugin(), RuntimePlugin()],
|
|
50
|
+
}),
|
|
51
|
+
],
|
|
52
|
+
parameters: {
|
|
53
|
+
layout: 'fullscreen',
|
|
54
|
+
translations,
|
|
55
|
+
},
|
|
56
|
+
} satisfies Meta<typeof SheetContent>;
|
|
57
|
+
|
|
58
|
+
export default meta;
|
|
59
|
+
|
|
60
|
+
type Story = StoryObj<typeof meta>;
|