@dxos/plugin-sheet 0.8.4-main.c85a9c8dae → 0.8.4-main.d9fc60f731

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 (321) hide show
  1. package/LICENSE +102 -5
  2. package/PLUGIN.mdl +359 -0
  3. package/dist/lib/{browser/RangeList-S3SHV7T6.mjs → neutral/RangeList-HYB5S6KQ.mjs} +21 -28
  4. package/dist/lib/neutral/RangeList-HYB5S6KQ.mjs.map +7 -0
  5. package/dist/lib/neutral/SheetArticle-5AJRM3V3.mjs +33 -0
  6. package/dist/lib/neutral/SheetArticle-5AJRM3V3.mjs.map +7 -0
  7. package/dist/lib/neutral/SheetPlugin.mjs +59 -0
  8. package/dist/lib/neutral/SheetPlugin.mjs.map +7 -0
  9. package/dist/lib/neutral/SheetPlugin.node.mjs +27 -0
  10. package/dist/lib/neutral/SheetPlugin.node.mjs.map +7 -0
  11. package/dist/lib/neutral/SheetPlugin.workerd.mjs +21 -0
  12. package/dist/lib/neutral/SheetPlugin.workerd.mjs.map +7 -0
  13. package/dist/lib/{browser/anchor-sort-DZ3IHHJJ.mjs → neutral/anchor-sort-2POWTKTD.mjs} +6 -8
  14. package/dist/lib/neutral/anchor-sort-2POWTKTD.mjs.map +7 -0
  15. package/dist/lib/neutral/capabilities/index.mjs +25 -0
  16. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  17. package/dist/lib/neutral/chunk-3AIMSE7U.mjs +83 -0
  18. package/dist/lib/neutral/chunk-3AIMSE7U.mjs.map +7 -0
  19. package/dist/lib/neutral/chunk-7ZUM64KO.mjs +8 -0
  20. package/dist/lib/neutral/chunk-7ZUM64KO.mjs.map +7 -0
  21. package/dist/lib/{browser/chunk-NNWF7EKC.mjs → neutral/chunk-ERHMBRSU.mjs} +4 -4
  22. package/dist/lib/neutral/chunk-ERHMBRSU.mjs.map +7 -0
  23. package/dist/lib/{browser/chunk-S445OQGW.mjs → neutral/chunk-EUM3RVML.mjs} +173 -196
  24. package/dist/lib/neutral/chunk-EUM3RVML.mjs.map +7 -0
  25. package/dist/lib/neutral/chunk-FQHTXKMF.mjs +34 -0
  26. package/dist/lib/neutral/chunk-FQHTXKMF.mjs.map +7 -0
  27. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  28. package/dist/lib/neutral/comment-config-6JAROASH.mjs +21 -0
  29. package/dist/lib/neutral/comment-config-6JAROASH.mjs.map +7 -0
  30. package/dist/lib/{browser/SheetContainer-I3NFVVDQ.mjs → neutral/components/index.mjs} +163 -416
  31. package/dist/lib/neutral/components/index.mjs.map +7 -0
  32. package/dist/lib/neutral/compute-graph-registry-YYINTFC2.mjs +26 -0
  33. package/dist/lib/neutral/compute-graph-registry-YYINTFC2.mjs.map +7 -0
  34. package/dist/lib/neutral/containers/index.mjs +11 -0
  35. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  36. package/dist/lib/neutral/create-object-6FZSSROF.mjs +28 -0
  37. package/dist/lib/neutral/create-object-6FZSSROF.mjs.map +7 -0
  38. package/dist/lib/neutral/drop-axis-MO3KUU4C.mjs +23 -0
  39. package/dist/lib/neutral/drop-axis-MO3KUU4C.mjs.map +7 -0
  40. package/dist/lib/{browser/types → neutral}/index.mjs +14 -5
  41. package/dist/lib/neutral/insert-axis-V7E5PTMG.mjs +16 -0
  42. package/dist/lib/neutral/insert-axis-V7E5PTMG.mjs.map +7 -0
  43. package/dist/lib/{browser/markdown-S6GVLHB4.mjs → neutral/markdown-O37EE3ER.mjs} +5 -6
  44. package/dist/lib/neutral/markdown-O37EE3ER.mjs.map +7 -0
  45. package/dist/lib/neutral/meta.json +1 -0
  46. package/dist/lib/neutral/meta.mjs +8 -0
  47. package/dist/lib/neutral/meta.mjs.map +7 -0
  48. package/dist/lib/neutral/operation-handler-TB6LFV2H.mjs +13 -0
  49. package/dist/lib/neutral/operation-handler-TB6LFV2H.mjs.map +7 -0
  50. package/dist/lib/neutral/operations/index.mjs +8 -0
  51. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  52. package/dist/lib/neutral/plugin.mjs +16 -0
  53. package/dist/lib/neutral/plugin.mjs.map +7 -0
  54. package/dist/lib/{browser/react-surface-KIU6DGKW.mjs → neutral/react-surface-4H3PC4WG.mjs} +13 -20
  55. package/dist/lib/neutral/react-surface-4H3PC4WG.mjs.map +7 -0
  56. package/dist/lib/neutral/restore-axis-BAM44OPG.mjs +16 -0
  57. package/dist/lib/neutral/restore-axis-BAM44OPG.mjs.map +7 -0
  58. package/dist/lib/neutral/scroll-to-anchor-TBE2FTTT.mjs +33 -0
  59. package/dist/lib/neutral/scroll-to-anchor-TBE2FTTT.mjs.map +7 -0
  60. package/dist/lib/neutral/state-HPA27MX2.mjs +29 -0
  61. package/dist/lib/neutral/state-HPA27MX2.mjs.map +7 -0
  62. package/dist/lib/neutral/testing/index.mjs +103 -0
  63. package/dist/lib/neutral/testing/index.mjs.map +7 -0
  64. package/dist/lib/neutral/translations.mjs +56 -0
  65. package/dist/lib/neutral/translations.mjs.map +7 -0
  66. package/dist/lib/{node-esm → neutral}/types/index.mjs +6 -6
  67. package/dist/lib/neutral/types/index.mjs.map +7 -0
  68. package/dist/lib/neutral/undo-mappings-3FQLSTCZ.mjs +31 -0
  69. package/dist/lib/neutral/undo-mappings-3FQLSTCZ.mjs.map +7 -0
  70. package/dist/types/src/SheetPlugin.d.ts +1 -0
  71. package/dist/types/src/SheetPlugin.d.ts.map +1 -1
  72. package/dist/types/src/SheetPlugin.node.d.ts +4 -0
  73. package/dist/types/src/SheetPlugin.node.d.ts.map +1 -0
  74. package/dist/types/src/SheetPlugin.test.d.ts +2 -0
  75. package/dist/types/src/SheetPlugin.test.d.ts.map +1 -0
  76. package/dist/types/src/SheetPlugin.workerd.d.ts +4 -0
  77. package/dist/types/src/SheetPlugin.workerd.d.ts.map +1 -0
  78. package/dist/types/src/capabilities/anchor-sort.d.ts.map +1 -0
  79. package/dist/types/src/capabilities/comment-config.d.ts +12 -0
  80. package/dist/types/src/capabilities/comment-config.d.ts.map +1 -0
  81. package/dist/types/src/capabilities/compute-graph-registry.d.ts +11 -0
  82. package/dist/types/src/capabilities/compute-graph-registry.d.ts.map +1 -0
  83. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  84. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  85. package/dist/types/src/capabilities/index.d.ts +23 -5
  86. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  87. package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
  88. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  89. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  90. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/{compute-graph-registry/compute-graph-registry.d.ts → state.d.ts} +3 -2
  92. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  93. package/dist/types/src/capabilities/undo-mappings.d.ts +5 -0
  94. package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -0
  95. package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts +1 -1
  96. package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts.map +1 -1
  97. package/dist/types/src/components/ComputeGraph/compute-graph.stories.d.ts.map +1 -1
  98. package/dist/types/src/components/Sheet/Sheet.d.ts +10 -4
  99. package/dist/types/src/components/Sheet/Sheet.d.ts.map +1 -1
  100. package/dist/types/src/components/SheetContent/SheetCellEditor.stories.d.ts.map +1 -1
  101. package/dist/types/src/components/SheetContent/SheetContent.d.ts +4 -3
  102. package/dist/types/src/components/SheetContent/SheetContent.d.ts.map +1 -1
  103. package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts +77 -39
  104. package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts.map +1 -1
  105. package/dist/types/src/components/SheetContent/util.d.ts +1 -1
  106. package/dist/types/src/components/SheetContent/util.d.ts.map +1 -1
  107. package/dist/types/src/components/SheetRoot/SheetRoot.d.ts +5 -3
  108. package/dist/types/src/components/SheetRoot/SheetRoot.d.ts.map +1 -1
  109. package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts +4 -3
  110. package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts.map +1 -1
  111. package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts +5 -8
  112. package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts.map +1 -1
  113. package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts +72 -68
  114. package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts.map +1 -1
  115. package/dist/types/src/components/SheetToolbar/align.d.ts +2 -2
  116. package/dist/types/src/components/SheetToolbar/align.d.ts.map +1 -1
  117. package/dist/types/src/components/SheetToolbar/style.d.ts +2 -2
  118. package/dist/types/src/components/SheetToolbar/style.d.ts.map +1 -1
  119. package/dist/types/src/components/SheetToolbar/useToolbarState.d.ts.map +1 -1
  120. package/dist/types/src/containers/RangeList/RangeList.d.ts +2 -2
  121. package/dist/types/src/containers/RangeList/RangeList.d.ts.map +1 -1
  122. package/dist/types/src/containers/RangeList/index.d.ts +1 -2
  123. package/dist/types/src/containers/RangeList/index.d.ts.map +1 -1
  124. package/dist/types/src/containers/SheetArticle/SheetArticle.d.ts +12 -0
  125. package/dist/types/src/containers/SheetArticle/SheetArticle.d.ts.map +1 -0
  126. package/dist/types/src/containers/SheetArticle/SheetArticle.stories.d.ts +92 -0
  127. package/dist/types/src/containers/SheetArticle/SheetArticle.stories.d.ts.map +1 -0
  128. package/dist/types/src/containers/SheetArticle/index.d.ts +2 -0
  129. package/dist/types/src/containers/SheetArticle/index.d.ts.map +1 -0
  130. package/dist/types/src/containers/index.d.ts +1 -1
  131. package/dist/types/src/containers/index.d.ts.map +1 -1
  132. package/dist/types/src/extensions/compute.d.ts +1 -1
  133. package/dist/types/src/extensions/compute.d.ts.map +1 -1
  134. package/dist/types/src/extensions/compute.stories.d.ts.map +1 -1
  135. package/dist/types/src/extensions/editor/sheet-extension.d.ts +1 -1
  136. package/dist/types/src/extensions/editor/sheet-extension.d.ts.map +1 -1
  137. package/dist/types/src/index.d.ts +2 -2
  138. package/dist/types/src/index.d.ts.map +1 -1
  139. package/dist/types/src/integrations/thread-ranges.d.ts +1 -3
  140. package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
  141. package/dist/types/src/meta.d.ts +1 -1
  142. package/dist/types/src/meta.d.ts.map +1 -1
  143. package/dist/types/src/model/sheet-model.d.ts +27 -3
  144. package/dist/types/src/model/sheet-model.d.ts.map +1 -1
  145. package/dist/types/src/model/testing.d.ts +1 -1
  146. package/dist/types/src/model/testing.d.ts.map +1 -1
  147. package/dist/types/src/model/useSheetModel.d.ts +2 -2
  148. package/dist/types/src/model/useSheetModel.d.ts.map +1 -1
  149. package/dist/types/src/operations/drop-axis.d.ts +5 -0
  150. package/dist/types/src/operations/drop-axis.d.ts.map +1 -0
  151. package/dist/types/src/operations/index.d.ts +3 -0
  152. package/dist/types/src/operations/index.d.ts.map +1 -0
  153. package/dist/types/src/operations/insert-axis.d.ts +5 -0
  154. package/dist/types/src/operations/insert-axis.d.ts.map +1 -0
  155. package/dist/types/src/operations/restore-axis.d.ts +5 -0
  156. package/dist/types/src/operations/restore-axis.d.ts.map +1 -0
  157. package/dist/types/src/operations/scroll-to-anchor.d.ts +5 -0
  158. package/dist/types/src/operations/scroll-to-anchor.d.ts.map +1 -0
  159. package/dist/types/src/playwright/playwright.config.d.ts.map +1 -1
  160. package/dist/types/src/playwright/sheet-manager.d.ts.map +1 -1
  161. package/dist/types/src/plugin.d.ts +4 -0
  162. package/dist/types/src/plugin.d.ts.map +1 -0
  163. package/dist/types/src/serializer.d.ts +2 -2
  164. package/dist/types/src/serializer.d.ts.map +1 -1
  165. package/dist/types/src/testing/data.d.ts +1 -1
  166. package/dist/types/src/testing/data.d.ts.map +1 -1
  167. package/dist/types/src/testing/testing.d.ts +5 -5
  168. package/dist/types/src/testing/testing.d.ts.map +1 -1
  169. package/dist/types/src/translations.d.ts +74 -39
  170. package/dist/types/src/translations.d.ts.map +1 -1
  171. package/dist/types/src/types/Sheet.d.ts +5 -6
  172. package/dist/types/src/types/Sheet.d.ts.map +1 -1
  173. package/dist/types/src/types/SheetCapabilities.d.ts +16 -0
  174. package/dist/types/src/types/SheetCapabilities.d.ts.map +1 -0
  175. package/dist/types/src/types/SheetOperation.d.ts +45 -0
  176. package/dist/types/src/types/SheetOperation.d.ts.map +1 -0
  177. package/dist/types/src/types/index.d.ts +3 -2
  178. package/dist/types/src/types/index.d.ts.map +1 -1
  179. package/dist/types/src/types/sheet-range-types.d.ts +1 -1
  180. package/dist/types/src/types/sheet-range-types.d.ts.map +1 -1
  181. package/dist/types/src/types/types.d.ts +0 -92
  182. package/dist/types/src/types/types.d.ts.map +1 -1
  183. package/dist/types/src/types/util.d.ts +1 -1
  184. package/dist/types/src/types/util.d.ts.map +1 -1
  185. package/dist/types/tsconfig.tsbuildinfo +1 -1
  186. package/package.json +120 -94
  187. package/src/SheetPlugin.node.ts +21 -0
  188. package/src/SheetPlugin.test.ts +30 -0
  189. package/src/SheetPlugin.tsx +31 -36
  190. package/src/SheetPlugin.workerd.ts +18 -0
  191. package/src/capabilities/{anchor-sort/anchor-sort.ts → anchor-sort.ts} +3 -3
  192. package/src/capabilities/comment-config.ts +25 -0
  193. package/src/capabilities/compute-graph-registry.ts +42 -0
  194. package/src/capabilities/create-object.ts +31 -0
  195. package/src/capabilities/index.ts +17 -5
  196. package/src/capabilities/{markdown/markdown.ts → markdown.ts} +3 -2
  197. package/src/capabilities/operation-handler.ts +16 -0
  198. package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +13 -10
  199. package/src/capabilities/state.ts +29 -0
  200. package/src/capabilities/undo-mappings.ts +30 -0
  201. package/src/components/ComputeGraph/ComputeGraphContextProvider.tsx +1 -1
  202. package/src/components/ComputeGraph/compute-graph.stories.tsx +23 -15
  203. package/src/components/SheetContent/SheetCellEditor.stories.tsx +8 -7
  204. package/src/components/SheetContent/SheetContent.stories.tsx +11 -11
  205. package/src/components/SheetContent/SheetContent.tsx +40 -23
  206. package/src/components/SheetContent/util.ts +4 -3
  207. package/src/components/SheetRoot/SheetRoot.tsx +18 -7
  208. package/src/components/SheetStatusbar/SheetStatusbar.tsx +16 -8
  209. package/src/components/SheetToolbar/SheetToolbar.stories.tsx +1 -1
  210. package/src/components/SheetToolbar/SheetToolbar.tsx +15 -20
  211. package/src/components/SheetToolbar/align.ts +9 -9
  212. package/src/components/SheetToolbar/style.ts +7 -7
  213. package/src/containers/RangeList/RangeList.tsx +17 -17
  214. package/src/containers/RangeList/index.ts +1 -3
  215. package/src/containers/{SheetContainer/SheetContainer.stories.tsx → SheetArticle/SheetArticle.stories.tsx} +42 -26
  216. package/src/containers/{SheetContainer/SheetContainer.tsx → SheetArticle/SheetArticle.tsx} +12 -12
  217. package/src/containers/SheetArticle/index.ts +5 -0
  218. package/src/containers/index.ts +1 -1
  219. package/src/extensions/compute.stories.tsx +11 -11
  220. package/src/extensions/compute.ts +1 -1
  221. package/src/extensions/editor/sheet-extension.test.ts +1 -1
  222. package/src/extensions/editor/sheet-extension.ts +3 -3
  223. package/src/index.ts +2 -2
  224. package/src/integrations/thread-ranges.ts +10 -42
  225. package/src/meta.ts +18 -6
  226. package/src/model/sheet-model.test.ts +5 -5
  227. package/src/model/sheet-model.ts +19 -19
  228. package/src/model/testing.ts +2 -2
  229. package/src/model/useSheetModel.ts +3 -2
  230. package/src/operations/drop-axis.ts +26 -0
  231. package/src/operations/index.ts +12 -0
  232. package/src/operations/insert-axis.ts +19 -0
  233. package/src/operations/restore-axis.ts +19 -0
  234. package/src/operations/scroll-to-anchor.ts +30 -0
  235. package/src/playwright/sheet.spec.ts +3 -3
  236. package/src/plugin.ts +11 -0
  237. package/src/sanity.test.ts +10 -3
  238. package/src/serializer.ts +2 -2
  239. package/src/testing/data.ts +1 -1
  240. package/src/testing/testing.tsx +4 -4
  241. package/src/translations.ts +43 -37
  242. package/src/types/Sheet.ts +13 -13
  243. package/src/types/SheetCapabilities.ts +26 -0
  244. package/src/types/SheetOperation.ts +84 -0
  245. package/src/types/index.ts +4 -2
  246. package/src/types/types.ts +0 -80
  247. package/src/types/util.ts +4 -4
  248. package/src/vite-env.d.ts +10 -0
  249. package/dist/lib/browser/RangeList-S3SHV7T6.mjs.map +0 -7
  250. package/dist/lib/browser/SheetContainer-I3NFVVDQ.mjs.map +0 -7
  251. package/dist/lib/browser/anchor-sort-DZ3IHHJJ.mjs.map +0 -7
  252. package/dist/lib/browser/chunk-NNWF7EKC.mjs.map +0 -7
  253. package/dist/lib/browser/chunk-S445OQGW.mjs.map +0 -7
  254. package/dist/lib/browser/compute-graph-registry-W6HO2G3P.mjs +0 -21
  255. package/dist/lib/browser/compute-graph-registry-W6HO2G3P.mjs.map +0 -7
  256. package/dist/lib/browser/index.mjs +0 -145
  257. package/dist/lib/browser/index.mjs.map +0 -7
  258. package/dist/lib/browser/markdown-S6GVLHB4.mjs.map +0 -7
  259. package/dist/lib/browser/meta.json +0 -1
  260. package/dist/lib/browser/operation-resolver-Z4X4UWNR.mjs +0 -79
  261. package/dist/lib/browser/operation-resolver-Z4X4UWNR.mjs.map +0 -7
  262. package/dist/lib/browser/react-surface-KIU6DGKW.mjs.map +0 -7
  263. package/dist/lib/node-esm/RangeList-IB23OJK2.mjs +0 -54
  264. package/dist/lib/node-esm/RangeList-IB23OJK2.mjs.map +0 -7
  265. package/dist/lib/node-esm/SheetContainer-KUXNCSFP.mjs +0 -1806
  266. package/dist/lib/node-esm/SheetContainer-KUXNCSFP.mjs.map +0 -7
  267. package/dist/lib/node-esm/anchor-sort-24OXMOSX.mjs +0 -25
  268. package/dist/lib/node-esm/anchor-sort-24OXMOSX.mjs.map +0 -7
  269. package/dist/lib/node-esm/chunk-M52YLLWU.mjs +0 -236
  270. package/dist/lib/node-esm/chunk-M52YLLWU.mjs.map +0 -7
  271. package/dist/lib/node-esm/chunk-NKZ3O4OR.mjs +0 -398
  272. package/dist/lib/node-esm/chunk-NKZ3O4OR.mjs.map +0 -7
  273. package/dist/lib/node-esm/compute-graph-registry-2C3Y2RPQ.mjs +0 -22
  274. package/dist/lib/node-esm/compute-graph-registry-2C3Y2RPQ.mjs.map +0 -7
  275. package/dist/lib/node-esm/index.mjs +0 -146
  276. package/dist/lib/node-esm/index.mjs.map +0 -7
  277. package/dist/lib/node-esm/markdown-YT5KJTQT.mjs +0 -30
  278. package/dist/lib/node-esm/markdown-YT5KJTQT.mjs.map +0 -7
  279. package/dist/lib/node-esm/meta.json +0 -1
  280. package/dist/lib/node-esm/operation-resolver-7VD2YXSQ.mjs +0 -80
  281. package/dist/lib/node-esm/operation-resolver-7VD2YXSQ.mjs.map +0 -7
  282. package/dist/lib/node-esm/react-surface-7FZAE3S7.mjs +0 -52
  283. package/dist/lib/node-esm/react-surface-7FZAE3S7.mjs.map +0 -7
  284. package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts.map +0 -1
  285. package/dist/types/src/capabilities/anchor-sort/index.d.ts +0 -3
  286. package/dist/types/src/capabilities/anchor-sort/index.d.ts.map +0 -1
  287. package/dist/types/src/capabilities/compute-graph-registry/compute-graph-registry.d.ts.map +0 -1
  288. package/dist/types/src/capabilities/compute-graph-registry/index.d.ts +0 -3
  289. package/dist/types/src/capabilities/compute-graph-registry/index.d.ts.map +0 -1
  290. package/dist/types/src/capabilities/markdown/index.d.ts +0 -3
  291. package/dist/types/src/capabilities/markdown/index.d.ts.map +0 -1
  292. package/dist/types/src/capabilities/markdown/markdown.d.ts.map +0 -1
  293. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
  294. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  295. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
  296. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  297. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  298. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  299. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  300. package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts +0 -12
  301. package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts.map +0 -1
  302. package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts +0 -56
  303. package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts.map +0 -1
  304. package/dist/types/src/containers/SheetContainer/index.d.ts +0 -3
  305. package/dist/types/src/containers/SheetContainer/index.d.ts.map +0 -1
  306. package/dist/types/src/types/capabilities.d.ts +0 -6
  307. package/dist/types/src/types/capabilities.d.ts.map +0 -1
  308. package/src/capabilities/anchor-sort/index.ts +0 -7
  309. package/src/capabilities/compute-graph-registry/compute-graph-registry.ts +0 -27
  310. package/src/capabilities/compute-graph-registry/index.ts +0 -7
  311. package/src/capabilities/markdown/index.ts +0 -7
  312. package/src/capabilities/operation-resolver/index.ts +0 -7
  313. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -77
  314. package/src/capabilities/react-surface/index.ts +0 -7
  315. package/src/containers/SheetContainer/index.ts +0 -7
  316. package/src/types/capabilities.ts +0 -14
  317. /package/dist/lib/{browser/types/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  318. /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
  319. /package/dist/types/src/capabilities/{anchor-sort/anchor-sort.d.ts → anchor-sort.d.ts} +0 -0
  320. /package/dist/types/src/capabilities/{markdown/markdown.d.ts → markdown.d.ts} +0 -0
  321. /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
@@ -7,28 +7,32 @@ import React from 'react';
7
7
 
8
8
  import { Capabilities, Capability } from '@dxos/app-framework';
9
9
  import { Surface, useCapability } from '@dxos/app-framework/ui';
10
+ import { AppSurface } from '@dxos/app-toolkit/ui';
10
11
  import { Obj } from '@dxos/echo';
11
12
  import { getSpace } from '@dxos/react-client/echo';
12
13
 
13
- import { RangeList, SheetContainer } from '../../containers';
14
- import { meta } from '../../meta';
15
- import { Sheet, SheetCapabilities } from '../../types';
14
+ import { RangeList, SheetArticle } from '#containers';
15
+ import { Sheet, SheetCapabilities } from '#types';
16
16
 
17
17
  export default Capability.makeModule(() =>
18
18
  Effect.succeed(
19
19
  Capability.contributes(Capabilities.ReactSurface, [
20
20
  Surface.create({
21
- id: `${meta.id}/sheet`,
21
+ id: 'sheet',
22
+ // TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
22
23
  role: ['article', 'section'],
23
- filter: (data): data is { subject: Sheet.Sheet } =>
24
- Obj.instanceOf(Sheet.Sheet, data.subject) && !!getSpace(data.subject),
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),
25
28
  component: ({ data, role }) => {
26
29
  const computeGraphRegistry = useCapability(SheetCapabilities.ComputeGraphRegistry);
27
30
 
28
31
  return (
29
- <SheetContainer
32
+ <SheetArticle
30
33
  role={role}
31
34
  subject={data.subject}
35
+ attendableId={data.attendableId}
32
36
  space={getSpace(data.subject)!}
33
37
  registry={computeGraphRegistry}
34
38
  />
@@ -36,9 +40,8 @@ export default Capability.makeModule(() =>
36
40
  },
37
41
  }),
38
42
  Surface.create({
39
- id: `${meta.id}/object-settings`,
40
- role: 'object-settings',
41
- filter: (data): data is { subject: Sheet.Sheet } => Obj.instanceOf(Sheet.Sheet, data.subject),
43
+ id: 'objectProperties',
44
+ filter: AppSurface.object(AppSurface.ObjectProperties, Sheet.Sheet),
42
45
  component: ({ data }) => <RangeList sheet={data.subject} />,
43
46
  }),
44
47
  ]),
@@ -0,0 +1,29 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capability } from '@dxos/app-framework';
8
+
9
+ import { SheetCapabilities } from '#types';
10
+
11
+ const createGridRegistry = (): SheetCapabilities.GridRegistry => {
12
+ const grids = new Map<string, SheetCapabilities.GridEntry>();
13
+ return {
14
+ register: (attendableId, grid, setActiveRefs) => {
15
+ grids.set(attendableId, { grid, setActiveRefs });
16
+ },
17
+ unregister: (attendableId) => {
18
+ grids.delete(attendableId);
19
+ },
20
+ get: (attendableId) => grids.get(attendableId),
21
+ };
22
+ };
23
+
24
+ export default Capability.makeModule(
25
+ Effect.fnUntraced(function* () {
26
+ const gridInstances = createGridRegistry();
27
+ return Capability.contributes(SheetCapabilities.GridInstances, gridInstances);
28
+ }),
29
+ );
@@ -0,0 +1,30 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities, Capability, UndoMapping } from '@dxos/app-framework';
8
+
9
+ import { meta } from '#meta';
10
+ import { SheetOperation } from '#types';
11
+
12
+ export default Capability.makeModule(() =>
13
+ Effect.succeed(
14
+ Capability.contributes(Capabilities.UndoMapping, [
15
+ UndoMapping.make({
16
+ operation: SheetOperation.DropAxis,
17
+ inverse: SheetOperation.RestoreAxis,
18
+ deriveContext: (input, output) => ({
19
+ model: input.model,
20
+ axis: output.axis,
21
+ axisIndex: output.axisIndex,
22
+ index: output.index,
23
+ axisMeta: output.axisMeta,
24
+ values: output.values,
25
+ }),
26
+ message: ['axis-dropped.label', { ns: meta.id }],
27
+ }),
28
+ ]),
29
+ ),
30
+ );
@@ -4,7 +4,7 @@
4
4
 
5
5
  import React, { type PropsWithChildren, createContext, useContext } from 'react';
6
6
 
7
- import { type ComputeGraph, type ComputeGraphRegistry } from '@dxos/compute';
7
+ import { type ComputeGraph, type ComputeGraphRegistry } from '@dxos/compute-hyperformula';
8
8
  import { raise } from '@dxos/debug';
9
9
  import { type Space } from '@dxos/react-client/echo';
10
10
  import { useAsyncState } from '@dxos/react-hooks';
@@ -5,25 +5,25 @@
5
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
  import React, { useEffect, useRef, useState } from 'react';
7
7
 
8
- import { testFunctionPlugins } from '@dxos/compute/testing';
9
- import { Filter } from '@dxos/echo';
10
- import { Function } from '@dxos/functions';
11
- import { useSpace } from '@dxos/react-client/echo';
8
+ import { Operation } from '@dxos/compute';
9
+ import { testFunctionPlugins } from '@dxos/compute-hyperformula/testing';
10
+ import { Filter, Obj } from '@dxos/echo';
11
+ import { useSpaces } from '@dxos/react-client/echo';
12
12
  import { withClientProvider } from '@dxos/react-client/testing';
13
13
  import { Button, Input, Toolbar } from '@dxos/react-ui';
14
+ import { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';
14
15
  import { withTheme } from '@dxos/react-ui/testing';
15
- import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
16
16
 
17
- import { useSheetModel } from '../../model';
18
- import { withComputeGraphDecorator } from '../../testing';
19
- import { Sheet } from '../../types';
17
+ import { withComputeGraphDecorator } from '#testing';
18
+ import { Sheet } from '#types';
20
19
 
20
+ import { useSheetModel } from '../../model';
21
21
  import { useComputeGraph } from './ComputeGraphContextProvider';
22
22
 
23
23
  const FUNCTION_NAME = 'TEST';
24
24
 
25
25
  const DefaultStory = () => {
26
- const space = useSpace();
26
+ const [space] = useSpaces();
27
27
  const graph = useComputeGraph(space);
28
28
  const [sheet, setSheet] = useState<Sheet.Sheet>();
29
29
  const [text, setText] = useState(`${FUNCTION_NAME}(100)`);
@@ -44,14 +44,20 @@ const DefaultStory = () => {
44
44
  setResult({ functions: { standard: f1.length, echo: f2.length } });
45
45
  });
46
46
 
47
- space.db.add(Function.make({ 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
+ );
48
54
  }
49
55
  }, [space, graph]);
50
56
 
51
57
  const inputRef = useRef<HTMLInputElement | null>(null);
52
58
  const handleTest = async () => {
53
59
  if (space && graph) {
54
- const objects = await space.db.query(Filter.type(Function.Function)).run();
60
+ const objects = await space.db.query(Filter.type(Operation.PersistentOperation)).run();
55
61
  const mapped = graph.mapFunctionBindingToId(text);
56
62
  const unmapped = graph.mapFunctionBindingFromId(mapped);
57
63
  const internal = graph.mapFormulaToNative(text);
@@ -74,9 +80,7 @@ const DefaultStory = () => {
74
80
  </Input.Root>
75
81
  <Button onClick={handleTest}>Test</Button>
76
82
  </Toolbar.Root>
77
- <SyntaxHighlighter language='json'>
78
- {JSON.stringify({ space: space?.id, graph: graph?.id, sheet: sheet?.id, model: model?.id, result }, null, 2)}
79
- </SyntaxHighlighter>
83
+ <JsonHighlighter data={{ space: space?.id, graph: graph?.id, sheet: sheet?.id, model: model?.id, result }} />
80
84
  </div>
81
85
  );
82
86
  };
@@ -88,7 +92,11 @@ const meta = {
88
92
  render: DefaultStory,
89
93
  decorators: [
90
94
  withTheme(),
91
- withClientProvider({ types: [Function.Function, Sheet.Sheet], createIdentity: true, createSpace: true }),
95
+ withClientProvider({
96
+ types: [Operation.PersistentOperation, Sheet.Sheet],
97
+ createIdentity: true,
98
+ createSpace: true,
99
+ }),
92
100
  withComputeGraphDecorator({ plugins: testFunctionPlugins }),
93
101
  ],
94
102
  } satisfies Meta<typeof DefaultStory>;
@@ -6,17 +6,18 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
  import React, { useMemo, useState } from 'react';
7
7
 
8
8
  import { Client } from '@dxos/client';
9
- import { defaultFunctions } from '@dxos/compute';
10
- import { getRegisteredFunctionNames } from '@dxos/compute/testing';
9
+ import { defaultFunctions } from '@dxos/compute-hyperformula';
10
+ import { getRegisteredFunctionNames } from '@dxos/compute-hyperformula/testing';
11
11
  import { Obj } from '@dxos/echo';
12
12
  import { createDocAccessor } from '@dxos/echo-db';
13
13
  import { useAsyncEffect } from '@dxos/react-hooks';
14
- import { withTheme } from '@dxos/react-ui/testing';
15
14
  import { CellEditor, type CellEditorProps } from '@dxos/react-ui-grid';
15
+ import { withTheme } from '@dxos/react-ui/testing';
16
16
  import { automerge } from '@dxos/ui-editor';
17
17
 
18
+ import { Sheet } from '#types';
19
+
18
20
  import { sheetExtension } from '../../extensions';
19
- import { Sheet } from '../../types';
20
21
 
21
22
  const DefaultStory = ({ value, ...props }: CellEditorProps) => {
22
23
  const extensions = useMemo(() => {
@@ -38,9 +39,9 @@ const AutomergeStory = ({ value, ...props }: CellEditorProps) => {
38
39
  const space = await client.spaces.create();
39
40
 
40
41
  const sheet = Sheet.make();
41
- Obj.change(sheet, (obj) => {
42
- obj.name = 'Test';
43
- obj.cells[cell] = { value };
42
+ Obj.update(sheet, (sheet) => {
43
+ sheet.name = 'Test';
44
+ sheet.cells[cell] = { value };
44
45
  });
45
46
  space.db.add(sheet);
46
47
  setObject(sheet);
@@ -5,23 +5,23 @@
5
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
  import React from 'react';
7
7
 
8
+ import { ProcessManagerPlugin } from '@dxos/app-framework';
8
9
  import { withPluginManager } from '@dxos/app-framework/testing';
9
- import { testFunctionPlugins } from '@dxos/compute/testing';
10
- import { OperationPlugin, RuntimePlugin } from '@dxos/plugin-testing';
11
- import { useSpace } from '@dxos/react-client/echo';
10
+ import { testFunctionPlugins } from '@dxos/compute-hyperformula/testing';
11
+ import { useSpaces } from '@dxos/react-client/echo';
12
12
  import { withClientProvider } from '@dxos/react-client/testing';
13
13
  import { withLayout, withTheme } from '@dxos/react-ui/testing';
14
14
 
15
- import { createTestCells, useTestSheet, withComputeGraphDecorator } from '../../testing';
16
- import { translations } from '../../translations';
17
- import { Sheet } from '../../types';
15
+ import { createTestCells, useTestSheet, withComputeGraphDecorator } from '#testing';
16
+ import { translations } from '#translations';
17
+ import { Sheet } from '#types';
18
+
18
19
  import { useComputeGraph } from '../ComputeGraph';
19
20
  import { SheetRoot } from '../SheetRoot';
20
-
21
21
  import { SheetContent } from './SheetContent';
22
22
 
23
23
  export const Basic = () => {
24
- const space = useSpace();
24
+ const [space] = useSpaces();
25
25
  const graph = useComputeGraph(space);
26
26
  const sheet = useTestSheet(space, graph, { cells: createTestCells() });
27
27
  if (!sheet || !graph) {
@@ -29,8 +29,8 @@ export const Basic = () => {
29
29
  }
30
30
 
31
31
  return (
32
- <SheetRoot graph={graph} sheet={sheet} ignoreAttention>
33
- <div role='none' className='grid h-full w-full'>
32
+ <SheetRoot graph={graph} sheet={sheet} attendableId='test' ignoreAttention>
33
+ <div className='grid h-full w-full'>
34
34
  <SheetContent />
35
35
  </div>
36
36
  </SheetRoot>
@@ -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: {
@@ -8,16 +8,18 @@ import React, {
8
8
  type MouseEvent,
9
9
  type WheelEvent,
10
10
  useCallback,
11
+ useEffect,
11
12
  useMemo,
12
13
  useRef,
13
14
  useState,
14
15
  } from 'react';
15
16
 
16
- import { useOperationInvoker } from '@dxos/app-framework/ui';
17
- import { type CellRange, rangeToA1Notation } from '@dxos/compute';
17
+ import { useCapabilities, useOperationInvoker } from '@dxos/app-framework/ui';
18
+ import { type CellRange, rangeToA1Notation } from '@dxos/compute-hyperformula';
18
19
  import { Obj } from '@dxos/echo';
19
20
  import { defaultColSize, defaultRowSize } from '@dxos/lit-grid';
20
- import { type ComposableProps, DropdownMenu, Icon, useTranslation } from '@dxos/react-ui';
21
+ import { DropdownMenu, Icon, useTranslation } from '@dxos/react-ui';
22
+ import { composable, composableProps } from '@dxos/react-ui';
21
23
  import { useAttention } from '@dxos/react-ui-attention';
22
24
  import {
23
25
  type DxGridCellIndex,
@@ -32,14 +34,14 @@ import {
32
34
  editorKeys,
33
35
  parseCellIndex,
34
36
  } from '@dxos/react-ui-grid';
35
- import { mx, useComposableProps } from '@dxos/ui-theme';
37
+
38
+ import { meta } from '#meta';
39
+ import { SheetOperation } from '#types';
40
+ import { DEFAULT_COLS, DEFAULT_ROWS, SheetCapabilities } from '#types';
36
41
 
37
42
  import { type RangeController, rangeExtension, sheetExtension } from '../../extensions';
38
- import { useSelectThreadOnCellFocus, useUpdateFocusedCellOnThreadSelection } from '../../integrations';
39
- import { meta } from '../../meta';
40
- import { DEFAULT_COLS, DEFAULT_ROWS, SheetOperation } from '../../types';
43
+ import { useSelectThreadOnCellFocus } from '../../integrations';
41
44
  import { useSheetContext } from '../SheetRoot';
42
-
43
45
  import { colLabelCell, rowLabelCell, useSheetModelDxGridProps } from './util';
44
46
 
45
47
  const inertPosition: DxGridPosition = { plane: 'grid', col: 0, row: 0 };
@@ -70,12 +72,23 @@ const sheetRowDefault = {
70
72
  grid: { size: defaultRowSize, resizeable: true },
71
73
  };
72
74
 
73
- export type SheetContentProps = ComposableProps<React.HTMLAttributes<HTMLDivElement>>;
75
+ export type SheetContentProps = {};
74
76
 
75
- export const SheetContent = (props: SheetContentProps) => {
77
+ export const SheetContent = composable<HTMLDivElement, SheetContentProps>((props, forwardedRef) => {
76
78
  const { t } = useTranslation(meta.id);
77
- const { id, model, editing, setCursor, setRange, cursor, cursorFallbackRange, activeRefs, ignoreAttention } =
78
- useSheetContext();
79
+ const {
80
+ id,
81
+ attendableId,
82
+ model,
83
+ editing,
84
+ setCursor,
85
+ setRange,
86
+ cursor,
87
+ cursorFallbackRange,
88
+ activeRefs,
89
+ setActiveRefs,
90
+ ignoreAttention,
91
+ } = useSheetContext();
79
92
 
80
93
  // NOTE(thure): using `useState` instead of `useRef` works with refs provided by `@lit/react` and gives us
81
94
  // a reliable dependency for `useEffect` whereas `useLayoutEffect` does not guarantee the element will be defined.
@@ -84,7 +97,6 @@ export const SheetContent = (props: SheetContentProps) => {
84
97
  const { invokePromise } = useOperationInvoker();
85
98
  const rangeController = useRef<RangeController>(null);
86
99
  const { hasAttention } = useAttention(id);
87
- const { className, ...rest } = useComposableProps(props);
88
100
 
89
101
  const handleFocus = useCallback(
90
102
  (event: FocusEvent) => {
@@ -133,7 +145,7 @@ export const SheetContent = (props: SheetContentProps) => {
133
145
 
134
146
  const handleAxisResize = useCallback<NonNullable<GridContentProps['onAxisResize']>>(
135
147
  ({ axis, size, index: numericIndex }) => {
136
- Obj.change(model.sheet, (sheet) => {
148
+ Obj.update(model.sheet, (sheet) => {
137
149
  if (axis === 'row') {
138
150
  const rowId = sheet.rows[parseInt(numericIndex)];
139
151
  sheet.rowMeta[rowId] ??= {};
@@ -318,11 +330,18 @@ export const SheetContent = (props: SheetContentProps) => {
318
330
  [model],
319
331
  );
320
332
 
321
- useUpdateFocusedCellOnThreadSelection(dxGrid);
333
+ const [gridInstances] = useCapabilities(SheetCapabilities.GridInstances);
334
+ useEffect(() => {
335
+ if (dxGrid && gridInstances) {
336
+ gridInstances.register(attendableId, dxGrid, setActiveRefs);
337
+ return () => gridInstances.unregister(attendableId);
338
+ }
339
+ }, [dxGrid, gridInstances, attendableId, setActiveRefs]);
340
+
322
341
  useSelectThreadOnCellFocus();
323
342
 
324
343
  return (
325
- <div {...rest} role='none' className={mx('relative min-h-0', className)}>
344
+ <div ref={forwardedRef} {...composableProps(props, { classNames: 'relative min-h-0' })}>
326
345
  <GridCellEditor getCellContent={getCellContent} extensions={extensions} onBlur={handleBlur} />
327
346
  <Grid.Content
328
347
  className='[--dx-grid-base:var(--base-surface)] [&_.dx-grid]:absolute [&_.dx-grid]:inset-0'
@@ -358,27 +377,25 @@ export const SheetContent = (props: SheetContentProps) => {
358
377
  data-testid={`grid.${contextMenuAxis}.insert-before`}
359
378
  >
360
379
  <Icon
361
- size={5}
362
380
  icon={contextMenuAxis === 'col' ? 'ph--columns-plus-left--regular' : 'ph--rows-plus-top--regular'}
363
381
  />
364
- <span>{t(`add ${contextMenuAxis} before label`)}</span>
382
+ <span>{t(`add-${contextMenuAxis}-before.label`)}</span>
365
383
  </DropdownMenu.Item>
366
384
  <DropdownMenu.Item
367
385
  onClick={() => handleAxisMenuAction('insert-after')}
368
386
  data-testid={`grid.${contextMenuAxis}.insert-after`}
369
387
  >
370
388
  <Icon
371
- size={5}
372
389
  icon={contextMenuAxis === 'col' ? 'ph--columns-plus-right--regular' : 'ph--rows-plus-bottom--regular'}
373
390
  />
374
- <span>{t(`add ${contextMenuAxis} after label`)}</span>
391
+ <span>{t(`add-${contextMenuAxis}-after.label`)}</span>
375
392
  </DropdownMenu.Item>
376
393
  <DropdownMenu.Item
377
394
  onClick={() => handleAxisMenuAction('drop')}
378
395
  data-testid={`grid.${contextMenuAxis}.drop`}
379
396
  >
380
- <Icon size={5} icon='ph--backspace--regular' />
381
- <span>{t(`delete ${contextMenuAxis} label`)}</span>
397
+ <Icon icon='ph--backspace--regular' />
398
+ <span>{t(`delete-${contextMenuAxis}.label`)}</span>
382
399
  </DropdownMenu.Item>
383
400
  </DropdownMenu.Viewport>
384
401
  <DropdownMenu.Arrow />
@@ -386,4 +403,4 @@ export const SheetContent = (props: SheetContentProps) => {
386
403
  </DropdownMenu.Root>
387
404
  </div>
388
405
  );
389
- };
406
+ });
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { useEffect, useState } from 'react';
6
6
 
7
- import { inRange } from '@dxos/compute';
7
+ import { inRange } from '@dxos/compute-hyperformula';
8
8
  import { createDocAccessor } from '@dxos/echo-db';
9
9
  import { cellClassesForFieldType, parseValue } from '@dxos/react-ui-form';
10
10
  import {
@@ -21,8 +21,9 @@ import {
21
21
  } from '@dxos/react-ui-grid';
22
22
  import { mx } from '@dxos/ui-theme';
23
23
 
24
+ import { cellClassNameForRange, rangeFromIndex } from '#types';
25
+
24
26
  import { type SheetModel } from '../../model';
25
- import { cellClassNameForRange, rangeFromIndex } from '../../types';
26
27
 
27
28
  const createDxGridColumns = (model: SheetModel): DxGridAxisMeta => {
28
29
  return model.sheet.columns.reduce(
@@ -65,7 +66,7 @@ const projectCellProps = (model: SheetModel, col: number, row: number): DxGridCe
65
66
  // const range = thread.target?.anchor && parseThreadAnchorAsCellRange(thread.target!.anchor);
66
67
  // return thread && range ? inRange(range, address) : false;
67
68
  // })
68
- // .map((thread) => Obj.getDXN(thread!).toString())
69
+ // .map((thread) => Obj.getURI(thread!))
69
70
  // .join(' ');
70
71
 
71
72
  const description = model.getValueDescription(address);
@@ -4,9 +4,13 @@
4
4
 
5
5
  import React, { type PropsWithChildren, createContext, useCallback, useContext, useState } from 'react';
6
6
 
7
- import { type CellAddress, type CellRange, type CompleteCellRange, type ComputeGraph } from '@dxos/compute';
7
+ import {
8
+ type CellAddress,
9
+ type CellRange,
10
+ type CompleteCellRange,
11
+ type ComputeGraph,
12
+ } from '@dxos/compute-hyperformula';
8
13
  import { raise } from '@dxos/debug';
9
- import { Obj } from '@dxos/echo';
10
14
  import {
11
15
  Grid,
12
16
  type GridContentProps,
@@ -15,12 +19,13 @@ import {
15
19
  useGridContext,
16
20
  } from '@dxos/react-ui-grid';
17
21
 
22
+ import { type Sheet } from '#types';
23
+
18
24
  import { type SheetModel, useSheetModel } from '../../model';
19
- import { type Sheet } from '../../types';
20
25
 
21
26
  export type SheetContextValue = {
22
27
  id: string;
23
-
28
+ attendableId: string;
24
29
  model: SheetModel;
25
30
 
26
31
  // Cursor state.
@@ -57,6 +62,7 @@ export const useSheetContext = (): SheetContextValue => {
57
62
  export type SheetRootProps = {
58
63
  graph: ComputeGraph;
59
64
  sheet: Sheet.Sheet;
65
+ attendableId: string;
60
66
  readonly?: boolean;
61
67
  ignoreAttention?: boolean;
62
68
  } & Pick<SheetContextValue, 'onInfo'>;
@@ -65,6 +71,7 @@ export const SheetRoot = ({
65
71
  children,
66
72
  graph,
67
73
  sheet,
74
+ attendableId,
68
75
  readonly,
69
76
  ignoreAttention,
70
77
  onInfo,
@@ -75,8 +82,8 @@ export const SheetRoot = ({
75
82
  }
76
83
 
77
84
  return (
78
- <Grid.Root id={Obj.getDXN(sheet).toString()}>
79
- <SheetProviderImpl model={model} onInfo={onInfo} ignoreAttention={ignoreAttention}>
85
+ <Grid.Root id={attendableId}>
86
+ <SheetProviderImpl model={model} attendableId={attendableId} onInfo={onInfo} ignoreAttention={ignoreAttention}>
80
87
  {children}
81
88
  </SheetProviderImpl>
82
89
  </Grid.Root>
@@ -86,10 +93,13 @@ export const SheetRoot = ({
86
93
  const SheetProviderImpl = ({
87
94
  __gridScope,
88
95
  children,
96
+ attendableId,
89
97
  ignoreAttention,
90
98
  model,
91
99
  onInfo,
92
- }: GridScopedProps<PropsWithChildren<Pick<SheetContextValue, 'ignoreAttention' | 'model' | 'onInfo'>>>) => {
100
+ }: GridScopedProps<
101
+ PropsWithChildren<Pick<SheetContextValue, 'attendableId' | 'ignoreAttention' | 'model' | 'onInfo'>>
102
+ >) => {
93
103
  const { id, editing, setEditing } = useGridContext('SheetProvider', __gridScope);
94
104
 
95
105
  const [cursor, setCursorInternal] = useState<CellAddress>();
@@ -120,6 +130,7 @@ const SheetProviderImpl = ({
120
130
  <SheetContext.Provider
121
131
  value={{
122
132
  id,
133
+ attendableId,
123
134
  model,
124
135
  editing,
125
136
  setEditing,
@@ -4,15 +4,19 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { addressToA1Notation, isFormula, rangeToA1Notation } from '@dxos/compute';
8
- import { type ComposableProps, Icon } from '@dxos/react-ui';
7
+ import { addressToA1Notation, isFormula, rangeToA1Notation } from '@dxos/compute-hyperformula';
8
+ import { Icon } from '@dxos/react-ui';
9
+ import { composable, composableProps } from '@dxos/react-ui';
10
+ import { mx } from '@dxos/ui-theme';
11
+
12
+ import { mapFormulaIndicesToRefs } from '#types';
9
13
 
10
- import { mapFormulaIndicesToRefs } from '../../types';
11
14
  import { useSheetContext } from '../SheetRoot';
12
15
 
13
- export type SheetStatusbarProps = ComposableProps;
16
+ export type SheetStatusbarProps = {};
14
17
 
15
- export const SheetStatusbar = (props: SheetStatusbarProps) => {
18
+ export const SheetStatusbar = composable<HTMLDivElement, SheetStatusbarProps>((props, forwardedRef) => {
19
+ const { className, ...rest } = composableProps(props);
16
20
  const { model, cursor, range } = useSheetContext();
17
21
 
18
22
  let value;
@@ -29,8 +33,12 @@ export const SheetStatusbar = (props: SheetStatusbarProps) => {
29
33
 
30
34
  return (
31
35
  <div
32
- {...props}
33
- className='flex shrink-0 justify-between items-center px-4 py-1 text-sm bg-toolbar-surface border-y !border-subdued-separator'
36
+ ref={forwardedRef}
37
+ {...rest}
38
+ className={mx(
39
+ 'flex shrink-0 justify-between items-center px-4 py-1 text-sm bg-toolbar-surface border-y !border-subdued-separator',
40
+ className,
41
+ )}
34
42
  >
35
43
  <div className='flex gap-4 items-center'>
36
44
  <div className='flex w-16 items-center font-mono'>
@@ -43,4 +51,4 @@ export const SheetStatusbar = (props: SheetStatusbarProps) => {
43
51
  </div>
44
52
  </div>
45
53
  );
46
- };
54
+ });
@@ -7,7 +7,7 @@ import React from 'react';
7
7
 
8
8
  import { withLayout, withTheme } from '@dxos/react-ui/testing';
9
9
 
10
- import { translations } from '../../translations';
10
+ import { translations } from '#translations';
11
11
 
12
12
  import { SheetToolbar } from './SheetToolbar';
13
13