@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.
Files changed (124) hide show
  1. package/LICENSE +102 -5
  2. package/PLUGIN.mdl +359 -0
  3. package/dist/lib/neutral/{SheetContainer-ZOVKGHLT.mjs → SheetArticle-5AJRM3V3.mjs} +6 -6
  4. package/dist/lib/neutral/SheetArticle-5AJRM3V3.mjs.map +7 -0
  5. package/dist/lib/neutral/SheetPlugin.mjs +14 -3
  6. package/dist/lib/neutral/SheetPlugin.mjs.map +4 -4
  7. package/dist/lib/neutral/SheetPlugin.workerd.mjs +21 -0
  8. package/dist/lib/neutral/SheetPlugin.workerd.mjs.map +7 -0
  9. package/dist/lib/neutral/{anchor-sort-TTCKGX7V.mjs → anchor-sort-2POWTKTD.mjs} +3 -3
  10. package/dist/lib/neutral/anchor-sort-2POWTKTD.mjs.map +7 -0
  11. package/dist/lib/neutral/capabilities/index.mjs +6 -6
  12. package/dist/lib/neutral/{chunk-4GWJDLTH.mjs → chunk-3AIMSE7U.mjs} +4 -4
  13. package/dist/lib/neutral/{chunk-4GWJDLTH.mjs.map → chunk-3AIMSE7U.mjs.map} +3 -3
  14. package/dist/lib/neutral/chunk-7ZUM64KO.mjs +8 -0
  15. package/dist/lib/neutral/{chunk-4SBAIU6F.mjs → chunk-ERHMBRSU.mjs} +2 -2
  16. package/dist/lib/neutral/{chunk-4SBAIU6F.mjs.map → chunk-ERHMBRSU.mjs.map} +2 -2
  17. package/dist/lib/neutral/{chunk-KC2SMDNF.mjs → chunk-EUM3RVML.mjs} +21 -20
  18. package/dist/lib/neutral/chunk-EUM3RVML.mjs.map +7 -0
  19. package/dist/lib/neutral/chunk-FQHTXKMF.mjs +34 -0
  20. package/dist/lib/neutral/chunk-FQHTXKMF.mjs.map +7 -0
  21. package/dist/lib/neutral/{comment-config-ZBWNCJMZ.mjs → comment-config-6JAROASH.mjs} +3 -2
  22. package/dist/lib/neutral/comment-config-6JAROASH.mjs.map +7 -0
  23. package/dist/lib/neutral/components/index.mjs +10 -9
  24. package/dist/lib/neutral/components/index.mjs.map +3 -3
  25. package/dist/lib/neutral/{compute-graph-registry-IEQBF5XZ.mjs → compute-graph-registry-YYINTFC2.mjs} +11 -5
  26. package/dist/lib/neutral/compute-graph-registry-YYINTFC2.mjs.map +7 -0
  27. package/dist/lib/neutral/containers/index.mjs +2 -2
  28. package/dist/lib/neutral/containers/index.mjs.map +3 -3
  29. package/dist/lib/neutral/{create-object-OKQAXJCW.mjs → create-object-6FZSSROF.mjs} +3 -2
  30. package/dist/lib/neutral/create-object-6FZSSROF.mjs.map +7 -0
  31. package/dist/lib/neutral/{drop-axis-G6UOXG54.mjs → drop-axis-MO3KUU4C.mjs} +2 -2
  32. package/dist/lib/neutral/index.mjs +5 -5
  33. package/dist/lib/neutral/{insert-axis-ZFFNG22G.mjs → insert-axis-V7E5PTMG.mjs} +2 -2
  34. package/dist/lib/neutral/{markdown-I2AKJYPF.mjs → markdown-O37EE3ER.mjs} +2 -2
  35. package/dist/lib/neutral/meta.json +1 -1
  36. package/dist/lib/neutral/meta.mjs +1 -1
  37. package/dist/lib/neutral/operations/index.mjs +1 -1
  38. package/dist/lib/neutral/plugin.mjs +4 -4
  39. package/dist/lib/neutral/{react-surface-ID4JCAFR.mjs → react-surface-4H3PC4WG.mjs} +5 -5
  40. package/dist/lib/neutral/react-surface-4H3PC4WG.mjs.map +7 -0
  41. package/dist/lib/neutral/{restore-axis-44DM6N54.mjs → restore-axis-BAM44OPG.mjs} +2 -2
  42. package/dist/lib/neutral/{scroll-to-anchor-WHX3HJC7.mjs → scroll-to-anchor-TBE2FTTT.mjs} +3 -3
  43. package/dist/lib/neutral/translations.mjs +2 -1
  44. package/dist/lib/neutral/translations.mjs.map +3 -3
  45. package/dist/lib/neutral/types/index.mjs +1 -1
  46. package/dist/types/src/SheetPlugin.d.ts.map +1 -1
  47. package/dist/types/src/SheetPlugin.workerd.d.ts +4 -0
  48. package/dist/types/src/SheetPlugin.workerd.d.ts.map +1 -0
  49. package/dist/types/src/capabilities/compute-graph-registry.d.ts +6 -0
  50. package/dist/types/src/capabilities/compute-graph-registry.d.ts.map +1 -1
  51. package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
  52. package/dist/types/src/components/ComputeGraph/compute-graph.stories.d.ts.map +1 -1
  53. package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts.map +1 -1
  54. package/dist/types/src/containers/{SheetContainer/SheetContainer.d.ts → SheetArticle/SheetArticle.d.ts} +3 -3
  55. package/dist/types/src/containers/SheetArticle/SheetArticle.d.ts.map +1 -0
  56. package/dist/types/src/containers/{SheetContainer/SheetContainer.stories.d.ts → SheetArticle/SheetArticle.stories.d.ts} +2 -2
  57. package/dist/types/src/containers/SheetArticle/SheetArticle.stories.d.ts.map +1 -0
  58. package/dist/types/src/containers/SheetArticle/index.d.ts +2 -0
  59. package/dist/types/src/containers/SheetArticle/index.d.ts.map +1 -0
  60. package/dist/types/src/containers/index.d.ts +1 -1
  61. package/dist/types/src/containers/index.d.ts.map +1 -1
  62. package/dist/types/src/meta.d.ts +1 -1
  63. package/dist/types/src/meta.d.ts.map +1 -1
  64. package/dist/types/src/model/sheet-model.d.ts +25 -1
  65. package/dist/types/src/model/sheet-model.d.ts.map +1 -1
  66. package/dist/types/src/testing/testing.d.ts +2 -2
  67. package/dist/types/src/testing/testing.d.ts.map +1 -1
  68. package/dist/types/src/translations.d.ts.map +1 -1
  69. package/dist/types/src/types/Sheet.d.ts +3 -4
  70. package/dist/types/src/types/Sheet.d.ts.map +1 -1
  71. package/dist/types/src/types/SheetOperation.d.ts.map +1 -1
  72. package/dist/types/tsconfig.tsbuildinfo +1 -1
  73. package/package.json +62 -79
  74. package/src/SheetPlugin.test.ts +1 -1
  75. package/src/SheetPlugin.tsx +8 -3
  76. package/src/SheetPlugin.workerd.ts +18 -0
  77. package/src/capabilities/anchor-sort.ts +2 -2
  78. package/src/capabilities/comment-config.ts +2 -1
  79. package/src/capabilities/compute-graph-registry.ts +20 -7
  80. package/src/capabilities/create-object.ts +2 -1
  81. package/src/capabilities/react-surface.tsx +4 -4
  82. package/src/components/ComputeGraph/compute-graph.stories.tsx +8 -3
  83. package/src/components/SheetContent/SheetContent.stories.tsx +2 -2
  84. package/src/components/SheetContent/SheetContent.tsx +1 -1
  85. package/src/components/SheetContent/util.ts +1 -1
  86. package/src/components/SheetStatusbar/SheetStatusbar.tsx +2 -1
  87. package/src/components/SheetToolbar/SheetToolbar.tsx +1 -1
  88. package/src/containers/{SheetContainer/SheetContainer.stories.tsx → SheetArticle/SheetArticle.stories.tsx} +8 -8
  89. package/src/containers/{SheetContainer/SheetContainer.tsx → SheetArticle/SheetArticle.tsx} +5 -5
  90. package/src/containers/SheetArticle/index.ts +5 -0
  91. package/src/containers/index.ts +1 -1
  92. package/src/extensions/compute.stories.tsx +2 -2
  93. package/src/extensions/editor/sheet-extension.ts +1 -1
  94. package/src/integrations/thread-ranges.ts +3 -3
  95. package/src/meta.ts +18 -6
  96. package/src/model/sheet-model.ts +2 -2
  97. package/src/playwright/sheet.spec.ts +1 -1
  98. package/src/sanity.test.ts +5 -1
  99. package/src/translations.ts +2 -1
  100. package/src/types/Sheet.ts +4 -10
  101. package/src/types/SheetOperation.ts +14 -5
  102. package/src/types/util.ts +3 -3
  103. package/src/vite-env.d.ts +10 -0
  104. package/dist/lib/neutral/SheetContainer-ZOVKGHLT.mjs.map +0 -7
  105. package/dist/lib/neutral/anchor-sort-TTCKGX7V.mjs.map +0 -7
  106. package/dist/lib/neutral/chunk-KC2SMDNF.mjs.map +0 -7
  107. package/dist/lib/neutral/chunk-YFHTB6MX.mjs +0 -8
  108. package/dist/lib/neutral/chunk-ZWOQCLH7.mjs +0 -21
  109. package/dist/lib/neutral/chunk-ZWOQCLH7.mjs.map +0 -7
  110. package/dist/lib/neutral/comment-config-ZBWNCJMZ.mjs.map +0 -7
  111. package/dist/lib/neutral/compute-graph-registry-IEQBF5XZ.mjs.map +0 -7
  112. package/dist/lib/neutral/create-object-OKQAXJCW.mjs.map +0 -7
  113. package/dist/lib/neutral/react-surface-ID4JCAFR.mjs.map +0 -7
  114. package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts.map +0 -1
  115. package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts.map +0 -1
  116. package/dist/types/src/containers/SheetContainer/index.d.ts +0 -2
  117. package/dist/types/src/containers/SheetContainer/index.d.ts.map +0 -1
  118. package/src/containers/SheetContainer/index.ts +0 -5
  119. /package/dist/lib/neutral/{chunk-YFHTB6MX.mjs.map → chunk-7ZUM64KO.mjs.map} +0 -0
  120. /package/dist/lib/neutral/{drop-axis-G6UOXG54.mjs.map → drop-axis-MO3KUU4C.mjs.map} +0 -0
  121. /package/dist/lib/neutral/{insert-axis-ZFFNG22G.mjs.map → insert-axis-V7E5PTMG.mjs.map} +0 -0
  122. /package/dist/lib/neutral/{markdown-I2AKJYPF.mjs.map → markdown-O37EE3ER.mjs.map} +0 -0
  123. /package/dist/lib/neutral/{restore-axis-44DM6N54.mjs.map → restore-axis-BAM44OPG.mjs.map} +0 -0
  124. /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.3fbcb4aa9b",
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": "MIT",
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.19.0",
86
- "@codemirror/language": "^6.11.3",
87
- "@codemirror/state": "^6.5.2",
88
- "@codemirror/view": "^6.38.5",
89
- "@dnd-kit/core": "^6.0.5",
90
- "@dnd-kit/modifiers": "^6.0.0",
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
- "date-fns": "^3.6.0",
100
- "lodash.defaultsdeep": "^4.6.1",
101
- "re-resizable": "^6.9.17",
102
- "react-markdown": "^10.1.0",
103
- "react-resize-detector": "^11.0.1",
104
- "@dxos/app-framework": "0.8.4-main.3fbcb4aa9b",
105
- "@dxos/async": "0.8.4-main.3fbcb4aa9b",
106
- "@dxos/compute-hyperformula": "0.8.4-main.3fbcb4aa9b",
107
- "@dxos/app-toolkit": "0.8.4-main.3fbcb4aa9b",
108
- "@dxos/compute": "0.8.4-main.3fbcb4aa9b",
109
- "@dxos/context": "0.8.4-main.3fbcb4aa9b",
110
- "@dxos/client": "0.8.4-main.3fbcb4aa9b",
111
- "@dxos/crypto": "0.8.4-main.3fbcb4aa9b",
112
- "@dxos/debug": "0.8.4-main.3fbcb4aa9b",
113
- "@dxos/echo": "0.8.4-main.3fbcb4aa9b",
114
- "@dxos/echo-db": "0.8.4-main.3fbcb4aa9b",
115
- "@dxos/invariant": "0.8.4-main.3fbcb4aa9b",
116
- "@dxos/echo-react": "0.8.4-main.3fbcb4aa9b",
117
- "@dxos/keys": "0.8.4-main.3fbcb4aa9b",
118
- "@dxos/lit-grid": "0.8.4-main.3fbcb4aa9b",
119
- "@dxos/log": "0.8.4-main.3fbcb4aa9b",
120
- "@dxos/plugin-attention": "0.8.4-main.3fbcb4aa9b",
121
- "@dxos/plugin-automation": "0.8.4-main.3fbcb4aa9b",
122
- "@dxos/plugin-deck": "0.8.4-main.3fbcb4aa9b",
123
- "@dxos/plugin-client": "0.8.4-main.3fbcb4aa9b",
124
- "@dxos/plugin-graph": "0.8.4-main.3fbcb4aa9b",
125
- "@dxos/plugin-markdown": "0.8.4-main.3fbcb4aa9b",
126
- "@dxos/plugin-script": "0.8.4-main.3fbcb4aa9b",
127
- "@dxos/plugin-space": "0.8.4-main.3fbcb4aa9b",
128
- "@dxos/plugin-stack": "0.8.4-main.3fbcb4aa9b",
129
- "@dxos/plugin-thread": "0.8.4-main.3fbcb4aa9b",
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.94.4",
148
- "@lezer/generator": "^1.7.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.20.0",
136
+ "effect": "3.21.2",
154
137
  "react": "~19.2.3",
155
138
  "react-dom": "~19.2.3",
156
- "vite": "^8.0.10",
157
- "@dxos/echo-generator": "0.8.4-main.3fbcb4aa9b",
158
- "@dxos/lit-grid": "0.8.4-main.3fbcb4aa9b",
159
- "@dxos/plugin-testing": "0.8.4-main.3fbcb4aa9b",
160
- "@dxos/random": "0.8.4-main.3fbcb4aa9b",
161
- "@dxos/react-ui": "0.8.4-main.3fbcb4aa9b",
162
- "@dxos/storybook-utils": "0.8.4-main.3fbcb4aa9b",
163
- "@dxos/test-utils": "0.8.4-main.3fbcb4aa9b",
164
- "@dxos/react-ui-syntax-highlighter": "0.8.4-main.3fbcb4aa9b",
165
- "@dxos/ui-theme": "0.8.4-main.3fbcb4aa9b",
166
- "@dxos/ui-types": "0.8.4-main.3fbcb4aa9b"
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.94.4",
171
- "effect": "3.20.0",
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.3fbcb4aa9b",
175
- "@dxos/ui-theme": "0.8.4-main.3fbcb4aa9b"
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"
@@ -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.SetupOperationHandler);
25
+ await harness.fire(ActivationEvents.SetupProcessManager);
26
26
  expect(harness.manager.getActive()).toEqual(
27
27
  expect.arrayContaining([moduleId('OperationHandler'), moduleId('UndoMappings')]),
28
28
  );
@@ -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, AutomationEvents.ComputeRuntimeReady),
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.typename,
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.typename,
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 { AutomationCapabilities } from '@dxos/plugin-automation';
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
- // Locally declare the Automation ComputeRuntime capability by ID to avoid direct import dependency.
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 computeRuntimeResolver = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
17
- // TODO(wittjosiah): This can probably be a module level import now due to lazy capability loading.
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: computeRuntimeResolver,
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.typename,
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, SheetContainer } from '#containers';
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
- !!getSpace(data.subject),
27
+ !!Obj.getDatabase(data.subject),
28
28
  component: ({ data, role }) => {
29
29
  const computeGraphRegistry = useCapability(SheetCapabilities.ComputeGraphRegistry);
30
30
 
31
31
  return (
32
- <SheetContainer
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: 'object-properties',
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(Obj.make(Operation.PersistentOperation, { name: 'test', version: '0.0.1', binding: FUNCTION_NAME }));
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 { OperationPlugin, RuntimePlugin } from '@dxos/app-framework';
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: [OperationPlugin(), RuntimePlugin()],
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.getDXN(thread!).toString())
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, mx } from '@dxos/ui-theme';
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 { SheetContainer } from './SheetContainer';
26
+ import { SheetArticle } from './SheetArticle';
27
27
 
28
28
  const meta = {
29
- title: 'plugins/plugin-sheet/containers/SheetContainer',
30
- component: SheetContainer,
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 SheetContainer>;
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.getDXN(sheet).toString()} classNames='contents'>
72
- <SheetContainer
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.getDXN(sheet).toString()} classNames='contents'>
94
+ <AttendableContainer id={Obj.getURI(sheet)} classNames='contents'>
95
95
  <div className='w-full grid grid-cols-[1fr_20rem]'>
96
- <SheetContainer
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 SheetContainerProps = AppSurface.ObjectArticleProps<
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 SheetContainer = ({ registry, ...props }: SheetContainerProps) => (
24
+ export const SheetArticle = ({ registry, ...props }: SheetArticleProps) => (
25
25
  <ComputeGraphContextProvider registry={registry}>
26
- <SheetContainerInner {...props} />
26
+ <SheetArticleInner {...props} />
27
27
  </ComputeGraphContextProvider>
28
28
  );
29
29
 
30
- const SheetContainerInner = ({
30
+ const SheetArticleInner = ({
31
31
  role,
32
32
  subject: sheet,
33
33
  attendableId,
34
34
  space,
35
35
  ignoreAttention,
36
- }: Omit<SheetContainerProps, 'registry'>) => {
36
+ }: Omit<SheetArticleProps, 'registry'>) => {
37
37
  const graph = useComputeGraph(space);
38
38
  if (!graph) {
39
39
  return null;
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ export { SheetArticle as default } from './SheetArticle';
@@ -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 SheetContainer: ComponentType<any> = lazy(() => import('./SheetContainer'));
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 { OperationPlugin, RuntimePlugin } from '@dxos/app-framework';
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: [OperationPlugin(), RuntimePlugin()] }),
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-surface',
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 { Filter, Query, useQuery } from '@dxos/react-client/echo';
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.getDXN(closestThread).toString() });
61
+ await invokePromise(ThreadOperation.Select, { current: Relation.getURI(closestThread) });
62
62
  await invokePromise(LayoutOperation.UpdateCompanion, {
63
63
  subject: linkedSegment('comments'),
64
64
  });