@dxos/plugin-sheet 0.8.4-main.3eb6e50203 → 0.8.4-main.3fbcb4aa9b

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 (355) hide show
  1. package/dist/lib/neutral/RangeList-HYB5S6KQ.mjs +46 -0
  2. package/dist/lib/neutral/RangeList-HYB5S6KQ.mjs.map +7 -0
  3. package/dist/lib/neutral/SheetContainer-ZOVKGHLT.mjs +33 -0
  4. package/dist/lib/neutral/SheetContainer-ZOVKGHLT.mjs.map +7 -0
  5. package/dist/lib/neutral/SheetPlugin.mjs +48 -0
  6. package/dist/lib/neutral/SheetPlugin.mjs.map +7 -0
  7. package/dist/lib/neutral/SheetPlugin.node.mjs +27 -0
  8. package/dist/lib/neutral/SheetPlugin.node.mjs.map +7 -0
  9. package/dist/lib/{browser/anchor-sort-AMMLA66W.mjs → neutral/anchor-sort-TTCKGX7V.mjs} +5 -7
  10. package/dist/lib/neutral/anchor-sort-TTCKGX7V.mjs.map +7 -0
  11. package/dist/lib/neutral/capabilities/index.mjs +25 -0
  12. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  13. package/dist/lib/neutral/chunk-4GWJDLTH.mjs +83 -0
  14. package/dist/lib/neutral/chunk-4GWJDLTH.mjs.map +7 -0
  15. package/dist/lib/{browser/chunk-IFLWVS2V.mjs → neutral/chunk-4SBAIU6F.mjs} +12 -12
  16. package/dist/lib/neutral/chunk-4SBAIU6F.mjs.map +7 -0
  17. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  18. package/dist/lib/{browser/chunk-KE3AKN5W.mjs → neutral/chunk-KC2SMDNF.mjs} +167 -191
  19. package/dist/lib/neutral/chunk-KC2SMDNF.mjs.map +7 -0
  20. package/dist/lib/neutral/chunk-YFHTB6MX.mjs +8 -0
  21. package/dist/lib/neutral/chunk-YFHTB6MX.mjs.map +7 -0
  22. package/dist/lib/neutral/chunk-ZWOQCLH7.mjs +21 -0
  23. package/dist/lib/neutral/chunk-ZWOQCLH7.mjs.map +7 -0
  24. package/dist/lib/neutral/comment-config-ZBWNCJMZ.mjs +20 -0
  25. package/dist/lib/neutral/comment-config-ZBWNCJMZ.mjs.map +7 -0
  26. package/dist/lib/{browser/chunk-EDWHV64N.mjs → neutral/components/index.mjs} +552 -474
  27. package/dist/lib/neutral/components/index.mjs.map +7 -0
  28. package/dist/lib/{browser/compute-graph-registry-RC5L7RE4.mjs → neutral/compute-graph-registry-IEQBF5XZ.mjs} +5 -6
  29. package/dist/lib/neutral/compute-graph-registry-IEQBF5XZ.mjs.map +7 -0
  30. package/dist/lib/neutral/containers/index.mjs +11 -0
  31. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  32. package/dist/lib/neutral/create-object-OKQAXJCW.mjs +27 -0
  33. package/dist/lib/neutral/create-object-OKQAXJCW.mjs.map +7 -0
  34. package/dist/lib/neutral/drop-axis-G6UOXG54.mjs +23 -0
  35. package/dist/lib/neutral/drop-axis-G6UOXG54.mjs.map +7 -0
  36. package/dist/lib/{node-esm/types → neutral}/index.mjs +14 -6
  37. package/dist/lib/neutral/insert-axis-ZFFNG22G.mjs +16 -0
  38. package/dist/lib/neutral/insert-axis-ZFFNG22G.mjs.map +7 -0
  39. package/dist/lib/{browser/markdown-D2T2DOVX.mjs → neutral/markdown-I2AKJYPF.mjs} +5 -6
  40. package/dist/lib/neutral/markdown-I2AKJYPF.mjs.map +7 -0
  41. package/dist/lib/neutral/meta.json +1 -0
  42. package/dist/lib/neutral/meta.mjs +8 -0
  43. package/dist/lib/neutral/meta.mjs.map +7 -0
  44. package/dist/lib/neutral/operation-handler-TB6LFV2H.mjs +13 -0
  45. package/dist/lib/neutral/operation-handler-TB6LFV2H.mjs.map +7 -0
  46. package/dist/lib/neutral/operations/index.mjs +8 -0
  47. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  48. package/dist/lib/neutral/plugin.mjs +16 -0
  49. package/dist/lib/neutral/plugin.mjs.map +7 -0
  50. package/dist/lib/{browser/react-surface-45CRAB5G.mjs → neutral/react-surface-ID4JCAFR.mjs} +16 -23
  51. package/dist/lib/neutral/react-surface-ID4JCAFR.mjs.map +7 -0
  52. package/dist/lib/neutral/restore-axis-44DM6N54.mjs +16 -0
  53. package/dist/lib/neutral/restore-axis-44DM6N54.mjs.map +7 -0
  54. package/dist/lib/neutral/scroll-to-anchor-WHX3HJC7.mjs +33 -0
  55. package/dist/lib/neutral/scroll-to-anchor-WHX3HJC7.mjs.map +7 -0
  56. package/dist/lib/neutral/state-HPA27MX2.mjs +29 -0
  57. package/dist/lib/neutral/state-HPA27MX2.mjs.map +7 -0
  58. package/dist/lib/neutral/testing/index.mjs +103 -0
  59. package/dist/lib/neutral/testing/index.mjs.map +7 -0
  60. package/dist/lib/neutral/translations.mjs +55 -0
  61. package/dist/lib/neutral/translations.mjs.map +7 -0
  62. package/dist/lib/{browser → neutral}/types/index.mjs +6 -5
  63. package/dist/lib/neutral/types/index.mjs.map +7 -0
  64. package/dist/lib/neutral/undo-mappings-3FQLSTCZ.mjs +31 -0
  65. package/dist/lib/neutral/undo-mappings-3FQLSTCZ.mjs.map +7 -0
  66. package/dist/types/src/SheetPlugin.d.ts +1 -0
  67. package/dist/types/src/SheetPlugin.d.ts.map +1 -1
  68. package/dist/types/src/SheetPlugin.node.d.ts +4 -0
  69. package/dist/types/src/SheetPlugin.node.d.ts.map +1 -0
  70. package/dist/types/src/SheetPlugin.test.d.ts +2 -0
  71. package/dist/types/src/SheetPlugin.test.d.ts.map +1 -0
  72. package/dist/types/src/capabilities/anchor-sort.d.ts +6 -0
  73. package/dist/types/src/capabilities/anchor-sort.d.ts.map +1 -0
  74. package/dist/types/src/capabilities/comment-config.d.ts +12 -0
  75. package/dist/types/src/capabilities/comment-config.d.ts.map +1 -0
  76. package/dist/types/src/capabilities/compute-graph-registry.d.ts +5 -0
  77. package/dist/types/src/capabilities/compute-graph-registry.d.ts.map +1 -0
  78. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  79. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  80. package/dist/types/src/capabilities/index.d.ts +23 -5
  81. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  82. package/dist/types/src/capabilities/markdown.d.ts +5 -0
  83. package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
  84. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  85. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  86. package/dist/types/src/capabilities/react-surface.d.ts +5 -0
  87. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  88. package/dist/types/src/capabilities/state.d.ts +6 -0
  89. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  90. package/dist/types/src/capabilities/undo-mappings.d.ts +5 -0
  91. package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -0
  92. package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts +1 -1
  93. package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts.map +1 -1
  94. package/dist/types/src/components/ComputeGraph/compute-graph.stories.d.ts.map +1 -1
  95. package/dist/types/src/components/Sheet/Sheet.d.ts +17 -0
  96. package/dist/types/src/components/Sheet/Sheet.d.ts.map +1 -0
  97. package/dist/types/src/components/Sheet/index.d.ts +2 -0
  98. package/dist/types/src/components/Sheet/index.d.ts.map +1 -0
  99. package/dist/types/src/components/SheetContent/SheetCellEditor.stories.d.ts.map +1 -0
  100. package/dist/types/src/components/SheetContent/SheetContent.d.ts +6 -0
  101. package/dist/types/src/components/SheetContent/SheetContent.d.ts.map +1 -0
  102. package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts +93 -0
  103. package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts.map +1 -0
  104. package/dist/types/src/components/SheetContent/index.d.ts +2 -0
  105. package/dist/types/src/components/SheetContent/index.d.ts.map +1 -0
  106. package/dist/types/src/components/{GridSheet → SheetContent}/util.d.ts +1 -1
  107. package/dist/types/src/components/SheetContent/util.d.ts.map +1 -0
  108. package/dist/types/src/components/{SheetContext/SheetContext.d.ts → SheetRoot/SheetRoot.d.ts} +8 -6
  109. package/dist/types/src/components/SheetRoot/SheetRoot.d.ts.map +1 -0
  110. package/dist/types/src/components/SheetRoot/index.d.ts +2 -0
  111. package/dist/types/src/components/SheetRoot/index.d.ts.map +1 -0
  112. package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts +6 -0
  113. package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts.map +1 -0
  114. package/dist/types/src/components/SheetStatusbar/index.d.ts +2 -0
  115. package/dist/types/src/components/SheetStatusbar/index.d.ts.map +1 -0
  116. package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts +5 -5
  117. package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts.map +1 -1
  118. package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts +72 -68
  119. package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts.map +1 -1
  120. package/dist/types/src/components/SheetToolbar/align.d.ts +2 -2
  121. package/dist/types/src/components/SheetToolbar/align.d.ts.map +1 -1
  122. package/dist/types/src/components/SheetToolbar/style.d.ts +2 -2
  123. package/dist/types/src/components/SheetToolbar/style.d.ts.map +1 -1
  124. package/dist/types/src/components/SheetToolbar/useToolbarState.d.ts.map +1 -1
  125. package/dist/types/src/components/index.d.ts +1 -4
  126. package/dist/types/src/components/index.d.ts.map +1 -1
  127. package/dist/types/src/containers/RangeList/RangeList.d.ts +7 -0
  128. package/dist/types/src/containers/RangeList/RangeList.d.ts.map +1 -0
  129. package/dist/types/src/containers/RangeList/index.d.ts +2 -0
  130. package/dist/types/src/containers/RangeList/index.d.ts.map +1 -0
  131. package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts +12 -0
  132. package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts.map +1 -0
  133. package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts +92 -0
  134. package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts.map +1 -0
  135. package/dist/types/src/containers/SheetContainer/index.d.ts +2 -0
  136. package/dist/types/src/containers/SheetContainer/index.d.ts.map +1 -0
  137. package/dist/types/src/containers/index.d.ts +4 -0
  138. package/dist/types/src/containers/index.d.ts.map +1 -0
  139. package/dist/types/src/extensions/compute.d.ts +1 -1
  140. package/dist/types/src/extensions/compute.d.ts.map +1 -1
  141. package/dist/types/src/extensions/compute.stories.d.ts.map +1 -1
  142. package/dist/types/src/extensions/editor/sheet-extension.d.ts +1 -1
  143. package/dist/types/src/extensions/editor/sheet-extension.d.ts.map +1 -1
  144. package/dist/types/src/index.d.ts +2 -2
  145. package/dist/types/src/index.d.ts.map +1 -1
  146. package/dist/types/src/integrations/thread-ranges.d.ts +1 -3
  147. package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
  148. package/dist/types/src/model/sheet-model.d.ts +2 -2
  149. package/dist/types/src/model/sheet-model.d.ts.map +1 -1
  150. package/dist/types/src/model/testing.d.ts +1 -1
  151. package/dist/types/src/model/testing.d.ts.map +1 -1
  152. package/dist/types/src/model/useSheetModel.d.ts +2 -2
  153. package/dist/types/src/model/useSheetModel.d.ts.map +1 -1
  154. package/dist/types/src/operations/drop-axis.d.ts +5 -0
  155. package/dist/types/src/operations/drop-axis.d.ts.map +1 -0
  156. package/dist/types/src/operations/index.d.ts +3 -0
  157. package/dist/types/src/operations/index.d.ts.map +1 -0
  158. package/dist/types/src/operations/insert-axis.d.ts +5 -0
  159. package/dist/types/src/operations/insert-axis.d.ts.map +1 -0
  160. package/dist/types/src/operations/restore-axis.d.ts +5 -0
  161. package/dist/types/src/operations/restore-axis.d.ts.map +1 -0
  162. package/dist/types/src/operations/scroll-to-anchor.d.ts +5 -0
  163. package/dist/types/src/operations/scroll-to-anchor.d.ts.map +1 -0
  164. package/dist/types/src/playwright/playwright.config.d.ts.map +1 -1
  165. package/dist/types/src/playwright/sheet-manager.d.ts.map +1 -1
  166. package/dist/types/src/plugin.d.ts +4 -0
  167. package/dist/types/src/plugin.d.ts.map +1 -0
  168. package/dist/types/src/serializer.d.ts +2 -2
  169. package/dist/types/src/serializer.d.ts.map +1 -1
  170. package/dist/types/src/testing/data.d.ts +1 -1
  171. package/dist/types/src/testing/data.d.ts.map +1 -1
  172. package/dist/types/src/testing/testing.d.ts +4 -4
  173. package/dist/types/src/testing/testing.d.ts.map +1 -1
  174. package/dist/types/src/translations.d.ts +74 -39
  175. package/dist/types/src/translations.d.ts.map +1 -1
  176. package/dist/types/src/types/Sheet.d.ts +3 -3
  177. package/dist/types/src/types/Sheet.d.ts.map +1 -1
  178. package/dist/types/src/types/SheetCapabilities.d.ts +16 -0
  179. package/dist/types/src/types/SheetCapabilities.d.ts.map +1 -0
  180. package/dist/types/src/types/SheetOperation.d.ts +45 -0
  181. package/dist/types/src/types/SheetOperation.d.ts.map +1 -0
  182. package/dist/types/src/types/index.d.ts +3 -2
  183. package/dist/types/src/types/index.d.ts.map +1 -1
  184. package/dist/types/src/types/sheet-range-types.d.ts +1 -1
  185. package/dist/types/src/types/sheet-range-types.d.ts.map +1 -1
  186. package/dist/types/src/types/types.d.ts +0 -92
  187. package/dist/types/src/types/types.d.ts.map +1 -1
  188. package/dist/types/src/types/util.d.ts +1 -1
  189. package/dist/types/src/types/util.d.ts.map +1 -1
  190. package/dist/types/tsconfig.tsbuildinfo +1 -1
  191. package/package.json +116 -74
  192. package/src/SheetPlugin.node.ts +21 -0
  193. package/src/SheetPlugin.test.ts +30 -0
  194. package/src/SheetPlugin.tsx +25 -35
  195. package/src/capabilities/{anchor-sort/anchor-sort.ts → anchor-sort.ts} +1 -1
  196. package/src/capabilities/comment-config.ts +24 -0
  197. package/src/capabilities/{compute-graph-registry/compute-graph-registry.ts → compute-graph-registry.ts} +4 -2
  198. package/src/capabilities/create-object.ts +30 -0
  199. package/src/capabilities/index.ts +17 -5
  200. package/src/capabilities/{markdown/markdown.ts → markdown.ts} +3 -2
  201. package/src/capabilities/operation-handler.ts +16 -0
  202. package/src/capabilities/react-surface.tsx +49 -0
  203. package/src/capabilities/state.ts +29 -0
  204. package/src/capabilities/undo-mappings.ts +30 -0
  205. package/src/components/ComputeGraph/ComputeGraphContextProvider.tsx +1 -1
  206. package/src/components/ComputeGraph/compute-graph.stories.tsx +18 -15
  207. package/src/components/Sheet/Sheet.tsx +20 -0
  208. package/src/components/Sheet/index.ts +5 -0
  209. package/src/components/{GridSheet → SheetContent}/SheetCellEditor.stories.tsx +9 -8
  210. package/src/components/{GridSheet/GridSheet.stories.tsx → SheetContent/SheetContent.stories.tsx} +19 -18
  211. package/src/components/{GridSheet/GridSheet.tsx → SheetContent/SheetContent.tsx} +45 -25
  212. package/src/components/{RangeList → SheetContent}/index.ts +1 -1
  213. package/src/components/{GridSheet → SheetContent}/util.ts +6 -5
  214. package/src/components/{SheetContext/SheetContext.tsx → SheetRoot/SheetRoot.tsx} +52 -39
  215. package/src/components/{GridSheet → SheetRoot}/index.ts +1 -1
  216. package/src/components/{FunctionEditor/FunctionEditor.tsx → SheetStatusbar/SheetStatusbar.tsx} +20 -8
  217. package/src/components/{FunctionEditor → SheetStatusbar}/index.ts +1 -1
  218. package/src/components/SheetToolbar/SheetToolbar.stories.tsx +5 -5
  219. package/src/components/SheetToolbar/SheetToolbar.tsx +18 -22
  220. package/src/components/SheetToolbar/align.ts +12 -12
  221. package/src/components/SheetToolbar/style.ts +10 -10
  222. package/src/components/index.ts +1 -7
  223. package/src/{components → containers}/RangeList/RangeList.tsx +22 -20
  224. package/src/containers/RangeList/index.ts +5 -0
  225. package/src/{components → containers}/SheetContainer/SheetContainer.stories.tsx +42 -45
  226. package/src/containers/SheetContainer/SheetContainer.tsx +57 -0
  227. package/src/containers/SheetContainer/index.ts +5 -0
  228. package/src/containers/index.ts +8 -0
  229. package/src/extensions/compute.stories.tsx +16 -15
  230. package/src/extensions/compute.ts +1 -1
  231. package/src/extensions/editor/sheet-extension.test.ts +1 -1
  232. package/src/extensions/editor/sheet-extension.ts +12 -12
  233. package/src/index.ts +2 -2
  234. package/src/integrations/thread-ranges.ts +7 -40
  235. package/src/meta.ts +1 -1
  236. package/src/model/sheet-model.test.ts +5 -5
  237. package/src/model/sheet-model.ts +17 -17
  238. package/src/model/testing.ts +2 -2
  239. package/src/model/useSheetModel.ts +3 -2
  240. package/src/operations/drop-axis.ts +26 -0
  241. package/src/operations/index.ts +12 -0
  242. package/src/operations/insert-axis.ts +19 -0
  243. package/src/operations/restore-axis.ts +19 -0
  244. package/src/operations/scroll-to-anchor.ts +30 -0
  245. package/src/playwright/playwright.config.ts +1 -1
  246. package/src/playwright/sheet.spec.ts +3 -3
  247. package/src/plugin.ts +11 -0
  248. package/src/sanity.test.ts +6 -3
  249. package/src/serializer.ts +2 -2
  250. package/src/testing/data.ts +1 -1
  251. package/src/testing/testing.tsx +4 -4
  252. package/src/translations.ts +41 -36
  253. package/src/types/Sheet.ts +15 -9
  254. package/src/types/SheetCapabilities.ts +26 -0
  255. package/src/types/SheetOperation.ts +75 -0
  256. package/src/types/index.ts +4 -2
  257. package/src/types/sheet-range-types.ts +3 -3
  258. package/src/types/types.ts +0 -80
  259. package/src/types/util.ts +1 -1
  260. package/dist/lib/browser/SheetContainer-6DNFC4TY.mjs +0 -397
  261. package/dist/lib/browser/SheetContainer-6DNFC4TY.mjs.map +0 -7
  262. package/dist/lib/browser/anchor-sort-AMMLA66W.mjs.map +0 -7
  263. package/dist/lib/browser/chunk-EDWHV64N.mjs.map +0 -7
  264. package/dist/lib/browser/chunk-IFLWVS2V.mjs.map +0 -7
  265. package/dist/lib/browser/chunk-KE3AKN5W.mjs.map +0 -7
  266. package/dist/lib/browser/compute-graph-registry-RC5L7RE4.mjs.map +0 -7
  267. package/dist/lib/browser/index.mjs +0 -145
  268. package/dist/lib/browser/index.mjs.map +0 -7
  269. package/dist/lib/browser/markdown-D2T2DOVX.mjs.map +0 -7
  270. package/dist/lib/browser/meta.json +0 -1
  271. package/dist/lib/browser/operation-resolver-P2RX75DA.mjs +0 -79
  272. package/dist/lib/browser/operation-resolver-P2RX75DA.mjs.map +0 -7
  273. package/dist/lib/browser/react-surface-45CRAB5G.mjs.map +0 -7
  274. package/dist/lib/node-esm/SheetContainer-7H5R7M54.mjs +0 -398
  275. package/dist/lib/node-esm/SheetContainer-7H5R7M54.mjs.map +0 -7
  276. package/dist/lib/node-esm/anchor-sort-VHMBRX2E.mjs +0 -25
  277. package/dist/lib/node-esm/anchor-sort-VHMBRX2E.mjs.map +0 -7
  278. package/dist/lib/node-esm/chunk-6J5L47IB.mjs +0 -398
  279. package/dist/lib/node-esm/chunk-6J5L47IB.mjs.map +0 -7
  280. package/dist/lib/node-esm/chunk-AYSEWH7N.mjs +0 -1474
  281. package/dist/lib/node-esm/chunk-AYSEWH7N.mjs.map +0 -7
  282. package/dist/lib/node-esm/chunk-PPOYR7DK.mjs +0 -236
  283. package/dist/lib/node-esm/chunk-PPOYR7DK.mjs.map +0 -7
  284. package/dist/lib/node-esm/compute-graph-registry-ZGXVLVGD.mjs +0 -22
  285. package/dist/lib/node-esm/compute-graph-registry-ZGXVLVGD.mjs.map +0 -7
  286. package/dist/lib/node-esm/index.mjs +0 -146
  287. package/dist/lib/node-esm/index.mjs.map +0 -7
  288. package/dist/lib/node-esm/markdown-PTV72DLO.mjs +0 -30
  289. package/dist/lib/node-esm/markdown-PTV72DLO.mjs.map +0 -7
  290. package/dist/lib/node-esm/meta.json +0 -1
  291. package/dist/lib/node-esm/operation-resolver-WPIWQ5IO.mjs +0 -80
  292. package/dist/lib/node-esm/operation-resolver-WPIWQ5IO.mjs.map +0 -7
  293. package/dist/lib/node-esm/react-surface-ITV2L6HK.mjs +0 -52
  294. package/dist/lib/node-esm/react-surface-ITV2L6HK.mjs.map +0 -7
  295. package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts +0 -6
  296. package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts.map +0 -1
  297. package/dist/types/src/capabilities/anchor-sort/index.d.ts +0 -3
  298. package/dist/types/src/capabilities/anchor-sort/index.d.ts.map +0 -1
  299. package/dist/types/src/capabilities/compute-graph-registry/compute-graph-registry.d.ts +0 -5
  300. package/dist/types/src/capabilities/compute-graph-registry/compute-graph-registry.d.ts.map +0 -1
  301. package/dist/types/src/capabilities/compute-graph-registry/index.d.ts +0 -3
  302. package/dist/types/src/capabilities/compute-graph-registry/index.d.ts.map +0 -1
  303. package/dist/types/src/capabilities/markdown/index.d.ts +0 -3
  304. package/dist/types/src/capabilities/markdown/index.d.ts.map +0 -1
  305. package/dist/types/src/capabilities/markdown/markdown.d.ts +0 -5
  306. package/dist/types/src/capabilities/markdown/markdown.d.ts.map +0 -1
  307. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
  308. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  309. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
  310. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  311. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  312. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  313. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
  314. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  315. package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts +0 -3
  316. package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts.map +0 -1
  317. package/dist/types/src/components/FunctionEditor/index.d.ts +0 -2
  318. package/dist/types/src/components/FunctionEditor/index.d.ts.map +0 -1
  319. package/dist/types/src/components/GridSheet/GridSheet.d.ts +0 -3
  320. package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +0 -1
  321. package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts +0 -55
  322. package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +0 -1
  323. package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts.map +0 -1
  324. package/dist/types/src/components/GridSheet/index.d.ts +0 -2
  325. package/dist/types/src/components/GridSheet/index.d.ts.map +0 -1
  326. package/dist/types/src/components/GridSheet/util.d.ts.map +0 -1
  327. package/dist/types/src/components/RangeList/RangeList.d.ts +0 -7
  328. package/dist/types/src/components/RangeList/RangeList.d.ts.map +0 -1
  329. package/dist/types/src/components/RangeList/index.d.ts +0 -2
  330. package/dist/types/src/components/RangeList/index.d.ts.map +0 -1
  331. package/dist/types/src/components/SheetContainer/SheetContainer.d.ts +0 -10
  332. package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +0 -1
  333. package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts +0 -57
  334. package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +0 -1
  335. package/dist/types/src/components/SheetContainer/index.d.ts +0 -3
  336. package/dist/types/src/components/SheetContainer/index.d.ts.map +0 -1
  337. package/dist/types/src/components/SheetContext/SheetContext.d.ts.map +0 -1
  338. package/dist/types/src/components/SheetContext/index.d.ts +0 -2
  339. package/dist/types/src/components/SheetContext/index.d.ts.map +0 -1
  340. package/dist/types/src/types/capabilities.d.ts +0 -6
  341. package/dist/types/src/types/capabilities.d.ts.map +0 -1
  342. package/src/capabilities/anchor-sort/index.ts +0 -7
  343. package/src/capabilities/compute-graph-registry/index.ts +0 -7
  344. package/src/capabilities/markdown/index.ts +0 -7
  345. package/src/capabilities/operation-resolver/index.ts +0 -7
  346. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -77
  347. package/src/capabilities/react-surface/index.ts +0 -7
  348. package/src/capabilities/react-surface/react-surface.tsx +0 -43
  349. package/src/components/SheetContainer/SheetContainer.tsx +0 -48
  350. package/src/components/SheetContainer/index.ts +0 -7
  351. package/src/components/SheetContext/index.ts +0 -5
  352. package/src/types/capabilities.ts +0 -14
  353. /package/dist/lib/{browser/types/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  354. /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
  355. /package/dist/types/src/components/{GridSheet → SheetContent}/SheetCellEditor.stories.d.ts +0 -0
@@ -18,8 +18,8 @@ import { type SyntaxNode } from '@lezer/common';
18
18
  import { tags } from '@lezer/highlight';
19
19
  import { spreadsheet } from 'codemirror-lang-spreadsheet';
20
20
 
21
- import { type FunctionDefinition } from '@dxos/compute';
22
- import { RANGE_NOTATION } from '@dxos/compute';
21
+ import { type FunctionDefinition } from '@dxos/compute-hyperformula';
22
+ import { RANGE_NOTATION } from '@dxos/compute-hyperformula';
23
23
  import { singleValueFacet } from '@dxos/ui-editor';
24
24
  import { mx } from '@dxos/ui-theme';
25
25
 
@@ -33,30 +33,30 @@ const highlightStyles = HighlightStyle.define([
33
33
  // Function.
34
34
  {
35
35
  tag: tags.name,
36
- class: 'text-accentText',
36
+ class: 'text-accent-text',
37
37
  },
38
38
  // Range.
39
39
  {
40
40
  tag: tags.tagName,
41
- class: 'text-pinkText',
41
+ class: 'text-pink-text',
42
42
  },
43
43
  // Values.
44
44
  {
45
45
  tag: tags.number,
46
- class: 'text-tealText',
46
+ class: 'text-teal-text',
47
47
  },
48
48
  {
49
49
  tag: tags.bool,
50
- class: 'text-tealText',
50
+ class: 'text-teal-text',
51
51
  },
52
52
  {
53
53
  tag: tags.string,
54
- class: 'text-tealText',
54
+ class: 'text-teal-text',
55
55
  },
56
56
  // Error.
57
57
  {
58
58
  tag: tags.invalid,
59
- class: 'text-unAccent',
59
+ class: 'text-un-accent',
60
60
  },
61
61
  ]);
62
62
 
@@ -97,7 +97,7 @@ export const sheetExtension = ({ debug, functions = [] }: SheetExtensionOptions)
97
97
 
98
98
  const title = document.createElement('h2');
99
99
  title.innerText = name;
100
- title.className = 'text-lg font-mono text-accentText';
100
+ title.className = 'text-lg font-mono text-accent-text';
101
101
  root.appendChild(title);
102
102
 
103
103
  if (description) {
@@ -110,7 +110,7 @@ export const sheetExtension = ({ debug, functions = [] }: SheetExtensionOptions)
110
110
  if (syntax) {
111
111
  const detail = document.createElement('pre');
112
112
  detail.innerText = syntax;
113
- detail.className = 'whitespace-pre-wrap text-greenText';
113
+ detail.className = 'whitespace-pre-wrap text-green-text';
114
114
  root.appendChild(detail);
115
115
  }
116
116
 
@@ -169,8 +169,8 @@ export const sheetExtension = ({ debug, functions = [] }: SheetExtensionOptions)
169
169
  icons: false,
170
170
  tooltipClass: () =>
171
171
  mx(
172
- '!-left-[1px] !top-[33px] !-m-0 border !border-bs-0 [&>ul]:!min-w-[198px]',
173
- '[&>ul>li[aria-selected]]:!bg-accentSurface',
172
+ '!-left-[1px] !top-[33px] !-m-0 border border-h-0! [&>ul]:!min-w-[198px]',
173
+ '[&>ul>li[aria-selected]]:!bg-accent-surface',
174
174
  'border-separator',
175
175
  ),
176
176
  }),
package/src/index.ts CHANGED
@@ -2,6 +2,6 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- export { SheetCapabilities } from './types';
6
5
  export * from './meta';
7
- export * from './SheetPlugin';
6
+ export * from './operations';
7
+ export * from './types';
@@ -2,23 +2,19 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import * as Effect from 'effect/Effect';
6
5
  import { useCallback, useEffect, useMemo } from 'react';
7
6
 
8
- import { useOperationInvoker, useOperationResolver } from '@dxos/app-framework/ui';
7
+ import { useOperationInvoker } from '@dxos/app-framework/ui';
9
8
  import { LayoutOperation } from '@dxos/app-toolkit';
10
9
  import { debounce } from '@dxos/async';
11
- import { type CellAddress, type CompleteCellRange, inRange } from '@dxos/compute';
10
+ import { type CellAddress, type CompleteCellRange, inRange } from '@dxos/compute-hyperformula';
12
11
  import { Obj, Relation } from '@dxos/echo';
13
- import { OperationResolver } from '@dxos/operation';
14
- import { ATTENDABLE_PATH_SEPARATOR, DeckOperation } from '@dxos/plugin-deck/types';
15
- import { ThreadOperation } from '@dxos/plugin-thread/types';
12
+ import { ThreadOperation } from '@dxos/plugin-thread';
16
13
  import { Filter, Query, useQuery } from '@dxos/react-client/echo';
17
- import { type DxGridElement, type GridContentProps } from '@dxos/react-ui-grid';
14
+ import { linkedSegment } from '@dxos/react-ui-attention';
18
15
  import { AnchoredTo, Thread } from '@dxos/types';
19
16
 
20
- import { useSheetContext } from '../components';
21
- import { meta } from '../meta';
17
+ import { useSheetContext } from '#components';
22
18
 
23
19
  export const completeCellRangeToThreadCursor = (range: CompleteCellRange): string => {
24
20
  return `${range.from.col},${range.from.row},${range.to.col},${range.to.row}`;
@@ -37,33 +33,6 @@ export const parseThreadAnchorAsCellRange = (cursor: string): CompleteCellRange
37
33
  }
38
34
  };
39
35
 
40
- export const useUpdateFocusedCellOnThreadSelection = (grid: DxGridElement | null) => {
41
- const { model, setActiveRefs } = useSheetContext();
42
- const sheetId = Obj.getDXN(model.sheet).toString();
43
-
44
- const scrollIntoViewHandler = useMemo(
45
- () =>
46
- OperationResolver.make({
47
- operation: LayoutOperation.ScrollIntoView,
48
- position: 'hoist',
49
- filter: (input) => input.subject === sheetId && !!input.cursor,
50
- handler: (input) =>
51
- Effect.sync(() => {
52
- const { cursor, ref } = input;
53
- if (cursor) {
54
- setActiveRefs(ref as GridContentProps['activeRefs']);
55
- // TODO(Zan): Everywhere we refer to the cursor in a thread context should change to `anchor`.
56
- const range = parseThreadAnchorAsCellRange(cursor);
57
- range && grid?.setFocus({ ...range.to, plane: 'grid' }, true);
58
- }
59
- }),
60
- }),
61
- [sheetId, setActiveRefs, grid],
62
- );
63
-
64
- useOperationResolver(meta.id, scrollIntoViewHandler);
65
- };
66
-
67
36
  export const useSelectThreadOnCellFocus = () => {
68
37
  const { model, cursor } = useSheetContext();
69
38
  const { invokePromise } = useOperationInvoker();
@@ -88,12 +57,10 @@ export const useSelectThreadOnCellFocus = () => {
88
57
  });
89
58
 
90
59
  if (closestThread) {
91
- const primary = Obj.getDXN(model.sheet).toString();
92
60
  void (async () => {
93
61
  await invokePromise(ThreadOperation.Select, { current: Relation.getDXN(closestThread).toString() });
94
- await invokePromise(DeckOperation.ChangeCompanion, {
95
- primary,
96
- companion: `${primary}${ATTENDABLE_PATH_SEPARATOR}comments`,
62
+ await invokePromise(LayoutOperation.UpdateCompanion, {
63
+ subject: linkedSegment('comments'),
97
64
  });
98
65
  })();
99
66
  }
package/src/meta.ts CHANGED
@@ -6,7 +6,7 @@ import { type Plugin } from '@dxos/app-framework';
6
6
  import { trim } from '@dxos/util';
7
7
 
8
8
  export const meta: Plugin.Meta = {
9
- id: 'dxos.org/plugin/sheet',
9
+ id: 'org.dxos.plugin.sheet',
10
10
  name: 'Sheet',
11
11
  description: trim`
12
12
  Full-featured spreadsheet application with over 400 built-in formulas for calculations and data analysis.
@@ -5,12 +5,12 @@
5
5
  import { afterEach, beforeEach, describe, expect, onTestFinished, test } from 'vitest';
6
6
 
7
7
  import { Trigger } from '@dxos/async';
8
- import { type CellScalarValue, addressFromA1Notation, isFormula } from '@dxos/compute';
9
- import { TestBuilder, testFunctionPlugins } from '@dxos/compute/testing';
10
- import { Function } from '@dxos/functions';
8
+ import { Operation } from '@dxos/compute';
9
+ import { type CellScalarValue, addressFromA1Notation, isFormula } from '@dxos/compute-hyperformula';
10
+ import { TestBuilder, testFunctionPlugins } from '@dxos/compute-hyperformula/testing';
11
11
  import { log } from '@dxos/log';
12
12
 
13
- import { Sheet, mapFormulaIndicesToRefs, mapFormulaRefsToIndices } from '../types';
13
+ import { Sheet, mapFormulaIndicesToRefs, mapFormulaRefsToIndices } from '#types';
14
14
 
15
15
  import { SheetModel } from './sheet-model';
16
16
  import { createTestGrid } from './testing';
@@ -18,7 +18,7 @@ import { createTestGrid } from './testing';
18
18
  describe('SheetModel', () => {
19
19
  let testBuilder: TestBuilder;
20
20
  beforeEach(async () => {
21
- testBuilder = new TestBuilder({ types: [Function.Function], plugins: testFunctionPlugins });
21
+ testBuilder = new TestBuilder({ types: [Operation.PersistentOperation], plugins: testFunctionPlugins });
22
22
  await testBuilder.open();
23
23
  });
24
24
  afterEach(async () => {
@@ -20,7 +20,7 @@ import {
20
20
  addressToA1Notation,
21
21
  createSheetName,
22
22
  isFormula,
23
- } from '@dxos/compute';
23
+ } from '@dxos/compute-hyperformula';
24
24
  import { Resource } from '@dxos/context';
25
25
  import { Obj } from '@dxos/echo';
26
26
  import { Format, TypeEnum } from '@dxos/echo/internal';
@@ -38,8 +38,8 @@ import {
38
38
  insertIndices,
39
39
  mapFormulaIndicesToRefs,
40
40
  mapFormulaRefsToIndices,
41
- } from '../types';
42
- import { type Sheet, type SheetAction } from '../types';
41
+ } from '#types';
42
+ import { type Sheet, type SheetAction } from '#types';
43
43
 
44
44
  // TODO(burdon): Move to compute.
45
45
  // Map sheet types to system types.
@@ -122,7 +122,7 @@ export class SheetModel extends Resource {
122
122
  */
123
123
  protected override async _open(): Promise<void> {
124
124
  log('initialize', { id: this.id });
125
- Obj.change(this._sheet, (obj) => {
125
+ Obj.update(this._sheet, (obj) => {
126
126
  initialize(obj);
127
127
  });
128
128
 
@@ -184,7 +184,7 @@ export class SheetModel extends Resource {
184
184
 
185
185
  insertRows(i: number, n = 1): string[] {
186
186
  let idx: string[] = [];
187
- Obj.change(this._sheet, (obj) => {
187
+ Obj.update(this._sheet, (obj) => {
188
188
  idx = insertIndices(obj.rows, i, n, MAX_ROWS);
189
189
  });
190
190
  this.reset();
@@ -193,7 +193,7 @@ export class SheetModel extends Resource {
193
193
 
194
194
  insertColumns(i: number, n = 1): string[] {
195
195
  let idx: string[] = [];
196
- Obj.change(this._sheet, (obj) => {
196
+ Obj.update(this._sheet, (obj) => {
197
197
  idx = insertIndices(obj.columns, i, n, MAX_COLS);
198
198
  });
199
199
  this.reset();
@@ -208,7 +208,7 @@ export class SheetModel extends Resource {
208
208
  const values = this.getCellValues(range).flat();
209
209
  const index = this._sheet.rows.indexOf(rowIndex);
210
210
  this.clear(range);
211
- Obj.change(this._sheet, (obj) => {
211
+ Obj.update(this._sheet, (obj) => {
212
212
  obj.rows.splice(index, 1);
213
213
  delete obj.rowMeta[rowIndex];
214
214
  });
@@ -224,7 +224,7 @@ export class SheetModel extends Resource {
224
224
  const values = this.getCellValues(range).flat();
225
225
  const index = this._sheet.columns.indexOf(colIndex);
226
226
  this.clear(range);
227
- Obj.change(this._sheet, (obj) => {
227
+ Obj.update(this._sheet, (obj) => {
228
228
  obj.columns.splice(index, 1);
229
229
  delete obj.columnMeta[colIndex];
230
230
  });
@@ -233,7 +233,7 @@ export class SheetModel extends Resource {
233
233
  }
234
234
 
235
235
  restoreRow({ index, axisIndex, axisMeta, values }: SheetAction.RestoreAxis): void {
236
- Obj.change(this._sheet, (obj) => {
236
+ Obj.update(this._sheet, (obj) => {
237
237
  obj.rows.splice(index, 0, axisIndex);
238
238
  values.forEach((value, col) => {
239
239
  if (value) {
@@ -249,7 +249,7 @@ export class SheetModel extends Resource {
249
249
  }
250
250
 
251
251
  restoreColumn({ index, axisIndex, axisMeta, values }: SheetAction.RestoreAxis): void {
252
- Obj.change(this._sheet, (obj) => {
252
+ Obj.update(this._sheet, (obj) => {
253
253
  obj.columns.splice(index, 0, axisIndex);
254
254
  values.forEach((value, row) => {
255
255
  if (value) {
@@ -277,7 +277,7 @@ export class SheetModel extends Resource {
277
277
  const topLeft = getTopLeft(range);
278
278
  const values = this._iterRange(range, () => null);
279
279
  this._node.graph.hf.setCellContents(toSimpleCellAddress(this._node.sheetId, topLeft), values);
280
- Obj.change(this._sheet, (obj) => {
280
+ Obj.update(this._sheet, (obj) => {
281
281
  this._iterRange(range, (cell) => {
282
282
  const idx = addressToIndex(this._sheet, cell);
283
283
  delete obj.cells[idx];
@@ -288,7 +288,7 @@ export class SheetModel extends Resource {
288
288
  cut(range: CellRange): void {
289
289
  invariant(this._node);
290
290
  this._node.graph.hf.cut(toModelRange(this._node.sheetId, range));
291
- Obj.change(this._sheet, (obj) => {
291
+ Obj.update(this._sheet, (obj) => {
292
292
  this._iterRange(range, (cell) => {
293
293
  const idx = addressToIndex(this._sheet, cell);
294
294
  delete obj.cells[idx];
@@ -305,7 +305,7 @@ export class SheetModel extends Resource {
305
305
  invariant(this._node);
306
306
  if (!this._node.graph.hf.isClipboardEmpty()) {
307
307
  const changes = this._node.graph.hf.paste(toSimpleCellAddress(this._node.sheetId, cell));
308
- Obj.change(this._sheet, (obj) => {
308
+ Obj.update(this._sheet, (obj) => {
309
309
  for (const change of changes) {
310
310
  if (change instanceof ExportedCellChange) {
311
311
  const { address, newValue } = change;
@@ -404,13 +404,13 @@ export class SheetModel extends Resource {
404
404
  // Reallocate if > current bounds.
405
405
  let refresh = false;
406
406
  if (cell.row >= this._sheet.rows.length) {
407
- Obj.change(this._sheet, (obj) => {
407
+ Obj.update(this._sheet, (obj) => {
408
408
  insertIndices(obj.rows, cell.row, 1, MAX_ROWS);
409
409
  });
410
410
  refresh = true;
411
411
  }
412
412
  if (cell.col >= this._sheet.columns.length) {
413
- Obj.change(this._sheet, (obj) => {
413
+ Obj.update(this._sheet, (obj) => {
414
414
  insertIndices(obj.columns, cell.col, 1, MAX_COLS);
415
415
  });
416
416
  refresh = true;
@@ -429,7 +429,7 @@ export class SheetModel extends Resource {
429
429
  // Insert into sheet.
430
430
  const idx = addressToIndex(this._sheet, cell);
431
431
  if (value === undefined || value === null) {
432
- Obj.change(this._sheet, (obj) => {
432
+ Obj.update(this._sheet, (obj) => {
433
433
  delete obj.cells[idx];
434
434
  });
435
435
  } else {
@@ -437,7 +437,7 @@ export class SheetModel extends Resource {
437
437
  value = this._graph.mapFunctionBindingToId(mapFormulaRefsToIndices(this._sheet, value));
438
438
  }
439
439
 
440
- Obj.change(this._sheet, (obj) => {
440
+ Obj.update(this._sheet, (obj) => {
441
441
  obj.cells[idx] = { value };
442
442
  });
443
443
  }
@@ -2,9 +2,9 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { addressToA1Notation } from '@dxos/compute';
5
+ import { addressToA1Notation } from '@dxos/compute-hyperformula';
6
6
 
7
- import { Sheet } from '../types';
7
+ import { Sheet } from '#types';
8
8
 
9
9
  // TODO(burdon): Create testing endpoint.
10
10
  // TODO(burdon): Move to react-ui-sheet.
@@ -4,10 +4,11 @@
4
4
 
5
5
  import { useEffect, useState } from 'react';
6
6
 
7
- import { type ComputeGraph } from '@dxos/compute';
7
+ import { type ComputeGraph } from '@dxos/compute-hyperformula';
8
+
9
+ import { type Sheet } from '#types';
8
10
 
9
11
  import { SheetModel } from '../model';
10
- import { type Sheet } from '../types';
11
12
 
12
13
  export type UseSheetModelOptions = {
13
14
  readonly?: boolean;
@@ -0,0 +1,26 @@
1
+ //
2
+
3
+ import * as Effect from 'effect/Effect';
4
+ // Copyright 2025 DXOS.org
5
+ //
6
+
7
+ import { Operation } from '@dxos/compute';
8
+
9
+ import { SheetOperation } from '../types';
10
+
11
+ const handler: Operation.WithHandler<typeof SheetOperation.DropAxis> = SheetOperation.DropAxis.pipe(
12
+ Operation.withHandler(({ model, axis, axisIndex }) =>
13
+ Effect.sync(() => {
14
+ const undoData = model[axis === 'col' ? 'dropColumn' : 'dropRow'](axisIndex);
15
+ return {
16
+ axis: undoData.axis,
17
+ axisIndex: undoData.axisIndex,
18
+ index: undoData.index,
19
+ axisMeta: undoData.axisMeta,
20
+ values: undoData.values,
21
+ };
22
+ }),
23
+ ),
24
+ );
25
+
26
+ export default handler;
@@ -0,0 +1,12 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { OperationHandlerSet } from '@dxos/compute';
6
+
7
+ export const SheetOperationHandlerSet = OperationHandlerSet.lazy(
8
+ () => import('./drop-axis'),
9
+ () => import('./insert-axis'),
10
+ () => import('./restore-axis'),
11
+ () => import('./scroll-to-anchor'),
12
+ );
@@ -0,0 +1,19 @@
1
+ //
2
+
3
+ import * as Effect from 'effect/Effect';
4
+ // Copyright 2025 DXOS.org
5
+ //
6
+
7
+ import { Operation } from '@dxos/compute';
8
+
9
+ import { SheetOperation } from '../types';
10
+
11
+ const handler: Operation.WithHandler<typeof SheetOperation.InsertAxis> = SheetOperation.InsertAxis.pipe(
12
+ Operation.withHandler(({ model, axis, index, count }) =>
13
+ Effect.sync(() => {
14
+ model[axis === 'col' ? 'insertColumns' : 'insertRows'](index, count);
15
+ }),
16
+ ),
17
+ );
18
+
19
+ export default handler;
@@ -0,0 +1,19 @@
1
+ //
2
+
3
+ import * as Effect from 'effect/Effect';
4
+ // Copyright 2025 DXOS.org
5
+ //
6
+
7
+ import { Operation } from '@dxos/compute';
8
+
9
+ import { SheetOperation } from '../types';
10
+
11
+ const handler: Operation.WithHandler<typeof SheetOperation.RestoreAxis> = SheetOperation.RestoreAxis.pipe(
12
+ Operation.withHandler(({ model, axis, ...restoreData }) =>
13
+ Effect.sync(() => {
14
+ model[axis === 'col' ? 'restoreColumn' : 'restoreRow'](restoreData);
15
+ }),
16
+ ),
17
+ );
18
+
19
+ export default handler;
@@ -0,0 +1,30 @@
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 { Operation } from '@dxos/compute';
9
+
10
+ import { parseThreadAnchorAsCellRange } from '../integrations/thread-ranges';
11
+ import { SheetCapabilities, SheetOperation } from '../types';
12
+
13
+ const handler: Operation.WithHandler<typeof SheetOperation.ScrollToAnchor> = SheetOperation.ScrollToAnchor.pipe(
14
+ Operation.withHandler(
15
+ Effect.fnUntraced(function* ({ subject, cursor, ref }) {
16
+ const gridInstances = yield* Capability.get(SheetCapabilities.GridInstances);
17
+ const entry = gridInstances.get(subject);
18
+ if (!entry) {
19
+ return;
20
+ }
21
+ entry.setActiveRefs(ref);
22
+ const range = parseThreadAnchorAsCellRange(cursor);
23
+ if (range) {
24
+ entry.grid.setFocus({ ...range.to, plane: 'grid' }, true);
25
+ }
26
+ }),
27
+ ),
28
+ );
29
+
30
+ export default handler;
@@ -10,7 +10,7 @@ export default defineConfig({
10
10
  ...e2ePreset(import.meta.dirname),
11
11
  // TODO(wittjosiah): Avoid hard-coding ports.
12
12
  webServer: {
13
- command: 'moon run storybook-react:serve-e2e -- --port=9005',
13
+ command: 'pnpm storybook dev --ci --quiet --port=9005 --config-dir=.storybook',
14
14
  port: 9005,
15
15
  reuseExistingServer: false,
16
16
  },
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { type Page, expect, test } from '@playwright/test';
6
6
 
7
- import { faker } from '@dxos/random';
7
+ import { random } from '@dxos/random';
8
8
  import { setupPage, storybookUrl } from '@dxos/test-utils/playwright';
9
9
 
10
10
  import { SheetManager } from './sheet-manager';
@@ -15,7 +15,7 @@ test.describe('plugin-sheet', () => {
15
15
 
16
16
  test.beforeEach(async ({ browser }) => {
17
17
  const setup = await setupPage(browser, {
18
- url: storybookUrl('plugins-plugin-sheet-sheetcontainer--spec', 9005),
18
+ url: storybookUrl('plugins-plugin-sheet-containers-sheetcontainer--spec', 9005),
19
19
  viewportSize: { width: 1280, height: 720 },
20
20
  });
21
21
  page = setup.page;
@@ -39,7 +39,7 @@ test.describe('plugin-sheet', () => {
39
39
  // Confirm editor displays
40
40
  await expect(sheet.cellEditor()).toBeVisible();
41
41
  // Type in a value and press enter
42
- const testString = faker.string.uuid();
42
+ const testString = random.string.uuid();
43
43
  await sheet.setFocusedCellValue(testString, 'Enter');
44
44
  // Expect that value to now show in the grid
45
45
  await expect(sheet.cellByText(testString)).toBeVisible();
package/src/plugin.ts ADDED
@@ -0,0 +1,11 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import { Plugin } from '@dxos/app-framework';
6
+
7
+ import { meta } from './meta';
8
+
9
+ export const SheetPlugin = Plugin.lazy(meta, () => import('#plugin'));
10
+
11
+ export { SheetOperationHandlerSet } from './operations';
@@ -5,7 +5,8 @@
5
5
  import { describe, expect, test } from 'vitest';
6
6
 
7
7
  import { Client } from '@dxos/client';
8
- import { Function } from '@dxos/functions';
8
+ import { Operation } from '@dxos/compute';
9
+ import { Obj } from '@dxos/echo';
9
10
 
10
11
  // Part 2.
11
12
  // TODO(burdon): Cannot test outside of browser.
@@ -22,7 +23,7 @@ import { Function } from '@dxos/functions';
22
23
  describe('test', () => {
23
24
  test('test', async () => {
24
25
  const client = new Client();
25
- await client.addTypes([Function.Function]);
26
+ await client.addTypes([Operation.PersistentOperation]);
26
27
  await client.initialize();
27
28
  await client.halo.createIdentity();
28
29
 
@@ -33,7 +34,9 @@ describe('test', () => {
33
34
  // - ERROR "process.nextTick is not a function"
34
35
  // - ERROR "Identifier 'Buffer' has already been declared" if { nodeExternal: true }
35
36
  const space = await client.spaces.create();
36
- const fn = space.db.add(Function.make({ name: 'test', version: '0.0.1', binding: 'HELLO' }));
37
+ const fn = space.db.add(
38
+ Obj.make(Operation.PersistentOperation, { name: 'test', version: '0.0.1', binding: 'HELLO' }),
39
+ );
37
40
  expect(fn).to.exist;
38
41
  });
39
42
  });
package/src/serializer.ts CHANGED
@@ -4,9 +4,9 @@
4
4
 
5
5
  import { Obj } from '@dxos/echo';
6
6
  import { getObjectCore } from '@dxos/echo-db';
7
- import { type TypedObjectSerializer } from '@dxos/plugin-space/types';
7
+ import { type TypedObjectSerializer } from '@dxos/plugin-space';
8
8
 
9
- import { Sheet } from './types';
9
+ import { Sheet } from '#types';
10
10
 
11
11
  export const serializer: TypedObjectSerializer<Sheet.Sheet> = {
12
12
  serialize: async ({ object }): Promise<string> => {
@@ -2,7 +2,7 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import type { Sheet } from '../types';
5
+ import type { Sheet } from '#types';
6
6
 
7
7
  export const createTestCells = (testSheetName = 'test'): Record<string, Sheet.CellValue> => ({
8
8
  B1: { value: 'Qty2' },
@@ -5,13 +5,13 @@
5
5
  import { type Decorator } from '@storybook/react';
6
6
  import React, { useState } from 'react';
7
7
 
8
- import { type ComputeGraph, type ComputeGraphOptions, ComputeGraphRegistry } from '@dxos/compute';
9
- import { createMockedComputeRuntimeProvider } from '@dxos/compute/testing';
8
+ import { type ComputeGraph, type ComputeGraphOptions, ComputeGraphRegistry } from '@dxos/compute-hyperformula';
9
+ import { createMockedComputeRuntimeProvider } from '@dxos/compute-hyperformula/testing';
10
10
  import { type Space } from '@dxos/react-client/echo';
11
11
  import { useAsyncState } from '@dxos/react-hooks';
12
12
 
13
- import { ComputeGraphContextProvider } from '../components';
14
- import { Sheet } from '../types';
13
+ import { ComputeGraphContextProvider } from '#components';
14
+ import { Sheet } from '#types';
15
15
 
16
16
  export const useTestSheet = (space?: Space, graph?: ComputeGraph, options?: Sheet.SheetProps) => {
17
17
  const [sheet] = useAsyncState(async () => {