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