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

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 (293) hide show
  1. package/dist/lib/browser/RangeList-S3SHV7T6.mjs +53 -0
  2. package/dist/lib/browser/RangeList-S3SHV7T6.mjs.map +7 -0
  3. package/dist/lib/browser/SheetContainer-I3NFVVDQ.mjs +1805 -0
  4. package/dist/lib/browser/SheetContainer-I3NFVVDQ.mjs.map +7 -0
  5. package/dist/lib/browser/anchor-sort-DZ3IHHJJ.mjs +24 -0
  6. package/dist/lib/browser/anchor-sort-DZ3IHHJJ.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-SSN4HYJL.mjs → chunk-NNWF7EKC.mjs} +17 -17
  8. package/dist/lib/browser/chunk-NNWF7EKC.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-S445OQGW.mjs +397 -0
  10. package/dist/lib/browser/chunk-S445OQGW.mjs.map +7 -0
  11. package/dist/lib/browser/compute-graph-registry-W6HO2G3P.mjs +21 -0
  12. package/dist/lib/browser/compute-graph-registry-W6HO2G3P.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +71 -80
  14. package/dist/lib/browser/index.mjs.map +4 -4
  15. package/dist/lib/browser/markdown-S6GVLHB4.mjs +29 -0
  16. package/dist/lib/browser/markdown-S6GVLHB4.mjs.map +7 -0
  17. package/dist/lib/browser/meta.json +1 -1
  18. package/dist/lib/browser/operation-resolver-Z4X4UWNR.mjs +79 -0
  19. package/dist/lib/browser/operation-resolver-Z4X4UWNR.mjs.map +7 -0
  20. package/dist/lib/browser/react-surface-KIU6DGKW.mjs +51 -0
  21. package/dist/lib/browser/react-surface-KIU6DGKW.mjs.map +7 -0
  22. package/dist/lib/browser/types/index.mjs +7 -12
  23. package/dist/lib/node-esm/RangeList-IB23OJK2.mjs +54 -0
  24. package/dist/lib/node-esm/RangeList-IB23OJK2.mjs.map +7 -0
  25. package/dist/lib/node-esm/SheetContainer-KUXNCSFP.mjs +1806 -0
  26. package/dist/lib/node-esm/SheetContainer-KUXNCSFP.mjs.map +7 -0
  27. package/dist/lib/node-esm/anchor-sort-24OXMOSX.mjs +25 -0
  28. package/dist/lib/node-esm/anchor-sort-24OXMOSX.mjs.map +7 -0
  29. package/dist/lib/node-esm/{chunk-IK4O7FUJ.mjs → chunk-M52YLLWU.mjs} +17 -17
  30. package/dist/lib/node-esm/chunk-M52YLLWU.mjs.map +7 -0
  31. package/dist/lib/node-esm/chunk-NKZ3O4OR.mjs +398 -0
  32. package/dist/lib/node-esm/chunk-NKZ3O4OR.mjs.map +7 -0
  33. package/dist/lib/node-esm/compute-graph-registry-2C3Y2RPQ.mjs +22 -0
  34. package/dist/lib/node-esm/compute-graph-registry-2C3Y2RPQ.mjs.map +7 -0
  35. package/dist/lib/node-esm/index.mjs +71 -80
  36. package/dist/lib/node-esm/index.mjs.map +4 -4
  37. package/dist/lib/node-esm/markdown-YT5KJTQT.mjs +30 -0
  38. package/dist/lib/node-esm/markdown-YT5KJTQT.mjs.map +7 -0
  39. package/dist/lib/node-esm/meta.json +1 -1
  40. package/dist/lib/node-esm/operation-resolver-7VD2YXSQ.mjs +80 -0
  41. package/dist/lib/node-esm/operation-resolver-7VD2YXSQ.mjs.map +7 -0
  42. package/dist/lib/node-esm/react-surface-7FZAE3S7.mjs +52 -0
  43. package/dist/lib/node-esm/react-surface-7FZAE3S7.mjs.map +7 -0
  44. package/dist/lib/node-esm/types/index.mjs +7 -12
  45. package/dist/types/src/SheetPlugin.d.ts +2 -1
  46. package/dist/types/src/SheetPlugin.d.ts.map +1 -1
  47. package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts +6 -0
  48. package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts.map +1 -0
  49. package/dist/types/src/capabilities/anchor-sort/index.d.ts +3 -0
  50. package/dist/types/src/capabilities/anchor-sort/index.d.ts.map +1 -0
  51. package/dist/types/src/capabilities/compute-graph-registry/compute-graph-registry.d.ts +5 -0
  52. package/dist/types/src/capabilities/compute-graph-registry/compute-graph-registry.d.ts.map +1 -0
  53. package/dist/types/src/capabilities/compute-graph-registry/index.d.ts +3 -0
  54. package/dist/types/src/capabilities/compute-graph-registry/index.d.ts.map +1 -0
  55. package/dist/types/src/capabilities/index.d.ts +5 -9
  56. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  57. package/dist/types/src/capabilities/markdown/index.d.ts +3 -0
  58. package/dist/types/src/capabilities/markdown/index.d.ts.map +1 -0
  59. package/dist/types/src/capabilities/markdown/markdown.d.ts +5 -0
  60. package/dist/types/src/capabilities/markdown/markdown.d.ts.map +1 -0
  61. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  62. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  63. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  64. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  65. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  66. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  67. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  68. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  69. package/dist/types/src/components/Sheet/Sheet.d.ts +11 -0
  70. package/dist/types/src/components/Sheet/Sheet.d.ts.map +1 -0
  71. package/dist/types/src/components/Sheet/index.d.ts +2 -0
  72. package/dist/types/src/components/Sheet/index.d.ts.map +1 -0
  73. package/dist/types/src/components/{GridSheet → SheetContent}/SheetCellEditor.stories.d.ts +1 -1
  74. package/dist/types/src/components/SheetContent/SheetCellEditor.stories.d.ts.map +1 -0
  75. package/dist/types/src/components/SheetContent/SheetContent.d.ts +5 -0
  76. package/dist/types/src/components/SheetContent/SheetContent.d.ts.map +1 -0
  77. package/dist/types/src/components/{GridSheet/GridSheet.stories.d.ts → SheetContent/SheetContent.stories.d.ts} +5 -4
  78. package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts.map +1 -0
  79. package/dist/types/src/components/SheetContent/index.d.ts +2 -0
  80. package/dist/types/src/components/SheetContent/index.d.ts.map +1 -0
  81. package/dist/types/src/components/SheetContent/util.d.ts.map +1 -0
  82. package/dist/types/src/components/{SheetContext/SheetContext.d.ts → SheetRoot/SheetRoot.d.ts} +6 -6
  83. package/dist/types/src/components/SheetRoot/SheetRoot.d.ts.map +1 -0
  84. package/dist/types/src/components/SheetRoot/index.d.ts +2 -0
  85. package/dist/types/src/components/SheetRoot/index.d.ts.map +1 -0
  86. package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts +5 -0
  87. package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts.map +1 -0
  88. package/dist/types/src/components/SheetStatusbar/index.d.ts +2 -0
  89. package/dist/types/src/components/SheetStatusbar/index.d.ts.map +1 -0
  90. package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts +6 -4
  91. package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts.map +1 -1
  92. package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts +2 -0
  93. package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts.map +1 -1
  94. package/dist/types/src/components/SheetToolbar/align.d.ts +12 -19
  95. package/dist/types/src/components/SheetToolbar/align.d.ts.map +1 -1
  96. package/dist/types/src/components/SheetToolbar/style.d.ts +12 -18
  97. package/dist/types/src/components/SheetToolbar/style.d.ts.map +1 -1
  98. package/dist/types/src/components/SheetToolbar/useToolbarState.d.ts +14 -1
  99. package/dist/types/src/components/SheetToolbar/useToolbarState.d.ts.map +1 -1
  100. package/dist/types/src/components/index.d.ts +1 -4
  101. package/dist/types/src/components/index.d.ts.map +1 -1
  102. package/dist/types/src/{components → containers}/RangeList/RangeList.d.ts +2 -2
  103. package/dist/types/src/containers/RangeList/RangeList.d.ts.map +1 -0
  104. package/dist/types/src/containers/RangeList/index.d.ts +3 -0
  105. package/dist/types/src/containers/RangeList/index.d.ts.map +1 -0
  106. package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts +12 -0
  107. package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts.map +1 -0
  108. package/dist/types/src/{components → containers}/SheetContainer/SheetContainer.stories.d.ts +4 -3
  109. package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts.map +1 -0
  110. package/dist/types/src/{components → containers}/SheetContainer/index.d.ts.map +1 -1
  111. package/dist/types/src/containers/index.d.ts +4 -0
  112. package/dist/types/src/containers/index.d.ts.map +1 -0
  113. package/dist/types/src/extensions/compute.stories.d.ts.map +1 -1
  114. package/dist/types/src/extensions/editor/sheet-extension.d.ts.map +1 -1
  115. package/dist/types/src/index.d.ts +1 -1
  116. package/dist/types/src/index.d.ts.map +1 -1
  117. package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
  118. package/dist/types/src/meta.d.ts +2 -2
  119. package/dist/types/src/meta.d.ts.map +1 -1
  120. package/dist/types/src/model/sheet-model.d.ts +6 -6
  121. package/dist/types/src/model/sheet-model.d.ts.map +1 -1
  122. package/dist/types/src/model/testing.d.ts +2 -2
  123. package/dist/types/src/model/testing.d.ts.map +1 -1
  124. package/dist/types/src/model/useSheetModel.d.ts +2 -2
  125. package/dist/types/src/model/useSheetModel.d.ts.map +1 -1
  126. package/dist/types/src/serializer.d.ts +2 -2
  127. package/dist/types/src/serializer.d.ts.map +1 -1
  128. package/dist/types/src/testing/data.d.ts +2 -2
  129. package/dist/types/src/testing/data.d.ts.map +1 -1
  130. package/dist/types/src/testing/testing.d.ts +26 -2
  131. package/dist/types/src/testing/testing.d.ts.map +1 -1
  132. package/dist/types/src/translations.d.ts +3 -2
  133. package/dist/types/src/translations.d.ts.map +1 -1
  134. package/dist/types/src/types/Sheet.d.ts +76 -0
  135. package/dist/types/src/types/Sheet.d.ts.map +1 -0
  136. package/dist/types/src/types/capabilities.d.ts +6 -0
  137. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  138. package/dist/types/src/types/index.d.ts +2 -1
  139. package/dist/types/src/types/index.d.ts.map +1 -1
  140. package/dist/types/src/types/sheet-range-types.d.ts +2 -2
  141. package/dist/types/src/types/sheet-range-types.d.ts.map +1 -1
  142. package/dist/types/src/types/types.d.ts +91 -74
  143. package/dist/types/src/types/types.d.ts.map +1 -1
  144. package/dist/types/src/types/util.d.ts +10 -10
  145. package/dist/types/src/types/util.d.ts.map +1 -1
  146. package/dist/types/tsconfig.tsbuildinfo +1 -1
  147. package/package.json +74 -67
  148. package/src/SheetPlugin.tsx +41 -61
  149. package/src/capabilities/anchor-sort/anchor-sort.ts +27 -0
  150. package/src/capabilities/anchor-sort/index.ts +7 -0
  151. package/src/capabilities/compute-graph-registry/compute-graph-registry.ts +27 -0
  152. package/src/capabilities/compute-graph-registry/index.ts +7 -0
  153. package/src/capabilities/index.ts +5 -9
  154. package/src/capabilities/markdown/index.ts +7 -0
  155. package/src/capabilities/markdown/markdown.ts +30 -0
  156. package/src/capabilities/operation-resolver/index.ts +7 -0
  157. package/src/capabilities/operation-resolver/operation-resolver.ts +77 -0
  158. package/src/capabilities/react-surface/index.ts +7 -0
  159. package/src/capabilities/react-surface/react-surface.tsx +46 -0
  160. package/src/components/ComputeGraph/compute-graph.stories.tsx +10 -10
  161. package/src/components/Sheet/Sheet.tsx +20 -0
  162. package/src/components/Sheet/index.ts +5 -0
  163. package/src/components/{GridSheet → SheetContent}/SheetCellEditor.stories.tsx +13 -10
  164. package/src/components/{GridSheet/GridSheet.stories.tsx → SheetContent/SheetContent.stories.tsx} +16 -15
  165. package/src/components/{GridSheet/GridSheet.tsx → SheetContent/SheetContent.tsx} +52 -39
  166. package/src/components/{RangeList → SheetContent}/index.ts +1 -1
  167. package/src/components/{GridSheet → SheetContent}/util.ts +14 -8
  168. package/src/components/{SheetContext/SheetContext.tsx → SheetRoot/SheetRoot.tsx} +42 -40
  169. package/src/components/{GridSheet → SheetRoot}/index.ts +1 -1
  170. package/src/components/{FunctionEditor/FunctionEditor.tsx → SheetStatusbar/SheetStatusbar.tsx} +10 -5
  171. package/src/components/{FunctionEditor → SheetStatusbar}/index.ts +1 -1
  172. package/src/components/SheetToolbar/SheetToolbar.stories.tsx +4 -4
  173. package/src/components/SheetToolbar/SheetToolbar.tsx +45 -35
  174. package/src/components/SheetToolbar/align.ts +44 -19
  175. package/src/components/SheetToolbar/style.ts +48 -18
  176. package/src/components/SheetToolbar/useToolbarState.ts +22 -5
  177. package/src/components/index.ts +1 -7
  178. package/src/{components → containers}/RangeList/RangeList.tsx +17 -12
  179. package/src/containers/RangeList/index.ts +7 -0
  180. package/src/containers/SheetContainer/SheetContainer.stories.tsx +94 -0
  181. package/src/containers/SheetContainer/SheetContainer.tsx +57 -0
  182. package/src/{components → containers}/SheetContainer/index.ts +1 -1
  183. package/src/containers/index.ts +8 -0
  184. package/src/extensions/compute.stories.tsx +24 -14
  185. package/src/extensions/compute.ts +1 -1
  186. package/src/extensions/editor/sheet-extension.ts +16 -13
  187. package/src/index.ts +1 -1
  188. package/src/integrations/thread-ranges.ts +38 -49
  189. package/src/meta.ts +8 -4
  190. package/src/model/sheet-model.test.ts +4 -4
  191. package/src/model/sheet-model.ts +80 -48
  192. package/src/model/testing.ts +4 -4
  193. package/src/model/useSheetModel.ts +2 -2
  194. package/src/playwright/playwright.config.ts +1 -1
  195. package/src/playwright/sheet.spec.ts +2 -1
  196. package/src/sanity.test.ts +3 -4
  197. package/src/serializer.ts +4 -4
  198. package/src/testing/data.ts +2 -2
  199. package/src/testing/testing.tsx +3 -3
  200. package/src/translations.ts +3 -2
  201. package/src/types/Sheet.ts +97 -0
  202. package/src/{capabilities → types}/capabilities.ts +2 -2
  203. package/src/types/index.ts +2 -1
  204. package/src/types/sheet-range-types.ts +5 -5
  205. package/src/types/types.ts +82 -48
  206. package/src/types/util.ts +11 -38
  207. package/dist/lib/browser/SheetContainer-VL34UND4.mjs +0 -351
  208. package/dist/lib/browser/SheetContainer-VL34UND4.mjs.map +0 -7
  209. package/dist/lib/browser/anchor-sort-3N44DS5F.mjs +0 -24
  210. package/dist/lib/browser/anchor-sort-3N44DS5F.mjs.map +0 -7
  211. package/dist/lib/browser/chunk-ADK2HW4A.mjs +0 -906
  212. package/dist/lib/browser/chunk-ADK2HW4A.mjs.map +0 -7
  213. package/dist/lib/browser/chunk-CSBSADPQ.mjs +0 -16
  214. package/dist/lib/browser/chunk-CSBSADPQ.mjs.map +0 -7
  215. package/dist/lib/browser/chunk-SSN4HYJL.mjs.map +0 -7
  216. package/dist/lib/browser/chunk-ZJWJMX4E.mjs +0 -852
  217. package/dist/lib/browser/chunk-ZJWJMX4E.mjs.map +0 -7
  218. package/dist/lib/browser/chunk-ZMPNHFIP.mjs +0 -15
  219. package/dist/lib/browser/chunk-ZMPNHFIP.mjs.map +0 -7
  220. package/dist/lib/browser/compute-graph-registry-MF65HGGM.mjs +0 -21
  221. package/dist/lib/browser/compute-graph-registry-MF65HGGM.mjs.map +0 -7
  222. package/dist/lib/browser/intent-resolver-BQLV6IAA.mjs +0 -56
  223. package/dist/lib/browser/intent-resolver-BQLV6IAA.mjs.map +0 -7
  224. package/dist/lib/browser/markdown-RMTMI237.mjs +0 -26
  225. package/dist/lib/browser/markdown-RMTMI237.mjs.map +0 -7
  226. package/dist/lib/browser/react-surface-7ZDMQDCT.mjs +0 -53
  227. package/dist/lib/browser/react-surface-7ZDMQDCT.mjs.map +0 -7
  228. package/dist/lib/node-esm/SheetContainer-NWJ7L6FC.mjs +0 -352
  229. package/dist/lib/node-esm/SheetContainer-NWJ7L6FC.mjs.map +0 -7
  230. package/dist/lib/node-esm/anchor-sort-YL2OZHYM.mjs +0 -25
  231. package/dist/lib/node-esm/anchor-sort-YL2OZHYM.mjs.map +0 -7
  232. package/dist/lib/node-esm/chunk-BZAPYBSH.mjs +0 -907
  233. package/dist/lib/node-esm/chunk-BZAPYBSH.mjs.map +0 -7
  234. package/dist/lib/node-esm/chunk-H3GSD33H.mjs +0 -18
  235. package/dist/lib/node-esm/chunk-H3GSD33H.mjs.map +0 -7
  236. package/dist/lib/node-esm/chunk-IK4O7FUJ.mjs.map +0 -7
  237. package/dist/lib/node-esm/chunk-LN6ZSAII.mjs +0 -16
  238. package/dist/lib/node-esm/chunk-LN6ZSAII.mjs.map +0 -7
  239. package/dist/lib/node-esm/chunk-YL7BVJPC.mjs +0 -853
  240. package/dist/lib/node-esm/chunk-YL7BVJPC.mjs.map +0 -7
  241. package/dist/lib/node-esm/compute-graph-registry-P2O5LDFZ.mjs +0 -22
  242. package/dist/lib/node-esm/compute-graph-registry-P2O5LDFZ.mjs.map +0 -7
  243. package/dist/lib/node-esm/intent-resolver-MV5ZFXAQ.mjs +0 -57
  244. package/dist/lib/node-esm/intent-resolver-MV5ZFXAQ.mjs.map +0 -7
  245. package/dist/lib/node-esm/markdown-EDIWHA3P.mjs +0 -27
  246. package/dist/lib/node-esm/markdown-EDIWHA3P.mjs.map +0 -7
  247. package/dist/lib/node-esm/react-surface-TUME5MM2.mjs +0 -54
  248. package/dist/lib/node-esm/react-surface-TUME5MM2.mjs.map +0 -7
  249. package/dist/types/src/capabilities/anchor-sort.d.ts +0 -6
  250. package/dist/types/src/capabilities/anchor-sort.d.ts.map +0 -1
  251. package/dist/types/src/capabilities/capabilities.d.ts +0 -5
  252. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  253. package/dist/types/src/capabilities/compute-graph-registry.d.ts +0 -4
  254. package/dist/types/src/capabilities/compute-graph-registry.d.ts.map +0 -1
  255. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  256. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  257. package/dist/types/src/capabilities/markdown.d.ts +0 -4
  258. package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
  259. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  260. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  261. package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts +0 -3
  262. package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts.map +0 -1
  263. package/dist/types/src/components/FunctionEditor/index.d.ts +0 -2
  264. package/dist/types/src/components/FunctionEditor/index.d.ts.map +0 -1
  265. package/dist/types/src/components/GridSheet/GridSheet.d.ts +0 -3
  266. package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +0 -1
  267. package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +0 -1
  268. package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts.map +0 -1
  269. package/dist/types/src/components/GridSheet/index.d.ts +0 -2
  270. package/dist/types/src/components/GridSheet/index.d.ts.map +0 -1
  271. package/dist/types/src/components/GridSheet/util.d.ts.map +0 -1
  272. package/dist/types/src/components/RangeList/RangeList.d.ts.map +0 -1
  273. package/dist/types/src/components/RangeList/index.d.ts +0 -2
  274. package/dist/types/src/components/RangeList/index.d.ts.map +0 -1
  275. package/dist/types/src/components/SheetContainer/SheetContainer.d.ts +0 -11
  276. package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +0 -1
  277. package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +0 -1
  278. package/dist/types/src/components/SheetContext/SheetContext.d.ts.map +0 -1
  279. package/dist/types/src/components/SheetContext/index.d.ts +0 -2
  280. package/dist/types/src/components/SheetContext/index.d.ts.map +0 -1
  281. package/dist/types/src/types/schema.d.ts +0 -37
  282. package/dist/types/src/types/schema.d.ts.map +0 -1
  283. package/src/capabilities/anchor-sort.ts +0 -22
  284. package/src/capabilities/compute-graph-registry.ts +0 -23
  285. package/src/capabilities/intent-resolver.ts +0 -38
  286. package/src/capabilities/markdown.ts +0 -23
  287. package/src/capabilities/react-surface.tsx +0 -40
  288. package/src/components/SheetContainer/SheetContainer.stories.tsx +0 -90
  289. package/src/components/SheetContainer/SheetContainer.tsx +0 -40
  290. package/src/components/SheetContext/index.ts +0 -5
  291. package/src/types/schema.ts +0 -61
  292. /package/dist/types/src/components/{GridSheet → SheetContent}/util.d.ts +0 -0
  293. /package/dist/types/src/{components → containers}/SheetContainer/index.d.ts +0 -0
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@dxos/plugin-sheet",
3
- "version": "0.8.4-main.c4373fc",
3
+ "version": "0.8.4-main.c85a9c8dae",
4
4
  "description": "Braneframe sketch plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dxos/dxos"
10
+ },
7
11
  "license": "MIT",
8
12
  "author": "DXOS.org",
9
13
  "sideEffects": true,
@@ -11,15 +15,15 @@
11
15
  "exports": {
12
16
  ".": {
13
17
  "source": "./src/index.ts",
14
- "types": "./dist/types/src/index.d.ts",
15
18
  "browser": "./dist/lib/browser/index.mjs",
16
- "node": "./dist/lib/node-esm/index.mjs"
19
+ "node": "./dist/lib/node-esm/index.mjs",
20
+ "types": "./dist/types/src/index.d.ts"
17
21
  },
18
22
  "./types": {
19
23
  "source": "./src/types/index.ts",
20
- "types": "./dist/types/src/types/index.d.ts",
21
24
  "browser": "./dist/lib/browser/types/index.mjs",
22
- "node": "./dist/lib/node-esm/types/index.mjs"
25
+ "node": "./dist/lib/node-esm/types/index.mjs",
26
+ "types": "./dist/types/src/types/index.d.ts"
23
27
  }
24
28
  },
25
29
  "types": "dist/types/src/index.d.ts",
@@ -47,8 +51,6 @@
47
51
  "@lezer/highlight": "^1.2.1",
48
52
  "@lezer/lezer": "^1.1.2",
49
53
  "@lezer/lr": "^1.4.2",
50
- "@preact-signals/safe-react": "^0.9.0",
51
- "@preact/signals-core": "^1.12.1",
52
54
  "@radix-ui/react-context": "1.1.1",
53
55
  "codemirror-lang-spreadsheet": "^1.3.0",
54
56
  "date-fns": "^3.3.1",
@@ -56,73 +58,78 @@
56
58
  "re-resizable": "^6.9.17",
57
59
  "react-markdown": "^10.1.0",
58
60
  "react-resize-detector": "^11.0.1",
59
- "@dxos/app-framework": "0.8.4-main.c4373fc",
60
- "@dxos/client": "0.8.4-main.c4373fc",
61
- "@dxos/async": "0.8.4-main.c4373fc",
62
- "@dxos/compute": "0.8.4-main.c4373fc",
63
- "@dxos/crypto": "0.8.4-main.c4373fc",
64
- "@dxos/context": "0.8.4-main.c4373fc",
65
- "@dxos/echo": "0.8.4-main.c4373fc",
66
- "@dxos/debug": "0.8.4-main.c4373fc",
67
- "@dxos/functions": "0.8.4-main.c4373fc",
68
- "@dxos/invariant": "0.8.4-main.c4373fc",
69
- "@dxos/keys": "0.8.4-main.c4373fc",
70
- "@dxos/live-object": "0.8.4-main.c4373fc",
71
- "@dxos/lit-grid": "0.8.4-main.c4373fc",
72
- "@dxos/log": "0.8.4-main.c4373fc",
73
- "@dxos/plugin-attention": "0.8.4-main.c4373fc",
74
- "@dxos/plugin-client": "0.8.4-main.c4373fc",
75
- "@dxos/plugin-automation": "0.8.4-main.c4373fc",
76
- "@dxos/plugin-script": "0.8.4-main.c4373fc",
77
- "@dxos/plugin-markdown": "0.8.4-main.c4373fc",
78
- "@dxos/plugin-space": "0.8.4-main.c4373fc",
79
- "@dxos/plugin-stack": "0.8.4-main.c4373fc",
80
- "@dxos/plugin-thread": "0.8.4-main.c4373fc",
81
- "@dxos/plugin-deck": "0.8.4-main.c4373fc",
82
- "@dxos/plugin-graph": "0.8.4-main.c4373fc",
83
- "@dxos/react-ui-attention": "0.8.4-main.c4373fc",
84
- "@dxos/react-ui-editor": "0.8.4-main.c4373fc",
85
- "@dxos/react-ui-form": "0.8.4-main.c4373fc",
86
- "@dxos/react-ui-grid": "0.8.4-main.c4373fc",
87
- "@dxos/react-ui-list": "0.8.4-main.c4373fc",
88
- "@dxos/react-hooks": "0.8.4-main.c4373fc",
89
- "@dxos/react-client": "0.8.4-main.c4373fc",
90
- "@dxos/react-ui-menu": "0.8.4-main.c4373fc",
91
- "@dxos/react-ui-stack": "0.8.4-main.c4373fc",
92
- "@dxos/schema": "0.8.4-main.c4373fc",
93
- "@dxos/util": "0.8.4-main.c4373fc"
61
+ "@dxos/app-toolkit": "0.8.4-main.c85a9c8dae",
62
+ "@dxos/app-framework": "0.8.4-main.c85a9c8dae",
63
+ "@dxos/async": "0.8.4-main.c85a9c8dae",
64
+ "@dxos/compute": "0.8.4-main.c85a9c8dae",
65
+ "@dxos/client": "0.8.4-main.c85a9c8dae",
66
+ "@dxos/context": "0.8.4-main.c85a9c8dae",
67
+ "@dxos/debug": "0.8.4-main.c85a9c8dae",
68
+ "@dxos/crypto": "0.8.4-main.c85a9c8dae",
69
+ "@dxos/echo": "0.8.4-main.c85a9c8dae",
70
+ "@dxos/echo-db": "0.8.4-main.c85a9c8dae",
71
+ "@dxos/functions": "0.8.4-main.c85a9c8dae",
72
+ "@dxos/invariant": "0.8.4-main.c85a9c8dae",
73
+ "@dxos/lit-grid": "0.8.4-main.c85a9c8dae",
74
+ "@dxos/keys": "0.8.4-main.c85a9c8dae",
75
+ "@dxos/operation": "0.8.4-main.c85a9c8dae",
76
+ "@dxos/log": "0.8.4-main.c85a9c8dae",
77
+ "@dxos/plugin-attention": "0.8.4-main.c85a9c8dae",
78
+ "@dxos/plugin-client": "0.8.4-main.c85a9c8dae",
79
+ "@dxos/plugin-automation": "0.8.4-main.c85a9c8dae",
80
+ "@dxos/plugin-deck": "0.8.4-main.c85a9c8dae",
81
+ "@dxos/plugin-graph": "0.8.4-main.c85a9c8dae",
82
+ "@dxos/plugin-markdown": "0.8.4-main.c85a9c8dae",
83
+ "@dxos/plugin-script": "0.8.4-main.c85a9c8dae",
84
+ "@dxos/plugin-space": "0.8.4-main.c85a9c8dae",
85
+ "@dxos/plugin-stack": "0.8.4-main.c85a9c8dae",
86
+ "@dxos/react-client": "0.8.4-main.c85a9c8dae",
87
+ "@dxos/react-hooks": "0.8.4-main.c85a9c8dae",
88
+ "@dxos/plugin-thread": "0.8.4-main.c85a9c8dae",
89
+ "@dxos/react-ui-attention": "0.8.4-main.c85a9c8dae",
90
+ "@dxos/react-ui-form": "0.8.4-main.c85a9c8dae",
91
+ "@dxos/react-ui-grid": "0.8.4-main.c85a9c8dae",
92
+ "@dxos/react-ui-editor": "0.8.4-main.c85a9c8dae",
93
+ "@dxos/react-ui-list": "0.8.4-main.c85a9c8dae",
94
+ "@dxos/react-ui-menu": "0.8.4-main.c85a9c8dae",
95
+ "@dxos/react-ui-mosaic": "0.8.4-main.c85a9c8dae",
96
+ "@dxos/react-ui-stack": "0.8.4-main.c85a9c8dae",
97
+ "@dxos/types": "0.8.4-main.c85a9c8dae",
98
+ "@dxos/ui-editor": "0.8.4-main.c85a9c8dae",
99
+ "@dxos/schema": "0.8.4-main.c85a9c8dae",
100
+ "@dxos/util": "0.8.4-main.c85a9c8dae"
94
101
  },
95
102
  "devDependencies": {
96
- "@effect-rx/rx-react": "0.42.4",
97
- "@effect/platform": "0.92.1",
103
+ "@effect-atom/atom-react": "^0.5.0",
104
+ "@effect/platform": "0.94.4",
98
105
  "@lezer/generator": "^1.7.1",
99
106
  "@tldraw/indices": "^2.0.0-alpha.14",
100
107
  "@types/lodash.defaultsdeep": "^4.6.6",
101
- "@types/react": "~19.2.2",
102
- "@types/react-dom": "~19.2.1",
103
- "@types/react-window": "^1.8.8",
104
- "effect": "3.18.3",
105
- "react": "~19.2.0",
106
- "react-dom": "~19.2.0",
107
- "vite": "7.1.9",
108
- "@dxos/echo-generator": "0.8.4-main.c4373fc",
109
- "@dxos/lit-grid": "0.8.4-main.c4373fc",
110
- "@dxos/random": "0.8.4-main.c4373fc",
111
- "@dxos/react-ui-syntax-highlighter": "0.8.4-main.c4373fc",
112
- "@dxos/react-ui": "0.8.4-main.c4373fc",
113
- "@dxos/react-ui-theme": "0.8.4-main.c4373fc",
114
- "@dxos/storybook-utils": "0.8.4-main.c4373fc",
115
- "@dxos/test-utils": "0.8.4-main.c4373fc",
116
- "@dxos/react-ui-types": "0.8.4-main.c4373fc"
108
+ "@types/react": "~19.2.7",
109
+ "@types/react-dom": "~19.2.3",
110
+ "effect": "3.19.16",
111
+ "react": "~19.2.3",
112
+ "react-dom": "~19.2.3",
113
+ "vite": "^7.1.11",
114
+ "@dxos/echo-generator": "0.8.4-main.c85a9c8dae",
115
+ "@dxos/lit-grid": "0.8.4-main.c85a9c8dae",
116
+ "@dxos/random": "0.8.4-main.c85a9c8dae",
117
+ "@dxos/react-ui": "0.8.4-main.c85a9c8dae",
118
+ "@dxos/plugin-testing": "0.8.4-main.c85a9c8dae",
119
+ "@dxos/storybook-utils": "0.8.4-main.c85a9c8dae",
120
+ "@dxos/test-utils": "0.8.4-main.c85a9c8dae",
121
+ "@dxos/ui-theme": "0.8.4-main.c85a9c8dae",
122
+ "@dxos/react-ui-syntax-highlighter": "0.8.4-main.c85a9c8dae",
123
+ "@dxos/ui-types": "0.8.4-main.c85a9c8dae"
117
124
  },
118
125
  "peerDependencies": {
119
- "@effect-rx/rx-react": "^0.34.1",
120
- "@effect/platform": "^0.80.12",
121
- "effect": "^3.13.3",
122
- "react": "^19.0.0",
123
- "react-dom": "^19.0.0",
124
- "@dxos/react-ui": "0.8.4-main.c4373fc",
125
- "@dxos/react-ui-theme": "0.8.4-main.c4373fc"
126
+ "@effect-atom/atom-react": "^0.5.0",
127
+ "@effect/platform": "0.94.4",
128
+ "effect": "3.19.16",
129
+ "react": "~19.2.3",
130
+ "react-dom": "~19.2.3",
131
+ "@dxos/ui-theme": "0.8.4-main.c85a9c8dae",
132
+ "@dxos/react-ui": "0.8.4-main.c85a9c8dae"
126
133
  },
127
134
  "publishConfig": {
128
135
  "access": "public"
@@ -2,83 +2,63 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import {
6
- Capabilities,
7
- Events,
8
- allOf,
9
- contributes,
10
- createIntent,
11
- defineModule,
12
- definePlugin,
13
- } from '@dxos/app-framework';
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { ActivationEvent, Capability, Plugin } from '@dxos/app-framework';
8
+ import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
9
+ import { Operation } from '@dxos/operation';
14
10
  import { AutomationEvents } from '@dxos/plugin-automation';
15
11
  import { ClientEvents } from '@dxos/plugin-client';
16
12
  import { MarkdownEvents } from '@dxos/plugin-markdown';
17
- import { SpaceCapabilities } from '@dxos/plugin-space';
18
- import { defineObjectForm } from '@dxos/plugin-space/types';
13
+ import { SpaceCapabilities, SpaceEvents } from '@dxos/plugin-space';
14
+ import { type CreateObject } from '@dxos/plugin-space/types';
19
15
 
20
- import { AnchorSort, ComputeGraphRegistry, IntentResolver, Markdown, ReactSurface } from './capabilities';
16
+ import { AnchorSort, ComputeGraphRegistry, Markdown, OperationResolver, ReactSurface } from './capabilities';
21
17
  import { meta } from './meta';
22
18
  import { serializer } from './serializer';
23
19
  import { translations } from './translations';
24
- import { SheetAction, SheetType } from './types';
20
+ import { Sheet, SheetOperation } from './types';
25
21
 
26
- export const SheetPlugin = definePlugin(meta, () => [
27
- defineModule({
28
- id: `${meta.id}/module/compute-graph-registry`,
29
- activatesOn: allOf(ClientEvents.ClientReady, AutomationEvents.ComputeRuntimeReady),
30
- activate: ComputeGraphRegistry,
22
+ export const SheetPlugin = Plugin.define(meta).pipe(
23
+ AppPlugin.addMetadataModule({
24
+ metadata: {
25
+ id: Sheet.Sheet.typename,
26
+ metadata: {
27
+ label: (object: Sheet.Sheet) => object.name,
28
+ icon: 'ph--grid-nine--regular',
29
+ iconHue: 'indigo',
30
+ serializer,
31
+ comments: 'anchored',
32
+ createObject: ((props) => Effect.sync(() => Sheet.make(props))) satisfies CreateObject,
33
+ },
34
+ },
31
35
  }),
32
- defineModule({
33
- id: `${meta.id}/module/translations`,
34
- activatesOn: Events.SetupTranslations,
35
- activate: () => contributes(Capabilities.Translations, translations),
36
- }),
37
- defineModule({
38
- id: `${meta.id}/module/metadata`,
39
- activatesOn: Events.SetupMetadata,
40
- activate: () =>
41
- contributes(Capabilities.Metadata, {
42
- id: SheetType.typename,
43
- metadata: {
44
- label: (object: SheetType) => object.name,
45
- icon: 'ph--grid-nine--regular',
46
- serializer,
47
- comments: 'anchored',
48
- },
49
- }),
36
+ AppPlugin.addOperationResolverModule({ activate: OperationResolver }),
37
+ AppPlugin.addSchemaModule({ schema: [Sheet.Sheet] }),
38
+ AppPlugin.addSurfaceModule({ activate: ReactSurface }),
39
+ AppPlugin.addTranslationsModule({ translations }),
40
+ Plugin.addModule({
41
+ activatesOn: ActivationEvent.allOf(ClientEvents.ClientReady, AutomationEvents.ComputeRuntimeReady),
42
+ activate: ComputeGraphRegistry,
50
43
  }),
51
- defineModule({
52
- id: `${meta.id}/module/object-form`,
53
- activatesOn: ClientEvents.SetupSchema,
44
+ Plugin.addModule({
45
+ id: 'on-space-created',
46
+ activatesOn: SpaceEvents.SpaceCreated,
54
47
  activate: () =>
55
- contributes(
56
- SpaceCapabilities.ObjectForm,
57
- defineObjectForm({
58
- objectSchema: SheetType,
59
- getIntent: (props, options) => createIntent(SheetAction.Create, { ...props, space: options.space }),
60
- }),
48
+ Effect.succeed(
49
+ Capability.contributes(SpaceCapabilities.OnCreateSpace, (params) =>
50
+ Operation.invoke(SheetOperation.OnCreateSpace, params),
51
+ ),
61
52
  ),
62
53
  }),
63
- defineModule({
64
- id: `${meta.id}/module/markdown`,
54
+ Plugin.addModule({
65
55
  activatesOn: MarkdownEvents.SetupExtensions,
66
56
  activate: Markdown,
67
57
  }),
68
- defineModule({
69
- id: `${meta.id}/module/anchor-sort`,
58
+ Plugin.addModule({
70
59
  // TODO(wittjosiah): More relevant event?
71
- activatesOn: Events.AppGraphReady,
60
+ activatesOn: AppActivationEvents.AppGraphReady,
72
61
  activate: AnchorSort,
73
62
  }),
74
- defineModule({
75
- id: `${meta.id}/module/react-surface`,
76
- activatesOn: Events.SetupReactSurface,
77
- activate: ReactSurface,
78
- }),
79
- defineModule({
80
- id: `${meta.id}/module/intent-resolver`,
81
- activatesOn: Events.SetupIntentResolver,
82
- activate: IntentResolver,
83
- }),
84
- ]);
63
+ Plugin.make,
64
+ );
@@ -0,0 +1,27 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { AppCapabilities } from '@dxos/app-toolkit';
9
+ import { Relation } from '@dxos/echo';
10
+
11
+ import { Sheet, compareIndexPositions } from '../../types';
12
+
13
+ export default Capability.makeModule(() =>
14
+ Effect.succeed(
15
+ Capability.contributes(AppCapabilities.AnchorSort, {
16
+ key: Sheet.Sheet.typename,
17
+ sort: (anchorA, anchorB) => {
18
+ const sheet = Relation.getTarget(anchorA) as Sheet.Sheet;
19
+ if (sheet !== Relation.getTarget(anchorB)) {
20
+ return 0;
21
+ }
22
+
23
+ return !anchorA.anchor || !anchorB.anchor ? 0 : compareIndexPositions(sheet, anchorA.anchor, anchorB.anchor);
24
+ },
25
+ }),
26
+ ),
27
+ );
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const AnchorSort = Capability.lazy('AnchorSort', () => import('./anchor-sort'));
@@ -0,0 +1,27 @@
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 { AutomationCapabilities } from '@dxos/plugin-automation';
9
+
10
+ import { SheetCapabilities } from '../../types';
11
+
12
+ // Locally declare the Automation ComputeRuntime capability by ID to avoid direct import dependency.
13
+
14
+ export default Capability.makeModule(
15
+ Effect.fnUntraced(function* () {
16
+ const computeRuntimeResolver = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
17
+ // TODO(wittjosiah): This can probably be a module level import now due to lazy capability loading.
18
+ // Async import removes direct dependency on hyperformula.
19
+ const { defaultPlugins, ComputeGraphRegistry } = yield* Effect.tryPromise(() => import('@dxos/compute'));
20
+ const computeGraphRegistry = new ComputeGraphRegistry({
21
+ plugins: defaultPlugins,
22
+ computeRuntime: computeRuntimeResolver,
23
+ });
24
+
25
+ return Capability.contributes(SheetCapabilities.ComputeGraphRegistry, computeGraphRegistry);
26
+ }),
27
+ );
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const ComputeGraphRegistry = Capability.lazy('ComputeGraphRegistry', () => import('./compute-graph-registry'));
@@ -2,12 +2,8 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { lazy } from '@dxos/app-framework';
6
-
7
- export const AnchorSort = lazy(() => import('./anchor-sort'));
8
- export const ComputeGraphRegistry = lazy(() => import('./compute-graph-registry'));
9
- export const IntentResolver = lazy(() => import('./intent-resolver'));
10
- export const Markdown = lazy(() => import('./markdown'));
11
- export const ReactSurface = lazy(() => import('./react-surface'));
12
-
13
- export * from './capabilities';
5
+ export * from './anchor-sort';
6
+ export * from './compute-graph-registry';
7
+ export * from './markdown';
8
+ export * from './operation-resolver';
9
+ export * from './react-surface';
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const Markdown = Capability.lazy('Markdown', () => import('./markdown'));
@@ -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 { getSpace } from '@dxos/client/echo';
9
+ import { MarkdownCapabilities } from '@dxos/plugin-markdown';
10
+
11
+ import { computeGraphFacet } from '../../extensions';
12
+ import { SheetCapabilities } from '../../types';
13
+
14
+ export default Capability.makeModule(
15
+ Effect.fnUntraced(function* () {
16
+ // Get context for lazy capability access in callbacks.
17
+ const capabilities = yield* Capability.Service;
18
+
19
+ return Capability.contributes(MarkdownCapabilities.Extensions, [
20
+ ({ document: doc }) => {
21
+ const computeGraphRegistry = capabilities.get(SheetCapabilities.ComputeGraphRegistry);
22
+ const space = getSpace(doc);
23
+ if (space) {
24
+ const computeGraph = computeGraphRegistry.getOrCreateGraph(space);
25
+ return computeGraphFacet.of(computeGraph);
26
+ }
27
+ },
28
+ ]);
29
+ }),
30
+ );
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const OperationResolver = Capability.lazy('OperationResolver', () => import('./operation-resolver'));
@@ -0,0 +1,77 @@
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
+ import { Obj, Ref, Type } from '@dxos/echo';
9
+ import { OperationResolver } from '@dxos/operation';
10
+ import { ManagedCollection } from '@dxos/schema';
11
+
12
+ import { meta } from '../../meta';
13
+ import { Sheet, SheetOperation } from '../../types';
14
+
15
+ export default Capability.makeModule(() =>
16
+ Effect.succeed([
17
+ Capability.contributes(Capabilities.UndoMapping, [
18
+ UndoMapping.make({
19
+ operation: SheetOperation.DropAxis,
20
+ inverse: SheetOperation.RestoreAxis,
21
+ deriveContext: (input, output) => ({
22
+ model: input.model,
23
+ axis: output.axis,
24
+ axisIndex: output.axisIndex,
25
+ index: output.index,
26
+ axisMeta: output.axisMeta,
27
+ values: output.values,
28
+ }),
29
+ message: ['axis dropped label', { ns: meta.id }],
30
+ }),
31
+ ]),
32
+ Capability.contributes(Capabilities.OperationResolver, [
33
+ OperationResolver.make({
34
+ operation: SheetOperation.OnCreateSpace,
35
+ handler: Effect.fnUntraced(function* ({ rootCollection }) {
36
+ const collection = ManagedCollection.makeManagedCollection({ key: Type.getTypename(Sheet.Sheet) });
37
+ Obj.change(rootCollection, (c) => {
38
+ c.objects.push(Ref.make(collection));
39
+ });
40
+ }),
41
+ }),
42
+ OperationResolver.make({
43
+ operation: SheetOperation.InsertAxis,
44
+ handler: ({ model, axis, index, count }) =>
45
+ Effect.sync(() => {
46
+ model[axis === 'col' ? 'insertColumns' : 'insertRows'](index, count);
47
+ }),
48
+ }),
49
+ OperationResolver.make({
50
+ operation: SheetOperation.DropAxis,
51
+ handler: ({ model, axis, axisIndex }) =>
52
+ Effect.sync(() => {
53
+ const undoData = model[axis === 'col' ? 'dropColumn' : 'dropRow'](axisIndex);
54
+ // Return data needed for undo.
55
+ return {
56
+ axis: undoData.axis,
57
+ axisIndex: undoData.axisIndex,
58
+ index: undoData.index,
59
+ axisMeta: undoData.axisMeta,
60
+ values: undoData.values,
61
+ };
62
+ }),
63
+ }),
64
+
65
+ //
66
+ // RestoreAxis (inverse of DropAxis)
67
+ //
68
+ OperationResolver.make({
69
+ operation: SheetOperation.RestoreAxis,
70
+ handler: ({ model, axis, ...restoreData }) =>
71
+ Effect.sync(() => {
72
+ model[axis === 'col' ? 'restoreColumn' : 'restoreRow'](restoreData);
73
+ }),
74
+ }),
75
+ ]),
76
+ ]),
77
+ );
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
@@ -0,0 +1,46 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import React from 'react';
7
+
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { Surface, useCapability } from '@dxos/app-framework/ui';
10
+ import { Obj } from '@dxos/echo';
11
+ import { getSpace } from '@dxos/react-client/echo';
12
+
13
+ import { RangeList, SheetContainer } from '../../containers';
14
+ import { meta } from '../../meta';
15
+ import { Sheet, SheetCapabilities } from '../../types';
16
+
17
+ export default Capability.makeModule(() =>
18
+ Effect.succeed(
19
+ Capability.contributes(Capabilities.ReactSurface, [
20
+ Surface.create({
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
+ <SheetContainer
30
+ role={role}
31
+ subject={data.subject}
32
+ space={getSpace(data.subject)!}
33
+ registry={computeGraphRegistry}
34
+ />
35
+ );
36
+ },
37
+ }),
38
+ 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),
42
+ component: ({ data }) => <RangeList sheet={data.subject} />,
43
+ }),
44
+ ]),
45
+ ),
46
+ );
@@ -6,8 +6,8 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
  import React, { useEffect, useRef, useState } from 'react';
7
7
 
8
8
  import { testFunctionPlugins } from '@dxos/compute/testing';
9
- import { Filter, Obj } from '@dxos/echo';
10
- import { FunctionType } from '@dxos/functions';
9
+ import { Filter } from '@dxos/echo';
10
+ import { Function } from '@dxos/functions';
11
11
  import { useSpace } from '@dxos/react-client/echo';
12
12
  import { withClientProvider } from '@dxos/react-client/testing';
13
13
  import { Button, Input, Toolbar } from '@dxos/react-ui';
@@ -16,7 +16,7 @@ import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
16
16
 
17
17
  import { useSheetModel } from '../../model';
18
18
  import { withComputeGraphDecorator } from '../../testing';
19
- import { SheetType, createSheet } from '../../types';
19
+ import { Sheet } from '../../types';
20
20
 
21
21
  import { useComputeGraph } from './ComputeGraphContextProvider';
22
22
 
@@ -25,13 +25,13 @@ const FUNCTION_NAME = 'TEST';
25
25
  const DefaultStory = () => {
26
26
  const space = useSpace();
27
27
  const graph = useComputeGraph(space);
28
- const [sheet, setSheet] = useState<SheetType>();
28
+ const [sheet, setSheet] = useState<Sheet.Sheet>();
29
29
  const [text, setText] = useState(`${FUNCTION_NAME}(100)`);
30
30
  const [result, setResult] = useState<any>();
31
31
  const model = useSheetModel(graph, sheet);
32
32
  useEffect(() => {
33
33
  if (space) {
34
- const sheet = space.db.add(createSheet());
34
+ const sheet = space.db.add(Sheet.make());
35
35
  setSheet(sheet);
36
36
  }
37
37
  }, [space]);
@@ -44,14 +44,14 @@ const DefaultStory = () => {
44
44
  setResult({ functions: { standard: f1.length, echo: f2.length } });
45
45
  });
46
46
 
47
- space.db.add(Obj.make(FunctionType, { name: 'test', version: '0.0.1', binding: FUNCTION_NAME }));
47
+ space.db.add(Function.make({ name: 'test', version: '0.0.1', binding: FUNCTION_NAME }));
48
48
  }
49
49
  }, [space, graph]);
50
50
 
51
51
  const inputRef = useRef<HTMLInputElement | null>(null);
52
52
  const handleTest = async () => {
53
53
  if (space && graph) {
54
- const { objects } = await space.db.query(Filter.type(FunctionType)).run();
54
+ const objects = await space.db.query(Filter.type(Function.Function)).run();
55
55
  const mapped = graph.mapFunctionBindingToId(text);
56
56
  const unmapped = graph.mapFunctionBindingFromId(mapped);
57
57
  const internal = graph.mapFormulaToNative(text);
@@ -84,11 +84,11 @@ const DefaultStory = () => {
84
84
  export const Default: Story = {};
85
85
 
86
86
  const meta = {
87
- title: 'plugins/plugin-sheet/functions',
87
+ title: 'plugins/plugin-sheet/components/functions',
88
88
  render: DefaultStory,
89
89
  decorators: [
90
- withTheme,
91
- withClientProvider({ types: [FunctionType, SheetType], createIdentity: true, createSpace: true }),
90
+ withTheme(),
91
+ withClientProvider({ types: [Function.Function, Sheet.Sheet], createIdentity: true, createSpace: true }),
92
92
  withComputeGraphDecorator({ plugins: testFunctionPlugins }),
93
93
  ],
94
94
  } satisfies Meta<typeof DefaultStory>;