@dxos/plugin-sheet 0.8.4-main.3eb6e50203 → 0.8.4-main.4a85c3132b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/RangeList-S3SHV7T6.mjs +53 -0
- package/dist/lib/browser/RangeList-S3SHV7T6.mjs.map +7 -0
- package/dist/lib/browser/{chunk-EDWHV64N.mjs → SheetContainer-I3NFVVDQ.mjs} +535 -203
- package/dist/lib/browser/SheetContainer-I3NFVVDQ.mjs.map +7 -0
- package/dist/lib/browser/{anchor-sort-AMMLA66W.mjs → anchor-sort-DZ3IHHJJ.mjs} +2 -2
- package/dist/lib/browser/{chunk-IFLWVS2V.mjs → chunk-NNWF7EKC.mjs} +10 -10
- package/dist/lib/browser/{chunk-IFLWVS2V.mjs.map → chunk-NNWF7EKC.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-KE3AKN5W.mjs → chunk-S445OQGW.mjs} +5 -5
- package/dist/lib/browser/{chunk-KE3AKN5W.mjs.map → chunk-S445OQGW.mjs.map} +3 -3
- package/dist/lib/browser/{compute-graph-registry-RC5L7RE4.mjs → compute-graph-registry-W6HO2G3P.mjs} +2 -2
- package/dist/lib/browser/index.mjs +6 -6
- package/dist/lib/browser/{markdown-D2T2DOVX.mjs → markdown-S6GVLHB4.mjs} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{operation-resolver-P2RX75DA.mjs → operation-resolver-Z4X4UWNR.mjs} +4 -4
- package/dist/lib/browser/operation-resolver-Z4X4UWNR.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-45CRAB5G.mjs → react-surface-KIU6DGKW.mjs} +13 -13
- package/dist/lib/browser/react-surface-KIU6DGKW.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node-esm/RangeList-IB23OJK2.mjs +54 -0
- package/dist/lib/node-esm/RangeList-IB23OJK2.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-AYSEWH7N.mjs → SheetContainer-KUXNCSFP.mjs} +535 -203
- package/dist/lib/node-esm/SheetContainer-KUXNCSFP.mjs.map +7 -0
- package/dist/lib/node-esm/{anchor-sort-VHMBRX2E.mjs → anchor-sort-24OXMOSX.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-PPOYR7DK.mjs → chunk-M52YLLWU.mjs} +10 -10
- package/dist/lib/node-esm/{chunk-PPOYR7DK.mjs.map → chunk-M52YLLWU.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-6J5L47IB.mjs → chunk-NKZ3O4OR.mjs} +5 -5
- package/dist/lib/node-esm/{chunk-6J5L47IB.mjs.map → chunk-NKZ3O4OR.mjs.map} +3 -3
- package/dist/lib/node-esm/{compute-graph-registry-ZGXVLVGD.mjs → compute-graph-registry-2C3Y2RPQ.mjs} +2 -2
- package/dist/lib/node-esm/index.mjs +6 -6
- package/dist/lib/node-esm/{markdown-PTV72DLO.mjs → markdown-YT5KJTQT.mjs} +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{operation-resolver-WPIWQ5IO.mjs → operation-resolver-7VD2YXSQ.mjs} +4 -4
- package/dist/lib/node-esm/operation-resolver-7VD2YXSQ.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-ITV2L6HK.mjs → react-surface-7FZAE3S7.mjs} +13 -13
- package/dist/lib/node-esm/react-surface-7FZAE3S7.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts +1 -1
- package/dist/types/src/capabilities/compute-graph-registry/compute-graph-registry.d.ts +1 -1
- package/dist/types/src/capabilities/markdown/markdown.d.ts +1 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/Sheet/Sheet.d.ts +11 -0
- package/dist/types/src/components/Sheet/Sheet.d.ts.map +1 -0
- package/dist/types/src/components/Sheet/index.d.ts +2 -0
- package/dist/types/src/components/Sheet/index.d.ts.map +1 -0
- package/dist/types/src/components/SheetContent/SheetCellEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/SheetContent/SheetContent.d.ts +5 -0
- package/dist/types/src/components/SheetContent/SheetContent.d.ts.map +1 -0
- package/dist/types/src/components/{GridSheet/GridSheet.stories.d.ts → SheetContent/SheetContent.stories.d.ts} +2 -2
- 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/SheetContent/util.d.ts.map +1 -0
- package/dist/types/src/components/{SheetContext/SheetContext.d.ts → SheetRoot/SheetRoot.d.ts} +4 -4
- 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 +5 -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 +6 -3
- package/dist/types/src/components/SheetToolbar/SheetToolbar.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/{components → containers}/RangeList/RangeList.d.ts.map +1 -1
- package/dist/types/src/containers/RangeList/index.d.ts +3 -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/{components → containers}/SheetContainer/SheetContainer.stories.d.ts +1 -2
- package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/SheetContainer/index.d.ts.map +1 -1
- 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.stories.d.ts.map +1 -1
- package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
- package/dist/types/src/testing/testing.d.ts +1 -1
- package/dist/types/src/types/Sheet.d.ts +1 -1
- package/dist/types/src/types/types.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +56 -57
- package/src/capabilities/operation-resolver/operation-resolver.ts +2 -2
- package/src/capabilities/react-surface/react-surface.tsx +7 -4
- package/src/components/ComputeGraph/compute-graph.stories.tsx +1 -1
- package/src/components/Sheet/Sheet.tsx +20 -0
- package/src/components/Sheet/index.ts +5 -0
- package/src/components/{GridSheet → SheetContent}/SheetCellEditor.stories.tsx +1 -1
- package/src/components/{GridSheet/GridSheet.stories.tsx → SheetContent/SheetContent.stories.tsx} +11 -10
- package/src/components/{GridSheet/GridSheet.tsx → SheetContent/SheetContent.tsx} +12 -9
- package/src/components/{RangeList → SheetContent}/index.ts +1 -1
- package/src/components/{GridSheet → SheetContent}/util.ts +3 -3
- package/src/components/{SheetContext/SheetContext.tsx → SheetRoot/SheetRoot.tsx} +36 -34
- package/src/components/{GridSheet → SheetRoot}/index.ts +1 -1
- package/src/components/{FunctionEditor/FunctionEditor.tsx → SheetStatusbar/SheetStatusbar.tsx} +11 -6
- package/src/components/{FunctionEditor → SheetStatusbar}/index.ts +1 -1
- package/src/components/SheetToolbar/SheetToolbar.stories.tsx +4 -4
- package/src/components/SheetToolbar/SheetToolbar.tsx +10 -9
- package/src/components/SheetToolbar/align.ts +3 -3
- package/src/components/SheetToolbar/style.ts +3 -3
- package/src/components/index.ts +1 -7
- package/src/{components → containers}/RangeList/RangeList.tsx +7 -5
- package/src/containers/RangeList/index.ts +7 -0
- package/src/{components → containers}/SheetContainer/SheetContainer.stories.tsx +11 -30
- package/src/containers/SheetContainer/SheetContainer.tsx +57 -0
- package/src/{components → containers}/SheetContainer/index.ts +1 -1
- package/src/containers/index.ts +8 -0
- package/src/extensions/compute.stories.tsx +11 -10
- package/src/extensions/editor/sheet-extension.ts +10 -10
- package/src/integrations/thread-ranges.ts +0 -1
- package/src/playwright/playwright.config.ts +1 -1
- package/src/playwright/sheet.spec.ts +1 -1
- package/src/types/sheet-range-types.ts +3 -3
- package/src/types/types.ts +1 -1
- package/dist/lib/browser/SheetContainer-6DNFC4TY.mjs +0 -397
- package/dist/lib/browser/SheetContainer-6DNFC4TY.mjs.map +0 -7
- package/dist/lib/browser/chunk-EDWHV64N.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-P2RX75DA.mjs.map +0 -7
- package/dist/lib/browser/react-surface-45CRAB5G.mjs.map +0 -7
- package/dist/lib/node-esm/SheetContainer-7H5R7M54.mjs +0 -398
- package/dist/lib/node-esm/SheetContainer-7H5R7M54.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AYSEWH7N.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-WPIWQ5IO.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-ITV2L6HK.mjs.map +0 -7
- 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.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/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 -10
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +0 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.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/src/components/SheetContainer/SheetContainer.tsx +0 -48
- package/src/components/SheetContext/index.ts +0 -5
- /package/dist/lib/browser/{anchor-sort-AMMLA66W.mjs.map → anchor-sort-DZ3IHHJJ.mjs.map} +0 -0
- /package/dist/lib/browser/{compute-graph-registry-RC5L7RE4.mjs.map → compute-graph-registry-W6HO2G3P.mjs.map} +0 -0
- /package/dist/lib/browser/{markdown-D2T2DOVX.mjs.map → markdown-S6GVLHB4.mjs.map} +0 -0
- /package/dist/lib/node-esm/{anchor-sort-VHMBRX2E.mjs.map → anchor-sort-24OXMOSX.mjs.map} +0 -0
- /package/dist/lib/node-esm/{compute-graph-registry-ZGXVLVGD.mjs.map → compute-graph-registry-2C3Y2RPQ.mjs.map} +0 -0
- /package/dist/lib/node-esm/{markdown-PTV72DLO.mjs.map → markdown-YT5KJTQT.mjs.map} +0 -0
- /package/dist/types/src/components/{GridSheet → SheetContent}/SheetCellEditor.stories.d.ts +0 -0
- /package/dist/types/src/components/{GridSheet → SheetContent}/util.d.ts +0 -0
- /package/dist/types/src/{components → containers}/RangeList/RangeList.d.ts +0 -0
- /package/dist/types/src/{components → containers}/SheetContainer/index.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-sheet",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.4a85c3132b",
|
|
4
4
|
"description": "Braneframe sketch plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
"type": "module",
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
|
17
|
+
"source": "./src/index.ts",
|
|
17
18
|
"browser": "./dist/lib/browser/index.mjs",
|
|
18
19
|
"node": "./dist/lib/node-esm/index.mjs",
|
|
19
|
-
"source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/src/index.d.ts"
|
|
21
21
|
},
|
|
22
22
|
"./types": {
|
|
23
|
+
"source": "./src/types/index.ts",
|
|
23
24
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
24
25
|
"node": "./dist/lib/node-esm/types/index.mjs",
|
|
25
|
-
"source": "./src/types/index.ts",
|
|
26
26
|
"types": "./dist/types/src/types/index.d.ts"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
@@ -58,46 +58,46 @@
|
|
|
58
58
|
"re-resizable": "^6.9.17",
|
|
59
59
|
"react-markdown": "^10.1.0",
|
|
60
60
|
"react-resize-detector": "^11.0.1",
|
|
61
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
62
|
-
"@dxos/async": "0.8.4-main.
|
|
63
|
-
"@dxos/app-toolkit": "0.8.4-main.
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/debug": "0.8.4-main.
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/lit-grid": "0.8.4-main.
|
|
74
|
-
"@dxos/log": "0.8.4-main.
|
|
75
|
-
"@dxos/operation": "0.8.4-main.
|
|
76
|
-
"@dxos/plugin-attention": "0.8.4-main.
|
|
77
|
-
"@dxos/plugin-
|
|
78
|
-
"@dxos/plugin-
|
|
79
|
-
"@dxos/plugin-
|
|
80
|
-
"@dxos/plugin-
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/plugin-
|
|
83
|
-
"@dxos/plugin-
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/react-client": "0.8.4-main.
|
|
87
|
-
"@dxos/react-
|
|
88
|
-
"@dxos/
|
|
89
|
-
"@dxos/react-ui-
|
|
90
|
-
"@dxos/react-ui-
|
|
91
|
-
"@dxos/react-ui-
|
|
92
|
-
"@dxos/react-ui-
|
|
93
|
-
"@dxos/react-ui-
|
|
94
|
-
"@dxos/react-ui-
|
|
95
|
-
"@dxos/
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/
|
|
61
|
+
"@dxos/app-framework": "0.8.4-main.4a85c3132b",
|
|
62
|
+
"@dxos/async": "0.8.4-main.4a85c3132b",
|
|
63
|
+
"@dxos/app-toolkit": "0.8.4-main.4a85c3132b",
|
|
64
|
+
"@dxos/context": "0.8.4-main.4a85c3132b",
|
|
65
|
+
"@dxos/crypto": "0.8.4-main.4a85c3132b",
|
|
66
|
+
"@dxos/client": "0.8.4-main.4a85c3132b",
|
|
67
|
+
"@dxos/debug": "0.8.4-main.4a85c3132b",
|
|
68
|
+
"@dxos/echo": "0.8.4-main.4a85c3132b",
|
|
69
|
+
"@dxos/invariant": "0.8.4-main.4a85c3132b",
|
|
70
|
+
"@dxos/echo-db": "0.8.4-main.4a85c3132b",
|
|
71
|
+
"@dxos/functions": "0.8.4-main.4a85c3132b",
|
|
72
|
+
"@dxos/compute": "0.8.4-main.4a85c3132b",
|
|
73
|
+
"@dxos/lit-grid": "0.8.4-main.4a85c3132b",
|
|
74
|
+
"@dxos/log": "0.8.4-main.4a85c3132b",
|
|
75
|
+
"@dxos/operation": "0.8.4-main.4a85c3132b",
|
|
76
|
+
"@dxos/plugin-attention": "0.8.4-main.4a85c3132b",
|
|
77
|
+
"@dxos/plugin-client": "0.8.4-main.4a85c3132b",
|
|
78
|
+
"@dxos/plugin-automation": "0.8.4-main.4a85c3132b",
|
|
79
|
+
"@dxos/plugin-graph": "0.8.4-main.4a85c3132b",
|
|
80
|
+
"@dxos/plugin-deck": "0.8.4-main.4a85c3132b",
|
|
81
|
+
"@dxos/plugin-markdown": "0.8.4-main.4a85c3132b",
|
|
82
|
+
"@dxos/plugin-script": "0.8.4-main.4a85c3132b",
|
|
83
|
+
"@dxos/plugin-space": "0.8.4-main.4a85c3132b",
|
|
84
|
+
"@dxos/keys": "0.8.4-main.4a85c3132b",
|
|
85
|
+
"@dxos/plugin-stack": "0.8.4-main.4a85c3132b",
|
|
86
|
+
"@dxos/react-client": "0.8.4-main.4a85c3132b",
|
|
87
|
+
"@dxos/react-hooks": "0.8.4-main.4a85c3132b",
|
|
88
|
+
"@dxos/plugin-thread": "0.8.4-main.4a85c3132b",
|
|
89
|
+
"@dxos/react-ui-attention": "0.8.4-main.4a85c3132b",
|
|
90
|
+
"@dxos/react-ui-form": "0.8.4-main.4a85c3132b",
|
|
91
|
+
"@dxos/react-ui-editor": "0.8.4-main.4a85c3132b",
|
|
92
|
+
"@dxos/react-ui-grid": "0.8.4-main.4a85c3132b",
|
|
93
|
+
"@dxos/react-ui-list": "0.8.4-main.4a85c3132b",
|
|
94
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.4a85c3132b",
|
|
95
|
+
"@dxos/react-ui-menu": "0.8.4-main.4a85c3132b",
|
|
96
|
+
"@dxos/react-ui-stack": "0.8.4-main.4a85c3132b",
|
|
97
|
+
"@dxos/schema": "0.8.4-main.4a85c3132b",
|
|
98
|
+
"@dxos/types": "0.8.4-main.4a85c3132b",
|
|
99
|
+
"@dxos/ui-editor": "0.8.4-main.4a85c3132b",
|
|
100
|
+
"@dxos/util": "0.8.4-main.4a85c3132b"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
103
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -107,21 +107,20 @@
|
|
|
107
107
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
108
108
|
"@types/react": "~19.2.7",
|
|
109
109
|
"@types/react-dom": "~19.2.3",
|
|
110
|
-
"@types/react-window": "^2.0.0",
|
|
111
110
|
"effect": "3.19.16",
|
|
112
111
|
"react": "~19.2.3",
|
|
113
112
|
"react-dom": "~19.2.3",
|
|
114
|
-
"vite": "7.1.
|
|
115
|
-
"@dxos/lit-grid": "0.8.4-main.
|
|
116
|
-
"@dxos/
|
|
117
|
-
"@dxos/random": "0.8.4-main.
|
|
118
|
-
"@dxos/
|
|
119
|
-
"@dxos/
|
|
120
|
-
"@dxos/react-ui
|
|
121
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
122
|
-
"@dxos/
|
|
123
|
-
"@dxos/
|
|
124
|
-
"@dxos/ui-types": "0.8.4-main.
|
|
113
|
+
"vite": "^7.1.11",
|
|
114
|
+
"@dxos/lit-grid": "0.8.4-main.4a85c3132b",
|
|
115
|
+
"@dxos/plugin-testing": "0.8.4-main.4a85c3132b",
|
|
116
|
+
"@dxos/random": "0.8.4-main.4a85c3132b",
|
|
117
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.4a85c3132b",
|
|
118
|
+
"@dxos/echo-generator": "0.8.4-main.4a85c3132b",
|
|
119
|
+
"@dxos/react-ui": "0.8.4-main.4a85c3132b",
|
|
120
|
+
"@dxos/storybook-utils": "0.8.4-main.4a85c3132b",
|
|
121
|
+
"@dxos/ui-theme": "0.8.4-main.4a85c3132b",
|
|
122
|
+
"@dxos/test-utils": "0.8.4-main.4a85c3132b",
|
|
123
|
+
"@dxos/ui-types": "0.8.4-main.4a85c3132b"
|
|
125
124
|
},
|
|
126
125
|
"peerDependencies": {
|
|
127
126
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -129,8 +128,8 @@
|
|
|
129
128
|
"effect": "3.19.16",
|
|
130
129
|
"react": "~19.2.3",
|
|
131
130
|
"react-dom": "~19.2.3",
|
|
132
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
133
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
131
|
+
"@dxos/react-ui": "0.8.4-main.4a85c3132b",
|
|
132
|
+
"@dxos/ui-theme": "0.8.4-main.4a85c3132b"
|
|
134
133
|
},
|
|
135
134
|
"publishConfig": {
|
|
136
135
|
"access": "public"
|
|
@@ -7,7 +7,7 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { Capabilities, Capability, UndoMapping } from '@dxos/app-framework';
|
|
8
8
|
import { Obj, Ref, Type } from '@dxos/echo';
|
|
9
9
|
import { OperationResolver } from '@dxos/operation';
|
|
10
|
-
import {
|
|
10
|
+
import { ManagedCollection } from '@dxos/schema';
|
|
11
11
|
|
|
12
12
|
import { meta } from '../../meta';
|
|
13
13
|
import { Sheet, SheetOperation } from '../../types';
|
|
@@ -33,7 +33,7 @@ export default Capability.makeModule(() =>
|
|
|
33
33
|
OperationResolver.make({
|
|
34
34
|
operation: SheetOperation.OnCreateSpace,
|
|
35
35
|
handler: Effect.fnUntraced(function* ({ rootCollection }) {
|
|
36
|
-
const collection =
|
|
36
|
+
const collection = ManagedCollection.makeManagedCollection({ key: Type.getTypename(Sheet.Sheet) });
|
|
37
37
|
Obj.change(rootCollection, (c) => {
|
|
38
38
|
c.objects.push(Ref.make(collection));
|
|
39
39
|
});
|
|
@@ -10,7 +10,7 @@ import { Surface, useCapability } from '@dxos/app-framework/ui';
|
|
|
10
10
|
import { Obj } from '@dxos/echo';
|
|
11
11
|
import { getSpace } from '@dxos/react-client/echo';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { RangeList, SheetContainer } from '../../containers';
|
|
14
14
|
import { meta } from '../../meta';
|
|
15
15
|
import { Sheet, SheetCapabilities } from '../../types';
|
|
16
16
|
|
|
@@ -26,9 +26,12 @@ export default Capability.makeModule(() =>
|
|
|
26
26
|
const computeGraphRegistry = useCapability(SheetCapabilities.ComputeGraphRegistry);
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
<SheetContainer
|
|
30
|
+
role={role}
|
|
31
|
+
subject={data.subject}
|
|
32
|
+
space={getSpace(data.subject)!}
|
|
33
|
+
registry={computeGraphRegistry}
|
|
34
|
+
/>
|
|
32
35
|
);
|
|
33
36
|
},
|
|
34
37
|
}),
|
|
@@ -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
|
+
};
|
package/src/components/{GridSheet/GridSheet.stories.tsx → SheetContent/SheetContent.stories.tsx}
RENAMED
|
@@ -10,15 +10,15 @@ import { testFunctionPlugins } from '@dxos/compute/testing';
|
|
|
10
10
|
import { OperationPlugin, RuntimePlugin } from '@dxos/plugin-testing';
|
|
11
11
|
import { useSpace } from '@dxos/react-client/echo';
|
|
12
12
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
13
|
-
import { withTheme } from '@dxos/react-ui/testing';
|
|
13
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
14
14
|
|
|
15
15
|
import { createTestCells, useTestSheet, withComputeGraphDecorator } from '../../testing';
|
|
16
16
|
import { translations } from '../../translations';
|
|
17
17
|
import { Sheet } from '../../types';
|
|
18
18
|
import { useComputeGraph } from '../ComputeGraph';
|
|
19
|
-
import {
|
|
19
|
+
import { SheetRoot } from '../SheetRoot';
|
|
20
20
|
|
|
21
|
-
import {
|
|
21
|
+
import { SheetContent } from './SheetContent';
|
|
22
22
|
|
|
23
23
|
export const Basic = () => {
|
|
24
24
|
const space = useSpace();
|
|
@@ -29,19 +29,20 @@ export const Basic = () => {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
|
-
<
|
|
33
|
-
<div role='none' className='grid
|
|
34
|
-
<
|
|
32
|
+
<SheetRoot graph={graph} sheet={sheet} ignoreAttention>
|
|
33
|
+
<div role='none' className='grid h-full w-full'>
|
|
34
|
+
<SheetContent />
|
|
35
35
|
</div>
|
|
36
|
-
</
|
|
36
|
+
</SheetRoot>
|
|
37
37
|
);
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
const meta = {
|
|
41
|
-
title: 'plugins/plugin-sheet/
|
|
42
|
-
component:
|
|
41
|
+
title: 'plugins/plugin-sheet/components/SheetContent',
|
|
42
|
+
component: SheetContent,
|
|
43
43
|
decorators: [
|
|
44
44
|
withTheme(),
|
|
45
|
+
withLayout({ layout: 'fullscreen' }),
|
|
45
46
|
withClientProvider({ types: [Sheet.Sheet], createSpace: true }),
|
|
46
47
|
withComputeGraphDecorator({ plugins: testFunctionPlugins }),
|
|
47
48
|
withPluginManager({
|
|
@@ -52,7 +53,7 @@ const meta = {
|
|
|
52
53
|
layout: 'fullscreen',
|
|
53
54
|
translations,
|
|
54
55
|
},
|
|
55
|
-
} satisfies Meta<typeof
|
|
56
|
+
} satisfies Meta<typeof SheetContent>;
|
|
56
57
|
|
|
57
58
|
export default meta;
|
|
58
59
|
|
|
@@ -17,7 +17,7 @@ import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
|
17
17
|
import { type CellRange, rangeToA1Notation } from '@dxos/compute';
|
|
18
18
|
import { Obj } from '@dxos/echo';
|
|
19
19
|
import { defaultColSize, defaultRowSize } from '@dxos/lit-grid';
|
|
20
|
-
import { DropdownMenu, Icon, useTranslation } from '@dxos/react-ui';
|
|
20
|
+
import { type ComposableProps, DropdownMenu, Icon, useTranslation } from '@dxos/react-ui';
|
|
21
21
|
import { useAttention } from '@dxos/react-ui-attention';
|
|
22
22
|
import {
|
|
23
23
|
type DxGridCellIndex,
|
|
@@ -32,12 +32,13 @@ import {
|
|
|
32
32
|
editorKeys,
|
|
33
33
|
parseCellIndex,
|
|
34
34
|
} from '@dxos/react-ui-grid';
|
|
35
|
+
import { mx, useComposableProps } from '@dxos/ui-theme';
|
|
35
36
|
|
|
36
37
|
import { type RangeController, rangeExtension, sheetExtension } from '../../extensions';
|
|
37
38
|
import { useSelectThreadOnCellFocus, useUpdateFocusedCellOnThreadSelection } from '../../integrations';
|
|
38
39
|
import { meta } from '../../meta';
|
|
39
40
|
import { DEFAULT_COLS, DEFAULT_ROWS, SheetOperation } from '../../types';
|
|
40
|
-
import { useSheetContext } from '../
|
|
41
|
+
import { useSheetContext } from '../SheetRoot';
|
|
41
42
|
|
|
42
43
|
import { colLabelCell, rowLabelCell, useSheetModelDxGridProps } from './util';
|
|
43
44
|
|
|
@@ -69,10 +70,13 @@ const sheetRowDefault = {
|
|
|
69
70
|
grid: { size: defaultRowSize, resizeable: true },
|
|
70
71
|
};
|
|
71
72
|
|
|
72
|
-
export
|
|
73
|
+
export type SheetContentProps = ComposableProps<React.HTMLAttributes<HTMLDivElement>>;
|
|
74
|
+
|
|
75
|
+
export const SheetContent = (props: SheetContentProps) => {
|
|
73
76
|
const { t } = useTranslation(meta.id);
|
|
74
77
|
const { id, model, editing, setCursor, setRange, cursor, cursorFallbackRange, activeRefs, ignoreAttention } =
|
|
75
78
|
useSheetContext();
|
|
79
|
+
|
|
76
80
|
// NOTE(thure): using `useState` instead of `useRef` works with refs provided by `@lit/react` and gives us
|
|
77
81
|
// a reliable dependency for `useEffect` whereas `useLayoutEffect` does not guarantee the element will be defined.
|
|
78
82
|
const [dxGrid, setDxGrid] = useState<DxGridElement | null>(null);
|
|
@@ -80,6 +84,7 @@ export const GridSheet = () => {
|
|
|
80
84
|
const { invokePromise } = useOperationInvoker();
|
|
81
85
|
const rangeController = useRef<RangeController>(null);
|
|
82
86
|
const { hasAttention } = useAttention(id);
|
|
87
|
+
const { className, ...rest } = useComposableProps(props);
|
|
83
88
|
|
|
84
89
|
const handleFocus = useCallback(
|
|
85
90
|
(event: FocusEvent) => {
|
|
@@ -317,19 +322,20 @@ export const GridSheet = () => {
|
|
|
317
322
|
useSelectThreadOnCellFocus();
|
|
318
323
|
|
|
319
324
|
return (
|
|
320
|
-
|
|
321
|
-
<div role='none' className='relative min-bs-0 [&_.cm-editor]:!border-lb [&_.cm-editor]:!border-transparent'>
|
|
325
|
+
<div {...rest} role='none' className={mx('relative min-h-0', className)}>
|
|
322
326
|
<GridCellEditor getCellContent={getCellContent} extensions={extensions} onBlur={handleBlur} />
|
|
323
327
|
<Grid.Content
|
|
328
|
+
className='[--dx-grid-base:var(--base-surface)] [&_.dx-grid]:absolute [&_.dx-grid]:inset-0'
|
|
324
329
|
initialCells={initialCells}
|
|
325
330
|
limitColumns={DEFAULT_COLS}
|
|
326
331
|
limitRows={DEFAULT_ROWS}
|
|
327
332
|
columns={columns}
|
|
328
333
|
rows={rows}
|
|
329
|
-
// TODO(burdon): `col` vs. `column`?
|
|
330
334
|
columnDefault={sheetColDefault}
|
|
331
335
|
rowDefault={sheetRowDefault}
|
|
336
|
+
activeRefs={activeRefs}
|
|
332
337
|
frozen={frozen}
|
|
338
|
+
overscroll='trap'
|
|
333
339
|
onAxisResize={handleAxisResize}
|
|
334
340
|
onSelect={handleSelect}
|
|
335
341
|
onFocus={handleFocus}
|
|
@@ -337,9 +343,6 @@ export const GridSheet = () => {
|
|
|
337
343
|
onKeyDown={handleKeyDown}
|
|
338
344
|
onContextMenu={handleContextMenu}
|
|
339
345
|
onClick={handleClick}
|
|
340
|
-
overscroll='trap'
|
|
341
|
-
className='[--dx-grid-base:var(--baseSurface)] [&_.dx-grid]:absolute [&_.dx-grid]:inset-0'
|
|
342
|
-
activeRefs={activeRefs}
|
|
343
346
|
ref={setDxGrid}
|
|
344
347
|
/>
|
|
345
348
|
<DropdownMenu.Root
|
|
@@ -96,13 +96,13 @@ const gridCellGetter = (model: SheetModel) => {
|
|
|
96
96
|
|
|
97
97
|
export const rowLabelCell = (row: number) => ({
|
|
98
98
|
value: rowToA1Notation(row),
|
|
99
|
-
className: '!bg-
|
|
99
|
+
className: '!bg-toolbar-surface text-subdued text-end pe-1',
|
|
100
100
|
resizeHandle: 'row',
|
|
101
101
|
});
|
|
102
102
|
|
|
103
103
|
export const colLabelCell = (col: number) => ({
|
|
104
104
|
value: colToA1Notation(col),
|
|
105
|
-
className: '!bg-
|
|
105
|
+
className: '!bg-toolbar-surface text-subdued',
|
|
106
106
|
resizeHandle: 'col',
|
|
107
107
|
});
|
|
108
108
|
|
|
@@ -114,7 +114,7 @@ const cellGetter = (model: SheetModel) => {
|
|
|
114
114
|
return getGridCells(nextBounds);
|
|
115
115
|
case 'fixedStartStart': {
|
|
116
116
|
return {
|
|
117
|
-
'0,0': { className: '!bg-
|
|
117
|
+
'0,0': { className: '!bg-toolbar-surface' },
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
120
|
case 'frozenColsStart':
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import React, { type PropsWithChildren, createContext, useCallback, useContext, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { type CellAddress, type CellRange, type CompleteCellRange, type ComputeGraph } from '@dxos/compute';
|
|
8
|
+
import { raise } from '@dxos/debug';
|
|
8
9
|
import { Obj } from '@dxos/echo';
|
|
9
|
-
import { invariant } from '@dxos/invariant';
|
|
10
10
|
import {
|
|
11
11
|
Grid,
|
|
12
12
|
type GridContentProps,
|
|
@@ -39,20 +39,48 @@ export type SheetContextValue = {
|
|
|
39
39
|
activeRefs: GridContentProps['activeRefs'];
|
|
40
40
|
setActiveRefs: (activeRefs: GridContentProps['activeRefs']) => void;
|
|
41
41
|
|
|
42
|
+
// Flags
|
|
43
|
+
ignoreAttention?: boolean;
|
|
44
|
+
|
|
42
45
|
// Events.
|
|
43
46
|
// TODO(burdon): Generalize.
|
|
44
47
|
onInfo?: () => void;
|
|
45
|
-
|
|
46
|
-
// Flags
|
|
47
|
-
ignoreAttention?: boolean;
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
+
// TODO(burdon): Use radix context.
|
|
50
51
|
const SheetContext = createContext<SheetContextValue | undefined>(undefined);
|
|
51
52
|
|
|
52
53
|
export const useSheetContext = (): SheetContextValue => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
return useContext(SheetContext) ?? raise(new Error('Missing SheetContext'));
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type SheetRootProps = {
|
|
58
|
+
graph: ComputeGraph;
|
|
59
|
+
sheet: Sheet.Sheet;
|
|
60
|
+
readonly?: boolean;
|
|
61
|
+
ignoreAttention?: boolean;
|
|
62
|
+
} & Pick<SheetContextValue, 'onInfo'>;
|
|
63
|
+
|
|
64
|
+
export const SheetRoot = ({
|
|
65
|
+
children,
|
|
66
|
+
graph,
|
|
67
|
+
sheet,
|
|
68
|
+
readonly,
|
|
69
|
+
ignoreAttention,
|
|
70
|
+
onInfo,
|
|
71
|
+
}: PropsWithChildren<SheetRootProps>) => {
|
|
72
|
+
const model = useSheetModel(graph, sheet, { readonly });
|
|
73
|
+
if (!model) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<Grid.Root id={Obj.getDXN(sheet).toString()}>
|
|
79
|
+
<SheetProviderImpl model={model} onInfo={onInfo} ignoreAttention={ignoreAttention}>
|
|
80
|
+
{children}
|
|
81
|
+
</SheetProviderImpl>
|
|
82
|
+
</Grid.Root>
|
|
83
|
+
);
|
|
56
84
|
};
|
|
57
85
|
|
|
58
86
|
const SheetProviderImpl = ({
|
|
@@ -102,38 +130,12 @@ const SheetProviderImpl = ({
|
|
|
102
130
|
cursorFallbackRange,
|
|
103
131
|
activeRefs,
|
|
104
132
|
setActiveRefs,
|
|
133
|
+
ignoreAttention,
|
|
105
134
|
// TODO(burdon): Change to event.
|
|
106
135
|
onInfo,
|
|
107
|
-
ignoreAttention,
|
|
108
136
|
}}
|
|
109
137
|
>
|
|
110
138
|
{children}
|
|
111
139
|
</SheetContext.Provider>
|
|
112
140
|
);
|
|
113
141
|
};
|
|
114
|
-
|
|
115
|
-
export type SheetProviderProps = {
|
|
116
|
-
graph: ComputeGraph;
|
|
117
|
-
sheet: Sheet.Sheet;
|
|
118
|
-
readonly?: boolean;
|
|
119
|
-
ignoreAttention?: boolean;
|
|
120
|
-
} & Pick<SheetContextValue, 'onInfo'>;
|
|
121
|
-
|
|
122
|
-
export const SheetProvider = ({
|
|
123
|
-
children,
|
|
124
|
-
graph,
|
|
125
|
-
sheet,
|
|
126
|
-
readonly,
|
|
127
|
-
ignoreAttention,
|
|
128
|
-
onInfo,
|
|
129
|
-
}: PropsWithChildren<SheetProviderProps>) => {
|
|
130
|
-
const model = useSheetModel(graph, sheet, { readonly });
|
|
131
|
-
|
|
132
|
-
return !model ? null : (
|
|
133
|
-
<Grid.Root id={Obj.getDXN(sheet).toString()}>
|
|
134
|
-
<SheetProviderImpl model={model} onInfo={onInfo} ignoreAttention={ignoreAttention}>
|
|
135
|
-
{children}
|
|
136
|
-
</SheetProviderImpl>
|
|
137
|
-
</Grid.Root>
|
|
138
|
-
);
|
|
139
|
-
};
|
package/src/components/{FunctionEditor/FunctionEditor.tsx → SheetStatusbar/SheetStatusbar.tsx}
RENAMED
|
@@ -5,12 +5,14 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { addressToA1Notation, isFormula, rangeToA1Notation } from '@dxos/compute';
|
|
8
|
-
import { Icon } from '@dxos/react-ui';
|
|
8
|
+
import { type ComposableProps, Icon } from '@dxos/react-ui';
|
|
9
9
|
|
|
10
10
|
import { mapFormulaIndicesToRefs } from '../../types';
|
|
11
|
-
import { useSheetContext } from '../
|
|
11
|
+
import { useSheetContext } from '../SheetRoot';
|
|
12
12
|
|
|
13
|
-
export
|
|
13
|
+
export type SheetStatusbarProps = ComposableProps;
|
|
14
|
+
|
|
15
|
+
export const SheetStatusbar = (props: SheetStatusbarProps) => {
|
|
14
16
|
const { model, cursor, range } = useSheetContext();
|
|
15
17
|
|
|
16
18
|
let value;
|
|
@@ -26,13 +28,16 @@ export const FunctionEditor = () => {
|
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
return (
|
|
29
|
-
<div
|
|
31
|
+
<div
|
|
32
|
+
{...props}
|
|
33
|
+
className='flex shrink-0 justify-between items-center px-4 py-1 text-sm bg-toolbar-surface border-y !border-subdued-separator'
|
|
34
|
+
>
|
|
30
35
|
<div className='flex gap-4 items-center'>
|
|
31
|
-
<div className='flex
|
|
36
|
+
<div className='flex w-16 items-center font-mono'>
|
|
32
37
|
{(range && rangeToA1Notation(range)) || (cursor && addressToA1Notation(cursor))}
|
|
33
38
|
</div>
|
|
34
39
|
<div className='flex gap-2 items-center'>
|
|
35
|
-
<Icon icon='ph--function--regular' classNames={['text-
|
|
40
|
+
<Icon icon='ph--function--regular' classNames={['text-green-text', formula ? 'visible' : 'invisible']} />
|
|
36
41
|
<span className='font-mono'>{value}</span>
|
|
37
42
|
</div>
|
|
38
43
|
</div>
|
|
@@ -5,23 +5,23 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import { withTheme } from '@dxos/react-ui/testing';
|
|
8
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
9
9
|
|
|
10
10
|
import { translations } from '../../translations';
|
|
11
11
|
|
|
12
12
|
import { SheetToolbar } from './SheetToolbar';
|
|
13
13
|
|
|
14
14
|
const DefaultStory = () => {
|
|
15
|
-
// TODO(wittjosiah): Depends on
|
|
15
|
+
// TODO(wittjosiah): Depends on SheetRoot.
|
|
16
16
|
// return <SheetToolbar id='test' />;
|
|
17
17
|
return <>TODO</>;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
const meta = {
|
|
21
|
-
title: 'plugins/plugin-sheet/Toolbar',
|
|
21
|
+
title: 'plugins/plugin-sheet/components/Toolbar',
|
|
22
22
|
component: SheetToolbar as any,
|
|
23
23
|
render: DefaultStory,
|
|
24
|
-
decorators: [withTheme()],
|
|
24
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
|
|
25
25
|
parameters: {
|
|
26
26
|
layout: 'fullscreen',
|
|
27
27
|
translations,
|