@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
package/src/prompts/prompt.vue
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { PromptProps } from './index.type'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<PromptProps>()
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<template>
|
|
8
|
-
<div :class="['tr-prompt', { disabled: props.disabled }]">
|
|
9
|
-
<div class="tr-prompt__icon">
|
|
10
|
-
<component :is="props.icon"></component>
|
|
11
|
-
</div>
|
|
12
|
-
<div class="tr-prompt__content">
|
|
13
|
-
<h6 class="tr-prompt__content-label">{{ props.label }}</h6>
|
|
14
|
-
<p v-if="props.description" class="tr-prompt__content-description">{{ props.description }}</p>
|
|
15
|
-
</div>
|
|
16
|
-
<div :class="['tr-prompt__badge', { label: typeof props.badge === 'string' }]">
|
|
17
|
-
<template v-if="typeof props.badge === 'string'">
|
|
18
|
-
{{ props.badge }}
|
|
19
|
-
</template>
|
|
20
|
-
<template v-else>
|
|
21
|
-
<component :is="props.badge"></component>
|
|
22
|
-
</template>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<style lang="less" scoped>
|
|
28
|
-
.tr-prompt {
|
|
29
|
-
--tr-prompt-bg-color: white;
|
|
30
|
-
--tr-prompt-hover-color: rgba(0, 0, 0, 0.04);
|
|
31
|
-
--tr-prompt-active-color: rgba(0, 0, 0, 0.15);
|
|
32
|
-
--tr-prompt-disabled-color: rgba(0, 0, 0, 0.04);
|
|
33
|
-
--tr-prompt-box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
|
|
34
|
-
--tr-prompt-text: rgb(25, 25, 25);
|
|
35
|
-
--tr-prompt-text-muted: rgb(89, 89, 89);
|
|
36
|
-
|
|
37
|
-
flex: none;
|
|
38
|
-
display: flex;
|
|
39
|
-
gap: 12px;
|
|
40
|
-
border-radius: 16px;
|
|
41
|
-
box-shadow: var(--tr-prompt-box-shadow);
|
|
42
|
-
padding: 16px 24px;
|
|
43
|
-
position: relative;
|
|
44
|
-
cursor: pointer;
|
|
45
|
-
transition: background 0.3s;
|
|
46
|
-
background-color: var(--tr-prompt-bg-color);
|
|
47
|
-
|
|
48
|
-
&:hover {
|
|
49
|
-
background-color: var(--tr-prompt-hover-color);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&.disabled {
|
|
53
|
-
cursor: default;
|
|
54
|
-
pointer-events: none;
|
|
55
|
-
background-color: var(--tr-prompt-disabled-color);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&:active {
|
|
59
|
-
background-color: var(--tr-prompt-active-color);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.tr-prompt__content {
|
|
64
|
-
display: flex;
|
|
65
|
-
flex-direction: column;
|
|
66
|
-
gap: 4px;
|
|
67
|
-
align-items: start;
|
|
68
|
-
|
|
69
|
-
font-size: 14px;
|
|
70
|
-
line-height: 24px;
|
|
71
|
-
color: var(--tr-prompt-text);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.tr-prompt__content-label {
|
|
75
|
-
margin: 0;
|
|
76
|
-
padding: 0;
|
|
77
|
-
font-weight: 500;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.tr-prompt__content-description {
|
|
81
|
-
margin: 0;
|
|
82
|
-
padding: 0;
|
|
83
|
-
color: var(--tr-prompt-text-muted);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.tr-prompt__badge {
|
|
87
|
-
position: absolute;
|
|
88
|
-
top: 0;
|
|
89
|
-
right: 0;
|
|
90
|
-
padding: 0 12px;
|
|
91
|
-
border-top-right-radius: 16px;
|
|
92
|
-
border-bottom-left-radius: 16px;
|
|
93
|
-
background-color: rgb(255, 234, 232);
|
|
94
|
-
|
|
95
|
-
&.label {
|
|
96
|
-
color: rgb(242, 48, 48);
|
|
97
|
-
font-size: 14px;
|
|
98
|
-
line-height: 22px;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
</style>
|
package/src/prompts/prompts.vue
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { toRaw } from 'vue'
|
|
3
|
-
import { PromptProps, PromptsEvents, PromptsProps, PromptsSlots } from './index.type'
|
|
4
|
-
import Prompt from './prompt.vue'
|
|
5
|
-
|
|
6
|
-
const props = defineProps<PromptsProps>()
|
|
7
|
-
|
|
8
|
-
const emit = defineEmits<PromptsEvents>()
|
|
9
|
-
|
|
10
|
-
defineSlots<PromptsSlots>()
|
|
11
|
-
|
|
12
|
-
const handleClick = (ev: MouseEvent, item: PromptProps) => {
|
|
13
|
-
emit('item-click', ev, toRaw(item))
|
|
14
|
-
}
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<template>
|
|
18
|
-
<div class="tr-prompts">
|
|
19
|
-
<div :class="['tr-prompts__list-container', { wrap: props.wrap, vertical: props.vertical }]">
|
|
20
|
-
<Prompt
|
|
21
|
-
v-for="(item, index) in props.items"
|
|
22
|
-
:key="item.id || index"
|
|
23
|
-
v-bind="item"
|
|
24
|
-
:style="props.itemStyle"
|
|
25
|
-
:class="props.itemClass"
|
|
26
|
-
@click="handleClick($event, item)"
|
|
27
|
-
></Prompt>
|
|
28
|
-
</div>
|
|
29
|
-
<slot name="footer"></slot>
|
|
30
|
-
</div>
|
|
31
|
-
</template>
|
|
32
|
-
|
|
33
|
-
<style lang="less" scoped>
|
|
34
|
-
.tr-prompts {
|
|
35
|
-
.tr-prompts__list-container {
|
|
36
|
-
display: flex;
|
|
37
|
-
gap: 16px;
|
|
38
|
-
overflow-x: auto;
|
|
39
|
-
|
|
40
|
-
&.wrap {
|
|
41
|
-
flex-wrap: wrap;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&.vertical {
|
|
45
|
-
flex-direction: column;
|
|
46
|
-
align-items: flex-start;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
</style>
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { ref, watch, onMounted, onBeforeUnmount, nextTick, PropType } from 'vue'
|
|
3
|
-
import type { Question } from '../index.type'
|
|
4
|
-
import { IconEdit } from '@opentiny/tiny-robot-svgs'
|
|
5
|
-
|
|
6
|
-
const props = defineProps({
|
|
7
|
-
questions: {
|
|
8
|
-
type: Array as PropType<Question[]>,
|
|
9
|
-
required: true,
|
|
10
|
-
},
|
|
11
|
-
isExpanded: {
|
|
12
|
-
type: Boolean,
|
|
13
|
-
default: false,
|
|
14
|
-
},
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
const emit = defineEmits(['question-click', 'show-expand-button'])
|
|
18
|
-
|
|
19
|
-
const commonQuestionsRef = ref<HTMLElement | null>(null)
|
|
20
|
-
const showExpandButton = ref(false)
|
|
21
|
-
const isExpandedRef = ref(false)
|
|
22
|
-
const visibleQuestions = ref<Question[]>([])
|
|
23
|
-
const hiddenQuestions = ref<Question[]>([])
|
|
24
|
-
|
|
25
|
-
watch(
|
|
26
|
-
() => props.isExpanded,
|
|
27
|
-
(val) => {
|
|
28
|
-
isExpandedRef.value = val
|
|
29
|
-
},
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
// 检查是否需要显示展开/收起按钮并计算能够容纳的最大胶囊数
|
|
33
|
-
const checkOverflow = async () => {
|
|
34
|
-
await nextTick()
|
|
35
|
-
if (commonQuestionsRef.value) {
|
|
36
|
-
const container = commonQuestionsRef.value
|
|
37
|
-
const containerWidth = container.clientWidth
|
|
38
|
-
|
|
39
|
-
// 重置胶囊分组
|
|
40
|
-
visibleQuestions.value = []
|
|
41
|
-
hiddenQuestions.value = []
|
|
42
|
-
|
|
43
|
-
if (props.questions.length === 0) {
|
|
44
|
-
showExpandButton.value = false
|
|
45
|
-
return
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// 计算一行可以容纳多少个胶囊
|
|
49
|
-
let accumulatedWidth = 0
|
|
50
|
-
const margin = 8 // 胶囊之间的间距
|
|
51
|
-
|
|
52
|
-
// 克隆一个胶囊元素来测量其基本尺寸
|
|
53
|
-
const tempItem = document.createElement('div')
|
|
54
|
-
tempItem.className = 'tr-common-questions_item'
|
|
55
|
-
tempItem.style.visibility = 'hidden'
|
|
56
|
-
tempItem.style.position = 'absolute'
|
|
57
|
-
container.appendChild(tempItem)
|
|
58
|
-
|
|
59
|
-
// 计算每个胶囊的宽度并确定一行能容纳多少个
|
|
60
|
-
for (let i = 0; i < props.questions.length; i++) {
|
|
61
|
-
const question = props.questions[i]
|
|
62
|
-
|
|
63
|
-
// 设置临时元素内容来测量其宽度
|
|
64
|
-
tempItem.textContent = question.text
|
|
65
|
-
const itemWidth = tempItem.offsetWidth + margin
|
|
66
|
-
|
|
67
|
-
// 检查是否还能容纳下一个胶囊
|
|
68
|
-
if (accumulatedWidth + itemWidth <= containerWidth) {
|
|
69
|
-
accumulatedWidth += itemWidth
|
|
70
|
-
visibleQuestions.value.push(question)
|
|
71
|
-
} else {
|
|
72
|
-
hiddenQuestions.value.push(question)
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// 移除临时元素
|
|
77
|
-
container.removeChild(tempItem)
|
|
78
|
-
|
|
79
|
-
// 如果有隐藏的胶囊,显示展开按钮
|
|
80
|
-
showExpandButton.value = hiddenQuestions.value.length > 0
|
|
81
|
-
// 初始状态设为未展开
|
|
82
|
-
isExpandedRef.value = false
|
|
83
|
-
|
|
84
|
-
emit('show-expand-button', showExpandButton.value)
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// 处理问题点击
|
|
89
|
-
const handleQuestionClick = (question: Question) => {
|
|
90
|
-
emit('question-click', question)
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// 监听 props 变化
|
|
94
|
-
watch(
|
|
95
|
-
() => props.questions,
|
|
96
|
-
() => {
|
|
97
|
-
// 当问题列表变化时重新计算
|
|
98
|
-
checkOverflow()
|
|
99
|
-
},
|
|
100
|
-
{ deep: true },
|
|
101
|
-
)
|
|
102
|
-
|
|
103
|
-
// 处理窗口大小变化
|
|
104
|
-
const handleResize = () => {
|
|
105
|
-
checkOverflow()
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// 组件挂载时添加窗口大小变化监听
|
|
109
|
-
onMounted(() => {
|
|
110
|
-
checkOverflow()
|
|
111
|
-
window.addEventListener('resize', handleResize)
|
|
112
|
-
})
|
|
113
|
-
|
|
114
|
-
// 组件卸载时移除监听器
|
|
115
|
-
onBeforeUnmount(() => {
|
|
116
|
-
window.removeEventListener('resize', handleResize)
|
|
117
|
-
})
|
|
118
|
-
</script>
|
|
119
|
-
|
|
120
|
-
<template>
|
|
121
|
-
<div class="tr-common-questions" ref="commonQuestionsRef" :class="{ expanded: isExpandedRef }">
|
|
122
|
-
<!-- 渲染可见的胶囊 -->
|
|
123
|
-
<div
|
|
124
|
-
v-for="(question, index) in visibleQuestions"
|
|
125
|
-
:key="`visible-${question.id}-${index}`"
|
|
126
|
-
class="tr-common-questions_item"
|
|
127
|
-
@click="handleQuestionClick(question)"
|
|
128
|
-
>
|
|
129
|
-
<div style="display: flex; align-items: center"><IconEdit /></div>
|
|
130
|
-
{{ question.text }}
|
|
131
|
-
</div>
|
|
132
|
-
|
|
133
|
-
<!-- 渲染被隐藏的胶囊(展开时显示) -->
|
|
134
|
-
<div v-if="isExpandedRef">
|
|
135
|
-
<div
|
|
136
|
-
v-for="(question, index) in hiddenQuestions"
|
|
137
|
-
:key="`hidden-${question.id}-${index}`"
|
|
138
|
-
class="tr-common-questions_item"
|
|
139
|
-
@click="handleQuestionClick(question)"
|
|
140
|
-
>
|
|
141
|
-
<IconEdit />
|
|
142
|
-
{{ question.text }}
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
</div>
|
|
146
|
-
</template>
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { ref, defineProps, defineEmits, watch, PropType, computed } from 'vue'
|
|
3
|
-
import { IconClose } from '@opentiny/vue-icon'
|
|
4
|
-
import { TinyButton } from '@opentiny/vue'
|
|
5
|
-
import type { Category, Question } from '../index.type'
|
|
6
|
-
|
|
7
|
-
import { IconHotQuestion, IconTypeAll } from '@opentiny/tiny-robot-svgs'
|
|
8
|
-
|
|
9
|
-
const TinyIconClose = IconClose()
|
|
10
|
-
|
|
11
|
-
const props = defineProps({
|
|
12
|
-
visible: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: false,
|
|
15
|
-
},
|
|
16
|
-
categories: {
|
|
17
|
-
type: Array as PropType<Category[]>,
|
|
18
|
-
default: () => [],
|
|
19
|
-
},
|
|
20
|
-
modalWidth: {
|
|
21
|
-
type: String,
|
|
22
|
-
default: '640px',
|
|
23
|
-
},
|
|
24
|
-
loading: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: false,
|
|
27
|
-
},
|
|
28
|
-
closeOnClickOutside: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
default: true,
|
|
31
|
-
},
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
const emit = defineEmits(['update:visible', 'close', 'select-category', 'question-click'])
|
|
35
|
-
|
|
36
|
-
// 当前激活的分类
|
|
37
|
-
const activeCategory = ref<string>('')
|
|
38
|
-
|
|
39
|
-
// 计算当前激活分类的问题列表
|
|
40
|
-
const activeQuestions = computed(() => {
|
|
41
|
-
if (!activeCategory.value && props.categories.length > 0) {
|
|
42
|
-
return props.categories[0].questions || []
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const category = props.categories.find((cat) => cat.id === activeCategory.value)
|
|
46
|
-
return category ? category.questions : []
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
// 初始化激活的分类
|
|
50
|
-
watch(
|
|
51
|
-
() => props.categories,
|
|
52
|
-
(categories) => {
|
|
53
|
-
if (categories.length > 0 && !activeCategory.value) {
|
|
54
|
-
activeCategory.value = categories[0].id
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
{ immediate: true },
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
// 关闭弹窗
|
|
61
|
-
const closeModal = () => {
|
|
62
|
-
emit('update:visible', false)
|
|
63
|
-
emit('close')
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// 处理分类选择
|
|
67
|
-
const handleCategorySelect = (categoryId: string) => {
|
|
68
|
-
activeCategory.value = categoryId
|
|
69
|
-
emit(
|
|
70
|
-
'select-category',
|
|
71
|
-
props.categories.find((cat) => cat.id === categoryId),
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// 处理问题点击
|
|
76
|
-
const handleQuestionClick = (question: Question) => {
|
|
77
|
-
emit('question-click', question)
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// 处理点击外部关闭
|
|
81
|
-
const handleClickOutside = (event: MouseEvent) => {
|
|
82
|
-
if (props.closeOnClickOutside && !event.composedPath().includes(modalRef.value!)) {
|
|
83
|
-
closeModal()
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const modalRef = ref<HTMLElement | null>(null)
|
|
88
|
-
</script>
|
|
89
|
-
|
|
90
|
-
<template>
|
|
91
|
-
<div v-if="visible" class="tr-question-modal-backdrop" @mousedown="handleClickOutside">
|
|
92
|
-
<div ref="modalRef" class="tr-question-panel" :style="{ width: modalWidth }" @mousedown.stop>
|
|
93
|
-
<div class="tr-question-header">
|
|
94
|
-
<div style="display: flex; align-items: center; gap: 12px; font-size: 36px">
|
|
95
|
-
<div><IconHotQuestion /></div>
|
|
96
|
-
<div class="tr-question-header-title">热门问题</div>
|
|
97
|
-
</div>
|
|
98
|
-
<span class="tr-question-close-btn" @click="closeModal">
|
|
99
|
-
<TinyButton :icon="TinyIconClose" type="text" />
|
|
100
|
-
</span>
|
|
101
|
-
</div>
|
|
102
|
-
|
|
103
|
-
<div v-if="categories.length > 0" class="tr-question-categories">
|
|
104
|
-
<div
|
|
105
|
-
v-for="category in categories"
|
|
106
|
-
:key="category.id"
|
|
107
|
-
class="tr-question-categories-item"
|
|
108
|
-
:class="{ active: activeCategory === category.id }"
|
|
109
|
-
@click="handleCategorySelect(category.id)"
|
|
110
|
-
>
|
|
111
|
-
<slot name="category-label" :category="category">
|
|
112
|
-
<div class="category-icon">
|
|
113
|
-
<IconTypeAll />
|
|
114
|
-
</div>
|
|
115
|
-
<span>{{ category.label }}</span>
|
|
116
|
-
</slot>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
|
|
120
|
-
<div class="tr-question-content">
|
|
121
|
-
<div v-if="loading" class="tr-question-loading">
|
|
122
|
-
<slot name="loading-indicator">
|
|
123
|
-
<div class="tr-question-loading-spinner"></div>
|
|
124
|
-
</slot>
|
|
125
|
-
</div>
|
|
126
|
-
|
|
127
|
-
<ul v-else-if="activeQuestions.length > 0">
|
|
128
|
-
<li
|
|
129
|
-
v-for="(question, index) in activeQuestions"
|
|
130
|
-
:key="question.id"
|
|
131
|
-
class="tr-question-list-item"
|
|
132
|
-
@click="handleQuestionClick(question)"
|
|
133
|
-
>
|
|
134
|
-
<slot name="question-item" :question="question" :index="index">
|
|
135
|
-
<span>{{ index + 1 }}.</span> {{ question.text }}
|
|
136
|
-
</slot>
|
|
137
|
-
</li>
|
|
138
|
-
</ul>
|
|
139
|
-
|
|
140
|
-
<div v-else class="tr-question-empty">
|
|
141
|
-
<slot name="empty-state">
|
|
142
|
-
<p>暂无相关问题</p>
|
|
143
|
-
</slot>
|
|
144
|
-
</div>
|
|
145
|
-
</div>
|
|
146
|
-
</div>
|
|
147
|
-
</div>
|
|
148
|
-
</template>
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { ref, computed, Ref, watch } from 'vue'
|
|
2
|
-
import type { Category, ThemeType } from '../index.type'
|
|
3
|
-
|
|
4
|
-
export function useQuestions(categories: Ref<Category[]> = ref([])) {
|
|
5
|
-
// 当前激活的分类ID
|
|
6
|
-
const activeCategory = ref<string>('')
|
|
7
|
-
|
|
8
|
-
// 是否展开悬浮面板
|
|
9
|
-
const isFloatingExpanded = ref(false)
|
|
10
|
-
|
|
11
|
-
// 弹窗是否可见
|
|
12
|
-
const modalVisible = ref(false)
|
|
13
|
-
|
|
14
|
-
// 当前主题
|
|
15
|
-
const currentTheme = ref<ThemeType>('light')
|
|
16
|
-
|
|
17
|
-
// 计算当前激活分类的问题列表
|
|
18
|
-
const activeQuestions = computed(() => {
|
|
19
|
-
if (!activeCategory.value && categories.value.length > 0) {
|
|
20
|
-
return categories.value[0].questions
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const category = categories.value.find((cat) => cat.id === activeCategory.value)
|
|
24
|
-
return category ? category.questions : []
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
// 设置激活的分类
|
|
28
|
-
const setActiveCategory = (categoryId: string) => {
|
|
29
|
-
activeCategory.value = categoryId
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// 打开弹窗
|
|
33
|
-
const openModal = () => {
|
|
34
|
-
modalVisible.value = true
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// 关闭弹窗
|
|
38
|
-
const closeModal = () => {
|
|
39
|
-
modalVisible.value = false
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// 切换悬浮面板展开状态
|
|
43
|
-
const toggleFloating = () => {
|
|
44
|
-
isFloatingExpanded.value = !isFloatingExpanded.value
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// 防止滚动穿透的函数
|
|
48
|
-
const toggleBodyScroll = (isOpen: boolean) => {
|
|
49
|
-
const body = document.body
|
|
50
|
-
|
|
51
|
-
if (isOpen) {
|
|
52
|
-
// 保存当前滚动位置
|
|
53
|
-
const scrollTop = window.scrollY || document.documentElement.scrollTop
|
|
54
|
-
body.style.position = 'fixed'
|
|
55
|
-
body.style.width = '100%'
|
|
56
|
-
body.style.top = `-${scrollTop}px`
|
|
57
|
-
body.style.overflowY = 'scroll' // 保持滚动条宽度,防止页面抖动
|
|
58
|
-
body.classList.add('tr-modal-open')
|
|
59
|
-
} else {
|
|
60
|
-
body.style.position = ''
|
|
61
|
-
body.style.width = ''
|
|
62
|
-
body.style.top = ''
|
|
63
|
-
body.style.overflowY = ''
|
|
64
|
-
body.classList.remove('tr-modal-open')
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// 监听弹窗变化应用滚动锁定
|
|
69
|
-
watch(modalVisible, (value) => {
|
|
70
|
-
toggleBodyScroll(value)
|
|
71
|
-
})
|
|
72
|
-
|
|
73
|
-
// 切换主题
|
|
74
|
-
const toggleTheme = () => {
|
|
75
|
-
currentTheme.value = currentTheme.value === 'light' ? 'dark' : 'light'
|
|
76
|
-
document.documentElement.setAttribute('data-theme', currentTheme.value)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// 设置主题
|
|
80
|
-
const setTheme = (theme: ThemeType) => {
|
|
81
|
-
currentTheme.value = theme
|
|
82
|
-
document.documentElement.setAttribute('data-theme', theme)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// 刷新数据(模拟异步操作)
|
|
86
|
-
const refreshData = async () => {
|
|
87
|
-
// 这里可以添加实际的数据刷新逻辑
|
|
88
|
-
return Promise.resolve()
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return {
|
|
92
|
-
activeCategory,
|
|
93
|
-
isFloatingExpanded,
|
|
94
|
-
modalVisible,
|
|
95
|
-
currentTheme,
|
|
96
|
-
activeQuestions,
|
|
97
|
-
setActiveCategory,
|
|
98
|
-
openModal,
|
|
99
|
-
closeModal,
|
|
100
|
-
toggleFloating,
|
|
101
|
-
toggleTheme,
|
|
102
|
-
setTheme,
|
|
103
|
-
refreshData,
|
|
104
|
-
toggleBodyScroll,
|
|
105
|
-
}
|
|
106
|
-
}
|