@opentiny/tiny-robot 0.2.0-alpha.1 → 0.2.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_plugin-vue_export-helper.js +9 -0
- package/dist/action-group/index.js +142 -0
- package/dist/bubble/index.js +3211 -0
- package/dist/{node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/close.js → close.js} +9 -9
- package/dist/container/index.js +60 -0
- package/dist/conversations/index.js +14 -0
- package/dist/feedback/index.js +192 -0
- package/dist/history/index.js +228 -0
- package/dist/icon-button/index.js +31 -0
- package/dist/index.d.ts +2190 -26
- package/dist/index.js +35 -43
- package/dist/index2.js +376 -0
- package/dist/index3.js +3895 -0
- package/dist/index4.js +637 -0
- package/dist/index5.js +3237 -0
- package/dist/index6.js +4623 -0
- package/dist/prompts/index.js +83 -0
- package/dist/question/index.js +375 -0
- package/dist/sender/index.js +683 -0
- package/dist/style.css +1 -1
- package/dist/suggestion/index.js +497 -0
- package/dist/{packages/svgs/dist/tiny-robot-svgs.js → tiny-robot-svgs.js} +100 -100
- package/dist/welcome/index.js +38 -0
- package/package.json +7 -3
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
- package/dist/action-group/ActionGroup.vue.d.ts +0 -26
- package/dist/action-group/ActionGroupItem.vue.d.ts +0 -18
- package/dist/action-group/index.d.ts +0 -12
- package/dist/action-group/index.type.d.ts +0 -16
- package/dist/bubble/bubble-list.vue.d.ts +0 -5
- package/dist/bubble/components/actions/copy.vue.d.ts +0 -10
- package/dist/bubble/components/actions/index.d.ts +0 -2
- package/dist/bubble/components/actions/refresh.vue.d.ts +0 -2
- package/dist/bubble/index.d.ts +0 -12
- package/dist/bubble/index.type.d.ts +0 -53
- package/dist/bubble/useScroll.d.ts +0 -4
- package/dist/container/index.d.ts +0 -7
- package/dist/container/index.type.d.ts +0 -16
- package/dist/container/index.vue.d.ts +0 -26
- package/dist/conversations/index.d.ts +0 -7
- package/dist/conversations/index.vue.d.ts +0 -2
- package/dist/feedback/components/SourceList.vue.d.ts +0 -11
- package/dist/feedback/components/index.d.ts +0 -1
- package/dist/feedback/index.d.ts +0 -7
- package/dist/feedback/index.type.d.ts +0 -25
- package/dist/feedback/index.vue.d.ts +0 -13
- package/dist/history/components/index.d.ts +0 -2
- package/dist/history/components/item-tag.vue.d.ts +0 -5
- package/dist/history/components/search-empty.vue.d.ts +0 -7
- package/dist/history/composables/index.d.ts +0 -1
- package/dist/history/composables/useEditItemTitle.d.ts +0 -12
- package/dist/history/index.d.ts +0 -6
- package/dist/history/index.type.d.ts +0 -43
- package/dist/history/index.vue.d.ts +0 -2
- package/dist/icon-button/index.d.ts +0 -7
- package/dist/icon-button/index.type.d.ts +0 -7
- package/dist/icon-button/index.vue.d.ts +0 -6
- package/dist/node_modules/.pnpm/@opentiny_utils@1.0.0/node_modules/@opentiny/utils/dist/opentiny-utils.es.js +0 -832
- package/dist/node_modules/.pnpm/@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js +0 -2116
- package/dist/node_modules/.pnpm/@opentiny_vue-button@3.21.0/node_modules/@opentiny/vue-button/lib/index.js +0 -113
- package/dist/node_modules/.pnpm/@opentiny_vue-button@3.21.0/node_modules/@opentiny/vue-button/lib/pc.js +0 -93
- package/dist/node_modules/.pnpm/@opentiny_vue-common@3.21.0/node_modules/@opentiny/vue-common/lib/index.js +0 -727
- package/dist/node_modules/.pnpm/@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js +0 -710
- package/dist/node_modules/.pnpm/@opentiny_vue-dialog-box@3.21.0/node_modules/@opentiny/vue-dialog-box/lib/index.js +0 -198
- package/dist/node_modules/.pnpm/@opentiny_vue-dialog-box@3.21.0/node_modules/@opentiny/vue-dialog-box/lib/pc.js +0 -204
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useEventListener.js +0 -10
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useInstanceSlots.js +0 -14
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useRelation.js +0 -54
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popper.js +0 -85
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/close.js +0 -29
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/eyeclose.js +0 -42
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/eyeopen.js +0 -43
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/finish.js +0 -34
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/fullscreen.js +0 -30
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/loading-shadow.js +0 -77
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/minscreen.js +0 -30
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-after.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-before.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-after.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-before.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-center.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-left.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-right.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-bold.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-code-block.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-code-view.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-color.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-column.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-row.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-table.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-font-size.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-format-clear.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h1.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h2.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h3.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h4.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h5.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h6.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-heading.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-high-light.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-image.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-italic.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-line-height.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-link-unlink.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-link.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-list-ordered.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-list-unordered.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells-vertical.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-node-delete.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-paragraph.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-quote-text.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-redo.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-horizontal.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-vertical.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-strike-through.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-subscript.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-superscript.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-table.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-task-list.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-underline.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-undo.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/sub-script.js +0 -29
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/warn.js +0 -26
- package/dist/node_modules/.pnpm/@opentiny_vue-input@3.21.0/node_modules/@opentiny/vue-input/lib/index.js +0 -196
- package/dist/node_modules/.pnpm/@opentiny_vue-input@3.21.0/node_modules/@opentiny/vue-input/lib/pc.js +0 -568
- package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.21.0/node_modules/@opentiny/vue-locale/lib/index.js +0 -1783
- package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.22.0/node_modules/@opentiny/vue-locale/lib/index.js +0 -1783
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/button/index.js +0 -13
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/button/vue.js +0 -34
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/chunk-G2ADBYYC.js +0 -12
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/browser.js +0 -36
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/clickoutside.js +0 -47
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/debounce.js +0 -7
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/dom.js +0 -45
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popper.js +0 -320
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popup-manager.js +0 -118
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/throttle.js +0 -23
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useEventListener.js +0 -9
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useInstanceSlots.js +0 -14
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useRelation.js +0 -54
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popper.js +0 -84
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popup.js +0 -73
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/event.js +0 -13
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/function.js +0 -5
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/index.js +0 -11
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/object.js +0 -84
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/string.js +0 -28
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/type.js +0 -28
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/dialog-box/index.js +0 -136
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/dialog-box/vue.js +0 -148
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/input/index.js +0 -228
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/input/vue.js +0 -263
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/index.js +0 -63
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/vue-storage-box.js +0 -16
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/vue.js +0 -23
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tooltip/index.js +0 -78
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tooltip/vue.js +0 -90
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/index.js +0 -77
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/vue.js +0 -90
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.21.0/node_modules/@opentiny/vue-tooltip/lib/index.js +0 -173
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.21.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +0 -248
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/index.js +0 -176
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +0 -248
- package/dist/node_modules/.pnpm/@vueuse_core@13.1.0_vue@3.5.13/node_modules/@vueuse/core/index.js +0 -190
- package/dist/node_modules/.pnpm/@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js +0 -53
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.js +0 -277
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.js +0 -46
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.js +0 -7
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js +0 -7
- package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.js +0 -187
- package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.js +0 -19
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_blocks.js +0 -67
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_re.js +0 -5
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/utils.js +0 -164
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/index.js +0 -8
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_destination.js +0 -44
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_label.js +0 -21
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_title.js +0 -37
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/index.js +0 -112
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_block.js +0 -63
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_core.js +0 -34
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_inline.js +0 -96
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/commonmark.js +0 -78
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/default.js +0 -40
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/zero.js +0 -59
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/renderer.js +0 -127
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/ruler.js +0 -95
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/blockquote.js +0 -59
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/code.js +0 -23
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/fence.js +0 -30
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/heading.js +0 -28
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/hr.js +0 -27
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/html_block.js +0 -37
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/lheading.js +0 -43
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/list.js +0 -110
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/paragraph.js +0 -25
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/reference.js +0 -95
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/state_block.js +0 -84
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/table.js +0 -99
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/block.js +0 -7
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/inline.js +0 -10
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/linkify.js +0 -57
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/normalize.js +0 -9
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/replacements.js +0 -31
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/smartquotes.js +0 -80
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/state_core.js +0 -8
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/text_join.js +0 -16
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/autolink.js +0 -46
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/backticks.js +0 -31
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/balance_pairs.js +0 -34
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/emphasis.js +0 -57
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/entity.js +0 -33
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/escape.js +0 -32
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/fragments_join.js +0 -10
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/html_inline.js +0 -32
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/image.js +0 -48
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/link.js +0 -40
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/linkify.js +0 -28
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/newline.js +0 -23
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/state_inline.js +0 -27
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/strikethrough.js +0 -54
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/text.js +0 -39
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/token.js +0 -31
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.js +0 -10
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.js +0 -61
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.js +0 -48
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.js +0 -7
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.js +0 -74
- package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.js +0 -139
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.js +0 -14
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.js +0 -4
- package/dist/packages/components/src/action-group/ActionGroup.vue.js +0 -7
- package/dist/packages/components/src/action-group/ActionGroup.vue2.js +0 -97
- package/dist/packages/components/src/action-group/ActionGroupItem.vue.js +0 -14
- package/dist/packages/components/src/action-group/ActionGroupItem.vue2.js +0 -4
- package/dist/packages/components/src/action-group/index.js +0 -17
- package/dist/packages/components/src/assets/icons/accessory.svg.js +0 -4
- package/dist/packages/components/src/assets/icons/loading-speech.svg.js +0 -4
- package/dist/packages/components/src/assets/icons/loading.svg.js +0 -4
- package/dist/packages/components/src/assets/icons/send.svg.js +0 -4
- package/dist/packages/components/src/assets/icons/voice.svg.js +0 -4
- package/dist/packages/components/src/bubble/bubble-list.vue.js +0 -7
- package/dist/packages/components/src/bubble/bubble-list.vue2.js +0 -37
- package/dist/packages/components/src/bubble/bubble.vue.js +0 -7
- package/dist/packages/components/src/bubble/bubble.vue2.js +0 -118
- package/dist/packages/components/src/bubble/components/actions/copy.vue.js +0 -7
- package/dist/packages/components/src/bubble/components/actions/copy.vue2.js +0 -35
- package/dist/packages/components/src/bubble/components/actions/refresh.vue.js +0 -7
- package/dist/packages/components/src/bubble/components/actions/refresh.vue2.js +0 -16
- package/dist/packages/components/src/bubble/index.js +0 -18
- package/dist/packages/components/src/bubble/useScroll.js +0 -13
- package/dist/packages/components/src/container/index.js +0 -9
- package/dist/packages/components/src/container/index.vue.js +0 -7
- package/dist/packages/components/src/container/index.vue2.js +0 -55
- package/dist/packages/components/src/conversations/index.js +0 -9
- package/dist/packages/components/src/conversations/index.vue.js +0 -9
- package/dist/packages/components/src/feedback/components/SourceList.vue.js +0 -7
- package/dist/packages/components/src/feedback/components/SourceList.vue2.js +0 -52
- package/dist/packages/components/src/feedback/index.js +0 -9
- package/dist/packages/components/src/feedback/index.vue.js +0 -7
- package/dist/packages/components/src/feedback/index.vue2.js +0 -142
- package/dist/packages/components/src/history/components/item-tag.vue.js +0 -7
- package/dist/packages/components/src/history/components/item-tag.vue2.js +0 -21
- package/dist/packages/components/src/history/components/search-empty.vue.js +0 -7
- package/dist/packages/components/src/history/components/search-empty.vue2.js +0 -20
- package/dist/packages/components/src/history/composables/useEditItemTitle.js +0 -43
- package/dist/packages/components/src/history/index.js +0 -11
- package/dist/packages/components/src/history/index.vue.js +0 -7
- package/dist/packages/components/src/history/index.vue2.js +0 -130
- package/dist/packages/components/src/icon-button/index.js +0 -9
- package/dist/packages/components/src/icon-button/index.vue.js +0 -7
- package/dist/packages/components/src/icon-button/index.vue2.js +0 -40
- package/dist/packages/components/src/prompts/index.js +0 -18
- package/dist/packages/components/src/prompts/prompt.vue.js +0 -7
- package/dist/packages/components/src/prompts/prompt.vue2.js +0 -39
- package/dist/packages/components/src/prompts/prompts.vue.js +0 -7
- package/dist/packages/components/src/prompts/prompts.vue2.js +0 -36
- package/dist/packages/components/src/question/components/CommonQuestions.vue.js +0 -89
- package/dist/packages/components/src/question/components/CommonQuestions.vue2.js +0 -4
- package/dist/packages/components/src/question/components/HotQuestions.vue.js +0 -140
- package/dist/packages/components/src/question/components/HotQuestions.vue2.js +0 -4
- package/dist/packages/components/src/question/composables/useQuestions.js +0 -48
- package/dist/packages/components/src/question/index.js +0 -9
- package/dist/packages/components/src/question/index.vue.js +0 -113
- package/dist/packages/components/src/question/index.vue2.js +0 -4
- package/dist/packages/components/src/sender/components/ActionButtons.vue.js +0 -143
- package/dist/packages/components/src/sender/components/ActionButtons.vue2.js +0 -4
- package/dist/packages/components/src/sender/components/TemplateEditor.vue.js +0 -7
- package/dist/packages/components/src/sender/components/TemplateEditor.vue2.js +0 -121
- package/dist/packages/components/src/sender/composables/useInputHandler.js +0 -38
- package/dist/packages/components/src/sender/composables/useKeyboardHandler.js +0 -31
- package/dist/packages/components/src/sender/composables/useSpeechHandler.js +0 -67
- package/dist/packages/components/src/sender/index.js +0 -9
- package/dist/packages/components/src/sender/index.vue.js +0 -255
- package/dist/packages/components/src/sender/index.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/components/CategoryNav.vue.js +0 -38
- package/dist/packages/components/src/suggestion/components/CategoryNav.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue.js +0 -107
- package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue.js +0 -123
- package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/composables/useKeyboardNavigation.js +0 -45
- package/dist/packages/components/src/suggestion/composables/useTriggerDetection.js +0 -17
- package/dist/packages/components/src/suggestion/index.js +0 -9
- package/dist/packages/components/src/suggestion/index.vue.js +0 -179
- package/dist/packages/components/src/suggestion/index.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/utils/dom.js +0 -18
- package/dist/packages/components/src/welcome/index.js +0 -9
- package/dist/packages/components/src/welcome/index.vue.js +0 -7
- package/dist/packages/components/src/welcome/index.vue2.js +0 -32
- package/dist/prompts/index.d.ts +0 -12
- package/dist/prompts/index.type.d.ts +0 -55
- package/dist/prompts/prompt.vue.d.ts +0 -3
- package/dist/prompts/prompts.vue.d.ts +0 -20
- package/dist/question/components/CommonQuestions.vue.d.ts +0 -32
- package/dist/question/components/HotQuestions.vue.d.ts +0 -89
- package/dist/question/composables/useQuestions.d.ts +0 -17
- package/dist/question/index.d.ts +0 -7
- package/dist/question/index.type.d.ts +0 -74
- package/dist/question/index.vue.d.ts +0 -46
- package/dist/sender/components/ActionButtons.vue.d.ts +0 -25
- package/dist/sender/components/TemplateEditor.vue.d.ts +0 -18
- package/dist/sender/composables/useInputHandler.d.ts +0 -17
- package/dist/sender/composables/useKeyboardHandler.d.ts +0 -18
- package/dist/sender/composables/useSpeechHandler.d.ts +0 -8
- package/dist/sender/index.d.ts +0 -7
- package/dist/sender/index.type.d.ts +0 -137
- package/dist/sender/index.vue.d.ts +0 -1012
- package/dist/suggestion/components/CategoryNav.vue.d.ts +0 -45
- package/dist/suggestion/components/SuggestionCapsule.vue.d.ts +0 -32
- package/dist/suggestion/components/SuggestionPanel.vue.d.ts +0 -84
- package/dist/suggestion/composables/useKeyboardNavigation.d.ts +0 -18
- package/dist/suggestion/composables/useSuggestionFilter.d.ts +0 -10
- package/dist/suggestion/composables/useTriggerDetection.d.ts +0 -11
- package/dist/suggestion/index.d.ts +0 -7
- package/dist/suggestion/index.type.d.ts +0 -94
- package/dist/suggestion/index.vue.d.ts +0 -343
- package/dist/suggestion/utils/dom.d.ts +0 -20
- package/dist/welcome/index.d.ts +0 -7
- package/dist/welcome/index.type.d.ts +0 -10
- package/dist/welcome/index.vue.d.ts +0 -18
- package/src/action-group/ActionGroup.vue +0 -232
- package/src/action-group/ActionGroupItem.vue +0 -9
- package/src/action-group/index.ts +0 -25
- package/src/action-group/index.type.ts +0 -20
- package/src/assets/icons/accessory.svg +0 -12
- package/src/assets/icons/loading-speech.svg +0 -16
- package/src/assets/icons/loading.svg +0 -17
- package/src/assets/icons/send.svg +0 -21
- package/src/assets/icons/voice.svg +0 -22
- package/src/bubble/bubble-list.vue +0 -42
- package/src/bubble/bubble.vue +0 -237
- package/src/bubble/components/actions/copy.vue +0 -54
- package/src/bubble/components/actions/index.ts +0 -2
- package/src/bubble/components/actions/refresh.vue +0 -31
- package/src/bubble/index.ts +0 -23
- package/src/bubble/index.type.ts +0 -63
- package/src/bubble/useScroll.ts +0 -14
- package/src/container/index.ts +0 -12
- package/src/container/index.type.ts +0 -17
- package/src/container/index.vue +0 -134
- package/src/conversations/index.ts +0 -12
- package/src/conversations/index.vue +0 -3
- package/src/feedback/components/SourceList.vue +0 -112
- package/src/feedback/components/index.ts +0 -1
- package/src/feedback/index.ts +0 -12
- package/src/feedback/index.type.ts +0 -27
- package/src/feedback/index.vue +0 -166
- package/src/history/components/index.ts +0 -2
- package/src/history/components/item-tag.vue +0 -49
- package/src/history/components/search-empty.vue +0 -38
- package/src/history/composables/index.ts +0 -1
- package/src/history/composables/useEditItemTitle.ts +0 -75
- package/src/history/index.ts +0 -12
- package/src/history/index.type.ts +0 -50
- package/src/history/index.vue +0 -292
- package/src/icon-button/index.ts +0 -12
- package/src/icon-button/index.type.ts +0 -8
- package/src/icon-button/index.vue +0 -52
- package/src/index.ts +0 -76
- package/src/prompts/index.ts +0 -25
- package/src/prompts/index.type.ts +0 -59
- package/src/prompts/prompt.vue +0 -101
- package/src/prompts/prompts.vue +0 -50
- package/src/question/components/CommonQuestions.vue +0 -146
- package/src/question/components/HotQuestions.vue +0 -148
- package/src/question/composables/useQuestions.ts +0 -106
- package/src/question/index.less +0 -447
- package/src/question/index.ts +0 -12
- package/src/question/index.type.ts +0 -86
- package/src/question/index.vue +0 -140
- package/src/question/vars.less +0 -135
- package/src/sender/components/ActionButtons.vue +0 -168
- package/src/sender/components/TemplateEditor.vue +0 -274
- package/src/sender/composables/useInputHandler.ts +0 -74
- package/src/sender/composables/useKeyboardHandler.ts +0 -101
- package/src/sender/composables/useSpeechHandler.ts +0 -122
- package/src/sender/index.less +0 -352
- package/src/sender/index.ts +0 -12
- package/src/sender/index.type.ts +0 -162
- package/src/sender/index.vue +0 -338
- package/src/sender/vars.less +0 -84
- package/src/suggestion/components/CategoryNav.vue +0 -38
- package/src/suggestion/components/SuggestionCapsule.vue +0 -183
- package/src/suggestion/components/SuggestionPanel.vue +0 -147
- package/src/suggestion/composables/useKeyboardNavigation.ts +0 -101
- package/src/suggestion/composables/useSuggestionFilter.ts +0 -34
- package/src/suggestion/composables/useTriggerDetection.ts +0 -46
- package/src/suggestion/index.less +0 -497
- package/src/suggestion/index.ts +0 -12
- package/src/suggestion/index.type.ts +0 -101
- package/src/suggestion/index.vue +0 -338
- package/src/suggestion/utils/dom.ts +0 -66
- package/src/suggestion/vars.less +0 -141
- package/src/vite-env.d.ts +0 -1
- package/src/welcome/index.ts +0 -12
- package/src/welcome/index.type.ts +0 -12
- package/src/welcome/index.vue +0 -69
- package/tsconfig.json +0 -37
- package/tsconfig.node.json +0 -10
- package/vite.config.ts +0 -53
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
import { ref as _, watch as A, reactive as a0, defineComponent as t0, computed as x, resolveComponent as r0, createElementBlock as y, openBlock as u, createBlock as M, createCommentVNode as S, withCtx as B, createVNode as T, unref as k, createElementVNode as R, normalizeClass as O, resolveDynamicComponent as c0, nextTick as s0, onMounted as d0, Fragment as e0, renderList as n0, toDisplayString as j, withModifiers as u0, Transition as Y, renderSlot as q, isRef as f0, normalizeStyle as p0 } from "vue";
|
|
2
|
+
import { I as h0 } from "../index5.js";
|
|
3
|
+
import { B as Q } from "../index3.js";
|
|
4
|
+
import { i as m0 } from "../close.js";
|
|
5
|
+
import { _ as g0 } from "../_plugin-vue_export-helper.js";
|
|
6
|
+
function y0(o, f) {
|
|
7
|
+
const c = _(o.modelValue || o.defaultValue || ""), a = _(null);
|
|
8
|
+
A(
|
|
9
|
+
() => o.modelValue,
|
|
10
|
+
(d) => {
|
|
11
|
+
d !== void 0 && d !== c.value && (c.value = d);
|
|
12
|
+
}
|
|
13
|
+
), A(
|
|
14
|
+
() => c.value,
|
|
15
|
+
(d) => {
|
|
16
|
+
f("update:modelValue", d);
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
const p = (d) => {
|
|
20
|
+
c.value = d, f("update:modelValue", d);
|
|
21
|
+
}, v = (d) => {
|
|
22
|
+
d == null || d.preventDefault();
|
|
23
|
+
const w = c.value;
|
|
24
|
+
!o.disabled && !o.loading && w.trim() && f("submit", w);
|
|
25
|
+
}, i = () => {
|
|
26
|
+
c.value = "", f("update:modelValue", ""), f("clear");
|
|
27
|
+
}, l = _(!1);
|
|
28
|
+
return {
|
|
29
|
+
inputValue: c,
|
|
30
|
+
inputWrapper: a,
|
|
31
|
+
isComposing: l,
|
|
32
|
+
handleChange: p,
|
|
33
|
+
handleSubmit: v,
|
|
34
|
+
handleClear: i,
|
|
35
|
+
clearInput: () => {
|
|
36
|
+
i();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function v0(o, f, c, a, p, v, i) {
|
|
41
|
+
const l = (s) => !o.disabled && !o.loading && s.trim().length > 0, h = () => {
|
|
42
|
+
l(c.value) && f("submit", c.value.trim());
|
|
43
|
+
}, d = (s, g) => {
|
|
44
|
+
if (!(s.key === "Enter")) return !1;
|
|
45
|
+
switch (g) {
|
|
46
|
+
case "enter":
|
|
47
|
+
return !s.shiftKey && !s.ctrlKey && !s.metaKey;
|
|
48
|
+
case "ctrlEnter":
|
|
49
|
+
return (s.ctrlKey || s.metaKey) && !s.shiftKey;
|
|
50
|
+
case "shiftEnter":
|
|
51
|
+
return s.shiftKey && !s.ctrlKey && !s.metaKey;
|
|
52
|
+
default:
|
|
53
|
+
return !1;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
return {
|
|
57
|
+
handleKeyPress: (s) => {
|
|
58
|
+
if (a.value) return;
|
|
59
|
+
if (s.key === "Escape") {
|
|
60
|
+
v.value ? (v.value = !1, s.preventDefault()) : p.isRecording && (i(), s.preventDefault()), f("escape-press");
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
d(s, o.submitType) && l(c.value) && (s.preventDefault(), h());
|
|
64
|
+
},
|
|
65
|
+
triggerSubmit: h
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function C0(o) {
|
|
69
|
+
const f = a0({
|
|
70
|
+
isRecording: !1,
|
|
71
|
+
isSupported: typeof window < "u" && "webkitSpeechRecognition" in window || "SpeechRecognition" in window,
|
|
72
|
+
error: void 0
|
|
73
|
+
}), c = f.isSupported ? new (window.webkitSpeechRecognition || window.SpeechRecognition)() : void 0;
|
|
74
|
+
c !== void 0 && (c.continuous = o.continuous ?? !1, c.interimResults = o.interimResults ?? !0, c.lang = o.lang ?? navigator.language, c.onstart = () => {
|
|
75
|
+
var i;
|
|
76
|
+
f.isRecording = !0, f.error = void 0, (i = o.onStart) == null || i.call(o);
|
|
77
|
+
}, c.onend = () => {
|
|
78
|
+
var i;
|
|
79
|
+
f.isRecording = !1, (i = o.onEnd) == null || i.call(o);
|
|
80
|
+
}, c.onresult = (i) => {
|
|
81
|
+
var h, d;
|
|
82
|
+
const l = Array.from(i.results).map((w) => w[0].transcript).join("");
|
|
83
|
+
i.results[0].isFinal ? (h = o.onFinal) == null || h.call(o, l) : (d = o.onInterim) == null || d.call(o, l);
|
|
84
|
+
}, c.onerror = (i) => {
|
|
85
|
+
var l;
|
|
86
|
+
f.error = new Error(i.error), f.isRecording = !1, (l = o.onError) == null || l.call(o, f.error);
|
|
87
|
+
});
|
|
88
|
+
const a = () => {
|
|
89
|
+
var i;
|
|
90
|
+
if (!c) {
|
|
91
|
+
const l = new Error("浏览器不支持语音识别");
|
|
92
|
+
f.error = l, (i = o.onError) == null || i.call(o, l);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (f.isRecording) {
|
|
96
|
+
try {
|
|
97
|
+
c.stop(), setTimeout(() => {
|
|
98
|
+
try {
|
|
99
|
+
c.start();
|
|
100
|
+
} catch (l) {
|
|
101
|
+
v(l);
|
|
102
|
+
}
|
|
103
|
+
}, 100);
|
|
104
|
+
} catch (l) {
|
|
105
|
+
v(l);
|
|
106
|
+
}
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
try {
|
|
110
|
+
c.start();
|
|
111
|
+
} catch (l) {
|
|
112
|
+
v(l);
|
|
113
|
+
}
|
|
114
|
+
}, p = () => {
|
|
115
|
+
if (c && f.isRecording)
|
|
116
|
+
try {
|
|
117
|
+
c.stop();
|
|
118
|
+
} catch (i) {
|
|
119
|
+
v(i);
|
|
120
|
+
}
|
|
121
|
+
}, v = (i) => {
|
|
122
|
+
var l;
|
|
123
|
+
f.error = i instanceof Error ? i : new Error("语音识别操作失败"), f.isRecording = !1, (l = o.onError) == null || l.call(o, f.error);
|
|
124
|
+
};
|
|
125
|
+
return {
|
|
126
|
+
speechState: f,
|
|
127
|
+
start: a,
|
|
128
|
+
stop: p
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
const L0 = "data:image/svg+xml,%3csvg%20width='32.000000'%20height='32.000000'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdesc%3e%20Created%20with%20Pixso.%20%3c/desc%3e%3cdefs/%3e%3crect%20id='矩形'%20rx='8.000000'%20width='32.000000'%20height='32.000000'%20fill='%23000000'%20fill-opacity='0'/%3e%3crect%20id='矩形'%20x='0.500000'%20y='0.500000'%20rx='8.000000'%20width='31.000000'%20height='31.000000'%20stroke='%23979797'%20stroke-opacity='0'%20stroke-width='1.000000'/%3e%3crect%20id='矩形'%20x='4.000000'%20y='4.000000'%20width='24.000000'%20height='24.000000'%20fill='%23D8D8D8'%20fill-opacity='0'/%3e%3crect%20id='矩形'%20x='4.500000'%20y='4.500000'%20width='23.000000'%20height='23.000000'%20stroke='%23979797'%20stroke-opacity='0'%20stroke-width='1.000000'/%3e%3cpath%20id='路径%203'%20d='M13.37%2010.32L13.23%2010.26L15.44%2011.19L12.61%2018.98C12.2%2020.11%2012.81%2021.36%2013.95%2021.72C15.04%2022.07%2016.2%2021.5%2016.59%2020.43L19.35%2012.85L18.8%2012.65L18.79%2012.62C18.79%2012.61%2018.8%2012.61%2018.8%2012.6L15.44%2011.19L15.83%2010.14C16.49%208.31%2018.52%207.37%2020.35%208.03C22.18%208.7%2023.12%2010.72%2022.46%2012.55L19.15%2021.65C18.21%2024.21%2015.38%2025.54%2012.82%2024.6C10.25%2023.67%208.93%2020.83%209.86%2018.27L12.83%2010.12L12.28%209.92L12.27%209.9C12.39%209.58%2012.73%209.42%2013.04%209.54C13.36%209.65%2013.52%209.99%2013.4%2010.31L13.37%2010.32Z'%20fill='%23D8D8D8'%20fill-opacity='0'%20fill-rule='evenodd'/%3e%3cpath%20id='路径%203'%20d='M12.84%2010.1L9.86%2018.27C8.93%2020.83%2010.25%2023.67%2012.82%2024.6C15.38%2025.54%2018.21%2024.21%2019.15%2021.65L22.46%2012.55C23.12%2010.72%2022.18%208.7%2020.35%208.03C18.52%207.37%2016.49%208.31%2015.83%2010.14L12.61%2018.98C12.2%2020.11%2012.81%2021.36%2013.95%2021.72C15.04%2022.07%2016.2%2021.5%2016.59%2020.43L19.35%2012.83'%20stroke='%23595959'%20stroke-opacity='1.000000'%20stroke-width='1.200000'%20stroke-linecap='round'/%3e%3c/svg%3e", w0 = "data:image/svg+xml,%3csvg%20width='32.000000'%20height='32.000000'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdesc%3e%20Created%20with%20Pixso.%20%3c/desc%3e%3cdefs%3e%3clinearGradient%20x1='12.999998'%20y1='21.128080'%20x2='20.000002'%20y2='6.999999'%20id='paint_linear_447_301_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23E280FF'/%3e%3cstop%20offset='0.517615'%20stop-color='%236686FF'/%3e%3cstop%20offset='1.000000'%20stop-color='%234DDDFF'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20id='矩形'%20rx='8.000000'%20width='32.000000'%20height='32.000000'%20fill='%23000000'%20fill-opacity='0'/%3e%3crect%20id='矩形'%20x='0.500000'%20y='0.500000'%20rx='8.000000'%20width='31.000000'%20height='31.000000'%20stroke='%23979797'%20stroke-opacity='0'%20stroke-width='1.000000'/%3e%3crect%20id='矩形'%20x='4.000000'%20y='4.000000'%20width='24.000000'%20height='24.000000'%20fill='%23D8D8D8'%20fill-opacity='0'/%3e%3crect%20id='矩形'%20x='4.500000'%20y='4.500000'%20width='23.000000'%20height='23.000000'%20stroke='%23979797'%20stroke-opacity='0'%20stroke-width='1.000000'/%3e%3crect%20id='矩形'%20x='13.000000'%20y='7.000000'%20rx='3.500000'%20width='7.000000'%20height='11.000000'%20fill='url(%23paint_linear_447_301_0)'%20fill-opacity='0'/%3e%3crect%20id='矩形'%20x='13.000000'%20y='7.000000'%20rx='3.500000'%20width='7.000000'%20height='11.000000'%20stroke='%23595959'%20stroke-opacity='1.000000'%20stroke-width='1.200000'%20stroke-linejoin='round'/%3e%3cpath%20id='路径'%20d='M8.41%2014.02L8.39%2014C8.39%2013.66%208.66%2013.4%209%2013.4C9.33%2013.4%209.6%2013.66%209.6%2014L23.39%2014C23.39%2013.66%2023.66%2013.4%2024%2013.4C24.33%2013.4%2024.6%2013.66%2024.6%2014L24.58%2014.02L24%2014.02C23.98%2018.42%2020.63%2022%2016.5%2022C12.36%2022%209.01%2018.42%209%2014.02L8.41%2014.02Z'%20fill='%23D8D8D8'%20fill-opacity='0'%20fill-rule='evenodd'/%3e%3cpath%20id='路径'%20d='M9%2014C9%2018.41%2012.35%2022%2016.5%2022C20.64%2022%2024%2018.41%2024%2014'%20stroke='%23595959'%20stroke-opacity='1.000000'%20stroke-width='1.200000'%20stroke-linecap='round'/%3e%3cpath%20id='路径%202'%20d='M15.91%2022.6L15.89%2022.58C15.89%2022.24%2016.16%2021.98%2016.5%2021.98C16.83%2021.98%2017.1%2022.24%2017.1%2022.58L17.08%2022.6L15.91%2022.6ZM17.08%2025.34L17.1%2025.36C17.1%2025.7%2016.83%2025.96%2016.5%2025.96C16.16%2025.96%2015.89%2025.7%2015.89%2025.36L15.91%2025.34L17.08%2025.34Z'%20fill='%23D8D8D8'%20fill-opacity='0'%20fill-rule='nonzero'/%3e%3cpath%20id='路径%202'%20d='M16.5%2022.58L16.5%2025.36'%20stroke='%23595959'%20stroke-opacity='1.000000'%20stroke-width='1.200000'%20stroke-linecap='round'/%3e%3c/svg%3e", k0 = "data:image/svg+xml,%3csvg%20width='152.343506'%20height='18.000000'%20viewBox='0%200%20152.344%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdesc%3e%20Created%20with%20Pixso.%20%3c/desc%3e%3cdefs%3e%3clinearGradient%20x1='159.655945'%20y1='6.532532'%20x2='-2.217805'%20y2='3.665466'%20id='paint_linear_498_7491_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23E6FF7D'%20stop-opacity='0.200000'/%3e%3cstop%20offset='0.264015'%20stop-color='%23FFB22E'%20stop-opacity='0.200000'/%3e%3cstop%20offset='0.522782'%20stop-color='%2397A7FF'%20stop-opacity='0.258824'/%3e%3cstop%20offset='0.702223'%20stop-color='%2376ADFF'%20stop-opacity='0.400000'/%3e%3cstop%20offset='0.830214'%20stop-color='%2367D1FF'%20stop-opacity='0.301961'/%3e%3cstop%20offset='1.000000'%20stop-color='%23D27EFF'%20stop-opacity='0.090196'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20id='Fill%203'%20d='M9.52%209.61C12.69%209.9%2015.86%2010.31%2019.04%2010.74C20.63%2010.94%2022.21%2011.28%2023.8%2011.78C25.39%2012.26%2026.97%2012.84%2028.56%2013.26C30.15%2013.67%2031.73%2013.89%2033.32%2013.89C34.11%2013.88%2034.91%2013.69%2035.7%2013.33C36.49%2012.98%2037.29%2012.49%2038.08%2012.06C38.87%2011.63%2039.67%2011.29%2040.46%2011.19C40.86%2011.13%2041.25%2011.13%2041.65%2011.17C42.05%2011.22%2042.45%2011.31%2042.84%2011.39C44.43%2011.75%2046.02%2012.36%2047.6%2013.19C50.78%2014.81%2053.95%2016.29%2057.12%2017.28C60.3%2018.29%2063.47%2018.26%2066.65%2016.96C69.82%2015.68%2072.99%2014.04%2076.17%2012.73C79.34%2011.4%2082.51%2011.19%2085.69%2011.85C88.86%2012.53%2092.04%2014.04%2095.21%2014.41C96%2014.51%2096.8%2014.56%2097.59%2014.56C98.38%2014.55%2099.18%2014.5%2099.97%2014.46C101.56%2014.35%20103.14%2014.18%20104.73%2013.94C107.91%2013.45%20111.08%2012.64%20114.25%2011.93C117.43%2011.19%20120.6%2010.62%20123.77%2010.26C126.95%209.88%20130.12%209.49%20133.3%209.28C136.47%209.06%20139.64%209%20142.82%209L152.34%209L142.82%209C139.64%208.99%20136.47%208.93%20133.3%208.71C130.12%208.5%20126.95%208.11%20123.77%207.73C120.6%207.37%20117.43%206.8%20114.25%206.06C111.08%205.35%20107.91%204.54%20104.73%204.05C103.14%203.81%20101.56%203.64%2099.97%203.53C99.18%203.49%2098.38%203.44%2097.59%203.43C96.8%203.43%2096%203.48%2095.21%203.58C92.04%203.95%2088.86%205.46%2085.69%206.14C82.51%206.8%2079.34%206.59%2076.17%205.26C72.99%203.95%2069.82%202.31%2066.65%201.03C63.47%20-0.27%2060.3%20-0.31%2057.12%200.71C53.95%201.7%2050.78%203.18%2047.6%204.8C46.02%205.63%2044.43%206.24%2042.84%206.6C42.45%206.68%2042.05%206.77%2041.65%206.82C41.25%206.86%2040.86%206.86%2040.46%206.8C39.67%206.7%2038.87%206.36%2038.08%205.93C37.29%205.51%2036.49%205.01%2035.7%204.66C34.91%204.3%2034.11%204.11%2033.32%204.1C31.73%204.1%2030.15%204.32%2028.56%204.73C26.97%205.15%2025.39%205.73%2023.8%206.21C22.21%206.71%2020.63%207.05%2019.04%207.25C15.86%207.68%2012.69%208.09%209.52%208.38C6.34%208.69%203.17%208.94%200%209C3.17%209.05%206.34%209.3%209.52%209.61Z'%20fill='url(%23paint_linear_498_7491_0)'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3c/svg%3e", _0 = "data:image/svg+xml,%3csvg%20width='36'%20height='36'%20viewBox='0%200%2036%2036'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdesc%3e%20Created%20with%20Pixso.%20%3c/desc%3e%3cdefs%3e%3cfilter%20id='filter_447_4247_dd'%20x='0'%20y='0'%20width='36'%20height='36'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dx='0'%20dy='2'/%3e%3cfeGaussianBlur%20stdDeviation='1.66667'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'%20k2='-1'%20k3='1'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.039%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect_dropShadow_1'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect_dropShadow_1'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3cg%20filter='url(%23filter_447_4247_dd)'%3e%3crect%20id='Rectangle'%20x='0'%20y='0'%20rx='18'%20width='36'%20height='36'%20fill='%231476FF'%20fill-opacity='1'/%3e%3c/g%3e%3cpath%20id='Fill%201'%20d='M26.38%208.7L7.99%2017.45C7.59%2017.64%207.58%2018.21%207.98%2018.4L12.56%2020.7C12.78%2020.81%2013.05%2020.77%2013.23%2020.62L23.54%2011.95C23.71%2011.81%2023.94%2012.05%2023.78%2012.21L14.9%2021.42C14.72%2021.61%2014.63%2021.87%2014.66%2022.14L15.21%2026.9C15.26%2027.36%2015.83%2027.54%2016.14%2027.19L18.36%2024.65C18.49%2024.5%2018.46%2024.25%2018.29%2024.13L16.45%2022.88C16.34%2022.81%2016.44%2022.64%2016.56%2022.7L19%2023.92L21.87%2025.35C22.17%2025.5%2022.52%2025.35%2022.62%2025.03L27.44%209.62C27.64%208.98%2026.98%208.41%2026.38%208.7Z'%20fill='%23FFFFFF'%20fill-opacity='1'%20fill-rule='evenodd'/%3e%3c/svg%3e", b0 = "data:image/svg+xml,%3csvg%20width='102.000000'%20height='36.000000'%20viewBox='0%200%20102%2036'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdesc%3e%20Created%20with%20Pixso.%20%3c/desc%3e%3cdefs/%3e%3crect%20id='沉浸式/输入框/停止生成按钮'%20rx='18.000000'%20width='102.000000'%20height='36.000000'%20fill='%231476FF'%20fill-opacity='0.060000'/%3e%3cpath%20id='停止回答'%20d='M79.96%2013.66L78.75%2013.66C78.4%2014.31%2078.01%2014.92%2077.56%2015.46L76.71%2014.92C77.59%2013.85%2078.23%2012.69%2078.63%2011.42L79.59%2011.63C79.47%2012.01%2079.33%2012.37%2079.19%2012.73L82.95%2012.73L82.95%2013.66L80.98%2013.66C81.25%2014.1%2081.47%2014.53%2081.64%2014.92L80.73%2015.25C80.5%2014.69%2080.24%2014.16%2079.96%2013.66ZM85.88%2013.66L84.54%2013.66C84.28%2014.09%2084%2014.5%2083.71%2014.89L82.87%2014.37C83.6%2013.49%2084.12%2012.51%2084.44%2011.43L85.4%2011.64C85.28%2012.03%2085.14%2012.4%2085%2012.73L89.2%2012.73L89.2%2013.66L86.93%2013.66C87.26%2014.19%2087.54%2014.69%2087.76%2015.14L86.84%2015.46Q86.42%2014.52%2085.88%2013.66ZM34.48%2017.26C35.8%2015.57%2036.77%2013.64%2037.37%2011.49L38.31%2011.92C37.98%2012.96%2037.59%2013.95%2037.13%2014.87L37.13%2024.4L36.11%2024.4L36.11%2016.62C35.72%2017.21%2035.28%2017.79%2034.82%2018.32L34.48%2017.26ZM41.56%2011.65L42.58%2011.49C42.72%2011.84%2042.84%2012.24%2042.98%2012.69L46.97%2012.69L46.97%2013.59L38.31%2013.59L38.31%2012.69L41.98%2012.69C41.85%2012.33%2041.71%2011.98%2041.56%2011.65ZM55.09%2022.81L55.09%2011.63L56.13%2011.63L56.13%2016.18L60.44%2016.18L60.44%2017.16L56.13%2017.16L56.13%2022.81L61.21%2022.81L61.21%2023.79L48.78%2023.79L48.78%2022.81L51.16%2022.81L51.16%2014.08L52.17%2014.08L52.17%2022.81L55.09%2022.81ZM63.38%2012.4L74.61%2012.4L74.61%2024.17L73.63%2024.17L73.63%2023.57L64.36%2023.57L64.36%2024.17L63.38%2024.17L63.38%2012.4ZM64.36%2013.29L64.36%2022.67L73.63%2022.67L73.63%2013.29L64.36%2013.29ZM39.23%2017.04L39.23%2014.4L45.9%2014.4L45.9%2017.04L39.23%2017.04ZM79.78%2018.65L79.78%2018.03C78.96%2018.46%2078.08%2018.87%2077.14%2019.24L76.67%2018.36C79.06%2017.46%2081.05%2016.34%2082.65%2015.01L83.32%2015.01C85.08%2016.44%2087.11%2017.56%2089.41%2018.39L88.92%2019.26C87.96%2018.89%2087.07%2018.47%2086.24%2018.03L86.24%2018.65L79.78%2018.65ZM40.21%2016.28L44.92%2016.28L44.92%2015.17L40.21%2015.17L40.21%2016.28ZM66.31%2020.45L66.31%2015.46L71.71%2015.46L71.71%2020.45L66.31%2020.45ZM80.32%2017.72L85.7%2017.72C84.7%2017.14%2083.79%2016.5%2082.98%2015.8C82.21%2016.48%2081.33%2017.13%2080.32%2017.72ZM67.25%2019.59L70.76%2019.59L70.76%2016.33L67.25%2016.33L67.25%2019.59ZM38.18%2017.86L47%2017.86L47%2020.25L46.25%2020.25L46.25%2020.88L43.22%2020.88L43.22%2023.15C43.22%2023.9%2042.8%2024.3%2041.99%2024.3L40.41%2024.3L40.2%2023.32C40.7%2023.34%2041.18%2023.37%2041.64%2023.37C42%2023.37%2042.18%2023.2%2042.18%2022.9L42.18%2020.88L39.12%2020.88L39.12%2020.25L38.18%2020.25L38.18%2017.86ZM39.16%2018.74L39.16%2020.01L46.04%2020.01L46.04%2018.74L39.16%2018.74ZM78.81%2019.96L87.18%2019.96L87.18%2024.38L86.21%2024.38L86.21%2023.75L79.78%2023.75L79.78%2024.38L78.81%2024.38L78.81%2019.96ZM79.78%2020.88L79.78%2022.83L86.21%2022.83L86.21%2020.88L79.78%2020.88Z'%20fill='%231476FF'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3crect%20id='矩形'%20x='7.713867'%20y='7.714844'%20width='20.571428'%20height='20.571428'%20fill='%23D8D8D8'%20fill-opacity='0'/%3e%3crect%20id='矩形'%20x='8.213867'%20y='8.214844'%20width='19.571428'%20height='19.571428'%20stroke='%23979797'%20stroke-opacity='0'%20stroke-width='1.000000'/%3e%3crect%20id='矩形'%20x='6.000000'%20y='6.000000'%20width='24.000000'%20height='24.000000'%20fill='%23D8D8D8'%20fill-opacity='0'/%3e%3crect%20id='矩形'%20x='6.500000'%20y='6.500000'%20width='23.000000'%20height='23.000000'%20stroke='%23979797'%20stroke-opacity='0'%20stroke-width='1.000000'/%3e%3crect%20id='矩形'%20x='14.666992'%20y='14.666016'%20rx='1.500000'%20width='6.666667'%20height='6.666667'%20fill='%231476FF'%20fill-opacity='1.000000'/%3e%3ccircle%20id='椭圆形'%20cx='18.000000'%20cy='18.000000'%20r='8.250000'%20fill='%23D8D8D8'%20fill-opacity='0'/%3e%3ccircle%20id='椭圆形'%20cx='18.000000'%20cy='18.000000'%20r='8.250000'%20stroke='%231476FF'%20stroke-opacity='1.000000'%20stroke-width='1.500000'/%3e%3cpath%20id='路径'%20d='M17.8%2010.47C17.48%2010.39%2017.25%2010.1%2017.25%209.75C17.25%209.33%2017.58%209%2018%209L18.02%209.02L18.02%209.75C22.56%209.76%2026.25%2013.45%2026.25%2018C26.25%2022.55%2022.55%2026.25%2018%2026.25C16.52%2026.25%2015.13%2025.86%2013.93%2025.18L13.57%2025.81L13.54%2025.82C13.18%2025.61%2013.06%2025.16%2013.26%2024.8C13.44%2024.49%2013.78%2024.35%2014.11%2024.44L17.8%2010.47Z'%20fill='%23595959'%20fill-opacity='0'%20fill-rule='evenodd'/%3e%3cpath%20id='路径'%20d='M13.91%2025.17C15.12%2025.85%2016.51%2026.25%2018%2026.25C22.55%2026.25%2026.25%2022.55%2026.25%2018C26.25%2013.44%2022.55%209.75%2018%209.75'%20stroke='%231476FF'%20stroke-opacity='1.000000'%20stroke-width='1.500000'%20stroke-linecap='round'/%3e%3c/svg%3e", F0 = { class: "action-buttons" }, x0 = {
|
|
132
|
+
key: 0,
|
|
133
|
+
src: w0,
|
|
134
|
+
class: "button-icon",
|
|
135
|
+
alt: "录音"
|
|
136
|
+
}, S0 = {
|
|
137
|
+
key: 1,
|
|
138
|
+
src: k0,
|
|
139
|
+
class: "button-icon recording-icon",
|
|
140
|
+
alt: "语音中"
|
|
141
|
+
}, D0 = { class: "button-content" }, E0 = {
|
|
142
|
+
key: 0,
|
|
143
|
+
src: _0,
|
|
144
|
+
alt: "发送"
|
|
145
|
+
}, o0 = /* @__PURE__ */ t0({
|
|
146
|
+
__name: "ActionButtons",
|
|
147
|
+
props: {
|
|
148
|
+
loading: { type: Boolean, default: !1 },
|
|
149
|
+
disabled: { type: Boolean, default: !1 },
|
|
150
|
+
showClear: { type: Boolean, default: !0 },
|
|
151
|
+
hasContent: { type: Boolean, default: !1 },
|
|
152
|
+
allowSpeech: { type: Boolean, default: !1 },
|
|
153
|
+
speechStatus: { default: () => ({
|
|
154
|
+
isRecording: !1,
|
|
155
|
+
isSupported: !1
|
|
156
|
+
}) },
|
|
157
|
+
allowFiles: { type: Boolean, default: !1 },
|
|
158
|
+
submitType: { default: "enter" },
|
|
159
|
+
showShortcuts: { type: Boolean }
|
|
160
|
+
},
|
|
161
|
+
emits: ["clear", "toggle-speech", "submit", "cancel"],
|
|
162
|
+
setup(o, { emit: f }) {
|
|
163
|
+
const c = m0(), a = o, p = f, v = x(() => a.allowSpeech), i = x(() => a.speechStatus.isRecording), l = x(() => a.disabled), h = () => {
|
|
164
|
+
l.value || p("clear");
|
|
165
|
+
}, d = () => {
|
|
166
|
+
if (!l.value) {
|
|
167
|
+
const g = !a.speechStatus.isRecording;
|
|
168
|
+
p("toggle-speech", g);
|
|
169
|
+
}
|
|
170
|
+
}, w = () => {
|
|
171
|
+
l.value || p("submit");
|
|
172
|
+
}, s = () => {
|
|
173
|
+
l.value || p("cancel");
|
|
174
|
+
};
|
|
175
|
+
return (g, F) => {
|
|
176
|
+
const I = r0("tiny-tooltip");
|
|
177
|
+
return u(), y("div", F0, [
|
|
178
|
+
g.allowFiles && !g.loading ? (u(), M(I, {
|
|
179
|
+
key: 0,
|
|
180
|
+
content: "上传文件",
|
|
181
|
+
placement: "top"
|
|
182
|
+
}, {
|
|
183
|
+
default: B(() => [
|
|
184
|
+
T(k(Q), {
|
|
185
|
+
type: "text",
|
|
186
|
+
disabled: l.value
|
|
187
|
+
}, {
|
|
188
|
+
default: B(() => F[1] || (F[1] = [
|
|
189
|
+
R("img", {
|
|
190
|
+
src: L0,
|
|
191
|
+
class: "button-icon",
|
|
192
|
+
alt: "上传文件"
|
|
193
|
+
}, null, -1)
|
|
194
|
+
])),
|
|
195
|
+
_: 1
|
|
196
|
+
}, 8, ["disabled"])
|
|
197
|
+
]),
|
|
198
|
+
_: 1
|
|
199
|
+
})) : S("", !0),
|
|
200
|
+
v.value && !g.loading ? (u(), M(k(Q), {
|
|
201
|
+
key: 1,
|
|
202
|
+
type: "text",
|
|
203
|
+
disabled: l.value,
|
|
204
|
+
onClick: d,
|
|
205
|
+
class: O(["speech-button", { "is-recording": i.value }])
|
|
206
|
+
}, {
|
|
207
|
+
default: B(() => [
|
|
208
|
+
i.value ? (u(), y("img", S0)) : (u(), y("img", x0))
|
|
209
|
+
]),
|
|
210
|
+
_: 1
|
|
211
|
+
}, 8, ["disabled", "class"])) : S("", !0),
|
|
212
|
+
g.showClear ? (u(), M(I, {
|
|
213
|
+
key: 2,
|
|
214
|
+
content: "清空内容",
|
|
215
|
+
placement: "top"
|
|
216
|
+
}, {
|
|
217
|
+
default: B(() => [
|
|
218
|
+
T(k(Q), {
|
|
219
|
+
type: "text",
|
|
220
|
+
disabled: l.value || !g.hasContent,
|
|
221
|
+
onClick: h,
|
|
222
|
+
style: { "margin-left": "0" }
|
|
223
|
+
}, {
|
|
224
|
+
default: B(() => [
|
|
225
|
+
(u(), M(c0(k(c)), { class: "button-icon" }))
|
|
226
|
+
]),
|
|
227
|
+
_: 1
|
|
228
|
+
}, 8, ["disabled"])
|
|
229
|
+
]),
|
|
230
|
+
_: 1
|
|
231
|
+
})) : S("", !0),
|
|
232
|
+
g.hasContent || g.loading ? (u(), M(k(Q), {
|
|
233
|
+
key: 3,
|
|
234
|
+
type: "text",
|
|
235
|
+
class: O(g.loading ? "cancel-button" : "submit-button"),
|
|
236
|
+
disabled: l.value,
|
|
237
|
+
onClick: F[0] || (F[0] = ($) => g.loading ? s() : w())
|
|
238
|
+
}, {
|
|
239
|
+
default: B(() => [
|
|
240
|
+
R("div", D0, [
|
|
241
|
+
g.loading ? (u(), M(I, {
|
|
242
|
+
key: 1,
|
|
243
|
+
content: "停止生成",
|
|
244
|
+
placement: "top"
|
|
245
|
+
}, {
|
|
246
|
+
default: B(() => F[2] || (F[2] = [
|
|
247
|
+
R("img", {
|
|
248
|
+
src: b0,
|
|
249
|
+
alt: "加载中",
|
|
250
|
+
class: "loading"
|
|
251
|
+
}, null, -1)
|
|
252
|
+
])),
|
|
253
|
+
_: 1
|
|
254
|
+
})) : (u(), y("img", E0))
|
|
255
|
+
])
|
|
256
|
+
]),
|
|
257
|
+
_: 1
|
|
258
|
+
}, 8, ["class", "disabled"])) : S("", !0)
|
|
259
|
+
]);
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
}), B0 = { class: "template-editor" }, R0 = { key: 0 }, I0 = ["onClick"], M0 = ["onInput"], $0 = {
|
|
263
|
+
key: 1,
|
|
264
|
+
class: "template-placeholder"
|
|
265
|
+
}, V0 = /* @__PURE__ */ t0({
|
|
266
|
+
__name: "TemplateEditor",
|
|
267
|
+
props: {
|
|
268
|
+
template: {},
|
|
269
|
+
value: {}
|
|
270
|
+
},
|
|
271
|
+
emits: ["update:value", "input", "content-status", "field-active"],
|
|
272
|
+
setup(o, { expose: f, emit: c }) {
|
|
273
|
+
const a = o, p = c, v = _(null), i = _({}), l = _(-1), h = _(!1), d = _(!1), w = _(!1), s = _([]), g = (t) => {
|
|
274
|
+
const n = [];
|
|
275
|
+
let r = 0, C = 0;
|
|
276
|
+
const m = /\[(.*?)\]/g;
|
|
277
|
+
let b;
|
|
278
|
+
for (; (b = m.exec(t)) !== null; )
|
|
279
|
+
b.index > r && n.push({
|
|
280
|
+
content: t.substring(r, b.index),
|
|
281
|
+
isField: !1
|
|
282
|
+
}), n.push({
|
|
283
|
+
content: b[1],
|
|
284
|
+
// 使用占位符作为默认内容
|
|
285
|
+
placeholder: b[1],
|
|
286
|
+
isField: !0,
|
|
287
|
+
fieldIndex: C++
|
|
288
|
+
}), r = b.index + b[0].length;
|
|
289
|
+
return r < t.length && n.push({
|
|
290
|
+
content: t.substring(r),
|
|
291
|
+
isField: !1
|
|
292
|
+
}), n;
|
|
293
|
+
}, F = () => {
|
|
294
|
+
s.value = g(a.template), a.value && I(a.value);
|
|
295
|
+
}, I = (t) => {
|
|
296
|
+
if (!t || w.value || $() === t) return;
|
|
297
|
+
const r = g(a.template), C = [];
|
|
298
|
+
r.forEach((L) => {
|
|
299
|
+
L.isField ? C.push(`__FIELD_${L.fieldIndex}__`) : C.push(L.content);
|
|
300
|
+
});
|
|
301
|
+
let m = t, b = 0;
|
|
302
|
+
for (let L = 0; L < s.value.length; L++) {
|
|
303
|
+
if (!s.value[L].isField) continue;
|
|
304
|
+
const z = C[b];
|
|
305
|
+
b++;
|
|
306
|
+
const e = C[b] || "";
|
|
307
|
+
if (z && m.startsWith(z))
|
|
308
|
+
if (m = m.substring(z.length), e && m.includes(e)) {
|
|
309
|
+
const D = m.indexOf(e), E = m.substring(0, D);
|
|
310
|
+
E && (s.value[L].content = E, l.value === L && i.value[L] && (d.value = !0)), m = m.substring(D);
|
|
311
|
+
} else !e && m && (s.value[L].content = m, m = "");
|
|
312
|
+
}
|
|
313
|
+
Z(t);
|
|
314
|
+
}, $ = () => s.value.map((t) => t.content).join(""), V = () => {
|
|
315
|
+
w.value = !0;
|
|
316
|
+
const t = $();
|
|
317
|
+
p("update:value", t), p("input", t), Z(t), setTimeout(() => {
|
|
318
|
+
w.value = !1;
|
|
319
|
+
}, 0);
|
|
320
|
+
}, Z = (t) => {
|
|
321
|
+
const r = (t || $()).trim().length > 0;
|
|
322
|
+
h.value !== r && (h.value = r, p("content-status", r));
|
|
323
|
+
}, K = (t, n) => {
|
|
324
|
+
t && (i.value[n] = t, t.textContent || (t.textContent = s.value[n].content), new MutationObserver(() => {
|
|
325
|
+
l.value === n && !d.value && (d.value = !0, setTimeout(() => {
|
|
326
|
+
s.value[n].content = t.textContent !== null ? t.textContent : "", d.value = !1;
|
|
327
|
+
}, 0));
|
|
328
|
+
}).observe(t, {
|
|
329
|
+
characterData: !0,
|
|
330
|
+
childList: !0,
|
|
331
|
+
subtree: !0
|
|
332
|
+
}));
|
|
333
|
+
}, G = (t, n) => {
|
|
334
|
+
d.value = !0;
|
|
335
|
+
const r = t.target, C = r.textContent !== null ? r.textContent : "";
|
|
336
|
+
s.value[n].content !== C && (s.value[n].content = C, V()), setTimeout(() => {
|
|
337
|
+
d.value = !1;
|
|
338
|
+
}, 10);
|
|
339
|
+
}, W = (t) => {
|
|
340
|
+
if (document.createRange) {
|
|
341
|
+
const n = document.createRange();
|
|
342
|
+
n.selectNodeContents(t), n.collapse(!1);
|
|
343
|
+
const r = window.getSelection();
|
|
344
|
+
r && (r.removeAllRanges(), r.addRange(n));
|
|
345
|
+
}
|
|
346
|
+
}, P = (t) => {
|
|
347
|
+
if (l.value !== t) {
|
|
348
|
+
if (l.value !== -1) {
|
|
349
|
+
const n = l.value, r = i.value[n];
|
|
350
|
+
r && (s.value[n].content = r.textContent !== null ? r.textContent : "", V());
|
|
351
|
+
}
|
|
352
|
+
l.value = t, p("field-active", !0, t), s0(() => {
|
|
353
|
+
const n = i.value[t];
|
|
354
|
+
n && (n.focus(), !n.textContent && s.value[t].content && (n.textContent = s.value[t].content), W(n));
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
}, H = () => {
|
|
358
|
+
const t = l.value;
|
|
359
|
+
if (t >= 0) {
|
|
360
|
+
const n = i.value[t];
|
|
361
|
+
if (n) {
|
|
362
|
+
const r = n.textContent !== null ? n.textContent : "";
|
|
363
|
+
s.value[t].content = r;
|
|
364
|
+
}
|
|
365
|
+
p("field-active", !1, t);
|
|
366
|
+
}
|
|
367
|
+
V(), l.value = -1;
|
|
368
|
+
}, U = (t) => {
|
|
369
|
+
t.key === "Enter" && (t.preventDefault(), H());
|
|
370
|
+
};
|
|
371
|
+
A(
|
|
372
|
+
() => a.value,
|
|
373
|
+
(t) => {
|
|
374
|
+
t === "" ? N() : t && !w.value && I(t);
|
|
375
|
+
}
|
|
376
|
+
), A(
|
|
377
|
+
() => a.template,
|
|
378
|
+
() => {
|
|
379
|
+
F(), s0(() => {
|
|
380
|
+
Z();
|
|
381
|
+
});
|
|
382
|
+
},
|
|
383
|
+
{ immediate: !0 }
|
|
384
|
+
);
|
|
385
|
+
const N = () => {
|
|
386
|
+
s.value.forEach((t) => {
|
|
387
|
+
t.isField && (t.content = t.placeholder || "");
|
|
388
|
+
}), V();
|
|
389
|
+
}, X = () => {
|
|
390
|
+
N();
|
|
391
|
+
};
|
|
392
|
+
return d0(() => {
|
|
393
|
+
Z();
|
|
394
|
+
}), f({
|
|
395
|
+
activateFirstField: () => {
|
|
396
|
+
for (let t = 0; t < s.value.length; t++)
|
|
397
|
+
if (s.value[t].isField) {
|
|
398
|
+
P(t);
|
|
399
|
+
break;
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
resetFields: X
|
|
403
|
+
}), (t, n) => (u(), y("div", B0, [
|
|
404
|
+
R("div", {
|
|
405
|
+
class: "template-content",
|
|
406
|
+
ref_key: "editorRef",
|
|
407
|
+
ref: v
|
|
408
|
+
}, [
|
|
409
|
+
(u(!0), y(e0, null, n0(s.value, (r, C) => (u(), y(e0, { key: C }, [
|
|
410
|
+
r.isField ? (u(), y("span", {
|
|
411
|
+
key: 1,
|
|
412
|
+
class: O(["template-field", { "template-field-active": l.value === C }]),
|
|
413
|
+
onClick: (m) => P(C)
|
|
414
|
+
}, [
|
|
415
|
+
l.value === C ? (u(), y("span", {
|
|
416
|
+
key: 0,
|
|
417
|
+
ref_for: !0,
|
|
418
|
+
ref: (m) => K(m, C),
|
|
419
|
+
class: "template-editable",
|
|
420
|
+
contenteditable: "true",
|
|
421
|
+
onInput: (m) => G(m, C),
|
|
422
|
+
onBlur: n[0] || (n[0] = (m) => H()),
|
|
423
|
+
onKeydown: n[1] || (n[1] = (m) => U(m)),
|
|
424
|
+
onClick: n[2] || (n[2] = u0(() => {
|
|
425
|
+
}, ["stop"]))
|
|
426
|
+
}, null, 40, M0)) : (u(), y("span", $0, j(r.content), 1))
|
|
427
|
+
], 10, I0)) : (u(), y("span", R0, j(r.content), 1))
|
|
428
|
+
], 64))), 128))
|
|
429
|
+
], 512)
|
|
430
|
+
]));
|
|
431
|
+
}
|
|
432
|
+
}), T0 = /* @__PURE__ */ g0(V0, [["__scopeId", "data-v-09e9c7ed"]]), Z0 = ["data-theme"], K0 = { class: "tiny-sender__container" }, P0 = { class: "tiny-sender__input-wrapper" }, j0 = {
|
|
433
|
+
key: 0,
|
|
434
|
+
class: "tiny-sender__header-slot"
|
|
435
|
+
}, U0 = {
|
|
436
|
+
key: 0,
|
|
437
|
+
class: "tiny-sender__prefix-slot"
|
|
438
|
+
}, z0 = { class: "tiny-sender__content-area" }, A0 = {
|
|
439
|
+
key: 1,
|
|
440
|
+
class: "tiny-sender__actions-slot"
|
|
441
|
+
}, O0 = { class: "tiny-sender__buttons-container" }, G0 = {
|
|
442
|
+
key: 0,
|
|
443
|
+
class: "tiny-sender__footer-slot"
|
|
444
|
+
}, W0 = {
|
|
445
|
+
key: 0,
|
|
446
|
+
class: "tiny-sender__word-limit"
|
|
447
|
+
}, H0 = {
|
|
448
|
+
key: 1,
|
|
449
|
+
class: "tiny-sender__toolbar"
|
|
450
|
+
}, N0 = { class: "tiny-sender__buttons-container" }, q0 = {
|
|
451
|
+
key: 0,
|
|
452
|
+
class: "tiny-sender__suggestions"
|
|
453
|
+
}, Q0 = ["onClick"], J0 = {
|
|
454
|
+
key: 0,
|
|
455
|
+
class: "tiny-sender__error"
|
|
456
|
+
}, J = /* @__PURE__ */ t0({
|
|
457
|
+
__name: "index",
|
|
458
|
+
props: {
|
|
459
|
+
autofocus: { type: Boolean, default: !1 },
|
|
460
|
+
autoSize: { type: [Boolean, Object], default: !1 },
|
|
461
|
+
allowSpeech: { type: Boolean, default: !0 },
|
|
462
|
+
allowFiles: { type: Boolean, default: !1 },
|
|
463
|
+
clearable: { type: Boolean, default: !1 },
|
|
464
|
+
disabled: { type: Boolean, default: !1 },
|
|
465
|
+
defaultValue: {},
|
|
466
|
+
loading: { type: Boolean, default: !1 },
|
|
467
|
+
modelValue: { default: "" },
|
|
468
|
+
mode: { default: "single" },
|
|
469
|
+
maxLength: { default: 1 / 0 },
|
|
470
|
+
submitType: { default: "enter" },
|
|
471
|
+
speech: { type: [Boolean, Object] },
|
|
472
|
+
placeholder: { default: "请输入内容..." },
|
|
473
|
+
showWordLimit: { type: Boolean, default: !1 },
|
|
474
|
+
suggestions: {},
|
|
475
|
+
theme: { default: "light" },
|
|
476
|
+
template: { default: "" },
|
|
477
|
+
hasContent: { type: Boolean, default: void 0 }
|
|
478
|
+
},
|
|
479
|
+
emits: ["update:modelValue", "submit", "clear", "speech-start", "speech-end", "speech-interim", "speech-error", "suggestion-select", "focus", "blur", "escape-press", "cancel", "reset-template"],
|
|
480
|
+
setup(o, { expose: f, emit: c }) {
|
|
481
|
+
const a = o, p = c, v = _(null), i = _(null), l = x(() => !!a.template), { inputValue: h, isComposing: d, clearInput: w } = y0(a, p), s = () => {
|
|
482
|
+
w(), a.template && p("reset-template");
|
|
483
|
+
}, g = _(!1), F = x(() => !a.suggestions || !h.value ? [] : a.suggestions.filter((e) => e.toLowerCase().includes(h.value.toLowerCase()))), I = (e) => {
|
|
484
|
+
h.value = e, g.value = !1, p("suggestion-select", e);
|
|
485
|
+
}, $ = (e) => {
|
|
486
|
+
h.value = e, p("update:modelValue", e);
|
|
487
|
+
}, V = () => {
|
|
488
|
+
i.value && i.value.activateFirstField();
|
|
489
|
+
}, Z = x(() => ({
|
|
490
|
+
...typeof a.speech == "object" ? a.speech : {},
|
|
491
|
+
onStart: () => p("speech-start"),
|
|
492
|
+
onEnd: (e) => p("speech-end", e),
|
|
493
|
+
onInterim: (e) => p("speech-interim", e),
|
|
494
|
+
onFinal: (e) => {
|
|
495
|
+
h.value = e, p("speech-end", e);
|
|
496
|
+
},
|
|
497
|
+
onError: (e) => {
|
|
498
|
+
l0(e.message), p("speech-error", e);
|
|
499
|
+
}
|
|
500
|
+
})), { speechState: K, start: G, stop: W } = C0(Z.value), P = () => {
|
|
501
|
+
K.isRecording ? W() : G();
|
|
502
|
+
}, { handleKeyPress: H, triggerSubmit: U } = v0(
|
|
503
|
+
a,
|
|
504
|
+
p,
|
|
505
|
+
h,
|
|
506
|
+
d,
|
|
507
|
+
K,
|
|
508
|
+
g,
|
|
509
|
+
P
|
|
510
|
+
), N = (e) => {
|
|
511
|
+
p("focus", e);
|
|
512
|
+
}, X = (e) => {
|
|
513
|
+
p("blur", e);
|
|
514
|
+
}, t = x(() => a.mode === "multiple" ? { minRows: 2, maxRows: 5 } : { maxRows: 1 }), n = x(
|
|
515
|
+
() => ({
|
|
516
|
+
display: "flex",
|
|
517
|
+
justifyContent: a.showWordLimit && a.maxLength !== 1 / 0 ? "space-between" : "flex-end",
|
|
518
|
+
alignItems: "center"
|
|
519
|
+
})
|
|
520
|
+
), r = x(() => a.disabled), C = x(() => a.loading), m = x(() => a.hasContent !== void 0 ? a.hasContent : !!h.value), b = x(() => ({
|
|
521
|
+
"is-disabled": r.value,
|
|
522
|
+
"is-loading": C.value,
|
|
523
|
+
"has-error": !!L.value
|
|
524
|
+
})), L = _(""), l0 = (e) => {
|
|
525
|
+
L.value = e, setTimeout(() => L.value = "", 5e3);
|
|
526
|
+
}, z = () => {
|
|
527
|
+
d.value = !1, setTimeout(() => d.value = !1, 50);
|
|
528
|
+
};
|
|
529
|
+
return A(h, () => {
|
|
530
|
+
g.value = !!a.suggestions && !!h.value;
|
|
531
|
+
}), f({
|
|
532
|
+
focus: () => {
|
|
533
|
+
if (l.value && i.value)
|
|
534
|
+
V();
|
|
535
|
+
else if (v.value)
|
|
536
|
+
v.value.focus();
|
|
537
|
+
else {
|
|
538
|
+
const e = document.querySelector(".tiny-input__inner");
|
|
539
|
+
e == null || e.focus();
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
blur: () => {
|
|
543
|
+
if (v.value)
|
|
544
|
+
v.value.blur();
|
|
545
|
+
else {
|
|
546
|
+
const e = document.querySelector(".tiny-input__inner");
|
|
547
|
+
e == null || e.blur();
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
clear: s,
|
|
551
|
+
submit: U,
|
|
552
|
+
startSpeech: G,
|
|
553
|
+
stopSpeech: W,
|
|
554
|
+
activateTemplateFirstField: V
|
|
555
|
+
}), (e, D) => (u(), y("div", {
|
|
556
|
+
class: O(["tiny-sender", [b.value, `theme-${e.theme}`, `mode-${e.mode}`]]),
|
|
557
|
+
"data-theme": e.theme
|
|
558
|
+
}, [
|
|
559
|
+
R("div", K0, [
|
|
560
|
+
R("div", P0, [
|
|
561
|
+
T(Y, { name: "tiny-sender-slide-down" }, {
|
|
562
|
+
default: B(() => [
|
|
563
|
+
e.$slots.header ? (u(), y("div", j0, [
|
|
564
|
+
q(e.$slots, "header")
|
|
565
|
+
])) : S("", !0)
|
|
566
|
+
]),
|
|
567
|
+
_: 3
|
|
568
|
+
}),
|
|
569
|
+
R("div", {
|
|
570
|
+
class: O(["tiny-sender__input-row", { "has-prefix": e.$slots.prefix, "has-header": e.$slots.header }])
|
|
571
|
+
}, [
|
|
572
|
+
e.$slots.prefix ? (u(), y("div", U0, [
|
|
573
|
+
q(e.$slots, "prefix")
|
|
574
|
+
])) : S("", !0),
|
|
575
|
+
R("div", z0, [
|
|
576
|
+
l.value ? (u(), M(T0, {
|
|
577
|
+
key: 0,
|
|
578
|
+
ref_key: "templateEditorRef",
|
|
579
|
+
ref: i,
|
|
580
|
+
template: e.template,
|
|
581
|
+
value: k(h),
|
|
582
|
+
"onUpdate:value": $,
|
|
583
|
+
onInput: $
|
|
584
|
+
}, null, 8, ["template", "value"])) : (u(), M(k(h0), {
|
|
585
|
+
key: 1,
|
|
586
|
+
ref_key: "inputRef",
|
|
587
|
+
ref: v,
|
|
588
|
+
autosize: t.value,
|
|
589
|
+
type: "textarea",
|
|
590
|
+
readonly: C.value,
|
|
591
|
+
resize: "none",
|
|
592
|
+
modelValue: k(h),
|
|
593
|
+
"onUpdate:modelValue": D[0] || (D[0] = (E) => f0(h) ? h.value = E : null),
|
|
594
|
+
disabled: r.value,
|
|
595
|
+
placeholder: e.placeholder,
|
|
596
|
+
maxlength: e.maxLength,
|
|
597
|
+
autofocus: e.autofocus,
|
|
598
|
+
onKeydown: k(H),
|
|
599
|
+
onCompositionstart: D[1] || (D[1] = (E) => d.value = !0),
|
|
600
|
+
onCompositionend: z,
|
|
601
|
+
onFocus: N,
|
|
602
|
+
onBlur: X
|
|
603
|
+
}, null, 8, ["autosize", "readonly", "modelValue", "disabled", "placeholder", "maxlength", "autofocus", "onKeydown"]))
|
|
604
|
+
]),
|
|
605
|
+
e.mode === "single" ? (u(), y("div", A0, [
|
|
606
|
+
R("div", O0, [
|
|
607
|
+
q(e.$slots, "actions"),
|
|
608
|
+
T(o0, {
|
|
609
|
+
class: "inline-buttons",
|
|
610
|
+
"allow-speech": e.allowSpeech,
|
|
611
|
+
"allow-files": e.allowFiles,
|
|
612
|
+
loading: e.loading,
|
|
613
|
+
disabled: r.value,
|
|
614
|
+
"show-clear": e.clearable,
|
|
615
|
+
"has-content": m.value,
|
|
616
|
+
"speech-status": k(K),
|
|
617
|
+
"submit-type": e.submitType,
|
|
618
|
+
onClear: s,
|
|
619
|
+
onToggleSpeech: P,
|
|
620
|
+
onSubmit: k(U),
|
|
621
|
+
onCancel: D[2] || (D[2] = (E) => e.$emit("cancel"))
|
|
622
|
+
}, null, 8, ["allow-speech", "allow-files", "loading", "disabled", "show-clear", "has-content", "speech-status", "submit-type", "onSubmit"])
|
|
623
|
+
])
|
|
624
|
+
])) : S("", !0)
|
|
625
|
+
], 2),
|
|
626
|
+
T(Y, { name: "tiny-sender-slide-up" }, {
|
|
627
|
+
default: B(() => [
|
|
628
|
+
e.$slots.footer ? (u(), y("div", G0, [
|
|
629
|
+
q(e.$slots, "footer")
|
|
630
|
+
])) : e.mode !== "single" || e.showWordLimit && e.maxLength !== 1 / 0 ? (u(), y("div", {
|
|
631
|
+
key: 1,
|
|
632
|
+
style: p0(n.value),
|
|
633
|
+
class: "tiny-sender__footer-slot tiny-sender__bottom-row"
|
|
634
|
+
}, [
|
|
635
|
+
e.showWordLimit && e.maxLength !== 1 / 0 ? (u(), y("div", W0, j(k(h).length) + "/" + j(e.maxLength), 1)) : S("", !0),
|
|
636
|
+
e.mode === "multiple" ? (u(), y("div", H0, [
|
|
637
|
+
R("div", N0, [
|
|
638
|
+
T(o0, {
|
|
639
|
+
"allow-speech": e.allowSpeech,
|
|
640
|
+
"allow-files": e.allowFiles,
|
|
641
|
+
loading: e.loading,
|
|
642
|
+
disabled: r.value,
|
|
643
|
+
"show-clear": e.clearable,
|
|
644
|
+
"has-content": m.value,
|
|
645
|
+
"speech-status": k(K),
|
|
646
|
+
"submit-type": e.submitType,
|
|
647
|
+
onClear: s,
|
|
648
|
+
onToggleSpeech: P,
|
|
649
|
+
onSubmit: k(U),
|
|
650
|
+
onCancel: D[3] || (D[3] = (E) => e.$emit("cancel"))
|
|
651
|
+
}, null, 8, ["allow-speech", "allow-files", "loading", "disabled", "show-clear", "has-content", "speech-status", "submit-type", "onSubmit"])
|
|
652
|
+
])
|
|
653
|
+
])) : S("", !0)
|
|
654
|
+
], 4)) : S("", !0)
|
|
655
|
+
]),
|
|
656
|
+
_: 3
|
|
657
|
+
})
|
|
658
|
+
])
|
|
659
|
+
]),
|
|
660
|
+
T(Y, { name: "tiny-sender-slide-up" }, {
|
|
661
|
+
default: B(() => [
|
|
662
|
+
g.value && F.value.length ? (u(), y("div", q0, [
|
|
663
|
+
(u(!0), y(e0, null, n0(F.value, (E, i0) => (u(), y("div", {
|
|
664
|
+
key: i0,
|
|
665
|
+
class: "suggestion-item",
|
|
666
|
+
onClick: (Y0) => I(E)
|
|
667
|
+
}, j(E), 9, Q0))), 128))
|
|
668
|
+
])) : S("", !0)
|
|
669
|
+
]),
|
|
670
|
+
_: 1
|
|
671
|
+
}),
|
|
672
|
+
L.value ? (u(), y("div", J0, j(L.value), 1)) : S("", !0)
|
|
673
|
+
], 10, Z0));
|
|
674
|
+
}
|
|
675
|
+
});
|
|
676
|
+
J.name = "TrSender";
|
|
677
|
+
const X0 = function(o) {
|
|
678
|
+
o.component(J.name, J);
|
|
679
|
+
};
|
|
680
|
+
J.install = X0;
|
|
681
|
+
export {
|
|
682
|
+
J as default
|
|
683
|
+
};
|