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