@deep-eye/core 1.2.9 → 1.2.11
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/CHANGELOG.md +24 -0
- package/dist/components/chat/ChatBot.vue.d.ts +84 -1
- package/dist/components/chat/ChatBot.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatActionbar.vue.d.ts +2 -0
- package/dist/components/chat/components/ChatActionbar.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatFollowUps.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatMessage.vue.d.ts +11 -0
- package/dist/components/chat/components/ChatMessage.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatReasoning.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatSender.vue.d.ts +68 -21
- package/dist/components/chat/components/ChatSender.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ConversationList.vue.d.ts +11 -0
- package/dist/components/chat/components/ConversationList.vue.d.ts.map +1 -1
- package/dist/components/chat/components/MessageBubble.vue.d.ts +11 -0
- package/dist/components/chat/components/MessageBubble.vue.d.ts.map +1 -1
- package/dist/components/chat/mdoc/sanitize.d.ts.map +1 -1
- package/dist/components/chat/mdoc/tableStreaming.d.ts +1 -3
- package/dist/components/chat/mdoc/tableStreaming.d.ts.map +1 -1
- package/dist/components/chat/mentionEditor.d.ts +79 -0
- package/dist/components/chat/mentionEditor.d.ts.map +1 -0
- package/dist/components/chat/types.d.ts +38 -7
- package/dist/components/chat/types.d.ts.map +1 -1
- package/dist/index.cjs +79 -75
- package/dist/index.js +9927 -9378
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
`@deep-eye/core` 的用户可见变更(语义化版本)。
|
|
4
4
|
|
|
5
|
+
## [1.2.11] - 2026-08-03
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `ChatSender` / `ChatBot` 支持 `@` 提及(`triggers`、`#trigger-menu`、`mention-*` / `trigger-*` 事件):输入区改为 contenteditable,选中后插入原子 chip;前后自动补空格;插入/删除走浏览器撤销栈,一次撤回会连同触发的 `@` 一起去掉。
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- 提及 chip 默认文字色改为 `#6366f1`(可用 `--chat-sender-mention-color` 覆盖)。
|
|
14
|
+
- 移除 `.chat-sender__editor` 内边距,由外层布局控制间距。
|
|
15
|
+
|
|
16
|
+
## [1.2.10] - 2026-08-03
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- 思考过程默认展开显示。
|
|
21
|
+
- `ChatActionbar` 内置复制按钮改为 slot-with-fallback:提供 `#actionbar`/`ChatActionbar` 默认插槽时完全替换内置按钮(不再是"追加"),并通过插槽 props 暴露 `copyFailed`、`copy()`,方便消费端复用内置剪贴板逻辑。`ChatMessage`/`MessageBubble`/`ConversationList`/`ChatBot` 对应插槽类型同步更新。
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- 移除表格流式输出时的骨架占位动画,流式渲染直接展示已有表格内容。
|
|
26
|
+
- 修复表格列对齐(`:---:`/`---:`)被丢弃的问题:根因是 `sanitizeHtml`(DOMPurify)的 `ALLOWED_ATTR` 白名单未包含 `align`,md4x 输出的对齐属性在 sanitize 阶段被整体剥离;同时补充 `prose.css` 里 `[align="center"]`/`[align="right"]` 规则,避免未来被更高优先级的 class 选择器覆盖。
|
|
27
|
+
- `ChatBot` 补齐对内置 `ChatSender` 独有事件的转发(`menu-item-click`、`quick-action-select`、`quick-action-clear`、`update:activeQuickAction`、`screenshot`、`attachment-menu-open`/`attachment-menu-close`、`attachment-error`、`voice-*`、`audio-*`):此前直接使用 `ChatBot` + `senderConfig` 的消费端完全收不到这些事件,只能监听在从未渲染过的裸标签上。
|
|
28
|
+
|
|
5
29
|
## [1.2.9] - 2026-08-03
|
|
6
30
|
|
|
7
31
|
### Fixed
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { type ClassifiedChatError } from './chatErrors';
|
|
2
|
-
import type { ChatActionbarCopyPayload, ChatBotExpose, ChatBotProps, ChatMessageProps, ChatComposerAttachment, ChatQueueItem, ChatResourceFile, ChatSendPayload, ChatToolActionPayload, ConversationMessage, ConversationStreamStatus, ConversationToolCall, ConversationUiAction, ResponseStreamEvent, ResponseSseFrame } from './types';
|
|
2
|
+
import type { ChatActionbarCopyPayload, ChatAttachmentError, ChatBotExpose, ChatBotProps, ChatMessageProps, ChatComposerAttachment, ChatQueueItem, ChatResourceFile, ChatSendPayload, ChatSenderQuickAction, ChatToolActionPayload, ConversationMessage, ConversationStreamStatus, ConversationToolCall, ConversationUiAction, ResponseStreamEvent, ResponseSseFrame } from './types';
|
|
3
|
+
interface ChatBotTriggerMenuSlotProps {
|
|
4
|
+
triggerId: string;
|
|
5
|
+
query: string;
|
|
6
|
+
select: (payload: {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}) => void;
|
|
10
|
+
close: () => void;
|
|
11
|
+
anchorRect: DOMRect | null;
|
|
12
|
+
}
|
|
3
13
|
type __VLS_Slots = {
|
|
4
14
|
sidebar?: (props: {
|
|
5
15
|
artifact: ConversationUiAction | null;
|
|
@@ -22,6 +32,8 @@ type __VLS_Slots = {
|
|
|
22
32
|
'assistant-actionbar'?: (props: {
|
|
23
33
|
message: unknown;
|
|
24
34
|
copied: boolean;
|
|
35
|
+
copyFailed: boolean;
|
|
36
|
+
copy: () => Promise<void>;
|
|
25
37
|
}) => unknown;
|
|
26
38
|
tool?: (props: {
|
|
27
39
|
toolCall: ConversationToolCall;
|
|
@@ -31,6 +43,7 @@ type __VLS_Slots = {
|
|
|
31
43
|
'file-preview'?: (props: {
|
|
32
44
|
resource: ChatResourceFile;
|
|
33
45
|
}) => unknown;
|
|
46
|
+
'trigger-menu'?: (props: ChatBotTriggerMenuSlotProps) => unknown;
|
|
34
47
|
};
|
|
35
48
|
declare const __VLS_base: import("vue").DefineComponent<ChatBotProps, ChatBotExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
49
|
stop: () => any;
|
|
@@ -40,6 +53,41 @@ declare const __VLS_base: import("vue").DefineComponent<ChatBotProps, ChatBotExp
|
|
|
40
53
|
send: (payload: ChatSendPayload) => any;
|
|
41
54
|
"update:draft": (draft: string) => any;
|
|
42
55
|
"update:attachments": (attachments: readonly ChatComposerAttachment[]) => any;
|
|
56
|
+
"attachment-error": (error: ChatAttachmentError, file?: File | undefined) => any;
|
|
57
|
+
"voice-click": () => any;
|
|
58
|
+
"voice-record": () => any;
|
|
59
|
+
"voice-start": () => any;
|
|
60
|
+
"voice-stop": () => any;
|
|
61
|
+
"voice-cancel": () => any;
|
|
62
|
+
"audio-device-change": (deviceIndex: number) => any;
|
|
63
|
+
"audio-transcript": (text: string) => any;
|
|
64
|
+
screenshot: () => any;
|
|
65
|
+
"menu-item-click": (itemId: string) => any;
|
|
66
|
+
"attachment-menu-open": () => any;
|
|
67
|
+
"attachment-menu-close": () => any;
|
|
68
|
+
"update:activeQuickAction": (id: string | null) => any;
|
|
69
|
+
"quick-action-select": (action: ChatSenderQuickAction) => any;
|
|
70
|
+
"quick-action-clear": () => any;
|
|
71
|
+
"trigger-open": (payload: {
|
|
72
|
+
triggerId: string;
|
|
73
|
+
}) => any;
|
|
74
|
+
"trigger-query": (payload: {
|
|
75
|
+
triggerId: string;
|
|
76
|
+
query: string;
|
|
77
|
+
}) => any;
|
|
78
|
+
"trigger-close": (payload: {
|
|
79
|
+
triggerId: string;
|
|
80
|
+
}) => any;
|
|
81
|
+
"mention-insert": (payload: {
|
|
82
|
+
triggerId: string;
|
|
83
|
+
id: string;
|
|
84
|
+
label: string;
|
|
85
|
+
}) => any;
|
|
86
|
+
"mention-remove": (payload: {
|
|
87
|
+
triggerId: string;
|
|
88
|
+
id: string;
|
|
89
|
+
label: string;
|
|
90
|
+
}) => any;
|
|
43
91
|
retry: (payload: ChatSendPayload | null, error: Error) => any;
|
|
44
92
|
"update:messages": (messages: ConversationMessage[]) => any;
|
|
45
93
|
"update:queue": (queue: readonly ChatQueueItem[]) => any;
|
|
@@ -55,6 +103,41 @@ declare const __VLS_base: import("vue").DefineComponent<ChatBotProps, ChatBotExp
|
|
|
55
103
|
onSend?: ((payload: ChatSendPayload) => any) | undefined;
|
|
56
104
|
"onUpdate:draft"?: ((draft: string) => any) | undefined;
|
|
57
105
|
"onUpdate:attachments"?: ((attachments: readonly ChatComposerAttachment[]) => any) | undefined;
|
|
106
|
+
"onAttachment-error"?: ((error: ChatAttachmentError, file?: File | undefined) => any) | undefined;
|
|
107
|
+
"onVoice-click"?: (() => any) | undefined;
|
|
108
|
+
"onVoice-record"?: (() => any) | undefined;
|
|
109
|
+
"onVoice-start"?: (() => any) | undefined;
|
|
110
|
+
"onVoice-stop"?: (() => any) | undefined;
|
|
111
|
+
"onVoice-cancel"?: (() => any) | undefined;
|
|
112
|
+
"onAudio-device-change"?: ((deviceIndex: number) => any) | undefined;
|
|
113
|
+
"onAudio-transcript"?: ((text: string) => any) | undefined;
|
|
114
|
+
onScreenshot?: (() => any) | undefined;
|
|
115
|
+
"onMenu-item-click"?: ((itemId: string) => any) | undefined;
|
|
116
|
+
"onAttachment-menu-open"?: (() => any) | undefined;
|
|
117
|
+
"onAttachment-menu-close"?: (() => any) | undefined;
|
|
118
|
+
"onUpdate:activeQuickAction"?: ((id: string | null) => any) | undefined;
|
|
119
|
+
"onQuick-action-select"?: ((action: ChatSenderQuickAction) => any) | undefined;
|
|
120
|
+
"onQuick-action-clear"?: (() => any) | undefined;
|
|
121
|
+
"onTrigger-open"?: ((payload: {
|
|
122
|
+
triggerId: string;
|
|
123
|
+
}) => any) | undefined;
|
|
124
|
+
"onTrigger-query"?: ((payload: {
|
|
125
|
+
triggerId: string;
|
|
126
|
+
query: string;
|
|
127
|
+
}) => any) | undefined;
|
|
128
|
+
"onTrigger-close"?: ((payload: {
|
|
129
|
+
triggerId: string;
|
|
130
|
+
}) => any) | undefined;
|
|
131
|
+
"onMention-insert"?: ((payload: {
|
|
132
|
+
triggerId: string;
|
|
133
|
+
id: string;
|
|
134
|
+
label: string;
|
|
135
|
+
}) => any) | undefined;
|
|
136
|
+
"onMention-remove"?: ((payload: {
|
|
137
|
+
triggerId: string;
|
|
138
|
+
id: string;
|
|
139
|
+
label: string;
|
|
140
|
+
}) => any) | undefined;
|
|
58
141
|
onRetry?: ((payload: ChatSendPayload | null, error: Error) => any) | undefined;
|
|
59
142
|
"onUpdate:messages"?: ((messages: ConversationMessage[]) => any) | undefined;
|
|
60
143
|
"onUpdate:queue"?: ((queue: readonly ChatQueueItem[]) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatBot.vue.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatBot.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChatBot.vue.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatBot.vue"],"names":[],"mappings":"AA65BA,OAAO,EAAqB,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAC1E,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EAEnB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EAErB,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EAEpB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAEhB,UAAU,2BAA2B;IACnC,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,CAAC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IACxD,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;QAAE,QAAQ,EAAE,gBAAgB,CAAA;KAAE,KAAK,OAAO,CAAA;IACnE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,2BAA2B,KAAK,OAAO,CAAA;CACjE,CAAC;AAy9BF,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;mBAn7ByB,MAAM;;;mBACL,MAAM;eAAS,MAAM;;;mBACrB,MAAM;;;mBACL,MAAM;YAAM,MAAM;eAAS,MAAM;;;mBACjC,MAAM;YAAM,MAAM;eAAS,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAJnC,MAAM;;;mBACL,MAAM;eAAS,MAAM;;;mBACrB,MAAM;;;mBACL,MAAM;YAAM,MAAM;eAAS,MAAM;;;mBACjC,MAAM;YAAM,MAAM;eAAS,MAAM;;;;;;;;;;;;;;;6EAo7B1E,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -8,6 +8,8 @@ type __VLS_Slots = {
|
|
|
8
8
|
default?: (props: {
|
|
9
9
|
message: AssistantMessage;
|
|
10
10
|
copied: boolean;
|
|
11
|
+
copyFailed: boolean;
|
|
12
|
+
copy: () => Promise<void>;
|
|
11
13
|
}) => unknown;
|
|
12
14
|
};
|
|
13
15
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatActionbar.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/components/ChatActionbar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChatActionbar.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/components/ChatActionbar.vue"],"names":[],"mappings":"AAwMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAA;AAI1E,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,gBAAgB,CAAA;IACzB,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC;AAGF,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAChB,OAAO,EAAE,gBAAgB,CAAA;QACzB,MAAM,EAAE,OAAO,CAAA;QACf,UAAU,EAAE,OAAO,CAAA;QACnB,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;KAC1B,KAAK,OAAO,CAAA;CACd,CAAC;AA6MF,QAAA,MAAM,UAAU;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatFollowUps.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/components/ChatFollowUps.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChatFollowUps.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/components/ChatFollowUps.vue"],"names":[],"mappings":"AAuIA,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;CAC7B,CAAC;AAuGF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -11,6 +11,8 @@ type __VLS_Slots = {
|
|
|
11
11
|
actionbar?: (props: {
|
|
12
12
|
message: ConversationMessage;
|
|
13
13
|
copied: boolean;
|
|
14
|
+
copyFailed: boolean;
|
|
15
|
+
copy: () => Promise<void>;
|
|
14
16
|
}) => unknown;
|
|
15
17
|
tool?: (props: {
|
|
16
18
|
toolCall: ConversationToolCall;
|
|
@@ -47,6 +49,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
47
49
|
type: PropType<ChatToolStates>;
|
|
48
50
|
default: () => {};
|
|
49
51
|
};
|
|
52
|
+
followUps: {
|
|
53
|
+
type: PropType<string[]>;
|
|
54
|
+
default: undefined;
|
|
55
|
+
};
|
|
50
56
|
showFollowUps: {
|
|
51
57
|
type: BooleanConstructor;
|
|
52
58
|
default: boolean;
|
|
@@ -85,6 +91,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
85
91
|
type: PropType<ChatToolStates>;
|
|
86
92
|
default: () => {};
|
|
87
93
|
};
|
|
94
|
+
followUps: {
|
|
95
|
+
type: PropType<string[]>;
|
|
96
|
+
default: undefined;
|
|
97
|
+
};
|
|
88
98
|
showFollowUps: {
|
|
89
99
|
type: BooleanConstructor;
|
|
90
100
|
default: boolean;
|
|
@@ -101,6 +111,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
101
111
|
toolStates: Readonly<Record<string, import("../types").ChatToolState>>;
|
|
102
112
|
userAvatar: string;
|
|
103
113
|
assistantAvatar: string;
|
|
114
|
+
followUps: string[];
|
|
104
115
|
showFollowUps: boolean;
|
|
105
116
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
106
117
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatMessage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/components/ChatMessage.vue"],"names":[],"mappings":"
|
|
1
|
+
{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B,QAAQ,CAAC,mBAAmB,CAAC;;;;;;;;cAQ9B,QAAQ,CAAC,SAAS,WAAW,EAAE,CAAC;;;;cAI/B,QAAQ,CAAC,iBAAiB,CAAC;;;;;;;;;;;;cAY3B,QAAQ,CAAC,cAAc,CAAC;;;;cAIzB,QAAQ,CAAC,MAAM,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;4EAQnC,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatReasoning.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/components/ChatReasoning.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChatReasoning.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/components/ChatReasoning.vue"],"names":[],"mappings":"AA0VA,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AA0O5D,QAAA,IAAI,QAAQ;;;CAAY,CAAE;AAC1B,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAQhD,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import type { ChatAttachmentError, ChatAttachmentLimits,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1
|
+
import type { ChatAttachmentError, ChatAttachmentLimits, ChatComposerAttachment, ChatSendPayload, ChatSenderProps, ChatSenderQuickAction, ChatSenderTrigger, ChatUploadConfig } from '../types';
|
|
2
|
+
declare function handleMentionMenuClose(): void;
|
|
3
|
+
declare function handleMentionSelect(payload: {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}): void;
|
|
7
|
+
declare var __VLS_28: {
|
|
8
|
+
triggerId: string;
|
|
9
|
+
query: string;
|
|
10
|
+
select: typeof handleMentionSelect;
|
|
11
|
+
close: typeof handleMentionMenuClose;
|
|
12
|
+
anchorRect: DOMRect | null;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
'trigger-menu'?: (props: typeof __VLS_28) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<ChatSenderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
18
|
stop: () => any;
|
|
20
19
|
send: (payload: ChatSendPayload) => any;
|
|
21
20
|
"update:draft": (value: string) => any;
|
|
@@ -35,7 +34,27 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
|
|
|
35
34
|
"update:activeQuickAction": (id: string | null) => any;
|
|
36
35
|
"quick-action-select": (action: ChatSenderQuickAction) => any;
|
|
37
36
|
"quick-action-clear": () => any;
|
|
38
|
-
|
|
37
|
+
"trigger-open": (payload: {
|
|
38
|
+
triggerId: string;
|
|
39
|
+
}) => any;
|
|
40
|
+
"trigger-query": (payload: {
|
|
41
|
+
triggerId: string;
|
|
42
|
+
query: string;
|
|
43
|
+
}) => any;
|
|
44
|
+
"trigger-close": (payload: {
|
|
45
|
+
triggerId: string;
|
|
46
|
+
}) => any;
|
|
47
|
+
"mention-insert": (payload: {
|
|
48
|
+
triggerId: string;
|
|
49
|
+
id: string;
|
|
50
|
+
label: string;
|
|
51
|
+
}) => any;
|
|
52
|
+
"mention-remove": (payload: {
|
|
53
|
+
triggerId: string;
|
|
54
|
+
id: string;
|
|
55
|
+
label: string;
|
|
56
|
+
}) => any;
|
|
57
|
+
}, string, import("vue").PublicProps, Readonly<ChatSenderProps> & Readonly<{
|
|
39
58
|
onStop?: (() => any) | undefined;
|
|
40
59
|
onSend?: ((payload: ChatSendPayload) => any) | undefined;
|
|
41
60
|
"onUpdate:draft"?: ((value: string) => any) | undefined;
|
|
@@ -55,8 +74,28 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
|
|
|
55
74
|
"onUpdate:activeQuickAction"?: ((id: string | null) => any) | undefined;
|
|
56
75
|
"onQuick-action-select"?: ((action: ChatSenderQuickAction) => any) | undefined;
|
|
57
76
|
"onQuick-action-clear"?: (() => any) | undefined;
|
|
77
|
+
"onTrigger-open"?: ((payload: {
|
|
78
|
+
triggerId: string;
|
|
79
|
+
}) => any) | undefined;
|
|
80
|
+
"onTrigger-query"?: ((payload: {
|
|
81
|
+
triggerId: string;
|
|
82
|
+
query: string;
|
|
83
|
+
}) => any) | undefined;
|
|
84
|
+
"onTrigger-close"?: ((payload: {
|
|
85
|
+
triggerId: string;
|
|
86
|
+
}) => any) | undefined;
|
|
87
|
+
"onMention-insert"?: ((payload: {
|
|
88
|
+
triggerId: string;
|
|
89
|
+
id: string;
|
|
90
|
+
label: string;
|
|
91
|
+
}) => any) | undefined;
|
|
92
|
+
"onMention-remove"?: ((payload: {
|
|
93
|
+
triggerId: string;
|
|
94
|
+
id: string;
|
|
95
|
+
label: string;
|
|
96
|
+
}) => any) | undefined;
|
|
58
97
|
}>, {
|
|
59
|
-
theme: ChatTheme;
|
|
98
|
+
theme: import("..").ChatTheme;
|
|
60
99
|
disabled: boolean;
|
|
61
100
|
placeholder: string;
|
|
62
101
|
showAttachment: boolean;
|
|
@@ -66,10 +105,18 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
|
|
|
66
105
|
uploadConfig: ChatUploadConfig;
|
|
67
106
|
attachmentLimits: Partial<ChatAttachmentLimits>;
|
|
68
107
|
showScreenshot: boolean;
|
|
69
|
-
customMenuItems: readonly ChatAttachmentMenuItem[];
|
|
108
|
+
customMenuItems: readonly import("..").ChatAttachmentMenuItem[];
|
|
70
109
|
quickActions: readonly ChatSenderQuickAction[];
|
|
71
110
|
activeQuickAction: string | null;
|
|
111
|
+
triggers: readonly ChatSenderTrigger[];
|
|
112
|
+
triggerMenuPlacement: "caret" | "custom";
|
|
72
113
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
114
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
73
115
|
declare const _default: typeof __VLS_export;
|
|
74
116
|
export default _default;
|
|
117
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
118
|
+
new (): {
|
|
119
|
+
$slots: S;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
75
122
|
//# sourceMappingURL=ChatSender.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatSender.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/components/ChatSender.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChatSender.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/components/ChatSender.vue"],"names":[],"mappings":"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
18
|
+
copyFailed: boolean;
|
|
19
|
+
copy: () => Promise<void>;
|
|
18
20
|
}) => unknown;
|
|
19
21
|
tool?: (props: {
|
|
20
22
|
toolCall: ConversationToolCall;
|
|
@@ -59,6 +61,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
59
61
|
type: PropType<ChatToolStates>;
|
|
60
62
|
default: () => {};
|
|
61
63
|
};
|
|
64
|
+
followUps: {
|
|
65
|
+
type: PropType<string[]>;
|
|
66
|
+
default: undefined;
|
|
67
|
+
};
|
|
62
68
|
}>, ConversationListExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
63
69
|
copy: (payload: ChatActionbarCopyPayload) => any;
|
|
64
70
|
action: (payload: ConversationUiAction) => any;
|
|
@@ -102,6 +108,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
102
108
|
type: PropType<ChatToolStates>;
|
|
103
109
|
default: () => {};
|
|
104
110
|
};
|
|
111
|
+
followUps: {
|
|
112
|
+
type: PropType<string[]>;
|
|
113
|
+
default: undefined;
|
|
114
|
+
};
|
|
105
115
|
}>> & Readonly<{
|
|
106
116
|
onCopy?: ((payload: ChatActionbarCopyPayload) => any) | undefined;
|
|
107
117
|
onAction?: ((payload: ConversationUiAction) => any) | undefined;
|
|
@@ -115,6 +125,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
115
125
|
toolStates: Readonly<Record<string, import("../types").ChatToolState>>;
|
|
116
126
|
userAvatar: string;
|
|
117
127
|
assistantAvatar: string;
|
|
128
|
+
followUps: string[];
|
|
118
129
|
autoScroll: AutoScrollMode;
|
|
119
130
|
responseError: Error;
|
|
120
131
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/components/ConversationList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConversationList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/components/ConversationList.vue"],"names":[],"mappings":"AAs5BA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAMnC,OAAO,KAAK,EACV,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,cAAc,EAEd,sBAAsB,EACtB,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACZ,MAAM,UAAU,CAAA;AAkDjB,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAChB,OAAO,EAAE,mBAAmB,CAAA;QAC5B,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,OAAO,CAAA;QACf,YAAY,EAAE,gBAAgB,CAAA;KAC/B,KAAK,OAAO,CAAA;IACb,aAAa,CAAC,EAAE,MAAM,OAAO,CAAA;IAC7B,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAA;IAClC,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE;QAC9B,OAAO,EAAE,mBAAmB,CAAA;QAC5B,MAAM,EAAE,OAAO,CAAA;QACf,UAAU,EAAE,OAAO,CAAA;QACnB,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;KAC1B,KAAK,OAAO,CAAA;IACb,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;QACb,QAAQ,EAAE,oBAAoB,CAAA;QAC9B,WAAW,CAAC,EAAE,WAAW,CAAA;QACzB,SAAS,EAAE,OAAO,CAAA;KACnB,KAAK,OAAO,CAAA;CACd,CAAC;AA60BF,QAAA,MAAM,UAAU;;cAKG,QAAQ,CAAC,SAAS,mBAAmB,EAAE,CAAC;;;;;;;;cAQvC,QAAQ,CAAC,wBAAwB,CAAC;;;;cAIlC,QAAQ,CAAC,iBAAiB,CAAC;;;;cAI3B,QAAQ,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;cAgBxB,QAAQ,CAAC,cAAc,CAAC;;;;cAIzB,QAAQ,CAAC,MAAM,EAAE,CAAC;;;;;;;;;;;cApClB,QAAQ,CAAC,SAAS,mBAAmB,EAAE,CAAC;;;;;;;;cAQvC,QAAQ,CAAC,wBAAwB,CAAC;;;;cAIlC,QAAQ,CAAC,iBAAiB,CAAC;;;;cAI3B,QAAQ,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;cAgBxB,QAAQ,CAAC,cAAc,CAAC;;;;cAIzB,QAAQ,CAAC,MAAM,EAAE,CAAC;;;;;;;;;;;;;;;;;;;4EAInC,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -11,6 +11,8 @@ type __VLS_Slots = {
|
|
|
11
11
|
actionbar?: (props: {
|
|
12
12
|
message: ConversationMessage;
|
|
13
13
|
copied: boolean;
|
|
14
|
+
copyFailed: boolean;
|
|
15
|
+
copy: () => Promise<void>;
|
|
14
16
|
}) => unknown;
|
|
15
17
|
tool?: (props: {
|
|
16
18
|
toolCall: ConversationToolCall;
|
|
@@ -47,6 +49,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
47
49
|
type: PropType<ChatToolStates>;
|
|
48
50
|
default: () => {};
|
|
49
51
|
};
|
|
52
|
+
followUps: {
|
|
53
|
+
type: PropType<string[]>;
|
|
54
|
+
default: undefined;
|
|
55
|
+
};
|
|
50
56
|
showFollowUps: {
|
|
51
57
|
type: BooleanConstructor;
|
|
52
58
|
default: boolean;
|
|
@@ -85,6 +91,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
85
91
|
type: PropType<ChatToolStates>;
|
|
86
92
|
default: () => {};
|
|
87
93
|
};
|
|
94
|
+
followUps: {
|
|
95
|
+
type: PropType<string[]>;
|
|
96
|
+
default: undefined;
|
|
97
|
+
};
|
|
88
98
|
showFollowUps: {
|
|
89
99
|
type: BooleanConstructor;
|
|
90
100
|
default: boolean;
|
|
@@ -101,6 +111,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
101
111
|
toolStates: Readonly<Record<string, import("../types").ChatToolState>>;
|
|
102
112
|
userAvatar: string;
|
|
103
113
|
assistantAvatar: string;
|
|
114
|
+
followUps: string[];
|
|
104
115
|
showFollowUps: boolean;
|
|
105
116
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
106
117
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBubble.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/components/MessageBubble.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MessageBubble.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/components/MessageBubble.vue"],"names":[],"mappings":"AA0eA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AASnC,OAAO,KAAK,EACV,wBAAwB,EACxB,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EAGd,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACZ,MAAM,UAAU,CAAA;AA4CjB,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,MAAM,OAAO,CAA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Ae,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/mdoc/sanitize.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/mdoc/sanitize.ts"],"names":[],"mappings":"AAiEA,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tableStreaming.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/mdoc/tableStreaming.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tableStreaming.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/mdoc/tableStreaming.ts"],"names":[],"mappings":"AASA,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAkBnD"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { ChatSenderTrigger } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Pure DOM helpers backing `ChatSender`'s contenteditable rich-text editor.
|
|
4
|
+
* Kept free of Vue reactivity so the trigger-detection and serialization algorithms
|
|
5
|
+
* (design doc §3, §5, §7) can be unit tested against plain DOM fixtures.
|
|
6
|
+
*/
|
|
7
|
+
export declare const MENTION_TRIGGER_ATTR = "data-mention-trigger-id";
|
|
8
|
+
export declare const MENTION_ID_ATTR = "data-mention-id";
|
|
9
|
+
export declare const MENTION_LABEL_ATTR = "data-mention-label";
|
|
10
|
+
export declare const MENTION_CLASS = "chat-sender__mention";
|
|
11
|
+
export declare function isMentionElement(node: Node | null | undefined): node is HTMLElement;
|
|
12
|
+
/**
|
|
13
|
+
* Whether inserting a mention at `range.start` should prepend a separating space
|
|
14
|
+
* (not at editor start, and not when the previous character is already whitespace).
|
|
15
|
+
*/
|
|
16
|
+
export declare function rangeNeedsLeadingSpace(editor: HTMLElement, range: Range): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Finds a mention chip immediately before the collapsed caret (for Backspace).
|
|
19
|
+
* Returns null when a normal character would be deleted first.
|
|
20
|
+
*
|
|
21
|
+
* Also treats "caret at the end of a whitespace-only text node that follows a chip"
|
|
22
|
+
* as adjacent — so one Backspace after the inserted trailing space removes the chip.
|
|
23
|
+
*/
|
|
24
|
+
export declare function findMentionBeforeCaret(editor: HTMLElement, range: Range): HTMLElement | null;
|
|
25
|
+
/**
|
|
26
|
+
* Finds a mention chip immediately after the collapsed caret (for Delete).
|
|
27
|
+
* Returns null when a normal character would be deleted first.
|
|
28
|
+
*/
|
|
29
|
+
export declare function findMentionAfterCaret(editor: HTMLElement, range: Range): HTMLElement | null;
|
|
30
|
+
export interface MentionTriggerMatch {
|
|
31
|
+
trigger: ChatSenderTrigger;
|
|
32
|
+
/** Spans from immediately before the trigger char (inclusive) to the caret. */
|
|
33
|
+
range: Range;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Design doc §5: finds the nearest unclosed trigger char behind the caret. Whitespace or an
|
|
37
|
+
* atomic-island/editor-start boundary encountered before any trigger char means "no match".
|
|
38
|
+
* Because characters are scanned nearest-first, the first trigger char found is automatically
|
|
39
|
+
* the closest one among all configured `triggers` (§5.4).
|
|
40
|
+
*/
|
|
41
|
+
export declare function findTriggerMatch(triggers: readonly ChatSenderTrigger[], root: HTMLElement, caretNode: Node, caretOffset: number): MentionTriggerMatch | null;
|
|
42
|
+
/** Design doc §3: text nodes concatenate as-is, `<br>` becomes `\n`, mentions become their visible label text. */
|
|
43
|
+
export declare function serializeMentionEditorContent(root: HTMLElement): string;
|
|
44
|
+
/** Builds the atomic, non-editable mention "island" (design doc §2.1). */
|
|
45
|
+
export declare function createMentionElement(trigger: ChatSenderTrigger, id: string, label: string): HTMLSpanElement;
|
|
46
|
+
/** Renders plain text (no chip reconstruction — design doc §3.1 known limitation). */
|
|
47
|
+
export declare function renderPlainTextIntoEditor(root: HTMLElement, text: string): void;
|
|
48
|
+
/** Inserts `text` at `range`, converting embedded `\n` into real `<br>` elements. Returns the last inserted node (for caret placement), or null if `text` was empty. */
|
|
49
|
+
export declare function insertTextWithLineBreaksAtRange(range: Range, text: string): Node | null;
|
|
50
|
+
export declare function hasMeaningfulContent(root: HTMLElement): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Design doc §7: native Range API caret positioning, with a zero-width-space probe fallback.
|
|
53
|
+
* jsdom (used in unit tests) does not implement `Range.getBoundingClientRect` at all, so this
|
|
54
|
+
* degrades to `null` there instead of throwing — real positioning needs browser verification
|
|
55
|
+
* per design doc §13 risk 3.
|
|
56
|
+
*/
|
|
57
|
+
export declare function getCaretRect(): DOMRect | null;
|
|
58
|
+
/** Anchor for the trigger menu: caret when measurable, otherwise top-left of the editor. */
|
|
59
|
+
export declare function getMenuAnchorRect(editor: HTMLElement): DOMRect | null;
|
|
60
|
+
export interface TriggerMenuPositionInput {
|
|
61
|
+
anchor: DOMRect;
|
|
62
|
+
menuWidth: number;
|
|
63
|
+
menuHeight: number;
|
|
64
|
+
viewportWidth: number;
|
|
65
|
+
viewportHeight: number;
|
|
66
|
+
gap?: number;
|
|
67
|
+
margin?: number;
|
|
68
|
+
}
|
|
69
|
+
export interface TriggerMenuPosition {
|
|
70
|
+
left: number;
|
|
71
|
+
top: number;
|
|
72
|
+
placement: 'below' | 'above';
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Places the trigger menu below the caret when there is room; flips above when the
|
|
76
|
+
* bottom edge would leave the viewport. Also clamps horizontally.
|
|
77
|
+
*/
|
|
78
|
+
export declare function resolveTriggerMenuPosition(input: TriggerMenuPositionInput): TriggerMenuPosition;
|
|
79
|
+
//# sourceMappingURL=mentionEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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