@sparkelf/dsh-group-chat 0.5.4 → 0.5.5
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/lib/client.js +183 -170
- package/lib/client.js.map +1 -1
- package/lib/index.js +70 -50
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -262,6 +262,16 @@ window.__ModuleLoader__.load({
|
|
|
262
262
|
});
|
|
263
263
|
/** Drops a pending reply that will not be sent. */
|
|
264
264
|
const clearQuote = (roomId) => call(`/rooms/${encodeURIComponent(roomId)}/quote`, { method: "DELETE" });
|
|
265
|
+
/**
|
|
266
|
+
* Ask the Host to make one room the view: it resolves the room's Session and the workspace that
|
|
267
|
+
* owns it, then hands back the Session id the shell should select.
|
|
268
|
+
*
|
|
269
|
+
* The browser cannot do this itself: the Session belongs to no workspace until the Host creates
|
|
270
|
+
* one at the Session's own directory, and `openSession` only selects a Session a workspace owns.
|
|
271
|
+
* @param roomId - the room to open.
|
|
272
|
+
* @returns the Session to select.
|
|
273
|
+
*/
|
|
274
|
+
const openRoom = (roomId) => call(`/rooms/${encodeURIComponent(roomId)}/open`, { method: "POST" });
|
|
265
275
|
//#endregion
|
|
266
276
|
//#region src/client/rows.ts
|
|
267
277
|
/**
|
|
@@ -513,11 +523,11 @@ window.__ModuleLoader__.load({
|
|
|
513
523
|
document.head.appendChild(tag);
|
|
514
524
|
}
|
|
515
525
|
var Avatar_module_css_default = {
|
|
516
|
-
"over": "Ohch6W_over",
|
|
517
526
|
"md": "Ohch6W_md",
|
|
518
|
-
"
|
|
527
|
+
"stack": "Ohch6W_stack",
|
|
519
528
|
"avatar": "Ohch6W_avatar",
|
|
520
|
-
"
|
|
529
|
+
"over": "Ohch6W_over",
|
|
530
|
+
"sm": "Ohch6W_sm"
|
|
521
531
|
};
|
|
522
532
|
//#endregion
|
|
523
533
|
//#region src/client/Avatar.tsx
|
|
@@ -557,13 +567,13 @@ window.__ModuleLoader__.load({
|
|
|
557
567
|
document.head.appendChild(tag);
|
|
558
568
|
}
|
|
559
569
|
var Picker_module_css_default = {
|
|
570
|
+
"list": "sKjJ-a_list",
|
|
571
|
+
"secondary": "sKjJ-a_secondary",
|
|
560
572
|
"row": "sKjJ-a_row",
|
|
573
|
+
"box": "sKjJ-a_box",
|
|
561
574
|
"note": "sKjJ-a_note",
|
|
562
|
-
"list": "sKjJ-a_list",
|
|
563
575
|
"rowActive": "sKjJ-a_rowActive",
|
|
564
|
-
"
|
|
565
|
-
"label": "sKjJ-a_label",
|
|
566
|
-
"secondary": "sKjJ-a_secondary"
|
|
576
|
+
"label": "sKjJ-a_label"
|
|
567
577
|
};
|
|
568
578
|
//#endregion
|
|
569
579
|
//#region src/client/Picker.tsx
|
|
@@ -737,10 +747,10 @@ window.__ModuleLoader__.load({
|
|
|
737
747
|
}
|
|
738
748
|
var PresetSelect_module_css_default = {
|
|
739
749
|
"row": "xjnmxG_row",
|
|
740
|
-
"description": "xjnmxG_description",
|
|
741
750
|
"triggerLabel": "xjnmxG_triggerLabel",
|
|
751
|
+
"name": "xjnmxG_name",
|
|
742
752
|
"trigger": "xjnmxG_trigger",
|
|
743
|
-
"
|
|
753
|
+
"description": "xjnmxG_description"
|
|
744
754
|
};
|
|
745
755
|
//#endregion
|
|
746
756
|
//#region src/client/PresetSelect.tsx
|
|
@@ -828,36 +838,6 @@ window.__ModuleLoader__.load({
|
|
|
828
838
|
});
|
|
829
839
|
};
|
|
830
840
|
//#endregion
|
|
831
|
-
//#region src/session-id.ts
|
|
832
|
-
/**
|
|
833
|
-
* The room/session binding, shared by both halves of the plugin.
|
|
834
|
-
*
|
|
835
|
-
* The browser half needs it to open a room's Session; the host half needs it to create and
|
|
836
|
-
* recognize one. It lives in its own module because the two halves are built for different
|
|
837
|
-
* runtimes: importing it from the host entry would drag the whole server side into the client
|
|
838
|
-
* bundle, which the build's platform guard refuses — correctly, since none of it can run there.
|
|
839
|
-
*
|
|
840
|
-
* @module @sparkelf/dsh-group-chat/session-id
|
|
841
|
-
*/
|
|
842
|
-
/**
|
|
843
|
-
* Every room session id starts with this, so a room's session is recognizable after a restart
|
|
844
|
-
* and an ordinary session never matches.
|
|
845
|
-
*
|
|
846
|
-
* The binding lives in the id rather than in `SessionHeader` because the header carries no
|
|
847
|
-
* free-form metadata field.
|
|
848
|
-
*/
|
|
849
|
-
const ROOM_SESSION_PREFIX = "group-room-";
|
|
850
|
-
/** Deterministic session id for a room. */
|
|
851
|
-
const roomSessionId = (roomId) => `${ROOM_SESSION_PREFIX}${roomId}`;
|
|
852
|
-
/** Reads the room a session is bound to, or `undefined` for an ordinary session. */
|
|
853
|
-
const roomIdOfSession = (session) => {
|
|
854
|
-
if (typeof session !== "object" || session === null) return void 0;
|
|
855
|
-
const id = session.id;
|
|
856
|
-
if (typeof id !== "string" || !id.startsWith("group-room-")) return void 0;
|
|
857
|
-
const roomId = id.slice(11);
|
|
858
|
-
return roomId.length > 0 ? roomId : void 0;
|
|
859
|
-
};
|
|
860
|
-
//#endregion
|
|
861
841
|
//#region src/client/store.ts
|
|
862
842
|
/**
|
|
863
843
|
* The room list both client surfaces read.
|
|
@@ -952,13 +932,10 @@ window.__ModuleLoader__.load({
|
|
|
952
932
|
} : room) }
|
|
953
933
|
});
|
|
954
934
|
loadMembersInto(roomId);
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
deps.openSession?.(sessionId);
|
|
958
|
-
} catch (error) {
|
|
959
|
-
console.error("[group-chat] selecting the room session failed", sessionId, error);
|
|
935
|
+
Promise.resolve().then(() => deps.openSession?.(roomId)).catch((error) => {
|
|
936
|
+
console.error("[group-chat] opening the room failed", roomId, error);
|
|
960
937
|
set({ openFailure: "roomOpenFailed" });
|
|
961
|
-
}
|
|
938
|
+
});
|
|
962
939
|
},
|
|
963
940
|
discover: async (query) => {
|
|
964
941
|
try {
|
|
@@ -1039,23 +1016,23 @@ window.__ModuleLoader__.load({
|
|
|
1039
1016
|
document.head.appendChild(tag);
|
|
1040
1017
|
}
|
|
1041
1018
|
var CreateRoomDialog_module_css_default = {
|
|
1042
|
-
"memberName": "Z3w8WW_memberName",
|
|
1043
|
-
"body": "Z3w8WW_body",
|
|
1044
|
-
"memberBadge": "Z3w8WW_memberBadge",
|
|
1045
|
-
"label": "Z3w8WW_label",
|
|
1046
1019
|
"error": "Z3w8WW_error",
|
|
1047
|
-
"
|
|
1020
|
+
"pillActive": "Z3w8WW_pillActive",
|
|
1048
1021
|
"memberList": "Z3w8WW_memberList",
|
|
1049
|
-
"footer": "Z3w8WW_footer",
|
|
1050
|
-
"switches": "Z3w8WW_switches",
|
|
1051
1022
|
"policyRow": "Z3w8WW_policyRow",
|
|
1052
|
-
"
|
|
1053
|
-
"
|
|
1023
|
+
"label": "Z3w8WW_label",
|
|
1024
|
+
"body": "Z3w8WW_body",
|
|
1054
1025
|
"hint": "Z3w8WW_hint",
|
|
1055
|
-
"
|
|
1056
|
-
"notice": "Z3w8WW_notice",
|
|
1026
|
+
"field": "Z3w8WW_field",
|
|
1057
1027
|
"memberRow": "Z3w8WW_memberRow",
|
|
1058
|
-
"
|
|
1028
|
+
"notice": "Z3w8WW_notice",
|
|
1029
|
+
"triggerExtra": "Z3w8WW_triggerExtra",
|
|
1030
|
+
"pill": "Z3w8WW_pill",
|
|
1031
|
+
"memberName": "Z3w8WW_memberName",
|
|
1032
|
+
"warn": "Z3w8WW_warn",
|
|
1033
|
+
"switches": "Z3w8WW_switches",
|
|
1034
|
+
"footer": "Z3w8WW_footer",
|
|
1035
|
+
"memberBadge": "Z3w8WW_memberBadge"
|
|
1059
1036
|
};
|
|
1060
1037
|
//#endregion
|
|
1061
1038
|
//#region src/client/CreateRoomDialog.tsx
|
|
@@ -1322,28 +1299,28 @@ window.__ModuleLoader__.load({
|
|
|
1322
1299
|
document.head.appendChild(tag);
|
|
1323
1300
|
}
|
|
1324
1301
|
var InviteDialog_module_css_default = {
|
|
1325
|
-
"
|
|
1326
|
-
"
|
|
1327
|
-
"inviteSpin": "r4uCba_inviteSpin",
|
|
1328
|
-
"search": "r4uCba_search",
|
|
1329
|
-
"dialog": "r4uCba_dialog",
|
|
1330
|
-
"row": "r4uCba_row",
|
|
1302
|
+
"searchRow": "r4uCba_searchRow",
|
|
1303
|
+
"chip": "r4uCba_chip",
|
|
1331
1304
|
"rowSelected": "r4uCba_rowSelected",
|
|
1332
|
-
"
|
|
1333
|
-
"
|
|
1305
|
+
"visuallyHidden": "r4uCba_visuallyHidden",
|
|
1306
|
+
"rowName": "r4uCba_rowName",
|
|
1307
|
+
"search": "r4uCba_search",
|
|
1308
|
+
"chipName": "r4uCba_chipName",
|
|
1334
1309
|
"errorRow": "r4uCba_errorRow",
|
|
1310
|
+
"dialog": "r4uCba_dialog",
|
|
1335
1311
|
"spinner": "r4uCba_spinner",
|
|
1336
|
-
"list": "r4uCba_list",
|
|
1337
1312
|
"field": "r4uCba_field",
|
|
1313
|
+
"chipRemove": "r4uCba_chipRemove",
|
|
1314
|
+
"check": "r4uCba_check",
|
|
1315
|
+
"checkHidden": "r4uCba_checkHidden",
|
|
1316
|
+
"inviteSpin": "r4uCba_inviteSpin",
|
|
1338
1317
|
"note": "r4uCba_note",
|
|
1339
|
-
"
|
|
1318
|
+
"row": "r4uCba_row",
|
|
1340
1319
|
"chips": "r4uCba_chips",
|
|
1341
|
-
"
|
|
1342
|
-
"
|
|
1343
|
-
"
|
|
1344
|
-
"
|
|
1345
|
-
"rowName": "r4uCba_rowName",
|
|
1346
|
-
"searchRow": "r4uCba_searchRow"
|
|
1320
|
+
"content": "r4uCba_content",
|
|
1321
|
+
"list": "r4uCba_list",
|
|
1322
|
+
"error": "r4uCba_error",
|
|
1323
|
+
"rowHandle": "r4uCba_rowHandle"
|
|
1347
1324
|
};
|
|
1348
1325
|
//#endregion
|
|
1349
1326
|
//#region src/client/RoomDialogs.tsx
|
|
@@ -1960,67 +1937,67 @@ window.__ModuleLoader__.load({
|
|
|
1960
1937
|
document.head.appendChild(tag);
|
|
1961
1938
|
}
|
|
1962
1939
|
var SidebarRooms_module_css_default = {
|
|
1940
|
+
"unreadMentioned": "s0QgKq_unreadMentioned",
|
|
1941
|
+
"sessionRowSelected": "s0QgKq_sessionRowSelected",
|
|
1942
|
+
"hitHead": "s0QgKq_hitHead",
|
|
1943
|
+
"leaveBody": "s0QgKq_leaveBody",
|
|
1944
|
+
"leaveRoomName": "s0QgKq_leaveRoomName",
|
|
1945
|
+
"hitList": "s0QgKq_hitList",
|
|
1946
|
+
"menuCancel": "s0QgKq_menuCancel",
|
|
1947
|
+
"clearButton": "s0QgKq_clearButton",
|
|
1948
|
+
"hitText": "s0QgKq_hitText",
|
|
1949
|
+
"railButton": "s0QgKq_railButton",
|
|
1950
|
+
"menuItem": "s0QgKq_menuItem",
|
|
1951
|
+
"sectionLabel": "s0QgKq_sectionLabel",
|
|
1963
1952
|
"empty": "s0QgKq_empty",
|
|
1964
|
-
"
|
|
1953
|
+
"footer": "s0QgKq_footer",
|
|
1954
|
+
"title": "s0QgKq_title",
|
|
1955
|
+
"headerActions": "s0QgKq_headerActions",
|
|
1956
|
+
"sessionRow": "s0QgKq_sessionRow",
|
|
1957
|
+
"discoverRow": "s0QgKq_discoverRow",
|
|
1958
|
+
"iconButton": "s0QgKq_iconButton",
|
|
1959
|
+
"discoverHeading": "s0QgKq_discoverHeading",
|
|
1960
|
+
"time": "s0QgKq_time",
|
|
1961
|
+
"menu": "s0QgKq_menu",
|
|
1965
1962
|
"flatList": "s0QgKq_flatList",
|
|
1963
|
+
"mark": "s0QgKq_mark",
|
|
1966
1964
|
"menuLayer": "s0QgKq_menuLayer",
|
|
1967
|
-
"
|
|
1968
|
-
"
|
|
1965
|
+
"searchExpanded": "s0QgKq_searchExpanded",
|
|
1966
|
+
"list": "s0QgKq_list",
|
|
1967
|
+
"searchSlotExpanded": "s0QgKq_searchSlotExpanded",
|
|
1968
|
+
"listArea": "s0QgKq_listArea",
|
|
1969
1969
|
"menuInput": "s0QgKq_menuInput",
|
|
1970
|
-
"
|
|
1970
|
+
"leaveConfirmDanger": "s0QgKq_leaveConfirmDanger",
|
|
1971
|
+
"hit": "s0QgKq_hit",
|
|
1971
1972
|
"searchInput": "s0QgKq_searchInput",
|
|
1972
|
-
"
|
|
1973
|
-
"search": "s0QgKq_search",
|
|
1974
|
-
"clearButton": "s0QgKq_clearButton",
|
|
1973
|
+
"menuRename": "s0QgKq_menuRename",
|
|
1975
1974
|
"rowIcon": "s0QgKq_rowIcon",
|
|
1976
|
-
"emptyState": "s0QgKq_emptyState",
|
|
1977
|
-
"menu": "s0QgKq_menu",
|
|
1978
|
-
"leaveError": "s0QgKq_leaveError",
|
|
1979
|
-
"sectionLabel": "s0QgKq_sectionLabel",
|
|
1980
|
-
"fade": "s0QgKq_fade",
|
|
1981
|
-
"unread": "s0QgKq_unread",
|
|
1982
|
-
"viewWrap": "s0QgKq_viewWrap",
|
|
1983
|
-
"sessionRow": "s0QgKq_sessionRow",
|
|
1984
|
-
"menuHeading": "s0QgKq_menuHeading",
|
|
1985
|
-
"discoverSection": "s0QgKq_discoverSection",
|
|
1986
|
-
"mark": "s0QgKq_mark",
|
|
1987
|
-
"unreadMentioned": "s0QgKq_unreadMentioned",
|
|
1988
|
-
"iconButton": "s0QgKq_iconButton",
|
|
1989
1975
|
"root": "s0QgKq_root",
|
|
1990
|
-
"
|
|
1976
|
+
"menuInline": "s0QgKq_menuInline",
|
|
1977
|
+
"searchButton": "s0QgKq_searchButton",
|
|
1978
|
+
"menuConfirm": "s0QgKq_menuConfirm",
|
|
1979
|
+
"sectionHeader": "s0QgKq_sectionHeader",
|
|
1980
|
+
"menuHeading": "s0QgKq_menuHeading",
|
|
1981
|
+
"rowWrap": "s0QgKq_rowWrap",
|
|
1982
|
+
"leaveCopy": "s0QgKq_leaveCopy",
|
|
1983
|
+
"emptyState": "s0QgKq_emptyState",
|
|
1984
|
+
"discoverName": "s0QgKq_discoverName",
|
|
1991
1985
|
"joinButton": "s0QgKq_joinButton",
|
|
1986
|
+
"hitRoom": "s0QgKq_hitRoom",
|
|
1987
|
+
"menuActions": "s0QgKq_menuActions",
|
|
1992
1988
|
"hitAuthor": "s0QgKq_hitAuthor",
|
|
1993
|
-
"
|
|
1994
|
-
"
|
|
1995
|
-
"
|
|
1996
|
-
"hit": "s0QgKq_hit",
|
|
1997
|
-
"searchSlot": "s0QgKq_searchSlot",
|
|
1989
|
+
"leaveError": "s0QgKq_leaveError",
|
|
1990
|
+
"discoverMeta": "s0QgKq_discoverMeta",
|
|
1991
|
+
"viewWrap": "s0QgKq_viewWrap",
|
|
1998
1992
|
"check": "s0QgKq_check",
|
|
1999
|
-
"discoverHeading": "s0QgKq_discoverHeading",
|
|
2000
|
-
"menuCancel": "s0QgKq_menuCancel",
|
|
2001
|
-
"leaveConfirmDanger": "s0QgKq_leaveConfirmDanger",
|
|
2002
|
-
"hitText": "s0QgKq_hitText",
|
|
2003
|
-
"footer": "s0QgKq_footer",
|
|
2004
1993
|
"visuallyHidden": "s0QgKq_visuallyHidden",
|
|
2005
|
-
"
|
|
2006
|
-
"
|
|
2007
|
-
"
|
|
2008
|
-
"
|
|
2009
|
-
"menuInline": "s0QgKq_menuInline",
|
|
2010
|
-
"rowWrap": "s0QgKq_rowWrap",
|
|
2011
|
-
"searchButton": "s0QgKq_searchButton",
|
|
2012
|
-
"listArea": "s0QgKq_listArea",
|
|
2013
|
-
"menuConfirm": "s0QgKq_menuConfirm",
|
|
2014
|
-
"discoverRow": "s0QgKq_discoverRow",
|
|
2015
|
-
"resizer": "s0QgKq_resizer",
|
|
2016
|
-
"hitHead": "s0QgKq_hitHead",
|
|
2017
|
-
"hitList": "s0QgKq_hitList",
|
|
2018
|
-
"leaveBody": "s0QgKq_leaveBody",
|
|
1994
|
+
"fade": "s0QgKq_fade",
|
|
1995
|
+
"discoverSection": "s0QgKq_discoverSection",
|
|
1996
|
+
"searchSlot": "s0QgKq_searchSlot",
|
|
1997
|
+
"search": "s0QgKq_search",
|
|
2019
1998
|
"hitHint": "s0QgKq_hitHint",
|
|
2020
|
-
"
|
|
2021
|
-
"
|
|
2022
|
-
"time": "s0QgKq_time",
|
|
2023
|
-
"sectionHeader": "s0QgKq_sectionHeader"
|
|
1999
|
+
"resizer": "s0QgKq_resizer",
|
|
2000
|
+
"unread": "s0QgKq_unread"
|
|
2024
2001
|
};
|
|
2025
2002
|
//#endregion
|
|
2026
2003
|
//#region src/client/SidebarRooms.tsx
|
|
@@ -3118,20 +3095,20 @@ window.__ModuleLoader__.load({
|
|
|
3118
3095
|
document.head.appendChild(tag);
|
|
3119
3096
|
}
|
|
3120
3097
|
var MessageSide_module_css_default = {
|
|
3098
|
+
"selfBody": "KXabfq_selfBody",
|
|
3121
3099
|
"otherRow": "KXabfq_otherRow",
|
|
3100
|
+
"rowActions": "KXabfq_rowActions",
|
|
3101
|
+
"quoteMark": "KXabfq_quoteMark",
|
|
3122
3102
|
"quoteText": "KXabfq_quoteText",
|
|
3103
|
+
"selfRow": "KXabfq_selfRow",
|
|
3123
3104
|
"quoteAuthor": "KXabfq_quoteAuthor",
|
|
3124
|
-
"
|
|
3105
|
+
"quoteBar": "KXabfq_quoteBar",
|
|
3125
3106
|
"author": "KXabfq_author",
|
|
3126
|
-
"
|
|
3127
|
-
"selfRow": "KXabfq_selfRow",
|
|
3107
|
+
"authorName": "KXabfq_authorName",
|
|
3128
3108
|
"rowBody": "KXabfq_rowBody",
|
|
3129
|
-
"
|
|
3130
|
-
"quoteBar": "KXabfq_quoteBar",
|
|
3131
|
-
"quoteMark": "KXabfq_quoteMark",
|
|
3132
|
-
"rowActionsSelf": "KXabfq_rowActionsSelf",
|
|
3109
|
+
"replyButton": "KXabfq_replyButton",
|
|
3133
3110
|
"quoteBody": "KXabfq_quoteBody",
|
|
3134
|
-
"
|
|
3111
|
+
"rowActionsSelf": "KXabfq_rowActionsSelf"
|
|
3135
3112
|
};
|
|
3136
3113
|
//#endregion
|
|
3137
3114
|
//#region src/client/MessageSide.tsx
|
|
@@ -3381,6 +3358,36 @@ window.__ModuleLoader__.load({
|
|
|
3381
3358
|
});
|
|
3382
3359
|
};
|
|
3383
3360
|
//#endregion
|
|
3361
|
+
//#region src/session-id.ts
|
|
3362
|
+
/**
|
|
3363
|
+
* The room/session binding, shared by both halves of the plugin.
|
|
3364
|
+
*
|
|
3365
|
+
* The browser half needs it to open a room's Session; the host half needs it to create and
|
|
3366
|
+
* recognize one. It lives in its own module because the two halves are built for different
|
|
3367
|
+
* runtimes: importing it from the host entry would drag the whole server side into the client
|
|
3368
|
+
* bundle, which the build's platform guard refuses — correctly, since none of it can run there.
|
|
3369
|
+
*
|
|
3370
|
+
* @module @sparkelf/dsh-group-chat/session-id
|
|
3371
|
+
*/
|
|
3372
|
+
/**
|
|
3373
|
+
* Every room session id starts with this, so a room's session is recognizable after a restart
|
|
3374
|
+
* and an ordinary session never matches.
|
|
3375
|
+
*
|
|
3376
|
+
* The binding lives in the id rather than in `SessionHeader` because the header carries no
|
|
3377
|
+
* free-form metadata field.
|
|
3378
|
+
*/
|
|
3379
|
+
const ROOM_SESSION_PREFIX = "group-room-";
|
|
3380
|
+
/** Deterministic session id for a room. */
|
|
3381
|
+
const roomSessionId = (roomId) => `${ROOM_SESSION_PREFIX}${roomId}`;
|
|
3382
|
+
/** Reads the room a session is bound to, or `undefined` for an ordinary session. */
|
|
3383
|
+
const roomIdOfSession = (session) => {
|
|
3384
|
+
if (typeof session !== "object" || session === null) return void 0;
|
|
3385
|
+
const id = session.id;
|
|
3386
|
+
if (typeof id !== "string" || !id.startsWith("group-room-")) return void 0;
|
|
3387
|
+
const roomId = id.slice(11);
|
|
3388
|
+
return roomId.length > 0 ? roomId : void 0;
|
|
3389
|
+
};
|
|
3390
|
+
//#endregion
|
|
3384
3391
|
//#region \0dsh-css:/root/projects/dsh-plugins-plus/packages/group-chat/src/client/MembersPanel.module.css.mjs
|
|
3385
3392
|
const css$2 = ".VeQVAa_root{box-sizing:border-box;flex-direction:column;gap:16px;min-width:200px;padding:12px 12px 20px;display:flex}.VeQVAa_section{flex-direction:column;gap:8px;min-width:0;display:flex}.VeQVAa_section+.VeQVAa_section{border-top:1px solid var(--dsw-alias-border-l3);padding-top:14px}.VeQVAa_sectionHeader{align-items:center;gap:6px;min-width:0;display:flex}.VeQVAa_sectionToggle{min-width:0;color:inherit;font:inherit;cursor:pointer;text-align:start;background:0 0;border:0;align-items:center;gap:4px;padding:0;display:flex}.VeQVAa_caret{width:10px;color:var(--dsw-alias-label-tertiary);flex:none;font-size:10px;line-height:12px}.VeQVAa_sectionBody{flex-direction:column;gap:8px;min-width:0;display:flex}.VeQVAa_sectionLabel{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:18px}.VeQVAa_count{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:16px}.VeQVAa_searchToggle{border-radius:var(--dsw-radius-sm);width:20px;height:20px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;margin-left:auto;padding:0;display:flex}.VeQVAa_searchToggle:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.VeQVAa_searchToggle:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:1px}.VeQVAa_linkButton{border-radius:var(--dsw-radius-sm);color:var(--dsw-alias-state-business-primary);font:inherit;cursor:pointer;background:0 0;border:none;margin-left:auto;padding:2px 6px;font-size:12px}.VeQVAa_linkButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.VeQVAa_announcementText{border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary);white-space:pre-wrap;overflow-wrap:anywhere;margin:0;padding:8px 10px;font-size:13px;line-height:20px}.VeQVAa_editor{flex-direction:column;gap:8px;display:flex}.VeQVAa_textarea{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);width:100%;color:var(--dsw-alias-label-primary);font:inherit;resize:vertical;background:0 0;padding:8px 10px;font-size:13px;line-height:20px}.VeQVAa_textarea:focus{border-color:var(--dsw-alias-state-business-primary);outline:none}.VeQVAa_editorFooter{align-items:center;gap:6px;display:flex}.VeQVAa_editorFooter .VeQVAa_hint{margin-right:auto}.VeQVAa_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:16px}.VeQVAa_unavailable{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.VeQVAa_error{color:var(--dsw-alias-state-error-primary,var(--dsw-alias-label-primary));margin:0;font-size:12px;line-height:16px}.VeQVAa_notice{color:var(--dsw-alias-label-tertiary);margin:0;padding:16px 12px;font-size:12px;line-height:18px}.VeQVAa_search{min-width:0}.VeQVAa_list{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.VeQVAa_row{border-radius:var(--dsw-radius-sm);align-items:center;gap:8px;min-width:0;padding:5px 4px;display:flex}.VeQVAa_row:hover{background:var(--dsw-alias-interactive-bg-hover)}.VeQVAa_name{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:auto;font-size:13px;line-height:18px;overflow:hidden}.VeQVAa_fileButton{width:100%;color:inherit;font:inherit;text-align:start;cursor:pointer;border-radius:var(--dsw-alias-border-radius-s);background:0 0;border:0;align-items:center;gap:8px;padding:0;display:flex}.VeQVAa_fileButton:hover .VeQVAa_name{text-decoration:underline}.VeQVAa_filePicker{display:none}.VeQVAa_crumbs{flex-wrap:wrap;align-items:center;gap:2px;min-width:0;display:flex}.VeQVAa_crumbGroup{align-items:center;gap:2px;min-width:0;display:inline-flex}.VeQVAa_crumb{text-overflow:ellipsis;white-space:nowrap;max-width:120px;color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;background:0 0;border:0;padding:0 2px;font-size:11px;overflow:hidden}.VeQVAa_crumb:hover{color:var(--dsw-alias-label-primary);text-decoration:underline}.VeQVAa_crumbSep{color:var(--dsw-alias-label-tertiary);font-size:11px}.VeQVAa_refresh{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;margin-inline-start:auto;padding:0 4px;font-size:12px;line-height:16px}.VeQVAa_refresh:hover{color:var(--dsw-alias-label-primary)}.VeQVAa_preview{border:1px solid var(--dsw-alias-border-l1);border-radius:var(--dsw-alias-border-radius-m);background:var(--dsw-alias-bg-layer-1,var(--dsw-alias-bg-base));margin-top:8px;overflow:hidden}.VeQVAa_previewHeader{border-bottom:1px solid var(--dsw-alias-border-l1);align-items:center;gap:8px;padding:6px 8px;display:flex}.VeQVAa_previewTitle{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;font-size:12px;font-weight:500;overflow:hidden}.VeQVAa_previewClose{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;flex:none;padding:0 4px;font-size:14px;line-height:16px}.VeQVAa_previewClose:hover{color:var(--dsw-alias-label-primary)}.VeQVAa_previewImage{border-radius:var(--dsw-alias-border-radius-s);background:var(--dsw-alias-bg-base);max-width:100%;height:auto;display:block}.VeQVAa_previewBody{max-height:240px;font-family:var(--dsw-alias-font-family-mono,monospace);white-space:pre-wrap;word-break:break-word;margin:0;padding:8px;font-size:11px;line-height:16px;overflow:auto}.VeQVAa_fileIcon{text-align:center;flex:none;width:16px;font-size:12px;line-height:16px}.VeQVAa_fileSize{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;font-size:11px}.VeQVAa_remove{border-radius:var(--dsw-radius-sm);width:20px;height:20px;color:var(--dsw-alias-label-tertiary);opacity:0;cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;transition:opacity .12s,background .12s,color .12s;display:inline-flex}.VeQVAa_row:hover .VeQVAa_remove,.VeQVAa_remove:focus-visible{opacity:1}.VeQVAa_remove:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-state-error-primary)}.VeQVAa_selfTag{border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-tertiary);flex:none;padding:0 5px;font-size:11px;line-height:16px}.VeQVAa_ownerTag{border:1px solid color-mix(in srgb, var(--dsw-alias-state-warning-primary,#f7ad31) 40%, transparent);border-radius:var(--dsw-radius-sm);color:var(--dsw-alias-state-warning-primary,#f7ad31);flex:none;padding:0 5px;font-size:11px;line-height:16px}";
|
|
3386
3393
|
const tagId$2 = "@sparkelf/dsh-group-chat/MembersPanel.module.css";
|
|
@@ -3392,46 +3399,46 @@ window.__ModuleLoader__.load({
|
|
|
3392
3399
|
document.head.appendChild(tag);
|
|
3393
3400
|
}
|
|
3394
3401
|
var MembersPanel_module_css_default = {
|
|
3395
|
-
"
|
|
3396
|
-
"filePicker": "VeQVAa_filePicker",
|
|
3402
|
+
"announcementText": "VeQVAa_announcementText",
|
|
3397
3403
|
"fileButton": "VeQVAa_fileButton",
|
|
3404
|
+
"row": "VeQVAa_row",
|
|
3405
|
+
"searchToggle": "VeQVAa_searchToggle",
|
|
3406
|
+
"name": "VeQVAa_name",
|
|
3407
|
+
"previewHeader": "VeQVAa_previewHeader",
|
|
3408
|
+
"textarea": "VeQVAa_textarea",
|
|
3409
|
+
"list": "VeQVAa_list",
|
|
3398
3410
|
"crumbGroup": "VeQVAa_crumbGroup",
|
|
3411
|
+
"crumbSep": "VeQVAa_crumbSep",
|
|
3412
|
+
"linkButton": "VeQVAa_linkButton",
|
|
3399
3413
|
"sectionToggle": "VeQVAa_sectionToggle",
|
|
3400
|
-
"
|
|
3401
|
-
"
|
|
3402
|
-
"
|
|
3403
|
-
"
|
|
3414
|
+
"root": "VeQVAa_root",
|
|
3415
|
+
"ownerTag": "VeQVAa_ownerTag",
|
|
3416
|
+
"unavailable": "VeQVAa_unavailable",
|
|
3417
|
+
"error": "VeQVAa_error",
|
|
3418
|
+
"selfTag": "VeQVAa_selfTag",
|
|
3404
3419
|
"sectionHeader": "VeQVAa_sectionHeader",
|
|
3405
|
-
"
|
|
3420
|
+
"editor": "VeQVAa_editor",
|
|
3421
|
+
"filePicker": "VeQVAa_filePicker",
|
|
3422
|
+
"previewTitle": "VeQVAa_previewTitle",
|
|
3406
3423
|
"refresh": "VeQVAa_refresh",
|
|
3407
|
-
"
|
|
3408
|
-
"fileIcon": "VeQVAa_fileIcon",
|
|
3424
|
+
"search": "VeQVAa_search",
|
|
3409
3425
|
"previewClose": "VeQVAa_previewClose",
|
|
3410
|
-
"
|
|
3411
|
-
"
|
|
3412
|
-
"
|
|
3413
|
-
"crumbs": "VeQVAa_crumbs",
|
|
3414
|
-
"count": "VeQVAa_count",
|
|
3415
|
-
"list": "VeQVAa_list",
|
|
3416
|
-
"root": "VeQVAa_root",
|
|
3417
|
-
"searchToggle": "VeQVAa_searchToggle",
|
|
3418
|
-
"textarea": "VeQVAa_textarea",
|
|
3419
|
-
"crumbSep": "VeQVAa_crumbSep",
|
|
3426
|
+
"preview": "VeQVAa_preview",
|
|
3427
|
+
"previewBody": "VeQVAa_previewBody",
|
|
3428
|
+
"crumb": "VeQVAa_crumb",
|
|
3420
3429
|
"notice": "VeQVAa_notice",
|
|
3421
|
-
"editor": "VeQVAa_editor",
|
|
3422
|
-
"ownerTag": "VeQVAa_ownerTag",
|
|
3423
3430
|
"sectionLabel": "VeQVAa_sectionLabel",
|
|
3424
|
-
"
|
|
3425
|
-
"
|
|
3431
|
+
"previewImage": "VeQVAa_previewImage",
|
|
3432
|
+
"crumbs": "VeQVAa_crumbs",
|
|
3426
3433
|
"fileSize": "VeQVAa_fileSize",
|
|
3427
|
-
"
|
|
3434
|
+
"section": "VeQVAa_section",
|
|
3428
3435
|
"caret": "VeQVAa_caret",
|
|
3429
|
-
"
|
|
3430
|
-
"
|
|
3431
|
-
"
|
|
3432
|
-
"
|
|
3433
|
-
"
|
|
3434
|
-
"
|
|
3436
|
+
"fileIcon": "VeQVAa_fileIcon",
|
|
3437
|
+
"hint": "VeQVAa_hint",
|
|
3438
|
+
"editorFooter": "VeQVAa_editorFooter",
|
|
3439
|
+
"remove": "VeQVAa_remove",
|
|
3440
|
+
"sectionBody": "VeQVAa_sectionBody",
|
|
3441
|
+
"count": "VeQVAa_count"
|
|
3435
3442
|
};
|
|
3436
3443
|
//#endregion
|
|
3437
3444
|
//#region src/client/MembersPanel.tsx
|
|
@@ -4057,8 +4064,8 @@ window.__ModuleLoader__.load({
|
|
|
4057
4064
|
"title": "_0Vnsuq_title",
|
|
4058
4065
|
"entry": "_0Vnsuq_entry",
|
|
4059
4066
|
"icon": "_0Vnsuq_icon",
|
|
4060
|
-
"
|
|
4061
|
-
"
|
|
4067
|
+
"text": "_0Vnsuq_text",
|
|
4068
|
+
"description": "_0Vnsuq_description"
|
|
4062
4069
|
};
|
|
4063
4070
|
//#endregion
|
|
4064
4071
|
//#region src/client/GuideEntry.tsx
|
|
@@ -4125,13 +4132,13 @@ window.__ModuleLoader__.load({
|
|
|
4125
4132
|
document.head.appendChild(tag);
|
|
4126
4133
|
}
|
|
4127
4134
|
var QuoteComposer_module_css_default = {
|
|
4128
|
-
"dismiss": "AK6KxW_dismiss",
|
|
4129
|
-
"button": "AK6KxW_button",
|
|
4130
|
-
"author": "AK6KxW_author",
|
|
4131
4135
|
"body": "AK6KxW_body",
|
|
4132
|
-
"
|
|
4136
|
+
"author": "AK6KxW_author",
|
|
4137
|
+
"dismiss": "AK6KxW_dismiss",
|
|
4133
4138
|
"text": "AK6KxW_text",
|
|
4134
|
-
"
|
|
4139
|
+
"button": "AK6KxW_button",
|
|
4140
|
+
"bar": "AK6KxW_bar",
|
|
4141
|
+
"mark": "AK6KxW_mark"
|
|
4135
4142
|
};
|
|
4136
4143
|
//#endregion
|
|
4137
4144
|
//#region src/client/QuoteComposer.tsx
|
|
@@ -4265,6 +4272,7 @@ window.__ModuleLoader__.load({
|
|
|
4265
4272
|
const source = {
|
|
4266
4273
|
trigger: "@",
|
|
4267
4274
|
name: SOURCE_NAME$1,
|
|
4275
|
+
label: "消息",
|
|
4268
4276
|
order: 30,
|
|
4269
4277
|
showGroupTitle: true,
|
|
4270
4278
|
async candidates(_session, request) {
|
|
@@ -4382,11 +4390,13 @@ window.__ModuleLoader__.load({
|
|
|
4382
4390
|
const source = {
|
|
4383
4391
|
trigger: "@",
|
|
4384
4392
|
name: SOURCE_NAME,
|
|
4393
|
+
label: "成员",
|
|
4385
4394
|
order: 20,
|
|
4386
4395
|
showGroupTitle: true,
|
|
4387
|
-
async candidates(
|
|
4396
|
+
async candidates(session, request) {
|
|
4388
4397
|
const roomId = store.getState().activeRoomId;
|
|
4389
4398
|
if (roomId === void 0) return [];
|
|
4399
|
+
if (session.sessionId !== void 0 && session.sessionId !== roomSessionId(roomId)) return [];
|
|
4390
4400
|
const members = await listMembers(roomId);
|
|
4391
4401
|
const roster = mentionSourceOf(members);
|
|
4392
4402
|
const owners = new Set(members.filter((member) => member.owner).map((member) => member.userId));
|
|
@@ -4849,8 +4859,11 @@ window.__ModuleLoader__.load({
|
|
|
4849
4859
|
const navigation = ctx.get("uiWorkspace");
|
|
4850
4860
|
if (navigation?.openSession === void 0) console.warn("[group-chat] uiWorkspace.openSession is unavailable; room selection cannot navigate");
|
|
4851
4861
|
const layout = ctx.get("layout");
|
|
4852
|
-
const
|
|
4853
|
-
|
|
4862
|
+
const catalog = ctx.get("sessions");
|
|
4863
|
+
const base = createRoomStore({ openSession: async (roomId) => {
|
|
4864
|
+
const opened = await openRoom(roomId);
|
|
4865
|
+
await catalog?.refresh?.();
|
|
4866
|
+
navigation?.openSession?.(opened.sessionId);
|
|
4854
4867
|
layout?.selectPanel?.(null);
|
|
4855
4868
|
} });
|
|
4856
4869
|
const quotes = createQuoteStore();
|