@dxos/plugin-space 0.8.4-main.21d9917 → 0.8.4-main.2244d791bb

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 (231) hide show
  1. package/dist/lib/browser/CollectionArticle-LKTAABXP.mjs +128 -0
  2. package/dist/lib/browser/CollectionArticle-LKTAABXP.mjs.map +7 -0
  3. package/dist/lib/browser/{ObjectCardStack-TWHN6C2Y.mjs → ObjectCardStack-CXNBCSMR.mjs} +2 -2
  4. package/dist/lib/browser/ObjectCardStack-CXNBCSMR.mjs.map +7 -0
  5. package/dist/lib/browser/{ObjectDetails-GEDIISKK.mjs → ObjectDetails-HXV4IQEM.mjs} +6 -5
  6. package/dist/lib/browser/ObjectDetails-HXV4IQEM.mjs.map +7 -0
  7. package/dist/lib/browser/{RecordArticle-W57QE7QV.mjs → RecordArticle-36LDKFWF.mjs} +11 -10
  8. package/dist/lib/browser/RecordArticle-36LDKFWF.mjs.map +7 -0
  9. package/dist/lib/browser/{app-graph-builder-SJHTZXZF.mjs → app-graph-builder-GLV46QSI.mjs} +26 -19
  10. package/dist/lib/browser/app-graph-builder-GLV46QSI.mjs.map +7 -0
  11. package/dist/lib/browser/{app-graph-serializer-7AT7QMSK.mjs → app-graph-serializer-VOLRDNVE.mjs} +9 -8
  12. package/dist/lib/browser/app-graph-serializer-VOLRDNVE.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-ZT2VPYRM.mjs → chunk-7D63MVRS.mjs} +3 -3
  14. package/dist/lib/browser/chunk-7D63MVRS.mjs.map +7 -0
  15. package/dist/lib/browser/{chunk-4WZUGLQQ.mjs → chunk-A7ZCVQGZ.mjs} +10 -9
  16. package/dist/lib/browser/chunk-A7ZCVQGZ.mjs.map +7 -0
  17. package/dist/lib/browser/{chunk-CCRSHECL.mjs → chunk-KGLWYGIF.mjs} +4 -3
  18. package/dist/lib/browser/chunk-KGLWYGIF.mjs.map +7 -0
  19. package/dist/lib/browser/{chunk-AWVAX26X.mjs → chunk-NF3ZFAB4.mjs} +2 -2
  20. package/dist/lib/browser/{chunk-SUI34XSA.mjs → chunk-WAOJLA2S.mjs} +12 -12
  21. package/dist/lib/browser/chunk-WAOJLA2S.mjs.map +7 -0
  22. package/dist/lib/browser/{chunk-3X2EA2OA.mjs → chunk-XRTOZE23.mjs} +128 -137
  23. package/dist/lib/browser/chunk-XRTOZE23.mjs.map +7 -0
  24. package/dist/lib/browser/cli/index.mjs +31 -29
  25. package/dist/lib/browser/cli/index.mjs.map +3 -3
  26. package/dist/lib/browser/index.mjs +58 -53
  27. package/dist/lib/browser/index.mjs.map +3 -3
  28. package/dist/lib/browser/meta.json +1 -1
  29. package/dist/lib/browser/{operation-resolver-SIRQT36Z.mjs → operation-resolver-PJJ3PCM7.mjs} +45 -42
  30. package/dist/lib/browser/operation-resolver-PJJ3PCM7.mjs.map +7 -0
  31. package/dist/lib/browser/{react-root-PI7VTZUZ.mjs → react-root-MRIDHLHH.mjs} +8 -8
  32. package/dist/lib/browser/react-root-MRIDHLHH.mjs.map +7 -0
  33. package/dist/lib/browser/{react-surface-BPE7VWI7.mjs → react-surface-ARZZ343H.mjs} +38 -37
  34. package/dist/lib/browser/react-surface-ARZZ343H.mjs.map +7 -0
  35. package/dist/lib/browser/{repair-CJG26D52.mjs → repair-DKU4TUD2.mjs} +2 -2
  36. package/dist/lib/browser/{settings-ZS2AQ73E.mjs → settings-M2DMD2ZA.mjs} +5 -4
  37. package/dist/lib/browser/settings-M2DMD2ZA.mjs.map +7 -0
  38. package/dist/lib/browser/{spaces-ready-OQDGWUOS.mjs → spaces-ready-XWJUJ43N.mjs} +13 -12
  39. package/dist/lib/browser/spaces-ready-XWJUJ43N.mjs.map +7 -0
  40. package/dist/lib/browser/{state-7YZQB2KY.mjs → state-V637BLIM.mjs} +5 -5
  41. package/dist/lib/browser/state-V637BLIM.mjs.map +7 -0
  42. package/dist/lib/browser/types/index.mjs +1 -1
  43. package/dist/lib/node-esm/CollectionArticle-ONQMZ7BQ.mjs +129 -0
  44. package/dist/lib/node-esm/CollectionArticle-ONQMZ7BQ.mjs.map +7 -0
  45. package/dist/lib/node-esm/{ObjectCardStack-C5ZXRKP7.mjs → ObjectCardStack-EHXPNRQW.mjs} +2 -2
  46. package/dist/lib/node-esm/ObjectCardStack-EHXPNRQW.mjs.map +7 -0
  47. package/dist/lib/node-esm/{ObjectDetails-6ZLDRKCO.mjs → ObjectDetails-N73UI4ZL.mjs} +6 -5
  48. package/dist/lib/node-esm/ObjectDetails-N73UI4ZL.mjs.map +7 -0
  49. package/dist/lib/node-esm/{RecordArticle-SSV74Z46.mjs → RecordArticle-CMEXNNOZ.mjs} +11 -10
  50. package/dist/lib/node-esm/RecordArticle-CMEXNNOZ.mjs.map +7 -0
  51. package/dist/lib/node-esm/{app-graph-builder-HZ3XXDFZ.mjs → app-graph-builder-KCEHEKVS.mjs} +26 -19
  52. package/dist/lib/node-esm/app-graph-builder-KCEHEKVS.mjs.map +7 -0
  53. package/dist/lib/node-esm/{app-graph-serializer-WJ2TIQG6.mjs → app-graph-serializer-7C4MV5NB.mjs} +9 -8
  54. package/dist/lib/node-esm/app-graph-serializer-7C4MV5NB.mjs.map +7 -0
  55. package/dist/lib/node-esm/{chunk-2SW6S2BB.mjs → chunk-5N3YIAXD.mjs} +3 -3
  56. package/dist/lib/node-esm/chunk-5N3YIAXD.mjs.map +7 -0
  57. package/dist/lib/node-esm/{chunk-JOBIWCBC.mjs → chunk-A5A7M37T.mjs} +10 -9
  58. package/dist/lib/node-esm/chunk-A5A7M37T.mjs.map +7 -0
  59. package/dist/lib/node-esm/{chunk-7KMYUWSR.mjs → chunk-FB5YNROS.mjs} +12 -12
  60. package/dist/lib/node-esm/chunk-FB5YNROS.mjs.map +7 -0
  61. package/dist/lib/node-esm/{chunk-MPL6NHQX.mjs → chunk-NYSDQPNM.mjs} +4 -3
  62. package/dist/lib/node-esm/chunk-NYSDQPNM.mjs.map +7 -0
  63. package/dist/lib/node-esm/{chunk-HREWB23G.mjs → chunk-PG7DNOEX.mjs} +2 -2
  64. package/dist/lib/node-esm/{chunk-EYS3L2NO.mjs → chunk-QDIOQTXY.mjs} +128 -137
  65. package/dist/lib/node-esm/chunk-QDIOQTXY.mjs.map +7 -0
  66. package/dist/lib/node-esm/cli/index.mjs +31 -29
  67. package/dist/lib/node-esm/cli/index.mjs.map +3 -3
  68. package/dist/lib/node-esm/index.mjs +58 -53
  69. package/dist/lib/node-esm/index.mjs.map +3 -3
  70. package/dist/lib/node-esm/meta.json +1 -1
  71. package/dist/lib/node-esm/{operation-resolver-ZE3XJL5J.mjs → operation-resolver-2K7N4KYC.mjs} +45 -42
  72. package/dist/lib/node-esm/operation-resolver-2K7N4KYC.mjs.map +7 -0
  73. package/dist/lib/node-esm/{react-root-KUXM33JI.mjs → react-root-LKSSWFGF.mjs} +8 -8
  74. package/dist/lib/node-esm/react-root-LKSSWFGF.mjs.map +7 -0
  75. package/dist/lib/node-esm/{react-surface-STCQKUZ4.mjs → react-surface-QG5RNBPD.mjs} +38 -37
  76. package/dist/lib/node-esm/react-surface-QG5RNBPD.mjs.map +7 -0
  77. package/dist/lib/node-esm/{repair-G3ZW3VG3.mjs → repair-C2H6JQCL.mjs} +2 -2
  78. package/dist/lib/node-esm/{settings-PVI2VG56.mjs → settings-VCPCNBOY.mjs} +5 -4
  79. package/dist/lib/node-esm/settings-VCPCNBOY.mjs.map +7 -0
  80. package/dist/lib/node-esm/{spaces-ready-R744OHQG.mjs → spaces-ready-5JOGEWON.mjs} +13 -12
  81. package/dist/lib/node-esm/spaces-ready-5JOGEWON.mjs.map +7 -0
  82. package/dist/lib/node-esm/{state-XE5YGPHM.mjs → state-5MCEPWN3.mjs} +5 -5
  83. package/dist/lib/node-esm/state-5MCEPWN3.mjs.map +7 -0
  84. package/dist/lib/node-esm/types/index.mjs +1 -1
  85. package/dist/types/src/SpacePlugin.d.ts.map +1 -1
  86. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +2 -1
  87. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -1
  88. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +1 -1
  89. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -1
  90. package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts +2 -2
  91. package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts.map +1 -1
  92. package/dist/types/src/capabilities/app-graph-serializer/index.d.ts +1 -1
  93. package/dist/types/src/capabilities/app-graph-serializer/index.d.ts.map +1 -1
  94. package/dist/types/src/capabilities/operation-resolver/index.d.ts +1 -1
  95. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -1
  96. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +2 -2
  97. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -1
  98. package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -1
  99. package/dist/types/src/capabilities/react-surface/index.d.ts +1 -1
  100. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -1
  101. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +2 -2
  102. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
  103. package/dist/types/src/capabilities/settings/index.d.ts +1 -1
  104. package/dist/types/src/capabilities/settings/index.d.ts.map +1 -1
  105. package/dist/types/src/capabilities/settings/settings.d.ts +3 -2
  106. package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -1
  107. package/dist/types/src/capabilities/spaces-ready/spaces-ready.d.ts.map +1 -1
  108. package/dist/types/src/capabilities/state/state.d.ts.map +1 -1
  109. package/dist/types/src/cli/commands/database/add.d.ts.map +1 -1
  110. package/dist/types/src/cli/plugin.d.ts.map +1 -1
  111. package/dist/types/src/components/AwaitingObject.d.ts.map +1 -1
  112. package/dist/types/src/components/CollectionArticle.d.ts +2 -2
  113. package/dist/types/src/components/CollectionArticle.d.ts.map +1 -1
  114. package/dist/types/src/components/CollectionSection.d.ts +1 -1
  115. package/dist/types/src/components/CollectionSection.d.ts.map +1 -1
  116. package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
  117. package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +1 -1
  118. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +4 -1
  119. package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
  120. package/dist/types/src/components/JoinDialog/JoinDialog.d.ts.map +1 -1
  121. package/dist/types/src/components/MembersContainer/MembersContainer.d.ts.map +1 -1
  122. package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts +1 -1
  123. package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts +1 -1
  124. package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts.map +1 -1
  125. package/dist/types/src/components/RecordArticle.d.ts +1 -1
  126. package/dist/types/src/components/RecordArticle.d.ts.map +1 -1
  127. package/dist/types/src/components/RecordArticle.stories.d.ts +1 -1
  128. package/dist/types/src/components/RecordArticle.stories.d.ts.map +1 -1
  129. package/dist/types/src/components/SchemaContainer.d.ts.map +1 -1
  130. package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
  131. package/dist/types/src/components/SpacePresence/SpacePresence.d.ts.map +1 -1
  132. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts +4 -1
  133. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
  134. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +4 -1
  135. package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
  136. package/dist/types/src/components/index.d.ts +3 -3
  137. package/dist/types/src/components/index.d.ts.map +1 -1
  138. package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -1
  139. package/dist/types/src/types/events.d.ts.map +1 -1
  140. package/dist/types/src/types/types.d.ts +18 -12
  141. package/dist/types/src/types/types.d.ts.map +1 -1
  142. package/dist/types/src/util.d.ts +2 -1
  143. package/dist/types/src/util.d.ts.map +1 -1
  144. package/dist/types/tsconfig.tsbuildinfo +1 -1
  145. package/package.json +66 -65
  146. package/src/SpacePlugin.ts +59 -40
  147. package/src/capabilities/app-graph-builder/app-graph-builder.ts +17 -13
  148. package/src/capabilities/app-graph-serializer/app-graph-serializer.ts +5 -4
  149. package/src/capabilities/operation-resolver/operation-resolver.ts +31 -29
  150. package/src/capabilities/react-root/react-root.tsx +3 -3
  151. package/src/capabilities/react-surface/react-surface.tsx +34 -32
  152. package/src/capabilities/settings/settings.ts +3 -2
  153. package/src/capabilities/spaces-ready/spaces-ready.ts +8 -7
  154. package/src/capabilities/state/state.ts +3 -3
  155. package/src/cli/commands/database/add.ts +7 -8
  156. package/src/cli/commands/database/query/query.ts +1 -1
  157. package/src/cli/commands/database/remove.ts +2 -2
  158. package/src/cli/commands/database/stats.ts +1 -1
  159. package/src/cli/plugin.ts +33 -26
  160. package/src/components/AwaitingObject.tsx +4 -3
  161. package/src/components/CollectionArticle.tsx +71 -72
  162. package/src/components/CollectionSection.tsx +1 -1
  163. package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +1 -1
  164. package/src/components/CreateDialog/CreateObjectDialog.tsx +20 -17
  165. package/src/components/CreateDialog/CreateObjectPanel.tsx +38 -39
  166. package/src/components/CreateDialog/CreateSpaceDialog.tsx +21 -21
  167. package/src/components/JoinDialog/JoinDialog.tsx +8 -7
  168. package/src/components/MembersContainer/MembersContainer.stories.tsx +1 -1
  169. package/src/components/MembersContainer/MembersContainer.tsx +45 -48
  170. package/src/components/ObjectCardStack/ObjectCardStack.tsx +1 -1
  171. package/src/components/ObjectDetails/BaseObjectSettings.stories.tsx +4 -4
  172. package/src/components/ObjectDetails/ObjectDetails.tsx +6 -5
  173. package/src/components/ObjectRenamePopover/ObjectRenamePopover.tsx +3 -3
  174. package/src/components/RecordArticle.stories.tsx +6 -5
  175. package/src/components/RecordArticle.tsx +23 -21
  176. package/src/components/SchemaContainer.tsx +20 -17
  177. package/src/components/SpacePluginSettings.tsx +34 -31
  178. package/src/components/SpacePresence/SpacePresence.stories.tsx +1 -1
  179. package/src/components/SpacePresence/SpacePresence.tsx +2 -1
  180. package/src/components/SpaceRenamePopover/SpaceRenamePopover.tsx +3 -3
  181. package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +1 -1
  182. package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +161 -179
  183. package/src/components/SyncStatus/InlineSyncStatus.tsx +1 -1
  184. package/src/components/SyncStatus/SyncStatus.stories.tsx +1 -1
  185. package/src/components/ViewEditor.tsx +1 -1
  186. package/src/hooks/useActiveSpace.ts +5 -4
  187. package/src/hooks/useInputSurfaceLookup.tsx +3 -3
  188. package/src/translations.ts +2 -2
  189. package/src/types/events.ts +3 -2
  190. package/src/types/types.ts +10 -3
  191. package/src/util.tsx +9 -6
  192. package/dist/lib/browser/CollectionArticle-XPNA6EHZ.mjs +0 -129
  193. package/dist/lib/browser/CollectionArticle-XPNA6EHZ.mjs.map +0 -7
  194. package/dist/lib/browser/ObjectCardStack-TWHN6C2Y.mjs.map +0 -7
  195. package/dist/lib/browser/ObjectDetails-GEDIISKK.mjs.map +0 -7
  196. package/dist/lib/browser/RecordArticle-W57QE7QV.mjs.map +0 -7
  197. package/dist/lib/browser/app-graph-builder-SJHTZXZF.mjs.map +0 -7
  198. package/dist/lib/browser/app-graph-serializer-7AT7QMSK.mjs.map +0 -7
  199. package/dist/lib/browser/chunk-3X2EA2OA.mjs.map +0 -7
  200. package/dist/lib/browser/chunk-4WZUGLQQ.mjs.map +0 -7
  201. package/dist/lib/browser/chunk-CCRSHECL.mjs.map +0 -7
  202. package/dist/lib/browser/chunk-SUI34XSA.mjs.map +0 -7
  203. package/dist/lib/browser/chunk-ZT2VPYRM.mjs.map +0 -7
  204. package/dist/lib/browser/operation-resolver-SIRQT36Z.mjs.map +0 -7
  205. package/dist/lib/browser/react-root-PI7VTZUZ.mjs.map +0 -7
  206. package/dist/lib/browser/react-surface-BPE7VWI7.mjs.map +0 -7
  207. package/dist/lib/browser/settings-ZS2AQ73E.mjs.map +0 -7
  208. package/dist/lib/browser/spaces-ready-OQDGWUOS.mjs.map +0 -7
  209. package/dist/lib/browser/state-7YZQB2KY.mjs.map +0 -7
  210. package/dist/lib/node-esm/CollectionArticle-WGHNZNO2.mjs +0 -130
  211. package/dist/lib/node-esm/CollectionArticle-WGHNZNO2.mjs.map +0 -7
  212. package/dist/lib/node-esm/ObjectCardStack-C5ZXRKP7.mjs.map +0 -7
  213. package/dist/lib/node-esm/ObjectDetails-6ZLDRKCO.mjs.map +0 -7
  214. package/dist/lib/node-esm/RecordArticle-SSV74Z46.mjs.map +0 -7
  215. package/dist/lib/node-esm/app-graph-builder-HZ3XXDFZ.mjs.map +0 -7
  216. package/dist/lib/node-esm/app-graph-serializer-WJ2TIQG6.mjs.map +0 -7
  217. package/dist/lib/node-esm/chunk-2SW6S2BB.mjs.map +0 -7
  218. package/dist/lib/node-esm/chunk-7KMYUWSR.mjs.map +0 -7
  219. package/dist/lib/node-esm/chunk-EYS3L2NO.mjs.map +0 -7
  220. package/dist/lib/node-esm/chunk-JOBIWCBC.mjs.map +0 -7
  221. package/dist/lib/node-esm/chunk-MPL6NHQX.mjs.map +0 -7
  222. package/dist/lib/node-esm/operation-resolver-ZE3XJL5J.mjs.map +0 -7
  223. package/dist/lib/node-esm/react-root-KUXM33JI.mjs.map +0 -7
  224. package/dist/lib/node-esm/react-surface-STCQKUZ4.mjs.map +0 -7
  225. package/dist/lib/node-esm/settings-PVI2VG56.mjs.map +0 -7
  226. package/dist/lib/node-esm/spaces-ready-R744OHQG.mjs.map +0 -7
  227. package/dist/lib/node-esm/state-XE5YGPHM.mjs.map +0 -7
  228. /package/dist/lib/browser/{chunk-AWVAX26X.mjs.map → chunk-NF3ZFAB4.mjs.map} +0 -0
  229. /package/dist/lib/browser/{repair-CJG26D52.mjs.map → repair-DKU4TUD2.mjs.map} +0 -0
  230. /package/dist/lib/node-esm/{chunk-HREWB23G.mjs.map → chunk-PG7DNOEX.mjs.map} +0 -0
  231. /package/dist/lib/node-esm/{repair-G3ZW3VG3.mjs.map → repair-C2H6JQCL.mjs.map} +0 -0
@@ -3,25 +3,17 @@
3
3
  //
4
4
 
5
5
  import * as Schema from 'effect/Schema';
6
- import React, { type ChangeEvent, forwardRef, useCallback, useMemo, useState } from 'react';
6
+ import React, { type ChangeEvent, useCallback, useMemo, useState } from 'react';
7
7
 
8
- import { Common } from '@dxos/app-framework';
9
- import { useCapabilities, useOperationInvoker } from '@dxos/app-framework/react';
8
+ import { useCapabilities, useOperationInvoker } from '@dxos/app-framework/ui';
9
+ import { LayoutOperation } from '@dxos/app-toolkit';
10
10
  import { Obj } from '@dxos/echo';
11
11
  import { log } from '@dxos/log';
12
12
  import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
13
13
  import { useClient } from '@dxos/react-client';
14
14
  import { type Space, SpaceState } from '@dxos/react-client/echo';
15
15
  import { Button, Input, useFileDownload, useMulticastObservable, useTranslation } from '@dxos/react-ui';
16
- import {
17
- ControlItem,
18
- ControlItemInput,
19
- ControlPage,
20
- ControlSection,
21
- Form,
22
- type FormFieldMap,
23
- } from '@dxos/react-ui-form';
24
- import { Layout } from '@dxos/react-ui-mosaic';
16
+ import { Form, type FormFieldMap, Settings } from '@dxos/react-ui-form';
25
17
  import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
26
18
 
27
19
  import { meta } from '../../meta';
@@ -40,181 +32,171 @@ export type SpaceSettingsContainerProps = {
40
32
  };
41
33
 
42
34
  // TODO(wittjosiah): Handle space migrations here?
43
- export const SpaceSettingsContainer = forwardRef<HTMLDivElement, SpaceSettingsContainerProps>(
44
- ({ space }, forwardedRef) => {
45
- const { t } = useTranslation(meta.id);
46
- const { invokePromise } = useOperationInvoker();
47
- const client = useClient();
48
- const archived = useMulticastObservable(space.state) === SpaceState.SPACE_INACTIVE;
49
- const [edgeReplication, setEdgeReplication] = useState(
50
- space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED,
51
- );
52
- const toggleEdgeReplication = useCallback(
53
- async (next: boolean) => {
54
- setEdgeReplication(next);
55
- await space?.internal
56
- .setEdgeReplicationPreference(next ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED)
57
- .catch((err: unknown) => {
58
- log.catch(err);
59
- setEdgeReplication(!next);
60
- });
61
- },
62
- [space],
63
- );
35
+ export const SpaceSettingsContainer = ({ space }: SpaceSettingsContainerProps) => {
36
+ const { t } = useTranslation(meta.id);
37
+ const { invokePromise } = useOperationInvoker();
38
+ const client = useClient();
39
+ const archived = useMulticastObservable(space.state) === SpaceState.SPACE_INACTIVE;
40
+ const [edgeReplication, setEdgeReplication] = useState(
41
+ space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED,
42
+ );
43
+ const toggleEdgeReplication = useCallback(
44
+ async (next: boolean) => {
45
+ setEdgeReplication(next);
46
+ await space?.internal
47
+ .setEdgeReplicationPreference(next ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED)
48
+ .catch((err: unknown) => {
49
+ log.catch(err);
50
+ setEdgeReplication(!next);
51
+ });
52
+ },
53
+ [space],
54
+ );
55
+
56
+ const handleValuesChanged = useCallback(
57
+ (newValues: Partial<Schema.Schema.Type<typeof SpaceFormSchema>>, meta: { changed?: Record<string, boolean> }) => {
58
+ const changed = meta.changed ?? {};
59
+ if (changed['edgeReplication']) {
60
+ void toggleEdgeReplication(newValues.edgeReplication ?? false);
61
+ }
62
+
63
+ if (changed['name'] || changed['icon'] || changed['hue']) {
64
+ Obj.change(space.properties, (p) => {
65
+ if (changed['name'] && newValues.name !== undefined) {
66
+ p.name = newValues.name;
67
+ }
68
+ if (changed['icon']) {
69
+ p.icon = newValues.icon;
70
+ }
71
+ if (changed['hue']) {
72
+ p.hue = newValues.hue;
73
+ }
74
+ });
75
+ }
64
76
 
65
- const handleSave = useCallback(
66
- (properties: Schema.Schema.Type<typeof SpaceFormSchema>) => {
67
- void toggleEdgeReplication(properties.edgeReplication ?? false);
68
- const nameChanged = properties.name !== space.properties.name;
69
- const iconChanged = properties.icon !== space.properties.icon;
70
- const hueChanged = properties.hue !== space.properties.hue;
71
- if (nameChanged || iconChanged || hueChanged) {
72
- Obj.change(space.properties, (p) => {
73
- if (nameChanged) {
74
- p.name = properties.name;
75
- }
76
- if (iconChanged) {
77
- p.icon = properties.icon;
78
- }
79
- if (hueChanged) {
80
- p.hue = properties.hue;
81
- }
77
+ if (changed['archived']) {
78
+ if (newValues.archived && !archived) {
79
+ void invokePromise(SpaceOperation.Close, { space });
80
+ void invokePromise(LayoutOperation.SwitchWorkspace, {
81
+ subject: client.spaces.default.id,
82
82
  });
83
- }
84
- if (properties.archived && !archived) {
85
- void (async () => {
86
- await invokePromise(SpaceOperation.Close, { space });
87
- await invokePromise(Common.LayoutOperation.SwitchWorkspace, { subject: client.spaces.default.id });
88
- })();
89
- } else if (!properties.archived && archived) {
83
+ } else if (!newValues.archived && archived) {
90
84
  void invokePromise(SpaceOperation.Open, { space });
91
85
  }
92
- },
93
- [space, toggleEdgeReplication, archived],
94
- );
86
+ }
87
+ },
88
+ [space, client, archived, invokePromise, toggleEdgeReplication],
89
+ );
95
90
 
96
- const values = useMemo(
97
- () => ({
98
- name: space.properties.name,
99
- icon: space.properties.icon,
100
- hue: space.properties.hue,
101
- edgeReplication,
102
- archived,
103
- }),
104
- [space.properties.name, space.properties.icon, space.properties.hue, edgeReplication, archived],
105
- );
106
-
107
- const fieldMap = useMemo<FormFieldMap>(
108
- () => ({
109
- name: ({ type, label, getValue, onValueChange }) => {
110
- const handleChange = useCallback(
111
- ({ target: { value } }: ChangeEvent<HTMLInputElement>) => onValueChange(type, value),
112
- [onValueChange, type],
113
- );
114
- return (
115
- <ControlItemInput title={label} description={t('display name description')}>
116
- <Input.TextInput
117
- value={getValue()}
118
- onChange={handleChange}
119
- placeholder={t('display name input placeholder')}
120
- classNames='min-is-64'
121
- />
122
- </ControlItemInput>
123
- );
124
- },
125
- icon: ({ type, label, getValue, onValueChange }) => {
126
- const handleChange = useCallback((icon: string) => onValueChange(type, icon), [onValueChange, type]);
127
- const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
128
- return (
129
- <ControlItem title={label} description={t('icon description')}>
130
- <IconPicker
131
- value={getValue()}
132
- onChange={handleChange}
133
- onReset={handleReset}
134
- classNames='justify-self-end'
135
- />
136
- </ControlItem>
137
- );
138
- },
139
- hue: ({ type, label, getValue, onValueChange }) => {
140
- const handleChange = useCallback((nextHue: string) => onValueChange(type, nextHue), [onValueChange, type]);
141
- const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
142
- return (
143
- <ControlItem title={label} description={t('hue description')}>
144
- <HuePicker
145
- value={getValue()}
146
- onChange={handleChange}
147
- onReset={handleReset}
148
- classNames='justify-self-end'
149
- />
150
- </ControlItem>
151
- );
152
- },
153
- edgeReplication: ({ type, label, getValue, onValueChange }) => {
154
- const handleChange = useCallback((checked: boolean) => onValueChange(type, checked), [onValueChange, type]);
155
- return (
156
- <ControlItemInput title={label} description={t('edge replication description')}>
157
- <Input.Switch checked={getValue()} onCheckedChange={handleChange} classNames='justify-self-end' />
158
- </ControlItemInput>
159
- );
160
- },
161
- archived: ({ type, label, getValue, onValueChange }) => {
162
- const handleChange = useCallback(() => onValueChange(type, !getValue()), [onValueChange, type, getValue]);
163
- return (
164
- <ControlItemInput title={label} description={t('archive space description')}>
165
- <Button
166
- disabled={space === client.spaces.default}
167
- variant={getValue() ? 'default' : 'destructive'}
168
- onClick={handleChange}
169
- >
170
- {getValue() ? t('unarchive space label') : t('archive space label')}
171
- </Button>
172
- </ControlItemInput>
173
- );
174
- },
175
- }),
176
- [t, space],
177
- );
91
+ const values = useMemo(
92
+ () => ({
93
+ name: space.properties.name,
94
+ icon: space.properties.icon,
95
+ hue: space.properties.hue,
96
+ edgeReplication,
97
+ archived,
98
+ }),
99
+ [space.properties.name, space.properties.icon, space.properties.hue, edgeReplication, archived],
100
+ );
178
101
 
179
- const download = useFileDownload();
180
- const handleBackup = useCallback(async () => {
181
- const archive = await space.internal.export();
182
- download(new Blob([archive.contents as Uint8Array<ArrayBuffer>]), archive.filename);
183
- }, [space, download]);
102
+ const fieldMap = useMemo<FormFieldMap>(
103
+ () => ({
104
+ name: ({ type, label, getValue, onValueChange }) => {
105
+ const handleChange = useCallback(
106
+ ({ target: { value } }: ChangeEvent<HTMLInputElement>) => onValueChange(type, value),
107
+ [onValueChange, type],
108
+ );
109
+ return (
110
+ <Settings.ItemInput title={label} description={t('display name description')}>
111
+ <Input.TextInput
112
+ value={getValue()}
113
+ onChange={handleChange}
114
+ placeholder={t('display name input placeholder')}
115
+ classNames='min-is-64'
116
+ />
117
+ </Settings.ItemInput>
118
+ );
119
+ },
120
+ icon: ({ type, label, getValue, onValueChange }) => {
121
+ const handleChange = useCallback((icon: string) => onValueChange(type, icon), [onValueChange, type]);
122
+ const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
123
+ return (
124
+ <Settings.Item title={label} description={t('icon description')}>
125
+ <IconPicker
126
+ value={getValue()}
127
+ onChange={handleChange}
128
+ onReset={handleReset}
129
+ classNames='justify-self-end'
130
+ />
131
+ </Settings.Item>
132
+ );
133
+ },
134
+ hue: ({ type, label, getValue, onValueChange }) => {
135
+ const handleChange = useCallback((nextHue: string) => onValueChange(type, nextHue), [onValueChange, type]);
136
+ const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
137
+ return (
138
+ <Settings.Item title={label} description={t('hue description')}>
139
+ <HuePicker value={getValue()} onChange={handleChange} onReset={handleReset} classNames='justify-self-end' />
140
+ </Settings.Item>
141
+ );
142
+ },
143
+ edgeReplication: ({ type, label, getValue, onValueChange }) => {
144
+ const handleChange = useCallback((checked: boolean) => onValueChange(type, checked), [onValueChange, type]);
145
+ return (
146
+ <Settings.ItemInput title={label} description={t('edge replication description')}>
147
+ <Input.Switch checked={getValue()} onCheckedChange={handleChange} classNames='justify-self-end' />
148
+ </Settings.ItemInput>
149
+ );
150
+ },
151
+ archived: ({ type, label, getValue, onValueChange }) => {
152
+ const handleChange = useCallback(() => onValueChange(type, !getValue()), [onValueChange, type, getValue]);
153
+ return (
154
+ <Settings.ItemInput title={label} description={t('archive space description')}>
155
+ <Button
156
+ disabled={space === client.spaces.default}
157
+ variant={getValue() ? 'default' : 'destructive'}
158
+ onClick={handleChange}
159
+ >
160
+ {getValue() ? t('unarchive space label') : t('archive space label')}
161
+ </Button>
162
+ </Settings.ItemInput>
163
+ );
164
+ },
165
+ }),
166
+ [t, space, client],
167
+ );
184
168
 
185
- const repairs = useCapabilities(SpaceCapabilities.Repair);
186
- const handleRepair = useCallback(async () => {
187
- await Promise.all(repairs.map((repair) => repair({ space, isDefault: client.spaces.default === space })));
188
- }, [client, space, repairs]);
169
+ const download = useFileDownload();
170
+ const handleBackup = useCallback(async () => {
171
+ const archive = await space.internal.export();
172
+ download(new Blob([archive.contents as Uint8Array<ArrayBuffer>]), archive.filename);
173
+ }, [space, download]);
189
174
 
190
- return (
191
- <Layout.Container scrollable ref={forwardedRef}>
192
- <ControlPage>
193
- <ControlSection
194
- title={t('space properties settings verbose label')}
195
- description={t('space properties settings description', {
196
- ns: meta.id,
197
- })}
198
- >
199
- <Form.Root fieldMap={fieldMap} schema={SpaceFormSchema} values={values} autoSave onSave={handleSave}>
200
- <Form.FieldSet />
201
- </Form.Root>
202
- </ControlSection>
175
+ const repairs = useCapabilities(SpaceCapabilities.Repair);
176
+ const handleRepair = useCallback(async () => {
177
+ await Promise.all(repairs.map((repair) => repair({ space, isDefault: client.spaces.default === space })));
178
+ }, [client, space, repairs]);
203
179
 
204
- <ControlSection title={t('space controls title')} description={t('space controls description')}>
205
- <div role='none' className='container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]'>
206
- <ControlItemInput title={t('backup space title')} description={t('backup space description')}>
207
- <Button onClick={handleBackup}>{t('download backup label')}</Button>
208
- </ControlItemInput>
209
- <ControlItemInput title={t('repair space title')} description={t('repair space description')}>
210
- <Button onClick={handleRepair}>{t('repair space label')}</Button>
211
- </ControlItemInput>
212
- </div>
213
- </ControlSection>
214
- </ControlPage>
215
- </Layout.Container>
216
- );
217
- },
218
- );
180
+ return (
181
+ <Settings.Root>
182
+ <Settings.Section
183
+ title={t('space properties settings verbose label')}
184
+ description={t('space properties settings description', { ns: meta.id })}
185
+ >
186
+ <Form.Root fieldMap={fieldMap} schema={SpaceFormSchema} values={values} onValuesChanged={handleValuesChanged}>
187
+ <Form.FieldSet classNames='space-y-trimMd' />
188
+ </Form.Root>
189
+ </Settings.Section>
190
+ <Settings.Section title={t('space controls title')} description={t('space controls description')}>
191
+ <Settings.ItemInput title={t('backup space title')} description={t('backup space description')}>
192
+ <Button onClick={handleBackup}>{t('download backup label')}</Button>
193
+ </Settings.ItemInput>
194
+ <Settings.ItemInput title={t('repair space title')} description={t('repair space description')}>
195
+ <Button onClick={handleRepair}>{t('repair space label')}</Button>
196
+ </Settings.ItemInput>
197
+ </Settings.Section>
198
+ </Settings.Root>
199
+ );
200
+ };
219
201
 
220
202
  SpaceSettingsContainer.displayName = 'SpaceSettingsContainer';
@@ -5,7 +5,7 @@
5
5
  import * as Option from 'effect/Option';
6
6
  import React, { useEffect, useState } from 'react';
7
7
 
8
- import { useAppGraph } from '@dxos/app-framework/react';
8
+ import { useAppGraph } from '@dxos/app-toolkit/ui';
9
9
  import { EdgeStatus } from '@dxos/protocols/proto/dxos/client/services';
10
10
  import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
11
11
  import { useClient } from '@dxos/react-client';
@@ -14,7 +14,7 @@ import { SyncStatusIndicator } from './SyncStatus';
14
14
  const meta = {
15
15
  title: 'plugins/plugin-space/SyncStatusIndicator',
16
16
  component: SyncStatusIndicator,
17
- decorators: [withTheme, withClientProvider({ createIdentity: true })],
17
+ decorators: [withTheme(), withClientProvider({ createIdentity: true })],
18
18
  parameters: {
19
19
  layout: 'centered',
20
20
  translations,
@@ -5,7 +5,7 @@
5
5
  import * as Schema from 'effect/Schema';
6
6
  import React, { useCallback, useState } from 'react';
7
7
 
8
- import { useOperationInvoker } from '@dxos/app-framework/react';
8
+ import { useOperationInvoker } from '@dxos/app-framework/ui';
9
9
  import { DXN, Filter, Obj, Query, type QueryAST, Tag, Type } from '@dxos/echo';
10
10
  import { type Mutable } from '@dxos/echo/internal';
11
11
  import { useClient } from '@dxos/react-client';
@@ -2,15 +2,16 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { type CapabilityManager, Common } from '@dxos/app-framework';
6
- import { useLayout } from '@dxos/app-framework/react';
5
+ import { Capabilities, type CapabilityManager } from '@dxos/app-framework';
6
+ import { AppCapabilities } from '@dxos/app-toolkit';
7
+ import { useLayout } from '@dxos/app-toolkit/ui';
7
8
  import { ClientCapabilities } from '@dxos/plugin-client';
8
9
  import { parseId, useSpace } from '@dxos/react-client/echo';
9
10
 
10
11
  export const getActiveSpace = (capabilities: CapabilityManager.CapabilityManager) => {
11
12
  const client = capabilities.get(ClientCapabilities.Client);
12
- const registry = capabilities.get(Common.Capability.AtomRegistry);
13
- const layoutAtom = capabilities.get(Common.Capability.Layout);
13
+ const registry = capabilities.get(Capabilities.AtomRegistry);
14
+ const layoutAtom = capabilities.get(AppCapabilities.Layout);
14
15
  const layout = registry.get(layoutAtom);
15
16
  const { spaceId } = parseId(layout.workspace);
16
17
  return spaceId ? client.spaces.get(spaceId) : undefined;
@@ -4,7 +4,7 @@
4
4
 
5
5
  import React, { useCallback } from 'react';
6
6
 
7
- import { Surface, isSurfaceAvailable, usePluginManager } from '@dxos/app-framework/react';
7
+ import { Surface, usePluginManager } from '@dxos/app-framework/ui';
8
8
  import { type FormFieldProvider } from '@dxos/react-ui-form';
9
9
 
10
10
  /**
@@ -18,8 +18,8 @@ export const useInputSurfaceLookup = (baseData?: Record<string, any>): FormField
18
18
  return useCallback<FormFieldProvider>(
19
19
  ({ schema, prop, fieldProps }) => {
20
20
  const data = { prop, schema, ...baseData };
21
- if (isSurfaceAvailable(pluginManager.capabilities, { role: 'form-input', data })) {
22
- return <Surface role='form-input' data={data} {...fieldProps} />;
21
+ if (Surface.isAvailable(pluginManager.capabilities, { role: 'form-input', data })) {
22
+ return <Surface.Surface role='form-input' data={data} {...fieldProps} />;
23
23
  }
24
24
  },
25
25
  [pluginManager, baseData],
@@ -5,7 +5,7 @@
5
5
  import { Type } from '@dxos/echo';
6
6
  import { type Resource } from '@dxos/react-ui';
7
7
  import { Collection } from '@dxos/schema';
8
- import { Event, Message, Organization, Person, Project, Task } from '@dxos/types';
8
+ import { Event, Message, Organization, Person, Pipeline, Task } from '@dxos/types';
9
9
 
10
10
  import { meta } from './meta';
11
11
 
@@ -61,7 +61,7 @@ export const translations = [
61
61
  'typename label_other': 'People',
62
62
  'object name placeholder': 'New person',
63
63
  },
64
- [Project.Project.typename]: {
64
+ [Pipeline.Pipeline.typename]: {
65
65
  'typename label': 'Project',
66
66
  'typename label_zero': 'Projects',
67
67
  'typename label_one': 'Project',
@@ -2,12 +2,13 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { ActivationEvent, Common } from '@dxos/app-framework';
5
+ import { ActivationEvent } from '@dxos/app-framework';
6
+ import { AppActivationEvents } from '@dxos/app-toolkit';
6
7
 
7
8
  import { meta } from '../meta';
8
9
 
9
10
  export namespace SpaceEvents {
10
- export const StateReady = Common.ActivationEvent.createStateEvent(`${meta.id}/event/state-ready`);
11
+ export const StateReady = AppActivationEvents.createStateEvent(`${meta.id}/event/state-ready`);
11
12
  export const SetupSettingsPanel = ActivationEvent.make(`${meta.id}/event/setup-settings-panel`);
12
13
  export const DefaultSpaceReady = ActivationEvent.make(`${meta.id}/event/default-space-ready`);
13
14
  export const SpaceCreated = ActivationEvent.make(`${meta.id}/event/space-created`);
@@ -25,12 +25,19 @@ export const SPACE_TYPE = 'dxos.org/type/Space';
25
25
 
26
26
  export type SpacePluginOptions = {
27
27
  /**
28
- * Base URL for the invitation link.
28
+ * Origin used for shareable links (object copy-link and invitation base).
29
+ * Defaults to window.location.origin.
29
30
  */
30
- invitationUrl?: string;
31
+ shareableLinkOrigin?: string;
31
32
 
32
33
  /**
33
- * Query parameter for the invitation code.
34
+ * Path appended to shareableLinkOrigin to form the invitation base URL.
35
+ * Defaults to '/'.
36
+ */
37
+ invitationPath?: string;
38
+
39
+ /**
40
+ * Query parameter name for the invitation code.
34
41
  */
35
42
  invitationProp?: string;
36
43
 
package/src/util.tsx CHANGED
@@ -5,7 +5,8 @@
5
5
  import { type Instruction } from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item';
6
6
  import * as Effect from 'effect/Effect';
7
7
 
8
- import { type CapabilityManager, Common } from '@dxos/app-framework';
8
+ import { type CapabilityManager } from '@dxos/app-framework';
9
+ import { LayoutOperation } from '@dxos/app-toolkit';
9
10
  import { type Space, SpaceState, isSpace } from '@dxos/client/echo';
10
11
  import { type Database, Filter, Obj, Query, Ref, Type } from '@dxos/echo';
11
12
  import { invariant } from '@dxos/invariant';
@@ -308,7 +309,7 @@ export const constructSpaceActions = ({
308
309
  properties: {
309
310
  label: ['create object in space label', { ns: meta.id }],
310
311
  icon: 'ph--plus--regular',
311
- disposition: 'item',
312
+ disposition: 'list-item-primary',
312
313
  testId: 'spacePlugin.createObject',
313
314
  },
314
315
  },
@@ -532,11 +533,13 @@ export const constructObjectActions = ({
532
533
  capabilities,
533
534
  deletable = true,
534
535
  navigable = false,
536
+ shareableLinkOrigin,
535
537
  }: {
536
538
  object: Obj.Unknown;
537
539
  graph: Graph.ReadableGraph;
538
540
  resolve: (typename: string) => Record<string, any>;
539
541
  capabilities: CapabilityManager.CapabilityManager;
542
+ shareableLinkOrigin: string;
540
543
  deletable?: boolean;
541
544
  navigable?: boolean;
542
545
  }) => {
@@ -631,7 +634,7 @@ export const constructObjectActions = ({
631
634
  object: createdObject,
632
635
  });
633
636
  if (addResult.id) {
634
- yield* Operation.invoke(Common.LayoutOperation.Open, { subject: [addResult.id] });
637
+ yield* Operation.invoke(LayoutOperation.Open, { subject: [addResult.id] });
635
638
  }
636
639
  }
637
640
  }),
@@ -694,7 +697,7 @@ export const constructObjectActions = ({
694
697
  type: Node.ActionType,
695
698
  data: () =>
696
699
  Effect.promise(async () => {
697
- const url = `${window.location.origin}/${db.spaceId}/${Obj.getDXN(object).toString()}`;
700
+ const url = `${shareableLinkOrigin}/${db.spaceId}/${Obj.getDXN(object).toString()}`;
698
701
  await navigator.clipboard.writeText(url);
699
702
  }),
700
703
  properties: {
@@ -708,9 +711,9 @@ export const constructObjectActions = ({
708
711
  : []),
709
712
  // TODO(wittjosiah): Factor out and apply to all nodes.
710
713
  {
711
- id: getId(Common.LayoutOperation.Expose.meta.key),
714
+ id: getId(LayoutOperation.Expose.meta.key),
712
715
  type: Node.ActionType,
713
- data: () => Operation.invoke(Common.LayoutOperation.Expose, { subject: Obj.getDXN(object).toString() }),
716
+ data: () => Operation.invoke(LayoutOperation.Expose, { subject: Obj.getDXN(object).toString() }),
714
717
  properties: {
715
718
  label: ['expose object label', { ns: meta.id }],
716
719
  icon: 'ph--eye--regular',