@dxos/plugin-sheet 0.8.4-main.5acf9ea → 0.8.4-main.5ea62a8
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-KDGD4AVG.mjs → SheetContainer-CWSO5WTN.mjs} +20 -21
- package/dist/lib/browser/SheetContainer-CWSO5WTN.mjs.map +7 -0
- package/dist/lib/browser/{anchor-sort-VHURGBOY.mjs → anchor-sort-7WD2VGXW.mjs} +2 -2
- package/dist/lib/browser/{anchor-sort-VHURGBOY.mjs.map → anchor-sort-7WD2VGXW.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-7HQX4NQP.mjs → chunk-CL3MDNKQ.mjs} +6 -6
- package/dist/lib/browser/{chunk-7HQX4NQP.mjs.map → chunk-CL3MDNKQ.mjs.map} +4 -4
- package/dist/lib/browser/{chunk-JUOVL3LE.mjs → chunk-Q3VBLCSM.mjs} +195 -191
- package/dist/lib/browser/chunk-Q3VBLCSM.mjs.map +7 -0
- package/dist/lib/browser/{chunk-SI4X5GUR.mjs → chunk-XSXUU6FO.mjs} +19 -5
- package/dist/lib/browser/chunk-XSXUU6FO.mjs.map +7 -0
- package/dist/lib/browser/{compute-graph-registry-VG7VP7IV.mjs → compute-graph-registry-6YJHXORG.mjs} +1 -1
- package/dist/lib/{node-esm/compute-graph-registry-3K3Q2A5T.mjs.map → browser/compute-graph-registry-6YJHXORG.mjs.map} +2 -2
- package/dist/lib/browser/index.mjs +7 -7
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-WOJGZMSV.mjs → intent-resolver-ROEY4LHM.mjs} +3 -3
- package/dist/lib/browser/{intent-resolver-WOJGZMSV.mjs.map → intent-resolver-ROEY4LHM.mjs.map} +3 -3
- package/dist/lib/browser/{markdown-VXMIPUQC.mjs → markdown-VMNYPXTQ.mjs} +2 -2
- package/dist/lib/browser/markdown-VMNYPXTQ.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-SE4HGAEH.mjs → react-surface-2ES3D7MJ.mjs} +4 -4
- package/dist/lib/browser/{react-surface-SE4HGAEH.mjs.map → react-surface-2ES3D7MJ.mjs.map} +2 -2
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node-esm/{SheetContainer-RMG24NZC.mjs → SheetContainer-3RSDBWDG.mjs} +20 -21
- package/dist/lib/node-esm/SheetContainer-3RSDBWDG.mjs.map +7 -0
- package/dist/lib/node-esm/{anchor-sort-CTJGOPET.mjs → anchor-sort-ACQDUIPU.mjs} +2 -2
- package/dist/lib/node-esm/{anchor-sort-CTJGOPET.mjs.map → anchor-sort-ACQDUIPU.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-IFMIRCZH.mjs → chunk-LUCRXSK6.mjs} +195 -191
- package/dist/lib/node-esm/chunk-LUCRXSK6.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-CADTJFAS.mjs → chunk-ODP4L4OV.mjs} +19 -5
- package/dist/lib/node-esm/chunk-ODP4L4OV.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-Q6UYC4G5.mjs → chunk-ZIQZU4CH.mjs} +6 -6
- package/dist/lib/node-esm/{chunk-Q6UYC4G5.mjs.map → chunk-ZIQZU4CH.mjs.map} +4 -4
- package/dist/lib/node-esm/{compute-graph-registry-3K3Q2A5T.mjs → compute-graph-registry-ET5KJNLV.mjs} +1 -1
- package/dist/lib/{browser/compute-graph-registry-VG7VP7IV.mjs.map → node-esm/compute-graph-registry-ET5KJNLV.mjs.map} +2 -2
- package/dist/lib/node-esm/index.mjs +7 -7
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-PZRXBNIJ.mjs → intent-resolver-HESRI2ML.mjs} +3 -3
- package/dist/lib/node-esm/{intent-resolver-PZRXBNIJ.mjs.map → intent-resolver-HESRI2ML.mjs.map} +3 -3
- package/dist/lib/node-esm/{markdown-4VPQJZNZ.mjs → markdown-SCOTGSWB.mjs} +2 -2
- package/dist/lib/node-esm/markdown-SCOTGSWB.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-LAU23XBH.mjs → react-surface-66VS5MY2.mjs} +4 -4
- package/dist/lib/node-esm/{react-surface-LAU23XBH.mjs.map → react-surface-66VS5MY2.mjs.map} +2 -2
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/capabilities/anchor-sort.d.ts +2 -2
- package/dist/types/src/capabilities/compute-graph-registry.d.ts +1 -1
- package/dist/types/src/capabilities/compute-graph-registry.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +6 -8
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts +1 -3
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +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 +9 -3
- package/dist/types/src/components/ComputeGraph/compute-graph.stories.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 +49 -2
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts +11 -18
- package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/util.d.ts +1 -1
- package/dist/types/src/components/GridSheet/util.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 +49 -2
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetContext/SheetContext.d.ts +1 -1
- package/dist/types/src/components/SheetContext/SheetContext.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts +86 -3
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/align.d.ts +2 -2
- package/dist/types/src/components/SheetToolbar/align.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/style.d.ts.map +1 -1
- package/dist/types/src/extensions/compute.d.ts.map +1 -1
- package/dist/types/src/extensions/compute.stories.d.ts +10 -12
- package/dist/types/src/extensions/compute.stories.d.ts.map +1 -1
- package/dist/types/src/extensions/editor/index.d.ts +1 -1
- package/dist/types/src/extensions/editor/index.d.ts.map +1 -1
- package/dist/types/src/extensions/editor/{extension.d.ts → sheet-extension.d.ts} +1 -1
- package/dist/types/src/extensions/editor/sheet-extension.d.ts.map +1 -0
- package/dist/types/src/extensions/editor/sheet-extension.test.d.ts +2 -0
- package/dist/types/src/extensions/editor/sheet-extension.test.d.ts.map +1 -0
- package/dist/types/src/model/sheet-model.d.ts +1 -1
- package/dist/types/src/model/sheet-model.d.ts.map +1 -1
- package/dist/types/src/playwright/sheet-manager.d.ts +1 -1
- package/dist/types/src/playwright/sheet-manager.d.ts.map +1 -1
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +1 -1
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/types/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +54 -54
- package/src/SheetPlugin.tsx +2 -2
- package/src/capabilities/anchor-sort.ts +1 -1
- package/src/capabilities/compute-graph-registry.ts +1 -1
- package/src/capabilities/intent-resolver.ts +2 -2
- package/src/capabilities/markdown.ts +3 -2
- package/src/capabilities/react-surface.tsx +2 -1
- package/src/components/ComputeGraph/ComputeGraphContextProvider.tsx +1 -1
- package/src/components/ComputeGraph/compute-graph.stories.tsx +13 -10
- package/src/components/GridSheet/GridSheet.stories.tsx +8 -5
- package/src/components/GridSheet/GridSheet.tsx +17 -16
- package/src/components/GridSheet/SheetCellEditor.stories.tsx +31 -30
- package/src/components/GridSheet/util.ts +6 -6
- package/src/components/SheetContainer/SheetContainer.stories.tsx +9 -6
- package/src/components/SheetContainer/SheetContainer.tsx +1 -1
- package/src/components/SheetContext/SheetContext.tsx +1 -1
- package/src/components/SheetToolbar/SheetToolbar.stories.tsx +10 -7
- package/src/components/SheetToolbar/SheetToolbar.tsx +16 -15
- package/src/components/SheetToolbar/align.ts +4 -3
- package/src/components/SheetToolbar/style.ts +2 -2
- package/src/extensions/compute.stories.tsx +19 -18
- package/src/extensions/compute.ts +1 -1
- package/src/extensions/editor/index.ts +1 -1
- package/src/extensions/editor/{extension.test.ts → sheet-extension.test.ts} +1 -1
- package/src/integrations/thread-ranges.ts +4 -4
- package/src/model/sheet-model.test.ts +2 -1
- package/src/model/sheet-model.ts +6 -6
- package/src/playwright/sheet-manager.ts +1 -1
- package/src/playwright/sheet.spec.ts +1 -1
- package/src/sanity.test.ts +1 -1
- package/src/testing/testing.tsx +1 -1
- package/src/types/types.ts +2 -1
- package/src/types/util.ts +3 -3
- package/dist/lib/browser/SheetContainer-KDGD4AVG.mjs.map +0 -7
- package/dist/lib/browser/chunk-JUOVL3LE.mjs.map +0 -7
- package/dist/lib/browser/chunk-SI4X5GUR.mjs.map +0 -7
- package/dist/lib/browser/markdown-VXMIPUQC.mjs.map +0 -7
- package/dist/lib/node-esm/SheetContainer-RMG24NZC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CADTJFAS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IFMIRCZH.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-4VPQJZNZ.mjs.map +0 -7
- package/dist/types/src/extensions/editor/extension.d.ts.map +0 -1
- package/dist/types/src/extensions/editor/extension.test.d.ts +0 -2
- package/dist/types/src/extensions/editor/extension.test.d.ts.map +0 -1
- /package/src/extensions/editor/{extension.ts → sheet-extension.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.5ea62a8",
|
|
4
4
|
"description": "Braneframe sketch plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
+
"source": "./src/index.ts",
|
|
13
14
|
"types": "./dist/types/src/index.d.ts",
|
|
14
15
|
"browser": "./dist/lib/browser/index.mjs",
|
|
15
|
-
"node": "./dist/lib/node-esm/index.mjs"
|
|
16
|
-
"source": "./src/index.ts"
|
|
16
|
+
"node": "./dist/lib/node-esm/index.mjs"
|
|
17
17
|
},
|
|
18
18
|
"./types": {
|
|
19
|
+
"source": "./src/types/index.ts",
|
|
19
20
|
"types": "./dist/types/src/types/index.d.ts",
|
|
20
21
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
21
|
-
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
22
|
-
"source": "./src/types/index.ts"
|
|
22
|
+
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -56,64 +56,64 @@
|
|
|
56
56
|
"re-resizable": "^6.9.17",
|
|
57
57
|
"react-markdown": "^8.0.5",
|
|
58
58
|
"react-resize-detector": "^11.0.1",
|
|
59
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/echo
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/plugin-
|
|
76
|
-
"@dxos/plugin-
|
|
77
|
-
"@dxos/plugin-graph": "0.8.4-main.
|
|
78
|
-
"@dxos/plugin-markdown": "0.8.4-main.
|
|
79
|
-
"@dxos/plugin-space": "0.8.4-main.
|
|
80
|
-
"@dxos/plugin-script": "0.8.4-main.
|
|
81
|
-
"@dxos/plugin-stack": "0.8.4-main.
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/react-hooks": "0.8.4-main.
|
|
85
|
-
"@dxos/react-ui-attention": "0.8.4-main.
|
|
86
|
-
"@dxos/react-ui-editor": "0.8.4-main.
|
|
87
|
-
"@dxos/react-ui-
|
|
88
|
-
"@dxos/react-ui-
|
|
89
|
-
"@dxos/react-ui-
|
|
90
|
-
"@dxos/react-ui-
|
|
91
|
-
"@dxos/react-ui-stack": "0.8.4-main.
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/
|
|
59
|
+
"@dxos/app-framework": "0.8.4-main.5ea62a8",
|
|
60
|
+
"@dxos/client": "0.8.4-main.5ea62a8",
|
|
61
|
+
"@dxos/async": "0.8.4-main.5ea62a8",
|
|
62
|
+
"@dxos/compute": "0.8.4-main.5ea62a8",
|
|
63
|
+
"@dxos/crypto": "0.8.4-main.5ea62a8",
|
|
64
|
+
"@dxos/context": "0.8.4-main.5ea62a8",
|
|
65
|
+
"@dxos/debug": "0.8.4-main.5ea62a8",
|
|
66
|
+
"@dxos/echo": "0.8.4-main.5ea62a8",
|
|
67
|
+
"@dxos/echo-schema": "0.8.4-main.5ea62a8",
|
|
68
|
+
"@dxos/functions": "0.8.4-main.5ea62a8",
|
|
69
|
+
"@dxos/invariant": "0.8.4-main.5ea62a8",
|
|
70
|
+
"@dxos/lit-grid": "0.8.4-main.5ea62a8",
|
|
71
|
+
"@dxos/live-object": "0.8.4-main.5ea62a8",
|
|
72
|
+
"@dxos/log": "0.8.4-main.5ea62a8",
|
|
73
|
+
"@dxos/plugin-attention": "0.8.4-main.5ea62a8",
|
|
74
|
+
"@dxos/keys": "0.8.4-main.5ea62a8",
|
|
75
|
+
"@dxos/plugin-deck": "0.8.4-main.5ea62a8",
|
|
76
|
+
"@dxos/plugin-client": "0.8.4-main.5ea62a8",
|
|
77
|
+
"@dxos/plugin-graph": "0.8.4-main.5ea62a8",
|
|
78
|
+
"@dxos/plugin-markdown": "0.8.4-main.5ea62a8",
|
|
79
|
+
"@dxos/plugin-space": "0.8.4-main.5ea62a8",
|
|
80
|
+
"@dxos/plugin-script": "0.8.4-main.5ea62a8",
|
|
81
|
+
"@dxos/plugin-stack": "0.8.4-main.5ea62a8",
|
|
82
|
+
"@dxos/plugin-thread": "0.8.4-main.5ea62a8",
|
|
83
|
+
"@dxos/react-client": "0.8.4-main.5ea62a8",
|
|
84
|
+
"@dxos/react-hooks": "0.8.4-main.5ea62a8",
|
|
85
|
+
"@dxos/react-ui-attention": "0.8.4-main.5ea62a8",
|
|
86
|
+
"@dxos/react-ui-editor": "0.8.4-main.5ea62a8",
|
|
87
|
+
"@dxos/react-ui-grid": "0.8.4-main.5ea62a8",
|
|
88
|
+
"@dxos/react-ui-form": "0.8.4-main.5ea62a8",
|
|
89
|
+
"@dxos/react-ui-list": "0.8.4-main.5ea62a8",
|
|
90
|
+
"@dxos/react-ui-menu": "0.8.4-main.5ea62a8",
|
|
91
|
+
"@dxos/react-ui-stack": "0.8.4-main.5ea62a8",
|
|
92
|
+
"@dxos/util": "0.8.4-main.5ea62a8",
|
|
93
|
+
"@dxos/schema": "0.8.4-main.5ea62a8"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
96
|
"@effect-rx/rx-react": "0.38.0",
|
|
97
|
-
"@effect/platform": "0.
|
|
97
|
+
"@effect/platform": "0.90.2",
|
|
98
98
|
"@lezer/generator": "^1.7.1",
|
|
99
99
|
"@tldraw/indices": "^2.0.0-alpha.14",
|
|
100
100
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
101
101
|
"@types/react": "~18.2.0",
|
|
102
102
|
"@types/react-dom": "~18.2.0",
|
|
103
103
|
"@types/react-window": "^1.8.8",
|
|
104
|
-
"effect": "3.17.
|
|
104
|
+
"effect": "3.17.7",
|
|
105
105
|
"react": "~18.2.0",
|
|
106
106
|
"react-dom": "~18.2.0",
|
|
107
|
-
"vite": "
|
|
108
|
-
"@dxos/echo-generator": "0.8.4-main.
|
|
109
|
-
"@dxos/lit-grid": "0.8.4-main.
|
|
110
|
-
"@dxos/
|
|
111
|
-
"@dxos/
|
|
112
|
-
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.
|
|
113
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
114
|
-
"@dxos/
|
|
115
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
116
|
-
"@dxos/
|
|
107
|
+
"vite": "7.1.1",
|
|
108
|
+
"@dxos/echo-generator": "0.8.4-main.5ea62a8",
|
|
109
|
+
"@dxos/lit-grid": "0.8.4-main.5ea62a8",
|
|
110
|
+
"@dxos/random": "0.8.4-main.5ea62a8",
|
|
111
|
+
"@dxos/react-ui": "0.8.4-main.5ea62a8",
|
|
112
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.5ea62a8",
|
|
113
|
+
"@dxos/react-ui-theme": "0.8.4-main.5ea62a8",
|
|
114
|
+
"@dxos/react-ui-types": "0.8.4-main.5ea62a8",
|
|
115
|
+
"@dxos/storybook-utils": "0.8.4-main.5ea62a8",
|
|
116
|
+
"@dxos/test-utils": "0.8.4-main.5ea62a8"
|
|
117
117
|
},
|
|
118
118
|
"peerDependencies": {
|
|
119
119
|
"@effect-rx/rx-react": "^0.34.1",
|
|
@@ -121,8 +121,8 @@
|
|
|
121
121
|
"effect": "^3.13.3",
|
|
122
122
|
"react": "~18.2.0",
|
|
123
123
|
"react-dom": "~18.2.0",
|
|
124
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
125
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
124
|
+
"@dxos/react-ui": "0.8.4-main.5ea62a8",
|
|
125
|
+
"@dxos/react-ui-theme": "0.8.4-main.5ea62a8"
|
|
126
126
|
},
|
|
127
127
|
"publishConfig": {
|
|
128
128
|
"access": "public"
|
package/src/SheetPlugin.tsx
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities, contributes, createIntent, defineModule, definePlugin
|
|
5
|
+
import { Capabilities, Events, contributes, createIntent, defineModule, definePlugin } from '@dxos/app-framework';
|
|
6
6
|
import { ClientEvents } from '@dxos/plugin-client';
|
|
7
7
|
import { MarkdownEvents } from '@dxos/plugin-markdown';
|
|
8
8
|
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
9
9
|
import { defineObjectForm } from '@dxos/plugin-space/types';
|
|
10
10
|
|
|
11
|
-
import { AnchorSort,
|
|
11
|
+
import { AnchorSort, ComputeGraphRegistry, IntentResolver, Markdown, ReactSurface } from './capabilities';
|
|
12
12
|
import { meta } from './meta';
|
|
13
13
|
import { serializer } from './serializer';
|
|
14
14
|
import { translations } from './translations';
|
|
@@ -6,7 +6,7 @@ import { Capabilities, contributes } from '@dxos/app-framework';
|
|
|
6
6
|
import { Type } from '@dxos/echo';
|
|
7
7
|
import { getTarget } from '@dxos/react-client/echo';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { SheetType, compareIndexPositions } from '../types';
|
|
10
10
|
|
|
11
11
|
export default () =>
|
|
12
12
|
contributes(Capabilities.AnchorSort, {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { type PluginContext, contributes } from '@dxos/app-framework';
|
|
6
6
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
7
7
|
|
|
8
8
|
import { SheetCapabilities } from './capabilities';
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Capabilities, contributes, createResolver } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
7
|
import { SHEET_PLUGIN } from '../meta';
|
|
8
|
-
import {
|
|
8
|
+
import { SheetAction, createSheet } from '../types';
|
|
9
9
|
|
|
10
10
|
export default () =>
|
|
11
11
|
contributes(Capabilities.IntentResolver, [
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { type PluginContext, contributes } from '@dxos/app-framework';
|
|
6
6
|
import { getSpace } from '@dxos/client/echo';
|
|
7
7
|
import { MarkdownCapabilities } from '@dxos/plugin-markdown';
|
|
8
8
|
|
|
9
|
-
import { SheetCapabilities } from './capabilities';
|
|
10
9
|
import { computeGraphFacet } from '../extensions';
|
|
11
10
|
|
|
11
|
+
import { SheetCapabilities } from './capabilities';
|
|
12
|
+
|
|
12
13
|
export default (context: PluginContext) =>
|
|
13
14
|
contributes(MarkdownCapabilities.Extensions, [
|
|
14
15
|
({ document: doc }) => {
|
|
@@ -8,11 +8,12 @@ import { Capabilities, contributes, createSurface, useCapability } from '@dxos/a
|
|
|
8
8
|
import { Obj } from '@dxos/echo';
|
|
9
9
|
import { getSpace } from '@dxos/react-client/echo';
|
|
10
10
|
|
|
11
|
-
import { SheetCapabilities } from './capabilities';
|
|
12
11
|
import { ComputeGraphContextProvider, RangeList, SheetContainer } from '../components';
|
|
13
12
|
import { SHEET_PLUGIN } from '../meta';
|
|
14
13
|
import { SheetType } from '../types';
|
|
15
14
|
|
|
15
|
+
import { SheetCapabilities } from './capabilities';
|
|
16
|
+
|
|
16
17
|
export default () =>
|
|
17
18
|
contributes(Capabilities.ReactSurface, [
|
|
18
19
|
createSurface({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, {
|
|
5
|
+
import React, { type PropsWithChildren, createContext, useContext } from 'react';
|
|
6
6
|
|
|
7
7
|
import { type ComputeGraph, type ComputeGraphRegistry } from '@dxos/compute';
|
|
8
8
|
import { raise } from '@dxos/debug';
|
|
@@ -4,26 +4,27 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type Meta } from '@storybook/react-vite';
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
8
|
import React, { useEffect, useRef, useState } from 'react';
|
|
9
9
|
|
|
10
10
|
import { testFunctionPlugins } from '@dxos/compute/testing';
|
|
11
|
-
import {
|
|
11
|
+
import { Filter, Obj } from '@dxos/echo';
|
|
12
12
|
import { FunctionType } from '@dxos/functions';
|
|
13
13
|
import { useSpace } from '@dxos/react-client/echo';
|
|
14
14
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
15
|
-
import {
|
|
15
|
+
import { Button, Input, Toolbar } from '@dxos/react-ui';
|
|
16
16
|
import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
|
|
17
17
|
import { withTheme } from '@dxos/storybook-utils';
|
|
18
18
|
|
|
19
|
-
import { useComputeGraph } from './ComputeGraphContextProvider';
|
|
20
19
|
import { useSheetModel } from '../../model';
|
|
21
20
|
import { withComputeGraphDecorator } from '../../testing';
|
|
22
|
-
import {
|
|
21
|
+
import { SheetType, createSheet } from '../../types';
|
|
22
|
+
|
|
23
|
+
import { useComputeGraph } from './ComputeGraphContextProvider';
|
|
23
24
|
|
|
24
25
|
const FUNCTION_NAME = 'TEST';
|
|
25
26
|
|
|
26
|
-
const
|
|
27
|
+
const DefaultStory = () => {
|
|
27
28
|
const space = useSpace();
|
|
28
29
|
const graph = useComputeGraph(space);
|
|
29
30
|
const [sheet, setSheet] = useState<SheetType>();
|
|
@@ -82,16 +83,18 @@ const Story = () => {
|
|
|
82
83
|
);
|
|
83
84
|
};
|
|
84
85
|
|
|
85
|
-
export const Default = {};
|
|
86
|
+
export const Default: Story = {};
|
|
86
87
|
|
|
87
|
-
const meta
|
|
88
|
+
const meta = {
|
|
88
89
|
title: 'plugins/plugin-sheet/functions',
|
|
90
|
+
render: DefaultStory,
|
|
89
91
|
decorators: [
|
|
90
92
|
withClientProvider({ types: [FunctionType, SheetType], createIdentity: true, createSpace: true }),
|
|
91
93
|
withComputeGraphDecorator({ plugins: testFunctionPlugins }),
|
|
92
94
|
withTheme,
|
|
93
95
|
],
|
|
94
|
-
|
|
95
|
-
};
|
|
96
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
96
97
|
|
|
97
98
|
export default meta;
|
|
99
|
+
|
|
100
|
+
type Story = StoryObj<typeof meta>;
|
|
@@ -4,22 +4,23 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type Meta } from '@storybook/react-vite';
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
10
|
import { IntentPlugin } from '@dxos/app-framework';
|
|
11
11
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
12
|
import { useSpace } from '@dxos/react-client/echo';
|
|
13
13
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
14
|
-
import {
|
|
14
|
+
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
15
15
|
|
|
16
|
-
import { GridSheet } from './GridSheet';
|
|
17
16
|
import { createTestCells, useTestSheet, withComputeGraphDecorator } from '../../testing';
|
|
18
17
|
import { translations } from '../../translations';
|
|
19
18
|
import { SheetType } from '../../types';
|
|
20
19
|
import { useComputeGraph } from '../ComputeGraph';
|
|
21
20
|
import { SheetProvider } from '../SheetContext';
|
|
22
21
|
|
|
22
|
+
import { GridSheet } from './GridSheet';
|
|
23
|
+
|
|
23
24
|
export const Basic = () => {
|
|
24
25
|
const space = useSpace();
|
|
25
26
|
const graph = useComputeGraph(space);
|
|
@@ -35,7 +36,7 @@ export const Basic = () => {
|
|
|
35
36
|
);
|
|
36
37
|
};
|
|
37
38
|
|
|
38
|
-
const meta
|
|
39
|
+
const meta = {
|
|
39
40
|
title: 'plugins/plugin-sheet/GridSheet',
|
|
40
41
|
component: GridSheet,
|
|
41
42
|
decorators: [
|
|
@@ -48,6 +49,8 @@ const meta: Meta = {
|
|
|
48
49
|
}),
|
|
49
50
|
],
|
|
50
51
|
parameters: { translations },
|
|
51
|
-
}
|
|
52
|
+
} satisfies Meta<typeof GridSheet>;
|
|
52
53
|
|
|
53
54
|
export default meta;
|
|
55
|
+
|
|
56
|
+
type Story = StoryObj<typeof meta>;
|
|
@@ -3,42 +3,43 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import React, {
|
|
6
|
+
type FocusEvent,
|
|
7
|
+
type KeyboardEvent,
|
|
8
|
+
type MouseEvent,
|
|
9
|
+
type WheelEvent,
|
|
6
10
|
useCallback,
|
|
7
11
|
useMemo,
|
|
8
12
|
useRef,
|
|
9
13
|
useState,
|
|
10
|
-
type FocusEvent,
|
|
11
|
-
type KeyboardEvent,
|
|
12
|
-
type WheelEvent,
|
|
13
|
-
type MouseEvent,
|
|
14
14
|
} from 'react';
|
|
15
15
|
|
|
16
16
|
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
17
|
-
import {
|
|
17
|
+
import { type CellRange, rangeToA1Notation } from '@dxos/compute';
|
|
18
18
|
import { defaultColSize, defaultRowSize } from '@dxos/lit-grid';
|
|
19
19
|
import { DropdownMenu, Icon, useTranslation } from '@dxos/react-ui';
|
|
20
20
|
import { useAttention } from '@dxos/react-ui-attention';
|
|
21
21
|
import {
|
|
22
|
-
|
|
23
|
-
editorKeys,
|
|
24
|
-
parseCellIndex,
|
|
25
|
-
Grid,
|
|
26
|
-
GridCellEditor,
|
|
22
|
+
type DxGridCellIndex,
|
|
27
23
|
type DxGridElement,
|
|
28
24
|
type DxGridPosition,
|
|
29
|
-
type DxGridCellIndex,
|
|
30
|
-
type EditorKeyHandler,
|
|
31
25
|
type EditorBlurHandler,
|
|
26
|
+
type EditorKeyHandler,
|
|
27
|
+
Grid,
|
|
28
|
+
GridCellEditor,
|
|
32
29
|
type GridContentProps,
|
|
30
|
+
closestCell,
|
|
31
|
+
editorKeys,
|
|
32
|
+
parseCellIndex,
|
|
33
33
|
} from '@dxos/react-ui-grid';
|
|
34
34
|
|
|
35
|
-
import {
|
|
36
|
-
import { rangeExtension, sheetExtension, type RangeController } from '../../extensions';
|
|
35
|
+
import { type RangeController, rangeExtension, sheetExtension } from '../../extensions';
|
|
37
36
|
import { useSelectThreadOnCellFocus, useUpdateFocusedCellOnThreadSelection } from '../../integrations';
|
|
38
37
|
import { SHEET_PLUGIN } from '../../meta';
|
|
39
38
|
import { DEFAULT_COLS, DEFAULT_ROWS, SheetAction } from '../../types';
|
|
40
39
|
import { useSheetContext } from '../SheetContext';
|
|
41
40
|
|
|
41
|
+
import { colLabelCell, rowLabelCell, useSheetModelDxGridProps } from './util';
|
|
42
|
+
|
|
42
43
|
const inertPosition: DxGridPosition = { plane: 'grid', col: 0, row: 0 };
|
|
43
44
|
|
|
44
45
|
const initialCells = {
|
|
@@ -59,11 +60,11 @@ const frozen = {
|
|
|
59
60
|
};
|
|
60
61
|
|
|
61
62
|
const sheetColDefault = {
|
|
62
|
-
frozenColsStart: { size: 48, readonly: true },
|
|
63
|
+
frozenColsStart: { size: 48, readonly: true, focusUnfurl: false },
|
|
63
64
|
grid: { size: defaultColSize, resizeable: true },
|
|
64
65
|
};
|
|
65
66
|
const sheetRowDefault = {
|
|
66
|
-
frozenRowsStart: { size: defaultRowSize, readonly: true },
|
|
67
|
+
frozenRowsStart: { size: defaultRowSize, readonly: true, focusUnfurl: false },
|
|
67
68
|
grid: { size: defaultRowSize, resizeable: true },
|
|
68
69
|
};
|
|
69
70
|
|
|
@@ -4,23 +4,24 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type Meta } from '@storybook/react-vite';
|
|
8
|
-
import React, {
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
|
+
import React, { useMemo, useState } from 'react';
|
|
9
9
|
|
|
10
10
|
import { Client } from '@dxos/client';
|
|
11
11
|
import { createDocAccessor } from '@dxos/client/echo';
|
|
12
12
|
import { defaultFunctions } from '@dxos/compute';
|
|
13
13
|
import { getRegisteredFunctionNames } from '@dxos/compute/testing';
|
|
14
|
+
import { useAsyncEffect } from '@dxos/react-hooks';
|
|
14
15
|
import { automerge } from '@dxos/react-ui-editor';
|
|
15
16
|
import { CellEditor, type CellEditorProps } from '@dxos/react-ui-grid';
|
|
16
17
|
import { withTheme } from '@dxos/storybook-utils';
|
|
17
18
|
|
|
18
19
|
import { sheetExtension } from '../../extensions';
|
|
19
|
-
import {
|
|
20
|
+
import { SheetType, createSheet } from '../../types';
|
|
20
21
|
|
|
21
22
|
type StoryProps = CellEditorProps;
|
|
22
23
|
|
|
23
|
-
const
|
|
24
|
+
const DefaultStory = ({ value, ...props }: StoryProps) => {
|
|
24
25
|
const extension = useMemo(() => {
|
|
25
26
|
const functionNames = getRegisteredFunctionNames();
|
|
26
27
|
const functions = defaultFunctions.filter(({ name }) => functionNames.includes(name));
|
|
@@ -33,19 +34,17 @@ const Story = ({ value, ...props }: StoryProps) => {
|
|
|
33
34
|
const AutomergeStory = ({ value, ...props }: StoryProps) => {
|
|
34
35
|
const cell = 'A1';
|
|
35
36
|
const [object, setObject] = useState<SheetType>();
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
setObject(sheet);
|
|
48
|
-
});
|
|
37
|
+
useAsyncEffect(async () => {
|
|
38
|
+
const client = new Client({ types: [SheetType] });
|
|
39
|
+
await client.initialize();
|
|
40
|
+
await client.halo.createIdentity();
|
|
41
|
+
const space = await client.spaces.create();
|
|
42
|
+
|
|
43
|
+
const sheet = createSheet();
|
|
44
|
+
sheet.name = 'Test';
|
|
45
|
+
sheet.cells[cell] = { value };
|
|
46
|
+
space.db.add(sheet);
|
|
47
|
+
setObject(sheet);
|
|
49
48
|
}, [value]);
|
|
50
49
|
|
|
51
50
|
const extension = useMemo(() => {
|
|
@@ -62,32 +61,34 @@ const AutomergeStory = ({ value, ...props }: StoryProps) => {
|
|
|
62
61
|
return <CellEditor {...props} value={value} extension={extension} />;
|
|
63
62
|
};
|
|
64
63
|
|
|
65
|
-
|
|
64
|
+
const meta = {
|
|
65
|
+
title: 'plugins/plugin-sheet/CellEditor',
|
|
66
|
+
component: CellEditor,
|
|
67
|
+
render: DefaultStory,
|
|
68
|
+
decorators: [withTheme],
|
|
69
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
70
|
+
|
|
71
|
+
export default meta;
|
|
72
|
+
|
|
73
|
+
type Story = StoryObj<typeof meta>;
|
|
74
|
+
|
|
75
|
+
export const Default: Story = {};
|
|
66
76
|
|
|
67
|
-
export const AutoComplete = {
|
|
77
|
+
export const AutoComplete: Story = {
|
|
68
78
|
args: {
|
|
69
79
|
value: '=SUM',
|
|
70
80
|
},
|
|
71
81
|
};
|
|
72
82
|
|
|
73
|
-
export const Formatting = {
|
|
83
|
+
export const Formatting: Story = {
|
|
74
84
|
args: {
|
|
75
85
|
value: '=SUM(A1:A2, 100, TRUE, "100", SUM(A1:A2, B1:B2))',
|
|
76
86
|
},
|
|
77
87
|
};
|
|
78
88
|
|
|
79
|
-
export const Automerge = {
|
|
89
|
+
export const Automerge: Story = {
|
|
80
90
|
render: (args: StoryProps) => <AutomergeStory {...args} />,
|
|
81
91
|
args: {
|
|
82
92
|
value: '=SUM(A1:A2, 100, TRUE, "100", SUM(A1:A2, B1:B2))',
|
|
83
93
|
},
|
|
84
94
|
};
|
|
85
|
-
|
|
86
|
-
const meta: Meta = {
|
|
87
|
-
title: 'plugins/plugin-sheet/CellEditor',
|
|
88
|
-
component: CellEditor,
|
|
89
|
-
decorators: [withTheme],
|
|
90
|
-
render: (args: StoryProps) => <Story {...args} />,
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export default meta;
|
|
@@ -6,18 +6,18 @@ import { useEffect, useState } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { inRange } from '@dxos/compute';
|
|
8
8
|
import { createDocAccessor } from '@dxos/react-client/echo';
|
|
9
|
-
import {
|
|
9
|
+
import { cellClassesForFieldType, parseValue } from '@dxos/react-ui-form';
|
|
10
10
|
import {
|
|
11
|
-
type GridContentProps,
|
|
12
|
-
type DxGridElement,
|
|
13
11
|
type DxGridAxisMeta,
|
|
12
|
+
type DxGridCellValue,
|
|
13
|
+
type DxGridElement,
|
|
14
14
|
type DxGridPlane,
|
|
15
|
-
type DxGridPlaneRange,
|
|
16
15
|
type DxGridPlaneCells,
|
|
17
|
-
type
|
|
16
|
+
type DxGridPlaneRange,
|
|
17
|
+
type GridContentProps,
|
|
18
18
|
colToA1Notation,
|
|
19
|
-
rowToA1Notation,
|
|
20
19
|
commentedClassName,
|
|
20
|
+
rowToA1Notation,
|
|
21
21
|
} from '@dxos/react-ui-grid';
|
|
22
22
|
import { mx } from '@dxos/react-ui-theme';
|
|
23
23
|
|
|
@@ -4,25 +4,26 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type Meta } from '@storybook/react-vite';
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
|
-
import { Capabilities, contributes, createResolver
|
|
10
|
+
import { Capabilities, IntentPlugin, contributes, createResolver } from '@dxos/app-framework';
|
|
11
11
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
12
|
import { GraphPlugin } from '@dxos/plugin-graph';
|
|
13
13
|
import { fullyQualifiedId, useSpace } from '@dxos/react-client/echo';
|
|
14
14
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
15
15
|
import { AttendableContainer } from '@dxos/react-ui-attention';
|
|
16
16
|
import { withAttention } from '@dxos/react-ui-attention/testing';
|
|
17
|
-
import {
|
|
17
|
+
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
18
18
|
|
|
19
|
-
import { SheetContainer } from './SheetContainer';
|
|
20
19
|
import { createTestCells, useTestSheet, withComputeGraphDecorator } from '../../testing';
|
|
21
20
|
import { translations } from '../../translations';
|
|
22
21
|
import { SheetAction, SheetType } from '../../types';
|
|
23
22
|
import { useComputeGraph } from '../ComputeGraph';
|
|
24
23
|
import { RangeList } from '../RangeList';
|
|
25
24
|
|
|
25
|
+
import { SheetContainer } from './SheetContainer';
|
|
26
|
+
|
|
26
27
|
export const Basic = () => {
|
|
27
28
|
const space = useSpace();
|
|
28
29
|
const graph = useComputeGraph(space);
|
|
@@ -58,7 +59,7 @@ export const Spec = () => {
|
|
|
58
59
|
);
|
|
59
60
|
};
|
|
60
61
|
|
|
61
|
-
const meta
|
|
62
|
+
const meta = {
|
|
62
63
|
title: 'plugins/plugin-sheet/SheetContainer',
|
|
63
64
|
component: SheetContainer,
|
|
64
65
|
decorators: [
|
|
@@ -84,6 +85,8 @@ const meta: Meta = {
|
|
|
84
85
|
}),
|
|
85
86
|
],
|
|
86
87
|
parameters: { translations },
|
|
87
|
-
}
|
|
88
|
+
} satisfies Meta<typeof SheetContainer>;
|
|
88
89
|
|
|
89
90
|
export default meta;
|
|
91
|
+
|
|
92
|
+
type Story = StoryObj<typeof meta>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { type Space, fullyQualifiedId } from '@dxos/react-client/echo';
|
|
8
8
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
9
9
|
|
|
10
10
|
import { type SheetType } from '../../types';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { type PropsWithChildren, createContext, useCallback, useContext, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type CellAddress, type CellRange, type CompleteCellRange, type ComputeGraph } from '@dxos/compute';
|
|
8
8
|
import { invariant } from '@dxos/invariant';
|
|
9
9
|
import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
10
10
|
import {
|