@dxos/plugin-space 0.8.2-main.12df754 → 0.8.2-main.36232bc
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/{app-graph-builder-J4PN5HOM.mjs → app-graph-builder-ZWNOWRAX.mjs} +6 -6
- package/dist/lib/browser/{app-graph-builder-J4PN5HOM.mjs.map → app-graph-builder-ZWNOWRAX.mjs.map} +3 -3
- package/dist/lib/browser/{app-graph-serializer-6WIAFHYK.mjs → app-graph-serializer-UUJH7JRN.mjs} +4 -4
- package/dist/lib/browser/{chunk-MHTZAZT2.mjs → chunk-3KG2VMQL.mjs} +118 -130
- package/dist/lib/browser/chunk-3KG2VMQL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-MIJHUABE.mjs → chunk-DIJ7LMCS.mjs} +2 -2
- package/dist/lib/browser/{chunk-FSHDAPFY.mjs → chunk-JS6ZV4GV.mjs} +2 -2
- package/dist/lib/browser/{chunk-KDNV4YRD.mjs → chunk-O7WGQVLQ.mjs} +25 -2
- package/dist/lib/browser/chunk-O7WGQVLQ.mjs.map +7 -0
- package/dist/lib/browser/{identity-created-DVHNLGYU.mjs → identity-created-NRVE4XLL.mjs} +2 -2
- package/dist/lib/browser/index.mjs +5 -8
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/{intent-resolver-72IWBVYE.mjs → intent-resolver-U3UVTHQV.mjs} +76 -69
- package/dist/lib/browser/intent-resolver-U3UVTHQV.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-DRVM5ACV.mjs → react-root-63ZJ5IR6.mjs} +4 -4
- package/dist/lib/browser/{react-surface-KODNQYDN.mjs → react-surface-2OFMYE6E.mjs} +5 -22
- package/dist/lib/browser/react-surface-2OFMYE6E.mjs.map +7 -0
- package/dist/lib/browser/{settings-2UIV5WX5.mjs → settings-MVT32NP6.mjs} +2 -2
- package/dist/lib/browser/{spaces-ready-3URIMLCR.mjs → spaces-ready-ERNSICUW.mjs} +3 -3
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/{app-graph-builder-3BNPC5GB.cjs → app-graph-builder-LLIV422L.cjs} +34 -34
- package/dist/lib/node/{app-graph-builder-3BNPC5GB.cjs.map → app-graph-builder-LLIV422L.cjs.map} +3 -3
- package/dist/lib/node/{app-graph-serializer-GOLCQHFQ.cjs → app-graph-serializer-M6Z2OPA4.cjs} +20 -20
- package/dist/lib/node/{chunk-3UKLWXNJ.cjs → chunk-EQ5BPSQ7.cjs} +28 -5
- package/dist/lib/node/chunk-EQ5BPSQ7.cjs.map +7 -0
- package/dist/lib/node/{chunk-GPZPEQXP.cjs → chunk-M7N2NCC4.cjs} +166 -178
- package/dist/lib/node/chunk-M7N2NCC4.cjs.map +7 -0
- package/dist/lib/node/{chunk-EI3ZPOLJ.cjs → chunk-UOCR4G2D.cjs} +6 -6
- package/dist/lib/node/{chunk-U63V2254.cjs → chunk-XADZLQAJ.cjs} +27 -27
- package/dist/lib/node/{identity-created-YYTW4K3Z.cjs → identity-created-YDTRMOMX.cjs} +6 -6
- package/dist/lib/node/index.cjs +63 -66
- package/dist/lib/node/index.cjs.map +2 -2
- package/dist/lib/node/{intent-resolver-KA56XGUX.cjs → intent-resolver-4JWTDB67.cjs} +122 -115
- package/dist/lib/node/intent-resolver-4JWTDB67.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-root-6WGN5WRQ.cjs → react-root-6T2UE4MX.cjs} +8 -8
- package/dist/lib/node/{react-surface-37AVZFPL.cjs → react-surface-6W7WFRBS.cjs} +44 -61
- package/dist/lib/node/react-surface-6W7WFRBS.cjs.map +7 -0
- package/dist/lib/node/{settings-HJROTHC4.cjs → settings-JLV7YT6Q.cjs} +6 -6
- package/dist/lib/node/{spaces-ready-IWDDIAAD.cjs → spaces-ready-6EBR4SM4.cjs} +11 -11
- package/dist/lib/node/types/index.cjs +15 -15
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{app-graph-builder-OVMSUAX3.mjs → app-graph-builder-HSGLCS76.mjs} +6 -6
- package/dist/lib/node-esm/{app-graph-builder-OVMSUAX3.mjs.map → app-graph-builder-HSGLCS76.mjs.map} +3 -3
- package/dist/lib/node-esm/{app-graph-serializer-AZXSO7HK.mjs → app-graph-serializer-J3B4WSXU.mjs} +4 -4
- package/dist/lib/node-esm/{chunk-TVN6VHTT.mjs → chunk-ABTVMAG5.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-35OHQARN.mjs → chunk-FJPCLEKN.mjs} +25 -2
- package/dist/lib/node-esm/chunk-FJPCLEKN.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-DUA32XUX.mjs → chunk-OLISVDCF.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-ABKX22IP.mjs → chunk-RM7ZVPKM.mjs} +118 -130
- package/dist/lib/node-esm/chunk-RM7ZVPKM.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-MP4GLXHO.mjs → identity-created-EC6SVYB5.mjs} +2 -2
- package/dist/lib/node-esm/index.mjs +5 -8
- package/dist/lib/node-esm/index.mjs.map +2 -2
- package/dist/lib/node-esm/{intent-resolver-SG2ECM5R.mjs → intent-resolver-5PUGNEOK.mjs} +76 -69
- package/dist/lib/node-esm/intent-resolver-5PUGNEOK.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-MSUT6S2S.mjs → react-root-YQKCDI3P.mjs} +4 -4
- package/dist/lib/node-esm/{react-surface-G73SO23W.mjs → react-surface-UK2HIELM.mjs} +5 -22
- package/dist/lib/node-esm/react-surface-UK2HIELM.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-KCLKPJVY.mjs → settings-AILIMHTE.mjs} +2 -2
- package/dist/lib/node-esm/{spaces-ready-Z3SXKWX2.mjs → spaces-ready-5PXESKHX.mjs} +3 -3
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/CollectionMain.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/types/thread.d.ts +241 -17
- package/dist/types/src/types/thread.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +28 -1
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/package.json +44 -44
- package/src/SpacePlugin.tsx +1 -1
- package/src/capabilities/app-graph-builder.ts +3 -3
- package/src/capabilities/intent-resolver.ts +65 -68
- package/src/capabilities/react-surface.tsx +2 -15
- package/src/components/CollectionMain.tsx +2 -5
- package/src/components/MembersContainer.tsx +23 -15
- package/src/components/PopoverAddSpace.tsx +1 -1
- package/src/components/PopoverRenameObject.tsx +12 -6
- package/src/components/index.ts +0 -1
- package/src/types/types.ts +22 -1
- package/dist/lib/browser/chunk-KDNV4YRD.mjs.map +0 -7
- package/dist/lib/browser/chunk-MHTZAZT2.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-72IWBVYE.mjs.map +0 -7
- package/dist/lib/browser/react-surface-KODNQYDN.mjs.map +0 -7
- package/dist/lib/node/chunk-3UKLWXNJ.cjs.map +0 -7
- package/dist/lib/node/chunk-GPZPEQXP.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-KA56XGUX.cjs.map +0 -7
- package/dist/lib/node/react-surface-37AVZFPL.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-35OHQARN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ABKX22IP.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-SG2ECM5R.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-G73SO23W.mjs.map +0 -7
- package/dist/types/src/components/ShareSpaceButton.d.ts +0 -9
- package/dist/types/src/components/ShareSpaceButton.d.ts.map +0 -1
- package/dist/types/src/components/ShareSpaceButton.stories.d.ts +0 -10
- package/dist/types/src/components/ShareSpaceButton.stories.d.ts.map +0 -1
- package/src/components/ShareSpaceButton.stories.tsx +0 -27
- package/src/components/ShareSpaceButton.tsx +0 -32
- /package/dist/lib/browser/{app-graph-serializer-6WIAFHYK.mjs.map → app-graph-serializer-UUJH7JRN.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-MIJHUABE.mjs.map → chunk-DIJ7LMCS.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-FSHDAPFY.mjs.map → chunk-JS6ZV4GV.mjs.map} +0 -0
- /package/dist/lib/browser/{identity-created-DVHNLGYU.mjs.map → identity-created-NRVE4XLL.mjs.map} +0 -0
- /package/dist/lib/browser/{react-root-DRVM5ACV.mjs.map → react-root-63ZJ5IR6.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-2UIV5WX5.mjs.map → settings-MVT32NP6.mjs.map} +0 -0
- /package/dist/lib/browser/{spaces-ready-3URIMLCR.mjs.map → spaces-ready-ERNSICUW.mjs.map} +0 -0
- /package/dist/lib/node/{app-graph-serializer-GOLCQHFQ.cjs.map → app-graph-serializer-M6Z2OPA4.cjs.map} +0 -0
- /package/dist/lib/node/{chunk-EI3ZPOLJ.cjs.map → chunk-UOCR4G2D.cjs.map} +0 -0
- /package/dist/lib/node/{chunk-U63V2254.cjs.map → chunk-XADZLQAJ.cjs.map} +0 -0
- /package/dist/lib/node/{identity-created-YYTW4K3Z.cjs.map → identity-created-YDTRMOMX.cjs.map} +0 -0
- /package/dist/lib/node/{react-root-6WGN5WRQ.cjs.map → react-root-6T2UE4MX.cjs.map} +0 -0
- /package/dist/lib/node/{settings-HJROTHC4.cjs.map → settings-JLV7YT6Q.cjs.map} +0 -0
- /package/dist/lib/node/{spaces-ready-IWDDIAAD.cjs.map → spaces-ready-6EBR4SM4.cjs.map} +0 -0
- /package/dist/lib/node-esm/{app-graph-serializer-AZXSO7HK.mjs.map → app-graph-serializer-J3B4WSXU.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-TVN6VHTT.mjs.map → chunk-ABTVMAG5.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-DUA32XUX.mjs.map → chunk-OLISVDCF.mjs.map} +0 -0
- /package/dist/lib/node-esm/{identity-created-MP4GLXHO.mjs.map → identity-created-EC6SVYB5.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-root-MSUT6S2S.mjs.map → react-root-YQKCDI3P.mjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-KCLKPJVY.mjs.map → settings-AILIMHTE.mjs.map} +0 -0
- /package/dist/lib/node-esm/{spaces-ready-Z3SXKWX2.mjs.map → spaces-ready-5PXESKHX.mjs.map} +0 -0
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
COMPOSER_SPACE_LOCK,
|
|
6
6
|
getSpaceDisplayName
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JS6ZV4GV.mjs";
|
|
8
8
|
import {
|
|
9
9
|
CollectionType,
|
|
10
10
|
SpaceAction,
|
|
11
11
|
SpaceForm
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-O7WGQVLQ.mjs";
|
|
13
13
|
import {
|
|
14
14
|
SPACE_PLUGIN,
|
|
15
15
|
meta
|
|
@@ -339,17 +339,17 @@ var SelectSchema = ({ options, resolve, onChange }) => {
|
|
|
339
339
|
|
|
340
340
|
// packages/plugins/plugin-space/src/capabilities/index.ts
|
|
341
341
|
import { lazy } from "@dxos/app-framework";
|
|
342
|
-
var AppGraphBuilder = lazy(() => import("./app-graph-builder-
|
|
343
|
-
var AppGraphSerializer = lazy(() => import("./app-graph-serializer-
|
|
344
|
-
var IdentityCreated = lazy(() => import("./identity-created-
|
|
345
|
-
var IntentResolver = lazy(() => import("./intent-resolver-
|
|
346
|
-
var ReactRoot = lazy(() => import("./react-root-
|
|
347
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
342
|
+
var AppGraphBuilder = lazy(() => import("./app-graph-builder-ZWNOWRAX.mjs"));
|
|
343
|
+
var AppGraphSerializer = lazy(() => import("./app-graph-serializer-UUJH7JRN.mjs"));
|
|
344
|
+
var IdentityCreated = lazy(() => import("./identity-created-NRVE4XLL.mjs"));
|
|
345
|
+
var IntentResolver = lazy(() => import("./intent-resolver-U3UVTHQV.mjs"));
|
|
346
|
+
var ReactRoot = lazy(() => import("./react-root-63ZJ5IR6.mjs"));
|
|
347
|
+
var ReactSurface = lazy(() => import("./react-surface-2OFMYE6E.mjs"));
|
|
348
348
|
var Schema = lazy(() => import("./schema-FHTA26SW.mjs"));
|
|
349
349
|
var Tools = lazy(() => import("./schema-tools-YAXPRIXP.mjs"));
|
|
350
|
-
var SpaceSettings = lazy(() => import("./settings-
|
|
350
|
+
var SpaceSettings = lazy(() => import("./settings-MVT32NP6.mjs"));
|
|
351
351
|
var SpaceState = lazy(() => import("./state-CYV6QCTN.mjs"));
|
|
352
|
-
var SpacesReady = lazy(() => import("./spaces-ready-
|
|
352
|
+
var SpacesReady = lazy(() => import("./spaces-ready-ERNSICUW.mjs"));
|
|
353
353
|
|
|
354
354
|
// packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx
|
|
355
355
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx";
|
|
@@ -500,7 +500,7 @@ var CreateSpaceDialog = () => {
|
|
|
500
500
|
// packages/plugins/plugin-space/src/components/CollectionMain.tsx
|
|
501
501
|
import React6 from "react";
|
|
502
502
|
import { useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
503
|
-
import { baseSurface,
|
|
503
|
+
import { baseSurface, descriptionMessage, mx as mx3 } from "@dxos/react-ui-theme";
|
|
504
504
|
var CollectionMain = ({ collection }) => {
|
|
505
505
|
const { t } = useTranslation5(SPACE_PLUGIN);
|
|
506
506
|
return /* @__PURE__ */ React6.createElement("div", {
|
|
@@ -509,7 +509,7 @@ var CollectionMain = ({ collection }) => {
|
|
|
509
509
|
"data-testid": "composer.firstRunMessage"
|
|
510
510
|
}, /* @__PURE__ */ React6.createElement("p", {
|
|
511
511
|
role: "alert",
|
|
512
|
-
className: mx3(
|
|
512
|
+
className: mx3(descriptionMessage, "rounded-lg p-8 font-normal text-lg max-is-[24rem] break-words")
|
|
513
513
|
}, collection.name ?? t("unnamed collection label")));
|
|
514
514
|
};
|
|
515
515
|
|
|
@@ -639,6 +639,7 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
|
639
639
|
import { Check, X } from "@phosphor-icons/react";
|
|
640
640
|
import React9, { useCallback as useCallback7, useMemo, useState as useState4 } from "react";
|
|
641
641
|
import { QR } from "react-qr-rounded";
|
|
642
|
+
import { createIntent as createIntent5, useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework";
|
|
642
643
|
import { log } from "@dxos/log";
|
|
643
644
|
import { useConfig } from "@dxos/react-client";
|
|
644
645
|
import { fullyQualifiedId as fullyQualifiedId2, useSpaceInvitations } from "@dxos/react-client/echo";
|
|
@@ -659,7 +660,7 @@ var handleInvitationEvent = (invitation, subscription) => {
|
|
|
659
660
|
authCode: invitation.authCode
|
|
660
661
|
}), void 0, {
|
|
661
662
|
F: __dxlog_file3,
|
|
662
|
-
L:
|
|
663
|
+
L: 40,
|
|
663
664
|
S: void 0,
|
|
664
665
|
C: (f, a) => f(...a)
|
|
665
666
|
});
|
|
@@ -669,6 +670,7 @@ var handleInvitationEvent = (invitation, subscription) => {
|
|
|
669
670
|
var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
670
671
|
const { t } = useTranslation8(SPACE_PLUGIN);
|
|
671
672
|
const config = useConfig();
|
|
673
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher5();
|
|
672
674
|
const invitations = useSpaceInvitations(space.key);
|
|
673
675
|
const visibleInvitations = invitations?.filter((invitation) => ![
|
|
674
676
|
Invitation.State.CANCELLED
|
|
@@ -699,13 +701,14 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
699
701
|
size: 5
|
|
700
702
|
}),
|
|
701
703
|
testId: "membersContainer.inviteOne",
|
|
702
|
-
onClick: () => {
|
|
703
|
-
const invitation =
|
|
704
|
+
onClick: async () => {
|
|
705
|
+
const { data: invitation } = await dispatch(createIntent5(SpaceAction.Share, {
|
|
706
|
+
space,
|
|
704
707
|
type: Invitation.Type.INTERACTIVE,
|
|
705
708
|
authMethod: Invitation.AuthMethod.SHARED_SECRET,
|
|
706
709
|
multiUse: false,
|
|
707
710
|
target: target && fullyQualifiedId2(target)
|
|
708
|
-
});
|
|
711
|
+
}));
|
|
709
712
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
|
|
710
713
|
const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
|
|
711
714
|
}
|
|
@@ -723,13 +726,14 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
723
726
|
size: 5
|
|
724
727
|
}),
|
|
725
728
|
testId: "membersContainer.inviteMany",
|
|
726
|
-
onClick: () => {
|
|
727
|
-
const invitation =
|
|
729
|
+
onClick: async () => {
|
|
730
|
+
const { data: invitation } = await dispatch(createIntent5(SpaceAction.Share, {
|
|
731
|
+
space,
|
|
728
732
|
type: Invitation.Type.DELEGATED,
|
|
729
733
|
authMethod: Invitation.AuthMethod.KNOWN_PUBLIC_KEY,
|
|
730
734
|
multiUse: true,
|
|
731
735
|
target: target && fullyQualifiedId2(target)
|
|
732
|
-
});
|
|
736
|
+
}));
|
|
733
737
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
|
|
734
738
|
const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
|
|
735
739
|
}
|
|
@@ -1109,22 +1113,22 @@ var PersistenceStatus = ({ db }) => {
|
|
|
1109
1113
|
|
|
1110
1114
|
// packages/plugins/plugin-space/src/components/PopoverAddSpace.tsx
|
|
1111
1115
|
import React16 from "react";
|
|
1112
|
-
import { createIntent as
|
|
1116
|
+
import { createIntent as createIntent6, LayoutAction as LayoutAction5, useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework";
|
|
1113
1117
|
import { IconButton as IconButton3, useTranslation as useTranslation14 } from "@dxos/react-ui";
|
|
1114
1118
|
var POPOVER_ADD_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
|
|
1115
1119
|
var PopoverAddSpace = () => {
|
|
1116
1120
|
const { t } = useTranslation14(SPACE_PLUGIN);
|
|
1117
|
-
const { dispatchPromise: dispatch } =
|
|
1121
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher6();
|
|
1118
1122
|
return /* @__PURE__ */ React16.createElement("div", {
|
|
1119
1123
|
role: "none",
|
|
1120
|
-
className: "grid grid-cols-1 gap-1 [&>button]:justify-start"
|
|
1124
|
+
className: "p-1 grid grid-cols-1 gap-1 [&>button]:justify-start"
|
|
1121
1125
|
}, /* @__PURE__ */ React16.createElement(IconButton3, {
|
|
1122
1126
|
variant: "ghost",
|
|
1123
1127
|
label: t("create space label"),
|
|
1124
1128
|
icon: "ph--plus--regular",
|
|
1125
1129
|
onClick: () => {
|
|
1126
|
-
void dispatch(
|
|
1127
|
-
void dispatch(
|
|
1130
|
+
void dispatch(createIntent6(SpaceAction.OpenCreateSpace));
|
|
1131
|
+
void dispatch(createIntent6(LayoutAction5.UpdatePopover, {
|
|
1128
1132
|
part: "popover",
|
|
1129
1133
|
options: {
|
|
1130
1134
|
variant: "react",
|
|
@@ -1139,8 +1143,8 @@ var PopoverAddSpace = () => {
|
|
|
1139
1143
|
label: t("join space label"),
|
|
1140
1144
|
icon: "ph--sign-in--regular",
|
|
1141
1145
|
onClick: () => {
|
|
1142
|
-
void dispatch(
|
|
1143
|
-
void dispatch(
|
|
1146
|
+
void dispatch(createIntent6(SpaceAction.Join));
|
|
1147
|
+
void dispatch(createIntent6(LayoutAction5.UpdatePopover, {
|
|
1144
1148
|
part: "popover",
|
|
1145
1149
|
options: {
|
|
1146
1150
|
variant: "react",
|
|
@@ -1155,8 +1159,9 @@ var PopoverAddSpace = () => {
|
|
|
1155
1159
|
|
|
1156
1160
|
// packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx
|
|
1157
1161
|
import React17, { useCallback as useCallback10, useRef as useRef4, useState as useState7 } from "react";
|
|
1162
|
+
import { createIntent as createIntent7, LayoutAction as LayoutAction6, useIntentDispatcher as useIntentDispatcher7 } from "@dxos/app-framework";
|
|
1158
1163
|
import { log as log2 } from "@dxos/log";
|
|
1159
|
-
import { Button as Button5, Input as Input3,
|
|
1164
|
+
import { Button as Button5, Input as Input3, useTranslation as useTranslation15 } from "@dxos/react-ui";
|
|
1160
1165
|
var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx";
|
|
1161
1166
|
var POPOVER_RENAME_OBJECT = `${SPACE_PLUGIN}/PopoverRenameObject`;
|
|
1162
1167
|
var PopoverRenameObject = ({ object: obj }) => {
|
|
@@ -1164,6 +1169,7 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
1164
1169
|
const doneButton = useRef4(null);
|
|
1165
1170
|
const object = obj;
|
|
1166
1171
|
const [name, setName] = useState7(object.name || object.title || "");
|
|
1172
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher7();
|
|
1167
1173
|
const handleDone = useCallback10(() => {
|
|
1168
1174
|
try {
|
|
1169
1175
|
object.name = name;
|
|
@@ -1175,12 +1181,20 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
1175
1181
|
err
|
|
1176
1182
|
}, {
|
|
1177
1183
|
F: __dxlog_file4,
|
|
1178
|
-
L:
|
|
1184
|
+
L: 32,
|
|
1179
1185
|
S: void 0,
|
|
1180
1186
|
C: (f, a) => f(...a)
|
|
1181
1187
|
});
|
|
1182
1188
|
}
|
|
1183
1189
|
}
|
|
1190
|
+
void dispatch(createIntent7(LayoutAction6.UpdatePopover, {
|
|
1191
|
+
part: "popover",
|
|
1192
|
+
options: {
|
|
1193
|
+
variant: "react",
|
|
1194
|
+
anchorId: "",
|
|
1195
|
+
state: false
|
|
1196
|
+
}
|
|
1197
|
+
}));
|
|
1184
1198
|
}, [
|
|
1185
1199
|
object,
|
|
1186
1200
|
name
|
|
@@ -1199,20 +1213,18 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
1199
1213
|
"data-testid": "spacePlugin.renameObject.input",
|
|
1200
1214
|
onChange: ({ target: { value } }) => setName(value),
|
|
1201
1215
|
onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
|
|
1202
|
-
}))), /* @__PURE__ */ React17.createElement(
|
|
1203
|
-
asChild: true
|
|
1204
|
-
}, /* @__PURE__ */ React17.createElement(Button5, {
|
|
1216
|
+
}))), /* @__PURE__ */ React17.createElement(Button5, {
|
|
1205
1217
|
ref: doneButton,
|
|
1206
1218
|
classNames: "self-stretch",
|
|
1207
1219
|
onClick: handleDone
|
|
1208
1220
|
}, t("done label", {
|
|
1209
1221
|
ns: "os"
|
|
1210
|
-
})))
|
|
1222
|
+
})));
|
|
1211
1223
|
};
|
|
1212
1224
|
|
|
1213
1225
|
// packages/plugins/plugin-space/src/components/PopoverRenameSpace.tsx
|
|
1214
1226
|
import React18, { useCallback as useCallback11, useRef as useRef5, useState as useState8 } from "react";
|
|
1215
|
-
import { Button as Button6, Input as Input4, Popover
|
|
1227
|
+
import { Button as Button6, Input as Input4, Popover, useTranslation as useTranslation16 } from "@dxos/react-ui";
|
|
1216
1228
|
var POPOVER_RENAME_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
|
|
1217
1229
|
var PopoverRenameSpace = ({ space }) => {
|
|
1218
1230
|
const { t } = useTranslation16(SPACE_PLUGIN);
|
|
@@ -1239,7 +1251,7 @@ var PopoverRenameSpace = ({ space }) => {
|
|
|
1239
1251
|
// TODO(wittjosiah): Ideally this should access the popover context to close the popover.
|
|
1240
1252
|
// Currently this is not possible because Radix does not expose the popover context.
|
|
1241
1253
|
onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
|
|
1242
|
-
}))), /* @__PURE__ */ React18.createElement(
|
|
1254
|
+
}))), /* @__PURE__ */ React18.createElement(Popover.Close, {
|
|
1243
1255
|
asChild: true
|
|
1244
1256
|
}, /* @__PURE__ */ React18.createElement(Button6, {
|
|
1245
1257
|
ref: doneButton,
|
|
@@ -1286,36 +1298,14 @@ var SchemaContainer = ({ space }) => {
|
|
|
1286
1298
|
}, /* @__PURE__ */ React19.createElement("div", null, schema.typename)))))));
|
|
1287
1299
|
};
|
|
1288
1300
|
|
|
1289
|
-
// packages/plugins/plugin-space/src/components/ShareSpaceButton.tsx
|
|
1290
|
-
import React20 from "react";
|
|
1291
|
-
import { createIntent as createIntent6, useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework";
|
|
1292
|
-
import { IconButton as IconButton4, useTranslation as useTranslation18 } from "@dxos/react-ui";
|
|
1293
|
-
var ShareSpaceButton = ({ space }) => {
|
|
1294
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher6();
|
|
1295
|
-
return /* @__PURE__ */ React20.createElement(ShareSpaceButtonImpl, {
|
|
1296
|
-
onClick: () => dispatch(createIntent6(SpaceAction.Share, {
|
|
1297
|
-
space
|
|
1298
|
-
}))
|
|
1299
|
-
});
|
|
1300
|
-
};
|
|
1301
|
-
var ShareSpaceButtonImpl = ({ onClick }) => {
|
|
1302
|
-
const { t } = useTranslation18(SPACE_PLUGIN);
|
|
1303
|
-
return /* @__PURE__ */ React20.createElement(IconButton4, {
|
|
1304
|
-
"data-testid": "spacePlugin.shareSpaceButton",
|
|
1305
|
-
icon: "ph--users--regular",
|
|
1306
|
-
label: t("share space label"),
|
|
1307
|
-
onClick
|
|
1308
|
-
});
|
|
1309
|
-
};
|
|
1310
|
-
|
|
1311
1301
|
// packages/plugins/plugin-space/src/components/SpacePresence.tsx
|
|
1312
|
-
import
|
|
1302
|
+
import React20, { forwardRef, useCallback as useCallback12, useEffect as useEffect5, useState as useState10 } from "react";
|
|
1313
1303
|
import { useAppGraph as useAppGraph2, useCapability } from "@dxos/app-framework";
|
|
1314
1304
|
import { generateName } from "@dxos/display-name";
|
|
1315
1305
|
import { PublicKey, useClient as useClient5 } from "@dxos/react-client";
|
|
1316
1306
|
import { getSpace as getSpace3, useMembers, fullyQualifiedId as fullyQualifiedId3 } from "@dxos/react-client/echo";
|
|
1317
1307
|
import { useIdentity } from "@dxos/react-client/halo";
|
|
1318
|
-
import { Avatar, Tooltip as Tooltip2, useTranslation as
|
|
1308
|
+
import { Avatar, Tooltip as Tooltip2, useTranslation as useTranslation18, List as List2, ListItem as ListItem2, useDefaultValue } from "@dxos/react-ui";
|
|
1319
1309
|
import { AttentionGlyph, useAttended, useAttention } from "@dxos/react-ui-attention";
|
|
1320
1310
|
import { ComplexMap, keyToFallback } from "@dxos/util";
|
|
1321
1311
|
var REFRESH_INTERVAL = 5e3;
|
|
@@ -1351,7 +1341,7 @@ var SpacePresence = ({ object, spaceKey }) => {
|
|
|
1351
1341
|
lastSeen
|
|
1352
1342
|
};
|
|
1353
1343
|
}).toSorted((a, b) => a.lastSeen - b.lastSeen);
|
|
1354
|
-
return /* @__PURE__ */
|
|
1344
|
+
return /* @__PURE__ */ React20.createElement(FullPresence, {
|
|
1355
1345
|
members: membersForObject
|
|
1356
1346
|
});
|
|
1357
1347
|
};
|
|
@@ -1361,40 +1351,40 @@ var FullPresence = (props) => {
|
|
|
1361
1351
|
if (members.length === 0) {
|
|
1362
1352
|
return null;
|
|
1363
1353
|
}
|
|
1364
|
-
return /* @__PURE__ */
|
|
1354
|
+
return /* @__PURE__ */ React20.createElement("div", {
|
|
1365
1355
|
className: "dx-avatar-group",
|
|
1366
1356
|
"data-testid": "spacePlugin.presence"
|
|
1367
|
-
}, members.slice(0, 3).map((member, i) => /* @__PURE__ */
|
|
1357
|
+
}, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React20.createElement(Tooltip2.Root, {
|
|
1368
1358
|
key: member.identity.identityKey.toHex()
|
|
1369
|
-
}, /* @__PURE__ */
|
|
1359
|
+
}, /* @__PURE__ */ React20.createElement(Tooltip2.Trigger, {
|
|
1370
1360
|
className: "grid focus:outline-none"
|
|
1371
|
-
}, /* @__PURE__ */
|
|
1361
|
+
}, /* @__PURE__ */ React20.createElement(PresenceAvatar, {
|
|
1372
1362
|
identity: member.identity,
|
|
1373
1363
|
match: member.currentlyAttended,
|
|
1374
1364
|
index: members.length - i,
|
|
1375
1365
|
onClick: () => onMemberClick?.(member),
|
|
1376
1366
|
size
|
|
1377
|
-
})), /* @__PURE__ */
|
|
1367
|
+
})), /* @__PURE__ */ React20.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React20.createElement(Tooltip2.Content, {
|
|
1378
1368
|
side: "bottom"
|
|
1379
|
-
}, /* @__PURE__ */
|
|
1369
|
+
}, /* @__PURE__ */ React20.createElement("span", null, getName(member.identity)), /* @__PURE__ */ React20.createElement(Tooltip2.Arrow, null))))), members.length > 3 && /* @__PURE__ */ React20.createElement(Tooltip2.Root, null, /* @__PURE__ */ React20.createElement(Tooltip2.Trigger, {
|
|
1380
1370
|
className: "grid focus:outline-none"
|
|
1381
|
-
}, /* @__PURE__ */
|
|
1371
|
+
}, /* @__PURE__ */ React20.createElement(Avatar.Root, null, /* @__PURE__ */ React20.createElement(Avatar.Content, {
|
|
1382
1372
|
status: "inactive",
|
|
1383
1373
|
style: {
|
|
1384
1374
|
zIndex: members.length - 4
|
|
1385
1375
|
},
|
|
1386
1376
|
fallback: `+${members.length - 3}`,
|
|
1387
1377
|
size
|
|
1388
|
-
}))), /* @__PURE__ */
|
|
1378
|
+
}))), /* @__PURE__ */ React20.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React20.createElement(Tooltip2.Content, {
|
|
1389
1379
|
side: "bottom"
|
|
1390
|
-
}, /* @__PURE__ */
|
|
1380
|
+
}, /* @__PURE__ */ React20.createElement(Tooltip2.Arrow, null), /* @__PURE__ */ React20.createElement(List2, {
|
|
1391
1381
|
classNames: "max-h-56 overflow-y-auto"
|
|
1392
|
-
}, members.map((member) => /* @__PURE__ */
|
|
1382
|
+
}, members.map((member) => /* @__PURE__ */ React20.createElement(ListItem2.Root, {
|
|
1393
1383
|
key: member.identity.identityKey.toHex(),
|
|
1394
1384
|
classNames: "flex gap-2 items-center cursor-pointer mbe-2",
|
|
1395
1385
|
onClick: () => onMemberClick?.(member),
|
|
1396
1386
|
"data-testid": "identity-list-item"
|
|
1397
|
-
}, /* @__PURE__ */
|
|
1387
|
+
}, /* @__PURE__ */ React20.createElement(PresenceAvatar, {
|
|
1398
1388
|
identity: member.identity,
|
|
1399
1389
|
size,
|
|
1400
1390
|
showName: true,
|
|
@@ -1404,7 +1394,7 @@ var FullPresence = (props) => {
|
|
|
1404
1394
|
var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, index, onClick, size }, forwardedRef) => {
|
|
1405
1395
|
const status = match ? "current" : "active";
|
|
1406
1396
|
const fallbackValue = keyToFallback(identity.identityKey);
|
|
1407
|
-
return /* @__PURE__ */
|
|
1397
|
+
return /* @__PURE__ */ React20.createElement(Avatar.Root, null, /* @__PURE__ */ React20.createElement(Avatar.Content, {
|
|
1408
1398
|
status,
|
|
1409
1399
|
hue: identity.profile?.data?.hue || fallbackValue.hue,
|
|
1410
1400
|
"data-testid": "spacePlugin.presence.member",
|
|
@@ -1418,7 +1408,7 @@ var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, in
|
|
|
1418
1408
|
onClick,
|
|
1419
1409
|
fallback: identity.profile?.data?.emoji || fallbackValue.emoji,
|
|
1420
1410
|
ref: forwardedRef
|
|
1421
|
-
}), /* @__PURE__ */
|
|
1411
|
+
}), /* @__PURE__ */ React20.createElement(Avatar.Label, {
|
|
1422
1412
|
classNames: showName ? "text-sm truncate pli-2" : "sr-only"
|
|
1423
1413
|
}, getName(identity)));
|
|
1424
1414
|
});
|
|
@@ -1446,61 +1436,61 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
|
1446
1436
|
}, [
|
|
1447
1437
|
viewers
|
|
1448
1438
|
]);
|
|
1449
|
-
return /* @__PURE__ */
|
|
1439
|
+
return /* @__PURE__ */ React20.createElement(SmallPresence, {
|
|
1450
1440
|
count: activeViewers.length,
|
|
1451
1441
|
attended: isAttended,
|
|
1452
1442
|
containsAttended
|
|
1453
1443
|
});
|
|
1454
1444
|
};
|
|
1455
1445
|
var SmallPresence = ({ count = 0, attended, containsAttended }) => {
|
|
1456
|
-
const { t } =
|
|
1457
|
-
return /* @__PURE__ */
|
|
1446
|
+
const { t } = useTranslation18(SPACE_PLUGIN);
|
|
1447
|
+
return /* @__PURE__ */ React20.createElement(Tooltip2.Root, null, /* @__PURE__ */ React20.createElement(Tooltip2.Trigger, {
|
|
1458
1448
|
asChild: true
|
|
1459
|
-
}, /* @__PURE__ */
|
|
1449
|
+
}, /* @__PURE__ */ React20.createElement(AttentionGlyph, {
|
|
1460
1450
|
attended,
|
|
1461
1451
|
containsAttended,
|
|
1462
1452
|
presence: count > 1 ? "many" : count === 1 ? "one" : "none",
|
|
1463
1453
|
classNames: "self-center mie-1"
|
|
1464
|
-
})), /* @__PURE__ */
|
|
1454
|
+
})), /* @__PURE__ */ React20.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React20.createElement(Tooltip2.Content, {
|
|
1465
1455
|
side: "bottom"
|
|
1466
|
-
}, /* @__PURE__ */
|
|
1456
|
+
}, /* @__PURE__ */ React20.createElement("span", null, t("presence label", {
|
|
1467
1457
|
count
|
|
1468
|
-
})), /* @__PURE__ */
|
|
1458
|
+
})), /* @__PURE__ */ React20.createElement(Tooltip2.Arrow, null))));
|
|
1469
1459
|
};
|
|
1470
1460
|
|
|
1471
1461
|
// packages/plugins/plugin-space/src/components/SpacePluginSettings.tsx
|
|
1472
|
-
import
|
|
1473
|
-
import { createIntent as
|
|
1462
|
+
import React21 from "react";
|
|
1463
|
+
import { createIntent as createIntent8, useIntentDispatcher as useIntentDispatcher8 } from "@dxos/app-framework";
|
|
1474
1464
|
import { useClient as useClient6 } from "@dxos/react-client";
|
|
1475
1465
|
import { useSpaces as useSpaces2 } from "@dxos/react-client/echo";
|
|
1476
|
-
import { Input as Input5, toLocalizedString as toLocalizedString3, useTranslation as
|
|
1466
|
+
import { Input as Input5, toLocalizedString as toLocalizedString3, useTranslation as useTranslation19, List as List3, ListItem as ListItem3, Button as Button7 } from "@dxos/react-ui";
|
|
1477
1467
|
import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
|
|
1478
1468
|
var SpacePluginSettings = ({ settings }) => {
|
|
1479
|
-
const { t } =
|
|
1480
|
-
const { dispatchPromise: dispatch } =
|
|
1469
|
+
const { t } = useTranslation19(SPACE_PLUGIN);
|
|
1470
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher8();
|
|
1481
1471
|
const client = useClient6();
|
|
1482
1472
|
const spaces = useSpaces2({
|
|
1483
1473
|
all: settings.showHidden
|
|
1484
1474
|
});
|
|
1485
|
-
return /* @__PURE__ */
|
|
1475
|
+
return /* @__PURE__ */ React21.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React21.createElement(DeprecatedFormInput, {
|
|
1486
1476
|
label: t("show hidden spaces label")
|
|
1487
|
-
}, /* @__PURE__ */
|
|
1477
|
+
}, /* @__PURE__ */ React21.createElement(Input5.Switch, {
|
|
1488
1478
|
checked: settings.showHidden,
|
|
1489
1479
|
onCheckedChange: (checked) => settings.showHidden = !!checked
|
|
1490
|
-
})), /* @__PURE__ */
|
|
1480
|
+
})), /* @__PURE__ */ React21.createElement("div", {
|
|
1491
1481
|
role: "none"
|
|
1492
|
-
}, /* @__PURE__ */
|
|
1482
|
+
}, /* @__PURE__ */ React21.createElement("h2", {
|
|
1493
1483
|
className: "text-xl my-4"
|
|
1494
|
-
}, "Space Settings"), /* @__PURE__ */
|
|
1484
|
+
}, "Space Settings"), /* @__PURE__ */ React21.createElement(List3, {
|
|
1495
1485
|
classNames: "max-w-md mx-auto"
|
|
1496
|
-
}, spaces.map((space) => /* @__PURE__ */
|
|
1486
|
+
}, spaces.map((space) => /* @__PURE__ */ React21.createElement(ListItem3.Root, {
|
|
1497
1487
|
key: space.id
|
|
1498
|
-
}, /* @__PURE__ */
|
|
1488
|
+
}, /* @__PURE__ */ React21.createElement(ListItem3.Heading, {
|
|
1499
1489
|
classNames: "flex flex-col grow truncate mbe-2"
|
|
1500
1490
|
}, toLocalizedString3(getSpaceDisplayName(space, {
|
|
1501
1491
|
personal: space === client.spaces.default
|
|
1502
|
-
}), t)), /* @__PURE__ */
|
|
1503
|
-
onClick: () => dispatch(
|
|
1492
|
+
}), t)), /* @__PURE__ */ React21.createElement(ListItem3.Endcap, null, /* @__PURE__ */ React21.createElement(Button7, {
|
|
1493
|
+
onClick: () => dispatch(createIntent8(SpaceAction.OpenSettings, {
|
|
1504
1494
|
space
|
|
1505
1495
|
}))
|
|
1506
1496
|
}, t("open space settings label"))))))));
|
|
@@ -1508,13 +1498,13 @@ var SpacePluginSettings = ({ settings }) => {
|
|
|
1508
1498
|
|
|
1509
1499
|
// packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsContainer.tsx
|
|
1510
1500
|
import { pipe as pipe2, Schema as S } from "effect";
|
|
1511
|
-
import
|
|
1512
|
-
import { chain as chain2, createIntent as
|
|
1501
|
+
import React22, { useCallback as useCallback13, useMemo as useMemo3, useState as useState11 } from "react";
|
|
1502
|
+
import { chain as chain2, createIntent as createIntent9, LayoutAction as LayoutAction7, useIntentDispatcher as useIntentDispatcher9 } from "@dxos/app-framework";
|
|
1513
1503
|
import { log as log3 } from "@dxos/log";
|
|
1514
1504
|
import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
1515
1505
|
import { useClient as useClient7 } from "@dxos/react-client";
|
|
1516
1506
|
import { SpaceState as SpaceState2 } from "@dxos/react-client/echo";
|
|
1517
|
-
import { Button as Button8, Input as Input6, useMulticastObservable, useTranslation as
|
|
1507
|
+
import { Button as Button8, Input as Input6, useMulticastObservable, useTranslation as useTranslation20 } from "@dxos/react-ui";
|
|
1518
1508
|
import { Form as Form4, ControlItem, ControlItemInput as ControlItemInput2, ControlSection as ControlSection3, ControlPage as ControlPage3 } from "@dxos/react-ui-form";
|
|
1519
1509
|
import { HuePicker, IconPicker } from "@dxos/react-ui-pickers";
|
|
1520
1510
|
import { StackItem as StackItem4 } from "@dxos/react-ui-stack";
|
|
@@ -1525,8 +1515,8 @@ var FormSchema = SpaceForm.pipe(S.extend(S.Struct({
|
|
|
1525
1515
|
})
|
|
1526
1516
|
})));
|
|
1527
1517
|
var SpaceSettingsContainer = ({ space }) => {
|
|
1528
|
-
const { t } =
|
|
1529
|
-
const { dispatchPromise: dispatch } =
|
|
1518
|
+
const { t } = useTranslation20(SPACE_PLUGIN);
|
|
1519
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher9();
|
|
1530
1520
|
const client = useClient7();
|
|
1531
1521
|
const archived = useMulticastObservable(space.state) === SpaceState2.SPACE_INACTIVE;
|
|
1532
1522
|
const [edgeReplication, setEdgeReplication] = useState11(space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED);
|
|
@@ -1556,14 +1546,14 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1556
1546
|
space.properties.hue = properties.hue;
|
|
1557
1547
|
}
|
|
1558
1548
|
if (properties.archived && !archived) {
|
|
1559
|
-
void dispatch(pipe2(
|
|
1549
|
+
void dispatch(pipe2(createIntent9(SpaceAction.Close, {
|
|
1560
1550
|
space
|
|
1561
|
-
}), chain2(
|
|
1551
|
+
}), chain2(LayoutAction7.SwitchWorkspace, {
|
|
1562
1552
|
part: "workspace",
|
|
1563
1553
|
subject: client.spaces.default.id
|
|
1564
1554
|
})));
|
|
1565
1555
|
} else if (!properties.archived && archived) {
|
|
1566
|
-
void dispatch(
|
|
1556
|
+
void dispatch(createIntent9(SpaceAction.Open, {
|
|
1567
1557
|
space
|
|
1568
1558
|
}));
|
|
1569
1559
|
}
|
|
@@ -1591,10 +1581,10 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1591
1581
|
onValueChange,
|
|
1592
1582
|
type
|
|
1593
1583
|
]);
|
|
1594
|
-
return /* @__PURE__ */
|
|
1584
|
+
return /* @__PURE__ */ React22.createElement(ControlItemInput2, {
|
|
1595
1585
|
title: label,
|
|
1596
1586
|
description: t("display name description")
|
|
1597
|
-
}, /* @__PURE__ */
|
|
1587
|
+
}, /* @__PURE__ */ React22.createElement(Input6.TextInput, {
|
|
1598
1588
|
value: getValue(),
|
|
1599
1589
|
onChange: handleChange,
|
|
1600
1590
|
placeholder: t("display name input placeholder"),
|
|
@@ -1610,10 +1600,10 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1610
1600
|
onValueChange,
|
|
1611
1601
|
type
|
|
1612
1602
|
]);
|
|
1613
|
-
return /* @__PURE__ */
|
|
1603
|
+
return /* @__PURE__ */ React22.createElement(ControlItem, {
|
|
1614
1604
|
title: label,
|
|
1615
1605
|
description: t("icon description")
|
|
1616
|
-
}, /* @__PURE__ */
|
|
1606
|
+
}, /* @__PURE__ */ React22.createElement(IconPicker, {
|
|
1617
1607
|
value: getValue(),
|
|
1618
1608
|
onChange: handleChange,
|
|
1619
1609
|
onReset: handleEmojiReset,
|
|
@@ -1630,10 +1620,10 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1630
1620
|
onValueChange,
|
|
1631
1621
|
type
|
|
1632
1622
|
]);
|
|
1633
|
-
return /* @__PURE__ */
|
|
1623
|
+
return /* @__PURE__ */ React22.createElement(ControlItem, {
|
|
1634
1624
|
title: label,
|
|
1635
1625
|
description: t("hue description")
|
|
1636
|
-
}, /* @__PURE__ */
|
|
1626
|
+
}, /* @__PURE__ */ React22.createElement(HuePicker, {
|
|
1637
1627
|
value: getValue(),
|
|
1638
1628
|
onChange: handleChange,
|
|
1639
1629
|
onReset: handleHueReset,
|
|
@@ -1645,10 +1635,10 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1645
1635
|
onValueChange,
|
|
1646
1636
|
type
|
|
1647
1637
|
]);
|
|
1648
|
-
return /* @__PURE__ */
|
|
1638
|
+
return /* @__PURE__ */ React22.createElement(ControlItemInput2, {
|
|
1649
1639
|
title: label,
|
|
1650
1640
|
description: t("edge replication description")
|
|
1651
|
-
}, /* @__PURE__ */
|
|
1641
|
+
}, /* @__PURE__ */ React22.createElement(Input6.Switch, {
|
|
1652
1642
|
checked: getValue(),
|
|
1653
1643
|
onCheckedChange: handleChange,
|
|
1654
1644
|
classNames: "justify-self-end"
|
|
@@ -1660,10 +1650,10 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1660
1650
|
type,
|
|
1661
1651
|
getValue
|
|
1662
1652
|
]);
|
|
1663
|
-
return /* @__PURE__ */
|
|
1653
|
+
return /* @__PURE__ */ React22.createElement(ControlItemInput2, {
|
|
1664
1654
|
title: label,
|
|
1665
1655
|
description: t("archive space description")
|
|
1666
|
-
}, /* @__PURE__ */
|
|
1656
|
+
}, /* @__PURE__ */ React22.createElement(Button8, {
|
|
1667
1657
|
disabled: space === client.spaces.default,
|
|
1668
1658
|
onClick: handleChange
|
|
1669
1659
|
}, getValue() ? t("unarchive space label") : t("archive space label")));
|
|
@@ -1672,16 +1662,16 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1672
1662
|
t,
|
|
1673
1663
|
space
|
|
1674
1664
|
]);
|
|
1675
|
-
return /* @__PURE__ */
|
|
1665
|
+
return /* @__PURE__ */ React22.createElement(StackItem4.Content, {
|
|
1676
1666
|
classNames: "block overflow-y-auto pli-2"
|
|
1677
|
-
}, /* @__PURE__ */
|
|
1667
|
+
}, /* @__PURE__ */ React22.createElement(ControlPage3, null, /* @__PURE__ */ React22.createElement(ControlSection3, {
|
|
1678
1668
|
title: t("space properties settings verbose label", {
|
|
1679
1669
|
ns: SPACE_PLUGIN
|
|
1680
1670
|
}),
|
|
1681
1671
|
description: t("space properties settings description", {
|
|
1682
1672
|
ns: SPACE_PLUGIN
|
|
1683
1673
|
})
|
|
1684
|
-
}, /* @__PURE__ */
|
|
1674
|
+
}, /* @__PURE__ */ React22.createElement(Form4, {
|
|
1685
1675
|
schema: FormSchema,
|
|
1686
1676
|
values,
|
|
1687
1677
|
autoSave: true,
|
|
@@ -1692,13 +1682,13 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1692
1682
|
};
|
|
1693
1683
|
|
|
1694
1684
|
// packages/plugins/plugin-space/src/components/SyncStatus/InlineSyncStatus.tsx
|
|
1695
|
-
import
|
|
1685
|
+
import React23, { useEffect as useEffect6, useState as useState12 } from "react";
|
|
1696
1686
|
import { useAppGraph as useAppGraph3 } from "@dxos/app-framework";
|
|
1697
1687
|
import { EdgeStatus } from "@dxos/protocols/proto/dxos/client/services";
|
|
1698
1688
|
import { EdgeReplicationSetting as EdgeReplicationSetting2 } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
1699
1689
|
import { useClient as useClient8 } from "@dxos/react-client";
|
|
1700
1690
|
import { useSpaceSyncState } from "@dxos/react-client/echo";
|
|
1701
|
-
import { Tooltip as Tooltip3, useTranslation as
|
|
1691
|
+
import { Tooltip as Tooltip3, useTranslation as useTranslation21 } from "@dxos/react-ui";
|
|
1702
1692
|
import { AttentionGlyph as AttentionGlyph2, useAttended as useAttended2, useAttention as useAttention2 } from "@dxos/react-ui-attention";
|
|
1703
1693
|
var useEdgeStatus = () => {
|
|
1704
1694
|
const [status, setStatus] = useState12(EdgeStatus.NOT_CONNECTED);
|
|
@@ -1713,7 +1703,7 @@ var useEdgeStatus = () => {
|
|
|
1713
1703
|
return status;
|
|
1714
1704
|
};
|
|
1715
1705
|
var InlineSyncStatus = ({ space, open }) => {
|
|
1716
|
-
const { t } =
|
|
1706
|
+
const { t } = useTranslation21(SPACE_PLUGIN);
|
|
1717
1707
|
const id = space.id;
|
|
1718
1708
|
const { hasAttention, isAncestor, isRelated } = useAttention2(id);
|
|
1719
1709
|
const isAttended = hasAttention || isAncestor || isRelated;
|
|
@@ -1726,25 +1716,25 @@ var InlineSyncStatus = ({ space, open }) => {
|
|
|
1726
1716
|
const edgeSyncEnabled = space.internal.data.edgeReplication === EdgeReplicationSetting2.ENABLED;
|
|
1727
1717
|
const syncState = useSpaceSyncState(space);
|
|
1728
1718
|
const syncing = connectedToEdge && edgeSyncEnabled && syncState && syncState.missingOnLocal > 0;
|
|
1729
|
-
return /* @__PURE__ */
|
|
1719
|
+
return /* @__PURE__ */ React23.createElement(Tooltip3.Root, null, /* @__PURE__ */ React23.createElement(Tooltip3.Trigger, {
|
|
1730
1720
|
asChild: true
|
|
1731
|
-
}, /* @__PURE__ */
|
|
1721
|
+
}, /* @__PURE__ */ React23.createElement(AttentionGlyph2, {
|
|
1732
1722
|
syncing,
|
|
1733
1723
|
attended: isAttended,
|
|
1734
1724
|
containsAttended,
|
|
1735
1725
|
classNames: "self-center mie-1"
|
|
1736
|
-
})), /* @__PURE__ */
|
|
1726
|
+
})), /* @__PURE__ */ React23.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React23.createElement(Tooltip3.Content, {
|
|
1737
1727
|
side: "bottom",
|
|
1738
1728
|
classNames: "z-[70]"
|
|
1739
|
-
}, /* @__PURE__ */
|
|
1729
|
+
}, /* @__PURE__ */ React23.createElement("span", null, t("syncing label")), /* @__PURE__ */ React23.createElement(Tooltip3.Arrow, null))));
|
|
1740
1730
|
};
|
|
1741
1731
|
|
|
1742
1732
|
// packages/plugins/plugin-space/src/components/SyncStatus/SyncStatus.tsx
|
|
1743
|
-
import
|
|
1733
|
+
import React24, { useEffect as useEffect7, useState as useState13 } from "react";
|
|
1744
1734
|
import { StatusBar } from "@dxos/plugin-status-bar";
|
|
1745
1735
|
import { useClient as useClient9 } from "@dxos/react-client";
|
|
1746
1736
|
import { getSyncSummary, useSyncState } from "@dxos/react-client/echo";
|
|
1747
|
-
import { Icon as Icon5, useTranslation as
|
|
1737
|
+
import { Icon as Icon5, useTranslation as useTranslation22 } from "@dxos/react-ui";
|
|
1748
1738
|
|
|
1749
1739
|
// packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts
|
|
1750
1740
|
import { Context } from "@dxos/context";
|
|
@@ -1848,13 +1838,13 @@ var SyncStatus = () => {
|
|
|
1848
1838
|
setSaved(state2 === "saved");
|
|
1849
1839
|
});
|
|
1850
1840
|
}, []);
|
|
1851
|
-
return /* @__PURE__ */
|
|
1841
|
+
return /* @__PURE__ */ React24.createElement(SyncStatusIndicator, {
|
|
1852
1842
|
state,
|
|
1853
1843
|
saved
|
|
1854
1844
|
});
|
|
1855
1845
|
};
|
|
1856
1846
|
var SyncStatusIndicator = ({ state, saved }) => {
|
|
1857
|
-
const { t } =
|
|
1847
|
+
const { t } = useTranslation22(SPACE_PLUGIN);
|
|
1858
1848
|
const summary = getSyncSummary(state);
|
|
1859
1849
|
const offline = Object.values(state).length === 0;
|
|
1860
1850
|
const needsToUpload = summary.differentDocuments > 0 || summary.missingOnRemote > 0;
|
|
@@ -1881,12 +1871,12 @@ var SyncStatusIndicator = ({ state, saved }) => {
|
|
|
1881
1871
|
needsToDownload
|
|
1882
1872
|
]);
|
|
1883
1873
|
const title = t(`${status} label`);
|
|
1884
|
-
const icon = /* @__PURE__ */
|
|
1874
|
+
const icon = /* @__PURE__ */ React24.createElement(Icon5, {
|
|
1885
1875
|
icon: getIcon(status),
|
|
1886
1876
|
size: 4,
|
|
1887
1877
|
classNames
|
|
1888
1878
|
});
|
|
1889
|
-
return /* @__PURE__ */
|
|
1879
|
+
return /* @__PURE__ */ React24.createElement(StatusBar.Item, {
|
|
1890
1880
|
title
|
|
1891
1881
|
}, icon);
|
|
1892
1882
|
};
|
|
@@ -1913,8 +1903,6 @@ export {
|
|
|
1913
1903
|
PopoverRenameSpace,
|
|
1914
1904
|
useQuerySpaceSchemas,
|
|
1915
1905
|
SchemaContainer,
|
|
1916
|
-
ShareSpaceButton,
|
|
1917
|
-
ShareSpaceButtonImpl,
|
|
1918
1906
|
SpacePresence,
|
|
1919
1907
|
FullPresence,
|
|
1920
1908
|
SmallPresenceLive,
|
|
@@ -1936,4 +1924,4 @@ export {
|
|
|
1936
1924
|
SpaceState,
|
|
1937
1925
|
SpacesReady
|
|
1938
1926
|
};
|
|
1939
|
-
//# sourceMappingURL=chunk-
|
|
1927
|
+
//# sourceMappingURL=chunk-3KG2VMQL.mjs.map
|