@opentiny/tiny-robot 0.5.0 → 0.5.1-alpha.1
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/action-group/ActionGroup.vue.d.ts +26 -0
- package/dist/action-group/ActionGroupItem.vue.d.ts +18 -0
- package/dist/action-group/index.d.ts +12 -0
- package/dist/action-group/index.type.d.ts +17 -0
- package/dist/anchor/components/AnchorItem.vue.d.ts +24 -0
- package/dist/anchor/components/AnchorList.vue.d.ts +20 -0
- package/dist/anchor/components/AnchorOverlay.vue.d.ts +33 -0
- package/dist/anchor/components/AnchorSearch.vue.d.ts +7 -0
- package/dist/anchor/composables/index.d.ts +5 -0
- package/dist/anchor/composables/useActiveSync.d.ts +10 -0
- package/dist/anchor/composables/useFloatingOffset.d.ts +6 -0
- package/dist/anchor/composables/useNavController.d.ts +12 -0
- package/dist/anchor/composables/useOverlayInteractions.d.ts +6 -0
- package/dist/anchor/composables/useTargetFeedback.d.ts +5 -0
- package/dist/anchor/defaults.d.ts +16 -0
- package/dist/anchor/index.d.ts +7 -0
- package/dist/anchor/index.type.d.ts +60 -0
- package/dist/anchor/index.vue.d.ts +159 -0
- package/dist/anchor/internal.type.d.ts +103 -0
- package/dist/anchor/utils/scroll.d.ts +7 -0
- package/dist/anchor/utils/target.d.ts +6 -0
- package/dist/attachments/components/FileCard.vue.d.ts +18 -0
- package/dist/attachments/components/ImagePreview.vue.d.ts +17 -0
- package/dist/attachments/components/index.d.ts +2 -0
- package/dist/attachments/composables/index.d.ts +5 -0
- package/dist/attachments/composables/useFileCard.d.ts +15 -0
- package/dist/attachments/composables/useFileType.d.ts +20 -0
- package/dist/attachments/composables/useImagePreview.d.ts +18 -0
- package/dist/attachments/composables/useListType.d.ts +11 -0
- package/dist/attachments/index.d.ts +7 -0
- package/dist/attachments/index.type.d.ts +70 -0
- package/dist/attachments/index.vue.d.ts +27 -0
- package/dist/attachments/utils.d.ts +3 -0
- package/dist/base-popper/components/Popper.vue.d.ts +28 -0
- package/dist/base-popper/index.d.ts +2 -0
- package/dist/base-popper/index.vue.d.ts +41 -0
- package/dist/bubble/Bubble.vue.d.ts +47 -0
- package/dist/bubble/BubbleBoxWrapper.vue.d.ts +22 -0
- package/dist/bubble/BubbleContentWrapper.vue.d.ts +22 -0
- package/dist/bubble/BubbleItem.vue.d.ts +44 -0
- package/dist/bubble/BubbleList.vue.d.ts +43 -0
- package/dist/bubble/BubbleProvider.vue.d.ts +18 -0
- package/dist/bubble/composables/index.d.ts +11 -0
- package/dist/bubble/composables/useBubbleBoxRenderer.d.ts +18 -0
- package/dist/bubble/composables/useBubbleContentRenderer.d.ts +18 -0
- package/dist/bubble/composables/useBubbleEvent.d.ts +3 -0
- package/dist/bubble/composables/useBubbleStateChange.d.ts +1 -0
- package/dist/bubble/composables/useBubbleStore.d.ts +16 -0
- package/dist/bubble/composables/useContentResolver.d.ts +5 -0
- package/dist/bubble/composables/useCopyCleanup.d.ts +6 -0
- package/dist/bubble/composables/useMessageContent.d.ts +5 -0
- package/dist/bubble/composables/useMessageGroup.d.ts +4 -0
- package/dist/bubble/composables/useOmitMessageFields.d.ts +12 -0
- package/dist/bubble/composables/useToolCall.d.ts +25 -0
- package/dist/bubble/constants.d.ts +42 -0
- package/dist/bubble/index.d.ts +19 -0
- package/dist/bubble/index.type.d.ts +185 -0
- package/dist/bubble/renderers/Box.vue.d.ts +18 -0
- package/dist/bubble/renderers/Image.vue.d.ts +4 -0
- package/dist/bubble/renderers/Loading.vue.d.ts +4 -0
- package/dist/bubble/renderers/Markdown.vue.d.ts +4 -0
- package/dist/bubble/renderers/Reasoning.vue.d.ts +9 -0
- package/dist/bubble/renderers/Text.vue.d.ts +4 -0
- package/dist/bubble/renderers/Tool.vue.d.ts +14 -0
- package/dist/bubble/renderers/ToolRole.vue.d.ts +4 -0
- package/dist/bubble/renderers/Tools.vue.d.ts +4 -0
- package/dist/bubble/renderers/allRenderers.d.ts +93 -0
- package/dist/bubble/renderers/defaultRenderers.d.ts +27 -0
- package/dist/bubble/utils.d.ts +7 -0
- package/dist/chat/components/ChatConversation.vue.d.ts +305 -0
- package/dist/chat/components/ChatLauncherButton.vue.d.ts +12 -0
- package/dist/chat/components/ChatMcpTrigger.vue.d.ts +30 -0
- package/dist/chat/components/ChatThemeToggleButton.vue.d.ts +6 -0
- package/dist/chat/components/ChatWelcome.vue.d.ts +14 -0
- package/dist/chat/components/icons/IconModelAliyunBailian.vue.d.ts +7 -0
- package/dist/chat/components/icons/IconModelDeepseek.vue.d.ts +7 -0
- package/dist/chat/components/icons/index.d.ts +5 -0
- package/dist/chat/composables/useChatConversation.d.ts +37 -0
- package/dist/chat/composables/useChatMcp.d.ts +29 -0
- package/dist/chat/composables/useChatModel.d.ts +27 -0
- package/dist/chat/index.d.ts +9 -0
- package/dist/chat/index.js +13904 -0
- package/dist/chat/index.type.d.ts +92 -0
- package/dist/chat/index.vue.d.ts +51 -0
- package/dist/chat/locale.d.ts +12 -0
- package/dist/chat/mcpServers.d.ts +3 -0
- package/dist/container/index.d.ts +7 -0
- package/dist/container/index.type.d.ts +20 -0
- package/dist/container/index.vue.d.ts +32 -0
- package/dist/conversations/index.d.ts +7 -0
- package/dist/conversations/index.vue.d.ts +2 -0
- package/dist/drag-overlay/constants.d.ts +17 -0
- package/dist/drag-overlay/directives/vDropzone.d.ts +14 -0
- package/dist/drag-overlay/index.d.ts +7 -0
- package/dist/drag-overlay/index.type.d.ts +105 -0
- package/dist/drag-overlay/index.vue.d.ts +20 -0
- package/dist/dropdown-menu/composables/usePopperHover.d.ts +6 -0
- package/dist/dropdown-menu/index.d.ts +7 -0
- package/dist/dropdown-menu/index.type.d.ts +42 -0
- package/dist/dropdown-menu/index.vue.d.ts +217 -0
- package/dist/feedback/components/SourceList.vue.d.ts +11 -0
- package/dist/feedback/components/index.d.ts +1 -0
- package/dist/feedback/index.d.ts +7 -0
- package/dist/feedback/index.type.d.ts +25 -0
- package/dist/feedback/index.vue.d.ts +13 -0
- package/dist/flow-layout-buttons/index.d.ts +7 -0
- package/dist/flow-layout-buttons/index.type.d.ts +35 -0
- package/dist/flow-layout-buttons/index.vue.d.ts +22 -0
- package/dist/history/components/Empty.vue.d.ts +7 -0
- package/dist/history/components/MenuList.vue.d.ts +24 -0
- package/dist/history/composables/useRenameEditor.d.ts +22 -0
- package/dist/history/constants.d.ts +1 -0
- package/dist/history/index.d.ts +7 -0
- package/dist/history/index.type.d.ts +33 -0
- package/dist/history/index.vue.d.ts +18 -0
- package/dist/icon-button/index.d.ts +7 -0
- package/dist/icon-button/index.type.d.ts +7 -0
- package/dist/icon-button/index.vue.d.ts +6 -0
- package/dist/index.d.ts +51 -5517
- package/dist/index.js +1 -1
- package/dist/layout/Layout.vue.d.ts +246 -0
- package/dist/layout/LayoutAsideToggle.vue.d.ts +20 -0
- package/dist/layout/LayoutProxyScrollbar.vue.d.ts +6 -0
- package/dist/layout/components/AsideContent.vue.d.ts +35 -0
- package/dist/layout/components/AsideResizeTrigger.vue.d.ts +20 -0
- package/dist/layout/components/FloatingDragBar.vue.d.ts +18 -0
- package/dist/layout/components/FloatingResizeTrigger.vue.d.ts +17 -0
- package/dist/layout/components/FloatingResizeTriggers.vue.d.ts +14 -0
- package/dist/layout/components/LayoutSurface.vue.d.ts +41 -0
- package/dist/layout/composables/useLayoutAsideStates.d.ts +21 -0
- package/dist/layout/composables/useLayoutContext.d.ts +4 -0
- package/dist/layout/composables/usePointerDrag.d.ts +19 -0
- package/dist/layout/index.d.ts +22 -0
- package/dist/layout/index.type.d.ts +111 -0
- package/dist/layout/internal.type.d.ts +43 -0
- package/dist/layout/utils/asideEventEmitters.d.ts +6 -0
- package/dist/layout/utils/asidePresets.d.ts +5 -0
- package/dist/layout/utils/cssLength.d.ts +2 -0
- package/dist/layout/utils/domInteraction.d.ts +1 -0
- package/dist/layout/utils/number.d.ts +1 -0
- package/dist/layout/utils/surfaceGeometry.d.ts +87 -0
- package/dist/layout/utils/surfaceResize.d.ts +10 -0
- package/dist/mcp-add-form/components/CodeEditor.vue.d.ts +9 -0
- package/dist/mcp-add-form/components/FormEditor.vue.d.ts +10 -0
- package/dist/mcp-add-form/components/index.d.ts +2 -0
- package/dist/mcp-add-form/index.d.ts +7 -0
- package/dist/mcp-add-form/index.type.d.ts +19 -0
- package/dist/mcp-add-form/index.vue.d.ts +13 -0
- package/dist/mcp-server-picker/components/NoData.vue.d.ts +7 -0
- package/dist/mcp-server-picker/components/PluginCard.vue.d.ts +40 -0
- package/dist/mcp-server-picker/components/PluginModal.vue.d.ts +15 -0
- package/dist/mcp-server-picker/components/index.d.ts +3 -0
- package/dist/mcp-server-picker/index.d.ts +7 -0
- package/dist/mcp-server-picker/index.type.d.ts +99 -0
- package/dist/mcp-server-picker/index.vue.d.ts +71 -0
- package/dist/prompts/index.d.ts +12 -0
- package/dist/prompts/index.type.d.ts +59 -0
- package/dist/prompts/prompt.vue.d.ts +5 -0
- package/dist/prompts/prompts.vue.d.ts +20 -0
- package/dist/sender/components/editor-content/index.vue.d.ts +4 -0
- package/dist/sender/components/footer/index.vue.d.ts +38 -0
- package/dist/sender/components/layouts/MultiLineLayout.vue.d.ts +43 -0
- package/dist/sender/components/layouts/SingleLineLayout.vue.d.ts +32 -0
- package/dist/sender/composables/index.d.ts +7 -0
- package/dist/sender/composables/useAutoSize.d.ts +5 -0
- package/dist/sender/composables/useEditor.d.ts +13 -0
- package/dist/sender/composables/useKeyboardShortcuts.d.ts +7 -0
- package/dist/sender/composables/useModeSwitch.d.ts +4 -0
- package/dist/sender/composables/useSenderCore.d.ts +31 -0
- package/dist/sender/composables/useSlotScope.d.ts +10 -0
- package/dist/sender/context/index.d.ts +6 -0
- package/dist/sender/context/types.d.ts +7 -0
- package/dist/sender/extensions/constants.d.ts +94 -0
- package/dist/sender/extensions/index.d.ts +12 -0
- package/dist/sender/extensions/mention/commands.d.ts +20 -0
- package/dist/sender/extensions/mention/components/mention-list.vue.d.ts +18 -0
- package/dist/sender/extensions/mention/components/mention-view.vue.d.ts +19 -0
- package/dist/sender/extensions/mention/extension.d.ts +6 -0
- package/dist/sender/extensions/mention/index.d.ts +22 -0
- package/dist/sender/extensions/mention/plugin.d.ts +16 -0
- package/dist/sender/extensions/mention/types.d.ts +126 -0
- package/dist/sender/extensions/mention/utils.d.ts +34 -0
- package/dist/sender/extensions/suggestion/extension.d.ts +8 -0
- package/dist/sender/extensions/suggestion/index.d.ts +20 -0
- package/dist/sender/extensions/suggestion/plugin.d.ts +21 -0
- package/dist/sender/extensions/suggestion/suggestion-list.vue.d.ts +46 -0
- package/dist/sender/extensions/suggestion/types.d.ts +254 -0
- package/dist/sender/extensions/suggestion/utils/filter.d.ts +29 -0
- package/dist/sender/extensions/suggestion/utils/highlight.d.ts +73 -0
- package/dist/sender/extensions/template/block/extension.d.ts +6 -0
- package/dist/sender/extensions/template/block/plugins.d.ts +13 -0
- package/dist/sender/extensions/template/block/template-block-view.vue.d.ts +14 -0
- package/dist/sender/extensions/template/commands.d.ts +31 -0
- package/dist/sender/extensions/template/extension.d.ts +6 -0
- package/dist/sender/extensions/template/index.d.ts +21 -0
- package/dist/sender/extensions/template/select/dropdown-manager.d.ts +23 -0
- package/dist/sender/extensions/template/select/extension.d.ts +5 -0
- package/dist/sender/extensions/template/select/plugins.d.ts +34 -0
- package/dist/sender/extensions/template/select/template-select-view.vue.d.ts +20 -0
- package/dist/sender/extensions/template/types.d.ts +100 -0
- package/dist/sender/extensions/template/utils.d.ts +20 -0
- package/dist/sender/extensions/utils/id-generator.d.ts +16 -0
- package/dist/sender/extensions/utils/index.d.ts +7 -0
- package/dist/sender/extensions/utils/keyboard.d.ts +49 -0
- package/dist/sender/extensions/utils/position.d.ts +25 -0
- package/dist/sender/index.d.ts +139 -0
- package/dist/sender/index.type.d.ts +311 -0
- package/dist/sender/index.vue.d.ts +93 -0
- package/dist/sender/types/base.d.ts +239 -0
- package/dist/sender/types/components.d.ts +68 -0
- package/dist/sender/types/composables.d.ts +122 -0
- package/dist/sender/types/context.d.ts +138 -0
- package/dist/sender/types/slots.d.ts +67 -0
- package/dist/sender/utils/countGraphemes.d.ts +1 -0
- package/dist/sender-actions/action-button/index.vue.d.ts +23 -0
- package/dist/sender-actions/clear-button/index.vue.d.ts +2 -0
- package/dist/sender-actions/clear-button/useClearButtonState.d.ts +6 -0
- package/dist/sender-actions/default-actions/index.vue.d.ts +17 -0
- package/dist/sender-actions/index.d.ts +21 -0
- package/dist/sender-actions/index.type.d.ts +7 -0
- package/dist/sender-actions/submit-button/index.vue.d.ts +2 -0
- package/dist/sender-actions/types/common.d.ts +40 -0
- package/dist/sender-actions/types/index.d.ts +5 -0
- package/dist/sender-actions/types/tooltip.d.ts +7 -0
- package/dist/sender-actions/upload-button/index.type.d.ts +57 -0
- package/dist/sender-actions/upload-button/index.vue.d.ts +16 -0
- package/dist/sender-actions/utils/tooltip.d.ts +8 -0
- package/dist/sender-actions/voice-button/index.type.d.ts +78 -0
- package/dist/sender-actions/voice-button/index.vue.d.ts +43 -0
- package/dist/sender-actions/voice-button/speech.types.d.ts +40 -0
- package/dist/sender-actions/voice-button/useSpeechHandler.d.ts +10 -0
- package/dist/sender-actions/voice-button/webSpeechHandler.d.ts +40 -0
- package/dist/sender-actions/word-counter/index.vue.d.ts +2 -0
- package/dist/sender-compat/index.d.ts +7 -0
- package/dist/sender-compat/index.type.d.ts +91 -0
- package/dist/sender-compat/index.vue.d.ts +538 -0
- package/dist/shared/composables/createTeleport.d.ts +2 -0
- package/dist/shared/composables/index.d.ts +6 -0
- package/dist/shared/composables/useAutoScroll.d.ts +25 -0
- package/dist/shared/composables/useControllableState.d.ts +20 -0
- package/dist/shared/composables/useSlotRefs.d.ts +12 -0
- package/dist/shared/composables/useTeleportTarget.d.ts +11 -0
- package/dist/shared/composables/useTouchDevice.d.ts +3 -0
- package/dist/shared/utils.d.ts +7 -0
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/components/PillButton.vue.d.ts +16 -0
- package/dist/suggestion-pills/components/index.d.ts +1 -0
- package/dist/suggestion-pills/index.d.ts +13 -0
- package/dist/suggestion-pills/index.type.d.ts +45 -0
- package/dist/suggestion-pills/index.vue.d.ts +44 -0
- package/dist/suggestion-popover/components/Backdrop.vue.d.ts +5 -0
- package/dist/suggestion-popover/components/Header.vue.d.ts +4 -0
- package/dist/suggestion-popover/components/Loading.vue.d.ts +17 -0
- package/dist/suggestion-popover/components/NoData.vue.d.ts +17 -0
- package/dist/suggestion-popover/components/Tooltip.vue.d.ts +19 -0
- package/dist/suggestion-popover/index.d.ts +7 -0
- package/dist/suggestion-popover/index.type.d.ts +80 -0
- package/dist/suggestion-popover/index.vue.d.ts +262 -0
- package/dist/theme-provider/constants.d.ts +6 -0
- package/dist/theme-provider/index.d.ts +9 -0
- package/dist/theme-provider/index.js +32 -41
- package/dist/theme-provider/index.type.d.ts +18 -0
- package/dist/theme-provider/index.vue.d.ts +32 -0
- package/dist/theme-provider/useTheme.d.ts +11 -0
- package/dist/useTheme.js +22 -0
- package/dist/welcome/index.d.ts +7 -0
- package/dist/welcome/index.type.d.ts +10 -0
- package/dist/welcome/index.vue.d.ts +18 -0
- package/package.json +21 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
header?(_: {}): any;
|
|
5
|
+
prefix?(_: {}): any;
|
|
6
|
+
content?(_: {
|
|
7
|
+
editor: import('vue').Ref<import('@tiptap/vue-3').Editor | undefined, import('@tiptap/vue-3').Editor | undefined>;
|
|
8
|
+
}): any;
|
|
9
|
+
footer?(_: {
|
|
10
|
+
editor: import('@tiptap/core').Editor | undefined;
|
|
11
|
+
focus: () => void;
|
|
12
|
+
blur: () => void;
|
|
13
|
+
insert: (content: string) => void;
|
|
14
|
+
append: (content: string) => void;
|
|
15
|
+
replace: (content: string) => void;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
loading: boolean;
|
|
18
|
+
hasContent: boolean;
|
|
19
|
+
}): any;
|
|
20
|
+
'footer-right'?(_: {
|
|
21
|
+
editor: import('@tiptap/core').Editor | undefined;
|
|
22
|
+
focus: () => void;
|
|
23
|
+
blur: () => void;
|
|
24
|
+
insert: (content: string) => void;
|
|
25
|
+
append: (content: string) => void;
|
|
26
|
+
replace: (content: string) => void;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
loading: boolean;
|
|
29
|
+
hasContent: boolean;
|
|
30
|
+
}): any;
|
|
31
|
+
};
|
|
32
|
+
refs: {};
|
|
33
|
+
rootEl: HTMLDivElement;
|
|
34
|
+
};
|
|
35
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
36
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
37
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
header?(_: {}): any;
|
|
5
|
+
prefix?(_: {}): any;
|
|
6
|
+
content?(_: {
|
|
7
|
+
editor: import('@tiptap/vue-3').Editor | undefined;
|
|
8
|
+
}): any;
|
|
9
|
+
'actions-inline'?(_: {
|
|
10
|
+
editor: import('@tiptap/core').Editor | undefined;
|
|
11
|
+
focus: () => void;
|
|
12
|
+
blur: () => void;
|
|
13
|
+
insert: (content: string) => void;
|
|
14
|
+
append: (content: string) => void;
|
|
15
|
+
replace: (content: string) => void;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
loading: boolean;
|
|
18
|
+
hasContent: boolean;
|
|
19
|
+
}): any;
|
|
20
|
+
};
|
|
21
|
+
refs: {};
|
|
22
|
+
rootEl: HTMLDivElement;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
26
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SenderEmits, UseEditorReturn } from '../index.type';
|
|
2
|
+
import { SenderPropsWithDefaults } from '../index.vue';
|
|
3
|
+
/**
|
|
4
|
+
* 编辑器 Hook
|
|
5
|
+
*
|
|
6
|
+
* 职责:
|
|
7
|
+
* - 初始化编辑器
|
|
8
|
+
* - 管理编辑器状态
|
|
9
|
+
* - 处理编辑器事件
|
|
10
|
+
* - 提供编辑器实例
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
export declare function useEditor(props: SenderPropsWithDefaults, emit: SenderEmits): UseEditorReturn;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { Editor } from '@tiptap/vue-3';
|
|
3
|
+
import { SenderProps, UseModeSwitchReturn } from '../index.type';
|
|
4
|
+
export declare function useModeSwitch(props: SenderProps, editor: Ref<Editor | undefined>, editorRef: Ref<HTMLElement | null>): UseModeSwitchReturn;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { SenderEmits } from '../index.type';
|
|
2
|
+
import { SenderPropsWithDefaults } from '../index.vue';
|
|
3
|
+
import { SenderContext } from '../types/context';
|
|
4
|
+
/**
|
|
5
|
+
* useSenderCore 返回类型
|
|
6
|
+
*/
|
|
7
|
+
export interface UseSenderCoreReturn {
|
|
8
|
+
/**
|
|
9
|
+
* Context 对象(用于 provide)
|
|
10
|
+
*/
|
|
11
|
+
context: SenderContext;
|
|
12
|
+
/**
|
|
13
|
+
* 需要暴露给父组件的方法(用于 defineExpose)
|
|
14
|
+
*/
|
|
15
|
+
expose: {
|
|
16
|
+
submit: () => void;
|
|
17
|
+
clear: () => void;
|
|
18
|
+
cancel: () => void;
|
|
19
|
+
focus: () => void;
|
|
20
|
+
blur: () => void;
|
|
21
|
+
setContent: (content: string) => void;
|
|
22
|
+
getContent: () => string;
|
|
23
|
+
editor: SenderContext['editor'];
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Sender 核心逻辑 Hook
|
|
28
|
+
*
|
|
29
|
+
* 一键获取完整的 context 和 expose 对象
|
|
30
|
+
*/
|
|
31
|
+
export declare function useSenderCore(props: SenderPropsWithDefaults, emit: SenderEmits): UseSenderCoreReturn;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 扩展名称常量
|
|
3
|
+
*
|
|
4
|
+
* 用于 TipTap 扩展定义中的 name 属性
|
|
5
|
+
* 这些是注册到编辑器的扩展名称
|
|
6
|
+
*/
|
|
7
|
+
export declare const EXTENSION_NAMES: {
|
|
8
|
+
/** Template 扩展(包含 TemplateBlock 和 TemplateSelect 子扩展) */
|
|
9
|
+
readonly TEMPLATE: "template";
|
|
10
|
+
/** Mention 扩展 */
|
|
11
|
+
readonly MENTION: "mention";
|
|
12
|
+
/** Suggestion 扩展 */
|
|
13
|
+
readonly SUGGESTION: "suggestion";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* ProseMirror 节点类型名称常量
|
|
17
|
+
*
|
|
18
|
+
* 用于 node.type.name 检查和节点创建
|
|
19
|
+
* 这些是 ProseMirror Schema 中注册的节点类型名称
|
|
20
|
+
*/
|
|
21
|
+
export declare const NODE_TYPE_NAMES: {
|
|
22
|
+
/** TemplateBlock 节点类型(可编辑块) */
|
|
23
|
+
readonly TEMPLATE_BLOCK: "templateBlock";
|
|
24
|
+
/** TemplateSelect 节点类型(下拉选择) */
|
|
25
|
+
readonly TEMPLATE_SELECT: "templateSelect";
|
|
26
|
+
/** Mention 节点类型 */
|
|
27
|
+
readonly MENTION: "mention";
|
|
28
|
+
/** Paragraph 节点类型(ProseMirror 内置) */
|
|
29
|
+
readonly PARAGRAPH: "paragraph";
|
|
30
|
+
/** Text 节点类型(ProseMirror 内置) */
|
|
31
|
+
readonly TEXT: "text";
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* ProseMirror 插件 Key 名称常量
|
|
35
|
+
*/
|
|
36
|
+
export declare const PLUGIN_KEY_NAMES: {
|
|
37
|
+
/** Mention 插件 */
|
|
38
|
+
readonly MENTION: "mention";
|
|
39
|
+
/** Suggestion 插件 */
|
|
40
|
+
readonly SUGGESTION: "suggestion";
|
|
41
|
+
/** Template Select 下拉菜单插件 */
|
|
42
|
+
readonly TEMPLATE_SELECT_DROPDOWN: "templateSelectDropdown";
|
|
43
|
+
/** Template Select 零宽字符插件 */
|
|
44
|
+
readonly TEMPLATE_SELECT_ZERO_WIDTH: "templateSelectZeroWidth";
|
|
45
|
+
/** Template Select 键盘导航插件 */
|
|
46
|
+
readonly TEMPLATE_SELECT_KEYBOARD: "templateSelectKeyboard";
|
|
47
|
+
/** Template Block 零宽字符插件 */
|
|
48
|
+
readonly TEMPLATE_BLOCK_ZERO_WIDTH: "templateBlockZeroWidth";
|
|
49
|
+
/** Template Block 键盘导航插件 */
|
|
50
|
+
readonly TEMPLATE_BLOCK_KEYBOARD: "templateBlockKeyboard";
|
|
51
|
+
/** Template Block 粘贴处理插件 */
|
|
52
|
+
readonly TEMPLATE_BLOCK_PASTE: "templateBlockPaste";
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* 用户 API 类型常量
|
|
56
|
+
*
|
|
57
|
+
* 用于 TemplateItem 等用户 API 中的 type 字段
|
|
58
|
+
* 这些是暴露给用户的类型名称,与内部节点类型可能不同
|
|
59
|
+
*/
|
|
60
|
+
export declare const USER_API_TYPES: {
|
|
61
|
+
/** 文本类型 */
|
|
62
|
+
readonly TEXT: "text";
|
|
63
|
+
/** 模板块类型(对应内部的 TemplateBlock 节点) */
|
|
64
|
+
readonly BLOCK: "block";
|
|
65
|
+
/** 选择器类型(对应内部的 TemplateSelect 节点) */
|
|
66
|
+
readonly SELECT: "select";
|
|
67
|
+
/** Mention 类型 */
|
|
68
|
+
readonly MENTION: "mention";
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* 键盘按键常量
|
|
72
|
+
*/
|
|
73
|
+
export declare const KEYBOARD_KEYS: {
|
|
74
|
+
/** Enter 键 */
|
|
75
|
+
readonly ENTER: "Enter";
|
|
76
|
+
/** Escape 键 */
|
|
77
|
+
readonly ESCAPE: "Escape";
|
|
78
|
+
/** Tab 键 */
|
|
79
|
+
readonly TAB: "Tab";
|
|
80
|
+
/** Backspace 键 */
|
|
81
|
+
readonly BACKSPACE: "Backspace";
|
|
82
|
+
/** Delete 键 */
|
|
83
|
+
readonly DELETE: "Delete";
|
|
84
|
+
/** 上箭头键 */
|
|
85
|
+
readonly ARROW_UP: "ArrowUp";
|
|
86
|
+
/** 下箭头键 */
|
|
87
|
+
readonly ARROW_DOWN: "ArrowDown";
|
|
88
|
+
/** 左箭头键 */
|
|
89
|
+
readonly ARROW_LEFT: "ArrowLeft";
|
|
90
|
+
/** 右箭头键 */
|
|
91
|
+
readonly ARROW_RIGHT: "ArrowRight";
|
|
92
|
+
/** 空格键 */
|
|
93
|
+
readonly SPACE: " ";
|
|
94
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tiptap 扩展统一导出
|
|
3
|
+
*/
|
|
4
|
+
export { Mention, mention, MentionPluginKey } from './mention';
|
|
5
|
+
export { getMentions, getTextWithMentions, getMentionStructuredData } from './mention';
|
|
6
|
+
export type { MentionAttrs, MentionOptions, MentionItem, MentionStructuredItem } from './mention';
|
|
7
|
+
export { Suggestion, suggestion, SuggestionPluginKey } from './suggestion';
|
|
8
|
+
export { syncAutoComplete, processHighlights, highlightSuggestionText } from './suggestion';
|
|
9
|
+
export type { SenderSuggestionItem, SuggestionOptions, SuggestionState, SuggestionTextPart, HighlightFunction, } from './suggestion';
|
|
10
|
+
export { Template, template } from './template';
|
|
11
|
+
export { getTemplateStructuredData, getTextWithTemplates, TemplateSelectDropdownPluginKey } from './template';
|
|
12
|
+
export type { TemplateAttrs, TemplateOptions } from './template';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
import { MentionAttrs } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Mention 命令集合
|
|
5
|
+
*/
|
|
6
|
+
export declare const mentionCommands: {
|
|
7
|
+
/**
|
|
8
|
+
* 插入 mention 节点
|
|
9
|
+
*/
|
|
10
|
+
insertMention: (attrs: Partial<MentionAttrs>) => ({ commands }: {
|
|
11
|
+
commands: Editor["commands"];
|
|
12
|
+
}) => boolean;
|
|
13
|
+
/**
|
|
14
|
+
* 删除 mention 节点
|
|
15
|
+
*/
|
|
16
|
+
deleteMention: (id: string) => ({ tr, state }: {
|
|
17
|
+
tr: Editor["state"]["tr"];
|
|
18
|
+
state: Editor["state"];
|
|
19
|
+
}) => boolean;
|
|
20
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MentionItem } from '../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
items: MentionItem[];
|
|
4
|
+
command: (props: {
|
|
5
|
+
id?: string;
|
|
6
|
+
label: string;
|
|
7
|
+
value?: string;
|
|
8
|
+
}) => void;
|
|
9
|
+
}
|
|
10
|
+
declare function onKeyDown({ event }: {
|
|
11
|
+
event: KeyboardEvent;
|
|
12
|
+
}): boolean;
|
|
13
|
+
declare const _default: import('vue').DefineComponent<Props, {
|
|
14
|
+
onKeyDown: typeof onKeyDown;
|
|
15
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
16
|
+
listRef: HTMLDivElement;
|
|
17
|
+
}, HTMLDivElement>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface NodeAttrs {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
interface Props {
|
|
8
|
+
node: {
|
|
9
|
+
attrs: NodeAttrs;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
extension: {
|
|
13
|
+
options: {
|
|
14
|
+
char: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { MentionItem, MentionOptions } from './types';
|
|
3
|
+
export { Mention } from './extension';
|
|
4
|
+
export { MentionPluginKey } from './plugin';
|
|
5
|
+
export { mentionCommands } from './commands';
|
|
6
|
+
export * from './types';
|
|
7
|
+
export * from './utils';
|
|
8
|
+
/**
|
|
9
|
+
* 创建 Mention 扩展的便捷函数
|
|
10
|
+
*
|
|
11
|
+
* @param items - 提及项列表
|
|
12
|
+
* @param char - 触发字符,默认 '@'
|
|
13
|
+
* @param options - 其他配置项
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* const extensions = [mention(items)]
|
|
18
|
+
* const extensions = [mention(items, '#')]
|
|
19
|
+
* const extensions = [mention(items, '@', { allowSpaces: true })]
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function mention(items: MentionItem[] | Ref<MentionItem[]>, char?: string, options?: Partial<Omit<MentionOptions, 'items' | 'char'>>): import('@tiptap/core').Node<MentionOptions, any>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Plugin, PluginKey } from '@tiptap/pm/state';
|
|
2
|
+
import { Editor } from '@tiptap/core';
|
|
3
|
+
import { Ref } from 'vue';
|
|
4
|
+
import { MentionItem, MentionSuggestionState } from './types';
|
|
5
|
+
export declare const MentionPluginKey: PluginKey<MentionSuggestionState>;
|
|
6
|
+
interface PluginOptions {
|
|
7
|
+
editor: Editor;
|
|
8
|
+
char: string;
|
|
9
|
+
items: MentionItem[] | Ref<MentionItem[]>;
|
|
10
|
+
allowSpaces: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 创建 Suggestion 插件
|
|
14
|
+
*/
|
|
15
|
+
export declare function createSuggestionPlugin(options: PluginOptions): Plugin;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 提及项数据结构(用户侧)
|
|
4
|
+
*
|
|
5
|
+
* 用户传入的数据格式,id 可选,插件会自动生成
|
|
6
|
+
*/
|
|
7
|
+
export interface MentionItem {
|
|
8
|
+
/**
|
|
9
|
+
* 唯一标识(可选)
|
|
10
|
+
*
|
|
11
|
+
* 如果不提供,插件会自动生成
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
14
|
+
/**
|
|
15
|
+
* 显示名称,如 "小小画家"(必传)
|
|
16
|
+
*/
|
|
17
|
+
label: string;
|
|
18
|
+
/**
|
|
19
|
+
* 关联值(必传)
|
|
20
|
+
*
|
|
21
|
+
* 可以是任意字符串值,如 AI 提示词、用户 ID、标签内容等
|
|
22
|
+
*/
|
|
23
|
+
value: string;
|
|
24
|
+
/**
|
|
25
|
+
* 图标(可选)
|
|
26
|
+
*/
|
|
27
|
+
icon?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 结构化数据项(提交时返回)
|
|
31
|
+
*
|
|
32
|
+
* 用于表示文本和 mention 的混合结构
|
|
33
|
+
*/
|
|
34
|
+
export type MentionStructuredItem = {
|
|
35
|
+
type: 'text';
|
|
36
|
+
content: string;
|
|
37
|
+
} | {
|
|
38
|
+
type: 'mention';
|
|
39
|
+
content: string;
|
|
40
|
+
value: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Mention 节点属性(内部使用)
|
|
44
|
+
*
|
|
45
|
+
* ProseMirror 节点的属性,id 必填(由插件保证)
|
|
46
|
+
*/
|
|
47
|
+
export interface MentionAttrs {
|
|
48
|
+
/**
|
|
49
|
+
* 唯一标识(必填)
|
|
50
|
+
*
|
|
51
|
+
* 由插件自动生成或使用用户提供的值
|
|
52
|
+
*/
|
|
53
|
+
id: string;
|
|
54
|
+
/**
|
|
55
|
+
* 显示名称
|
|
56
|
+
*/
|
|
57
|
+
label: string;
|
|
58
|
+
/**
|
|
59
|
+
* 关联值(可选)
|
|
60
|
+
*/
|
|
61
|
+
value?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Mention 配置选项
|
|
65
|
+
*/
|
|
66
|
+
export interface MentionOptions {
|
|
67
|
+
/**
|
|
68
|
+
* 提及项列表
|
|
69
|
+
*/
|
|
70
|
+
items: MentionItem[] | Ref<MentionItem[]>;
|
|
71
|
+
/**
|
|
72
|
+
* 触发字符,默认 '@'
|
|
73
|
+
*/
|
|
74
|
+
char: string;
|
|
75
|
+
/**
|
|
76
|
+
* 是否允许空格,默认 false
|
|
77
|
+
*/
|
|
78
|
+
allowSpaces?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* HTML 属性
|
|
81
|
+
*/
|
|
82
|
+
HTMLAttributes?: Record<string, unknown>;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Mention Suggestion 插件状态
|
|
86
|
+
*/
|
|
87
|
+
export interface MentionSuggestionState {
|
|
88
|
+
/**
|
|
89
|
+
* 是否激活
|
|
90
|
+
*/
|
|
91
|
+
active: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* 触发范围
|
|
94
|
+
*/
|
|
95
|
+
range: {
|
|
96
|
+
from: number;
|
|
97
|
+
to: number;
|
|
98
|
+
} | null;
|
|
99
|
+
/**
|
|
100
|
+
* 查询文本
|
|
101
|
+
*/
|
|
102
|
+
query: string;
|
|
103
|
+
/**
|
|
104
|
+
* 过滤后的提及项列表
|
|
105
|
+
*/
|
|
106
|
+
filteredItems: MentionItem[];
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* 扩展 Tiptap Commands 接口
|
|
110
|
+
*
|
|
111
|
+
* 使 TypeScript 能够识别自定义命令
|
|
112
|
+
*/
|
|
113
|
+
declare module '@tiptap/core' {
|
|
114
|
+
interface Commands<ReturnType> {
|
|
115
|
+
mention: {
|
|
116
|
+
/**
|
|
117
|
+
* 插入 mention 节点
|
|
118
|
+
*/
|
|
119
|
+
insertMention: (attrs: Partial<MentionAttrs>) => ReturnType;
|
|
120
|
+
/**
|
|
121
|
+
* 删除 mention 节点
|
|
122
|
+
*/
|
|
123
|
+
deleteMention: (id: string) => ReturnType;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
import { MentionItem, MentionStructuredItem } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* 获取所有 mention 节点(辅助函数)
|
|
5
|
+
*
|
|
6
|
+
* 返回文档中所有的 mention 节点数据
|
|
7
|
+
*/
|
|
8
|
+
export declare function getMentions(editor: Editor): MentionItem[];
|
|
9
|
+
/**
|
|
10
|
+
* 获取包含 mention 标签的完整文本
|
|
11
|
+
*
|
|
12
|
+
* 自动从编辑器中获取 mention 扩展的 char 配置
|
|
13
|
+
*
|
|
14
|
+
* @param editor - 编辑器实例
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* getTextWithMentions(editor) // @代码分析 hello world @文本分析 12315
|
|
18
|
+
* // 如果配置了 char: '#',则返回:#代码分析 hello world #文本分析 12315
|
|
19
|
+
*/
|
|
20
|
+
export declare function getTextWithMentions(editor: Editor): string;
|
|
21
|
+
/**
|
|
22
|
+
* 获取结构化数据(包含文本和 mention 的混合结构)
|
|
23
|
+
*
|
|
24
|
+
* 返回按顺序排列的文本和 mention 节点,用于确认内容和顺序
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* 输入:帮我分析 @张三 的周报(或 #标签 等,取决于 char 配置)
|
|
28
|
+
* 返回:[
|
|
29
|
+
* { type: 'text', content: '帮我分析 ' },
|
|
30
|
+
* { type: 'mention', content: '张三', value: '...' },
|
|
31
|
+
* { type: 'text', content: ' 的周报' }
|
|
32
|
+
* ]
|
|
33
|
+
*/
|
|
34
|
+
export declare function getMentionStructuredData(editor: Editor): MentionStructuredItem[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { SenderSuggestionItem, SuggestionOptions } from './types';
|
|
3
|
+
export { Suggestion } from './extension';
|
|
4
|
+
export { SuggestionPluginKey } from './plugin';
|
|
5
|
+
export * from './types';
|
|
6
|
+
export { syncAutoComplete } from './utils/filter';
|
|
7
|
+
export { processHighlights, highlightSuggestionText, convertHighlightsArrayToTextParts } from './utils/highlight';
|
|
8
|
+
/**
|
|
9
|
+
* 创建 Suggestion 扩展的便捷函数
|
|
10
|
+
*
|
|
11
|
+
* @param items - 建议项列表
|
|
12
|
+
* @param options - 其他配置项
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const extensions = [suggestion(suggestions)]
|
|
17
|
+
* const extensions = [suggestion(suggestions, { popupWidth: 500 })]
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function suggestion(items: SenderSuggestionItem[] | Ref<SenderSuggestionItem[]>, options?: Partial<Omit<SuggestionOptions, 'items'>>): import('@tiptap/core').Extension<SuggestionOptions, any>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Plugin, PluginKey } from '@tiptap/pm/state';
|
|
2
|
+
import { Editor } from '@tiptap/core';
|
|
3
|
+
import { SuggestionOptions, SuggestionState } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* 插件 Key,用于访问插件状态
|
|
6
|
+
*/
|
|
7
|
+
export declare const SuggestionPluginKey: PluginKey<SuggestionState>;
|
|
8
|
+
/**
|
|
9
|
+
* 插件配置接口
|
|
10
|
+
*/
|
|
11
|
+
interface PluginOptions extends SuggestionOptions {
|
|
12
|
+
editor: Editor;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 创建 Suggestion 插件
|
|
16
|
+
*
|
|
17
|
+
* @param options - 插件配置
|
|
18
|
+
* @returns ProseMirror 插件
|
|
19
|
+
*/
|
|
20
|
+
export declare function createSuggestionPlugin(options: PluginOptions): Plugin;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { SenderSuggestionItem } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* 建议列表组件 Props
|
|
4
|
+
*/
|
|
5
|
+
export interface Props {
|
|
6
|
+
/**
|
|
7
|
+
* 是否显示
|
|
8
|
+
*/
|
|
9
|
+
show: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* 建议项列表
|
|
12
|
+
*/
|
|
13
|
+
suggestions: SenderSuggestionItem[];
|
|
14
|
+
/**
|
|
15
|
+
* 弹窗样式
|
|
16
|
+
*/
|
|
17
|
+
popupStyle: Record<string, string | number>;
|
|
18
|
+
/**
|
|
19
|
+
* 键盘选中的索引
|
|
20
|
+
*/
|
|
21
|
+
activeKeyboardIndex: number;
|
|
22
|
+
/**
|
|
23
|
+
* 鼠标悬停的索引
|
|
24
|
+
*/
|
|
25
|
+
activeMouseIndex: number;
|
|
26
|
+
/**
|
|
27
|
+
* 用户输入的文本
|
|
28
|
+
*/
|
|
29
|
+
inputValue: string;
|
|
30
|
+
/**
|
|
31
|
+
* 选择回调函数
|
|
32
|
+
*/
|
|
33
|
+
onSelect?: (item: SenderSuggestionItem) => void;
|
|
34
|
+
/**
|
|
35
|
+
* 鼠标进入回调函数
|
|
36
|
+
*/
|
|
37
|
+
onMouseEnter?: (index: number) => void;
|
|
38
|
+
/**
|
|
39
|
+
* 鼠标离开回调函数
|
|
40
|
+
*/
|
|
41
|
+
onMouseLeave?: () => void;
|
|
42
|
+
}
|
|
43
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
44
|
+
suggestionsListRef: HTMLDivElement;
|
|
45
|
+
}, any>;
|
|
46
|
+
export default _default;
|