@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
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { WelcomeProps, WelcomeSlots } from './index.type';
|
|
2
|
-
declare function __VLS_template(): {
|
|
3
|
-
attrs: Partial<{}>;
|
|
4
|
-
slots: Readonly<WelcomeSlots> & WelcomeSlots;
|
|
5
|
-
refs: {};
|
|
6
|
-
rootEl: HTMLDivElement;
|
|
7
|
-
};
|
|
8
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
-
declare const __VLS_component: import('vue').DefineComponent<WelcomeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<WelcomeProps> & Readonly<{}>, {
|
|
10
|
-
align: "left" | "center" | "right" | string;
|
|
11
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
12
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
13
|
-
export default _default;
|
|
14
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
15
|
-
new (): {
|
|
16
|
-
$slots: S;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { IconMenu } from '@opentiny/tiny-robot-svgs'
|
|
3
|
-
import TinyTooltip from '@opentiny/vue-tooltip'
|
|
4
|
-
import { onClickOutside, useWindowSize } from '@vueuse/core'
|
|
5
|
-
import { computed, nextTick, ref, useTemplateRef, VNode, watch } from 'vue'
|
|
6
|
-
import IconButton from '../icon-button'
|
|
7
|
-
import { ActionGroupEvents, ActionGroupProps, ActionGroupSlots } from './index.type'
|
|
8
|
-
|
|
9
|
-
const props = defineProps<ActionGroupProps>()
|
|
10
|
-
|
|
11
|
-
const slots = defineSlots<ActionGroupSlots>()
|
|
12
|
-
|
|
13
|
-
const emit = defineEmits<ActionGroupEvents>()
|
|
14
|
-
|
|
15
|
-
const children = computed(() => {
|
|
16
|
-
const defaultSlot = slots.default()
|
|
17
|
-
|
|
18
|
-
if (Array.isArray(defaultSlot)) {
|
|
19
|
-
if (defaultSlot.length === 1 && defaultSlot[0].type?.toString() === 'Symbol(v-fgt)') {
|
|
20
|
-
return defaultSlot[0].children as VNode[]
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return defaultSlot
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (defaultSlot.type?.toString() === 'Symbol(v-fgt)') {
|
|
27
|
-
return defaultSlot.children as VNode[]
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return [defaultSlot]
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
const maxNum = computed(() => {
|
|
34
|
-
const n = props.maxNum ?? Number.MAX_SAFE_INTEGER
|
|
35
|
-
|
|
36
|
-
return n > 0 ? n : Number.MAX_SAFE_INTEGER
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
const showMore = computed(() => {
|
|
40
|
-
return children.value.length > maxNum.value
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
const list = computed(() => {
|
|
44
|
-
if (showMore.value) {
|
|
45
|
-
return children.value.slice(0, maxNum.value)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return children.value
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
const moreList = computed(() => {
|
|
52
|
-
if (showMore.value) {
|
|
53
|
-
return children.value.slice(maxNum.value)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return []
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
const moreBtn = useTemplateRef('moreBtnRef')
|
|
60
|
-
const dropDown = useTemplateRef('dropDownRef')
|
|
61
|
-
const showDropdown = ref(false)
|
|
62
|
-
|
|
63
|
-
const handleMoreClick = () => {
|
|
64
|
-
showDropdown.value = !showDropdown.value
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
onClickOutside(dropDown, (ev) => {
|
|
68
|
-
if (moreBtn.value?.contains(ev.target as Node)) {
|
|
69
|
-
return
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
showDropdown.value = false
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
const handleItemClick = (name: string) => {
|
|
76
|
-
emit('item-click', name)
|
|
77
|
-
showDropdown.value = false
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const dropDownPlacement = ref('placement-bottom')
|
|
81
|
-
const { height: windowHeight } = useWindowSize()
|
|
82
|
-
|
|
83
|
-
const updateDropDownPlacement = () => {
|
|
84
|
-
if (!dropDown.value || !moreBtn.value) {
|
|
85
|
-
return 'placement-bottom'
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
const dropDownRect = dropDown.value.getBoundingClientRect()
|
|
89
|
-
const moreBtnRect = moreBtn.value.getBoundingClientRect()
|
|
90
|
-
|
|
91
|
-
dropDownPlacement.value =
|
|
92
|
-
moreBtnRect.bottom + dropDownRect.height + 16 > windowHeight.value ? 'placement-top' : 'placement-bottom'
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
watch(showDropdown, (show) => {
|
|
96
|
-
if (show) {
|
|
97
|
-
nextTick(() => {
|
|
98
|
-
updateDropDownPlacement()
|
|
99
|
-
})
|
|
100
|
-
}
|
|
101
|
-
})
|
|
102
|
-
|
|
103
|
-
watch(windowHeight, () => {
|
|
104
|
-
if (showDropdown.value) {
|
|
105
|
-
updateDropDownPlacement()
|
|
106
|
-
}
|
|
107
|
-
})
|
|
108
|
-
</script>
|
|
109
|
-
|
|
110
|
-
<template>
|
|
111
|
-
<div class="tr-action-group">
|
|
112
|
-
<tiny-tooltip
|
|
113
|
-
v-for="(item, index) in list"
|
|
114
|
-
:key="index"
|
|
115
|
-
:content="item.props?.label"
|
|
116
|
-
effect="dark"
|
|
117
|
-
placement="top"
|
|
118
|
-
:open-delay="500"
|
|
119
|
-
:disabled="!props.showTooltip"
|
|
120
|
-
>
|
|
121
|
-
<span class="tr-action-group__btn-wrapper" @click="handleItemClick(item.props?.name)">
|
|
122
|
-
<component :is="item" />
|
|
123
|
-
</span>
|
|
124
|
-
</tiny-tooltip>
|
|
125
|
-
<tiny-tooltip
|
|
126
|
-
v-if="showMore"
|
|
127
|
-
content="更多"
|
|
128
|
-
effect="dark"
|
|
129
|
-
placement="top"
|
|
130
|
-
:open-delay="500"
|
|
131
|
-
:disabled="!props.showTooltip"
|
|
132
|
-
>
|
|
133
|
-
<span ref="moreBtnRef" class="tr-action-group__btn-wrapper" @click="handleMoreClick">
|
|
134
|
-
<slot name="moreBtn">
|
|
135
|
-
<icon-button :icon="IconMenu" />
|
|
136
|
-
</slot>
|
|
137
|
-
<transition name="tr-action-group-dropdown">
|
|
138
|
-
<ul v-show="showDropdown" ref="dropDownRef" :class="['tr-action-group__dropdown', dropDownPlacement]">
|
|
139
|
-
<li
|
|
140
|
-
class="tr-action-group__dropdown-item"
|
|
141
|
-
v-for="(item, index) in moreList"
|
|
142
|
-
:key="index"
|
|
143
|
-
@click.stop="handleItemClick(item.props?.name)"
|
|
144
|
-
>
|
|
145
|
-
<component v-if="!props.dropDownShowLabelOnly" :is="item" />
|
|
146
|
-
<span class="tr-action-group__dropdown-item-text">{{ item.props?.label }}</span>
|
|
147
|
-
</li>
|
|
148
|
-
</ul>
|
|
149
|
-
</transition>
|
|
150
|
-
</span>
|
|
151
|
-
</tiny-tooltip>
|
|
152
|
-
</div>
|
|
153
|
-
</template>
|
|
154
|
-
|
|
155
|
-
<style lang="less" scoped>
|
|
156
|
-
.tr-action-group {
|
|
157
|
-
display: inline-flex;
|
|
158
|
-
align-items: center;
|
|
159
|
-
gap: 4px;
|
|
160
|
-
|
|
161
|
-
.tr-action-group__btn-wrapper {
|
|
162
|
-
display: inline-flex;
|
|
163
|
-
line-height: 0;
|
|
164
|
-
position: relative;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.tr-action-group__dropdown {
|
|
168
|
-
width: max-content;
|
|
169
|
-
position: absolute;
|
|
170
|
-
z-index: 100;
|
|
171
|
-
right: 0;
|
|
172
|
-
background-color: white;
|
|
173
|
-
padding: 4px;
|
|
174
|
-
border-radius: 12px;
|
|
175
|
-
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.08);
|
|
176
|
-
|
|
177
|
-
&.placement-top {
|
|
178
|
-
bottom: calc(100% + 8px);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
&.placement-bottom {
|
|
182
|
-
top: calc(100% + 8px);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.tr-action-group__dropdown-item {
|
|
186
|
-
border-radius: 8px;
|
|
187
|
-
cursor: pointer;
|
|
188
|
-
height: 32px;
|
|
189
|
-
display: flex;
|
|
190
|
-
align-items: center;
|
|
191
|
-
justify-content: flex-start;
|
|
192
|
-
padding: 4px 16px 4px 8px;
|
|
193
|
-
gap: 4px;
|
|
194
|
-
transition: background-color 0.3s;
|
|
195
|
-
|
|
196
|
-
&:not(:first-child) {
|
|
197
|
-
margin-top: 4px;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
&:hover {
|
|
201
|
-
background-color: rgba(0, 0, 0, 0.04);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
&:active {
|
|
205
|
-
background-color: rgba(0, 0, 0, 0.15);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
& > * {
|
|
209
|
-
flex-shrink: 0;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
&:has(> *:only-child) {
|
|
213
|
-
padding: 4px 16px;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.tr-action-group__dropdown-item-text {
|
|
217
|
-
font-size: 12px;
|
|
218
|
-
line-height: 20px;
|
|
219
|
-
color: rgb(25, 25, 25);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
:deep(button) {
|
|
223
|
-
--tr-icon-button-hover-bg: unset;
|
|
224
|
-
--tr-icon-button-active-bg: unset;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// 下拉动画
|
|
230
|
-
.tr-action-group-dropdown {
|
|
231
|
-
&-enter-active,
|
|
232
|
-
&-leave-active {
|
|
233
|
-
transition: opacity 0.3s ease;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
&-enter-from,
|
|
237
|
-
&-leave-to {
|
|
238
|
-
opacity: 0;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
&-enter-to,
|
|
242
|
-
&-leave-from {
|
|
243
|
-
opacity: 1;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
</style>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue'
|
|
2
|
-
import ActionGroup from './ActionGroup.vue'
|
|
3
|
-
import ActionGroupItemComp from './ActionGroupItem.vue'
|
|
4
|
-
|
|
5
|
-
ActionGroup.name = 'TrActionGroup'
|
|
6
|
-
|
|
7
|
-
const install = function <T>(app: App<T>) {
|
|
8
|
-
app.component(ActionGroup.name!, ActionGroup)
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
ActionGroup.install = install
|
|
12
|
-
|
|
13
|
-
export default ActionGroup as typeof ActionGroup & { install: typeof install }
|
|
14
|
-
|
|
15
|
-
ActionGroupItemComp.name = 'TrActionGroupItem'
|
|
16
|
-
|
|
17
|
-
const installActionGroupItem = function <T>(app: App<T>) {
|
|
18
|
-
app.component(ActionGroupItemComp.name!, ActionGroupItemComp)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
ActionGroupItemComp.install = installActionGroupItem
|
|
22
|
-
|
|
23
|
-
export const ActionGroupItem = ActionGroupItemComp as typeof ActionGroupItemComp & {
|
|
24
|
-
install: typeof installActionGroupItem
|
|
25
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { VNode } from 'vue'
|
|
2
|
-
|
|
3
|
-
export interface ActionGroupProps {
|
|
4
|
-
maxNum?: number
|
|
5
|
-
showTooltip?: boolean
|
|
6
|
-
dropDownShowLabelOnly?: boolean
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface ActionGroupEvents {
|
|
10
|
-
(e: 'item-click', name: string): void
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface ActionGroupSlots {
|
|
14
|
-
default: () => VNode | VNode[]
|
|
15
|
-
moreBtn: () => VNode
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface ActionGroupItemProps {
|
|
19
|
-
name: string
|
|
20
|
-
label: string
|
|
21
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<svg width="32.000000" height="32.000000" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
2
|
-
<desc>
|
|
3
|
-
Created with Pixso.
|
|
4
|
-
</desc>
|
|
5
|
-
<defs/>
|
|
6
|
-
<rect id="矩形" rx="8.000000" width="32.000000" height="32.000000" fill="#000000" fill-opacity="0"/>
|
|
7
|
-
<rect id="矩形" x="0.500000" y="0.500000" rx="8.000000" width="31.000000" height="31.000000" stroke="#979797" stroke-opacity="0" stroke-width="1.000000"/>
|
|
8
|
-
<rect id="矩形" x="4.000000" y="4.000000" width="24.000000" height="24.000000" fill="#D8D8D8" fill-opacity="0"/>
|
|
9
|
-
<rect id="矩形" x="4.500000" y="4.500000" width="23.000000" height="23.000000" stroke="#979797" stroke-opacity="0" stroke-width="1.000000"/>
|
|
10
|
-
<path id="路径 3" d="M13.37 10.32L13.23 10.26L15.44 11.19L12.61 18.98C12.2 20.11 12.81 21.36 13.95 21.72C15.04 22.07 16.2 21.5 16.59 20.43L19.35 12.85L18.8 12.65L18.79 12.62C18.79 12.61 18.8 12.61 18.8 12.6L15.44 11.19L15.83 10.14C16.49 8.31 18.52 7.37 20.35 8.03C22.18 8.7 23.12 10.72 22.46 12.55L19.15 21.65C18.21 24.21 15.38 25.54 12.82 24.6C10.25 23.67 8.93 20.83 9.86 18.27L12.83 10.12L12.28 9.92L12.27 9.9C12.39 9.58 12.73 9.42 13.04 9.54C13.36 9.65 13.52 9.99 13.4 10.31L13.37 10.32Z" fill="#D8D8D8" fill-opacity="0" fill-rule="evenodd"/>
|
|
11
|
-
<path id="路径 3" d="M12.84 10.1L9.86 18.27C8.93 20.83 10.25 23.67 12.82 24.6C15.38 25.54 18.21 24.21 19.15 21.65L22.46 12.55C23.12 10.72 22.18 8.7 20.35 8.03C18.52 7.37 16.49 8.31 15.83 10.14L12.61 18.98C12.2 20.11 12.81 21.36 13.95 21.72C15.04 22.07 16.2 21.5 16.59 20.43L19.35 12.83" stroke="#595959" stroke-opacity="1.000000" stroke-width="1.200000" stroke-linecap="round"/>
|
|
12
|
-
</svg>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<svg width="152.343506" height="18.000000" viewBox="0 0 152.344 18" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
2
|
-
<desc>
|
|
3
|
-
Created with Pixso.
|
|
4
|
-
</desc>
|
|
5
|
-
<defs>
|
|
6
|
-
<linearGradient x1="159.655945" y1="6.532532" x2="-2.217805" y2="3.665466" id="paint_linear_498_7491_0" gradientUnits="userSpaceOnUse">
|
|
7
|
-
<stop stop-color="#E6FF7D" stop-opacity="0.200000"/>
|
|
8
|
-
<stop offset="0.264015" stop-color="#FFB22E" stop-opacity="0.200000"/>
|
|
9
|
-
<stop offset="0.522782" stop-color="#97A7FF" stop-opacity="0.258824"/>
|
|
10
|
-
<stop offset="0.702223" stop-color="#76ADFF" stop-opacity="0.400000"/>
|
|
11
|
-
<stop offset="0.830214" stop-color="#67D1FF" stop-opacity="0.301961"/>
|
|
12
|
-
<stop offset="1.000000" stop-color="#D27EFF" stop-opacity="0.090196"/>
|
|
13
|
-
</linearGradient>
|
|
14
|
-
</defs>
|
|
15
|
-
<path id="Fill 3" d="M9.52 9.61C12.69 9.9 15.86 10.31 19.04 10.74C20.63 10.94 22.21 11.28 23.8 11.78C25.39 12.26 26.97 12.84 28.56 13.26C30.15 13.67 31.73 13.89 33.32 13.89C34.11 13.88 34.91 13.69 35.7 13.33C36.49 12.98 37.29 12.49 38.08 12.06C38.87 11.63 39.67 11.29 40.46 11.19C40.86 11.13 41.25 11.13 41.65 11.17C42.05 11.22 42.45 11.31 42.84 11.39C44.43 11.75 46.02 12.36 47.6 13.19C50.78 14.81 53.95 16.29 57.12 17.28C60.3 18.29 63.47 18.26 66.65 16.96C69.82 15.68 72.99 14.04 76.17 12.73C79.34 11.4 82.51 11.19 85.69 11.85C88.86 12.53 92.04 14.04 95.21 14.41C96 14.51 96.8 14.56 97.59 14.56C98.38 14.55 99.18 14.5 99.97 14.46C101.56 14.35 103.14 14.18 104.73 13.94C107.91 13.45 111.08 12.64 114.25 11.93C117.43 11.19 120.6 10.62 123.77 10.26C126.95 9.88 130.12 9.49 133.3 9.28C136.47 9.06 139.64 9 142.82 9L152.34 9L142.82 9C139.64 8.99 136.47 8.93 133.3 8.71C130.12 8.5 126.95 8.11 123.77 7.73C120.6 7.37 117.43 6.8 114.25 6.06C111.08 5.35 107.91 4.54 104.73 4.05C103.14 3.81 101.56 3.64 99.97 3.53C99.18 3.49 98.38 3.44 97.59 3.43C96.8 3.43 96 3.48 95.21 3.58C92.04 3.95 88.86 5.46 85.69 6.14C82.51 6.8 79.34 6.59 76.17 5.26C72.99 3.95 69.82 2.31 66.65 1.03C63.47 -0.27 60.3 -0.31 57.12 0.71C53.95 1.7 50.78 3.18 47.6 4.8C46.02 5.63 44.43 6.24 42.84 6.6C42.45 6.68 42.05 6.77 41.65 6.82C41.25 6.86 40.86 6.86 40.46 6.8C39.67 6.7 38.87 6.36 38.08 5.93C37.29 5.51 36.49 5.01 35.7 4.66C34.91 4.3 34.11 4.11 33.32 4.1C31.73 4.1 30.15 4.32 28.56 4.73C26.97 5.15 25.39 5.73 23.8 6.21C22.21 6.71 20.63 7.05 19.04 7.25C15.86 7.68 12.69 8.09 9.52 8.38C6.34 8.69 3.17 8.94 0 9C3.17 9.05 6.34 9.3 9.52 9.61Z" fill="url(#paint_linear_498_7491_0)" fill-opacity="1.000000" fill-rule="evenodd"/>
|
|
16
|
-
</svg>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<svg width="102.000000" height="36.000000" viewBox="0 0 102 36" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
2
|
-
<desc>
|
|
3
|
-
Created with Pixso.
|
|
4
|
-
</desc>
|
|
5
|
-
<defs/>
|
|
6
|
-
<rect id="沉浸式/输入框/停止生成按钮" rx="18.000000" width="102.000000" height="36.000000" fill="#1476FF" fill-opacity="0.060000"/>
|
|
7
|
-
<path id="停止回答" d="M79.96 13.66L78.75 13.66C78.4 14.31 78.01 14.92 77.56 15.46L76.71 14.92C77.59 13.85 78.23 12.69 78.63 11.42L79.59 11.63C79.47 12.01 79.33 12.37 79.19 12.73L82.95 12.73L82.95 13.66L80.98 13.66C81.25 14.1 81.47 14.53 81.64 14.92L80.73 15.25C80.5 14.69 80.24 14.16 79.96 13.66ZM85.88 13.66L84.54 13.66C84.28 14.09 84 14.5 83.71 14.89L82.87 14.37C83.6 13.49 84.12 12.51 84.44 11.43L85.4 11.64C85.28 12.03 85.14 12.4 85 12.73L89.2 12.73L89.2 13.66L86.93 13.66C87.26 14.19 87.54 14.69 87.76 15.14L86.84 15.46Q86.42 14.52 85.88 13.66ZM34.48 17.26C35.8 15.57 36.77 13.64 37.37 11.49L38.31 11.92C37.98 12.96 37.59 13.95 37.13 14.87L37.13 24.4L36.11 24.4L36.11 16.62C35.72 17.21 35.28 17.79 34.82 18.32L34.48 17.26ZM41.56 11.65L42.58 11.49C42.72 11.84 42.84 12.24 42.98 12.69L46.97 12.69L46.97 13.59L38.31 13.59L38.31 12.69L41.98 12.69C41.85 12.33 41.71 11.98 41.56 11.65ZM55.09 22.81L55.09 11.63L56.13 11.63L56.13 16.18L60.44 16.18L60.44 17.16L56.13 17.16L56.13 22.81L61.21 22.81L61.21 23.79L48.78 23.79L48.78 22.81L51.16 22.81L51.16 14.08L52.17 14.08L52.17 22.81L55.09 22.81ZM63.38 12.4L74.61 12.4L74.61 24.17L73.63 24.17L73.63 23.57L64.36 23.57L64.36 24.17L63.38 24.17L63.38 12.4ZM64.36 13.29L64.36 22.67L73.63 22.67L73.63 13.29L64.36 13.29ZM39.23 17.04L39.23 14.4L45.9 14.4L45.9 17.04L39.23 17.04ZM79.78 18.65L79.78 18.03C78.96 18.46 78.08 18.87 77.14 19.24L76.67 18.36C79.06 17.46 81.05 16.34 82.65 15.01L83.32 15.01C85.08 16.44 87.11 17.56 89.41 18.39L88.92 19.26C87.96 18.89 87.07 18.47 86.24 18.03L86.24 18.65L79.78 18.65ZM40.21 16.28L44.92 16.28L44.92 15.17L40.21 15.17L40.21 16.28ZM66.31 20.45L66.31 15.46L71.71 15.46L71.71 20.45L66.31 20.45ZM80.32 17.72L85.7 17.72C84.7 17.14 83.79 16.5 82.98 15.8C82.21 16.48 81.33 17.13 80.32 17.72ZM67.25 19.59L70.76 19.59L70.76 16.33L67.25 16.33L67.25 19.59ZM38.18 17.86L47 17.86L47 20.25L46.25 20.25L46.25 20.88L43.22 20.88L43.22 23.15C43.22 23.9 42.8 24.3 41.99 24.3L40.41 24.3L40.2 23.32C40.7 23.34 41.18 23.37 41.64 23.37C42 23.37 42.18 23.2 42.18 22.9L42.18 20.88L39.12 20.88L39.12 20.25L38.18 20.25L38.18 17.86ZM39.16 18.74L39.16 20.01L46.04 20.01L46.04 18.74L39.16 18.74ZM78.81 19.96L87.18 19.96L87.18 24.38L86.21 24.38L86.21 23.75L79.78 23.75L79.78 24.38L78.81 24.38L78.81 19.96ZM79.78 20.88L79.78 22.83L86.21 22.83L86.21 20.88L79.78 20.88Z" fill="#1476FF" fill-opacity="1.000000" fill-rule="evenodd"/>
|
|
8
|
-
<rect id="矩形" x="7.713867" y="7.714844" width="20.571428" height="20.571428" fill="#D8D8D8" fill-opacity="0"/>
|
|
9
|
-
<rect id="矩形" x="8.213867" y="8.214844" width="19.571428" height="19.571428" stroke="#979797" stroke-opacity="0" stroke-width="1.000000"/>
|
|
10
|
-
<rect id="矩形" x="6.000000" y="6.000000" width="24.000000" height="24.000000" fill="#D8D8D8" fill-opacity="0"/>
|
|
11
|
-
<rect id="矩形" x="6.500000" y="6.500000" width="23.000000" height="23.000000" stroke="#979797" stroke-opacity="0" stroke-width="1.000000"/>
|
|
12
|
-
<rect id="矩形" x="14.666992" y="14.666016" rx="1.500000" width="6.666667" height="6.666667" fill="#1476FF" fill-opacity="1.000000"/>
|
|
13
|
-
<circle id="椭圆形" cx="18.000000" cy="18.000000" r="8.250000" fill="#D8D8D8" fill-opacity="0"/>
|
|
14
|
-
<circle id="椭圆形" cx="18.000000" cy="18.000000" r="8.250000" stroke="#1476FF" stroke-opacity="1.000000" stroke-width="1.500000"/>
|
|
15
|
-
<path id="路径" d="M17.8 10.47C17.48 10.39 17.25 10.1 17.25 9.75C17.25 9.33 17.58 9 18 9L18.02 9.02L18.02 9.75C22.56 9.76 26.25 13.45 26.25 18C26.25 22.55 22.55 26.25 18 26.25C16.52 26.25 15.13 25.86 13.93 25.18L13.57 25.81L13.54 25.82C13.18 25.61 13.06 25.16 13.26 24.8C13.44 24.49 13.78 24.35 14.11 24.44L17.8 10.47Z" fill="#595959" fill-opacity="0" fill-rule="evenodd"/>
|
|
16
|
-
<path id="路径" d="M13.91 25.17C15.12 25.85 16.51 26.25 18 26.25C22.55 26.25 26.25 22.55 26.25 18C26.25 13.44 22.55 9.75 18 9.75" stroke="#1476FF" stroke-opacity="1.000000" stroke-width="1.500000" stroke-linecap="round"/>
|
|
17
|
-
</svg>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
2
|
-
<desc>
|
|
3
|
-
Created with Pixso.
|
|
4
|
-
</desc>
|
|
5
|
-
<defs>
|
|
6
|
-
<filter id="filter_447_4247_dd" x="0" y="0" width="36" height="36" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
7
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
8
|
-
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
9
|
-
<feOffset dx="0" dy="2"/>
|
|
10
|
-
<feGaussianBlur stdDeviation="1.66667"/>
|
|
11
|
-
<feComposite in2="hardAlpha" operator="out" k2="-1" k3="1"/>
|
|
12
|
-
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.039 0"/>
|
|
13
|
-
<feBlend mode="normal" in2="BackgroundImageFix" result="effect_dropShadow_1"/>
|
|
14
|
-
<feBlend mode="normal" in="SourceGraphic" in2="effect_dropShadow_1" result="shape"/>
|
|
15
|
-
</filter>
|
|
16
|
-
</defs>
|
|
17
|
-
<g filter="url(#filter_447_4247_dd)">
|
|
18
|
-
<rect id="Rectangle" x="0" y="0" rx="18" width="36" height="36" fill="#1476FF" fill-opacity="1"/>
|
|
19
|
-
</g>
|
|
20
|
-
<path id="Fill 1" d="M26.38 8.7L7.99 17.45C7.59 17.64 7.58 18.21 7.98 18.4L12.56 20.7C12.78 20.81 13.05 20.77 13.23 20.62L23.54 11.95C23.71 11.81 23.94 12.05 23.78 12.21L14.9 21.42C14.72 21.61 14.63 21.87 14.66 22.14L15.21 26.9C15.26 27.36 15.83 27.54 16.14 27.19L18.36 24.65C18.49 24.5 18.46 24.25 18.29 24.13L16.45 22.88C16.34 22.81 16.44 22.64 16.56 22.7L19 23.92L21.87 25.35C22.17 25.5 22.52 25.35 22.62 25.03L27.44 9.62C27.64 8.98 26.98 8.41 26.38 8.7Z" fill="#FFFFFF" fill-opacity="1" fill-rule="evenodd"/>
|
|
21
|
-
</svg>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<svg width="32.000000" height="32.000000" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
2
|
-
<desc>
|
|
3
|
-
Created with Pixso.
|
|
4
|
-
</desc>
|
|
5
|
-
<defs>
|
|
6
|
-
<linearGradient x1="12.999998" y1="21.128080" x2="20.000002" y2="6.999999" id="paint_linear_447_301_0" gradientUnits="userSpaceOnUse">
|
|
7
|
-
<stop stop-color="#E280FF"/>
|
|
8
|
-
<stop offset="0.517615" stop-color="#6686FF"/>
|
|
9
|
-
<stop offset="1.000000" stop-color="#4DDDFF"/>
|
|
10
|
-
</linearGradient>
|
|
11
|
-
</defs>
|
|
12
|
-
<rect id="矩形" rx="8.000000" width="32.000000" height="32.000000" fill="#000000" fill-opacity="0"/>
|
|
13
|
-
<rect id="矩形" x="0.500000" y="0.500000" rx="8.000000" width="31.000000" height="31.000000" stroke="#979797" stroke-opacity="0" stroke-width="1.000000"/>
|
|
14
|
-
<rect id="矩形" x="4.000000" y="4.000000" width="24.000000" height="24.000000" fill="#D8D8D8" fill-opacity="0"/>
|
|
15
|
-
<rect id="矩形" x="4.500000" y="4.500000" width="23.000000" height="23.000000" stroke="#979797" stroke-opacity="0" stroke-width="1.000000"/>
|
|
16
|
-
<rect id="矩形" x="13.000000" y="7.000000" rx="3.500000" width="7.000000" height="11.000000" fill="url(#paint_linear_447_301_0)" fill-opacity="0"/>
|
|
17
|
-
<rect id="矩形" x="13.000000" y="7.000000" rx="3.500000" width="7.000000" height="11.000000" stroke="#595959" stroke-opacity="1.000000" stroke-width="1.200000" stroke-linejoin="round"/>
|
|
18
|
-
<path id="路径" d="M8.41 14.02L8.39 14C8.39 13.66 8.66 13.4 9 13.4C9.33 13.4 9.6 13.66 9.6 14L23.39 14C23.39 13.66 23.66 13.4 24 13.4C24.33 13.4 24.6 13.66 24.6 14L24.58 14.02L24 14.02C23.98 18.42 20.63 22 16.5 22C12.36 22 9.01 18.42 9 14.02L8.41 14.02Z" fill="#D8D8D8" fill-opacity="0" fill-rule="evenodd"/>
|
|
19
|
-
<path id="路径" d="M9 14C9 18.41 12.35 22 16.5 22C20.64 22 24 18.41 24 14" stroke="#595959" stroke-opacity="1.000000" stroke-width="1.200000" stroke-linecap="round"/>
|
|
20
|
-
<path id="路径 2" d="M15.91 22.6L15.89 22.58C15.89 22.24 16.16 21.98 16.5 21.98C16.83 21.98 17.1 22.24 17.1 22.58L17.08 22.6L15.91 22.6ZM17.08 25.34L17.1 25.36C17.1 25.7 16.83 25.96 16.5 25.96C16.16 25.96 15.89 25.7 15.89 25.36L15.91 25.34L17.08 25.34Z" fill="#D8D8D8" fill-opacity="0" fill-rule="nonzero"/>
|
|
21
|
-
<path id="路径 2" d="M16.5 22.58L16.5 25.36" stroke="#595959" stroke-opacity="1.000000" stroke-width="1.200000" stroke-linecap="round"/>
|
|
22
|
-
</svg>
|
package/src/bubble/Bubble.vue
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import markdownit from 'markdown-it'
|
|
3
|
-
import { computed } from 'vue'
|
|
4
|
-
import { BubbleProps, BubbleSlots } from './index.type'
|
|
5
|
-
|
|
6
|
-
const props = withDefaults(defineProps<BubbleProps>(), {
|
|
7
|
-
content: '',
|
|
8
|
-
placement: 'start',
|
|
9
|
-
type: 'text',
|
|
10
|
-
maxWidth: '80%',
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
const slots = defineSlots<BubbleSlots>()
|
|
14
|
-
|
|
15
|
-
const markdownItInstance = computed(() => {
|
|
16
|
-
return markdownit(props.mdConfig || {})
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
const bubbleContent = computed(() => {
|
|
20
|
-
if (props.type === 'markdown') {
|
|
21
|
-
return markdownItInstance.value.render(props.content)
|
|
22
|
-
}
|
|
23
|
-
return props.content
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
const placementStart = computed(() => props.placement === 'start')
|
|
27
|
-
</script>
|
|
28
|
-
|
|
29
|
-
<template>
|
|
30
|
-
<div
|
|
31
|
-
:class="[
|
|
32
|
-
'tr-bubble',
|
|
33
|
-
{
|
|
34
|
-
'placement-start': placementStart,
|
|
35
|
-
'placement-end': !placementStart,
|
|
36
|
-
},
|
|
37
|
-
]"
|
|
38
|
-
>
|
|
39
|
-
<div v-if="props.avatar" class="tr-bubble__avatar">
|
|
40
|
-
<component :is="props.avatar"></component>
|
|
41
|
-
</div>
|
|
42
|
-
<div class="tr-bubble__content-wrapper">
|
|
43
|
-
<slot v-if="props.loading" name="loading" :bubble-props="props">
|
|
44
|
-
<div class="tr-bubble__loading">
|
|
45
|
-
<span></span>
|
|
46
|
-
<span></span>
|
|
47
|
-
<span></span>
|
|
48
|
-
</div>
|
|
49
|
-
</slot>
|
|
50
|
-
<div v-else :class="['tr-bubble__content']">
|
|
51
|
-
<div class="tr-bubbule__body">
|
|
52
|
-
<slot :bubble-props="props">
|
|
53
|
-
<span v-if="props.type === 'markdown'" v-html="bubbleContent"></span>
|
|
54
|
-
<span v-else>{{ bubbleContent }}</span>
|
|
55
|
-
<span v-if="props.aborted" class="tr-bubbule__aborted">(用户停止)</span>
|
|
56
|
-
</slot>
|
|
57
|
-
</div>
|
|
58
|
-
<div v-if="slots.footer" class="tr-bubbule__footer">
|
|
59
|
-
<slot name="footer" :bubble-props="props"></slot>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
</template>
|
|
65
|
-
|
|
66
|
-
<style lang="less" scoped>
|
|
67
|
-
.tr-bubble {
|
|
68
|
-
display: flex;
|
|
69
|
-
gap: 16px;
|
|
70
|
-
max-width: v-bind('props.maxWidth');
|
|
71
|
-
|
|
72
|
-
&.placement-start {
|
|
73
|
-
flex-direction: row;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&.placement-end {
|
|
77
|
-
flex-direction: row-reverse;
|
|
78
|
-
margin-left: auto;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.tr-bubble__avatar {
|
|
83
|
-
width: 40px;
|
|
84
|
-
height: 40px;
|
|
85
|
-
flex-shrink: 0;
|
|
86
|
-
display: flex;
|
|
87
|
-
align-items: center;
|
|
88
|
-
justify-content: center;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.tr-bubble__loading {
|
|
92
|
-
display: flex;
|
|
93
|
-
align-items: center;
|
|
94
|
-
justify-content: center;
|
|
95
|
-
padding: 8px 0;
|
|
96
|
-
|
|
97
|
-
span {
|
|
98
|
-
height: 8px;
|
|
99
|
-
width: 8px;
|
|
100
|
-
margin: 0 2px;
|
|
101
|
-
background-color: #bbb;
|
|
102
|
-
border-radius: 50%;
|
|
103
|
-
display: inline-block;
|
|
104
|
-
animation: typing 1.4s infinite ease-in-out both;
|
|
105
|
-
|
|
106
|
-
&:nth-child(1) {
|
|
107
|
-
animation-delay: 0s;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
&:nth-child(2) {
|
|
111
|
-
animation-delay: 0.2s;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
&:nth-child(3) {
|
|
115
|
-
animation-delay: 0.4s;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
@keyframes typing {
|
|
120
|
-
0%,
|
|
121
|
-
80%,
|
|
122
|
-
100% {
|
|
123
|
-
transform: scale(0);
|
|
124
|
-
}
|
|
125
|
-
40% {
|
|
126
|
-
transform: scale(1);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.tr-bubble__content {
|
|
132
|
-
background-color: white;
|
|
133
|
-
padding: 16px 24px;
|
|
134
|
-
border-radius: 24px;
|
|
135
|
-
box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.02);
|
|
136
|
-
|
|
137
|
-
.tr-bubbule__body {
|
|
138
|
-
color: rgb(25, 25, 25);
|
|
139
|
-
font-size: 16px;
|
|
140
|
-
line-height: 26px;
|
|
141
|
-
word-break: break-word;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.tr-bubbule__aborted {
|
|
145
|
-
color: rgb(128, 128, 128);
|
|
146
|
-
font-size: 14px;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.tr-bubbule__footer {
|
|
150
|
-
margin-top: 12px;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
</style>
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { useScroll } from '@vueuse/core'
|
|
3
|
-
import { computed, useTemplateRef, watch } from 'vue'
|
|
4
|
-
import Bubble from './Bubble.vue'
|
|
5
|
-
import { BubbleListProps, BubbleProps, BubbleSlots } from './index.type'
|
|
6
|
-
|
|
7
|
-
const props = withDefaults(defineProps<BubbleListProps>(), {})
|
|
8
|
-
|
|
9
|
-
const scrollContainerRef = useTemplateRef<HTMLDivElement>('scrollContainer')
|
|
10
|
-
const { y } = useScroll(scrollContainerRef, {
|
|
11
|
-
behavior: 'smooth',
|
|
12
|
-
throttle: 100,
|
|
13
|
-
})
|
|
14
|
-
const lastBubble = computed(() => props.items.at(-1))
|
|
15
|
-
|
|
16
|
-
watch([() => props.items.length, () => lastBubble.value?.content], () => {
|
|
17
|
-
if (!props.autoScroll || !scrollContainerRef.value) {
|
|
18
|
-
return
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
y.value = scrollContainerRef.value.scrollHeight
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
const getItemProps = (item: BubbleProps & { slots?: BubbleSlots }): BubbleProps => {
|
|
25
|
-
const defaultConfig = item.role ? props.roles?.[item.role] || {} : {}
|
|
26
|
-
const { slots: _roleSlots, ...rest } = defaultConfig
|
|
27
|
-
const { slots: _itemSlots, ...restItem } = item
|
|
28
|
-
return { ...rest, ...restItem }
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const getItemSlots = (item: BubbleProps & { slots?: BubbleSlots }): BubbleSlots => {
|
|
32
|
-
const defaultConfig = item.role ? props.roles?.[item.role] || {} : {}
|
|
33
|
-
return { ...defaultConfig.slots, ...item.slots }
|
|
34
|
-
}
|
|
35
|
-
</script>
|
|
36
|
-
|
|
37
|
-
<template>
|
|
38
|
-
<div class="tr-bubble-list" ref="scrollContainer">
|
|
39
|
-
<Bubble v-for="(item, index) in props.items" :key="item.id || index" v-bind="getItemProps(item)">
|
|
40
|
-
<template v-for="(_, slotName) in getItemSlots(item)" #[slotName]="slotProps" :key="slotName">
|
|
41
|
-
<component :is="getItemSlots(item)[slotName]" v-bind="slotProps" />
|
|
42
|
-
</template>
|
|
43
|
-
</Bubble>
|
|
44
|
-
</div>
|
|
45
|
-
</template>
|
|
46
|
-
|
|
47
|
-
<style lang="less" scoped>
|
|
48
|
-
.tr-bubble-list {
|
|
49
|
-
display: flex;
|
|
50
|
-
flex-direction: column;
|
|
51
|
-
gap: 16px;
|
|
52
|
-
overflow-y: auto;
|
|
53
|
-
padding: 16px;
|
|
54
|
-
}
|
|
55
|
-
</style>
|
package/src/bubble/index.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue'
|
|
2
|
-
import BubbleComp from './Bubble.vue'
|
|
3
|
-
import BubbleListComp from './BubbleList.vue'
|
|
4
|
-
|
|
5
|
-
BubbleComp.name = 'TrBubble'
|
|
6
|
-
|
|
7
|
-
const bubbleInstall = function (app: App) {
|
|
8
|
-
app.component(BubbleComp.name!, BubbleComp)
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
BubbleComp.install = bubbleInstall
|
|
12
|
-
|
|
13
|
-
export const Bubble = BubbleComp as typeof BubbleComp & { install: typeof bubbleInstall }
|
|
14
|
-
|
|
15
|
-
BubbleListComp.name = 'TrBubbleList'
|
|
16
|
-
|
|
17
|
-
const bubbleListInstall = function (app: App) {
|
|
18
|
-
app.component(BubbleListComp.name!, BubbleListComp)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
BubbleListComp.install = bubbleListInstall
|
|
22
|
-
|
|
23
|
-
export const BubbleList = BubbleListComp as typeof BubbleListComp & { install: typeof bubbleListInstall }
|