@dxos/plugin-sheet 0.8.4-main.72ec0f3 → 0.8.4-main.7996785055

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 (348) hide show
  1. package/dist/lib/browser/RangeList-RRNK4LL5.mjs +50 -0
  2. package/dist/lib/browser/RangeList-RRNK4LL5.mjs.map +7 -0
  3. package/dist/lib/browser/SheetContainer-N7GPNSOM.mjs +44 -0
  4. package/dist/lib/browser/SheetContainer-N7GPNSOM.mjs.map +7 -0
  5. package/dist/lib/browser/{anchor-sort-FCQ5OZZK.mjs → anchor-sort-J4Y5NKYR.mjs} +9 -7
  6. package/dist/lib/browser/anchor-sort-J4Y5NKYR.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-AIOU5OTJ.mjs +118 -0
  8. package/dist/lib/browser/chunk-AIOU5OTJ.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-BZEV7AQM.mjs +278 -0
  10. package/dist/lib/browser/chunk-BZEV7AQM.mjs.map +7 -0
  11. package/dist/lib/browser/{chunk-FWFAAGXL.mjs → chunk-MFMDZ433.mjs} +2 -2
  12. package/dist/lib/browser/chunk-MFMDZ433.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-7VEWYJJN.mjs → chunk-NNWF7EKC.mjs} +13 -13
  14. package/dist/lib/browser/chunk-NNWF7EKC.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-T5XHKC7L.mjs +1771 -0
  16. package/dist/lib/browser/chunk-T5XHKC7L.mjs.map +7 -0
  17. package/dist/lib/browser/chunk-UZ4SHAES.mjs +8 -0
  18. package/dist/lib/browser/chunk-UZ4SHAES.mjs.map +7 -0
  19. package/dist/lib/browser/compute-graph-registry-FEG3DN5R.mjs +22 -0
  20. package/dist/lib/browser/compute-graph-registry-FEG3DN5R.mjs.map +7 -0
  21. package/dist/lib/browser/drop-axis-UTOJ5MVT.mjs +23 -0
  22. package/dist/lib/browser/drop-axis-UTOJ5MVT.mjs.map +7 -0
  23. package/dist/lib/browser/index.mjs +94 -76
  24. package/dist/lib/browser/index.mjs.map +4 -4
  25. package/dist/lib/browser/insert-axis-OS5VFQDK.mjs +16 -0
  26. package/dist/lib/browser/insert-axis-OS5VFQDK.mjs.map +7 -0
  27. package/dist/lib/browser/markdown-ZDM2HMK6.mjs +30 -0
  28. package/dist/lib/browser/markdown-ZDM2HMK6.mjs.map +7 -0
  29. package/dist/lib/browser/meta.json +1 -1
  30. package/dist/lib/browser/operation-handler-5PGGEH6O.mjs +16 -0
  31. package/dist/lib/browser/operation-handler-5PGGEH6O.mjs.map +7 -0
  32. package/dist/lib/browser/operations/index.mjs +12 -0
  33. package/dist/lib/browser/operations/index.mjs.map +7 -0
  34. package/dist/lib/browser/react-surface-7LK375A6.mjs +54 -0
  35. package/dist/lib/browser/react-surface-7LK375A6.mjs.map +7 -0
  36. package/dist/lib/browser/restore-axis-O7PHU7ON.mjs +16 -0
  37. package/dist/lib/browser/restore-axis-O7PHU7ON.mjs.map +7 -0
  38. package/dist/lib/browser/scroll-to-anchor-HNCUXJGW.mjs +37 -0
  39. package/dist/lib/browser/scroll-to-anchor-HNCUXJGW.mjs.map +7 -0
  40. package/dist/lib/browser/state-35W4C372.mjs +31 -0
  41. package/dist/lib/browser/state-35W4C372.mjs.map +7 -0
  42. package/dist/lib/browser/types/index.mjs +4 -2
  43. package/dist/lib/browser/undo-mappings-GTX6XUZK.mjs +35 -0
  44. package/dist/lib/browser/undo-mappings-GTX6XUZK.mjs.map +7 -0
  45. package/dist/lib/node-esm/RangeList-X6IU5QKI.mjs +51 -0
  46. package/dist/lib/node-esm/RangeList-X6IU5QKI.mjs.map +7 -0
  47. package/dist/lib/node-esm/SheetContainer-QFRHGZZE.mjs +45 -0
  48. package/dist/lib/node-esm/SheetContainer-QFRHGZZE.mjs.map +7 -0
  49. package/dist/lib/node-esm/{anchor-sort-ZE7IS7SH.mjs → anchor-sort-XLGKHSB4.mjs} +9 -7
  50. package/dist/lib/node-esm/anchor-sort-XLGKHSB4.mjs.map +7 -0
  51. package/dist/lib/node-esm/chunk-HI3E7P4K.mjs +10 -0
  52. package/dist/lib/node-esm/chunk-HI3E7P4K.mjs.map +7 -0
  53. package/dist/lib/node-esm/chunk-J7XCAKTA.mjs +279 -0
  54. package/dist/lib/node-esm/chunk-J7XCAKTA.mjs.map +7 -0
  55. package/dist/lib/node-esm/{chunk-4QV4AGWK.mjs → chunk-M52YLLWU.mjs} +13 -13
  56. package/dist/lib/node-esm/chunk-M52YLLWU.mjs.map +7 -0
  57. package/dist/lib/node-esm/chunk-PK76XIMN.mjs +1772 -0
  58. package/dist/lib/node-esm/chunk-PK76XIMN.mjs.map +7 -0
  59. package/dist/lib/node-esm/{chunk-HILDMVPL.mjs → chunk-UMXU7BDG.mjs} +2 -2
  60. package/dist/lib/node-esm/chunk-UMXU7BDG.mjs.map +7 -0
  61. package/dist/lib/node-esm/chunk-Z4BXHF76.mjs +119 -0
  62. package/dist/lib/node-esm/chunk-Z4BXHF76.mjs.map +7 -0
  63. package/dist/lib/node-esm/compute-graph-registry-TOMM5AGM.mjs +23 -0
  64. package/dist/lib/node-esm/compute-graph-registry-TOMM5AGM.mjs.map +7 -0
  65. package/dist/lib/node-esm/drop-axis-XFFTKE4J.mjs +24 -0
  66. package/dist/lib/node-esm/drop-axis-XFFTKE4J.mjs.map +7 -0
  67. package/dist/lib/node-esm/index.mjs +94 -76
  68. package/dist/lib/node-esm/index.mjs.map +4 -4
  69. package/dist/lib/node-esm/insert-axis-QYN6V3NH.mjs +17 -0
  70. package/dist/lib/node-esm/insert-axis-QYN6V3NH.mjs.map +7 -0
  71. package/dist/lib/node-esm/markdown-TTSQDUPW.mjs +31 -0
  72. package/dist/lib/node-esm/markdown-TTSQDUPW.mjs.map +7 -0
  73. package/dist/lib/node-esm/meta.json +1 -1
  74. package/dist/lib/node-esm/operation-handler-G6SZSFCD.mjs +17 -0
  75. package/dist/lib/node-esm/operation-handler-G6SZSFCD.mjs.map +7 -0
  76. package/dist/lib/node-esm/operations/index.mjs +13 -0
  77. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  78. package/dist/lib/node-esm/react-surface-OVBFWYD7.mjs +55 -0
  79. package/dist/lib/node-esm/react-surface-OVBFWYD7.mjs.map +7 -0
  80. package/dist/lib/node-esm/restore-axis-WUXX5KAE.mjs +17 -0
  81. package/dist/lib/node-esm/restore-axis-WUXX5KAE.mjs.map +7 -0
  82. package/dist/lib/node-esm/scroll-to-anchor-UUXINUVP.mjs +38 -0
  83. package/dist/lib/node-esm/scroll-to-anchor-UUXINUVP.mjs.map +7 -0
  84. package/dist/lib/node-esm/state-L3SAQ6V7.mjs +32 -0
  85. package/dist/lib/node-esm/state-L3SAQ6V7.mjs.map +7 -0
  86. package/dist/lib/node-esm/types/index.mjs +4 -2
  87. package/dist/lib/node-esm/undo-mappings-CQIVZKAC.mjs +36 -0
  88. package/dist/lib/node-esm/undo-mappings-CQIVZKAC.mjs.map +7 -0
  89. package/dist/types/src/SheetPlugin.d.ts +2 -1
  90. package/dist/types/src/SheetPlugin.d.ts.map +1 -1
  91. package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts +6 -0
  92. package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts.map +1 -0
  93. package/dist/types/src/capabilities/anchor-sort/index.d.ts +3 -0
  94. package/dist/types/src/capabilities/anchor-sort/index.d.ts.map +1 -0
  95. package/dist/types/src/capabilities/compute-graph-registry/compute-graph-registry.d.ts +5 -0
  96. package/dist/types/src/capabilities/compute-graph-registry/compute-graph-registry.d.ts.map +1 -0
  97. package/dist/types/src/capabilities/compute-graph-registry/index.d.ts +3 -0
  98. package/dist/types/src/capabilities/compute-graph-registry/index.d.ts.map +1 -0
  99. package/dist/types/src/capabilities/index.d.ts +7 -6
  100. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  101. package/dist/types/src/capabilities/markdown/index.d.ts +3 -0
  102. package/dist/types/src/capabilities/markdown/index.d.ts.map +1 -0
  103. package/dist/types/src/capabilities/markdown/markdown.d.ts +5 -0
  104. package/dist/types/src/capabilities/markdown/markdown.d.ts.map +1 -0
  105. package/dist/types/src/capabilities/operation-handler/index.d.ts +4 -0
  106. package/dist/types/src/capabilities/operation-handler/index.d.ts.map +1 -0
  107. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts +6 -0
  108. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +1 -0
  109. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  110. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  111. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  112. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  113. package/dist/types/src/capabilities/state/index.d.ts +3 -0
  114. package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
  115. package/dist/types/src/capabilities/state/state.d.ts +6 -0
  116. package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
  117. package/dist/types/src/capabilities/undo-mappings/index.d.ts +3 -0
  118. package/dist/types/src/capabilities/undo-mappings/index.d.ts.map +1 -0
  119. package/dist/types/src/capabilities/undo-mappings/undo-mappings.d.ts +5 -0
  120. package/dist/types/src/capabilities/undo-mappings/undo-mappings.d.ts.map +1 -0
  121. package/dist/types/src/components/ComputeGraph/compute-graph.stories.d.ts.map +1 -1
  122. package/dist/types/src/components/Sheet/Sheet.d.ts +29 -0
  123. package/dist/types/src/components/Sheet/Sheet.d.ts.map +1 -0
  124. package/dist/types/src/components/Sheet/index.d.ts +2 -0
  125. package/dist/types/src/components/Sheet/index.d.ts.map +1 -0
  126. package/dist/types/src/components/{GridSheet → SheetContent}/SheetCellEditor.stories.d.ts +1 -1
  127. package/dist/types/src/components/SheetContent/SheetCellEditor.stories.d.ts.map +1 -0
  128. package/dist/types/src/components/SheetContent/SheetContent.d.ts +10 -0
  129. package/dist/types/src/components/SheetContent/SheetContent.d.ts.map +1 -0
  130. package/dist/types/src/components/{GridSheet/GridSheet.stories.d.ts → SheetContent/SheetContent.stories.d.ts} +10 -2
  131. package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts.map +1 -0
  132. package/dist/types/src/components/SheetContent/index.d.ts +2 -0
  133. package/dist/types/src/components/SheetContent/index.d.ts.map +1 -0
  134. package/dist/types/src/components/SheetContent/util.d.ts.map +1 -0
  135. package/dist/types/src/components/{SheetContext/SheetContext.d.ts → SheetRoot/SheetRoot.d.ts} +6 -4
  136. package/dist/types/src/components/SheetRoot/SheetRoot.d.ts.map +1 -0
  137. package/dist/types/src/components/SheetRoot/index.d.ts +2 -0
  138. package/dist/types/src/components/SheetRoot/index.d.ts.map +1 -0
  139. package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts +10 -0
  140. package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts.map +1 -0
  141. package/dist/types/src/components/SheetStatusbar/index.d.ts +2 -0
  142. package/dist/types/src/components/SheetStatusbar/index.d.ts.map +1 -0
  143. package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts +9 -5
  144. package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts.map +1 -1
  145. package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts +4 -0
  146. package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts.map +1 -1
  147. package/dist/types/src/components/SheetToolbar/align.d.ts +12 -19
  148. package/dist/types/src/components/SheetToolbar/align.d.ts.map +1 -1
  149. package/dist/types/src/components/SheetToolbar/style.d.ts +12 -18
  150. package/dist/types/src/components/SheetToolbar/style.d.ts.map +1 -1
  151. package/dist/types/src/components/SheetToolbar/useToolbarState.d.ts +14 -1
  152. package/dist/types/src/components/SheetToolbar/useToolbarState.d.ts.map +1 -1
  153. package/dist/types/src/components/index.d.ts +1 -4
  154. package/dist/types/src/components/index.d.ts.map +1 -1
  155. package/dist/types/src/{components → containers}/RangeList/RangeList.d.ts.map +1 -1
  156. package/dist/types/src/containers/RangeList/index.d.ts +3 -0
  157. package/dist/types/src/containers/RangeList/index.d.ts.map +1 -0
  158. package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts +12 -0
  159. package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts.map +1 -0
  160. package/dist/types/src/{components → containers}/SheetContainer/SheetContainer.stories.d.ts +3 -1
  161. package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts.map +1 -0
  162. package/dist/types/src/{components → containers}/SheetContainer/index.d.ts.map +1 -1
  163. package/dist/types/src/containers/index.d.ts +4 -0
  164. package/dist/types/src/containers/index.d.ts.map +1 -0
  165. package/dist/types/src/extensions/compute.stories.d.ts.map +1 -1
  166. package/dist/types/src/extensions/editor/sheet-extension.d.ts.map +1 -1
  167. package/dist/types/src/index.d.ts +1 -1
  168. package/dist/types/src/index.d.ts.map +1 -1
  169. package/dist/types/src/integrations/thread-ranges.d.ts +0 -2
  170. package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
  171. package/dist/types/src/meta.d.ts +2 -2
  172. package/dist/types/src/meta.d.ts.map +1 -1
  173. package/dist/types/src/model/sheet-model.d.ts +2 -2
  174. package/dist/types/src/model/sheet-model.d.ts.map +1 -1
  175. package/dist/types/src/operations/definitions.d.ts +45 -0
  176. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  177. package/dist/types/src/operations/drop-axis.d.ts +5 -0
  178. package/dist/types/src/operations/drop-axis.d.ts.map +1 -0
  179. package/dist/types/src/operations/index.d.ts +4 -0
  180. package/dist/types/src/operations/index.d.ts.map +1 -0
  181. package/dist/types/src/operations/insert-axis.d.ts +5 -0
  182. package/dist/types/src/operations/insert-axis.d.ts.map +1 -0
  183. package/dist/types/src/operations/restore-axis.d.ts +5 -0
  184. package/dist/types/src/operations/restore-axis.d.ts.map +1 -0
  185. package/dist/types/src/operations/scroll-to-anchor.d.ts +5 -0
  186. package/dist/types/src/operations/scroll-to-anchor.d.ts.map +1 -0
  187. package/dist/types/src/serializer.d.ts.map +1 -1
  188. package/dist/types/src/testing/testing.d.ts +15 -15
  189. package/dist/types/src/translations.d.ts +2 -0
  190. package/dist/types/src/translations.d.ts.map +1 -1
  191. package/dist/types/src/types/Sheet.d.ts +41 -35
  192. package/dist/types/src/types/Sheet.d.ts.map +1 -1
  193. package/dist/types/src/types/capabilities.d.ts +18 -0
  194. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  195. package/dist/types/src/types/index.d.ts +1 -0
  196. package/dist/types/src/types/index.d.ts.map +1 -1
  197. package/dist/types/src/types/types.d.ts +2 -68
  198. package/dist/types/src/types/types.d.ts.map +1 -1
  199. package/dist/types/src/types/util.d.ts +2 -1
  200. package/dist/types/src/types/util.d.ts.map +1 -1
  201. package/dist/types/tsconfig.tsbuildinfo +1 -1
  202. package/package.json +83 -68
  203. package/src/SheetPlugin.tsx +59 -64
  204. package/src/capabilities/anchor-sort/anchor-sort.ts +27 -0
  205. package/src/capabilities/anchor-sort/index.ts +7 -0
  206. package/src/capabilities/compute-graph-registry/compute-graph-registry.ts +27 -0
  207. package/src/capabilities/compute-graph-registry/index.ts +7 -0
  208. package/src/capabilities/index.ts +7 -9
  209. package/src/capabilities/markdown/index.ts +7 -0
  210. package/src/capabilities/markdown/markdown.ts +30 -0
  211. package/src/capabilities/operation-handler/index.ts +11 -0
  212. package/src/capabilities/operation-handler/operation-handler.ts +16 -0
  213. package/src/capabilities/react-surface/index.ts +7 -0
  214. package/src/capabilities/react-surface/react-surface.tsx +49 -0
  215. package/src/capabilities/state/index.ts +7 -0
  216. package/src/capabilities/state/state.ts +29 -0
  217. package/src/capabilities/undo-mappings/index.ts +7 -0
  218. package/src/capabilities/undo-mappings/undo-mappings.ts +30 -0
  219. package/src/components/ComputeGraph/compute-graph.stories.tsx +11 -6
  220. package/src/components/Sheet/Sheet.tsx +20 -0
  221. package/src/components/Sheet/index.ts +5 -0
  222. package/src/components/{GridSheet → SheetContent}/SheetCellEditor.stories.tsx +9 -6
  223. package/src/components/{GridSheet/GridSheet.stories.tsx → SheetContent/SheetContent.stories.tsx} +14 -13
  224. package/src/components/{GridSheet/GridSheet.tsx → SheetContent/SheetContent.tsx} +62 -44
  225. package/src/components/{RangeList → SheetContent}/index.ts +1 -1
  226. package/src/components/{GridSheet → SheetContent}/util.ts +5 -5
  227. package/src/components/{SheetContext/SheetContext.tsx → SheetRoot/SheetRoot.tsx} +47 -40
  228. package/src/components/{GridSheet → SheetRoot}/index.ts +1 -1
  229. package/src/components/{FunctionEditor/FunctionEditor.tsx → SheetStatusbar/SheetStatusbar.tsx} +18 -6
  230. package/src/components/{FunctionEditor → SheetStatusbar}/index.ts +1 -1
  231. package/src/components/SheetToolbar/SheetToolbar.stories.tsx +4 -4
  232. package/src/components/SheetToolbar/SheetToolbar.tsx +45 -37
  233. package/src/components/SheetToolbar/align.ts +44 -19
  234. package/src/components/SheetToolbar/style.ts +48 -18
  235. package/src/components/SheetToolbar/useToolbarState.ts +22 -5
  236. package/src/components/index.ts +1 -7
  237. package/src/{components → containers}/RangeList/RangeList.tsx +12 -8
  238. package/src/containers/RangeList/index.ts +7 -0
  239. package/src/containers/SheetContainer/SheetContainer.stories.tsx +109 -0
  240. package/src/containers/SheetContainer/SheetContainer.tsx +57 -0
  241. package/src/{components → containers}/SheetContainer/index.ts +1 -1
  242. package/src/containers/index.ts +8 -0
  243. package/src/extensions/compute.stories.tsx +26 -16
  244. package/src/extensions/compute.ts +1 -1
  245. package/src/extensions/editor/sheet-extension.ts +16 -13
  246. package/src/index.ts +1 -1
  247. package/src/integrations/thread-ranges.ts +16 -53
  248. package/src/meta.ts +3 -3
  249. package/src/model/sheet-model.test.ts +2 -2
  250. package/src/model/sheet-model.ts +77 -45
  251. package/src/operations/definitions.ts +73 -0
  252. package/src/operations/drop-axis.ts +26 -0
  253. package/src/operations/index.ts +14 -0
  254. package/src/operations/insert-axis.ts +19 -0
  255. package/src/operations/restore-axis.ts +19 -0
  256. package/src/operations/scroll-to-anchor.ts +31 -0
  257. package/src/playwright/playwright.config.ts +1 -1
  258. package/src/playwright/sheet.spec.ts +2 -1
  259. package/src/sanity.test.ts +6 -3
  260. package/src/serializer.ts +1 -1
  261. package/src/translations.ts +2 -0
  262. package/src/types/Sheet.ts +31 -31
  263. package/src/types/capabilities.ts +26 -0
  264. package/src/types/index.ts +1 -0
  265. package/src/types/sheet-range-types.ts +3 -3
  266. package/src/types/types.ts +4 -40
  267. package/src/types/util.ts +2 -1
  268. package/dist/lib/browser/SheetContainer-66BNB3XG.mjs +0 -349
  269. package/dist/lib/browser/SheetContainer-66BNB3XG.mjs.map +0 -7
  270. package/dist/lib/browser/anchor-sort-FCQ5OZZK.mjs.map +0 -7
  271. package/dist/lib/browser/chunk-73AV3NH6.mjs +0 -15
  272. package/dist/lib/browser/chunk-73AV3NH6.mjs.map +0 -7
  273. package/dist/lib/browser/chunk-7VEWYJJN.mjs.map +0 -7
  274. package/dist/lib/browser/chunk-DVJ3QW3F.mjs +0 -907
  275. package/dist/lib/browser/chunk-DVJ3QW3F.mjs.map +0 -7
  276. package/dist/lib/browser/chunk-FWFAAGXL.mjs.map +0 -7
  277. package/dist/lib/browser/chunk-OU5KTWY3.mjs +0 -852
  278. package/dist/lib/browser/chunk-OU5KTWY3.mjs.map +0 -7
  279. package/dist/lib/browser/compute-graph-registry-AP5RA7W3.mjs +0 -21
  280. package/dist/lib/browser/compute-graph-registry-AP5RA7W3.mjs.map +0 -7
  281. package/dist/lib/browser/intent-resolver-66OAYVQF.mjs +0 -56
  282. package/dist/lib/browser/intent-resolver-66OAYVQF.mjs.map +0 -7
  283. package/dist/lib/browser/markdown-B6VKYY2S.mjs +0 -26
  284. package/dist/lib/browser/markdown-B6VKYY2S.mjs.map +0 -7
  285. package/dist/lib/browser/react-surface-5GYLVSMR.mjs +0 -54
  286. package/dist/lib/browser/react-surface-5GYLVSMR.mjs.map +0 -7
  287. package/dist/lib/node-esm/SheetContainer-NWEQETAY.mjs +0 -350
  288. package/dist/lib/node-esm/SheetContainer-NWEQETAY.mjs.map +0 -7
  289. package/dist/lib/node-esm/anchor-sort-ZE7IS7SH.mjs.map +0 -7
  290. package/dist/lib/node-esm/chunk-44YTKTMP.mjs +0 -16
  291. package/dist/lib/node-esm/chunk-44YTKTMP.mjs.map +0 -7
  292. package/dist/lib/node-esm/chunk-4H2EHVWE.mjs +0 -908
  293. package/dist/lib/node-esm/chunk-4H2EHVWE.mjs.map +0 -7
  294. package/dist/lib/node-esm/chunk-4MT3JJU2.mjs +0 -853
  295. package/dist/lib/node-esm/chunk-4MT3JJU2.mjs.map +0 -7
  296. package/dist/lib/node-esm/chunk-4QV4AGWK.mjs.map +0 -7
  297. package/dist/lib/node-esm/chunk-HILDMVPL.mjs.map +0 -7
  298. package/dist/lib/node-esm/compute-graph-registry-UMQ5UYCL.mjs +0 -22
  299. package/dist/lib/node-esm/compute-graph-registry-UMQ5UYCL.mjs.map +0 -7
  300. package/dist/lib/node-esm/intent-resolver-VNKIMQQT.mjs +0 -57
  301. package/dist/lib/node-esm/intent-resolver-VNKIMQQT.mjs.map +0 -7
  302. package/dist/lib/node-esm/markdown-VKY7HXU2.mjs +0 -27
  303. package/dist/lib/node-esm/markdown-VKY7HXU2.mjs.map +0 -7
  304. package/dist/lib/node-esm/react-surface-RK32YZWR.mjs +0 -55
  305. package/dist/lib/node-esm/react-surface-RK32YZWR.mjs.map +0 -7
  306. package/dist/types/src/capabilities/anchor-sort.d.ts +0 -4
  307. package/dist/types/src/capabilities/anchor-sort.d.ts.map +0 -1
  308. package/dist/types/src/capabilities/capabilities.d.ts +0 -5
  309. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  310. package/dist/types/src/capabilities/compute-graph-registry.d.ts +0 -4
  311. package/dist/types/src/capabilities/compute-graph-registry.d.ts.map +0 -1
  312. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  313. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  314. package/dist/types/src/capabilities/markdown.d.ts +0 -4
  315. package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
  316. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  317. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  318. package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts +0 -3
  319. package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts.map +0 -1
  320. package/dist/types/src/components/FunctionEditor/index.d.ts +0 -2
  321. package/dist/types/src/components/FunctionEditor/index.d.ts.map +0 -1
  322. package/dist/types/src/components/GridSheet/GridSheet.d.ts +0 -3
  323. package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +0 -1
  324. package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +0 -1
  325. package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts.map +0 -1
  326. package/dist/types/src/components/GridSheet/index.d.ts +0 -2
  327. package/dist/types/src/components/GridSheet/index.d.ts.map +0 -1
  328. package/dist/types/src/components/GridSheet/util.d.ts.map +0 -1
  329. package/dist/types/src/components/RangeList/index.d.ts +0 -2
  330. package/dist/types/src/components/RangeList/index.d.ts.map +0 -1
  331. package/dist/types/src/components/SheetContainer/SheetContainer.d.ts +0 -11
  332. package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +0 -1
  333. package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +0 -1
  334. package/dist/types/src/components/SheetContext/SheetContext.d.ts.map +0 -1
  335. package/dist/types/src/components/SheetContext/index.d.ts +0 -2
  336. package/dist/types/src/components/SheetContext/index.d.ts.map +0 -1
  337. package/src/capabilities/anchor-sort.ts +0 -21
  338. package/src/capabilities/capabilities.ts +0 -14
  339. package/src/capabilities/compute-graph-registry.ts +0 -23
  340. package/src/capabilities/intent-resolver.ts +0 -38
  341. package/src/capabilities/markdown.ts +0 -23
  342. package/src/capabilities/react-surface.tsx +0 -41
  343. package/src/components/SheetContainer/SheetContainer.stories.tsx +0 -93
  344. package/src/components/SheetContainer/SheetContainer.tsx +0 -41
  345. package/src/components/SheetContext/index.ts +0 -5
  346. /package/dist/types/src/components/{GridSheet → SheetContent}/util.d.ts +0 -0
  347. /package/dist/types/src/{components → containers}/RangeList/RangeList.d.ts +0 -0
  348. /package/dist/types/src/{components → containers}/SheetContainer/index.d.ts +0 -0
@@ -0,0 +1,14 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { OperationHandlerSet } from '@dxos/operation';
6
+
7
+ export * as SheetOperation from './definitions';
8
+
9
+ export const SheetOperationHandlerSet = OperationHandlerSet.lazy(
10
+ () => import('./drop-axis'),
11
+ () => import('./insert-axis'),
12
+ () => import('./restore-axis'),
13
+ () => import('./scroll-to-anchor'),
14
+ );
@@ -0,0 +1,19 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Operation } from '@dxos/operation';
8
+
9
+ import { InsertAxis } from './definitions';
10
+
11
+ const handler: Operation.WithHandler<typeof InsertAxis> = InsertAxis.pipe(
12
+ Operation.withHandler(({ model, axis, index, count }) =>
13
+ Effect.sync(() => {
14
+ model[axis === 'col' ? 'insertColumns' : 'insertRows'](index, count);
15
+ }),
16
+ ),
17
+ );
18
+
19
+ export default handler;
@@ -0,0 +1,19 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Operation } from '@dxos/operation';
8
+
9
+ import { RestoreAxis } from './definitions';
10
+
11
+ const handler: Operation.WithHandler<typeof RestoreAxis> = RestoreAxis.pipe(
12
+ Operation.withHandler(({ model, axis, ...restoreData }) =>
13
+ Effect.sync(() => {
14
+ model[axis === 'col' ? 'restoreColumn' : 'restoreRow'](restoreData);
15
+ }),
16
+ ),
17
+ );
18
+
19
+ export default handler;
@@ -0,0 +1,31 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { Operation } from '@dxos/operation';
9
+
10
+ import { parseThreadAnchorAsCellRange } from '../integrations/thread-ranges';
11
+ import { SheetCapabilities } from '../types';
12
+ import { ScrollToAnchor } from './definitions';
13
+
14
+ const handler: Operation.WithHandler<typeof ScrollToAnchor> = ScrollToAnchor.pipe(
15
+ Operation.withHandler(
16
+ Effect.fnUntraced(function* ({ subject, cursor, ref }) {
17
+ const gridInstances = yield* Capability.get(SheetCapabilities.GridInstances);
18
+ const entry = gridInstances.get(subject);
19
+ if (!entry) {
20
+ return;
21
+ }
22
+ entry.setActiveRefs(ref);
23
+ const range = parseThreadAnchorAsCellRange(cursor);
24
+ if (range) {
25
+ entry.grid.setFocus({ ...range.to, plane: 'grid' }, true);
26
+ }
27
+ }),
28
+ ),
29
+ );
30
+
31
+ export default handler;
@@ -10,7 +10,7 @@ export default defineConfig({
10
10
  ...e2ePreset(import.meta.dirname),
11
11
  // TODO(wittjosiah): Avoid hard-coding ports.
12
12
  webServer: {
13
- command: 'moon run storybook:serve-e2e -- --port=9005',
13
+ command: 'pnpm storybook dev --ci --quiet --port=9005 --config-dir=.storybook',
14
14
  port: 9005,
15
15
  reuseExistingServer: false,
16
16
  },
@@ -15,7 +15,8 @@ test.describe('plugin-sheet', () => {
15
15
 
16
16
  test.beforeEach(async ({ browser }) => {
17
17
  const setup = await setupPage(browser, {
18
- url: storybookUrl('plugins-plugin-sheet-sheetcontainer--spec', 9005),
18
+ url: storybookUrl('plugins-plugin-sheet-containers-sheetcontainer--spec', 9005),
19
+ viewportSize: { width: 1280, height: 720 },
19
20
  });
20
21
  page = setup.page;
21
22
  sheet = new SheetManager(page);
@@ -5,7 +5,8 @@
5
5
  import { describe, expect, test } from 'vitest';
6
6
 
7
7
  import { Client } from '@dxos/client';
8
- import { Function } from '@dxos/functions';
8
+ import { Obj } from '@dxos/echo';
9
+ import { Operation } from '@dxos/operation';
9
10
 
10
11
  // Part 2.
11
12
  // TODO(burdon): Cannot test outside of browser.
@@ -22,7 +23,7 @@ import { Function } from '@dxos/functions';
22
23
  describe('test', () => {
23
24
  test('test', async () => {
24
25
  const client = new Client();
25
- client.addTypes([Function.Function]);
26
+ await client.addTypes([Operation.PersistentOperation]);
26
27
  await client.initialize();
27
28
  await client.halo.createIdentity();
28
29
 
@@ -33,7 +34,9 @@ describe('test', () => {
33
34
  // - ERROR "process.nextTick is not a function"
34
35
  // - ERROR "Identifier 'Buffer' has already been declared" if { nodeExternal: true }
35
36
  const space = await client.spaces.create();
36
- const fn = space.db.add(Function.make({ name: 'test', version: '0.0.1', binding: 'HELLO' }));
37
+ const fn = space.db.add(
38
+ Obj.make(Operation.PersistentOperation, { name: 'test', version: '0.0.1', binding: 'HELLO' }),
39
+ );
37
40
  expect(fn).to.exist;
38
41
  });
39
42
  });
package/src/serializer.ts CHANGED
@@ -3,8 +3,8 @@
3
3
  //
4
4
 
5
5
  import { Obj } from '@dxos/echo';
6
+ import { getObjectCore } from '@dxos/echo-db';
6
7
  import { type TypedObjectSerializer } from '@dxos/plugin-space/types';
7
- import { getObjectCore } from '@dxos/react-client/echo';
8
8
 
9
9
  import { Sheet } from './types';
10
10
 
@@ -16,8 +16,10 @@ export const translations = [
16
16
  'typename label_one': 'Sheet',
17
17
  'typename label_other': 'Sheets',
18
18
  'object name placeholder': 'New sheet',
19
+ 'add object label': 'Add sheet',
19
20
  'rename object label': 'Rename sheet',
20
21
  'delete object label': 'Delete sheet',
22
+ 'object deleted label': 'Sheet deleted',
21
23
  },
22
24
  [meta.id]: {
23
25
  'plugin name': 'Sheets',
@@ -2,11 +2,13 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
+ // @import-as-namespace
6
+
5
7
  import * as Schema from 'effect/Schema';
6
8
 
7
9
  import { addressFromA1Notation, isFormula } from '@dxos/compute';
8
- import { Obj, Type } from '@dxos/echo';
9
- import { FormAnnotation } from '@dxos/echo/internal';
10
+ import { Annotation, Obj, Type } from '@dxos/echo';
11
+ import { FormInputAnnotation } from '@dxos/echo/internal';
10
12
 
11
13
  import { addressToIndex, initialize, mapFormulaRefsToIndices } from './util';
12
14
 
@@ -44,36 +46,31 @@ export const Sheet = Schema.Struct({
44
46
  name: Schema.optional(Schema.String),
45
47
 
46
48
  // Sparse map of cells referenced by index.
47
- cells: Schema.Record({ key: Schema.String, value: Schema.mutable(CellValue) }).pipe(
48
- Schema.mutable,
49
- FormAnnotation.set(false),
50
- ),
49
+ cells: Schema.Record({ key: Schema.String, value: CellValue }).pipe(FormInputAnnotation.set(false)),
51
50
 
52
51
  // Ordered row indices.
53
- rows: Schema.Array(Schema.String).pipe(Schema.mutable, FormAnnotation.set(false)),
52
+ rows: Schema.Array(Schema.String).pipe(FormInputAnnotation.set(false)),
54
53
 
55
54
  // Ordered column indices.
56
- columns: Schema.Array(Schema.String).pipe(Schema.mutable, FormAnnotation.set(false)),
55
+ columns: Schema.Array(Schema.String).pipe(FormInputAnnotation.set(false)),
57
56
 
58
57
  // Row metadata referenced by index.
59
- rowMeta: Schema.Record({ key: Schema.String, value: Schema.mutable(RowColumnMeta) }).pipe(
60
- Schema.mutable,
61
- FormAnnotation.set(false),
62
- ),
58
+ rowMeta: Schema.Record({ key: Schema.String, value: RowColumnMeta }).pipe(FormInputAnnotation.set(false)),
63
59
 
64
60
  // Column metadata referenced by index.
65
- columnMeta: Schema.Record({ key: Schema.String, value: Schema.mutable(RowColumnMeta) }).pipe(
66
- Schema.mutable,
67
- FormAnnotation.set(false),
68
- ),
61
+ columnMeta: Schema.Record({ key: Schema.String, value: RowColumnMeta }).pipe(FormInputAnnotation.set(false)),
69
62
 
70
63
  // Cell formatting referenced by indexed range.
71
- ranges: Schema.Array(Range).pipe(Schema.mutable, FormAnnotation.set(false)),
64
+ ranges: Schema.Array(Range).pipe(FormInputAnnotation.set(false)),
72
65
  }).pipe(
73
- Type.Obj({
74
- typename: 'dxos.org/type/Sheet',
66
+ Type.object({
67
+ typename: 'org.dxos.type.sheet',
75
68
  version: '0.1.0',
76
69
  }),
70
+ Annotation.IconAnnotation.set({
71
+ icon: 'ph--grid-nine--regular',
72
+ hue: 'indigo',
73
+ }),
77
74
  );
78
75
 
79
76
  export interface Sheet extends Schema.Schema.Type<typeof Sheet> {}
@@ -86,18 +83,21 @@ export type SheetProps = {
86
83
  export const make = ({ name, cells = {}, ...size }: SheetProps = {}) => {
87
84
  const sheet = Obj.make(Sheet, { name, cells: {}, rows: [], columns: [], rowMeta: {}, columnMeta: {}, ranges: [] });
88
85
 
89
- initialize(sheet, size);
90
-
91
- if (cells) {
92
- Object.entries(cells).forEach(([key, { value }]) => {
93
- const idx = addressToIndex(sheet, addressFromA1Notation(key));
94
- if (isFormula(value)) {
95
- value = mapFormulaRefsToIndices(sheet, value);
96
- }
97
-
98
- sheet.cells[idx] = { value };
99
- });
100
- }
86
+ // Initialize and set cells within Obj.change to satisfy change context requirements.
87
+ Obj.change(sheet, (obj) => {
88
+ initialize(obj, size);
89
+
90
+ if (cells) {
91
+ Object.entries(cells).forEach(([key, { value }]) => {
92
+ const idx = addressToIndex(obj, addressFromA1Notation(key));
93
+ if (isFormula(value)) {
94
+ value = mapFormulaRefsToIndices(obj, value);
95
+ }
96
+
97
+ obj.cells[idx] = { value };
98
+ });
99
+ }
100
+ });
101
101
 
102
102
  return sheet;
103
103
  };
@@ -0,0 +1,26 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+ import { type ComputeGraphRegistry } from '@dxos/compute';
7
+ import { type DxGridElement, type GridContentProps } from '@dxos/react-ui-grid';
8
+
9
+ import { meta } from '../meta';
10
+
11
+ export type GridEntry = { grid: DxGridElement; setActiveRefs: (refs: GridContentProps['activeRefs']) => void };
12
+
13
+ export type GridRegistry = {
14
+ register: (attendableId: string, grid: DxGridElement, setActiveRefs: GridEntry['setActiveRefs']) => void;
15
+ unregister: (attendableId: string) => void;
16
+ get: (attendableId: string) => GridEntry | undefined;
17
+ };
18
+
19
+ export namespace SheetCapabilities {
20
+ export const ComputeGraphRegistry = Capability.make<ComputeGraphRegistry>(
21
+ `${meta.id}.capability.compute-graph-registry`,
22
+ );
23
+
24
+ /** Registry of active grid instances keyed by attendable ID. */
25
+ export const GridInstances = Capability.make<GridRegistry>(`${meta.id}.capability.grid-instances`);
26
+ }
@@ -2,6 +2,7 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ export * from './capabilities';
5
6
  export * as Sheet from './Sheet';
6
7
  export * from './sheet-range-types';
7
8
  export * from './types';
@@ -34,14 +34,14 @@ export const cellClassNameForRange = ({ key, value }: Sheet.Sheet['ranges'][numb
34
34
  }
35
35
 
36
36
  case commentKey:
37
- return 'bg-gridComment';
37
+ return 'bg-grid-comment';
38
38
 
39
39
  case styleKey:
40
40
  switch (value) {
41
41
  case 'highlight':
42
- return '!bg-gridHighlight';
42
+ return 'bg-grid-highlight!';
43
43
  case 'softwrap':
44
- return '!whitespace-normal';
44
+ return 'whitespace-normal!';
45
45
  default:
46
46
  return undefined;
47
47
  }
@@ -4,39 +4,14 @@
4
4
 
5
5
  import * as Schema from 'effect/Schema';
6
6
 
7
- import { meta } from '../meta';
8
- import { SheetModel } from '../model';
9
-
10
7
  import * as Sheet from './Sheet';
11
8
 
12
- export namespace SheetAction {
13
- const SHEET_ACTION = `${meta.id}/action`;
14
-
15
- export class Create extends Schema.TaggedClass<Create>()(`${SHEET_ACTION}/create`, {
16
- input: Schema.Struct({
17
- name: Schema.optional(Schema.String),
18
- }),
19
- output: Schema.Struct({
20
- object: Sheet.Sheet,
21
- }),
22
- }) {}
23
-
24
- // TODO(wittjosiah): Factor out. This is `DxGridAxis` from `@dxos/react-ui-grid`.
25
- const Axis = Schema.Union(Schema.Literal('row'), Schema.Literal('col'));
26
-
27
- export class InsertAxis extends Schema.TaggedClass<InsertAxis>()(`${SHEET_ACTION}/axis-insert`, {
28
- input: Schema.Struct({
29
- // TODO(wittjosiah): Schema.instanceOf(SheetModel) throws when running tests.
30
- model: Schema.Any.pipe(Schema.filter((model) => model instanceof SheetModel)) as Schema.Schema<SheetModel>,
31
- axis: Axis,
32
- index: Schema.Number,
33
- count: Schema.optional(Schema.Number),
34
- }),
35
- output: Schema.Void,
36
- }) {}
9
+ // TODO(wittjosiah): Factor out. This is `DxGridAxis` from `@dxos/react-ui-grid`.
10
+ const ActionAxis = Schema.Union(Schema.Literal('row'), Schema.Literal('col'));
37
11
 
12
+ export namespace SheetAction {
38
13
  export const RestoreAxis = Schema.Struct({
39
- axis: Axis,
14
+ axis: ActionAxis,
40
15
  axisIndex: Schema.String,
41
16
  index: Schema.Number,
42
17
  axisMeta: Sheet.RowColumnMeta,
@@ -44,15 +19,4 @@ export namespace SheetAction {
44
19
  });
45
20
 
46
21
  export type RestoreAxis = Schema.Schema.Type<typeof RestoreAxis>;
47
-
48
- export class DropAxis extends Schema.TaggedClass<DropAxis>()(`${SHEET_ACTION}/axis-drop`, {
49
- input: Schema.Struct({
50
- // TODO(wittjosiah): Schema.instanceOf(SheetModel) throws when running tests.
51
- model: Schema.Any.pipe(Schema.filter((model) => model instanceof SheetModel)) as Schema.Schema<SheetModel>,
52
- axis: Axis,
53
- axisIndex: Schema.String,
54
- deletionData: Schema.optional(RestoreAxis),
55
- }),
56
- output: Schema.Void,
57
- }) {}
58
22
  }
package/src/types/util.ts CHANGED
@@ -11,6 +11,7 @@ import {
11
11
  isFormula,
12
12
  } from '@dxos/compute';
13
13
  import { randomBytes } from '@dxos/crypto';
14
+ import { type Obj } from '@dxos/echo';
14
15
  import { invariant } from '@dxos/invariant';
15
16
 
16
17
  import { type Sheet } from '../types';
@@ -55,7 +56,7 @@ export const insertIndices = (indices: string[], i: number, n: number, max: numb
55
56
  };
56
57
 
57
58
  export const initialize = (
58
- sheet: Sheet.Sheet,
59
+ sheet: Obj.Mutable<Sheet.Sheet>,
59
60
  { rows = DEFAULT_ROWS, columns = DEFAULT_COLS }: Partial<Sheet.SheetSize> = {},
60
61
  ) => {
61
62
  if (!sheet.rows.length) {