@dxos/plugin-sheet 0.8.4-main.7ace549 → 0.8.4-main.8baae0fced

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/LICENSE +102 -5
  2. package/dist/lib/neutral/RangeList-HYB5S6KQ.mjs +46 -0
  3. package/dist/lib/neutral/RangeList-HYB5S6KQ.mjs.map +7 -0
  4. package/dist/lib/neutral/SheetArticle-5AJRM3V3.mjs +33 -0
  5. package/dist/lib/neutral/SheetArticle-5AJRM3V3.mjs.map +7 -0
  6. package/dist/lib/neutral/SheetPlugin.mjs +47 -0
  7. package/dist/lib/neutral/SheetPlugin.mjs.map +7 -0
  8. package/dist/lib/neutral/SheetPlugin.node.mjs +27 -0
  9. package/dist/lib/neutral/SheetPlugin.node.mjs.map +7 -0
  10. package/dist/lib/neutral/SheetPlugin.workerd.mjs +21 -0
  11. package/dist/lib/neutral/SheetPlugin.workerd.mjs.map +7 -0
  12. package/dist/lib/neutral/anchor-sort-TTCKGX7V.mjs +22 -0
  13. package/dist/lib/neutral/anchor-sort-TTCKGX7V.mjs.map +7 -0
  14. package/dist/lib/neutral/capabilities/index.mjs +25 -0
  15. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  16. package/dist/lib/{browser/chunk-7VEWYJJN.mjs → neutral/chunk-4SBAIU6F.mjs} +15 -15
  17. package/dist/lib/neutral/chunk-4SBAIU6F.mjs.map +7 -0
  18. package/dist/lib/neutral/chunk-CGWDLWFZ.mjs +8 -0
  19. package/dist/lib/neutral/chunk-CGWDLWFZ.mjs.map +7 -0
  20. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  21. package/dist/lib/neutral/chunk-KC2SMDNF.mjs +373 -0
  22. package/dist/lib/neutral/chunk-KC2SMDNF.mjs.map +7 -0
  23. package/dist/lib/{browser/chunk-FWFAAGXL.mjs → neutral/chunk-UVFW5VID.mjs} +3 -9
  24. package/dist/lib/neutral/chunk-UVFW5VID.mjs.map +7 -0
  25. package/dist/lib/neutral/chunk-YFY6U524.mjs +83 -0
  26. package/dist/lib/neutral/chunk-YFY6U524.mjs.map +7 -0
  27. package/dist/lib/neutral/comment-config-ZBWNCJMZ.mjs +20 -0
  28. package/dist/lib/neutral/comment-config-ZBWNCJMZ.mjs.map +7 -0
  29. package/dist/lib/neutral/components/index.mjs +1551 -0
  30. package/dist/lib/neutral/components/index.mjs.map +7 -0
  31. package/dist/lib/neutral/compute-graph-registry-YYINTFC2.mjs +26 -0
  32. package/dist/lib/neutral/compute-graph-registry-YYINTFC2.mjs.map +7 -0
  33. package/dist/lib/neutral/containers/index.mjs +11 -0
  34. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  35. package/dist/lib/neutral/create-object-OKQAXJCW.mjs +27 -0
  36. package/dist/lib/neutral/create-object-OKQAXJCW.mjs.map +7 -0
  37. package/dist/lib/neutral/drop-axis-G6UOXG54.mjs +23 -0
  38. package/dist/lib/neutral/drop-axis-G6UOXG54.mjs.map +7 -0
  39. package/dist/lib/{node-esm/types → neutral}/index.mjs +14 -3
  40. package/dist/lib/neutral/insert-axis-ZFFNG22G.mjs +16 -0
  41. package/dist/lib/neutral/insert-axis-ZFFNG22G.mjs.map +7 -0
  42. package/dist/lib/neutral/markdown-I2AKJYPF.mjs +28 -0
  43. package/dist/lib/neutral/markdown-I2AKJYPF.mjs.map +7 -0
  44. package/dist/lib/neutral/meta.json +1 -0
  45. package/dist/lib/neutral/meta.mjs +8 -0
  46. package/dist/lib/neutral/meta.mjs.map +7 -0
  47. package/dist/lib/neutral/operation-handler-TB6LFV2H.mjs +13 -0
  48. package/dist/lib/neutral/operation-handler-TB6LFV2H.mjs.map +7 -0
  49. package/dist/lib/neutral/operations/index.mjs +8 -0
  50. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  51. package/dist/lib/neutral/plugin.mjs +16 -0
  52. package/dist/lib/neutral/plugin.mjs.map +7 -0
  53. package/dist/lib/neutral/react-surface-VSTQNVPT.mjs +44 -0
  54. package/dist/lib/neutral/react-surface-VSTQNVPT.mjs.map +7 -0
  55. package/dist/lib/neutral/restore-axis-44DM6N54.mjs +16 -0
  56. package/dist/lib/neutral/restore-axis-44DM6N54.mjs.map +7 -0
  57. package/dist/lib/neutral/scroll-to-anchor-QPOGMAQG.mjs +33 -0
  58. package/dist/lib/neutral/scroll-to-anchor-QPOGMAQG.mjs.map +7 -0
  59. package/dist/lib/neutral/state-HPA27MX2.mjs +29 -0
  60. package/dist/lib/neutral/state-HPA27MX2.mjs.map +7 -0
  61. package/dist/lib/neutral/testing/index.mjs +103 -0
  62. package/dist/lib/neutral/testing/index.mjs.map +7 -0
  63. package/dist/lib/neutral/translations.mjs +55 -0
  64. package/dist/lib/neutral/translations.mjs.map +7 -0
  65. package/dist/lib/{browser → neutral}/types/index.mjs +6 -2
  66. package/dist/lib/neutral/types/index.mjs.map +7 -0
  67. package/dist/lib/neutral/undo-mappings-3FQLSTCZ.mjs +31 -0
  68. package/dist/lib/neutral/undo-mappings-3FQLSTCZ.mjs.map +7 -0
  69. package/dist/types/src/SheetPlugin.d.ts +3 -1
  70. package/dist/types/src/SheetPlugin.d.ts.map +1 -1
  71. package/dist/types/src/SheetPlugin.node.d.ts +4 -0
  72. package/dist/types/src/SheetPlugin.node.d.ts.map +1 -0
  73. package/dist/types/src/SheetPlugin.test.d.ts +2 -0
  74. package/dist/types/src/SheetPlugin.test.d.ts.map +1 -0
  75. package/dist/types/src/SheetPlugin.workerd.d.ts +4 -0
  76. package/dist/types/src/SheetPlugin.workerd.d.ts.map +1 -0
  77. package/dist/types/src/capabilities/anchor-sort.d.ts +4 -2
  78. package/dist/types/src/capabilities/anchor-sort.d.ts.map +1 -1
  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 +9 -2
  82. package/dist/types/src/capabilities/compute-graph-registry.d.ts.map +1 -1
  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 -6
  86. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  87. package/dist/types/src/capabilities/markdown.d.ts +3 -2
  88. package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
  89. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  90. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  92. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  93. package/dist/types/src/capabilities/state.d.ts +6 -0
  94. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  95. package/dist/types/src/capabilities/undo-mappings.d.ts +5 -0
  96. package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -0
  97. package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts +1 -1
  98. package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts.map +1 -1
  99. package/dist/types/src/components/ComputeGraph/compute-graph.stories.d.ts.map +1 -1
  100. package/dist/types/src/components/Sheet/Sheet.d.ts +17 -0
  101. package/dist/types/src/components/Sheet/Sheet.d.ts.map +1 -0
  102. package/dist/types/src/components/Sheet/index.d.ts +2 -0
  103. package/dist/types/src/components/Sheet/index.d.ts.map +1 -0
  104. package/dist/types/src/components/{GridSheet → SheetContent}/SheetCellEditor.stories.d.ts +1 -1
  105. package/dist/types/src/components/SheetContent/SheetCellEditor.stories.d.ts.map +1 -0
  106. package/dist/types/src/components/SheetContent/SheetContent.d.ts +6 -0
  107. package/dist/types/src/components/SheetContent/SheetContent.d.ts.map +1 -0
  108. package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts +93 -0
  109. package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts.map +1 -0
  110. package/dist/types/src/components/SheetContent/index.d.ts +2 -0
  111. package/dist/types/src/components/SheetContent/index.d.ts.map +1 -0
  112. package/dist/types/src/components/{GridSheet → SheetContent}/util.d.ts +1 -1
  113. package/dist/types/src/components/SheetContent/util.d.ts.map +1 -0
  114. package/dist/types/src/components/{SheetContext/SheetContext.d.ts → SheetRoot/SheetRoot.d.ts} +8 -6
  115. package/dist/types/src/components/SheetRoot/SheetRoot.d.ts.map +1 -0
  116. package/dist/types/src/components/SheetRoot/index.d.ts +2 -0
  117. package/dist/types/src/components/SheetRoot/index.d.ts.map +1 -0
  118. package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts +6 -0
  119. package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts.map +1 -0
  120. package/dist/types/src/components/SheetStatusbar/index.d.ts +2 -0
  121. package/dist/types/src/components/SheetStatusbar/index.d.ts.map +1 -0
  122. package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts +5 -5
  123. package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts.map +1 -1
  124. package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts +72 -68
  125. package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts.map +1 -1
  126. package/dist/types/src/components/SheetToolbar/align.d.ts +14 -21
  127. package/dist/types/src/components/SheetToolbar/align.d.ts.map +1 -1
  128. package/dist/types/src/components/SheetToolbar/style.d.ts +14 -20
  129. package/dist/types/src/components/SheetToolbar/style.d.ts.map +1 -1
  130. package/dist/types/src/components/SheetToolbar/useToolbarState.d.ts +14 -1
  131. package/dist/types/src/components/SheetToolbar/useToolbarState.d.ts.map +1 -1
  132. package/dist/types/src/components/index.d.ts +1 -4
  133. package/dist/types/src/components/index.d.ts.map +1 -1
  134. package/dist/types/src/containers/RangeList/RangeList.d.ts +7 -0
  135. package/dist/types/src/containers/RangeList/RangeList.d.ts.map +1 -0
  136. package/dist/types/src/containers/RangeList/index.d.ts +2 -0
  137. package/dist/types/src/containers/RangeList/index.d.ts.map +1 -0
  138. package/dist/types/src/containers/SheetArticle/SheetArticle.d.ts +12 -0
  139. package/dist/types/src/containers/SheetArticle/SheetArticle.d.ts.map +1 -0
  140. package/dist/types/src/containers/SheetArticle/SheetArticle.stories.d.ts +92 -0
  141. package/dist/types/src/containers/SheetArticle/SheetArticle.stories.d.ts.map +1 -0
  142. package/dist/types/src/containers/SheetArticle/index.d.ts +2 -0
  143. package/dist/types/src/containers/SheetArticle/index.d.ts.map +1 -0
  144. package/dist/types/src/containers/index.d.ts +4 -0
  145. package/dist/types/src/containers/index.d.ts.map +1 -0
  146. package/dist/types/src/extensions/compute.d.ts +1 -1
  147. package/dist/types/src/extensions/compute.d.ts.map +1 -1
  148. package/dist/types/src/extensions/compute.stories.d.ts.map +1 -1
  149. package/dist/types/src/extensions/editor/sheet-extension.d.ts +1 -1
  150. package/dist/types/src/extensions/editor/sheet-extension.d.ts.map +1 -1
  151. package/dist/types/src/index.d.ts +2 -2
  152. package/dist/types/src/index.d.ts.map +1 -1
  153. package/dist/types/src/integrations/thread-ranges.d.ts +1 -3
  154. package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
  155. package/dist/types/src/meta.d.ts +2 -2
  156. package/dist/types/src/meta.d.ts.map +1 -1
  157. package/dist/types/src/model/sheet-model.d.ts +2 -2
  158. package/dist/types/src/model/sheet-model.d.ts.map +1 -1
  159. package/dist/types/src/model/testing.d.ts +1 -1
  160. package/dist/types/src/model/testing.d.ts.map +1 -1
  161. package/dist/types/src/model/useSheetModel.d.ts +2 -2
  162. package/dist/types/src/model/useSheetModel.d.ts.map +1 -1
  163. package/dist/types/src/operations/drop-axis.d.ts +5 -0
  164. package/dist/types/src/operations/drop-axis.d.ts.map +1 -0
  165. package/dist/types/src/operations/index.d.ts +3 -0
  166. package/dist/types/src/operations/index.d.ts.map +1 -0
  167. package/dist/types/src/operations/insert-axis.d.ts +5 -0
  168. package/dist/types/src/operations/insert-axis.d.ts.map +1 -0
  169. package/dist/types/src/operations/restore-axis.d.ts +5 -0
  170. package/dist/types/src/operations/restore-axis.d.ts.map +1 -0
  171. package/dist/types/src/operations/scroll-to-anchor.d.ts +5 -0
  172. package/dist/types/src/operations/scroll-to-anchor.d.ts.map +1 -0
  173. package/dist/types/src/playwright/playwright.config.d.ts.map +1 -1
  174. package/dist/types/src/playwright/sheet-manager.d.ts.map +1 -1
  175. package/dist/types/src/plugin.d.ts +4 -0
  176. package/dist/types/src/plugin.d.ts.map +1 -0
  177. package/dist/types/src/serializer.d.ts +2 -2
  178. package/dist/types/src/serializer.d.ts.map +1 -1
  179. package/dist/types/src/testing/data.d.ts +1 -1
  180. package/dist/types/src/testing/data.d.ts.map +1 -1
  181. package/dist/types/src/testing/testing.d.ts +17 -17
  182. package/dist/types/src/testing/testing.d.ts.map +1 -1
  183. package/dist/types/src/translations.d.ts +74 -39
  184. package/dist/types/src/translations.d.ts.map +1 -1
  185. package/dist/types/src/types/Sheet.d.ts +40 -34
  186. package/dist/types/src/types/Sheet.d.ts.map +1 -1
  187. package/dist/types/src/types/SheetCapabilities.d.ts +16 -0
  188. package/dist/types/src/types/SheetCapabilities.d.ts.map +1 -0
  189. package/dist/types/src/types/SheetOperation.d.ts +45 -0
  190. package/dist/types/src/types/SheetOperation.d.ts.map +1 -0
  191. package/dist/types/src/types/index.d.ts +3 -1
  192. package/dist/types/src/types/index.d.ts.map +1 -1
  193. package/dist/types/src/types/sheet-range-types.d.ts +1 -1
  194. package/dist/types/src/types/sheet-range-types.d.ts.map +1 -1
  195. package/dist/types/src/types/types.d.ts +2 -68
  196. package/dist/types/src/types/types.d.ts.map +1 -1
  197. package/dist/types/src/types/util.d.ts +3 -2
  198. package/dist/types/src/types/util.d.ts.map +1 -1
  199. package/dist/types/tsconfig.tsbuildinfo +1 -1
  200. package/package.json +132 -82
  201. package/src/SheetPlugin.node.ts +21 -0
  202. package/src/SheetPlugin.test.ts +30 -0
  203. package/src/SheetPlugin.tsx +38 -64
  204. package/src/SheetPlugin.workerd.ts +18 -0
  205. package/src/capabilities/anchor-sort.ts +19 -13
  206. package/src/capabilities/comment-config.ts +24 -0
  207. package/src/capabilities/compute-graph-registry.ts +34 -15
  208. package/src/capabilities/create-object.ts +30 -0
  209. package/src/capabilities/index.ts +16 -8
  210. package/src/capabilities/markdown.ts +21 -13
  211. package/src/capabilities/operation-handler.ts +16 -0
  212. package/src/capabilities/react-surface.tsx +38 -30
  213. package/src/capabilities/state.ts +29 -0
  214. package/src/capabilities/undo-mappings.ts +30 -0
  215. package/src/components/ComputeGraph/ComputeGraphContextProvider.tsx +1 -1
  216. package/src/components/ComputeGraph/compute-graph.stories.tsx +25 -17
  217. package/src/components/Sheet/Sheet.tsx +20 -0
  218. package/src/components/Sheet/index.ts +5 -0
  219. package/src/components/{GridSheet → SheetContent}/SheetCellEditor.stories.tsx +13 -9
  220. package/src/components/{GridSheet/GridSheet.stories.tsx → SheetContent/SheetContent.stories.tsx} +21 -20
  221. package/src/components/{GridSheet/GridSheet.tsx → SheetContent/SheetContent.tsx} +68 -50
  222. package/src/components/{RangeList → SheetContent}/index.ts +1 -1
  223. package/src/components/{GridSheet → SheetContent}/util.ts +7 -6
  224. package/src/components/{SheetContext/SheetContext.tsx → SheetRoot/SheetRoot.tsx} +55 -42
  225. package/src/components/{GridSheet → SheetRoot}/index.ts +1 -1
  226. package/src/components/{FunctionEditor/FunctionEditor.tsx → SheetStatusbar/SheetStatusbar.tsx} +20 -8
  227. package/src/components/{FunctionEditor → SheetStatusbar}/index.ts +1 -1
  228. package/src/components/SheetToolbar/SheetToolbar.stories.tsx +5 -5
  229. package/src/components/SheetToolbar/SheetToolbar.tsx +46 -39
  230. package/src/components/SheetToolbar/align.ts +50 -25
  231. package/src/components/SheetToolbar/style.ts +52 -22
  232. package/src/components/SheetToolbar/useToolbarState.ts +22 -5
  233. package/src/components/index.ts +1 -7
  234. package/src/{components → containers}/RangeList/RangeList.tsx +23 -18
  235. package/src/containers/RangeList/index.ts +5 -0
  236. package/src/containers/SheetArticle/SheetArticle.stories.tsx +110 -0
  237. package/src/containers/SheetArticle/SheetArticle.tsx +57 -0
  238. package/src/containers/SheetArticle/index.ts +5 -0
  239. package/src/containers/index.ts +8 -0
  240. package/src/extensions/compute.stories.tsx +31 -21
  241. package/src/extensions/compute.ts +2 -2
  242. package/src/extensions/editor/sheet-extension.test.ts +1 -1
  243. package/src/extensions/editor/sheet-extension.ts +18 -15
  244. package/src/index.ts +2 -2
  245. package/src/integrations/thread-ranges.ts +18 -55
  246. package/src/meta.ts +4 -3
  247. package/src/model/sheet-model.test.ts +5 -5
  248. package/src/model/sheet-model.ts +72 -40
  249. package/src/model/testing.ts +2 -2
  250. package/src/model/useSheetModel.ts +3 -2
  251. package/src/operations/drop-axis.ts +26 -0
  252. package/src/operations/index.ts +12 -0
  253. package/src/operations/insert-axis.ts +19 -0
  254. package/src/operations/restore-axis.ts +19 -0
  255. package/src/operations/scroll-to-anchor.ts +30 -0
  256. package/src/playwright/playwright.config.ts +1 -1
  257. package/src/playwright/sheet.spec.ts +4 -3
  258. package/src/plugin.ts +11 -0
  259. package/src/sanity.test.ts +10 -3
  260. package/src/serializer.ts +2 -2
  261. package/src/testing/data.ts +1 -1
  262. package/src/testing/testing.tsx +4 -4
  263. package/src/translations.ts +41 -36
  264. package/src/types/Sheet.ts +31 -31
  265. package/src/types/SheetCapabilities.ts +26 -0
  266. package/src/types/SheetOperation.ts +75 -0
  267. package/src/types/index.ts +4 -1
  268. package/src/types/sheet-range-types.ts +3 -3
  269. package/src/types/types.ts +4 -40
  270. package/src/types/util.ts +3 -2
  271. package/dist/lib/browser/SheetContainer-WDKJPYCB.mjs +0 -349
  272. package/dist/lib/browser/SheetContainer-WDKJPYCB.mjs.map +0 -7
  273. package/dist/lib/browser/anchor-sort-OWOAGQM6.mjs +0 -23
  274. package/dist/lib/browser/anchor-sort-OWOAGQM6.mjs.map +0 -7
  275. package/dist/lib/browser/chunk-6ILNTWSF.mjs +0 -852
  276. package/dist/lib/browser/chunk-6ILNTWSF.mjs.map +0 -7
  277. package/dist/lib/browser/chunk-73AV3NH6.mjs +0 -15
  278. package/dist/lib/browser/chunk-73AV3NH6.mjs.map +0 -7
  279. package/dist/lib/browser/chunk-7VEWYJJN.mjs.map +0 -7
  280. package/dist/lib/browser/chunk-FWFAAGXL.mjs.map +0 -7
  281. package/dist/lib/browser/chunk-GBK6OLCY.mjs +0 -907
  282. package/dist/lib/browser/chunk-GBK6OLCY.mjs.map +0 -7
  283. package/dist/lib/browser/compute-graph-registry-AP5RA7W3.mjs +0 -21
  284. package/dist/lib/browser/compute-graph-registry-AP5RA7W3.mjs.map +0 -7
  285. package/dist/lib/browser/index.mjs +0 -154
  286. package/dist/lib/browser/index.mjs.map +0 -7
  287. package/dist/lib/browser/intent-resolver-OMHQGXFL.mjs +0 -56
  288. package/dist/lib/browser/intent-resolver-OMHQGXFL.mjs.map +0 -7
  289. package/dist/lib/browser/markdown-B6VKYY2S.mjs +0 -26
  290. package/dist/lib/browser/markdown-B6VKYY2S.mjs.map +0 -7
  291. package/dist/lib/browser/meta.json +0 -1
  292. package/dist/lib/browser/react-surface-VPLFBQSV.mjs +0 -54
  293. package/dist/lib/browser/react-surface-VPLFBQSV.mjs.map +0 -7
  294. package/dist/lib/node-esm/SheetContainer-62MZAU6Q.mjs +0 -350
  295. package/dist/lib/node-esm/SheetContainer-62MZAU6Q.mjs.map +0 -7
  296. package/dist/lib/node-esm/anchor-sort-FG3DS4HM.mjs +0 -24
  297. package/dist/lib/node-esm/anchor-sort-FG3DS4HM.mjs.map +0 -7
  298. package/dist/lib/node-esm/chunk-44YTKTMP.mjs +0 -16
  299. package/dist/lib/node-esm/chunk-44YTKTMP.mjs.map +0 -7
  300. package/dist/lib/node-esm/chunk-4QV4AGWK.mjs +0 -236
  301. package/dist/lib/node-esm/chunk-4QV4AGWK.mjs.map +0 -7
  302. package/dist/lib/node-esm/chunk-HILDMVPL.mjs +0 -29
  303. package/dist/lib/node-esm/chunk-HILDMVPL.mjs.map +0 -7
  304. package/dist/lib/node-esm/chunk-KSHCRK5J.mjs +0 -908
  305. package/dist/lib/node-esm/chunk-KSHCRK5J.mjs.map +0 -7
  306. package/dist/lib/node-esm/chunk-QI3PNRCD.mjs +0 -853
  307. package/dist/lib/node-esm/chunk-QI3PNRCD.mjs.map +0 -7
  308. package/dist/lib/node-esm/compute-graph-registry-UMQ5UYCL.mjs +0 -22
  309. package/dist/lib/node-esm/compute-graph-registry-UMQ5UYCL.mjs.map +0 -7
  310. package/dist/lib/node-esm/index.mjs +0 -155
  311. package/dist/lib/node-esm/index.mjs.map +0 -7
  312. package/dist/lib/node-esm/intent-resolver-DHEHYV3B.mjs +0 -57
  313. package/dist/lib/node-esm/intent-resolver-DHEHYV3B.mjs.map +0 -7
  314. package/dist/lib/node-esm/markdown-VKY7HXU2.mjs +0 -27
  315. package/dist/lib/node-esm/markdown-VKY7HXU2.mjs.map +0 -7
  316. package/dist/lib/node-esm/meta.json +0 -1
  317. package/dist/lib/node-esm/react-surface-YLTZQVNL.mjs +0 -55
  318. package/dist/lib/node-esm/react-surface-YLTZQVNL.mjs.map +0 -7
  319. package/dist/types/src/capabilities/capabilities.d.ts +0 -5
  320. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  321. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  322. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  323. package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts +0 -3
  324. package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts.map +0 -1
  325. package/dist/types/src/components/FunctionEditor/index.d.ts +0 -2
  326. package/dist/types/src/components/FunctionEditor/index.d.ts.map +0 -1
  327. package/dist/types/src/components/GridSheet/GridSheet.d.ts +0 -3
  328. package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +0 -1
  329. package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts +0 -55
  330. package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +0 -1
  331. package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts.map +0 -1
  332. package/dist/types/src/components/GridSheet/index.d.ts +0 -2
  333. package/dist/types/src/components/GridSheet/index.d.ts.map +0 -1
  334. package/dist/types/src/components/GridSheet/util.d.ts.map +0 -1
  335. package/dist/types/src/components/RangeList/RangeList.d.ts +0 -7
  336. package/dist/types/src/components/RangeList/RangeList.d.ts.map +0 -1
  337. package/dist/types/src/components/RangeList/index.d.ts +0 -2
  338. package/dist/types/src/components/RangeList/index.d.ts.map +0 -1
  339. package/dist/types/src/components/SheetContainer/SheetContainer.d.ts +0 -11
  340. package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +0 -1
  341. package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts +0 -56
  342. package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +0 -1
  343. package/dist/types/src/components/SheetContainer/index.d.ts +0 -3
  344. package/dist/types/src/components/SheetContainer/index.d.ts.map +0 -1
  345. package/dist/types/src/components/SheetContext/SheetContext.d.ts.map +0 -1
  346. package/dist/types/src/components/SheetContext/index.d.ts +0 -2
  347. package/dist/types/src/components/SheetContext/index.d.ts.map +0 -1
  348. package/src/capabilities/capabilities.ts +0 -14
  349. package/src/capabilities/intent-resolver.ts +0 -38
  350. package/src/components/SheetContainer/SheetContainer.stories.tsx +0 -93
  351. package/src/components/SheetContainer/SheetContainer.tsx +0 -41
  352. package/src/components/SheetContainer/index.ts +0 -7
  353. package/src/components/SheetContext/index.ts +0 -5
  354. /package/dist/lib/{browser/types/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  355. /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
@@ -2,22 +2,30 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { type PluginContext, contributes } from '@dxos/app-framework';
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capability } from '@dxos/app-framework';
6
8
  import { getSpace } from '@dxos/client/echo';
7
9
  import { MarkdownCapabilities } from '@dxos/plugin-markdown';
8
10
 
11
+ import { SheetCapabilities } from '#types';
12
+
9
13
  import { computeGraphFacet } from '../extensions';
10
14
 
11
- import { SheetCapabilities } from './capabilities';
15
+ export default Capability.makeModule(
16
+ Effect.fnUntraced(function* () {
17
+ // Get context for lazy capability access in callbacks.
18
+ const capabilities = yield* Capability.Service;
12
19
 
13
- export default (context: PluginContext) =>
14
- contributes(MarkdownCapabilities.Extensions, [
15
- ({ document: doc }) => {
16
- const computeGraphRegistry = context.getCapability(SheetCapabilities.ComputeGraphRegistry);
17
- const space = getSpace(doc);
18
- if (space) {
19
- const computeGraph = computeGraphRegistry.getOrCreateGraph(space);
20
- return computeGraphFacet.of(computeGraph);
21
- }
22
- },
23
- ]);
20
+ return Capability.contributes(MarkdownCapabilities.Extensions, [
21
+ ({ document: doc }) => {
22
+ const computeGraphRegistry = capabilities.get(SheetCapabilities.ComputeGraphRegistry);
23
+ const space = getSpace(doc);
24
+ if (space) {
25
+ const computeGraph = computeGraphRegistry.getOrCreateGraph(space);
26
+ return computeGraphFacet.of(computeGraph);
27
+ }
28
+ },
29
+ ]);
30
+ }),
31
+ );
@@ -0,0 +1,16 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities, Capability } from '@dxos/app-framework';
8
+ import type { OperationHandlerSet } from '@dxos/compute';
9
+
10
+ import { SheetOperationHandlerSet } from '#operations';
11
+
12
+ export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
13
+ Effect.fnUntraced(function* () {
14
+ return Capability.contributes(Capabilities.OperationHandler, SheetOperationHandlerSet);
15
+ }),
16
+ );
@@ -2,40 +2,48 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import * as Effect from 'effect/Effect';
5
6
  import React from 'react';
6
7
 
7
- import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
8
- import { useCapability } from '@dxos/app-framework/react';
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { Surface, useCapability } from '@dxos/app-framework/ui';
10
+ import { AppSurface } from '@dxos/app-toolkit/ui';
9
11
  import { Obj } from '@dxos/echo';
10
12
  import { getSpace } from '@dxos/react-client/echo';
11
13
 
12
- import { ComputeGraphContextProvider, RangeList, SheetContainer } from '../components';
13
- import { meta } from '../meta';
14
- import { Sheet } from '../types';
14
+ import { RangeList, SheetArticle } from '#containers';
15
+ import { Sheet, SheetCapabilities } from '#types';
15
16
 
16
- import { SheetCapabilities } from './capabilities';
17
+ export default Capability.makeModule(() =>
18
+ Effect.succeed(
19
+ Capability.contributes(Capabilities.ReactSurface, [
20
+ Surface.create({
21
+ id: 'sheet',
22
+ // TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
23
+ role: ['article', 'section'],
24
+ filter: (data): data is { attendableId: string; subject: Sheet.Sheet } =>
25
+ typeof data.attendableId === 'string' &&
26
+ Obj.instanceOf(Sheet.Sheet, data.subject) &&
27
+ !!Obj.getDatabase(data.subject),
28
+ component: ({ data, role }) => {
29
+ const computeGraphRegistry = useCapability(SheetCapabilities.ComputeGraphRegistry);
17
30
 
18
- export default () =>
19
- contributes(Capabilities.ReactSurface, [
20
- createSurface({
21
- id: `${meta.id}/sheet`,
22
- role: ['article', 'section'],
23
- filter: (data): data is { subject: Sheet.Sheet } =>
24
- Obj.instanceOf(Sheet.Sheet, data.subject) && !!getSpace(data.subject),
25
- component: ({ data, role }) => {
26
- const computeGraphRegistry = useCapability(SheetCapabilities.ComputeGraphRegistry);
27
-
28
- return (
29
- <ComputeGraphContextProvider registry={computeGraphRegistry}>
30
- <SheetContainer space={getSpace(data.subject)!} sheet={data.subject} role={role} />
31
- </ComputeGraphContextProvider>
32
- );
33
- },
34
- }),
35
- createSurface({
36
- id: `${meta.id}/object-settings`,
37
- role: 'object-settings',
38
- filter: (data): data is { subject: Sheet.Sheet } => Obj.instanceOf(Sheet.Sheet, data.subject),
39
- component: ({ data }) => <RangeList sheet={data.subject} />,
40
- }),
41
- ]);
31
+ return (
32
+ <SheetArticle
33
+ role={role}
34
+ subject={data.subject}
35
+ attendableId={data.attendableId}
36
+ space={getSpace(data.subject)!}
37
+ registry={computeGraphRegistry}
38
+ />
39
+ );
40
+ },
41
+ }),
42
+ Surface.create({
43
+ id: 'object-properties',
44
+ filter: AppSurface.object(AppSurface.ObjectProperties, Sheet.Sheet),
45
+ component: ({ data }) => <RangeList sheet={data.subject} />,
46
+ }),
47
+ ]),
48
+ ),
49
+ );
@@ -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
  };
@@ -84,11 +88,15 @@ const DefaultStory = () => {
84
88
  export const Default: Story = {};
85
89
 
86
90
  const meta = {
87
- title: 'plugins/plugin-sheet/functions',
91
+ title: 'plugins/plugin-sheet/components/functions',
88
92
  render: DefaultStory,
89
93
  decorators: [
90
- withTheme,
91
- withClientProvider({ types: [Function.Function, Sheet.Sheet], createIdentity: true, createSpace: true }),
94
+ withTheme(),
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>;
@@ -0,0 +1,20 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { SheetContent } from '../SheetContent';
6
+ import { SheetRoot } from '../SheetRoot';
7
+ import { SheetStatusbar } from '../SheetStatusbar';
8
+ import { SheetToolbar } from '../SheetToolbar';
9
+
10
+ export { useSheetContext, type SheetContextValue, type SheetRootProps } from '../SheetRoot';
11
+ export { type SheetContentProps } from '../SheetContent';
12
+ export { type SheetToolbarProps } from '../SheetToolbar';
13
+ export { type SheetStatusbarProps } from '../SheetStatusbar';
14
+
15
+ export const Sheet = {
16
+ Root: SheetRoot,
17
+ Toolbar: SheetToolbar,
18
+ Content: SheetContent,
19
+ Statusbar: SheetStatusbar,
20
+ };
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export * from './Sheet';
@@ -6,16 +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
+ import { Obj } from '@dxos/echo';
11
12
  import { createDocAccessor } from '@dxos/echo-db';
12
13
  import { useAsyncEffect } from '@dxos/react-hooks';
13
- import { withTheme } from '@dxos/react-ui/testing';
14
- import { automerge } from '@dxos/react-ui-editor';
15
14
  import { CellEditor, type CellEditorProps } from '@dxos/react-ui-grid';
15
+ import { withTheme } from '@dxos/react-ui/testing';
16
+ import { automerge } from '@dxos/ui-editor';
17
+
18
+ import { Sheet } from '#types';
16
19
 
17
20
  import { sheetExtension } from '../../extensions';
18
- import { Sheet } from '../../types';
19
21
 
20
22
  const DefaultStory = ({ value, ...props }: CellEditorProps) => {
21
23
  const extensions = useMemo(() => {
@@ -37,8 +39,10 @@ const AutomergeStory = ({ value, ...props }: CellEditorProps) => {
37
39
  const space = await client.spaces.create();
38
40
 
39
41
  const sheet = Sheet.make();
40
- sheet.name = 'Test';
41
- sheet.cells[cell] = { value };
42
+ Obj.update(sheet, (sheet) => {
43
+ sheet.name = 'Test';
44
+ sheet.cells[cell] = { value };
45
+ });
42
46
  space.db.add(sheet);
43
47
  setObject(sheet);
44
48
  }, [value]);
@@ -58,9 +62,9 @@ const AutomergeStory = ({ value, ...props }: CellEditorProps) => {
58
62
  };
59
63
 
60
64
  const meta = {
61
- title: 'plugins/plugin-sheet/CellEditor',
65
+ title: 'plugins/plugin-sheet/components/CellEditor',
62
66
 
63
- decorators: [withTheme],
67
+ decorators: [withTheme()],
64
68
  component: CellEditor,
65
69
  render: DefaultStory,
66
70
  } satisfies Meta<typeof DefaultStory>;
@@ -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 { IntentPlugin } from '@dxos/app-framework';
8
+ import { ProcessManagerPlugin } from '@dxos/app-framework';
9
9
  import { withPluginManager } from '@dxos/app-framework/testing';
10
- import { testFunctionPlugins } from '@dxos/compute/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
- import { withTheme } from '@dxos/react-ui/testing';
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';
18
- import { useComputeGraph } from '../ComputeGraph';
19
- import { SheetProvider } from '../SheetContext';
15
+ import { createTestCells, useTestSheet, withComputeGraphDecorator } from '#testing';
16
+ import { translations } from '#translations';
17
+ import { Sheet } from '#types';
20
18
 
21
- import { GridSheet } from './GridSheet';
19
+ import { useComputeGraph } from '../ComputeGraph';
20
+ import { SheetRoot } from '../SheetRoot';
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,30 +29,31 @@ export const Basic = () => {
29
29
  }
30
30
 
31
31
  return (
32
- <SheetProvider graph={graph} sheet={sheet} ignoreAttention>
33
- <div role='none' className='grid bs-full is-full'>
34
- <GridSheet />
32
+ <SheetRoot graph={graph} sheet={sheet} attendableId='test' ignoreAttention>
33
+ <div className='grid h-full w-full'>
34
+ <SheetContent />
35
35
  </div>
36
- </SheetProvider>
36
+ </SheetRoot>
37
37
  );
38
38
  };
39
39
 
40
40
  const meta = {
41
- title: 'plugins/plugin-sheet/GridSheet',
42
- component: GridSheet,
41
+ title: 'plugins/plugin-sheet/components/SheetContent',
42
+ component: SheetContent,
43
43
  decorators: [
44
- withTheme,
44
+ withTheme(),
45
+ withLayout({ layout: 'fullscreen' }),
45
46
  withClientProvider({ types: [Sheet.Sheet], createSpace: true }),
46
47
  withComputeGraphDecorator({ plugins: testFunctionPlugins }),
47
48
  withPluginManager({
48
- plugins: [IntentPlugin()],
49
+ plugins: [ProcessManagerPlugin()],
49
50
  }),
50
51
  ],
51
52
  parameters: {
52
53
  layout: 'fullscreen',
53
54
  translations,
54
55
  },
55
- } satisfies Meta<typeof GridSheet>;
56
+ } satisfies Meta<typeof SheetContent>;
56
57
 
57
58
  export default meta;
58
59