@dxos/plugin-space 0.8.4-main.ae835ea → 0.8.4-main.bc674ce

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 (621) hide show
  1. package/dist/lib/browser/CollectionArticle-OQMUVFVV.mjs +125 -0
  2. package/dist/lib/browser/CollectionArticle-OQMUVFVV.mjs.map +7 -0
  3. package/dist/lib/browser/ObjectCardStack-TWHN6C2Y.mjs +148 -0
  4. package/dist/lib/browser/ObjectCardStack-TWHN6C2Y.mjs.map +7 -0
  5. package/dist/lib/browser/ObjectDetails-GEDIISKK.mjs +142 -0
  6. package/dist/lib/browser/ObjectDetails-GEDIISKK.mjs.map +7 -0
  7. package/dist/lib/browser/RecordArticle-W57QE7QV.mjs +107 -0
  8. package/dist/lib/browser/RecordArticle-W57QE7QV.mjs.map +7 -0
  9. package/dist/lib/browser/app-graph-builder-SJHTZXZF.mjs +523 -0
  10. package/dist/lib/browser/app-graph-builder-SJHTZXZF.mjs.map +7 -0
  11. package/dist/lib/browser/app-graph-serializer-7AT7QMSK.mjs +84 -0
  12. package/dist/lib/browser/app-graph-serializer-7AT7QMSK.mjs.map +7 -0
  13. package/dist/lib/browser/chunk-4WZUGLQQ.mjs +117 -0
  14. package/dist/lib/browser/chunk-4WZUGLQQ.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-ASV6DYFH.mjs +19 -0
  16. package/dist/lib/browser/chunk-ASV6DYFH.mjs.map +7 -0
  17. package/dist/lib/browser/chunk-AWVAX26X.mjs +13 -0
  18. package/dist/lib/browser/chunk-AWVAX26X.mjs.map +7 -0
  19. package/dist/lib/browser/chunk-CCRSHECL.mjs +714 -0
  20. package/dist/lib/browser/chunk-CCRSHECL.mjs.map +7 -0
  21. package/dist/lib/browser/{chunk-VZBIIYFM.mjs → chunk-HSMQFM57.mjs} +1 -1
  22. package/dist/lib/browser/chunk-HSMQFM57.mjs.map +7 -0
  23. package/dist/lib/browser/{chunk-OWNBEI5J.mjs → chunk-SUI34XSA.mjs} +318 -256
  24. package/dist/lib/browser/chunk-SUI34XSA.mjs.map +7 -0
  25. package/dist/lib/browser/chunk-TWUMNPG4.mjs +1898 -0
  26. package/dist/lib/browser/chunk-TWUMNPG4.mjs.map +7 -0
  27. package/dist/lib/browser/{chunk-4V4JNJ33.mjs → chunk-ZT2VPYRM.mjs} +62 -63
  28. package/dist/lib/browser/chunk-ZT2VPYRM.mjs.map +7 -0
  29. package/dist/lib/browser/cli/index.mjs +849 -0
  30. package/dist/lib/browser/cli/index.mjs.map +7 -0
  31. package/dist/lib/browser/identity-created-VCFYLSBB.mjs +23 -0
  32. package/dist/lib/browser/identity-created-VCFYLSBB.mjs.map +7 -0
  33. package/dist/lib/browser/index.mjs +230 -236
  34. package/dist/lib/browser/index.mjs.map +4 -4
  35. package/dist/lib/browser/meta.json +1 -1
  36. package/dist/lib/browser/operation-resolver-SIRQT36Z.mjs +827 -0
  37. package/dist/lib/browser/operation-resolver-SIRQT36Z.mjs.map +7 -0
  38. package/dist/lib/browser/react-root-3SPMM45V.mjs +30 -0
  39. package/dist/lib/browser/react-root-3SPMM45V.mjs.map +7 -0
  40. package/dist/lib/browser/react-surface-UUS7NDHS.mjs +382 -0
  41. package/dist/lib/browser/react-surface-UUS7NDHS.mjs.map +7 -0
  42. package/dist/lib/browser/repair-CJG26D52.mjs +50 -0
  43. package/dist/lib/browser/repair-CJG26D52.mjs.map +7 -0
  44. package/dist/lib/browser/settings-ZS2AQ73E.mjs +33 -0
  45. package/dist/lib/browser/settings-ZS2AQ73E.mjs.map +7 -0
  46. package/dist/lib/browser/spaces-ready-OQDGWUOS.mjs +242 -0
  47. package/dist/lib/browser/spaces-ready-OQDGWUOS.mjs.map +7 -0
  48. package/dist/lib/browser/state-7YZQB2KY.mjs +58 -0
  49. package/dist/lib/browser/state-7YZQB2KY.mjs.map +7 -0
  50. package/dist/lib/browser/types/index.mjs +18 -10
  51. package/dist/lib/node-esm/CollectionArticle-V5OOJVJJ.mjs +126 -0
  52. package/dist/lib/node-esm/CollectionArticle-V5OOJVJJ.mjs.map +7 -0
  53. package/dist/lib/node-esm/ObjectCardStack-C5ZXRKP7.mjs +149 -0
  54. package/dist/lib/node-esm/ObjectCardStack-C5ZXRKP7.mjs.map +7 -0
  55. package/dist/lib/node-esm/ObjectDetails-6ZLDRKCO.mjs +143 -0
  56. package/dist/lib/node-esm/ObjectDetails-6ZLDRKCO.mjs.map +7 -0
  57. package/dist/lib/node-esm/RecordArticle-SSV74Z46.mjs +108 -0
  58. package/dist/lib/node-esm/RecordArticle-SSV74Z46.mjs.map +7 -0
  59. package/dist/lib/node-esm/app-graph-builder-HZ3XXDFZ.mjs +524 -0
  60. package/dist/lib/node-esm/app-graph-builder-HZ3XXDFZ.mjs.map +7 -0
  61. package/dist/lib/node-esm/app-graph-serializer-WJ2TIQG6.mjs +85 -0
  62. package/dist/lib/node-esm/app-graph-serializer-WJ2TIQG6.mjs.map +7 -0
  63. package/dist/lib/node-esm/{chunk-G4PDWB7G.mjs → chunk-2SW6S2BB.mjs} +62 -63
  64. package/dist/lib/node-esm/chunk-2SW6S2BB.mjs.map +7 -0
  65. package/dist/lib/node-esm/{chunk-XEVIWD3O.mjs → chunk-7KMYUWSR.mjs} +318 -256
  66. package/dist/lib/node-esm/chunk-7KMYUWSR.mjs.map +7 -0
  67. package/dist/lib/node-esm/chunk-CVXULIYC.mjs +20 -0
  68. package/dist/lib/node-esm/chunk-CVXULIYC.mjs.map +7 -0
  69. package/dist/lib/node-esm/chunk-FYSBFBSD.mjs +1899 -0
  70. package/dist/lib/node-esm/chunk-FYSBFBSD.mjs.map +7 -0
  71. package/dist/lib/node-esm/chunk-HREWB23G.mjs +15 -0
  72. package/dist/lib/node-esm/chunk-HREWB23G.mjs.map +7 -0
  73. package/dist/lib/node-esm/chunk-JOBIWCBC.mjs +118 -0
  74. package/dist/lib/node-esm/chunk-JOBIWCBC.mjs.map +7 -0
  75. package/dist/lib/node-esm/chunk-MPL6NHQX.mjs +715 -0
  76. package/dist/lib/node-esm/chunk-MPL6NHQX.mjs.map +7 -0
  77. package/dist/lib/node-esm/{chunk-BDEFTL6K.mjs → chunk-SL4BJSUG.mjs} +1 -1
  78. package/dist/lib/node-esm/chunk-SL4BJSUG.mjs.map +7 -0
  79. package/dist/lib/node-esm/cli/index.mjs +850 -0
  80. package/dist/lib/node-esm/cli/index.mjs.map +7 -0
  81. package/dist/lib/node-esm/identity-created-2SJABVJD.mjs +25 -0
  82. package/dist/lib/node-esm/identity-created-2SJABVJD.mjs.map +7 -0
  83. package/dist/lib/node-esm/index.mjs +230 -236
  84. package/dist/lib/node-esm/index.mjs.map +4 -4
  85. package/dist/lib/node-esm/meta.json +1 -1
  86. package/dist/lib/node-esm/operation-resolver-ZE3XJL5J.mjs +828 -0
  87. package/dist/lib/node-esm/operation-resolver-ZE3XJL5J.mjs.map +7 -0
  88. package/dist/lib/node-esm/react-root-Y6JTGDTW.mjs +31 -0
  89. package/dist/lib/node-esm/react-root-Y6JTGDTW.mjs.map +7 -0
  90. package/dist/lib/node-esm/react-surface-SQ4SK3OK.mjs +383 -0
  91. package/dist/lib/node-esm/react-surface-SQ4SK3OK.mjs.map +7 -0
  92. package/dist/lib/node-esm/repair-G3ZW3VG3.mjs +51 -0
  93. package/dist/lib/node-esm/repair-G3ZW3VG3.mjs.map +7 -0
  94. package/dist/lib/node-esm/settings-PVI2VG56.mjs +34 -0
  95. package/dist/lib/node-esm/settings-PVI2VG56.mjs.map +7 -0
  96. package/dist/lib/node-esm/spaces-ready-R744OHQG.mjs +243 -0
  97. package/dist/lib/node-esm/spaces-ready-R744OHQG.mjs.map +7 -0
  98. package/dist/lib/node-esm/state-XE5YGPHM.mjs +59 -0
  99. package/dist/lib/node-esm/state-XE5YGPHM.mjs.map +7 -0
  100. package/dist/lib/node-esm/types/index.mjs +18 -10
  101. package/dist/types/src/SpacePlugin.d.ts +3 -15
  102. package/dist/types/src/SpacePlugin.d.ts.map +1 -1
  103. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  104. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  105. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  106. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  107. package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts +5 -0
  108. package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts.map +1 -0
  109. package/dist/types/src/capabilities/app-graph-serializer/index.d.ts +3 -0
  110. package/dist/types/src/capabilities/app-graph-serializer/index.d.ts.map +1 -0
  111. package/dist/types/src/capabilities/identity-created/identity-created.d.ts +5 -0
  112. package/dist/types/src/capabilities/identity-created/identity-created.d.ts.map +1 -0
  113. package/dist/types/src/capabilities/identity-created/index.d.ts +3 -0
  114. package/dist/types/src/capabilities/identity-created/index.d.ts.map +1 -0
  115. package/dist/types/src/capabilities/index.d.ts +10 -20
  116. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  117. package/dist/types/src/capabilities/operation-resolver/index.d.ts +6 -0
  118. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  119. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +9 -0
  120. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  121. package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
  122. package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
  123. package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
  124. package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
  125. package/dist/types/src/capabilities/react-surface/index.d.ts +5 -0
  126. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  127. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +8 -0
  128. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  129. package/dist/types/src/capabilities/repair/index.d.ts +3 -0
  130. package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
  131. package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
  132. package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
  133. package/dist/types/src/capabilities/settings/index.d.ts +7 -0
  134. package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
  135. package/dist/types/src/capabilities/settings/settings.d.ts +9 -0
  136. package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
  137. package/dist/types/src/capabilities/spaces-ready/index.d.ts +3 -0
  138. package/dist/types/src/capabilities/spaces-ready/index.d.ts.map +1 -0
  139. package/dist/types/src/capabilities/spaces-ready/spaces-ready.d.ts +5 -0
  140. package/dist/types/src/capabilities/spaces-ready/spaces-ready.d.ts.map +1 -0
  141. package/dist/types/src/capabilities/state/index.d.ts +13 -0
  142. package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
  143. package/dist/types/src/capabilities/state/state.d.ts +17 -0
  144. package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
  145. package/dist/types/src/cli/commands/database/add.d.ts +17 -0
  146. package/dist/types/src/cli/commands/database/add.d.ts.map +1 -0
  147. package/dist/types/src/cli/commands/database/index.d.ts +3 -0
  148. package/dist/types/src/cli/commands/database/index.d.ts.map +1 -0
  149. package/dist/types/src/cli/commands/database/query/index.d.ts +2 -0
  150. package/dist/types/src/cli/commands/database/query/index.d.ts.map +1 -0
  151. package/dist/types/src/cli/commands/database/query/query.d.ts +13 -0
  152. package/dist/types/src/cli/commands/database/query/query.d.ts.map +1 -0
  153. package/dist/types/src/cli/commands/database/query/query.test.d.ts +2 -0
  154. package/dist/types/src/cli/commands/database/query/query.test.d.ts.map +1 -0
  155. package/dist/types/src/cli/commands/database/remove.d.ts +9 -0
  156. package/dist/types/src/cli/commands/database/remove.d.ts.map +1 -0
  157. package/dist/types/src/cli/commands/database/stats.d.ts +6 -0
  158. package/dist/types/src/cli/commands/database/stats.d.ts.map +1 -0
  159. package/dist/types/src/cli/commands/database/util.d.ts +14 -0
  160. package/dist/types/src/cli/commands/database/util.d.ts.map +1 -0
  161. package/dist/types/src/cli/commands/index.d.ts +4 -0
  162. package/dist/types/src/cli/commands/index.d.ts.map +1 -0
  163. package/dist/types/src/cli/commands/queue/index.d.ts +7 -0
  164. package/dist/types/src/cli/commands/queue/index.d.ts.map +1 -0
  165. package/dist/types/src/cli/commands/queue/query.d.ts +8 -0
  166. package/dist/types/src/cli/commands/queue/query.d.ts.map +1 -0
  167. package/dist/types/src/cli/commands/queue/util.d.ts +6 -0
  168. package/dist/types/src/cli/commands/queue/util.d.ts.map +1 -0
  169. package/dist/types/src/cli/commands/space/close/close.d.ts +12 -0
  170. package/dist/types/src/cli/commands/space/close/close.d.ts.map +1 -0
  171. package/dist/types/src/cli/commands/space/close/index.d.ts +2 -0
  172. package/dist/types/src/cli/commands/space/close/index.d.ts.map +1 -0
  173. package/dist/types/src/cli/commands/space/create/create.d.ts +12 -0
  174. package/dist/types/src/cli/commands/space/create/create.d.ts.map +1 -0
  175. package/dist/types/src/cli/commands/space/create/create.test.d.ts +2 -0
  176. package/dist/types/src/cli/commands/space/create/create.test.d.ts.map +1 -0
  177. package/dist/types/src/cli/commands/space/create/index.d.ts +2 -0
  178. package/dist/types/src/cli/commands/space/create/index.d.ts.map +1 -0
  179. package/dist/types/src/cli/commands/space/index.d.ts +31 -0
  180. package/dist/types/src/cli/commands/space/index.d.ts.map +1 -0
  181. package/dist/types/src/cli/commands/space/info/index.d.ts +2 -0
  182. package/dist/types/src/cli/commands/space/info/index.d.ts.map +1 -0
  183. package/dist/types/src/cli/commands/space/info/info.d.ts +13 -0
  184. package/dist/types/src/cli/commands/space/info/info.d.ts.map +1 -0
  185. package/dist/types/src/cli/commands/space/info/info.test.d.ts +2 -0
  186. package/dist/types/src/cli/commands/space/info/info.test.d.ts.map +1 -0
  187. package/dist/types/src/cli/commands/space/join/index.d.ts +2 -0
  188. package/dist/types/src/cli/commands/space/join/index.d.ts.map +1 -0
  189. package/dist/types/src/cli/commands/space/join/join.d.ts +14 -0
  190. package/dist/types/src/cli/commands/space/join/join.d.ts.map +1 -0
  191. package/dist/types/src/cli/commands/space/join/util.d.ts +17 -0
  192. package/dist/types/src/cli/commands/space/join/util.d.ts.map +1 -0
  193. package/dist/types/src/cli/commands/space/list/index.d.ts +2 -0
  194. package/dist/types/src/cli/commands/space/list/index.d.ts.map +1 -0
  195. package/dist/types/src/cli/commands/space/list/list.d.ts +7 -0
  196. package/dist/types/src/cli/commands/space/list/list.d.ts.map +1 -0
  197. package/dist/types/src/cli/commands/space/list/list.test.d.ts +2 -0
  198. package/dist/types/src/cli/commands/space/list/list.test.d.ts.map +1 -0
  199. package/dist/types/src/cli/commands/space/members/index.d.ts +2 -0
  200. package/dist/types/src/cli/commands/space/members/index.d.ts.map +1 -0
  201. package/dist/types/src/cli/commands/space/members/members.d.ts +13 -0
  202. package/dist/types/src/cli/commands/space/members/members.d.ts.map +1 -0
  203. package/dist/types/src/cli/commands/space/members/members.test.d.ts +2 -0
  204. package/dist/types/src/cli/commands/space/members/members.test.d.ts.map +1 -0
  205. package/dist/types/src/cli/commands/space/members/util.d.ts +9 -0
  206. package/dist/types/src/cli/commands/space/members/util.d.ts.map +1 -0
  207. package/dist/types/src/cli/commands/space/open/index.d.ts +2 -0
  208. package/dist/types/src/cli/commands/space/open/index.d.ts.map +1 -0
  209. package/dist/types/src/cli/commands/space/open/open.d.ts +12 -0
  210. package/dist/types/src/cli/commands/space/open/open.d.ts.map +1 -0
  211. package/dist/types/src/cli/commands/space/schema/index.d.ts +8 -0
  212. package/dist/types/src/cli/commands/space/schema/index.d.ts.map +1 -0
  213. package/dist/types/src/cli/commands/space/schema/list/index.d.ts +2 -0
  214. package/dist/types/src/cli/commands/space/schema/list/index.d.ts.map +1 -0
  215. package/dist/types/src/cli/commands/space/schema/list/list.d.ts +15 -0
  216. package/dist/types/src/cli/commands/space/schema/list/list.d.ts.map +1 -0
  217. package/dist/types/src/cli/commands/space/schema/list/list.test.d.ts +2 -0
  218. package/dist/types/src/cli/commands/space/schema/list/list.test.d.ts.map +1 -0
  219. package/dist/types/src/cli/commands/space/schema/list/util.d.ts +15 -0
  220. package/dist/types/src/cli/commands/space/schema/list/util.d.ts.map +1 -0
  221. package/dist/types/src/cli/commands/space/share/index.d.ts +2 -0
  222. package/dist/types/src/cli/commands/space/share/index.d.ts.map +1 -0
  223. package/dist/types/src/cli/commands/space/share/share.d.ts +19 -0
  224. package/dist/types/src/cli/commands/space/share/share.d.ts.map +1 -0
  225. package/dist/types/src/cli/commands/space/sync/index.d.ts +2 -0
  226. package/dist/types/src/cli/commands/space/sync/index.d.ts.map +1 -0
  227. package/dist/types/src/cli/commands/space/sync/sync.d.ts +6 -0
  228. package/dist/types/src/cli/commands/space/sync/sync.d.ts.map +1 -0
  229. package/dist/types/src/cli/commands/space/sync/sync.test.d.ts +2 -0
  230. package/dist/types/src/cli/commands/space/sync/sync.test.d.ts.map +1 -0
  231. package/dist/types/src/cli/index.d.ts +2 -0
  232. package/dist/types/src/cli/index.d.ts.map +1 -0
  233. package/dist/types/src/cli/plugin.d.ts +4 -0
  234. package/dist/types/src/cli/plugin.d.ts.map +1 -0
  235. package/dist/types/src/components/AwaitingObject.d.ts.map +1 -1
  236. package/dist/types/src/components/CollectionArticle.d.ts +9 -0
  237. package/dist/types/src/components/CollectionArticle.d.ts.map +1 -0
  238. package/dist/types/src/components/CollectionSection.d.ts +3 -4
  239. package/dist/types/src/components/CollectionSection.d.ts.map +1 -1
  240. package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +2 -2
  241. package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
  242. package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +163 -229
  243. package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
  244. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +18 -10
  245. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
  246. package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
  247. package/dist/types/src/components/JoinDialog/JoinDialog.d.ts.map +1 -0
  248. package/dist/types/src/components/JoinDialog/index.d.ts +2 -0
  249. package/dist/types/src/components/JoinDialog/index.d.ts.map +1 -0
  250. package/dist/types/src/components/MembersContainer/MembersContainer.d.ts.map +1 -0
  251. package/dist/types/src/components/{RecordMain.stories.d.ts → MembersContainer/MembersContainer.stories.d.ts} +158 -225
  252. package/dist/types/src/components/{MembersContainer.stories.d.ts.map → MembersContainer/MembersContainer.stories.d.ts.map} +1 -1
  253. package/dist/types/src/components/MembersContainer/index.d.ts +2 -0
  254. package/dist/types/src/components/MembersContainer/index.d.ts.map +1 -0
  255. package/dist/types/src/components/MenuFooter.d.ts +1 -1
  256. package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
  257. package/dist/types/src/components/ObjectCardStack/ObjectCardStack.d.ts +8 -0
  258. package/dist/types/src/components/ObjectCardStack/ObjectCardStack.d.ts.map +1 -0
  259. package/dist/types/src/components/{ObjectDetailsPanel → ObjectCardStack}/ObjectForm.d.ts +2 -3
  260. package/dist/types/src/components/ObjectCardStack/ObjectForm.d.ts.map +1 -0
  261. package/dist/types/src/components/ObjectCardStack/index.d.ts +3 -0
  262. package/dist/types/src/components/ObjectCardStack/index.d.ts.map +1 -0
  263. package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.d.ts +1 -1
  264. package/dist/types/src/components/ObjectDetails/BaseObjectSettings.d.ts.map +1 -0
  265. package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.d.ts +156 -223
  266. package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.d.ts.map +1 -1
  267. package/dist/types/src/components/ObjectDetails/ForeignKeys.d.ts +8 -0
  268. package/dist/types/src/components/ObjectDetails/ForeignKeys.d.ts.map +1 -0
  269. package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts +9 -0
  270. package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts.map +1 -0
  271. package/dist/types/src/components/ObjectDetails/index.d.ts +3 -0
  272. package/dist/types/src/components/ObjectDetails/index.d.ts.map +1 -0
  273. package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts +7 -0
  274. package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts.map +1 -0
  275. package/dist/types/src/components/ObjectRenamePopover/index.d.ts +2 -0
  276. package/dist/types/src/components/ObjectRenamePopover/index.d.ts.map +1 -0
  277. package/dist/types/src/components/RecordArticle.d.ts +5 -0
  278. package/dist/types/src/components/RecordArticle.d.ts.map +1 -0
  279. package/dist/types/src/components/{MembersContainer.stories.d.ts → RecordArticle.stories.d.ts} +158 -225
  280. package/dist/types/src/components/{RecordMain.stories.d.ts.map → RecordArticle.stories.d.ts.map} +1 -1
  281. package/dist/types/src/components/SchemaContainer.d.ts +2 -2
  282. package/dist/types/src/components/SchemaContainer.d.ts.map +1 -1
  283. package/dist/types/src/components/SpacePluginSettings.d.ts +4 -2
  284. package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
  285. package/dist/types/src/components/{SpacePresence.d.ts → SpacePresence/SpacePresence.d.ts} +7 -6
  286. package/dist/types/src/components/SpacePresence/SpacePresence.d.ts.map +1 -0
  287. package/dist/types/src/components/{SpacePresence.stories.d.ts → SpacePresence/SpacePresence.stories.d.ts} +156 -223
  288. package/dist/types/src/components/{SpacePresence.stories.d.ts.map → SpacePresence/SpacePresence.stories.d.ts.map} +1 -1
  289. package/dist/types/src/components/SpacePresence/index.d.ts +2 -0
  290. package/dist/types/src/components/SpacePresence/index.d.ts.map +1 -0
  291. package/dist/types/src/components/SpaceRenamePopover/SpaceRenamePopover.d.ts +7 -0
  292. package/dist/types/src/components/SpaceRenamePopover/SpaceRenamePopover.d.ts.map +1 -0
  293. package/dist/types/src/components/SpaceRenamePopover/index.d.ts +2 -0
  294. package/dist/types/src/components/SpaceRenamePopover/index.d.ts.map +1 -0
  295. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts +1 -1
  296. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
  297. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +157 -224
  298. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
  299. package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
  300. package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +156 -223
  301. package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
  302. package/dist/types/src/components/ViewEditor.d.ts +3 -4
  303. package/dist/types/src/components/ViewEditor.d.ts.map +1 -1
  304. package/dist/types/src/components/index.d.ts +15 -16
  305. package/dist/types/src/components/index.d.ts.map +1 -1
  306. package/dist/types/src/constants.d.ts +6 -0
  307. package/dist/types/src/constants.d.ts.map +1 -0
  308. package/dist/types/src/helpers/index.d.ts +2 -0
  309. package/dist/types/src/helpers/index.d.ts.map +1 -0
  310. package/dist/types/src/helpers/query.d.ts +7 -0
  311. package/dist/types/src/helpers/query.d.ts.map +1 -0
  312. package/dist/types/src/helpers/query.test.d.ts +2 -0
  313. package/dist/types/src/helpers/query.test.d.ts.map +1 -0
  314. package/dist/types/src/hooks/useActiveSpace.d.ts +2 -2
  315. package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -1
  316. package/dist/types/src/hooks/useInputSurfaceLookup.d.ts +2 -8
  317. package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -1
  318. package/dist/types/src/hooks/usePath.d.ts +2 -2
  319. package/dist/types/src/hooks/usePath.d.ts.map +1 -1
  320. package/dist/types/src/hooks/useTypeOptions.d.ts +2 -2
  321. package/dist/types/src/hooks/useTypeOptions.d.ts.map +1 -1
  322. package/dist/types/src/index.d.ts +2 -2
  323. package/dist/types/src/index.d.ts.map +1 -1
  324. package/dist/types/src/meta.d.ts +2 -2
  325. package/dist/types/src/meta.d.ts.map +1 -1
  326. package/dist/types/src/translations.d.ts +156 -223
  327. package/dist/types/src/translations.d.ts.map +1 -1
  328. package/dist/types/src/types/capabilities.d.ts +71 -0
  329. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  330. package/dist/types/src/types/events.d.ts +9 -0
  331. package/dist/types/src/types/events.d.ts.map +1 -0
  332. package/dist/types/src/types/form.d.ts +22 -0
  333. package/dist/types/src/types/form.d.ts.map +1 -0
  334. package/dist/types/src/types/index.d.ts +3 -0
  335. package/dist/types/src/types/index.d.ts.map +1 -1
  336. package/dist/types/src/types/types.d.ts +637 -397
  337. package/dist/types/src/types/types.d.ts.map +1 -1
  338. package/dist/types/src/util.d.ts +39 -51
  339. package/dist/types/src/util.d.ts.map +1 -1
  340. package/dist/types/tsconfig.tsbuildinfo +1 -1
  341. package/package.json +82 -63
  342. package/src/SpacePlugin.ts +169 -227
  343. package/src/capabilities/app-graph-builder/app-graph-builder.ts +617 -0
  344. package/src/capabilities/app-graph-builder/index.ts +7 -0
  345. package/src/capabilities/app-graph-serializer/app-graph-serializer.ts +82 -0
  346. package/src/capabilities/app-graph-serializer/index.ts +7 -0
  347. package/src/capabilities/identity-created/identity-created.ts +29 -0
  348. package/src/capabilities/identity-created/index.ts +7 -0
  349. package/src/capabilities/index.ts +10 -14
  350. package/src/capabilities/operation-resolver/index.ts +7 -0
  351. package/src/capabilities/operation-resolver/operation-resolver.ts +760 -0
  352. package/src/capabilities/react-root/index.ts +7 -0
  353. package/src/capabilities/react-root/react-root.tsx +25 -0
  354. package/src/capabilities/react-surface/index.ts +7 -0
  355. package/src/capabilities/react-surface/react-surface.tsx +375 -0
  356. package/src/capabilities/repair/index.ts +7 -0
  357. package/src/capabilities/repair/repair.ts +67 -0
  358. package/src/capabilities/settings/index.ts +7 -0
  359. package/src/capabilities/settings/settings.ts +32 -0
  360. package/src/capabilities/spaces-ready/index.ts +7 -0
  361. package/src/capabilities/spaces-ready/spaces-ready.ts +289 -0
  362. package/src/capabilities/state/index.ts +7 -0
  363. package/src/capabilities/state/state.ts +64 -0
  364. package/src/cli/commands/database/add.ts +116 -0
  365. package/src/cli/commands/database/index.ts +16 -0
  366. package/src/cli/commands/database/query/index.ts +5 -0
  367. package/src/cli/commands/database/query/query.test.ts +55 -0
  368. package/src/cli/commands/database/query/query.ts +44 -0
  369. package/src/cli/commands/database/remove.ts +51 -0
  370. package/src/cli/commands/database/stats.ts +44 -0
  371. package/src/cli/commands/database/util.ts +32 -0
  372. package/src/cli/commands/index.ts +7 -0
  373. package/src/cli/commands/queue/index.ts +12 -0
  374. package/src/cli/commands/queue/query.ts +45 -0
  375. package/src/cli/commands/queue/util.ts +19 -0
  376. package/src/cli/commands/space/close/close.ts +40 -0
  377. package/src/cli/commands/space/close/index.ts +5 -0
  378. package/src/cli/commands/space/create/create.test.ts +67 -0
  379. package/src/cli/commands/space/create/create.ts +61 -0
  380. package/src/cli/commands/space/create/index.ts +5 -0
  381. package/src/cli/commands/space/index.ts +21 -0
  382. package/src/cli/commands/space/info/index.ts +5 -0
  383. package/src/cli/commands/space/info/info.test.ts +47 -0
  384. package/src/cli/commands/space/info/info.ts +37 -0
  385. package/src/cli/commands/space/join/index.ts +5 -0
  386. package/src/cli/commands/space/join/join.ts +122 -0
  387. package/src/cli/commands/space/join/util.ts +82 -0
  388. package/src/cli/commands/space/list/index.ts +5 -0
  389. package/src/cli/commands/space/list/list.test.ts +36 -0
  390. package/src/cli/commands/space/list/list.ts +30 -0
  391. package/src/cli/commands/space/members/index.ts +5 -0
  392. package/src/cli/commands/space/members/members.test.ts +46 -0
  393. package/src/cli/commands/space/members/members.ts +40 -0
  394. package/src/cli/commands/space/members/util.ts +29 -0
  395. package/src/cli/commands/space/open/index.ts +5 -0
  396. package/src/cli/commands/space/open/open.ts +39 -0
  397. package/src/cli/commands/space/schema/index.ts +12 -0
  398. package/src/cli/commands/space/schema/list/index.ts +5 -0
  399. package/src/cli/commands/space/schema/list/list.test.ts +42 -0
  400. package/src/cli/commands/space/schema/list/list.ts +64 -0
  401. package/src/cli/commands/space/schema/list/util.ts +39 -0
  402. package/src/cli/commands/space/share/index.ts +5 -0
  403. package/src/cli/commands/space/share/share.ts +112 -0
  404. package/src/cli/commands/space/sync/index.ts +5 -0
  405. package/src/cli/commands/space/sync/sync.test.ts +12 -0
  406. package/src/cli/commands/space/sync/sync.ts +33 -0
  407. package/src/cli/index.ts +5 -0
  408. package/src/cli/plugin.ts +81 -0
  409. package/src/components/AwaitingObject.tsx +21 -20
  410. package/src/components/CollectionArticle.tsx +153 -0
  411. package/src/components/CollectionSection.tsx +6 -4
  412. package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +30 -24
  413. package/src/components/CreateDialog/CreateObjectDialog.tsx +66 -57
  414. package/src/components/CreateDialog/CreateObjectPanel.tsx +153 -91
  415. package/src/components/CreateDialog/CreateSpaceDialog.tsx +34 -29
  416. package/src/components/{JoinDialog.tsx → JoinDialog/JoinDialog.tsx} +26 -37
  417. package/src/components/JoinDialog/index.ts +5 -0
  418. package/src/components/{MembersContainer.stories.tsx → MembersContainer/MembersContainer.stories.tsx} +3 -3
  419. package/src/components/{MembersContainer.tsx → MembersContainer/MembersContainer.tsx} +41 -41
  420. package/src/components/MembersContainer/index.ts +5 -0
  421. package/src/components/MenuFooter.tsx +1 -1
  422. package/src/components/ObjectCardStack/ObjectCardStack.tsx +67 -0
  423. package/src/components/ObjectCardStack/ObjectForm.tsx +97 -0
  424. package/src/components/ObjectCardStack/index.ts +7 -0
  425. package/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.tsx +7 -7
  426. package/src/components/ObjectDetails/BaseObjectSettings.tsx +122 -0
  427. package/src/components/{ObjectSettings → ObjectDetails}/ForeignKeys.tsx +6 -6
  428. package/src/components/ObjectDetails/ObjectDetails.tsx +32 -0
  429. package/src/components/ObjectDetails/index.ts +7 -0
  430. package/src/components/{PopoverRenameObject.tsx → ObjectRenamePopover/ObjectRenamePopover.tsx} +11 -15
  431. package/src/components/ObjectRenamePopover/index.ts +5 -0
  432. package/src/components/{RecordMain.stories.tsx → RecordArticle.stories.tsx} +30 -31
  433. package/src/components/RecordArticle.tsx +122 -0
  434. package/src/components/SchemaContainer.tsx +24 -27
  435. package/src/components/SpacePluginSettings.tsx +17 -7
  436. package/src/components/{SpacePresence.stories.tsx → SpacePresence/SpacePresence.stories.tsx} +1 -1
  437. package/src/components/{SpacePresence.tsx → SpacePresence/SpacePresence.tsx} +19 -16
  438. package/src/components/SpacePresence/index.ts +5 -0
  439. package/src/components/{PopoverRenameSpace.tsx → SpaceRenamePopover/SpaceRenamePopover.tsx} +15 -15
  440. package/src/components/SpaceRenamePopover/index.ts +5 -0
  441. package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +4 -4
  442. package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +188 -153
  443. package/src/components/SyncStatus/InlineSyncStatus.tsx +1 -1
  444. package/src/components/SyncStatus/SyncStatus.tsx +26 -20
  445. package/src/components/SyncStatus/save-tracker.ts +2 -2
  446. package/src/components/ViewEditor.tsx +64 -21
  447. package/src/components/index.ts +7 -8
  448. package/src/constants.ts +11 -0
  449. package/src/helpers/index.ts +5 -0
  450. package/src/helpers/query.test.ts +24 -0
  451. package/src/helpers/query.ts +153 -0
  452. package/src/hooks/useActiveSpace.ts +7 -4
  453. package/src/hooks/useInputSurfaceLookup.tsx +9 -13
  454. package/src/hooks/usePath.ts +4 -4
  455. package/src/hooks/useTypeOptions.ts +3 -37
  456. package/src/index.ts +2 -2
  457. package/src/meta.ts +2 -2
  458. package/src/translations.ts +61 -59
  459. package/src/types/capabilities.ts +73 -0
  460. package/src/types/events.ts +15 -0
  461. package/src/types/form.ts +69 -0
  462. package/src/types/index.ts +3 -0
  463. package/src/types/types.ts +532 -261
  464. package/src/util.tsx +330 -282
  465. package/dist/lib/browser/CollectionMain-HTKSZCRR.mjs +0 -31
  466. package/dist/lib/browser/CollectionMain-HTKSZCRR.mjs.map +0 -7
  467. package/dist/lib/browser/ObjectDetailsPanel-5B45G744.mjs +0 -145
  468. package/dist/lib/browser/ObjectDetailsPanel-5B45G744.mjs.map +0 -7
  469. package/dist/lib/browser/ObjectSettings-UFTKBP7B.mjs +0 -146
  470. package/dist/lib/browser/ObjectSettings-UFTKBP7B.mjs.map +0 -7
  471. package/dist/lib/browser/RecordMain-BCSXTSEB.mjs +0 -99
  472. package/dist/lib/browser/RecordMain-BCSXTSEB.mjs.map +0 -7
  473. package/dist/lib/browser/app-graph-builder-QJFO4ANM.mjs +0 -520
  474. package/dist/lib/browser/app-graph-builder-QJFO4ANM.mjs.map +0 -7
  475. package/dist/lib/browser/app-graph-serializer-3R5NVV7U.mjs +0 -80
  476. package/dist/lib/browser/app-graph-serializer-3R5NVV7U.mjs.map +0 -7
  477. package/dist/lib/browser/chunk-2NS3VPSY.mjs +0 -20
  478. package/dist/lib/browser/chunk-2NS3VPSY.mjs.map +0 -7
  479. package/dist/lib/browser/chunk-4V4JNJ33.mjs.map +0 -7
  480. package/dist/lib/browser/chunk-ENBBJSNE.mjs +0 -1949
  481. package/dist/lib/browser/chunk-ENBBJSNE.mjs.map +0 -7
  482. package/dist/lib/browser/chunk-HS2VD6DN.mjs +0 -166
  483. package/dist/lib/browser/chunk-HS2VD6DN.mjs.map +0 -7
  484. package/dist/lib/browser/chunk-OWNBEI5J.mjs.map +0 -7
  485. package/dist/lib/browser/chunk-SLDQWMQ2.mjs +0 -349
  486. package/dist/lib/browser/chunk-SLDQWMQ2.mjs.map +0 -7
  487. package/dist/lib/browser/chunk-VZBIIYFM.mjs.map +0 -7
  488. package/dist/lib/browser/chunk-WJXU4GKV.mjs +0 -19
  489. package/dist/lib/browser/chunk-WJXU4GKV.mjs.map +0 -7
  490. package/dist/lib/browser/identity-created-PW2BA46S.mjs +0 -23
  491. package/dist/lib/browser/identity-created-PW2BA46S.mjs.map +0 -7
  492. package/dist/lib/browser/intent-resolver-MBVOLXFQ.mjs +0 -772
  493. package/dist/lib/browser/intent-resolver-MBVOLXFQ.mjs.map +0 -7
  494. package/dist/lib/browser/react-root-NKEKCEYM.mjs +0 -29
  495. package/dist/lib/browser/react-root-NKEKCEYM.mjs.map +0 -7
  496. package/dist/lib/browser/react-surface-PYSN2MBY.mjs +0 -354
  497. package/dist/lib/browser/react-surface-PYSN2MBY.mjs.map +0 -7
  498. package/dist/lib/browser/schema-defs-DWYK7TYW.mjs +0 -26
  499. package/dist/lib/browser/schema-defs-DWYK7TYW.mjs.map +0 -7
  500. package/dist/lib/browser/settings-ZUCC3ZLB.mjs +0 -24
  501. package/dist/lib/browser/settings-ZUCC3ZLB.mjs.map +0 -7
  502. package/dist/lib/browser/spaces-ready-HTWWJHLR.mjs +0 -201
  503. package/dist/lib/browser/spaces-ready-HTWWJHLR.mjs.map +0 -7
  504. package/dist/lib/browser/state-ISVAKMO7.mjs +0 -47
  505. package/dist/lib/browser/state-ISVAKMO7.mjs.map +0 -7
  506. package/dist/lib/node-esm/CollectionMain-OUHGG6OC.mjs +0 -32
  507. package/dist/lib/node-esm/CollectionMain-OUHGG6OC.mjs.map +0 -7
  508. package/dist/lib/node-esm/ObjectDetailsPanel-4SDHQVQU.mjs +0 -146
  509. package/dist/lib/node-esm/ObjectDetailsPanel-4SDHQVQU.mjs.map +0 -7
  510. package/dist/lib/node-esm/ObjectSettings-EU6F43RP.mjs +0 -147
  511. package/dist/lib/node-esm/ObjectSettings-EU6F43RP.mjs.map +0 -7
  512. package/dist/lib/node-esm/RecordMain-SD76DGOR.mjs +0 -100
  513. package/dist/lib/node-esm/RecordMain-SD76DGOR.mjs.map +0 -7
  514. package/dist/lib/node-esm/app-graph-builder-B23W62HY.mjs +0 -521
  515. package/dist/lib/node-esm/app-graph-builder-B23W62HY.mjs.map +0 -7
  516. package/dist/lib/node-esm/app-graph-serializer-3Z3EXEEF.mjs +0 -81
  517. package/dist/lib/node-esm/app-graph-serializer-3Z3EXEEF.mjs.map +0 -7
  518. package/dist/lib/node-esm/chunk-BDEFTL6K.mjs.map +0 -7
  519. package/dist/lib/node-esm/chunk-G4PDWB7G.mjs.map +0 -7
  520. package/dist/lib/node-esm/chunk-H4JILUJK.mjs +0 -20
  521. package/dist/lib/node-esm/chunk-H4JILUJK.mjs.map +0 -7
  522. package/dist/lib/node-esm/chunk-KKPCCA5O.mjs +0 -1950
  523. package/dist/lib/node-esm/chunk-KKPCCA5O.mjs.map +0 -7
  524. package/dist/lib/node-esm/chunk-PM4ZIGKC.mjs +0 -167
  525. package/dist/lib/node-esm/chunk-PM4ZIGKC.mjs.map +0 -7
  526. package/dist/lib/node-esm/chunk-XEVIWD3O.mjs.map +0 -7
  527. package/dist/lib/node-esm/chunk-YFQXFQGT.mjs +0 -350
  528. package/dist/lib/node-esm/chunk-YFQXFQGT.mjs.map +0 -7
  529. package/dist/lib/node-esm/chunk-ZLMFLI7G.mjs +0 -21
  530. package/dist/lib/node-esm/chunk-ZLMFLI7G.mjs.map +0 -7
  531. package/dist/lib/node-esm/identity-created-MWTLGQRU.mjs +0 -25
  532. package/dist/lib/node-esm/identity-created-MWTLGQRU.mjs.map +0 -7
  533. package/dist/lib/node-esm/intent-resolver-IWI47NTW.mjs +0 -773
  534. package/dist/lib/node-esm/intent-resolver-IWI47NTW.mjs.map +0 -7
  535. package/dist/lib/node-esm/react-root-LX7SIG6M.mjs +0 -30
  536. package/dist/lib/node-esm/react-root-LX7SIG6M.mjs.map +0 -7
  537. package/dist/lib/node-esm/react-surface-6SVGOZNJ.mjs +0 -355
  538. package/dist/lib/node-esm/react-surface-6SVGOZNJ.mjs.map +0 -7
  539. package/dist/lib/node-esm/schema-defs-EOG2UPJU.mjs +0 -27
  540. package/dist/lib/node-esm/schema-defs-EOG2UPJU.mjs.map +0 -7
  541. package/dist/lib/node-esm/settings-ZDJNLFGW.mjs +0 -25
  542. package/dist/lib/node-esm/settings-ZDJNLFGW.mjs.map +0 -7
  543. package/dist/lib/node-esm/spaces-ready-VUGYPF4L.mjs +0 -202
  544. package/dist/lib/node-esm/spaces-ready-VUGYPF4L.mjs.map +0 -7
  545. package/dist/lib/node-esm/state-QZ4Q6ZRL.mjs +0 -48
  546. package/dist/lib/node-esm/state-QZ4Q6ZRL.mjs.map +0 -7
  547. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  548. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  549. package/dist/types/src/capabilities/app-graph-serializer.d.ts +0 -4
  550. package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +0 -1
  551. package/dist/types/src/capabilities/capabilities.d.ts +0 -29
  552. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  553. package/dist/types/src/capabilities/identity-created.d.ts +0 -4
  554. package/dist/types/src/capabilities/identity-created.d.ts.map +0 -1
  555. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -9
  556. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  557. package/dist/types/src/capabilities/react-root.d.ts +0 -7
  558. package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
  559. package/dist/types/src/capabilities/react-surface.d.ts +0 -7
  560. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  561. package/dist/types/src/capabilities/schema-defs.d.ts +0 -4
  562. package/dist/types/src/capabilities/schema-defs.d.ts.map +0 -1
  563. package/dist/types/src/capabilities/settings.d.ts +0 -4
  564. package/dist/types/src/capabilities/settings.d.ts.map +0 -1
  565. package/dist/types/src/capabilities/spaces-ready.d.ts +0 -4
  566. package/dist/types/src/capabilities/spaces-ready.d.ts.map +0 -1
  567. package/dist/types/src/capabilities/state.d.ts +0 -5
  568. package/dist/types/src/capabilities/state.d.ts.map +0 -1
  569. package/dist/types/src/components/CollectionMain.d.ts +0 -7
  570. package/dist/types/src/components/CollectionMain.d.ts.map +0 -1
  571. package/dist/types/src/components/JoinDialog.d.ts.map +0 -1
  572. package/dist/types/src/components/MembersContainer.d.ts.map +0 -1
  573. package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts +0 -9
  574. package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts.map +0 -1
  575. package/dist/types/src/components/ObjectDetailsPanel/ObjectForm.d.ts.map +0 -1
  576. package/dist/types/src/components/ObjectDetailsPanel/index.d.ts +0 -3
  577. package/dist/types/src/components/ObjectDetailsPanel/index.d.ts.map +0 -1
  578. package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts +0 -7
  579. package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +0 -1
  580. package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +0 -1
  581. package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts +0 -8
  582. package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +0 -1
  583. package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts +0 -8
  584. package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +0 -1
  585. package/dist/types/src/components/ObjectSettings/index.d.ts +0 -3
  586. package/dist/types/src/components/ObjectSettings/index.d.ts.map +0 -1
  587. package/dist/types/src/components/PersistenceStatus.d.ts +0 -6
  588. package/dist/types/src/components/PersistenceStatus.d.ts.map +0 -1
  589. package/dist/types/src/components/PopoverRenameObject.d.ts +0 -7
  590. package/dist/types/src/components/PopoverRenameObject.d.ts.map +0 -1
  591. package/dist/types/src/components/PopoverRenameSpace.d.ts +0 -7
  592. package/dist/types/src/components/PopoverRenameSpace.d.ts.map +0 -1
  593. package/dist/types/src/components/RecordMain.d.ts +0 -8
  594. package/dist/types/src/components/RecordMain.d.ts.map +0 -1
  595. package/dist/types/src/components/SpacePresence.d.ts.map +0 -1
  596. package/dist/types/src/events.d.ts +0 -8
  597. package/dist/types/src/events.d.ts.map +0 -1
  598. package/src/capabilities/app-graph-builder.ts +0 -757
  599. package/src/capabilities/app-graph-serializer.ts +0 -76
  600. package/src/capabilities/capabilities.ts +0 -35
  601. package/src/capabilities/identity-created.ts +0 -25
  602. package/src/capabilities/intent-resolver.ts +0 -711
  603. package/src/capabilities/react-root.tsx +0 -21
  604. package/src/capabilities/react-surface.tsx +0 -329
  605. package/src/capabilities/schema-defs.ts +0 -31
  606. package/src/capabilities/settings.ts +0 -21
  607. package/src/capabilities/spaces-ready.ts +0 -234
  608. package/src/capabilities/state.ts +0 -46
  609. package/src/components/CollectionMain.tsx +0 -32
  610. package/src/components/ObjectDetailsPanel/ObjectDetailsPanel.tsx +0 -52
  611. package/src/components/ObjectDetailsPanel/ObjectForm.tsx +0 -75
  612. package/src/components/ObjectDetailsPanel/index.ts +0 -7
  613. package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +0 -81
  614. package/src/components/ObjectSettings/BaseObjectSettings.tsx +0 -107
  615. package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +0 -37
  616. package/src/components/ObjectSettings/index.ts +0 -7
  617. package/src/components/PersistenceStatus.tsx +0 -83
  618. package/src/components/RecordMain.tsx +0 -83
  619. package/src/events.ts +0 -15
  620. /package/dist/types/src/components/{JoinDialog.d.ts → JoinDialog/JoinDialog.d.ts} +0 -0
  621. /package/dist/types/src/components/{MembersContainer.d.ts → MembersContainer/MembersContainer.d.ts} +0 -0
@@ -0,0 +1,828 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ CREATE_OBJECT_DIALOG,
4
+ CREATE_SPACE_DIALOG,
5
+ JOIN_DIALOG,
6
+ OBJECT_RENAME_POPOVER,
7
+ SPACE_RENAME_POPOVER
8
+ } from "./chunk-CVXULIYC.mjs";
9
+ import {
10
+ COMPOSER_SPACE_LOCK,
11
+ cloneObject,
12
+ getNestedObjects
13
+ } from "./chunk-7KMYUWSR.mjs";
14
+ import {
15
+ SpaceCapabilities,
16
+ SpaceEvents,
17
+ SpaceOperation
18
+ } from "./chunk-MPL6NHQX.mjs";
19
+ import "./chunk-SL4BJSUG.mjs";
20
+
21
+ // src/capabilities/operation-resolver/operation-resolver.ts
22
+ import * as Effect from "effect/Effect";
23
+ import { Capability, Common, Plugin, UndoMapping } from "@dxos/app-framework";
24
+ import { SpaceState, getSpace } from "@dxos/client/echo";
25
+ import { Database, Obj, Query, Ref, Relation, Type } from "@dxos/echo";
26
+ import { EchoDatabaseImpl, Serializer } from "@dxos/echo-db";
27
+ import { invariant } from "@dxos/invariant";
28
+ import { Migrations } from "@dxos/migrations";
29
+ import { OperationResolver } from "@dxos/operation";
30
+ import { Operation } from "@dxos/operation";
31
+ import { ClientCapabilities } from "@dxos/plugin-client/types";
32
+ import { ObservabilityOperation } from "@dxos/plugin-observability/types";
33
+ import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
34
+ import { ATTENDABLE_PATH_SEPARATOR } from "@dxos/react-ui-attention/types";
35
+ import { iconValues } from "@dxos/react-ui-pickers/icons";
36
+ import { Collection, ProjectionModel, createEchoChangeCallback, getTypenameFromQuery } from "@dxos/schema";
37
+ import { hues } from "@dxos/ui-theme";
38
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-space/src/capabilities/operation-resolver/operation-resolver.ts";
39
+ var operation_resolver_default = Capability.makeModule(Effect.fnUntraced(function* (props) {
40
+ const { createInvitationUrl, observability } = props;
41
+ const capabilityManager = yield* Capability.Service;
42
+ const resolve = (typename) => capabilityManager.getAll(Common.Capability.Metadata).find(({ id }) => id === typename)?.metadata ?? {};
43
+ return [
44
+ Capability.contributes(Common.Capability.UndoMapping, [
45
+ UndoMapping.make({
46
+ operation: SpaceOperation.DeleteField,
47
+ inverse: SpaceOperation.RestoreField,
48
+ deriveContext: (input, output) => ({
49
+ view: input.view,
50
+ field: output.field,
51
+ props: output.props,
52
+ index: output.index
53
+ }),
54
+ message: [
55
+ "field deleted label",
56
+ {
57
+ ns: "dxos.org/plugin/space"
58
+ }
59
+ ]
60
+ }),
61
+ UndoMapping.make({
62
+ operation: SpaceOperation.RemoveObjects,
63
+ inverse: SpaceOperation.RestoreObjects,
64
+ deriveContext: (_input, output) => ({
65
+ objects: output.objects,
66
+ parentCollection: output.parentCollection,
67
+ indices: output.indices,
68
+ nestedObjectsList: output.nestedObjectsList,
69
+ wasActive: output.wasActive
70
+ }),
71
+ message: (input, _output) => {
72
+ const ns = Obj.getTypename(input.objects[0]);
73
+ return ns && input.objects.length === 1 ? [
74
+ "object deleted label",
75
+ {
76
+ ns
77
+ }
78
+ ] : [
79
+ "objects deleted label",
80
+ {
81
+ ns: "plugin-space"
82
+ }
83
+ ];
84
+ }
85
+ })
86
+ ]),
87
+ Capability.contributes(Common.Capability.OperationResolver, [
88
+ //
89
+ // Open
90
+ //
91
+ OperationResolver.make({
92
+ operation: SpaceOperation.Open,
93
+ handler: (input) => Effect.promise(async () => {
94
+ await input.space.open();
95
+ })
96
+ }),
97
+ //
98
+ // Close
99
+ //
100
+ OperationResolver.make({
101
+ operation: SpaceOperation.Close,
102
+ handler: (input) => Effect.promise(async () => {
103
+ await input.space.close();
104
+ })
105
+ }),
106
+ //
107
+ // Join
108
+ //
109
+ OperationResolver.make({
110
+ operation: SpaceOperation.Join,
111
+ handler: Effect.fnUntraced(function* (input) {
112
+ yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {
113
+ subject: JOIN_DIALOG,
114
+ blockAlign: "start",
115
+ props: {
116
+ initialInvitationCode: input.invitationCode,
117
+ onDone: input.onDone
118
+ }
119
+ });
120
+ })
121
+ }),
122
+ //
123
+ // WaitForObject
124
+ //
125
+ OperationResolver.make({
126
+ operation: SpaceOperation.WaitForObject,
127
+ handler: Effect.fnUntraced(function* (input) {
128
+ yield* Common.Capability.updateAtomValue(SpaceCapabilities.EphemeralState, (current) => ({
129
+ ...current,
130
+ awaiting: input.id
131
+ }));
132
+ })
133
+ }),
134
+ //
135
+ // OpenSettings
136
+ //
137
+ OperationResolver.make({
138
+ operation: SpaceOperation.OpenSettings,
139
+ handler: Effect.fnUntraced(function* (input) {
140
+ yield* Operation.invoke(Common.LayoutOperation.Open, {
141
+ subject: [
142
+ `properties-settings${ATTENDABLE_PATH_SEPARATOR}${input.space.id}`
143
+ ],
144
+ workspace: input.space.id
145
+ });
146
+ })
147
+ }),
148
+ //
149
+ // RemoveObjects
150
+ //
151
+ OperationResolver.make({
152
+ operation: SpaceOperation.RemoveObjects,
153
+ handler: Effect.fnUntraced(function* (input) {
154
+ const layout = yield* Common.Capability.getAtomValue(Common.Capability.Layout);
155
+ const objects = input.objects;
156
+ const space = getSpace(objects[0]);
157
+ invariant(space && objects.every((obj) => Obj.isObject(obj) && getSpace(obj) === space), void 0, {
158
+ F: __dxlog_file,
159
+ L: 157,
160
+ S: this,
161
+ A: [
162
+ "space && objects.every((obj) => Obj.isObject(obj) && getSpace(obj) === space)",
163
+ ""
164
+ ]
165
+ });
166
+ const openObjectIds = new Set(layout.active);
167
+ const parentCollection = input.target ?? space.properties[Collection.Collection.typename]?.target;
168
+ const nestedObjectsList = yield* Effect.promise(() => Promise.all(objects.map((obj) => getNestedObjects(obj, resolve))));
169
+ const indices = objects.map((obj) => Obj.instanceOf(Collection.Collection, parentCollection) ? parentCollection.objects.findIndex((ref) => ref.target === obj) : -1);
170
+ const wasActive = objects.flatMap((obj, i) => [
171
+ obj,
172
+ ...nestedObjectsList[i]
173
+ ]).filter((obj) => Obj.isObject(obj) && openObjectIds.has(Obj.getDXN(obj).toString())).map((obj) => Obj.getDXN(obj).toString());
174
+ for (let i = 0; i < objects.length; i++) {
175
+ const obj = objects[i];
176
+ const nestedObjects = nestedObjectsList[i];
177
+ const index = parentCollection.objects.findIndex((ref) => ref.target === obj);
178
+ if (index !== -1) {
179
+ Obj.change(parentCollection, (c) => {
180
+ c.objects.splice(index, 1);
181
+ });
182
+ }
183
+ for (const nestedObject of nestedObjects) {
184
+ if (Obj.isObject(nestedObject)) {
185
+ Obj.getDatabase(nestedObject)?.remove(nestedObject);
186
+ } else if (Relation.isRelation(nestedObject)) {
187
+ const db2 = Obj.getDatabase(Relation.getSource(nestedObject));
188
+ db2?.remove(nestedObject);
189
+ }
190
+ }
191
+ const db = Obj.getDatabase(obj);
192
+ db?.remove(obj);
193
+ }
194
+ if (wasActive.length > 0) {
195
+ yield* Operation.invoke(Common.LayoutOperation.Close, {
196
+ subject: wasActive
197
+ });
198
+ }
199
+ return {
200
+ objects,
201
+ parentCollection,
202
+ indices,
203
+ nestedObjectsList,
204
+ wasActive
205
+ };
206
+ })
207
+ }),
208
+ //
209
+ // DeleteField
210
+ //
211
+ OperationResolver.make({
212
+ operation: SpaceOperation.DeleteField,
213
+ handler: Effect.fnUntraced(function* (input) {
214
+ const registry = yield* Capability.get(Common.Capability.AtomRegistry);
215
+ const view = input.view;
216
+ const db = Obj.getDatabase(view);
217
+ invariant(db, void 0, {
218
+ F: __dxlog_file,
219
+ L: 231,
220
+ S: this,
221
+ A: [
222
+ "db",
223
+ ""
224
+ ]
225
+ });
226
+ const typename = getTypenameFromQuery(view.query.ast);
227
+ invariant(typename, void 0, {
228
+ F: __dxlog_file,
229
+ L: 233,
230
+ S: this,
231
+ A: [
232
+ "typename",
233
+ ""
234
+ ]
235
+ });
236
+ const schema = yield* Effect.promise(() => db.schemaRegistry.query({
237
+ typename
238
+ }).firstOrUndefined());
239
+ invariant(schema, void 0, {
240
+ F: __dxlog_file,
241
+ L: 235,
242
+ S: this,
243
+ A: [
244
+ "schema",
245
+ ""
246
+ ]
247
+ });
248
+ const projection = new ProjectionModel({
249
+ registry,
250
+ view,
251
+ baseSchema: schema.jsonSchema,
252
+ change: createEchoChangeCallback(view, schema)
253
+ });
254
+ const result = projection.deleteFieldProjection(input.fieldId);
255
+ return {
256
+ field: result.deleted.field,
257
+ props: result.deleted.props,
258
+ index: result.index
259
+ };
260
+ })
261
+ }),
262
+ //
263
+ // OpenCreateObject
264
+ //
265
+ OperationResolver.make({
266
+ operation: SpaceOperation.OpenCreateObject,
267
+ handler: Effect.fnUntraced(function* (input) {
268
+ const ephemeralState = yield* Common.Capability.getAtomValue(SpaceCapabilities.EphemeralState);
269
+ const navigable = input.navigable ?? true;
270
+ yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {
271
+ subject: CREATE_OBJECT_DIALOG,
272
+ blockAlign: "start",
273
+ props: {
274
+ target: input.target,
275
+ views: input.views,
276
+ typename: input.typename,
277
+ initialFormValues: input.initialFormValues,
278
+ onCreateObject: input.onCreateObject,
279
+ shouldNavigate: navigable ? (object) => {
280
+ const isCollection = Obj.instanceOf(Collection.Collection, object);
281
+ const isSystemCollection = Obj.instanceOf(Collection.Managed, object);
282
+ return !isCollection && !isSystemCollection || ephemeralState.navigableCollections;
283
+ } : () => false
284
+ }
285
+ });
286
+ })
287
+ }),
288
+ //
289
+ // AddObject
290
+ //
291
+ OperationResolver.make({
292
+ operation: SpaceOperation.AddObject,
293
+ handler: Effect.fnUntraced(function* (input) {
294
+ const target = input.target;
295
+ const object = input.object;
296
+ const db = Database.isDatabase(target) ? target : Obj.getDatabase(target);
297
+ invariant(db, "Database not found.", {
298
+ F: __dxlog_file,
299
+ L: 294,
300
+ S: this,
301
+ A: [
302
+ "db",
303
+ "'Database not found.'"
304
+ ]
305
+ });
306
+ yield* Collection.add({
307
+ object,
308
+ target: Database.isDatabase(target) ? void 0 : target,
309
+ hidden: input.hidden
310
+ }).pipe(Effect.provide(Database.Service.layer(db)));
311
+ yield* Operation.schedule(ObservabilityOperation.SendEvent, {
312
+ name: "space.object.add",
313
+ properties: {
314
+ spaceId: db.spaceId,
315
+ objectId: object.id
316
+ }
317
+ });
318
+ return {
319
+ id: Obj.getDXN(object).toString(),
320
+ subject: [
321
+ Obj.getDXN(object).toString()
322
+ ],
323
+ object
324
+ };
325
+ })
326
+ }),
327
+ //
328
+ // Share
329
+ //
330
+ OperationResolver.make({
331
+ operation: SpaceOperation.Share,
332
+ handler: Effect.fnUntraced(function* (input) {
333
+ const { space, type, authMethod, multiUse, target } = input;
334
+ const invitation = space.share({
335
+ type,
336
+ authMethod,
337
+ multiUse,
338
+ target
339
+ });
340
+ yield* Operation.schedule(ObservabilityOperation.SendEvent, {
341
+ name: "space.share",
342
+ properties: {
343
+ spaceId: space.id
344
+ }
345
+ });
346
+ return invitation;
347
+ })
348
+ }),
349
+ //
350
+ // Lock
351
+ // TODO(wittjosiah): This appears to be unused.
352
+ //
353
+ OperationResolver.make({
354
+ operation: SpaceOperation.Lock,
355
+ handler: Effect.fnUntraced(function* ({ space }) {
356
+ Obj.change(space.properties, (p) => {
357
+ p[COMPOSER_SPACE_LOCK] = true;
358
+ });
359
+ if (observability) {
360
+ yield* Operation.schedule(ObservabilityOperation.SendEvent, {
361
+ name: "space.lock",
362
+ properties: {
363
+ spaceId: space.id
364
+ }
365
+ });
366
+ }
367
+ })
368
+ }),
369
+ //
370
+ // Unlock
371
+ // TODO(wittjosiah): This appears to be unused.
372
+ //
373
+ OperationResolver.make({
374
+ operation: SpaceOperation.Unlock,
375
+ handler: Effect.fnUntraced(function* ({ space }) {
376
+ Obj.change(space.properties, (p) => {
377
+ p[COMPOSER_SPACE_LOCK] = false;
378
+ });
379
+ if (observability) {
380
+ yield* Operation.schedule(ObservabilityOperation.SendEvent, {
381
+ name: "space.unlock",
382
+ properties: {
383
+ spaceId: space.id
384
+ }
385
+ });
386
+ }
387
+ })
388
+ }),
389
+ //
390
+ // OpenCreateSpace
391
+ //
392
+ OperationResolver.make({
393
+ operation: SpaceOperation.OpenCreateSpace,
394
+ handler: Effect.fnUntraced(function* () {
395
+ yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {
396
+ subject: CREATE_SPACE_DIALOG,
397
+ blockAlign: "start"
398
+ });
399
+ })
400
+ }),
401
+ //
402
+ // Create
403
+ //
404
+ OperationResolver.make({
405
+ operation: SpaceOperation.Create,
406
+ handler: Effect.fnUntraced(function* ({ name, hue: hue_, icon: icon_, edgeReplication }) {
407
+ const client = yield* Capability.get(ClientCapabilities.Client);
408
+ const hue = hue_ ?? hues[Math.floor(Math.random() * hues.length)];
409
+ const icon = icon_ ?? iconValues[Math.floor(Math.random() * iconValues.length)];
410
+ const space = yield* Effect.promise(() => client.spaces.create({
411
+ name,
412
+ hue,
413
+ icon
414
+ }));
415
+ if (edgeReplication) {
416
+ yield* Effect.promise(() => space.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED));
417
+ }
418
+ yield* Effect.promise(() => space.waitUntilReady());
419
+ const collection = Obj.make(Collection.Collection, {
420
+ objects: []
421
+ });
422
+ Obj.change(space.properties, (p) => {
423
+ p[Collection.Collection.typename] = Ref.make(collection);
424
+ if (Migrations.versionProperty) {
425
+ p[Migrations.versionProperty] = Migrations.targetVersion;
426
+ }
427
+ });
428
+ Obj.change(collection, (c) => {
429
+ c.objects.push(Ref.make(Collection.makeManaged({
430
+ key: Type.getTypename(Type.PersistentType)
431
+ })));
432
+ });
433
+ yield* Plugin.activate(SpaceEvents.SpaceCreated);
434
+ const onCreateSpaceCallbacks = yield* Capability.getAll(SpaceCapabilities.OnCreateSpace);
435
+ yield* Effect.all(onCreateSpaceCallbacks.map((onCreateSpace) => onCreateSpace({
436
+ space,
437
+ isDefault: false,
438
+ rootCollection: collection
439
+ })));
440
+ if (observability) {
441
+ yield* Operation.schedule(ObservabilityOperation.SendEvent, {
442
+ name: "space.create",
443
+ properties: {
444
+ spaceId: space.id
445
+ }
446
+ });
447
+ }
448
+ return {
449
+ id: space.id,
450
+ subject: [
451
+ space.id
452
+ ],
453
+ space
454
+ };
455
+ })
456
+ }),
457
+ //
458
+ // Migrate
459
+ //
460
+ OperationResolver.make({
461
+ operation: SpaceOperation.Migrate,
462
+ handler: Effect.fnUntraced(function* (input) {
463
+ const { space, version: targetVersion } = input;
464
+ if (space.state.get() === SpaceState.SPACE_REQUIRES_MIGRATION) {
465
+ yield* Common.Capability.updateAtomValue(SpaceCapabilities.EphemeralState, (current) => ({
466
+ ...current,
467
+ sdkMigrationRunning: {
468
+ ...current.sdkMigrationRunning,
469
+ [space.id]: true
470
+ }
471
+ }));
472
+ yield* Effect.promise(() => space.internal.migrate());
473
+ yield* Common.Capability.updateAtomValue(SpaceCapabilities.EphemeralState, (current) => ({
474
+ ...current,
475
+ sdkMigrationRunning: {
476
+ ...current.sdkMigrationRunning,
477
+ [space.id]: false
478
+ }
479
+ }));
480
+ }
481
+ const result = yield* Effect.promise(() => Migrations.migrate(space, targetVersion));
482
+ yield* Operation.schedule(ObservabilityOperation.SendEvent, {
483
+ name: "space.migrate",
484
+ properties: {
485
+ spaceId: space.id,
486
+ targetVersion,
487
+ version: Migrations.versionProperty ? space.properties[Migrations.versionProperty] : void 0
488
+ }
489
+ });
490
+ return result;
491
+ })
492
+ }),
493
+ //
494
+ // Snapshot
495
+ //
496
+ OperationResolver.make({
497
+ operation: SpaceOperation.Snapshot,
498
+ handler: (input) => Effect.promise(async () => {
499
+ const db = input.db;
500
+ invariant(db instanceof EchoDatabaseImpl, "Database must be an instance of EchoDatabaseImpl", {
501
+ F: __dxlog_file,
502
+ L: 483,
503
+ S: this,
504
+ A: [
505
+ "db instanceof EchoDatabaseImpl",
506
+ "'Database must be an instance of EchoDatabaseImpl'"
507
+ ]
508
+ });
509
+ const backup = await new Serializer().export(db, input.query && Query.fromAst(input.query));
510
+ return {
511
+ snapshot: new Blob([
512
+ JSON.stringify(backup, null, 2)
513
+ ], {
514
+ type: "application/json"
515
+ })
516
+ };
517
+ })
518
+ }),
519
+ //
520
+ // Rename
521
+ //
522
+ OperationResolver.make({
523
+ operation: SpaceOperation.Rename,
524
+ handler: Effect.fnUntraced(function* (input) {
525
+ yield* Operation.invoke(Common.LayoutOperation.UpdatePopover, {
526
+ subject: SPACE_RENAME_POPOVER,
527
+ anchorId: `dxos.org/ui/${input.caller}/${input.space.id}`,
528
+ props: input.space
529
+ });
530
+ })
531
+ }),
532
+ //
533
+ // RenameObject
534
+ //
535
+ OperationResolver.make({
536
+ operation: SpaceOperation.RenameObject,
537
+ handler: Effect.fnUntraced(function* (input) {
538
+ const object = input.object;
539
+ yield* Operation.invoke(Common.LayoutOperation.UpdatePopover, {
540
+ subject: OBJECT_RENAME_POPOVER,
541
+ anchorId: `dxos.org/ui/${input.caller}/${Obj.getDXN(object).toString()}`,
542
+ props: object
543
+ });
544
+ })
545
+ }),
546
+ //
547
+ // OpenMembers
548
+ //
549
+ OperationResolver.make({
550
+ operation: SpaceOperation.OpenMembers,
551
+ handler: Effect.fnUntraced(function* (input) {
552
+ yield* Operation.invoke(Common.LayoutOperation.Open, {
553
+ subject: [
554
+ `members-settings${ATTENDABLE_PATH_SEPARATOR}${input.space.id}`
555
+ ],
556
+ workspace: input.space.id
557
+ });
558
+ })
559
+ }),
560
+ //
561
+ // GetShareLink
562
+ //
563
+ OperationResolver.make({
564
+ operation: SpaceOperation.GetShareLink,
565
+ handler: Effect.fnUntraced(function* (input) {
566
+ const { Invitation, InvitationEncoder } = yield* Effect.promise(() => import("@dxos/react-client/invitations"));
567
+ const invitation = yield* Operation.invoke(SpaceOperation.Share, {
568
+ space: input.space,
569
+ type: Invitation.Type.DELEGATED,
570
+ authMethod: Invitation.AuthMethod.KNOWN_PUBLIC_KEY,
571
+ multiUse: true,
572
+ target: input.target
573
+ });
574
+ const invitationCode = yield* Effect.tryPromise(() => new Promise((resolve2) => {
575
+ invitation.subscribe((inv) => {
576
+ if (inv.state === Invitation.State.CONNECTING) {
577
+ resolve2(InvitationEncoder.encode(inv));
578
+ }
579
+ });
580
+ }));
581
+ const url = createInvitationUrl(invitationCode);
582
+ if (input.copyToClipboard) {
583
+ yield* Effect.tryPromise(() => navigator.clipboard.writeText(url));
584
+ }
585
+ return url;
586
+ })
587
+ }),
588
+ //
589
+ // UseStaticSchema
590
+ //
591
+ OperationResolver.make({
592
+ operation: SpaceOperation.UseStaticSchema,
593
+ handler: Effect.fnUntraced(function* (input) {
594
+ const db = input.db;
595
+ const client = yield* Capability.get(ClientCapabilities.Client);
596
+ const schema = yield* Effect.promise(() => client.graph.schemaRegistry.query({
597
+ typename: input.typename,
598
+ location: [
599
+ "runtime"
600
+ ]
601
+ }).first());
602
+ const space = client.spaces.get(db.spaceId);
603
+ invariant(space, "Space not found", {
604
+ F: __dxlog_file,
605
+ L: 582,
606
+ S: this,
607
+ A: [
608
+ "space",
609
+ "'Space not found'"
610
+ ]
611
+ });
612
+ Obj.change(space.properties, (p) => {
613
+ if (!p.staticRecords) {
614
+ p.staticRecords = [];
615
+ }
616
+ if (!p.staticRecords.includes(input.typename)) {
617
+ p.staticRecords.push(input.typename);
618
+ }
619
+ });
620
+ yield* Plugin.activate(SpaceEvents.SchemaAdded);
621
+ const onSchemaAdded = yield* Capability.getAll(SpaceCapabilities.OnSchemaAdded);
622
+ yield* Effect.all(onSchemaAdded.map((callback) => callback({
623
+ db,
624
+ schema,
625
+ show: input.show
626
+ })), {
627
+ concurrency: "unbounded"
628
+ });
629
+ yield* Operation.schedule(ObservabilityOperation.SendEvent, {
630
+ name: "space.schema.use",
631
+ properties: {
632
+ spaceId: space.id,
633
+ typename: Type.getTypename(schema)
634
+ }
635
+ });
636
+ return {};
637
+ })
638
+ }),
639
+ //
640
+ // AddSchema
641
+ //
642
+ OperationResolver.make({
643
+ operation: SpaceOperation.AddSchema,
644
+ handler: Effect.fnUntraced(function* (input) {
645
+ const db = input.db;
646
+ const schemas = yield* Effect.promise(() => db.schemaRegistry.register([
647
+ input.schema
648
+ ]));
649
+ const schema = schemas[0];
650
+ Obj.change(schema.storedSchema, (s) => {
651
+ if (input.name) {
652
+ s.name = input.name;
653
+ }
654
+ if (input.typename) {
655
+ s.typename = input.typename;
656
+ }
657
+ if (input.version) {
658
+ s.version = input.version;
659
+ }
660
+ });
661
+ yield* Plugin.activate(SpaceEvents.SchemaAdded);
662
+ const onSchemaAdded = yield* Capability.getAll(SpaceCapabilities.OnSchemaAdded);
663
+ yield* Effect.all(onSchemaAdded.map((callback) => callback({
664
+ db,
665
+ schema,
666
+ show: input.show
667
+ })), {
668
+ concurrency: "unbounded"
669
+ });
670
+ yield* Operation.schedule(ObservabilityOperation.SendEvent, {
671
+ name: "space.schema.add",
672
+ properties: {
673
+ spaceId: db.spaceId,
674
+ objectId: schema.id,
675
+ typename: schema.typename
676
+ }
677
+ });
678
+ return {
679
+ id: schema.id,
680
+ object: schema.storedSchema,
681
+ schema
682
+ };
683
+ })
684
+ }),
685
+ //
686
+ // AddRelation
687
+ //
688
+ OperationResolver.make({
689
+ operation: SpaceOperation.AddRelation,
690
+ handler: (input) => Effect.sync(() => {
691
+ const db = input.db;
692
+ const relation = db.add(Relation.make(input.schema, {
693
+ [Relation.Source]: input.source,
694
+ [Relation.Target]: input.target,
695
+ ...input.fields
696
+ }));
697
+ return {
698
+ relation
699
+ };
700
+ })
701
+ }),
702
+ //
703
+ // DuplicateObject
704
+ // TODO(wittjosiah): This appears to be unused.
705
+ //
706
+ OperationResolver.make({
707
+ operation: SpaceOperation.DuplicateObject,
708
+ handler: Effect.fnUntraced(function* (input) {
709
+ const object = input.object;
710
+ const db = Obj.getDatabase(object);
711
+ invariant(db, "Database not found.", {
712
+ F: __dxlog_file,
713
+ L: 681,
714
+ S: this,
715
+ A: [
716
+ "db",
717
+ "'Database not found.'"
718
+ ]
719
+ });
720
+ const newObject = yield* Effect.promise(() => cloneObject(object, resolve, db));
721
+ yield* Operation.invoke(SpaceOperation.AddObject, {
722
+ object: newObject,
723
+ target: db
724
+ });
725
+ })
726
+ }),
727
+ //
728
+ // RestoreField (inverse of DeleteField)
729
+ //
730
+ OperationResolver.make({
731
+ operation: SpaceOperation.RestoreField,
732
+ handler: Effect.fnUntraced(function* (input) {
733
+ const registry = yield* Capability.get(Common.Capability.AtomRegistry);
734
+ const view = input.view;
735
+ const db = Obj.getDatabase(view);
736
+ invariant(db, void 0, {
737
+ F: __dxlog_file,
738
+ L: 696,
739
+ S: this,
740
+ A: [
741
+ "db",
742
+ ""
743
+ ]
744
+ });
745
+ const typename = getTypenameFromQuery(view.query.ast);
746
+ invariant(typename, void 0, {
747
+ F: __dxlog_file,
748
+ L: 698,
749
+ S: this,
750
+ A: [
751
+ "typename",
752
+ ""
753
+ ]
754
+ });
755
+ const schema = yield* Effect.promise(() => db.schemaRegistry.query({
756
+ typename
757
+ }).firstOrUndefined());
758
+ invariant(schema, void 0, {
759
+ F: __dxlog_file,
760
+ L: 700,
761
+ S: this,
762
+ A: [
763
+ "schema",
764
+ ""
765
+ ]
766
+ });
767
+ const projection = new ProjectionModel({
768
+ registry,
769
+ view,
770
+ baseSchema: schema.jsonSchema,
771
+ change: createEchoChangeCallback(view, schema)
772
+ });
773
+ projection.setFieldProjection({
774
+ field: input.field,
775
+ props: input.props
776
+ }, input.index);
777
+ })
778
+ }),
779
+ //
780
+ // RestoreObjects (inverse of RemoveObjects)
781
+ //
782
+ OperationResolver.make({
783
+ operation: SpaceOperation.RestoreObjects,
784
+ handler: Effect.fnUntraced(function* (input) {
785
+ const objects = input.objects;
786
+ const parentCollection = input.parentCollection;
787
+ const indices = input.indices;
788
+ const nestedObjectsList = input.nestedObjectsList;
789
+ const wasActive = input.wasActive;
790
+ const space = getSpace(objects[0]);
791
+ invariant(space, void 0, {
792
+ F: __dxlog_file,
793
+ L: 728,
794
+ S: this,
795
+ A: [
796
+ "space",
797
+ ""
798
+ ]
799
+ });
800
+ const restoredObjects = objects.map((obj) => space.db.add(obj));
801
+ nestedObjectsList.flat().forEach((obj) => {
802
+ if (Obj.isObject(obj)) {
803
+ space.db.add(obj);
804
+ } else if (Relation.isRelation(obj)) {
805
+ space.db.add(obj);
806
+ }
807
+ });
808
+ Obj.change(parentCollection, (c) => {
809
+ indices.forEach((index, i) => {
810
+ if (index !== -1) {
811
+ c.objects.splice(index, 0, Ref.make(restoredObjects[i]));
812
+ }
813
+ });
814
+ });
815
+ if (wasActive.length > 0) {
816
+ yield* Operation.invoke(Common.LayoutOperation.Open, {
817
+ subject: wasActive
818
+ });
819
+ }
820
+ })
821
+ })
822
+ ])
823
+ ];
824
+ }));
825
+ export {
826
+ operation_resolver_default as default
827
+ };
828
+ //# sourceMappingURL=operation-resolver-ZE3XJL5J.mjs.map