@dxos/plugin-space 0.8.4-main.84f28bd → 0.8.4-main.a4bbb77

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 (269) hide show
  1. package/dist/lib/browser/CollectionMain-AX7KKXWP.mjs +31 -0
  2. package/dist/lib/browser/CollectionMain-AX7KKXWP.mjs.map +7 -0
  3. package/dist/lib/browser/ObjectDetailsPanel-ETI5YBTH.mjs +90 -0
  4. package/dist/lib/browser/ObjectDetailsPanel-ETI5YBTH.mjs.map +7 -0
  5. package/dist/lib/browser/RecordMain-TEBGAVSL.mjs +68 -0
  6. package/dist/lib/browser/RecordMain-TEBGAVSL.mjs.map +7 -0
  7. package/dist/lib/browser/{app-graph-builder-PMDF6PJV.mjs → app-graph-builder-W7RVDAUA.mjs} +202 -48
  8. package/dist/lib/browser/app-graph-builder-W7RVDAUA.mjs.map +7 -0
  9. package/dist/lib/browser/{app-graph-serializer-UKYMBX4O.mjs → app-graph-serializer-VLHVTDX4.mjs} +14 -14
  10. package/dist/lib/browser/app-graph-serializer-VLHVTDX4.mjs.map +7 -0
  11. package/dist/lib/browser/{chunk-GVTXQCIW.mjs → chunk-2BFVC5K6.mjs} +431 -373
  12. package/dist/lib/browser/chunk-2BFVC5K6.mjs.map +7 -0
  13. package/dist/lib/browser/chunk-E2I747A7.mjs +20 -0
  14. package/dist/lib/browser/chunk-E2I747A7.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-EIXZABXD.mjs +19 -0
  16. package/dist/lib/browser/chunk-EIXZABXD.mjs.map +7 -0
  17. package/dist/lib/browser/{chunk-VLBRSGJ2.mjs → chunk-ELJDGQTO.mjs} +3 -3
  18. package/dist/lib/browser/{chunk-VLBRSGJ2.mjs.map → chunk-ELJDGQTO.mjs.map} +3 -3
  19. package/dist/lib/browser/chunk-IRKDREHY.mjs +11 -0
  20. package/dist/lib/browser/chunk-IRKDREHY.mjs.map +7 -0
  21. package/dist/lib/browser/{chunk-S6NY637J.mjs → chunk-JCHSUOPF.mjs} +70 -10
  22. package/dist/lib/browser/chunk-JCHSUOPF.mjs.map +7 -0
  23. package/dist/lib/browser/{chunk-WBSEOLEM.mjs → chunk-PN27K4I7.mjs} +209 -54
  24. package/dist/lib/browser/chunk-PN27K4I7.mjs.map +7 -0
  25. package/dist/lib/browser/{chunk-6VLSHG4A.mjs → chunk-ZIZ2JLW6.mjs} +71 -9
  26. package/dist/lib/browser/chunk-ZIZ2JLW6.mjs.map +7 -0
  27. package/dist/lib/browser/{identity-created-23XJJV2N.mjs → identity-created-PW2BA46S.mjs} +4 -4
  28. package/dist/lib/browser/{identity-created-23XJJV2N.mjs.map → identity-created-PW2BA46S.mjs.map} +3 -3
  29. package/dist/lib/browser/index.mjs +95 -26
  30. package/dist/lib/browser/index.mjs.map +3 -3
  31. package/dist/lib/browser/{intent-resolver-WK5WYFH3.mjs → intent-resolver-HA7DPAUE.mjs} +185 -30
  32. package/dist/lib/browser/intent-resolver-HA7DPAUE.mjs.map +7 -0
  33. package/dist/lib/browser/meta.json +1 -1
  34. package/dist/lib/browser/{react-root-7S6FIC5G.mjs → react-root-YQUJU64P.mjs} +11 -11
  35. package/dist/lib/browser/react-root-YQUJU64P.mjs.map +7 -0
  36. package/dist/lib/browser/{react-surface-6C3YJNDK.mjs → react-surface-HTXYMRSW.mjs} +78 -46
  37. package/dist/lib/browser/react-surface-HTXYMRSW.mjs.map +7 -0
  38. package/dist/lib/browser/{schema-defs-K3B3OAH4.mjs → schema-defs-R56ZDBZ7.mjs} +5 -5
  39. package/dist/lib/browser/schema-defs-R56ZDBZ7.mjs.map +7 -0
  40. package/dist/lib/browser/{settings-XNWYRWNM.mjs → settings-5XPQMSPO.mjs} +5 -5
  41. package/dist/lib/browser/{settings-XNWYRWNM.mjs.map → settings-5XPQMSPO.mjs.map} +1 -1
  42. package/dist/lib/browser/{spaces-ready-K7NSNBHM.mjs → spaces-ready-YY77ANIF.mjs} +17 -15
  43. package/dist/lib/browser/spaces-ready-YY77ANIF.mjs.map +7 -0
  44. package/dist/lib/browser/{state-522XTUR4.mjs → state-Y4RVCG4A.mjs} +7 -7
  45. package/dist/lib/browser/state-Y4RVCG4A.mjs.map +7 -0
  46. package/dist/lib/browser/types/index.mjs +2 -2
  47. package/dist/lib/node-esm/CollectionMain-EU57SRYK.mjs +32 -0
  48. package/dist/lib/node-esm/CollectionMain-EU57SRYK.mjs.map +7 -0
  49. package/dist/lib/node-esm/ObjectDetailsPanel-TQ5GN4QJ.mjs +91 -0
  50. package/dist/lib/node-esm/ObjectDetailsPanel-TQ5GN4QJ.mjs.map +7 -0
  51. package/dist/lib/node-esm/RecordMain-WLYJMYER.mjs +70 -0
  52. package/dist/lib/node-esm/RecordMain-WLYJMYER.mjs.map +7 -0
  53. package/dist/lib/node-esm/{app-graph-builder-TO72W6MI.mjs → app-graph-builder-5ZJJUMQI.mjs} +202 -48
  54. package/dist/lib/node-esm/app-graph-builder-5ZJJUMQI.mjs.map +7 -0
  55. package/dist/lib/node-esm/{app-graph-serializer-LA3IZDXJ.mjs → app-graph-serializer-EZJSGJUT.mjs} +14 -14
  56. package/dist/lib/node-esm/app-graph-serializer-EZJSGJUT.mjs.map +7 -0
  57. package/dist/lib/node-esm/{chunk-SXD6T2N4.mjs → chunk-5XRYHWL7.mjs} +71 -9
  58. package/dist/lib/node-esm/chunk-5XRYHWL7.mjs.map +7 -0
  59. package/dist/lib/node-esm/{chunk-2THX6G4C.mjs → chunk-6WNZW6KT.mjs} +70 -10
  60. package/dist/lib/node-esm/chunk-6WNZW6KT.mjs.map +7 -0
  61. package/dist/lib/node-esm/{chunk-OUBADVJE.mjs → chunk-BLPXWPLB.mjs} +431 -373
  62. package/dist/lib/node-esm/chunk-BLPXWPLB.mjs.map +7 -0
  63. package/dist/lib/node-esm/chunk-IJVBBVCL.mjs +21 -0
  64. package/dist/lib/node-esm/chunk-IJVBBVCL.mjs.map +7 -0
  65. package/dist/lib/node-esm/{chunk-HWNG4MEU.mjs → chunk-MWNATOXL.mjs} +2 -4
  66. package/dist/lib/node-esm/chunk-MWNATOXL.mjs.map +7 -0
  67. package/dist/lib/node-esm/{chunk-SSLBYZEY.mjs → chunk-Q6AAQLQG.mjs} +3 -3
  68. package/dist/lib/node-esm/{chunk-SSLBYZEY.mjs.map → chunk-Q6AAQLQG.mjs.map} +3 -3
  69. package/dist/lib/node-esm/chunk-SVFKU7EW.mjs +20 -0
  70. package/dist/lib/node-esm/chunk-SVFKU7EW.mjs.map +7 -0
  71. package/dist/lib/node-esm/{chunk-HJJHLWKY.mjs → chunk-XDQXUZMK.mjs} +209 -54
  72. package/dist/lib/node-esm/chunk-XDQXUZMK.mjs.map +7 -0
  73. package/dist/lib/node-esm/{identity-created-IJQO6GCR.mjs → identity-created-MWTLGQRU.mjs} +4 -4
  74. package/dist/lib/node-esm/{identity-created-IJQO6GCR.mjs.map → identity-created-MWTLGQRU.mjs.map} +3 -3
  75. package/dist/lib/node-esm/index.mjs +95 -26
  76. package/dist/lib/node-esm/index.mjs.map +3 -3
  77. package/dist/lib/node-esm/{intent-resolver-HSR27ME4.mjs → intent-resolver-LQNHMPIX.mjs} +185 -30
  78. package/dist/lib/node-esm/intent-resolver-LQNHMPIX.mjs.map +7 -0
  79. package/dist/lib/node-esm/meta.json +1 -1
  80. package/dist/lib/node-esm/{react-root-HUK3ANLV.mjs → react-root-UTLJEIKE.mjs} +11 -11
  81. package/dist/lib/node-esm/react-root-UTLJEIKE.mjs.map +7 -0
  82. package/dist/lib/node-esm/{react-surface-AGAWX7DD.mjs → react-surface-LYDYON3U.mjs} +78 -46
  83. package/dist/lib/node-esm/react-surface-LYDYON3U.mjs.map +7 -0
  84. package/dist/lib/node-esm/{schema-defs-4MCDG4DV.mjs → schema-defs-7IMJPIWS.mjs} +5 -5
  85. package/dist/lib/node-esm/schema-defs-7IMJPIWS.mjs.map +7 -0
  86. package/dist/lib/node-esm/{settings-YGKHGFPH.mjs → settings-XBSK5KHH.mjs} +5 -5
  87. package/dist/lib/node-esm/{settings-YGKHGFPH.mjs.map → settings-XBSK5KHH.mjs.map} +1 -1
  88. package/dist/lib/node-esm/{spaces-ready-UM2P3DCR.mjs → spaces-ready-YX4IHT4P.mjs} +17 -15
  89. package/dist/lib/node-esm/spaces-ready-YX4IHT4P.mjs.map +7 -0
  90. package/dist/lib/node-esm/{state-C4IOXPZP.mjs → state-HOHAVPUO.mjs} +7 -7
  91. package/dist/lib/node-esm/state-HOHAVPUO.mjs.map +7 -0
  92. package/dist/lib/node-esm/types/index.mjs +2 -2
  93. package/dist/types/src/SpacePlugin.d.ts +1 -1
  94. package/dist/types/src/SpacePlugin.d.ts.map +1 -1
  95. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  96. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  97. package/dist/types/src/capabilities/app-graph-serializer.d.ts +1 -1
  98. package/dist/types/src/capabilities/capabilities.d.ts +11 -5
  99. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  100. package/dist/types/src/capabilities/identity-created.d.ts +1 -1
  101. package/dist/types/src/capabilities/identity-created.d.ts.map +1 -1
  102. package/dist/types/src/capabilities/index.d.ts +11 -12
  103. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  104. package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
  105. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  106. package/dist/types/src/capabilities/react-root.d.ts +2 -2
  107. package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
  108. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  109. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  110. package/dist/types/src/capabilities/schema-defs.d.ts +1 -1
  111. package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -1
  112. package/dist/types/src/capabilities/settings.d.ts +1 -1
  113. package/dist/types/src/capabilities/spaces-ready.d.ts +1 -1
  114. package/dist/types/src/capabilities/spaces-ready.d.ts.map +1 -1
  115. package/dist/types/src/capabilities/state.d.ts +1 -1
  116. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  117. package/dist/types/src/components/AwaitingObject.d.ts.map +1 -1
  118. package/dist/types/src/components/CollectionMain.d.ts +1 -0
  119. package/dist/types/src/components/CollectionMain.d.ts.map +1 -1
  120. package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +5 -4
  121. package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
  122. package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +1584 -4
  123. package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
  124. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +5 -3
  125. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
  126. package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts +1 -1
  127. package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
  128. package/dist/types/src/components/JoinDialog.d.ts +1 -1
  129. package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
  130. package/dist/types/src/components/MembersContainer.d.ts +3 -2
  131. package/dist/types/src/components/MembersContainer.d.ts.map +1 -1
  132. package/dist/types/src/components/MembersContainer.stories.d.ts +1584 -5
  133. package/dist/types/src/components/MembersContainer.stories.d.ts.map +1 -1
  134. package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
  135. package/dist/types/src/components/ObjectDetailsPanel.d.ts +9 -0
  136. package/dist/types/src/components/ObjectDetailsPanel.d.ts.map +1 -0
  137. package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +1 -1
  138. package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +1 -1
  139. package/dist/types/src/components/PersistenceStatus.d.ts.map +1 -1
  140. package/dist/types/src/components/PopoverRenameObject.d.ts +2 -2
  141. package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
  142. package/dist/types/src/components/PopoverRenameSpace.d.ts +1 -1
  143. package/dist/types/src/components/PopoverRenameSpace.d.ts.map +1 -1
  144. package/dist/types/src/components/RecordMain.d.ts +7 -0
  145. package/dist/types/src/components/RecordMain.d.ts.map +1 -0
  146. package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
  147. package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
  148. package/dist/types/src/components/SpacePresence.stories.d.ts +1412 -4
  149. package/dist/types/src/components/SpacePresence.stories.d.ts.map +1 -1
  150. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
  151. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +1417 -4
  152. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
  153. package/dist/types/src/components/SyncStatus/SyncStatus.d.ts +1 -1
  154. package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
  155. package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +1418 -5
  156. package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
  157. package/dist/types/src/components/SyncStatus/status.d.ts +5 -5
  158. package/dist/types/src/components/ViewEditor.d.ts +8 -0
  159. package/dist/types/src/components/ViewEditor.d.ts.map +1 -0
  160. package/dist/types/src/components/index.d.ts +14 -1
  161. package/dist/types/src/components/index.d.ts.map +1 -1
  162. package/dist/types/src/events.d.ts +1 -0
  163. package/dist/types/src/events.d.ts.map +1 -1
  164. package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -1
  165. package/dist/types/src/meta.d.ts +0 -1
  166. package/dist/types/src/meta.d.ts.map +1 -1
  167. package/dist/types/src/translations.d.ts +1262 -11
  168. package/dist/types/src/translations.d.ts.map +1 -1
  169. package/dist/types/src/types/types.d.ts +124 -64
  170. package/dist/types/src/types/types.d.ts.map +1 -1
  171. package/dist/types/src/util.d.ts +34 -7
  172. package/dist/types/src/util.d.ts.map +1 -1
  173. package/dist/types/tsconfig.tsbuildinfo +1 -1
  174. package/package.json +61 -60
  175. package/src/SpacePlugin.ts +205 -137
  176. package/src/capabilities/app-graph-builder.ts +249 -36
  177. package/src/capabilities/app-graph-serializer.ts +7 -7
  178. package/src/capabilities/capabilities.ts +15 -9
  179. package/src/capabilities/identity-created.ts +1 -1
  180. package/src/capabilities/index.ts +0 -1
  181. package/src/capabilities/intent-resolver.ts +140 -19
  182. package/src/capabilities/react-root.tsx +4 -3
  183. package/src/capabilities/react-surface.tsx +93 -42
  184. package/src/capabilities/schema-defs.ts +3 -2
  185. package/src/capabilities/spaces-ready.ts +10 -7
  186. package/src/capabilities/state.ts +5 -4
  187. package/src/components/AwaitingObject.tsx +7 -9
  188. package/src/components/CollectionMain.tsx +4 -2
  189. package/src/components/CollectionSection.tsx +2 -2
  190. package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +11 -10
  191. package/src/components/CreateDialog/CreateObjectDialog.tsx +50 -36
  192. package/src/components/CreateDialog/CreateObjectPanel.tsx +22 -11
  193. package/src/components/CreateDialog/CreateSpaceDialog.tsx +4 -4
  194. package/src/components/JoinDialog.tsx +7 -7
  195. package/src/components/MembersContainer.stories.tsx +36 -10
  196. package/src/components/MembersContainer.tsx +17 -16
  197. package/src/components/MenuFooter.tsx +4 -5
  198. package/src/components/ObjectDetailsPanel.tsx +79 -0
  199. package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +3 -2
  200. package/src/components/ObjectSettings/ForeignKeys.tsx +2 -2
  201. package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +3 -2
  202. package/src/components/PersistenceStatus.tsx +7 -8
  203. package/src/components/PopoverRenameObject.tsx +10 -16
  204. package/src/components/PopoverRenameSpace.tsx +4 -4
  205. package/src/components/RecordMain.tsx +43 -0
  206. package/src/components/SchemaContainer.tsx +4 -4
  207. package/src/components/SpacePluginSettings.tsx +8 -9
  208. package/src/components/SpacePresence.stories.tsx +23 -22
  209. package/src/components/SpacePresence.tsx +9 -9
  210. package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +17 -9
  211. package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +17 -17
  212. package/src/components/SyncStatus/InlineSyncStatus.tsx +2 -2
  213. package/src/components/SyncStatus/SyncStatus.stories.tsx +6 -7
  214. package/src/components/SyncStatus/SyncStatus.tsx +5 -4
  215. package/src/components/SyncStatus/status.ts +4 -4
  216. package/src/components/ViewEditor.tsx +59 -0
  217. package/src/components/index.ts +7 -1
  218. package/src/events.ts +7 -6
  219. package/src/hooks/useActiveSpace.ts +2 -2
  220. package/src/hooks/useInputSurfaceLookup.tsx +1 -1
  221. package/src/meta.ts +1 -3
  222. package/src/translations.ts +68 -5
  223. package/src/types/types.ts +70 -12
  224. package/src/util.tsx +199 -55
  225. package/dist/lib/browser/app-graph-builder-PMDF6PJV.mjs.map +0 -7
  226. package/dist/lib/browser/app-graph-serializer-UKYMBX4O.mjs.map +0 -7
  227. package/dist/lib/browser/chunk-6VLSHG4A.mjs.map +0 -7
  228. package/dist/lib/browser/chunk-C7KGJTAL.mjs +0 -18
  229. package/dist/lib/browser/chunk-C7KGJTAL.mjs.map +0 -7
  230. package/dist/lib/browser/chunk-FBCGT5YY.mjs +0 -13
  231. package/dist/lib/browser/chunk-FBCGT5YY.mjs.map +0 -7
  232. package/dist/lib/browser/chunk-GVTXQCIW.mjs.map +0 -7
  233. package/dist/lib/browser/chunk-S6NY637J.mjs.map +0 -7
  234. package/dist/lib/browser/chunk-WBSEOLEM.mjs.map +0 -7
  235. package/dist/lib/browser/chunk-XXIPJLJF.mjs +0 -19
  236. package/dist/lib/browser/chunk-XXIPJLJF.mjs.map +0 -7
  237. package/dist/lib/browser/intent-resolver-WK5WYFH3.mjs.map +0 -7
  238. package/dist/lib/browser/react-root-7S6FIC5G.mjs.map +0 -7
  239. package/dist/lib/browser/react-surface-6C3YJNDK.mjs.map +0 -7
  240. package/dist/lib/browser/schema-defs-K3B3OAH4.mjs.map +0 -7
  241. package/dist/lib/browser/schema-tools-BNP4JTD7.mjs +0 -124
  242. package/dist/lib/browser/schema-tools-BNP4JTD7.mjs.map +0 -7
  243. package/dist/lib/browser/spaces-ready-K7NSNBHM.mjs.map +0 -7
  244. package/dist/lib/browser/state-522XTUR4.mjs.map +0 -7
  245. package/dist/lib/node-esm/app-graph-builder-TO72W6MI.mjs.map +0 -7
  246. package/dist/lib/node-esm/app-graph-serializer-LA3IZDXJ.mjs.map +0 -7
  247. package/dist/lib/node-esm/chunk-2THX6G4C.mjs.map +0 -7
  248. package/dist/lib/node-esm/chunk-72QMMRKC.mjs +0 -19
  249. package/dist/lib/node-esm/chunk-72QMMRKC.mjs.map +0 -7
  250. package/dist/lib/node-esm/chunk-AT7LGFER.mjs +0 -20
  251. package/dist/lib/node-esm/chunk-AT7LGFER.mjs.map +0 -7
  252. package/dist/lib/node-esm/chunk-HJJHLWKY.mjs.map +0 -7
  253. package/dist/lib/node-esm/chunk-HWNG4MEU.mjs.map +0 -7
  254. package/dist/lib/node-esm/chunk-OUBADVJE.mjs.map +0 -7
  255. package/dist/lib/node-esm/chunk-SXD6T2N4.mjs.map +0 -7
  256. package/dist/lib/node-esm/intent-resolver-HSR27ME4.mjs.map +0 -7
  257. package/dist/lib/node-esm/react-root-HUK3ANLV.mjs.map +0 -7
  258. package/dist/lib/node-esm/react-surface-AGAWX7DD.mjs.map +0 -7
  259. package/dist/lib/node-esm/schema-defs-4MCDG4DV.mjs.map +0 -7
  260. package/dist/lib/node-esm/schema-tools-KWW5PTML.mjs +0 -126
  261. package/dist/lib/node-esm/schema-tools-KWW5PTML.mjs.map +0 -7
  262. package/dist/lib/node-esm/spaces-ready-UM2P3DCR.mjs.map +0 -7
  263. package/dist/lib/node-esm/state-C4IOXPZP.mjs.map +0 -7
  264. package/dist/types/src/capabilities/schema-tool.test.d.ts +0 -2
  265. package/dist/types/src/capabilities/schema-tool.test.d.ts.map +0 -1
  266. package/dist/types/src/capabilities/schema-tools.d.ts +0 -13
  267. package/dist/types/src/capabilities/schema-tools.d.ts.map +0 -1
  268. package/src/capabilities/schema-tool.test.ts +0 -44
  269. package/src/capabilities/schema-tools.ts +0 -125
@@ -1,32 +1,29 @@
1
1
  import {
2
2
  useInputSurfaceLookup,
3
3
  usePath
4
- } from "./chunk-VLBRSGJ2.mjs";
4
+ } from "./chunk-ELJDGQTO.mjs";
5
5
  import {
6
6
  SpaceCapabilities
7
- } from "./chunk-XXIPJLJF.mjs";
7
+ } from "./chunk-E2I747A7.mjs";
8
8
  import {
9
9
  COMPOSER_SPACE_LOCK,
10
10
  getSpaceDisplayName
11
- } from "./chunk-WBSEOLEM.mjs";
11
+ } from "./chunk-PN27K4I7.mjs";
12
12
  import {
13
13
  SpaceAction,
14
14
  SpaceForm
15
- } from "./chunk-S6NY637J.mjs";
15
+ } from "./chunk-JCHSUOPF.mjs";
16
16
  import {
17
- SPACE_PLUGIN,
18
17
  meta
19
- } from "./chunk-FBCGT5YY.mjs";
18
+ } from "./chunk-IRKDREHY.mjs";
20
19
 
21
20
  // src/components/AwaitingObject.tsx
22
21
  import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
23
- import { CheckCircle, CircleDashed, CircleNotch } from "@phosphor-icons/react";
24
22
  import React, { useCallback, useEffect, useState } from "react";
25
- import { createIntent, LayoutAction, useIntentDispatcher, useLayout } from "@dxos/app-framework";
23
+ import { LayoutAction, createIntent, useIntentDispatcher, useLayout } from "@dxos/app-framework";
26
24
  import { useClient } from "@dxos/react-client";
27
25
  import { Filter, fullyQualifiedId, useQuery } from "@dxos/react-client/echo";
28
- import { Button, Toast, useTranslation } from "@dxos/react-ui";
29
- import { getSize, mx } from "@dxos/react-ui-theme";
26
+ import { Button, Icon, Toast, useTranslation } from "@dxos/react-ui";
30
27
  var WAIT_FOR_OBJECT_TIMEOUT = 18e4;
31
28
  var TOAST_TIMEOUT = 24e4;
32
29
  var AwaitingObject = ({ id }) => {
@@ -35,7 +32,7 @@ var AwaitingObject = ({ id }) => {
35
32
  const [open, setOpen] = useState(true);
36
33
  const [waiting, setWaiting] = useState(true);
37
34
  const [found, setFound] = useState(false);
38
- const { t } = useTranslation(SPACE_PLUGIN);
35
+ const { t } = useTranslation(meta.id);
39
36
  const { dispatchPromise: dispatch } = useIntentDispatcher();
40
37
  const layout = useLayout();
41
38
  const client = useClient();
@@ -87,12 +84,16 @@ var AwaitingObject = ({ id }) => {
87
84
  onOpenChange: setOpen
88
85
  }, /* @__PURE__ */ React.createElement(Toast.Body, null, /* @__PURE__ */ React.createElement(Toast.Title, {
89
86
  classNames: "flex items-center gap-2"
90
- }, found ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(CheckCircle, {
91
- className: getSize(5)
92
- }), /* @__PURE__ */ React.createElement("span", null, t("found object label"))) : waiting ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(CircleNotch, {
93
- className: mx(getSize(5), "animate-spin")
94
- }), /* @__PURE__ */ React.createElement("span", null, t("waiting for object label"))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(CircleDashed, {
95
- className: getSize(5)
87
+ }, found ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Icon, {
88
+ icon: "ph--check-circle--regular",
89
+ size: 5
90
+ }), /* @__PURE__ */ React.createElement("span", null, t("found object label"))) : waiting ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Icon, {
91
+ icon: "ph--circle-notch--regular",
92
+ size: 5,
93
+ classNames: "animate-spin"
94
+ }), /* @__PURE__ */ React.createElement("span", null, t("waiting for object label"))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Icon, {
95
+ icon: "ph--circle-dashed--regular",
96
+ size: 5
96
97
  }), /* @__PURE__ */ React.createElement("span", null, t("object not found label")))), /* @__PURE__ */ React.createElement(Toast.Description, null, t(found ? "found object description" : waiting ? "waiting for object description" : "object not found description"))), /* @__PURE__ */ React.createElement(Toast.Actions, null, found ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Toast.Action, {
97
98
  altText: t("go to object alt"),
98
99
  asChild: true
@@ -119,34 +120,55 @@ var AwaitingObject = ({ id }) => {
119
120
 
120
121
  // src/components/CreateDialog/CreateObjectDialog.tsx
121
122
  import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
122
- import { pipe } from "effect";
123
+ import { Effect, pipe } from "effect";
123
124
  import React3, { useCallback as useCallback3, useRef, useState as useState2 } from "react";
124
125
  import { Capabilities, LayoutAction as LayoutAction2, chain, createIntent as createIntent2, useCapabilities, useIntentDispatcher as useIntentDispatcher2, usePluginManager } from "@dxos/app-framework";
125
- import { Query, Type as Type2 } from "@dxos/echo";
126
+ import { Obj, Query, Type as Type2 } from "@dxos/echo";
126
127
  import { invariant } from "@dxos/invariant";
127
128
  import { useClient as useClient2 } from "@dxos/react-client";
128
129
  import { getSpace, isLiveObject, isSpace, useQuery as useQuery2, useSpaces } from "@dxos/react-client/echo";
129
- import { Button as Button2, Dialog, Icon as Icon2, useTranslation as useTranslation3 } from "@dxos/react-ui";
130
+ import { Button as Button2, Dialog, Icon as Icon3, useTranslation as useTranslation3 } from "@dxos/react-ui";
130
131
  import { cardDialogContent, cardDialogHeader } from "@dxos/react-ui-stack";
131
- import { DataType } from "@dxos/schema";
132
+ import { DataType, typenameFromQuery } from "@dxos/schema";
132
133
  import { isNonNullable as isNonNullable2 } from "@dxos/util";
133
134
 
135
+ // src/capabilities/index.ts
136
+ import { lazy } from "@dxos/app-framework";
137
+ var AppGraphBuilder = lazy(() => import("./app-graph-builder-W7RVDAUA.mjs"));
138
+ var AppGraphSerializer = lazy(() => import("./app-graph-serializer-VLHVTDX4.mjs"));
139
+ var IdentityCreated = lazy(() => import("./identity-created-PW2BA46S.mjs"));
140
+ var IntentResolver = lazy(() => import("./intent-resolver-HA7DPAUE.mjs"));
141
+ var ReactRoot = lazy(() => import("./react-root-YQUJU64P.mjs"));
142
+ var ReactSurface = lazy(() => import("./react-surface-HTXYMRSW.mjs"));
143
+ var SchemaDefs = lazy(() => import("./schema-defs-R56ZDBZ7.mjs"));
144
+ var SpaceSettings = lazy(() => import("./settings-5XPQMSPO.mjs"));
145
+ var SpaceState = lazy(() => import("./state-Y4RVCG4A.mjs"));
146
+ var SpacesReady = lazy(() => import("./spaces-ready-YY77ANIF.mjs"));
147
+
134
148
  // src/components/CreateDialog/CreateObjectPanel.tsx
135
149
  import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
150
+ import { Option } from "effect";
136
151
  import React2, { useCallback as useCallback2 } from "react";
137
152
  import { Type } from "@dxos/echo";
138
- import { getTypeAnnotation } from "@dxos/echo-schema";
139
- import { Icon, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
153
+ import { ViewAnnotation, getTypeAnnotation } from "@dxos/echo-schema";
154
+ import { Icon as Icon2, toLocalizedString, useDefaultValue, useTranslation as useTranslation2 } from "@dxos/react-ui";
140
155
  import { Form } from "@dxos/react-ui-form";
141
156
  import { SearchList } from "@dxos/react-ui-searchlist";
142
157
  import { cardDialogOverflow, cardDialogPaddedOverflow, cardDialogSearchListRoot } from "@dxos/react-ui-stack";
143
158
  import { isNonNullable } from "@dxos/util";
144
- var CreateObjectPanel = ({ forms, spaces, typename, target, name: initialName, defaultSpaceId, resolve, onTargetChange, onTypenameChange, onCreateObject }) => {
159
+ var CreateObjectPanel = ({ forms, spaces, typename, target, views, initialFormValues: _initialFormValues, defaultSpaceId, resolve, onTargetChange, onTypenameChange, onCreateObject }) => {
145
160
  var _effect = _useSignals2();
146
161
  try {
147
- const { t } = useTranslation2(SPACE_PLUGIN);
162
+ const { t } = useTranslation2(meta.id);
163
+ const initialFormValues = useDefaultValue(_initialFormValues, () => ({}));
148
164
  const form = forms.find((form2) => Type.getTypename(form2.objectSchema) === typename);
149
- const options = forms.map((form2) => getTypeAnnotation(form2.objectSchema)).filter(isNonNullable).sort((a, b) => {
165
+ const options = forms.filter((form2) => {
166
+ if (views == null) {
167
+ return true;
168
+ } else {
169
+ return views === ViewAnnotation.get(form2.objectSchema).pipe(Option.getOrElse(() => false));
170
+ }
171
+ }).map((form2) => getTypeAnnotation(form2.objectSchema)).filter(isNonNullable).sort((a, b) => {
150
172
  const nameA = t("typename label", {
151
173
  ns: a.typename,
152
174
  defaultValue: a.typename
@@ -198,9 +220,7 @@ var CreateObjectPanel = ({ forms, spaces, typename, target, name: initialName, d
198
220
  className: cardDialogOverflow
199
221
  }, /* @__PURE__ */ React2.createElement(Form, {
200
222
  autoFocus: true,
201
- values: {
202
- name: initialName
203
- },
223
+ values: initialFormValues,
204
224
  schema: form.formSchema,
205
225
  testId: "create-object-form",
206
226
  onSave: handleCreateObject,
@@ -214,7 +234,7 @@ var CreateObjectPanel = ({ forms, spaces, typename, target, name: initialName, d
214
234
  var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
215
235
  var _effect = _useSignals2();
216
236
  try {
217
- const { t } = useTranslation2(SPACE_PLUGIN);
237
+ const { t } = useTranslation2(meta.id);
218
238
  return /* @__PURE__ */ React2.createElement(SearchList.Root, {
219
239
  label: t("space input label"),
220
240
  classNames: cardDialogSearchListRoot
@@ -254,7 +274,7 @@ var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
254
274
  var SelectSchema = ({ options, resolve, onChange }) => {
255
275
  var _effect = _useSignals2();
256
276
  try {
257
- const { t } = useTranslation2(SPACE_PLUGIN);
277
+ const { t } = useTranslation2(meta.id);
258
278
  return /* @__PURE__ */ React2.createElement(SearchList.Root, {
259
279
  label: t("schema input label"),
260
280
  classNames: cardDialogSearchListRoot
@@ -274,7 +294,7 @@ var SelectSchema = ({ options, resolve, onChange }) => {
274
294
  classNames: "flex items-center gap-2"
275
295
  }, /* @__PURE__ */ React2.createElement("span", {
276
296
  className: "flex gap-2 items-center grow truncate"
277
- }, /* @__PURE__ */ React2.createElement(Icon, {
297
+ }, /* @__PURE__ */ React2.createElement(Icon2, {
278
298
  icon: resolve?.(option.typename).icon ?? "ph--placeholder--regular",
279
299
  size: 5
280
300
  }), t("typename label", {
@@ -286,42 +306,28 @@ var SelectSchema = ({ options, resolve, onChange }) => {
286
306
  }
287
307
  };
288
308
 
289
- // src/capabilities/index.ts
290
- import { lazy } from "@dxos/app-framework";
291
- var AppGraphBuilder = lazy(() => import("./app-graph-builder-PMDF6PJV.mjs"));
292
- var AppGraphSerializer = lazy(() => import("./app-graph-serializer-UKYMBX4O.mjs"));
293
- var IdentityCreated = lazy(() => import("./identity-created-23XJJV2N.mjs"));
294
- var IntentResolver = lazy(() => import("./intent-resolver-WK5WYFH3.mjs"));
295
- var ReactRoot = lazy(() => import("./react-root-7S6FIC5G.mjs"));
296
- var ReactSurface = lazy(() => import("./react-surface-6C3YJNDK.mjs"));
297
- var SchemaDefs = lazy(() => import("./schema-defs-K3B3OAH4.mjs"));
298
- var SchemaTools = lazy(() => import("./schema-tools-BNP4JTD7.mjs"));
299
- var SpaceSettings = lazy(() => import("./settings-XNWYRWNM.mjs"));
300
- var SpaceState = lazy(() => import("./state-522XTUR4.mjs"));
301
- var SpacesReady = lazy(() => import("./spaces-ready-K7NSNBHM.mjs"));
302
-
303
309
  // src/components/CreateDialog/CreateObjectDialog.tsx
304
310
  var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx";
305
- var CREATE_OBJECT_DIALOG = `${SPACE_PLUGIN}/CreateObjectDialog`;
306
- var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, name, shouldNavigate: _shouldNavigate }) => {
311
+ var CREATE_OBJECT_DIALOG = `${meta.id}/CreateObjectDialog`;
312
+ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, views, initialFormValues, onCreateObject, shouldNavigate: _shouldNavigate }) => {
307
313
  var _effect = _useSignals3();
308
314
  try {
309
315
  const closeRef = useRef(null);
310
316
  const manager = usePluginManager();
311
- const { t } = useTranslation3(SPACE_PLUGIN);
317
+ const { t } = useTranslation3(meta.id);
312
318
  const client = useClient2();
313
319
  const spaces = useSpaces();
314
- const { dispatchPromise: dispatch } = useIntentDispatcher2();
320
+ const { dispatch } = useIntentDispatcher2();
315
321
  const forms = useCapabilities(SpaceCapabilities.ObjectForm);
316
322
  const [target, setTarget] = useState2(initialTarget);
317
323
  const [typename, setTypename] = useState2(initialTypename);
318
324
  const space = isSpace(target) ? target : getSpace(target);
319
325
  const queryCollections = useQuery2(space, Query.type(DataType.QueryCollection));
320
- const hiddenTypenames = queryCollections.map((collection) => collection.query.typename).filter(isNonNullable2);
326
+ const hiddenTypenames = queryCollections.map((collection) => typenameFromQuery(collection.query)).filter(isNonNullable2);
321
327
  const resolve = useCallback3((typename2) => manager.context.getCapabilities(Capabilities.Metadata).find(({ id }) => id === typename2)?.metadata ?? {}, [
322
328
  manager
323
329
  ]);
324
- const handleCreateObject = useCallback3(async ({ form, data = {} }) => {
330
+ const handleCreateObject = useCallback3(({ form, data = {} }) => Effect.gen(function* () {
325
331
  if (!target) {
326
332
  return;
327
333
  }
@@ -329,18 +335,17 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, na
329
335
  const space2 = isSpace(target) ? target : getSpace(target);
330
336
  invariant(space2, "Missing space", {
331
337
  F: __dxlog_file,
332
- L: 73,
333
- S: void 0,
338
+ L: 83,
339
+ S: this,
334
340
  A: [
335
341
  "space",
336
342
  "'Missing space'"
337
343
  ]
338
344
  });
339
- const result = await dispatch(form.getIntent(data, {
345
+ const { object } = yield* dispatch(form.getIntent(data, {
340
346
  space: space2
341
347
  }));
342
- const object = result.data?.object;
343
- if (isLiveObject(object)) {
348
+ if (isLiveObject(object) && !Obj.instanceOf(DataType.StoredSchema, object)) {
344
349
  const hidden = form.hidden || hiddenTypenames.includes(Type2.getTypename(form.objectSchema));
345
350
  const addObjectIntent = createIntent2(SpaceAction.AddObject, {
346
351
  target,
@@ -349,14 +354,15 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, na
349
354
  });
350
355
  const shouldNavigate = _shouldNavigate ?? (() => true);
351
356
  if (shouldNavigate(object)) {
352
- await dispatch(pipe(addObjectIntent, chain(LayoutAction2.Open, {
357
+ yield* dispatch(pipe(addObjectIntent, chain(LayoutAction2.Open, {
353
358
  part: "main"
354
359
  })));
355
360
  } else {
356
- await dispatch(addObjectIntent);
361
+ yield* dispatch(addObjectIntent);
357
362
  }
363
+ onCreateObject?.(object);
358
364
  }
359
- }, [
365
+ }).pipe(Effect.runPromise), [
360
366
  dispatch,
361
367
  target,
362
368
  resolve,
@@ -374,7 +380,7 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, na
374
380
  }, /* @__PURE__ */ React3.createElement(Dialog.Title, null, t("create object dialog title", {
375
381
  object: t("typename label", {
376
382
  ns: typename,
377
- defaultValue: "Item"
383
+ defaultValue: views ? "View" : "Item"
378
384
  })
379
385
  })), /* @__PURE__ */ React3.createElement(Dialog.Close, {
380
386
  asChild: true
@@ -383,15 +389,16 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, na
383
389
  density: "fine",
384
390
  variant: "ghost",
385
391
  autoFocus: true
386
- }, /* @__PURE__ */ React3.createElement(Icon2, {
392
+ }, /* @__PURE__ */ React3.createElement(Icon3, {
387
393
  icon: "ph--x--regular",
388
394
  size: 4
389
395
  })))), /* @__PURE__ */ React3.createElement(CreateObjectPanel, {
390
396
  forms,
391
397
  spaces,
392
398
  target,
399
+ views,
393
400
  typename,
394
- name,
401
+ initialFormValues,
395
402
  defaultSpaceId: client.spaces.default.id,
396
403
  resolve,
397
404
  onTargetChange: setTarget,
@@ -406,13 +413,13 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, na
406
413
 
407
414
  // src/components/CreateDialog/CreateSpaceDialog.tsx
408
415
  import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
409
- import { Effect } from "effect";
416
+ import { Effect as Effect2 } from "effect";
410
417
  import React4, { useCallback as useCallback4, useRef as useRef2 } from "react";
411
- import { createIntent as createIntent3, LayoutAction as LayoutAction3, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework";
412
- import { Button as Button3, Dialog as Dialog2, Icon as Icon3, useTranslation as useTranslation4 } from "@dxos/react-ui";
418
+ import { LayoutAction as LayoutAction3, createIntent as createIntent3, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework";
419
+ import { Button as Button3, Dialog as Dialog2, Icon as Icon4, useTranslation as useTranslation4 } from "@dxos/react-ui";
413
420
  import { Form as Form2 } from "@dxos/react-ui-form";
414
421
  import { cardDialogContent as cardDialogContent2, cardDialogHeader as cardDialogHeader2 } from "@dxos/react-ui-stack";
415
- var CREATE_SPACE_DIALOG = `${SPACE_PLUGIN}/CreateSpaceDialog`;
422
+ var CREATE_SPACE_DIALOG = `${meta.id}/CreateSpaceDialog`;
416
423
  var initialValues = {
417
424
  edgeReplication: true
418
425
  };
@@ -420,11 +427,11 @@ var CreateSpaceDialog = () => {
420
427
  var _effect = _useSignals4();
421
428
  try {
422
429
  const closeRef = useRef2(null);
423
- const { t } = useTranslation4(SPACE_PLUGIN);
430
+ const { t } = useTranslation4(meta.id);
424
431
  const { dispatch } = useIntentDispatcher3();
425
432
  const inputSurfaceLookup = useInputSurfaceLookup();
426
433
  const handleCreateSpace = useCallback4(async (data) => {
427
- const program = Effect.gen(function* () {
434
+ const program = Effect2.gen(function* () {
428
435
  const { space } = yield* dispatch(createIntent3(SpaceAction.Create, data));
429
436
  yield* dispatch(createIntent3(LayoutAction3.SwitchWorkspace, {
430
437
  part: "workspace",
@@ -437,7 +444,7 @@ var CreateSpaceDialog = () => {
437
444
  }
438
445
  }));
439
446
  });
440
- await Effect.runPromise(program);
447
+ await Effect2.runPromise(program);
441
448
  }, [
442
449
  dispatch
443
450
  ]);
@@ -456,7 +463,7 @@ var CreateSpaceDialog = () => {
456
463
  density: "fine",
457
464
  variant: "ghost",
458
465
  autoFocus: true
459
- }, /* @__PURE__ */ React4.createElement(Icon3, {
466
+ }, /* @__PURE__ */ React4.createElement(Icon4, {
460
467
  icon: "ph--x--regular",
461
468
  size: 4
462
469
  })))), /* @__PURE__ */ React4.createElement("div", {
@@ -477,39 +484,17 @@ var CreateSpaceDialog = () => {
477
484
  }
478
485
  };
479
486
 
480
- // src/components/CollectionMain.tsx
487
+ // src/components/CollectionSection.tsx
481
488
  import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
482
489
  import React5 from "react";
483
490
  import { useTranslation as useTranslation5 } from "@dxos/react-ui";
484
- import { baseSurface, descriptionMessage, mx as mx2 } from "@dxos/react-ui-theme";
485
- var CollectionMain = ({ collection }) => {
491
+ var CollectionSection = ({ collection }) => {
486
492
  var _effect = _useSignals5();
487
493
  try {
488
- const { t } = useTranslation5(SPACE_PLUGIN);
494
+ const { t } = useTranslation5(meta.id);
489
495
  return /* @__PURE__ */ React5.createElement("div", {
490
- role: "none",
491
- className: mx2(baseSurface, "min-bs-screen is-full flex items-center justify-center p-8"),
492
- "data-testid": "composer.firstRunMessage"
493
- }, /* @__PURE__ */ React5.createElement("p", {
494
- role: "alert",
495
- className: mx2(descriptionMessage, "rounded-md p-8 font-normal text-lg max-is-[24rem] break-words")
496
- }, collection.name ?? t("unnamed collection label")));
497
- } finally {
498
- _effect.f();
499
- }
500
- };
501
-
502
- // src/components/CollectionSection.tsx
503
- import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
504
- import React6 from "react";
505
- import { useTranslation as useTranslation6 } from "@dxos/react-ui";
506
- var CollectionSection = ({ collection }) => {
507
- var _effect = _useSignals6();
508
- try {
509
- const { t } = useTranslation6(SPACE_PLUGIN);
510
- return /* @__PURE__ */ React6.createElement("div", {
511
496
  className: "min-bs-[3.5rem] grid grid-rows-subgrid grid-cols-subgrid items-center"
512
- }, /* @__PURE__ */ React6.createElement("span", {
497
+ }, /* @__PURE__ */ React5.createElement("span", {
513
498
  className: "truncate"
514
499
  }, collection.name ?? t("unnamed collection label")));
515
500
  } finally {
@@ -518,22 +503,22 @@ var CollectionSection = ({ collection }) => {
518
503
  };
519
504
 
520
505
  // src/components/JoinDialog.tsx
521
- import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
522
- import React7, { useCallback as useCallback5 } from "react";
523
- import { createIntent as createIntent4, LayoutAction as LayoutAction4, useAppGraph, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework";
506
+ import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
507
+ import React6, { useCallback as useCallback5 } from "react";
508
+ import { LayoutAction as LayoutAction4, createIntent as createIntent4, useAppGraph, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework";
524
509
  import { Trigger } from "@dxos/async";
525
510
  import { ObservabilityAction } from "@dxos/plugin-observability/types";
526
511
  import { useClient as useClient3 } from "@dxos/react-client";
527
- import { Dialog as Dialog3, useTranslation as useTranslation7 } from "@dxos/react-ui";
512
+ import { Dialog as Dialog3, useTranslation as useTranslation6 } from "@dxos/react-ui";
528
513
  import { JoinPanel } from "@dxos/shell/react";
529
- var JOIN_DIALOG = `${SPACE_PLUGIN}/JoinDialog`;
514
+ var JOIN_DIALOG = `${meta.id}/JoinDialog`;
530
515
  var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
531
- var _effect = _useSignals7();
516
+ var _effect = _useSignals6();
532
517
  try {
533
518
  const { dispatchPromise: dispatch } = useIntentDispatcher4();
534
519
  const client = useClient3();
535
520
  const { graph } = useAppGraph();
536
- const { t } = useTranslation7(SPACE_PLUGIN);
521
+ const { t } = useTranslation6(meta.id);
537
522
  const handleDone = useCallback5(async (result) => {
538
523
  const spaceKey = result?.spaceKey;
539
524
  if (!spaceKey) {
@@ -543,18 +528,18 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
543
528
  dispatch(createIntent4(LayoutAction4.AddToast, {
544
529
  part: "toast",
545
530
  subject: {
546
- id: `${SPACE_PLUGIN}/join-success`,
531
+ id: `${meta.id}/join-success`,
547
532
  duration: 5e3,
548
533
  title: [
549
534
  "join success label",
550
535
  {
551
- ns: SPACE_PLUGIN
536
+ ns: meta.id
552
537
  }
553
538
  ],
554
539
  closeLabel: [
555
540
  "dismiss label",
556
541
  {
557
- ns: SPACE_PLUGIN
542
+ ns: meta.id
558
543
  }
559
544
  ]
560
545
  }
@@ -614,16 +599,16 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
614
599
  client,
615
600
  graph
616
601
  ]);
617
- return /* @__PURE__ */ React7.createElement(Dialog3.Content, null, /* @__PURE__ */ React7.createElement(Dialog3.Title, {
602
+ return /* @__PURE__ */ React6.createElement(Dialog3.Content, null, /* @__PURE__ */ React6.createElement(Dialog3.Title, {
618
603
  classNames: "sr-only"
619
604
  }, t("join space label", {
620
605
  ns: "os"
621
- })), /* @__PURE__ */ React7.createElement(JoinPanel, {
606
+ })), /* @__PURE__ */ React6.createElement(JoinPanel, {
622
607
  ...props,
623
- exitActionParent: /* @__PURE__ */ React7.createElement(Dialog3.Close, {
608
+ exitActionParent: /* @__PURE__ */ React6.createElement(Dialog3.Close, {
624
609
  asChild: true
625
610
  }),
626
- doneActionParent: /* @__PURE__ */ React7.createElement(Dialog3.Close, {
611
+ doneActionParent: /* @__PURE__ */ React6.createElement(Dialog3.Close, {
627
612
  asChild: true
628
613
  }),
629
614
  onDone: handleDone
@@ -634,19 +619,17 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
634
619
  };
635
620
 
636
621
  // src/components/MembersContainer.tsx
637
- import { useSignals as _useSignals8 } from "@preact-signals/safe-react/tracking";
638
- import { Check, X } from "@phosphor-icons/react";
639
- import React8, { useCallback as useCallback6, useMemo, useState as useState3 } from "react";
622
+ import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
623
+ import React7, { useCallback as useCallback6, useMemo, useState as useState3 } from "react";
640
624
  import { QR } from "react-qr-rounded";
641
625
  import { createIntent as createIntent5, useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework";
642
626
  import { log } from "@dxos/log";
643
627
  import { useConfig } from "@dxos/react-client";
644
628
  import { fullyQualifiedId as fullyQualifiedId2, useSpaceInvitations } from "@dxos/react-client/echo";
645
629
  import { Invitation, InvitationEncoder } from "@dxos/react-client/invitations";
646
- import { Button as Button4, Clipboard, Icon as Icon4, Input, useId, useTranslation as useTranslation8 } from "@dxos/react-ui";
647
- import { ControlPage, ControlSection, ControlFrame, ControlFrameItem, ControlItemInput } from "@dxos/react-ui-form";
630
+ import { Button as Button4, Clipboard, Icon as Icon5, Input, useId, useTranslation as useTranslation7 } from "@dxos/react-ui";
631
+ import { ControlFrame, ControlFrameItem, ControlItemInput, ControlPage, ControlSection } from "@dxos/react-ui-form";
648
632
  import { StackItem } from "@dxos/react-ui-stack";
649
- import { getSize as getSize2, mx as mx3 } from "@dxos/react-ui-theme";
650
633
  import { DataType as DataType2 } from "@dxos/schema";
651
634
  import { AuthCode, BifurcatedAction, Centered, Emoji, InvitationList, SpaceMemberList, Viewport } from "@dxos/shell/react";
652
635
  import { hexToEmoji } from "@dxos/util";
@@ -660,7 +643,7 @@ var handleInvitationEvent = (invitation, subscription) => {
660
643
  authCode: invitation.authCode
661
644
  }), void 0, {
662
645
  F: __dxlog_file2,
663
- L: 41,
646
+ L: 39,
664
647
  S: void 0,
665
648
  C: (f, a) => f(...a)
666
649
  });
@@ -668,9 +651,9 @@ var handleInvitationEvent = (invitation, subscription) => {
668
651
  }
669
652
  };
670
653
  var MembersContainer = ({ space, createInvitationUrl }) => {
671
- var _effect = _useSignals8();
654
+ var _effect = _useSignals7();
672
655
  try {
673
- const { t } = useTranslation8(SPACE_PLUGIN);
656
+ const { t } = useTranslation7(meta.id);
674
657
  const config = useConfig();
675
658
  const { dispatchPromise: dispatch } = useIntentDispatcher5();
676
659
  const invitations = useSpaceInvitations(space.key);
@@ -698,10 +681,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
698
681
  description: t("invite one description", {
699
682
  ns: "os"
700
683
  }),
701
- icon: () => /* @__PURE__ */ React8.createElement(Icon4, {
702
- icon: "ph--user-plus--regular",
703
- size: 5
704
- }),
684
+ icon: "ph--user-plus--regular",
705
685
  testId: "membersContainer.inviteOne",
706
686
  onClick: async () => {
707
687
  const { data: invitation } = await dispatch(createIntent5(SpaceAction.Share, {
@@ -723,10 +703,7 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
723
703
  description: t("invite many description", {
724
704
  ns: "os"
725
705
  }),
726
- icon: () => /* @__PURE__ */ React8.createElement(Icon4, {
727
- icon: "ph--users-three--regular",
728
- size: 5
729
- }),
706
+ icon: "ph--users-three--regular",
730
707
  testId: "membersContainer.inviteMany",
731
708
  onClick: async () => {
732
709
  const { data: invitation } = await dispatch(createIntent5(SpaceAction.Share, {
@@ -753,44 +730,44 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
753
730
  const handleBack = () => {
754
731
  setSelectedInvitation(null);
755
732
  };
756
- return /* @__PURE__ */ React8.createElement(Clipboard.Provider, null, /* @__PURE__ */ React8.createElement(StackItem.Content, {
733
+ return /* @__PURE__ */ React7.createElement(Clipboard.Provider, null, /* @__PURE__ */ React7.createElement(StackItem.Content, {
757
734
  classNames: "block overflow-y-auto"
758
- }, /* @__PURE__ */ React8.createElement(ControlPage, null, /* @__PURE__ */ React8.createElement(ControlSection, {
735
+ }, /* @__PURE__ */ React7.createElement(ControlPage, null, /* @__PURE__ */ React7.createElement(ControlSection, {
759
736
  title: t("members verbose label"),
760
737
  description: t("members description")
761
- }, /* @__PURE__ */ React8.createElement(ControlFrame, null, /* @__PURE__ */ React8.createElement(ControlFrameItem, {
738
+ }, /* @__PURE__ */ React7.createElement(ControlFrame, null, /* @__PURE__ */ React7.createElement(ControlFrameItem, {
762
739
  title: t("members label")
763
- }, /* @__PURE__ */ React8.createElement(SpaceMemberList, {
740
+ }, /* @__PURE__ */ React7.createElement(SpaceMemberList, {
764
741
  spaceKey: space.key,
765
742
  includeSelf: true
766
- })), locked && /* @__PURE__ */ React8.createElement(ControlFrameItem, {
743
+ })), locked && /* @__PURE__ */ React7.createElement(ControlFrameItem, {
767
744
  title: t("invitations label")
768
- }, /* @__PURE__ */ React8.createElement("p", {
745
+ }, /* @__PURE__ */ React7.createElement("p", {
769
746
  className: "text-description mbe-2"
770
- }, t("locked space description"))), !locked && /* @__PURE__ */ React8.createElement(ControlFrameItem, {
747
+ }, t("locked space description"))), !locked && /* @__PURE__ */ React7.createElement(ControlFrameItem, {
771
748
  title: t("invitations label")
772
- }, selectedInvitation && /* @__PURE__ */ React8.createElement(InvitationSection, {
749
+ }, selectedInvitation && /* @__PURE__ */ React7.createElement(InvitationSection, {
773
750
  ...selectedInvitation,
774
751
  onBack: handleBack
775
- }), !selectedInvitation && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("p", {
752
+ }), !selectedInvitation && /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("p", {
776
753
  className: "text-description mbe-2"
777
- }, t("space invitation description")), /* @__PURE__ */ React8.createElement(InvitationList, {
754
+ }, t("space invitation description")), /* @__PURE__ */ React7.createElement(InvitationList, {
778
755
  className: "mb-2",
779
756
  send: handleSend,
780
757
  invitations: visibleInvitations ?? [],
781
758
  onClickRemove: (invitation) => invitation.cancel(),
782
759
  createInvitationUrl
783
- }), /* @__PURE__ */ React8.createElement(BifurcatedAction, {
760
+ }), /* @__PURE__ */ React7.createElement(BifurcatedAction, {
784
761
  actions: inviteActions,
785
762
  activeAction,
786
763
  onChangeActiveAction: setActiveAction,
787
764
  "data-testid": "membersContainer.createInvitation"
788
- })))), /* @__PURE__ */ React8.createElement("div", {
789
- className: "justify-center gap-4 p-0 mbs-4 container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]"
790
- }, /* @__PURE__ */ React8.createElement(ControlItemInput, {
765
+ })))), /* @__PURE__ */ React7.createElement("div", {
766
+ className: "justify-center p-0 mbs-4 container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]"
767
+ }, /* @__PURE__ */ React7.createElement(ControlItemInput, {
791
768
  title: t("space locked label"),
792
769
  description: t("space locked description")
793
- }, /* @__PURE__ */ React8.createElement(Input.Switch, {
770
+ }, /* @__PURE__ */ React7.createElement(Input.Switch, {
794
771
  checked: locked,
795
772
  onCheckedChange: handleChangeLocked,
796
773
  classNames: "justify-self-end"
@@ -800,26 +777,26 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
800
777
  }
801
778
  };
802
779
  var InvitationSection = ({ state = Invitation.State.INIT, authCode, invitationId = "never", url = "never", onBack }) => {
803
- var _effect = _useSignals8();
780
+ var _effect = _useSignals7();
804
781
  try {
805
782
  const activeView = state < 0 ? "init" : state >= Invitation.State.CANCELLED ? "complete" : state >= Invitation.State.READY_FOR_AUTHENTICATION && authCode ? "auth-code" : "qr-code";
806
- return /* @__PURE__ */ React8.createElement(Viewport.Root, {
783
+ return /* @__PURE__ */ React7.createElement(Viewport.Root, {
807
784
  activeView
808
- }, /* @__PURE__ */ React8.createElement(Viewport.Views, null, /* @__PURE__ */ React8.createElement(Viewport.View, {
785
+ }, /* @__PURE__ */ React7.createElement(Viewport.Views, null, /* @__PURE__ */ React7.createElement(Viewport.View, {
809
786
  id: "init"
810
- }), /* @__PURE__ */ React8.createElement(Viewport.View, {
787
+ }), /* @__PURE__ */ React7.createElement(Viewport.View, {
811
788
  id: "complete"
812
- }, /* @__PURE__ */ React8.createElement(InvitationComplete, {
789
+ }, /* @__PURE__ */ React7.createElement(InvitationComplete, {
813
790
  statusValue: state
814
- })), /* @__PURE__ */ React8.createElement(Viewport.View, {
791
+ })), /* @__PURE__ */ React7.createElement(Viewport.View, {
815
792
  id: "auth-code"
816
- }, /* @__PURE__ */ React8.createElement(InvitationAuthCode, {
793
+ }, /* @__PURE__ */ React7.createElement(InvitationAuthCode, {
817
794
  id: invitationId,
818
795
  code: authCode ?? "never",
819
796
  onCancel: onBack
820
- })), /* @__PURE__ */ React8.createElement(Viewport.View, {
797
+ })), /* @__PURE__ */ React7.createElement(Viewport.View, {
821
798
  id: "qr-code"
822
- }, /* @__PURE__ */ React8.createElement(InvitationQR, {
799
+ }, /* @__PURE__ */ React7.createElement(InvitationQR, {
823
800
  id: invitationId,
824
801
  url,
825
802
  onCancel: onBack
@@ -829,36 +806,36 @@ var InvitationSection = ({ state = Invitation.State.INIT, authCode, invitationId
829
806
  }
830
807
  };
831
808
  var InvitationQR = ({ id, url, onCancel }) => {
832
- var _effect = _useSignals8();
809
+ var _effect = _useSignals7();
833
810
  try {
834
- const { t } = useTranslation8("os");
811
+ const { t } = useTranslation7("os");
835
812
  const qrLabel = useId("members-container__qr-code");
836
813
  const emoji = hexToEmoji(id);
837
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("p", {
814
+ return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("p", {
838
815
  className: "text-description"
839
816
  }, t("qr code description", {
840
- ns: SPACE_PLUGIN
841
- })), /* @__PURE__ */ React8.createElement("div", {
817
+ ns: meta.id
818
+ })), /* @__PURE__ */ React7.createElement("div", {
842
819
  role: "group",
843
820
  className: "grid grid-cols-[1fr_min-content] mlb-2 gap-2"
844
- }, /* @__PURE__ */ React8.createElement("div", {
821
+ }, /* @__PURE__ */ React7.createElement("div", {
845
822
  role: "none",
846
823
  className: "is-full aspect-square relative text-description"
847
- }, /* @__PURE__ */ React8.createElement(QR, {
824
+ }, /* @__PURE__ */ React7.createElement(QR, {
848
825
  rounding: 100,
849
826
  backgroundColor: "transparent",
850
827
  color: "currentColor",
851
828
  "aria-labelledby": qrLabel,
852
829
  errorCorrectionLevel: "Q",
853
830
  cutout: true
854
- }, url ?? "never"), /* @__PURE__ */ React8.createElement(Centered, null, /* @__PURE__ */ React8.createElement(Emoji, {
831
+ }, url ?? "never"), /* @__PURE__ */ React7.createElement(Centered, null, /* @__PURE__ */ React7.createElement(Emoji, {
855
832
  text: emoji
856
- }))), /* @__PURE__ */ React8.createElement("span", {
833
+ }))), /* @__PURE__ */ React7.createElement("span", {
857
834
  id: qrLabel,
858
835
  className: "sr-only"
859
- }, t("qr label")), /* @__PURE__ */ React8.createElement(Clipboard.Button, {
836
+ }, t("qr label")), /* @__PURE__ */ React7.createElement(Clipboard.Button, {
860
837
  value: url ?? "never"
861
- })), /* @__PURE__ */ React8.createElement(Button4, {
838
+ })), /* @__PURE__ */ React7.createElement(Button4, {
862
839
  variant: "ghost",
863
840
  onClick: onCancel
864
841
  }, t("cancel label")));
@@ -867,22 +844,22 @@ var InvitationQR = ({ id, url, onCancel }) => {
867
844
  }
868
845
  };
869
846
  var InvitationAuthCode = ({ id, code, onCancel }) => {
870
- var _effect = _useSignals8();
847
+ var _effect = _useSignals7();
871
848
  try {
872
- const { t } = useTranslation8("os");
849
+ const { t } = useTranslation7("os");
873
850
  const emoji = hexToEmoji(id);
874
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("p", {
851
+ return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("p", {
875
852
  className: "text-description"
876
- }, t("auth other device emoji message")), emoji && /* @__PURE__ */ React8.createElement(Emoji, {
853
+ }, t("auth other device emoji message")), emoji && /* @__PURE__ */ React7.createElement(Emoji, {
877
854
  text: emoji,
878
855
  className: "mli-auto mlb-2 text-center"
879
- }), /* @__PURE__ */ React8.createElement("p", {
856
+ }), /* @__PURE__ */ React7.createElement("p", {
880
857
  className: "text-description"
881
- }, t("auth code message")), /* @__PURE__ */ React8.createElement(AuthCode, {
858
+ }, t("auth code message")), /* @__PURE__ */ React7.createElement(AuthCode, {
882
859
  code,
883
860
  large: true,
884
861
  classNames: "mli-auto mlb-2 text-center grow"
885
- }), /* @__PURE__ */ React8.createElement(Button4, {
862
+ }), /* @__PURE__ */ React7.createElement(Button4, {
886
863
  variant: "ghost",
887
864
  onClick: onCancel
888
865
  }, t("cancel label")));
@@ -891,12 +868,16 @@ var InvitationAuthCode = ({ id, code, onCancel }) => {
891
868
  }
892
869
  };
893
870
  var InvitationComplete = ({ statusValue }) => {
894
- var _effect = _useSignals8();
871
+ var _effect = _useSignals7();
895
872
  try {
896
- return statusValue > 0 ? /* @__PURE__ */ React8.createElement(Check, {
897
- className: mx3("m-1.5", getSize2(6))
898
- }) : /* @__PURE__ */ React8.createElement(X, {
899
- className: mx3("m-1.5", getSize2(6))
873
+ return statusValue > 0 ? /* @__PURE__ */ React7.createElement(Icon5, {
874
+ icon: "ph--check--regular",
875
+ size: 6,
876
+ classNames: "m-1.5"
877
+ }) : /* @__PURE__ */ React7.createElement(Icon5, {
878
+ icon: "ph--x--regular",
879
+ size: 6,
880
+ classNames: "m-1.5"
900
881
  });
901
882
  } finally {
902
883
  _effect.f();
@@ -904,29 +885,29 @@ var InvitationComplete = ({ statusValue }) => {
904
885
  };
905
886
 
906
887
  // src/components/MenuFooter.tsx
907
- import { useSignals as _useSignals9 } from "@preact-signals/safe-react/tracking";
908
- import { Planet } from "@phosphor-icons/react";
909
- import React9 from "react";
888
+ import { useSignals as _useSignals8 } from "@preact-signals/safe-react/tracking";
889
+ import React8 from "react";
910
890
  import { getSpace as getSpace2 } from "@dxos/client/echo";
911
891
  import { useClient as useClient4 } from "@dxos/react-client";
912
- import { DropdownMenu, toLocalizedString as toLocalizedString2, useTranslation as useTranslation9 } from "@dxos/react-ui";
892
+ import { DropdownMenu, Icon as Icon6, toLocalizedString as toLocalizedString2, useTranslation as useTranslation8 } from "@dxos/react-ui";
913
893
  var MenuFooter = ({ object }) => {
914
- var _effect = _useSignals9();
894
+ var _effect = _useSignals8();
915
895
  try {
916
- const { t } = useTranslation9(SPACE_PLUGIN);
896
+ const { t } = useTranslation8(meta.id);
917
897
  const client = useClient4();
918
898
  const space = getSpace2(object);
919
899
  const spaceName = space ? getSpaceDisplayName(space, {
920
900
  personal: client.spaces.default === space
921
901
  }) : "";
922
- return space ? /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(DropdownMenu.Separator, null), /* @__PURE__ */ React9.createElement(DropdownMenu.GroupLabel, null, t("menu footer label")), /* @__PURE__ */ React9.createElement("dl", {
902
+ return space ? /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(DropdownMenu.Separator, null), /* @__PURE__ */ React8.createElement(DropdownMenu.GroupLabel, null, t("menu footer label")), /* @__PURE__ */ React8.createElement("dl", {
923
903
  className: "pis-2 mbe-2 text-xs grid grid-cols-[max-content_1fr] gap-2"
924
- }, /* @__PURE__ */ React9.createElement("dt", {
904
+ }, /* @__PURE__ */ React8.createElement("dt", {
925
905
  className: "uppercase text-[.75em] tracking-wide font-medium mbs-px self-start"
926
- }, t("location label")), /* @__PURE__ */ React9.createElement("dd", {
906
+ }, t("location label")), /* @__PURE__ */ React8.createElement("dd", {
927
907
  className: "line-clamp-3"
928
- }, /* @__PURE__ */ React9.createElement(Planet, {
929
- className: "inline-block mie-1"
908
+ }, /* @__PURE__ */ React8.createElement(Icon6, {
909
+ icon: "ph--planet--regular",
910
+ classNames: "inline-block mie-1"
930
911
  }), toLocalizedString2(spaceName, t)))) : null;
931
912
  } finally {
932
913
  _effect.f();
@@ -934,22 +915,22 @@ var MenuFooter = ({ object }) => {
934
915
  };
935
916
 
936
917
  // src/components/ObjectSettings/ObjectSettingsContainer.tsx
937
- import { useSignals as _useSignals11 } from "@preact-signals/safe-react/tracking";
938
- import React11, { useMemo as useMemo2 } from "react";
918
+ import { useSignals as _useSignals10 } from "@preact-signals/safe-react/tracking";
919
+ import React10, { useMemo as useMemo2 } from "react";
939
920
  import { Surface } from "@dxos/app-framework";
940
- import { Clipboard as Clipboard2 } from "@dxos/react-ui";
921
+ import { Clipboard as Clipboard2, Toolbar } from "@dxos/react-ui";
941
922
  import { StackItem as StackItem2 } from "@dxos/react-ui-stack";
942
923
 
943
924
  // src/components/ObjectSettings/BaseObjectSettings.tsx
944
- import { useSignals as _useSignals10 } from "@preact-signals/safe-react/tracking";
945
- import React10, { useRef as useRef3 } from "react";
946
- import { Input as Input2, useTranslation as useTranslation10 } from "@dxos/react-ui";
925
+ import { useSignals as _useSignals9 } from "@preact-signals/safe-react/tracking";
926
+ import React9, { useRef as useRef3 } from "react";
927
+ import { Input as Input2, useTranslation as useTranslation9 } from "@dxos/react-ui";
947
928
  var BaseObjectSettings = ({ classNames, children, object }) => {
948
- var _effect = _useSignals10();
929
+ var _effect = _useSignals9();
949
930
  try {
950
- const { t } = useTranslation10(meta.id);
931
+ const { t } = useTranslation9(meta.id);
951
932
  const inputRef = useRef3(null);
952
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(Input2.Root, null, /* @__PURE__ */ React10.createElement(Input2.Label, null, t("name label")), /* @__PURE__ */ React10.createElement(Input2.TextInput, {
933
+ return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(Input2.Root, null, /* @__PURE__ */ React9.createElement(Input2.Label, null, t("name label")), /* @__PURE__ */ React9.createElement(Input2.TextInput, {
953
934
  ref: inputRef,
954
935
  placeholder: t("name placeholder"),
955
936
  // TODO(burdon): Use annotation to get the name field.
@@ -970,24 +951,24 @@ var BaseObjectSettings = ({ classNames, children, object }) => {
970
951
 
971
952
  // src/components/ObjectSettings/ObjectSettingsContainer.tsx
972
953
  var ObjectSettingsContainer = ({ object, role }) => {
973
- var _effect = _useSignals11();
954
+ var _effect = _useSignals10();
974
955
  try {
975
956
  const data = useMemo2(() => ({
976
957
  subject: object
977
958
  }), [
978
959
  object
979
960
  ]);
980
- return /* @__PURE__ */ React11.createElement(Clipboard2.Provider, null, /* @__PURE__ */ React11.createElement(StackItem2.Content, {
981
- toolbar: false
982
- }, /* @__PURE__ */ React11.createElement("div", {
961
+ return /* @__PURE__ */ React10.createElement(Clipboard2.Provider, null, /* @__PURE__ */ React10.createElement(StackItem2.Content, {
962
+ toolbar: true
963
+ }, /* @__PURE__ */ React10.createElement(Toolbar.Root, null), /* @__PURE__ */ React10.createElement("div", {
983
964
  role: "none",
984
965
  className: "overflow-y-auto pli-cardSpacingInline plb-cardSpacingBlock"
985
- }, /* @__PURE__ */ React11.createElement(BaseObjectSettings, {
966
+ }, /* @__PURE__ */ React10.createElement(BaseObjectSettings, {
986
967
  object
987
- }, /* @__PURE__ */ React11.createElement(Surface, {
968
+ }, /* @__PURE__ */ React10.createElement(Surface, {
988
969
  role: "base-object-settings",
989
970
  data
990
- })), /* @__PURE__ */ React11.createElement(Surface, {
971
+ })), /* @__PURE__ */ React10.createElement(Surface, {
991
972
  role: "object-settings",
992
973
  data
993
974
  }))));
@@ -997,16 +978,15 @@ var ObjectSettingsContainer = ({ object, role }) => {
997
978
  };
998
979
 
999
980
  // src/components/PersistenceStatus.tsx
1000
- import { useSignals as _useSignals12 } from "@preact-signals/safe-react/tracking";
1001
- import { ArrowsCounterClockwise, CheckCircle as CheckCircle2, Warning } from "@phosphor-icons/react";
1002
- import React12, { useEffect as useEffect2, useState as useState4 } from "react";
981
+ import { useSignals as _useSignals11 } from "@preact-signals/safe-react/tracking";
982
+ import React11, { useEffect as useEffect2, useState as useState4 } from "react";
1003
983
  import { debounce } from "@dxos/async";
1004
- import { Tooltip, useTranslation as useTranslation11 } from "@dxos/react-ui";
1005
- import { getSize as getSize3, mx as mx4, staticPlaceholderText, warningText } from "@dxos/react-ui-theme";
984
+ import { Icon as Icon7, Tooltip, useTranslation as useTranslation10 } from "@dxos/react-ui";
985
+ import { mx, staticPlaceholderText, warningText } from "@dxos/react-ui-theme";
1006
986
  var PersistenceStatus = ({ db }) => {
1007
- var _effect = _useSignals12();
987
+ var _effect = _useSignals11();
1008
988
  try {
1009
- const { t } = useTranslation11(SPACE_PLUGIN);
989
+ const { t } = useTranslation10(meta.id);
1010
990
  const [displayMessage, setDisplayMessage] = useState4(false);
1011
991
  const [status, naturalSetStatus] = useState4(0);
1012
992
  const [prevStatus, setPrevStatus] = useState4(0);
@@ -1023,32 +1003,38 @@ var PersistenceStatus = ({ db }) => {
1023
1003
  ]);
1024
1004
  switch (status) {
1025
1005
  case 2:
1026
- return /* @__PURE__ */ React12.createElement("div", {
1006
+ return /* @__PURE__ */ React11.createElement("div", {
1027
1007
  className: "flex items-center"
1028
- }, /* @__PURE__ */ React12.createElement(Warning, {
1029
- className: mx4(getSize3(4), "me-1")
1030
- }), /* @__PURE__ */ React12.createElement("span", {
1031
- className: mx4("text-sm", warningText)
1008
+ }, /* @__PURE__ */ React11.createElement(Icon7, {
1009
+ icon: "ph--warning--regular",
1010
+ size: 4,
1011
+ classNames: "me-1"
1012
+ }), /* @__PURE__ */ React11.createElement("span", {
1013
+ className: mx("text-sm", warningText)
1032
1014
  }, t("persistence error label")));
1033
1015
  case 1:
1034
- return /* @__PURE__ */ React12.createElement("div", {
1016
+ return /* @__PURE__ */ React11.createElement("div", {
1035
1017
  className: "flex items-center"
1036
- }, /* @__PURE__ */ React12.createElement(ArrowsCounterClockwise, {
1037
- className: mx4(getSize3(4), "me-1")
1038
- }), /* @__PURE__ */ React12.createElement("span", {
1039
- className: mx4("text-sm", staticPlaceholderText)
1018
+ }, /* @__PURE__ */ React11.createElement(Icon7, {
1019
+ icon: "ph--arrows-counter-clockwise--regular",
1020
+ size: 4,
1021
+ classNames: "me-1"
1022
+ }), /* @__PURE__ */ React11.createElement("span", {
1023
+ className: mx("text-sm", staticPlaceholderText)
1040
1024
  }, t("persistence pending label")));
1041
1025
  case 0:
1042
1026
  default:
1043
- return /* @__PURE__ */ React12.createElement(Tooltip.Trigger, {
1027
+ return /* @__PURE__ */ React11.createElement(Tooltip.Trigger, {
1044
1028
  delayDuration: 400,
1045
1029
  role: "status",
1046
1030
  content: t("persisted locally message"),
1047
1031
  className: "flex items-center"
1048
- }, /* @__PURE__ */ React12.createElement(CheckCircle2, {
1049
- className: mx4(getSize3(4), "me-1")
1050
- }), displayMessage && /* @__PURE__ */ React12.createElement("span", {
1051
- className: mx4("text-sm", staticPlaceholderText)
1032
+ }, /* @__PURE__ */ React11.createElement(Icon7, {
1033
+ icon: "ph--check-circle--regular",
1034
+ size: 4,
1035
+ classNames: "me-1"
1036
+ }), displayMessage && /* @__PURE__ */ React11.createElement("span", {
1037
+ className: mx("text-sm", staticPlaceholderText)
1052
1038
  }, t("persisted locally label")));
1053
1039
  }
1054
1040
  } finally {
@@ -1057,37 +1043,33 @@ var PersistenceStatus = ({ db }) => {
1057
1043
  };
1058
1044
 
1059
1045
  // src/components/PopoverRenameObject.tsx
1060
- import { useSignals as _useSignals13 } from "@preact-signals/safe-react/tracking";
1061
- import React13, { useCallback as useCallback7, useRef as useRef4, useState as useState5 } from "react";
1062
- import { createIntent as createIntent6, LayoutAction as LayoutAction5, useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework";
1046
+ import { useSignals as _useSignals12 } from "@preact-signals/safe-react/tracking";
1047
+ import React12, { useCallback as useCallback7, useRef as useRef4, useState as useState5 } from "react";
1048
+ import { LayoutAction as LayoutAction5, createIntent as createIntent6, useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework";
1049
+ import { Obj as Obj2 } from "@dxos/echo";
1063
1050
  import { log as log2 } from "@dxos/log";
1064
- import { Button as Button5, Input as Input3, useTranslation as useTranslation12 } from "@dxos/react-ui";
1051
+ import { Button as Button5, Input as Input3, useTranslation as useTranslation11 } from "@dxos/react-ui";
1065
1052
  var __dxlog_file3 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx";
1066
- var POPOVER_RENAME_OBJECT = `${SPACE_PLUGIN}/PopoverRenameObject`;
1067
- var PopoverRenameObject = ({ object: obj }) => {
1068
- var _effect = _useSignals13();
1053
+ var POPOVER_RENAME_OBJECT = `${meta.id}/PopoverRenameObject`;
1054
+ var PopoverRenameObject = ({ object }) => {
1055
+ var _effect = _useSignals12();
1069
1056
  try {
1070
- const { t } = useTranslation12(SPACE_PLUGIN);
1057
+ const { t } = useTranslation11(meta.id);
1071
1058
  const doneButton = useRef4(null);
1072
- const object = obj;
1073
- const [name, setName] = useState5(object.name || object.title || "");
1059
+ const [name, setName] = useState5(Obj2.getLabel(object));
1074
1060
  const { dispatchPromise: dispatch } = useIntentDispatcher6();
1075
1061
  const handleDone = useCallback7(() => {
1076
1062
  try {
1077
- object.name = name;
1078
- } catch {
1079
- try {
1080
- object.title = name;
1081
- } catch (err) {
1082
- log2.error("Failed to rename object", {
1083
- err
1084
- }, {
1085
- F: __dxlog_file3,
1086
- L: 32,
1087
- S: void 0,
1088
- C: (f, a) => f(...a)
1089
- });
1090
- }
1063
+ name && Obj2.setLabel(object, name);
1064
+ } catch (err) {
1065
+ log2.error("Failed to rename object", {
1066
+ err
1067
+ }, {
1068
+ F: __dxlog_file3,
1069
+ L: 27,
1070
+ S: void 0,
1071
+ C: (f, a) => f(...a)
1072
+ });
1091
1073
  }
1092
1074
  void dispatch(createIntent6(LayoutAction5.UpdatePopover, {
1093
1075
  part: "popover",
@@ -1101,21 +1083,21 @@ var PopoverRenameObject = ({ object: obj }) => {
1101
1083
  object,
1102
1084
  name
1103
1085
  ]);
1104
- return /* @__PURE__ */ React13.createElement("div", {
1086
+ return /* @__PURE__ */ React12.createElement("div", {
1105
1087
  role: "none",
1106
1088
  className: "p-2 flex gap-2"
1107
- }, /* @__PURE__ */ React13.createElement("div", {
1089
+ }, /* @__PURE__ */ React12.createElement("div", {
1108
1090
  role: "none",
1109
1091
  className: "flex-1"
1110
- }, /* @__PURE__ */ React13.createElement(Input3.Root, null, /* @__PURE__ */ React13.createElement(Input3.Label, {
1092
+ }, /* @__PURE__ */ React12.createElement(Input3.Root, null, /* @__PURE__ */ React12.createElement(Input3.Label, {
1111
1093
  srOnly: true
1112
- }, t("object name label")), /* @__PURE__ */ React13.createElement(Input3.TextInput, {
1094
+ }, t("object name label")), /* @__PURE__ */ React12.createElement(Input3.TextInput, {
1113
1095
  placeholder: t("object placeholder"),
1114
1096
  value: name,
1115
1097
  "data-testid": "spacePlugin.renameObject.input",
1116
1098
  onChange: ({ target: { value } }) => setName(value),
1117
1099
  onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
1118
- }))), /* @__PURE__ */ React13.createElement(Button5, {
1100
+ }))), /* @__PURE__ */ React12.createElement(Button5, {
1119
1101
  ref: doneButton,
1120
1102
  classNames: "self-stretch",
1121
1103
  onClick: handleDone
@@ -1128,15 +1110,15 @@ var PopoverRenameObject = ({ object: obj }) => {
1128
1110
  };
1129
1111
 
1130
1112
  // src/components/PopoverRenameSpace.tsx
1131
- import { useSignals as _useSignals14 } from "@preact-signals/safe-react/tracking";
1132
- import React14, { useCallback as useCallback8, useRef as useRef5, useState as useState6 } from "react";
1133
- import { createIntent as createIntent7, LayoutAction as LayoutAction6, useIntentDispatcher as useIntentDispatcher7 } from "@dxos/app-framework";
1134
- import { Button as Button6, Input as Input4, Popover, useTranslation as useTranslation13 } from "@dxos/react-ui";
1135
- var POPOVER_RENAME_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
1113
+ import { useSignals as _useSignals13 } from "@preact-signals/safe-react/tracking";
1114
+ import React13, { useCallback as useCallback8, useRef as useRef5, useState as useState6 } from "react";
1115
+ import { LayoutAction as LayoutAction6, createIntent as createIntent7, useIntentDispatcher as useIntentDispatcher7 } from "@dxos/app-framework";
1116
+ import { Button as Button6, Input as Input4, Popover, useTranslation as useTranslation12 } from "@dxos/react-ui";
1117
+ var POPOVER_RENAME_SPACE = `${meta.id}/PopoverRenameSpace`;
1136
1118
  var PopoverRenameSpace = ({ space }) => {
1137
- var _effect = _useSignals14();
1119
+ var _effect = _useSignals13();
1138
1120
  try {
1139
- const { t } = useTranslation13(SPACE_PLUGIN);
1121
+ const { t } = useTranslation12(meta.id);
1140
1122
  const doneButton = useRef5(null);
1141
1123
  const [name, setName] = useState6(space.properties.name ?? "");
1142
1124
  const { dispatchPromise: dispatch } = useIntentDispatcher7();
@@ -1154,24 +1136,24 @@ var PopoverRenameSpace = ({ space }) => {
1154
1136
  space,
1155
1137
  name
1156
1138
  ]);
1157
- return /* @__PURE__ */ React14.createElement("div", {
1139
+ return /* @__PURE__ */ React13.createElement("div", {
1158
1140
  role: "none",
1159
1141
  className: "p-2 flex gap-2"
1160
- }, /* @__PURE__ */ React14.createElement("div", {
1142
+ }, /* @__PURE__ */ React13.createElement("div", {
1161
1143
  role: "none",
1162
1144
  className: "flex-1"
1163
- }, /* @__PURE__ */ React14.createElement(Input4.Root, null, /* @__PURE__ */ React14.createElement(Input4.Label, {
1145
+ }, /* @__PURE__ */ React13.createElement(Input4.Root, null, /* @__PURE__ */ React13.createElement(Input4.Label, {
1164
1146
  srOnly: true
1165
- }, t("space name label")), /* @__PURE__ */ React14.createElement(Input4.TextInput, {
1147
+ }, t("space name label")), /* @__PURE__ */ React13.createElement(Input4.TextInput, {
1166
1148
  defaultValue: space.properties.name ?? "",
1167
1149
  placeholder: t("unnamed space label"),
1168
1150
  onChange: ({ target: { value } }) => setName(value),
1169
1151
  // TODO(wittjosiah): Ideally this should access the popover context to close the popover.
1170
1152
  // Currently this is not possible because Radix does not expose the popover context.
1171
1153
  onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
1172
- }))), /* @__PURE__ */ React14.createElement(Popover.Close, {
1154
+ }))), /* @__PURE__ */ React13.createElement(Popover.Close, {
1173
1155
  asChild: true
1174
- }, /* @__PURE__ */ React14.createElement(Button6, {
1156
+ }, /* @__PURE__ */ React13.createElement(Button6, {
1175
1157
  ref: doneButton,
1176
1158
  classNames: "self-stretch",
1177
1159
  onClick: handleDone
@@ -1184,10 +1166,10 @@ var PopoverRenameSpace = ({ space }) => {
1184
1166
  };
1185
1167
 
1186
1168
  // src/components/SchemaContainer.tsx
1187
- import { useSignals as _useSignals15 } from "@preact-signals/safe-react/tracking";
1188
- import React15, { useState as useState7, useEffect as useEffect3 } from "react";
1189
- import { useTranslation as useTranslation14 } from "@dxos/react-ui";
1190
- import { controlItemClasses, ControlPage as ControlPage2, ControlSection as ControlSection2 } from "@dxos/react-ui-form";
1169
+ import { useSignals as _useSignals14 } from "@preact-signals/safe-react/tracking";
1170
+ import React14, { useEffect as useEffect3, useState as useState7 } from "react";
1171
+ import { useTranslation as useTranslation13 } from "@dxos/react-ui";
1172
+ import { ControlPage as ControlPage2, ControlSection as ControlSection2, controlItemClasses } from "@dxos/react-ui-form";
1191
1173
  import { StackItem as StackItem3 } from "@dxos/react-ui-stack";
1192
1174
  var useQuerySpaceSchemas = (space) => {
1193
1175
  const [schemas, setSchemas] = useState7([]);
@@ -1203,38 +1185,38 @@ var useQuerySpaceSchemas = (space) => {
1203
1185
  return schemas;
1204
1186
  };
1205
1187
  var SchemaContainer = ({ space }) => {
1206
- var _effect = _useSignals15();
1188
+ var _effect = _useSignals14();
1207
1189
  try {
1208
- const { t } = useTranslation14(SPACE_PLUGIN);
1190
+ const { t } = useTranslation13(meta.id);
1209
1191
  const schemas = useQuerySpaceSchemas(space);
1210
- return /* @__PURE__ */ React15.createElement(StackItem3.Content, {
1192
+ return /* @__PURE__ */ React14.createElement(StackItem3.Content, {
1211
1193
  classNames: "block overflow-y-auto"
1212
- }, /* @__PURE__ */ React15.createElement(ControlPage2, null, /* @__PURE__ */ React15.createElement(ControlSection2, {
1194
+ }, /* @__PURE__ */ React14.createElement(ControlPage2, null, /* @__PURE__ */ React14.createElement(ControlSection2, {
1213
1195
  title: t("schema verbose label"),
1214
1196
  description: t("schema description")
1215
- }, /* @__PURE__ */ React15.createElement("div", {
1197
+ }, /* @__PURE__ */ React14.createElement("div", {
1216
1198
  role: "none",
1217
1199
  className: controlItemClasses
1218
- }, schemas.length === 0 && /* @__PURE__ */ React15.createElement("div", {
1200
+ }, schemas.length === 0 && /* @__PURE__ */ React14.createElement("div", {
1219
1201
  className: "text-center plb-4"
1220
- }, t("no schemas found message")), schemas.map((schema) => /* @__PURE__ */ React15.createElement("div", {
1202
+ }, t("no schemas found message")), schemas.map((schema) => /* @__PURE__ */ React14.createElement("div", {
1221
1203
  key: schema.id
1222
- }, /* @__PURE__ */ React15.createElement("div", null, schema.typename)))))));
1204
+ }, /* @__PURE__ */ React14.createElement("div", null, schema.typename)))))));
1223
1205
  } finally {
1224
1206
  _effect.f();
1225
1207
  }
1226
1208
  };
1227
1209
 
1228
1210
  // src/components/SpacePresence.tsx
1229
- import { useSignals as _useSignals16 } from "@preact-signals/safe-react/tracking";
1230
- import { Option } from "effect";
1231
- import React16, { forwardRef, useCallback as useCallback9, useEffect as useEffect4, useState as useState8 } from "react";
1211
+ import { useSignals as _useSignals15 } from "@preact-signals/safe-react/tracking";
1212
+ import { Option as Option2 } from "effect";
1213
+ import React15, { forwardRef, useCallback as useCallback9, useEffect as useEffect4, useState as useState8 } from "react";
1232
1214
  import { useAppGraph as useAppGraph2, useCapability } from "@dxos/app-framework";
1233
1215
  import { generateName } from "@dxos/display-name";
1234
1216
  import { PublicKey, useClient as useClient5 } from "@dxos/react-client";
1235
- import { getSpace as getSpace3, useMembers, fullyQualifiedId as fullyQualifiedId3 } from "@dxos/react-client/echo";
1217
+ import { fullyQualifiedId as fullyQualifiedId3, getSpace as getSpace3, useMembers } from "@dxos/react-client/echo";
1236
1218
  import { useIdentity } from "@dxos/react-client/halo";
1237
- import { Avatar, Tooltip as Tooltip2, Popover as Popover2, useTranslation as useTranslation15, List, ListItem, useDefaultValue } from "@dxos/react-ui";
1219
+ import { Avatar, List, ListItem, Popover as Popover2, Tooltip as Tooltip2, useDefaultValue as useDefaultValue2, useTranslation as useTranslation14 } from "@dxos/react-ui";
1238
1220
  import { AttentionGlyph, useAttended, useAttention } from "@dxos/react-ui-attention";
1239
1221
  import { ComplexMap, keyToFallback } from "@dxos/util";
1240
1222
  var REFRESH_INTERVAL = 5e3;
@@ -1242,7 +1224,7 @@ var ACTIVITY_DURATION = 3e4;
1242
1224
  var noViewers = new ComplexMap(PublicKey.hash);
1243
1225
  var getName = (identity) => identity.profile?.displayName ?? generateName(identity.identityKey.toHex());
1244
1226
  var SpacePresence = ({ object, spaceKey }) => {
1245
- var _effect = _useSignals16();
1227
+ var _effect = _useSignals15();
1246
1228
  try {
1247
1229
  const spaceState = useCapability(SpaceCapabilities.MutableState);
1248
1230
  const client = useClient5();
@@ -1272,7 +1254,7 @@ var SpacePresence = ({ object, spaceKey }) => {
1272
1254
  lastSeen
1273
1255
  };
1274
1256
  }).toSorted((a, b) => a.lastSeen - b.lastSeen);
1275
- return /* @__PURE__ */ React16.createElement(FullPresence, {
1257
+ return /* @__PURE__ */ React15.createElement(FullPresence, {
1276
1258
  members: membersForObject
1277
1259
  });
1278
1260
  } finally {
@@ -1280,46 +1262,46 @@ var SpacePresence = ({ object, spaceKey }) => {
1280
1262
  }
1281
1263
  };
1282
1264
  var FullPresence = (props) => {
1283
- var _effect = _useSignals16();
1265
+ var _effect = _useSignals15();
1284
1266
  try {
1285
1267
  const { size = 9, onMemberClick } = props;
1286
- const members = useDefaultValue(props.members, () => []);
1268
+ const members = useDefaultValue2(props.members, () => []);
1287
1269
  if (members.length === 0) {
1288
1270
  return null;
1289
1271
  }
1290
- return /* @__PURE__ */ React16.createElement("div", {
1272
+ return /* @__PURE__ */ React15.createElement("div", {
1291
1273
  className: "dx-avatar-group",
1292
1274
  "data-testid": "spacePlugin.presence"
1293
- }, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React16.createElement(Tooltip2.Trigger, {
1275
+ }, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React15.createElement(Tooltip2.Trigger, {
1294
1276
  key: member.identity.identityKey.toHex(),
1295
1277
  side: "bottom",
1296
1278
  content: getName(member.identity),
1297
1279
  className: "grid focus:outline-none"
1298
- }, /* @__PURE__ */ React16.createElement(PresenceAvatar, {
1280
+ }, /* @__PURE__ */ React15.createElement(PresenceAvatar, {
1299
1281
  identity: member.identity,
1300
1282
  match: member.currentlyAttended,
1301
1283
  index: members.length - i,
1302
1284
  onClick: () => onMemberClick?.(member),
1303
1285
  size
1304
- }))), members.length > 3 && /* @__PURE__ */ React16.createElement(Popover2.Root, null, /* @__PURE__ */ React16.createElement(Popover2.Trigger, {
1286
+ }))), members.length > 3 && /* @__PURE__ */ React15.createElement(Popover2.Root, null, /* @__PURE__ */ React15.createElement(Popover2.Trigger, {
1305
1287
  className: "grid focus:outline-none"
1306
- }, /* @__PURE__ */ React16.createElement(Avatar.Root, null, /* @__PURE__ */ React16.createElement(Avatar.Content, {
1288
+ }, /* @__PURE__ */ React15.createElement(Avatar.Root, null, /* @__PURE__ */ React15.createElement(Avatar.Content, {
1307
1289
  status: "inactive",
1308
1290
  style: {
1309
1291
  zIndex: members.length - 4
1310
1292
  },
1311
1293
  fallback: `+${members.length - 3}`,
1312
1294
  size
1313
- }))), /* @__PURE__ */ React16.createElement(Popover2.Portal, null, /* @__PURE__ */ React16.createElement(Popover2.Content, {
1295
+ }))), /* @__PURE__ */ React15.createElement(Popover2.Portal, null, /* @__PURE__ */ React15.createElement(Popover2.Content, {
1314
1296
  side: "bottom"
1315
- }, /* @__PURE__ */ React16.createElement(Popover2.Arrow, null), /* @__PURE__ */ React16.createElement(Popover2.Viewport, {
1297
+ }, /* @__PURE__ */ React15.createElement(Popover2.Arrow, null), /* @__PURE__ */ React15.createElement(Popover2.Viewport, {
1316
1298
  classNames: "max-bs-56"
1317
- }, /* @__PURE__ */ React16.createElement(List, null, members.map((member) => /* @__PURE__ */ React16.createElement(ListItem.Root, {
1299
+ }, /* @__PURE__ */ React15.createElement(List, null, members.map((member) => /* @__PURE__ */ React15.createElement(ListItem.Root, {
1318
1300
  key: member.identity.identityKey.toHex(),
1319
1301
  classNames: "flex gap-2 items-center cursor-pointer mbe-2",
1320
1302
  onClick: () => onMemberClick?.(member),
1321
1303
  "data-testid": "identity-list-item"
1322
- }, /* @__PURE__ */ React16.createElement(PresenceAvatar, {
1304
+ }, /* @__PURE__ */ React15.createElement(PresenceAvatar, {
1323
1305
  identity: member.identity,
1324
1306
  size,
1325
1307
  showName: true,
@@ -1330,11 +1312,11 @@ var FullPresence = (props) => {
1330
1312
  }
1331
1313
  };
1332
1314
  var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, index, onClick, size }, forwardedRef) => {
1333
- var _effect = _useSignals16();
1315
+ var _effect = _useSignals15();
1334
1316
  try {
1335
1317
  const status = match ? "current" : "active";
1336
1318
  const fallbackValue = keyToFallback(identity.identityKey);
1337
- return /* @__PURE__ */ React16.createElement(Avatar.Root, null, /* @__PURE__ */ React16.createElement(Avatar.Content, {
1319
+ return /* @__PURE__ */ React15.createElement(Avatar.Root, null, /* @__PURE__ */ React15.createElement(Avatar.Content, {
1338
1320
  status,
1339
1321
  hue: identity.profile?.data?.hue || fallbackValue.hue,
1340
1322
  "data-testid": "spacePlugin.presence.member",
@@ -1348,7 +1330,7 @@ var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, in
1348
1330
  onClick,
1349
1331
  fallback: identity.profile?.data?.emoji || fallbackValue.emoji,
1350
1332
  ref: forwardedRef
1351
- }), /* @__PURE__ */ React16.createElement(Avatar.Label, {
1333
+ }), /* @__PURE__ */ React15.createElement(Avatar.Label, {
1352
1334
  classNames: showName ? "text-sm truncate pli-2" : "sr-only"
1353
1335
  }, getName(identity)));
1354
1336
  } finally {
@@ -1356,7 +1338,7 @@ var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, in
1356
1338
  }
1357
1339
  });
1358
1340
  var SmallPresenceLive = ({ id, open, viewers }) => {
1359
- var _effect = _useSignals16();
1341
+ var _effect = _useSignals15();
1360
1342
  try {
1361
1343
  const { hasAttention, isAncestor, isRelated } = useAttention(id);
1362
1344
  const isAttended = hasAttention || isAncestor || isRelated;
@@ -1364,7 +1346,7 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
1364
1346
  const attended = useAttended();
1365
1347
  const startOfAttention = attended.at(-1);
1366
1348
  const path = usePath(graph, startOfAttention);
1367
- const containsAttended = !open && !isAttended && id && Option.isSome(path) ? path.value.includes(id) : false;
1349
+ const containsAttended = !open && !isAttended && id && Option2.isSome(path) ? path.value.includes(id) : false;
1368
1350
  const getActiveViewers = (viewers2) => {
1369
1351
  const moment = Date.now();
1370
1352
  return Array.from(viewers2.values()).filter((viewer) => moment - viewer.lastSeen < ACTIVITY_DURATION);
@@ -1381,7 +1363,7 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
1381
1363
  }, [
1382
1364
  viewers
1383
1365
  ]);
1384
- return /* @__PURE__ */ React16.createElement(SmallPresence, {
1366
+ return /* @__PURE__ */ React15.createElement(SmallPresence, {
1385
1367
  count: activeViewers.length,
1386
1368
  attended: isAttended,
1387
1369
  containsAttended
@@ -1391,16 +1373,16 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
1391
1373
  }
1392
1374
  };
1393
1375
  var SmallPresence = ({ count = 0, attended, containsAttended }) => {
1394
- var _effect = _useSignals16();
1376
+ var _effect = _useSignals15();
1395
1377
  try {
1396
- const { t } = useTranslation15(SPACE_PLUGIN);
1397
- return /* @__PURE__ */ React16.createElement(Tooltip2.Trigger, {
1378
+ const { t } = useTranslation14(meta.id);
1379
+ return /* @__PURE__ */ React15.createElement(Tooltip2.Trigger, {
1398
1380
  asChild: true,
1399
1381
  content: t("presence label", {
1400
1382
  count
1401
1383
  }),
1402
1384
  side: "bottom"
1403
- }, /* @__PURE__ */ React16.createElement(AttentionGlyph, {
1385
+ }, /* @__PURE__ */ React15.createElement(AttentionGlyph, {
1404
1386
  attended,
1405
1387
  containsAttended,
1406
1388
  presence: count > 1 ? "many" : count === 1 ? "one" : "none",
@@ -1412,45 +1394,43 @@ var SmallPresence = ({ count = 0, attended, containsAttended }) => {
1412
1394
  };
1413
1395
 
1414
1396
  // src/components/SpacePluginSettings.tsx
1415
- import { useSignals as _useSignals17 } from "@preact-signals/safe-react/tracking";
1416
- import React17 from "react";
1397
+ import { useSignals as _useSignals16 } from "@preact-signals/safe-react/tracking";
1398
+ import React16 from "react";
1417
1399
  import { createIntent as createIntent8, useIntentDispatcher as useIntentDispatcher8 } from "@dxos/app-framework";
1418
1400
  import { useClient as useClient6 } from "@dxos/react-client";
1419
1401
  import { useSpaces as useSpaces2 } from "@dxos/react-client/echo";
1420
- import { Input as Input5, toLocalizedString as toLocalizedString3, useTranslation as useTranslation16, List as List2, ListItem as ListItem2, IconButton } from "@dxos/react-ui";
1421
- import { controlItemClasses as controlItemClasses2, ControlPage as ControlPage3, ControlSection as ControlSection3, DeprecatedFormInput } from "@dxos/react-ui-form";
1402
+ import { IconButton, Input as Input5, List as List2, ListItem as ListItem2, toLocalizedString as toLocalizedString3, useTranslation as useTranslation15 } from "@dxos/react-ui";
1403
+ import { ControlGroup, ControlItemInput as ControlItemInput2, ControlPage as ControlPage3, ControlSection as ControlSection3, controlItemClasses as controlItemClasses2 } from "@dxos/react-ui-form";
1422
1404
  var SpacePluginSettings = ({ settings }) => {
1423
- var _effect = _useSignals17();
1405
+ var _effect = _useSignals16();
1424
1406
  try {
1425
- const { t } = useTranslation16(SPACE_PLUGIN);
1407
+ const { t } = useTranslation15(meta.id);
1426
1408
  const client = useClient6();
1427
1409
  const spaces = useSpaces2({
1428
1410
  all: settings.showHidden
1429
1411
  });
1430
1412
  const { dispatchPromise: dispatch } = useIntentDispatcher8();
1431
- return /* @__PURE__ */ React17.createElement(ControlPage3, null, /* @__PURE__ */ React17.createElement(ControlSection3, {
1413
+ return /* @__PURE__ */ React16.createElement(ControlPage3, null, /* @__PURE__ */ React16.createElement(ControlSection3, {
1432
1414
  title: t("space settings label"),
1433
1415
  description: t("space settings description")
1434
- }, /* @__PURE__ */ React17.createElement("div", {
1435
- className: "pli-trimMd container-max-width"
1436
- }, /* @__PURE__ */ React17.createElement(DeprecatedFormInput, {
1437
- label: t("show hidden spaces label")
1438
- }, /* @__PURE__ */ React17.createElement(Input5.Switch, {
1416
+ }, /* @__PURE__ */ React16.createElement(ControlGroup, null, /* @__PURE__ */ React16.createElement(ControlItemInput2, {
1417
+ title: t("show hidden spaces label")
1418
+ }, /* @__PURE__ */ React16.createElement(Input5.Switch, {
1439
1419
  checked: settings.showHidden,
1440
1420
  onCheckedChange: (checked) => settings.showHidden = !!checked
1441
- }))), /* @__PURE__ */ React17.createElement(List2, {
1421
+ }))), /* @__PURE__ */ React16.createElement(List2, {
1442
1422
  classNames: [
1443
1423
  controlItemClasses2,
1444
1424
  "flex flex-col gap-trimSm"
1445
1425
  ]
1446
- }, spaces.map((space) => /* @__PURE__ */ React17.createElement(ListItem2.Root, {
1426
+ }, spaces.map((space) => /* @__PURE__ */ React16.createElement(ListItem2.Root, {
1447
1427
  key: space.id,
1448
1428
  classNames: "is-full items-center"
1449
- }, /* @__PURE__ */ React17.createElement(ListItem2.Heading, {
1429
+ }, /* @__PURE__ */ React16.createElement(ListItem2.Heading, {
1450
1430
  classNames: "grow truncate !min-bs-0"
1451
1431
  }, toLocalizedString3(getSpaceDisplayName(space, {
1452
1432
  personal: space === client.spaces.default
1453
- }), t)), /* @__PURE__ */ React17.createElement(IconButton, {
1433
+ }), t)), /* @__PURE__ */ React16.createElement(IconButton, {
1454
1434
  icon: "ph--faders--regular",
1455
1435
  onClick: () => dispatch(createIntent8(SpaceAction.OpenSettings, {
1456
1436
  space
@@ -1463,16 +1443,16 @@ var SpacePluginSettings = ({ settings }) => {
1463
1443
  };
1464
1444
 
1465
1445
  // src/components/SpaceSettings/SpaceSettingsContainer.tsx
1466
- import { useSignals as _useSignals18 } from "@preact-signals/safe-react/tracking";
1467
- import { pipe as pipe2, Schema } from "effect";
1468
- import React18, { useCallback as useCallback10, useMemo as useMemo3, useState as useState9 } from "react";
1469
- import { chain as chain2, createIntent as createIntent9, LayoutAction as LayoutAction7, useIntentDispatcher as useIntentDispatcher9 } from "@dxos/app-framework";
1446
+ import { useSignals as _useSignals17 } from "@preact-signals/safe-react/tracking";
1447
+ import { Schema, pipe as pipe2 } from "effect";
1448
+ import React17, { useCallback as useCallback10, useMemo as useMemo3, useState as useState9 } from "react";
1449
+ import { LayoutAction as LayoutAction7, chain as chain2, createIntent as createIntent9, useIntentDispatcher as useIntentDispatcher9 } from "@dxos/app-framework";
1470
1450
  import { log as log3 } from "@dxos/log";
1471
1451
  import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
1472
1452
  import { useClient as useClient7 } from "@dxos/react-client";
1473
1453
  import { SpaceState as SpaceState2 } from "@dxos/react-client/echo";
1474
- import { Button as Button7, Input as Input6, useMulticastObservable, useTranslation as useTranslation17 } from "@dxos/react-ui";
1475
- import { Form as Form3, ControlItem, ControlItemInput as ControlItemInput2, ControlSection as ControlSection4, ControlPage as ControlPage4 } from "@dxos/react-ui-form";
1454
+ import { Button as Button7, Input as Input6, useMulticastObservable, useTranslation as useTranslation16 } from "@dxos/react-ui";
1455
+ import { ControlItem, ControlItemInput as ControlItemInput3, ControlPage as ControlPage4, ControlSection as ControlSection4, Form as Form3 } from "@dxos/react-ui-form";
1476
1456
  import { HuePicker, IconPicker } from "@dxos/react-ui-pickers";
1477
1457
  import { StackItem as StackItem4 } from "@dxos/react-ui-stack";
1478
1458
  var __dxlog_file4 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsContainer.tsx";
@@ -1482,9 +1462,9 @@ var FormSchema = SpaceForm.pipe(Schema.extend(Schema.Struct({
1482
1462
  })
1483
1463
  })));
1484
1464
  var SpaceSettingsContainer = ({ space }) => {
1485
- var _effect = _useSignals18();
1465
+ var _effect = _useSignals17();
1486
1466
  try {
1487
- const { t } = useTranslation17(SPACE_PLUGIN);
1467
+ const { t } = useTranslation16(meta.id);
1488
1468
  const { dispatchPromise: dispatch } = useIntentDispatcher9();
1489
1469
  const client = useClient7();
1490
1470
  const archived = useMulticastObservable(space.state) === SpaceState2.SPACE_INACTIVE;
@@ -1550,10 +1530,10 @@ var SpaceSettingsContainer = ({ space }) => {
1550
1530
  onValueChange,
1551
1531
  type
1552
1532
  ]);
1553
- return /* @__PURE__ */ React18.createElement(ControlItemInput2, {
1533
+ return /* @__PURE__ */ React17.createElement(ControlItemInput3, {
1554
1534
  title: label,
1555
1535
  description: t("display name description")
1556
- }, /* @__PURE__ */ React18.createElement(Input6.TextInput, {
1536
+ }, /* @__PURE__ */ React17.createElement(Input6.TextInput, {
1557
1537
  value: getValue(),
1558
1538
  onChange: handleChange,
1559
1539
  placeholder: t("display name input placeholder"),
@@ -1561,21 +1541,21 @@ var SpaceSettingsContainer = ({ space }) => {
1561
1541
  }));
1562
1542
  },
1563
1543
  icon: ({ type, label, getValue, onValueChange }) => {
1564
- const handleChange = useCallback10((nextEmoji) => onValueChange(type, nextEmoji), [
1544
+ const handleChange = useCallback10((icon) => onValueChange(type, icon), [
1565
1545
  onValueChange,
1566
1546
  type
1567
1547
  ]);
1568
- const handleEmojiReset = useCallback10(() => onValueChange(type, void 0), [
1548
+ const handleReset = useCallback10(() => onValueChange(type, void 0), [
1569
1549
  onValueChange,
1570
1550
  type
1571
1551
  ]);
1572
- return /* @__PURE__ */ React18.createElement(ControlItem, {
1552
+ return /* @__PURE__ */ React17.createElement(ControlItem, {
1573
1553
  title: label,
1574
1554
  description: t("icon description")
1575
- }, /* @__PURE__ */ React18.createElement(IconPicker, {
1555
+ }, /* @__PURE__ */ React17.createElement(IconPicker, {
1576
1556
  value: getValue(),
1577
1557
  onChange: handleChange,
1578
- onReset: handleEmojiReset,
1558
+ onReset: handleReset,
1579
1559
  classNames: "justify-self-end",
1580
1560
  iconSize: 5
1581
1561
  }));
@@ -1585,17 +1565,17 @@ var SpaceSettingsContainer = ({ space }) => {
1585
1565
  onValueChange,
1586
1566
  type
1587
1567
  ]);
1588
- const handleHueReset = useCallback10(() => onValueChange(type, void 0), [
1568
+ const handleReset = useCallback10(() => onValueChange(type, void 0), [
1589
1569
  onValueChange,
1590
1570
  type
1591
1571
  ]);
1592
- return /* @__PURE__ */ React18.createElement(ControlItem, {
1572
+ return /* @__PURE__ */ React17.createElement(ControlItem, {
1593
1573
  title: label,
1594
1574
  description: t("hue description")
1595
- }, /* @__PURE__ */ React18.createElement(HuePicker, {
1575
+ }, /* @__PURE__ */ React17.createElement(HuePicker, {
1596
1576
  value: getValue(),
1597
1577
  onChange: handleChange,
1598
- onReset: handleHueReset,
1578
+ onReset: handleReset,
1599
1579
  classNames: "[--hue-preview-size:1.25rem] justify-self-end"
1600
1580
  }));
1601
1581
  },
@@ -1604,10 +1584,10 @@ var SpaceSettingsContainer = ({ space }) => {
1604
1584
  onValueChange,
1605
1585
  type
1606
1586
  ]);
1607
- return /* @__PURE__ */ React18.createElement(ControlItemInput2, {
1587
+ return /* @__PURE__ */ React17.createElement(ControlItemInput3, {
1608
1588
  title: label,
1609
1589
  description: t("edge replication description")
1610
- }, /* @__PURE__ */ React18.createElement(Input6.Switch, {
1590
+ }, /* @__PURE__ */ React17.createElement(Input6.Switch, {
1611
1591
  checked: getValue(),
1612
1592
  onCheckedChange: handleChange,
1613
1593
  classNames: "justify-self-end"
@@ -1619,10 +1599,10 @@ var SpaceSettingsContainer = ({ space }) => {
1619
1599
  type,
1620
1600
  getValue
1621
1601
  ]);
1622
- return /* @__PURE__ */ React18.createElement(ControlItemInput2, {
1602
+ return /* @__PURE__ */ React17.createElement(ControlItemInput3, {
1623
1603
  title: label,
1624
1604
  description: t("archive space description")
1625
- }, /* @__PURE__ */ React18.createElement(Button7, {
1605
+ }, /* @__PURE__ */ React17.createElement(Button7, {
1626
1606
  disabled: space === client.spaces.default,
1627
1607
  onClick: handleChange
1628
1608
  }, getValue() ? t("unarchive space label") : t("archive space label")));
@@ -1631,23 +1611,23 @@ var SpaceSettingsContainer = ({ space }) => {
1631
1611
  t,
1632
1612
  space
1633
1613
  ]);
1634
- return /* @__PURE__ */ React18.createElement(StackItem4.Content, {
1635
- classNames: "block overflow-y-auto pli-2"
1636
- }, /* @__PURE__ */ React18.createElement(ControlPage4, null, /* @__PURE__ */ React18.createElement(ControlSection4, {
1614
+ return /* @__PURE__ */ React17.createElement(StackItem4.Content, {
1615
+ classNames: "block overflow-y-auto"
1616
+ }, /* @__PURE__ */ React17.createElement(ControlPage4, null, /* @__PURE__ */ React17.createElement(ControlSection4, {
1637
1617
  title: t("space properties settings verbose label", {
1638
- ns: SPACE_PLUGIN
1618
+ ns: meta.id
1639
1619
  }),
1640
1620
  description: t("space properties settings description", {
1641
- ns: SPACE_PLUGIN
1621
+ ns: meta.id
1642
1622
  })
1643
- }, /* @__PURE__ */ React18.createElement(Form3, {
1623
+ }, /* @__PURE__ */ React17.createElement(Form3, {
1644
1624
  schema: FormSchema,
1645
1625
  values,
1646
1626
  autoSave: true,
1647
1627
  onSave: handleSave,
1648
1628
  Custom: customElements,
1649
1629
  outerSpacing: false,
1650
- classNames: "container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content] gap-4"
1630
+ classNames: "container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]"
1651
1631
  }))));
1652
1632
  } finally {
1653
1633
  _effect.f();
@@ -1655,15 +1635,15 @@ var SpaceSettingsContainer = ({ space }) => {
1655
1635
  };
1656
1636
 
1657
1637
  // src/components/SyncStatus/InlineSyncStatus.tsx
1658
- import { useSignals as _useSignals19 } from "@preact-signals/safe-react/tracking";
1659
- import { Option as Option2 } from "effect";
1660
- import React19, { useEffect as useEffect5, useState as useState10 } from "react";
1638
+ import { useSignals as _useSignals18 } from "@preact-signals/safe-react/tracking";
1639
+ import { Option as Option3 } from "effect";
1640
+ import React18, { useEffect as useEffect5, useState as useState10 } from "react";
1661
1641
  import { useAppGraph as useAppGraph3 } from "@dxos/app-framework";
1662
1642
  import { EdgeStatus } from "@dxos/protocols/proto/dxos/client/services";
1663
1643
  import { EdgeReplicationSetting as EdgeReplicationSetting2 } from "@dxos/protocols/proto/dxos/echo/metadata";
1664
1644
  import { useClient as useClient8 } from "@dxos/react-client";
1665
1645
  import { useSpaceSyncState } from "@dxos/react-client/echo";
1666
- import { Tooltip as Tooltip3, useTranslation as useTranslation18 } from "@dxos/react-ui";
1646
+ import { Tooltip as Tooltip3, useTranslation as useTranslation17 } from "@dxos/react-ui";
1667
1647
  import { AttentionGlyph as AttentionGlyph2, useAttended as useAttended2, useAttention as useAttention2 } from "@dxos/react-ui-attention";
1668
1648
  var useEdgeStatus = () => {
1669
1649
  const [status, setStatus] = useState10(EdgeStatus.NOT_CONNECTED);
@@ -1678,9 +1658,9 @@ var useEdgeStatus = () => {
1678
1658
  return status;
1679
1659
  };
1680
1660
  var InlineSyncStatus = ({ space, open }) => {
1681
- var _effect = _useSignals19();
1661
+ var _effect = _useSignals18();
1682
1662
  try {
1683
- const { t } = useTranslation18(SPACE_PLUGIN);
1663
+ const { t } = useTranslation17(meta.id);
1684
1664
  const id = space.id;
1685
1665
  const { hasAttention, isAncestor, isRelated } = useAttention2(id);
1686
1666
  const isAttended = hasAttention || isAncestor || isRelated;
@@ -1688,16 +1668,16 @@ var InlineSyncStatus = ({ space, open }) => {
1688
1668
  const attended = useAttended2();
1689
1669
  const startOfAttention = attended.at(-1);
1690
1670
  const path = usePath(graph, startOfAttention);
1691
- const containsAttended = !open && !isAttended && id && Option2.isSome(path) ? path.value.includes(id) : false;
1671
+ const containsAttended = !open && !isAttended && id && Option3.isSome(path) ? path.value.includes(id) : false;
1692
1672
  const connectedToEdge = useEdgeStatus() === EdgeStatus.CONNECTED;
1693
1673
  const edgeSyncEnabled = space.internal.data.edgeReplication === EdgeReplicationSetting2.ENABLED;
1694
1674
  const syncState = useSpaceSyncState(space);
1695
1675
  const syncing = connectedToEdge && edgeSyncEnabled && syncState && syncState.missingOnLocal > 0;
1696
- return /* @__PURE__ */ React19.createElement(Tooltip3.Trigger, {
1676
+ return /* @__PURE__ */ React18.createElement(Tooltip3.Trigger, {
1697
1677
  asChild: true,
1698
1678
  content: t("syncing label"),
1699
1679
  side: "bottom"
1700
- }, /* @__PURE__ */ React19.createElement(AttentionGlyph2, {
1680
+ }, /* @__PURE__ */ React18.createElement(AttentionGlyph2, {
1701
1681
  syncing,
1702
1682
  attended: isAttended,
1703
1683
  containsAttended,
@@ -1709,12 +1689,12 @@ var InlineSyncStatus = ({ space, open }) => {
1709
1689
  };
1710
1690
 
1711
1691
  // src/components/SyncStatus/SyncStatus.tsx
1712
- import { useSignals as _useSignals20 } from "@preact-signals/safe-react/tracking";
1713
- import React20, { useEffect as useEffect6, useState as useState11 } from "react";
1692
+ import { useSignals as _useSignals19 } from "@preact-signals/safe-react/tracking";
1693
+ import React19, { useEffect as useEffect6, useState as useState11 } from "react";
1714
1694
  import { StatusBar } from "@dxos/plugin-status-bar";
1715
1695
  import { useClient as useClient9 } from "@dxos/react-client";
1716
1696
  import { getSyncSummary, useSyncState } from "@dxos/react-client/echo";
1717
- import { Icon as Icon5, useTranslation as useTranslation19 } from "@dxos/react-ui";
1697
+ import { Icon as Icon8, useTranslation as useTranslation18 } from "@dxos/react-ui";
1718
1698
 
1719
1699
  // src/components/SyncStatus/save-tracker.ts
1720
1700
  import { Context } from "@dxos/context";
@@ -1810,7 +1790,7 @@ var getIcon = (status) => {
1810
1790
  // src/components/SyncStatus/SyncStatus.tsx
1811
1791
  var SYNC_STALLED_TIMEOUT = 5e3;
1812
1792
  var SyncStatus = () => {
1813
- var _effect = _useSignals20();
1793
+ var _effect = _useSignals19();
1814
1794
  try {
1815
1795
  const client = useClient9();
1816
1796
  const state = useSyncState();
@@ -1820,7 +1800,7 @@ var SyncStatus = () => {
1820
1800
  setSaved(state2 === "saved");
1821
1801
  });
1822
1802
  }, []);
1823
- return /* @__PURE__ */ React20.createElement(SyncStatusIndicator, {
1803
+ return /* @__PURE__ */ React19.createElement(SyncStatusIndicator, {
1824
1804
  state,
1825
1805
  saved
1826
1806
  });
@@ -1829,9 +1809,9 @@ var SyncStatus = () => {
1829
1809
  }
1830
1810
  };
1831
1811
  var SyncStatusIndicator = ({ state, saved }) => {
1832
- var _effect = _useSignals20();
1812
+ var _effect = _useSignals19();
1833
1813
  try {
1834
- const { t } = useTranslation19(SPACE_PLUGIN);
1814
+ const { t } = useTranslation18(meta.id);
1835
1815
  const summary = getSyncSummary(state);
1836
1816
  const offline = Object.values(state).length === 0;
1837
1817
  const needsToUpload = summary.differentDocuments > 0 || summary.missingOnRemote > 0;
@@ -1858,12 +1838,12 @@ var SyncStatusIndicator = ({ state, saved }) => {
1858
1838
  needsToDownload
1859
1839
  ]);
1860
1840
  const title = t(`${status} label`);
1861
- const icon = /* @__PURE__ */ React20.createElement(Icon5, {
1841
+ const icon = /* @__PURE__ */ React19.createElement(Icon8, {
1862
1842
  icon: getIcon(status),
1863
1843
  size: 4,
1864
1844
  classNames
1865
1845
  });
1866
- return /* @__PURE__ */ React20.createElement(StatusBar.Item, {
1846
+ return /* @__PURE__ */ React19.createElement(StatusBar.Item, {
1867
1847
  title
1868
1848
  }, icon);
1869
1849
  } finally {
@@ -1871,13 +1851,88 @@ var SyncStatusIndicator = ({ state, saved }) => {
1871
1851
  }
1872
1852
  };
1873
1853
 
1854
+ // src/components/ViewEditor.tsx
1855
+ import { useSignals as _useSignals20 } from "@preact-signals/safe-react/tracking";
1856
+ import React20, { useCallback as useCallback11 } from "react";
1857
+ import { createIntent as createIntent10, useIntentDispatcher as useIntentDispatcher10 } from "@dxos/app-framework";
1858
+ import { Filter as Filter2, Query as Query2, Type as Type3 } from "@dxos/echo";
1859
+ import { invariant as invariant2 } from "@dxos/invariant";
1860
+ import { useClient as useClient10 } from "@dxos/react-client";
1861
+ import { getSpace as getSpace4, useSchema } from "@dxos/react-client/echo";
1862
+ import { ViewEditor as NaturalViewEditor } from "@dxos/react-ui-form";
1863
+ import { typenameFromQuery as typenameFromQuery2 } from "@dxos/schema";
1864
+ var __dxlog_file6 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/ViewEditor.tsx";
1865
+ var ViewEditor = ({ view }) => {
1866
+ var _effect = _useSignals20();
1867
+ try {
1868
+ const { dispatchPromise: dispatch } = useIntentDispatcher10();
1869
+ const client = useClient10();
1870
+ const space = getSpace4(view);
1871
+ const typename = view.query ? typenameFromQuery2(view.query.ast) : void 0;
1872
+ const schema = useSchema(client, space, typename);
1873
+ const handleUpdateQuery = useCallback11((typename2) => {
1874
+ invariant2(schema, void 0, {
1875
+ F: __dxlog_file6,
1876
+ L: 28,
1877
+ S: void 0,
1878
+ A: [
1879
+ "schema",
1880
+ ""
1881
+ ]
1882
+ });
1883
+ invariant2(Type3.isMutable(schema), void 0, {
1884
+ F: __dxlog_file6,
1885
+ L: 29,
1886
+ S: void 0,
1887
+ A: [
1888
+ "Type.isMutable(schema)",
1889
+ ""
1890
+ ]
1891
+ });
1892
+ const newQuery = Query2.select(Filter2.typename(typename2));
1893
+ view.query.ast = newQuery.ast;
1894
+ schema.updateTypename(typename2);
1895
+ }, [
1896
+ view,
1897
+ schema
1898
+ ]);
1899
+ const handleDelete = useCallback11((fieldId) => {
1900
+ void dispatch(createIntent10(SpaceAction.DeleteField, {
1901
+ view,
1902
+ fieldId
1903
+ }));
1904
+ }, [
1905
+ dispatch,
1906
+ view
1907
+ ]);
1908
+ if (!space || !schema) {
1909
+ return null;
1910
+ }
1911
+ return /* @__PURE__ */ React20.createElement(NaturalViewEditor, {
1912
+ registry: space.db.schemaRegistry,
1913
+ schema,
1914
+ view,
1915
+ onQueryChanged: Type3.isMutable(schema) ? handleUpdateQuery : void 0,
1916
+ onDelete: Type3.isMutable(schema) ? handleDelete : void 0,
1917
+ outerSpacing: false
1918
+ });
1919
+ } finally {
1920
+ _effect.f();
1921
+ }
1922
+ };
1923
+
1924
+ // src/components/index.ts
1925
+ import { lazy as lazy2 } from "react";
1926
+ var CollectionMain = lazy2(() => import("./CollectionMain-AX7KKXWP.mjs"));
1927
+ var ObjectDetailsPanel = lazy2(() => import("./ObjectDetailsPanel-ETI5YBTH.mjs"));
1928
+ var RecordMain = lazy2(() => import("./RecordMain-TEBGAVSL.mjs"));
1929
+
1874
1930
  export {
1875
1931
  AwaitingObject,
1876
1932
  CREATE_OBJECT_DIALOG,
1877
1933
  CreateObjectDialog,
1878
1934
  CREATE_SPACE_DIALOG,
1879
1935
  CreateSpaceDialog,
1880
- CollectionMain,
1881
1936
  CollectionSection,
1882
1937
  JOIN_DIALOG,
1883
1938
  JoinDialog,
@@ -1900,6 +1955,10 @@ export {
1900
1955
  InlineSyncStatus,
1901
1956
  SyncStatus,
1902
1957
  SyncStatusIndicator,
1958
+ ViewEditor,
1959
+ CollectionMain,
1960
+ ObjectDetailsPanel,
1961
+ RecordMain,
1903
1962
  AppGraphBuilder,
1904
1963
  AppGraphSerializer,
1905
1964
  IdentityCreated,
@@ -1907,9 +1966,8 @@ export {
1907
1966
  ReactRoot,
1908
1967
  ReactSurface,
1909
1968
  SchemaDefs,
1910
- SchemaTools,
1911
1969
  SpaceSettings,
1912
1970
  SpaceState,
1913
1971
  SpacesReady
1914
1972
  };
1915
- //# sourceMappingURL=chunk-GVTXQCIW.mjs.map
1973
+ //# sourceMappingURL=chunk-2BFVC5K6.mjs.map