@dxos/plugin-sheet 0.8.4-main.3fbcb4aa9b → 0.8.4-main.43cb759274
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/LICENSE +102 -5
- package/PLUGIN.mdl +359 -0
- package/dist/lib/neutral/{SheetContainer-ZOVKGHLT.mjs → SheetArticle-5AJRM3V3.mjs} +6 -6
- package/dist/lib/neutral/SheetArticle-5AJRM3V3.mjs.map +7 -0
- package/dist/lib/neutral/SheetPlugin.mjs +14 -3
- package/dist/lib/neutral/SheetPlugin.mjs.map +4 -4
- package/dist/lib/neutral/SheetPlugin.workerd.mjs +21 -0
- package/dist/lib/neutral/SheetPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/{anchor-sort-TTCKGX7V.mjs → anchor-sort-2POWTKTD.mjs} +3 -3
- package/dist/lib/neutral/anchor-sort-2POWTKTD.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +6 -6
- package/dist/lib/neutral/{chunk-4GWJDLTH.mjs → chunk-3AIMSE7U.mjs} +4 -4
- package/dist/lib/neutral/{chunk-4GWJDLTH.mjs.map → chunk-3AIMSE7U.mjs.map} +3 -3
- package/dist/lib/neutral/chunk-7ZUM64KO.mjs +8 -0
- package/dist/lib/neutral/{chunk-4SBAIU6F.mjs → chunk-ERHMBRSU.mjs} +2 -2
- package/dist/lib/neutral/{chunk-4SBAIU6F.mjs.map → chunk-ERHMBRSU.mjs.map} +2 -2
- package/dist/lib/neutral/{chunk-KC2SMDNF.mjs → chunk-EUM3RVML.mjs} +21 -20
- package/dist/lib/neutral/chunk-EUM3RVML.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FQHTXKMF.mjs +34 -0
- package/dist/lib/neutral/chunk-FQHTXKMF.mjs.map +7 -0
- package/dist/lib/neutral/{comment-config-ZBWNCJMZ.mjs → comment-config-6JAROASH.mjs} +3 -2
- package/dist/lib/neutral/comment-config-6JAROASH.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +10 -9
- package/dist/lib/neutral/components/index.mjs.map +3 -3
- package/dist/lib/neutral/{compute-graph-registry-IEQBF5XZ.mjs → compute-graph-registry-YYINTFC2.mjs} +11 -5
- package/dist/lib/neutral/compute-graph-registry-YYINTFC2.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +2 -2
- package/dist/lib/neutral/containers/index.mjs.map +3 -3
- package/dist/lib/neutral/{create-object-OKQAXJCW.mjs → create-object-6FZSSROF.mjs} +3 -2
- package/dist/lib/neutral/create-object-6FZSSROF.mjs.map +7 -0
- package/dist/lib/neutral/{drop-axis-G6UOXG54.mjs → drop-axis-MO3KUU4C.mjs} +2 -2
- package/dist/lib/neutral/index.mjs +5 -5
- package/dist/lib/neutral/{insert-axis-ZFFNG22G.mjs → insert-axis-V7E5PTMG.mjs} +2 -2
- package/dist/lib/neutral/{markdown-I2AKJYPF.mjs → markdown-O37EE3ER.mjs} +2 -2
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/meta.mjs +1 -1
- package/dist/lib/neutral/operations/index.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +4 -4
- package/dist/lib/neutral/{react-surface-ID4JCAFR.mjs → react-surface-4H3PC4WG.mjs} +5 -5
- package/dist/lib/neutral/react-surface-4H3PC4WG.mjs.map +7 -0
- package/dist/lib/neutral/{restore-axis-44DM6N54.mjs → restore-axis-BAM44OPG.mjs} +2 -2
- package/dist/lib/neutral/{scroll-to-anchor-WHX3HJC7.mjs → scroll-to-anchor-TBE2FTTT.mjs} +3 -3
- package/dist/lib/neutral/translations.mjs +2 -1
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/lib/neutral/types/index.mjs +1 -1
- package/dist/types/src/SheetPlugin.d.ts.map +1 -1
- package/dist/types/src/SheetPlugin.workerd.d.ts +4 -0
- package/dist/types/src/SheetPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/compute-graph-registry.d.ts +6 -0
- package/dist/types/src/capabilities/compute-graph-registry.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
- package/dist/types/src/components/ComputeGraph/compute-graph.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts.map +1 -1
- package/dist/types/src/containers/{SheetContainer/SheetContainer.d.ts → SheetArticle/SheetArticle.d.ts} +3 -3
- package/dist/types/src/containers/SheetArticle/SheetArticle.d.ts.map +1 -0
- package/dist/types/src/containers/{SheetContainer/SheetContainer.stories.d.ts → SheetArticle/SheetArticle.stories.d.ts} +2 -2
- package/dist/types/src/containers/SheetArticle/SheetArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/SheetArticle/index.d.ts +2 -0
- package/dist/types/src/containers/SheetArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +1 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/model/sheet-model.d.ts +25 -1
- package/dist/types/src/model/sheet-model.d.ts.map +1 -1
- package/dist/types/src/testing/testing.d.ts +2 -2
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Sheet.d.ts +3 -4
- package/dist/types/src/types/Sheet.d.ts.map +1 -1
- package/dist/types/src/types/SheetOperation.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +62 -79
- package/src/SheetPlugin.test.ts +1 -1
- package/src/SheetPlugin.tsx +8 -3
- package/src/SheetPlugin.workerd.ts +18 -0
- package/src/capabilities/anchor-sort.ts +2 -2
- package/src/capabilities/comment-config.ts +2 -1
- package/src/capabilities/compute-graph-registry.ts +20 -7
- package/src/capabilities/create-object.ts +2 -1
- package/src/capabilities/react-surface.tsx +4 -4
- package/src/components/ComputeGraph/compute-graph.stories.tsx +8 -3
- package/src/components/SheetContent/SheetContent.stories.tsx +2 -2
- package/src/components/SheetContent/SheetContent.tsx +1 -1
- package/src/components/SheetContent/util.ts +1 -1
- package/src/components/SheetStatusbar/SheetStatusbar.tsx +2 -1
- package/src/components/SheetToolbar/SheetToolbar.tsx +1 -1
- package/src/containers/{SheetContainer/SheetContainer.stories.tsx → SheetArticle/SheetArticle.stories.tsx} +8 -8
- package/src/containers/{SheetContainer/SheetContainer.tsx → SheetArticle/SheetArticle.tsx} +5 -5
- package/src/containers/SheetArticle/index.ts +5 -0
- package/src/containers/index.ts +1 -1
- package/src/extensions/compute.stories.tsx +2 -2
- package/src/extensions/editor/sheet-extension.ts +1 -1
- package/src/integrations/thread-ranges.ts +3 -3
- package/src/meta.ts +18 -6
- package/src/model/sheet-model.ts +2 -2
- package/src/playwright/sheet.spec.ts +1 -1
- package/src/sanity.test.ts +5 -1
- package/src/translations.ts +2 -1
- package/src/types/Sheet.ts +4 -10
- package/src/types/SheetOperation.ts +14 -5
- package/src/types/util.ts +3 -3
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/neutral/SheetContainer-ZOVKGHLT.mjs.map +0 -7
- package/dist/lib/neutral/anchor-sort-TTCKGX7V.mjs.map +0 -7
- package/dist/lib/neutral/chunk-KC2SMDNF.mjs.map +0 -7
- package/dist/lib/neutral/chunk-YFHTB6MX.mjs +0 -8
- package/dist/lib/neutral/chunk-ZWOQCLH7.mjs +0 -21
- package/dist/lib/neutral/chunk-ZWOQCLH7.mjs.map +0 -7
- package/dist/lib/neutral/comment-config-ZBWNCJMZ.mjs.map +0 -7
- package/dist/lib/neutral/compute-graph-registry-IEQBF5XZ.mjs.map +0 -7
- package/dist/lib/neutral/create-object-OKQAXJCW.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-ID4JCAFR.mjs.map +0 -7
- package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts.map +0 -1
- package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts.map +0 -1
- package/dist/types/src/containers/SheetContainer/index.d.ts +0 -2
- package/dist/types/src/containers/SheetContainer/index.d.ts.map +0 -1
- package/src/containers/SheetContainer/index.ts +0 -5
- /package/dist/lib/neutral/{chunk-YFHTB6MX.mjs.map → chunk-7ZUM64KO.mjs.map} +0 -0
- /package/dist/lib/neutral/{drop-axis-G6UOXG54.mjs.map → drop-axis-MO3KUU4C.mjs.map} +0 -0
- /package/dist/lib/neutral/{insert-axis-ZFFNG22G.mjs.map → insert-axis-V7E5PTMG.mjs.map} +0 -0
- /package/dist/lib/neutral/{markdown-I2AKJYPF.mjs.map → markdown-O37EE3ER.mjs.map} +0 -0
- /package/dist/lib/neutral/{restore-axis-44DM6N54.mjs.map → restore-axis-BAM44OPG.mjs.map} +0 -0
- /package/dist/lib/neutral/{scroll-to-anchor-WHX3HJC7.mjs.map → scroll-to-anchor-TBE2FTTT.mjs.map} +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.43cb759274",
|
|
4
4
|
"description": "Braneframe sketch plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/dxos/dxos"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
@@ -40,10 +40,12 @@
|
|
|
40
40
|
},
|
|
41
41
|
"#plugin": {
|
|
42
42
|
"source": {
|
|
43
|
+
"workerd": "./src/SheetPlugin.workerd.ts",
|
|
43
44
|
"node": "./src/SheetPlugin.node.ts",
|
|
44
45
|
"default": "./src/SheetPlugin.tsx"
|
|
45
46
|
},
|
|
46
47
|
"types": "./dist/types/src/SheetPlugin.d.ts",
|
|
48
|
+
"workerd": "./dist/lib/neutral/SheetPlugin.workerd.mjs",
|
|
47
49
|
"node": "./dist/lib/neutral/SheetPlugin.node.mjs",
|
|
48
50
|
"default": "./dist/lib/neutral/SheetPlugin.mjs"
|
|
49
51
|
},
|
|
@@ -65,6 +67,7 @@
|
|
|
65
67
|
"types": "./dist/types/src/index.d.ts",
|
|
66
68
|
"default": "./dist/lib/neutral/index.mjs"
|
|
67
69
|
},
|
|
70
|
+
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
68
71
|
"./plugin": {
|
|
69
72
|
"source": "./src/plugin.ts",
|
|
70
73
|
"types": "./dist/types/src/plugin.d.ts",
|
|
@@ -79,100 +82,80 @@
|
|
|
79
82
|
"types": "dist/types/src/index.d.ts",
|
|
80
83
|
"files": [
|
|
81
84
|
"dist",
|
|
82
|
-
"src"
|
|
85
|
+
"src",
|
|
86
|
+
"PLUGIN.mdl"
|
|
83
87
|
],
|
|
84
88
|
"dependencies": {
|
|
85
|
-
"@codemirror/autocomplete": "^6.
|
|
86
|
-
"@codemirror/language": "^6.
|
|
87
|
-
"@codemirror/state": "^6.
|
|
88
|
-
"@codemirror/view": "^6.
|
|
89
|
-
"@
|
|
90
|
-
"@
|
|
91
|
-
"@dnd-kit/sortable": "^7.0.1",
|
|
92
|
-
"@dnd-kit/utilities": "^3.2.0",
|
|
93
|
-
"@lezer/common": "^1.2.2",
|
|
94
|
-
"@lezer/highlight": "^1.2.1",
|
|
95
|
-
"@lezer/lezer": "^1.1.2",
|
|
96
|
-
"@lezer/lr": "^1.4.2",
|
|
97
|
-
"@radix-ui/react-context": "1.1.1",
|
|
89
|
+
"@codemirror/autocomplete": "^6.20.2",
|
|
90
|
+
"@codemirror/language": "^6.12.3",
|
|
91
|
+
"@codemirror/state": "^6.6.0",
|
|
92
|
+
"@codemirror/view": "^6.43.0",
|
|
93
|
+
"@lezer/common": "^1.5.2",
|
|
94
|
+
"@lezer/highlight": "^1.2.3",
|
|
98
95
|
"codemirror-lang-spreadsheet": "^1.3.0",
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"@dxos/
|
|
105
|
-
"@dxos/
|
|
106
|
-
"@dxos/
|
|
107
|
-
"@dxos/
|
|
108
|
-
"@dxos/
|
|
109
|
-
"@dxos/
|
|
110
|
-
"@dxos/
|
|
111
|
-
"@dxos/
|
|
112
|
-
"@dxos/
|
|
113
|
-
"@dxos/
|
|
114
|
-
"@dxos/
|
|
115
|
-
"@dxos/
|
|
116
|
-
"@dxos/
|
|
117
|
-
"@dxos/
|
|
118
|
-
"@dxos/
|
|
119
|
-
"@dxos/
|
|
120
|
-
"@dxos/
|
|
121
|
-
"@dxos/
|
|
122
|
-
"@dxos/
|
|
123
|
-
"@dxos/plugin-
|
|
124
|
-
"@dxos/
|
|
125
|
-
"@dxos/
|
|
126
|
-
"@dxos/
|
|
127
|
-
"@dxos/
|
|
128
|
-
"@dxos/
|
|
129
|
-
"@dxos/
|
|
130
|
-
"@dxos/react-client": "0.8.4-main.3fbcb4aa9b",
|
|
131
|
-
"@dxos/react-hooks": "0.8.4-main.3fbcb4aa9b",
|
|
132
|
-
"@dxos/react-ui-editor": "0.8.4-main.3fbcb4aa9b",
|
|
133
|
-
"@dxos/react-ui-attention": "0.8.4-main.3fbcb4aa9b",
|
|
134
|
-
"@dxos/react-ui-form": "0.8.4-main.3fbcb4aa9b",
|
|
135
|
-
"@dxos/react-ui-grid": "0.8.4-main.3fbcb4aa9b",
|
|
136
|
-
"@dxos/react-ui-list": "0.8.4-main.3fbcb4aa9b",
|
|
137
|
-
"@dxos/react-ui-mosaic": "0.8.4-main.3fbcb4aa9b",
|
|
138
|
-
"@dxos/react-ui-stack": "0.8.4-main.3fbcb4aa9b",
|
|
139
|
-
"@dxos/schema": "0.8.4-main.3fbcb4aa9b",
|
|
140
|
-
"@dxos/react-ui-menu": "0.8.4-main.3fbcb4aa9b",
|
|
141
|
-
"@dxos/types": "0.8.4-main.3fbcb4aa9b",
|
|
142
|
-
"@dxos/util": "0.8.4-main.3fbcb4aa9b",
|
|
143
|
-
"@dxos/ui-editor": "0.8.4-main.3fbcb4aa9b"
|
|
96
|
+
"@dxos/app-framework": "0.8.4-main.43cb759274",
|
|
97
|
+
"@dxos/app-toolkit": "0.8.4-main.43cb759274",
|
|
98
|
+
"@dxos/async": "0.8.4-main.43cb759274",
|
|
99
|
+
"@dxos/client": "0.8.4-main.43cb759274",
|
|
100
|
+
"@dxos/compute": "0.8.4-main.43cb759274",
|
|
101
|
+
"@dxos/context": "0.8.4-main.43cb759274",
|
|
102
|
+
"@dxos/debug": "0.8.4-main.43cb759274",
|
|
103
|
+
"@dxos/echo": "0.8.4-main.43cb759274",
|
|
104
|
+
"@dxos/compute-hyperformula": "0.8.4-main.43cb759274",
|
|
105
|
+
"@dxos/crypto": "0.8.4-main.43cb759274",
|
|
106
|
+
"@dxos/echo-db": "0.8.4-main.43cb759274",
|
|
107
|
+
"@dxos/echo-react": "0.8.4-main.43cb759274",
|
|
108
|
+
"@dxos/invariant": "0.8.4-main.43cb759274",
|
|
109
|
+
"@dxos/lit-grid": "0.8.4-main.43cb759274",
|
|
110
|
+
"@dxos/log": "0.8.4-main.43cb759274",
|
|
111
|
+
"@dxos/plugin-client": "0.8.4-main.43cb759274",
|
|
112
|
+
"@dxos/keys": "0.8.4-main.43cb759274",
|
|
113
|
+
"@dxos/plugin-markdown": "0.8.4-main.43cb759274",
|
|
114
|
+
"@dxos/plugin-thread": "0.8.4-main.43cb759274",
|
|
115
|
+
"@dxos/react-client": "0.8.4-main.43cb759274",
|
|
116
|
+
"@dxos/react-hooks": "0.8.4-main.43cb759274",
|
|
117
|
+
"@dxos/react-ui-attention": "0.8.4-main.43cb759274",
|
|
118
|
+
"@dxos/react-ui-form": "0.8.4-main.43cb759274",
|
|
119
|
+
"@dxos/react-ui-editor": "0.8.4-main.43cb759274",
|
|
120
|
+
"@dxos/plugin-space": "0.8.4-main.43cb759274",
|
|
121
|
+
"@dxos/react-ui-list": "0.8.4-main.43cb759274",
|
|
122
|
+
"@dxos/react-ui-menu": "0.8.4-main.43cb759274",
|
|
123
|
+
"@dxos/types": "0.8.4-main.43cb759274",
|
|
124
|
+
"@dxos/react-ui-grid": "0.8.4-main.43cb759274",
|
|
125
|
+
"@dxos/ui-editor": "0.8.4-main.43cb759274",
|
|
126
|
+
"@dxos/util": "0.8.4-main.43cb759274"
|
|
144
127
|
},
|
|
145
128
|
"devDependencies": {
|
|
146
129
|
"@effect-atom/atom-react": "^0.5.0",
|
|
147
|
-
"@effect/platform": "0.
|
|
148
|
-
"@lezer/generator": "^1.
|
|
130
|
+
"@effect/platform": "0.96.1",
|
|
131
|
+
"@lezer/generator": "^1.8.0",
|
|
149
132
|
"@tldraw/indices": "^2.0.0-alpha.14",
|
|
150
133
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
151
134
|
"@types/react": "~19.2.7",
|
|
152
135
|
"@types/react-dom": "~19.2.3",
|
|
153
|
-
"effect": "3.
|
|
136
|
+
"effect": "3.21.2",
|
|
154
137
|
"react": "~19.2.3",
|
|
155
138
|
"react-dom": "~19.2.3",
|
|
156
|
-
"vite": "^8.0.
|
|
157
|
-
"@dxos/echo-generator": "0.8.4-main.
|
|
158
|
-
"@dxos/lit-grid": "0.8.4-main.
|
|
159
|
-
"@dxos/plugin-testing": "0.8.4-main.
|
|
160
|
-
"@dxos/random": "0.8.4-main.
|
|
161
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
162
|
-
"@dxos/
|
|
163
|
-
"@dxos/
|
|
164
|
-
"@dxos/
|
|
165
|
-
"@dxos/ui-
|
|
166
|
-
"@dxos/
|
|
139
|
+
"vite": "^8.0.14",
|
|
140
|
+
"@dxos/echo-generator": "0.8.4-main.43cb759274",
|
|
141
|
+
"@dxos/lit-grid": "0.8.4-main.43cb759274",
|
|
142
|
+
"@dxos/plugin-testing": "0.8.4-main.43cb759274",
|
|
143
|
+
"@dxos/random": "0.8.4-main.43cb759274",
|
|
144
|
+
"@dxos/react-ui": "0.8.4-main.43cb759274",
|
|
145
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.43cb759274",
|
|
146
|
+
"@dxos/storybook-utils": "0.8.4-main.43cb759274",
|
|
147
|
+
"@dxos/ui-theme": "0.8.4-main.43cb759274",
|
|
148
|
+
"@dxos/ui-types": "0.8.4-main.43cb759274",
|
|
149
|
+
"@dxos/test-utils": "0.8.4-main.43cb759274"
|
|
167
150
|
},
|
|
168
151
|
"peerDependencies": {
|
|
169
152
|
"@effect-atom/atom-react": "^0.5.0",
|
|
170
|
-
"@effect/platform": "0.
|
|
171
|
-
"effect": "3.
|
|
153
|
+
"@effect/platform": "0.96.1",
|
|
154
|
+
"effect": "3.21.2",
|
|
172
155
|
"react": "~19.2.3",
|
|
173
156
|
"react-dom": "~19.2.3",
|
|
174
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
175
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
157
|
+
"@dxos/react-ui": "0.8.4-main.43cb759274",
|
|
158
|
+
"@dxos/ui-theme": "0.8.4-main.43cb759274"
|
|
176
159
|
},
|
|
177
160
|
"publishConfig": {
|
|
178
161
|
"access": "public"
|
package/src/SheetPlugin.test.ts
CHANGED
|
@@ -22,7 +22,7 @@ describe('SheetPlugin', () => {
|
|
|
22
22
|
|
|
23
23
|
expect(harness.manager.getActive()).toEqual(expect.arrayContaining([moduleId('CreateObject'), moduleId('schema')]));
|
|
24
24
|
|
|
25
|
-
await harness.fire(ActivationEvents.
|
|
25
|
+
await harness.fire(ActivationEvents.SetupProcessManager);
|
|
26
26
|
expect(harness.manager.getActive()).toEqual(
|
|
27
27
|
expect.arrayContaining([moduleId('OperationHandler'), moduleId('UndoMappings')]),
|
|
28
28
|
);
|
package/src/SheetPlugin.tsx
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { ActivationEvent, Plugin } from '@dxos/app-framework';
|
|
5
|
+
import { ActivationEvent, ActivationEvents, Plugin } from '@dxos/app-framework';
|
|
6
6
|
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
-
import { AutomationEvents } from '@dxos/plugin-automation';
|
|
8
7
|
import { ClientEvents } from '@dxos/plugin-client';
|
|
9
8
|
import { MarkdownEvents } from '@dxos/plugin-markdown';
|
|
10
9
|
|
|
@@ -23,6 +22,9 @@ import { meta } from '#meta';
|
|
|
23
22
|
import { translations } from '#translations';
|
|
24
23
|
import { Sheet } from '#types';
|
|
25
24
|
|
|
25
|
+
// eslint-disable-next-line import/no-relative-packages
|
|
26
|
+
import pluginSpec from '../PLUGIN.mdl?raw';
|
|
27
|
+
|
|
26
28
|
export const SheetPlugin = Plugin.define(meta).pipe(
|
|
27
29
|
AppPlugin.addCommentConfigModule({ activate: CommentConfig }),
|
|
28
30
|
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
@@ -36,7 +38,7 @@ export const SheetPlugin = Plugin.define(meta).pipe(
|
|
|
36
38
|
activate: SheetState,
|
|
37
39
|
}),
|
|
38
40
|
Plugin.addModule({
|
|
39
|
-
activatesOn: ActivationEvent.allOf(ClientEvents.ClientReady,
|
|
41
|
+
activatesOn: ActivationEvent.allOf(ClientEvents.ClientReady, ActivationEvents.ProcessManagerReady),
|
|
40
42
|
activate: ComputeGraphRegistry,
|
|
41
43
|
}),
|
|
42
44
|
Plugin.addModule({
|
|
@@ -48,6 +50,9 @@ export const SheetPlugin = Plugin.define(meta).pipe(
|
|
|
48
50
|
activatesOn: AppActivationEvents.AppGraphReady,
|
|
49
51
|
activate: AnchorSort,
|
|
50
52
|
}),
|
|
53
|
+
AppPlugin.addPluginAssetModule({
|
|
54
|
+
asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
|
|
55
|
+
}),
|
|
51
56
|
Plugin.make,
|
|
52
57
|
);
|
|
53
58
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
+
|
|
8
|
+
import { OperationHandler } from '#capabilities';
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { Sheet } from '#types';
|
|
11
|
+
|
|
12
|
+
export const SheetPlugin = Plugin.define(meta).pipe(
|
|
13
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
14
|
+
AppPlugin.addSchemaModule({ schema: [Sheet.Sheet] }),
|
|
15
|
+
Plugin.make,
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
export default SheetPlugin;
|
|
@@ -6,14 +6,14 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
8
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
-
import { Relation } from '@dxos/echo';
|
|
9
|
+
import { Relation, Type } from '@dxos/echo';
|
|
10
10
|
|
|
11
11
|
import { Sheet, compareIndexPositions } from '#types';
|
|
12
12
|
|
|
13
13
|
export default Capability.makeModule(() =>
|
|
14
14
|
Effect.succeed(
|
|
15
15
|
Capability.contributes(AppCapabilities.AnchorSort, {
|
|
16
|
-
key: Sheet.Sheet
|
|
16
|
+
key: Type.getTypename(Sheet.Sheet),
|
|
17
17
|
sort: (anchorA, anchorB) => {
|
|
18
18
|
const sheet = Relation.getTarget(anchorA) as Sheet.Sheet;
|
|
19
19
|
if (sheet !== Relation.getTarget(anchorB)) {
|
|
@@ -8,6 +8,7 @@ import { Capability } from '@dxos/app-framework';
|
|
|
8
8
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
9
|
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
10
10
|
import type { Operation } from '@dxos/compute';
|
|
11
|
+
import { Type } from '@dxos/echo';
|
|
11
12
|
|
|
12
13
|
import { SheetOperation } from '#types';
|
|
13
14
|
import { Sheet } from '#types';
|
|
@@ -15,7 +16,7 @@ import { Sheet } from '#types';
|
|
|
15
16
|
export default Capability.makeModule(
|
|
16
17
|
Effect.fnUntraced(function* () {
|
|
17
18
|
const config: AppCapabilities.CommentConfig = {
|
|
18
|
-
id: Sheet.Sheet
|
|
19
|
+
id: Type.getTypename(Sheet.Sheet),
|
|
19
20
|
comments: 'anchored',
|
|
20
21
|
scrollToAnchor: SheetOperation.ScrollToAnchor,
|
|
21
22
|
};
|
|
@@ -4,24 +4,37 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import {
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Operation, ServiceResolver } from '@dxos/compute';
|
|
9
|
+
import { type SpaceId } from '@dxos/keys';
|
|
9
10
|
|
|
10
11
|
import { SheetCapabilities } from '#types';
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Builds the per-space compute graph registry by adapting the shared
|
|
15
|
+
* {@link Capabilities.ProcessManagerRuntime} into a
|
|
16
|
+
* {@link FunctionsRuntimeProvider} that resolves {@link Operation.Service}
|
|
17
|
+
* from the space's service layer.
|
|
18
|
+
*/
|
|
14
19
|
export default Capability.makeModule(
|
|
15
20
|
Effect.fnUntraced(function* () {
|
|
16
|
-
const
|
|
17
|
-
|
|
21
|
+
const processManagerRuntime = yield* Capability.get(Capabilities.ProcessManagerRuntime);
|
|
22
|
+
|
|
18
23
|
// Async import removes direct dependency on hyperformula.
|
|
19
24
|
const { defaultPlugins, ComputeGraphRegistry } = yield* Effect.tryPromise(
|
|
20
25
|
() => import('@dxos/compute-hyperformula'),
|
|
21
26
|
);
|
|
27
|
+
|
|
22
28
|
const computeGraphRegistry = new ComputeGraphRegistry({
|
|
23
29
|
plugins: defaultPlugins,
|
|
24
|
-
computeRuntime:
|
|
30
|
+
computeRuntime: {
|
|
31
|
+
getRuntime: (spaceId: SpaceId) => ({
|
|
32
|
+
runPromise: <A, E>(effect: Effect.Effect<A, E, Operation.Service>) =>
|
|
33
|
+
processManagerRuntime.runPromise(
|
|
34
|
+
effect.pipe(Effect.provide(ServiceResolver.provide({ space: spaceId }, Operation.Service))),
|
|
35
|
+
),
|
|
36
|
+
}),
|
|
37
|
+
},
|
|
25
38
|
});
|
|
26
39
|
|
|
27
40
|
return Capability.contributes(SheetCapabilities.ComputeGraphRegistry, computeGraphRegistry);
|
|
@@ -6,6 +6,7 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
8
|
import { Operation } from '@dxos/compute';
|
|
9
|
+
import { Type } from '@dxos/echo';
|
|
9
10
|
import { SpaceOperation } from '@dxos/plugin-space';
|
|
10
11
|
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
11
12
|
|
|
@@ -14,7 +15,7 @@ import { Sheet } from '#types';
|
|
|
14
15
|
export default Capability.makeModule(
|
|
15
16
|
Effect.fnUntraced(function* () {
|
|
16
17
|
return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
17
|
-
id: Sheet.Sheet
|
|
18
|
+
id: Type.getTypename(Sheet.Sheet),
|
|
18
19
|
createObject: (props, options) =>
|
|
19
20
|
Effect.gen(function* () {
|
|
20
21
|
const object = Sheet.make(props);
|
|
@@ -11,7 +11,7 @@ import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
|
11
11
|
import { Obj } from '@dxos/echo';
|
|
12
12
|
import { getSpace } from '@dxos/react-client/echo';
|
|
13
13
|
|
|
14
|
-
import { RangeList,
|
|
14
|
+
import { RangeList, SheetArticle } from '#containers';
|
|
15
15
|
import { Sheet, SheetCapabilities } from '#types';
|
|
16
16
|
|
|
17
17
|
export default Capability.makeModule(() =>
|
|
@@ -24,12 +24,12 @@ export default Capability.makeModule(() =>
|
|
|
24
24
|
filter: (data): data is { attendableId: string; subject: Sheet.Sheet } =>
|
|
25
25
|
typeof data.attendableId === 'string' &&
|
|
26
26
|
Obj.instanceOf(Sheet.Sheet, data.subject) &&
|
|
27
|
-
!!
|
|
27
|
+
!!Obj.getDatabase(data.subject),
|
|
28
28
|
component: ({ data, role }) => {
|
|
29
29
|
const computeGraphRegistry = useCapability(SheetCapabilities.ComputeGraphRegistry);
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
|
-
<
|
|
32
|
+
<SheetArticle
|
|
33
33
|
role={role}
|
|
34
34
|
subject={data.subject}
|
|
35
35
|
attendableId={data.attendableId}
|
|
@@ -40,7 +40,7 @@ export default Capability.makeModule(() =>
|
|
|
40
40
|
},
|
|
41
41
|
}),
|
|
42
42
|
Surface.create({
|
|
43
|
-
id: '
|
|
43
|
+
id: 'objectProperties',
|
|
44
44
|
filter: AppSurface.object(AppSurface.ObjectProperties, Sheet.Sheet),
|
|
45
45
|
component: ({ data }) => <RangeList sheet={data.subject} />,
|
|
46
46
|
}),
|
|
@@ -7,8 +7,7 @@ import React, { useEffect, useRef, useState } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { Operation } from '@dxos/compute';
|
|
9
9
|
import { testFunctionPlugins } from '@dxos/compute-hyperformula/testing';
|
|
10
|
-
import { Filter } from '@dxos/echo';
|
|
11
|
-
import { Obj } from '@dxos/echo';
|
|
10
|
+
import { Filter, Obj } from '@dxos/echo';
|
|
12
11
|
import { useSpaces } from '@dxos/react-client/echo';
|
|
13
12
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
14
13
|
import { Button, Input, Toolbar } from '@dxos/react-ui';
|
|
@@ -45,7 +44,13 @@ const DefaultStory = () => {
|
|
|
45
44
|
setResult({ functions: { standard: f1.length, echo: f2.length } });
|
|
46
45
|
});
|
|
47
46
|
|
|
48
|
-
space.db.add(
|
|
47
|
+
space.db.add(
|
|
48
|
+
Obj.make(Operation.PersistentOperation, {
|
|
49
|
+
[Obj.Meta]: { version: '0.0.1' },
|
|
50
|
+
name: 'test',
|
|
51
|
+
binding: FUNCTION_NAME,
|
|
52
|
+
}),
|
|
53
|
+
);
|
|
49
54
|
}
|
|
50
55
|
}, [space, graph]);
|
|
51
56
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { ProcessManagerPlugin } from '@dxos/app-framework';
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
10
|
import { testFunctionPlugins } from '@dxos/compute-hyperformula/testing';
|
|
11
11
|
import { useSpaces } from '@dxos/react-client/echo';
|
|
@@ -46,7 +46,7 @@ const meta = {
|
|
|
46
46
|
withClientProvider({ types: [Sheet.Sheet], createSpace: true }),
|
|
47
47
|
withComputeGraphDecorator({ plugins: testFunctionPlugins }),
|
|
48
48
|
withPluginManager({
|
|
49
|
-
plugins: [
|
|
49
|
+
plugins: [ProcessManagerPlugin()],
|
|
50
50
|
}),
|
|
51
51
|
],
|
|
52
52
|
parameters: {
|
|
@@ -19,6 +19,7 @@ import { type CellRange, rangeToA1Notation } from '@dxos/compute-hyperformula';
|
|
|
19
19
|
import { Obj } from '@dxos/echo';
|
|
20
20
|
import { defaultColSize, defaultRowSize } from '@dxos/lit-grid';
|
|
21
21
|
import { DropdownMenu, Icon, useTranslation } from '@dxos/react-ui';
|
|
22
|
+
import { composable, composableProps } from '@dxos/react-ui';
|
|
22
23
|
import { useAttention } from '@dxos/react-ui-attention';
|
|
23
24
|
import {
|
|
24
25
|
type DxGridCellIndex,
|
|
@@ -33,7 +34,6 @@ import {
|
|
|
33
34
|
editorKeys,
|
|
34
35
|
parseCellIndex,
|
|
35
36
|
} from '@dxos/react-ui-grid';
|
|
36
|
-
import { composable, composableProps } from '@dxos/ui-theme';
|
|
37
37
|
|
|
38
38
|
import { meta } from '#meta';
|
|
39
39
|
import { SheetOperation } from '#types';
|
|
@@ -66,7 +66,7 @@ const projectCellProps = (model: SheetModel, col: number, row: number): DxGridCe
|
|
|
66
66
|
// const range = thread.target?.anchor && parseThreadAnchorAsCellRange(thread.target!.anchor);
|
|
67
67
|
// return thread && range ? inRange(range, address) : false;
|
|
68
68
|
// })
|
|
69
|
-
// .map((thread) => Obj.
|
|
69
|
+
// .map((thread) => Obj.getURI(thread!))
|
|
70
70
|
// .join(' ');
|
|
71
71
|
|
|
72
72
|
const description = model.getValueDescription(address);
|
|
@@ -6,7 +6,8 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { addressToA1Notation, isFormula, rangeToA1Notation } from '@dxos/compute-hyperformula';
|
|
8
8
|
import { Icon } from '@dxos/react-ui';
|
|
9
|
-
import { composable, composableProps
|
|
9
|
+
import { composable, composableProps } from '@dxos/react-ui';
|
|
10
|
+
import { mx } from '@dxos/ui-theme';
|
|
10
11
|
|
|
11
12
|
import { mapFormulaIndicesToRefs } from '#types';
|
|
12
13
|
|
|
@@ -7,8 +7,8 @@ import React, { useContext, useMemo } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { useAppGraph } from '@dxos/app-toolkit/ui';
|
|
9
9
|
import { type CompleteCellRange } from '@dxos/compute-hyperformula';
|
|
10
|
+
import { composable, composableProps } from '@dxos/react-ui';
|
|
10
11
|
import { type ActionGraphProps, Menu, createGapSeparator, useMenuActions } from '@dxos/react-ui-menu';
|
|
11
|
-
import { composable, composableProps } from '@dxos/ui-theme';
|
|
12
12
|
|
|
13
13
|
import { type SheetModel } from '../../model';
|
|
14
14
|
import { useSheetContext } from '../SheetRoot';
|
|
@@ -23,11 +23,11 @@ import { SheetOperation } from '#types';
|
|
|
23
23
|
import { Sheet } from '#types';
|
|
24
24
|
|
|
25
25
|
import RangeList from '../RangeList';
|
|
26
|
-
import {
|
|
26
|
+
import { SheetArticle } from './SheetArticle';
|
|
27
27
|
|
|
28
28
|
const meta = {
|
|
29
|
-
title: 'plugins/plugin-sheet/containers/
|
|
30
|
-
component:
|
|
29
|
+
title: 'plugins/plugin-sheet/containers/SheetArticle',
|
|
30
|
+
component: SheetArticle,
|
|
31
31
|
decorators: [
|
|
32
32
|
withTheme(),
|
|
33
33
|
withLayout({ layout: 'fullscreen' }),
|
|
@@ -54,7 +54,7 @@ const meta = {
|
|
|
54
54
|
layout: 'fullscreen',
|
|
55
55
|
translations,
|
|
56
56
|
},
|
|
57
|
-
} satisfies Meta<typeof
|
|
57
|
+
} satisfies Meta<typeof SheetArticle>;
|
|
58
58
|
|
|
59
59
|
export default meta;
|
|
60
60
|
|
|
@@ -68,8 +68,8 @@ export const Default = () => {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
return (
|
|
71
|
-
<AttendableContainer id={Obj.
|
|
72
|
-
<
|
|
71
|
+
<AttendableContainer id={Obj.getURI(sheet)} classNames='contents'>
|
|
72
|
+
<SheetArticle
|
|
73
73
|
role='article'
|
|
74
74
|
space={space}
|
|
75
75
|
subject={sheet}
|
|
@@ -91,9 +91,9 @@ export const Spec = () => {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
return (
|
|
94
|
-
<AttendableContainer id={Obj.
|
|
94
|
+
<AttendableContainer id={Obj.getURI(sheet)} classNames='contents'>
|
|
95
95
|
<div className='w-full grid grid-cols-[1fr_20rem]'>
|
|
96
|
-
<
|
|
96
|
+
<SheetArticle
|
|
97
97
|
role='article'
|
|
98
98
|
space={space}
|
|
99
99
|
subject={sheet}
|
|
@@ -12,7 +12,7 @@ import { Panel } from '@dxos/react-ui';
|
|
|
12
12
|
import { ComputeGraphContextProvider, Sheet, useComputeGraph } from '#components';
|
|
13
13
|
import { type Sheet as SheetType } from '#types';
|
|
14
14
|
|
|
15
|
-
export type
|
|
15
|
+
export type SheetArticleProps = AppSurface.ObjectArticleProps<
|
|
16
16
|
SheetType.Sheet,
|
|
17
17
|
{
|
|
18
18
|
space: Space;
|
|
@@ -21,19 +21,19 @@ export type SheetContainerProps = AppSurface.ObjectArticleProps<
|
|
|
21
21
|
}
|
|
22
22
|
>;
|
|
23
23
|
|
|
24
|
-
export const
|
|
24
|
+
export const SheetArticle = ({ registry, ...props }: SheetArticleProps) => (
|
|
25
25
|
<ComputeGraphContextProvider registry={registry}>
|
|
26
|
-
<
|
|
26
|
+
<SheetArticleInner {...props} />
|
|
27
27
|
</ComputeGraphContextProvider>
|
|
28
28
|
);
|
|
29
29
|
|
|
30
|
-
const
|
|
30
|
+
const SheetArticleInner = ({
|
|
31
31
|
role,
|
|
32
32
|
subject: sheet,
|
|
33
33
|
attendableId,
|
|
34
34
|
space,
|
|
35
35
|
ignoreAttention,
|
|
36
|
-
}: Omit<
|
|
36
|
+
}: Omit<SheetArticleProps, 'registry'>) => {
|
|
37
37
|
const graph = useComputeGraph(space);
|
|
38
38
|
if (!graph) {
|
|
39
39
|
return null;
|
package/src/containers/index.ts
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
import { type ComponentType, lazy } from 'react';
|
|
6
6
|
|
|
7
7
|
export const RangeList: ComponentType<any> = lazy(() => import('./RangeList'));
|
|
8
|
-
export const
|
|
8
|
+
export const SheetArticle: ComponentType<any> = lazy(() => import('./SheetArticle'));
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import React, { useEffect, useMemo } from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { ProcessManagerPlugin } from '@dxos/app-framework';
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
10
|
import { PublicKey } from '@dxos/keys';
|
|
11
11
|
import { useSpaces } from '@dxos/react-client/echo';
|
|
@@ -115,7 +115,7 @@ const meta = {
|
|
|
115
115
|
createSpace: true,
|
|
116
116
|
}),
|
|
117
117
|
// TODO(wittjosiah): Try to write story which does not depend on plugin manager.
|
|
118
|
-
withPluginManager({ plugins: [
|
|
118
|
+
withPluginManager({ plugins: [ProcessManagerPlugin()] }),
|
|
119
119
|
withComputeGraphDecorator(),
|
|
120
120
|
],
|
|
121
121
|
parameters: {
|
|
@@ -170,7 +170,7 @@ export const sheetExtension = ({ debug, functions = [] }: SheetExtensionOptions)
|
|
|
170
170
|
tooltipClass: () =>
|
|
171
171
|
mx(
|
|
172
172
|
'!-left-[1px] !top-[33px] !-m-0 border border-h-0! [&>ul]:!min-w-[198px]',
|
|
173
|
-
'[&>ul>li[aria-selected]]:!bg-accent-
|
|
173
|
+
'[&>ul>li[aria-selected]]:!bg-accent-bg',
|
|
174
174
|
'border-separator',
|
|
175
175
|
),
|
|
176
176
|
}),
|
|
@@ -8,9 +8,9 @@ import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
|
8
8
|
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
9
|
import { debounce } from '@dxos/async';
|
|
10
10
|
import { type CellAddress, type CompleteCellRange, inRange } from '@dxos/compute-hyperformula';
|
|
11
|
-
import { Obj, Relation } from '@dxos/echo';
|
|
11
|
+
import { Filter, Obj, Query, Relation } from '@dxos/echo';
|
|
12
12
|
import { ThreadOperation } from '@dxos/plugin-thread';
|
|
13
|
-
import {
|
|
13
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
14
14
|
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
15
15
|
import { AnchoredTo, Thread } from '@dxos/types';
|
|
16
16
|
|
|
@@ -58,7 +58,7 @@ export const useSelectThreadOnCellFocus = () => {
|
|
|
58
58
|
|
|
59
59
|
if (closestThread) {
|
|
60
60
|
void (async () => {
|
|
61
|
-
await invokePromise(ThreadOperation.Select, { current: Relation.
|
|
61
|
+
await invokePromise(ThreadOperation.Select, { current: Relation.getURI(closestThread) });
|
|
62
62
|
await invokePromise(LayoutOperation.UpdateCompanion, {
|
|
63
63
|
subject: linkedSegment('comments'),
|
|
64
64
|
});
|