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