@opentiny/tiny-robot 0.2.0-alpha.1 → 0.2.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_plugin-vue_export-helper.js +9 -0
- package/dist/action-group/index.js +142 -0
- package/dist/bubble/index.js +3211 -0
- package/dist/{node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/close.js → close.js} +9 -9
- package/dist/container/index.js +60 -0
- package/dist/conversations/index.js +14 -0
- package/dist/feedback/index.js +192 -0
- package/dist/history/index.js +228 -0
- package/dist/icon-button/index.js +31 -0
- package/dist/index.d.ts +2190 -26
- package/dist/index.js +35 -43
- package/dist/index2.js +376 -0
- package/dist/index3.js +3895 -0
- package/dist/index4.js +637 -0
- package/dist/index5.js +3237 -0
- package/dist/index6.js +4623 -0
- package/dist/prompts/index.js +83 -0
- package/dist/question/index.js +375 -0
- package/dist/sender/index.js +683 -0
- package/dist/style.css +1 -1
- package/dist/suggestion/index.js +497 -0
- package/dist/{packages/svgs/dist/tiny-robot-svgs.js → tiny-robot-svgs.js} +100 -100
- package/dist/welcome/index.js +38 -0
- package/package.json +7 -3
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
- package/dist/action-group/ActionGroup.vue.d.ts +0 -26
- package/dist/action-group/ActionGroupItem.vue.d.ts +0 -18
- package/dist/action-group/index.d.ts +0 -12
- package/dist/action-group/index.type.d.ts +0 -16
- package/dist/bubble/bubble-list.vue.d.ts +0 -5
- package/dist/bubble/components/actions/copy.vue.d.ts +0 -10
- package/dist/bubble/components/actions/index.d.ts +0 -2
- package/dist/bubble/components/actions/refresh.vue.d.ts +0 -2
- package/dist/bubble/index.d.ts +0 -12
- package/dist/bubble/index.type.d.ts +0 -53
- package/dist/bubble/useScroll.d.ts +0 -4
- package/dist/container/index.d.ts +0 -7
- package/dist/container/index.type.d.ts +0 -16
- package/dist/container/index.vue.d.ts +0 -26
- package/dist/conversations/index.d.ts +0 -7
- package/dist/conversations/index.vue.d.ts +0 -2
- package/dist/feedback/components/SourceList.vue.d.ts +0 -11
- package/dist/feedback/components/index.d.ts +0 -1
- package/dist/feedback/index.d.ts +0 -7
- package/dist/feedback/index.type.d.ts +0 -25
- package/dist/feedback/index.vue.d.ts +0 -13
- package/dist/history/components/index.d.ts +0 -2
- package/dist/history/components/item-tag.vue.d.ts +0 -5
- package/dist/history/components/search-empty.vue.d.ts +0 -7
- package/dist/history/composables/index.d.ts +0 -1
- package/dist/history/composables/useEditItemTitle.d.ts +0 -12
- package/dist/history/index.d.ts +0 -6
- package/dist/history/index.type.d.ts +0 -43
- package/dist/history/index.vue.d.ts +0 -2
- package/dist/icon-button/index.d.ts +0 -7
- package/dist/icon-button/index.type.d.ts +0 -7
- package/dist/icon-button/index.vue.d.ts +0 -6
- package/dist/node_modules/.pnpm/@opentiny_utils@1.0.0/node_modules/@opentiny/utils/dist/opentiny-utils.es.js +0 -832
- package/dist/node_modules/.pnpm/@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js +0 -2116
- package/dist/node_modules/.pnpm/@opentiny_vue-button@3.21.0/node_modules/@opentiny/vue-button/lib/index.js +0 -113
- package/dist/node_modules/.pnpm/@opentiny_vue-button@3.21.0/node_modules/@opentiny/vue-button/lib/pc.js +0 -93
- package/dist/node_modules/.pnpm/@opentiny_vue-common@3.21.0/node_modules/@opentiny/vue-common/lib/index.js +0 -727
- package/dist/node_modules/.pnpm/@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js +0 -710
- package/dist/node_modules/.pnpm/@opentiny_vue-dialog-box@3.21.0/node_modules/@opentiny/vue-dialog-box/lib/index.js +0 -198
- package/dist/node_modules/.pnpm/@opentiny_vue-dialog-box@3.21.0/node_modules/@opentiny/vue-dialog-box/lib/pc.js +0 -204
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useEventListener.js +0 -10
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useInstanceSlots.js +0 -14
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useRelation.js +0 -54
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popper.js +0 -85
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/close.js +0 -29
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/eyeclose.js +0 -42
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/eyeopen.js +0 -43
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/finish.js +0 -34
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/fullscreen.js +0 -30
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/loading-shadow.js +0 -77
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/minscreen.js +0 -30
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-after.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-before.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-after.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-before.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-center.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-left.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-right.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-bold.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-code-block.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-code-view.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-color.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-column.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-row.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-table.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-font-size.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-format-clear.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h1.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h2.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h3.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h4.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h5.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h6.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-heading.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-high-light.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-image.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-italic.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-line-height.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-link-unlink.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-link.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-list-ordered.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-list-unordered.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells-vertical.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-node-delete.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-paragraph.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-quote-text.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-redo.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-horizontal.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-vertical.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-strike-through.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-subscript.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-superscript.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-table.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-task-list.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-underline.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-undo.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/sub-script.js +0 -29
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/warn.js +0 -26
- package/dist/node_modules/.pnpm/@opentiny_vue-input@3.21.0/node_modules/@opentiny/vue-input/lib/index.js +0 -196
- package/dist/node_modules/.pnpm/@opentiny_vue-input@3.21.0/node_modules/@opentiny/vue-input/lib/pc.js +0 -568
- package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.21.0/node_modules/@opentiny/vue-locale/lib/index.js +0 -1783
- package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.22.0/node_modules/@opentiny/vue-locale/lib/index.js +0 -1783
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/button/index.js +0 -13
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/button/vue.js +0 -34
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/chunk-G2ADBYYC.js +0 -12
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/browser.js +0 -36
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/clickoutside.js +0 -47
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/debounce.js +0 -7
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/dom.js +0 -45
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popper.js +0 -320
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popup-manager.js +0 -118
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/throttle.js +0 -23
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useEventListener.js +0 -9
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useInstanceSlots.js +0 -14
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useRelation.js +0 -54
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popper.js +0 -84
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popup.js +0 -73
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/event.js +0 -13
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/function.js +0 -5
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/index.js +0 -11
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/object.js +0 -84
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/string.js +0 -28
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/type.js +0 -28
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/dialog-box/index.js +0 -136
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/dialog-box/vue.js +0 -148
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/input/index.js +0 -228
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/input/vue.js +0 -263
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/index.js +0 -63
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/vue-storage-box.js +0 -16
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/vue.js +0 -23
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tooltip/index.js +0 -78
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tooltip/vue.js +0 -90
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/index.js +0 -77
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/vue.js +0 -90
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.21.0/node_modules/@opentiny/vue-tooltip/lib/index.js +0 -173
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.21.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +0 -248
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/index.js +0 -176
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +0 -248
- package/dist/node_modules/.pnpm/@vueuse_core@13.1.0_vue@3.5.13/node_modules/@vueuse/core/index.js +0 -190
- package/dist/node_modules/.pnpm/@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js +0 -53
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.js +0 -277
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.js +0 -46
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.js +0 -7
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js +0 -7
- package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.js +0 -187
- package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.js +0 -19
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_blocks.js +0 -67
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_re.js +0 -5
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/utils.js +0 -164
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/index.js +0 -8
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_destination.js +0 -44
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_label.js +0 -21
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_title.js +0 -37
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/index.js +0 -112
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_block.js +0 -63
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_core.js +0 -34
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_inline.js +0 -96
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/commonmark.js +0 -78
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/default.js +0 -40
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/zero.js +0 -59
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/renderer.js +0 -127
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/ruler.js +0 -95
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/blockquote.js +0 -59
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/code.js +0 -23
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/fence.js +0 -30
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/heading.js +0 -28
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/hr.js +0 -27
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/html_block.js +0 -37
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/lheading.js +0 -43
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/list.js +0 -110
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/paragraph.js +0 -25
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/reference.js +0 -95
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/state_block.js +0 -84
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/table.js +0 -99
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/block.js +0 -7
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/inline.js +0 -10
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/linkify.js +0 -57
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/normalize.js +0 -9
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/replacements.js +0 -31
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/smartquotes.js +0 -80
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/state_core.js +0 -8
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/text_join.js +0 -16
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/autolink.js +0 -46
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/backticks.js +0 -31
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/balance_pairs.js +0 -34
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/emphasis.js +0 -57
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/entity.js +0 -33
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/escape.js +0 -32
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/fragments_join.js +0 -10
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/html_inline.js +0 -32
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/image.js +0 -48
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/link.js +0 -40
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/linkify.js +0 -28
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/newline.js +0 -23
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/state_inline.js +0 -27
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/strikethrough.js +0 -54
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/text.js +0 -39
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/token.js +0 -31
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.js +0 -10
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.js +0 -61
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.js +0 -48
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.js +0 -7
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.js +0 -74
- package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.js +0 -139
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.js +0 -14
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.js +0 -4
- package/dist/packages/components/src/action-group/ActionGroup.vue.js +0 -7
- package/dist/packages/components/src/action-group/ActionGroup.vue2.js +0 -97
- package/dist/packages/components/src/action-group/ActionGroupItem.vue.js +0 -14
- package/dist/packages/components/src/action-group/ActionGroupItem.vue2.js +0 -4
- package/dist/packages/components/src/action-group/index.js +0 -17
- package/dist/packages/components/src/assets/icons/accessory.svg.js +0 -4
- package/dist/packages/components/src/assets/icons/loading-speech.svg.js +0 -4
- package/dist/packages/components/src/assets/icons/loading.svg.js +0 -4
- package/dist/packages/components/src/assets/icons/send.svg.js +0 -4
- package/dist/packages/components/src/assets/icons/voice.svg.js +0 -4
- package/dist/packages/components/src/bubble/bubble-list.vue.js +0 -7
- package/dist/packages/components/src/bubble/bubble-list.vue2.js +0 -37
- package/dist/packages/components/src/bubble/bubble.vue.js +0 -7
- package/dist/packages/components/src/bubble/bubble.vue2.js +0 -118
- package/dist/packages/components/src/bubble/components/actions/copy.vue.js +0 -7
- package/dist/packages/components/src/bubble/components/actions/copy.vue2.js +0 -35
- package/dist/packages/components/src/bubble/components/actions/refresh.vue.js +0 -7
- package/dist/packages/components/src/bubble/components/actions/refresh.vue2.js +0 -16
- package/dist/packages/components/src/bubble/index.js +0 -18
- package/dist/packages/components/src/bubble/useScroll.js +0 -13
- package/dist/packages/components/src/container/index.js +0 -9
- package/dist/packages/components/src/container/index.vue.js +0 -7
- package/dist/packages/components/src/container/index.vue2.js +0 -55
- package/dist/packages/components/src/conversations/index.js +0 -9
- package/dist/packages/components/src/conversations/index.vue.js +0 -9
- package/dist/packages/components/src/feedback/components/SourceList.vue.js +0 -7
- package/dist/packages/components/src/feedback/components/SourceList.vue2.js +0 -52
- package/dist/packages/components/src/feedback/index.js +0 -9
- package/dist/packages/components/src/feedback/index.vue.js +0 -7
- package/dist/packages/components/src/feedback/index.vue2.js +0 -142
- package/dist/packages/components/src/history/components/item-tag.vue.js +0 -7
- package/dist/packages/components/src/history/components/item-tag.vue2.js +0 -21
- package/dist/packages/components/src/history/components/search-empty.vue.js +0 -7
- package/dist/packages/components/src/history/components/search-empty.vue2.js +0 -20
- package/dist/packages/components/src/history/composables/useEditItemTitle.js +0 -43
- package/dist/packages/components/src/history/index.js +0 -11
- package/dist/packages/components/src/history/index.vue.js +0 -7
- package/dist/packages/components/src/history/index.vue2.js +0 -130
- package/dist/packages/components/src/icon-button/index.js +0 -9
- package/dist/packages/components/src/icon-button/index.vue.js +0 -7
- package/dist/packages/components/src/icon-button/index.vue2.js +0 -40
- package/dist/packages/components/src/prompts/index.js +0 -18
- package/dist/packages/components/src/prompts/prompt.vue.js +0 -7
- package/dist/packages/components/src/prompts/prompt.vue2.js +0 -39
- package/dist/packages/components/src/prompts/prompts.vue.js +0 -7
- package/dist/packages/components/src/prompts/prompts.vue2.js +0 -36
- package/dist/packages/components/src/question/components/CommonQuestions.vue.js +0 -89
- package/dist/packages/components/src/question/components/CommonQuestions.vue2.js +0 -4
- package/dist/packages/components/src/question/components/HotQuestions.vue.js +0 -140
- package/dist/packages/components/src/question/components/HotQuestions.vue2.js +0 -4
- package/dist/packages/components/src/question/composables/useQuestions.js +0 -48
- package/dist/packages/components/src/question/index.js +0 -9
- package/dist/packages/components/src/question/index.vue.js +0 -113
- package/dist/packages/components/src/question/index.vue2.js +0 -4
- package/dist/packages/components/src/sender/components/ActionButtons.vue.js +0 -143
- package/dist/packages/components/src/sender/components/ActionButtons.vue2.js +0 -4
- package/dist/packages/components/src/sender/components/TemplateEditor.vue.js +0 -7
- package/dist/packages/components/src/sender/components/TemplateEditor.vue2.js +0 -121
- package/dist/packages/components/src/sender/composables/useInputHandler.js +0 -38
- package/dist/packages/components/src/sender/composables/useKeyboardHandler.js +0 -31
- package/dist/packages/components/src/sender/composables/useSpeechHandler.js +0 -67
- package/dist/packages/components/src/sender/index.js +0 -9
- package/dist/packages/components/src/sender/index.vue.js +0 -255
- package/dist/packages/components/src/sender/index.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/components/CategoryNav.vue.js +0 -38
- package/dist/packages/components/src/suggestion/components/CategoryNav.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue.js +0 -107
- package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue.js +0 -123
- package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/composables/useKeyboardNavigation.js +0 -45
- package/dist/packages/components/src/suggestion/composables/useTriggerDetection.js +0 -17
- package/dist/packages/components/src/suggestion/index.js +0 -9
- package/dist/packages/components/src/suggestion/index.vue.js +0 -179
- package/dist/packages/components/src/suggestion/index.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/utils/dom.js +0 -18
- package/dist/packages/components/src/welcome/index.js +0 -9
- package/dist/packages/components/src/welcome/index.vue.js +0 -7
- package/dist/packages/components/src/welcome/index.vue2.js +0 -32
- package/dist/prompts/index.d.ts +0 -12
- package/dist/prompts/index.type.d.ts +0 -55
- package/dist/prompts/prompt.vue.d.ts +0 -3
- package/dist/prompts/prompts.vue.d.ts +0 -20
- package/dist/question/components/CommonQuestions.vue.d.ts +0 -32
- package/dist/question/components/HotQuestions.vue.d.ts +0 -89
- package/dist/question/composables/useQuestions.d.ts +0 -17
- package/dist/question/index.d.ts +0 -7
- package/dist/question/index.type.d.ts +0 -74
- package/dist/question/index.vue.d.ts +0 -46
- package/dist/sender/components/ActionButtons.vue.d.ts +0 -25
- package/dist/sender/components/TemplateEditor.vue.d.ts +0 -18
- package/dist/sender/composables/useInputHandler.d.ts +0 -17
- package/dist/sender/composables/useKeyboardHandler.d.ts +0 -18
- package/dist/sender/composables/useSpeechHandler.d.ts +0 -8
- package/dist/sender/index.d.ts +0 -7
- package/dist/sender/index.type.d.ts +0 -137
- package/dist/sender/index.vue.d.ts +0 -1012
- package/dist/suggestion/components/CategoryNav.vue.d.ts +0 -45
- package/dist/suggestion/components/SuggestionCapsule.vue.d.ts +0 -32
- package/dist/suggestion/components/SuggestionPanel.vue.d.ts +0 -84
- package/dist/suggestion/composables/useKeyboardNavigation.d.ts +0 -18
- package/dist/suggestion/composables/useSuggestionFilter.d.ts +0 -10
- package/dist/suggestion/composables/useTriggerDetection.d.ts +0 -11
- package/dist/suggestion/index.d.ts +0 -7
- package/dist/suggestion/index.type.d.ts +0 -94
- package/dist/suggestion/index.vue.d.ts +0 -343
- package/dist/suggestion/utils/dom.d.ts +0 -20
- package/dist/welcome/index.d.ts +0 -7
- package/dist/welcome/index.type.d.ts +0 -10
- package/dist/welcome/index.vue.d.ts +0 -18
- package/src/action-group/ActionGroup.vue +0 -232
- package/src/action-group/ActionGroupItem.vue +0 -9
- package/src/action-group/index.ts +0 -25
- package/src/action-group/index.type.ts +0 -20
- package/src/assets/icons/accessory.svg +0 -12
- package/src/assets/icons/loading-speech.svg +0 -16
- package/src/assets/icons/loading.svg +0 -17
- package/src/assets/icons/send.svg +0 -21
- package/src/assets/icons/voice.svg +0 -22
- package/src/bubble/bubble-list.vue +0 -42
- package/src/bubble/bubble.vue +0 -237
- package/src/bubble/components/actions/copy.vue +0 -54
- package/src/bubble/components/actions/index.ts +0 -2
- package/src/bubble/components/actions/refresh.vue +0 -31
- package/src/bubble/index.ts +0 -23
- package/src/bubble/index.type.ts +0 -63
- package/src/bubble/useScroll.ts +0 -14
- package/src/container/index.ts +0 -12
- package/src/container/index.type.ts +0 -17
- package/src/container/index.vue +0 -134
- package/src/conversations/index.ts +0 -12
- package/src/conversations/index.vue +0 -3
- package/src/feedback/components/SourceList.vue +0 -112
- package/src/feedback/components/index.ts +0 -1
- package/src/feedback/index.ts +0 -12
- package/src/feedback/index.type.ts +0 -27
- package/src/feedback/index.vue +0 -166
- package/src/history/components/index.ts +0 -2
- package/src/history/components/item-tag.vue +0 -49
- package/src/history/components/search-empty.vue +0 -38
- package/src/history/composables/index.ts +0 -1
- package/src/history/composables/useEditItemTitle.ts +0 -75
- package/src/history/index.ts +0 -12
- package/src/history/index.type.ts +0 -50
- package/src/history/index.vue +0 -292
- package/src/icon-button/index.ts +0 -12
- package/src/icon-button/index.type.ts +0 -8
- package/src/icon-button/index.vue +0 -52
- package/src/index.ts +0 -76
- package/src/prompts/index.ts +0 -25
- package/src/prompts/index.type.ts +0 -59
- package/src/prompts/prompt.vue +0 -101
- package/src/prompts/prompts.vue +0 -50
- package/src/question/components/CommonQuestions.vue +0 -146
- package/src/question/components/HotQuestions.vue +0 -148
- package/src/question/composables/useQuestions.ts +0 -106
- package/src/question/index.less +0 -447
- package/src/question/index.ts +0 -12
- package/src/question/index.type.ts +0 -86
- package/src/question/index.vue +0 -140
- package/src/question/vars.less +0 -135
- package/src/sender/components/ActionButtons.vue +0 -168
- package/src/sender/components/TemplateEditor.vue +0 -274
- package/src/sender/composables/useInputHandler.ts +0 -74
- package/src/sender/composables/useKeyboardHandler.ts +0 -101
- package/src/sender/composables/useSpeechHandler.ts +0 -122
- package/src/sender/index.less +0 -352
- package/src/sender/index.ts +0 -12
- package/src/sender/index.type.ts +0 -162
- package/src/sender/index.vue +0 -338
- package/src/sender/vars.less +0 -84
- package/src/suggestion/components/CategoryNav.vue +0 -38
- package/src/suggestion/components/SuggestionCapsule.vue +0 -183
- package/src/suggestion/components/SuggestionPanel.vue +0 -147
- package/src/suggestion/composables/useKeyboardNavigation.ts +0 -101
- package/src/suggestion/composables/useSuggestionFilter.ts +0 -34
- package/src/suggestion/composables/useTriggerDetection.ts +0 -46
- package/src/suggestion/index.less +0 -497
- package/src/suggestion/index.ts +0 -12
- package/src/suggestion/index.type.ts +0 -101
- package/src/suggestion/index.vue +0 -338
- package/src/suggestion/utils/dom.ts +0 -66
- package/src/suggestion/vars.less +0 -141
- package/src/vite-env.d.ts +0 -1
- package/src/welcome/index.ts +0 -12
- package/src/welcome/index.type.ts +0 -12
- package/src/welcome/index.vue +0 -69
- package/tsconfig.json +0 -37
- package/tsconfig.node.json +0 -10
- package/vite.config.ts +0 -53
package/src/bubble/bubble.vue
DELETED
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import markdownit from 'markdown-it'
|
|
3
|
-
import { computed, useSlots } from 'vue'
|
|
4
|
-
import { CopyAction, RefreshAction } from './components/actions'
|
|
5
|
-
import { BubbleActionOptions, BubbleEvents, BubbleProps, BubbleSlots } from './index.type'
|
|
6
|
-
|
|
7
|
-
const props = withDefaults(defineProps<BubbleProps>(), {
|
|
8
|
-
content: '',
|
|
9
|
-
placement: 'start',
|
|
10
|
-
type: 'text',
|
|
11
|
-
maxWidth: '80%',
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
const emit = defineEmits<BubbleEvents>()
|
|
15
|
-
|
|
16
|
-
defineSlots<BubbleSlots>()
|
|
17
|
-
|
|
18
|
-
const slots = useSlots()
|
|
19
|
-
|
|
20
|
-
const bubbleContent = computed(() => {
|
|
21
|
-
if (props.type === 'markdown') {
|
|
22
|
-
return markdownit(props.mdConfig || {}).render(props.content)
|
|
23
|
-
}
|
|
24
|
-
return props.content
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
const placementStart = computed(() => props.placement === 'start')
|
|
28
|
-
|
|
29
|
-
const defaultActionsMap = new Map<string, BubbleActionOptions>([
|
|
30
|
-
[
|
|
31
|
-
'copy',
|
|
32
|
-
{
|
|
33
|
-
name: 'copy',
|
|
34
|
-
vnode: CopyAction,
|
|
35
|
-
show: true,
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
[
|
|
39
|
-
'refresh',
|
|
40
|
-
{
|
|
41
|
-
name: 'refresh',
|
|
42
|
-
vnode: RefreshAction,
|
|
43
|
-
show: true,
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
])
|
|
47
|
-
|
|
48
|
-
const computedActions = computed(() => {
|
|
49
|
-
const actions = (props.actions || []).map((action) => {
|
|
50
|
-
if (typeof action === 'string') {
|
|
51
|
-
return defaultActionsMap.get(action)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (defaultActionsMap.has(action.name)) {
|
|
55
|
-
return {
|
|
56
|
-
...defaultActionsMap.get(action.name),
|
|
57
|
-
...action,
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return action
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
return actions.filter((action): action is BubbleActionOptions => Boolean(action))
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
const handleActionClick = (name: string, ...args: unknown[]) => {
|
|
68
|
-
if (name === 'copy') {
|
|
69
|
-
emit('copy', args[0] as boolean)
|
|
70
|
-
return
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (name === 'refresh') {
|
|
74
|
-
emit('refresh')
|
|
75
|
-
return
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
emit('action', name, ...args)
|
|
79
|
-
}
|
|
80
|
-
</script>
|
|
81
|
-
|
|
82
|
-
<template>
|
|
83
|
-
<div
|
|
84
|
-
:class="[
|
|
85
|
-
'tr-bubble',
|
|
86
|
-
{
|
|
87
|
-
'placement-start': placementStart,
|
|
88
|
-
'placement-end': !placementStart,
|
|
89
|
-
},
|
|
90
|
-
]"
|
|
91
|
-
>
|
|
92
|
-
<div v-if="props.avatar" class="tr-bubble__avatar">
|
|
93
|
-
<component :is="props.avatar"></component>
|
|
94
|
-
</div>
|
|
95
|
-
<div class="tr-bubble__content-wrapper">
|
|
96
|
-
<slot v-if="props.loading" name="loading">
|
|
97
|
-
<div class="tr-bubble__loading">
|
|
98
|
-
<span></span>
|
|
99
|
-
<span></span>
|
|
100
|
-
<span></span>
|
|
101
|
-
</div>
|
|
102
|
-
</slot>
|
|
103
|
-
<div v-else :class="['tr-bubble__content']">
|
|
104
|
-
<div class="tr-bubbule__body">
|
|
105
|
-
<slot>
|
|
106
|
-
<span v-if="props.type === 'markdown'" v-html="bubbleContent"></span>
|
|
107
|
-
<span v-else>{{ bubbleContent }}</span>
|
|
108
|
-
<span v-if="props.aborted" class="tr-bubbule__aborted">(用户停止)</span>
|
|
109
|
-
</slot>
|
|
110
|
-
</div>
|
|
111
|
-
<div v-if="slots.footer || computedActions.length > 0" class="tr-bubbule__footer">
|
|
112
|
-
<div class="tr-bubbule__footer-left">
|
|
113
|
-
<slot name="footer"></slot>
|
|
114
|
-
</div>
|
|
115
|
-
<div class="tr-bubbule__footer-actions">
|
|
116
|
-
<template v-for="action in computedActions" :key="action?.name">
|
|
117
|
-
<component
|
|
118
|
-
:is="action.vnode"
|
|
119
|
-
v-show="typeof action.show === 'function' ? action.show(props) : action.show"
|
|
120
|
-
:bubbleItem="props"
|
|
121
|
-
@click="handleActionClick(action.name, $event)"
|
|
122
|
-
></component>
|
|
123
|
-
</template>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
</template>
|
|
130
|
-
|
|
131
|
-
<style lang="less" scoped>
|
|
132
|
-
.tr-bubble {
|
|
133
|
-
display: flex;
|
|
134
|
-
gap: 16px;
|
|
135
|
-
max-width: v-bind('props.maxWidth');
|
|
136
|
-
|
|
137
|
-
&.placement-start {
|
|
138
|
-
flex-direction: row;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
&.placement-end {
|
|
142
|
-
flex-direction: row-reverse;
|
|
143
|
-
margin-left: auto;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.tr-bubble__avatar {
|
|
148
|
-
width: 40px;
|
|
149
|
-
height: 40px;
|
|
150
|
-
flex-shrink: 0;
|
|
151
|
-
display: flex;
|
|
152
|
-
align-items: center;
|
|
153
|
-
justify-content: center;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.tr-bubble__loading {
|
|
157
|
-
display: flex;
|
|
158
|
-
align-items: center;
|
|
159
|
-
justify-content: center;
|
|
160
|
-
padding: 8px 0;
|
|
161
|
-
|
|
162
|
-
span {
|
|
163
|
-
height: 8px;
|
|
164
|
-
width: 8px;
|
|
165
|
-
margin: 0 2px;
|
|
166
|
-
background-color: #bbb;
|
|
167
|
-
border-radius: 50%;
|
|
168
|
-
display: inline-block;
|
|
169
|
-
animation: typing 1.4s infinite ease-in-out both;
|
|
170
|
-
|
|
171
|
-
&:nth-child(1) {
|
|
172
|
-
animation-delay: 0s;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
&:nth-child(2) {
|
|
176
|
-
animation-delay: 0.2s;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
&:nth-child(3) {
|
|
180
|
-
animation-delay: 0.4s;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
@keyframes typing {
|
|
185
|
-
0%,
|
|
186
|
-
80%,
|
|
187
|
-
100% {
|
|
188
|
-
transform: scale(0);
|
|
189
|
-
}
|
|
190
|
-
40% {
|
|
191
|
-
transform: scale(1);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.tr-bubble__content {
|
|
197
|
-
background-color: white;
|
|
198
|
-
padding: 16px 24px;
|
|
199
|
-
border-radius: 24px;
|
|
200
|
-
box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.02);
|
|
201
|
-
|
|
202
|
-
.tr-bubbule__body {
|
|
203
|
-
color: rgb(25, 25, 25);
|
|
204
|
-
font-size: 16px;
|
|
205
|
-
line-height: 26px;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.tr-bubbule__aborted {
|
|
209
|
-
color: rgb(128, 128, 128);
|
|
210
|
-
font-size: 14px;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.tr-bubbule__footer {
|
|
214
|
-
display: flex;
|
|
215
|
-
gap: 12px;
|
|
216
|
-
|
|
217
|
-
.tr-bubbule__footer-left {
|
|
218
|
-
flex: 1;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.tr-bubbule__footer-actions {
|
|
222
|
-
display: flex;
|
|
223
|
-
flex-shrink: 0;
|
|
224
|
-
gap: 4px;
|
|
225
|
-
margin-top: 12px;
|
|
226
|
-
|
|
227
|
-
& > * {
|
|
228
|
-
display: flex;
|
|
229
|
-
align-items: center;
|
|
230
|
-
justify-content: center;
|
|
231
|
-
width: 24px;
|
|
232
|
-
height: 24px;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
</style>
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { BubbleProps } from '../../index.type'
|
|
3
|
-
import { IconCopy } from '@opentiny/tiny-robot-svgs'
|
|
4
|
-
|
|
5
|
-
const { bubbleItem } = defineProps<{ bubbleItem: BubbleProps }>()
|
|
6
|
-
|
|
7
|
-
const emit = defineEmits(['click'])
|
|
8
|
-
|
|
9
|
-
async function copyToClipboard(text: string) {
|
|
10
|
-
try {
|
|
11
|
-
await navigator.clipboard.writeText(text)
|
|
12
|
-
return true
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14
|
-
} catch (err: unknown) {
|
|
15
|
-
return false
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const handleClick = async () => {
|
|
20
|
-
const result = bubbleItem.content ? await copyToClipboard(bubbleItem.content) : false
|
|
21
|
-
|
|
22
|
-
emit('click', result)
|
|
23
|
-
}
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<template>
|
|
27
|
-
<button class="icon-btn" @click="handleClick">
|
|
28
|
-
<IconCopy width="16px" height="16px" />
|
|
29
|
-
</button>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<style lang="less" scoped>
|
|
33
|
-
button.icon-btn {
|
|
34
|
-
width: 28px;
|
|
35
|
-
height: 28px;
|
|
36
|
-
display: inline-flex;
|
|
37
|
-
align-items: center;
|
|
38
|
-
justify-content: center;
|
|
39
|
-
border: none;
|
|
40
|
-
border-radius: 8px;
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
padding: 0;
|
|
43
|
-
transition: background-color 0.3s;
|
|
44
|
-
background-color: white;
|
|
45
|
-
|
|
46
|
-
&:hover {
|
|
47
|
-
background-color: rgba(0, 0, 0, 0.04);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&:active {
|
|
51
|
-
background-color: rgba(0, 0, 0, 0.15);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
</style>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<button class="icon-btn"><IconRefresh width="16px" height="16px" /></button>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script setup lang="ts">
|
|
6
|
-
import { IconRefresh } from '@opentiny/tiny-robot-svgs'
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<style lang="less" scoped>
|
|
10
|
-
button.icon-btn {
|
|
11
|
-
width: 28px;
|
|
12
|
-
height: 28px;
|
|
13
|
-
display: inline-flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
border: none;
|
|
17
|
-
border-radius: 8px;
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
padding: 0;
|
|
20
|
-
transition: background-color 0.3s;
|
|
21
|
-
background-color: white;
|
|
22
|
-
|
|
23
|
-
&:hover {
|
|
24
|
-
background-color: rgba(0, 0, 0, 0.04);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&:active {
|
|
28
|
-
background-color: rgba(0, 0, 0, 0.15);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
</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 './bubble-list.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 }
|
package/src/bubble/index.type.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Options as MarkdownItOptions } from 'markdown-it'
|
|
2
|
-
import { Component, CSSProperties, VNode } from 'vue'
|
|
3
|
-
|
|
4
|
-
export interface BubbleActionOptions {
|
|
5
|
-
name: 'copy' | 'refresh' | string
|
|
6
|
-
vnode?: VNode | Component
|
|
7
|
-
show?: boolean | ((props: BubbleProps) => boolean)
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export type BubbleAction = 'copy' | 'refresh' | BubbleActionOptions
|
|
11
|
-
|
|
12
|
-
export type BubblePalcement = 'start' | 'end'
|
|
13
|
-
|
|
14
|
-
export interface BubbleProps {
|
|
15
|
-
/**
|
|
16
|
-
* 气泡内容
|
|
17
|
-
*/
|
|
18
|
-
content?: string
|
|
19
|
-
id?: string | number | symbol
|
|
20
|
-
/**
|
|
21
|
-
* 气泡位置
|
|
22
|
-
*/
|
|
23
|
-
placement?: BubblePalcement
|
|
24
|
-
avatar?: VNode
|
|
25
|
-
role?: string
|
|
26
|
-
/**
|
|
27
|
-
* 内容类型
|
|
28
|
-
*/
|
|
29
|
-
type?: 'text' | 'markdown'
|
|
30
|
-
loading?: boolean
|
|
31
|
-
aborted?: boolean
|
|
32
|
-
/**
|
|
33
|
-
* type 为 'markdown' 时,markdown 的配置项
|
|
34
|
-
*/
|
|
35
|
-
mdConfig?: MarkdownItOptions
|
|
36
|
-
|
|
37
|
-
actions?: BubbleAction[]
|
|
38
|
-
// 样式相关
|
|
39
|
-
maxWidth?: CSSProperties['maxWidth']
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface BubbleSlots {
|
|
43
|
-
default: () => unknown
|
|
44
|
-
footer: () => unknown
|
|
45
|
-
loading: () => unknown
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface BubbleEvents {
|
|
49
|
-
(e: 'copy', result: boolean): void
|
|
50
|
-
(e: 'refresh'): void
|
|
51
|
-
(e: 'action', name: string, ...args: unknown[]): void
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export type BubbleRoleConfig = Pick<BubbleProps, 'placement' | 'avatar' | 'type' | 'mdConfig' | 'actions' | 'maxWidth'>
|
|
55
|
-
|
|
56
|
-
export interface BubbleListProps {
|
|
57
|
-
items: BubbleProps[]
|
|
58
|
-
/**
|
|
59
|
-
* 每个角色的默认配置项
|
|
60
|
-
*/
|
|
61
|
-
roles?: Record<string, BubbleRoleConfig>
|
|
62
|
-
autoScroll?: boolean
|
|
63
|
-
}
|
package/src/bubble/useScroll.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { nextTick, Ref } from 'vue'
|
|
2
|
-
|
|
3
|
-
export const useElementScroll = (elemRef: Ref<HTMLElement | null | undefined>) => {
|
|
4
|
-
const scrollToBottom = () => {
|
|
5
|
-
nextTick(() => {
|
|
6
|
-
elemRef.value?.scrollTo({
|
|
7
|
-
top: elemRef.value.scrollHeight,
|
|
8
|
-
behavior: 'smooth',
|
|
9
|
-
})
|
|
10
|
-
})
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return { scrollToBottom }
|
|
14
|
-
}
|
package/src/container/index.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue'
|
|
2
|
-
import Container from './index.vue'
|
|
3
|
-
|
|
4
|
-
Container.name = 'TrContainer'
|
|
5
|
-
|
|
6
|
-
const install = function <T>(app: App<T>) {
|
|
7
|
-
app.component(Container.name!, Container)
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
Container.install = install
|
|
11
|
-
|
|
12
|
-
export default Container as typeof Container & { install: typeof install }
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface ContainerProps {
|
|
2
|
-
/**
|
|
3
|
-
* model:show
|
|
4
|
-
*/
|
|
5
|
-
show: boolean
|
|
6
|
-
/**
|
|
7
|
-
* model:fullscreen
|
|
8
|
-
*/
|
|
9
|
-
fullscreen?: boolean
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface ContainerSlots {
|
|
13
|
-
default: () => unknown
|
|
14
|
-
title: () => unknown
|
|
15
|
-
operations: () => unknown
|
|
16
|
-
footer: () => unknown
|
|
17
|
-
}
|
package/src/container/index.vue
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { IconCancelFullScreen, IconClose, IconFullScreen } from '@opentiny/tiny-robot-svgs'
|
|
3
|
-
import { computed } from 'vue'
|
|
4
|
-
import { ContainerProps, ContainerSlots } from './index.type'
|
|
5
|
-
|
|
6
|
-
const show = defineModel<ContainerProps['show']>('show', { required: true })
|
|
7
|
-
const fullscreen = defineModel<ContainerProps['fullscreen']>('fullscreen')
|
|
8
|
-
|
|
9
|
-
defineSlots<ContainerSlots>()
|
|
10
|
-
|
|
11
|
-
const IconFullScreenSwitcher = computed(() => (fullscreen.value ? IconCancelFullScreen : IconFullScreen))
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<div class="tr-container">
|
|
16
|
-
<div class="tr-container__dragging-bar-wrapper">
|
|
17
|
-
<div class="tr-container__dragging-bar"></div>
|
|
18
|
-
</div>
|
|
19
|
-
<div class="tr-container__header">
|
|
20
|
-
<slot name="title">
|
|
21
|
-
<h3 class="tr-container__title">OpenTiny NEXT</h3>
|
|
22
|
-
</slot>
|
|
23
|
-
<div class="tr-container__header-operations">
|
|
24
|
-
<slot name="operations"></slot>
|
|
25
|
-
<button class="icon-btn" @click="$emit('update:fullscreen', !fullscreen)">
|
|
26
|
-
<IconFullScreenSwitcher />
|
|
27
|
-
</button>
|
|
28
|
-
<button class="icon-btn" @click="$emit('update:show', false)">
|
|
29
|
-
<IconClose />
|
|
30
|
-
</button>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
<div class="tr-container__body">
|
|
34
|
-
<slot></slot>
|
|
35
|
-
</div>
|
|
36
|
-
<div class="tr-container__footer">
|
|
37
|
-
<slot name="footer"></slot>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</template>
|
|
41
|
-
|
|
42
|
-
<style lang="less" scoped>
|
|
43
|
-
.tr-container {
|
|
44
|
-
--tr-container-width: 480px;
|
|
45
|
-
|
|
46
|
-
background-color: rgb(248, 248, 248);
|
|
47
|
-
border: 1px solid rgba(0, 0, 0, 0.08);
|
|
48
|
-
position: fixed;
|
|
49
|
-
top: 0;
|
|
50
|
-
bottom: 0;
|
|
51
|
-
right: 0;
|
|
52
|
-
left: v-bind('fullscreen? "0" : "unset"');
|
|
53
|
-
width: v-bind('fullscreen? "unset" : "var(--tr-container-width)"');
|
|
54
|
-
z-index: v-bind('show? "100":"-1"');
|
|
55
|
-
opacity: v-bind('show? "1":"0"');
|
|
56
|
-
display: flex;
|
|
57
|
-
flex-direction: column;
|
|
58
|
-
|
|
59
|
-
.tr-container__dragging-bar-wrapper {
|
|
60
|
-
flex-shrink: 0;
|
|
61
|
-
|
|
62
|
-
display: flex;
|
|
63
|
-
align-items: center;
|
|
64
|
-
justify-content: center;
|
|
65
|
-
padding: 6px;
|
|
66
|
-
|
|
67
|
-
// TODO 拖拽条的逻辑
|
|
68
|
-
.tr-container__dragging-bar {
|
|
69
|
-
width: 40px;
|
|
70
|
-
height: 4px;
|
|
71
|
-
background-color: rgb(217, 217, 217);
|
|
72
|
-
border-radius: 999px;
|
|
73
|
-
cursor: grab;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.tr-container__header {
|
|
78
|
-
flex-shrink: 0;
|
|
79
|
-
|
|
80
|
-
display: flex;
|
|
81
|
-
align-items: center;
|
|
82
|
-
justify-content: space-between;
|
|
83
|
-
padding: 4px 24px;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.tr-container__title {
|
|
87
|
-
margin: 0;
|
|
88
|
-
padding: 0;
|
|
89
|
-
color: rgb(25, 25, 25);
|
|
90
|
-
font-weight: 600;
|
|
91
|
-
font-size: 14px;
|
|
92
|
-
line-height: 22px;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.tr-container__header-operations {
|
|
96
|
-
display: flex;
|
|
97
|
-
gap: 8px;
|
|
98
|
-
|
|
99
|
-
button.icon-btn {
|
|
100
|
-
width: 28px;
|
|
101
|
-
height: 28px;
|
|
102
|
-
display: inline-flex;
|
|
103
|
-
align-items: center;
|
|
104
|
-
justify-content: center;
|
|
105
|
-
border: none;
|
|
106
|
-
border-radius: 8px;
|
|
107
|
-
cursor: pointer;
|
|
108
|
-
padding: 0;
|
|
109
|
-
transition: background-color 0.3s;
|
|
110
|
-
|
|
111
|
-
&:hover {
|
|
112
|
-
background-color: rgba(0, 0, 0, 0.04);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&:active {
|
|
116
|
-
background-color: rgba(0, 0, 0, 0.15);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
svg {
|
|
120
|
-
font-size: 20px;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.tr-container__body {
|
|
126
|
-
flex: 1;
|
|
127
|
-
overflow-y: auto;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.tr-container__footer {
|
|
131
|
-
flex-shrink: 0;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
</style>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue'
|
|
2
|
-
import Conversations from './index.vue'
|
|
3
|
-
|
|
4
|
-
Conversations.name = 'Conversations'
|
|
5
|
-
|
|
6
|
-
const install = function <T>(app: App<T>) {
|
|
7
|
-
app.component(Conversations.name!, Conversations)
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
Conversations.install = install
|
|
11
|
-
|
|
12
|
-
export default Conversations as typeof Conversations & { install: typeof install }
|