@dxos/plugin-space 0.7.5-main.9d2a38b → 0.7.5-main.e9bb01b

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 (171) hide show
  1. package/dist/lib/browser/{app-graph-builder-F6XSETHX.mjs → app-graph-builder-J4NX44Y4.mjs} +10 -8
  2. package/dist/lib/browser/{app-graph-builder-F6XSETHX.mjs.map → app-graph-builder-J4NX44Y4.mjs.map} +3 -3
  3. package/dist/lib/browser/{app-graph-serializer-FYJE23GN.mjs → app-graph-serializer-QF7VVRCV.mjs} +5 -5
  4. package/dist/lib/browser/{chunk-IZ7QKQ2E.mjs → chunk-6UIFMVVI.mjs} +14 -9
  5. package/dist/lib/browser/chunk-6UIFMVVI.mjs.map +7 -0
  6. package/dist/lib/browser/{chunk-SOXNANA6.mjs → chunk-PQXZCNAU.mjs} +3 -2
  7. package/dist/lib/browser/{chunk-SOXNANA6.mjs.map → chunk-PQXZCNAU.mjs.map} +3 -3
  8. package/dist/lib/browser/{chunk-UH5P4UL3.mjs → chunk-RLZQJD47.mjs} +3 -2
  9. package/dist/lib/browser/chunk-RLZQJD47.mjs.map +7 -0
  10. package/dist/lib/browser/{chunk-T36CIHPG.mjs → chunk-SDK7RZI3.mjs} +3 -3
  11. package/dist/lib/browser/{chunk-SSJ772GK.mjs → chunk-XPZ6IIXF.mjs} +4 -5
  12. package/dist/lib/browser/chunk-XPZ6IIXF.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-XXD33C4E.mjs → chunk-XZ2NH3CP.mjs} +291 -250
  14. package/dist/lib/browser/chunk-XZ2NH3CP.mjs.map +7 -0
  15. package/dist/lib/browser/{identity-created-4Q4PFIC5.mjs → identity-created-25TK5XNO.mjs} +3 -3
  16. package/dist/lib/browser/index.mjs +11 -11
  17. package/dist/lib/browser/index.mjs.map +3 -3
  18. package/dist/lib/browser/intent-resolver-IEDVV74T.mjs +523 -0
  19. package/dist/lib/browser/intent-resolver-IEDVV74T.mjs.map +7 -0
  20. package/dist/lib/browser/meta.json +1 -1
  21. package/dist/lib/browser/{react-root-BDOPFJGJ.mjs → react-root-6VRPRLQR.mjs} +6 -6
  22. package/dist/lib/browser/{react-surface-EGOL2JBL.mjs → react-surface-DMNDXLZ7.mjs} +26 -33
  23. package/dist/lib/browser/react-surface-DMNDXLZ7.mjs.map +7 -0
  24. package/dist/lib/browser/{settings-WF67QZSD.mjs → settings-K4JPYYEM.mjs} +3 -3
  25. package/dist/lib/browser/{spaces-ready-WVU7US3C.mjs → spaces-ready-2MUWWVVO.mjs} +31 -32
  26. package/dist/lib/browser/spaces-ready-2MUWWVVO.mjs.map +7 -0
  27. package/dist/lib/browser/{state-MS4KYJWI.mjs → state-6DCY5YJP.mjs} +3 -3
  28. package/dist/lib/browser/types/index.mjs +2 -2
  29. package/dist/lib/node/{app-graph-builder-GKLVZ4PM.cjs → app-graph-builder-ZOPG4MOS.cjs} +58 -56
  30. package/dist/lib/node/{app-graph-builder-GKLVZ4PM.cjs.map → app-graph-builder-ZOPG4MOS.cjs.map} +3 -3
  31. package/dist/lib/node/{app-graph-serializer-RMTU5YSC.cjs → app-graph-serializer-QE2G4MWB.cjs} +21 -21
  32. package/dist/lib/node/{chunk-5D4RWKTV.cjs → chunk-3QWZCN6L.cjs} +65 -60
  33. package/dist/lib/node/chunk-3QWZCN6L.cjs.map +7 -0
  34. package/dist/lib/node/{chunk-YCBBGTFD.cjs → chunk-6MEOP3DH.cjs} +8 -9
  35. package/dist/lib/node/chunk-6MEOP3DH.cjs.map +7 -0
  36. package/dist/lib/node/{chunk-UENH2YBM.cjs → chunk-D6BFKOXY.cjs} +8 -8
  37. package/dist/lib/node/{chunk-AJRP7AD6.cjs → chunk-SZEIQGQU.cjs} +292 -251
  38. package/dist/lib/node/chunk-SZEIQGQU.cjs.map +7 -0
  39. package/dist/lib/node/{chunk-56NGXG2A.cjs → chunk-UX3U4RU2.cjs} +9 -8
  40. package/dist/lib/node/chunk-UX3U4RU2.cjs.map +7 -0
  41. package/dist/lib/node/{chunk-AO4EW2RX.cjs → chunk-WZR6OAN3.cjs} +6 -5
  42. package/dist/lib/node/{chunk-AO4EW2RX.cjs.map → chunk-WZR6OAN3.cjs.map} +3 -3
  43. package/dist/lib/node/{identity-created-QQWX7WX3.cjs → identity-created-7G5U7R36.cjs} +7 -7
  44. package/dist/lib/node/index.cjs +90 -90
  45. package/dist/lib/node/index.cjs.map +3 -3
  46. package/dist/lib/node/intent-resolver-N2W2L6OL.cjs +522 -0
  47. package/dist/lib/node/intent-resolver-N2W2L6OL.cjs.map +7 -0
  48. package/dist/lib/node/meta.json +1 -1
  49. package/dist/lib/node/{react-root-ZTR2J2I3.cjs → react-root-YD35W3VU.cjs} +12 -12
  50. package/dist/lib/node/{react-surface-75KRPQYT.cjs → react-surface-QPLXK7DT.cjs} +72 -76
  51. package/dist/lib/node/react-surface-QPLXK7DT.cjs.map +7 -0
  52. package/dist/lib/node/{settings-KOVSPA3S.cjs → settings-TEELGWS4.cjs} +8 -8
  53. package/dist/lib/node/{spaces-ready-ILVGUHJH.cjs → spaces-ready-PZZQWS6T.cjs} +39 -40
  54. package/dist/lib/node/spaces-ready-PZZQWS6T.cjs.map +7 -0
  55. package/dist/lib/node/{state-4UIOUKLJ.cjs → state-WPZC4JXB.cjs} +8 -8
  56. package/dist/lib/node/types/index.cjs +16 -16
  57. package/dist/lib/node/types/index.cjs.map +1 -1
  58. package/dist/lib/node-esm/{app-graph-builder-NEHQ5Z63.mjs → app-graph-builder-TKGLOK22.mjs} +10 -8
  59. package/dist/lib/node-esm/{app-graph-builder-NEHQ5Z63.mjs.map → app-graph-builder-TKGLOK22.mjs.map} +3 -3
  60. package/dist/lib/node-esm/{app-graph-serializer-UWWS5OVC.mjs → app-graph-serializer-HLX2JRNF.mjs} +5 -5
  61. package/dist/lib/node-esm/{chunk-E5DWIQ3N.mjs → chunk-4UX5WGKJ.mjs} +3 -3
  62. package/dist/lib/node-esm/{chunk-HTBGWQEU.mjs → chunk-AAQRELDK.mjs} +4 -5
  63. package/dist/lib/node-esm/chunk-AAQRELDK.mjs.map +7 -0
  64. package/dist/lib/node-esm/{chunk-7FUVU45N.mjs → chunk-ICCM4YRJ.mjs} +3 -2
  65. package/dist/lib/node-esm/{chunk-7FUVU45N.mjs.map → chunk-ICCM4YRJ.mjs.map} +3 -3
  66. package/dist/lib/node-esm/{chunk-5QMAPAZD.mjs → chunk-LA45TPAN.mjs} +14 -9
  67. package/dist/lib/node-esm/chunk-LA45TPAN.mjs.map +7 -0
  68. package/dist/lib/node-esm/{chunk-375RB3CZ.mjs → chunk-LGL4A5B5.mjs} +3 -2
  69. package/dist/lib/node-esm/chunk-LGL4A5B5.mjs.map +7 -0
  70. package/dist/lib/node-esm/{chunk-GVOPDPS2.mjs → chunk-N6EAOMIS.mjs} +291 -250
  71. package/dist/lib/node-esm/chunk-N6EAOMIS.mjs.map +7 -0
  72. package/dist/lib/node-esm/{identity-created-HMNY2MPB.mjs → identity-created-7THGZ7EW.mjs} +3 -3
  73. package/dist/lib/node-esm/index.mjs +11 -11
  74. package/dist/lib/node-esm/index.mjs.map +3 -3
  75. package/dist/lib/node-esm/intent-resolver-L2TKJU4I.mjs +524 -0
  76. package/dist/lib/node-esm/intent-resolver-L2TKJU4I.mjs.map +7 -0
  77. package/dist/lib/node-esm/meta.json +1 -1
  78. package/dist/lib/node-esm/{react-root-OUPJA4RY.mjs → react-root-Q5MFDXZE.mjs} +6 -6
  79. package/dist/lib/node-esm/{react-surface-7EVWCKIP.mjs → react-surface-RQQZ5BOG.mjs} +26 -33
  80. package/dist/lib/node-esm/react-surface-RQQZ5BOG.mjs.map +7 -0
  81. package/dist/lib/node-esm/{settings-EDK6WI3V.mjs → settings-KXYUZBLN.mjs} +3 -3
  82. package/dist/lib/node-esm/{spaces-ready-CH3W7OGN.mjs → spaces-ready-MWNP3WBX.mjs} +31 -32
  83. package/dist/lib/node-esm/spaces-ready-MWNP3WBX.mjs.map +7 -0
  84. package/dist/lib/node-esm/{state-BMISGQ2O.mjs → state-5GH2D5U4.mjs} +3 -3
  85. package/dist/lib/node-esm/types/index.mjs +2 -2
  86. package/dist/types/src/SpacePlugin.d.ts.map +1 -1
  87. package/dist/types/src/capabilities/app-graph-builder.d.ts +22 -22
  88. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  89. package/dist/types/src/capabilities/capabilities.d.ts +6 -0
  90. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  91. package/dist/types/src/capabilities/index.d.ts +33 -33
  92. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  93. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  94. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  95. package/dist/types/src/capabilities/spaces-ready.d.ts.map +1 -1
  96. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +4 -3
  97. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
  98. package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
  99. package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
  100. package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
  101. package/dist/types/src/components/SpaceSettings/SpaceSettingsDialog.d.ts.map +1 -1
  102. package/dist/types/src/components/SpaceSettings/SpaceSettingsPanel.d.ts.map +1 -1
  103. package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
  104. package/dist/types/src/meta.d.ts +1 -0
  105. package/dist/types/src/meta.d.ts.map +1 -1
  106. package/dist/types/src/types/types.d.ts +2 -2
  107. package/dist/types/src/types/types.d.ts.map +1 -1
  108. package/dist/types/src/util.d.ts.map +1 -1
  109. package/package.json +38 -37
  110. package/src/SpacePlugin.tsx +4 -5
  111. package/src/capabilities/app-graph-builder.ts +4 -2
  112. package/src/capabilities/capabilities.ts +4 -1
  113. package/src/capabilities/intent-resolver.ts +373 -304
  114. package/src/capabilities/react-surface.tsx +22 -30
  115. package/src/capabilities/spaces-ready.ts +20 -21
  116. package/src/components/AwaitingObject.tsx +5 -5
  117. package/src/components/CreateDialog/CreateObjectDialog.tsx +15 -15
  118. package/src/components/CreateDialog/CreateObjectPanel.tsx +114 -114
  119. package/src/components/CreateDialog/CreateSpaceDialog.tsx +10 -8
  120. package/src/components/JoinDialog.tsx +27 -19
  121. package/src/components/SpacePluginSettings.tsx +3 -3
  122. package/src/components/SpacePresence.tsx +2 -3
  123. package/src/components/SpaceSettings/SpaceSettingsDialog.tsx +16 -1
  124. package/src/components/SpaceSettings/SpaceSettingsPanel.tsx +3 -4
  125. package/src/components/SyncStatus/InlineSyncStatus.tsx +2 -2
  126. package/src/components/SyncStatus/SyncStatus.tsx +2 -1
  127. package/src/meta.ts +1 -0
  128. package/src/types/types.ts +2 -3
  129. package/src/util.tsx +8 -4
  130. package/dist/lib/browser/chunk-IZ7QKQ2E.mjs.map +0 -7
  131. package/dist/lib/browser/chunk-SSJ772GK.mjs.map +0 -7
  132. package/dist/lib/browser/chunk-UH5P4UL3.mjs.map +0 -7
  133. package/dist/lib/browser/chunk-XXD33C4E.mjs.map +0 -7
  134. package/dist/lib/browser/intent-resolver-XRZYCXXX.mjs +0 -459
  135. package/dist/lib/browser/intent-resolver-XRZYCXXX.mjs.map +0 -7
  136. package/dist/lib/browser/react-surface-EGOL2JBL.mjs.map +0 -7
  137. package/dist/lib/browser/spaces-ready-WVU7US3C.mjs.map +0 -7
  138. package/dist/lib/node/chunk-56NGXG2A.cjs.map +0 -7
  139. package/dist/lib/node/chunk-5D4RWKTV.cjs.map +0 -7
  140. package/dist/lib/node/chunk-AJRP7AD6.cjs.map +0 -7
  141. package/dist/lib/node/chunk-YCBBGTFD.cjs.map +0 -7
  142. package/dist/lib/node/intent-resolver-3NI6AUAI.cjs +0 -458
  143. package/dist/lib/node/intent-resolver-3NI6AUAI.cjs.map +0 -7
  144. package/dist/lib/node/react-surface-75KRPQYT.cjs.map +0 -7
  145. package/dist/lib/node/spaces-ready-ILVGUHJH.cjs.map +0 -7
  146. package/dist/lib/node-esm/chunk-375RB3CZ.mjs.map +0 -7
  147. package/dist/lib/node-esm/chunk-5QMAPAZD.mjs.map +0 -7
  148. package/dist/lib/node-esm/chunk-GVOPDPS2.mjs.map +0 -7
  149. package/dist/lib/node-esm/chunk-HTBGWQEU.mjs.map +0 -7
  150. package/dist/lib/node-esm/intent-resolver-P5EVBOGP.mjs +0 -460
  151. package/dist/lib/node-esm/intent-resolver-P5EVBOGP.mjs.map +0 -7
  152. package/dist/lib/node-esm/react-surface-7EVWCKIP.mjs.map +0 -7
  153. package/dist/lib/node-esm/spaces-ready-CH3W7OGN.mjs.map +0 -7
  154. /package/dist/lib/browser/{app-graph-serializer-FYJE23GN.mjs.map → app-graph-serializer-QF7VVRCV.mjs.map} +0 -0
  155. /package/dist/lib/browser/{chunk-T36CIHPG.mjs.map → chunk-SDK7RZI3.mjs.map} +0 -0
  156. /package/dist/lib/browser/{identity-created-4Q4PFIC5.mjs.map → identity-created-25TK5XNO.mjs.map} +0 -0
  157. /package/dist/lib/browser/{react-root-BDOPFJGJ.mjs.map → react-root-6VRPRLQR.mjs.map} +0 -0
  158. /package/dist/lib/browser/{settings-WF67QZSD.mjs.map → settings-K4JPYYEM.mjs.map} +0 -0
  159. /package/dist/lib/browser/{state-MS4KYJWI.mjs.map → state-6DCY5YJP.mjs.map} +0 -0
  160. /package/dist/lib/node/{app-graph-serializer-RMTU5YSC.cjs.map → app-graph-serializer-QE2G4MWB.cjs.map} +0 -0
  161. /package/dist/lib/node/{chunk-UENH2YBM.cjs.map → chunk-D6BFKOXY.cjs.map} +0 -0
  162. /package/dist/lib/node/{identity-created-QQWX7WX3.cjs.map → identity-created-7G5U7R36.cjs.map} +0 -0
  163. /package/dist/lib/node/{react-root-ZTR2J2I3.cjs.map → react-root-YD35W3VU.cjs.map} +0 -0
  164. /package/dist/lib/node/{settings-KOVSPA3S.cjs.map → settings-TEELGWS4.cjs.map} +0 -0
  165. /package/dist/lib/node/{state-4UIOUKLJ.cjs.map → state-WPZC4JXB.cjs.map} +0 -0
  166. /package/dist/lib/node-esm/{app-graph-serializer-UWWS5OVC.mjs.map → app-graph-serializer-HLX2JRNF.mjs.map} +0 -0
  167. /package/dist/lib/node-esm/{chunk-E5DWIQ3N.mjs.map → chunk-4UX5WGKJ.mjs.map} +0 -0
  168. /package/dist/lib/node-esm/{identity-created-HMNY2MPB.mjs.map → identity-created-7THGZ7EW.mjs.map} +0 -0
  169. /package/dist/lib/node-esm/{react-root-OUPJA4RY.mjs.map → react-root-Q5MFDXZE.mjs.map} +0 -0
  170. /package/dist/lib/node-esm/{settings-EDK6WI3V.mjs.map → settings-KXYUZBLN.mjs.map} +0 -0
  171. /package/dist/lib/node-esm/{state-BMISGQ2O.mjs.map → state-5GH2D5U4.mjs.map} +0 -0
@@ -13,6 +13,7 @@ import {
13
13
  useCapabilities,
14
14
  usePluginManager,
15
15
  } from '@dxos/app-framework';
16
+ import { SettingsStore } from '@dxos/local-storage';
16
17
  import { ClientCapabilities } from '@dxos/plugin-client';
17
18
  import {
18
19
  getSpace,
@@ -43,7 +44,6 @@ import {
43
44
  POPOVER_RENAME_SPACE,
44
45
  PopoverRenameObject,
45
46
  PopoverRenameSpace,
46
- ShareSpaceButton,
47
47
  SmallPresenceLive,
48
48
  SPACE_SETTINGS_DIALOG,
49
49
  SpacePluginSettings,
@@ -56,7 +56,6 @@ import {
56
56
  } from '../components';
57
57
  import { SPACE_PLUGIN } from '../meta';
58
58
  import { CollectionType, type SpaceSettingsProps } from '../types';
59
- import { COMPOSER_SPACE_LOCK } from '../util';
60
59
 
61
60
  type ReactSurfaceOptions = {
62
61
  createInvitationUrl: (invitationCode: string) => string;
@@ -81,7 +80,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
81
80
  createSurface({
82
81
  id: `${SPACE_PLUGIN}/collection-fallback`,
83
82
  role: 'article',
84
- disposition: 'fallback',
83
+ position: 'fallback',
85
84
  filter: (data): data is { subject: CollectionType } => data.subject instanceof CollectionType,
86
85
  component: ({ data }) => <CollectionMain collection={data.subject} />,
87
86
  }),
@@ -95,28 +94,28 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
95
94
  createSurface({
96
95
  id: `${SPACE_PLUGIN}/object-settings-base-panel`,
97
96
  role: 'complementary--settings',
98
- disposition: 'hoist',
97
+ position: 'hoist',
99
98
  filter: (data): data is { subject: ReactiveEchoObject<any> } => isEchoObject(data.subject),
100
99
  component: ({ data }) => <BaseObjectSettings object={data.subject} />,
101
100
  }),
102
101
  createSurface({
103
102
  id: `${SPACE_PLUGIN}/object-settings-advanced-panel`,
104
103
  role: 'complementary--settings',
105
- disposition: 'fallback',
104
+ position: 'fallback',
106
105
  filter: (data): data is { subject: ReactiveEchoObject<any> } => isEchoObject(data.subject),
107
106
  component: ({ data }) => <AdvancedObjectSettings object={data.subject} />,
108
107
  }),
109
108
  createSurface({
110
109
  id: SPACE_SETTINGS_DIALOG,
111
110
  role: 'dialog',
112
- filter: (data): data is { subject: SpaceSettingsDialogProps } => data.component === SPACE_SETTINGS_DIALOG,
113
- component: ({ data }) => <SpaceSettingsDialog {...data.subject} createInvitationUrl={createInvitationUrl} />,
111
+ filter: (data): data is { props: SpaceSettingsDialogProps } => data.component === SPACE_SETTINGS_DIALOG,
112
+ component: ({ data }) => <SpaceSettingsDialog {...data.props} createInvitationUrl={createInvitationUrl} />,
114
113
  }),
115
114
  createSurface({
116
115
  id: JOIN_DIALOG,
117
116
  role: 'dialog',
118
- filter: (data): data is { subject: JoinPanelProps } => data.component === JOIN_DIALOG,
119
- component: ({ data }) => <JoinDialog {...data.subject} />,
117
+ filter: (data): data is { props: JoinPanelProps } => data.component === JOIN_DIALOG,
118
+ component: ({ data }) => <JoinDialog {...data.props} />,
120
119
  }),
121
120
  createSurface({
122
121
  id: CREATE_SPACE_DIALOG,
@@ -127,7 +126,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
127
126
  createSurface({
128
127
  id: CREATE_OBJECT_DIALOG,
129
128
  role: 'dialog',
130
- filter: (data): data is { subject: Partial<CreateObjectDialogProps> } => data.component === CREATE_OBJECT_DIALOG,
129
+ filter: (data): data is { props: Partial<CreateObjectDialogProps> } => data.component === CREATE_OBJECT_DIALOG,
131
130
  component: ({ data }) => {
132
131
  const schemas = useCapabilities(ClientCapabilities.Schema).flat();
133
132
  const manager = usePluginManager();
@@ -142,21 +141,21 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
142
141
  [manager],
143
142
  );
144
143
 
145
- return <CreateObjectDialog schemas={schemas} resolve={resolve} {...data.subject} />;
144
+ return <CreateObjectDialog schemas={schemas} resolve={resolve} {...data.props} />;
146
145
  },
147
146
  }),
148
147
  createSurface({
149
148
  id: POPOVER_RENAME_SPACE,
150
149
  role: 'popover',
151
- filter: (data): data is { subject: Space } => data.component === POPOVER_RENAME_SPACE && isSpace(data.subject),
152
- component: ({ data }) => <PopoverRenameSpace space={data.subject} />,
150
+ filter: (data): data is { props: Space } => data.component === POPOVER_RENAME_SPACE && isSpace(data.props),
151
+ component: ({ data }) => <PopoverRenameSpace space={data.props} />,
153
152
  }),
154
153
  createSurface({
155
154
  id: POPOVER_RENAME_OBJECT,
156
155
  role: 'popover',
157
- filter: (data): data is { subject: ReactiveEchoObject<any> } =>
158
- data.component === POPOVER_RENAME_OBJECT && isReactiveObject(data.subject),
159
- component: ({ data }) => <PopoverRenameObject object={data.subject} />,
156
+ filter: (data): data is { props: ReactiveEchoObject<any> } =>
157
+ data.component === POPOVER_RENAME_OBJECT && isReactiveObject(data.props),
158
+ component: ({ data }) => <PopoverRenameObject object={data.props} />,
160
159
  }),
161
160
  createSurface({
162
161
  id: `${SPACE_PLUGIN}/navtree-presence`,
@@ -173,7 +172,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
173
172
  // TODO(wittjosiah): Attention glyph for non-echo items should be handled elsewhere.
174
173
  id: `${SPACE_PLUGIN}/navtree-presence-fallback`,
175
174
  role: 'navtree-item-end',
176
- disposition: 'fallback',
175
+ position: 'fallback',
177
176
  filter: (data): data is { id: string; open?: boolean } => typeof data.id === 'string',
178
177
  component: ({ data }) => <SmallPresenceLive id={data.id} open={data.open} />,
179
178
  }),
@@ -186,7 +185,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
186
185
  createSurface({
187
186
  id: `${SPACE_PLUGIN}/navbar-presence`,
188
187
  role: 'navbar-end',
189
- disposition: 'hoist',
188
+ position: 'hoist',
190
189
  filter: (data): data is { subject: Space | ReactiveEchoObject<any> } =>
191
190
  isSpace(data.subject) || isEchoObject(data.subject),
192
191
  component: ({ data }) => {
@@ -197,12 +196,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
197
196
  : undefined
198
197
  : data.subject;
199
198
 
200
- return space && object ? (
201
- <>
202
- <SpacePresence object={object} />
203
- {space.properties[COMPOSER_SPACE_LOCK] ? null : <ShareSpaceButton space={space} />}
204
- </>
205
- ) : null;
199
+ return object ? <SpacePresence object={object} /> : null;
206
200
  },
207
201
  }),
208
202
  createSurface({
@@ -213,12 +207,10 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
213
207
  }),
214
208
  createSurface({
215
209
  id: `${SPACE_PLUGIN}/settings`,
216
- role: 'settings',
217
- filter: (data): data is any => data.subject === SPACE_PLUGIN,
218
- component: () => {
219
- const settings = useCapability(Capabilities.SettingsStore).getStore<SpaceSettingsProps>(SPACE_PLUGIN)!.value;
220
- return <SpacePluginSettings settings={settings} />;
221
- },
210
+ role: 'article',
211
+ filter: (data): data is { subject: SettingsStore<SpaceSettingsProps> } =>
212
+ data.subject instanceof SettingsStore && data.subject.prefix === SPACE_PLUGIN,
213
+ component: ({ data: { subject } }) => <SpacePluginSettings settings={subject.value} />,
222
214
  }),
223
215
  createSurface({
224
216
  id: `${SPACE_PLUGIN}/menu-footer`,
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { contributes, createIntent, openIds, type PluginsContext, Capabilities } from '@dxos/app-framework';
5
+ import { contributes, createIntent, type PluginsContext, Capabilities, LayoutAction } from '@dxos/app-framework';
6
6
  import { EventSubscriptions } from '@dxos/async';
7
7
  import { Expando } from '@dxos/echo-schema';
8
8
  import { scheduledEffect } from '@dxos/echo-signals/core';
@@ -10,6 +10,7 @@ import { create } from '@dxos/live-object';
10
10
  import { log } from '@dxos/log';
11
11
  import { AttentionCapabilities } from '@dxos/plugin-attention';
12
12
  import { ClientCapabilities } from '@dxos/plugin-client';
13
+ import { DeckCapabilities } from '@dxos/plugin-deck';
13
14
  import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
14
15
  import { PublicKey } from '@dxos/react-client';
15
16
  import { Filter, FQ_ID_LENGTH, parseFullyQualifiedId, SpaceState } from '@dxos/react-client/echo';
@@ -29,7 +30,7 @@ export default async (context: PluginsContext) => {
29
30
  const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
30
31
  const { graph } = context.requestCapability(Capabilities.AppGraph);
31
32
  const layout = context.requestCapability(Capabilities.Layout);
32
- const location = context.requestCapability(Capabilities.Location);
33
+ const deck = context.requestCapability(DeckCapabilities.DeckState);
33
34
  const attention = context.requestCapability(AttentionCapabilities.Attention);
34
35
  const state = context.requestCapability(SpaceCapabilities.MutableState);
35
36
  const client = context.requestCapability(ClientCapabilities.Client);
@@ -37,6 +38,10 @@ export default async (context: PluginsContext) => {
37
38
  const defaultSpace = client.spaces.default;
38
39
  await defaultSpace.waitUntilReady();
39
40
 
41
+ if (deck.activeDeck === 'default') {
42
+ await dispatch(createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: defaultSpace.id }));
43
+ }
44
+
40
45
  // Initialize space sharing lock in default space.
41
46
  if (typeof defaultSpace.properties[COMPOSER_SPACE_LOCK] !== 'boolean') {
42
47
  defaultSpace.properties[COMPOSER_SPACE_LOCK] = true;
@@ -54,21 +59,18 @@ export default async (context: PluginsContext) => {
54
59
  // Await missing objects.
55
60
  subscriptions.add(
56
61
  scheduledEffect(
57
- () => ({
58
- layoutMode: layout.layoutMode,
59
- soloPart: location.active.solo?.[0],
60
- }),
61
- ({ layoutMode, soloPart }) => {
62
- if (layoutMode !== 'solo' || !soloPart) {
62
+ () => ({ active: layout.active }),
63
+ ({ active }) => {
64
+ if (active.length !== 1) {
63
65
  return;
64
66
  }
65
67
 
66
- const node = graph.findNode(soloPart.id);
67
- if (!node && soloPart.id.length === FQ_ID_LENGTH) {
68
+ const node = graph.findNode(active[0]);
69
+ if (!node && active[0].length === FQ_ID_LENGTH) {
68
70
  const timeout = setTimeout(async () => {
69
- const node = graph.findNode(soloPart.id);
71
+ const node = graph.findNode(active[0]);
70
72
  if (!node) {
71
- await dispatch(createIntent(SpaceAction.WaitForObject, { id: soloPart.id }));
73
+ await dispatch(createIntent(SpaceAction.WaitForObject, { id: active[0] }));
72
74
  }
73
75
  }, WAIT_FOR_OBJECT_TIMEOUT);
74
76
 
@@ -102,17 +104,14 @@ export default async (context: PluginsContext) => {
102
104
  // Broadcast active node to other peers in the space.
103
105
  subscriptions.add(
104
106
  scheduledEffect(
105
- () => ({
106
- open: openIds(location.active, layout.layoutMode === 'solo' ? ['solo'] : ['main']),
107
- closed: [...location.closed],
108
- }),
109
- ({ open, closed }) => {
107
+ () => ({ current: attention.current, active: layout.active, inactive: layout.inactive }),
108
+ ({ current, active, inactive }) => {
110
109
  const send = () => {
111
110
  const spaces = client.spaces.get();
112
111
  const identity = client.halo.identity.get();
113
- if (identity && location.active) {
112
+ if (identity) {
114
113
  // Group parts by space for efficient messaging.
115
- const idsBySpace = reduceGroupBy(open, (id) => {
114
+ const idsBySpace = reduceGroupBy(active, (id) => {
116
115
  try {
117
116
  const [spaceId] = parseFullyQualifiedId(id);
118
117
  return spaceId;
@@ -121,7 +120,7 @@ export default async (context: PluginsContext) => {
121
120
  }
122
121
  });
123
122
 
124
- const removedBySpace = reduceGroupBy(closed, (id) => {
123
+ const removedBySpace = reduceGroupBy(inactive, (id) => {
125
124
  try {
126
125
  const [spaceId] = parseFullyQualifiedId(id);
127
126
  return spaceId;
@@ -147,7 +146,7 @@ export default async (context: PluginsContext) => {
147
146
  void space
148
147
  .postMessage('viewing', {
149
148
  identityKey: identity.identityKey.toHex(),
150
- attended: attention.current ? [...attention.current] : [],
149
+ attended: current,
151
150
  added,
152
151
  removed,
153
152
  })
@@ -5,7 +5,7 @@
5
5
  import { CheckCircle, CircleDashed, CircleNotch } from '@phosphor-icons/react';
6
6
  import React, { useCallback, useEffect, useState } from 'react';
7
7
 
8
- import { NavigationAction, useIntentDispatcher, createIntent, useCapability, Capabilities } from '@dxos/app-framework';
8
+ import { createIntent, LayoutAction, useIntentDispatcher, useLayout } from '@dxos/app-framework';
9
9
  import { useClient } from '@dxos/react-client';
10
10
  import { Filter, fullyQualifiedId, useQuery } from '@dxos/react-client/echo';
11
11
  import { Button, Toast, useTranslation } from '@dxos/react-ui';
@@ -23,7 +23,7 @@ export const AwaitingObject = ({ id }: { id: string }) => {
23
23
  const [found, setFound] = useState(false);
24
24
  const { t } = useTranslation(SPACE_PLUGIN);
25
25
  const { dispatchPromise: dispatch } = useIntentDispatcher();
26
- const location = useCapability(Capabilities.Location);
26
+ const layout = useLayout();
27
27
 
28
28
  const client = useClient();
29
29
  const objects = useQuery(client.spaces, Filter.all());
@@ -44,11 +44,11 @@ export const AwaitingObject = ({ id }: { id: string }) => {
44
44
  if (objects.findIndex((object) => fullyQualifiedId(object) === id) > -1) {
45
45
  setFound(true);
46
46
 
47
- if (location.active.solo?.[0].id === id) {
47
+ if (layout.active.includes(id)) {
48
48
  setOpen(false);
49
49
  }
50
50
  }
51
- }, [id, objects, location]);
51
+ }, [id, objects, layout]);
52
52
 
53
53
  const handleClose = useCallback(
54
54
  async () => dispatch(createIntent(SpaceAction.WaitForObject, { id: undefined })),
@@ -56,7 +56,7 @@ export const AwaitingObject = ({ id }: { id: string }) => {
56
56
  );
57
57
 
58
58
  const handleNavigate = useCallback(() => {
59
- void dispatch(createIntent(NavigationAction.Open, { activeParts: { main: [id] } }));
59
+ void dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [id] }));
60
60
  void handleClose();
61
61
  }, [id, handleClose, dispatch]);
62
62
 
@@ -5,7 +5,7 @@
5
5
  import { pipe } from 'effect';
6
6
  import React, { useCallback, useRef } from 'react';
7
7
 
8
- import { chain, createIntent, NavigationAction, useIntentDispatcher } from '@dxos/app-framework';
8
+ import { chain, createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
9
9
  import { useClient } from '@dxos/react-client';
10
10
  import {
11
11
  getSpace,
@@ -71,7 +71,7 @@ export const CreateObjectDialog = ({
71
71
  const addObjectIntent = createIntent(SpaceAction.AddObject, { target, object });
72
72
  const shouldNavigate = _shouldNavigate ?? (() => true);
73
73
  if (shouldNavigate(object)) {
74
- await dispatch(pipe(addObjectIntent, chain(NavigationAction.Open, {})));
74
+ await dispatch(pipe(addObjectIntent, chain(LayoutAction.Open, { part: 'main' })));
75
75
  } else {
76
76
  await dispatch(addObjectIntent);
77
77
  }
@@ -83,7 +83,7 @@ export const CreateObjectDialog = ({
83
83
  return (
84
84
  // TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
85
85
  // Consider factoring it out to the tabs package.
86
- <Dialog.Content classNames='p-0 bs-content min-bs-[15rem] max-bs-full md:max-is-[40rem] overflow-hidden'>
86
+ <Dialog.Content classNames='p-0 bs-content max-bs-full md:max-is-[40rem] overflow-hidden'>
87
87
  <div role='none' className='flex justify-between pbs-2 pis-2 pie-2 @md:pbs-4 @md:pis-4 @md:pie-4'>
88
88
  <Dialog.Title>{t('create object dialog title')}</Dialog.Title>
89
89
  <Dialog.Close asChild>
@@ -92,18 +92,18 @@ export const CreateObjectDialog = ({
92
92
  </Button>
93
93
  </Dialog.Close>
94
94
  </div>
95
- <div className='p-4'>
96
- <CreateObjectPanel
97
- schemas={schemas}
98
- spaces={spaces}
99
- target={target}
100
- typename={typename}
101
- name={name}
102
- defaultSpaceId={client.spaces.default.id}
103
- resolve={resolve}
104
- onCreateObject={handleCreateObject}
105
- />
106
- </div>
95
+
96
+ <CreateObjectPanel
97
+ classNames='p-4'
98
+ schemas={schemas}
99
+ spaces={spaces}
100
+ target={target}
101
+ typename={typename}
102
+ name={name}
103
+ defaultSpaceId={client.spaces.default.id}
104
+ resolve={resolve}
105
+ onCreateObject={handleCreateObject}
106
+ />
107
107
  </Dialog.Content>
108
108
  );
109
109
  };
@@ -5,32 +5,18 @@
5
5
  import React, { useCallback, useMemo, useState } from 'react';
6
6
 
7
7
  import { Surface, isSurfaceAvailable, usePluginManager } from '@dxos/app-framework';
8
- import { type TypedObject, getObjectAnnotation, S } from '@dxos/echo-schema';
9
- import { type SpaceId, type Space, isSpace } from '@dxos/react-client/echo';
10
- import { Icon, IconButton, Input, toLocalizedString, useTranslation } from '@dxos/react-ui';
11
- import { Form, InputHeader, type InputProps } from '@dxos/react-ui-form';
8
+ import { type TypedObject, getObjectAnnotation, type ObjectAnnotation, S } from '@dxos/echo-schema';
9
+ import { type SpaceId, type Space } from '@dxos/react-client/echo';
10
+ import { Icon, type ThemedClassName, toLocalizedString, useTranslation } from '@dxos/react-ui';
11
+ import { Form, type InputProps } from '@dxos/react-ui-form';
12
12
  import { SearchList } from '@dxos/react-ui-searchlist';
13
+ import { mx } from '@dxos/react-ui-theme';
13
14
  import { nonNullable, type MaybePromise } from '@dxos/util';
14
15
 
15
16
  import { SPACE_PLUGIN } from '../../meta';
16
17
  import { type CollectionType } from '../../types';
17
18
  import { getSpaceDisplayName } from '../../util';
18
19
 
19
- export type CreateObjectPanelProps = {
20
- schemas: TypedObject[];
21
- spaces: Space[];
22
- typename?: string;
23
- target?: Space | CollectionType;
24
- name?: string;
25
- defaultSpaceId?: SpaceId;
26
- resolve?: (typename: string) => Record<string, any>;
27
- onCreateObject?: (params: {
28
- schema: TypedObject;
29
- target: Space | CollectionType;
30
- data: Record<string, any>;
31
- }) => MaybePromise<void>;
32
- };
33
-
34
20
  // TODO(ZaymonFC): Move this if you find yourself needing it elsewhere.
35
21
  /**
36
22
  * Creates a surface input component based on plugin context.
@@ -41,7 +27,7 @@ const useInputSurfaceLookup = (baseData?: Record<string, any>) => {
41
27
  const pluginManager = usePluginManager();
42
28
 
43
29
  return useCallback(
44
- ({ prop, schema, inputProps }: { prop: string; schema: S.Schema<any>; inputProps: InputProps<any> }) => {
30
+ ({ prop, schema, inputProps }: { prop: string; schema: S.Schema<any>; inputProps: InputProps }) => {
45
31
  const composedData = { prop, schema, ...baseData };
46
32
 
47
33
  if (!isSurfaceAvailable(pluginManager.context, { role: 'form-input', data: composedData })) {
@@ -54,7 +40,23 @@ const useInputSurfaceLookup = (baseData?: Record<string, any>) => {
54
40
  );
55
41
  };
56
42
 
43
+ export type CreateObjectPanelProps = ThemedClassName<{
44
+ schemas: TypedObject[];
45
+ spaces: Space[];
46
+ typename?: string;
47
+ target?: Space | CollectionType;
48
+ name?: string;
49
+ defaultSpaceId?: SpaceId;
50
+ resolve?: (typename: string) => Record<string, any>;
51
+ onCreateObject?: (params: {
52
+ schema: TypedObject;
53
+ target: Space | CollectionType;
54
+ data: Record<string, any>;
55
+ }) => MaybePromise<void>;
56
+ }>;
57
+
57
58
  export const CreateObjectPanel = ({
59
+ classNames,
58
60
  schemas,
59
61
  spaces,
60
62
  typename: initialTypename,
@@ -68,10 +70,14 @@ export const CreateObjectPanel = ({
68
70
  const [typename, setTypename] = useState<string | undefined>(initialTypename);
69
71
  const [target, setTarget] = useState<Space | CollectionType | undefined>(initialTarget);
70
72
  const schema = schemas.find((schema) => getObjectAnnotation(schema)?.typename === typename);
71
- const options = schemas.map(getObjectAnnotation).filter(nonNullable);
72
-
73
- const handleClearSchema = useCallback(() => setTypename(undefined), []);
74
- const handleClearTarget = useCallback(() => setTarget(undefined), []);
73
+ const options: ObjectAnnotation[] = schemas
74
+ .map(getObjectAnnotation)
75
+ .filter(nonNullable)
76
+ .sort((a, b) => {
77
+ const nameA = t('typename label', { ns: a.typename, defaultValue: a.typename });
78
+ const nameB = t('typename label', { ns: b.typename, defaultValue: b.typename });
79
+ return nameA.localeCompare(nameB);
80
+ });
75
81
 
76
82
  const handleCreateObject = useCallback(
77
83
  async (props: Record<string, any>) => {
@@ -90,117 +96,111 @@ export const CreateObjectPanel = ({
90
96
  return resolve?.(typename);
91
97
  }, [resolve, typename]);
92
98
 
93
- // TODO(wittjosiah): All of these inputs should be rolled into a `Form` once it supports the necessary variants.
94
- const schemaInput = (
95
- <SearchList.Root label={t('schema input label')} classNames='flex flex-col grow overflow-hidden'>
99
+ const inputSurfaceLookup = useInputSurfaceLookup({ target });
100
+
101
+ const form = useMemo(() => {
102
+ // TODO(ZaymonFC): Move this default object creation schema somewhere?
103
+ const schema = (metadata?.creationSchema ?? S.Struct({ name: S.optional(S.String) })) as S.Schema<any>;
104
+
105
+ return (
106
+ <Form
107
+ classNames='!p-0'
108
+ autoFocus
109
+ values={{ name: initialName }}
110
+ schema={schema}
111
+ testId='create-object-form'
112
+ onSave={handleCreateObject}
113
+ lookupComponent={inputSurfaceLookup}
114
+ />
115
+ );
116
+ }, [initialName, handleCreateObject, metadata]);
117
+
118
+ // TODO(wittjosiah): These inputs should be rolled into a `Form` once it supports the necessary variants.
119
+ return (
120
+ <div role='form' className={mx('flex flex-col gap-2', classNames)}>
121
+ {!schema ? (
122
+ <SelectSchema options={options} resolve={resolve} onChange={setTypename} />
123
+ ) : !target ? (
124
+ <SelectSpace spaces={spaces} defaultSpaceId={defaultSpaceId} onChange={setTarget} />
125
+ ) : (
126
+ form
127
+ )}
128
+ </div>
129
+ );
130
+ };
131
+
132
+ const SelectSpace = ({
133
+ spaces,
134
+ defaultSpaceId,
135
+ onChange,
136
+ }: { onChange: (space: Space) => void } & Pick<CreateObjectPanelProps, 'spaces' | 'defaultSpaceId'>) => {
137
+ const { t } = useTranslation(SPACE_PLUGIN);
138
+
139
+ return (
140
+ <SearchList.Root label={t('space input label')} classNames='flex flex-col grow overflow-hidden'>
96
141
  <SearchList.Input
97
142
  autoFocus
98
- data-testid='create-object-form.schema-input'
99
- placeholder={t('schema input placeholder')}
143
+ data-testid='create-object-form.space-input'
144
+ placeholder={t('space input placeholder')}
100
145
  classNames='px-1 my-2'
101
146
  />
102
147
  <SearchList.Content classNames='max-bs-[24rem] overflow-auto'>
103
- {options.map((option) => (
104
- <SearchList.Item
105
- key={option.typename}
106
- value={t('typename label', { ns: option.typename, defaultValue: option.typename })}
107
- onSelect={() => setTypename(option.typename)}
108
- classNames='flex items-center gap-2'
109
- >
110
- <span className='flex gap-2 items-center grow truncate'>
111
- <Icon icon={resolve?.(option.typename).icon ?? 'ph--placeholder--regular'} size={5} />
112
- {t('typename label', { ns: option.typename, defaultValue: option.typename })}
113
- </span>
114
- </SearchList.Item>
115
- ))}
148
+ {spaces
149
+ .sort((a, b) => {
150
+ const aName = toLocalizedString(getSpaceDisplayName(a, { personal: a.id === defaultSpaceId }), t);
151
+ const bName = toLocalizedString(getSpaceDisplayName(b, { personal: b.id === defaultSpaceId }), t);
152
+ return aName.localeCompare(bName);
153
+ })
154
+ .map((space) => (
155
+ <SearchList.Item
156
+ key={space.id}
157
+ value={toLocalizedString(getSpaceDisplayName(space, { personal: space.id === defaultSpaceId }), t)}
158
+ onSelect={() => onChange(space)}
159
+ classNames='flex items-center gap-2'
160
+ >
161
+ <span className='grow truncate'>
162
+ {toLocalizedString(getSpaceDisplayName(space, { personal: space.id === defaultSpaceId }), t)}
163
+ </span>
164
+ </SearchList.Item>
165
+ ))}
116
166
  </SearchList.Content>
117
167
  </SearchList.Root>
118
168
  );
169
+ };
119
170
 
120
- const spaceInput = (
121
- <SearchList.Root label={t('space input label')} classNames='flex flex-col grow overflow-hidden'>
171
+ const SelectSchema = ({
172
+ options,
173
+ resolve,
174
+ onChange,
175
+ }: {
176
+ options: ObjectAnnotation[];
177
+ onChange: (type: string) => void;
178
+ } & Pick<CreateObjectPanelProps, 'resolve'>) => {
179
+ const { t } = useTranslation(SPACE_PLUGIN);
180
+
181
+ return (
182
+ <SearchList.Root label={t('schema input label')} classNames='flex flex-col grow overflow-hidden'>
122
183
  <SearchList.Input
123
184
  autoFocus
124
- data-testid='create-object-form.space-input'
125
- placeholder={t('space input placeholder')}
185
+ data-testid='create-object-form.schema-input'
186
+ placeholder={t('schema input placeholder')}
126
187
  classNames='px-1 my-2'
127
188
  />
128
189
  <SearchList.Content classNames='max-bs-[24rem] overflow-auto'>
129
- {spaces.map((space) => (
190
+ {options.map((option) => (
130
191
  <SearchList.Item
131
- key={space.id}
132
- value={toLocalizedString(getSpaceDisplayName(space, { personal: space.id === defaultSpaceId }), t)}
133
- onSelect={() => setTarget(space)}
192
+ key={option.typename}
193
+ value={t('typename label', { ns: option.typename, defaultValue: option.typename })}
194
+ onSelect={() => onChange(option.typename)}
134
195
  classNames='flex items-center gap-2'
135
196
  >
136
- <span className='grow truncate'>
137
- {toLocalizedString(getSpaceDisplayName(space, { personal: space.id === defaultSpaceId }), t)}
197
+ <span className='flex gap-2 items-center grow truncate'>
198
+ <Icon icon={resolve?.(option.typename).icon ?? 'ph--placeholder--regular'} size={5} />
199
+ {t('typename label', { ns: option.typename, defaultValue: option.typename })}
138
200
  </span>
139
201
  </SearchList.Item>
140
202
  ))}
141
203
  </SearchList.Content>
142
204
  </SearchList.Root>
143
205
  );
144
-
145
- const inputSurfaceLookup = useInputSurfaceLookup({ target });
146
-
147
- const form = useMemo(() => {
148
- // TODO(ZaymonFC): Move this default object creation schema somewhere?
149
- const schema = (metadata?.creationSchema ?? S.Struct({ name: S.optional(S.String) })) as S.Schema<any>;
150
-
151
- return (
152
- <Form
153
- autoFocus
154
- values={{ name: initialName }}
155
- schema={schema}
156
- testId='create-object-form'
157
- onSave={handleCreateObject}
158
- lookupComponent={inputSurfaceLookup}
159
- />
160
- );
161
- }, [initialName, handleCreateObject, metadata]);
162
-
163
- return (
164
- <div role='form' className='flex flex-col gap-2'>
165
- {target && (
166
- <div role='none'>
167
- <Input.Root>
168
- <InputHeader>
169
- <Input.Label>
170
- {t(isSpace(target) ? 'creating in space label' : 'creating in collection label')}
171
- </Input.Label>
172
- </InputHeader>
173
- <div role='none' className='flex gap-2'>
174
- <Input.TextInput
175
- disabled
176
- value={
177
- isSpace(target)
178
- ? toLocalizedString(getSpaceDisplayName(target, { personal: target.id === defaultSpaceId }), t)
179
- : target.name || t('unnamed collection label')
180
- }
181
- />
182
- <IconButton iconOnly icon='ph--x--regular' label={t('clear input label')} onClick={handleClearTarget} />
183
- </div>
184
- </Input.Root>
185
- </div>
186
- )}
187
- {schema && (
188
- <div role='none'>
189
- <Input.Root>
190
- <InputHeader>
191
- <Input.Label>{t('creating object type label')}</Input.Label>
192
- </InputHeader>
193
- <div role='none' className='flex gap-2'>
194
- <Input.TextInput
195
- disabled
196
- value={t('typename label', { ns: schema.typename, defaultValue: schema.typename })}
197
- />
198
- <IconButton iconOnly icon='ph--x--regular' label={t('clear input label')} onClick={handleClearSchema} />
199
- </div>
200
- </Input.Root>
201
- </div>
202
- )}
203
- {!schema ? schemaInput : !target ? spaceInput : form}
204
- </div>
205
- );
206
206
  };