@opentiny/tiny-robot 0.2.0-alpha.2 → 0.2.0-alpha.4
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 +2200 -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 +429 -0
- package/dist/sender/index.js +772 -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} +107 -107
- 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 -17
- package/dist/bubble/BubbleList.vue.d.ts +0 -5
- package/dist/bubble/index.d.ts +0 -12
- package/dist/bubble/index.type.d.ts +0 -51
- 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 -6
- 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 -310
- package/dist/node_modules/.pnpm/@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js +0 -110
- 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 -121
- 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.vue.js +0 -7
- package/dist/packages/components/src/bubble/Bubble.vue2.js +0 -76
- package/dist/packages/components/src/bubble/BubbleList.vue.js +0 -7
- package/dist/packages/components/src/bubble/BubbleList.vue2.js +0 -50
- package/dist/packages/components/src/bubble/index.js +0 -18
- 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 -143
- 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 -22
- 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 -175
- 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 -247
- package/src/action-group/ActionGroupItem.vue +0 -9
- package/src/action-group/index.ts +0 -25
- package/src/action-group/index.type.ts +0 -21
- 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.vue +0 -153
- package/src/bubble/BubbleList.vue +0 -55
- package/src/bubble/index.ts +0 -23
- package/src/bubble/index.type.ts +0 -49
- package/src/container/index.ts +0 -12
- package/src/container/index.type.ts +0 -17
- package/src/container/index.vue +0 -109
- 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 -7
- package/src/icon-button/index.vue +0 -58
- 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 -465
- 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,772 @@
|
|
|
1
|
+
import { ref as b, watch as q, reactive as L0, defineComponent as c0, computed as S, resolveComponent as _0, createElementBlock as C, openBlock as d, createBlock as V, createCommentVNode as R, withCtx as $, createVNode as W, unref as F, createElementVNode as B, normalizeClass as z, resolveDynamicComponent as b0, nextTick as A, onMounted as k0, Fragment as r0, renderList as v0, toDisplayString as U, withModifiers as S0, useSlots as x0, Transition as a0, renderSlot as P, isRef as F0, normalizeStyle as D0, createTextVNode as E0 } from "vue";
|
|
2
|
+
import { I as R0 } from "../index5.js";
|
|
3
|
+
import { B as n0 } from "../index3.js";
|
|
4
|
+
import { i as B0 } from "../close.js";
|
|
5
|
+
import { _ as I0 } from "../_plugin-vue_export-helper.js";
|
|
6
|
+
function $0(n, h) {
|
|
7
|
+
const c = b(n.modelValue || n.defaultValue || ""), i = b(null);
|
|
8
|
+
q(
|
|
9
|
+
() => n.modelValue,
|
|
10
|
+
(f) => {
|
|
11
|
+
f !== void 0 && f !== c.value && (c.value = f);
|
|
12
|
+
}
|
|
13
|
+
), q(
|
|
14
|
+
() => c.value,
|
|
15
|
+
(f) => {
|
|
16
|
+
h("update:modelValue", f);
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
const m = (f) => {
|
|
20
|
+
c.value = f, h("update:modelValue", f);
|
|
21
|
+
}, w = (f) => {
|
|
22
|
+
f == null || f.preventDefault();
|
|
23
|
+
const a = c.value;
|
|
24
|
+
!n.disabled && !n.loading && a.trim() && h("submit", a);
|
|
25
|
+
}, r = () => {
|
|
26
|
+
c.value = "", h("update:modelValue", ""), h("clear");
|
|
27
|
+
}, s = b(!1);
|
|
28
|
+
return {
|
|
29
|
+
inputValue: c,
|
|
30
|
+
inputWrapper: i,
|
|
31
|
+
isComposing: s,
|
|
32
|
+
handleChange: m,
|
|
33
|
+
handleSubmit: w,
|
|
34
|
+
handleClear: r,
|
|
35
|
+
clearInput: () => {
|
|
36
|
+
r();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function M0(n, h, c, i, m, w, r, s, k) {
|
|
41
|
+
const f = (l) => !n.disabled && !n.loading && l.trim().length > 0, a = () => {
|
|
42
|
+
f(c.value) && h("submit", c.value.trim());
|
|
43
|
+
}, v = (l, L) => {
|
|
44
|
+
if (!(l.key === "Enter")) return !1;
|
|
45
|
+
switch (L) {
|
|
46
|
+
case "enter":
|
|
47
|
+
return !l.shiftKey && !l.ctrlKey && !l.metaKey;
|
|
48
|
+
case "ctrlEnter":
|
|
49
|
+
return (l.ctrlKey || l.metaKey) && !l.shiftKey;
|
|
50
|
+
case "shiftEnter":
|
|
51
|
+
return l.shiftKey && !l.ctrlKey && !l.metaKey;
|
|
52
|
+
default:
|
|
53
|
+
return !1;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
return {
|
|
57
|
+
handleKeyPress: (l) => {
|
|
58
|
+
if (i.value) return;
|
|
59
|
+
if (l.key === "Enter" && l.shiftKey && (s == null ? void 0 : s.value) === "single" && k) {
|
|
60
|
+
l.preventDefault(), k();
|
|
61
|
+
const x = l.target, I = x.selectionStart, M = c.value;
|
|
62
|
+
c.value = M.substring(0, I) + `
|
|
63
|
+
` + M.substring(I), setTimeout(() => {
|
|
64
|
+
x.selectionStart = x.selectionEnd = I + 1;
|
|
65
|
+
}, 0);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (l.key === "Escape") {
|
|
69
|
+
w.value ? (w.value = !1, l.preventDefault()) : m.isRecording && (r(), l.preventDefault()), h("escape-press");
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
v(l, n.submitType) && f(c.value) && (l.preventDefault(), a());
|
|
73
|
+
},
|
|
74
|
+
triggerSubmit: a
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function T0(n) {
|
|
78
|
+
const h = L0({
|
|
79
|
+
isRecording: !1,
|
|
80
|
+
isSupported: typeof window < "u" && "webkitSpeechRecognition" in window || "SpeechRecognition" in window,
|
|
81
|
+
error: void 0
|
|
82
|
+
}), c = h.isSupported ? new (window.webkitSpeechRecognition || window.SpeechRecognition)() : void 0;
|
|
83
|
+
c !== void 0 && (c.continuous = n.continuous ?? !1, c.interimResults = n.interimResults ?? !0, c.lang = n.lang ?? navigator.language, c.onstart = () => {
|
|
84
|
+
var r;
|
|
85
|
+
h.isRecording = !0, h.error = void 0, (r = n.onStart) == null || r.call(n);
|
|
86
|
+
}, c.onend = () => {
|
|
87
|
+
var r;
|
|
88
|
+
h.isRecording = !1, (r = n.onEnd) == null || r.call(n);
|
|
89
|
+
}, c.onresult = (r) => {
|
|
90
|
+
var k, f;
|
|
91
|
+
const s = Array.from(r.results).map((a) => a[0].transcript).join("");
|
|
92
|
+
r.results[0].isFinal ? (k = n.onFinal) == null || k.call(n, s) : (f = n.onInterim) == null || f.call(n, s);
|
|
93
|
+
}, c.onerror = (r) => {
|
|
94
|
+
var s;
|
|
95
|
+
h.error = new Error(r.error), h.isRecording = !1, (s = n.onError) == null || s.call(n, h.error);
|
|
96
|
+
});
|
|
97
|
+
const i = () => {
|
|
98
|
+
var r;
|
|
99
|
+
if (!c) {
|
|
100
|
+
const s = new Error("浏览器不支持语音识别");
|
|
101
|
+
h.error = s, (r = n.onError) == null || r.call(n, s);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (h.isRecording) {
|
|
105
|
+
try {
|
|
106
|
+
c.stop(), setTimeout(() => {
|
|
107
|
+
try {
|
|
108
|
+
c.start();
|
|
109
|
+
} catch (s) {
|
|
110
|
+
w(s);
|
|
111
|
+
}
|
|
112
|
+
}, 100);
|
|
113
|
+
} catch (s) {
|
|
114
|
+
w(s);
|
|
115
|
+
}
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
try {
|
|
119
|
+
c.start();
|
|
120
|
+
} catch (s) {
|
|
121
|
+
w(s);
|
|
122
|
+
}
|
|
123
|
+
}, m = () => {
|
|
124
|
+
if (c && h.isRecording)
|
|
125
|
+
try {
|
|
126
|
+
c.stop();
|
|
127
|
+
} catch (r) {
|
|
128
|
+
w(r);
|
|
129
|
+
}
|
|
130
|
+
}, w = (r) => {
|
|
131
|
+
var s;
|
|
132
|
+
h.error = r instanceof Error ? r : new Error("语音识别操作失败"), h.isRecording = !1, (s = n.onError) == null || s.call(n, h.error);
|
|
133
|
+
};
|
|
134
|
+
return {
|
|
135
|
+
speechState: h,
|
|
136
|
+
start: i,
|
|
137
|
+
stop: m
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
const V0 = "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", Z0 = "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", P0 = "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", W0 = "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", O0 = { class: "action-buttons" }, j0 = {
|
|
141
|
+
key: 0,
|
|
142
|
+
src: Z0,
|
|
143
|
+
class: "button-icon",
|
|
144
|
+
alt: "录音"
|
|
145
|
+
}, A0 = {
|
|
146
|
+
key: 1,
|
|
147
|
+
src: K0,
|
|
148
|
+
class: "button-icon recording-icon",
|
|
149
|
+
alt: "语音中"
|
|
150
|
+
}, U0 = { class: "button-content" }, z0 = {
|
|
151
|
+
key: 0,
|
|
152
|
+
src: P0,
|
|
153
|
+
alt: "发送"
|
|
154
|
+
}, m0 = /* @__PURE__ */ c0({
|
|
155
|
+
__name: "ActionButtons",
|
|
156
|
+
props: {
|
|
157
|
+
loading: { type: Boolean, default: !1 },
|
|
158
|
+
disabled: { type: Boolean, default: !1 },
|
|
159
|
+
showClear: { type: Boolean, default: !0 },
|
|
160
|
+
hasContent: { type: Boolean, default: !1 },
|
|
161
|
+
allowSpeech: { type: Boolean, default: !1 },
|
|
162
|
+
speechStatus: { default: () => ({
|
|
163
|
+
isRecording: !1,
|
|
164
|
+
isSupported: !1
|
|
165
|
+
}) },
|
|
166
|
+
allowFiles: { type: Boolean, default: !1 },
|
|
167
|
+
submitType: { default: "enter" },
|
|
168
|
+
showShortcuts: { type: Boolean },
|
|
169
|
+
isOverLimit: { type: Boolean, default: !1 }
|
|
170
|
+
},
|
|
171
|
+
emits: ["clear", "toggle-speech", "submit", "cancel"],
|
|
172
|
+
setup(n, { emit: h }) {
|
|
173
|
+
const c = B0(), i = n, m = h, w = S(() => i.allowSpeech), r = S(() => i.speechStatus.isRecording), s = S(() => i.disabled), k = S(() => s.value || i.isOverLimit), f = () => {
|
|
174
|
+
s.value || m("clear");
|
|
175
|
+
}, a = () => {
|
|
176
|
+
if (!s.value) {
|
|
177
|
+
const l = !i.speechStatus.isRecording;
|
|
178
|
+
m("toggle-speech", l);
|
|
179
|
+
}
|
|
180
|
+
}, v = () => {
|
|
181
|
+
k.value || m("submit");
|
|
182
|
+
}, Z = () => {
|
|
183
|
+
s.value || m("cancel");
|
|
184
|
+
};
|
|
185
|
+
return (l, L) => {
|
|
186
|
+
const x = _0("tiny-tooltip");
|
|
187
|
+
return d(), C("div", O0, [
|
|
188
|
+
l.allowFiles && !l.loading ? (d(), V(x, {
|
|
189
|
+
key: 0,
|
|
190
|
+
content: "上传文件",
|
|
191
|
+
placement: "top"
|
|
192
|
+
}, {
|
|
193
|
+
default: $(() => [
|
|
194
|
+
W(F(n0), {
|
|
195
|
+
type: "text",
|
|
196
|
+
disabled: s.value
|
|
197
|
+
}, {
|
|
198
|
+
default: $(() => L[1] || (L[1] = [
|
|
199
|
+
B("img", {
|
|
200
|
+
src: V0,
|
|
201
|
+
class: "button-icon",
|
|
202
|
+
alt: "上传文件"
|
|
203
|
+
}, null, -1)
|
|
204
|
+
])),
|
|
205
|
+
_: 1
|
|
206
|
+
}, 8, ["disabled"])
|
|
207
|
+
]),
|
|
208
|
+
_: 1
|
|
209
|
+
})) : R("", !0),
|
|
210
|
+
w.value && !l.loading ? (d(), V(F(n0), {
|
|
211
|
+
key: 1,
|
|
212
|
+
type: "text",
|
|
213
|
+
disabled: s.value,
|
|
214
|
+
onClick: a,
|
|
215
|
+
class: z(["speech-button", { "is-recording": r.value }])
|
|
216
|
+
}, {
|
|
217
|
+
default: $(() => [
|
|
218
|
+
r.value ? (d(), C("img", A0)) : (d(), C("img", j0))
|
|
219
|
+
]),
|
|
220
|
+
_: 1
|
|
221
|
+
}, 8, ["disabled", "class"])) : R("", !0),
|
|
222
|
+
l.showClear ? (d(), V(x, {
|
|
223
|
+
key: 2,
|
|
224
|
+
content: "清空内容",
|
|
225
|
+
placement: "top"
|
|
226
|
+
}, {
|
|
227
|
+
default: $(() => [
|
|
228
|
+
W(F(n0), {
|
|
229
|
+
type: "text",
|
|
230
|
+
disabled: s.value || !l.hasContent,
|
|
231
|
+
onClick: f,
|
|
232
|
+
style: { "margin-left": "0" }
|
|
233
|
+
}, {
|
|
234
|
+
default: $(() => [
|
|
235
|
+
(d(), V(b0(F(c)), { class: "button-icon" }))
|
|
236
|
+
]),
|
|
237
|
+
_: 1
|
|
238
|
+
}, 8, ["disabled"])
|
|
239
|
+
]),
|
|
240
|
+
_: 1
|
|
241
|
+
})) : R("", !0),
|
|
242
|
+
l.hasContent || l.loading ? (d(), V(F(n0), {
|
|
243
|
+
key: 3,
|
|
244
|
+
type: "text",
|
|
245
|
+
class: z(l.loading ? "cancel-button" : "submit-button"),
|
|
246
|
+
disabled: l.loading ? s.value : k.value,
|
|
247
|
+
onClick: L[0] || (L[0] = (I) => l.loading ? Z() : v())
|
|
248
|
+
}, {
|
|
249
|
+
default: $(() => [
|
|
250
|
+
B("div", U0, [
|
|
251
|
+
l.loading ? (d(), V(x, {
|
|
252
|
+
key: 1,
|
|
253
|
+
content: "停止生成",
|
|
254
|
+
placement: "top"
|
|
255
|
+
}, {
|
|
256
|
+
default: $(() => L[2] || (L[2] = [
|
|
257
|
+
B("img", {
|
|
258
|
+
src: W0,
|
|
259
|
+
alt: "加载中",
|
|
260
|
+
class: "loading"
|
|
261
|
+
}, null, -1)
|
|
262
|
+
])),
|
|
263
|
+
_: 1
|
|
264
|
+
})) : (d(), C("img", z0))
|
|
265
|
+
])
|
|
266
|
+
]),
|
|
267
|
+
_: 1
|
|
268
|
+
}, 8, ["class", "disabled"])) : R("", !0)
|
|
269
|
+
]);
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
}), q0 = { class: "template-editor" }, G0 = { key: 0 }, H0 = ["onClick"], N0 = ["onInput"], Q0 = {
|
|
273
|
+
key: 1,
|
|
274
|
+
class: "template-placeholder"
|
|
275
|
+
}, J0 = /* @__PURE__ */ c0({
|
|
276
|
+
__name: "TemplateEditor",
|
|
277
|
+
props: {
|
|
278
|
+
template: {},
|
|
279
|
+
value: {}
|
|
280
|
+
},
|
|
281
|
+
emits: ["update:value", "input", "content-status", "field-active"],
|
|
282
|
+
setup(n, { expose: h, emit: c }) {
|
|
283
|
+
const i = n, m = c, w = b(null), r = b({}), s = b(-1), k = b(!1), f = b(!1), a = b(!1), v = b([]), Z = (t) => {
|
|
284
|
+
const o = [];
|
|
285
|
+
let u = 0, _ = 0;
|
|
286
|
+
const y = /\[(.*?)\]/g;
|
|
287
|
+
let D;
|
|
288
|
+
for (; (D = y.exec(t)) !== null; )
|
|
289
|
+
D.index > u && o.push({
|
|
290
|
+
content: t.substring(u, D.index),
|
|
291
|
+
isField: !1
|
|
292
|
+
}), o.push({
|
|
293
|
+
content: D[1],
|
|
294
|
+
// 使用占位符作为默认内容
|
|
295
|
+
placeholder: D[1],
|
|
296
|
+
isField: !0,
|
|
297
|
+
fieldIndex: _++
|
|
298
|
+
}), u = D.index + D[0].length;
|
|
299
|
+
return u < t.length && o.push({
|
|
300
|
+
content: t.substring(u),
|
|
301
|
+
isField: !1
|
|
302
|
+
}), o;
|
|
303
|
+
}, l = () => {
|
|
304
|
+
v.value = Z(i.template), i.value && L(i.value);
|
|
305
|
+
}, L = (t) => {
|
|
306
|
+
if (!t || a.value || x() === t) return;
|
|
307
|
+
const u = Z(i.template), _ = [];
|
|
308
|
+
u.forEach((E) => {
|
|
309
|
+
E.isField ? _.push(`__FIELD_${E.fieldIndex}__`) : _.push(E.content);
|
|
310
|
+
});
|
|
311
|
+
let y = t, D = 0;
|
|
312
|
+
for (let E = 0; E < v.value.length; E++) {
|
|
313
|
+
if (!v.value[E].isField) continue;
|
|
314
|
+
const N = _[D];
|
|
315
|
+
D++;
|
|
316
|
+
const T = _[D] || "";
|
|
317
|
+
if (N && y.startsWith(N))
|
|
318
|
+
if (y = y.substring(N.length), T && y.includes(T)) {
|
|
319
|
+
const l0 = y.indexOf(T), K = y.substring(0, l0);
|
|
320
|
+
K && (v.value[E].content = K, s.value === E && r.value[E] && (f.value = !0)), y = y.substring(l0);
|
|
321
|
+
} else !T && y && (v.value[E].content = y, y = "");
|
|
322
|
+
}
|
|
323
|
+
M(t);
|
|
324
|
+
}, x = () => v.value.map((t) => t.content).join(""), I = () => {
|
|
325
|
+
a.value = !0;
|
|
326
|
+
const t = x();
|
|
327
|
+
m("update:value", t), m("input", t), M(t), setTimeout(() => {
|
|
328
|
+
a.value = !1;
|
|
329
|
+
}, 0);
|
|
330
|
+
}, M = (t) => {
|
|
331
|
+
const u = (t || x()).trim().length > 0;
|
|
332
|
+
k.value !== u && (k.value = u, m("content-status", u));
|
|
333
|
+
}, G = (t, o) => {
|
|
334
|
+
t && (r.value[o] = t, t.textContent || (t.textContent = v.value[o].content), new MutationObserver(() => {
|
|
335
|
+
s.value === o && !f.value && (f.value = !0, setTimeout(() => {
|
|
336
|
+
v.value[o].content = t.textContent !== null ? t.textContent : "", f.value = !1;
|
|
337
|
+
}, 0));
|
|
338
|
+
}).observe(t, {
|
|
339
|
+
characterData: !0,
|
|
340
|
+
childList: !0,
|
|
341
|
+
subtree: !0
|
|
342
|
+
}));
|
|
343
|
+
}, O = (t, o) => {
|
|
344
|
+
f.value = !0;
|
|
345
|
+
const u = t.target, _ = u.textContent !== null ? u.textContent : "";
|
|
346
|
+
v.value[o].content !== _ && (v.value[o].content = _, I()), setTimeout(() => {
|
|
347
|
+
f.value = !1;
|
|
348
|
+
}, 10);
|
|
349
|
+
}, X = (t) => {
|
|
350
|
+
if (document.createRange) {
|
|
351
|
+
const o = document.createRange();
|
|
352
|
+
o.selectNodeContents(t), o.collapse(!1);
|
|
353
|
+
const u = window.getSelection();
|
|
354
|
+
u && (u.removeAllRanges(), u.addRange(o));
|
|
355
|
+
}
|
|
356
|
+
}, Y = (t) => {
|
|
357
|
+
if (s.value !== t) {
|
|
358
|
+
if (s.value !== -1) {
|
|
359
|
+
const o = s.value, u = r.value[o];
|
|
360
|
+
u && (v.value[o].content = u.textContent !== null ? u.textContent : "", I());
|
|
361
|
+
}
|
|
362
|
+
s.value = t, m("field-active", !0, t), A(() => {
|
|
363
|
+
const o = r.value[t];
|
|
364
|
+
o && (o.focus(), !o.textContent && v.value[t].content && (o.textContent = v.value[t].content), X(o));
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
}, H = () => {
|
|
368
|
+
const t = s.value;
|
|
369
|
+
if (t >= 0) {
|
|
370
|
+
const o = r.value[t];
|
|
371
|
+
if (o) {
|
|
372
|
+
const u = o.textContent !== null ? o.textContent : "";
|
|
373
|
+
v.value[t].content = u;
|
|
374
|
+
}
|
|
375
|
+
m("field-active", !1, t);
|
|
376
|
+
}
|
|
377
|
+
I(), s.value = -1;
|
|
378
|
+
}, e0 = (t) => {
|
|
379
|
+
t.key === "Enter" && (t.preventDefault(), H());
|
|
380
|
+
};
|
|
381
|
+
q(
|
|
382
|
+
() => i.value,
|
|
383
|
+
(t) => {
|
|
384
|
+
t === "" ? t0() : t && !a.value && L(t);
|
|
385
|
+
}
|
|
386
|
+
), q(
|
|
387
|
+
() => i.template,
|
|
388
|
+
() => {
|
|
389
|
+
l(), A(() => {
|
|
390
|
+
M();
|
|
391
|
+
});
|
|
392
|
+
},
|
|
393
|
+
{ immediate: !0 }
|
|
394
|
+
);
|
|
395
|
+
const t0 = () => {
|
|
396
|
+
v.value.forEach((t) => {
|
|
397
|
+
t.isField && (t.content = t.placeholder || "");
|
|
398
|
+
}), I();
|
|
399
|
+
}, j = () => {
|
|
400
|
+
t0();
|
|
401
|
+
};
|
|
402
|
+
return k0(() => {
|
|
403
|
+
M();
|
|
404
|
+
}), h({
|
|
405
|
+
activateFirstField: () => {
|
|
406
|
+
for (let t = 0; t < v.value.length; t++)
|
|
407
|
+
if (v.value[t].isField) {
|
|
408
|
+
Y(t);
|
|
409
|
+
break;
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
resetFields: j
|
|
413
|
+
}), (t, o) => (d(), C("div", q0, [
|
|
414
|
+
B("div", {
|
|
415
|
+
class: "template-content",
|
|
416
|
+
ref_key: "editorRef",
|
|
417
|
+
ref: w
|
|
418
|
+
}, [
|
|
419
|
+
(d(!0), C(r0, null, v0(v.value, (u, _) => (d(), C(r0, { key: _ }, [
|
|
420
|
+
u.isField ? (d(), C("span", {
|
|
421
|
+
key: 1,
|
|
422
|
+
class: z(["template-field", { "template-field-active": s.value === _ }]),
|
|
423
|
+
onClick: (y) => Y(_)
|
|
424
|
+
}, [
|
|
425
|
+
s.value === _ ? (d(), C("span", {
|
|
426
|
+
key: 0,
|
|
427
|
+
ref_for: !0,
|
|
428
|
+
ref: (y) => G(y, _),
|
|
429
|
+
class: "template-editable",
|
|
430
|
+
contenteditable: "true",
|
|
431
|
+
onInput: (y) => O(y, _),
|
|
432
|
+
onBlur: o[0] || (o[0] = (y) => H()),
|
|
433
|
+
onKeydown: o[1] || (o[1] = (y) => e0(y)),
|
|
434
|
+
onClick: o[2] || (o[2] = S0(() => {
|
|
435
|
+
}, ["stop"]))
|
|
436
|
+
}, null, 40, N0)) : (d(), C("span", Q0, U(u.content), 1))
|
|
437
|
+
], 10, H0)) : (d(), C("span", G0, U(u.content), 1))
|
|
438
|
+
], 64))), 128))
|
|
439
|
+
], 512)
|
|
440
|
+
]));
|
|
441
|
+
}
|
|
442
|
+
}), X0 = /* @__PURE__ */ I0(J0, [["__scopeId", "data-v-09e9c7ed"]]), Y0 = ["data-theme"], e2 = { class: "tiny-sender__container" }, t2 = {
|
|
443
|
+
key: 0,
|
|
444
|
+
class: "tiny-sender__header-slot"
|
|
445
|
+
}, l2 = {
|
|
446
|
+
key: 0,
|
|
447
|
+
class: "tiny-sender__prefix-slot"
|
|
448
|
+
}, s2 = { class: "tiny-sender__content-area" }, n2 = {
|
|
449
|
+
key: 0,
|
|
450
|
+
class: "tiny-sender__decorative-content"
|
|
451
|
+
}, o2 = {
|
|
452
|
+
key: 1,
|
|
453
|
+
class: "tiny-sender__actions-slot"
|
|
454
|
+
}, i2 = { class: "tiny-sender__footer-left" }, a2 = { class: "tiny-sender__footer-right" }, r2 = { class: "real-word-length" }, c2 = {
|
|
455
|
+
key: 1,
|
|
456
|
+
class: "tiny-sender__toolbar"
|
|
457
|
+
}, u2 = { class: "tiny-sender__buttons-container" }, d2 = {
|
|
458
|
+
key: 1,
|
|
459
|
+
class: "tiny-sender__footer-slot"
|
|
460
|
+
}, f2 = {
|
|
461
|
+
key: 0,
|
|
462
|
+
class: "tiny-sender__suggestions"
|
|
463
|
+
}, p2 = ["onClick"], h2 = {
|
|
464
|
+
key: 0,
|
|
465
|
+
class: "tiny-sender__error"
|
|
466
|
+
}, o0 = /* @__PURE__ */ c0({
|
|
467
|
+
__name: "index",
|
|
468
|
+
props: {
|
|
469
|
+
autofocus: { type: Boolean, default: !1 },
|
|
470
|
+
autoSize: { type: [Boolean, Object], default: () => ({ minRows: 1, maxRows: 3 }) },
|
|
471
|
+
allowSpeech: { type: Boolean, default: !0 },
|
|
472
|
+
allowFiles: { type: Boolean, default: !1 },
|
|
473
|
+
clearable: { type: Boolean, default: !1 },
|
|
474
|
+
disabled: { type: Boolean, default: !1 },
|
|
475
|
+
defaultValue: {},
|
|
476
|
+
loading: { type: Boolean, default: !1 },
|
|
477
|
+
modelValue: { default: "" },
|
|
478
|
+
mode: { default: "single" },
|
|
479
|
+
maxLength: { default: 1 / 0 },
|
|
480
|
+
submitType: { default: "enter" },
|
|
481
|
+
speech: { type: [Boolean, Object] },
|
|
482
|
+
placeholder: { default: "请输入内容..." },
|
|
483
|
+
showWordLimit: { type: Boolean, default: !1 },
|
|
484
|
+
suggestions: {},
|
|
485
|
+
theme: { default: "light" },
|
|
486
|
+
template: { default: "" },
|
|
487
|
+
hasContent: { type: Boolean, default: void 0 },
|
|
488
|
+
tipsMessage: {}
|
|
489
|
+
},
|
|
490
|
+
emits: ["update:modelValue", "submit", "clear", "speech-start", "speech-end", "speech-interim", "speech-error", "suggestion-select", "focus", "blur", "escape-press", "cancel", "reset-template", "fixed-link-click"],
|
|
491
|
+
setup(n, { expose: h, emit: c }) {
|
|
492
|
+
const i = n, m = c, w = b(null), r = b(null), s = b(null), k = b(null), f = S(() => !!i.template), { inputValue: a, isComposing: v, clearInput: Z } = $0(i, m), l = b(i.mode), L = b(!1), x = () => {
|
|
493
|
+
l.value === "single" && (l.value = "multiple", A(() => {
|
|
494
|
+
setTimeout(() => {
|
|
495
|
+
const e = document.querySelector(".tiny-textarea__inner");
|
|
496
|
+
if (e) {
|
|
497
|
+
e.style.whiteSpace = "pre-wrap";
|
|
498
|
+
const p = a.value.length;
|
|
499
|
+
e.focus(), e.setSelectionRange(p, p);
|
|
500
|
+
}
|
|
501
|
+
}, 50);
|
|
502
|
+
}));
|
|
503
|
+
}, I = (e, p) => {
|
|
504
|
+
const g = document.createElement("span");
|
|
505
|
+
g.style.visibility = "hidden", g.style.position = "absolute", g.style.whiteSpace = "nowrap", g.style.font = p, g.textContent = e, document.body.appendChild(g);
|
|
506
|
+
const J = g.offsetWidth;
|
|
507
|
+
return document.body.removeChild(g), J;
|
|
508
|
+
}, M = () => {
|
|
509
|
+
if (i.mode !== "single" || !w.value || L.value) return;
|
|
510
|
+
const p = document.querySelector(".tiny-sender__content-area").querySelector(".tiny-input__inner"), g = k.value || document.querySelector(".tiny-sender__buttons-container");
|
|
511
|
+
if (!p) return;
|
|
512
|
+
const J = window.getComputedStyle(p).font, p0 = I(a.value, J), w0 = p.offsetWidth - ((g == null ? void 0 : g.offsetWidth) || 0) - 20;
|
|
513
|
+
p0 > w0 && l.value === "single" && (L.value = !0, l.value = "multiple", A(() => {
|
|
514
|
+
w.value ? setTimeout(() => {
|
|
515
|
+
const s0 = document.querySelector(".tiny-textarea__inner");
|
|
516
|
+
if (s0) {
|
|
517
|
+
s0.style.whiteSpace = "pre-wrap";
|
|
518
|
+
const h0 = a.value.length;
|
|
519
|
+
s0.focus(), s0.setSelectionRange(h0, h0);
|
|
520
|
+
}
|
|
521
|
+
L.value = !1;
|
|
522
|
+
}, 300) : L.value = !1;
|
|
523
|
+
}));
|
|
524
|
+
}, G = () => {
|
|
525
|
+
Z(), l.value = "single", i.template && m("reset-template"), A(() => {
|
|
526
|
+
a.value === "" && (l.value = i.mode || "single");
|
|
527
|
+
});
|
|
528
|
+
}, O = b(!1), X = S(() => !i.suggestions || !a.value ? [] : i.suggestions.filter((e) => e.toLowerCase().includes(a.value.toLowerCase()))), Y = (e) => {
|
|
529
|
+
a.value = e, O.value = !1, m("suggestion-select", e);
|
|
530
|
+
}, H = (e) => {
|
|
531
|
+
a.value = e, m("update:modelValue", e);
|
|
532
|
+
}, e0 = () => {
|
|
533
|
+
r.value && r.value.activateFirstField();
|
|
534
|
+
}, t0 = S(() => {
|
|
535
|
+
const e = typeof i.speech == "object" ? i.speech : {};
|
|
536
|
+
return {
|
|
537
|
+
...e,
|
|
538
|
+
onStart: () => m("speech-start"),
|
|
539
|
+
onEnd: (p) => m("speech-end", p),
|
|
540
|
+
onInterim: (p) => m("speech-interim", p),
|
|
541
|
+
onFinal: (p) => {
|
|
542
|
+
if (e.autoReplace)
|
|
543
|
+
a.value = p;
|
|
544
|
+
else {
|
|
545
|
+
const g = a.value;
|
|
546
|
+
g && p && !g.endsWith(" ") && !p.startsWith(" ") && g.length > 0 ? a.value = g + " " + p : a.value = g + p;
|
|
547
|
+
}
|
|
548
|
+
m("speech-end", p);
|
|
549
|
+
},
|
|
550
|
+
onError: (p) => {
|
|
551
|
+
y0(p.message), m("speech-error", p);
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
}), { speechState: j, start: t, stop: o } = T0(t0.value), u = () => {
|
|
555
|
+
j.isRecording ? o() : t();
|
|
556
|
+
}, { handleKeyPress: _, triggerSubmit: y } = M0(
|
|
557
|
+
i,
|
|
558
|
+
m,
|
|
559
|
+
a,
|
|
560
|
+
v,
|
|
561
|
+
j,
|
|
562
|
+
O,
|
|
563
|
+
u,
|
|
564
|
+
l,
|
|
565
|
+
x
|
|
566
|
+
), D = (e) => {
|
|
567
|
+
m("focus", e);
|
|
568
|
+
}, E = (e) => {
|
|
569
|
+
m("blur", e);
|
|
570
|
+
}, u0 = S(() => l.value === "multiple" ? "textarea" : "text"), N = S(
|
|
571
|
+
() => ({
|
|
572
|
+
display: "flex",
|
|
573
|
+
justifyContent: i.showWordLimit && i.maxLength !== 1 / 0 ? "space-between" : "flex-end",
|
|
574
|
+
alignItems: "center"
|
|
575
|
+
})
|
|
576
|
+
), T = x0(), l0 = S(() => {
|
|
577
|
+
var e;
|
|
578
|
+
return !!((e = T.decorativeContent) != null && e.call(T));
|
|
579
|
+
}), K = S(() => i.disabled || l0.value), d0 = S(() => i.loading), f0 = S(() => i.hasContent !== void 0 ? i.hasContent : !!a.value), g0 = S(() => ({
|
|
580
|
+
"is-disabled": K.value,
|
|
581
|
+
"is-loading": d0.value,
|
|
582
|
+
"has-error": !!Q.value,
|
|
583
|
+
"is-auto-switching": L.value
|
|
584
|
+
})), Q = b(""), y0 = (e) => {
|
|
585
|
+
Q.value = e, setTimeout(() => Q.value = "", 5e3);
|
|
586
|
+
}, C0 = () => {
|
|
587
|
+
v.value = !1, setTimeout(() => v.value = !1, 50);
|
|
588
|
+
}, i0 = S(() => i.maxLength !== 1 / 0 && a.value.length > i.maxLength);
|
|
589
|
+
return q(a, () => {
|
|
590
|
+
O.value = !!i.suggestions && !!a.value, A(M), a.value === "" && i.mode === "single" && (l.value = "single");
|
|
591
|
+
}), q(
|
|
592
|
+
() => f.value,
|
|
593
|
+
(e) => {
|
|
594
|
+
e && (l.value = "multiple");
|
|
595
|
+
}
|
|
596
|
+
), h({
|
|
597
|
+
focus: () => {
|
|
598
|
+
if (f.value && r.value)
|
|
599
|
+
e0();
|
|
600
|
+
else if (w.value)
|
|
601
|
+
w.value.focus();
|
|
602
|
+
else {
|
|
603
|
+
const e = document.querySelector(".tiny-input__inner");
|
|
604
|
+
e == null || e.focus();
|
|
605
|
+
}
|
|
606
|
+
},
|
|
607
|
+
blur: () => {
|
|
608
|
+
if (w.value)
|
|
609
|
+
w.value.blur();
|
|
610
|
+
else {
|
|
611
|
+
const e = document.querySelector(".tiny-input__inner");
|
|
612
|
+
e == null || e.blur();
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
clear: G,
|
|
616
|
+
submit: y,
|
|
617
|
+
startSpeech: t,
|
|
618
|
+
stopSpeech: o,
|
|
619
|
+
activateTemplateFirstField: e0
|
|
620
|
+
}), (e, p) => (d(), C("div", {
|
|
621
|
+
class: z(["tiny-sender", [g0.value, `theme-${e.theme}`, `mode-${l.value}`]]),
|
|
622
|
+
"data-theme": e.theme
|
|
623
|
+
}, [
|
|
624
|
+
B("div", e2, [
|
|
625
|
+
B("div", {
|
|
626
|
+
class: "tiny-sender__input-wrapper",
|
|
627
|
+
ref_key: "inputWrapperRef",
|
|
628
|
+
ref: s
|
|
629
|
+
}, [
|
|
630
|
+
W(a0, { name: "tiny-sender-slide-down" }, {
|
|
631
|
+
default: $(() => [
|
|
632
|
+
e.$slots.header ? (d(), C("div", t2, [
|
|
633
|
+
P(e.$slots, "header")
|
|
634
|
+
])) : R("", !0)
|
|
635
|
+
]),
|
|
636
|
+
_: 3
|
|
637
|
+
}),
|
|
638
|
+
B("div", {
|
|
639
|
+
class: z(["tiny-sender__input-row", { "has-prefix": e.$slots.prefix, "has-header": e.$slots.header }])
|
|
640
|
+
}, [
|
|
641
|
+
e.$slots.prefix ? (d(), C("div", l2, [
|
|
642
|
+
P(e.$slots, "prefix")
|
|
643
|
+
])) : R("", !0),
|
|
644
|
+
B("div", s2, [
|
|
645
|
+
e.$slots.decorativeContent ? (d(), C("div", n2, [
|
|
646
|
+
P(e.$slots, "decorativeContent")
|
|
647
|
+
])) : R("", !0),
|
|
648
|
+
f.value ? (d(), V(X0, {
|
|
649
|
+
key: 1,
|
|
650
|
+
ref_key: "templateEditorRef",
|
|
651
|
+
ref: r,
|
|
652
|
+
template: e.template,
|
|
653
|
+
value: F(a),
|
|
654
|
+
"onUpdate:value": H,
|
|
655
|
+
onInput: H
|
|
656
|
+
}, null, 8, ["template", "value"])) : (d(), V(F(R0), {
|
|
657
|
+
key: 2,
|
|
658
|
+
ref_key: "inputRef",
|
|
659
|
+
ref: w,
|
|
660
|
+
autosize: e.autoSize,
|
|
661
|
+
type: u0.value,
|
|
662
|
+
readonly: d0.value,
|
|
663
|
+
resize: "none",
|
|
664
|
+
modelValue: F(a),
|
|
665
|
+
"onUpdate:modelValue": p[0] || (p[0] = (g) => F0(a) ? a.value = g : null),
|
|
666
|
+
disabled: K.value,
|
|
667
|
+
placeholder: e.placeholder,
|
|
668
|
+
autofocus: e.autofocus,
|
|
669
|
+
onKeydown: F(_),
|
|
670
|
+
onCompositionstart: p[1] || (p[1] = (g) => v.value = !0),
|
|
671
|
+
onCompositionend: C0,
|
|
672
|
+
onFocus: D,
|
|
673
|
+
onBlur: E
|
|
674
|
+
}, null, 8, ["autosize", "type", "readonly", "modelValue", "disabled", "placeholder", "autofocus", "onKeydown"]))
|
|
675
|
+
]),
|
|
676
|
+
l.value === "single" ? (d(), C("div", o2, [
|
|
677
|
+
B("div", {
|
|
678
|
+
class: "tiny-sender__buttons-container",
|
|
679
|
+
ref_key: "buttonsContainerRef",
|
|
680
|
+
ref: k
|
|
681
|
+
}, [
|
|
682
|
+
P(e.$slots, "actions"),
|
|
683
|
+
W(m0, {
|
|
684
|
+
class: "inline-buttons",
|
|
685
|
+
"allow-speech": e.allowSpeech,
|
|
686
|
+
"allow-files": e.allowFiles,
|
|
687
|
+
loading: e.loading,
|
|
688
|
+
disabled: K.value,
|
|
689
|
+
"show-clear": e.clearable,
|
|
690
|
+
"has-content": f0.value,
|
|
691
|
+
"speech-status": F(j),
|
|
692
|
+
"submit-type": e.submitType,
|
|
693
|
+
"is-over-limit": i0.value,
|
|
694
|
+
onClear: G,
|
|
695
|
+
onToggleSpeech: u,
|
|
696
|
+
onSubmit: F(y),
|
|
697
|
+
onCancel: p[2] || (p[2] = (g) => e.$emit("cancel"))
|
|
698
|
+
}, null, 8, ["allow-speech", "allow-files", "loading", "disabled", "show-clear", "has-content", "speech-status", "submit-type", "is-over-limit", "onSubmit"])
|
|
699
|
+
], 512)
|
|
700
|
+
])) : R("", !0)
|
|
701
|
+
], 2),
|
|
702
|
+
W(a0, { name: "tiny-sender-slide-up" }, {
|
|
703
|
+
default: $(() => [
|
|
704
|
+
l.value === "multiple" ? (d(), C("div", {
|
|
705
|
+
key: 0,
|
|
706
|
+
style: D0(N.value),
|
|
707
|
+
class: "tiny-sender__footer-slot tiny-sender__bottom-row"
|
|
708
|
+
}, [
|
|
709
|
+
B("div", i2, [
|
|
710
|
+
P(e.$slots, "footer-left")
|
|
711
|
+
]),
|
|
712
|
+
B("div", a2, [
|
|
713
|
+
P(e.$slots, "footer-right"),
|
|
714
|
+
e.showWordLimit && e.maxLength !== 1 / 0 ? (d(), C("div", {
|
|
715
|
+
key: 0,
|
|
716
|
+
class: z(["tiny-sender__word-limit", { "is-over-limit": i0.value }])
|
|
717
|
+
}, [
|
|
718
|
+
B("span", r2, U(F(a).length), 1),
|
|
719
|
+
E0("/" + U(e.maxLength), 1)
|
|
720
|
+
], 2)) : R("", !0),
|
|
721
|
+
l.value === "multiple" ? (d(), C("div", c2, [
|
|
722
|
+
B("div", u2, [
|
|
723
|
+
W(m0, {
|
|
724
|
+
"allow-speech": e.allowSpeech,
|
|
725
|
+
"allow-files": e.allowFiles,
|
|
726
|
+
loading: e.loading,
|
|
727
|
+
disabled: K.value,
|
|
728
|
+
"show-clear": e.clearable,
|
|
729
|
+
"has-content": f0.value,
|
|
730
|
+
"speech-status": F(j),
|
|
731
|
+
"submit-type": e.submitType,
|
|
732
|
+
"is-over-limit": i0.value,
|
|
733
|
+
onClear: G,
|
|
734
|
+
onToggleSpeech: u,
|
|
735
|
+
onSubmit: F(y),
|
|
736
|
+
onCancel: p[3] || (p[3] = (g) => e.$emit("cancel"))
|
|
737
|
+
}, null, 8, ["allow-speech", "allow-files", "loading", "disabled", "show-clear", "has-content", "speech-status", "submit-type", "is-over-limit", "onSubmit"])
|
|
738
|
+
])
|
|
739
|
+
])) : R("", !0)
|
|
740
|
+
])
|
|
741
|
+
], 4)) : e.$slots.footer ? (d(), C("div", d2, [
|
|
742
|
+
P(e.$slots, "footer")
|
|
743
|
+
])) : R("", !0)
|
|
744
|
+
]),
|
|
745
|
+
_: 3
|
|
746
|
+
})
|
|
747
|
+
], 512)
|
|
748
|
+
]),
|
|
749
|
+
W(a0, { name: "tiny-sender-slide-up" }, {
|
|
750
|
+
default: $(() => [
|
|
751
|
+
O.value && X.value.length ? (d(), C("div", f2, [
|
|
752
|
+
(d(!0), C(r0, null, v0(X.value, (g, J) => (d(), C("div", {
|
|
753
|
+
key: J,
|
|
754
|
+
class: "suggestion-item",
|
|
755
|
+
onClick: (p0) => Y(g)
|
|
756
|
+
}, U(g), 9, p2))), 128))
|
|
757
|
+
])) : R("", !0)
|
|
758
|
+
]),
|
|
759
|
+
_: 1
|
|
760
|
+
}),
|
|
761
|
+
Q.value ? (d(), C("div", h2, U(Q.value), 1)) : R("", !0)
|
|
762
|
+
], 10, Y0));
|
|
763
|
+
}
|
|
764
|
+
});
|
|
765
|
+
o0.name = "TrSender";
|
|
766
|
+
const m2 = function(n) {
|
|
767
|
+
n.component(o0.name, o0);
|
|
768
|
+
};
|
|
769
|
+
o0.install = m2;
|
|
770
|
+
export {
|
|
771
|
+
o0 as default
|
|
772
|
+
};
|