@dxos/plugin-space 0.8.2-main.5ca3450 → 0.8.2-main.600d381
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-I2BU35J5.mjs → app-graph-builder-6KVRD7OJ.mjs} +27 -10
- package/dist/lib/browser/{app-graph-builder-I2BU35J5.mjs.map → app-graph-builder-6KVRD7OJ.mjs.map} +3 -3
- package/dist/lib/browser/{app-graph-serializer-HPYDOKA5.mjs → app-graph-serializer-N7KZGCST.mjs} +4 -4
- package/dist/lib/browser/{chunk-YQNBTJI4.mjs → chunk-CY35NLWL.mjs} +1 -13
- package/dist/lib/browser/{chunk-YQNBTJI4.mjs.map → chunk-CY35NLWL.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-RERTVPBV.mjs → chunk-F57CTUM6.mjs} +4 -4
- package/dist/lib/browser/{chunk-RERTVPBV.mjs.map → chunk-F57CTUM6.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-TSX67XGX.mjs → chunk-V4VNP2WY.mjs} +124 -174
- package/dist/lib/browser/{chunk-TSX67XGX.mjs.map → chunk-V4VNP2WY.mjs.map} +4 -4
- package/dist/lib/browser/{chunk-OS5QKO4Z.mjs → chunk-XC4BXZVV.mjs} +2 -3
- package/dist/lib/browser/chunk-XC4BXZVV.mjs.map +7 -0
- package/dist/lib/browser/{identity-created-DWFKBGOA.mjs → identity-created-74EHBH7M.mjs} +2 -2
- package/dist/lib/browser/index.mjs +4 -8
- package/dist/lib/browser/index.mjs.map +1 -1
- package/dist/lib/browser/{intent-resolver-GKDCJ4H2.mjs → intent-resolver-FZ64VJKZ.mjs} +7 -26
- package/dist/lib/browser/intent-resolver-FZ64VJKZ.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-667IZ2Q4.mjs → react-root-2EFJCOX7.mjs} +4 -4
- package/dist/lib/browser/{react-surface-I4RNTGGN.mjs → react-surface-N5OGF7TQ.mjs} +4 -12
- package/dist/lib/browser/react-surface-N5OGF7TQ.mjs.map +7 -0
- package/dist/lib/browser/{settings-ILGGNYJ7.mjs → settings-G24447B7.mjs} +2 -2
- package/dist/lib/browser/{spaces-ready-IXZF3RWW.mjs → spaces-ready-ZSUEPHJF.mjs} +3 -3
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/{app-graph-builder-H7MDHM3X.cjs → app-graph-builder-6VR2TBBF.cjs} +55 -38
- package/dist/lib/node/{app-graph-builder-H7MDHM3X.cjs.map → app-graph-builder-6VR2TBBF.cjs.map} +3 -3
- package/dist/lib/node/{app-graph-serializer-G7UYFWG6.cjs → app-graph-serializer-IKQLWTCX.cjs} +20 -20
- package/dist/lib/node/{chunk-EG3WAZLA.cjs → chunk-FILCZU6V.cjs} +29 -29
- package/dist/lib/node/{chunk-EG3WAZLA.cjs.map → chunk-FILCZU6V.cjs.map} +2 -2
- package/dist/lib/node/{chunk-AR3JHVCY.cjs → chunk-K6ZO4WDJ.cjs} +4 -16
- package/dist/lib/node/{chunk-AR3JHVCY.cjs.map → chunk-K6ZO4WDJ.cjs.map} +3 -3
- package/dist/lib/node/{chunk-HD4C6KKO.cjs → chunk-P2ZIVXGY.cjs} +177 -227
- package/dist/lib/node/chunk-P2ZIVXGY.cjs.map +7 -0
- package/dist/lib/node/{chunk-NCSFM6RA.cjs → chunk-YAE6CCDB.cjs} +6 -7
- package/dist/lib/node/chunk-YAE6CCDB.cjs.map +7 -0
- package/dist/lib/node/{identity-created-YLGVEWAJ.cjs → identity-created-PCQPDULV.cjs} +6 -6
- package/dist/lib/node/index.cjs +60 -64
- package/dist/lib/node/index.cjs.map +1 -1
- package/dist/lib/node/{intent-resolver-V7UJKLE7.cjs → intent-resolver-BK6JDXY4.cjs} +55 -73
- package/dist/lib/node/intent-resolver-BK6JDXY4.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-root-I3SSFA5O.cjs → react-root-DEQFKQVD.cjs} +8 -8
- package/dist/lib/node/{react-surface-OLMQCCYD.cjs → react-surface-UQD7LR67.cjs} +41 -47
- package/dist/lib/node/react-surface-UQD7LR67.cjs.map +7 -0
- package/dist/lib/node/{settings-7TC55JP4.cjs → settings-AFWO4AWK.cjs} +6 -6
- package/dist/lib/node/{spaces-ready-4H3Q46GV.cjs → spaces-ready-MHLUFLXN.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-NI7X6W3Q.mjs → app-graph-builder-O7M6MVS5.mjs} +27 -10
- package/dist/lib/node-esm/{app-graph-builder-NI7X6W3Q.mjs.map → app-graph-builder-O7M6MVS5.mjs.map} +3 -3
- package/dist/lib/node-esm/{app-graph-serializer-CVPYWWW3.mjs → app-graph-serializer-I6XBQJLA.mjs} +4 -4
- package/dist/lib/node-esm/{chunk-RUWTHAV7.mjs → chunk-CLRCW6PU.mjs} +1 -13
- package/dist/lib/node-esm/{chunk-RUWTHAV7.mjs.map → chunk-CLRCW6PU.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-B2P24Q5R.mjs → chunk-COHDPHM7.mjs} +4 -4
- package/dist/lib/node-esm/{chunk-B2P24Q5R.mjs.map → chunk-COHDPHM7.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-FUH5OODY.mjs → chunk-HEXOMJIR.mjs} +2 -3
- package/dist/lib/node-esm/chunk-HEXOMJIR.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-BU6F7ZU4.mjs → chunk-TB557OBD.mjs} +124 -174
- package/dist/lib/node-esm/{chunk-BU6F7ZU4.mjs.map → chunk-TB557OBD.mjs.map} +4 -4
- package/dist/lib/node-esm/{identity-created-7NHGER3Q.mjs → identity-created-GXS46A3C.mjs} +2 -2
- package/dist/lib/node-esm/index.mjs +4 -8
- package/dist/lib/node-esm/index.mjs.map +1 -1
- package/dist/lib/node-esm/{intent-resolver-IL63YTIT.mjs → intent-resolver-6VPP3ZDO.mjs} +7 -26
- package/dist/lib/node-esm/intent-resolver-6VPP3ZDO.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-JEGVIVVK.mjs → react-root-2RJ2S5E6.mjs} +4 -4
- package/dist/lib/node-esm/{react-surface-DRRXIJBE.mjs → react-surface-2RSRATVY.mjs} +4 -12
- package/dist/lib/node-esm/react-surface-2RSRATVY.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-CXMV2AFR.mjs → settings-MJVSCOI4.mjs} +2 -2
- package/dist/lib/node-esm/{spaces-ready-QMXLQ4QV.mjs → spaces-ready-35U5BBTH.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/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/PersistenceStatus.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/InlineSyncStatus.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/translations.d.ts +0 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +0 -16
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/package.json +44 -44
- package/src/capabilities/app-graph-builder.ts +20 -8
- package/src/capabilities/intent-resolver.ts +0 -19
- package/src/capabilities/react-surface.tsx +0 -8
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +1 -1
- package/src/components/MembersContainer.stories.tsx +1 -5
- package/src/components/PersistenceStatus.tsx +11 -14
- package/src/components/SpacePresence.stories.tsx +1 -1
- package/src/components/SpacePresence.tsx +32 -42
- package/src/components/SyncStatus/InlineSyncStatus.tsx +8 -16
- package/src/components/index.ts +0 -1
- package/src/translations.ts +0 -1
- package/src/types/types.ts +0 -13
- package/src/util.tsx +4 -4
- package/dist/lib/browser/chunk-OS5QKO4Z.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-GKDCJ4H2.mjs.map +0 -7
- package/dist/lib/browser/react-surface-I4RNTGGN.mjs.map +0 -7
- package/dist/lib/node/chunk-HD4C6KKO.cjs.map +0 -7
- package/dist/lib/node/chunk-NCSFM6RA.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-V7UJKLE7.cjs.map +0 -7
- package/dist/lib/node/react-surface-OLMQCCYD.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-FUH5OODY.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-IL63YTIT.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-DRRXIJBE.mjs.map +0 -7
- package/dist/types/src/components/PopoverAddSpace.d.ts +0 -4
- package/dist/types/src/components/PopoverAddSpace.d.ts.map +0 -1
- package/src/components/PopoverAddSpace.tsx +0 -52
- /package/dist/lib/browser/{app-graph-serializer-HPYDOKA5.mjs.map → app-graph-serializer-N7KZGCST.mjs.map} +0 -0
- /package/dist/lib/browser/{identity-created-DWFKBGOA.mjs.map → identity-created-74EHBH7M.mjs.map} +0 -0
- /package/dist/lib/browser/{react-root-667IZ2Q4.mjs.map → react-root-2EFJCOX7.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-ILGGNYJ7.mjs.map → settings-G24447B7.mjs.map} +0 -0
- /package/dist/lib/browser/{spaces-ready-IXZF3RWW.mjs.map → spaces-ready-ZSUEPHJF.mjs.map} +0 -0
- /package/dist/lib/node/{app-graph-serializer-G7UYFWG6.cjs.map → app-graph-serializer-IKQLWTCX.cjs.map} +0 -0
- /package/dist/lib/node/{identity-created-YLGVEWAJ.cjs.map → identity-created-PCQPDULV.cjs.map} +0 -0
- /package/dist/lib/node/{react-root-I3SSFA5O.cjs.map → react-root-DEQFKQVD.cjs.map} +0 -0
- /package/dist/lib/node/{settings-7TC55JP4.cjs.map → settings-AFWO4AWK.cjs.map} +0 -0
- /package/dist/lib/node/{spaces-ready-4H3Q46GV.cjs.map → spaces-ready-MHLUFLXN.cjs.map} +0 -0
- /package/dist/lib/node-esm/{app-graph-serializer-CVPYWWW3.mjs.map → app-graph-serializer-I6XBQJLA.mjs.map} +0 -0
- /package/dist/lib/node-esm/{identity-created-7NHGER3Q.mjs.map → identity-created-GXS46A3C.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-root-JEGVIVVK.mjs.map → react-root-2RJ2S5E6.mjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-CXMV2AFR.mjs.map → settings-MJVSCOI4.mjs.map} +0 -0
- /package/dist/lib/node-esm/{spaces-ready-QMXLQ4QV.mjs.map → spaces-ready-35U5BBTH.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-F57CTUM6.mjs";
|
|
8
8
|
import {
|
|
9
9
|
CollectionType,
|
|
10
10
|
SpaceAction,
|
|
11
11
|
SpaceForm
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CY35NLWL.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-6KVRD7OJ.mjs"));
|
|
343
|
+
var AppGraphSerializer = lazy(() => import("./app-graph-serializer-N7KZGCST.mjs"));
|
|
344
|
+
var IdentityCreated = lazy(() => import("./identity-created-74EHBH7M.mjs"));
|
|
345
|
+
var IntentResolver = lazy(() => import("./intent-resolver-FZ64VJKZ.mjs"));
|
|
346
|
+
var ReactRoot = lazy(() => import("./react-root-2EFJCOX7.mjs"));
|
|
347
|
+
var ReactSurface = lazy(() => import("./react-surface-N5OGF7TQ.mjs"));
|
|
348
348
|
var SchemaDefs = lazy(() => import("./schema-defs-FLFEUSLB.mjs"));
|
|
349
349
|
var SchemaTools = lazy(() => import("./schema-tools-MYC4LTQD.mjs"));
|
|
350
|
-
var SpaceSettings = lazy(() => import("./settings-
|
|
350
|
+
var SpaceSettings = lazy(() => import("./settings-G24447B7.mjs"));
|
|
351
351
|
var SpaceState = lazy(() => import("./state-CYV6QCTN.mjs"));
|
|
352
|
-
var SpacesReady = lazy(() => import("./spaces-ready-
|
|
352
|
+
var SpacesReady = lazy(() => import("./spaces-ready-ZSUEPHJF.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";
|
|
@@ -1098,78 +1098,32 @@ var PersistenceStatus = ({ db }) => {
|
|
|
1098
1098
|
}, t("persistence pending label")));
|
|
1099
1099
|
case 0:
|
|
1100
1100
|
default:
|
|
1101
|
-
return /* @__PURE__ */ React15.createElement(Tooltip.
|
|
1102
|
-
delayDuration: 400
|
|
1103
|
-
}, /* @__PURE__ */ React15.createElement(Tooltip.Trigger, {
|
|
1101
|
+
return /* @__PURE__ */ React15.createElement(Tooltip.Trigger, {
|
|
1102
|
+
delayDuration: 400,
|
|
1104
1103
|
role: "status",
|
|
1104
|
+
content: t("persisted locally message"),
|
|
1105
1105
|
className: "flex items-center"
|
|
1106
1106
|
}, /* @__PURE__ */ React15.createElement(CheckCircle2, {
|
|
1107
1107
|
className: mx6(getSize3(4), "me-1")
|
|
1108
1108
|
}), displayMessage && /* @__PURE__ */ React15.createElement("span", {
|
|
1109
1109
|
className: mx6("text-sm", staticPlaceholderText)
|
|
1110
|
-
}, t("persisted locally label")))
|
|
1110
|
+
}, t("persisted locally label")));
|
|
1111
1111
|
}
|
|
1112
1112
|
};
|
|
1113
1113
|
|
|
1114
|
-
// packages/plugins/plugin-space/src/components/PopoverAddSpace.tsx
|
|
1115
|
-
import React16 from "react";
|
|
1116
|
-
import { createIntent as createIntent6, LayoutAction as LayoutAction5, useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework";
|
|
1117
|
-
import { IconButton as IconButton3, useTranslation as useTranslation14 } from "@dxos/react-ui";
|
|
1118
|
-
var POPOVER_ADD_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
|
|
1119
|
-
var PopoverAddSpace = () => {
|
|
1120
|
-
const { t } = useTranslation14(SPACE_PLUGIN);
|
|
1121
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher6();
|
|
1122
|
-
return /* @__PURE__ */ React16.createElement("div", {
|
|
1123
|
-
role: "none",
|
|
1124
|
-
className: "p-1 grid grid-cols-1 gap-1 [&>button]:justify-start"
|
|
1125
|
-
}, /* @__PURE__ */ React16.createElement(IconButton3, {
|
|
1126
|
-
variant: "ghost",
|
|
1127
|
-
label: t("create space label"),
|
|
1128
|
-
icon: "ph--plus--regular",
|
|
1129
|
-
onClick: () => {
|
|
1130
|
-
void dispatch(createIntent6(SpaceAction.OpenCreateSpace));
|
|
1131
|
-
void dispatch(createIntent6(LayoutAction5.UpdatePopover, {
|
|
1132
|
-
part: "popover",
|
|
1133
|
-
options: {
|
|
1134
|
-
variant: "react",
|
|
1135
|
-
anchorId: "",
|
|
1136
|
-
state: false
|
|
1137
|
-
}
|
|
1138
|
-
}));
|
|
1139
|
-
},
|
|
1140
|
-
"data-testid": "spacePlugin.createSpace"
|
|
1141
|
-
}), /* @__PURE__ */ React16.createElement(IconButton3, {
|
|
1142
|
-
variant: "ghost",
|
|
1143
|
-
label: t("join space label"),
|
|
1144
|
-
icon: "ph--sign-in--regular",
|
|
1145
|
-
onClick: () => {
|
|
1146
|
-
void dispatch(createIntent6(SpaceAction.Join));
|
|
1147
|
-
void dispatch(createIntent6(LayoutAction5.UpdatePopover, {
|
|
1148
|
-
part: "popover",
|
|
1149
|
-
options: {
|
|
1150
|
-
variant: "react",
|
|
1151
|
-
anchorId: "",
|
|
1152
|
-
state: false
|
|
1153
|
-
}
|
|
1154
|
-
}));
|
|
1155
|
-
},
|
|
1156
|
-
"data-testid": "spacePlugin.joinSpace"
|
|
1157
|
-
}));
|
|
1158
|
-
};
|
|
1159
|
-
|
|
1160
1114
|
// packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx
|
|
1161
|
-
import
|
|
1162
|
-
import { createIntent as
|
|
1115
|
+
import React16, { useCallback as useCallback10, useRef as useRef4, useState as useState7 } from "react";
|
|
1116
|
+
import { createIntent as createIntent6, LayoutAction as LayoutAction5, useIntentDispatcher as useIntentDispatcher6 } from "@dxos/app-framework";
|
|
1163
1117
|
import { log as log2 } from "@dxos/log";
|
|
1164
|
-
import { Button as Button5, Input as Input3, useTranslation as
|
|
1118
|
+
import { Button as Button5, Input as Input3, useTranslation as useTranslation14 } from "@dxos/react-ui";
|
|
1165
1119
|
var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx";
|
|
1166
1120
|
var POPOVER_RENAME_OBJECT = `${SPACE_PLUGIN}/PopoverRenameObject`;
|
|
1167
1121
|
var PopoverRenameObject = ({ object: obj }) => {
|
|
1168
|
-
const { t } =
|
|
1122
|
+
const { t } = useTranslation14(SPACE_PLUGIN);
|
|
1169
1123
|
const doneButton = useRef4(null);
|
|
1170
1124
|
const object = obj;
|
|
1171
1125
|
const [name, setName] = useState7(object.name || object.title || "");
|
|
1172
|
-
const { dispatchPromise: dispatch } =
|
|
1126
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher6();
|
|
1173
1127
|
const handleDone = useCallback10(() => {
|
|
1174
1128
|
try {
|
|
1175
1129
|
object.name = name;
|
|
@@ -1187,7 +1141,7 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
1187
1141
|
});
|
|
1188
1142
|
}
|
|
1189
1143
|
}
|
|
1190
|
-
void dispatch(
|
|
1144
|
+
void dispatch(createIntent6(LayoutAction5.UpdatePopover, {
|
|
1191
1145
|
part: "popover",
|
|
1192
1146
|
options: {
|
|
1193
1147
|
variant: "react",
|
|
@@ -1199,21 +1153,21 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
1199
1153
|
object,
|
|
1200
1154
|
name
|
|
1201
1155
|
]);
|
|
1202
|
-
return /* @__PURE__ */
|
|
1156
|
+
return /* @__PURE__ */ React16.createElement("div", {
|
|
1203
1157
|
role: "none",
|
|
1204
1158
|
className: "p-1 flex gap-2"
|
|
1205
|
-
}, /* @__PURE__ */
|
|
1159
|
+
}, /* @__PURE__ */ React16.createElement("div", {
|
|
1206
1160
|
role: "none",
|
|
1207
1161
|
className: "flex-1"
|
|
1208
|
-
}, /* @__PURE__ */
|
|
1162
|
+
}, /* @__PURE__ */ React16.createElement(Input3.Root, null, /* @__PURE__ */ React16.createElement(Input3.Label, {
|
|
1209
1163
|
srOnly: true
|
|
1210
|
-
}, t("object name label")), /* @__PURE__ */
|
|
1164
|
+
}, t("object name label")), /* @__PURE__ */ React16.createElement(Input3.TextInput, {
|
|
1211
1165
|
placeholder: t("object placeholder"),
|
|
1212
1166
|
value: name,
|
|
1213
1167
|
"data-testid": "spacePlugin.renameObject.input",
|
|
1214
1168
|
onChange: ({ target: { value } }) => setName(value),
|
|
1215
1169
|
onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
|
|
1216
|
-
}))), /* @__PURE__ */
|
|
1170
|
+
}))), /* @__PURE__ */ React16.createElement(Button5, {
|
|
1217
1171
|
ref: doneButton,
|
|
1218
1172
|
classNames: "self-stretch",
|
|
1219
1173
|
onClick: handleDone
|
|
@@ -1223,18 +1177,18 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
1223
1177
|
};
|
|
1224
1178
|
|
|
1225
1179
|
// packages/plugins/plugin-space/src/components/PopoverRenameSpace.tsx
|
|
1226
|
-
import
|
|
1227
|
-
import { createIntent as
|
|
1228
|
-
import { Button as Button6, Input as Input4, Popover, useTranslation as
|
|
1180
|
+
import React17, { useCallback as useCallback11, useRef as useRef5, useState as useState8 } from "react";
|
|
1181
|
+
import { createIntent as createIntent7, LayoutAction as LayoutAction6, useIntentDispatcher as useIntentDispatcher7 } from "@dxos/app-framework";
|
|
1182
|
+
import { Button as Button6, Input as Input4, Popover, useTranslation as useTranslation15 } from "@dxos/react-ui";
|
|
1229
1183
|
var POPOVER_RENAME_SPACE = `${SPACE_PLUGIN}/PopoverRenameSpace`;
|
|
1230
1184
|
var PopoverRenameSpace = ({ space }) => {
|
|
1231
|
-
const { t } =
|
|
1185
|
+
const { t } = useTranslation15(SPACE_PLUGIN);
|
|
1232
1186
|
const doneButton = useRef5(null);
|
|
1233
1187
|
const [name, setName] = useState8(space.properties.name ?? "");
|
|
1234
|
-
const { dispatchPromise: dispatch } =
|
|
1188
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher7();
|
|
1235
1189
|
const handleDone = useCallback11(() => {
|
|
1236
1190
|
space.properties.name = name;
|
|
1237
|
-
void dispatch(
|
|
1191
|
+
void dispatch(createIntent7(LayoutAction6.UpdatePopover, {
|
|
1238
1192
|
part: "popover",
|
|
1239
1193
|
options: {
|
|
1240
1194
|
variant: "react",
|
|
@@ -1246,24 +1200,24 @@ var PopoverRenameSpace = ({ space }) => {
|
|
|
1246
1200
|
space,
|
|
1247
1201
|
name
|
|
1248
1202
|
]);
|
|
1249
|
-
return /* @__PURE__ */
|
|
1203
|
+
return /* @__PURE__ */ React17.createElement("div", {
|
|
1250
1204
|
role: "none",
|
|
1251
1205
|
className: "p-1 flex gap-2"
|
|
1252
|
-
}, /* @__PURE__ */
|
|
1206
|
+
}, /* @__PURE__ */ React17.createElement("div", {
|
|
1253
1207
|
role: "none",
|
|
1254
1208
|
className: "flex-1"
|
|
1255
|
-
}, /* @__PURE__ */
|
|
1209
|
+
}, /* @__PURE__ */ React17.createElement(Input4.Root, null, /* @__PURE__ */ React17.createElement(Input4.Label, {
|
|
1256
1210
|
srOnly: true
|
|
1257
|
-
}, t("space name label")), /* @__PURE__ */
|
|
1211
|
+
}, t("space name label")), /* @__PURE__ */ React17.createElement(Input4.TextInput, {
|
|
1258
1212
|
defaultValue: space.properties.name ?? "",
|
|
1259
1213
|
placeholder: t("unnamed space label"),
|
|
1260
1214
|
onChange: ({ target: { value } }) => setName(value),
|
|
1261
1215
|
// TODO(wittjosiah): Ideally this should access the popover context to close the popover.
|
|
1262
1216
|
// Currently this is not possible because Radix does not expose the popover context.
|
|
1263
1217
|
onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
|
|
1264
|
-
}))), /* @__PURE__ */
|
|
1218
|
+
}))), /* @__PURE__ */ React17.createElement(Popover.Close, {
|
|
1265
1219
|
asChild: true
|
|
1266
|
-
}, /* @__PURE__ */
|
|
1220
|
+
}, /* @__PURE__ */ React17.createElement(Button6, {
|
|
1267
1221
|
ref: doneButton,
|
|
1268
1222
|
classNames: "self-stretch",
|
|
1269
1223
|
onClick: handleDone
|
|
@@ -1273,8 +1227,8 @@ var PopoverRenameSpace = ({ space }) => {
|
|
|
1273
1227
|
};
|
|
1274
1228
|
|
|
1275
1229
|
// packages/plugins/plugin-space/src/components/SchemaContainer.tsx
|
|
1276
|
-
import
|
|
1277
|
-
import { useTranslation as
|
|
1230
|
+
import React18, { useState as useState9, useEffect as useEffect4 } from "react";
|
|
1231
|
+
import { useTranslation as useTranslation16 } from "@dxos/react-ui";
|
|
1278
1232
|
import { controlItemClasses, ControlPage as ControlPage2, ControlSection as ControlSection2 } from "@dxos/react-ui-form";
|
|
1279
1233
|
import { StackItem as StackItem3 } from "@dxos/react-ui-stack";
|
|
1280
1234
|
var useQuerySpaceSchemas = (space) => {
|
|
@@ -1291,31 +1245,31 @@ var useQuerySpaceSchemas = (space) => {
|
|
|
1291
1245
|
return schemas;
|
|
1292
1246
|
};
|
|
1293
1247
|
var SchemaContainer = ({ space }) => {
|
|
1294
|
-
const { t } =
|
|
1248
|
+
const { t } = useTranslation16(SPACE_PLUGIN);
|
|
1295
1249
|
const schemas = useQuerySpaceSchemas(space);
|
|
1296
|
-
return /* @__PURE__ */
|
|
1250
|
+
return /* @__PURE__ */ React18.createElement(StackItem3.Content, {
|
|
1297
1251
|
classNames: "block overflow-y-auto"
|
|
1298
|
-
}, /* @__PURE__ */
|
|
1252
|
+
}, /* @__PURE__ */ React18.createElement(ControlPage2, null, /* @__PURE__ */ React18.createElement(ControlSection2, {
|
|
1299
1253
|
title: t("schema verbose label"),
|
|
1300
1254
|
description: t("schema description")
|
|
1301
|
-
}, /* @__PURE__ */
|
|
1255
|
+
}, /* @__PURE__ */ React18.createElement("div", {
|
|
1302
1256
|
role: "none",
|
|
1303
1257
|
className: controlItemClasses
|
|
1304
|
-
}, schemas.length === 0 && /* @__PURE__ */
|
|
1258
|
+
}, schemas.length === 0 && /* @__PURE__ */ React18.createElement("div", {
|
|
1305
1259
|
className: "text-center plb-4"
|
|
1306
|
-
}, t("no schemas found message")), schemas.map((schema) => /* @__PURE__ */
|
|
1260
|
+
}, t("no schemas found message")), schemas.map((schema) => /* @__PURE__ */ React18.createElement("div", {
|
|
1307
1261
|
key: schema.id
|
|
1308
|
-
}, /* @__PURE__ */
|
|
1262
|
+
}, /* @__PURE__ */ React18.createElement("div", null, schema.typename)))))));
|
|
1309
1263
|
};
|
|
1310
1264
|
|
|
1311
1265
|
// packages/plugins/plugin-space/src/components/SpacePresence.tsx
|
|
1312
|
-
import
|
|
1266
|
+
import React19, { forwardRef, useCallback as useCallback12, useEffect as useEffect5, useState as useState10 } from "react";
|
|
1313
1267
|
import { useAppGraph as useAppGraph2, useCapability } from "@dxos/app-framework";
|
|
1314
1268
|
import { generateName } from "@dxos/display-name";
|
|
1315
1269
|
import { PublicKey, useClient as useClient5 } from "@dxos/react-client";
|
|
1316
1270
|
import { getSpace as getSpace3, useMembers, fullyQualifiedId as fullyQualifiedId3 } from "@dxos/react-client/echo";
|
|
1317
1271
|
import { useIdentity } from "@dxos/react-client/halo";
|
|
1318
|
-
import { Avatar, Tooltip as Tooltip2, useTranslation as
|
|
1272
|
+
import { Avatar, Tooltip as Tooltip2, Popover as Popover2, useTranslation as useTranslation17, List as List2, ListItem as ListItem2, useDefaultValue } from "@dxos/react-ui";
|
|
1319
1273
|
import { AttentionGlyph, useAttended, useAttention } from "@dxos/react-ui-attention";
|
|
1320
1274
|
import { ComplexMap, keyToFallback } from "@dxos/util";
|
|
1321
1275
|
var REFRESH_INTERVAL = 5e3;
|
|
@@ -1351,7 +1305,7 @@ var SpacePresence = ({ object, spaceKey }) => {
|
|
|
1351
1305
|
lastSeen
|
|
1352
1306
|
};
|
|
1353
1307
|
}).toSorted((a, b) => a.lastSeen - b.lastSeen);
|
|
1354
|
-
return /* @__PURE__ */
|
|
1308
|
+
return /* @__PURE__ */ React19.createElement(FullPresence, {
|
|
1355
1309
|
members: membersForObject
|
|
1356
1310
|
});
|
|
1357
1311
|
};
|
|
@@ -1361,40 +1315,39 @@ var FullPresence = (props) => {
|
|
|
1361
1315
|
if (members.length === 0) {
|
|
1362
1316
|
return null;
|
|
1363
1317
|
}
|
|
1364
|
-
return /* @__PURE__ */
|
|
1318
|
+
return /* @__PURE__ */ React19.createElement("div", {
|
|
1365
1319
|
className: "dx-avatar-group",
|
|
1366
1320
|
"data-testid": "spacePlugin.presence"
|
|
1367
|
-
}, members.slice(0, 3).map((member, i) => /* @__PURE__ */
|
|
1368
|
-
key: member.identity.identityKey.toHex()
|
|
1369
|
-
|
|
1321
|
+
}, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React19.createElement(Tooltip2.Trigger, {
|
|
1322
|
+
key: member.identity.identityKey.toHex(),
|
|
1323
|
+
side: "bottom",
|
|
1324
|
+
content: getName(member.identity),
|
|
1370
1325
|
className: "grid focus:outline-none"
|
|
1371
|
-
}, /* @__PURE__ */
|
|
1326
|
+
}, /* @__PURE__ */ React19.createElement(PresenceAvatar, {
|
|
1372
1327
|
identity: member.identity,
|
|
1373
1328
|
match: member.currentlyAttended,
|
|
1374
1329
|
index: members.length - i,
|
|
1375
1330
|
onClick: () => onMemberClick?.(member),
|
|
1376
1331
|
size
|
|
1377
|
-
})), /* @__PURE__ */
|
|
1378
|
-
side: "bottom"
|
|
1379
|
-
}, /* @__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, {
|
|
1332
|
+
}))), members.length > 3 && /* @__PURE__ */ React19.createElement(Popover2.Root, null, /* @__PURE__ */ React19.createElement(Popover2.Trigger, {
|
|
1380
1333
|
className: "grid focus:outline-none"
|
|
1381
|
-
}, /* @__PURE__ */
|
|
1334
|
+
}, /* @__PURE__ */ React19.createElement(Avatar.Root, null, /* @__PURE__ */ React19.createElement(Avatar.Content, {
|
|
1382
1335
|
status: "inactive",
|
|
1383
1336
|
style: {
|
|
1384
1337
|
zIndex: members.length - 4
|
|
1385
1338
|
},
|
|
1386
1339
|
fallback: `+${members.length - 3}`,
|
|
1387
1340
|
size
|
|
1388
|
-
}))), /* @__PURE__ */
|
|
1341
|
+
}))), /* @__PURE__ */ React19.createElement(Popover2.Portal, null, /* @__PURE__ */ React19.createElement(Popover2.Content, {
|
|
1389
1342
|
side: "bottom"
|
|
1390
|
-
}, /* @__PURE__ */
|
|
1343
|
+
}, /* @__PURE__ */ React19.createElement(Popover2.Arrow, null), /* @__PURE__ */ React19.createElement(List2, {
|
|
1391
1344
|
classNames: "max-h-56 overflow-y-auto"
|
|
1392
|
-
}, members.map((member) => /* @__PURE__ */
|
|
1345
|
+
}, members.map((member) => /* @__PURE__ */ React19.createElement(ListItem2.Root, {
|
|
1393
1346
|
key: member.identity.identityKey.toHex(),
|
|
1394
1347
|
classNames: "flex gap-2 items-center cursor-pointer mbe-2",
|
|
1395
1348
|
onClick: () => onMemberClick?.(member),
|
|
1396
1349
|
"data-testid": "identity-list-item"
|
|
1397
|
-
}, /* @__PURE__ */
|
|
1350
|
+
}, /* @__PURE__ */ React19.createElement(PresenceAvatar, {
|
|
1398
1351
|
identity: member.identity,
|
|
1399
1352
|
size,
|
|
1400
1353
|
showName: true,
|
|
@@ -1404,7 +1357,7 @@ var FullPresence = (props) => {
|
|
|
1404
1357
|
var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, index, onClick, size }, forwardedRef) => {
|
|
1405
1358
|
const status = match ? "current" : "active";
|
|
1406
1359
|
const fallbackValue = keyToFallback(identity.identityKey);
|
|
1407
|
-
return /* @__PURE__ */
|
|
1360
|
+
return /* @__PURE__ */ React19.createElement(Avatar.Root, null, /* @__PURE__ */ React19.createElement(Avatar.Content, {
|
|
1408
1361
|
status,
|
|
1409
1362
|
hue: identity.profile?.data?.hue || fallbackValue.hue,
|
|
1410
1363
|
"data-testid": "spacePlugin.presence.member",
|
|
@@ -1418,7 +1371,7 @@ var PresenceAvatar = /* @__PURE__ */ forwardRef(({ identity, showName, match, in
|
|
|
1418
1371
|
onClick,
|
|
1419
1372
|
fallback: identity.profile?.data?.emoji || fallbackValue.emoji,
|
|
1420
1373
|
ref: forwardedRef
|
|
1421
|
-
}), /* @__PURE__ */
|
|
1374
|
+
}), /* @__PURE__ */ React19.createElement(Avatar.Label, {
|
|
1422
1375
|
classNames: showName ? "text-sm truncate pli-2" : "sr-only"
|
|
1423
1376
|
}, getName(identity)));
|
|
1424
1377
|
});
|
|
@@ -1446,61 +1399,61 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
|
1446
1399
|
}, [
|
|
1447
1400
|
viewers
|
|
1448
1401
|
]);
|
|
1449
|
-
return /* @__PURE__ */
|
|
1402
|
+
return /* @__PURE__ */ React19.createElement(SmallPresence, {
|
|
1450
1403
|
count: activeViewers.length,
|
|
1451
1404
|
attended: isAttended,
|
|
1452
1405
|
containsAttended
|
|
1453
1406
|
});
|
|
1454
1407
|
};
|
|
1455
1408
|
var SmallPresence = ({ count = 0, attended, containsAttended }) => {
|
|
1456
|
-
const { t } =
|
|
1457
|
-
return /* @__PURE__ */
|
|
1458
|
-
asChild: true
|
|
1459
|
-
|
|
1409
|
+
const { t } = useTranslation17(SPACE_PLUGIN);
|
|
1410
|
+
return /* @__PURE__ */ React19.createElement(Tooltip2.Trigger, {
|
|
1411
|
+
asChild: true,
|
|
1412
|
+
content: t("presence label", {
|
|
1413
|
+
count
|
|
1414
|
+
}),
|
|
1415
|
+
side: "bottom"
|
|
1416
|
+
}, /* @__PURE__ */ React19.createElement(AttentionGlyph, {
|
|
1460
1417
|
attended,
|
|
1461
1418
|
containsAttended,
|
|
1462
1419
|
presence: count > 1 ? "many" : count === 1 ? "one" : "none",
|
|
1463
1420
|
classNames: "self-center mie-1"
|
|
1464
|
-
}))
|
|
1465
|
-
side: "bottom"
|
|
1466
|
-
}, /* @__PURE__ */ React20.createElement("span", null, t("presence label", {
|
|
1467
|
-
count
|
|
1468
|
-
})), /* @__PURE__ */ React20.createElement(Tooltip2.Arrow, null))));
|
|
1421
|
+
}));
|
|
1469
1422
|
};
|
|
1470
1423
|
|
|
1471
1424
|
// packages/plugins/plugin-space/src/components/SpacePluginSettings.tsx
|
|
1472
|
-
import
|
|
1473
|
-
import { createIntent as
|
|
1425
|
+
import React20 from "react";
|
|
1426
|
+
import { createIntent as createIntent8, useIntentDispatcher as useIntentDispatcher8 } from "@dxos/app-framework";
|
|
1474
1427
|
import { useClient as useClient6 } from "@dxos/react-client";
|
|
1475
1428
|
import { useSpaces as useSpaces2 } from "@dxos/react-client/echo";
|
|
1476
|
-
import { Input as Input5, toLocalizedString as toLocalizedString3, useTranslation as
|
|
1429
|
+
import { Input as Input5, toLocalizedString as toLocalizedString3, useTranslation as useTranslation18, List as List3, ListItem as ListItem3, Button as Button7 } from "@dxos/react-ui";
|
|
1477
1430
|
import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
|
|
1478
1431
|
var SpacePluginSettings = ({ settings }) => {
|
|
1479
|
-
const { t } =
|
|
1480
|
-
const { dispatchPromise: dispatch } =
|
|
1432
|
+
const { t } = useTranslation18(SPACE_PLUGIN);
|
|
1433
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher8();
|
|
1481
1434
|
const client = useClient6();
|
|
1482
1435
|
const spaces = useSpaces2({
|
|
1483
1436
|
all: settings.showHidden
|
|
1484
1437
|
});
|
|
1485
|
-
return /* @__PURE__ */
|
|
1438
|
+
return /* @__PURE__ */ React20.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React20.createElement(DeprecatedFormInput, {
|
|
1486
1439
|
label: t("show hidden spaces label")
|
|
1487
|
-
}, /* @__PURE__ */
|
|
1440
|
+
}, /* @__PURE__ */ React20.createElement(Input5.Switch, {
|
|
1488
1441
|
checked: settings.showHidden,
|
|
1489
1442
|
onCheckedChange: (checked) => settings.showHidden = !!checked
|
|
1490
|
-
})), /* @__PURE__ */
|
|
1443
|
+
})), /* @__PURE__ */ React20.createElement("div", {
|
|
1491
1444
|
role: "none"
|
|
1492
|
-
}, /* @__PURE__ */
|
|
1445
|
+
}, /* @__PURE__ */ React20.createElement("h2", {
|
|
1493
1446
|
className: "text-xl my-4"
|
|
1494
|
-
}, "Space Settings"), /* @__PURE__ */
|
|
1447
|
+
}, "Space Settings"), /* @__PURE__ */ React20.createElement(List3, {
|
|
1495
1448
|
classNames: "max-w-md mx-auto"
|
|
1496
|
-
}, spaces.map((space) => /* @__PURE__ */
|
|
1449
|
+
}, spaces.map((space) => /* @__PURE__ */ React20.createElement(ListItem3.Root, {
|
|
1497
1450
|
key: space.id
|
|
1498
|
-
}, /* @__PURE__ */
|
|
1451
|
+
}, /* @__PURE__ */ React20.createElement(ListItem3.Heading, {
|
|
1499
1452
|
classNames: "flex flex-col grow truncate mbe-2"
|
|
1500
1453
|
}, toLocalizedString3(getSpaceDisplayName(space, {
|
|
1501
1454
|
personal: space === client.spaces.default
|
|
1502
|
-
}), t)), /* @__PURE__ */
|
|
1503
|
-
onClick: () => dispatch(
|
|
1455
|
+
}), t)), /* @__PURE__ */ React20.createElement(ListItem3.Endcap, null, /* @__PURE__ */ React20.createElement(Button7, {
|
|
1456
|
+
onClick: () => dispatch(createIntent8(SpaceAction.OpenSettings, {
|
|
1504
1457
|
space
|
|
1505
1458
|
}))
|
|
1506
1459
|
}, t("open space settings label"))))))));
|
|
@@ -1508,13 +1461,13 @@ var SpacePluginSettings = ({ settings }) => {
|
|
|
1508
1461
|
|
|
1509
1462
|
// packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsContainer.tsx
|
|
1510
1463
|
import { pipe as pipe2, Schema } from "effect";
|
|
1511
|
-
import
|
|
1512
|
-
import { chain as chain2, createIntent as
|
|
1464
|
+
import React21, { useCallback as useCallback13, useMemo as useMemo3, useState as useState11 } from "react";
|
|
1465
|
+
import { chain as chain2, createIntent as createIntent9, LayoutAction as LayoutAction7, useIntentDispatcher as useIntentDispatcher9 } from "@dxos/app-framework";
|
|
1513
1466
|
import { log as log3 } from "@dxos/log";
|
|
1514
1467
|
import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
1515
1468
|
import { useClient as useClient7 } from "@dxos/react-client";
|
|
1516
1469
|
import { SpaceState as SpaceState2 } from "@dxos/react-client/echo";
|
|
1517
|
-
import { Button as Button8, Input as Input6, useMulticastObservable, useTranslation as
|
|
1470
|
+
import { Button as Button8, Input as Input6, useMulticastObservable, useTranslation as useTranslation19 } from "@dxos/react-ui";
|
|
1518
1471
|
import { Form as Form4, ControlItem, ControlItemInput as ControlItemInput2, ControlSection as ControlSection3, ControlPage as ControlPage3 } from "@dxos/react-ui-form";
|
|
1519
1472
|
import { HuePicker, IconPicker } from "@dxos/react-ui-pickers";
|
|
1520
1473
|
import { StackItem as StackItem4 } from "@dxos/react-ui-stack";
|
|
@@ -1525,8 +1478,8 @@ var FormSchema = SpaceForm.pipe(Schema.extend(Schema.Struct({
|
|
|
1525
1478
|
})
|
|
1526
1479
|
})));
|
|
1527
1480
|
var SpaceSettingsContainer = ({ space }) => {
|
|
1528
|
-
const { t } =
|
|
1529
|
-
const { dispatchPromise: dispatch } =
|
|
1481
|
+
const { t } = useTranslation19(SPACE_PLUGIN);
|
|
1482
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher9();
|
|
1530
1483
|
const client = useClient7();
|
|
1531
1484
|
const archived = useMulticastObservable(space.state) === SpaceState2.SPACE_INACTIVE;
|
|
1532
1485
|
const [edgeReplication, setEdgeReplication] = useState11(space.internal.data.edgeReplication === EdgeReplicationSetting.ENABLED);
|
|
@@ -1556,14 +1509,14 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1556
1509
|
space.properties.hue = properties.hue;
|
|
1557
1510
|
}
|
|
1558
1511
|
if (properties.archived && !archived) {
|
|
1559
|
-
void dispatch(pipe2(
|
|
1512
|
+
void dispatch(pipe2(createIntent9(SpaceAction.Close, {
|
|
1560
1513
|
space
|
|
1561
|
-
}), chain2(
|
|
1514
|
+
}), chain2(LayoutAction7.SwitchWorkspace, {
|
|
1562
1515
|
part: "workspace",
|
|
1563
1516
|
subject: client.spaces.default.id
|
|
1564
1517
|
})));
|
|
1565
1518
|
} else if (!properties.archived && archived) {
|
|
1566
|
-
void dispatch(
|
|
1519
|
+
void dispatch(createIntent9(SpaceAction.Open, {
|
|
1567
1520
|
space
|
|
1568
1521
|
}));
|
|
1569
1522
|
}
|
|
@@ -1591,10 +1544,10 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1591
1544
|
onValueChange,
|
|
1592
1545
|
type
|
|
1593
1546
|
]);
|
|
1594
|
-
return /* @__PURE__ */
|
|
1547
|
+
return /* @__PURE__ */ React21.createElement(ControlItemInput2, {
|
|
1595
1548
|
title: label,
|
|
1596
1549
|
description: t("display name description")
|
|
1597
|
-
}, /* @__PURE__ */
|
|
1550
|
+
}, /* @__PURE__ */ React21.createElement(Input6.TextInput, {
|
|
1598
1551
|
value: getValue(),
|
|
1599
1552
|
onChange: handleChange,
|
|
1600
1553
|
placeholder: t("display name input placeholder"),
|
|
@@ -1610,10 +1563,10 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1610
1563
|
onValueChange,
|
|
1611
1564
|
type
|
|
1612
1565
|
]);
|
|
1613
|
-
return /* @__PURE__ */
|
|
1566
|
+
return /* @__PURE__ */ React21.createElement(ControlItem, {
|
|
1614
1567
|
title: label,
|
|
1615
1568
|
description: t("icon description")
|
|
1616
|
-
}, /* @__PURE__ */
|
|
1569
|
+
}, /* @__PURE__ */ React21.createElement(IconPicker, {
|
|
1617
1570
|
value: getValue(),
|
|
1618
1571
|
onChange: handleChange,
|
|
1619
1572
|
onReset: handleEmojiReset,
|
|
@@ -1630,10 +1583,10 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1630
1583
|
onValueChange,
|
|
1631
1584
|
type
|
|
1632
1585
|
]);
|
|
1633
|
-
return /* @__PURE__ */
|
|
1586
|
+
return /* @__PURE__ */ React21.createElement(ControlItem, {
|
|
1634
1587
|
title: label,
|
|
1635
1588
|
description: t("hue description")
|
|
1636
|
-
}, /* @__PURE__ */
|
|
1589
|
+
}, /* @__PURE__ */ React21.createElement(HuePicker, {
|
|
1637
1590
|
value: getValue(),
|
|
1638
1591
|
onChange: handleChange,
|
|
1639
1592
|
onReset: handleHueReset,
|
|
@@ -1645,10 +1598,10 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1645
1598
|
onValueChange,
|
|
1646
1599
|
type
|
|
1647
1600
|
]);
|
|
1648
|
-
return /* @__PURE__ */
|
|
1601
|
+
return /* @__PURE__ */ React21.createElement(ControlItemInput2, {
|
|
1649
1602
|
title: label,
|
|
1650
1603
|
description: t("edge replication description")
|
|
1651
|
-
}, /* @__PURE__ */
|
|
1604
|
+
}, /* @__PURE__ */ React21.createElement(Input6.Switch, {
|
|
1652
1605
|
checked: getValue(),
|
|
1653
1606
|
onCheckedChange: handleChange,
|
|
1654
1607
|
classNames: "justify-self-end"
|
|
@@ -1660,10 +1613,10 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1660
1613
|
type,
|
|
1661
1614
|
getValue
|
|
1662
1615
|
]);
|
|
1663
|
-
return /* @__PURE__ */
|
|
1616
|
+
return /* @__PURE__ */ React21.createElement(ControlItemInput2, {
|
|
1664
1617
|
title: label,
|
|
1665
1618
|
description: t("archive space description")
|
|
1666
|
-
}, /* @__PURE__ */
|
|
1619
|
+
}, /* @__PURE__ */ React21.createElement(Button8, {
|
|
1667
1620
|
disabled: space === client.spaces.default,
|
|
1668
1621
|
onClick: handleChange
|
|
1669
1622
|
}, getValue() ? t("unarchive space label") : t("archive space label")));
|
|
@@ -1672,16 +1625,16 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1672
1625
|
t,
|
|
1673
1626
|
space
|
|
1674
1627
|
]);
|
|
1675
|
-
return /* @__PURE__ */
|
|
1628
|
+
return /* @__PURE__ */ React21.createElement(StackItem4.Content, {
|
|
1676
1629
|
classNames: "block overflow-y-auto pli-2"
|
|
1677
|
-
}, /* @__PURE__ */
|
|
1630
|
+
}, /* @__PURE__ */ React21.createElement(ControlPage3, null, /* @__PURE__ */ React21.createElement(ControlSection3, {
|
|
1678
1631
|
title: t("space properties settings verbose label", {
|
|
1679
1632
|
ns: SPACE_PLUGIN
|
|
1680
1633
|
}),
|
|
1681
1634
|
description: t("space properties settings description", {
|
|
1682
1635
|
ns: SPACE_PLUGIN
|
|
1683
1636
|
})
|
|
1684
|
-
}, /* @__PURE__ */
|
|
1637
|
+
}, /* @__PURE__ */ React21.createElement(Form4, {
|
|
1685
1638
|
schema: FormSchema,
|
|
1686
1639
|
values,
|
|
1687
1640
|
autoSave: true,
|
|
@@ -1692,13 +1645,13 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1692
1645
|
};
|
|
1693
1646
|
|
|
1694
1647
|
// packages/plugins/plugin-space/src/components/SyncStatus/InlineSyncStatus.tsx
|
|
1695
|
-
import
|
|
1648
|
+
import React22, { useEffect as useEffect6, useState as useState12 } from "react";
|
|
1696
1649
|
import { useAppGraph as useAppGraph3 } from "@dxos/app-framework";
|
|
1697
1650
|
import { EdgeStatus } from "@dxos/protocols/proto/dxos/client/services";
|
|
1698
1651
|
import { EdgeReplicationSetting as EdgeReplicationSetting2 } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
1699
1652
|
import { useClient as useClient8 } from "@dxos/react-client";
|
|
1700
1653
|
import { useSpaceSyncState } from "@dxos/react-client/echo";
|
|
1701
|
-
import { Tooltip as Tooltip3, useTranslation as
|
|
1654
|
+
import { Tooltip as Tooltip3, useTranslation as useTranslation20 } from "@dxos/react-ui";
|
|
1702
1655
|
import { AttentionGlyph as AttentionGlyph2, useAttended as useAttended2, useAttention as useAttention2 } from "@dxos/react-ui-attention";
|
|
1703
1656
|
var useEdgeStatus = () => {
|
|
1704
1657
|
const [status, setStatus] = useState12(EdgeStatus.NOT_CONNECTED);
|
|
@@ -1713,7 +1666,7 @@ var useEdgeStatus = () => {
|
|
|
1713
1666
|
return status;
|
|
1714
1667
|
};
|
|
1715
1668
|
var InlineSyncStatus = ({ space, open }) => {
|
|
1716
|
-
const { t } =
|
|
1669
|
+
const { t } = useTranslation20(SPACE_PLUGIN);
|
|
1717
1670
|
const id = space.id;
|
|
1718
1671
|
const { hasAttention, isAncestor, isRelated } = useAttention2(id);
|
|
1719
1672
|
const isAttended = hasAttention || isAncestor || isRelated;
|
|
@@ -1726,25 +1679,24 @@ var InlineSyncStatus = ({ space, open }) => {
|
|
|
1726
1679
|
const edgeSyncEnabled = space.internal.data.edgeReplication === EdgeReplicationSetting2.ENABLED;
|
|
1727
1680
|
const syncState = useSpaceSyncState(space);
|
|
1728
1681
|
const syncing = connectedToEdge && edgeSyncEnabled && syncState && syncState.missingOnLocal > 0;
|
|
1729
|
-
return /* @__PURE__ */
|
|
1730
|
-
asChild: true
|
|
1731
|
-
|
|
1682
|
+
return /* @__PURE__ */ React22.createElement(Tooltip3.Trigger, {
|
|
1683
|
+
asChild: true,
|
|
1684
|
+
content: t("syncing label"),
|
|
1685
|
+
side: "bottom"
|
|
1686
|
+
}, /* @__PURE__ */ React22.createElement(AttentionGlyph2, {
|
|
1732
1687
|
syncing,
|
|
1733
1688
|
attended: isAttended,
|
|
1734
1689
|
containsAttended,
|
|
1735
1690
|
classNames: "self-center mie-1"
|
|
1736
|
-
}))
|
|
1737
|
-
side: "bottom",
|
|
1738
|
-
classNames: "z-[70]"
|
|
1739
|
-
}, /* @__PURE__ */ React23.createElement("span", null, t("syncing label")), /* @__PURE__ */ React23.createElement(Tooltip3.Arrow, null))));
|
|
1691
|
+
}));
|
|
1740
1692
|
};
|
|
1741
1693
|
|
|
1742
1694
|
// packages/plugins/plugin-space/src/components/SyncStatus/SyncStatus.tsx
|
|
1743
|
-
import
|
|
1695
|
+
import React23, { useEffect as useEffect7, useState as useState13 } from "react";
|
|
1744
1696
|
import { StatusBar } from "@dxos/plugin-status-bar";
|
|
1745
1697
|
import { useClient as useClient9 } from "@dxos/react-client";
|
|
1746
1698
|
import { getSyncSummary, useSyncState } from "@dxos/react-client/echo";
|
|
1747
|
-
import { Icon as Icon5, useTranslation as
|
|
1699
|
+
import { Icon as Icon5, useTranslation as useTranslation21 } from "@dxos/react-ui";
|
|
1748
1700
|
|
|
1749
1701
|
// packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts
|
|
1750
1702
|
import { Context } from "@dxos/context";
|
|
@@ -1848,13 +1800,13 @@ var SyncStatus = () => {
|
|
|
1848
1800
|
setSaved(state2 === "saved");
|
|
1849
1801
|
});
|
|
1850
1802
|
}, []);
|
|
1851
|
-
return /* @__PURE__ */
|
|
1803
|
+
return /* @__PURE__ */ React23.createElement(SyncStatusIndicator, {
|
|
1852
1804
|
state,
|
|
1853
1805
|
saved
|
|
1854
1806
|
});
|
|
1855
1807
|
};
|
|
1856
1808
|
var SyncStatusIndicator = ({ state, saved }) => {
|
|
1857
|
-
const { t } =
|
|
1809
|
+
const { t } = useTranslation21(SPACE_PLUGIN);
|
|
1858
1810
|
const summary = getSyncSummary(state);
|
|
1859
1811
|
const offline = Object.values(state).length === 0;
|
|
1860
1812
|
const needsToUpload = summary.differentDocuments > 0 || summary.missingOnRemote > 0;
|
|
@@ -1881,12 +1833,12 @@ var SyncStatusIndicator = ({ state, saved }) => {
|
|
|
1881
1833
|
needsToDownload
|
|
1882
1834
|
]);
|
|
1883
1835
|
const title = t(`${status} label`);
|
|
1884
|
-
const icon = /* @__PURE__ */
|
|
1836
|
+
const icon = /* @__PURE__ */ React23.createElement(Icon5, {
|
|
1885
1837
|
icon: getIcon(status),
|
|
1886
1838
|
size: 4,
|
|
1887
1839
|
classNames
|
|
1888
1840
|
});
|
|
1889
|
-
return /* @__PURE__ */
|
|
1841
|
+
return /* @__PURE__ */ React23.createElement(StatusBar.Item, {
|
|
1890
1842
|
title
|
|
1891
1843
|
}, icon);
|
|
1892
1844
|
};
|
|
@@ -1905,8 +1857,6 @@ export {
|
|
|
1905
1857
|
MenuFooter,
|
|
1906
1858
|
ObjectSettingsContainer,
|
|
1907
1859
|
PersistenceStatus,
|
|
1908
|
-
POPOVER_ADD_SPACE,
|
|
1909
|
-
PopoverAddSpace,
|
|
1910
1860
|
POPOVER_RENAME_OBJECT,
|
|
1911
1861
|
PopoverRenameObject,
|
|
1912
1862
|
POPOVER_RENAME_SPACE,
|
|
@@ -1934,4 +1884,4 @@ export {
|
|
|
1934
1884
|
SpaceState,
|
|
1935
1885
|
SpacesReady
|
|
1936
1886
|
};
|
|
1937
|
-
//# sourceMappingURL=chunk-
|
|
1887
|
+
//# sourceMappingURL=chunk-V4VNP2WY.mjs.map
|