@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.
- package/dist/lib/browser/CollectionArticle-LKTAABXP.mjs +128 -0
- package/dist/lib/browser/CollectionArticle-LKTAABXP.mjs.map +7 -0
- package/dist/lib/browser/{ObjectCardStack-TWHN6C2Y.mjs → ObjectCardStack-CXNBCSMR.mjs} +2 -2
- package/dist/lib/browser/ObjectCardStack-CXNBCSMR.mjs.map +7 -0
- package/dist/lib/browser/{ObjectDetails-GEDIISKK.mjs → ObjectDetails-HXV4IQEM.mjs} +6 -5
- package/dist/lib/browser/ObjectDetails-HXV4IQEM.mjs.map +7 -0
- package/dist/lib/browser/{RecordArticle-W57QE7QV.mjs → RecordArticle-36LDKFWF.mjs} +11 -10
- package/dist/lib/browser/RecordArticle-36LDKFWF.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-SJHTZXZF.mjs → app-graph-builder-GLV46QSI.mjs} +26 -19
- package/dist/lib/browser/app-graph-builder-GLV46QSI.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-7AT7QMSK.mjs → app-graph-serializer-VOLRDNVE.mjs} +9 -8
- package/dist/lib/browser/app-graph-serializer-VOLRDNVE.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ZT2VPYRM.mjs → chunk-7D63MVRS.mjs} +3 -3
- package/dist/lib/browser/chunk-7D63MVRS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-4WZUGLQQ.mjs → chunk-A7ZCVQGZ.mjs} +10 -9
- package/dist/lib/browser/chunk-A7ZCVQGZ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-CCRSHECL.mjs → chunk-KGLWYGIF.mjs} +4 -3
- package/dist/lib/browser/chunk-KGLWYGIF.mjs.map +7 -0
- package/dist/lib/browser/{chunk-AWVAX26X.mjs → chunk-NF3ZFAB4.mjs} +2 -2
- package/dist/lib/browser/{chunk-SUI34XSA.mjs → chunk-WAOJLA2S.mjs} +12 -12
- package/dist/lib/browser/chunk-WAOJLA2S.mjs.map +7 -0
- package/dist/lib/browser/{chunk-3X2EA2OA.mjs → chunk-XRTOZE23.mjs} +128 -137
- package/dist/lib/browser/chunk-XRTOZE23.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +31 -29
- package/dist/lib/browser/cli/index.mjs.map +3 -3
- package/dist/lib/browser/index.mjs +58 -53
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{operation-resolver-SIRQT36Z.mjs → operation-resolver-PJJ3PCM7.mjs} +45 -42
- package/dist/lib/browser/operation-resolver-PJJ3PCM7.mjs.map +7 -0
- package/dist/lib/browser/{react-root-PI7VTZUZ.mjs → react-root-MRIDHLHH.mjs} +8 -8
- package/dist/lib/browser/react-root-MRIDHLHH.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-BPE7VWI7.mjs → react-surface-ARZZ343H.mjs} +38 -37
- package/dist/lib/browser/react-surface-ARZZ343H.mjs.map +7 -0
- package/dist/lib/browser/{repair-CJG26D52.mjs → repair-DKU4TUD2.mjs} +2 -2
- package/dist/lib/browser/{settings-ZS2AQ73E.mjs → settings-M2DMD2ZA.mjs} +5 -4
- package/dist/lib/browser/settings-M2DMD2ZA.mjs.map +7 -0
- package/dist/lib/browser/{spaces-ready-OQDGWUOS.mjs → spaces-ready-XWJUJ43N.mjs} +13 -12
- package/dist/lib/browser/spaces-ready-XWJUJ43N.mjs.map +7 -0
- package/dist/lib/browser/{state-7YZQB2KY.mjs → state-V637BLIM.mjs} +5 -5
- package/dist/lib/browser/state-V637BLIM.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node-esm/CollectionArticle-ONQMZ7BQ.mjs +129 -0
- package/dist/lib/node-esm/CollectionArticle-ONQMZ7BQ.mjs.map +7 -0
- package/dist/lib/node-esm/{ObjectCardStack-C5ZXRKP7.mjs → ObjectCardStack-EHXPNRQW.mjs} +2 -2
- package/dist/lib/node-esm/ObjectCardStack-EHXPNRQW.mjs.map +7 -0
- package/dist/lib/node-esm/{ObjectDetails-6ZLDRKCO.mjs → ObjectDetails-N73UI4ZL.mjs} +6 -5
- package/dist/lib/node-esm/ObjectDetails-N73UI4ZL.mjs.map +7 -0
- package/dist/lib/node-esm/{RecordArticle-SSV74Z46.mjs → RecordArticle-CMEXNNOZ.mjs} +11 -10
- package/dist/lib/node-esm/RecordArticle-CMEXNNOZ.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-HZ3XXDFZ.mjs → app-graph-builder-KCEHEKVS.mjs} +26 -19
- package/dist/lib/node-esm/app-graph-builder-KCEHEKVS.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-WJ2TIQG6.mjs → app-graph-serializer-7C4MV5NB.mjs} +9 -8
- package/dist/lib/node-esm/app-graph-serializer-7C4MV5NB.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-2SW6S2BB.mjs → chunk-5N3YIAXD.mjs} +3 -3
- package/dist/lib/node-esm/chunk-5N3YIAXD.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-JOBIWCBC.mjs → chunk-A5A7M37T.mjs} +10 -9
- package/dist/lib/node-esm/chunk-A5A7M37T.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7KMYUWSR.mjs → chunk-FB5YNROS.mjs} +12 -12
- package/dist/lib/node-esm/chunk-FB5YNROS.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-MPL6NHQX.mjs → chunk-NYSDQPNM.mjs} +4 -3
- package/dist/lib/node-esm/chunk-NYSDQPNM.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-HREWB23G.mjs → chunk-PG7DNOEX.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-EYS3L2NO.mjs → chunk-QDIOQTXY.mjs} +128 -137
- package/dist/lib/node-esm/chunk-QDIOQTXY.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +31 -29
- package/dist/lib/node-esm/cli/index.mjs.map +3 -3
- package/dist/lib/node-esm/index.mjs +58 -53
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{operation-resolver-ZE3XJL5J.mjs → operation-resolver-2K7N4KYC.mjs} +45 -42
- package/dist/lib/node-esm/operation-resolver-2K7N4KYC.mjs.map +7 -0
- package/dist/lib/node-esm/{react-root-KUXM33JI.mjs → react-root-LKSSWFGF.mjs} +8 -8
- package/dist/lib/node-esm/react-root-LKSSWFGF.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-STCQKUZ4.mjs → react-surface-QG5RNBPD.mjs} +38 -37
- package/dist/lib/node-esm/react-surface-QG5RNBPD.mjs.map +7 -0
- package/dist/lib/node-esm/{repair-G3ZW3VG3.mjs → repair-C2H6JQCL.mjs} +2 -2
- package/dist/lib/node-esm/{settings-PVI2VG56.mjs → settings-VCPCNBOY.mjs} +5 -4
- package/dist/lib/node-esm/settings-VCPCNBOY.mjs.map +7 -0
- package/dist/lib/node-esm/{spaces-ready-R744OHQG.mjs → spaces-ready-5JOGEWON.mjs} +13 -12
- package/dist/lib/node-esm/spaces-ready-5JOGEWON.mjs.map +7 -0
- package/dist/lib/node-esm/{state-XE5YGPHM.mjs → state-5MCEPWN3.mjs} +5 -5
- package/dist/lib/node-esm/state-5MCEPWN3.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +2 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts +2 -2
- package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-serializer/index.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-serializer/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings/index.d.ts +1 -1
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings/settings.d.ts +3 -2
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/spaces-ready/spaces-ready.d.ts.map +1 -1
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -1
- package/dist/types/src/cli/commands/database/add.d.ts.map +1 -1
- package/dist/types/src/cli/plugin.d.ts.map +1 -1
- package/dist/types/src/components/AwaitingObject.d.ts.map +1 -1
- package/dist/types/src/components/CollectionArticle.d.ts +2 -2
- package/dist/types/src/components/CollectionArticle.d.ts.map +1 -1
- package/dist/types/src/components/CollectionSection.d.ts +1 -1
- package/dist/types/src/components/CollectionSection.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +4 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer/MembersContainer.stories.d.ts +1 -1
- package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts +1 -1
- package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts.map +1 -1
- package/dist/types/src/components/RecordArticle.d.ts +1 -1
- package/dist/types/src/components/RecordArticle.d.ts.map +1 -1
- package/dist/types/src/components/RecordArticle.stories.d.ts +1 -1
- package/dist/types/src/components/RecordArticle.stories.d.ts.map +1 -1
- package/dist/types/src/components/SchemaContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts +4 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +4 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +3 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -1
- package/dist/types/src/types/events.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +18 -12
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +2 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +66 -65
- package/src/SpacePlugin.ts +59 -40
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +17 -13
- package/src/capabilities/app-graph-serializer/app-graph-serializer.ts +5 -4
- package/src/capabilities/operation-resolver/operation-resolver.ts +31 -29
- package/src/capabilities/react-root/react-root.tsx +3 -3
- package/src/capabilities/react-surface/react-surface.tsx +34 -32
- package/src/capabilities/settings/settings.ts +3 -2
- package/src/capabilities/spaces-ready/spaces-ready.ts +8 -7
- package/src/capabilities/state/state.ts +3 -3
- package/src/cli/commands/database/add.ts +7 -8
- package/src/cli/commands/database/query/query.ts +1 -1
- package/src/cli/commands/database/remove.ts +2 -2
- package/src/cli/commands/database/stats.ts +1 -1
- package/src/cli/plugin.ts +33 -26
- package/src/components/AwaitingObject.tsx +4 -3
- package/src/components/CollectionArticle.tsx +71 -72
- package/src/components/CollectionSection.tsx +1 -1
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +1 -1
- package/src/components/CreateDialog/CreateObjectDialog.tsx +20 -17
- package/src/components/CreateDialog/CreateObjectPanel.tsx +38 -39
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +21 -21
- package/src/components/JoinDialog/JoinDialog.tsx +8 -7
- package/src/components/MembersContainer/MembersContainer.stories.tsx +1 -1
- package/src/components/MembersContainer/MembersContainer.tsx +45 -48
- package/src/components/ObjectCardStack/ObjectCardStack.tsx +1 -1
- package/src/components/ObjectDetails/BaseObjectSettings.stories.tsx +4 -4
- package/src/components/ObjectDetails/ObjectDetails.tsx +6 -5
- package/src/components/ObjectRenamePopover/ObjectRenamePopover.tsx +3 -3
- package/src/components/RecordArticle.stories.tsx +6 -5
- package/src/components/RecordArticle.tsx +23 -21
- package/src/components/SchemaContainer.tsx +20 -17
- package/src/components/SpacePluginSettings.tsx +34 -31
- package/src/components/SpacePresence/SpacePresence.stories.tsx +1 -1
- package/src/components/SpacePresence/SpacePresence.tsx +2 -1
- package/src/components/SpaceRenamePopover/SpaceRenamePopover.tsx +3 -3
- package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +1 -1
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +161 -179
- package/src/components/SyncStatus/InlineSyncStatus.tsx +1 -1
- package/src/components/SyncStatus/SyncStatus.stories.tsx +1 -1
- package/src/components/ViewEditor.tsx +1 -1
- package/src/hooks/useActiveSpace.ts +5 -4
- package/src/hooks/useInputSurfaceLookup.tsx +3 -3
- package/src/translations.ts +2 -2
- package/src/types/events.ts +3 -2
- package/src/types/types.ts +10 -3
- package/src/util.tsx +9 -6
- package/dist/lib/browser/CollectionArticle-XPNA6EHZ.mjs +0 -129
- package/dist/lib/browser/CollectionArticle-XPNA6EHZ.mjs.map +0 -7
- package/dist/lib/browser/ObjectCardStack-TWHN6C2Y.mjs.map +0 -7
- package/dist/lib/browser/ObjectDetails-GEDIISKK.mjs.map +0 -7
- package/dist/lib/browser/RecordArticle-W57QE7QV.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-SJHTZXZF.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-7AT7QMSK.mjs.map +0 -7
- package/dist/lib/browser/chunk-3X2EA2OA.mjs.map +0 -7
- package/dist/lib/browser/chunk-4WZUGLQQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-CCRSHECL.mjs.map +0 -7
- package/dist/lib/browser/chunk-SUI34XSA.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZT2VPYRM.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-SIRQT36Z.mjs.map +0 -7
- package/dist/lib/browser/react-root-PI7VTZUZ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-BPE7VWI7.mjs.map +0 -7
- package/dist/lib/browser/settings-ZS2AQ73E.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-OQDGWUOS.mjs.map +0 -7
- package/dist/lib/browser/state-7YZQB2KY.mjs.map +0 -7
- package/dist/lib/node-esm/CollectionArticle-WGHNZNO2.mjs +0 -130
- package/dist/lib/node-esm/CollectionArticle-WGHNZNO2.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectCardStack-C5ZXRKP7.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectDetails-6ZLDRKCO.mjs.map +0 -7
- package/dist/lib/node-esm/RecordArticle-SSV74Z46.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-HZ3XXDFZ.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-WJ2TIQG6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2SW6S2BB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7KMYUWSR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-EYS3L2NO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JOBIWCBC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MPL6NHQX.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-ZE3XJL5J.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-KUXM33JI.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-STCQKUZ4.mjs.map +0 -7
- package/dist/lib/node-esm/settings-PVI2VG56.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-R744OHQG.mjs.map +0 -7
- package/dist/lib/node-esm/state-XE5YGPHM.mjs.map +0 -7
- /package/dist/lib/browser/{chunk-AWVAX26X.mjs.map → chunk-NF3ZFAB4.mjs.map} +0 -0
- /package/dist/lib/browser/{repair-CJG26D52.mjs.map → repair-DKU4TUD2.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-HREWB23G.mjs.map → chunk-PG7DNOEX.mjs.map} +0 -0
- /package/dist/lib/node-esm/{repair-G3ZW3VG3.mjs.map → repair-C2H6JQCL.mjs.map} +0 -0
|
@@ -3,24 +3,25 @@ import {
|
|
|
3
3
|
useInputSurfaceLookup,
|
|
4
4
|
usePath,
|
|
5
5
|
useTypeOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-A5A7M37T.mjs";
|
|
7
7
|
import {
|
|
8
8
|
COMPOSER_SPACE_LOCK,
|
|
9
9
|
getSpaceDisplayName
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FB5YNROS.mjs";
|
|
11
11
|
import {
|
|
12
12
|
SpaceCapabilities,
|
|
13
13
|
SpaceForm,
|
|
14
14
|
SpaceOperation
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NYSDQPNM.mjs";
|
|
16
16
|
import {
|
|
17
17
|
meta
|
|
18
18
|
} from "./chunk-SL4BJSUG.mjs";
|
|
19
19
|
|
|
20
20
|
// src/components/AwaitingObject.tsx
|
|
21
21
|
import React, { useCallback, useEffect, useState } from "react";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
22
|
+
import { useOperationInvoker } from "@dxos/app-framework/ui";
|
|
23
|
+
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
24
|
+
import { useLayout } from "@dxos/app-toolkit/ui";
|
|
24
25
|
import { Obj } from "@dxos/echo";
|
|
25
26
|
import { useClient } from "@dxos/react-client";
|
|
26
27
|
import { Filter, useQuery } from "@dxos/react-client/echo";
|
|
@@ -64,7 +65,7 @@ var AwaitingObject = ({ id }) => {
|
|
|
64
65
|
invokePromise
|
|
65
66
|
]);
|
|
66
67
|
const handleNavigate = useCallback(() => {
|
|
67
|
-
void invokePromise(
|
|
68
|
+
void invokePromise(LayoutOperation.Open, {
|
|
68
69
|
subject: [
|
|
69
70
|
id
|
|
70
71
|
]
|
|
@@ -115,8 +116,9 @@ var AwaitingObject = ({ id }) => {
|
|
|
115
116
|
// src/components/CreateDialog/CreateObjectDialog.tsx
|
|
116
117
|
import * as Effect from "effect/Effect";
|
|
117
118
|
import React3, { useCallback as useCallback3, useMemo as useMemo2, useRef, useState as useState2 } from "react";
|
|
118
|
-
import { Capability
|
|
119
|
-
import { useOperationInvoker as useOperationInvoker2, usePluginManager } from "@dxos/app-framework/
|
|
119
|
+
import { Capability } from "@dxos/app-framework";
|
|
120
|
+
import { useOperationInvoker as useOperationInvoker2, usePluginManager } from "@dxos/app-framework/ui";
|
|
121
|
+
import { AppCapabilities, LayoutOperation as LayoutOperation2 } from "@dxos/app-toolkit";
|
|
120
122
|
import { Database, Obj as Obj3, Type } from "@dxos/echo";
|
|
121
123
|
import { EntityKind, getTypeAnnotation as getTypeAnnotation2 } from "@dxos/echo/internal";
|
|
122
124
|
import { runAndForwardErrors } from "@dxos/effect";
|
|
@@ -203,6 +205,7 @@ var CreateObjectPanel = ({ schemas, spaces, typename, target, views, initialForm
|
|
|
203
205
|
onSave: handleCreateObject
|
|
204
206
|
}, /* @__PURE__ */ React2.createElement(Form.Viewport, null, /* @__PURE__ */ React2.createElement(Form.Content, null, /* @__PURE__ */ React2.createElement(Form.FieldSet, null), /* @__PURE__ */ React2.createElement(Form.Submit, null)))) : null;
|
|
205
207
|
};
|
|
208
|
+
CreateObjectPanel.displayName = "CreateObjectPanel";
|
|
206
209
|
var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
|
|
207
210
|
const { t } = useTranslation2(meta.id);
|
|
208
211
|
const sortedSpaces = useMemo(() => [
|
|
@@ -228,15 +231,11 @@ var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
|
|
|
228
231
|
});
|
|
229
232
|
return /* @__PURE__ */ React2.createElement(SearchList.Root, {
|
|
230
233
|
onSearch: handleSearch
|
|
231
|
-
}, /* @__PURE__ */ React2.createElement(
|
|
232
|
-
"aria-label": t("space input label"),
|
|
233
|
-
role: "combobox",
|
|
234
|
-
"aria-expanded": "true"
|
|
235
|
-
}, /* @__PURE__ */ React2.createElement(SearchList.Input, {
|
|
234
|
+
}, /* @__PURE__ */ React2.createElement(SearchList.Content, null, /* @__PURE__ */ React2.createElement(SearchList.Input, {
|
|
236
235
|
autoFocus: true,
|
|
237
236
|
"data-testid": "create-object-form.space-input",
|
|
238
237
|
placeholder: t("space input placeholder")
|
|
239
|
-
}), /* @__PURE__ */ React2.createElement(SearchList.
|
|
238
|
+
}), /* @__PURE__ */ React2.createElement(SearchList.Viewport, null, results.map((space) => /* @__PURE__ */ React2.createElement(SearchList.Item, {
|
|
240
239
|
key: space.id,
|
|
241
240
|
value: space.id,
|
|
242
241
|
label: toLocalizedString(getSpaceDisplayName(space, {
|
|
@@ -244,7 +243,7 @@ var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
|
|
|
244
243
|
}), t),
|
|
245
244
|
onSelect: () => onChange?.(space.db),
|
|
246
245
|
classNames: "flex items-center gap-2"
|
|
247
|
-
})))))
|
|
246
|
+
})))));
|
|
248
247
|
};
|
|
249
248
|
var SelectSchema = ({ options, resolve, onChange }) => {
|
|
250
249
|
const { t } = useTranslation2(meta.id);
|
|
@@ -257,15 +256,11 @@ var SelectSchema = ({ options, resolve, onChange }) => {
|
|
|
257
256
|
});
|
|
258
257
|
return /* @__PURE__ */ React2.createElement(SearchList.Root, {
|
|
259
258
|
onSearch: handleSearch
|
|
260
|
-
}, /* @__PURE__ */ React2.createElement(
|
|
261
|
-
"aria-label": t("schema input label"),
|
|
262
|
-
role: "combobox",
|
|
263
|
-
"aria-expanded": "true"
|
|
264
|
-
}, /* @__PURE__ */ React2.createElement(SearchList.Input, {
|
|
259
|
+
}, /* @__PURE__ */ React2.createElement(SearchList.Content, null, /* @__PURE__ */ React2.createElement(SearchList.Input, {
|
|
265
260
|
autoFocus: true,
|
|
266
261
|
"data-testid": "create-object-form.schema-input",
|
|
267
262
|
placeholder: t("schema input placeholder")
|
|
268
|
-
}), /* @__PURE__ */ React2.createElement(SearchList.
|
|
263
|
+
}), /* @__PURE__ */ React2.createElement(SearchList.Viewport, null, results.map((option) => /* @__PURE__ */ React2.createElement(SearchList.Item, {
|
|
269
264
|
key: option.typename,
|
|
270
265
|
value: option.typename,
|
|
271
266
|
label: t("typename label", {
|
|
@@ -275,7 +270,7 @@ var SelectSchema = ({ options, resolve, onChange }) => {
|
|
|
275
270
|
icon: resolve?.(option.typename)?.icon ?? "ph--placeholder--regular",
|
|
276
271
|
onSelect: () => onChange(option.typename),
|
|
277
272
|
classNames: "flex items-center gap-2"
|
|
278
|
-
})))))
|
|
273
|
+
})))));
|
|
279
274
|
};
|
|
280
275
|
|
|
281
276
|
// src/components/CreateDialog/CreateObjectDialog.tsx
|
|
@@ -291,7 +286,7 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, vi
|
|
|
291
286
|
const spaces = useSpaces();
|
|
292
287
|
const closeRef = useRef(null);
|
|
293
288
|
const resolve = useCallback3((typename2) => {
|
|
294
|
-
const metadata = manager.capabilities.getAll(
|
|
289
|
+
const metadata = manager.capabilities.getAll(AppCapabilities.Metadata).find(({ id }) => id === typename2)?.metadata;
|
|
295
290
|
return metadata?.createObject ? metadata : void 0;
|
|
296
291
|
}, [
|
|
297
292
|
manager
|
|
@@ -314,7 +309,7 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, vi
|
|
|
314
309
|
const db2 = Database.isDatabase(target) ? target : target && Obj3.getDatabase(target);
|
|
315
310
|
invariant(db2, "Missing database", {
|
|
316
311
|
F: __dxlog_file,
|
|
317
|
-
L:
|
|
312
|
+
L: 86,
|
|
318
313
|
S: this,
|
|
319
314
|
A: [
|
|
320
315
|
"db",
|
|
@@ -333,7 +328,7 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, vi
|
|
|
333
328
|
});
|
|
334
329
|
const shouldNavigate = _shouldNavigate ?? (() => true);
|
|
335
330
|
if (shouldNavigate(object)) {
|
|
336
|
-
yield* Effect.promise(() => operationInvoker.invokePromise(
|
|
331
|
+
yield* Effect.promise(() => operationInvoker.invokePromise(LayoutOperation2.Open, {
|
|
337
332
|
subject: [
|
|
338
333
|
Obj3.getDXN(object).toString()
|
|
339
334
|
]
|
|
@@ -357,7 +352,7 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, vi
|
|
|
357
352
|
asChild: true
|
|
358
353
|
}, /* @__PURE__ */ React3.createElement(Dialog.CloseIconButton, {
|
|
359
354
|
ref: closeRef
|
|
360
|
-
}))), /* @__PURE__ */ React3.createElement(CreateObjectPanel, {
|
|
355
|
+
}))), /* @__PURE__ */ React3.createElement(Dialog.Body, null, /* @__PURE__ */ React3.createElement(CreateObjectPanel, {
|
|
361
356
|
schemas: userSchemas,
|
|
362
357
|
spaces,
|
|
363
358
|
target,
|
|
@@ -369,14 +364,14 @@ var CreateObjectDialog = ({ target: initialTarget, typename: initialTypename, vi
|
|
|
369
364
|
onTargetChange: setTarget,
|
|
370
365
|
onTypenameChange: setTypename,
|
|
371
366
|
onCreateObject: handleCreateObject
|
|
372
|
-
}));
|
|
367
|
+
})));
|
|
373
368
|
};
|
|
374
369
|
|
|
375
370
|
// src/components/CreateDialog/CreateSpaceDialog.tsx
|
|
376
371
|
import * as Effect2 from "effect/Effect";
|
|
377
372
|
import React4, { useCallback as useCallback4, useRef as useRef2 } from "react";
|
|
378
|
-
import {
|
|
379
|
-
import {
|
|
373
|
+
import { useOperationInvoker as useOperationInvoker3 } from "@dxos/app-framework/ui";
|
|
374
|
+
import { LayoutOperation as LayoutOperation3 } from "@dxos/app-toolkit";
|
|
380
375
|
import { runAndForwardErrors as runAndForwardErrors2 } from "@dxos/effect";
|
|
381
376
|
import { Dialog as Dialog2, useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
382
377
|
import { Form as Form2 } from "@dxos/react-ui-form";
|
|
@@ -393,10 +388,10 @@ var CreateSpaceDialog = () => {
|
|
|
393
388
|
const program = Effect2.gen(function* () {
|
|
394
389
|
const { data: result } = yield* Effect2.promise(() => invokePromise(SpaceOperation.Create, data));
|
|
395
390
|
if (result?.space) {
|
|
396
|
-
yield* Effect2.promise(() => invokePromise(
|
|
391
|
+
yield* Effect2.promise(() => invokePromise(LayoutOperation3.SwitchWorkspace, {
|
|
397
392
|
subject: result.space.id
|
|
398
393
|
}));
|
|
399
|
-
yield* Effect2.promise(() => invokePromise(
|
|
394
|
+
yield* Effect2.promise(() => invokePromise(LayoutOperation3.UpdateDialog, {
|
|
400
395
|
state: false
|
|
401
396
|
}));
|
|
402
397
|
}
|
|
@@ -409,14 +404,14 @@ var CreateSpaceDialog = () => {
|
|
|
409
404
|
asChild: true
|
|
410
405
|
}, /* @__PURE__ */ React4.createElement(Dialog2.CloseIconButton, {
|
|
411
406
|
ref: closeRef
|
|
412
|
-
}))), /* @__PURE__ */ React4.createElement(Form2.Root, {
|
|
407
|
+
}))), /* @__PURE__ */ React4.createElement(Dialog2.Body, null, /* @__PURE__ */ React4.createElement(Form2.Root, {
|
|
413
408
|
testId: "create-space-form",
|
|
414
409
|
autoFocus: true,
|
|
415
410
|
schema: SpaceForm,
|
|
416
411
|
values: initialValues,
|
|
417
412
|
fieldProvider: inputSurfaceLookup,
|
|
418
413
|
onSave: handleCreateSpace
|
|
419
|
-
}, /* @__PURE__ */ React4.createElement(Form2.Viewport, null, /* @__PURE__ */ React4.createElement(Form2.Content, null, /* @__PURE__ */ React4.createElement(Form2.FieldSet, null), /* @__PURE__ */ React4.createElement(Form2.Submit, null)))));
|
|
414
|
+
}, /* @__PURE__ */ React4.createElement(Form2.Viewport, null, /* @__PURE__ */ React4.createElement(Form2.Content, null, /* @__PURE__ */ React4.createElement(Form2.FieldSet, null), /* @__PURE__ */ React4.createElement(Form2.Submit, null))))));
|
|
420
415
|
};
|
|
421
416
|
|
|
422
417
|
// src/components/CollectionSection.tsx
|
|
@@ -434,8 +429,9 @@ var CollectionSection = ({ role, subject }) => {
|
|
|
434
429
|
|
|
435
430
|
// src/components/JoinDialog/JoinDialog.tsx
|
|
436
431
|
import React6, { useCallback as useCallback5 } from "react";
|
|
437
|
-
import {
|
|
438
|
-
import {
|
|
432
|
+
import { useOperationInvoker as useOperationInvoker4 } from "@dxos/app-framework/ui";
|
|
433
|
+
import { LayoutOperation as LayoutOperation4 } from "@dxos/app-toolkit";
|
|
434
|
+
import { useAppGraph } from "@dxos/app-toolkit/ui";
|
|
439
435
|
import { Trigger } from "@dxos/async";
|
|
440
436
|
import { Graph } from "@dxos/plugin-graph";
|
|
441
437
|
import { ObservabilityOperation } from "@dxos/plugin-observability/types";
|
|
@@ -455,7 +451,7 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
|
455
451
|
return;
|
|
456
452
|
}
|
|
457
453
|
await Promise.all([
|
|
458
|
-
invokePromise(
|
|
454
|
+
invokePromise(LayoutOperation4.AddToast, {
|
|
459
455
|
id: `${meta.id}/join-success`,
|
|
460
456
|
duration: 5e3,
|
|
461
457
|
title: [
|
|
@@ -471,7 +467,7 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
|
471
467
|
}
|
|
472
468
|
]
|
|
473
469
|
}),
|
|
474
|
-
invokePromise(
|
|
470
|
+
invokePromise(LayoutOperation4.UpdateDialog, {
|
|
475
471
|
state: false
|
|
476
472
|
})
|
|
477
473
|
]);
|
|
@@ -486,7 +482,7 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
|
486
482
|
});
|
|
487
483
|
space = await trigger.wait();
|
|
488
484
|
}
|
|
489
|
-
await invokePromise(
|
|
485
|
+
await invokePromise(LayoutOperation4.SwitchWorkspace, {
|
|
490
486
|
subject: space.id
|
|
491
487
|
});
|
|
492
488
|
const target = result?.target || (navigableCollections ? space?.id : void 0);
|
|
@@ -496,12 +492,12 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
|
496
492
|
}).catch(() => {
|
|
497
493
|
});
|
|
498
494
|
await Promise.all([
|
|
499
|
-
invokePromise(
|
|
495
|
+
invokePromise(LayoutOperation4.Open, {
|
|
500
496
|
subject: [
|
|
501
497
|
target
|
|
502
498
|
]
|
|
503
499
|
}),
|
|
504
|
-
invokePromise(
|
|
500
|
+
invokePromise(LayoutOperation4.Expose, {
|
|
505
501
|
subject: target
|
|
506
502
|
})
|
|
507
503
|
]);
|
|
@@ -541,15 +537,14 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
|
541
537
|
// src/components/MembersContainer/MembersContainer.tsx
|
|
542
538
|
import React7, { useCallback as useCallback6, useMemo as useMemo3, useState as useState3 } from "react";
|
|
543
539
|
import { QR } from "react-qr-rounded";
|
|
544
|
-
import { useOperationInvoker as useOperationInvoker5 } from "@dxos/app-framework/
|
|
540
|
+
import { useOperationInvoker as useOperationInvoker5 } from "@dxos/app-framework/ui";
|
|
545
541
|
import { Obj as Obj4 } from "@dxos/echo";
|
|
546
542
|
import { log } from "@dxos/log";
|
|
547
543
|
import { useConfig } from "@dxos/react-client";
|
|
548
544
|
import { useSpaceInvitations } from "@dxos/react-client/echo";
|
|
549
545
|
import { Invitation, InvitationEncoder } from "@dxos/react-client/invitations";
|
|
550
546
|
import { Button as Button2, Clipboard, Icon as Icon2, Input, useId, useTranslation as useTranslation7 } from "@dxos/react-ui";
|
|
551
|
-
import {
|
|
552
|
-
import { Layout } from "@dxos/react-ui-mosaic";
|
|
547
|
+
import { Settings } from "@dxos/react-ui-form";
|
|
553
548
|
import { Collection } from "@dxos/schema";
|
|
554
549
|
import { AuthCode, BifurcatedAction, Centered, Emoji, InvitationList, SpaceMemberList, Viewport, translationKey as shellTranslationKey } from "@dxos/shell/react";
|
|
555
550
|
import { hexToEmoji } from "@dxos/util";
|
|
@@ -563,7 +558,7 @@ var handleInvitationEvent = (invitation, subscription) => {
|
|
|
563
558
|
authCode: invitation.authCode
|
|
564
559
|
}), void 0, {
|
|
565
560
|
F: __dxlog_file2,
|
|
566
|
-
L:
|
|
561
|
+
L: 40,
|
|
567
562
|
S: void 0,
|
|
568
563
|
C: (f, a) => f(...a)
|
|
569
564
|
});
|
|
@@ -651,21 +646,19 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
651
646
|
const handleBack = () => {
|
|
652
647
|
setSelectedInvitation(null);
|
|
653
648
|
};
|
|
654
|
-
return /* @__PURE__ */ React7.createElement(Clipboard.Provider, null, /* @__PURE__ */ React7.createElement(
|
|
655
|
-
scrollable: true
|
|
656
|
-
}, /* @__PURE__ */ React7.createElement(ControlPage, null, /* @__PURE__ */ React7.createElement(ControlSection, {
|
|
649
|
+
return /* @__PURE__ */ React7.createElement(Clipboard.Provider, null, /* @__PURE__ */ React7.createElement(Settings.Root, null, /* @__PURE__ */ React7.createElement(Settings.Section, {
|
|
657
650
|
title: t("members verbose label"),
|
|
658
651
|
description: t("members description")
|
|
659
|
-
}, /* @__PURE__ */ React7.createElement(
|
|
652
|
+
}, /* @__PURE__ */ React7.createElement(Settings.Frame, null, /* @__PURE__ */ React7.createElement(Settings.FrameItem, {
|
|
660
653
|
title: t("members label")
|
|
661
654
|
}, /* @__PURE__ */ React7.createElement(SpaceMemberList, {
|
|
662
655
|
spaceKey: space.key,
|
|
663
656
|
includeSelf: true
|
|
664
|
-
})), locked && /* @__PURE__ */ React7.createElement(
|
|
657
|
+
})), locked && /* @__PURE__ */ React7.createElement(Settings.FrameItem, {
|
|
665
658
|
title: t("invitations label")
|
|
666
659
|
}, /* @__PURE__ */ React7.createElement("p", {
|
|
667
660
|
className: "text-description mbe-2"
|
|
668
|
-
}, t("locked space description"))), !locked && /* @__PURE__ */ React7.createElement(
|
|
661
|
+
}, t("locked space description"))), !locked && /* @__PURE__ */ React7.createElement(Settings.FrameItem, {
|
|
669
662
|
title: t("invitations label")
|
|
670
663
|
}, selectedInvitation && /* @__PURE__ */ React7.createElement(InvitationSection, {
|
|
671
664
|
...selectedInvitation,
|
|
@@ -685,14 +678,14 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
685
678
|
"data-testid": "membersContainer.createInvitation"
|
|
686
679
|
})))), /* @__PURE__ */ React7.createElement("div", {
|
|
687
680
|
className: "justify-center p-0 mbs-4 container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]"
|
|
688
|
-
}, /* @__PURE__ */ React7.createElement(
|
|
681
|
+
}, /* @__PURE__ */ React7.createElement(Settings.ItemInput, {
|
|
689
682
|
title: t("space locked label"),
|
|
690
683
|
description: t("space locked description")
|
|
691
684
|
}, /* @__PURE__ */ React7.createElement(Input.Switch, {
|
|
692
685
|
checked: locked,
|
|
693
686
|
onCheckedChange: handleChangeLocked,
|
|
694
687
|
classNames: "justify-self-end"
|
|
695
|
-
}))))))
|
|
688
|
+
}))))));
|
|
696
689
|
};
|
|
697
690
|
var InvitationSection = ({ state = Invitation.State.INIT, authCode, invitationId = "never", url = "never", onBack }) => {
|
|
698
691
|
const activeView = state < 0 ? "init" : state >= Invitation.State.CANCELLED ? "complete" : state >= Invitation.State.READY_FOR_AUTHENTICATION && authCode ? "auth-code" : "qr-code";
|
|
@@ -808,8 +801,8 @@ var MenuFooter = ({ object }) => {
|
|
|
808
801
|
|
|
809
802
|
// src/components/ObjectRenamePopover/ObjectRenamePopover.tsx
|
|
810
803
|
import React9, { useCallback as useCallback7, useRef as useRef3, useState as useState4 } from "react";
|
|
811
|
-
import {
|
|
812
|
-
import {
|
|
804
|
+
import { useOperationInvoker as useOperationInvoker6 } from "@dxos/app-framework/ui";
|
|
805
|
+
import { LayoutOperation as LayoutOperation5 } from "@dxos/app-toolkit";
|
|
813
806
|
import { Obj as Obj5 } from "@dxos/echo";
|
|
814
807
|
import { log as log2 } from "@dxos/log";
|
|
815
808
|
import { Button as Button3, Input as Input2, useTranslation as useTranslation9 } from "@dxos/react-ui";
|
|
@@ -834,7 +827,7 @@ var ObjectRenamePopover = ({ object }) => {
|
|
|
834
827
|
C: (f, a) => f(...a)
|
|
835
828
|
});
|
|
836
829
|
}
|
|
837
|
-
void invokePromise(
|
|
830
|
+
void invokePromise(LayoutOperation5.UpdatePopover, {
|
|
838
831
|
anchorId: "",
|
|
839
832
|
state: false
|
|
840
833
|
});
|
|
@@ -869,25 +862,28 @@ var ObjectRenamePopover = ({ object }) => {
|
|
|
869
862
|
// src/components/SchemaContainer.tsx
|
|
870
863
|
import React10, { useEffect as useEffect2, useState as useState5 } from "react";
|
|
871
864
|
import { useTranslation as useTranslation10 } from "@dxos/react-ui";
|
|
872
|
-
import {
|
|
873
|
-
import {
|
|
865
|
+
import { Settings as Settings2 } from "@dxos/react-ui-form";
|
|
866
|
+
import { mx } from "@dxos/ui-theme";
|
|
867
|
+
var itemClasses = mx([
|
|
868
|
+
"container-max-width grid md:col-span-2 grid-cols-subgrid gap-trimSm items-center",
|
|
869
|
+
"*:first:!mbs-0 *:last:!mbe-0 pli-trimMd plb-trimMd",
|
|
870
|
+
"border border-separator rounded-md"
|
|
871
|
+
]);
|
|
874
872
|
var SchemaContainer = ({ space }) => {
|
|
875
873
|
const { t } = useTranslation10(meta.id);
|
|
876
874
|
const schemas = useQuerySpaceSchemas(space);
|
|
877
|
-
return /* @__PURE__ */ React10.createElement(
|
|
878
|
-
scrollable: true
|
|
879
|
-
}, /* @__PURE__ */ React10.createElement(ControlPage2, null, /* @__PURE__ */ React10.createElement(ControlSection2, {
|
|
875
|
+
return /* @__PURE__ */ React10.createElement(Settings2.Root, null, /* @__PURE__ */ React10.createElement(Settings2.Section, {
|
|
880
876
|
title: t("schema verbose label"),
|
|
881
877
|
description: t("schema description")
|
|
882
878
|
}, /* @__PURE__ */ React10.createElement("div", {
|
|
883
879
|
role: "none",
|
|
884
|
-
className:
|
|
880
|
+
className: itemClasses
|
|
885
881
|
}, schemas.length === 0 && /* @__PURE__ */ React10.createElement("div", {
|
|
886
882
|
className: "text-center plb-4"
|
|
887
883
|
}, t("no schemas found message")), schemas.map((schema) => /* @__PURE__ */ React10.createElement("div", {
|
|
888
884
|
role: "none",
|
|
889
885
|
key: schema.id
|
|
890
|
-
}, schema.typename)))))
|
|
886
|
+
}, schema.typename)))));
|
|
891
887
|
};
|
|
892
888
|
var useQuerySpaceSchemas = (space) => {
|
|
893
889
|
const [schemas, setSchemas] = useState5([]);
|
|
@@ -905,11 +901,11 @@ var useQuerySpaceSchemas = (space) => {
|
|
|
905
901
|
|
|
906
902
|
// src/components/SpacePluginSettings.tsx
|
|
907
903
|
import React11 from "react";
|
|
908
|
-
import { useOperationInvoker as useOperationInvoker7 } from "@dxos/app-framework/
|
|
904
|
+
import { useOperationInvoker as useOperationInvoker7 } from "@dxos/app-framework/ui";
|
|
909
905
|
import { useClient as useClient5 } from "@dxos/react-client";
|
|
910
906
|
import { useSpaces as useSpaces2 } from "@dxos/react-client/echo";
|
|
911
907
|
import { IconButton, Input as Input3, List, ListItem, toLocalizedString as toLocalizedString3, useTranslation as useTranslation11 } from "@dxos/react-ui";
|
|
912
|
-
import {
|
|
908
|
+
import { Settings as Settings3 } from "@dxos/react-ui-form";
|
|
913
909
|
var SpacePluginSettings = ({ settings, onSettingsChange }) => {
|
|
914
910
|
const { t } = useTranslation11(meta.id);
|
|
915
911
|
const client = useClient5();
|
|
@@ -917,22 +913,19 @@ var SpacePluginSettings = ({ settings, onSettingsChange }) => {
|
|
|
917
913
|
all: settings.showHidden
|
|
918
914
|
});
|
|
919
915
|
const { invokePromise } = useOperationInvoker7();
|
|
920
|
-
return /* @__PURE__ */ React11.createElement(
|
|
916
|
+
return /* @__PURE__ */ React11.createElement(Settings3.Root, null, /* @__PURE__ */ React11.createElement(Settings3.Section, {
|
|
921
917
|
title: t("space settings label"),
|
|
922
918
|
description: t("space settings description")
|
|
923
|
-
}, /* @__PURE__ */ React11.createElement(
|
|
919
|
+
}, /* @__PURE__ */ React11.createElement(Settings3.Group, null, /* @__PURE__ */ React11.createElement(Settings3.ItemInput, {
|
|
924
920
|
title: t("show hidden spaces label")
|
|
925
921
|
}, /* @__PURE__ */ React11.createElement(Input3.Switch, {
|
|
926
922
|
checked: settings.showHidden,
|
|
927
|
-
onCheckedChange: (checked) => onSettingsChange((
|
|
928
|
-
...
|
|
923
|
+
onCheckedChange: (checked) => onSettingsChange((state) => ({
|
|
924
|
+
...state,
|
|
929
925
|
showHidden: !!checked
|
|
930
926
|
}))
|
|
931
|
-
}))), /* @__PURE__ */ React11.createElement(List, {
|
|
932
|
-
classNames:
|
|
933
|
-
controlItemClasses2,
|
|
934
|
-
"flex flex-col gap-trimSm"
|
|
935
|
-
]
|
|
927
|
+
}))), /* @__PURE__ */ React11.createElement(Settings3.Container, null, /* @__PURE__ */ React11.createElement(List, {
|
|
928
|
+
classNames: "flex flex-col gap-trimSm"
|
|
936
929
|
}, spaces.map((space) => /* @__PURE__ */ React11.createElement(ListItem.Root, {
|
|
937
930
|
key: space.id,
|
|
938
931
|
classNames: "is-full items-center"
|
|
@@ -946,13 +939,14 @@ var SpacePluginSettings = ({ settings, onSettingsChange }) => {
|
|
|
946
939
|
space
|
|
947
940
|
}),
|
|
948
941
|
label: t("open space settings label")
|
|
949
|
-
}))))));
|
|
942
|
+
})))))));
|
|
950
943
|
};
|
|
951
944
|
|
|
952
945
|
// src/components/SpacePresence/SpacePresence.tsx
|
|
953
946
|
import * as Option2 from "effect/Option";
|
|
954
947
|
import React12, { forwardRef, useCallback as useCallback8, useEffect as useEffect3, useState as useState6 } from "react";
|
|
955
|
-
import {
|
|
948
|
+
import { useAtomCapability } from "@dxos/app-framework/ui";
|
|
949
|
+
import { useAppGraph as useAppGraph2 } from "@dxos/app-toolkit/ui";
|
|
956
950
|
import { generateName } from "@dxos/display-name";
|
|
957
951
|
import { Obj as Obj6 } from "@dxos/echo";
|
|
958
952
|
import { PublicKey } from "@dxos/react-client";
|
|
@@ -1112,8 +1106,8 @@ var SmallPresence = ({ count = 0, attended, containsAttended }) => {
|
|
|
1112
1106
|
|
|
1113
1107
|
// src/components/SpaceRenamePopover/SpaceRenamePopover.tsx
|
|
1114
1108
|
import React13, { useCallback as useCallback9, useRef as useRef4, useState as useState7 } from "react";
|
|
1115
|
-
import {
|
|
1116
|
-
import {
|
|
1109
|
+
import { useOperationInvoker as useOperationInvoker8 } from "@dxos/app-framework/ui";
|
|
1110
|
+
import { LayoutOperation as LayoutOperation6 } from "@dxos/app-toolkit";
|
|
1117
1111
|
import { Obj as Obj7 } from "@dxos/echo";
|
|
1118
1112
|
import { Button as Button4, Input as Input4, Popover as Popover2, useTranslation as useTranslation13 } from "@dxos/react-ui";
|
|
1119
1113
|
import { osTranslations as osTranslations4 } from "@dxos/ui-theme";
|
|
@@ -1127,7 +1121,7 @@ var SpaceRenamePopover = ({ space }) => {
|
|
|
1127
1121
|
Obj7.change(space.properties, (p) => {
|
|
1128
1122
|
p.name = name;
|
|
1129
1123
|
});
|
|
1130
|
-
void invokePromise(
|
|
1124
|
+
void invokePromise(LayoutOperation6.UpdatePopover, {
|
|
1131
1125
|
anchorId: "",
|
|
1132
1126
|
state: false
|
|
1133
1127
|
});
|
|
@@ -1164,17 +1158,16 @@ var SpaceRenamePopover = ({ space }) => {
|
|
|
1164
1158
|
|
|
1165
1159
|
// src/components/SpaceSettings/SpaceSettingsContainer.tsx
|
|
1166
1160
|
import * as Schema from "effect/Schema";
|
|
1167
|
-
import React14, {
|
|
1168
|
-
import {
|
|
1169
|
-
import {
|
|
1161
|
+
import React14, { useCallback as useCallback10, useMemo as useMemo4, useState as useState8 } from "react";
|
|
1162
|
+
import { useCapabilities, useOperationInvoker as useOperationInvoker9 } from "@dxos/app-framework/ui";
|
|
1163
|
+
import { LayoutOperation as LayoutOperation7 } from "@dxos/app-toolkit";
|
|
1170
1164
|
import { Obj as Obj8 } from "@dxos/echo";
|
|
1171
1165
|
import { log as log3 } from "@dxos/log";
|
|
1172
1166
|
import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
1173
1167
|
import { useClient as useClient6 } from "@dxos/react-client";
|
|
1174
1168
|
import { SpaceState } from "@dxos/react-client/echo";
|
|
1175
1169
|
import { Button as Button5, Input as Input5, useFileDownload, useMulticastObservable, useTranslation as useTranslation14 } from "@dxos/react-ui";
|
|
1176
|
-
import {
|
|
1177
|
-
import { Layout as Layout3 } from "@dxos/react-ui-mosaic";
|
|
1170
|
+
import { Form as Form3, Settings as Settings4 } from "@dxos/react-ui-form";
|
|
1178
1171
|
import { HuePicker, IconPicker } from "@dxos/react-ui-pickers";
|
|
1179
1172
|
var __dxlog_file4 = "/__w/dxos/dxos/packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsContainer.tsx";
|
|
1180
1173
|
var SpaceFormSchema = SpaceForm.pipe(Schema.extend(Schema.Struct({
|
|
@@ -1182,7 +1175,7 @@ var SpaceFormSchema = SpaceForm.pipe(Schema.extend(Schema.Struct({
|
|
|
1182
1175
|
title: "Archive Space"
|
|
1183
1176
|
})
|
|
1184
1177
|
})));
|
|
1185
|
-
var SpaceSettingsContainer =
|
|
1178
|
+
var SpaceSettingsContainer = ({ space }) => {
|
|
1186
1179
|
const { t } = useTranslation14(meta.id);
|
|
1187
1180
|
const { invokePromise } = useOperationInvoker9();
|
|
1188
1181
|
const client = useClient6();
|
|
@@ -1193,7 +1186,7 @@ var SpaceSettingsContainer = /* @__PURE__ */ forwardRef2(({ space }, forwardedRe
|
|
|
1193
1186
|
await space?.internal.setEdgeReplicationPreference(next ? EdgeReplicationSetting.ENABLED : EdgeReplicationSetting.DISABLED).catch((err) => {
|
|
1194
1187
|
log3.catch(err, void 0, {
|
|
1195
1188
|
F: __dxlog_file4,
|
|
1196
|
-
L:
|
|
1189
|
+
L: 49,
|
|
1197
1190
|
S: void 0,
|
|
1198
1191
|
C: (f, a) => f(...a)
|
|
1199
1192
|
});
|
|
@@ -1202,42 +1195,44 @@ var SpaceSettingsContainer = /* @__PURE__ */ forwardRef2(({ space }, forwardedRe
|
|
|
1202
1195
|
}, [
|
|
1203
1196
|
space
|
|
1204
1197
|
]);
|
|
1205
|
-
const
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
if (
|
|
1198
|
+
const handleValuesChanged = useCallback10((newValues, meta2) => {
|
|
1199
|
+
const changed = meta2.changed ?? {};
|
|
1200
|
+
if (changed["edgeReplication"]) {
|
|
1201
|
+
void toggleEdgeReplication(newValues.edgeReplication ?? false);
|
|
1202
|
+
}
|
|
1203
|
+
if (changed["name"] || changed["icon"] || changed["hue"]) {
|
|
1211
1204
|
Obj8.change(space.properties, (p) => {
|
|
1212
|
-
if (
|
|
1213
|
-
p.name =
|
|
1205
|
+
if (changed["name"] && newValues.name !== void 0) {
|
|
1206
|
+
p.name = newValues.name;
|
|
1214
1207
|
}
|
|
1215
|
-
if (
|
|
1216
|
-
p.icon =
|
|
1208
|
+
if (changed["icon"]) {
|
|
1209
|
+
p.icon = newValues.icon;
|
|
1217
1210
|
}
|
|
1218
|
-
if (
|
|
1219
|
-
p.hue =
|
|
1211
|
+
if (changed["hue"]) {
|
|
1212
|
+
p.hue = newValues.hue;
|
|
1220
1213
|
}
|
|
1221
1214
|
});
|
|
1222
1215
|
}
|
|
1223
|
-
if (
|
|
1224
|
-
|
|
1225
|
-
|
|
1216
|
+
if (changed["archived"]) {
|
|
1217
|
+
if (newValues.archived && !archived) {
|
|
1218
|
+
void invokePromise(SpaceOperation.Close, {
|
|
1226
1219
|
space
|
|
1227
1220
|
});
|
|
1228
|
-
|
|
1221
|
+
void invokePromise(LayoutOperation7.SwitchWorkspace, {
|
|
1229
1222
|
subject: client.spaces.default.id
|
|
1230
1223
|
});
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
}
|
|
1224
|
+
} else if (!newValues.archived && archived) {
|
|
1225
|
+
void invokePromise(SpaceOperation.Open, {
|
|
1226
|
+
space
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1236
1229
|
}
|
|
1237
1230
|
}, [
|
|
1238
1231
|
space,
|
|
1239
|
-
|
|
1240
|
-
archived
|
|
1232
|
+
client,
|
|
1233
|
+
archived,
|
|
1234
|
+
invokePromise,
|
|
1235
|
+
toggleEdgeReplication
|
|
1241
1236
|
]);
|
|
1242
1237
|
const values = useMemo4(() => ({
|
|
1243
1238
|
name: space.properties.name,
|
|
@@ -1258,7 +1253,7 @@ var SpaceSettingsContainer = /* @__PURE__ */ forwardRef2(({ space }, forwardedRe
|
|
|
1258
1253
|
onValueChange,
|
|
1259
1254
|
type
|
|
1260
1255
|
]);
|
|
1261
|
-
return /* @__PURE__ */ React14.createElement(
|
|
1256
|
+
return /* @__PURE__ */ React14.createElement(Settings4.ItemInput, {
|
|
1262
1257
|
title: label,
|
|
1263
1258
|
description: t("display name description")
|
|
1264
1259
|
}, /* @__PURE__ */ React14.createElement(Input5.TextInput, {
|
|
@@ -1277,7 +1272,7 @@ var SpaceSettingsContainer = /* @__PURE__ */ forwardRef2(({ space }, forwardedRe
|
|
|
1277
1272
|
onValueChange,
|
|
1278
1273
|
type
|
|
1279
1274
|
]);
|
|
1280
|
-
return /* @__PURE__ */ React14.createElement(
|
|
1275
|
+
return /* @__PURE__ */ React14.createElement(Settings4.Item, {
|
|
1281
1276
|
title: label,
|
|
1282
1277
|
description: t("icon description")
|
|
1283
1278
|
}, /* @__PURE__ */ React14.createElement(IconPicker, {
|
|
@@ -1296,7 +1291,7 @@ var SpaceSettingsContainer = /* @__PURE__ */ forwardRef2(({ space }, forwardedRe
|
|
|
1296
1291
|
onValueChange,
|
|
1297
1292
|
type
|
|
1298
1293
|
]);
|
|
1299
|
-
return /* @__PURE__ */ React14.createElement(
|
|
1294
|
+
return /* @__PURE__ */ React14.createElement(Settings4.Item, {
|
|
1300
1295
|
title: label,
|
|
1301
1296
|
description: t("hue description")
|
|
1302
1297
|
}, /* @__PURE__ */ React14.createElement(HuePicker, {
|
|
@@ -1311,7 +1306,7 @@ var SpaceSettingsContainer = /* @__PURE__ */ forwardRef2(({ space }, forwardedRe
|
|
|
1311
1306
|
onValueChange,
|
|
1312
1307
|
type
|
|
1313
1308
|
]);
|
|
1314
|
-
return /* @__PURE__ */ React14.createElement(
|
|
1309
|
+
return /* @__PURE__ */ React14.createElement(Settings4.ItemInput, {
|
|
1315
1310
|
title: label,
|
|
1316
1311
|
description: t("edge replication description")
|
|
1317
1312
|
}, /* @__PURE__ */ React14.createElement(Input5.Switch, {
|
|
@@ -1326,7 +1321,7 @@ var SpaceSettingsContainer = /* @__PURE__ */ forwardRef2(({ space }, forwardedRe
|
|
|
1326
1321
|
type,
|
|
1327
1322
|
getValue
|
|
1328
1323
|
]);
|
|
1329
|
-
return /* @__PURE__ */ React14.createElement(
|
|
1324
|
+
return /* @__PURE__ */ React14.createElement(Settings4.ItemInput, {
|
|
1330
1325
|
title: label,
|
|
1331
1326
|
description: t("archive space description")
|
|
1332
1327
|
}, /* @__PURE__ */ React14.createElement(Button5, {
|
|
@@ -1337,7 +1332,8 @@ var SpaceSettingsContainer = /* @__PURE__ */ forwardRef2(({ space }, forwardedRe
|
|
|
1337
1332
|
}
|
|
1338
1333
|
}), [
|
|
1339
1334
|
t,
|
|
1340
|
-
space
|
|
1335
|
+
space,
|
|
1336
|
+
client
|
|
1341
1337
|
]);
|
|
1342
1338
|
const download = useFileDownload();
|
|
1343
1339
|
const handleBackup = useCallback10(async () => {
|
|
@@ -1360,10 +1356,7 @@ var SpaceSettingsContainer = /* @__PURE__ */ forwardRef2(({ space }, forwardedRe
|
|
|
1360
1356
|
space,
|
|
1361
1357
|
repairs
|
|
1362
1358
|
]);
|
|
1363
|
-
return /* @__PURE__ */ React14.createElement(
|
|
1364
|
-
scrollable: true,
|
|
1365
|
-
ref: forwardedRef
|
|
1366
|
-
}, /* @__PURE__ */ React14.createElement(ControlPage4, null, /* @__PURE__ */ React14.createElement(ControlSection4, {
|
|
1359
|
+
return /* @__PURE__ */ React14.createElement(Settings4.Root, null, /* @__PURE__ */ React14.createElement(Settings4.Section, {
|
|
1367
1360
|
title: t("space properties settings verbose label"),
|
|
1368
1361
|
description: t("space properties settings description", {
|
|
1369
1362
|
ns: meta.id
|
|
@@ -1372,32 +1365,30 @@ var SpaceSettingsContainer = /* @__PURE__ */ forwardRef2(({ space }, forwardedRe
|
|
|
1372
1365
|
fieldMap,
|
|
1373
1366
|
schema: SpaceFormSchema,
|
|
1374
1367
|
values,
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1368
|
+
onValuesChanged: handleValuesChanged
|
|
1369
|
+
}, /* @__PURE__ */ React14.createElement(Form3.FieldSet, {
|
|
1370
|
+
classNames: "space-y-trimMd"
|
|
1371
|
+
}))), /* @__PURE__ */ React14.createElement(Settings4.Section, {
|
|
1378
1372
|
title: t("space controls title"),
|
|
1379
1373
|
description: t("space controls description")
|
|
1380
|
-
}, /* @__PURE__ */ React14.createElement(
|
|
1381
|
-
role: "none",
|
|
1382
|
-
className: "container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]"
|
|
1383
|
-
}, /* @__PURE__ */ React14.createElement(ControlItemInput3, {
|
|
1374
|
+
}, /* @__PURE__ */ React14.createElement(Settings4.ItemInput, {
|
|
1384
1375
|
title: t("backup space title"),
|
|
1385
1376
|
description: t("backup space description")
|
|
1386
1377
|
}, /* @__PURE__ */ React14.createElement(Button5, {
|
|
1387
1378
|
onClick: handleBackup
|
|
1388
|
-
}, t("download backup label"))), /* @__PURE__ */ React14.createElement(
|
|
1379
|
+
}, t("download backup label"))), /* @__PURE__ */ React14.createElement(Settings4.ItemInput, {
|
|
1389
1380
|
title: t("repair space title"),
|
|
1390
1381
|
description: t("repair space description")
|
|
1391
1382
|
}, /* @__PURE__ */ React14.createElement(Button5, {
|
|
1392
1383
|
onClick: handleRepair
|
|
1393
|
-
}, t("repair space label")))))
|
|
1394
|
-
}
|
|
1384
|
+
}, t("repair space label")))));
|
|
1385
|
+
};
|
|
1395
1386
|
SpaceSettingsContainer.displayName = "SpaceSettingsContainer";
|
|
1396
1387
|
|
|
1397
1388
|
// src/components/SyncStatus/InlineSyncStatus.tsx
|
|
1398
1389
|
import * as Option3 from "effect/Option";
|
|
1399
1390
|
import React15, { useEffect as useEffect4, useState as useState9 } from "react";
|
|
1400
|
-
import { useAppGraph as useAppGraph3 } from "@dxos/app-
|
|
1391
|
+
import { useAppGraph as useAppGraph3 } from "@dxos/app-toolkit/ui";
|
|
1401
1392
|
import { EdgeStatus } from "@dxos/protocols/proto/dxos/client/services";
|
|
1402
1393
|
import { EdgeReplicationSetting as EdgeReplicationSetting2 } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
1403
1394
|
import { useClient as useClient7 } from "@dxos/react-client";
|
|
@@ -1450,7 +1441,7 @@ import { useClient as useClient8 } from "@dxos/react-client";
|
|
|
1450
1441
|
import { useStream } from "@dxos/react-client/devtools";
|
|
1451
1442
|
import { getSyncSummary, useSyncState } from "@dxos/react-client/echo";
|
|
1452
1443
|
import { Icon as Icon4, Popover as Popover3, useTranslation as useTranslation16 } from "@dxos/react-ui";
|
|
1453
|
-
import { mx } from "@dxos/ui-theme";
|
|
1444
|
+
import { mx as mx2 } from "@dxos/ui-theme";
|
|
1454
1445
|
import { Unit } from "@dxos/util";
|
|
1455
1446
|
|
|
1456
1447
|
// src/components/SyncStatus/save-tracker.ts
|
|
@@ -1609,7 +1600,7 @@ var EdgeConnectionPopover = () => {
|
|
|
1609
1600
|
className: "flex items-center gap-2 mbe-2"
|
|
1610
1601
|
}, /* @__PURE__ */ React16.createElement(Icon4, {
|
|
1611
1602
|
icon: isConnected ? "ph--check-circle--regular" : "ph--warning-circle--regular",
|
|
1612
|
-
classNames:
|
|
1603
|
+
classNames: mx2(isConnected ? "text-successText" : "text-errorText animate-pulse")
|
|
1613
1604
|
}), /* @__PURE__ */ React16.createElement("span", {
|
|
1614
1605
|
className: "font-medium text-sm"
|
|
1615
1606
|
}, isConnected ? t("sync edge connected label") : t("sync edge disconnected label"))), status?.state === EdgeStatus2.ConnectionState.NOT_CONNECTED && /* @__PURE__ */ React16.createElement("div", {
|
|
@@ -1759,7 +1750,7 @@ var getQueryTarget = (query, space) => {
|
|
|
1759
1750
|
// src/components/ViewEditor.tsx
|
|
1760
1751
|
import * as Schema2 from "effect/Schema";
|
|
1761
1752
|
import React17, { useCallback as useCallback11, useState as useState11 } from "react";
|
|
1762
|
-
import { useOperationInvoker as useOperationInvoker10 } from "@dxos/app-framework/
|
|
1753
|
+
import { useOperationInvoker as useOperationInvoker10 } from "@dxos/app-framework/ui";
|
|
1763
1754
|
import { DXN as DXN2, Filter as Filter3, Obj as Obj9, Query as Query2, Tag, Type as Type2 } from "@dxos/echo";
|
|
1764
1755
|
import { useClient as useClient9 } from "@dxos/react-client";
|
|
1765
1756
|
import { getSpace as getSpace2, useQuery as useQuery2 } from "@dxos/react-client/echo";
|
|
@@ -1856,10 +1847,10 @@ var ViewEditor = ({ view }) => {
|
|
|
1856
1847
|
|
|
1857
1848
|
// src/components/index.ts
|
|
1858
1849
|
import { lazy } from "react";
|
|
1859
|
-
var CollectionArticle = lazy(() => import("./CollectionArticle-
|
|
1860
|
-
var ObjectCardStack = lazy(() => import("./ObjectCardStack-
|
|
1861
|
-
var ObjectDetails = lazy(() => import("./ObjectDetails-
|
|
1862
|
-
var RecordArticle = lazy(() => import("./RecordArticle-
|
|
1850
|
+
var CollectionArticle = lazy(() => import("./CollectionArticle-ONQMZ7BQ.mjs"));
|
|
1851
|
+
var ObjectCardStack = lazy(() => import("./ObjectCardStack-EHXPNRQW.mjs"));
|
|
1852
|
+
var ObjectDetails = lazy(() => import("./ObjectDetails-N73UI4ZL.mjs"));
|
|
1853
|
+
var RecordArticle = lazy(() => import("./RecordArticle-CMEXNNOZ.mjs"));
|
|
1863
1854
|
|
|
1864
1855
|
export {
|
|
1865
1856
|
AwaitingObject,
|
|
@@ -1896,4 +1887,4 @@ export {
|
|
|
1896
1887
|
ObjectDetails,
|
|
1897
1888
|
RecordArticle
|
|
1898
1889
|
};
|
|
1899
|
-
//# sourceMappingURL=chunk-
|
|
1890
|
+
//# sourceMappingURL=chunk-QDIOQTXY.mjs.map
|