@dxos/plugin-space 0.7.5-main.9d2a38b → 0.7.5-main.e9bb01b
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-F6XSETHX.mjs → app-graph-builder-J4NX44Y4.mjs} +10 -8
- package/dist/lib/browser/{app-graph-builder-F6XSETHX.mjs.map → app-graph-builder-J4NX44Y4.mjs.map} +3 -3
- package/dist/lib/browser/{app-graph-serializer-FYJE23GN.mjs → app-graph-serializer-QF7VVRCV.mjs} +5 -5
- package/dist/lib/browser/{chunk-IZ7QKQ2E.mjs → chunk-6UIFMVVI.mjs} +14 -9
- package/dist/lib/browser/chunk-6UIFMVVI.mjs.map +7 -0
- package/dist/lib/browser/{chunk-SOXNANA6.mjs → chunk-PQXZCNAU.mjs} +3 -2
- package/dist/lib/browser/{chunk-SOXNANA6.mjs.map → chunk-PQXZCNAU.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-UH5P4UL3.mjs → chunk-RLZQJD47.mjs} +3 -2
- package/dist/lib/browser/chunk-RLZQJD47.mjs.map +7 -0
- package/dist/lib/browser/{chunk-T36CIHPG.mjs → chunk-SDK7RZI3.mjs} +3 -3
- package/dist/lib/browser/{chunk-SSJ772GK.mjs → chunk-XPZ6IIXF.mjs} +4 -5
- package/dist/lib/browser/chunk-XPZ6IIXF.mjs.map +7 -0
- package/dist/lib/browser/{chunk-XXD33C4E.mjs → chunk-XZ2NH3CP.mjs} +291 -250
- package/dist/lib/browser/chunk-XZ2NH3CP.mjs.map +7 -0
- package/dist/lib/browser/{identity-created-4Q4PFIC5.mjs → identity-created-25TK5XNO.mjs} +3 -3
- package/dist/lib/browser/index.mjs +11 -11
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/intent-resolver-IEDVV74T.mjs +523 -0
- package/dist/lib/browser/intent-resolver-IEDVV74T.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-BDOPFJGJ.mjs → react-root-6VRPRLQR.mjs} +6 -6
- package/dist/lib/browser/{react-surface-EGOL2JBL.mjs → react-surface-DMNDXLZ7.mjs} +26 -33
- package/dist/lib/browser/react-surface-DMNDXLZ7.mjs.map +7 -0
- package/dist/lib/browser/{settings-WF67QZSD.mjs → settings-K4JPYYEM.mjs} +3 -3
- package/dist/lib/browser/{spaces-ready-WVU7US3C.mjs → spaces-ready-2MUWWVVO.mjs} +31 -32
- package/dist/lib/browser/spaces-ready-2MUWWVVO.mjs.map +7 -0
- package/dist/lib/browser/{state-MS4KYJWI.mjs → state-6DCY5YJP.mjs} +3 -3
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node/{app-graph-builder-GKLVZ4PM.cjs → app-graph-builder-ZOPG4MOS.cjs} +58 -56
- package/dist/lib/node/{app-graph-builder-GKLVZ4PM.cjs.map → app-graph-builder-ZOPG4MOS.cjs.map} +3 -3
- package/dist/lib/node/{app-graph-serializer-RMTU5YSC.cjs → app-graph-serializer-QE2G4MWB.cjs} +21 -21
- package/dist/lib/node/{chunk-5D4RWKTV.cjs → chunk-3QWZCN6L.cjs} +65 -60
- package/dist/lib/node/chunk-3QWZCN6L.cjs.map +7 -0
- package/dist/lib/node/{chunk-YCBBGTFD.cjs → chunk-6MEOP3DH.cjs} +8 -9
- package/dist/lib/node/chunk-6MEOP3DH.cjs.map +7 -0
- package/dist/lib/node/{chunk-UENH2YBM.cjs → chunk-D6BFKOXY.cjs} +8 -8
- package/dist/lib/node/{chunk-AJRP7AD6.cjs → chunk-SZEIQGQU.cjs} +292 -251
- package/dist/lib/node/chunk-SZEIQGQU.cjs.map +7 -0
- package/dist/lib/node/{chunk-56NGXG2A.cjs → chunk-UX3U4RU2.cjs} +9 -8
- package/dist/lib/node/chunk-UX3U4RU2.cjs.map +7 -0
- package/dist/lib/node/{chunk-AO4EW2RX.cjs → chunk-WZR6OAN3.cjs} +6 -5
- package/dist/lib/node/{chunk-AO4EW2RX.cjs.map → chunk-WZR6OAN3.cjs.map} +3 -3
- package/dist/lib/node/{identity-created-QQWX7WX3.cjs → identity-created-7G5U7R36.cjs} +7 -7
- package/dist/lib/node/index.cjs +90 -90
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/intent-resolver-N2W2L6OL.cjs +522 -0
- package/dist/lib/node/intent-resolver-N2W2L6OL.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-root-ZTR2J2I3.cjs → react-root-YD35W3VU.cjs} +12 -12
- package/dist/lib/node/{react-surface-75KRPQYT.cjs → react-surface-QPLXK7DT.cjs} +72 -76
- package/dist/lib/node/react-surface-QPLXK7DT.cjs.map +7 -0
- package/dist/lib/node/{settings-KOVSPA3S.cjs → settings-TEELGWS4.cjs} +8 -8
- package/dist/lib/node/{spaces-ready-ILVGUHJH.cjs → spaces-ready-PZZQWS6T.cjs} +39 -40
- package/dist/lib/node/spaces-ready-PZZQWS6T.cjs.map +7 -0
- package/dist/lib/node/{state-4UIOUKLJ.cjs → state-WPZC4JXB.cjs} +8 -8
- package/dist/lib/node/types/index.cjs +16 -16
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{app-graph-builder-NEHQ5Z63.mjs → app-graph-builder-TKGLOK22.mjs} +10 -8
- package/dist/lib/node-esm/{app-graph-builder-NEHQ5Z63.mjs.map → app-graph-builder-TKGLOK22.mjs.map} +3 -3
- package/dist/lib/node-esm/{app-graph-serializer-UWWS5OVC.mjs → app-graph-serializer-HLX2JRNF.mjs} +5 -5
- package/dist/lib/node-esm/{chunk-E5DWIQ3N.mjs → chunk-4UX5WGKJ.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-HTBGWQEU.mjs → chunk-AAQRELDK.mjs} +4 -5
- package/dist/lib/node-esm/chunk-AAQRELDK.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7FUVU45N.mjs → chunk-ICCM4YRJ.mjs} +3 -2
- package/dist/lib/node-esm/{chunk-7FUVU45N.mjs.map → chunk-ICCM4YRJ.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-5QMAPAZD.mjs → chunk-LA45TPAN.mjs} +14 -9
- package/dist/lib/node-esm/chunk-LA45TPAN.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-375RB3CZ.mjs → chunk-LGL4A5B5.mjs} +3 -2
- package/dist/lib/node-esm/chunk-LGL4A5B5.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-GVOPDPS2.mjs → chunk-N6EAOMIS.mjs} +291 -250
- package/dist/lib/node-esm/chunk-N6EAOMIS.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-HMNY2MPB.mjs → identity-created-7THGZ7EW.mjs} +3 -3
- package/dist/lib/node-esm/index.mjs +11 -11
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/intent-resolver-L2TKJU4I.mjs +524 -0
- package/dist/lib/node-esm/intent-resolver-L2TKJU4I.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-OUPJA4RY.mjs → react-root-Q5MFDXZE.mjs} +6 -6
- package/dist/lib/node-esm/{react-surface-7EVWCKIP.mjs → react-surface-RQQZ5BOG.mjs} +26 -33
- package/dist/lib/node-esm/react-surface-RQQZ5BOG.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-EDK6WI3V.mjs → settings-KXYUZBLN.mjs} +3 -3
- package/dist/lib/node-esm/{spaces-ready-CH3W7OGN.mjs → spaces-ready-MWNP3WBX.mjs} +31 -32
- package/dist/lib/node-esm/spaces-ready-MWNP3WBX.mjs.map +7 -0
- package/dist/lib/node-esm/{state-BMISGQ2O.mjs → state-5GH2D5U4.mjs} +3 -3
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +22 -22
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +6 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +33 -33
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +4 -3
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsDialog.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsPanel.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +2 -2
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/package.json +38 -37
- package/src/SpacePlugin.tsx +4 -5
- package/src/capabilities/app-graph-builder.ts +4 -2
- package/src/capabilities/capabilities.ts +4 -1
- package/src/capabilities/intent-resolver.ts +373 -304
- package/src/capabilities/react-surface.tsx +22 -30
- package/src/capabilities/spaces-ready.ts +20 -21
- package/src/components/AwaitingObject.tsx +5 -5
- package/src/components/CreateDialog/CreateObjectDialog.tsx +15 -15
- package/src/components/CreateDialog/CreateObjectPanel.tsx +114 -114
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +10 -8
- package/src/components/JoinDialog.tsx +27 -19
- package/src/components/SpacePluginSettings.tsx +3 -3
- package/src/components/SpacePresence.tsx +2 -3
- package/src/components/SpaceSettings/SpaceSettingsDialog.tsx +16 -1
- package/src/components/SpaceSettings/SpaceSettingsPanel.tsx +3 -4
- package/src/components/SyncStatus/InlineSyncStatus.tsx +2 -2
- package/src/components/SyncStatus/SyncStatus.tsx +2 -1
- package/src/meta.ts +1 -0
- package/src/types/types.ts +2 -3
- package/src/util.tsx +8 -4
- package/dist/lib/browser/chunk-IZ7QKQ2E.mjs.map +0 -7
- package/dist/lib/browser/chunk-SSJ772GK.mjs.map +0 -7
- package/dist/lib/browser/chunk-UH5P4UL3.mjs.map +0 -7
- package/dist/lib/browser/chunk-XXD33C4E.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-XRZYCXXX.mjs +0 -459
- package/dist/lib/browser/intent-resolver-XRZYCXXX.mjs.map +0 -7
- package/dist/lib/browser/react-surface-EGOL2JBL.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-WVU7US3C.mjs.map +0 -7
- package/dist/lib/node/chunk-56NGXG2A.cjs.map +0 -7
- package/dist/lib/node/chunk-5D4RWKTV.cjs.map +0 -7
- package/dist/lib/node/chunk-AJRP7AD6.cjs.map +0 -7
- package/dist/lib/node/chunk-YCBBGTFD.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-3NI6AUAI.cjs +0 -458
- package/dist/lib/node/intent-resolver-3NI6AUAI.cjs.map +0 -7
- package/dist/lib/node/react-surface-75KRPQYT.cjs.map +0 -7
- package/dist/lib/node/spaces-ready-ILVGUHJH.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-375RB3CZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5QMAPAZD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GVOPDPS2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HTBGWQEU.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-P5EVBOGP.mjs +0 -460
- package/dist/lib/node-esm/intent-resolver-P5EVBOGP.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-7EVWCKIP.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-CH3W7OGN.mjs.map +0 -7
- /package/dist/lib/browser/{app-graph-serializer-FYJE23GN.mjs.map → app-graph-serializer-QF7VVRCV.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-T36CIHPG.mjs.map → chunk-SDK7RZI3.mjs.map} +0 -0
- /package/dist/lib/browser/{identity-created-4Q4PFIC5.mjs.map → identity-created-25TK5XNO.mjs.map} +0 -0
- /package/dist/lib/browser/{react-root-BDOPFJGJ.mjs.map → react-root-6VRPRLQR.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-WF67QZSD.mjs.map → settings-K4JPYYEM.mjs.map} +0 -0
- /package/dist/lib/browser/{state-MS4KYJWI.mjs.map → state-6DCY5YJP.mjs.map} +0 -0
- /package/dist/lib/node/{app-graph-serializer-RMTU5YSC.cjs.map → app-graph-serializer-QE2G4MWB.cjs.map} +0 -0
- /package/dist/lib/node/{chunk-UENH2YBM.cjs.map → chunk-D6BFKOXY.cjs.map} +0 -0
- /package/dist/lib/node/{identity-created-QQWX7WX3.cjs.map → identity-created-7G5U7R36.cjs.map} +0 -0
- /package/dist/lib/node/{react-root-ZTR2J2I3.cjs.map → react-root-YD35W3VU.cjs.map} +0 -0
- /package/dist/lib/node/{settings-KOVSPA3S.cjs.map → settings-TEELGWS4.cjs.map} +0 -0
- /package/dist/lib/node/{state-4UIOUKLJ.cjs.map → state-WPZC4JXB.cjs.map} +0 -0
- /package/dist/lib/node-esm/{app-graph-serializer-UWWS5OVC.mjs.map → app-graph-serializer-HLX2JRNF.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-E5DWIQ3N.mjs.map → chunk-4UX5WGKJ.mjs.map} +0 -0
- /package/dist/lib/node-esm/{identity-created-HMNY2MPB.mjs.map → identity-created-7THGZ7EW.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-root-OUPJA4RY.mjs.map → react-root-Q5MFDXZE.mjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-EDK6WI3V.mjs.map → settings-KXYUZBLN.mjs.map} +0 -0
- /package/dist/lib/node-esm/{state-BMISGQ2O.mjs.map → state-5GH2D5U4.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_SZEIQGQU_exports = {};
|
|
30
|
+
__export(chunk_SZEIQGQU_exports, {
|
|
31
31
|
AdvancedObjectSettings: () => AdvancedObjectSettings,
|
|
32
32
|
AppGraphBuilder: () => AppGraphBuilder,
|
|
33
33
|
AppGraphSerializer: () => AppGraphSerializer,
|
|
@@ -69,11 +69,11 @@ __export(chunk_AJRP7AD6_exports, {
|
|
|
69
69
|
SyncStatusDetail: () => SyncStatusDetail,
|
|
70
70
|
SyncStatusIndicator: () => SyncStatusIndicator
|
|
71
71
|
});
|
|
72
|
-
module.exports = __toCommonJS(
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var
|
|
72
|
+
module.exports = __toCommonJS(chunk_SZEIQGQU_exports);
|
|
73
|
+
var import_chunk_UX3U4RU2 = require("./chunk-UX3U4RU2.cjs");
|
|
74
|
+
var import_chunk_3QWZCN6L = require("./chunk-3QWZCN6L.cjs");
|
|
75
|
+
var import_chunk_6MEOP3DH = require("./chunk-6MEOP3DH.cjs");
|
|
76
|
+
var import_chunk_WZR6OAN3 = require("./chunk-WZR6OAN3.cjs");
|
|
77
77
|
var import_react = __toESM(require("react"));
|
|
78
78
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
79
79
|
var import_echo = require("@dxos/react-client/echo");
|
|
@@ -99,39 +99,40 @@ var import_react_ui5 = require("@dxos/react-ui");
|
|
|
99
99
|
var import_react7 = __toESM(require("react"));
|
|
100
100
|
var import_app_framework3 = require("@dxos/app-framework");
|
|
101
101
|
var import_echo_schema2 = require("@dxos/echo-schema");
|
|
102
|
-
var import_echo4 = require("@dxos/react-client/echo");
|
|
103
102
|
var import_react_ui6 = require("@dxos/react-ui");
|
|
104
103
|
var import_react_ui_form2 = require("@dxos/react-ui-form");
|
|
105
104
|
var import_react_ui_searchlist = require("@dxos/react-ui-searchlist");
|
|
105
|
+
var import_react_ui_theme2 = require("@dxos/react-ui-theme");
|
|
106
106
|
var import_util = require("@dxos/util");
|
|
107
|
+
var import_effect2 = require("effect");
|
|
107
108
|
var import_react8 = __toESM(require("react"));
|
|
108
109
|
var import_app_framework4 = require("@dxos/app-framework");
|
|
109
110
|
var import_react_ui7 = require("@dxos/react-ui");
|
|
110
111
|
var import_react_ui_form3 = require("@dxos/react-ui-form");
|
|
111
112
|
var import_react9 = __toESM(require("react"));
|
|
112
113
|
var import_react_ui8 = require("@dxos/react-ui");
|
|
113
|
-
var
|
|
114
|
+
var import_react_ui_theme3 = require("@dxos/react-ui-theme");
|
|
114
115
|
var import_react10 = __toESM(require("react"));
|
|
115
116
|
var import_react_ui9 = require("@dxos/react-ui");
|
|
116
117
|
var import_react11 = __toESM(require("react"));
|
|
117
118
|
var import_app_framework5 = require("@dxos/app-framework");
|
|
118
|
-
var
|
|
119
|
+
var import_log = require("@dxos/log");
|
|
119
120
|
var import_types = require("@dxos/plugin-observability/types");
|
|
120
|
-
var
|
|
121
|
+
var import_react_client3 = require("@dxos/react-client");
|
|
121
122
|
var import_react_ui10 = require("@dxos/react-ui");
|
|
122
123
|
var import_react12 = require("@dxos/shell/react");
|
|
123
124
|
var import_react13 = require("@phosphor-icons/react");
|
|
124
125
|
var import_react14 = __toESM(require("react"));
|
|
125
|
-
var
|
|
126
|
-
var
|
|
126
|
+
var import_echo4 = require("@dxos/client/echo");
|
|
127
|
+
var import_react_client4 = require("@dxos/react-client");
|
|
127
128
|
var import_react_ui11 = require("@dxos/react-ui");
|
|
128
129
|
var import_react15 = require("@phosphor-icons/react");
|
|
129
130
|
var import_react16 = __toESM(require("react"));
|
|
130
131
|
var import_async = require("@dxos/async");
|
|
131
132
|
var import_react_ui12 = require("@dxos/react-ui");
|
|
132
|
-
var
|
|
133
|
+
var import_react_ui_theme4 = require("@dxos/react-ui-theme");
|
|
133
134
|
var import_react17 = __toESM(require("react"));
|
|
134
|
-
var
|
|
135
|
+
var import_log2 = require("@dxos/log");
|
|
135
136
|
var import_react_ui13 = require("@dxos/react-ui");
|
|
136
137
|
var import_react18 = __toESM(require("react"));
|
|
137
138
|
var import_react_ui14 = require("@dxos/react-ui");
|
|
@@ -141,9 +142,8 @@ var import_react_ui15 = require("@dxos/react-ui");
|
|
|
141
142
|
var import_react20 = __toESM(require("react"));
|
|
142
143
|
var import_app_framework7 = require("@dxos/app-framework");
|
|
143
144
|
var import_display_name = require("@dxos/display-name");
|
|
144
|
-
var
|
|
145
|
-
var
|
|
146
|
-
var import_echo7 = require("@dxos/react-client/echo");
|
|
145
|
+
var import_react_client5 = require("@dxos/react-client");
|
|
146
|
+
var import_echo5 = require("@dxos/react-client/echo");
|
|
147
147
|
var import_halo = require("@dxos/react-client/halo");
|
|
148
148
|
var import_react_ui16 = require("@dxos/react-ui");
|
|
149
149
|
var import_react_ui_attention = require("@dxos/react-ui-attention");
|
|
@@ -154,37 +154,37 @@ var import_react22 = __toESM(require("react"));
|
|
|
154
154
|
var import_react_ui17 = require("@dxos/react-ui");
|
|
155
155
|
var import_react_ui_form4 = require("@dxos/react-ui-form");
|
|
156
156
|
var import_react23 = __toESM(require("react"));
|
|
157
|
-
var
|
|
157
|
+
var import_log3 = require("@dxos/log");
|
|
158
158
|
var import_metadata = require("@dxos/protocols/proto/dxos/echo/metadata");
|
|
159
|
-
var
|
|
159
|
+
var import_react_client6 = require("@dxos/react-client");
|
|
160
160
|
var import_react_ui18 = require("@dxos/react-ui");
|
|
161
161
|
var import_react_ui_form5 = require("@dxos/react-ui-form");
|
|
162
|
-
var import_react_ui_theme4 = require("@dxos/react-ui-theme");
|
|
163
162
|
var import_react24 = __toESM(require("react"));
|
|
164
|
-
var
|
|
163
|
+
var import_app_framework9 = require("@dxos/app-framework");
|
|
164
|
+
var import_react_client7 = require("@dxos/react-client");
|
|
165
165
|
var import_react_ui19 = require("@dxos/react-ui");
|
|
166
166
|
var import_react_ui_tabs = require("@dxos/react-ui-tabs");
|
|
167
167
|
var import_react25 = require("@dxos/shell/react");
|
|
168
168
|
var import_react26 = __toESM(require("react"));
|
|
169
|
-
var
|
|
169
|
+
var import_app_framework10 = require("@dxos/app-framework");
|
|
170
170
|
var import_services = require("@dxos/protocols/proto/dxos/client/services");
|
|
171
171
|
var import_metadata2 = require("@dxos/protocols/proto/dxos/echo/metadata");
|
|
172
|
-
var
|
|
172
|
+
var import_react_client8 = require("@dxos/react-client");
|
|
173
173
|
var import_react_ui20 = require("@dxos/react-ui");
|
|
174
174
|
var import_react_ui_attention2 = require("@dxos/react-ui-attention");
|
|
175
175
|
var import_react27 = require("react");
|
|
176
176
|
var import_context = require("@dxos/context");
|
|
177
177
|
var import_protocols = require("@dxos/protocols");
|
|
178
|
-
var
|
|
178
|
+
var import_react_client9 = require("@dxos/react-client");
|
|
179
179
|
var import_react28 = __toESM(require("react"));
|
|
180
180
|
var import_plugin_status_bar = require("@dxos/plugin-status-bar");
|
|
181
|
-
var
|
|
181
|
+
var import_react_client10 = require("@dxos/react-client");
|
|
182
182
|
var import_react_ui21 = require("@dxos/react-ui");
|
|
183
183
|
var import_react_ui_syntax_highlighter = require("@dxos/react-ui-syntax-highlighter");
|
|
184
184
|
var import_react_ui_theme5 = require("@dxos/react-ui-theme");
|
|
185
185
|
var import_react29 = __toESM(require("react"));
|
|
186
|
-
var
|
|
187
|
-
var
|
|
186
|
+
var import_react_client11 = require("@dxos/react-client");
|
|
187
|
+
var import_echo6 = require("@dxos/react-client/echo");
|
|
188
188
|
var import_react_ui22 = require("@dxos/react-ui");
|
|
189
189
|
var import_react_ui_theme6 = require("@dxos/react-ui-theme");
|
|
190
190
|
var import_context2 = require("@dxos/context");
|
|
@@ -198,7 +198,7 @@ var ForeignKeys = ({ keys, onDelete }) => {
|
|
|
198
198
|
})));
|
|
199
199
|
};
|
|
200
200
|
var KeyItem = ({ forignKey, onDelete }) => {
|
|
201
|
-
const { t } = (0, import_react_ui2.useTranslation)(
|
|
201
|
+
const { t } = (0, import_react_ui2.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
202
202
|
const handleDelete = (0, import_react2.useCallback)(() => {
|
|
203
203
|
onDelete?.(forignKey);
|
|
204
204
|
}, [
|
|
@@ -224,7 +224,7 @@ var initialValues = {
|
|
|
224
224
|
id: ""
|
|
225
225
|
};
|
|
226
226
|
var AdvancedObjectSettings = ({ object }) => {
|
|
227
|
-
const { t } = (0, import_react_ui.useTranslation)(
|
|
227
|
+
const { t } = (0, import_react_ui.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
228
228
|
const [adding, setAdding] = (0, import_react.useState)(false);
|
|
229
229
|
const keys = (0, import_echo.getMeta)(object).keys;
|
|
230
230
|
const handleNew = (0, import_react.useCallback)(() => setAdding(true), []);
|
|
@@ -275,9 +275,9 @@ var AwaitingObject = ({ id }) => {
|
|
|
275
275
|
const [open, setOpen] = (0, import_react4.useState)(true);
|
|
276
276
|
const [waiting, setWaiting] = (0, import_react4.useState)(true);
|
|
277
277
|
const [found, setFound] = (0, import_react4.useState)(false);
|
|
278
|
-
const { t } = (0, import_react_ui3.useTranslation)(
|
|
278
|
+
const { t } = (0, import_react_ui3.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
279
279
|
const { dispatchPromise: dispatch } = (0, import_app_framework.useIntentDispatcher)();
|
|
280
|
-
const
|
|
280
|
+
const layout = (0, import_app_framework.useLayout)();
|
|
281
281
|
const client = (0, import_react_client.useClient)();
|
|
282
282
|
const objects = (0, import_echo2.useQuery)(client.spaces, import_echo2.Filter.all());
|
|
283
283
|
(0, import_react4.useEffect)(() => {
|
|
@@ -294,27 +294,26 @@ var AwaitingObject = ({ id }) => {
|
|
|
294
294
|
(0, import_react4.useEffect)(() => {
|
|
295
295
|
if (objects.findIndex((object) => (0, import_echo2.fullyQualifiedId)(object) === id) > -1) {
|
|
296
296
|
setFound(true);
|
|
297
|
-
if (
|
|
297
|
+
if (layout.active.includes(id)) {
|
|
298
298
|
setOpen(false);
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
}, [
|
|
302
302
|
id,
|
|
303
303
|
objects,
|
|
304
|
-
|
|
304
|
+
layout
|
|
305
305
|
]);
|
|
306
|
-
const handleClose = (0, import_react4.useCallback)(async () => dispatch((0, import_app_framework.createIntent)(
|
|
306
|
+
const handleClose = (0, import_react4.useCallback)(async () => dispatch((0, import_app_framework.createIntent)(import_chunk_6MEOP3DH.SpaceAction.WaitForObject, {
|
|
307
307
|
id: void 0
|
|
308
308
|
})), [
|
|
309
309
|
dispatch
|
|
310
310
|
]);
|
|
311
311
|
const handleNavigate = (0, import_react4.useCallback)(() => {
|
|
312
|
-
void dispatch((0, import_app_framework.createIntent)(import_app_framework.
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
}
|
|
312
|
+
void dispatch((0, import_app_framework.createIntent)(import_app_framework.LayoutAction.Open, {
|
|
313
|
+
part: "main",
|
|
314
|
+
subject: [
|
|
315
|
+
id
|
|
316
|
+
]
|
|
318
317
|
}));
|
|
319
318
|
void handleClose();
|
|
320
319
|
}, [
|
|
@@ -355,7 +354,7 @@ var AwaitingObject = ({ id }) => {
|
|
|
355
354
|
})))));
|
|
356
355
|
};
|
|
357
356
|
var BaseObjectSettings = ({ object }) => {
|
|
358
|
-
const { t } = (0, import_react_ui4.useTranslation)(
|
|
357
|
+
const { t } = (0, import_react_ui4.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
359
358
|
return /* @__PURE__ */ import_react5.default.createElement("div", {
|
|
360
359
|
role: "form",
|
|
361
360
|
className: "flex flex-col w-full p-2 gap-1"
|
|
@@ -391,14 +390,22 @@ var useInputSurfaceLookup = (baseData) => {
|
|
|
391
390
|
baseData
|
|
392
391
|
]);
|
|
393
392
|
};
|
|
394
|
-
var CreateObjectPanel = ({ schemas, spaces, typename: initialTypename, target: initialTarget, name: initialName, defaultSpaceId, resolve, onCreateObject }) => {
|
|
395
|
-
const { t } = (0, import_react_ui6.useTranslation)(
|
|
393
|
+
var CreateObjectPanel = ({ classNames, schemas, spaces, typename: initialTypename, target: initialTarget, name: initialName, defaultSpaceId, resolve, onCreateObject }) => {
|
|
394
|
+
const { t } = (0, import_react_ui6.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
396
395
|
const [typename, setTypename] = (0, import_react7.useState)(initialTypename);
|
|
397
396
|
const [target, setTarget] = (0, import_react7.useState)(initialTarget);
|
|
398
397
|
const schema = schemas.find((schema2) => (0, import_echo_schema2.getObjectAnnotation)(schema2)?.typename === typename);
|
|
399
|
-
const options = schemas.map(import_echo_schema2.getObjectAnnotation).filter(import_util.nonNullable)
|
|
400
|
-
|
|
401
|
-
|
|
398
|
+
const options = schemas.map(import_echo_schema2.getObjectAnnotation).filter(import_util.nonNullable).sort((a, b) => {
|
|
399
|
+
const nameA = t("typename label", {
|
|
400
|
+
ns: a.typename,
|
|
401
|
+
defaultValue: a.typename
|
|
402
|
+
});
|
|
403
|
+
const nameB = t("typename label", {
|
|
404
|
+
ns: b.typename,
|
|
405
|
+
defaultValue: b.typename
|
|
406
|
+
});
|
|
407
|
+
return nameA.localeCompare(nameB);
|
|
408
|
+
});
|
|
402
409
|
const handleCreateObject = (0, import_react7.useCallback)(async (props) => {
|
|
403
410
|
if (!schema || !target) {
|
|
404
411
|
return;
|
|
@@ -422,55 +429,6 @@ var CreateObjectPanel = ({ schemas, spaces, typename: initialTypename, target: i
|
|
|
422
429
|
resolve,
|
|
423
430
|
typename
|
|
424
431
|
]);
|
|
425
|
-
const schemaInput = /* @__PURE__ */ import_react7.default.createElement(import_react_ui_searchlist.SearchList.Root, {
|
|
426
|
-
label: t("schema input label"),
|
|
427
|
-
classNames: "flex flex-col grow overflow-hidden"
|
|
428
|
-
}, /* @__PURE__ */ import_react7.default.createElement(import_react_ui_searchlist.SearchList.Input, {
|
|
429
|
-
autoFocus: true,
|
|
430
|
-
"data-testid": "create-object-form.schema-input",
|
|
431
|
-
placeholder: t("schema input placeholder"),
|
|
432
|
-
classNames: "px-1 my-2"
|
|
433
|
-
}), /* @__PURE__ */ import_react7.default.createElement(import_react_ui_searchlist.SearchList.Content, {
|
|
434
|
-
classNames: "max-bs-[24rem] overflow-auto"
|
|
435
|
-
}, options.map((option) => /* @__PURE__ */ import_react7.default.createElement(import_react_ui_searchlist.SearchList.Item, {
|
|
436
|
-
key: option.typename,
|
|
437
|
-
value: t("typename label", {
|
|
438
|
-
ns: option.typename,
|
|
439
|
-
defaultValue: option.typename
|
|
440
|
-
}),
|
|
441
|
-
onSelect: () => setTypename(option.typename),
|
|
442
|
-
classNames: "flex items-center gap-2"
|
|
443
|
-
}, /* @__PURE__ */ import_react7.default.createElement("span", {
|
|
444
|
-
className: "flex gap-2 items-center grow truncate"
|
|
445
|
-
}, /* @__PURE__ */ import_react7.default.createElement(import_react_ui6.Icon, {
|
|
446
|
-
icon: resolve?.(option.typename).icon ?? "ph--placeholder--regular",
|
|
447
|
-
size: 5
|
|
448
|
-
}), t("typename label", {
|
|
449
|
-
ns: option.typename,
|
|
450
|
-
defaultValue: option.typename
|
|
451
|
-
}))))));
|
|
452
|
-
const spaceInput = /* @__PURE__ */ import_react7.default.createElement(import_react_ui_searchlist.SearchList.Root, {
|
|
453
|
-
label: t("space input label"),
|
|
454
|
-
classNames: "flex flex-col grow overflow-hidden"
|
|
455
|
-
}, /* @__PURE__ */ import_react7.default.createElement(import_react_ui_searchlist.SearchList.Input, {
|
|
456
|
-
autoFocus: true,
|
|
457
|
-
"data-testid": "create-object-form.space-input",
|
|
458
|
-
placeholder: t("space input placeholder"),
|
|
459
|
-
classNames: "px-1 my-2"
|
|
460
|
-
}), /* @__PURE__ */ import_react7.default.createElement(import_react_ui_searchlist.SearchList.Content, {
|
|
461
|
-
classNames: "max-bs-[24rem] overflow-auto"
|
|
462
|
-
}, spaces.map((space) => /* @__PURE__ */ import_react7.default.createElement(import_react_ui_searchlist.SearchList.Item, {
|
|
463
|
-
key: space.id,
|
|
464
|
-
value: (0, import_react_ui6.toLocalizedString)((0, import_chunk_5D4RWKTV.getSpaceDisplayName)(space, {
|
|
465
|
-
personal: space.id === defaultSpaceId
|
|
466
|
-
}), t),
|
|
467
|
-
onSelect: () => setTarget(space),
|
|
468
|
-
classNames: "flex items-center gap-2"
|
|
469
|
-
}, /* @__PURE__ */ import_react7.default.createElement("span", {
|
|
470
|
-
className: "grow truncate"
|
|
471
|
-
}, (0, import_react_ui6.toLocalizedString)((0, import_chunk_5D4RWKTV.getSpaceDisplayName)(space, {
|
|
472
|
-
personal: space.id === defaultSpaceId
|
|
473
|
-
}), t))))));
|
|
474
432
|
const inputSurfaceLookup = useInputSurfaceLookup({
|
|
475
433
|
target
|
|
476
434
|
});
|
|
@@ -479,6 +437,7 @@ var CreateObjectPanel = ({ schemas, spaces, typename: initialTypename, target: i
|
|
|
479
437
|
name: import_echo_schema2.S.optional(import_echo_schema2.S.String)
|
|
480
438
|
});
|
|
481
439
|
return /* @__PURE__ */ import_react7.default.createElement(import_react_ui_form2.Form, {
|
|
440
|
+
classNames: "!p-0",
|
|
482
441
|
autoFocus: true,
|
|
483
442
|
values: {
|
|
484
443
|
name: initialName
|
|
@@ -495,49 +454,89 @@ var CreateObjectPanel = ({ schemas, spaces, typename: initialTypename, target: i
|
|
|
495
454
|
]);
|
|
496
455
|
return /* @__PURE__ */ import_react7.default.createElement("div", {
|
|
497
456
|
role: "form",
|
|
498
|
-
className: "flex flex-col gap-2"
|
|
499
|
-
},
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
label: t("
|
|
513
|
-
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
}, /* @__PURE__ */ import_react7.default.createElement(
|
|
520
|
-
|
|
457
|
+
className: (0, import_react_ui_theme2.mx)("flex flex-col gap-2", classNames)
|
|
458
|
+
}, !schema ? /* @__PURE__ */ import_react7.default.createElement(SelectSchema, {
|
|
459
|
+
options,
|
|
460
|
+
resolve,
|
|
461
|
+
onChange: setTypename
|
|
462
|
+
}) : !target ? /* @__PURE__ */ import_react7.default.createElement(SelectSpace, {
|
|
463
|
+
spaces,
|
|
464
|
+
defaultSpaceId,
|
|
465
|
+
onChange: setTarget
|
|
466
|
+
}) : form);
|
|
467
|
+
};
|
|
468
|
+
var SelectSpace = ({ spaces, defaultSpaceId, onChange }) => {
|
|
469
|
+
const { t } = (0, import_react_ui6.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
470
|
+
return /* @__PURE__ */ import_react7.default.createElement(import_react_ui_searchlist.SearchList.Root, {
|
|
471
|
+
label: t("space input label"),
|
|
472
|
+
classNames: "flex flex-col grow overflow-hidden"
|
|
473
|
+
}, /* @__PURE__ */ import_react7.default.createElement(import_react_ui_searchlist.SearchList.Input, {
|
|
474
|
+
autoFocus: true,
|
|
475
|
+
"data-testid": "create-object-form.space-input",
|
|
476
|
+
placeholder: t("space input placeholder"),
|
|
477
|
+
classNames: "px-1 my-2"
|
|
478
|
+
}), /* @__PURE__ */ import_react7.default.createElement(import_react_ui_searchlist.SearchList.Content, {
|
|
479
|
+
classNames: "max-bs-[24rem] overflow-auto"
|
|
480
|
+
}, spaces.sort((a, b) => {
|
|
481
|
+
const aName = (0, import_react_ui6.toLocalizedString)((0, import_chunk_3QWZCN6L.getSpaceDisplayName)(a, {
|
|
482
|
+
personal: a.id === defaultSpaceId
|
|
483
|
+
}), t);
|
|
484
|
+
const bName = (0, import_react_ui6.toLocalizedString)((0, import_chunk_3QWZCN6L.getSpaceDisplayName)(b, {
|
|
485
|
+
personal: b.id === defaultSpaceId
|
|
486
|
+
}), t);
|
|
487
|
+
return aName.localeCompare(bName);
|
|
488
|
+
}).map((space) => /* @__PURE__ */ import_react7.default.createElement(import_react_ui_searchlist.SearchList.Item, {
|
|
489
|
+
key: space.id,
|
|
490
|
+
value: (0, import_react_ui6.toLocalizedString)((0, import_chunk_3QWZCN6L.getSpaceDisplayName)(space, {
|
|
491
|
+
personal: space.id === defaultSpaceId
|
|
492
|
+
}), t),
|
|
493
|
+
onSelect: () => onChange(space),
|
|
494
|
+
classNames: "flex items-center gap-2"
|
|
495
|
+
}, /* @__PURE__ */ import_react7.default.createElement("span", {
|
|
496
|
+
className: "grow truncate"
|
|
497
|
+
}, (0, import_react_ui6.toLocalizedString)((0, import_chunk_3QWZCN6L.getSpaceDisplayName)(space, {
|
|
498
|
+
personal: space.id === defaultSpaceId
|
|
499
|
+
}), t))))));
|
|
500
|
+
};
|
|
501
|
+
var SelectSchema = ({ options, resolve, onChange }) => {
|
|
502
|
+
const { t } = (0, import_react_ui6.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
503
|
+
return /* @__PURE__ */ import_react7.default.createElement(import_react_ui_searchlist.SearchList.Root, {
|
|
504
|
+
label: t("schema input label"),
|
|
505
|
+
classNames: "flex flex-col grow overflow-hidden"
|
|
506
|
+
}, /* @__PURE__ */ import_react7.default.createElement(import_react_ui_searchlist.SearchList.Input, {
|
|
507
|
+
autoFocus: true,
|
|
508
|
+
"data-testid": "create-object-form.schema-input",
|
|
509
|
+
placeholder: t("schema input placeholder"),
|
|
510
|
+
classNames: "px-1 my-2"
|
|
511
|
+
}), /* @__PURE__ */ import_react7.default.createElement(import_react_ui_searchlist.SearchList.Content, {
|
|
512
|
+
classNames: "max-bs-[24rem] overflow-auto"
|
|
513
|
+
}, options.map((option) => /* @__PURE__ */ import_react7.default.createElement(import_react_ui_searchlist.SearchList.Item, {
|
|
514
|
+
key: option.typename,
|
|
521
515
|
value: t("typename label", {
|
|
522
|
-
ns:
|
|
523
|
-
defaultValue:
|
|
524
|
-
})
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
516
|
+
ns: option.typename,
|
|
517
|
+
defaultValue: option.typename
|
|
518
|
+
}),
|
|
519
|
+
onSelect: () => onChange(option.typename),
|
|
520
|
+
classNames: "flex items-center gap-2"
|
|
521
|
+
}, /* @__PURE__ */ import_react7.default.createElement("span", {
|
|
522
|
+
className: "flex gap-2 items-center grow truncate"
|
|
523
|
+
}, /* @__PURE__ */ import_react7.default.createElement(import_react_ui6.Icon, {
|
|
524
|
+
icon: resolve?.(option.typename).icon ?? "ph--placeholder--regular",
|
|
525
|
+
size: 5
|
|
526
|
+
}), t("typename label", {
|
|
527
|
+
ns: option.typename,
|
|
528
|
+
defaultValue: option.typename
|
|
529
|
+
}))))));
|
|
531
530
|
};
|
|
532
|
-
var CREATE_OBJECT_DIALOG = `${
|
|
531
|
+
var CREATE_OBJECT_DIALOG = `${import_chunk_WZR6OAN3.SPACE_PLUGIN}/CreateObjectDialog`;
|
|
533
532
|
var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _shouldNavigate, resolve }) => {
|
|
534
533
|
const closeRef = (0, import_react6.useRef)(null);
|
|
535
|
-
const { t } = (0, import_react_ui5.useTranslation)(
|
|
534
|
+
const { t } = (0, import_react_ui5.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
536
535
|
const client = (0, import_react_client2.useClient)();
|
|
537
536
|
const spaces = (0, import_echo3.useSpaces)();
|
|
538
537
|
const { dispatchPromise: dispatch } = (0, import_app_framework2.useIntentDispatcher)();
|
|
539
538
|
const handleCreateObject = (0, import_react6.useCallback)(async ({ schema, target: _target, data }) => {
|
|
540
|
-
const target2 = (0, import_echo3.isSpace)(_target) ? _target.properties[
|
|
539
|
+
const target2 = (0, import_echo3.isSpace)(_target) ? _target.properties[import_chunk_6MEOP3DH.CollectionType.typename]?.target : _target;
|
|
541
540
|
const createObjectIntent = resolve?.(schema.typename)?.createObject;
|
|
542
541
|
if (!createObjectIntent || !target2) {
|
|
543
542
|
return;
|
|
@@ -549,13 +548,15 @@ var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _sh
|
|
|
549
548
|
}));
|
|
550
549
|
const object = result.data?.object;
|
|
551
550
|
if ((0, import_echo3.isReactiveObject)(object)) {
|
|
552
|
-
const addObjectIntent = (0, import_app_framework2.createIntent)(
|
|
551
|
+
const addObjectIntent = (0, import_app_framework2.createIntent)(import_chunk_6MEOP3DH.SpaceAction.AddObject, {
|
|
553
552
|
target: target2,
|
|
554
553
|
object
|
|
555
554
|
});
|
|
556
555
|
const shouldNavigate = _shouldNavigate ?? (() => true);
|
|
557
556
|
if (shouldNavigate(object)) {
|
|
558
|
-
await dispatch((0, import_effect.pipe)(addObjectIntent, (0, import_app_framework2.chain)(import_app_framework2.
|
|
557
|
+
await dispatch((0, import_effect.pipe)(addObjectIntent, (0, import_app_framework2.chain)(import_app_framework2.LayoutAction.Open, {
|
|
558
|
+
part: "main"
|
|
559
|
+
})));
|
|
559
560
|
} else {
|
|
560
561
|
await dispatch(addObjectIntent);
|
|
561
562
|
}
|
|
@@ -568,7 +569,7 @@ var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _sh
|
|
|
568
569
|
// TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
|
|
569
570
|
// Consider factoring it out to the tabs package.
|
|
570
571
|
/* @__PURE__ */ import_react6.default.createElement(import_react_ui5.Dialog.Content, {
|
|
571
|
-
classNames: "p-0 bs-content
|
|
572
|
+
classNames: "p-0 bs-content max-bs-full md:max-is-[40rem] overflow-hidden"
|
|
572
573
|
}, /* @__PURE__ */ import_react6.default.createElement("div", {
|
|
573
574
|
role: "none",
|
|
574
575
|
className: "flex justify-between pbs-2 pis-2 pie-2 @md:pbs-4 @md:pis-4 @md:pie-4"
|
|
@@ -582,9 +583,8 @@ var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _sh
|
|
|
582
583
|
}, /* @__PURE__ */ import_react6.default.createElement(import_react_ui5.Icon, {
|
|
583
584
|
icon: "ph--x--regular",
|
|
584
585
|
size: 4
|
|
585
|
-
})))), /* @__PURE__ */ import_react6.default.createElement(
|
|
586
|
-
|
|
587
|
-
}, /* @__PURE__ */ import_react6.default.createElement(CreateObjectPanel, {
|
|
586
|
+
})))), /* @__PURE__ */ import_react6.default.createElement(CreateObjectPanel, {
|
|
587
|
+
classNames: "p-4",
|
|
588
588
|
schemas,
|
|
589
589
|
spaces,
|
|
590
590
|
target,
|
|
@@ -593,25 +593,29 @@ var CreateObjectDialog = ({ schemas, target, typename, name, shouldNavigate: _sh
|
|
|
593
593
|
defaultSpaceId: client.spaces.default.id,
|
|
594
594
|
resolve,
|
|
595
595
|
onCreateObject: handleCreateObject
|
|
596
|
-
}))
|
|
596
|
+
}))
|
|
597
597
|
);
|
|
598
598
|
};
|
|
599
|
-
var CREATE_SPACE_DIALOG = `${
|
|
599
|
+
var CREATE_SPACE_DIALOG = `${import_chunk_WZR6OAN3.SPACE_PLUGIN}/CreateSpaceDialog`;
|
|
600
600
|
var initialValues2 = {
|
|
601
601
|
edgeReplication: true
|
|
602
602
|
};
|
|
603
603
|
var CreateSpaceDialog = () => {
|
|
604
604
|
const closeRef = (0, import_react8.useRef)(null);
|
|
605
|
-
const { t } = (0, import_react_ui7.useTranslation)(
|
|
606
|
-
const {
|
|
605
|
+
const { t } = (0, import_react_ui7.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
606
|
+
const { dispatch } = (0, import_app_framework4.useIntentDispatcher)();
|
|
607
607
|
const handleCreateSpace = (0, import_react8.useCallback)(async (data) => {
|
|
608
|
-
const
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
608
|
+
const program = import_effect2.Effect.gen(function* () {
|
|
609
|
+
const { space } = yield* dispatch((0, import_app_framework4.createIntent)(import_chunk_6MEOP3DH.SpaceAction.Create, data));
|
|
610
|
+
yield* dispatch((0, import_app_framework4.createIntent)(import_app_framework4.LayoutAction.SwitchWorkspace, {
|
|
611
|
+
part: "workspace",
|
|
612
|
+
subject: space.id
|
|
613
613
|
}));
|
|
614
|
-
|
|
614
|
+
yield* dispatch((0, import_app_framework4.createIntent)(import_chunk_6MEOP3DH.SpaceAction.OpenCreateObject, {
|
|
615
|
+
target: space
|
|
616
|
+
}));
|
|
617
|
+
});
|
|
618
|
+
await import_effect2.Effect.runPromise(program);
|
|
615
619
|
}, [
|
|
616
620
|
dispatch
|
|
617
621
|
]);
|
|
@@ -619,7 +623,7 @@ var CreateSpaceDialog = () => {
|
|
|
619
623
|
// TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
|
|
620
624
|
// Consider factoring it out to the tabs package.
|
|
621
625
|
/* @__PURE__ */ import_react8.default.createElement(import_react_ui7.Dialog.Content, {
|
|
622
|
-
classNames: "p-0 bs-content min-bs-[
|
|
626
|
+
classNames: "p-0 bs-content min-bs-[16rem] max-bs-full md:max-is-[32rem] overflow-hidden"
|
|
623
627
|
}, /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
624
628
|
role: "none",
|
|
625
629
|
className: "flex justify-between pbs-2 pis-2 pie-2 @md:pbs-4 @md:pis-4 @md:pie-4"
|
|
@@ -638,55 +642,80 @@ var CreateSpaceDialog = () => {
|
|
|
638
642
|
}, /* @__PURE__ */ import_react8.default.createElement(import_react_ui_form3.Form, {
|
|
639
643
|
testId: "create-space-form",
|
|
640
644
|
values: initialValues2,
|
|
641
|
-
schema:
|
|
645
|
+
schema: import_chunk_6MEOP3DH.SpaceForm,
|
|
642
646
|
onSave: handleCreateSpace
|
|
643
647
|
})))
|
|
644
648
|
);
|
|
645
649
|
};
|
|
646
650
|
var CollectionMain = ({ collection }) => {
|
|
647
|
-
const { t } = (0, import_react_ui8.useTranslation)(
|
|
651
|
+
const { t } = (0, import_react_ui8.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
648
652
|
return /* @__PURE__ */ import_react9.default.createElement("div", {
|
|
649
653
|
role: "none",
|
|
650
|
-
className: (0,
|
|
654
|
+
className: (0, import_react_ui_theme3.mx)(import_react_ui_theme3.baseSurface, "min-bs-screen is-full flex items-center justify-center p-8"),
|
|
651
655
|
"data-testid": "composer.firstRunMessage"
|
|
652
656
|
}, /* @__PURE__ */ import_react9.default.createElement("p", {
|
|
653
657
|
role: "alert",
|
|
654
|
-
className: (0,
|
|
658
|
+
className: (0, import_react_ui_theme3.mx)(import_react_ui_theme3.descriptionText, "border border-dashed border-neutral-400/50 rounded-lg p-8 font-normal text-lg max-is-[24rem] break-words")
|
|
655
659
|
}, collection.name ?? t("unnamed collection label")));
|
|
656
660
|
};
|
|
657
661
|
var CollectionSection = ({ collection }) => {
|
|
658
|
-
const { t } = (0, import_react_ui9.useTranslation)(
|
|
662
|
+
const { t } = (0, import_react_ui9.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
659
663
|
return /* @__PURE__ */ import_react10.default.createElement("div", {
|
|
660
664
|
className: "min-bs-[3.5rem] grid grid-rows-subgrid grid-cols-subgrid items-center"
|
|
661
665
|
}, /* @__PURE__ */ import_react10.default.createElement("span", {
|
|
662
666
|
className: "truncate"
|
|
663
667
|
}, collection.name ?? t("unnamed collection label")));
|
|
664
668
|
};
|
|
665
|
-
var
|
|
669
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/JoinDialog.tsx";
|
|
670
|
+
var JOIN_DIALOG = `${import_chunk_WZR6OAN3.SPACE_PLUGIN}/JoinDialog`;
|
|
666
671
|
var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
667
|
-
const { t } = (0, import_react_ui10.useTranslation)(import_chunk_AO4EW2RX.SPACE_PLUGIN);
|
|
668
672
|
const { dispatchPromise: dispatch } = (0, import_app_framework5.useIntentDispatcher)();
|
|
669
|
-
const
|
|
670
|
-
const { graph } = (0,
|
|
673
|
+
const client = (0, import_react_client3.useClient)();
|
|
674
|
+
const { graph } = (0, import_app_framework5.useAppGraph)();
|
|
671
675
|
const handleDone = (0, import_react11.useCallback)(async (result) => {
|
|
672
676
|
if (result?.spaceKey) {
|
|
673
677
|
await Promise.all([
|
|
674
|
-
dispatch((0, import_app_framework5.createIntent)(import_app_framework5.LayoutAction.
|
|
675
|
-
|
|
678
|
+
dispatch((0, import_app_framework5.createIntent)(import_app_framework5.LayoutAction.AddToast, {
|
|
679
|
+
part: "toast",
|
|
676
680
|
subject: {
|
|
677
|
-
id: `${
|
|
681
|
+
id: `${import_chunk_WZR6OAN3.SPACE_PLUGIN}/join-success`,
|
|
678
682
|
duration: 5e3,
|
|
679
|
-
title:
|
|
680
|
-
|
|
683
|
+
title: [
|
|
684
|
+
"join success label",
|
|
685
|
+
{
|
|
686
|
+
ns: import_chunk_WZR6OAN3.SPACE_PLUGIN
|
|
687
|
+
}
|
|
688
|
+
],
|
|
689
|
+
closeLabel: [
|
|
690
|
+
"dismiss label",
|
|
691
|
+
{
|
|
692
|
+
ns: import_chunk_WZR6OAN3.SPACE_PLUGIN
|
|
693
|
+
}
|
|
694
|
+
]
|
|
681
695
|
}
|
|
682
696
|
})),
|
|
683
|
-
dispatch((0, import_app_framework5.createIntent)(import_app_framework5.LayoutAction.
|
|
684
|
-
|
|
685
|
-
|
|
697
|
+
dispatch((0, import_app_framework5.createIntent)(import_app_framework5.LayoutAction.UpdateDialog, {
|
|
698
|
+
part: "dialog",
|
|
699
|
+
options: {
|
|
700
|
+
state: false
|
|
701
|
+
}
|
|
686
702
|
}))
|
|
687
703
|
]);
|
|
688
704
|
}
|
|
689
|
-
const space = spaces.
|
|
705
|
+
const space = result?.spaceKey ? client.spaces.get(result.spaceKey) : void 0;
|
|
706
|
+
if (!space) {
|
|
707
|
+
import_log.log.warn("Space not found", result?.spaceKey, {
|
|
708
|
+
F: __dxlog_file,
|
|
709
|
+
L: 56,
|
|
710
|
+
S: void 0,
|
|
711
|
+
C: (f, a) => f(...a)
|
|
712
|
+
});
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
await dispatch((0, import_app_framework5.createIntent)(import_app_framework5.LayoutAction.SwitchWorkspace, {
|
|
716
|
+
part: "workspace",
|
|
717
|
+
subject: space.id
|
|
718
|
+
}));
|
|
690
719
|
const target = result?.target || (navigableCollections ? space?.id : void 0);
|
|
691
720
|
if (target) {
|
|
692
721
|
await graph.waitForPath({
|
|
@@ -694,15 +723,15 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
|
694
723
|
}).catch(() => {
|
|
695
724
|
});
|
|
696
725
|
await Promise.all([
|
|
697
|
-
dispatch((0, import_app_framework5.createIntent)(import_app_framework5.
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
}
|
|
726
|
+
dispatch((0, import_app_framework5.createIntent)(import_app_framework5.LayoutAction.Open, {
|
|
727
|
+
part: "main",
|
|
728
|
+
subject: [
|
|
729
|
+
target
|
|
730
|
+
]
|
|
703
731
|
})),
|
|
704
|
-
dispatch((0, import_app_framework5.createIntent)(import_app_framework5.
|
|
705
|
-
|
|
732
|
+
dispatch((0, import_app_framework5.createIntent)(import_app_framework5.LayoutAction.Expose, {
|
|
733
|
+
part: "navigation",
|
|
734
|
+
subject: target
|
|
706
735
|
}))
|
|
707
736
|
]);
|
|
708
737
|
}
|
|
@@ -717,7 +746,8 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
|
717
746
|
}
|
|
718
747
|
}, [
|
|
719
748
|
dispatch,
|
|
720
|
-
|
|
749
|
+
client,
|
|
750
|
+
graph
|
|
721
751
|
]);
|
|
722
752
|
return /* @__PURE__ */ import_react11.default.createElement(import_react_ui10.Dialog.Content, null, /* @__PURE__ */ import_react11.default.createElement(import_react12.JoinPanel, {
|
|
723
753
|
...props,
|
|
@@ -731,10 +761,10 @@ var JoinDialog = ({ navigableCollections, onDone, ...props }) => {
|
|
|
731
761
|
}));
|
|
732
762
|
};
|
|
733
763
|
var MenuFooter = ({ object }) => {
|
|
734
|
-
const { t } = (0, import_react_ui11.useTranslation)(
|
|
735
|
-
const client = (0,
|
|
736
|
-
const space = (0,
|
|
737
|
-
const spaceName = space ? (0,
|
|
764
|
+
const { t } = (0, import_react_ui11.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
765
|
+
const client = (0, import_react_client4.useClient)();
|
|
766
|
+
const space = (0, import_echo4.getSpace)(object);
|
|
767
|
+
const spaceName = space ? (0, import_chunk_3QWZCN6L.getSpaceDisplayName)(space, {
|
|
738
768
|
personal: client.spaces.default === space
|
|
739
769
|
}) : "";
|
|
740
770
|
return space ? /* @__PURE__ */ import_react14.default.createElement(import_react14.default.Fragment, null, /* @__PURE__ */ import_react14.default.createElement(import_react_ui11.DropdownMenu.Separator, null), /* @__PURE__ */ import_react14.default.createElement(import_react_ui11.DropdownMenu.GroupLabel, null, t("menu footer label")), /* @__PURE__ */ import_react14.default.createElement("dl", {
|
|
@@ -754,7 +784,7 @@ var Status;
|
|
|
754
784
|
Status2[Status2["ERROR"] = 2] = "ERROR";
|
|
755
785
|
})(Status || (Status = {}));
|
|
756
786
|
var PersistenceStatus = ({ db }) => {
|
|
757
|
-
const { t } = (0, import_react_ui12.useTranslation)(
|
|
787
|
+
const { t } = (0, import_react_ui12.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
758
788
|
const [displayMessage, setDisplayMessage] = (0, import_react16.useState)(false);
|
|
759
789
|
const [status, naturalSetStatus] = (0, import_react16.useState)(0);
|
|
760
790
|
const [prevStatus, setPrevStatus] = (0, import_react16.useState)(0);
|
|
@@ -774,17 +804,17 @@ var PersistenceStatus = ({ db }) => {
|
|
|
774
804
|
return /* @__PURE__ */ import_react16.default.createElement("div", {
|
|
775
805
|
className: "flex items-center"
|
|
776
806
|
}, /* @__PURE__ */ import_react16.default.createElement(import_react15.Warning, {
|
|
777
|
-
className: (0,
|
|
807
|
+
className: (0, import_react_ui_theme4.mx)((0, import_react_ui_theme4.getSize)(4), "me-1")
|
|
778
808
|
}), /* @__PURE__ */ import_react16.default.createElement("span", {
|
|
779
|
-
className: (0,
|
|
809
|
+
className: (0, import_react_ui_theme4.mx)("text-sm", import_react_ui_theme4.warningText)
|
|
780
810
|
}, t("persistence error label")));
|
|
781
811
|
case 1:
|
|
782
812
|
return /* @__PURE__ */ import_react16.default.createElement("div", {
|
|
783
813
|
className: "flex items-center"
|
|
784
814
|
}, /* @__PURE__ */ import_react16.default.createElement(import_react15.ArrowsCounterClockwise, {
|
|
785
|
-
className: (0,
|
|
815
|
+
className: (0, import_react_ui_theme4.mx)((0, import_react_ui_theme4.getSize)(4), "me-1")
|
|
786
816
|
}), /* @__PURE__ */ import_react16.default.createElement("span", {
|
|
787
|
-
className: (0,
|
|
817
|
+
className: (0, import_react_ui_theme4.mx)("text-sm", import_react_ui_theme4.staticPlaceholderText)
|
|
788
818
|
}, t("persistence pending label")));
|
|
789
819
|
case 0:
|
|
790
820
|
default:
|
|
@@ -794,16 +824,16 @@ var PersistenceStatus = ({ db }) => {
|
|
|
794
824
|
role: "status",
|
|
795
825
|
className: "flex items-center"
|
|
796
826
|
}, /* @__PURE__ */ import_react16.default.createElement(import_react15.CheckCircle, {
|
|
797
|
-
className: (0,
|
|
827
|
+
className: (0, import_react_ui_theme4.mx)((0, import_react_ui_theme4.getSize)(4), "me-1")
|
|
798
828
|
}), displayMessage && /* @__PURE__ */ import_react16.default.createElement("span", {
|
|
799
|
-
className: (0,
|
|
829
|
+
className: (0, import_react_ui_theme4.mx)("text-sm", import_react_ui_theme4.staticPlaceholderText)
|
|
800
830
|
}, t("persisted locally label"))), /* @__PURE__ */ import_react16.default.createElement(import_react_ui12.Tooltip.Portal, null, /* @__PURE__ */ import_react16.default.createElement(import_react_ui12.Tooltip.Content, null, t("persisted locally message"), /* @__PURE__ */ import_react16.default.createElement(import_react_ui12.Tooltip.Arrow, null))));
|
|
801
831
|
}
|
|
802
832
|
};
|
|
803
|
-
var
|
|
804
|
-
var POPOVER_RENAME_OBJECT = `${
|
|
833
|
+
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx";
|
|
834
|
+
var POPOVER_RENAME_OBJECT = `${import_chunk_WZR6OAN3.SPACE_PLUGIN}/PopoverRenameObject`;
|
|
805
835
|
var PopoverRenameObject = ({ object: obj }) => {
|
|
806
|
-
const { t } = (0, import_react_ui13.useTranslation)(
|
|
836
|
+
const { t } = (0, import_react_ui13.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
807
837
|
const doneButton = (0, import_react17.useRef)(null);
|
|
808
838
|
const object = obj;
|
|
809
839
|
const [name, setName] = (0, import_react17.useState)(object.name || object.title || "");
|
|
@@ -814,10 +844,10 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
814
844
|
try {
|
|
815
845
|
object.title = name;
|
|
816
846
|
} catch (err) {
|
|
817
|
-
|
|
847
|
+
import_log2.log.error("Failed to rename object", {
|
|
818
848
|
err
|
|
819
849
|
}, {
|
|
820
|
-
F:
|
|
850
|
+
F: __dxlog_file2,
|
|
821
851
|
L: 30,
|
|
822
852
|
S: void 0,
|
|
823
853
|
C: (f, a) => f(...a)
|
|
@@ -852,9 +882,9 @@ var PopoverRenameObject = ({ object: obj }) => {
|
|
|
852
882
|
ns: "os"
|
|
853
883
|
}))));
|
|
854
884
|
};
|
|
855
|
-
var POPOVER_RENAME_SPACE = `${
|
|
885
|
+
var POPOVER_RENAME_SPACE = `${import_chunk_WZR6OAN3.SPACE_PLUGIN}/PopoverRenameSpace`;
|
|
856
886
|
var PopoverRenameSpace = ({ space }) => {
|
|
857
|
-
const { t } = (0, import_react_ui14.useTranslation)(
|
|
887
|
+
const { t } = (0, import_react_ui14.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
858
888
|
const doneButton = (0, import_react18.useRef)(null);
|
|
859
889
|
const [name, setName] = (0, import_react18.useState)(space.properties.name ?? "");
|
|
860
890
|
const handleDone = (0, import_react18.useCallback)(() => {
|
|
@@ -891,13 +921,13 @@ var PopoverRenameSpace = ({ space }) => {
|
|
|
891
921
|
var ShareSpaceButton = ({ space }) => {
|
|
892
922
|
const { dispatchPromise: dispatch } = (0, import_app_framework6.useIntentDispatcher)();
|
|
893
923
|
return /* @__PURE__ */ import_react19.default.createElement(ShareSpaceButtonImpl, {
|
|
894
|
-
onClick: () => dispatch((0, import_app_framework6.createIntent)(
|
|
924
|
+
onClick: () => dispatch((0, import_app_framework6.createIntent)(import_chunk_6MEOP3DH.SpaceAction.Share, {
|
|
895
925
|
space
|
|
896
926
|
}))
|
|
897
927
|
});
|
|
898
928
|
};
|
|
899
929
|
var ShareSpaceButtonImpl = ({ onClick }) => {
|
|
900
|
-
const { t } = (0, import_react_ui15.useTranslation)(
|
|
930
|
+
const { t } = (0, import_react_ui15.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
901
931
|
return /* @__PURE__ */ import_react19.default.createElement(import_react_ui15.IconButton, {
|
|
902
932
|
"data-testid": "spacePlugin.shareSpaceButton",
|
|
903
933
|
icon: "ph--users--regular",
|
|
@@ -905,15 +935,15 @@ var ShareSpaceButtonImpl = ({ onClick }) => {
|
|
|
905
935
|
onClick
|
|
906
936
|
});
|
|
907
937
|
};
|
|
908
|
-
var AppGraphBuilder = (0, import_app_framework8.lazy)(() => import("./app-graph-builder-
|
|
909
|
-
var AppGraphSerializer = (0, import_app_framework8.lazy)(() => import("./app-graph-serializer-
|
|
910
|
-
var IdentityCreated = (0, import_app_framework8.lazy)(() => import("./identity-created-
|
|
911
|
-
var IntentResolver = (0, import_app_framework8.lazy)(() => import("./intent-resolver-
|
|
912
|
-
var ReactRoot = (0, import_app_framework8.lazy)(() => import("./react-root-
|
|
913
|
-
var ReactSurface = (0, import_app_framework8.lazy)(() => import("./react-surface-
|
|
914
|
-
var SpaceSettings = (0, import_app_framework8.lazy)(() => import("./settings-
|
|
915
|
-
var SpaceState = (0, import_app_framework8.lazy)(() => import("./state-
|
|
916
|
-
var SpacesReady = (0, import_app_framework8.lazy)(() => import("./spaces-ready-
|
|
938
|
+
var AppGraphBuilder = (0, import_app_framework8.lazy)(() => import("./app-graph-builder-ZOPG4MOS.cjs"));
|
|
939
|
+
var AppGraphSerializer = (0, import_app_framework8.lazy)(() => import("./app-graph-serializer-QE2G4MWB.cjs"));
|
|
940
|
+
var IdentityCreated = (0, import_app_framework8.lazy)(() => import("./identity-created-7G5U7R36.cjs"));
|
|
941
|
+
var IntentResolver = (0, import_app_framework8.lazy)(() => import("./intent-resolver-N2W2L6OL.cjs"));
|
|
942
|
+
var ReactRoot = (0, import_app_framework8.lazy)(() => import("./react-root-YD35W3VU.cjs"));
|
|
943
|
+
var ReactSurface = (0, import_app_framework8.lazy)(() => import("./react-surface-QPLXK7DT.cjs"));
|
|
944
|
+
var SpaceSettings = (0, import_app_framework8.lazy)(() => import("./settings-TEELGWS4.cjs"));
|
|
945
|
+
var SpaceState = (0, import_app_framework8.lazy)(() => import("./state-WPZC4JXB.cjs"));
|
|
946
|
+
var SpacesReady = (0, import_app_framework8.lazy)(() => import("./spaces-ready-PZZQWS6T.cjs"));
|
|
917
947
|
var usePath = (graph, id, timeout) => {
|
|
918
948
|
const [pathState, setPathState] = (0, import_react21.useState)(id ? graph.getPath({
|
|
919
949
|
target: id
|
|
@@ -949,14 +979,14 @@ var usePath = (graph, id, timeout) => {
|
|
|
949
979
|
};
|
|
950
980
|
var REFRESH_INTERVAL = 5e3;
|
|
951
981
|
var ACTIVITY_DURATION = 3e4;
|
|
952
|
-
var noViewers = new import_util2.ComplexMap(
|
|
982
|
+
var noViewers = new import_util2.ComplexMap(import_react_client5.PublicKey.hash);
|
|
953
983
|
var getName = (identity) => identity.profile?.displayName ?? (0, import_display_name.generateName)(identity.identityKey.toHex());
|
|
954
984
|
var SpacePresence = ({ object, spaceKey }) => {
|
|
955
|
-
const spaceState = (0, import_app_framework7.useCapability)(
|
|
956
|
-
const client = (0,
|
|
985
|
+
const spaceState = (0, import_app_framework7.useCapability)(import_chunk_UX3U4RU2.SpaceCapabilities.MutableState);
|
|
986
|
+
const client = (0, import_react_client5.useClient)();
|
|
957
987
|
const identity = (0, import_halo.useIdentity)();
|
|
958
|
-
const space = spaceKey ? client.spaces.get(spaceKey) : (0,
|
|
959
|
-
const spaceMembers = (0,
|
|
988
|
+
const space = spaceKey ? client.spaces.get(spaceKey) : (0, import_echo5.getSpace)(object);
|
|
989
|
+
const spaceMembers = (0, import_echo5.useMembers)(space?.key);
|
|
960
990
|
const [_moment, setMoment] = (0, import_react20.useState)(Date.now());
|
|
961
991
|
(0, import_react20.useEffect)(() => {
|
|
962
992
|
const interval = setInterval(() => setMoment(Date.now()), REFRESH_INTERVAL);
|
|
@@ -969,7 +999,7 @@ var SpacePresence = ({ object, spaceKey }) => {
|
|
|
969
999
|
if (!identity || !spaceState || !space) {
|
|
970
1000
|
return null;
|
|
971
1001
|
}
|
|
972
|
-
const currentObjectViewers = spaceState.viewersByObject[(0,
|
|
1002
|
+
const currentObjectViewers = spaceState.viewersByObject[(0, import_echo5.fullyQualifiedId)(object)] ?? noViewers;
|
|
973
1003
|
const membersForObject = spaceMembers.filter((member) => memberOnline(member) && memberIsNotSelf(member)).filter((member) => currentObjectViewers.has(member.identity.identityKey)).map((member) => {
|
|
974
1004
|
const objectView = currentObjectViewers.get(member.identity.identityKey);
|
|
975
1005
|
const lastSeen = objectView?.lastSeen ?? -Infinity;
|
|
@@ -1052,7 +1082,7 @@ var PrensenceAvatar = ({ identity, showName, match, group, index, onClick }) =>
|
|
|
1052
1082
|
var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
1053
1083
|
const { hasAttention, isAncestor, isRelated } = (0, import_react_ui_attention.useAttention)(id);
|
|
1054
1084
|
const isAttended = hasAttention || isAncestor || isRelated;
|
|
1055
|
-
const { graph } = (0,
|
|
1085
|
+
const { graph } = (0, import_app_framework7.useAppGraph)();
|
|
1056
1086
|
const attended = (0, import_react_ui_attention.useAttended)();
|
|
1057
1087
|
const startOfAttention = attended.at(-1);
|
|
1058
1088
|
const path = usePath(graph, startOfAttention);
|
|
@@ -1080,7 +1110,7 @@ var SmallPresenceLive = ({ id, open, viewers }) => {
|
|
|
1080
1110
|
});
|
|
1081
1111
|
};
|
|
1082
1112
|
var SmallPresence = ({ count = 0, attended, containsAttended }) => {
|
|
1083
|
-
const { t } = (0, import_react_ui16.useTranslation)(
|
|
1113
|
+
const { t } = (0, import_react_ui16.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
1084
1114
|
return /* @__PURE__ */ import_react20.default.createElement(import_react_ui16.Tooltip.Root, null, /* @__PURE__ */ import_react20.default.createElement(import_react_ui16.Tooltip.Trigger, {
|
|
1085
1115
|
asChild: true
|
|
1086
1116
|
}, /* @__PURE__ */ import_react20.default.createElement(import_react_ui_attention.AttentionGlyph, {
|
|
@@ -1095,26 +1125,26 @@ var SmallPresence = ({ count = 0, attended, containsAttended }) => {
|
|
|
1095
1125
|
})), /* @__PURE__ */ import_react20.default.createElement(import_react_ui16.Tooltip.Arrow, null))));
|
|
1096
1126
|
};
|
|
1097
1127
|
var SpacePluginSettings = ({ settings }) => {
|
|
1098
|
-
const { t } = (0, import_react_ui17.useTranslation)(
|
|
1099
|
-
return /* @__PURE__ */ import_react22.default.createElement(
|
|
1128
|
+
const { t } = (0, import_react_ui17.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
1129
|
+
return /* @__PURE__ */ import_react22.default.createElement(import_react_ui_form4.DeprecatedFormContainer, null, /* @__PURE__ */ import_react22.default.createElement(import_react_ui_form4.DeprecatedFormInput, {
|
|
1100
1130
|
label: t("show hidden spaces label")
|
|
1101
1131
|
}, /* @__PURE__ */ import_react22.default.createElement(import_react_ui17.Input.Switch, {
|
|
1102
1132
|
checked: settings.showHidden,
|
|
1103
1133
|
onCheckedChange: (checked) => settings.showHidden = !!checked
|
|
1104
1134
|
})));
|
|
1105
1135
|
};
|
|
1106
|
-
var
|
|
1136
|
+
var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SpaceSettings/SpaceSettingsPanel.tsx";
|
|
1107
1137
|
var SpaceSettingsPanel = ({ classNames, space }) => {
|
|
1108
|
-
const { t } = (0, import_react_ui18.useTranslation)(
|
|
1109
|
-
const client = (0,
|
|
1138
|
+
const { t } = (0, import_react_ui18.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
1139
|
+
const client = (0, import_react_client6.useClient)();
|
|
1110
1140
|
const edgeEnabled = Boolean(client.config.values.runtime?.client?.edgeFeatures?.echoReplicator);
|
|
1111
1141
|
const [edgeReplication, setEdgeReplication] = (0, import_react23.useState)(space.internal.data.edgeReplication === import_metadata.EdgeReplicationSetting.ENABLED);
|
|
1112
1142
|
const toggleEdgeReplication = (0, import_react23.useCallback)(async (next) => {
|
|
1113
1143
|
setEdgeReplication(next);
|
|
1114
1144
|
await space?.internal.setEdgeReplicationPreference(next ? import_metadata.EdgeReplicationSetting.ENABLED : import_metadata.EdgeReplicationSetting.DISABLED).catch((err) => {
|
|
1115
|
-
|
|
1116
|
-
F:
|
|
1117
|
-
L:
|
|
1145
|
+
import_log3.log.catch(err, void 0, {
|
|
1146
|
+
F: __dxlog_file3,
|
|
1147
|
+
L: 35,
|
|
1118
1148
|
S: void 0,
|
|
1119
1149
|
C: (f, a) => f(...a)
|
|
1120
1150
|
});
|
|
@@ -1123,10 +1153,7 @@ var SpaceSettingsPanel = ({ classNames, space }) => {
|
|
|
1123
1153
|
}, [
|
|
1124
1154
|
space
|
|
1125
1155
|
]);
|
|
1126
|
-
return /* @__PURE__ */ import_react23.default.createElement(
|
|
1127
|
-
role: "form",
|
|
1128
|
-
className: (0, import_react_ui_theme4.mx)("flex flex-col", classNames)
|
|
1129
|
-
}, /* @__PURE__ */ import_react23.default.createElement(import_react_ui_form5.DeprecatedFormInput, {
|
|
1156
|
+
return /* @__PURE__ */ import_react23.default.createElement(import_react_ui_form5.DeprecatedFormContainer, null, /* @__PURE__ */ import_react23.default.createElement(import_react_ui_form5.DeprecatedFormInput, {
|
|
1130
1157
|
label: t("name label")
|
|
1131
1158
|
}, /* @__PURE__ */ import_react23.default.createElement(import_react_ui18.Input.TextInput, {
|
|
1132
1159
|
placeholder: t("unnamed space label"),
|
|
@@ -1141,17 +1168,23 @@ var SpaceSettingsPanel = ({ classNames, space }) => {
|
|
|
1141
1168
|
onCheckedChange: toggleEdgeReplication
|
|
1142
1169
|
})));
|
|
1143
1170
|
};
|
|
1144
|
-
var SPACE_SETTINGS_DIALOG = `${
|
|
1171
|
+
var SPACE_SETTINGS_DIALOG = `${import_chunk_WZR6OAN3.SPACE_PLUGIN}/SpaceSettingsDialog`;
|
|
1145
1172
|
var SpaceSettingsDialog = ({ space, target, createInvitationUrl, initialTab = "members", namesCache }) => {
|
|
1146
|
-
const { t } = (0, import_react_ui19.useTranslation)(
|
|
1147
|
-
const client = (0,
|
|
1173
|
+
const { t } = (0, import_react_ui19.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
1174
|
+
const client = (0, import_react_client7.useClient)();
|
|
1148
1175
|
const [tabsActivePart, setTabsActivePart] = (0, import_react24.useState)("list");
|
|
1149
1176
|
const [selected, setSelected] = (0, import_react24.useState)(initialTab);
|
|
1150
|
-
const locked = space.properties[
|
|
1151
|
-
const name = (0,
|
|
1177
|
+
const locked = space.properties[import_chunk_3QWZCN6L.COMPOSER_SPACE_LOCK];
|
|
1178
|
+
const name = (0, import_chunk_3QWZCN6L.getSpaceDisplayName)(space, {
|
|
1152
1179
|
personal: client.spaces.default === space,
|
|
1153
1180
|
namesCache
|
|
1154
1181
|
});
|
|
1182
|
+
const panels = (0, import_app_framework9.useCapabilities)(import_chunk_UX3U4RU2.SpaceCapabilities.SettingsPanel);
|
|
1183
|
+
const data = (0, import_react24.useMemo)(() => ({
|
|
1184
|
+
subject: space
|
|
1185
|
+
}), [
|
|
1186
|
+
space
|
|
1187
|
+
]);
|
|
1155
1188
|
return (
|
|
1156
1189
|
// TODO(wittjosiah): The tablist dialog pattern is copied from @dxos/plugin-manager.
|
|
1157
1190
|
// Consider factoring it out to the tabs package.
|
|
@@ -1204,7 +1237,10 @@ var SpaceSettingsDialog = ({ space, target, createInvitationUrl, initialTab = "m
|
|
|
1204
1237
|
}, t("settings tab label")), /* @__PURE__ */ import_react24.default.createElement(import_react_ui_tabs.Tabs.Tab, {
|
|
1205
1238
|
value: "members",
|
|
1206
1239
|
disabled: locked
|
|
1207
|
-
}, t("members tab label"))
|
|
1240
|
+
}, t("members tab label")), panels.map((panel) => /* @__PURE__ */ import_react24.default.createElement(import_react_ui_tabs.Tabs.Tab, {
|
|
1241
|
+
key: panel.id,
|
|
1242
|
+
value: panel.id
|
|
1243
|
+
}, (0, import_react_ui19.toLocalizedString)(panel.label, t)))))), /* @__PURE__ */ import_react24.default.createElement(import_react_ui_tabs.Tabs.Tabpanel, {
|
|
1208
1244
|
value: "settings",
|
|
1209
1245
|
classNames: "pli-3 @md:pli-5 max-bs-dvh overflow-y-auto"
|
|
1210
1246
|
}, /* @__PURE__ */ import_react24.default.createElement(SpaceSettingsPanel, {
|
|
@@ -1217,10 +1253,17 @@ var SpaceSettingsDialog = ({ space, target, createInvitationUrl, initialTab = "m
|
|
|
1217
1253
|
hideHeading: true,
|
|
1218
1254
|
target,
|
|
1219
1255
|
createInvitationUrl
|
|
1256
|
+
}))), panels.map((panel) => /* @__PURE__ */ import_react24.default.createElement(import_react_ui_tabs.Tabs.Tabpanel, {
|
|
1257
|
+
key: panel.id,
|
|
1258
|
+
value: panel.id,
|
|
1259
|
+
classNames: "pli-3 @md:pli-5 max-bs-dvh overflow-y-auto"
|
|
1260
|
+
}, /* @__PURE__ */ import_react24.default.createElement(import_app_framework9.Surface, {
|
|
1261
|
+
role: `space-settings--${panel.id}`,
|
|
1262
|
+
data
|
|
1220
1263
|
}))))))
|
|
1221
1264
|
);
|
|
1222
1265
|
};
|
|
1223
|
-
var
|
|
1266
|
+
var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/sync-state.ts";
|
|
1224
1267
|
var createEmptyEdgeSyncState = () => ({
|
|
1225
1268
|
missingOnLocal: 0,
|
|
1226
1269
|
missingOnRemote: 0,
|
|
@@ -1240,11 +1283,11 @@ var getSyncSummary = (syncMap) => {
|
|
|
1240
1283
|
};
|
|
1241
1284
|
var isEdgePeerId = (peerId, spaceId) => peerId.startsWith(`${import_protocols.EdgeService.AUTOMERGE_REPLICATOR}:${spaceId}`);
|
|
1242
1285
|
var useSyncState = () => {
|
|
1243
|
-
const client = (0,
|
|
1286
|
+
const client = (0, import_react_client9.useClient)();
|
|
1244
1287
|
const [spaceState, setSpaceState] = (0, import_react27.useState)({});
|
|
1245
1288
|
(0, import_react27.useEffect)(() => {
|
|
1246
1289
|
const ctx = new import_context.Context(void 0, {
|
|
1247
|
-
F:
|
|
1290
|
+
F: __dxlog_file4,
|
|
1248
1291
|
L: 48
|
|
1249
1292
|
});
|
|
1250
1293
|
const createSubscriptions = (spaces) => {
|
|
@@ -1279,7 +1322,7 @@ var useSpaceSyncState = (space) => {
|
|
|
1279
1322
|
const [spaceState, setSpaceState] = (0, import_react27.useState)();
|
|
1280
1323
|
(0, import_react27.useEffect)(() => {
|
|
1281
1324
|
const ctx = new import_context.Context(void 0, {
|
|
1282
|
-
F:
|
|
1325
|
+
F: __dxlog_file4,
|
|
1283
1326
|
L: 87
|
|
1284
1327
|
});
|
|
1285
1328
|
space.crud.subscribeToSyncState(ctx, ({ peers = [] }) => {
|
|
@@ -1298,7 +1341,7 @@ var useSpaceSyncState = (space) => {
|
|
|
1298
1341
|
};
|
|
1299
1342
|
var useEdgeStatus = () => {
|
|
1300
1343
|
const [status, setStatus] = (0, import_react26.useState)(import_services.QueryEdgeStatusResponse.EdgeStatus.NOT_CONNECTED);
|
|
1301
|
-
const client = (0,
|
|
1344
|
+
const client = (0, import_react_client8.useClient)();
|
|
1302
1345
|
(0, import_react26.useEffect)(() => {
|
|
1303
1346
|
client.services.services.EdgeAgentService?.queryEdgeStatus().subscribe(({ status: status2 }) => {
|
|
1304
1347
|
setStatus(status2);
|
|
@@ -1309,11 +1352,11 @@ var useEdgeStatus = () => {
|
|
|
1309
1352
|
return status;
|
|
1310
1353
|
};
|
|
1311
1354
|
var InlineSyncStatus = ({ space, open }) => {
|
|
1312
|
-
const { t } = (0, import_react_ui20.useTranslation)(
|
|
1355
|
+
const { t } = (0, import_react_ui20.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
1313
1356
|
const id = space.id;
|
|
1314
1357
|
const { hasAttention, isAncestor, isRelated } = (0, import_react_ui_attention2.useAttention)(id);
|
|
1315
1358
|
const isAttended = hasAttention || isAncestor || isRelated;
|
|
1316
|
-
const { graph } = (0,
|
|
1359
|
+
const { graph } = (0, import_app_framework10.useAppGraph)();
|
|
1317
1360
|
const attended = (0, import_react_ui_attention2.useAttended)();
|
|
1318
1361
|
const startOfAttention = attended.at(-1);
|
|
1319
1362
|
const path = usePath(graph, startOfAttention);
|
|
@@ -1364,13 +1407,13 @@ var useActive = (count) => {
|
|
|
1364
1407
|
return active;
|
|
1365
1408
|
};
|
|
1366
1409
|
var SpaceRowContainer = ({ spaceId, state }) => {
|
|
1367
|
-
const { t } = (0, import_react_ui22.useTranslation)(
|
|
1368
|
-
const client = (0,
|
|
1369
|
-
const space = (0,
|
|
1410
|
+
const { t } = (0, import_react_ui22.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
1411
|
+
const client = (0, import_react_client11.useClient)();
|
|
1412
|
+
const space = (0, import_echo6.useSpace)(spaceId);
|
|
1370
1413
|
if (!space) {
|
|
1371
1414
|
return null;
|
|
1372
1415
|
}
|
|
1373
|
-
const spaceName = (0, import_react_ui22.toLocalizedString)((0,
|
|
1416
|
+
const spaceName = (0, import_react_ui22.toLocalizedString)((0, import_chunk_3QWZCN6L.getSpaceDisplayName)(space, {
|
|
1374
1417
|
personal: space === client.spaces.default
|
|
1375
1418
|
}), t);
|
|
1376
1419
|
return /* @__PURE__ */ import_react29.default.createElement(SpaceRow, {
|
|
@@ -1438,7 +1481,7 @@ var Bar = ({ classNames, count, total }) => {
|
|
|
1438
1481
|
className: "absolute top-0 bottom-0 flex items-center mx-0.5 text-black text-xs"
|
|
1439
1482
|
}, count));
|
|
1440
1483
|
};
|
|
1441
|
-
var
|
|
1484
|
+
var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/save-tracker.ts";
|
|
1442
1485
|
var createClientSaveTracker = (client, cb) => {
|
|
1443
1486
|
const unsubscribeCallbacks = {};
|
|
1444
1487
|
const state = {};
|
|
@@ -1466,7 +1509,7 @@ var createClientSaveTracker = (client, cb) => {
|
|
|
1466
1509
|
};
|
|
1467
1510
|
var createSpaceSaveTracker = (space, cb) => {
|
|
1468
1511
|
const ctx = new import_context2.Context(void 0, {
|
|
1469
|
-
F:
|
|
1512
|
+
F: __dxlog_file5,
|
|
1470
1513
|
L: 40
|
|
1471
1514
|
});
|
|
1472
1515
|
void space.waitUntilReady().then(() => {
|
|
@@ -1525,7 +1568,7 @@ var getIcon = (status) => {
|
|
|
1525
1568
|
}
|
|
1526
1569
|
};
|
|
1527
1570
|
var SyncStatus = () => {
|
|
1528
|
-
const client = (0,
|
|
1571
|
+
const client = (0, import_react_client10.useClient)();
|
|
1529
1572
|
const state = useSyncState();
|
|
1530
1573
|
const [saved, setSaved] = (0, import_react28.useState)(true);
|
|
1531
1574
|
(0, import_react28.useEffect)(() => {
|
|
@@ -1539,7 +1582,7 @@ var SyncStatus = () => {
|
|
|
1539
1582
|
});
|
|
1540
1583
|
};
|
|
1541
1584
|
var SyncStatusIndicator = ({ state, saved }) => {
|
|
1542
|
-
const { t } = (0, import_react_ui21.useTranslation)(
|
|
1585
|
+
const { t } = (0, import_react_ui21.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
1543
1586
|
const summary = getSyncSummary(state);
|
|
1544
1587
|
const offline = Object.values(state).length === 0;
|
|
1545
1588
|
const needsToUpload = summary.differentDocuments > 0 || summary.missingOnRemote > 0;
|
|
@@ -1580,18 +1623,16 @@ var SyncStatusIndicator = ({ state, saved }) => {
|
|
|
1580
1623
|
asChild: true
|
|
1581
1624
|
}, /* @__PURE__ */ import_react28.default.createElement(import_plugin_status_bar.StatusBar.Button, {
|
|
1582
1625
|
title
|
|
1583
|
-
}, icon)), /* @__PURE__ */ import_react28.default.createElement(import_react_ui21.Popover.Portal, null, /* @__PURE__ */ import_react28.default.createElement(import_react_ui21.Popover.Content, {
|
|
1584
|
-
sideOffset: 16
|
|
1585
|
-
}, /* @__PURE__ */ import_react28.default.createElement(SyncStatusDetail, {
|
|
1626
|
+
}, icon)), /* @__PURE__ */ import_react28.default.createElement(import_react_ui21.Popover.Portal, null, /* @__PURE__ */ import_react28.default.createElement(import_react_ui21.Popover.Content, null, /* @__PURE__ */ import_react28.default.createElement(SyncStatusDetail, {
|
|
1586
1627
|
state,
|
|
1587
1628
|
summary,
|
|
1588
1629
|
debug: false
|
|
1589
|
-
}))));
|
|
1630
|
+
}), /* @__PURE__ */ import_react28.default.createElement(import_react_ui21.Popover.Arrow, null))));
|
|
1590
1631
|
}
|
|
1591
1632
|
};
|
|
1592
1633
|
var SyncStatusDetail = ({ classNames, state, summary, debug }) => {
|
|
1593
1634
|
const [showAll, setShowAll] = (0, import_react28.useState)(false);
|
|
1594
|
-
const { t } = (0, import_react_ui21.useTranslation)(
|
|
1635
|
+
const { t } = (0, import_react_ui21.useTranslation)(import_chunk_WZR6OAN3.SPACE_PLUGIN);
|
|
1595
1636
|
const entries = Object.entries(state).filter(([_, value]) => showAll || value.missingOnLocal + value.missingOnRemote > 0).toSorted(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
|
|
1596
1637
|
const handleCheckedChange = (0, import_react28.useCallback)((state2) => setShowAll(state2), [
|
|
1597
1638
|
setShowAll
|
|
@@ -1666,4 +1707,4 @@ var SyncStatusDetail = ({ classNames, state, summary, debug }) => {
|
|
|
1666
1707
|
SyncStatusDetail,
|
|
1667
1708
|
SyncStatusIndicator
|
|
1668
1709
|
});
|
|
1669
|
-
//# sourceMappingURL=chunk-
|
|
1710
|
+
//# sourceMappingURL=chunk-SZEIQGQU.cjs.map
|