@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
@@ -1,23 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { type PluginContext, contributes } from '@dxos/app-framework';
6
- import { AutomationCapabilities } from '@dxos/plugin-automation';
7
-
8
- import { SheetCapabilities } from './capabilities';
9
-
10
- // Locally declare the Automation ComputeRuntime capability by ID to avoid direct import dependency.
11
-
12
- export default async (context: PluginContext) => {
13
- // TODO(wittjosiah): This can probably be a module level import now due to lazy capability loading.
14
- // Async import removes direct dependency on hyperformula.
15
- const { defaultPlugins, ComputeGraphRegistry } = await import('@dxos/compute');
16
- const computeRuntimeResolver = context.getCapability(AutomationCapabilities.ComputeRuntime);
17
-
18
- const computeGraphRegistry = new ComputeGraphRegistry({
19
- plugins: defaultPlugins,
20
- computeRuntime: computeRuntimeResolver,
21
- });
22
- return contributes(SheetCapabilities.ComputeGraphRegistry, computeGraphRegistry);
23
- };
@@ -1,38 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { Capabilities, contributes, createResolver } from '@dxos/app-framework';
6
-
7
- import { meta } from '../meta';
8
- import { SheetAction, createSheet } from '../types';
9
-
10
- export default () =>
11
- contributes(Capabilities.IntentResolver, [
12
- createResolver({
13
- intent: SheetAction.Create,
14
- resolve: ({ name }) => ({ data: { object: createSheet({ name }) } }),
15
- }),
16
- createResolver({
17
- intent: SheetAction.InsertAxis,
18
- resolve: ({ model, axis, index, count }) => {
19
- const _indices = model[axis === 'col' ? 'insertColumns' : 'insertRows'](index, count);
20
- },
21
- }),
22
- createResolver({
23
- intent: SheetAction.DropAxis,
24
- resolve: ({ model, axis, axisIndex, deletionData }, undo) => {
25
- if (!undo) {
26
- const undoData = model[axis === 'col' ? 'dropColumn' : 'dropRow'](axisIndex);
27
- return {
28
- undoable: {
29
- message: [`${axis} dropped label`, { ns: meta.id }],
30
- data: { ...undoData, model },
31
- },
32
- };
33
- } else if (undo && deletionData) {
34
- model[deletionData.axis === 'col' ? 'restoreColumn' : 'restoreRow'](deletionData);
35
- }
36
- },
37
- }),
38
- ]);
@@ -1,23 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { type PluginContext, contributes } from '@dxos/app-framework';
6
- import { getSpace } from '@dxos/client/echo';
7
- import { MarkdownCapabilities } from '@dxos/plugin-markdown';
8
-
9
- import { computeGraphFacet } from '../extensions';
10
-
11
- import { SheetCapabilities } from './capabilities';
12
-
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
- ]);
@@ -1,40 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import React from 'react';
6
-
7
- import { Capabilities, contributes, createSurface, useCapability } from '@dxos/app-framework';
8
- import { Obj } from '@dxos/echo';
9
- import { getSpace } from '@dxos/react-client/echo';
10
-
11
- import { ComputeGraphContextProvider, RangeList, SheetContainer } from '../components';
12
- import { meta } from '../meta';
13
- import { SheetType } from '../types';
14
-
15
- import { SheetCapabilities } from './capabilities';
16
-
17
- export default () =>
18
- contributes(Capabilities.ReactSurface, [
19
- createSurface({
20
- id: `${meta.id}/sheet`,
21
- role: ['article', 'section'],
22
- filter: (data): data is { subject: SheetType } =>
23
- Obj.instanceOf(SheetType, data.subject) && !!getSpace(data.subject),
24
- component: ({ data, role }) => {
25
- const computeGraphRegistry = useCapability(SheetCapabilities.ComputeGraphRegistry);
26
-
27
- return (
28
- <ComputeGraphContextProvider registry={computeGraphRegistry}>
29
- <SheetContainer space={getSpace(data.subject)!} sheet={data.subject} role={role} />
30
- </ComputeGraphContextProvider>
31
- );
32
- },
33
- }),
34
- createSurface({
35
- id: `${meta.id}/object-settings`,
36
- role: 'object-settings',
37
- filter: (data): data is { subject: SheetType } => Obj.instanceOf(SheetType, data.subject),
38
- component: ({ data }) => <RangeList sheet={data.subject} />,
39
- }),
40
- ]);
@@ -1,90 +0,0 @@
1
- //
2
- // Copyright 2024 DXOS.org
3
- //
4
-
5
- import { type Meta } from '@storybook/react-vite';
6
- import React from 'react';
7
-
8
- import { Capabilities, IntentPlugin, contributes, createResolver } from '@dxos/app-framework';
9
- import { withPluginManager } from '@dxos/app-framework/testing';
10
- import { GraphPlugin } from '@dxos/plugin-graph';
11
- import { fullyQualifiedId, useSpace } from '@dxos/react-client/echo';
12
- import { withClientProvider } from '@dxos/react-client/testing';
13
- import { withTheme } from '@dxos/react-ui/testing';
14
- import { AttendableContainer } from '@dxos/react-ui-attention';
15
- import { withAttention } from '@dxos/react-ui-attention/testing';
16
-
17
- import { createTestCells, useTestSheet, withComputeGraphDecorator } from '../../testing';
18
- import { translations } from '../../translations';
19
- import { SheetAction, SheetType } from '../../types';
20
- import { useComputeGraph } from '../ComputeGraph';
21
- import { RangeList } from '../RangeList';
22
-
23
- import { SheetContainer } from './SheetContainer';
24
-
25
- const meta = {
26
- title: 'plugins/plugin-sheet/SheetContainer',
27
- component: SheetContainer,
28
- decorators: [
29
- withTheme,
30
- withClientProvider({ types: [SheetType], createSpace: true }),
31
- withComputeGraphDecorator(),
32
- withAttention,
33
- // TODO(wittjosiah): Consider whether we should refactor component so story doesn't need to depend on intents.
34
- withPluginManager({
35
- plugins: [IntentPlugin(), GraphPlugin()],
36
- capabilities: [
37
- contributes(
38
- Capabilities.IntentResolver,
39
- createResolver({
40
- intent: SheetAction.DropAxis,
41
- resolve: ({ model, axis, axisIndex }) => {
42
- model[axis === 'col' ? 'dropColumn' : 'dropRow'](axisIndex);
43
- },
44
- }),
45
- ),
46
- ],
47
- }),
48
- ],
49
- parameters: {
50
- layout: 'fullscreen',
51
- translations,
52
- },
53
- } satisfies Meta<typeof SheetContainer>;
54
-
55
- export default meta;
56
-
57
- export const Default = () => {
58
- const space = useSpace();
59
- const graph = useComputeGraph(space);
60
- const sheet = useTestSheet(space, graph, { cells: createTestCells() });
61
- if (!sheet || !space) {
62
- return null;
63
- }
64
-
65
- return (
66
- <AttendableContainer id={fullyQualifiedId(sheet)} classNames='contents'>
67
- <SheetContainer space={space} sheet={sheet} role='story' ignoreAttention />
68
- </AttendableContainer>
69
- );
70
- };
71
-
72
- export const Spec = () => {
73
- const space = useSpace();
74
- const graph = useComputeGraph(space);
75
- const sheet = useTestSheet(space, graph, { cells: { A1: { value: 'Ready' } } });
76
- if (!sheet || !space) {
77
- return null;
78
- }
79
-
80
- return (
81
- <AttendableContainer id={fullyQualifiedId(sheet)} classNames='contents'>
82
- <div role='none' className='grid grid-rows-[66%_33%] bs-full grid-cols-1'>
83
- <SheetContainer space={space} sheet={sheet} role='story' ignoreAttention />
84
- <div role='none' data-testid='grid.range-list'>
85
- <RangeList sheet={sheet} />
86
- </div>
87
- </div>
88
- </AttendableContainer>
89
- );
90
- };
@@ -1,40 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import React from 'react';
6
-
7
- import { type Space, fullyQualifiedId } from '@dxos/react-client/echo';
8
- import { StackItem } from '@dxos/react-ui-stack';
9
-
10
- import { type SheetType } from '../../types';
11
- import { useComputeGraph } from '../ComputeGraph';
12
- import { FunctionEditor } from '../FunctionEditor';
13
- import { GridSheet } from '../GridSheet';
14
- import { SheetProvider } from '../SheetContext';
15
- import { SheetToolbar } from '../SheetToolbar';
16
-
17
- export type SheetContainerProps = {
18
- space: Space;
19
- sheet: SheetType;
20
- role?: string;
21
- ignoreAttention?: boolean;
22
- };
23
-
24
- export const SheetContainer = ({ space, sheet, role, ignoreAttention }: SheetContainerProps) => {
25
- const graph = useComputeGraph(space);
26
-
27
- return graph ? (
28
- <SheetProvider sheet={sheet} graph={graph} ignoreAttention={ignoreAttention}>
29
- <StackItem.Content
30
- toolbar
31
- statusbar
32
- classNames={[role === 'section' && 'aspect-video', role === 'story' && 'bs-full']}
33
- >
34
- <SheetToolbar id={fullyQualifiedId(sheet)} />
35
- <GridSheet />
36
- <FunctionEditor />
37
- </StackItem.Content>
38
- </SheetProvider>
39
- ) : null;
40
- };
@@ -1,5 +0,0 @@
1
- //
2
- // Copyright 2024 DXOS.org
3
- //
4
-
5
- export * from './SheetContext';
@@ -1,61 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import * as Schema from 'effect/Schema';
6
-
7
- import { Type } from '@dxos/echo';
8
-
9
- export const CellValue = Schema.Struct({
10
- // TODO(burdon): How to store dates (datetime, date, time), percentages, etc.
11
- // Consider import/export; natural access for other plugins. Special handling for currency (precision).
12
- // TODO(burdon): Automerge (long string) or short string or number.
13
- value: Schema.Any,
14
- });
15
-
16
- export type CellValue = Schema.Schema.Type<typeof CellValue>;
17
-
18
- // TODO(burdon): IMPORTANT: Reconcile with Field definition.
19
- export const Range = Schema.Struct({
20
- range: Schema.String,
21
- key: Schema.String,
22
- value: Schema.String,
23
- });
24
-
25
- export type Range = Schema.Schema.Type<typeof Range>;
26
-
27
- // TODO(burdon): Visibility, locked, frozen, etc.
28
- export const RowColumnMeta = Schema.Struct({
29
- size: Schema.optional(Schema.Number),
30
- });
31
-
32
- // TODO(burdon): Reconcile col/column (across packages).
33
- // TODO(burdon): Index to all updates when rows/columns are inserted/deleted.
34
- export const SheetType = Schema.Struct({
35
- name: Schema.optional(Schema.String),
36
-
37
- // Sparse map of cells referenced by index.
38
- cells: Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.mutable(CellValue) })),
39
-
40
- // Ordered row indices.
41
- rows: Schema.mutable(Schema.Array(Schema.String)),
42
-
43
- // Ordered column indices.
44
- columns: Schema.mutable(Schema.Array(Schema.String)),
45
-
46
- // Row metadata referenced by index.
47
- rowMeta: Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.mutable(RowColumnMeta) })),
48
-
49
- // Column metadata referenced by index.
50
- columnMeta: Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.mutable(RowColumnMeta) })),
51
-
52
- // Cell formatting referenced by indexed range.
53
- ranges: Schema.mutable(Schema.Array(Range)),
54
- }).pipe(
55
- Type.Obj({
56
- typename: 'dxos.org/type/Sheet',
57
- version: '0.1.0',
58
- }),
59
- );
60
-
61
- export interface SheetType extends Schema.Schema.Type<typeof SheetType> {}