@mobilon-dev/chotto 0.3.103 → 0.3.104
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/chotto.css +1 -1
- package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +2 -2
- package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +189 -161
- package/dist/hooks/messages/canStartEditLastSent.js +16 -0
- package/dist/index.js +76 -72
- package/dist/types/components/3_compounds/ChatInput/ChatInput.vue.d.ts +13 -0
- package/dist/types/hooks/messages/canStartEditLastSent.d.ts +22 -0
- package/dist/types/hooks/messages/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function a(e, r) {
|
|
2
|
+
const t = Math.max(0, r);
|
|
3
|
+
return !e.slice(0, t).includes(`
|
|
4
|
+
`);
|
|
5
|
+
}
|
|
6
|
+
function l(e) {
|
|
7
|
+
return e.key !== "ArrowUp" || e.altKey || e.metaKey || e.ctrlKey || e.shiftKey || !e.hasResolver || e.disabled || e.isRecording || (e.draftText ?? "").trim() !== "" || e.replyMessageId != null && e.replyMessageId !== "" || e.editMessageId != null && e.editMessageId !== "" ? !1 : a(e.textareaText ?? "", e.selectionStart);
|
|
8
|
+
}
|
|
9
|
+
function f(e) {
|
|
10
|
+
return !(!e || e.messageId == null || e.messageId === "" || e.deleted === !0 || e.canEdit === !1);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
l as canStartEditLastSent,
|
|
14
|
+
a as isCursorOnFirstLine,
|
|
15
|
+
f as isEditableLastSentCandidate
|
|
16
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import { default as r } from "./components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js";
|
|
4
4
|
import { default as f } from "./components/1_atoms/ContactContextMenu/ContactContextMenu.vue.js";
|
|
5
|
-
import { default as
|
|
5
|
+
import { default as d } from "./components/1_atoms/ContextMenu/ContextMenu.vue.js";
|
|
6
6
|
import { default as m } from "./components/1_atoms/EmbedPreview/EmbedPreview.vue.js";
|
|
7
7
|
import { default as x } from "./components/1_atoms/LinkPreview/LinkPreview.vue.js";
|
|
8
8
|
import { default as n } from "./components/1_atoms/Tooltip/Tooltip.vue.js";
|
|
@@ -14,12 +14,12 @@ import { default as I } from "./components/1_icons/MenuIcon.vue.js";
|
|
|
14
14
|
import { default as F } from "./components/1_icons/SearchIcon.vue.js";
|
|
15
15
|
import { default as B } from "./components/1_icons/SettingsIcon.vue.js";
|
|
16
16
|
import { default as b } from "./components/1_icons/TelegramIcon.vue.js";
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
17
|
+
import { default as v } from "./components/1_icons/WhatsAppIcon.vue.js";
|
|
18
|
+
import { default as k } from "./components/1_icons/MessageStatus/ErrorStatusIcon.vue.js";
|
|
19
19
|
import { default as V } from "./components/1_icons/MessageStatus/PendingStatusIcon.vue.js";
|
|
20
20
|
import { default as U } from "./components/1_icons/MessageStatus/ReadStatusIcon.vue.js";
|
|
21
21
|
import { default as H } from "./components/1_icons/MessageStatus/ReceivedStatusIcon.vue.js";
|
|
22
|
-
import { default as
|
|
22
|
+
import { default as O } from "./components/1_icons/MessageStatus/SentStatusIcon.vue.js";
|
|
23
23
|
import { default as Q } from "./components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js";
|
|
24
24
|
import { default as X } from "./components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js";
|
|
25
25
|
import { default as z } from "./components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue.js";
|
|
@@ -29,7 +29,7 @@ import { default as ee } from "./components/2_chatinput_elements/ButtonEmojiPick
|
|
|
29
29
|
import { default as oe } from "./components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.js";
|
|
30
30
|
import { default as re } from "./components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js";
|
|
31
31
|
import { default as fe } from "./components/2_chatinput_elements/FilePreview/FilePreview.vue.js";
|
|
32
|
-
import { default as
|
|
32
|
+
import { default as de } from "./components/2_chatinput_elements/FileUploader/FileUploader.vue.js";
|
|
33
33
|
import { default as me } from "./components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.js";
|
|
34
34
|
import { default as xe } from "./components/2_chatinput_elements/StickerPicker/StickerPicker.vue.js";
|
|
35
35
|
import { default as ne } from "./components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js";
|
|
@@ -41,12 +41,12 @@ import { default as Ie } from "./components/2_chatinput_elements/WABATemplateSel
|
|
|
41
41
|
import { default as Fe } from "./components/2_chatlist_elements/ChatFilter/ChatFilter.vue.js";
|
|
42
42
|
import { default as Be } from "./components/2_chatlist_elements/ChatItem/ChatItem.vue.js";
|
|
43
43
|
import { default as be } from "./components/2_chatlist_elements/ChatTabs/ChatTabs.vue.js";
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
44
|
+
import { default as ve } from "./components/2_elements/AudioRecorder/AudioRecorder.vue.js";
|
|
45
|
+
import { default as ke } from "./components/2_elements/ChannelSelector/ChannelSelector.vue.js";
|
|
46
46
|
import { default as Ve } from "./components/2_elements/ChatInfo/ChatInfo.vue.js";
|
|
47
47
|
import { default as Ue } from "./components/2_elements/ChatPanel/ChatPanel.vue.js";
|
|
48
48
|
import { default as He } from "./components/2_elements/ContactInfo/ContactInfo.vue.js";
|
|
49
|
-
import { default as
|
|
49
|
+
import { default as Oe } from "./components/2_elements/ThemeMode/ThemeMode.vue.js";
|
|
50
50
|
import { default as Qe } from "./components/2_elements/UserProfile/UserProfile.vue.js";
|
|
51
51
|
import { default as Xe } from "./components/2_elements/VideoRecorder/VideoRecorder.vue.js";
|
|
52
52
|
import { default as ze } from "./components/2_feed_elements/AudioMessage/AudioMessage.vue.js";
|
|
@@ -56,7 +56,7 @@ import { default as et } from "./components/2_feed_elements/CallMessage/CallMess
|
|
|
56
56
|
import { default as ot } from "./components/2_feed_elements/DateMessage/DateMessage.vue.js";
|
|
57
57
|
import { default as rt } from "./components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.js";
|
|
58
58
|
import { default as ft } from "./components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js";
|
|
59
|
-
import { default as
|
|
59
|
+
import { default as dt } from "./components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js";
|
|
60
60
|
import { default as mt } from "./components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue.js";
|
|
61
61
|
import { default as xt } from "./components/2_feed_elements/EditTextMessage/EditTextMessage.vue.js";
|
|
62
62
|
import { default as nt } from "./components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js";
|
|
@@ -68,12 +68,12 @@ import { default as It } from "./components/2_feed_elements/MessageStatusIndicat
|
|
|
68
68
|
import { default as Ft } from "./components/2_feed_elements/StickerMessage/StickerMessage.vue.js";
|
|
69
69
|
import { default as Bt } from "./components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js";
|
|
70
70
|
import { default as bt } from "./components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js";
|
|
71
|
-
import { default as
|
|
72
|
-
import { default as
|
|
71
|
+
import { default as vt } from "./components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js";
|
|
72
|
+
import { default as kt } from "./components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js";
|
|
73
73
|
import { default as Vt } from "./components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js";
|
|
74
74
|
import { default as Ut } from "./components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js";
|
|
75
75
|
import { default as Ht } from "./components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js";
|
|
76
|
-
import { default as
|
|
76
|
+
import { default as Ot } from "./components/2_feed_elements/SplashScreen/SplashScreen.vue.js";
|
|
77
77
|
import { default as Qt } from "./components/2_feed_elements/SystemMessage/SystemMessage.vue.js";
|
|
78
78
|
import { default as Xt } from "./components/2_feed_elements/TextMessage/TextMessage.vue.js";
|
|
79
79
|
import { default as zt } from "./components/2_feed_elements/TypingMessage/TypingMessage.vue.js";
|
|
@@ -94,12 +94,12 @@ import { default as To } from "./components/4_layouts/AdaptiveExtendedLayout/Ada
|
|
|
94
94
|
import { default as Ao } from "./components/4_layouts/FeedLayout/FeedLayout.vue.js";
|
|
95
95
|
import { default as Po } from "./components/4_layouts/ChatWrapper/ChatWrapper.vue.js";
|
|
96
96
|
import { default as Do } from "./components/5_containers/BaseContainer/BaseContainer.vue.js";
|
|
97
|
-
import { default as
|
|
98
|
-
import { buildFilePreview as
|
|
97
|
+
import { default as Eo } from "./components/5_containers/FloatContainer/FloatContainer.vue.js";
|
|
98
|
+
import { buildFilePreview as Lo, generatePreview as ko } from "./hooks/uploadFile/generatePreview.js";
|
|
99
99
|
import { getTypeFileByMime as Vo } from "./hooks/uploadFile/getTypeFileByMime.js";
|
|
100
100
|
import { uploadFile as Uo } from "./hooks/uploadFile/uploadFile.js";
|
|
101
101
|
import { useDelayDebouncedRef as Ho } from "./hooks/useDelayDebouncedRef.js";
|
|
102
|
-
import { useImmediateDebouncedRef as
|
|
102
|
+
import { useImmediateDebouncedRef as Oo } from "./hooks/useImmediateDebouncedRef.js";
|
|
103
103
|
import { MAX_ATTACHED_FILES as Qo, commitChatDraftToList as _o, getChatDraft as Xo, getDraftFiles as qo, useMessageDraft as zo } from "./hooks/useMessageDraft.js";
|
|
104
104
|
import { useSearchModel as Jo } from "./hooks/useSearchModel.js";
|
|
105
105
|
import { useTheme as Zo } from "./hooks/useTheme.js";
|
|
@@ -107,7 +107,7 @@ import { useEmojiNative as ea } from "./hooks/useEmojiNative.js";
|
|
|
107
107
|
import { useModalCreateChat as oa } from "./hooks/modals/useCreateChat.js";
|
|
108
108
|
import { useModalCreateChat2 as ra } from "./hooks/modals/useCreateChat2.js";
|
|
109
109
|
import { useModalCreateDialog as fa } from "./hooks/modals/useCreateDialog.js";
|
|
110
|
-
import { useConfirmDeleteMessage as
|
|
110
|
+
import { useConfirmDeleteMessage as da } from "./hooks/modals/useConfirmDeleteMessage.js";
|
|
111
111
|
import { useModalSelectUser2 as ma } from "./hooks/modals/useModalSelectUser2.js";
|
|
112
112
|
import { useModalVideoRecorder as xa } from "./hooks/modals/useVideoRecorder.js";
|
|
113
113
|
import { getValidationReport as na, validateChats as ca } from "./hooks/validators/chats/chatValidator.js";
|
|
@@ -117,32 +117,33 @@ import { useMessageValidator as Ra } from "./hooks/validators/messages/useMessag
|
|
|
117
117
|
import { getSidebarValidationReport as Ia, validateSidebarItems as Aa } from "./hooks/validators/sidebar/sidebarValidator.js";
|
|
118
118
|
import { useSidebarValidator as Pa } from "./hooks/validators/sidebar/useSidebarValidator.js";
|
|
119
119
|
import { useValidation as Da } from "./hooks/validators/useValidation.js";
|
|
120
|
-
import { useMessageActions as
|
|
121
|
-
import { calculateMessageMenuPosition as
|
|
120
|
+
import { useMessageActions as Ea } from "./hooks/messages/useMessageActions.js";
|
|
121
|
+
import { calculateMessageMenuPosition as La, findAppBoundsRect as ka } from "./hooks/messages/calculateMessageMenuPosition.js";
|
|
122
122
|
import { useMessageMenuActions as Va } from "./hooks/messages/useMessageMenuActions.js";
|
|
123
123
|
import { useMessageLinks as Ua } from "./hooks/messages/useMessageLinks.js";
|
|
124
124
|
import { useChannelAccentColor as Ha } from "./hooks/messages/useChannelAccentColor.js";
|
|
125
|
-
import { useSubtextTooltip as
|
|
125
|
+
import { useSubtextTooltip as Oa } from "./hooks/messages/useSubtextTooltip.js";
|
|
126
126
|
import { hideReplyPreview as Qa, showReplyPreview as _a, useStartReply as Xa } from "./hooks/messages/useStartReply.js";
|
|
127
127
|
import { hideEditPreview as za, showEditPreview as Ga, useStartEdit as Ja } from "./hooks/messages/useStartEdit.js";
|
|
128
|
-
import {
|
|
129
|
-
import {
|
|
130
|
-
import {
|
|
131
|
-
import {
|
|
132
|
-
import {
|
|
133
|
-
import {
|
|
134
|
-
import {
|
|
135
|
-
import {
|
|
136
|
-
import {
|
|
137
|
-
import {
|
|
138
|
-
import {
|
|
139
|
-
import {
|
|
140
|
-
import {
|
|
141
|
-
import {
|
|
128
|
+
import { canStartEditLastSent as Za, isCursorOnFirstLine as $a, isEditableLastSentCandidate as er } from "./hooks/messages/canStartEditLastSent.js";
|
|
129
|
+
import { buildReplyPayload as or } from "./hooks/messages/buildReplyPayload.js";
|
|
130
|
+
import { buildEditPayload as rr } from "./hooks/messages/buildEditPayload.js";
|
|
131
|
+
import { getEditTooltipLines as fr } from "./hooks/messages/getEditTooltipLines.js";
|
|
132
|
+
import { getDeletedOriginalText as dr, getDeletedTooltipLines as pr } from "./hooks/messages/getDeletedOriginalText.js";
|
|
133
|
+
import { getStatus as ur, getStatusTitle as xr, statuses as ir } from "./functions/getStatusMessage.js";
|
|
134
|
+
import { formatTimestamp as cr } from "./functions/formatTimestamp.js";
|
|
135
|
+
import { playNotificationAudio as gr } from "./functions/playNotificationAudio.js";
|
|
136
|
+
import { insertDaySeparators as Sr } from "./functions/insertDaySeparators.js";
|
|
137
|
+
import { sortByTimestamp as yr } from "./functions/sortByTimestamp.js";
|
|
138
|
+
import { getMessageClass as Tr } from "./functions/getMessageClass.js";
|
|
139
|
+
import { createReactionHandlers as Ar } from "./functions/createReactionHandlers.js";
|
|
140
|
+
import { getChannelAccentColor as Pr } from "./functions/getChannelAccentColor.js";
|
|
141
|
+
import { parseMarkdown as Dr } from "./functions/parseMarkdown.js";
|
|
142
|
+
import { safeMediaPlay as Er, safeMediaPlayVoid as vr } from "./functions/safeMediaPlay.js";
|
|
142
143
|
export {
|
|
143
144
|
To as AdaptiveExtendedLayout,
|
|
144
145
|
ze as AudioMessage,
|
|
145
|
-
|
|
146
|
+
ve as AudioRecorder,
|
|
146
147
|
M as AvatarIcon,
|
|
147
148
|
Do as BaseContainer,
|
|
148
149
|
Ze as BaseEditMessage,
|
|
@@ -154,7 +155,7 @@ export {
|
|
|
154
155
|
oe as ButtonTemplateSelector,
|
|
155
156
|
re as ButtonWabaTemplateSelector,
|
|
156
157
|
et as CallMessage,
|
|
157
|
-
|
|
158
|
+
ke as ChannelSelector,
|
|
158
159
|
Fe as ChatFilter,
|
|
159
160
|
Ve as ChatInfo,
|
|
160
161
|
po as ChatInput,
|
|
@@ -171,14 +172,14 @@ export {
|
|
|
171
172
|
R as ContactCRMIcon,
|
|
172
173
|
f as ContactContextMenu,
|
|
173
174
|
He as ContactInfo,
|
|
174
|
-
|
|
175
|
+
d as ContextMenu,
|
|
175
176
|
ot as DateMessage,
|
|
176
|
-
|
|
177
|
+
dt as DateMessageSticky,
|
|
177
178
|
rt as DeletedMessageContent,
|
|
178
179
|
mt as DelimiterMessage,
|
|
179
180
|
xt as EditTextMessage,
|
|
180
181
|
m as EmbedPreview,
|
|
181
|
-
|
|
182
|
+
k as ErrorStatusIcon,
|
|
182
183
|
yo as ExtendedLayout,
|
|
183
184
|
co as Feed,
|
|
184
185
|
X as FeedFoundItem,
|
|
@@ -188,8 +189,8 @@ export {
|
|
|
188
189
|
J as FeedSearch,
|
|
189
190
|
Mt as FileMessage,
|
|
190
191
|
fe as FilePreview,
|
|
191
|
-
|
|
192
|
-
|
|
192
|
+
de as FileUploader,
|
|
193
|
+
Eo as FloatContainer,
|
|
193
194
|
Ct as ImageMessage,
|
|
194
195
|
x as LinkPreview,
|
|
195
196
|
Qo as MAX_ATTACHED_FILES,
|
|
@@ -207,17 +208,17 @@ export {
|
|
|
207
208
|
H as ReceivedStatusIcon,
|
|
208
209
|
Bt as ReplyAudioMessage,
|
|
209
210
|
bt as ReplyCallMessage,
|
|
210
|
-
|
|
211
|
-
|
|
211
|
+
vt as ReplyFileMessage,
|
|
212
|
+
kt as ReplyImageMessage,
|
|
212
213
|
Vt as ReplyStickerMessage,
|
|
213
214
|
Ut as ReplyTextMessage,
|
|
214
215
|
Ht as ReplyVideoMessage,
|
|
215
216
|
F as SearchIcon,
|
|
216
217
|
fo as SelectUser,
|
|
217
|
-
|
|
218
|
+
O as SentStatusIcon,
|
|
218
219
|
B as SettingsIcon,
|
|
219
220
|
go as SideBar,
|
|
220
|
-
|
|
221
|
+
Ot as SplashScreen,
|
|
221
222
|
Ft as StickerMessage,
|
|
222
223
|
xe as StickerPicker,
|
|
223
224
|
Qt as SystemMessage,
|
|
@@ -225,7 +226,7 @@ export {
|
|
|
225
226
|
ne as TemplateSelector,
|
|
226
227
|
Me as TextFormatToolbar,
|
|
227
228
|
Xt as TextMessage,
|
|
228
|
-
|
|
229
|
+
Oe as ThemeMode,
|
|
229
230
|
n as Tooltip,
|
|
230
231
|
zt as TypingMessage,
|
|
231
232
|
Qe as UserProfile,
|
|
@@ -235,48 +236,51 @@ export {
|
|
|
235
236
|
he as WABAQuickReplyButtons,
|
|
236
237
|
Re as WABASeparatedQuickButtons,
|
|
237
238
|
Ie as WABATemplateSelector,
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
239
|
+
v as WhatsAppIcon,
|
|
240
|
+
rr as buildEditPayload,
|
|
241
|
+
Lo as buildFilePreview,
|
|
242
|
+
or as buildReplyPayload,
|
|
243
|
+
La as calculateMessageMenuPosition,
|
|
244
|
+
Za as canStartEditLastSent,
|
|
243
245
|
_o as commitChatDraftToList,
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
246
|
+
Ar as createReactionHandlers,
|
|
247
|
+
ka as findAppBoundsRect,
|
|
248
|
+
cr as formatTimestamp,
|
|
249
|
+
ko as generatePreview,
|
|
250
|
+
Pr as getChannelAccentColor,
|
|
249
251
|
Xo as getChatDraft,
|
|
250
|
-
|
|
251
|
-
|
|
252
|
+
dr as getDeletedOriginalText,
|
|
253
|
+
pr as getDeletedTooltipLines,
|
|
252
254
|
qo as getDraftFiles,
|
|
253
|
-
|
|
254
|
-
|
|
255
|
+
fr as getEditTooltipLines,
|
|
256
|
+
Tr as getMessageClass,
|
|
255
257
|
Sa as getMessageValidationReport,
|
|
256
258
|
Ia as getSidebarValidationReport,
|
|
257
|
-
|
|
258
|
-
|
|
259
|
+
ur as getStatus,
|
|
260
|
+
xr as getStatusTitle,
|
|
259
261
|
Vo as getTypeFileByMime,
|
|
260
262
|
na as getValidationReport,
|
|
261
263
|
za as hideEditPreview,
|
|
262
264
|
Qa as hideReplyPreview,
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
265
|
+
Sr as insertDaySeparators,
|
|
266
|
+
$a as isCursorOnFirstLine,
|
|
267
|
+
er as isEditableLastSentCandidate,
|
|
268
|
+
Dr as parseMarkdown,
|
|
269
|
+
gr as playNotificationAudio,
|
|
270
|
+
Er as safeMediaPlay,
|
|
271
|
+
vr as safeMediaPlayVoid,
|
|
268
272
|
Ga as showEditPreview,
|
|
269
273
|
_a as showReplyPreview,
|
|
270
|
-
|
|
271
|
-
|
|
274
|
+
yr as sortByTimestamp,
|
|
275
|
+
ir as statuses,
|
|
272
276
|
Uo as uploadFile,
|
|
273
277
|
Ha as useChannelAccentColor,
|
|
274
278
|
ga as useChatValidator,
|
|
275
|
-
|
|
279
|
+
da as useConfirmDeleteMessage,
|
|
276
280
|
Ho as useDelayDebouncedRef,
|
|
277
281
|
ea as useEmojiNative,
|
|
278
|
-
|
|
279
|
-
|
|
282
|
+
Oo as useImmediateDebouncedRef,
|
|
283
|
+
Ea as useMessageActions,
|
|
280
284
|
zo as useMessageDraft,
|
|
281
285
|
Ua as useMessageLinks,
|
|
282
286
|
Va as useMessageMenuActions,
|
|
@@ -290,7 +294,7 @@ export {
|
|
|
290
294
|
Pa as useSidebarValidator,
|
|
291
295
|
Ja as useStartEdit,
|
|
292
296
|
Xa as useStartReply,
|
|
293
|
-
|
|
297
|
+
Oa as useSubtextTooltip,
|
|
294
298
|
Zo as useTheme,
|
|
295
299
|
Da as useValidation,
|
|
296
300
|
ca as validateChats,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { ResolveEditLastSentMessage } from '@/hooks';
|
|
1
3
|
declare var __VLS_16: {}, __VLS_29: {};
|
|
2
4
|
type __VLS_Slots = {} & {
|
|
3
5
|
'inline-buttons'?: (props: typeof __VLS_16) => any;
|
|
@@ -34,6 +36,11 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
34
36
|
required: false;
|
|
35
37
|
default: number;
|
|
36
38
|
};
|
|
39
|
+
resolveEditLastSentMessage: {
|
|
40
|
+
type: PropType<ResolveEditLastSentMessage>;
|
|
41
|
+
required: false;
|
|
42
|
+
default: null;
|
|
43
|
+
};
|
|
37
44
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
38
45
|
typing: (...args: any[]) => void;
|
|
39
46
|
send: (...args: any[]) => void;
|
|
@@ -67,6 +74,11 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
67
74
|
required: false;
|
|
68
75
|
default: number;
|
|
69
76
|
};
|
|
77
|
+
resolveEditLastSentMessage: {
|
|
78
|
+
type: PropType<ResolveEditLastSentMessage>;
|
|
79
|
+
required: false;
|
|
80
|
+
default: null;
|
|
81
|
+
};
|
|
70
82
|
}>> & Readonly<{
|
|
71
83
|
onTyping?: ((...args: any[]) => any) | undefined;
|
|
72
84
|
onSend?: ((...args: any[]) => any) | undefined;
|
|
@@ -77,6 +89,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
77
89
|
focusOnInputArea: boolean;
|
|
78
90
|
disabledPlaceholder: string;
|
|
79
91
|
inputButtonColor: string;
|
|
92
|
+
resolveEditLastSentMessage: ResolveEditLastSentMessage;
|
|
80
93
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
81
94
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
82
95
|
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { EditMessageSource } from './buildEditPayload';
|
|
2
|
+
export type ResolveEditLastSentMessage = () => (EditMessageSource & {
|
|
3
|
+
canEdit?: boolean;
|
|
4
|
+
deleted?: boolean;
|
|
5
|
+
}) | null | undefined;
|
|
6
|
+
export declare function isCursorOnFirstLine(text: string, selectionStart: number): boolean;
|
|
7
|
+
export declare function canStartEditLastSent(options: {
|
|
8
|
+
key: string;
|
|
9
|
+
altKey?: boolean;
|
|
10
|
+
metaKey?: boolean;
|
|
11
|
+
ctrlKey?: boolean;
|
|
12
|
+
shiftKey?: boolean;
|
|
13
|
+
hasResolver: boolean;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
isRecording: boolean;
|
|
16
|
+
draftText: string;
|
|
17
|
+
replyMessageId?: string | number | null;
|
|
18
|
+
editMessageId?: string | number | null;
|
|
19
|
+
textareaText: string;
|
|
20
|
+
selectionStart: number;
|
|
21
|
+
}): boolean;
|
|
22
|
+
export declare function isEditableLastSentCandidate(message: ReturnType<ResolveEditLastSentMessage>): message is EditMessageSource;
|
|
@@ -6,6 +6,7 @@ export * from './useChannelAccentColor';
|
|
|
6
6
|
export * from './useSubtextTooltip';
|
|
7
7
|
export * from './useStartReply';
|
|
8
8
|
export * from './useStartEdit';
|
|
9
|
+
export * from './canStartEditLastSent';
|
|
9
10
|
export * from './buildReplyPayload';
|
|
10
11
|
export * from './buildEditPayload';
|
|
11
12
|
export * from './getEditTooltipLines';
|