@dxos/plugin-space 0.8.4-main.f9ba587 → 0.8.4-main.fd6878d

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