@dxos/plugin-space 0.8.2-main.f081794 → 0.8.2-main.f11618f
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-4226DMDP.mjs} +128 -130
- package/dist/lib/browser/chunk-4226DMDP.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-NP55M7C7.mjs} +83 -69
- package/dist/lib/browser/intent-resolver-NP55M7C7.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-DRVM5ACV.mjs → react-root-XKAUZ3X2.mjs} +4 -4
- package/dist/lib/browser/{react-surface-KODNQYDN.mjs → react-surface-2DW2UDRX.mjs} +5 -22
- package/dist/lib/browser/react-surface-2DW2UDRX.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-EI3ZPOLJ.cjs → chunk-UOCR4G2D.cjs} +6 -6
- package/dist/lib/node/{chunk-U63V2254.cjs → chunk-XADZLQAJ.cjs} +27 -27
- package/dist/lib/node/{chunk-GPZPEQXP.cjs → chunk-ZMQO74LX.cjs} +176 -178
- package/dist/lib/node/chunk-ZMQO74LX.cjs.map +7 -0
- 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-3J52ARFL.cjs} +129 -115
- package/dist/lib/node/intent-resolver-3J52ARFL.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-root-6WGN5WRQ.cjs → react-root-XUE2J7HT.cjs} +8 -8
- package/dist/lib/node/{react-surface-37AVZFPL.cjs → react-surface-IWSTOZ2E.cjs} +44 -61
- package/dist/lib/node/react-surface-IWSTOZ2E.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-PQI4D4SH.mjs} +128 -130
- package/dist/lib/node-esm/chunk-PQI4D4SH.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-MXQIFIRC.mjs} +83 -69
- package/dist/lib/node-esm/intent-resolver-MXQIFIRC.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-MSUT6S2S.mjs → react-root-ZBCJCEFS.mjs} +4 -4
- package/dist/lib/node-esm/{react-surface-G73SO23W.mjs → react-surface-JCHDAPGM.mjs} +5 -22
- package/dist/lib/node-esm/react-surface-JCHDAPGM.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/PopoverRenameSpace.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 +77 -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/PopoverRenameSpace.tsx +8 -0
- 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-XKAUZ3X2.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-XUE2J7HT.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-ZBCJCEFS.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
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_ZMQO74LX_exports = {};
|
|
30
|
+
__export(chunk_ZMQO74LX_exports, {
|
|
31
31
|
AppGraphBuilder: () => AppGraphBuilder,
|
|
32
32
|
AppGraphSerializer: () => AppGraphSerializer,
|
|
33
33
|
AwaitingObject: () => AwaitingObject,
|
|
@@ -57,8 +57,6 @@ __export(chunk_GPZPEQXP_exports, {
|
|
|
57
57
|
ReactSurface: () => ReactSurface,
|
|
58
58
|
Schema: () => Schema,
|
|
59
59
|
SchemaContainer: () => SchemaContainer,
|
|
60
|
-
ShareSpaceButton: () => ShareSpaceButton,
|
|
61
|
-
ShareSpaceButtonImpl: () => ShareSpaceButtonImpl,
|
|
62
60
|
SmallPresence: () => SmallPresence,
|
|
63
61
|
SmallPresenceLive: () => SmallPresenceLive,
|
|
64
62
|
SpacePluginSettings: () => SpacePluginSettings,
|
|
@@ -72,10 +70,10 @@ __export(chunk_GPZPEQXP_exports, {
|
|
|
72
70
|
Tools: () => Tools,
|
|
73
71
|
useQuerySpaceSchemas: () => useQuerySpaceSchemas
|
|
74
72
|
});
|
|
75
|
-
module.exports = __toCommonJS(
|
|
73
|
+
module.exports = __toCommonJS(chunk_ZMQO74LX_exports);
|
|
76
74
|
var import_chunk_IKIDS6XF = require("./chunk-IKIDS6XF.cjs");
|
|
77
|
-
var
|
|
78
|
-
var
|
|
75
|
+
var import_chunk_XADZLQAJ = require("./chunk-XADZLQAJ.cjs");
|
|
76
|
+
var import_chunk_EQ5BPSQ7 = require("./chunk-EQ5BPSQ7.cjs");
|
|
79
77
|
var import_chunk_6P2DB4QQ = require("./chunk-6P2DB4QQ.cjs");
|
|
80
78
|
var import_react = require("@phosphor-icons/react");
|
|
81
79
|
var import_react2 = __toESM(require("react"));
|
|
@@ -123,6 +121,7 @@ var import_react11 = require("@dxos/shell/react");
|
|
|
123
121
|
var import_react12 = require("@phosphor-icons/react");
|
|
124
122
|
var import_react13 = __toESM(require("react"));
|
|
125
123
|
var import_react_qr_rounded = require("react-qr-rounded");
|
|
124
|
+
var import_app_framework7 = require("@dxos/app-framework");
|
|
126
125
|
var import_log = require("@dxos/log");
|
|
127
126
|
var import_react_client4 = require("@dxos/react-client");
|
|
128
127
|
var import_echo3 = require("@dxos/react-client/echo");
|
|
@@ -139,7 +138,7 @@ var import_echo4 = require("@dxos/client/echo");
|
|
|
139
138
|
var import_react_client5 = require("@dxos/react-client");
|
|
140
139
|
var import_react_ui9 = require("@dxos/react-ui");
|
|
141
140
|
var import_react17 = __toESM(require("react"));
|
|
142
|
-
var
|
|
141
|
+
var import_app_framework8 = require("@dxos/app-framework");
|
|
143
142
|
var import_react_ui10 = require("@dxos/react-ui");
|
|
144
143
|
var import_react_ui_stack2 = require("@dxos/react-ui-stack");
|
|
145
144
|
var import_react18 = __toESM(require("react"));
|
|
@@ -158,59 +157,58 @@ var import_async2 = require("@dxos/async");
|
|
|
158
157
|
var import_react_ui14 = require("@dxos/react-ui");
|
|
159
158
|
var import_react_ui_theme6 = require("@dxos/react-ui-theme");
|
|
160
159
|
var import_react23 = __toESM(require("react"));
|
|
161
|
-
var
|
|
160
|
+
var import_app_framework9 = require("@dxos/app-framework");
|
|
162
161
|
var import_react_ui15 = require("@dxos/react-ui");
|
|
163
162
|
var import_react24 = __toESM(require("react"));
|
|
163
|
+
var import_app_framework10 = require("@dxos/app-framework");
|
|
164
164
|
var import_log2 = require("@dxos/log");
|
|
165
165
|
var import_react_ui16 = require("@dxos/react-ui");
|
|
166
166
|
var import_react25 = __toESM(require("react"));
|
|
167
|
+
var import_app_framework11 = require("@dxos/app-framework");
|
|
167
168
|
var import_react_ui17 = require("@dxos/react-ui");
|
|
168
169
|
var import_react26 = __toESM(require("react"));
|
|
169
170
|
var import_react_ui18 = require("@dxos/react-ui");
|
|
170
171
|
var import_react_ui_form5 = require("@dxos/react-ui-form");
|
|
171
172
|
var import_react_ui_stack3 = require("@dxos/react-ui-stack");
|
|
172
173
|
var import_react27 = __toESM(require("react"));
|
|
173
|
-
var
|
|
174
|
-
var import_react_ui19 = require("@dxos/react-ui");
|
|
175
|
-
var import_react28 = __toESM(require("react"));
|
|
176
|
-
var import_app_framework10 = require("@dxos/app-framework");
|
|
174
|
+
var import_app_framework12 = require("@dxos/app-framework");
|
|
177
175
|
var import_display_name = require("@dxos/display-name");
|
|
178
176
|
var import_react_client6 = require("@dxos/react-client");
|
|
179
177
|
var import_echo6 = require("@dxos/react-client/echo");
|
|
180
178
|
var import_halo = require("@dxos/react-client/halo");
|
|
181
|
-
var
|
|
179
|
+
var import_react_ui19 = require("@dxos/react-ui");
|
|
182
180
|
var import_react_ui_attention = require("@dxos/react-ui-attention");
|
|
183
181
|
var import_util3 = require("@dxos/util");
|
|
184
|
-
var
|
|
185
|
-
var
|
|
182
|
+
var import_react28 = __toESM(require("react"));
|
|
183
|
+
var import_app_framework13 = require("@dxos/app-framework");
|
|
186
184
|
var import_react_client7 = require("@dxos/react-client");
|
|
187
185
|
var import_echo7 = require("@dxos/react-client/echo");
|
|
188
|
-
var
|
|
186
|
+
var import_react_ui20 = require("@dxos/react-ui");
|
|
189
187
|
var import_react_ui_form6 = require("@dxos/react-ui-form");
|
|
190
188
|
var import_effect3 = require("effect");
|
|
191
|
-
var
|
|
192
|
-
var
|
|
189
|
+
var import_react29 = __toESM(require("react"));
|
|
190
|
+
var import_app_framework14 = require("@dxos/app-framework");
|
|
193
191
|
var import_log3 = require("@dxos/log");
|
|
194
192
|
var import_metadata = require("@dxos/protocols/proto/dxos/echo/metadata");
|
|
195
193
|
var import_react_client8 = require("@dxos/react-client");
|
|
196
194
|
var import_echo8 = require("@dxos/react-client/echo");
|
|
197
|
-
var
|
|
195
|
+
var import_react_ui21 = require("@dxos/react-ui");
|
|
198
196
|
var import_react_ui_form7 = require("@dxos/react-ui-form");
|
|
199
197
|
var import_react_ui_pickers = require("@dxos/react-ui-pickers");
|
|
200
198
|
var import_react_ui_stack4 = require("@dxos/react-ui-stack");
|
|
201
|
-
var
|
|
202
|
-
var
|
|
199
|
+
var import_react30 = __toESM(require("react"));
|
|
200
|
+
var import_app_framework15 = require("@dxos/app-framework");
|
|
203
201
|
var import_services = require("@dxos/protocols/proto/dxos/client/services");
|
|
204
202
|
var import_metadata2 = require("@dxos/protocols/proto/dxos/echo/metadata");
|
|
205
203
|
var import_react_client9 = require("@dxos/react-client");
|
|
206
204
|
var import_echo9 = require("@dxos/react-client/echo");
|
|
207
|
-
var
|
|
205
|
+
var import_react_ui22 = require("@dxos/react-ui");
|
|
208
206
|
var import_react_ui_attention2 = require("@dxos/react-ui-attention");
|
|
209
|
-
var
|
|
207
|
+
var import_react31 = __toESM(require("react"));
|
|
210
208
|
var import_plugin_status_bar = require("@dxos/plugin-status-bar");
|
|
211
209
|
var import_react_client10 = require("@dxos/react-client");
|
|
212
210
|
var import_echo10 = require("@dxos/react-client/echo");
|
|
213
|
-
var
|
|
211
|
+
var import_react_ui23 = require("@dxos/react-ui");
|
|
214
212
|
var import_context = require("@dxos/context");
|
|
215
213
|
var WAIT_FOR_OBJECT_TIMEOUT = 18e4;
|
|
216
214
|
var TOAST_TIMEOUT = 24e4;
|
|
@@ -246,7 +244,7 @@ var AwaitingObject = ({ id }) => {
|
|
|
246
244
|
objects,
|
|
247
245
|
layout
|
|
248
246
|
]);
|
|
249
|
-
const handleClose = (0, import_react2.useCallback)(async () => dispatch((0, import_app_framework.createIntent)(
|
|
247
|
+
const handleClose = (0, import_react2.useCallback)(async () => dispatch((0, import_app_framework.createIntent)(import_chunk_EQ5BPSQ7.SpaceAction.WaitForObject, {
|
|
250
248
|
id: void 0
|
|
251
249
|
})), [
|
|
252
250
|
dispatch
|
|
@@ -447,23 +445,23 @@ var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
|
|
|
447
445
|
}), /* @__PURE__ */ import_react4.default.createElement(import_react_ui_searchlist.SearchList.Content, {
|
|
448
446
|
classNames: "max-bs-[24rem] overflow-auto"
|
|
449
447
|
}, spaces.sort((a, b) => {
|
|
450
|
-
const aName = (0, import_react_ui3.toLocalizedString)((0,
|
|
448
|
+
const aName = (0, import_react_ui3.toLocalizedString)((0, import_chunk_XADZLQAJ.getSpaceDisplayName)(a, {
|
|
451
449
|
personal: a.id === defaultSpaceId
|
|
452
450
|
}), t);
|
|
453
|
-
const bName = (0, import_react_ui3.toLocalizedString)((0,
|
|
451
|
+
const bName = (0, import_react_ui3.toLocalizedString)((0, import_chunk_XADZLQAJ.getSpaceDisplayName)(b, {
|
|
454
452
|
personal: b.id === defaultSpaceId
|
|
455
453
|
}), t);
|
|
456
454
|
return aName.localeCompare(bName);
|
|
457
455
|
}).map((space) => /* @__PURE__ */ import_react4.default.createElement(import_react_ui_searchlist.SearchList.Item, {
|
|
458
456
|
key: space.id,
|
|
459
|
-
value: (0, import_react_ui3.toLocalizedString)((0,
|
|
457
|
+
value: (0, import_react_ui3.toLocalizedString)((0, import_chunk_XADZLQAJ.getSpaceDisplayName)(space, {
|
|
460
458
|
personal: space.id === defaultSpaceId
|
|
461
459
|
}), t),
|
|
462
460
|
onSelect: () => onChange(space),
|
|
463
461
|
classNames: "flex items-center gap-2"
|
|
464
462
|
}, /* @__PURE__ */ import_react4.default.createElement("span", {
|
|
465
463
|
className: "grow truncate"
|
|
466
|
-
}, (0, import_react_ui3.toLocalizedString)((0,
|
|
464
|
+
}, (0, import_react_ui3.toLocalizedString)((0, import_chunk_XADZLQAJ.getSpaceDisplayName)(space, {
|
|
467
465
|
personal: space.id === defaultSpaceId
|
|
468
466
|
}), t))))));
|
|
469
467
|
};
|
|
@@ -497,17 +495,17 @@ var SelectSchema = ({ options, resolve, onChange }) => {
|
|
|
497
495
|
defaultValue: option.typename
|
|
498
496
|
}))))));
|
|
499
497
|
};
|
|
500
|
-
var AppGraphBuilder = (0, import_app_framework4.lazy)(() => import("./app-graph-builder-
|
|
501
|
-
var AppGraphSerializer = (0, import_app_framework4.lazy)(() => import("./app-graph-serializer-
|
|
502
|
-
var IdentityCreated = (0, import_app_framework4.lazy)(() => import("./identity-created-
|
|
503
|
-
var IntentResolver = (0, import_app_framework4.lazy)(() => import("./intent-resolver-
|
|
504
|
-
var ReactRoot = (0, import_app_framework4.lazy)(() => import("./react-root-
|
|
505
|
-
var ReactSurface = (0, import_app_framework4.lazy)(() => import("./react-surface-
|
|
498
|
+
var AppGraphBuilder = (0, import_app_framework4.lazy)(() => import("./app-graph-builder-LLIV422L.cjs"));
|
|
499
|
+
var AppGraphSerializer = (0, import_app_framework4.lazy)(() => import("./app-graph-serializer-M6Z2OPA4.cjs"));
|
|
500
|
+
var IdentityCreated = (0, import_app_framework4.lazy)(() => import("./identity-created-YDTRMOMX.cjs"));
|
|
501
|
+
var IntentResolver = (0, import_app_framework4.lazy)(() => import("./intent-resolver-3J52ARFL.cjs"));
|
|
502
|
+
var ReactRoot = (0, import_app_framework4.lazy)(() => import("./react-root-XUE2J7HT.cjs"));
|
|
503
|
+
var ReactSurface = (0, import_app_framework4.lazy)(() => import("./react-surface-IWSTOZ2E.cjs"));
|
|
506
504
|
var Schema = (0, import_app_framework4.lazy)(() => import("./schema-PPJ5BZ3A.cjs"));
|
|
507
505
|
var Tools = (0, import_app_framework4.lazy)(() => import("./schema-tools-BLIMOZYY.cjs"));
|
|
508
|
-
var SpaceSettings = (0, import_app_framework4.lazy)(() => import("./settings-
|
|
506
|
+
var SpaceSettings = (0, import_app_framework4.lazy)(() => import("./settings-JLV7YT6Q.cjs"));
|
|
509
507
|
var SpaceState = (0, import_app_framework4.lazy)(() => import("./state-JLN7TGRR.cjs"));
|
|
510
|
-
var SpacesReady = (0, import_app_framework4.lazy)(() => import("./spaces-ready-
|
|
508
|
+
var SpacesReady = (0, import_app_framework4.lazy)(() => import("./spaces-ready-6EBR4SM4.cjs"));
|
|
511
509
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/CreateDialog/CreateObjectDialog.tsx";
|
|
512
510
|
var CREATE_OBJECT_DIALOG = `${import_chunk_6P2DB4QQ.SPACE_PLUGIN}/CreateObjectDialog`;
|
|
513
511
|
var CreateObjectDialog = ({ target, typename, name, shouldNavigate: _shouldNavigate }) => {
|
|
@@ -541,7 +539,7 @@ var CreateObjectDialog = ({ target, typename, name, shouldNavigate: _shouldNavig
|
|
|
541
539
|
}));
|
|
542
540
|
const object = result.data?.object;
|
|
543
541
|
if ((0, import_echo2.isLiveObject)(object)) {
|
|
544
|
-
const addObjectIntent = (0, import_app_framework2.createIntent)(
|
|
542
|
+
const addObjectIntent = (0, import_app_framework2.createIntent)(import_chunk_EQ5BPSQ7.SpaceAction.AddObject, {
|
|
545
543
|
target: target2,
|
|
546
544
|
object,
|
|
547
545
|
hidden: form.hidden
|
|
@@ -601,12 +599,12 @@ var CreateSpaceDialog = () => {
|
|
|
601
599
|
const inputSurfaceLookup = useInputSurfaceLookup();
|
|
602
600
|
const handleCreateSpace = (0, import_react7.useCallback)(async (data) => {
|
|
603
601
|
const program = import_effect2.Effect.gen(function* () {
|
|
604
|
-
const { space } = yield* dispatch((0, import_app_framework5.createIntent)(
|
|
602
|
+
const { space } = yield* dispatch((0, import_app_framework5.createIntent)(import_chunk_EQ5BPSQ7.SpaceAction.Create, data));
|
|
605
603
|
yield* dispatch((0, import_app_framework5.createIntent)(import_app_framework5.LayoutAction.SwitchWorkspace, {
|
|
606
604
|
part: "workspace",
|
|
607
605
|
subject: space.id
|
|
608
606
|
}));
|
|
609
|
-
yield* dispatch((0, import_app_framework5.createIntent)(
|
|
607
|
+
yield* dispatch((0, import_app_framework5.createIntent)(import_chunk_EQ5BPSQ7.SpaceAction.OpenCreateObject, {
|
|
610
608
|
target: space
|
|
611
609
|
}));
|
|
612
610
|
});
|
|
@@ -639,7 +637,7 @@ var CreateSpaceDialog = () => {
|
|
|
639
637
|
classNames: "!p-0",
|
|
640
638
|
autoFocus: true,
|
|
641
639
|
values: initialValues,
|
|
642
|
-
schema:
|
|
640
|
+
schema: import_chunk_EQ5BPSQ7.SpaceForm,
|
|
643
641
|
lookupComponent: inputSurfaceLookup,
|
|
644
642
|
onSave: handleCreateSpace
|
|
645
643
|
})))
|
|
@@ -653,7 +651,7 @@ var CollectionMain = ({ collection }) => {
|
|
|
653
651
|
"data-testid": "composer.firstRunMessage"
|
|
654
652
|
}, /* @__PURE__ */ import_react8.default.createElement("p", {
|
|
655
653
|
role: "alert",
|
|
656
|
-
className: (0, import_react_ui_theme3.mx)(import_react_ui_theme3.
|
|
654
|
+
className: (0, import_react_ui_theme3.mx)(import_react_ui_theme3.descriptionMessage, "rounded-lg p-8 font-normal text-lg max-is-[24rem] break-words")
|
|
657
655
|
}, collection.name ?? t("unnamed collection label")));
|
|
658
656
|
};
|
|
659
657
|
var CollectionSection = ({ collection }) => {
|
|
@@ -775,7 +773,7 @@ var handleInvitationEvent = (invitation, subscription) => {
|
|
|
775
773
|
authCode: invitation.authCode
|
|
776
774
|
}), void 0, {
|
|
777
775
|
F: __dxlog_file3,
|
|
778
|
-
L:
|
|
776
|
+
L: 40,
|
|
779
777
|
S: void 0,
|
|
780
778
|
C: (f, a) => f(...a)
|
|
781
779
|
});
|
|
@@ -785,6 +783,7 @@ var handleInvitationEvent = (invitation, subscription) => {
|
|
|
785
783
|
var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
786
784
|
const { t } = (0, import_react_ui8.useTranslation)(import_chunk_6P2DB4QQ.SPACE_PLUGIN);
|
|
787
785
|
const config = (0, import_react_client4.useConfig)();
|
|
786
|
+
const { dispatchPromise: dispatch } = (0, import_app_framework7.useIntentDispatcher)();
|
|
788
787
|
const invitations = (0, import_echo3.useSpaceInvitations)(space.key);
|
|
789
788
|
const visibleInvitations = invitations?.filter((invitation) => ![
|
|
790
789
|
import_invitations.Invitation.State.CANCELLED
|
|
@@ -794,10 +793,10 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
794
793
|
setInternalActiveAction(nextAction);
|
|
795
794
|
localStorage.setItem(activeActionKey, nextAction);
|
|
796
795
|
};
|
|
797
|
-
const target = space.properties[
|
|
798
|
-
const locked = space.properties[
|
|
796
|
+
const target = space.properties[import_chunk_EQ5BPSQ7.CollectionType.typename]?.target?.objects[0]?.target;
|
|
797
|
+
const locked = space.properties[import_chunk_XADZLQAJ.COMPOSER_SPACE_LOCK];
|
|
799
798
|
const handleChangeLocked = (0, import_react13.useCallback)(() => {
|
|
800
|
-
space.properties[
|
|
799
|
+
space.properties[import_chunk_XADZLQAJ.COMPOSER_SPACE_LOCK] = !locked;
|
|
801
800
|
}, [
|
|
802
801
|
locked,
|
|
803
802
|
space
|
|
@@ -815,13 +814,14 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
815
814
|
size: 5
|
|
816
815
|
}),
|
|
817
816
|
testId: "membersContainer.inviteOne",
|
|
818
|
-
onClick: () => {
|
|
819
|
-
const invitation =
|
|
817
|
+
onClick: async () => {
|
|
818
|
+
const { data: invitation } = await dispatch((0, import_app_framework7.createIntent)(import_chunk_EQ5BPSQ7.SpaceAction.Share, {
|
|
819
|
+
space,
|
|
820
820
|
type: import_invitations.Invitation.Type.INTERACTIVE,
|
|
821
821
|
authMethod: import_invitations.Invitation.AuthMethod.SHARED_SECRET,
|
|
822
822
|
multiUse: false,
|
|
823
823
|
target: target && (0, import_echo3.fullyQualifiedId)(target)
|
|
824
|
-
});
|
|
824
|
+
}));
|
|
825
825
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
|
|
826
826
|
const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
|
|
827
827
|
}
|
|
@@ -839,13 +839,14 @@ var MembersContainer = ({ space, createInvitationUrl }) => {
|
|
|
839
839
|
size: 5
|
|
840
840
|
}),
|
|
841
841
|
testId: "membersContainer.inviteMany",
|
|
842
|
-
onClick: () => {
|
|
843
|
-
const invitation =
|
|
842
|
+
onClick: async () => {
|
|
843
|
+
const { data: invitation } = await dispatch((0, import_app_framework7.createIntent)(import_chunk_EQ5BPSQ7.SpaceAction.Share, {
|
|
844
|
+
space,
|
|
844
845
|
type: import_invitations.Invitation.Type.DELEGATED,
|
|
845
846
|
authMethod: import_invitations.Invitation.AuthMethod.KNOWN_PUBLIC_KEY,
|
|
846
847
|
multiUse: true,
|
|
847
848
|
target: target && (0, import_echo3.fullyQualifiedId)(target)
|
|
848
|
-
});
|
|
849
|
+
}));
|
|
849
850
|
if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
|
|
850
851
|
const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
|
|
851
852
|
}
|
|
@@ -993,7 +994,7 @@ var MenuFooter = ({ object }) => {
|
|
|
993
994
|
const { t } = (0, import_react_ui9.useTranslation)(import_chunk_6P2DB4QQ.SPACE_PLUGIN);
|
|
994
995
|
const client = (0, import_react_client5.useClient)();
|
|
995
996
|
const space = (0, import_echo4.getSpace)(object);
|
|
996
|
-
const spaceName = space ? (0,
|
|
997
|
+
const spaceName = space ? (0, import_chunk_XADZLQAJ.getSpaceDisplayName)(space, {
|
|
997
998
|
personal: client.spaces.default === space
|
|
998
999
|
}) : "";
|
|
999
1000
|
return space ? /* @__PURE__ */ import_react16.default.createElement(import_react16.default.Fragment, null, /* @__PURE__ */ import_react16.default.createElement(import_react_ui9.DropdownMenu.Separator, null), /* @__PURE__ */ import_react16.default.createElement(import_react_ui9.DropdownMenu.GroupLabel, null, t("menu footer label")), /* @__PURE__ */ import_react16.default.createElement("dl", {
|
|
@@ -1119,10 +1120,10 @@ var ObjectSettingsContainer = ({ object, role }) => {
|
|
|
1119
1120
|
className: "flex flex-col overflow-y-auto divide-y divide-separator"
|
|
1120
1121
|
}, /* @__PURE__ */ import_react17.default.createElement(BaseObjectSettings, {
|
|
1121
1122
|
object
|
|
1122
|
-
}, /* @__PURE__ */ import_react17.default.createElement(
|
|
1123
|
+
}, /* @__PURE__ */ import_react17.default.createElement(import_app_framework8.Surface, {
|
|
1123
1124
|
role: "base-object-settings",
|
|
1124
1125
|
data
|
|
1125
|
-
})), /* @__PURE__ */ import_react17.default.createElement(
|
|
1126
|
+
})), /* @__PURE__ */ import_react17.default.createElement(import_app_framework8.Surface, {
|
|
1126
1127
|
role: "object-settings",
|
|
1127
1128
|
data
|
|
1128
1129
|
}), /* @__PURE__ */ import_react17.default.createElement(AdvancedObjectSettings, {
|
|
@@ -1185,17 +1186,17 @@ var PersistenceStatus = ({ db }) => {
|
|
|
1185
1186
|
var POPOVER_ADD_SPACE = `${import_chunk_6P2DB4QQ.SPACE_PLUGIN}/PopoverRenameSpace`;
|
|
1186
1187
|
var PopoverAddSpace = () => {
|
|
1187
1188
|
const { t } = (0, import_react_ui15.useTranslation)(import_chunk_6P2DB4QQ.SPACE_PLUGIN);
|
|
1188
|
-
const { dispatchPromise: dispatch } = (0,
|
|
1189
|
+
const { dispatchPromise: dispatch } = (0, import_app_framework9.useIntentDispatcher)();
|
|
1189
1190
|
return /* @__PURE__ */ import_react23.default.createElement("div", {
|
|
1190
1191
|
role: "none",
|
|
1191
|
-
className: "grid grid-cols-1 gap-1 [&>button]:justify-start"
|
|
1192
|
+
className: "p-1 grid grid-cols-1 gap-1 [&>button]:justify-start"
|
|
1192
1193
|
}, /* @__PURE__ */ import_react23.default.createElement(import_react_ui15.IconButton, {
|
|
1193
1194
|
variant: "ghost",
|
|
1194
1195
|
label: t("create space label"),
|
|
1195
1196
|
icon: "ph--plus--regular",
|
|
1196
1197
|
onClick: () => {
|
|
1197
|
-
void dispatch((0,
|
|
1198
|
-
void dispatch((0,
|
|
1198
|
+
void dispatch((0, import_app_framework9.createIntent)(import_chunk_EQ5BPSQ7.SpaceAction.OpenCreateSpace));
|
|
1199
|
+
void dispatch((0, import_app_framework9.createIntent)(import_app_framework9.LayoutAction.UpdatePopover, {
|
|
1199
1200
|
part: "popover",
|
|
1200
1201
|
options: {
|
|
1201
1202
|
variant: "react",
|
|
@@ -1210,8 +1211,8 @@ var PopoverAddSpace = () => {
|
|
|
1210
1211
|
label: t("join space label"),
|
|
1211
1212
|
icon: "ph--sign-in--regular",
|
|
1212
1213
|
onClick: () => {
|
|
1213
|
-
void dispatch((0,
|
|
1214
|
-
void dispatch((0,
|
|
1214
|
+
void dispatch((0, import_app_framework9.createIntent)(import_chunk_EQ5BPSQ7.SpaceAction.Join));
|
|
1215
|
+
void dispatch((0, import_app_framework9.createIntent)(import_app_framework9.LayoutAction.UpdatePopover, {
|
|
1215
1216
|
part: "popover",
|
|
1216
1217
|
options: {
|
|
1217
1218
|
variant: "react",
|
|
@@ -1230,6 +1231,7 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
1230
1231
|
const doneButton = (0, import_react24.useRef)(null);
|
|
1231
1232
|
const object = obj;
|
|
1232
1233
|
const [name, setName] = (0, import_react24.useState)(object.name || object.title || "");
|
|
1234
|
+
const { dispatchPromise: dispatch } = (0, import_app_framework10.useIntentDispatcher)();
|
|
1233
1235
|
const handleDone = (0, import_react24.useCallback)(() => {
|
|
1234
1236
|
try {
|
|
1235
1237
|
object.name = name;
|
|
@@ -1241,12 +1243,20 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
1241
1243
|
err
|
|
1242
1244
|
}, {
|
|
1243
1245
|
F: __dxlog_file4,
|
|
1244
|
-
L:
|
|
1246
|
+
L: 32,
|
|
1245
1247
|
S: void 0,
|
|
1246
1248
|
C: (f, a) => f(...a)
|
|
1247
1249
|
});
|
|
1248
1250
|
}
|
|
1249
1251
|
}
|
|
1252
|
+
void dispatch((0, import_app_framework10.createIntent)(import_app_framework10.LayoutAction.UpdatePopover, {
|
|
1253
|
+
part: "popover",
|
|
1254
|
+
options: {
|
|
1255
|
+
variant: "react",
|
|
1256
|
+
anchorId: "",
|
|
1257
|
+
state: false
|
|
1258
|
+
}
|
|
1259
|
+
}));
|
|
1250
1260
|
}, [
|
|
1251
1261
|
object,
|
|
1252
1262
|
name
|
|
@@ -1265,23 +1275,30 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
1265
1275
|
"data-testid": "spacePlugin.renameObject.input",
|
|
1266
1276
|
onChange: ({ target: { value } }) => setName(value),
|
|
1267
1277
|
onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
|
|
1268
|
-
}))), /* @__PURE__ */ import_react24.default.createElement(import_react_ui16.
|
|
1269
|
-
asChild: true
|
|
1270
|
-
}, /* @__PURE__ */ import_react24.default.createElement(import_react_ui16.Button, {
|
|
1278
|
+
}))), /* @__PURE__ */ import_react24.default.createElement(import_react_ui16.Button, {
|
|
1271
1279
|
ref: doneButton,
|
|
1272
1280
|
classNames: "self-stretch",
|
|
1273
1281
|
onClick: handleDone
|
|
1274
1282
|
}, t("done label", {
|
|
1275
1283
|
ns: "os"
|
|
1276
|
-
})))
|
|
1284
|
+
})));
|
|
1277
1285
|
};
|
|
1278
1286
|
var POPOVER_RENAME_SPACE = `${import_chunk_6P2DB4QQ.SPACE_PLUGIN}/PopoverRenameSpace`;
|
|
1279
1287
|
var PopoverRenameSpace = ({ space }) => {
|
|
1280
1288
|
const { t } = (0, import_react_ui17.useTranslation)(import_chunk_6P2DB4QQ.SPACE_PLUGIN);
|
|
1281
1289
|
const doneButton = (0, import_react25.useRef)(null);
|
|
1282
1290
|
const [name, setName] = (0, import_react25.useState)(space.properties.name ?? "");
|
|
1291
|
+
const { dispatchPromise: dispatch } = (0, import_app_framework11.useIntentDispatcher)();
|
|
1283
1292
|
const handleDone = (0, import_react25.useCallback)(() => {
|
|
1284
1293
|
space.properties.name = name;
|
|
1294
|
+
void dispatch((0, import_app_framework11.createIntent)(import_app_framework11.LayoutAction.UpdatePopover, {
|
|
1295
|
+
part: "popover",
|
|
1296
|
+
options: {
|
|
1297
|
+
variant: "react",
|
|
1298
|
+
anchorId: "",
|
|
1299
|
+
state: false
|
|
1300
|
+
}
|
|
1301
|
+
}));
|
|
1285
1302
|
}, [
|
|
1286
1303
|
space,
|
|
1287
1304
|
name
|
|
@@ -1341,40 +1358,23 @@ var SchemaContainer = ({ space }) => {
|
|
|
1341
1358
|
key: schema.id
|
|
1342
1359
|
}, /* @__PURE__ */ import_react26.default.createElement("div", null, schema.typename)))))));
|
|
1343
1360
|
};
|
|
1344
|
-
var ShareSpaceButton = ({ space }) => {
|
|
1345
|
-
const { dispatchPromise: dispatch } = (0, import_app_framework9.useIntentDispatcher)();
|
|
1346
|
-
return /* @__PURE__ */ import_react27.default.createElement(ShareSpaceButtonImpl, {
|
|
1347
|
-
onClick: () => dispatch((0, import_app_framework9.createIntent)(import_chunk_3UKLWXNJ.SpaceAction.Share, {
|
|
1348
|
-
space
|
|
1349
|
-
}))
|
|
1350
|
-
});
|
|
1351
|
-
};
|
|
1352
|
-
var ShareSpaceButtonImpl = ({ onClick }) => {
|
|
1353
|
-
const { t } = (0, import_react_ui19.useTranslation)(import_chunk_6P2DB4QQ.SPACE_PLUGIN);
|
|
1354
|
-
return /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.IconButton, {
|
|
1355
|
-
"data-testid": "spacePlugin.shareSpaceButton",
|
|
1356
|
-
icon: "ph--users--regular",
|
|
1357
|
-
label: t("share space label"),
|
|
1358
|
-
onClick
|
|
1359
|
-
});
|
|
1360
|
-
};
|
|
1361
1361
|
var REFRESH_INTERVAL = 5e3;
|
|
1362
1362
|
var ACTIVITY_DURATION = 3e4;
|
|
1363
1363
|
var noViewers = new import_util3.ComplexMap(import_react_client6.PublicKey.hash);
|
|
1364
1364
|
var getName = (identity) => identity.profile?.displayName ?? (0, import_display_name.generateName)(identity.identityKey.toHex());
|
|
1365
1365
|
var SpacePresence = ({ object, spaceKey }) => {
|
|
1366
|
-
const spaceState = (0,
|
|
1366
|
+
const spaceState = (0, import_app_framework12.useCapability)(import_chunk_IKIDS6XF.SpaceCapabilities.MutableState);
|
|
1367
1367
|
const client = (0, import_react_client6.useClient)();
|
|
1368
1368
|
const identity = (0, import_halo.useIdentity)();
|
|
1369
1369
|
const space = spaceKey ? client.spaces.get(spaceKey) : (0, import_echo6.getSpace)(object);
|
|
1370
1370
|
const spaceMembers = (0, import_echo6.useMembers)(space?.key);
|
|
1371
|
-
const [_moment, setMoment] = (0,
|
|
1372
|
-
(0,
|
|
1371
|
+
const [_moment, setMoment] = (0, import_react27.useState)(Date.now());
|
|
1372
|
+
(0, import_react27.useEffect)(() => {
|
|
1373
1373
|
const interval = setInterval(() => setMoment(Date.now()), REFRESH_INTERVAL);
|
|
1374
1374
|
return () => clearInterval(interval);
|
|
1375
1375
|
}, []);
|
|
1376
|
-
const memberOnline = (0,
|
|
1377
|
-
const memberIsNotSelf = (0,
|
|
1376
|
+
const memberOnline = (0, import_react27.useCallback)((member) => member.presence === 1, []);
|
|
1377
|
+
const memberIsNotSelf = (0, import_react27.useCallback)((member) => !identity?.identityKey.equals(member.identity.identityKey), [
|
|
1378
1378
|
identity?.identityKey
|
|
1379
1379
|
]);
|
|
1380
1380
|
if (!identity || !spaceState || !space) {
|
|
@@ -1391,60 +1391,60 @@ var SpacePresence = ({ object, spaceKey }) => {
|
|
|
1391
1391
|
lastSeen
|
|
1392
1392
|
};
|
|
1393
1393
|
}).toSorted((a, b) => a.lastSeen - b.lastSeen);
|
|
1394
|
-
return /* @__PURE__ */
|
|
1394
|
+
return /* @__PURE__ */ import_react27.default.createElement(FullPresence, {
|
|
1395
1395
|
members: membersForObject
|
|
1396
1396
|
});
|
|
1397
1397
|
};
|
|
1398
1398
|
var FullPresence = (props) => {
|
|
1399
1399
|
const { size = 9, onMemberClick } = props;
|
|
1400
|
-
const members = (0,
|
|
1400
|
+
const members = (0, import_react_ui19.useDefaultValue)(props.members, () => []);
|
|
1401
1401
|
if (members.length === 0) {
|
|
1402
1402
|
return null;
|
|
1403
1403
|
}
|
|
1404
|
-
return /* @__PURE__ */
|
|
1404
|
+
return /* @__PURE__ */ import_react27.default.createElement("div", {
|
|
1405
1405
|
className: "dx-avatar-group",
|
|
1406
1406
|
"data-testid": "spacePlugin.presence"
|
|
1407
|
-
}, members.slice(0, 3).map((member, i) => /* @__PURE__ */
|
|
1407
|
+
}, members.slice(0, 3).map((member, i) => /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Tooltip.Root, {
|
|
1408
1408
|
key: member.identity.identityKey.toHex()
|
|
1409
|
-
}, /* @__PURE__ */
|
|
1409
|
+
}, /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Tooltip.Trigger, {
|
|
1410
1410
|
className: "grid focus:outline-none"
|
|
1411
|
-
}, /* @__PURE__ */
|
|
1411
|
+
}, /* @__PURE__ */ import_react27.default.createElement(PresenceAvatar, {
|
|
1412
1412
|
identity: member.identity,
|
|
1413
1413
|
match: member.currentlyAttended,
|
|
1414
1414
|
index: members.length - i,
|
|
1415
1415
|
onClick: () => onMemberClick?.(member),
|
|
1416
1416
|
size
|
|
1417
|
-
})), /* @__PURE__ */
|
|
1417
|
+
})), /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Tooltip.Portal, null, /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Tooltip.Content, {
|
|
1418
1418
|
side: "bottom"
|
|
1419
|
-
}, /* @__PURE__ */
|
|
1419
|
+
}, /* @__PURE__ */ import_react27.default.createElement("span", null, getName(member.identity)), /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Tooltip.Arrow, null))))), members.length > 3 && /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Tooltip.Root, null, /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Tooltip.Trigger, {
|
|
1420
1420
|
className: "grid focus:outline-none"
|
|
1421
|
-
}, /* @__PURE__ */
|
|
1421
|
+
}, /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Avatar.Root, null, /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Avatar.Content, {
|
|
1422
1422
|
status: "inactive",
|
|
1423
1423
|
style: {
|
|
1424
1424
|
zIndex: members.length - 4
|
|
1425
1425
|
},
|
|
1426
1426
|
fallback: `+${members.length - 3}`,
|
|
1427
1427
|
size
|
|
1428
|
-
}))), /* @__PURE__ */
|
|
1428
|
+
}))), /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Tooltip.Portal, null, /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Tooltip.Content, {
|
|
1429
1429
|
side: "bottom"
|
|
1430
|
-
}, /* @__PURE__ */
|
|
1430
|
+
}, /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Tooltip.Arrow, null), /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.List, {
|
|
1431
1431
|
classNames: "max-h-56 overflow-y-auto"
|
|
1432
|
-
}, members.map((member) => /* @__PURE__ */
|
|
1432
|
+
}, members.map((member) => /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.ListItem.Root, {
|
|
1433
1433
|
key: member.identity.identityKey.toHex(),
|
|
1434
1434
|
classNames: "flex gap-2 items-center cursor-pointer mbe-2",
|
|
1435
1435
|
onClick: () => onMemberClick?.(member),
|
|
1436
1436
|
"data-testid": "identity-list-item"
|
|
1437
|
-
}, /* @__PURE__ */
|
|
1437
|
+
}, /* @__PURE__ */ import_react27.default.createElement(PresenceAvatar, {
|
|
1438
1438
|
identity: member.identity,
|
|
1439
1439
|
size,
|
|
1440
1440
|
showName: true,
|
|
1441
1441
|
match: member.currentlyAttended
|
|
1442
1442
|
}))))))));
|
|
1443
1443
|
};
|
|
1444
|
-
var PresenceAvatar = /* @__PURE__ */ (0,
|
|
1444
|
+
var PresenceAvatar = /* @__PURE__ */ (0, import_react27.forwardRef)(({ identity, showName, match, index, onClick, size }, forwardedRef) => {
|
|
1445
1445
|
const status = match ? "current" : "active";
|
|
1446
1446
|
const fallbackValue = (0, import_util3.keyToFallback)(identity.identityKey);
|
|
1447
|
-
return /* @__PURE__ */
|
|
1447
|
+
return /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Avatar.Root, null, /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Avatar.Content, {
|
|
1448
1448
|
status,
|
|
1449
1449
|
hue: identity.profile?.data?.hue || fallbackValue.hue,
|
|
1450
1450
|
"data-testid": "spacePlugin.presence.member",
|
|
@@ -1458,14 +1458,14 @@ var PresenceAvatar = /* @__PURE__ */ (0, import_react28.forwardRef)(({ identity,
|
|
|
1458
1458
|
onClick,
|
|
1459
1459
|
fallback: identity.profile?.data?.emoji || fallbackValue.emoji,
|
|
1460
1460
|
ref: forwardedRef
|
|
1461
|
-
}), /* @__PURE__ */
|
|
1461
|
+
}), /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Avatar.Label, {
|
|
1462
1462
|
classNames: showName ? "text-sm truncate pli-2" : "sr-only"
|
|
1463
1463
|
}, getName(identity)));
|
|
1464
1464
|
});
|
|
1465
1465
|
var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
1466
1466
|
const { hasAttention, isAncestor, isRelated } = (0, import_react_ui_attention.useAttention)(id);
|
|
1467
1467
|
const isAttended = hasAttention || isAncestor || isRelated;
|
|
1468
|
-
const { graph } = (0,
|
|
1468
|
+
const { graph } = (0, import_app_framework12.useAppGraph)();
|
|
1469
1469
|
const attended = (0, import_react_ui_attention.useAttended)();
|
|
1470
1470
|
const startOfAttention = attended.at(-1);
|
|
1471
1471
|
const path = usePath(graph, startOfAttention);
|
|
@@ -1474,8 +1474,8 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
|
1474
1474
|
const moment = Date.now();
|
|
1475
1475
|
return Array.from(viewers2.values()).filter((viewer) => moment - viewer.lastSeen < ACTIVITY_DURATION);
|
|
1476
1476
|
};
|
|
1477
|
-
const [activeViewers, setActiveViewers] = (0,
|
|
1478
|
-
(0,
|
|
1477
|
+
const [activeViewers, setActiveViewers] = (0, import_react27.useState)(viewers ? getActiveViewers(viewers) : []);
|
|
1478
|
+
(0, import_react27.useEffect)(() => {
|
|
1479
1479
|
if (viewers) {
|
|
1480
1480
|
setActiveViewers(getActiveViewers(viewers));
|
|
1481
1481
|
const interval = setInterval(() => {
|
|
@@ -1486,70 +1486,70 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
|
1486
1486
|
}, [
|
|
1487
1487
|
viewers
|
|
1488
1488
|
]);
|
|
1489
|
-
return /* @__PURE__ */
|
|
1489
|
+
return /* @__PURE__ */ import_react27.default.createElement(SmallPresence, {
|
|
1490
1490
|
count: activeViewers.length,
|
|
1491
1491
|
attended: isAttended,
|
|
1492
1492
|
containsAttended
|
|
1493
1493
|
});
|
|
1494
1494
|
};
|
|
1495
1495
|
var SmallPresence = ({ count = 0, attended, containsAttended }) => {
|
|
1496
|
-
const { t } = (0,
|
|
1497
|
-
return /* @__PURE__ */
|
|
1496
|
+
const { t } = (0, import_react_ui19.useTranslation)(import_chunk_6P2DB4QQ.SPACE_PLUGIN);
|
|
1497
|
+
return /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Tooltip.Root, null, /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Tooltip.Trigger, {
|
|
1498
1498
|
asChild: true
|
|
1499
|
-
}, /* @__PURE__ */
|
|
1499
|
+
}, /* @__PURE__ */ import_react27.default.createElement(import_react_ui_attention.AttentionGlyph, {
|
|
1500
1500
|
attended,
|
|
1501
1501
|
containsAttended,
|
|
1502
1502
|
presence: count > 1 ? "many" : count === 1 ? "one" : "none",
|
|
1503
1503
|
classNames: "self-center mie-1"
|
|
1504
|
-
})), /* @__PURE__ */
|
|
1504
|
+
})), /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Tooltip.Portal, null, /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Tooltip.Content, {
|
|
1505
1505
|
side: "bottom"
|
|
1506
|
-
}, /* @__PURE__ */
|
|
1506
|
+
}, /* @__PURE__ */ import_react27.default.createElement("span", null, t("presence label", {
|
|
1507
1507
|
count
|
|
1508
|
-
})), /* @__PURE__ */
|
|
1508
|
+
})), /* @__PURE__ */ import_react27.default.createElement(import_react_ui19.Tooltip.Arrow, null))));
|
|
1509
1509
|
};
|
|
1510
1510
|
var SpacePluginSettings = ({ settings }) => {
|
|
1511
|
-
const { t } = (0,
|
|
1512
|
-
const { dispatchPromise: dispatch } = (0,
|
|
1511
|
+
const { t } = (0, import_react_ui20.useTranslation)(import_chunk_6P2DB4QQ.SPACE_PLUGIN);
|
|
1512
|
+
const { dispatchPromise: dispatch } = (0, import_app_framework13.useIntentDispatcher)();
|
|
1513
1513
|
const client = (0, import_react_client7.useClient)();
|
|
1514
1514
|
const spaces = (0, import_echo7.useSpaces)({
|
|
1515
1515
|
all: settings.showHidden
|
|
1516
1516
|
});
|
|
1517
|
-
return /* @__PURE__ */
|
|
1517
|
+
return /* @__PURE__ */ import_react28.default.createElement(import_react_ui_form6.DeprecatedFormContainer, null, /* @__PURE__ */ import_react28.default.createElement(import_react_ui_form6.DeprecatedFormInput, {
|
|
1518
1518
|
label: t("show hidden spaces label")
|
|
1519
|
-
}, /* @__PURE__ */
|
|
1519
|
+
}, /* @__PURE__ */ import_react28.default.createElement(import_react_ui20.Input.Switch, {
|
|
1520
1520
|
checked: settings.showHidden,
|
|
1521
1521
|
onCheckedChange: (checked) => settings.showHidden = !!checked
|
|
1522
|
-
})), /* @__PURE__ */
|
|
1522
|
+
})), /* @__PURE__ */ import_react28.default.createElement("div", {
|
|
1523
1523
|
role: "none"
|
|
1524
|
-
}, /* @__PURE__ */
|
|
1524
|
+
}, /* @__PURE__ */ import_react28.default.createElement("h2", {
|
|
1525
1525
|
className: "text-xl my-4"
|
|
1526
|
-
}, "Space Settings"), /* @__PURE__ */
|
|
1526
|
+
}, "Space Settings"), /* @__PURE__ */ import_react28.default.createElement(import_react_ui20.List, {
|
|
1527
1527
|
classNames: "max-w-md mx-auto"
|
|
1528
|
-
}, spaces.map((space) => /* @__PURE__ */
|
|
1528
|
+
}, spaces.map((space) => /* @__PURE__ */ import_react28.default.createElement(import_react_ui20.ListItem.Root, {
|
|
1529
1529
|
key: space.id
|
|
1530
|
-
}, /* @__PURE__ */
|
|
1530
|
+
}, /* @__PURE__ */ import_react28.default.createElement(import_react_ui20.ListItem.Heading, {
|
|
1531
1531
|
classNames: "flex flex-col grow truncate mbe-2"
|
|
1532
|
-
}, (0,
|
|
1532
|
+
}, (0, import_react_ui20.toLocalizedString)((0, import_chunk_XADZLQAJ.getSpaceDisplayName)(space, {
|
|
1533
1533
|
personal: space === client.spaces.default
|
|
1534
|
-
}), t)), /* @__PURE__ */
|
|
1535
|
-
onClick: () => dispatch((0,
|
|
1534
|
+
}), t)), /* @__PURE__ */ import_react28.default.createElement(import_react_ui20.ListItem.Endcap, null, /* @__PURE__ */ import_react28.default.createElement(import_react_ui20.Button, {
|
|
1535
|
+
onClick: () => dispatch((0, import_app_framework13.createIntent)(import_chunk_EQ5BPSQ7.SpaceAction.OpenSettings, {
|
|
1536
1536
|
space
|
|
1537
1537
|
}))
|
|
1538
1538
|
}, t("open space settings label"))))))));
|
|
1539
1539
|
};
|
|
1540
1540
|
var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsContainer.tsx";
|
|
1541
|
-
var FormSchema =
|
|
1541
|
+
var FormSchema = import_chunk_EQ5BPSQ7.SpaceForm.pipe(import_effect3.Schema.extend(import_effect3.Schema.Struct({
|
|
1542
1542
|
archived: import_effect3.Schema.Boolean.annotations({
|
|
1543
1543
|
title: "Archive space"
|
|
1544
1544
|
})
|
|
1545
1545
|
})));
|
|
1546
1546
|
var SpaceSettingsContainer = ({ space }) => {
|
|
1547
|
-
const { t } = (0,
|
|
1548
|
-
const { dispatchPromise: dispatch } = (0,
|
|
1547
|
+
const { t } = (0, import_react_ui21.useTranslation)(import_chunk_6P2DB4QQ.SPACE_PLUGIN);
|
|
1548
|
+
const { dispatchPromise: dispatch } = (0, import_app_framework14.useIntentDispatcher)();
|
|
1549
1549
|
const client = (0, import_react_client8.useClient)();
|
|
1550
|
-
const archived = (0,
|
|
1551
|
-
const [edgeReplication, setEdgeReplication] = (0,
|
|
1552
|
-
const toggleEdgeReplication = (0,
|
|
1550
|
+
const archived = (0, import_react_ui21.useMulticastObservable)(space.state) === import_echo8.SpaceState.SPACE_INACTIVE;
|
|
1551
|
+
const [edgeReplication, setEdgeReplication] = (0, import_react29.useState)(space.internal.data.edgeReplication === import_metadata.EdgeReplicationSetting.ENABLED);
|
|
1552
|
+
const toggleEdgeReplication = (0, import_react29.useCallback)(async (next) => {
|
|
1553
1553
|
setEdgeReplication(next);
|
|
1554
1554
|
await space?.internal.setEdgeReplicationPreference(next ? import_metadata.EdgeReplicationSetting.ENABLED : import_metadata.EdgeReplicationSetting.DISABLED).catch((err) => {
|
|
1555
1555
|
import_log3.log.catch(err, void 0, {
|
|
@@ -1563,7 +1563,7 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1563
1563
|
}, [
|
|
1564
1564
|
space
|
|
1565
1565
|
]);
|
|
1566
|
-
const handleSave = (0,
|
|
1566
|
+
const handleSave = (0, import_react29.useCallback)((properties) => {
|
|
1567
1567
|
void toggleEdgeReplication(properties.edgeReplication);
|
|
1568
1568
|
if (properties.name !== space.properties.name) {
|
|
1569
1569
|
space.properties.name = properties.name;
|
|
@@ -1575,14 +1575,14 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1575
1575
|
space.properties.hue = properties.hue;
|
|
1576
1576
|
}
|
|
1577
1577
|
if (properties.archived && !archived) {
|
|
1578
|
-
void dispatch((0, import_effect3.pipe)((0,
|
|
1578
|
+
void dispatch((0, import_effect3.pipe)((0, import_app_framework14.createIntent)(import_chunk_EQ5BPSQ7.SpaceAction.Close, {
|
|
1579
1579
|
space
|
|
1580
|
-
}), (0,
|
|
1580
|
+
}), (0, import_app_framework14.chain)(import_app_framework14.LayoutAction.SwitchWorkspace, {
|
|
1581
1581
|
part: "workspace",
|
|
1582
1582
|
subject: client.spaces.default.id
|
|
1583
1583
|
})));
|
|
1584
1584
|
} else if (!properties.archived && archived) {
|
|
1585
|
-
void dispatch((0,
|
|
1585
|
+
void dispatch((0, import_app_framework14.createIntent)(import_chunk_EQ5BPSQ7.SpaceAction.Open, {
|
|
1586
1586
|
space
|
|
1587
1587
|
}));
|
|
1588
1588
|
}
|
|
@@ -1591,7 +1591,7 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1591
1591
|
toggleEdgeReplication,
|
|
1592
1592
|
archived
|
|
1593
1593
|
]);
|
|
1594
|
-
const values = (0,
|
|
1594
|
+
const values = (0, import_react29.useMemo)(() => ({
|
|
1595
1595
|
name: space.properties.name,
|
|
1596
1596
|
icon: space.properties.icon,
|
|
1597
1597
|
hue: space.properties.hue,
|
|
@@ -1604,16 +1604,16 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1604
1604
|
edgeReplication,
|
|
1605
1605
|
archived
|
|
1606
1606
|
]);
|
|
1607
|
-
const customElements = (0,
|
|
1607
|
+
const customElements = (0, import_react29.useMemo)(() => ({
|
|
1608
1608
|
name: ({ type, label, getValue, onValueChange }) => {
|
|
1609
|
-
const handleChange = (0,
|
|
1609
|
+
const handleChange = (0, import_react29.useCallback)(({ target: { value } }) => onValueChange(type, value), [
|
|
1610
1610
|
onValueChange,
|
|
1611
1611
|
type
|
|
1612
1612
|
]);
|
|
1613
|
-
return /* @__PURE__ */
|
|
1613
|
+
return /* @__PURE__ */ import_react29.default.createElement(import_react_ui_form7.ControlItemInput, {
|
|
1614
1614
|
title: label,
|
|
1615
1615
|
description: t("display name description")
|
|
1616
|
-
}, /* @__PURE__ */
|
|
1616
|
+
}, /* @__PURE__ */ import_react29.default.createElement(import_react_ui21.Input.TextInput, {
|
|
1617
1617
|
value: getValue(),
|
|
1618
1618
|
onChange: handleChange,
|
|
1619
1619
|
placeholder: t("display name input placeholder"),
|
|
@@ -1621,18 +1621,18 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1621
1621
|
}));
|
|
1622
1622
|
},
|
|
1623
1623
|
icon: ({ type, label, getValue, onValueChange }) => {
|
|
1624
|
-
const handleChange = (0,
|
|
1624
|
+
const handleChange = (0, import_react29.useCallback)((nextEmoji) => onValueChange(type, nextEmoji), [
|
|
1625
1625
|
onValueChange,
|
|
1626
1626
|
type
|
|
1627
1627
|
]);
|
|
1628
|
-
const handleEmojiReset = (0,
|
|
1628
|
+
const handleEmojiReset = (0, import_react29.useCallback)(() => onValueChange(type, void 0), [
|
|
1629
1629
|
onValueChange,
|
|
1630
1630
|
type
|
|
1631
1631
|
]);
|
|
1632
|
-
return /* @__PURE__ */
|
|
1632
|
+
return /* @__PURE__ */ import_react29.default.createElement(import_react_ui_form7.ControlItem, {
|
|
1633
1633
|
title: label,
|
|
1634
1634
|
description: t("icon description")
|
|
1635
|
-
}, /* @__PURE__ */
|
|
1635
|
+
}, /* @__PURE__ */ import_react29.default.createElement(import_react_ui_pickers.IconPicker, {
|
|
1636
1636
|
value: getValue(),
|
|
1637
1637
|
onChange: handleChange,
|
|
1638
1638
|
onReset: handleEmojiReset,
|
|
@@ -1641,18 +1641,18 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1641
1641
|
}));
|
|
1642
1642
|
},
|
|
1643
1643
|
hue: ({ type, label, getValue, onValueChange }) => {
|
|
1644
|
-
const handleChange = (0,
|
|
1644
|
+
const handleChange = (0, import_react29.useCallback)((nextHue) => onValueChange(type, nextHue), [
|
|
1645
1645
|
onValueChange,
|
|
1646
1646
|
type
|
|
1647
1647
|
]);
|
|
1648
|
-
const handleHueReset = (0,
|
|
1648
|
+
const handleHueReset = (0, import_react29.useCallback)(() => onValueChange(type, void 0), [
|
|
1649
1649
|
onValueChange,
|
|
1650
1650
|
type
|
|
1651
1651
|
]);
|
|
1652
|
-
return /* @__PURE__ */
|
|
1652
|
+
return /* @__PURE__ */ import_react29.default.createElement(import_react_ui_form7.ControlItem, {
|
|
1653
1653
|
title: label,
|
|
1654
1654
|
description: t("hue description")
|
|
1655
|
-
}, /* @__PURE__ */
|
|
1655
|
+
}, /* @__PURE__ */ import_react29.default.createElement(import_react_ui_pickers.HuePicker, {
|
|
1656
1656
|
value: getValue(),
|
|
1657
1657
|
onChange: handleChange,
|
|
1658
1658
|
onReset: handleHueReset,
|
|
@@ -1660,29 +1660,29 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1660
1660
|
}));
|
|
1661
1661
|
},
|
|
1662
1662
|
edgeReplication: ({ type, label, getValue, onValueChange }) => {
|
|
1663
|
-
const handleChange = (0,
|
|
1663
|
+
const handleChange = (0, import_react29.useCallback)((checked) => onValueChange(type, checked), [
|
|
1664
1664
|
onValueChange,
|
|
1665
1665
|
type
|
|
1666
1666
|
]);
|
|
1667
|
-
return /* @__PURE__ */
|
|
1667
|
+
return /* @__PURE__ */ import_react29.default.createElement(import_react_ui_form7.ControlItemInput, {
|
|
1668
1668
|
title: label,
|
|
1669
1669
|
description: t("edge replication description")
|
|
1670
|
-
}, /* @__PURE__ */
|
|
1670
|
+
}, /* @__PURE__ */ import_react29.default.createElement(import_react_ui21.Input.Switch, {
|
|
1671
1671
|
checked: getValue(),
|
|
1672
1672
|
onCheckedChange: handleChange,
|
|
1673
1673
|
classNames: "justify-self-end"
|
|
1674
1674
|
}));
|
|
1675
1675
|
},
|
|
1676
1676
|
archived: ({ type, label, getValue, onValueChange }) => {
|
|
1677
|
-
const handleChange = (0,
|
|
1677
|
+
const handleChange = (0, import_react29.useCallback)(() => onValueChange(type, !getValue()), [
|
|
1678
1678
|
onValueChange,
|
|
1679
1679
|
type,
|
|
1680
1680
|
getValue
|
|
1681
1681
|
]);
|
|
1682
|
-
return /* @__PURE__ */
|
|
1682
|
+
return /* @__PURE__ */ import_react29.default.createElement(import_react_ui_form7.ControlItemInput, {
|
|
1683
1683
|
title: label,
|
|
1684
1684
|
description: t("archive space description")
|
|
1685
|
-
}, /* @__PURE__ */
|
|
1685
|
+
}, /* @__PURE__ */ import_react29.default.createElement(import_react_ui21.Button, {
|
|
1686
1686
|
disabled: space === client.spaces.default,
|
|
1687
1687
|
onClick: handleChange
|
|
1688
1688
|
}, getValue() ? t("unarchive space label") : t("archive space label")));
|
|
@@ -1691,16 +1691,16 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1691
1691
|
t,
|
|
1692
1692
|
space
|
|
1693
1693
|
]);
|
|
1694
|
-
return /* @__PURE__ */
|
|
1694
|
+
return /* @__PURE__ */ import_react29.default.createElement(import_react_ui_stack4.StackItem.Content, {
|
|
1695
1695
|
classNames: "block overflow-y-auto pli-2"
|
|
1696
|
-
}, /* @__PURE__ */
|
|
1696
|
+
}, /* @__PURE__ */ import_react29.default.createElement(import_react_ui_form7.ControlPage, null, /* @__PURE__ */ import_react29.default.createElement(import_react_ui_form7.ControlSection, {
|
|
1697
1697
|
title: t("space properties settings verbose label", {
|
|
1698
1698
|
ns: import_chunk_6P2DB4QQ.SPACE_PLUGIN
|
|
1699
1699
|
}),
|
|
1700
1700
|
description: t("space properties settings description", {
|
|
1701
1701
|
ns: import_chunk_6P2DB4QQ.SPACE_PLUGIN
|
|
1702
1702
|
})
|
|
1703
|
-
}, /* @__PURE__ */
|
|
1703
|
+
}, /* @__PURE__ */ import_react29.default.createElement(import_react_ui_form7.Form, {
|
|
1704
1704
|
schema: FormSchema,
|
|
1705
1705
|
values,
|
|
1706
1706
|
autoSave: true,
|
|
@@ -1710,9 +1710,9 @@ var SpaceSettingsContainer = ({ space }) => {
|
|
|
1710
1710
|
}))));
|
|
1711
1711
|
};
|
|
1712
1712
|
var useEdgeStatus = () => {
|
|
1713
|
-
const [status, setStatus] = (0,
|
|
1713
|
+
const [status, setStatus] = (0, import_react30.useState)(import_services.EdgeStatus.NOT_CONNECTED);
|
|
1714
1714
|
const client = (0, import_react_client9.useClient)();
|
|
1715
|
-
(0,
|
|
1715
|
+
(0, import_react30.useEffect)(() => {
|
|
1716
1716
|
client.services.services.EdgeAgentService?.queryEdgeStatus().subscribe(({ status: status2 }) => {
|
|
1717
1717
|
setStatus(status2);
|
|
1718
1718
|
});
|
|
@@ -1722,11 +1722,11 @@ var useEdgeStatus = () => {
|
|
|
1722
1722
|
return status;
|
|
1723
1723
|
};
|
|
1724
1724
|
var InlineSyncStatus = ({ space, open }) => {
|
|
1725
|
-
const { t } = (0,
|
|
1725
|
+
const { t } = (0, import_react_ui22.useTranslation)(import_chunk_6P2DB4QQ.SPACE_PLUGIN);
|
|
1726
1726
|
const id = space.id;
|
|
1727
1727
|
const { hasAttention, isAncestor, isRelated } = (0, import_react_ui_attention2.useAttention)(id);
|
|
1728
1728
|
const isAttended = hasAttention || isAncestor || isRelated;
|
|
1729
|
-
const { graph } = (0,
|
|
1729
|
+
const { graph } = (0, import_app_framework15.useAppGraph)();
|
|
1730
1730
|
const attended = (0, import_react_ui_attention2.useAttended)();
|
|
1731
1731
|
const startOfAttention = attended.at(-1);
|
|
1732
1732
|
const path = usePath(graph, startOfAttention);
|
|
@@ -1735,17 +1735,17 @@ var InlineSyncStatus = ({ space, open }) => {
|
|
|
1735
1735
|
const edgeSyncEnabled = space.internal.data.edgeReplication === import_metadata2.EdgeReplicationSetting.ENABLED;
|
|
1736
1736
|
const syncState = (0, import_echo9.useSpaceSyncState)(space);
|
|
1737
1737
|
const syncing = connectedToEdge && edgeSyncEnabled && syncState && syncState.missingOnLocal > 0;
|
|
1738
|
-
return /* @__PURE__ */
|
|
1738
|
+
return /* @__PURE__ */ import_react30.default.createElement(import_react_ui22.Tooltip.Root, null, /* @__PURE__ */ import_react30.default.createElement(import_react_ui22.Tooltip.Trigger, {
|
|
1739
1739
|
asChild: true
|
|
1740
|
-
}, /* @__PURE__ */
|
|
1740
|
+
}, /* @__PURE__ */ import_react30.default.createElement(import_react_ui_attention2.AttentionGlyph, {
|
|
1741
1741
|
syncing,
|
|
1742
1742
|
attended: isAttended,
|
|
1743
1743
|
containsAttended,
|
|
1744
1744
|
classNames: "self-center mie-1"
|
|
1745
|
-
})), /* @__PURE__ */
|
|
1745
|
+
})), /* @__PURE__ */ import_react30.default.createElement(import_react_ui22.Tooltip.Portal, null, /* @__PURE__ */ import_react30.default.createElement(import_react_ui22.Tooltip.Content, {
|
|
1746
1746
|
side: "bottom",
|
|
1747
1747
|
classNames: "z-[70]"
|
|
1748
|
-
}, /* @__PURE__ */
|
|
1748
|
+
}, /* @__PURE__ */ import_react30.default.createElement("span", null, t("syncing label")), /* @__PURE__ */ import_react30.default.createElement(import_react_ui22.Tooltip.Arrow, null))));
|
|
1749
1749
|
};
|
|
1750
1750
|
var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts";
|
|
1751
1751
|
var createClientSaveTracker = (client, cb) => {
|
|
@@ -1837,19 +1837,19 @@ var SYNC_STALLED_TIMEOUT = 5e3;
|
|
|
1837
1837
|
var SyncStatus = () => {
|
|
1838
1838
|
const client = (0, import_react_client10.useClient)();
|
|
1839
1839
|
const state = (0, import_echo10.useSyncState)();
|
|
1840
|
-
const [saved, setSaved] = (0,
|
|
1841
|
-
(0,
|
|
1840
|
+
const [saved, setSaved] = (0, import_react31.useState)(true);
|
|
1841
|
+
(0, import_react31.useEffect)(() => {
|
|
1842
1842
|
return createClientSaveTracker(client, (state2) => {
|
|
1843
1843
|
setSaved(state2 === "saved");
|
|
1844
1844
|
});
|
|
1845
1845
|
}, []);
|
|
1846
|
-
return /* @__PURE__ */
|
|
1846
|
+
return /* @__PURE__ */ import_react31.default.createElement(SyncStatusIndicator, {
|
|
1847
1847
|
state,
|
|
1848
1848
|
saved
|
|
1849
1849
|
});
|
|
1850
1850
|
};
|
|
1851
1851
|
var SyncStatusIndicator = ({ state, saved }) => {
|
|
1852
|
-
const { t } = (0,
|
|
1852
|
+
const { t } = (0, import_react_ui23.useTranslation)(import_chunk_6P2DB4QQ.SPACE_PLUGIN);
|
|
1853
1853
|
const summary = (0, import_echo10.getSyncSummary)(state);
|
|
1854
1854
|
const offline = Object.values(state).length === 0;
|
|
1855
1855
|
const needsToUpload = summary.differentDocuments > 0 || summary.missingOnRemote > 0;
|
|
@@ -1860,8 +1860,8 @@ var SyncStatusIndicator = ({ state, saved }) => {
|
|
|
1860
1860
|
needsToUpload,
|
|
1861
1861
|
needsToDownload
|
|
1862
1862
|
});
|
|
1863
|
-
const [classNames, setClassNames] = (0,
|
|
1864
|
-
(0,
|
|
1863
|
+
const [classNames, setClassNames] = (0, import_react31.useState)();
|
|
1864
|
+
(0, import_react31.useEffect)(() => {
|
|
1865
1865
|
setClassNames(void 0);
|
|
1866
1866
|
if (offline || !needsToUpload && !needsToDownload) {
|
|
1867
1867
|
return;
|
|
@@ -1876,12 +1876,12 @@ var SyncStatusIndicator = ({ state, saved }) => {
|
|
|
1876
1876
|
needsToDownload
|
|
1877
1877
|
]);
|
|
1878
1878
|
const title = t(`${status} label`);
|
|
1879
|
-
const icon = /* @__PURE__ */
|
|
1879
|
+
const icon = /* @__PURE__ */ import_react31.default.createElement(import_react_ui23.Icon, {
|
|
1880
1880
|
icon: getIcon(status),
|
|
1881
1881
|
size: 4,
|
|
1882
1882
|
classNames
|
|
1883
1883
|
});
|
|
1884
|
-
return /* @__PURE__ */
|
|
1884
|
+
return /* @__PURE__ */ import_react31.default.createElement(import_plugin_status_bar.StatusBar.Item, {
|
|
1885
1885
|
title
|
|
1886
1886
|
}, icon);
|
|
1887
1887
|
};
|
|
@@ -1916,8 +1916,6 @@ var SyncStatusIndicator = ({ state, saved }) => {
|
|
|
1916
1916
|
ReactSurface,
|
|
1917
1917
|
Schema,
|
|
1918
1918
|
SchemaContainer,
|
|
1919
|
-
ShareSpaceButton,
|
|
1920
|
-
ShareSpaceButtonImpl,
|
|
1921
1919
|
SmallPresence,
|
|
1922
1920
|
SmallPresenceLive,
|
|
1923
1921
|
SpacePluginSettings,
|
|
@@ -1931,4 +1929,4 @@ var SyncStatusIndicator = ({ state, saved }) => {
|
|
|
1931
1929
|
Tools,
|
|
1932
1930
|
useQuerySpaceSchemas
|
|
1933
1931
|
});
|
|
1934
|
-
//# sourceMappingURL=chunk-
|
|
1932
|
+
//# sourceMappingURL=chunk-ZMQO74LX.cjs.map
|