@dxos/plugin-sheet 0.9.0 → 0.9.1-staging.ee54ba693a

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 (157) hide show
  1. package/dist/lib/neutral/RangeList-EIJTFS7P.mjs +53 -0
  2. package/dist/lib/neutral/RangeList-EIJTFS7P.mjs.map +7 -0
  3. package/dist/lib/neutral/{SheetArticle-5AJRM3V3.mjs → SheetArticle-IUPQYGUU.mjs} +3 -2
  4. package/dist/lib/neutral/SheetArticle-IUPQYGUU.mjs.map +7 -0
  5. package/dist/lib/neutral/SheetPlugin.mjs +5 -7
  6. package/dist/lib/neutral/SheetPlugin.mjs.map +4 -4
  7. package/dist/lib/neutral/capabilities/index.mjs +6 -8
  8. package/dist/lib/neutral/capabilities/index.mjs.map +3 -3
  9. package/dist/lib/neutral/{chunk-KUWATEHB.mjs → chunk-HY4DM35G.mjs} +101 -9
  10. package/dist/lib/neutral/chunk-HY4DM35G.mjs.map +7 -0
  11. package/dist/lib/neutral/chunk-TDGEOMRG.mjs +8 -0
  12. package/dist/lib/neutral/{chunk-BGR7FVNF.mjs.map → chunk-TDGEOMRG.mjs.map} +2 -2
  13. package/dist/lib/neutral/chunk-WTSCOM64.mjs +45 -0
  14. package/dist/lib/neutral/chunk-WTSCOM64.mjs.map +7 -0
  15. package/dist/lib/neutral/{comment-config-WGXXX5FG.mjs → comment-config-4CIQFYM2.mjs} +1 -1
  16. package/dist/lib/neutral/comment-config-4CIQFYM2.mjs.map +7 -0
  17. package/dist/lib/neutral/components/index.mjs +14 -14
  18. package/dist/lib/neutral/components/index.mjs.map +3 -3
  19. package/dist/lib/neutral/containers/index.mjs +2 -2
  20. package/dist/lib/neutral/create-I3TKMPQO.mjs +30 -0
  21. package/dist/lib/neutral/create-I3TKMPQO.mjs.map +7 -0
  22. package/dist/lib/neutral/{create-object-TDQQ24IB.mjs → create-object-5WEY5XZJ.mjs} +2 -6
  23. package/dist/lib/neutral/create-object-5WEY5XZJ.mjs.map +7 -0
  24. package/dist/lib/neutral/{drop-axis-WSWFOLQN.mjs → drop-axis-JPFU5CJO.mjs} +2 -2
  25. package/dist/lib/neutral/get-values-7YWQTH65.mjs +92 -0
  26. package/dist/lib/neutral/get-values-7YWQTH65.mjs.map +7 -0
  27. package/dist/lib/neutral/index.mjs +3 -9
  28. package/dist/lib/neutral/{insert-axis-6UQJTIWC.mjs → insert-axis-WD6ZC3UA.mjs} +2 -2
  29. package/dist/lib/neutral/meta.json +1 -1
  30. package/dist/lib/neutral/meta.mjs +1 -1
  31. package/dist/lib/neutral/operations/index.mjs +1 -1
  32. package/dist/lib/neutral/plugin.mjs +2 -2
  33. package/dist/lib/neutral/{react-surface-4H3PC4WG.mjs → react-surface-TJT6F2E4.mjs} +2 -6
  34. package/dist/lib/neutral/react-surface-TJT6F2E4.mjs.map +7 -0
  35. package/dist/lib/neutral/{restore-axis-AMMVTPS3.mjs → restore-axis-RLPX7P3G.mjs} +2 -2
  36. package/dist/lib/neutral/{scroll-to-anchor-FK2CXCQR.mjs → scroll-to-anchor-6FJJQWZC.mjs} +2 -2
  37. package/dist/lib/neutral/set-values-5DVOVLJH.mjs +30 -0
  38. package/dist/lib/neutral/set-values-5DVOVLJH.mjs.map +7 -0
  39. package/dist/lib/neutral/skill-definition-U3KQCFOI.mjs +12 -0
  40. package/dist/lib/neutral/skill-definition-U3KQCFOI.mjs.map +7 -0
  41. package/dist/lib/neutral/translations.mjs +1 -1
  42. package/dist/lib/neutral/translations.mjs.map +3 -3
  43. package/dist/lib/neutral/types/index.mjs +1 -1
  44. package/dist/lib/neutral/{undo-mappings-3FQLSTCZ.mjs → undo-mappings-O75AYIRG.mjs} +2 -2
  45. package/dist/lib/neutral/{undo-mappings-3FQLSTCZ.mjs.map → undo-mappings-O75AYIRG.mjs.map} +3 -3
  46. package/dist/types/dx.config.d.ts +28 -0
  47. package/dist/types/dx.config.d.ts.map +1 -0
  48. package/dist/types/src/SheetPlugin.d.ts.map +1 -1
  49. package/dist/types/src/capabilities/anchor-sort.d.ts +1 -2
  50. package/dist/types/src/capabilities/anchor-sort.d.ts.map +1 -1
  51. package/dist/types/src/capabilities/comment-config.d.ts +1 -2
  52. package/dist/types/src/capabilities/comment-config.d.ts.map +1 -1
  53. package/dist/types/src/capabilities/compute-graph-registry.d.ts +1 -1
  54. package/dist/types/src/capabilities/create-object.d.ts +1 -7
  55. package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
  56. package/dist/types/src/capabilities/index.d.ts +9 -16
  57. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  58. package/dist/types/src/capabilities/markdown-extension.d.ts +1 -1
  59. package/dist/types/src/capabilities/react-surface.d.ts +2 -2
  60. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  61. package/dist/types/src/capabilities/skill-definition.d.ts +5 -0
  62. package/dist/types/src/capabilities/skill-definition.d.ts.map +1 -0
  63. package/dist/types/src/capabilities/state.d.ts +1 -2
  64. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  65. package/dist/types/src/capabilities/undo-mappings.d.ts +2 -2
  66. package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -1
  67. package/dist/types/src/components/Sheet/Sheet.d.ts +1 -1
  68. package/dist/types/src/components/Sheet/Sheet.d.ts.map +1 -1
  69. package/dist/types/src/containers/RangeList/RangeList.d.ts.map +1 -1
  70. package/dist/types/src/containers/SheetArticle/SheetArticle.d.ts +1 -1
  71. package/dist/types/src/containers/SheetArticle/SheetArticle.d.ts.map +1 -1
  72. package/dist/types/src/index.d.ts +0 -1
  73. package/dist/types/src/index.d.ts.map +1 -1
  74. package/dist/types/src/meta.d.ts +32 -2
  75. package/dist/types/src/meta.d.ts.map +1 -1
  76. package/dist/types/src/model/sheet-model.d.ts +1 -25
  77. package/dist/types/src/model/sheet-model.d.ts.map +1 -1
  78. package/dist/types/src/operations/create.d.ts +5 -0
  79. package/dist/types/src/operations/create.d.ts.map +1 -0
  80. package/dist/types/src/operations/get-values.d.ts +5 -0
  81. package/dist/types/src/operations/get-values.d.ts.map +1 -0
  82. package/dist/types/src/operations/index.d.ts.map +1 -1
  83. package/dist/types/src/operations/set-values.d.ts +5 -0
  84. package/dist/types/src/operations/set-values.d.ts.map +1 -0
  85. package/dist/types/src/skills/index.d.ts +2 -0
  86. package/dist/types/src/skills/index.d.ts.map +1 -0
  87. package/dist/types/src/skills/sheet-skill.d.ts +4 -0
  88. package/dist/types/src/skills/sheet-skill.d.ts.map +1 -0
  89. package/dist/types/src/testing/testing.d.ts +1 -25
  90. package/dist/types/src/testing/testing.d.ts.map +1 -1
  91. package/dist/types/src/types/Sheet.d.ts +7 -28
  92. package/dist/types/src/types/Sheet.d.ts.map +1 -1
  93. package/dist/types/src/types/SheetCapabilities.d.ts.map +1 -1
  94. package/dist/types/src/types/SheetOperation.d.ts +22 -0
  95. package/dist/types/src/types/SheetOperation.d.ts.map +1 -1
  96. package/dist/types/src/types/util.d.ts.map +1 -1
  97. package/dist/types/tsconfig.tsbuildinfo +1 -1
  98. package/dx.config.ts +31 -0
  99. package/package.json +61 -54
  100. package/src/SheetPlugin.test.ts +1 -1
  101. package/src/SheetPlugin.tsx +4 -6
  102. package/src/capabilities/comment-config.ts +1 -6
  103. package/src/capabilities/create-object.ts +1 -4
  104. package/src/capabilities/index.ts +2 -9
  105. package/src/capabilities/react-surface.tsx +4 -5
  106. package/src/capabilities/skill-definition.ts +14 -0
  107. package/src/capabilities/undo-mappings.ts +1 -1
  108. package/src/components/Sheet/Sheet.tsx +1 -1
  109. package/src/components/SheetContent/SheetCellEditor.stories.tsx +2 -2
  110. package/src/components/SheetContent/SheetContent.tsx +1 -1
  111. package/src/components/SheetContent/util.ts +7 -7
  112. package/src/components/SheetToolbar/align.ts +2 -2
  113. package/src/components/SheetToolbar/style.ts +1 -1
  114. package/src/containers/RangeList/RangeList.tsx +36 -20
  115. package/src/containers/SheetArticle/SheetArticle.tsx +2 -2
  116. package/src/index.ts +0 -1
  117. package/src/meta.ts +2 -24
  118. package/src/operations/create.ts +24 -0
  119. package/src/operations/get-values.ts +83 -0
  120. package/src/operations/index.ts +3 -0
  121. package/src/operations/set-values.ts +29 -0
  122. package/src/skills/index.ts +5 -0
  123. package/src/skills/sheet-skill.ts +46 -0
  124. package/src/translations.ts +1 -1
  125. package/src/types/Sheet.ts +26 -21
  126. package/src/types/SheetCapabilities.ts +2 -2
  127. package/src/types/SheetOperation.ts +62 -1
  128. package/src/types/util.ts +8 -1
  129. package/dist/lib/neutral/RangeList-HYB5S6KQ.mjs +0 -46
  130. package/dist/lib/neutral/RangeList-HYB5S6KQ.mjs.map +0 -7
  131. package/dist/lib/neutral/SheetArticle-5AJRM3V3.mjs.map +0 -7
  132. package/dist/lib/neutral/app-graph-builder-2QP6GYB2.mjs +0 -67
  133. package/dist/lib/neutral/app-graph-builder-2QP6GYB2.mjs.map +0 -7
  134. package/dist/lib/neutral/chunk-BGR7FVNF.mjs +0 -8
  135. package/dist/lib/neutral/chunk-FQHTXKMF.mjs +0 -34
  136. package/dist/lib/neutral/chunk-FQHTXKMF.mjs.map +0 -7
  137. package/dist/lib/neutral/chunk-KUWATEHB.mjs.map +0 -7
  138. package/dist/lib/neutral/chunk-S2UNH6VD.mjs +0 -10
  139. package/dist/lib/neutral/chunk-S2UNH6VD.mjs.map +0 -7
  140. package/dist/lib/neutral/comment-config-WGXXX5FG.mjs.map +0 -7
  141. package/dist/lib/neutral/create-object-TDQQ24IB.mjs.map +0 -7
  142. package/dist/lib/neutral/navigation-resolver-FXEZYO7G.mjs +0 -14
  143. package/dist/lib/neutral/navigation-resolver-FXEZYO7G.mjs.map +0 -7
  144. package/dist/lib/neutral/react-surface-4H3PC4WG.mjs.map +0 -7
  145. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -6
  146. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  147. package/dist/types/src/capabilities/navigation-resolver.d.ts +0 -6
  148. package/dist/types/src/capabilities/navigation-resolver.d.ts.map +0 -1
  149. package/dist/types/src/paths.d.ts +0 -3
  150. package/dist/types/src/paths.d.ts.map +0 -1
  151. package/src/capabilities/app-graph-builder.ts +0 -63
  152. package/src/capabilities/navigation-resolver.ts +0 -16
  153. package/src/paths.ts +0 -11
  154. /package/dist/lib/neutral/{drop-axis-WSWFOLQN.mjs.map → drop-axis-JPFU5CJO.mjs.map} +0 -0
  155. /package/dist/lib/neutral/{insert-axis-6UQJTIWC.mjs.map → insert-axis-WD6ZC3UA.mjs.map} +0 -0
  156. /package/dist/lib/neutral/{restore-axis-AMMVTPS3.mjs.map → restore-axis-RLPX7P3G.mjs.map} +0 -0
  157. /package/dist/lib/neutral/{scroll-to-anchor-FK2CXCQR.mjs.map → scroll-to-anchor-6FJJQWZC.mjs.map} +0 -0
package/dx.config.ts ADDED
@@ -0,0 +1,31 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Config2 } from '@dxos/app-framework/config';
6
+ import { trim } from '@dxos/util';
7
+
8
+ export default Config2.make({
9
+ plugin: {
10
+ key: 'org.dxos.plugin.sheet',
11
+ name: 'Sheet',
12
+ author: 'DXOS',
13
+ description: trim`
14
+ Full-featured spreadsheet for DXOS Composer backed by ECHO for local-first, real-time collaborative editing.
15
+ Cells, row/column metadata, and range-based formatting are all stored as ECHO objects and replicated to peers instantly.
16
+
17
+ Formula evaluation is powered by HyperFormula, providing over 400 built-in functions covering arithmetic, statistics,
18
+ text manipulation, date/time, financial, and logical operations. Formulas are stored with internal cell indices and
19
+ translated to A1-notation on display, keeping references stable across row and column insertions.
20
+
21
+ The plugin integrates with plugin-markdown to expose formula results inside document fenced code blocks, and
22
+ contributes anchor-navigation support so other plugins can scroll and highlight specific cell ranges by DXN reference.
23
+ AI agents can invoke sheet operations — insert/drop axes, scroll to anchor, and read or write cell values — through
24
+ the standard operations framework.
25
+ `,
26
+ icon: { key: 'ph--grid-nine--regular', hue: 'indigo' },
27
+ source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-sheet',
28
+ spec: 'PLUGIN.mdl',
29
+ screenshots: [{ dark: 'https://dxos.network/plugin-details-sheet-dark.png' }],
30
+ },
31
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-sheet",
3
- "version": "0.9.0",
3
+ "version": "0.9.1-staging.ee54ba693a",
4
4
  "description": "Braneframe sketch plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -49,6 +49,11 @@
49
49
  "node": "./dist/lib/neutral/SheetPlugin.node.mjs",
50
50
  "default": "./dist/lib/neutral/SheetPlugin.mjs"
51
51
  },
52
+ "#skills": {
53
+ "source": "./src/skills/index.ts",
54
+ "types": "./dist/types/src/skills/index.d.ts",
55
+ "default": "./dist/lib/neutral/skills/index.mjs"
56
+ },
52
57
  "#testing": "./src/testing/index.ts",
53
58
  "#translations": {
54
59
  "source": "./src/translations.ts",
@@ -82,6 +87,7 @@
82
87
  "types": "dist/types/src/index.d.ts",
83
88
  "files": [
84
89
  "dist",
90
+ "dx.config.ts",
85
91
  "src",
86
92
  "PLUGIN.mdl"
87
93
  ],
@@ -93,70 +99,71 @@
93
99
  "@lezer/common": "^1.5.2",
94
100
  "@lezer/highlight": "^1.2.3",
95
101
  "codemirror-lang-spreadsheet": "^1.3.0",
96
- "@dxos/app-framework": "0.9.0",
97
- "@dxos/client": "0.9.0",
98
- "@dxos/compute": "0.9.0",
99
- "@dxos/async": "0.9.0",
100
- "@dxos/context": "0.9.0",
101
- "@dxos/app-toolkit": "0.9.0",
102
- "@dxos/compute-hyperformula": "0.9.0",
103
- "@dxos/crypto": "0.9.0",
104
- "@dxos/debug": "0.9.0",
105
- "@dxos/echo": "0.9.0",
106
- "@dxos/echo-client": "0.9.0",
107
- "@dxos/echo-react": "0.9.0",
108
- "@dxos/invariant": "0.9.0",
109
- "@dxos/keys": "0.9.0",
110
- "@dxos/lit-grid": "0.9.0",
111
- "@dxos/log": "0.9.0",
112
- "@dxos/plugin-client": "0.9.0",
113
- "@dxos/plugin-graph": "0.9.0",
114
- "@dxos/plugin-comments": "0.9.0",
115
- "@dxos/plugin-space": "0.9.0",
116
- "@dxos/react-client": "0.9.0",
117
- "@dxos/plugin-markdown": "0.9.0",
118
- "@dxos/react-hooks": "0.9.0",
119
- "@dxos/react-ui-editor": "0.9.0",
120
- "@dxos/react-ui-attention": "0.9.0",
121
- "@dxos/react-ui-form": "0.9.0",
122
- "@dxos/react-ui-list": "0.9.0",
123
- "@dxos/react-ui-grid": "0.9.0",
124
- "@dxos/react-ui-menu": "0.9.0",
125
- "@dxos/types": "0.9.0",
126
- "@dxos/ui-editor": "0.9.0",
127
- "@dxos/util": "0.9.0"
102
+ "@dxos/app-framework": "0.9.1-staging.ee54ba693a",
103
+ "@dxos/app-toolkit": "0.9.1-staging.ee54ba693a",
104
+ "@dxos/client": "0.9.1-staging.ee54ba693a",
105
+ "@dxos/compute": "0.9.1-staging.ee54ba693a",
106
+ "@dxos/compute-hyperformula": "0.9.1-staging.ee54ba693a",
107
+ "@dxos/context": "0.9.1-staging.ee54ba693a",
108
+ "@dxos/async": "0.9.1-staging.ee54ba693a",
109
+ "@dxos/crypto": "0.9.1-staging.ee54ba693a",
110
+ "@dxos/echo": "0.9.1-staging.ee54ba693a",
111
+ "@dxos/debug": "0.9.1-staging.ee54ba693a",
112
+ "@dxos/invariant": "0.9.1-staging.ee54ba693a",
113
+ "@dxos/echo-react": "0.9.1-staging.ee54ba693a",
114
+ "@dxos/lit-grid": "0.9.1-staging.ee54ba693a",
115
+ "@dxos/log": "0.9.1-staging.ee54ba693a",
116
+ "@dxos/keys": "0.9.1-staging.ee54ba693a",
117
+ "@dxos/plugin-client": "0.9.1-staging.ee54ba693a",
118
+ "@dxos/plugin-comments": "0.9.1-staging.ee54ba693a",
119
+ "@dxos/plugin-graph": "0.9.1-staging.ee54ba693a",
120
+ "@dxos/plugin-markdown": "0.9.1-staging.ee54ba693a",
121
+ "@dxos/echo-doc": "0.9.1-staging.ee54ba693a",
122
+ "@dxos/react-hooks": "0.9.1-staging.ee54ba693a",
123
+ "@dxos/react-client": "0.9.1-staging.ee54ba693a",
124
+ "@dxos/react-ui-attention": "0.9.1-staging.ee54ba693a",
125
+ "@dxos/react-ui-form": "0.9.1-staging.ee54ba693a",
126
+ "@dxos/plugin-space": "0.9.1-staging.ee54ba693a",
127
+ "@dxos/react-ui-grid": "0.9.1-staging.ee54ba693a",
128
+ "@dxos/react-ui-list": "0.9.1-staging.ee54ba693a",
129
+ "@dxos/react-ui-menu": "0.9.1-staging.ee54ba693a",
130
+ "@dxos/schema": "0.9.1-staging.ee54ba693a",
131
+ "@dxos/types": "0.9.1-staging.ee54ba693a",
132
+ "@dxos/ui-editor": "0.9.1-staging.ee54ba693a",
133
+ "@dxos/util": "0.9.1-staging.ee54ba693a",
134
+ "@dxos/react-ui-editor": "0.9.1-staging.ee54ba693a"
128
135
  },
129
136
  "devDependencies": {
130
137
  "@effect-atom/atom-react": "^0.5.0",
131
- "@effect/platform": "0.96.1",
138
+ "@effect/platform": "0.96.2",
132
139
  "@lezer/generator": "^1.8.0",
133
140
  "@tldraw/indices": "^2.0.0-alpha.14",
134
141
  "@types/lodash.defaultsdeep": "^4.6.6",
135
- "@types/react": "~19.2.7",
142
+ "@types/react": "~19.2.17",
136
143
  "@types/react-dom": "~19.2.3",
137
- "effect": "3.21.3",
138
- "react": "~19.2.3",
139
- "react-dom": "~19.2.3",
144
+ "effect": "3.21.4",
145
+ "react": "~19.2.7",
146
+ "react-dom": "~19.2.7",
140
147
  "vite": "^8.0.16",
141
- "@dxos/echo-generator": "0.9.0",
142
- "@dxos/lit-grid": "0.9.0",
143
- "@dxos/plugin-testing": "0.9.0",
144
- "@dxos/random": "0.9.0",
145
- "@dxos/react-ui": "0.9.0",
146
- "@dxos/storybook-utils": "0.9.0",
147
- "@dxos/react-ui-syntax-highlighter": "0.9.0",
148
- "@dxos/test-utils": "0.9.0",
149
- "@dxos/ui-theme": "0.9.0",
150
- "@dxos/ui-types": "0.9.0"
148
+ "@dxos/echo-generator": "0.9.1-staging.ee54ba693a",
149
+ "@dxos/lit-grid": "0.9.1-staging.ee54ba693a",
150
+ "@dxos/plugin-testing": "0.9.1-staging.ee54ba693a",
151
+ "@dxos/random": "0.9.1-staging.ee54ba693a",
152
+ "@dxos/react-ui": "0.9.1-staging.ee54ba693a",
153
+ "@dxos/react-ui-syntax-highlighter": "0.9.1-staging.ee54ba693a",
154
+ "@dxos/storybook-utils": "0.9.1-staging.ee54ba693a",
155
+ "@dxos/test-utils": "0.9.1-staging.ee54ba693a",
156
+ "@dxos/ui-types": "0.9.1-staging.ee54ba693a",
157
+ "@dxos/ui-theme": "0.9.1-staging.ee54ba693a"
151
158
  },
152
159
  "peerDependencies": {
153
160
  "@effect-atom/atom-react": "^0.5.0",
154
- "@effect/platform": "0.96.1",
155
- "effect": "3.21.3",
156
- "react": "~19.2.3",
157
- "react-dom": "~19.2.3",
158
- "@dxos/react-ui": "0.9.0",
159
- "@dxos/ui-theme": "0.9.0"
161
+ "@effect/platform": "0.96.2",
162
+ "effect": "3.21.4",
163
+ "react": "~19.2.7",
164
+ "react-dom": "~19.2.7",
165
+ "@dxos/ui-theme": "0.9.1-staging.ee54ba693a",
166
+ "@dxos/react-ui": "0.9.1-staging.ee54ba693a"
160
167
  },
161
168
  "publishConfig": {
162
169
  "access": "public"
@@ -12,7 +12,7 @@ import { SheetPlugin } from '#plugin';
12
12
 
13
13
  import { meta } from './meta';
14
14
 
15
- const moduleId = (name: string) => `${meta.id}.module.${name}`;
15
+ const moduleId = (name: string) => `${meta.profile.key}.module.${name}`;
16
16
 
17
17
  describe('SheetPlugin', () => {
18
18
  test('modules activate on the expected events', async ({ expect }) => {
@@ -9,16 +9,15 @@ import { MarkdownEvents } from '@dxos/plugin-markdown';
9
9
 
10
10
  import {
11
11
  AnchorSort,
12
- AppGraphBuilder,
13
- NavigationResolver,
14
12
  CommentConfig,
15
13
  ComputeGraphRegistry,
16
14
  CreateObject,
17
15
  Markdown,
18
16
  OperationHandler,
19
- UndoMappings,
20
17
  ReactSurface,
21
18
  SheetState,
19
+ SkillDefinition,
20
+ UndoMappings,
22
21
  } from '#capabilities';
23
22
  import { meta } from '#meta';
24
23
  import { translations } from '#translations';
@@ -28,8 +27,7 @@ import { Sheet } from '#types';
28
27
  import pluginSpec from '../PLUGIN.mdl?raw';
29
28
 
30
29
  export const SheetPlugin = Plugin.define(meta).pipe(
31
- AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
32
- AppPlugin.addNavigationResolverModule({ activate: NavigationResolver }),
30
+ AppPlugin.addSkillDefinitionModule({ activate: SkillDefinition }),
33
31
  AppPlugin.addCommentConfigModule({ activate: CommentConfig }),
34
32
  AppPlugin.addCreateObjectModule({ activate: CreateObject }),
35
33
  AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
@@ -55,7 +53,7 @@ export const SheetPlugin = Plugin.define(meta).pipe(
55
53
  activate: AnchorSort,
56
54
  }),
57
55
  AppPlugin.addPluginAssetModule({
58
- asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
56
+ asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
59
57
  }),
60
58
  Plugin.make,
61
59
  );
@@ -11,12 +11,7 @@ import { Type } from '@dxos/echo';
11
11
  import { SheetOperation } from '#types';
12
12
  import { Sheet } from '#types';
13
13
 
14
- // NOTE: Explicit annotation required: d.ts emit cannot portably name the inferred @dxos/compute types (TS2883).
15
- const activate: () => Effect.Effect<
16
- Capability.Capability<typeof AppCapabilities.CommentConfig>,
17
- never,
18
- Capability.Service
19
- > = Effect.fnUntraced(function* () {
14
+ const activate = Effect.fnUntraced(function* () {
20
15
  const config: AppCapabilities.CommentConfig = {
21
16
  id: Type.getTypename(Sheet.Sheet),
22
17
  comments: 'anchored',
@@ -12,8 +12,6 @@ import { SpaceCapabilities } from '@dxos/plugin-space';
12
12
 
13
13
  import { Sheet } from '#types';
14
14
 
15
- import { getSheetsPath } from '../paths';
16
-
17
15
  export default Capability.makeModule(
18
16
  Effect.fnUntraced(function* () {
19
17
  return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
@@ -24,8 +22,7 @@ export default Capability.makeModule(
24
22
  return yield* Operation.invoke(SpaceOperation.AddObject, {
25
23
  object,
26
24
  target: options.target,
27
- hidden: true,
28
- targetNodeId: options.targetNodeId ?? getSheetsPath(options.db.spaceId),
25
+ targetNodeId: options.targetNodeId,
29
26
  });
30
27
  }),
31
28
  });
@@ -3,18 +3,10 @@
3
3
  //
4
4
 
5
5
  import { Capability } from '@dxos/app-framework';
6
- import { type AppCapabilities } from '@dxos/app-toolkit';
7
6
  import { OperationHandlerSet } from '@dxos/compute';
8
7
 
9
- export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
10
- export const NavigationResolver = Capability.lazy('NavigationResolver', () => import('./navigation-resolver'));
11
8
  export const AnchorSort = Capability.lazy('AnchorSort', () => import('./anchor-sort'));
12
- // The contributed capability type references Operation types from @dxos/compute, so the lazy
13
- // wrapper needs an explicit annotation to keep the inferred type portable (TS2883).
14
- export const CommentConfig: Capability.LazyCapability<
15
- void,
16
- Capability.Capability<typeof AppCapabilities.CommentConfig>
17
- > = Capability.lazy('CommentConfig', () => import('./comment-config'));
9
+ export const CommentConfig = Capability.lazy('CommentConfig', () => import('./comment-config'));
18
10
  export const ComputeGraphRegistry = Capability.lazy('ComputeGraphRegistry', () => import('./compute-graph-registry'));
19
11
  export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
20
12
  export const Markdown = Capability.lazy('MarkdownExtension', () => import('./markdown-extension'));
@@ -24,4 +16,5 @@ export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHan
24
16
  );
25
17
  export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
26
18
  export const SheetState = Capability.lazy('SheetState', () => import('./state'));
19
+ export const SkillDefinition = Capability.lazy('SkillDefinition', () => import('./skill-definition'));
27
20
  export const UndoMappings = Capability.lazy('UndoMappings', () => import('./undo-mappings'));
@@ -20,11 +20,10 @@ export default Capability.makeModule(() =>
20
20
  Surface.create({
21
21
  id: 'sheet',
22
22
  // TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
23
- role: ['article', 'section'],
24
- filter: (data): data is { attendableId: string; subject: Sheet.Sheet } =>
25
- typeof data.attendableId === 'string' &&
26
- Obj.instanceOf(Sheet.Sheet, data.subject) &&
27
- !!Obj.getDatabase(data.subject),
23
+ filter: AppSurface.oneOf(
24
+ AppSurface.object(AppSurface.Article, Sheet.Sheet, (data) => !!Obj.getDatabase(data.subject)),
25
+ AppSurface.object(AppSurface.Section, Sheet.Sheet, (data) => !!Obj.getDatabase(data.subject)),
26
+ ),
28
27
  component: ({ data, role }) => {
29
28
  const computeGraphRegistry = useCapability(SheetCapabilities.ComputeGraphRegistry);
30
29
 
@@ -0,0 +1,14 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { AppCapabilities } from '@dxos/app-toolkit';
9
+
10
+ import { SheetSkill } from '#skills';
11
+
12
+ export default Capability.makeModule(() =>
13
+ Effect.succeed(Capability.contributes(AppCapabilities.SkillDefinition, SheetSkill)),
14
+ );
@@ -23,7 +23,7 @@ export default Capability.makeModule(() =>
23
23
  axisMeta: output.axisMeta,
24
24
  values: output.values,
25
25
  }),
26
- message: ['axis-dropped.label', { ns: meta.id }],
26
+ message: ['axis-dropped.label', { ns: meta.profile.key }],
27
27
  }),
28
28
  ]),
29
29
  ),
@@ -7,7 +7,7 @@ import { SheetRoot } from '../SheetRoot';
7
7
  import { SheetStatusbar } from '../SheetStatusbar';
8
8
  import { SheetToolbar } from '../SheetToolbar';
9
9
 
10
- export { useSheetContext, type SheetContextValue, type SheetRootProps } from '../SheetRoot';
10
+ export { type SheetContextValue, type SheetRootProps, useSheetContext } from '../SheetRoot';
11
11
  export { type SheetContentProps } from '../SheetContent';
12
12
  export { type SheetToolbarProps } from '../SheetToolbar';
13
13
  export { type SheetStatusbarProps } from '../SheetStatusbar';
@@ -9,7 +9,7 @@ import { Client } from '@dxos/client';
9
9
  import { defaultFunctions } from '@dxos/compute-hyperformula';
10
10
  import { getRegisteredFunctionNames } from '@dxos/compute-hyperformula/testing';
11
11
  import { Obj } from '@dxos/echo';
12
- import { createDocAccessor } from '@dxos/echo-client';
12
+ import { Doc } from '@dxos/echo-doc';
13
13
  import { useAsyncEffect } from '@dxos/react-hooks';
14
14
  import { CellEditor, type CellEditorProps } from '@dxos/react-ui-grid';
15
15
  import { withTheme } from '@dxos/react-ui/testing';
@@ -54,7 +54,7 @@ const AutomergeStory = ({ value, ...props }: CellEditorProps) => {
54
54
 
55
55
  const functionNames = getRegisteredFunctionNames();
56
56
  const functions = defaultFunctions.filter(({ name }) => functionNames.includes(name));
57
- const accessor = createDocAccessor(object, ['cells', cell, 'value']);
57
+ const accessor = Doc.createAccessor(object, ['cells', cell, 'value']);
58
58
  return [automerge(accessor), sheetExtension({ functions })];
59
59
  }, [object]);
60
60
 
@@ -75,7 +75,7 @@ const sheetRowDefault = {
75
75
  export type SheetContentProps = {};
76
76
 
77
77
  export const SheetContent = composable<HTMLDivElement, SheetContentProps>((props, forwardedRef) => {
78
- const { t } = useTranslation(meta.id);
78
+ const { t } = useTranslation(meta.profile.key);
79
79
  const {
80
80
  id,
81
81
  attendableId,
@@ -5,7 +5,7 @@
5
5
  import { useEffect, useState } from 'react';
6
6
 
7
7
  import { inRange } from '@dxos/compute-hyperformula';
8
- import { createDocAccessor } from '@dxos/echo-client';
8
+ import { Doc } from '@dxos/echo-doc';
9
9
  import { cellClassesForFieldType, parseValue } from '@dxos/react-ui-form';
10
10
  import {
11
11
  type DxGridAxisMeta,
@@ -97,13 +97,13 @@ const gridCellGetter = (model: SheetModel) => {
97
97
 
98
98
  export const rowLabelCell = (row: number) => ({
99
99
  value: rowToA1Notation(row),
100
- className: '!bg-toolbar-surface text-subdued text-end pe-1',
100
+ className: 'bg-axis-surface! text-axis-text text-end pe-1',
101
101
  resizeHandle: 'row',
102
102
  });
103
103
 
104
104
  export const colLabelCell = (col: number) => ({
105
105
  value: colToA1Notation(col),
106
- className: '!bg-toolbar-surface text-subdued',
106
+ className: 'bg-axis-surface! text-axis-text',
107
107
  resizeHandle: 'col',
108
108
  });
109
109
 
@@ -115,7 +115,7 @@ const cellGetter = (model: SheetModel) => {
115
115
  return getGridCells(nextBounds);
116
116
  case 'fixedStartStart': {
117
117
  return {
118
- '0,0': { className: '!bg-toolbar-surface' },
118
+ '0,0': { className: 'bg-axis-surface!' },
119
119
  };
120
120
  }
121
121
  case 'frozenColsStart':
@@ -144,7 +144,7 @@ export const useSheetModelDxGridProps = (
144
144
  const [rows, setRows] = useState<DxGridAxisMeta>(createDxGridRows(model));
145
145
 
146
146
  useEffect(() => {
147
- const cellsAccessor = createDocAccessor(model.sheet, ['cells']);
147
+ const cellsAccessor = Doc.createAccessor(model.sheet, ['cells']);
148
148
  if (dxGrid) {
149
149
  dxGrid.getCells = cellGetter(model);
150
150
  }
@@ -160,8 +160,8 @@ export const useSheetModelDxGridProps = (
160
160
  }, [model, dxGrid]);
161
161
 
162
162
  useEffect(() => {
163
- const columnMetaAccessor = createDocAccessor(model.sheet, ['columnMeta']);
164
- const rowMetaAccessor = createDocAccessor(model.sheet, ['rowMeta']);
163
+ const columnMetaAccessor = Doc.createAccessor(model.sheet, ['columnMeta']);
164
+ const rowMetaAccessor = Doc.createAccessor(model.sheet, ['rowMeta']);
165
165
  const handleColumnMetaUpdate = () => {
166
166
  setColumns(createDxGridColumns(model));
167
167
  };
@@ -50,7 +50,7 @@ export const useAlignState = (stateAtom: ToolbarStateAtom) => {
50
50
 
51
51
  const createAlignGroupAction = (value?: AlignValue) =>
52
52
  createMenuItemGroup('align', {
53
- label: ['align.label', { ns: meta.id }],
53
+ label: ['align.label', { ns: meta.profile.key }],
54
54
  variant: 'toggleGroup',
55
55
  selectCardinality: 'single',
56
56
  value: `${alignKey}--${value}`,
@@ -104,7 +104,7 @@ const createAlignActions = ({ model, state, stateAtom, registry, cursorFallbackR
104
104
  key: alignKey,
105
105
  value: alignValue as AlignValue,
106
106
  checked: state[alignKey] === alignValue,
107
- label: [`range-value.${alignValue}.label`, { ns: meta.id }],
107
+ label: [`range-value.${alignValue}.label`, { ns: meta.profile.key }],
108
108
  icon,
109
109
  testId: `grid.toolbar.${alignKey}.${alignValue}`,
110
110
  },
@@ -119,7 +119,7 @@ const createStyleActions = ({ model, state, stateAtom, registry, cursorFallbackR
119
119
  key: 'style',
120
120
  value: styleValue as StyleValue,
121
121
  icon,
122
- label: [`range-value.${styleValue}.label`, { ns: meta.id }],
122
+ label: [`range-value.${styleValue}.label`, { ns: meta.profile.key }],
123
123
  checked: !!state[styleValue as StyleValue],
124
124
  },
125
125
  );
@@ -8,7 +8,7 @@ import React, { useCallback } from 'react';
8
8
  import { rangeToA1Notation } from '@dxos/compute-hyperformula';
9
9
  import { useObject } from '@dxos/echo-react';
10
10
  import { Input, Message, useTranslation } from '@dxos/react-ui';
11
- import { List } from '@dxos/react-ui-list';
11
+ import { OrderedList } from '@dxos/react-ui-list';
12
12
 
13
13
  import { meta } from '#meta';
14
14
  import { rangeFromIndex } from '#types';
@@ -19,7 +19,7 @@ export type RangeListProps = {
19
19
  };
20
20
 
21
21
  export const RangeList = ({ sheet: sheetProp }: RangeListProps) => {
22
- const { t } = useTranslation(meta.id);
22
+ const { t } = useTranslation(meta.profile.key);
23
23
  const [sheet, updateSheet] = useObject(sheetProp);
24
24
  // TODO(thure): Implement similar to comments, #8121
25
25
  const handleSelectRange = (range: Sheet.Range) => {};
@@ -37,28 +37,44 @@ export const RangeList = ({ sheet: sheetProp }: RangeListProps) => {
37
37
  <Input.Root>
38
38
  <Input.Label>{t('range-list.heading')}</Input.Label>
39
39
  </Input.Root>
40
- {sheet.ranges.length < 1 ? (
40
+ {sheet.ranges.length === 0 ? (
41
41
  <Message.Root>
42
42
  <Message.Title>{t('no-ranges.message')}</Message.Title>
43
43
  </Message.Root>
44
44
  ) : (
45
- <List.Root<Sheet.Range> items={sheet.ranges} isItem={Schema.is(Sheet.Range)}>
46
- {({ items: ranges }) =>
47
- ranges.map((range, i) => (
48
- <List.Item key={i} item={range}>
49
- <List.ItemDragHandle />
50
- <List.ItemTitle onClick={() => handleSelectRange(range)}>
51
- {t('range.title', {
52
- position: rangeToA1Notation(rangeFromIndex(sheetProp, range.range)),
53
- key: t(`range-key.${range.key}.label`),
54
- value: t(`range-value.${range.value}.label`),
55
- })}
56
- </List.ItemTitle>
57
- <List.ItemDeleteButton onClick={() => handleDeleteRange(range)} />
58
- </List.Item>
59
- ))
60
- }
61
- </List.Root>
45
+ <OrderedList.Root<Sheet.Range> items={sheet.ranges} isItem={Schema.is(Sheet.Range)}>
46
+ {({ items: ranges }) => (
47
+ <OrderedList.Content>
48
+ {ranges.map((range) => {
49
+ // Use the range's underlying cell range string as the stable id so deletes /
50
+ // re-renders don't shift row identity by array position. Reorder is not
51
+ // wired (DX-8121); add `OrderedList.DragHandle` + a real id strategy when it
52
+ // lands. We avoid `OrderedList.Title` because there's no disclosure panel
53
+ // for it to control here.
54
+ const id = range.range;
55
+ return (
56
+ <OrderedList.Item
57
+ key={id}
58
+ id={id}
59
+ item={range}
60
+ hover
61
+ classNames='flex items-center cursor-pointer'
62
+ onClick={() => handleSelectRange(range)}
63
+ >
64
+ <div className='flex grow items-center truncate px-2'>
65
+ {t('range.title', {
66
+ position: rangeToA1Notation(rangeFromIndex(sheetProp, range.range)),
67
+ key: t(`range-key.${range.key}.label`),
68
+ value: t(`range-value.${range.value}.label`),
69
+ })}
70
+ </div>
71
+ <OrderedList.DeleteButton onClick={() => handleDeleteRange(range)} />
72
+ </OrderedList.Item>
73
+ );
74
+ })}
75
+ </OrderedList.Content>
76
+ )}
77
+ </OrderedList.Root>
62
78
  )}
63
79
  </>
64
80
  );
@@ -4,7 +4,7 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { type AppSurface } from '@dxos/app-toolkit/ui';
7
+ import { AppSurface } from '@dxos/app-toolkit/ui';
8
8
  import { type ComputeGraphRegistry } from '@dxos/compute-hyperformula';
9
9
  import { type Space } from '@dxos/react-client/echo';
10
10
  import { Panel } from '@dxos/react-ui';
@@ -41,7 +41,7 @@ const SheetArticleInner = ({
41
41
 
42
42
  return (
43
43
  <Sheet.Root graph={graph} sheet={sheet} attendableId={attendableId!} ignoreAttention={ignoreAttention}>
44
- <Panel.Root classNames={role === 'section' && 'aspect-aquare'}>
44
+ <Panel.Root classNames={role === AppSurface.Section.role && 'aspect-square'}>
45
45
  <Panel.Toolbar asChild>
46
46
  <Sheet.Toolbar />
47
47
  </Panel.Toolbar>
package/src/index.ts CHANGED
@@ -4,5 +4,4 @@
4
4
 
5
5
  export * from './meta';
6
6
  export * from './operations';
7
- export * from './paths';
8
7
  export * from './types';
package/src/meta.ts CHANGED
@@ -3,29 +3,7 @@
3
3
  //
4
4
 
5
5
  import { Plugin } from '@dxos/app-framework';
6
- import { DXN } from '@dxos/keys';
7
- import { trim } from '@dxos/util';
8
6
 
9
- export const meta = Plugin.makeMeta({
10
- key: DXN.make('org.dxos.plugin.sheet'),
11
- name: 'Sheet',
12
- author: 'DXOS',
13
- description: trim`
14
- Full-featured spreadsheet for DXOS Composer backed by ECHO for local-first, real-time collaborative editing.
15
- Cells, row/column metadata, and range-based formatting are all stored as ECHO objects and replicated to peers instantly.
7
+ import config from '../dx.config';
16
8
 
17
- Formula evaluation is powered by HyperFormula, providing over 400 built-in functions covering arithmetic, statistics,
18
- text manipulation, date/time, financial, and logical operations. Formulas are stored with internal cell indices and
19
- translated to A1-notation on display, keeping references stable across row and column insertions.
20
-
21
- The plugin integrates with plugin-markdown to expose formula results inside document fenced code blocks, and
22
- contributes anchor-navigation support so other plugins can scroll and highlight specific cell ranges by DXN reference.
23
- AI agents can invoke sheet operations — insert/drop axes, scroll to anchor, and read or write cell values — through
24
- the standard operations framework.
25
- `,
26
- icon: 'ph--grid-nine--regular',
27
- iconHue: 'indigo',
28
- source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-sheet',
29
- spec: 'PLUGIN.mdl',
30
- screenshots: ['https://dxos.network/plugin-details-sheet-dark.png'],
31
- });
9
+ export const meta = Plugin.getMetaFromConfig(config);
@@ -0,0 +1,24 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { CollectionModel } from '@dxos/app-toolkit';
8
+ import { Operation } from '@dxos/compute';
9
+ import { Database, Obj } from '@dxos/echo';
10
+
11
+ import { Sheet, SheetOperation } from '../types';
12
+
13
+ const handler: Operation.WithHandler<typeof SheetOperation.Create> = SheetOperation.Create.pipe(
14
+ Operation.withHandler(
15
+ Effect.fn(function* ({ name, rows, columns }) {
16
+ const object = yield* Database.add(Sheet.make({ name, rows, columns }));
17
+ yield* CollectionModel.add({ object }).pipe(Effect.catchTag('EntityNotFoundError', () => Effect.void));
18
+ yield* Database.flush();
19
+ return { id: Obj.getURI(object) };
20
+ }),
21
+ ),
22
+ );
23
+
24
+ export default handler;