@sparkelf/dsh-group-chat 0.5.1 → 0.5.3
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 +257 -138
- package/lib/client.js.map +1 -1
- package/lib/index.js +25 -1
- package/package.json +7 -7
package/lib/client.js
CHANGED
|
@@ -513,10 +513,10 @@ window.__ModuleLoader__.load({
|
|
|
513
513
|
document.head.appendChild(tag);
|
|
514
514
|
}
|
|
515
515
|
var Avatar_module_css_default = {
|
|
516
|
-
"stack": "Ohch6W_stack",
|
|
517
516
|
"md": "Ohch6W_md",
|
|
518
|
-
"over": "Ohch6W_over",
|
|
519
517
|
"avatar": "Ohch6W_avatar",
|
|
518
|
+
"stack": "Ohch6W_stack",
|
|
519
|
+
"over": "Ohch6W_over",
|
|
520
520
|
"sm": "Ohch6W_sm"
|
|
521
521
|
};
|
|
522
522
|
//#endregion
|
|
@@ -557,13 +557,13 @@ window.__ModuleLoader__.load({
|
|
|
557
557
|
document.head.appendChild(tag);
|
|
558
558
|
}
|
|
559
559
|
var Picker_module_css_default = {
|
|
560
|
-
"label": "sKjJ-a_label",
|
|
561
560
|
"secondary": "sKjJ-a_secondary",
|
|
562
|
-
"
|
|
561
|
+
"row": "sKjJ-a_row",
|
|
563
562
|
"rowActive": "sKjJ-a_rowActive",
|
|
563
|
+
"label": "sKjJ-a_label",
|
|
564
|
+
"box": "sKjJ-a_box",
|
|
564
565
|
"list": "sKjJ-a_list",
|
|
565
|
-
"note": "sKjJ-a_note"
|
|
566
|
-
"row": "sKjJ-a_row"
|
|
566
|
+
"note": "sKjJ-a_note"
|
|
567
567
|
};
|
|
568
568
|
//#endregion
|
|
569
569
|
//#region src/client/Picker.tsx
|
|
@@ -736,11 +736,11 @@ window.__ModuleLoader__.load({
|
|
|
736
736
|
document.head.appendChild(tag);
|
|
737
737
|
}
|
|
738
738
|
var PresetSelect_module_css_default = {
|
|
739
|
-
"description": "xjnmxG_description",
|
|
740
|
-
"trigger": "xjnmxG_trigger",
|
|
741
739
|
"name": "xjnmxG_name",
|
|
740
|
+
"trigger": "xjnmxG_trigger",
|
|
741
|
+
"row": "xjnmxG_row",
|
|
742
742
|
"triggerLabel": "xjnmxG_triggerLabel",
|
|
743
|
-
"
|
|
743
|
+
"description": "xjnmxG_description"
|
|
744
744
|
};
|
|
745
745
|
//#endregion
|
|
746
746
|
//#region src/client/PresetSelect.tsx
|
|
@@ -916,7 +916,14 @@ window.__ModuleLoader__.load({
|
|
|
916
916
|
}
|
|
917
917
|
},
|
|
918
918
|
open: (roomId) => {
|
|
919
|
-
set({
|
|
919
|
+
set({
|
|
920
|
+
activeRoomId: roomId,
|
|
921
|
+
...state.rooms === void 0 ? {} : { rooms: state.rooms.map((room) => room.id === roomId ? {
|
|
922
|
+
...room,
|
|
923
|
+
unreadCount: 0,
|
|
924
|
+
mentionCount: 0
|
|
925
|
+
} : room) }
|
|
926
|
+
});
|
|
920
927
|
loadMembersInto(roomId);
|
|
921
928
|
},
|
|
922
929
|
discover: async (query) => {
|
|
@@ -998,23 +1005,23 @@ window.__ModuleLoader__.load({
|
|
|
998
1005
|
document.head.appendChild(tag);
|
|
999
1006
|
}
|
|
1000
1007
|
var CreateRoomDialog_module_css_default = {
|
|
1008
|
+
"warn": "Z3w8WW_warn",
|
|
1009
|
+
"body": "Z3w8WW_body",
|
|
1001
1010
|
"pill": "Z3w8WW_pill",
|
|
1002
1011
|
"hint": "Z3w8WW_hint",
|
|
1003
|
-
"
|
|
1012
|
+
"memberRow": "Z3w8WW_memberRow",
|
|
1004
1013
|
"label": "Z3w8WW_label",
|
|
1005
|
-
"triggerExtra": "Z3w8WW_triggerExtra",
|
|
1006
|
-
"pillActive": "Z3w8WW_pillActive",
|
|
1007
|
-
"body": "Z3w8WW_body",
|
|
1008
1014
|
"notice": "Z3w8WW_notice",
|
|
1009
|
-
"footer": "Z3w8WW_footer",
|
|
1010
|
-
"error": "Z3w8WW_error",
|
|
1011
|
-
"policyRow": "Z3w8WW_policyRow",
|
|
1012
|
-
"switches": "Z3w8WW_switches",
|
|
1013
|
-
"memberName": "Z3w8WW_memberName",
|
|
1014
1015
|
"memberBadge": "Z3w8WW_memberBadge",
|
|
1015
|
-
"memberRow": "Z3w8WW_memberRow",
|
|
1016
1016
|
"memberList": "Z3w8WW_memberList",
|
|
1017
|
-
"
|
|
1017
|
+
"field": "Z3w8WW_field",
|
|
1018
|
+
"error": "Z3w8WW_error",
|
|
1019
|
+
"pillActive": "Z3w8WW_pillActive",
|
|
1020
|
+
"footer": "Z3w8WW_footer",
|
|
1021
|
+
"memberName": "Z3w8WW_memberName",
|
|
1022
|
+
"switches": "Z3w8WW_switches",
|
|
1023
|
+
"triggerExtra": "Z3w8WW_triggerExtra",
|
|
1024
|
+
"policyRow": "Z3w8WW_policyRow"
|
|
1018
1025
|
};
|
|
1019
1026
|
//#endregion
|
|
1020
1027
|
//#region src/client/CreateRoomDialog.tsx
|
|
@@ -1281,28 +1288,28 @@ window.__ModuleLoader__.load({
|
|
|
1281
1288
|
document.head.appendChild(tag);
|
|
1282
1289
|
}
|
|
1283
1290
|
var InviteDialog_module_css_default = {
|
|
1291
|
+
"rowHandle": "r4uCba_rowHandle",
|
|
1284
1292
|
"content": "r4uCba_content",
|
|
1285
|
-
"
|
|
1286
|
-
"
|
|
1293
|
+
"note": "r4uCba_note",
|
|
1294
|
+
"errorRow": "r4uCba_errorRow",
|
|
1295
|
+
"error": "r4uCba_error",
|
|
1296
|
+
"checkHidden": "r4uCba_checkHidden",
|
|
1297
|
+
"chipName": "r4uCba_chipName",
|
|
1287
1298
|
"chipRemove": "r4uCba_chipRemove",
|
|
1288
|
-
"
|
|
1299
|
+
"list": "r4uCba_list",
|
|
1289
1300
|
"searchRow": "r4uCba_searchRow",
|
|
1290
|
-
"chipName": "r4uCba_chipName",
|
|
1291
|
-
"row": "r4uCba_row",
|
|
1292
|
-
"chips": "r4uCba_chips",
|
|
1293
|
-
"visuallyHidden": "r4uCba_visuallyHidden",
|
|
1294
|
-
"rowHandle": "r4uCba_rowHandle",
|
|
1295
|
-
"errorRow": "r4uCba_errorRow",
|
|
1296
1301
|
"dialog": "r4uCba_dialog",
|
|
1297
|
-
"
|
|
1302
|
+
"visuallyHidden": "r4uCba_visuallyHidden",
|
|
1298
1303
|
"inviteSpin": "r4uCba_inviteSpin",
|
|
1304
|
+
"field": "r4uCba_field",
|
|
1305
|
+
"rowName": "r4uCba_rowName",
|
|
1299
1306
|
"check": "r4uCba_check",
|
|
1307
|
+
"row": "r4uCba_row",
|
|
1308
|
+
"rowSelected": "r4uCba_rowSelected",
|
|
1300
1309
|
"chip": "r4uCba_chip",
|
|
1301
|
-
"
|
|
1302
|
-
"
|
|
1303
|
-
"
|
|
1304
|
-
"field": "r4uCba_field",
|
|
1305
|
-
"spinner": "r4uCba_spinner"
|
|
1310
|
+
"spinner": "r4uCba_spinner",
|
|
1311
|
+
"search": "r4uCba_search",
|
|
1312
|
+
"chips": "r4uCba_chips"
|
|
1306
1313
|
};
|
|
1307
1314
|
//#endregion
|
|
1308
1315
|
//#region src/client/RoomDialogs.tsx
|
|
@@ -1919,67 +1926,67 @@ window.__ModuleLoader__.load({
|
|
|
1919
1926
|
document.head.appendChild(tag);
|
|
1920
1927
|
}
|
|
1921
1928
|
var SidebarRooms_module_css_default = {
|
|
1922
|
-
"leaveCopy": "s0QgKq_leaveCopy",
|
|
1923
|
-
"leaveRoomName": "s0QgKq_leaveRoomName",
|
|
1924
|
-
"hit": "s0QgKq_hit",
|
|
1925
|
-
"searchButton": "s0QgKq_searchButton",
|
|
1926
|
-
"unread": "s0QgKq_unread",
|
|
1927
|
-
"listArea": "s0QgKq_listArea",
|
|
1928
|
-
"time": "s0QgKq_time",
|
|
1929
|
-
"menuInput": "s0QgKq_menuInput",
|
|
1930
|
-
"clearButton": "s0QgKq_clearButton",
|
|
1931
|
-
"empty": "s0QgKq_empty",
|
|
1932
|
-
"sectionHeader": "s0QgKq_sectionHeader",
|
|
1933
|
-
"iconButton": "s0QgKq_iconButton",
|
|
1934
|
-
"discoverRow": "s0QgKq_discoverRow",
|
|
1935
|
-
"menuHeading": "s0QgKq_menuHeading",
|
|
1936
|
-
"menuActions": "s0QgKq_menuActions",
|
|
1937
|
-
"flatList": "s0QgKq_flatList",
|
|
1938
1929
|
"hitHead": "s0QgKq_hitHead",
|
|
1939
|
-
"
|
|
1940
|
-
"footer": "s0QgKq_footer",
|
|
1941
|
-
"searchInput": "s0QgKq_searchInput",
|
|
1930
|
+
"sectionHeader": "s0QgKq_sectionHeader",
|
|
1942
1931
|
"rowWrap": "s0QgKq_rowWrap",
|
|
1943
|
-
"
|
|
1932
|
+
"searchSlotExpanded": "s0QgKq_searchSlotExpanded",
|
|
1933
|
+
"clearButton": "s0QgKq_clearButton",
|
|
1934
|
+
"searchButton": "s0QgKq_searchButton",
|
|
1935
|
+
"visuallyHidden": "s0QgKq_visuallyHidden",
|
|
1944
1936
|
"unreadMentioned": "s0QgKq_unreadMentioned",
|
|
1937
|
+
"searchSlot": "s0QgKq_searchSlot",
|
|
1938
|
+
"fade": "s0QgKq_fade",
|
|
1939
|
+
"leaveBody": "s0QgKq_leaveBody",
|
|
1940
|
+
"time": "s0QgKq_time",
|
|
1941
|
+
"root": "s0QgKq_root",
|
|
1942
|
+
"leaveConfirmDanger": "s0QgKq_leaveConfirmDanger",
|
|
1943
|
+
"hit": "s0QgKq_hit",
|
|
1944
|
+
"hitText": "s0QgKq_hitText",
|
|
1945
1945
|
"menu": "s0QgKq_menu",
|
|
1946
|
+
"leaveCopy": "s0QgKq_leaveCopy",
|
|
1946
1947
|
"hitAuthor": "s0QgKq_hitAuthor",
|
|
1947
|
-
"
|
|
1948
|
-
"
|
|
1949
|
-
"
|
|
1950
|
-
"menuItem": "s0QgKq_menuItem",
|
|
1951
|
-
"hitText": "s0QgKq_hitText",
|
|
1952
|
-
"leaveConfirmDanger": "s0QgKq_leaveConfirmDanger",
|
|
1953
|
-
"joinButton": "s0QgKq_joinButton",
|
|
1954
|
-
"discoverMeta": "s0QgKq_discoverMeta",
|
|
1955
|
-
"mark": "s0QgKq_mark",
|
|
1956
|
-
"searchSlotExpanded": "s0QgKq_searchSlotExpanded",
|
|
1957
|
-
"list": "s0QgKq_list",
|
|
1958
|
-
"title": "s0QgKq_title",
|
|
1948
|
+
"discoverSection": "s0QgKq_discoverSection",
|
|
1949
|
+
"searchInput": "s0QgKq_searchInput",
|
|
1950
|
+
"sessionRow": "s0QgKq_sessionRow",
|
|
1959
1951
|
"leaveError": "s0QgKq_leaveError",
|
|
1960
|
-
"
|
|
1961
|
-
"searchSlot": "s0QgKq_searchSlot",
|
|
1952
|
+
"unread": "s0QgKq_unread",
|
|
1962
1953
|
"search": "s0QgKq_search",
|
|
1963
|
-
"
|
|
1964
|
-
"
|
|
1954
|
+
"sectionLabel": "s0QgKq_sectionLabel",
|
|
1955
|
+
"menuHeading": "s0QgKq_menuHeading",
|
|
1956
|
+
"hitRoom": "s0QgKq_hitRoom",
|
|
1957
|
+
"discoverRow": "s0QgKq_discoverRow",
|
|
1958
|
+
"menuInline": "s0QgKq_menuInline",
|
|
1959
|
+
"hitHint": "s0QgKq_hitHint",
|
|
1960
|
+
"searchExpanded": "s0QgKq_searchExpanded",
|
|
1961
|
+
"menuItem": "s0QgKq_menuItem",
|
|
1962
|
+
"emptyState": "s0QgKq_emptyState",
|
|
1963
|
+
"resizer": "s0QgKq_resizer",
|
|
1964
|
+
"check": "s0QgKq_check",
|
|
1965
1965
|
"menuCancel": "s0QgKq_menuCancel",
|
|
1966
|
-
"
|
|
1966
|
+
"menuInput": "s0QgKq_menuInput",
|
|
1967
1967
|
"menuRename": "s0QgKq_menuRename",
|
|
1968
|
-
"
|
|
1969
|
-
"emptyState": "s0QgKq_emptyState",
|
|
1970
|
-
"menuConfirm": "s0QgKq_menuConfirm",
|
|
1971
|
-
"railButton": "s0QgKq_railButton",
|
|
1972
|
-
"discoverName": "s0QgKq_discoverName",
|
|
1973
|
-
"leaveBody": "s0QgKq_leaveBody",
|
|
1968
|
+
"hitList": "s0QgKq_hitList",
|
|
1974
1969
|
"viewWrap": "s0QgKq_viewWrap",
|
|
1975
|
-
"
|
|
1970
|
+
"title": "s0QgKq_title",
|
|
1971
|
+
"listArea": "s0QgKq_listArea",
|
|
1976
1972
|
"sessionRowSelected": "s0QgKq_sessionRowSelected",
|
|
1977
|
-
"
|
|
1978
|
-
"
|
|
1979
|
-
"
|
|
1980
|
-
"
|
|
1981
|
-
"
|
|
1982
|
-
"
|
|
1973
|
+
"menuActions": "s0QgKq_menuActions",
|
|
1974
|
+
"menuLayer": "s0QgKq_menuLayer",
|
|
1975
|
+
"iconButton": "s0QgKq_iconButton",
|
|
1976
|
+
"headerActions": "s0QgKq_headerActions",
|
|
1977
|
+
"leaveRoomName": "s0QgKq_leaveRoomName",
|
|
1978
|
+
"list": "s0QgKq_list",
|
|
1979
|
+
"menuConfirm": "s0QgKq_menuConfirm",
|
|
1980
|
+
"discoverName": "s0QgKq_discoverName",
|
|
1981
|
+
"mark": "s0QgKq_mark",
|
|
1982
|
+
"railButton": "s0QgKq_railButton",
|
|
1983
|
+
"footer": "s0QgKq_footer",
|
|
1984
|
+
"discoverMeta": "s0QgKq_discoverMeta",
|
|
1985
|
+
"joinButton": "s0QgKq_joinButton",
|
|
1986
|
+
"flatList": "s0QgKq_flatList",
|
|
1987
|
+
"rowIcon": "s0QgKq_rowIcon",
|
|
1988
|
+
"discoverHeading": "s0QgKq_discoverHeading",
|
|
1989
|
+
"empty": "s0QgKq_empty"
|
|
1983
1990
|
};
|
|
1984
1991
|
//#endregion
|
|
1985
1992
|
//#region src/client/SidebarRooms.tsx
|
|
@@ -3072,19 +3079,19 @@ window.__ModuleLoader__.load({
|
|
|
3072
3079
|
document.head.appendChild(tag);
|
|
3073
3080
|
}
|
|
3074
3081
|
var MessageSide_module_css_default = {
|
|
3075
|
-
"
|
|
3076
|
-
"quoteAuthor": "KXabfq_quoteAuthor",
|
|
3077
|
-
"quoteText": "KXabfq_quoteText",
|
|
3078
|
-
"quoteMark": "KXabfq_quoteMark",
|
|
3079
|
-
"rowActions": "KXabfq_rowActions",
|
|
3080
|
-
"quoteBody": "KXabfq_quoteBody",
|
|
3082
|
+
"selfRow": "KXabfq_selfRow",
|
|
3081
3083
|
"quoteBar": "KXabfq_quoteBar",
|
|
3082
|
-
"authorName": "KXabfq_authorName",
|
|
3083
3084
|
"selfBody": "KXabfq_selfBody",
|
|
3084
|
-
"
|
|
3085
|
+
"authorName": "KXabfq_authorName",
|
|
3085
3086
|
"rowActionsSelf": "KXabfq_rowActionsSelf",
|
|
3086
|
-
"
|
|
3087
|
+
"quoteBody": "KXabfq_quoteBody",
|
|
3088
|
+
"quoteText": "KXabfq_quoteText",
|
|
3089
|
+
"rowActions": "KXabfq_rowActions",
|
|
3090
|
+
"author": "KXabfq_author",
|
|
3091
|
+
"quoteMark": "KXabfq_quoteMark",
|
|
3087
3092
|
"rowBody": "KXabfq_rowBody",
|
|
3093
|
+
"replyButton": "KXabfq_replyButton",
|
|
3094
|
+
"quoteAuthor": "KXabfq_quoteAuthor",
|
|
3088
3095
|
"otherRow": "KXabfq_otherRow"
|
|
3089
3096
|
};
|
|
3090
3097
|
//#endregion
|
|
@@ -3376,46 +3383,46 @@ window.__ModuleLoader__.load({
|
|
|
3376
3383
|
document.head.appendChild(tag);
|
|
3377
3384
|
}
|
|
3378
3385
|
var MembersPanel_module_css_default = {
|
|
3379
|
-
"fileButton": "VeQVAa_fileButton",
|
|
3380
|
-
"previewTitle": "VeQVAa_previewTitle",
|
|
3381
|
-
"search": "VeQVAa_search",
|
|
3382
3386
|
"linkButton": "VeQVAa_linkButton",
|
|
3383
|
-
"name": "VeQVAa_name",
|
|
3384
|
-
"editorFooter": "VeQVAa_editorFooter",
|
|
3385
|
-
"row": "VeQVAa_row",
|
|
3386
|
-
"editor": "VeQVAa_editor",
|
|
3387
|
-
"refresh": "VeQVAa_refresh",
|
|
3388
|
-
"searchToggle": "VeQVAa_searchToggle",
|
|
3389
|
-
"root": "VeQVAa_root",
|
|
3390
|
-
"crumbs": "VeQVAa_crumbs",
|
|
3391
|
-
"caret": "VeQVAa_caret",
|
|
3392
3387
|
"fileIcon": "VeQVAa_fileIcon",
|
|
3388
|
+
"name": "VeQVAa_name",
|
|
3389
|
+
"hint": "VeQVAa_hint",
|
|
3390
|
+
"crumb": "VeQVAa_crumb",
|
|
3391
|
+
"crumbSep": "VeQVAa_crumbSep",
|
|
3393
3392
|
"fileSize": "VeQVAa_fileSize",
|
|
3394
|
-
"
|
|
3393
|
+
"editorFooter": "VeQVAa_editorFooter",
|
|
3395
3394
|
"sectionHeader": "VeQVAa_sectionHeader",
|
|
3396
|
-
"
|
|
3395
|
+
"count": "VeQVAa_count",
|
|
3396
|
+
"refresh": "VeQVAa_refresh",
|
|
3397
|
+
"section": "VeQVAa_section",
|
|
3398
|
+
"row": "VeQVAa_row",
|
|
3399
|
+
"list": "VeQVAa_list",
|
|
3400
|
+
"previewTitle": "VeQVAa_previewTitle",
|
|
3397
3401
|
"previewClose": "VeQVAa_previewClose",
|
|
3398
3402
|
"sectionLabel": "VeQVAa_sectionLabel",
|
|
3399
|
-
"
|
|
3400
|
-
"
|
|
3401
|
-
"
|
|
3403
|
+
"previewImage": "VeQVAa_previewImage",
|
|
3404
|
+
"selfTag": "VeQVAa_selfTag",
|
|
3405
|
+
"root": "VeQVAa_root",
|
|
3406
|
+
"searchToggle": "VeQVAa_searchToggle",
|
|
3407
|
+
"editor": "VeQVAa_editor",
|
|
3408
|
+
"ownerTag": "VeQVAa_ownerTag",
|
|
3409
|
+
"search": "VeQVAa_search",
|
|
3402
3410
|
"announcementText": "VeQVAa_announcementText",
|
|
3411
|
+
"fileButton": "VeQVAa_fileButton",
|
|
3412
|
+
"sectionBody": "VeQVAa_sectionBody",
|
|
3403
3413
|
"previewHeader": "VeQVAa_previewHeader",
|
|
3404
|
-
"textarea": "VeQVAa_textarea",
|
|
3405
|
-
"notice": "VeQVAa_notice",
|
|
3406
|
-
"previewBody": "VeQVAa_previewBody",
|
|
3407
|
-
"section": "VeQVAa_section",
|
|
3408
|
-
"remove": "VeQVAa_remove",
|
|
3409
3414
|
"sectionToggle": "VeQVAa_sectionToggle",
|
|
3410
|
-
"
|
|
3411
|
-
"
|
|
3415
|
+
"remove": "VeQVAa_remove",
|
|
3416
|
+
"previewBody": "VeQVAa_previewBody",
|
|
3417
|
+
"notice": "VeQVAa_notice",
|
|
3412
3418
|
"crumbGroup": "VeQVAa_crumbGroup",
|
|
3413
|
-
"
|
|
3414
|
-
"
|
|
3415
|
-
"
|
|
3416
|
-
"
|
|
3419
|
+
"error": "VeQVAa_error",
|
|
3420
|
+
"textarea": "VeQVAa_textarea",
|
|
3421
|
+
"caret": "VeQVAa_caret",
|
|
3422
|
+
"unavailable": "VeQVAa_unavailable",
|
|
3417
3423
|
"filePicker": "VeQVAa_filePicker",
|
|
3418
|
-
"
|
|
3424
|
+
"preview": "VeQVAa_preview",
|
|
3425
|
+
"crumbs": "VeQVAa_crumbs"
|
|
3419
3426
|
};
|
|
3420
3427
|
//#endregion
|
|
3421
3428
|
//#region src/client/MembersPanel.tsx
|
|
@@ -4039,10 +4046,10 @@ window.__ModuleLoader__.load({
|
|
|
4039
4046
|
}
|
|
4040
4047
|
var GuideEntry_module_css_default = {
|
|
4041
4048
|
"icon": "_0Vnsuq_icon",
|
|
4042
|
-
"title": "_0Vnsuq_title",
|
|
4043
|
-
"description": "_0Vnsuq_description",
|
|
4044
4049
|
"text": "_0Vnsuq_text",
|
|
4045
|
-
"entry": "_0Vnsuq_entry"
|
|
4050
|
+
"entry": "_0Vnsuq_entry",
|
|
4051
|
+
"title": "_0Vnsuq_title",
|
|
4052
|
+
"description": "_0Vnsuq_description"
|
|
4046
4053
|
};
|
|
4047
4054
|
//#endregion
|
|
4048
4055
|
//#region src/client/GuideEntry.tsx
|
|
@@ -4109,13 +4116,13 @@ window.__ModuleLoader__.load({
|
|
|
4109
4116
|
document.head.appendChild(tag);
|
|
4110
4117
|
}
|
|
4111
4118
|
var QuoteComposer_module_css_default = {
|
|
4112
|
-
"
|
|
4119
|
+
"dismiss": "AK6KxW_dismiss",
|
|
4120
|
+
"button": "AK6KxW_button",
|
|
4113
4121
|
"body": "AK6KxW_body",
|
|
4114
|
-
"bar": "AK6KxW_bar",
|
|
4115
|
-
"mark": "AK6KxW_mark",
|
|
4116
4122
|
"author": "AK6KxW_author",
|
|
4117
|
-
"
|
|
4118
|
-
"
|
|
4123
|
+
"mark": "AK6KxW_mark",
|
|
4124
|
+
"text": "AK6KxW_text",
|
|
4125
|
+
"bar": "AK6KxW_bar"
|
|
4119
4126
|
};
|
|
4120
4127
|
//#endregion
|
|
4121
4128
|
//#region src/client/QuoteComposer.tsx
|
|
@@ -4190,9 +4197,9 @@ window.__ModuleLoader__.load({
|
|
|
4190
4197
|
* @module @sparkelf/dsh-group-chat/client/messageReference
|
|
4191
4198
|
*/
|
|
4192
4199
|
/** Unique source name; duplicate `(trigger, name)` pairs throw at registration. */
|
|
4193
|
-
const SOURCE_NAME = "@sparkelf/dsh-group-chat/message";
|
|
4200
|
+
const SOURCE_NAME$1 = "@sparkelf/dsh-group-chat/message";
|
|
4194
4201
|
/** How many messages the menu offers at once. */
|
|
4195
|
-
const MAX_CANDIDATES = 20;
|
|
4202
|
+
const MAX_CANDIDATES$1 = 20;
|
|
4196
4203
|
/** How much of a message the menu row and the chip label show. */
|
|
4197
4204
|
const LABEL_CHARS = 28;
|
|
4198
4205
|
/**
|
|
@@ -4248,7 +4255,7 @@ window.__ModuleLoader__.load({
|
|
|
4248
4255
|
const registerMessageSource = (inputTriggers, store) => {
|
|
4249
4256
|
const source = {
|
|
4250
4257
|
trigger: "@",
|
|
4251
|
-
name: SOURCE_NAME,
|
|
4258
|
+
name: SOURCE_NAME$1,
|
|
4252
4259
|
order: 30,
|
|
4253
4260
|
showGroupTitle: true,
|
|
4254
4261
|
async candidates(_session, request) {
|
|
@@ -4270,7 +4277,7 @@ window.__ModuleLoader__.load({
|
|
|
4270
4277
|
icon: "session",
|
|
4271
4278
|
value: row.ref
|
|
4272
4279
|
});
|
|
4273
|
-
if (out.length >= MAX_CANDIDATES) break;
|
|
4280
|
+
if (out.length >= MAX_CANDIDATES$1) break;
|
|
4274
4281
|
}
|
|
4275
4282
|
return out;
|
|
4276
4283
|
},
|
|
@@ -4280,7 +4287,7 @@ window.__ModuleLoader__.load({
|
|
|
4280
4287
|
const found = resolved.get(ref);
|
|
4281
4288
|
if (found === void 0) return void 0;
|
|
4282
4289
|
return { insert: {
|
|
4283
|
-
source: SOURCE_NAME,
|
|
4290
|
+
source: SOURCE_NAME$1,
|
|
4284
4291
|
ref,
|
|
4285
4292
|
label: found.label,
|
|
4286
4293
|
appearance: "session",
|
|
@@ -4303,6 +4310,115 @@ window.__ModuleLoader__.load({
|
|
|
4303
4310
|
return inputTriggers.registerSource(source);
|
|
4304
4311
|
};
|
|
4305
4312
|
//#endregion
|
|
4313
|
+
//#region src/reference-ids.ts
|
|
4314
|
+
/**
|
|
4315
|
+
* Trigger-source identities shared by both halves of the package.
|
|
4316
|
+
*
|
|
4317
|
+
* The composer declares a mention with the source that produced the chip, and the Host routes
|
|
4318
|
+
* only the ids that source owns, so the string is a contract rather than a label. It lives here
|
|
4319
|
+
* so the client bundle and the host bundle cannot drift apart.
|
|
4320
|
+
*
|
|
4321
|
+
* @module @sparkelf/dsh-group-chat/reference-ids
|
|
4322
|
+
*/
|
|
4323
|
+
/** The `@` source whose picks are roster members. */
|
|
4324
|
+
const MEMBER_MENTION_SOURCE = "@sparkelf/dsh-group-chat/member";
|
|
4325
|
+
//#endregion
|
|
4326
|
+
//#region src/client/mentionSource.ts
|
|
4327
|
+
/**
|
|
4328
|
+
* Build the member source for one room.
|
|
4329
|
+
* @param members - the room roster.
|
|
4330
|
+
* @param selfId - the caller's account id, excluded because mentioning yourself is not a way
|
|
4331
|
+
* to notify anyone; the host's self-mention route handles waking the agent separately.
|
|
4332
|
+
* @returns id/name/avatar rows in roster order.
|
|
4333
|
+
*/
|
|
4334
|
+
function mentionSourceOf(members, selfId) {
|
|
4335
|
+
return members.filter((member) => member.userId !== selfId).map((member) => ({
|
|
4336
|
+
id: member.userId,
|
|
4337
|
+
displayName: member.displayName.trim() === "" ? member.userId : member.displayName,
|
|
4338
|
+
...member.avatarUrl === void 0 || member.avatarUrl === null || member.avatarUrl === "" ? {} : { avatarUrl: member.avatarUrl }
|
|
4339
|
+
}));
|
|
4340
|
+
}
|
|
4341
|
+
//#endregion
|
|
4342
|
+
//#region src/client/memberReference.ts
|
|
4343
|
+
/**
|
|
4344
|
+
* Room members as `@` mentions in the composer.
|
|
4345
|
+
*
|
|
4346
|
+
* The `@` menu is a multi-source pipeline: every source owns one group, and a pick becomes an
|
|
4347
|
+
* official inline chip. A member is picked the same way a room message is, but the chip declares
|
|
4348
|
+
* itself with `appearance: 'mention'`, which is what makes the composer hand the picked ids to the
|
|
4349
|
+
* Host as `prompt.mentions` instead of leaving them to be re-parsed out of the prompt text. The
|
|
4350
|
+
* Host's routing reads ids by design ("never parsed out of message text"): text parsing would
|
|
4351
|
+
* misread a code sample containing `@` and would let any message smuggle itself into an execution
|
|
4352
|
+
* path.
|
|
4353
|
+
*
|
|
4354
|
+
* The group appears only in a room: `candidates` answers an empty list everywhere else, and an
|
|
4355
|
+
* empty group closes itself, so a normal session's `@` menu is unchanged.
|
|
4356
|
+
*
|
|
4357
|
+
* @module @sparkelf/dsh-group-chat/client/memberReference
|
|
4358
|
+
*/
|
|
4359
|
+
/** Unique source name; duplicate `(trigger, name)` pairs throw at registration. */
|
|
4360
|
+
const SOURCE_NAME = MEMBER_MENTION_SOURCE;
|
|
4361
|
+
/** How many members the menu offers at once. */
|
|
4362
|
+
const MAX_CANDIDATES = 20;
|
|
4363
|
+
/** Reference id → the display name the chip and the clipboard need. */
|
|
4364
|
+
const names = /* @__PURE__ */ new Map();
|
|
4365
|
+
/**
|
|
4366
|
+
* Registers the room-member mention source.
|
|
4367
|
+
*
|
|
4368
|
+
* @param inputTriggers - the trigger pipeline service (`ctx.get('inputTriggers')`).
|
|
4369
|
+
* @param store - room store, read for the room the composer is writing into.
|
|
4370
|
+
* @returns the disposer.
|
|
4371
|
+
*/
|
|
4372
|
+
const registerMemberSource = (inputTriggers, store) => {
|
|
4373
|
+
const source = {
|
|
4374
|
+
trigger: "@",
|
|
4375
|
+
name: SOURCE_NAME,
|
|
4376
|
+
order: 20,
|
|
4377
|
+
showGroupTitle: true,
|
|
4378
|
+
async candidates(_session, request) {
|
|
4379
|
+
const roomId = store.getState().activeRoomId;
|
|
4380
|
+
if (roomId === void 0) return [];
|
|
4381
|
+
const members = await listMembers(roomId);
|
|
4382
|
+
const roster = mentionSourceOf(members);
|
|
4383
|
+
const owners = new Set(members.filter((member) => member.owner).map((member) => member.userId));
|
|
4384
|
+
const needle = request.query.trim().toLowerCase();
|
|
4385
|
+
const out = [];
|
|
4386
|
+
for (const member of roster) {
|
|
4387
|
+
if (request.signal.aborted) break;
|
|
4388
|
+
if (needle.length > 0 && !member.displayName.toLowerCase().includes(needle)) continue;
|
|
4389
|
+
names.set(member.id, member.displayName);
|
|
4390
|
+
out.push({
|
|
4391
|
+
name: member.displayName,
|
|
4392
|
+
...owners.has(member.id) ? { description: "群主" } : {},
|
|
4393
|
+
icon: "mention",
|
|
4394
|
+
value: member.id
|
|
4395
|
+
});
|
|
4396
|
+
if (out.length >= MAX_CANDIDATES) break;
|
|
4397
|
+
}
|
|
4398
|
+
return out;
|
|
4399
|
+
},
|
|
4400
|
+
onPick(pick) {
|
|
4401
|
+
const memberId = pick.candidate.value;
|
|
4402
|
+
if (memberId === void 0) return void 0;
|
|
4403
|
+
const name = names.get(memberId) ?? pick.candidate.name;
|
|
4404
|
+
return { insert: {
|
|
4405
|
+
source: SOURCE_NAME,
|
|
4406
|
+
ref: memberId,
|
|
4407
|
+
label: name,
|
|
4408
|
+
appearance: "mention",
|
|
4409
|
+
clipboardText: `@${name}`
|
|
4410
|
+
} };
|
|
4411
|
+
},
|
|
4412
|
+
codec: {
|
|
4413
|
+
/** What lands in the draft and the clipboard: the human-facing mention. */
|
|
4414
|
+
clipboardText: (ref) => `@${names.get(ref) ?? ref}`,
|
|
4415
|
+
/** What the model reads in place of the chip. The id rides the prompt's `mentions`. */
|
|
4416
|
+
serialize: (ref) => Promise.resolve(`@${names.get(ref) ?? ref}`)
|
|
4417
|
+
}
|
|
4418
|
+
};
|
|
4419
|
+
return inputTriggers.registerSource(source);
|
|
4420
|
+
};
|
|
4421
|
+
//#endregion
|
|
4306
4422
|
//#region src/client/locales.ts
|
|
4307
4423
|
/**
|
|
4308
4424
|
* Group-chat copy, in the shape every locale-backed DSH client plugin uses: one
|
|
@@ -4985,7 +5101,10 @@ window.__ModuleLoader__.load({
|
|
|
4985
5101
|
};
|
|
4986
5102
|
});
|
|
4987
5103
|
const inputTriggers = ctx.get("inputTriggers");
|
|
4988
|
-
if (inputTriggers !== void 0)
|
|
5104
|
+
if (inputTriggers !== void 0) {
|
|
5105
|
+
ctx.effect(() => registerMessageSource(inputTriggers, store));
|
|
5106
|
+
ctx.effect(() => registerMemberSource(inputTriggers, store));
|
|
5107
|
+
}
|
|
4989
5108
|
ctx.effect(() => ctx.slots.inject("conversation.input.dock", () => ctx.slots.register({
|
|
4990
5109
|
name: "conversation.input.dock",
|
|
4991
5110
|
id: QUOTE_DOCK_ID,
|