@dxos/plugin-sheet 0.7.4 → 0.7.5-labs.5f04cf6
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/SheetContainer-CM4CO3DC.mjs +370 -0
- package/dist/lib/browser/SheetContainer-CM4CO3DC.mjs.map +7 -0
- package/dist/lib/browser/chunk-FOO6NGBM.mjs +229 -0
- package/dist/lib/browser/chunk-FOO6NGBM.mjs.map +7 -0
- package/dist/lib/browser/chunk-H23JW3DX.mjs +800 -0
- package/dist/lib/browser/chunk-H23JW3DX.mjs.map +7 -0
- package/dist/lib/browser/{chunk-RABELMEQ.mjs → chunk-K6EUYKWT.mjs} +3 -3
- package/dist/lib/browser/chunk-K6EUYKWT.mjs.map +7 -0
- package/dist/lib/browser/chunk-PW25VUP6.mjs +15 -0
- package/dist/lib/browser/chunk-PW25VUP6.mjs.map +7 -0
- package/dist/lib/browser/chunk-T3IVPMRX.mjs +900 -0
- package/dist/lib/browser/chunk-T3IVPMRX.mjs.map +7 -0
- package/dist/lib/browser/compute-graph-registry-XH6B2SWG.mjs +27 -0
- package/dist/lib/browser/compute-graph-registry-XH6B2SWG.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +86 -324
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/intent-resolver-Q7DTHAM5.mjs +47 -0
- package/dist/lib/browser/intent-resolver-Q7DTHAM5.mjs.map +7 -0
- package/dist/lib/browser/markdown-IKG5FNCA.mjs +26 -0
- package/dist/lib/browser/markdown-IKG5FNCA.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-context-JG43577H.mjs +28 -0
- package/dist/lib/browser/react-context-JG43577H.mjs.map +7 -0
- package/dist/lib/browser/react-surface-URRC3AFC.mjs +43 -0
- package/dist/lib/browser/react-surface-URRC3AFC.mjs.map +7 -0
- package/dist/lib/browser/thread-YX6KBQNQ.mjs +17 -0
- package/dist/lib/browser/thread-YX6KBQNQ.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +62 -0
- package/dist/lib/node/SheetContainer-TJ3JQLWM.cjs +364 -0
- package/dist/lib/node/SheetContainer-TJ3JQLWM.cjs.map +7 -0
- package/dist/lib/node/chunk-E3RXOEL6.cjs +935 -0
- package/dist/lib/node/chunk-E3RXOEL6.cjs.map +7 -0
- package/dist/lib/node/{types.cjs → chunk-FU5K66DS.cjs} +12 -16
- package/dist/lib/node/chunk-FU5K66DS.cjs.map +7 -0
- package/dist/lib/node/{chunk-2ZVZI2KJ.cjs → chunk-NLDXUFDG.cjs} +7 -7
- package/dist/lib/node/chunk-NLDXUFDG.cjs.map +7 -0
- package/dist/lib/node/chunk-P4KSGZSS.cjs +251 -0
- package/dist/lib/node/chunk-P4KSGZSS.cjs.map +7 -0
- package/dist/lib/node/chunk-ZPWW4LPY.cjs +807 -0
- package/dist/lib/node/chunk-ZPWW4LPY.cjs.map +7 -0
- package/dist/lib/node/compute-graph-registry-ORGTIE5M.cjs +53 -0
- package/dist/lib/node/compute-graph-registry-ORGTIE5M.cjs.map +7 -0
- package/dist/lib/node/index.cjs +87 -318
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/intent-resolver-ZUDJJUFG.cjs +60 -0
- package/dist/lib/node/intent-resolver-ZUDJJUFG.cjs.map +7 -0
- package/dist/lib/node/markdown-EUUL3Q36.cjs +40 -0
- package/dist/lib/node/markdown-EUUL3Q36.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/react-context-OOH5QFE2.cjs +50 -0
- package/dist/lib/node/react-context-OOH5QFE2.cjs.map +7 -0
- package/dist/lib/node/react-surface-IQN5JKSS.cjs +64 -0
- package/dist/lib/node/react-surface-IQN5JKSS.cjs.map +7 -0
- package/dist/lib/node/{meta.cjs → thread-VBPS23P2.cjs} +12 -10
- package/dist/lib/node/thread-VBPS23P2.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +84 -0
- package/dist/lib/node/types/index.cjs.map +7 -0
- package/dist/lib/node-esm/SheetContainer-QEEFORIC.mjs +371 -0
- package/dist/lib/node-esm/SheetContainer-QEEFORIC.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-BM2Q3FFC.mjs → chunk-FMOVRTS4.mjs} +3 -3
- package/dist/lib/node-esm/chunk-FMOVRTS4.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-KCXK5UM6.mjs +16 -0
- package/dist/lib/node-esm/chunk-KCXK5UM6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NSVUOAI6.mjs +901 -0
- package/dist/lib/node-esm/chunk-NSVUOAI6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-OXD6RBFF.mjs +801 -0
- package/dist/lib/node-esm/chunk-OXD6RBFF.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-PTOI45NK.mjs +231 -0
- package/dist/lib/node-esm/chunk-PTOI45NK.mjs.map +7 -0
- package/dist/lib/node-esm/compute-graph-registry-JH2FRHLD.mjs +28 -0
- package/dist/lib/node-esm/compute-graph-registry-JH2FRHLD.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +86 -324
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/intent-resolver-IF64RN7B.mjs +48 -0
- package/dist/lib/node-esm/intent-resolver-IF64RN7B.mjs.map +7 -0
- package/dist/lib/node-esm/markdown-D2ZMN7LR.mjs +27 -0
- package/dist/lib/node-esm/markdown-D2ZMN7LR.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-context-CJVSLO74.mjs +29 -0
- package/dist/lib/node-esm/react-context-CJVSLO74.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-XJIX5G3I.mjs +44 -0
- package/dist/lib/node-esm/react-surface-XJIX5G3I.mjs.map +7 -0
- package/dist/lib/node-esm/thread-HSJD3SR6.mjs +18 -0
- package/dist/lib/node-esm/thread-HSJD3SR6.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +63 -0
- package/dist/types/src/SheetPlugin.d.ts +1 -3
- package/dist/types/src/SheetPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +5 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
- package/dist/types/src/capabilities/compute-graph-registry.d.ts +4 -0
- package/dist/types/src/capabilities/compute-graph-registry.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +17 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/intent-resolver.d.ts +4 -0
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/markdown.d.ts +6 -0
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-context.d.ts +8 -0
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +4 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/thread.d.ts +6 -0
- package/dist/types/src/capabilities/thread.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 -0
- package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/util.d.ts.map +1 -1
- package/dist/types/src/components/RangeList/RangeList.d.ts.map +1 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +1 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetContext/SheetContext.d.ts +1 -2
- package/dist/types/src/components/SheetContext/SheetContext.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts +7 -0
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts.map +1 -0
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts +6 -0
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts.map +1 -0
- package/dist/types/src/components/SheetToolbar/align.d.ts +28 -0
- package/dist/types/src/components/SheetToolbar/align.d.ts.map +1 -0
- package/dist/types/src/components/SheetToolbar/comment.d.ts +23 -0
- package/dist/types/src/components/SheetToolbar/comment.d.ts.map +1 -0
- package/dist/types/src/components/SheetToolbar/index.d.ts +2 -0
- package/dist/types/src/components/SheetToolbar/index.d.ts.map +1 -0
- package/dist/types/src/components/SheetToolbar/style.d.ts +26 -0
- package/dist/types/src/components/SheetToolbar/style.d.ts.map +1 -0
- package/dist/types/src/components/SheetToolbar/useToolbarAction.d.ts +8 -0
- package/dist/types/src/components/SheetToolbar/useToolbarAction.d.ts.map +1 -0
- package/dist/types/src/components/SheetToolbar/useToolbarState.d.ts +6 -0
- package/dist/types/src/components/SheetToolbar/useToolbarState.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/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/editor/extension.d.ts +1 -1
- package/dist/types/src/extensions/editor/extension.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/integrations/thread-ranges.d.ts +1 -1
- package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/model/sheet-model.d.ts +6 -8
- 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 +1 -1
- package/dist/types/src/model/useSheetModel.d.ts.map +1 -1
- package/dist/types/src/testing/testing.d.ts +1 -1
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/{defs → types}/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/types/schema.d.ts +105 -0
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/src/{defs → types}/sheet-range-types.d.ts +1 -1
- package/dist/types/src/types/sheet-range-types.d.ts.map +1 -0
- package/dist/types/src/types/types.d.ts +71 -0
- package/dist/types/src/types/types.d.ts.map +1 -0
- package/dist/types/src/{defs → types}/util.d.ts +5 -1
- package/dist/types/src/types/util.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +47 -61
- package/src/SheetPlugin.tsx +70 -176
- package/src/capabilities/capabilities.ts +14 -0
- package/src/capabilities/compute-graph-registry.ts +25 -0
- package/src/capabilities/index.ts +14 -0
- package/src/capabilities/intent-resolver.ts +29 -0
- package/src/capabilities/markdown.ts +22 -0
- package/src/capabilities/react-context.tsx +20 -0
- package/src/capabilities/react-surface.tsx +30 -0
- package/src/capabilities/thread.ts +14 -0
- package/src/components/ComputeGraph/ComputeGraphContextProvider.tsx +1 -2
- package/src/{compute-graph → components/ComputeGraph}/compute-graph.stories.tsx +6 -7
- package/src/components/FunctionEditor/FunctionEditor.tsx +2 -1
- package/src/components/GridSheet/GridSheet.stories.tsx +2 -0
- package/src/components/GridSheet/GridSheet.tsx +15 -18
- package/src/components/GridSheet/SheetCellEditor.stories.tsx +6 -7
- package/src/components/GridSheet/util.ts +3 -2
- package/src/components/RangeList/RangeList.tsx +2 -1
- package/src/components/SheetContainer/SheetContainer.stories.tsx +25 -23
- package/src/components/SheetContainer/SheetContainer.tsx +3 -8
- package/src/components/SheetContext/SheetContext.tsx +1 -2
- package/src/components/{Toolbar/Toolbar.stories.tsx → SheetToolbar/SheetToolbar.stories.tsx} +4 -8
- package/src/components/SheetToolbar/SheetToolbar.tsx +48 -0
- package/src/components/SheetToolbar/align.ts +68 -0
- package/src/components/SheetToolbar/comment.ts +56 -0
- package/src/components/{Toolbar → SheetToolbar}/index.ts +1 -1
- package/src/components/SheetToolbar/style.ts +72 -0
- package/src/components/SheetToolbar/useToolbarAction.ts +87 -0
- package/src/components/SheetToolbar/useToolbarState.ts +17 -0
- package/src/components/index.ts +0 -1
- package/src/extensions/compute.ts +7 -4
- package/src/extensions/editor/extension.test.ts +2 -1
- package/src/extensions/editor/extension.ts +2 -3
- package/src/index.ts +2 -7
- package/src/integrations/thread-ranges.ts +28 -24
- package/src/meta.ts +1 -1
- package/src/model/sheet-model.test.ts +4 -10
- package/src/model/sheet-model.ts +30 -22
- package/src/model/testing.ts +3 -2
- package/src/model/useSheetModel.ts +2 -1
- package/src/sanity.test.ts +1 -1
- package/src/testing/testing.tsx +2 -3
- package/src/{defs → types}/index.ts +1 -0
- package/src/types/schema.ts +56 -0
- package/src/{defs → types}/sheet-range-types.ts +1 -1
- package/src/types/types.ts +67 -0
- package/src/{defs → types}/util.ts +13 -13
- package/dist/lib/browser/SheetContainer-KCLT6PEO.mjs +0 -296
- package/dist/lib/browser/SheetContainer-KCLT6PEO.mjs.map +0 -7
- package/dist/lib/browser/chunk-E5WQ7U7G.mjs +0 -1675
- package/dist/lib/browser/chunk-E5WQ7U7G.mjs.map +0 -7
- package/dist/lib/browser/chunk-F3HE6D3J.mjs +0 -3269
- package/dist/lib/browser/chunk-F3HE6D3J.mjs.map +0 -7
- package/dist/lib/browser/chunk-JXFPOYNA.mjs +0 -67
- package/dist/lib/browser/chunk-JXFPOYNA.mjs.map +0 -7
- package/dist/lib/browser/chunk-RABELMEQ.mjs.map +0 -7
- package/dist/lib/browser/compute-graph-SNUS7HOH.mjs +0 -35
- package/dist/lib/browser/meta.mjs +0 -9
- package/dist/lib/browser/types.mjs +0 -16
- package/dist/lib/browser/types.mjs.map +0 -7
- package/dist/lib/node/SheetContainer-VVVRYTQG.cjs +0 -298
- package/dist/lib/node/SheetContainer-VVVRYTQG.cjs.map +0 -7
- package/dist/lib/node/chunk-2ZVZI2KJ.cjs.map +0 -7
- package/dist/lib/node/chunk-45YW2DX2.cjs +0 -1656
- package/dist/lib/node/chunk-45YW2DX2.cjs.map +0 -7
- package/dist/lib/node/chunk-KSEEI5VC.cjs +0 -3323
- package/dist/lib/node/chunk-KSEEI5VC.cjs.map +0 -7
- package/dist/lib/node/chunk-OWH2EUHZ.cjs +0 -90
- package/dist/lib/node/chunk-OWH2EUHZ.cjs.map +0 -7
- package/dist/lib/node/compute-graph-WILPHO4A.cjs +0 -57
- package/dist/lib/node/compute-graph-WILPHO4A.cjs.map +0 -7
- package/dist/lib/node/meta.cjs.map +0 -7
- package/dist/lib/node/types.cjs.map +0 -7
- package/dist/lib/node-esm/SheetContainer-LSBE6Q4X.mjs +0 -297
- package/dist/lib/node-esm/SheetContainer-LSBE6Q4X.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6JF2AHKO.mjs +0 -3270
- package/dist/lib/node-esm/chunk-6JF2AHKO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BM2Q3FFC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BVS2IQRO.mjs +0 -68
- package/dist/lib/node-esm/chunk-BVS2IQRO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NYDNXI7L.mjs +0 -1676
- package/dist/lib/node-esm/chunk-NYDNXI7L.mjs.map +0 -7
- package/dist/lib/node-esm/compute-graph-S6CVN7RS.mjs +0 -36
- package/dist/lib/node-esm/compute-graph-S6CVN7RS.mjs.map +0 -7
- package/dist/lib/node-esm/meta.mjs +0 -10
- package/dist/lib/node-esm/meta.mjs.map +0 -7
- package/dist/lib/node-esm/types.mjs +0 -17
- package/dist/lib/node-esm/types.mjs.map +0 -7
- package/dist/types/src/components/SheetObjectSettings.d.ts +0 -7
- package/dist/types/src/components/SheetObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +0 -48
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +0 -7
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar/index.d.ts +0 -2
- package/dist/types/src/components/Toolbar/index.d.ts.map +0 -1
- package/dist/types/src/compute-graph/compute-graph-registry.d.ts +0 -34
- package/dist/types/src/compute-graph/compute-graph-registry.d.ts.map +0 -1
- package/dist/types/src/compute-graph/compute-graph.d.ts +0 -64
- package/dist/types/src/compute-graph/compute-graph.d.ts.map +0 -1
- package/dist/types/src/compute-graph/compute-graph.stories.d.ts.map +0 -1
- package/dist/types/src/compute-graph/compute-graph.test.d.ts +0 -2
- package/dist/types/src/compute-graph/compute-graph.test.d.ts.map +0 -1
- package/dist/types/src/compute-graph/compute-node.d.ts +0 -26
- package/dist/types/src/compute-graph/compute-node.d.ts.map +0 -1
- package/dist/types/src/compute-graph/functions/async-function.d.ts +0 -66
- package/dist/types/src/compute-graph/functions/async-function.d.ts.map +0 -1
- package/dist/types/src/compute-graph/functions/edge-function.d.ts +0 -21
- package/dist/types/src/compute-graph/functions/edge-function.d.ts.map +0 -1
- package/dist/types/src/compute-graph/functions/function-defs.d.ts +0 -11
- package/dist/types/src/compute-graph/functions/function-defs.d.ts.map +0 -1
- package/dist/types/src/compute-graph/functions/index.d.ts +0 -4
- package/dist/types/src/compute-graph/functions/index.d.ts.map +0 -1
- package/dist/types/src/compute-graph/hyperformula.test.d.ts +0 -2
- package/dist/types/src/compute-graph/hyperformula.test.d.ts.map +0 -1
- package/dist/types/src/compute-graph/index.d.ts +0 -5
- package/dist/types/src/compute-graph/index.d.ts.map +0 -1
- package/dist/types/src/compute-graph/testing/index.d.ts +0 -3
- package/dist/types/src/compute-graph/testing/index.d.ts.map +0 -1
- package/dist/types/src/compute-graph/testing/test-builder.d.ts +0 -15
- package/dist/types/src/compute-graph/testing/test-builder.d.ts.map +0 -1
- package/dist/types/src/compute-graph/testing/test-plugin.d.ts +0 -36
- package/dist/types/src/compute-graph/testing/test-plugin.d.ts.map +0 -1
- package/dist/types/src/compute-graph/util.d.ts +0 -2
- package/dist/types/src/compute-graph/util.d.ts.map +0 -1
- package/dist/types/src/defs/index.d.ts.map +0 -1
- package/dist/types/src/defs/sheet-range-types.d.ts.map +0 -1
- package/dist/types/src/defs/types.d.ts +0 -26
- package/dist/types/src/defs/types.d.ts.map +0 -1
- package/dist/types/src/defs/types.test.d.ts +0 -2
- package/dist/types/src/defs/types.test.d.ts.map +0 -1
- package/dist/types/src/defs/util.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -182
- package/dist/types/src/types.d.ts.map +0 -1
- package/dist/vendor/hyperformula.mjs +0 -37145
- package/src/components/SheetObjectSettings.tsx +0 -38
- package/src/components/Toolbar/Toolbar.tsx +0 -346
- package/src/compute-graph/compute-graph-registry.ts +0 -90
- package/src/compute-graph/compute-graph.test.ts +0 -87
- package/src/compute-graph/compute-graph.ts +0 -260
- package/src/compute-graph/compute-node.ts +0 -62
- package/src/compute-graph/functions/async-function.ts +0 -179
- package/src/compute-graph/functions/edge-function.ts +0 -102
- package/src/compute-graph/functions/function-defs.ts +0 -2427
- package/src/compute-graph/functions/index.ts +0 -7
- package/src/compute-graph/hyperformula.test.ts +0 -14
- package/src/compute-graph/index.ts +0 -8
- package/src/compute-graph/testing/index.ts +0 -6
- package/src/compute-graph/testing/test-builder.ts +0 -54
- package/src/compute-graph/testing/test-plugin.ts +0 -100
- package/src/compute-graph/util.ts +0 -8
- package/src/defs/types.test.ts +0 -91
- package/src/defs/types.ts +0 -88
- package/src/types.ts +0 -125
- /package/dist/lib/browser/{compute-graph-SNUS7HOH.mjs.map → types/index.mjs.map} +0 -0
- /package/dist/lib/{browser/meta.mjs.map → node-esm/types/index.mjs.map} +0 -0
- /package/dist/types/src/{compute-graph → components/ComputeGraph}/compute-graph.stories.d.ts +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var react_context_OOH5QFE2_exports = {};
|
|
30
|
+
__export(react_context_OOH5QFE2_exports, {
|
|
31
|
+
default: () => react_context_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(react_context_OOH5QFE2_exports);
|
|
34
|
+
var import_chunk_FU5K66DS = require("./chunk-FU5K66DS.cjs");
|
|
35
|
+
var import_chunk_ZPWW4LPY = require("./chunk-ZPWW4LPY.cjs");
|
|
36
|
+
var import_chunk_E3RXOEL6 = require("./chunk-E3RXOEL6.cjs");
|
|
37
|
+
var import_chunk_P4KSGZSS = require("./chunk-P4KSGZSS.cjs");
|
|
38
|
+
var import_chunk_NLDXUFDG = require("./chunk-NLDXUFDG.cjs");
|
|
39
|
+
var import_react = __toESM(require("react"));
|
|
40
|
+
var import_app_framework = require("@dxos/app-framework");
|
|
41
|
+
var react_context_default = () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.ReactContext, {
|
|
42
|
+
id: import_chunk_NLDXUFDG.SHEET_PLUGIN,
|
|
43
|
+
context: ({ children }) => {
|
|
44
|
+
const computeGraphRegistry = (0, import_app_framework.useCapability)(import_chunk_FU5K66DS.SheetCapabilities.ComputeGraphRegistry);
|
|
45
|
+
return /* @__PURE__ */ import_react.default.createElement(import_chunk_ZPWW4LPY.ComputeGraphContextProvider, {
|
|
46
|
+
registry: computeGraphRegistry
|
|
47
|
+
}, children);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=react-context-OOH5QFE2.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-context.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, useCapability } from '@dxos/app-framework';\n\nimport { SheetCapabilities } from './capabilities';\nimport { ComputeGraphContextProvider } from '../components';\nimport { SHEET_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactContext, {\n id: SHEET_PLUGIN,\n context: ({ children }) => {\n const computeGraphRegistry = useCapability(SheetCapabilities.ComputeGraphRegistry);\n return <ComputeGraphContextProvider registry={computeGraphRegistry}>{children}</ComputeGraphContextProvider>;\n },\n });\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,2BAAyD;AAMzD,IAAA,wBAAe,UACbA,kCAAYC,kCAAaC,cAAc;EACrCC,IAAIC;EACJC,SAAS,CAAC,EAAEC,SAAQ,MAAE;AACpB,UAAMC,2BAAuBC,oCAAcC,wCAAkBC,oBAAoB;AACjF,WAAO,6BAAAC,QAAA,cAACC,mDAAAA;MAA4BC,UAAUN;OAAuBD,QAAAA;EACvE;AACF,CAAA;",
|
|
6
|
+
"names": ["contributes", "Capabilities", "ReactContext", "id", "SHEET_PLUGIN", "context", "children", "computeGraphRegistry", "useCapability", "SheetCapabilities", "ComputeGraphRegistry", "React", "ComputeGraphContextProvider", "registry"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var react_surface_IQN5JKSS_exports = {};
|
|
30
|
+
__export(react_surface_IQN5JKSS_exports, {
|
|
31
|
+
default: () => react_surface_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(react_surface_IQN5JKSS_exports);
|
|
34
|
+
var import_chunk_ZPWW4LPY = require("./chunk-ZPWW4LPY.cjs");
|
|
35
|
+
var import_chunk_E3RXOEL6 = require("./chunk-E3RXOEL6.cjs");
|
|
36
|
+
var import_chunk_P4KSGZSS = require("./chunk-P4KSGZSS.cjs");
|
|
37
|
+
var import_chunk_NLDXUFDG = require("./chunk-NLDXUFDG.cjs");
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_app_framework = require("@dxos/app-framework");
|
|
40
|
+
var import_echo = require("@dxos/react-client/echo");
|
|
41
|
+
var react_surface_default = () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.ReactSurface, [
|
|
42
|
+
(0, import_app_framework.createSurface)({
|
|
43
|
+
id: `${import_chunk_NLDXUFDG.SHEET_PLUGIN}/sheet`,
|
|
44
|
+
role: [
|
|
45
|
+
"article",
|
|
46
|
+
"section"
|
|
47
|
+
],
|
|
48
|
+
filter: (data) => data.subject instanceof import_chunk_E3RXOEL6.SheetType && !!(0, import_echo.getSpace)(data.subject),
|
|
49
|
+
component: ({ data, role }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_ZPWW4LPY.SheetContainer, {
|
|
50
|
+
space: (0, import_echo.getSpace)(data.subject),
|
|
51
|
+
sheet: data.subject,
|
|
52
|
+
role
|
|
53
|
+
})
|
|
54
|
+
}),
|
|
55
|
+
(0, import_app_framework.createSurface)({
|
|
56
|
+
id: `${import_chunk_NLDXUFDG.SHEET_PLUGIN}/settings`,
|
|
57
|
+
role: "complementary--settings",
|
|
58
|
+
filter: (data) => data.subject instanceof import_chunk_E3RXOEL6.SheetType,
|
|
59
|
+
component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_ZPWW4LPY.RangeList, {
|
|
60
|
+
sheet: data.subject
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
]);
|
|
64
|
+
//# sourceMappingURL=react-surface-IQN5JKSS.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { getSpace } from '@dxos/react-client/echo';\n\nimport { RangeList, SheetContainer } from '../components';\nimport { SHEET_PLUGIN } from '../meta';\nimport { SheetType } from '../types';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: `${SHEET_PLUGIN}/sheet`,\n role: ['article', 'section'],\n filter: (data): data is { subject: SheetType } => data.subject instanceof SheetType && !!getSpace(data.subject),\n component: ({ data, role }) => (\n <SheetContainer space={getSpace(data.subject)!} sheet={data.subject} role={role} />\n ),\n }),\n createSurface({\n id: `${SHEET_PLUGIN}/settings`,\n role: 'complementary--settings',\n filter: (data): data is { subject: SheetType } => data.subject instanceof SheetType,\n component: ({ data }) => <RangeList sheet={data.subject} />,\n }),\n ]);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,2BAAyD;AACzD,kBAAyB;AAMzB,IAAA,wBAAe,UACbA,kCAAYC,kCAAaC,cAAc;MACrCC,oCAAc;IACZC,IAAI,GAAGC,kCAAAA;IACPC,MAAM;MAAC;MAAW;;IAClBC,QAAQ,CAACC,SAAyCA,KAAKC,mBAAmBC,mCAAa,CAAC,KAACC,sBAASH,KAAKC,OAAO;IAC9GG,WAAW,CAAC,EAAEJ,MAAMF,KAAI,MACtB,6BAAAO,QAAA,cAACC,sCAAAA;MAAeC,WAAOJ,sBAASH,KAAKC,OAAO;MAAIO,OAAOR,KAAKC;MAASH;;EAEzE,CAAA;MACAH,oCAAc;IACZC,IAAI,GAAGC,kCAAAA;IACPC,MAAM;IACNC,QAAQ,CAACC,SAAyCA,KAAKC,mBAAmBC;IAC1EE,WAAW,CAAC,EAAEJ,KAAI,MAAO,6BAAAK,QAAA,cAACI,iCAAAA;MAAUD,OAAOR,KAAKC;;EAClD,CAAA;CACD;",
|
|
6
|
+
"names": ["contributes", "Capabilities", "ReactSurface", "createSurface", "id", "SHEET_PLUGIN", "role", "filter", "data", "subject", "SheetType", "getSpace", "component", "React", "SheetContainer", "space", "sheet", "RangeList"]
|
|
7
|
+
}
|
|
@@ -16,15 +16,17 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
21
|
-
|
|
22
|
-
default: () => import_chunk_2ZVZI2KJ.meta_default
|
|
19
|
+
var thread_VBPS23P2_exports = {};
|
|
20
|
+
__export(thread_VBPS23P2_exports, {
|
|
21
|
+
default: () => thread_default
|
|
23
22
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
module.exports = __toCommonJS(thread_VBPS23P2_exports);
|
|
24
|
+
var import_chunk_E3RXOEL6 = require("./chunk-E3RXOEL6.cjs");
|
|
25
|
+
var import_chunk_NLDXUFDG = require("./chunk-NLDXUFDG.cjs");
|
|
26
|
+
var import_app_framework = require("@dxos/app-framework");
|
|
27
|
+
var import_plugin_space = require("@dxos/plugin-space");
|
|
28
|
+
var thread_default = () => (0, import_app_framework.contributes)(import_plugin_space.ThreadCapabilities.Thread, {
|
|
29
|
+
predicate: (data) => data instanceof import_chunk_E3RXOEL6.SheetType,
|
|
30
|
+
createSort: (sheet) => (indexA, indexB) => !indexA || !indexB ? 0 : (0, import_chunk_E3RXOEL6.compareIndexPositions)(sheet, indexA, indexB)
|
|
29
31
|
});
|
|
30
|
-
//# sourceMappingURL=
|
|
32
|
+
//# sourceMappingURL=thread-VBPS23P2.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/thread.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { contributes } from '@dxos/app-framework';\nimport { ThreadCapabilities } from '@dxos/plugin-space';\n\nimport { compareIndexPositions, SheetType } from '../types';\n\nexport default () =>\n contributes(ThreadCapabilities.Thread, {\n predicate: (data) => data instanceof SheetType,\n createSort: (sheet) => (indexA, indexB) => (!indexA || !indexB ? 0 : compareIndexPositions(sheet, indexA, indexB)),\n });\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAA4B;AAC5B,0BAAmC;AAInC,IAAA,iBAAe,UACbA,kCAAYC,uCAAmBC,QAAQ;EACrCC,WAAW,CAACC,SAASA,gBAAgBC;EACrCC,YAAY,CAACC,UAAU,CAACC,QAAQC,WAAY,CAACD,UAAU,CAACC,SAAS,QAAIC,6CAAsBH,OAAOC,QAAQC,MAAAA;AAC5G,CAAA;",
|
|
6
|
+
"names": ["contributes", "ThreadCapabilities", "Thread", "predicate", "data", "SheetType", "createSort", "sheet", "indexA", "indexB", "compareIndexPositions"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var types_exports = {};
|
|
20
|
+
__export(types_exports, {
|
|
21
|
+
ApiError: () => import_chunk_E3RXOEL6.ApiError,
|
|
22
|
+
CellValue: () => import_chunk_E3RXOEL6.CellValue,
|
|
23
|
+
DEFAULT_COLS: () => import_chunk_E3RXOEL6.DEFAULT_COLS,
|
|
24
|
+
DEFAULT_ROWS: () => import_chunk_E3RXOEL6.DEFAULT_ROWS,
|
|
25
|
+
MAX_COLS: () => import_chunk_E3RXOEL6.MAX_COLS,
|
|
26
|
+
MAX_ROWS: () => import_chunk_E3RXOEL6.MAX_ROWS,
|
|
27
|
+
Range: () => import_chunk_E3RXOEL6.Range,
|
|
28
|
+
RangeException: () => import_chunk_E3RXOEL6.RangeException,
|
|
29
|
+
ReadonlyException: () => import_chunk_E3RXOEL6.ReadonlyException,
|
|
30
|
+
RowColumnMeta: () => import_chunk_E3RXOEL6.RowColumnMeta,
|
|
31
|
+
SheetAction: () => import_chunk_E3RXOEL6.SheetAction,
|
|
32
|
+
SheetType: () => import_chunk_E3RXOEL6.SheetType,
|
|
33
|
+
addressFromIndex: () => import_chunk_E3RXOEL6.addressFromIndex,
|
|
34
|
+
addressToIndex: () => import_chunk_E3RXOEL6.addressToIndex,
|
|
35
|
+
alignKey: () => import_chunk_E3RXOEL6.alignKey,
|
|
36
|
+
cellClassNameForRange: () => import_chunk_E3RXOEL6.cellClassNameForRange,
|
|
37
|
+
commentKey: () => import_chunk_E3RXOEL6.commentKey,
|
|
38
|
+
compareIndexPositions: () => import_chunk_E3RXOEL6.compareIndexPositions,
|
|
39
|
+
createIndex: () => import_chunk_E3RXOEL6.createIndex,
|
|
40
|
+
createIndices: () => import_chunk_E3RXOEL6.createIndices,
|
|
41
|
+
createSheet: () => import_chunk_E3RXOEL6.createSheet,
|
|
42
|
+
initialize: () => import_chunk_E3RXOEL6.initialize,
|
|
43
|
+
insertIndices: () => import_chunk_E3RXOEL6.insertIndices,
|
|
44
|
+
mapFormulaIndicesToRefs: () => import_chunk_E3RXOEL6.mapFormulaIndicesToRefs,
|
|
45
|
+
mapFormulaRefsToIndices: () => import_chunk_E3RXOEL6.mapFormulaRefsToIndices,
|
|
46
|
+
rangeFromIndex: () => import_chunk_E3RXOEL6.rangeFromIndex,
|
|
47
|
+
rangeToIndex: () => import_chunk_E3RXOEL6.rangeToIndex,
|
|
48
|
+
styleKey: () => import_chunk_E3RXOEL6.styleKey
|
|
49
|
+
});
|
|
50
|
+
module.exports = __toCommonJS(types_exports);
|
|
51
|
+
var import_chunk_E3RXOEL6 = require("../chunk-E3RXOEL6.cjs");
|
|
52
|
+
var import_chunk_NLDXUFDG = require("../chunk-NLDXUFDG.cjs");
|
|
53
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
54
|
+
0 && (module.exports = {
|
|
55
|
+
ApiError,
|
|
56
|
+
CellValue,
|
|
57
|
+
DEFAULT_COLS,
|
|
58
|
+
DEFAULT_ROWS,
|
|
59
|
+
MAX_COLS,
|
|
60
|
+
MAX_ROWS,
|
|
61
|
+
Range,
|
|
62
|
+
RangeException,
|
|
63
|
+
ReadonlyException,
|
|
64
|
+
RowColumnMeta,
|
|
65
|
+
SheetAction,
|
|
66
|
+
SheetType,
|
|
67
|
+
addressFromIndex,
|
|
68
|
+
addressToIndex,
|
|
69
|
+
alignKey,
|
|
70
|
+
cellClassNameForRange,
|
|
71
|
+
commentKey,
|
|
72
|
+
compareIndexPositions,
|
|
73
|
+
createIndex,
|
|
74
|
+
createIndices,
|
|
75
|
+
createSheet,
|
|
76
|
+
initialize,
|
|
77
|
+
insertIndices,
|
|
78
|
+
mapFormulaIndicesToRefs,
|
|
79
|
+
mapFormulaRefsToIndices,
|
|
80
|
+
rangeFromIndex,
|
|
81
|
+
rangeToIndex,
|
|
82
|
+
styleKey
|
|
83
|
+
});
|
|
84
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["index.cjs"],
|
|
4
|
+
"sourcesContent": ["import {\n ApiError,\n CellValue,\n DEFAULT_COLS,\n DEFAULT_ROWS,\n MAX_COLS,\n MAX_ROWS,\n Range,\n RangeException,\n ReadonlyException,\n RowColumnMeta,\n SheetAction,\n SheetType,\n addressFromIndex,\n addressToIndex,\n alignKey,\n cellClassNameForRange,\n commentKey,\n compareIndexPositions,\n createIndex,\n createIndices,\n createSheet,\n initialize,\n insertIndices,\n mapFormulaIndicesToRefs,\n mapFormulaRefsToIndices,\n rangeFromIndex,\n rangeToIndex,\n styleKey\n} from \"../chunk-E3RXOEL6.cjs\";\nimport \"../chunk-NLDXUFDG.cjs\";\nexport {\n ApiError,\n CellValue,\n DEFAULT_COLS,\n DEFAULT_ROWS,\n MAX_COLS,\n MAX_ROWS,\n Range,\n RangeException,\n ReadonlyException,\n RowColumnMeta,\n SheetAction,\n SheetType,\n addressFromIndex,\n addressToIndex,\n alignKey,\n cellClassNameForRange,\n commentKey,\n compareIndexPositions,\n createIndex,\n createIndices,\n createSheet,\n initialize,\n insertIndices,\n mapFormulaIndicesToRefs,\n mapFormulaRefsToIndices,\n rangeFromIndex,\n rangeToIndex,\n styleKey\n};\n//# sourceMappingURL=index.cjs.map\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BA6BO;AACP,4BAAO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
GridSheet,
|
|
4
|
+
SheetProvider,
|
|
5
|
+
completeCellRangeToThreadCursor,
|
|
6
|
+
useComputeGraph,
|
|
7
|
+
useSheetContext
|
|
8
|
+
} from "./chunk-OXD6RBFF.mjs";
|
|
9
|
+
import {
|
|
10
|
+
alignKey,
|
|
11
|
+
commentKey,
|
|
12
|
+
mapFormulaIndicesToRefs,
|
|
13
|
+
rangeFromIndex,
|
|
14
|
+
rangeToIndex
|
|
15
|
+
} from "./chunk-NSVUOAI6.mjs";
|
|
16
|
+
import "./chunk-PTOI45NK.mjs";
|
|
17
|
+
import {
|
|
18
|
+
SHEET_PLUGIN
|
|
19
|
+
} from "./chunk-FMOVRTS4.mjs";
|
|
20
|
+
|
|
21
|
+
// packages/plugins/plugin-sheet/src/components/SheetContainer/SheetContainer.tsx
|
|
22
|
+
import React3 from "react";
|
|
23
|
+
import { fullyQualifiedId } from "@dxos/react-client/echo";
|
|
24
|
+
import { StackItem } from "@dxos/react-ui-stack";
|
|
25
|
+
|
|
26
|
+
// packages/plugins/plugin-sheet/src/components/FunctionEditor/FunctionEditor.tsx
|
|
27
|
+
import React from "react";
|
|
28
|
+
import { addressToA1Notation, isFormula, rangeToA1Notation } from "@dxos/compute";
|
|
29
|
+
import { Icon } from "@dxos/react-ui";
|
|
30
|
+
var FunctionEditor = () => {
|
|
31
|
+
const { model, cursor, range } = useSheetContext();
|
|
32
|
+
let value;
|
|
33
|
+
let formula = false;
|
|
34
|
+
if (cursor) {
|
|
35
|
+
value = model.getCellValue(cursor);
|
|
36
|
+
if (isFormula(value)) {
|
|
37
|
+
value = model.graph.mapFunctionBindingFromId(mapFormulaIndicesToRefs(model.sheet, value));
|
|
38
|
+
formula = true;
|
|
39
|
+
} else if (value != null) {
|
|
40
|
+
value = String(value);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
44
|
+
className: "flex shrink-0 justify-between items-center px-4 py-1 text-sm attention-surface border-bs !border-separator"
|
|
45
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
46
|
+
className: "flex gap-4 items-center"
|
|
47
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
48
|
+
className: "flex w-16 items-center font-mono"
|
|
49
|
+
}, range && rangeToA1Notation(range) || cursor && addressToA1Notation(cursor)), /* @__PURE__ */ React.createElement("div", {
|
|
50
|
+
className: "flex gap-2 items-center"
|
|
51
|
+
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
52
|
+
icon: "ph--function--regular",
|
|
53
|
+
classNames: [
|
|
54
|
+
"text-greenText",
|
|
55
|
+
formula ? "visible" : "invisible"
|
|
56
|
+
]
|
|
57
|
+
}), /* @__PURE__ */ React.createElement("span", {
|
|
58
|
+
className: "font-mono"
|
|
59
|
+
}, value))));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// packages/plugins/plugin-sheet/src/components/SheetToolbar/SheetToolbar.tsx
|
|
63
|
+
import React2, { useCallback as useCallback2 } from "react";
|
|
64
|
+
import { createGapSeparator, MenuProvider, ToolbarMenu, useMenuActions } from "@dxos/react-ui-menu";
|
|
65
|
+
|
|
66
|
+
// packages/plugins/plugin-sheet/src/components/SheetToolbar/align.ts
|
|
67
|
+
import { useEffect } from "react";
|
|
68
|
+
import { inRange } from "@dxos/compute";
|
|
69
|
+
import { createMenuAction, createMenuItemGroup } from "@dxos/react-ui-menu";
|
|
70
|
+
var aligns = {
|
|
71
|
+
start: "ph--text-align-left--regular",
|
|
72
|
+
center: "ph--text-align-center--regular",
|
|
73
|
+
end: "ph--text-align-right--regular"
|
|
74
|
+
};
|
|
75
|
+
var useAlignState = (state) => {
|
|
76
|
+
const { cursor, model } = useSheetContext();
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
state[alignKey] = cursor ? model.sheet.ranges?.findLast(({ range, key }) => key === alignKey && inRange(rangeFromIndex(model.sheet, range), cursor))?.value : void 0;
|
|
79
|
+
}, [
|
|
80
|
+
cursor,
|
|
81
|
+
model.sheet
|
|
82
|
+
]);
|
|
83
|
+
};
|
|
84
|
+
var createAlignGroupAction = (value) => createMenuItemGroup("align", {
|
|
85
|
+
label: [
|
|
86
|
+
"align label",
|
|
87
|
+
{
|
|
88
|
+
ns: SHEET_PLUGIN
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
variant: "toggleGroup",
|
|
92
|
+
selectCardinality: "single",
|
|
93
|
+
value: `${alignKey}--${value}`
|
|
94
|
+
});
|
|
95
|
+
var createAlignActions = (value) => Object.entries(aligns).map(([alignValue, icon]) => {
|
|
96
|
+
return createMenuAction(`${alignKey}--${alignValue}`, {
|
|
97
|
+
key: alignKey,
|
|
98
|
+
value: alignValue,
|
|
99
|
+
checked: value === alignValue,
|
|
100
|
+
label: [
|
|
101
|
+
`range value ${alignValue} label`,
|
|
102
|
+
{
|
|
103
|
+
ns: SHEET_PLUGIN
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
icon,
|
|
107
|
+
testId: `grid.toolbar.${alignKey}.${alignValue}`
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
var createAlign = ({ [alignKey]: alignValue }) => {
|
|
111
|
+
const alignGroup = createAlignGroupAction(alignValue);
|
|
112
|
+
const alignActions = createAlignActions(alignValue);
|
|
113
|
+
return {
|
|
114
|
+
nodes: [
|
|
115
|
+
alignGroup,
|
|
116
|
+
...alignActions
|
|
117
|
+
],
|
|
118
|
+
edges: [
|
|
119
|
+
{
|
|
120
|
+
source: "root",
|
|
121
|
+
target: "align"
|
|
122
|
+
},
|
|
123
|
+
...alignActions.map(({ id }) => ({
|
|
124
|
+
source: alignGroup.id,
|
|
125
|
+
target: id
|
|
126
|
+
}))
|
|
127
|
+
]
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
// packages/plugins/plugin-sheet/src/components/SheetToolbar/comment.ts
|
|
132
|
+
import { useEffect as useEffect2, useMemo } from "react";
|
|
133
|
+
import { RefArray } from "@dxos/live-object";
|
|
134
|
+
import { createMenuAction as createMenuAction2 } from "@dxos/react-ui-menu";
|
|
135
|
+
var useCommentState = (state) => {
|
|
136
|
+
const { cursorFallbackRange, model } = useSheetContext();
|
|
137
|
+
const overlapsCommentAnchor = useMemo(() => RefArray.allResolvedTargets(model.sheet.threads ?? []).filter((thread) => thread.status !== "resolved").some((thread) => {
|
|
138
|
+
if (!cursorFallbackRange) {
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
return rangeToIndex(model.sheet, cursorFallbackRange) === thread.anchor;
|
|
142
|
+
}), [
|
|
143
|
+
cursorFallbackRange,
|
|
144
|
+
model.sheet
|
|
145
|
+
]);
|
|
146
|
+
useEffect2(() => {
|
|
147
|
+
state.commentEnabled = !cursorFallbackRange ? "no cursor" : overlapsCommentAnchor ? "selection overlaps existing comment" : "comment";
|
|
148
|
+
}, [
|
|
149
|
+
overlapsCommentAnchor,
|
|
150
|
+
cursorFallbackRange
|
|
151
|
+
]);
|
|
152
|
+
};
|
|
153
|
+
var createCommentAction = (state) => createMenuAction2("comment", {
|
|
154
|
+
key: commentKey,
|
|
155
|
+
testId: "editor.toolbar.comment",
|
|
156
|
+
icon: "ph--chat-text--regular",
|
|
157
|
+
label: [
|
|
158
|
+
`${state.commentEnabled} label`,
|
|
159
|
+
{
|
|
160
|
+
ns: SHEET_PLUGIN
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
disabled: state.commentEnabled !== "comment"
|
|
164
|
+
});
|
|
165
|
+
var createComment = (state) => ({
|
|
166
|
+
nodes: [
|
|
167
|
+
createCommentAction(state)
|
|
168
|
+
],
|
|
169
|
+
edges: [
|
|
170
|
+
{
|
|
171
|
+
source: "root",
|
|
172
|
+
target: "comment"
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
// packages/plugins/plugin-sheet/src/components/SheetToolbar/style.ts
|
|
178
|
+
import { useEffect as useEffect3 } from "react";
|
|
179
|
+
import { inRange as inRange2 } from "@dxos/compute";
|
|
180
|
+
import { createMenuAction as createMenuAction3, createMenuItemGroup as createMenuItemGroup2 } from "@dxos/react-ui-menu";
|
|
181
|
+
var styles = {
|
|
182
|
+
highlight: "ph--highlighter--regular",
|
|
183
|
+
softwrap: "ph--paragraph--regular"
|
|
184
|
+
};
|
|
185
|
+
var useStyleState = (state) => {
|
|
186
|
+
const { cursorFallbackRange, model } = useSheetContext();
|
|
187
|
+
useEffect3(() => {
|
|
188
|
+
state.highlight = false;
|
|
189
|
+
state.softwrap = false;
|
|
190
|
+
if (cursorFallbackRange && model.sheet.ranges) {
|
|
191
|
+
model.sheet.ranges.filter(({ range, key }) => key === "style" && inRange2(rangeFromIndex(model.sheet, range), cursorFallbackRange.from)).forEach(({ value }) => {
|
|
192
|
+
state[value] = true;
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}, [
|
|
196
|
+
cursorFallbackRange,
|
|
197
|
+
model.sheet
|
|
198
|
+
]);
|
|
199
|
+
};
|
|
200
|
+
var createStyleGroup = (state) => {
|
|
201
|
+
return createMenuItemGroup2("style", {
|
|
202
|
+
variant: "toggleGroup",
|
|
203
|
+
selectCardinality: "multiple",
|
|
204
|
+
value: Object.keys(styles).filter((key) => !!state[key]).map((styleValue) => `style--${styleValue}`)
|
|
205
|
+
});
|
|
206
|
+
};
|
|
207
|
+
var createStyleActions = (state) => Object.entries(styles).map(([styleValue, icon]) => {
|
|
208
|
+
return createMenuAction3(`style--${styleValue}`, {
|
|
209
|
+
key: "style",
|
|
210
|
+
value: styleValue,
|
|
211
|
+
icon,
|
|
212
|
+
label: [
|
|
213
|
+
`range value ${styleValue} label`,
|
|
214
|
+
{
|
|
215
|
+
ns: SHEET_PLUGIN
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
checked: !!state[styleValue]
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
var createStyle = (state) => {
|
|
222
|
+
const styleGroupAction = createStyleGroup(state);
|
|
223
|
+
const styleActions = createStyleActions(state);
|
|
224
|
+
return {
|
|
225
|
+
nodes: [
|
|
226
|
+
styleGroupAction,
|
|
227
|
+
...styleActions
|
|
228
|
+
],
|
|
229
|
+
edges: [
|
|
230
|
+
{
|
|
231
|
+
source: "root",
|
|
232
|
+
target: "style"
|
|
233
|
+
},
|
|
234
|
+
...styleActions.map(({ id }) => ({
|
|
235
|
+
source: styleGroupAction.id,
|
|
236
|
+
target: id
|
|
237
|
+
}))
|
|
238
|
+
]
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
// packages/plugins/plugin-sheet/src/components/SheetToolbar/useToolbarAction.ts
|
|
243
|
+
import { useCallback } from "react";
|
|
244
|
+
import { createIntent, useIntentDispatcher } from "@dxos/app-framework";
|
|
245
|
+
import { inRange as inRange3 } from "@dxos/compute";
|
|
246
|
+
import { ThreadAction } from "@dxos/plugin-thread/types";
|
|
247
|
+
var useToolbarAction = (state) => {
|
|
248
|
+
const { model, cursorFallbackRange, cursor } = useSheetContext();
|
|
249
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
250
|
+
return useCallback((action) => {
|
|
251
|
+
const { key, value } = action.properties;
|
|
252
|
+
if (cursorFallbackRange) {
|
|
253
|
+
const index = model.sheet.ranges?.findIndex((range) => range.key === key && inRange3(rangeFromIndex(model.sheet, range.range), cursorFallbackRange.from)) ?? -1;
|
|
254
|
+
const nextRangeEntity = {
|
|
255
|
+
range: rangeToIndex(model.sheet, cursorFallbackRange),
|
|
256
|
+
key,
|
|
257
|
+
value
|
|
258
|
+
};
|
|
259
|
+
switch (key) {
|
|
260
|
+
case "alignment":
|
|
261
|
+
if (index < 0) {
|
|
262
|
+
model.sheet.ranges?.push(nextRangeEntity);
|
|
263
|
+
state[alignKey] = value;
|
|
264
|
+
} else if (model.sheet.ranges[index].value === value) {
|
|
265
|
+
model.sheet.ranges?.splice(index, 1);
|
|
266
|
+
state[alignKey] = void 0;
|
|
267
|
+
} else {
|
|
268
|
+
model.sheet.ranges?.splice(index, 1, nextRangeEntity);
|
|
269
|
+
state[alignKey] = value;
|
|
270
|
+
}
|
|
271
|
+
break;
|
|
272
|
+
case "style":
|
|
273
|
+
if (model.sheet.ranges.filter(({ range, key: rangeKey }) => rangeKey === "style" && inRange3(rangeFromIndex(model.sheet, range), cursorFallbackRange.from)).some(({ value: rangeValue }) => rangeValue === value)) {
|
|
274
|
+
if (index >= 0) {
|
|
275
|
+
model.sheet.ranges?.splice(index, 1);
|
|
276
|
+
}
|
|
277
|
+
state[value] = false;
|
|
278
|
+
} else {
|
|
279
|
+
model.sheet.ranges?.push(nextRangeEntity);
|
|
280
|
+
state[value] = true;
|
|
281
|
+
}
|
|
282
|
+
break;
|
|
283
|
+
case "comment": {
|
|
284
|
+
const cellContent = model.getCellText(cursorFallbackRange.from);
|
|
285
|
+
void dispatch(createIntent(ThreadAction.Create, {
|
|
286
|
+
cursor: completeCellRangeToThreadCursor(cursorFallbackRange),
|
|
287
|
+
name: cellContent,
|
|
288
|
+
subject: model.sheet
|
|
289
|
+
}));
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}, [
|
|
294
|
+
model.sheet,
|
|
295
|
+
cursorFallbackRange,
|
|
296
|
+
cursor,
|
|
297
|
+
dispatch
|
|
298
|
+
]);
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
// packages/plugins/plugin-sheet/src/components/SheetToolbar/useToolbarState.ts
|
|
302
|
+
import { useMemo as useMemo2 } from "react";
|
|
303
|
+
import { create } from "@dxos/live-object";
|
|
304
|
+
var useToolbarState = (initialState = {}) => {
|
|
305
|
+
return useMemo2(() => create(initialState), []);
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
// packages/plugins/plugin-sheet/src/components/SheetToolbar/SheetToolbar.tsx
|
|
309
|
+
var createToolbarActions = (state) => {
|
|
310
|
+
const align = createAlign(state);
|
|
311
|
+
const style = createStyle(state);
|
|
312
|
+
const gap = createGapSeparator();
|
|
313
|
+
const comment = createComment(state);
|
|
314
|
+
return {
|
|
315
|
+
nodes: [
|
|
316
|
+
...align.nodes,
|
|
317
|
+
...style.nodes,
|
|
318
|
+
...gap.nodes,
|
|
319
|
+
...comment.nodes
|
|
320
|
+
],
|
|
321
|
+
edges: [
|
|
322
|
+
...align.edges,
|
|
323
|
+
...style.edges,
|
|
324
|
+
...gap.edges,
|
|
325
|
+
...comment.edges
|
|
326
|
+
]
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
var SheetToolbar = ({ attendableId, classNames }) => {
|
|
330
|
+
const state = useToolbarState({});
|
|
331
|
+
useAlignState(state);
|
|
332
|
+
useStyleState(state);
|
|
333
|
+
useCommentState(state);
|
|
334
|
+
const actionsCreator = useCallback2(() => createToolbarActions(state), [
|
|
335
|
+
state
|
|
336
|
+
]);
|
|
337
|
+
const menu = useMenuActions(actionsCreator);
|
|
338
|
+
const handleAction = useToolbarAction(state);
|
|
339
|
+
return /* @__PURE__ */ React2.createElement(MenuProvider, {
|
|
340
|
+
...menu,
|
|
341
|
+
attendableId,
|
|
342
|
+
onAction: handleAction
|
|
343
|
+
}, /* @__PURE__ */ React2.createElement(ToolbarMenu, {
|
|
344
|
+
classNames
|
|
345
|
+
}));
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
// packages/plugins/plugin-sheet/src/components/SheetContainer/SheetContainer.tsx
|
|
349
|
+
var SheetContainer = ({ space, sheet, role, ignoreAttention }) => {
|
|
350
|
+
const graph = useComputeGraph(space);
|
|
351
|
+
return graph ? /* @__PURE__ */ React3.createElement(SheetProvider, {
|
|
352
|
+
sheet,
|
|
353
|
+
graph,
|
|
354
|
+
ignoreAttention
|
|
355
|
+
}, /* @__PURE__ */ React3.createElement(StackItem.Content, {
|
|
356
|
+
toolbar: true,
|
|
357
|
+
statusbar: true,
|
|
358
|
+
...role === "section" && {
|
|
359
|
+
classNames: "aspect-video"
|
|
360
|
+
}
|
|
361
|
+
}, /* @__PURE__ */ React3.createElement(SheetToolbar, {
|
|
362
|
+
attendableId: fullyQualifiedId(sheet)
|
|
363
|
+
}), /* @__PURE__ */ React3.createElement(GridSheet, null), /* @__PURE__ */ React3.createElement(FunctionEditor, null))) : null;
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
// packages/plugins/plugin-sheet/src/components/SheetContainer/index.ts
|
|
367
|
+
var SheetContainer_default = SheetContainer;
|
|
368
|
+
export {
|
|
369
|
+
SheetContainer_default as default
|
|
370
|
+
};
|
|
371
|
+
//# sourceMappingURL=SheetContainer-QEEFORIC.mjs.map
|