@opentiny/tiny-robot 0.2.0-alpha.2 → 0.2.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_plugin-vue_export-helper.js +9 -0
- package/dist/action-group/index.js +142 -0
- package/dist/bubble/index.js +3211 -0
- package/dist/{node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/close.js → close.js} +9 -9
- package/dist/container/index.js +60 -0
- package/dist/conversations/index.js +14 -0
- package/dist/feedback/index.js +192 -0
- package/dist/history/index.js +228 -0
- package/dist/icon-button/index.js +31 -0
- package/dist/index.d.ts +2200 -26
- package/dist/index.js +35 -43
- package/dist/index2.js +376 -0
- package/dist/index3.js +3895 -0
- package/dist/index4.js +637 -0
- package/dist/index5.js +3237 -0
- package/dist/index6.js +4623 -0
- package/dist/prompts/index.js +83 -0
- package/dist/question/index.js +429 -0
- package/dist/sender/index.js +772 -0
- package/dist/style.css +1 -1
- package/dist/suggestion/index.js +497 -0
- package/dist/{packages/svgs/dist/tiny-robot-svgs.js → tiny-robot-svgs.js} +107 -107
- package/dist/welcome/index.js +38 -0
- package/package.json +7 -3
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
- package/dist/action-group/ActionGroup.vue.d.ts +0 -26
- package/dist/action-group/ActionGroupItem.vue.d.ts +0 -18
- package/dist/action-group/index.d.ts +0 -12
- package/dist/action-group/index.type.d.ts +0 -17
- package/dist/bubble/BubbleList.vue.d.ts +0 -5
- package/dist/bubble/index.d.ts +0 -12
- package/dist/bubble/index.type.d.ts +0 -51
- package/dist/container/index.d.ts +0 -7
- package/dist/container/index.type.d.ts +0 -16
- package/dist/container/index.vue.d.ts +0 -26
- package/dist/conversations/index.d.ts +0 -7
- package/dist/conversations/index.vue.d.ts +0 -2
- package/dist/feedback/components/SourceList.vue.d.ts +0 -11
- package/dist/feedback/components/index.d.ts +0 -1
- package/dist/feedback/index.d.ts +0 -7
- package/dist/feedback/index.type.d.ts +0 -25
- package/dist/feedback/index.vue.d.ts +0 -13
- package/dist/history/components/index.d.ts +0 -2
- package/dist/history/components/item-tag.vue.d.ts +0 -5
- package/dist/history/components/search-empty.vue.d.ts +0 -7
- package/dist/history/composables/index.d.ts +0 -1
- package/dist/history/composables/useEditItemTitle.d.ts +0 -12
- package/dist/history/index.d.ts +0 -6
- package/dist/history/index.type.d.ts +0 -43
- package/dist/history/index.vue.d.ts +0 -2
- package/dist/icon-button/index.d.ts +0 -7
- package/dist/icon-button/index.type.d.ts +0 -6
- package/dist/icon-button/index.vue.d.ts +0 -6
- package/dist/node_modules/.pnpm/@opentiny_utils@1.0.0/node_modules/@opentiny/utils/dist/opentiny-utils.es.js +0 -832
- package/dist/node_modules/.pnpm/@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js +0 -2116
- package/dist/node_modules/.pnpm/@opentiny_vue-button@3.21.0/node_modules/@opentiny/vue-button/lib/index.js +0 -113
- package/dist/node_modules/.pnpm/@opentiny_vue-button@3.21.0/node_modules/@opentiny/vue-button/lib/pc.js +0 -93
- package/dist/node_modules/.pnpm/@opentiny_vue-common@3.21.0/node_modules/@opentiny/vue-common/lib/index.js +0 -727
- package/dist/node_modules/.pnpm/@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js +0 -710
- package/dist/node_modules/.pnpm/@opentiny_vue-dialog-box@3.21.0/node_modules/@opentiny/vue-dialog-box/lib/index.js +0 -198
- package/dist/node_modules/.pnpm/@opentiny_vue-dialog-box@3.21.0/node_modules/@opentiny/vue-dialog-box/lib/pc.js +0 -204
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useEventListener.js +0 -10
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useInstanceSlots.js +0 -14
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useRelation.js +0 -54
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popper.js +0 -85
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/close.js +0 -29
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/eyeclose.js +0 -42
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/eyeopen.js +0 -43
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/finish.js +0 -34
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/fullscreen.js +0 -30
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/loading-shadow.js +0 -77
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/minscreen.js +0 -30
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-after.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-before.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-after.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-before.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-center.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-left.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-right.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-bold.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-code-block.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-code-view.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-color.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-column.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-row.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-table.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-font-size.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-format-clear.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h1.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h2.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h3.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h4.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h5.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h6.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-heading.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-high-light.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-image.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-italic.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-line-height.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-link-unlink.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-link.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-list-ordered.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-list-unordered.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells-vertical.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-node-delete.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-paragraph.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-quote-text.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-redo.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-horizontal.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-vertical.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-strike-through.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-subscript.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-superscript.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-table.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-task-list.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-underline.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-undo.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/sub-script.js +0 -29
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/warn.js +0 -26
- package/dist/node_modules/.pnpm/@opentiny_vue-input@3.21.0/node_modules/@opentiny/vue-input/lib/index.js +0 -196
- package/dist/node_modules/.pnpm/@opentiny_vue-input@3.21.0/node_modules/@opentiny/vue-input/lib/pc.js +0 -568
- package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.21.0/node_modules/@opentiny/vue-locale/lib/index.js +0 -1783
- package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.22.0/node_modules/@opentiny/vue-locale/lib/index.js +0 -1783
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/button/index.js +0 -13
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/button/vue.js +0 -34
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/chunk-G2ADBYYC.js +0 -12
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/browser.js +0 -36
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/clickoutside.js +0 -47
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/debounce.js +0 -7
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/dom.js +0 -45
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popper.js +0 -320
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popup-manager.js +0 -118
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/throttle.js +0 -23
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useEventListener.js +0 -9
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useInstanceSlots.js +0 -14
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useRelation.js +0 -54
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popper.js +0 -84
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popup.js +0 -73
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/event.js +0 -13
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/function.js +0 -5
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/index.js +0 -11
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/object.js +0 -84
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/string.js +0 -28
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/type.js +0 -28
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/dialog-box/index.js +0 -136
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/dialog-box/vue.js +0 -148
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/input/index.js +0 -228
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/input/vue.js +0 -263
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/index.js +0 -63
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/vue-storage-box.js +0 -16
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/vue.js +0 -23
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tooltip/index.js +0 -78
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tooltip/vue.js +0 -90
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/index.js +0 -77
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/vue.js +0 -90
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.21.0/node_modules/@opentiny/vue-tooltip/lib/index.js +0 -173
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.21.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +0 -248
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/index.js +0 -176
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +0 -248
- package/dist/node_modules/.pnpm/@vueuse_core@13.1.0_vue@3.5.13/node_modules/@vueuse/core/index.js +0 -310
- package/dist/node_modules/.pnpm/@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js +0 -110
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.js +0 -277
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.js +0 -46
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.js +0 -7
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js +0 -7
- package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.js +0 -187
- package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.js +0 -19
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_blocks.js +0 -67
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_re.js +0 -5
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/utils.js +0 -164
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/index.js +0 -8
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_destination.js +0 -44
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_label.js +0 -21
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_title.js +0 -37
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/index.js +0 -112
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_block.js +0 -63
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_core.js +0 -34
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_inline.js +0 -96
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/commonmark.js +0 -78
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/default.js +0 -40
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/zero.js +0 -59
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/renderer.js +0 -127
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/ruler.js +0 -95
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/blockquote.js +0 -59
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/code.js +0 -23
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/fence.js +0 -30
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/heading.js +0 -28
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/hr.js +0 -27
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/html_block.js +0 -37
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/lheading.js +0 -43
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/list.js +0 -110
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/paragraph.js +0 -25
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/reference.js +0 -95
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/state_block.js +0 -84
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/table.js +0 -99
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/block.js +0 -7
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/inline.js +0 -10
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/linkify.js +0 -57
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/normalize.js +0 -9
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/replacements.js +0 -31
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/smartquotes.js +0 -80
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/state_core.js +0 -8
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/text_join.js +0 -16
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/autolink.js +0 -46
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/backticks.js +0 -31
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/balance_pairs.js +0 -34
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/emphasis.js +0 -57
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/entity.js +0 -33
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/escape.js +0 -32
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/fragments_join.js +0 -10
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/html_inline.js +0 -32
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/image.js +0 -48
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/link.js +0 -40
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/linkify.js +0 -28
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/newline.js +0 -23
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/state_inline.js +0 -27
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/strikethrough.js +0 -54
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/text.js +0 -39
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/token.js +0 -31
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.js +0 -10
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.js +0 -61
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.js +0 -48
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.js +0 -7
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.js +0 -74
- package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.js +0 -139
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.js +0 -14
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.js +0 -4
- package/dist/packages/components/src/action-group/ActionGroup.vue.js +0 -7
- package/dist/packages/components/src/action-group/ActionGroup.vue2.js +0 -121
- package/dist/packages/components/src/action-group/ActionGroupItem.vue.js +0 -14
- package/dist/packages/components/src/action-group/ActionGroupItem.vue2.js +0 -4
- package/dist/packages/components/src/action-group/index.js +0 -17
- package/dist/packages/components/src/assets/icons/accessory.svg.js +0 -4
- package/dist/packages/components/src/assets/icons/loading-speech.svg.js +0 -4
- package/dist/packages/components/src/assets/icons/loading.svg.js +0 -4
- package/dist/packages/components/src/assets/icons/send.svg.js +0 -4
- package/dist/packages/components/src/assets/icons/voice.svg.js +0 -4
- package/dist/packages/components/src/bubble/Bubble.vue.js +0 -7
- package/dist/packages/components/src/bubble/Bubble.vue2.js +0 -76
- package/dist/packages/components/src/bubble/BubbleList.vue.js +0 -7
- package/dist/packages/components/src/bubble/BubbleList.vue2.js +0 -50
- package/dist/packages/components/src/bubble/index.js +0 -18
- package/dist/packages/components/src/container/index.js +0 -9
- package/dist/packages/components/src/container/index.vue.js +0 -7
- package/dist/packages/components/src/container/index.vue2.js +0 -55
- package/dist/packages/components/src/conversations/index.js +0 -9
- package/dist/packages/components/src/conversations/index.vue.js +0 -9
- package/dist/packages/components/src/feedback/components/SourceList.vue.js +0 -7
- package/dist/packages/components/src/feedback/components/SourceList.vue2.js +0 -52
- package/dist/packages/components/src/feedback/index.js +0 -9
- package/dist/packages/components/src/feedback/index.vue.js +0 -7
- package/dist/packages/components/src/feedback/index.vue2.js +0 -143
- package/dist/packages/components/src/history/components/item-tag.vue.js +0 -7
- package/dist/packages/components/src/history/components/item-tag.vue2.js +0 -21
- package/dist/packages/components/src/history/components/search-empty.vue.js +0 -7
- package/dist/packages/components/src/history/components/search-empty.vue2.js +0 -20
- package/dist/packages/components/src/history/composables/useEditItemTitle.js +0 -43
- package/dist/packages/components/src/history/index.js +0 -11
- package/dist/packages/components/src/history/index.vue.js +0 -7
- package/dist/packages/components/src/history/index.vue2.js +0 -130
- package/dist/packages/components/src/icon-button/index.js +0 -9
- package/dist/packages/components/src/icon-button/index.vue.js +0 -7
- package/dist/packages/components/src/icon-button/index.vue2.js +0 -22
- package/dist/packages/components/src/prompts/index.js +0 -18
- package/dist/packages/components/src/prompts/prompt.vue.js +0 -7
- package/dist/packages/components/src/prompts/prompt.vue2.js +0 -39
- package/dist/packages/components/src/prompts/prompts.vue.js +0 -7
- package/dist/packages/components/src/prompts/prompts.vue2.js +0 -36
- package/dist/packages/components/src/question/components/CommonQuestions.vue.js +0 -89
- package/dist/packages/components/src/question/components/CommonQuestions.vue2.js +0 -4
- package/dist/packages/components/src/question/components/HotQuestions.vue.js +0 -140
- package/dist/packages/components/src/question/components/HotQuestions.vue2.js +0 -4
- package/dist/packages/components/src/question/composables/useQuestions.js +0 -48
- package/dist/packages/components/src/question/index.js +0 -9
- package/dist/packages/components/src/question/index.vue.js +0 -113
- package/dist/packages/components/src/question/index.vue2.js +0 -4
- package/dist/packages/components/src/sender/components/ActionButtons.vue.js +0 -143
- package/dist/packages/components/src/sender/components/ActionButtons.vue2.js +0 -4
- package/dist/packages/components/src/sender/components/TemplateEditor.vue.js +0 -7
- package/dist/packages/components/src/sender/components/TemplateEditor.vue2.js +0 -175
- package/dist/packages/components/src/sender/composables/useInputHandler.js +0 -38
- package/dist/packages/components/src/sender/composables/useKeyboardHandler.js +0 -31
- package/dist/packages/components/src/sender/composables/useSpeechHandler.js +0 -67
- package/dist/packages/components/src/sender/index.js +0 -9
- package/dist/packages/components/src/sender/index.vue.js +0 -255
- package/dist/packages/components/src/sender/index.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/components/CategoryNav.vue.js +0 -38
- package/dist/packages/components/src/suggestion/components/CategoryNav.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue.js +0 -107
- package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue.js +0 -123
- package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/composables/useKeyboardNavigation.js +0 -45
- package/dist/packages/components/src/suggestion/composables/useTriggerDetection.js +0 -17
- package/dist/packages/components/src/suggestion/index.js +0 -9
- package/dist/packages/components/src/suggestion/index.vue.js +0 -179
- package/dist/packages/components/src/suggestion/index.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/utils/dom.js +0 -18
- package/dist/packages/components/src/welcome/index.js +0 -9
- package/dist/packages/components/src/welcome/index.vue.js +0 -7
- package/dist/packages/components/src/welcome/index.vue2.js +0 -32
- package/dist/prompts/index.d.ts +0 -12
- package/dist/prompts/index.type.d.ts +0 -55
- package/dist/prompts/prompt.vue.d.ts +0 -3
- package/dist/prompts/prompts.vue.d.ts +0 -20
- package/dist/question/components/CommonQuestions.vue.d.ts +0 -32
- package/dist/question/components/HotQuestions.vue.d.ts +0 -89
- package/dist/question/composables/useQuestions.d.ts +0 -17
- package/dist/question/index.d.ts +0 -7
- package/dist/question/index.type.d.ts +0 -74
- package/dist/question/index.vue.d.ts +0 -46
- package/dist/sender/components/ActionButtons.vue.d.ts +0 -25
- package/dist/sender/components/TemplateEditor.vue.d.ts +0 -18
- package/dist/sender/composables/useInputHandler.d.ts +0 -17
- package/dist/sender/composables/useKeyboardHandler.d.ts +0 -18
- package/dist/sender/composables/useSpeechHandler.d.ts +0 -8
- package/dist/sender/index.d.ts +0 -7
- package/dist/sender/index.type.d.ts +0 -137
- package/dist/sender/index.vue.d.ts +0 -1012
- package/dist/suggestion/components/CategoryNav.vue.d.ts +0 -45
- package/dist/suggestion/components/SuggestionCapsule.vue.d.ts +0 -32
- package/dist/suggestion/components/SuggestionPanel.vue.d.ts +0 -84
- package/dist/suggestion/composables/useKeyboardNavigation.d.ts +0 -18
- package/dist/suggestion/composables/useSuggestionFilter.d.ts +0 -10
- package/dist/suggestion/composables/useTriggerDetection.d.ts +0 -11
- package/dist/suggestion/index.d.ts +0 -7
- package/dist/suggestion/index.type.d.ts +0 -94
- package/dist/suggestion/index.vue.d.ts +0 -343
- package/dist/suggestion/utils/dom.d.ts +0 -20
- package/dist/welcome/index.d.ts +0 -7
- package/dist/welcome/index.type.d.ts +0 -10
- package/dist/welcome/index.vue.d.ts +0 -18
- package/src/action-group/ActionGroup.vue +0 -247
- package/src/action-group/ActionGroupItem.vue +0 -9
- package/src/action-group/index.ts +0 -25
- package/src/action-group/index.type.ts +0 -21
- package/src/assets/icons/accessory.svg +0 -12
- package/src/assets/icons/loading-speech.svg +0 -16
- package/src/assets/icons/loading.svg +0 -17
- package/src/assets/icons/send.svg +0 -21
- package/src/assets/icons/voice.svg +0 -22
- package/src/bubble/Bubble.vue +0 -153
- package/src/bubble/BubbleList.vue +0 -55
- package/src/bubble/index.ts +0 -23
- package/src/bubble/index.type.ts +0 -49
- package/src/container/index.ts +0 -12
- package/src/container/index.type.ts +0 -17
- package/src/container/index.vue +0 -109
- package/src/conversations/index.ts +0 -12
- package/src/conversations/index.vue +0 -3
- package/src/feedback/components/SourceList.vue +0 -112
- package/src/feedback/components/index.ts +0 -1
- package/src/feedback/index.ts +0 -12
- package/src/feedback/index.type.ts +0 -27
- package/src/feedback/index.vue +0 -166
- package/src/history/components/index.ts +0 -2
- package/src/history/components/item-tag.vue +0 -49
- package/src/history/components/search-empty.vue +0 -38
- package/src/history/composables/index.ts +0 -1
- package/src/history/composables/useEditItemTitle.ts +0 -75
- package/src/history/index.ts +0 -12
- package/src/history/index.type.ts +0 -50
- package/src/history/index.vue +0 -292
- package/src/icon-button/index.ts +0 -12
- package/src/icon-button/index.type.ts +0 -7
- package/src/icon-button/index.vue +0 -58
- package/src/index.ts +0 -76
- package/src/prompts/index.ts +0 -25
- package/src/prompts/index.type.ts +0 -59
- package/src/prompts/prompt.vue +0 -101
- package/src/prompts/prompts.vue +0 -50
- package/src/question/components/CommonQuestions.vue +0 -146
- package/src/question/components/HotQuestions.vue +0 -148
- package/src/question/composables/useQuestions.ts +0 -106
- package/src/question/index.less +0 -447
- package/src/question/index.ts +0 -12
- package/src/question/index.type.ts +0 -86
- package/src/question/index.vue +0 -140
- package/src/question/vars.less +0 -135
- package/src/sender/components/ActionButtons.vue +0 -168
- package/src/sender/components/TemplateEditor.vue +0 -465
- package/src/sender/composables/useInputHandler.ts +0 -74
- package/src/sender/composables/useKeyboardHandler.ts +0 -101
- package/src/sender/composables/useSpeechHandler.ts +0 -122
- package/src/sender/index.less +0 -352
- package/src/sender/index.ts +0 -12
- package/src/sender/index.type.ts +0 -162
- package/src/sender/index.vue +0 -338
- package/src/sender/vars.less +0 -84
- package/src/suggestion/components/CategoryNav.vue +0 -38
- package/src/suggestion/components/SuggestionCapsule.vue +0 -183
- package/src/suggestion/components/SuggestionPanel.vue +0 -147
- package/src/suggestion/composables/useKeyboardNavigation.ts +0 -101
- package/src/suggestion/composables/useSuggestionFilter.ts +0 -34
- package/src/suggestion/composables/useTriggerDetection.ts +0 -46
- package/src/suggestion/index.less +0 -497
- package/src/suggestion/index.ts +0 -12
- package/src/suggestion/index.type.ts +0 -101
- package/src/suggestion/index.vue +0 -338
- package/src/suggestion/utils/dom.ts +0 -66
- package/src/suggestion/vars.less +0 -141
- package/src/vite-env.d.ts +0 -1
- package/src/welcome/index.ts +0 -12
- package/src/welcome/index.type.ts +0 -12
- package/src/welcome/index.vue +0 -69
- package/tsconfig.json +0 -37
- package/tsconfig.node.json +0 -10
- package/vite.config.ts +0 -53
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { defineComponent as u, createElementBlock as c, openBlock as e, normalizeClass as m, createElementVNode as n, createBlock as d, resolveDynamicComponent as f, createCommentVNode as h, toDisplayString as l, Fragment as y, createTextVNode as P, renderSlot as B, renderList as w, mergeProps as x, toRaw as S } from "vue";
|
|
2
|
+
import { _ as v } from "../_plugin-vue_export-helper.js";
|
|
3
|
+
const N = { class: "tr-prompt__icon" }, T = { class: "tr-prompt__content" }, V = { class: "tr-prompt__content-label" }, $ = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "tr-prompt__content-description"
|
|
6
|
+
}, D = /* @__PURE__ */ u({
|
|
7
|
+
__name: "prompt",
|
|
8
|
+
props: {
|
|
9
|
+
label: {},
|
|
10
|
+
id: {},
|
|
11
|
+
description: {},
|
|
12
|
+
icon: {},
|
|
13
|
+
disabled: { type: Boolean },
|
|
14
|
+
badge: {}
|
|
15
|
+
},
|
|
16
|
+
setup(o) {
|
|
17
|
+
const t = o;
|
|
18
|
+
return (s, _) => (e(), c("div", {
|
|
19
|
+
class: m(["tr-prompt", { disabled: t.disabled }])
|
|
20
|
+
}, [
|
|
21
|
+
n("div", N, [
|
|
22
|
+
(e(), d(f(t.icon)))
|
|
23
|
+
]),
|
|
24
|
+
n("div", T, [
|
|
25
|
+
n("h6", V, l(t.label), 1),
|
|
26
|
+
t.description ? (e(), c("p", $, l(t.description), 1)) : h("", !0)
|
|
27
|
+
]),
|
|
28
|
+
n("div", {
|
|
29
|
+
class: m(["tr-prompt__badge", { label: typeof t.badge == "string" }])
|
|
30
|
+
}, [
|
|
31
|
+
typeof t.badge == "string" ? (e(), c(y, { key: 0 }, [
|
|
32
|
+
P(l(t.badge), 1)
|
|
33
|
+
], 64)) : (e(), d(f(t.badge), { key: 1 }))
|
|
34
|
+
], 2)
|
|
35
|
+
], 2));
|
|
36
|
+
}
|
|
37
|
+
}), r = /* @__PURE__ */ v(D, [["__scopeId", "data-v-e04bfae3"]]), E = { class: "tr-prompts" }, I = /* @__PURE__ */ u({
|
|
38
|
+
__name: "prompts",
|
|
39
|
+
props: {
|
|
40
|
+
items: {},
|
|
41
|
+
itemStyle: {},
|
|
42
|
+
itemClass: {},
|
|
43
|
+
vertical: { type: Boolean },
|
|
44
|
+
wrap: { type: Boolean }
|
|
45
|
+
},
|
|
46
|
+
emits: ["item-click"],
|
|
47
|
+
setup(o, { emit: t }) {
|
|
48
|
+
const s = o, _ = t, k = (p, b) => {
|
|
49
|
+
_("item-click", p, S(b));
|
|
50
|
+
};
|
|
51
|
+
return (p, b) => (e(), c("div", E, [
|
|
52
|
+
n("div", {
|
|
53
|
+
class: m(["tr-prompts__list-container", { wrap: s.wrap, vertical: s.vertical }])
|
|
54
|
+
}, [
|
|
55
|
+
(e(!0), c(y, null, w(s.items, (i, g) => (e(), d(r, x({
|
|
56
|
+
key: i.id || g,
|
|
57
|
+
ref_for: !0
|
|
58
|
+
}, i, {
|
|
59
|
+
style: s.itemStyle,
|
|
60
|
+
class: s.itemClass,
|
|
61
|
+
onClick: (C) => k(C, i)
|
|
62
|
+
}), null, 16, ["style", "class", "onClick"]))), 128))
|
|
63
|
+
], 2),
|
|
64
|
+
B(p.$slots, "footer", {}, void 0, !0)
|
|
65
|
+
]));
|
|
66
|
+
}
|
|
67
|
+
}), a = /* @__PURE__ */ v(I, [["__scopeId", "data-v-a3ceb6f3"]]);
|
|
68
|
+
r.name = "TrPrompt";
|
|
69
|
+
const z = function(o) {
|
|
70
|
+
o.component(r.name, r);
|
|
71
|
+
};
|
|
72
|
+
r.install = z;
|
|
73
|
+
const j = r;
|
|
74
|
+
a.name = "TrPrompts";
|
|
75
|
+
const F = function(o) {
|
|
76
|
+
o.component(a.name, a);
|
|
77
|
+
};
|
|
78
|
+
a.install = F;
|
|
79
|
+
const q = a;
|
|
80
|
+
export {
|
|
81
|
+
j as Prompt,
|
|
82
|
+
q as Prompts
|
|
83
|
+
};
|
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
import { ref as m, computed as A, watch as H, defineComponent as j, onMounted as Z, onBeforeUnmount as ne, createElementBlock as d, openBlock as i, normalizeClass as V, createElementVNode as t, withDirectives as le, Fragment as R, renderList as z, createVNode as M, unref as q, toDisplayString as S, vShow as ie, nextTick as ae, createCommentVNode as U, withModifiers as ce, normalizeStyle as ue, renderSlot as B, createTextVNode as ee, createBlock as K, withCtx as I } from "vue";
|
|
2
|
+
import { Y as X, q as te, _ as se, T as de, N as re } from "../tiny-robot-svgs.js";
|
|
3
|
+
import { i as me } from "../close.js";
|
|
4
|
+
import { B as ve } from "../index3.js";
|
|
5
|
+
function he(v = m([])) {
|
|
6
|
+
const w = m(""), y = m(!1), a = m(!1), r = m("light"), k = A(() => {
|
|
7
|
+
if (!w.value && v.value.length > 0)
|
|
8
|
+
return v.value[0].questions;
|
|
9
|
+
const s = v.value.find((l) => l.id === w.value);
|
|
10
|
+
return s ? s.questions : [];
|
|
11
|
+
}), b = (s) => {
|
|
12
|
+
w.value = s;
|
|
13
|
+
}, p = () => {
|
|
14
|
+
a.value = !0;
|
|
15
|
+
}, _ = () => {
|
|
16
|
+
a.value = !1;
|
|
17
|
+
}, c = () => {
|
|
18
|
+
y.value = !y.value;
|
|
19
|
+
}, x = (s) => {
|
|
20
|
+
const l = document.body;
|
|
21
|
+
if (s) {
|
|
22
|
+
const Q = window.scrollY || document.documentElement.scrollTop;
|
|
23
|
+
l.style.position = "fixed", l.style.width = "100%", l.style.top = `-${Q}px`, l.style.overflowY = "scroll", l.classList.add("tr-modal-open");
|
|
24
|
+
} else
|
|
25
|
+
l.style.position = "", l.style.width = "", l.style.top = "", l.style.overflowY = "", l.classList.remove("tr-modal-open");
|
|
26
|
+
};
|
|
27
|
+
return H(a, (s) => {
|
|
28
|
+
x(s);
|
|
29
|
+
}), {
|
|
30
|
+
activeCategory: w,
|
|
31
|
+
isFloatingExpanded: y,
|
|
32
|
+
modalVisible: a,
|
|
33
|
+
currentTheme: r,
|
|
34
|
+
activeQuestions: k,
|
|
35
|
+
setActiveCategory: b,
|
|
36
|
+
openModal: p,
|
|
37
|
+
closeModal: _,
|
|
38
|
+
toggleFloating: c,
|
|
39
|
+
toggleTheme: () => {
|
|
40
|
+
r.value = r.value === "light" ? "dark" : "light", document.documentElement.setAttribute("data-theme", r.value);
|
|
41
|
+
},
|
|
42
|
+
setTheme: (s) => {
|
|
43
|
+
r.value = s, document.documentElement.setAttribute("data-theme", s);
|
|
44
|
+
},
|
|
45
|
+
refreshData: async () => Promise.resolve(),
|
|
46
|
+
toggleBodyScroll: x
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
const pe = { class: "tr-common-questions_content" }, fe = { class: "tr-common-questions_expanded-wrapper" }, ge = { class: "tr-common-questions_expanded-area" }, ye = ["onClick"], ke = { class: "tr-common-questions_item_icon" }, _e = { class: "tr-common-questions_item_text" }, Ce = { class: "tr-common-questions_container" }, qe = ["onClick"], $e = { class: "tr-common-questions_item_icon" }, we = { class: "tr-common-questions_item_text" }, be = /* @__PURE__ */ j({
|
|
50
|
+
__name: "CommonQuestions",
|
|
51
|
+
props: {
|
|
52
|
+
questions: {
|
|
53
|
+
type: Array,
|
|
54
|
+
required: !0
|
|
55
|
+
},
|
|
56
|
+
isExpanded: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: !1
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
emits: ["question-click", "toggle-expand", "hover-change"],
|
|
62
|
+
setup(v, { emit: w }) {
|
|
63
|
+
const y = v, a = w, r = m(null), k = m(!1), b = m(!1), p = m(!1), _ = m([]), c = m([]), x = m(0), f = m(null), o = A(() => c.value.length > 0), u = A(() => {
|
|
64
|
+
if (x.value <= 0 || c.value.length === 0) return [];
|
|
65
|
+
const e = [], h = [...c.value];
|
|
66
|
+
for (; h.length > 0; )
|
|
67
|
+
e.push(h.splice(0, x.value));
|
|
68
|
+
return e.reverse();
|
|
69
|
+
}), s = (e, h, $ = 40) => {
|
|
70
|
+
if (h.length === 0) return 0;
|
|
71
|
+
const E = e.clientWidth, T = 8, g = document.createElement("div");
|
|
72
|
+
g.className = "tr-common-questions_item", g.style.visibility = "hidden", g.style.position = "absolute", e.appendChild(g);
|
|
73
|
+
let O = 0;
|
|
74
|
+
const N = Math.min(3, h.length);
|
|
75
|
+
for (let L = 0; L < N; L++) {
|
|
76
|
+
g.innerHTML = `<span class="icon-placeholder"></span>${h[L].text}`;
|
|
77
|
+
const G = g.offsetWidth + T + 24;
|
|
78
|
+
O += G;
|
|
79
|
+
}
|
|
80
|
+
const W = O / N;
|
|
81
|
+
return e.removeChild(g), {
|
|
82
|
+
maxItemsCount: Math.max(1, Math.floor((E - $) / W))
|
|
83
|
+
};
|
|
84
|
+
}, l = (e, h, $, E = 40) => {
|
|
85
|
+
const g = [], O = [];
|
|
86
|
+
let N = 0;
|
|
87
|
+
if (h.length === 0)
|
|
88
|
+
return { visible: g, hidden: O };
|
|
89
|
+
const W = document.createElement("div");
|
|
90
|
+
W.className = "tr-common-questions_item", W.style.visibility = "hidden", W.style.position = "absolute", e.appendChild(W);
|
|
91
|
+
for (let L = 0; L < h.length; L++) {
|
|
92
|
+
const D = h[L];
|
|
93
|
+
W.innerHTML = `<span class="icon-placeholder"></span>${D.text}`;
|
|
94
|
+
const J = W.offsetWidth + 8 + 24, oe = $ - E;
|
|
95
|
+
N + J <= oe ? (N += J, g.push(D)) : O.push(D);
|
|
96
|
+
}
|
|
97
|
+
return e.removeChild(W), { visible: g, hidden: O };
|
|
98
|
+
};
|
|
99
|
+
H(
|
|
100
|
+
() => y.isExpanded,
|
|
101
|
+
(e) => {
|
|
102
|
+
p.value = e, e ? _.value.pop() : _.value.push(c.value[0]);
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
const Q = async () => {
|
|
106
|
+
if (await ae(), r.value) {
|
|
107
|
+
const e = r.value, h = e.clientWidth, $ = 40;
|
|
108
|
+
if (_.value = [], c.value = [], y.questions.length === 0) {
|
|
109
|
+
b.value = !1;
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const { maxItemsCount: E } = s(e, y.questions, $);
|
|
113
|
+
x.value = E;
|
|
114
|
+
const { visible: T, hidden: g } = l(e, y.questions, h, $);
|
|
115
|
+
_.value = T, c.value = g, c.value.length > 0 && _.value.push(c.value[0]), b.value = c.value.length > 0, y.isExpanded || (p.value = !1);
|
|
116
|
+
}
|
|
117
|
+
}, F = () => {
|
|
118
|
+
f.value && (clearTimeout(f.value), f.value = null), k.value = !0, a("hover-change", !0);
|
|
119
|
+
}, P = () => {
|
|
120
|
+
f.value = setTimeout(() => {
|
|
121
|
+
k.value = !1, a("hover-change", !1), f.value = null;
|
|
122
|
+
}, 500);
|
|
123
|
+
}, n = (e) => {
|
|
124
|
+
a("question-click", e);
|
|
125
|
+
};
|
|
126
|
+
H(
|
|
127
|
+
() => y.questions,
|
|
128
|
+
() => {
|
|
129
|
+
Q();
|
|
130
|
+
},
|
|
131
|
+
{ deep: !0 }
|
|
132
|
+
);
|
|
133
|
+
const C = () => {
|
|
134
|
+
Q();
|
|
135
|
+
};
|
|
136
|
+
return Z(() => {
|
|
137
|
+
Q(), window.addEventListener("resize", C);
|
|
138
|
+
}), ne(() => {
|
|
139
|
+
window.removeEventListener("resize", C), f.value && (window.clearTimeout(f.value), f.value = null);
|
|
140
|
+
}), (e, h) => (i(), d("div", {
|
|
141
|
+
class: V(["tr-common-questions", { expanded: p.value }]),
|
|
142
|
+
ref_key: "commonQuestionsRef",
|
|
143
|
+
ref: r,
|
|
144
|
+
onMouseenter: F,
|
|
145
|
+
onMouseleave: P
|
|
146
|
+
}, [
|
|
147
|
+
t("div", pe, [
|
|
148
|
+
t("div", fe, [
|
|
149
|
+
le(t("div", ge, [
|
|
150
|
+
(i(!0), d(R, null, z(u.value, ($, E) => (i(), d("div", {
|
|
151
|
+
key: `row-${E}`,
|
|
152
|
+
class: "tr-common-questions_row"
|
|
153
|
+
}, [
|
|
154
|
+
(i(!0), d(R, null, z($, (T, g) => (i(), d("div", {
|
|
155
|
+
key: `hidden-${T.id}-${g}`,
|
|
156
|
+
class: "tr-common-questions_item",
|
|
157
|
+
onClick: (O) => n(T)
|
|
158
|
+
}, [
|
|
159
|
+
t("div", ke, [
|
|
160
|
+
M(q(X))
|
|
161
|
+
]),
|
|
162
|
+
t("div", _e, S(T.text), 1)
|
|
163
|
+
], 8, ye))), 128))
|
|
164
|
+
]))), 128))
|
|
165
|
+
], 512), [
|
|
166
|
+
[ie, p.value && c.value.length > 0]
|
|
167
|
+
])
|
|
168
|
+
]),
|
|
169
|
+
t("div", Ce, [
|
|
170
|
+
(i(!0), d(R, null, z(_.value, ($, E) => (i(), d("div", {
|
|
171
|
+
key: `visible-${$.id}-${E}`,
|
|
172
|
+
class: V(["tr-common-questions_item", { "last-item": !p.value && E === _.value.length - 1 && o.value }]),
|
|
173
|
+
onClick: (T) => n($)
|
|
174
|
+
}, [
|
|
175
|
+
t("div", $e, [
|
|
176
|
+
M(q(X))
|
|
177
|
+
]),
|
|
178
|
+
t("div", we, S($.text), 1)
|
|
179
|
+
], 10, qe))), 128))
|
|
180
|
+
])
|
|
181
|
+
])
|
|
182
|
+
], 34));
|
|
183
|
+
}
|
|
184
|
+
}), xe = { class: "tr-question-header" }, Ee = { style: { display: "flex", "align-items": "center", gap: "12px", "font-size": "36px" } }, Qe = {
|
|
185
|
+
key: 0,
|
|
186
|
+
class: "tr-question-categories"
|
|
187
|
+
}, Te = ["onClick"], We = { class: "category-icon" }, Me = { class: "tr-question-content" }, Be = {
|
|
188
|
+
key: 0,
|
|
189
|
+
class: "tr-question-loading"
|
|
190
|
+
}, Se = { key: 1 }, Oe = ["onClick"], Le = {
|
|
191
|
+
key: 2,
|
|
192
|
+
class: "tr-question-empty"
|
|
193
|
+
}, Ne = /* @__PURE__ */ j({
|
|
194
|
+
__name: "HotQuestions",
|
|
195
|
+
props: {
|
|
196
|
+
visible: {
|
|
197
|
+
type: Boolean,
|
|
198
|
+
default: !1
|
|
199
|
+
},
|
|
200
|
+
categories: {
|
|
201
|
+
type: Array,
|
|
202
|
+
default: () => []
|
|
203
|
+
},
|
|
204
|
+
modalWidth: {
|
|
205
|
+
type: String,
|
|
206
|
+
default: "640px"
|
|
207
|
+
},
|
|
208
|
+
loading: {
|
|
209
|
+
type: Boolean,
|
|
210
|
+
default: !1
|
|
211
|
+
},
|
|
212
|
+
closeOnClickOutside: {
|
|
213
|
+
type: Boolean,
|
|
214
|
+
default: !0
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
emits: ["update:visible", "close", "select-category", "question-click"],
|
|
218
|
+
setup(v, { emit: w }) {
|
|
219
|
+
const y = me(), a = v, r = w, k = m(""), b = A(() => {
|
|
220
|
+
if (!k.value && a.categories.length > 0)
|
|
221
|
+
return a.categories[0].questions || [];
|
|
222
|
+
const o = a.categories.find((u) => u.id === k.value);
|
|
223
|
+
return o ? o.questions : [];
|
|
224
|
+
});
|
|
225
|
+
H(
|
|
226
|
+
() => a.categories,
|
|
227
|
+
(o) => {
|
|
228
|
+
o.length > 0 && !k.value && (k.value = o[0].id);
|
|
229
|
+
},
|
|
230
|
+
{ immediate: !0 }
|
|
231
|
+
);
|
|
232
|
+
const p = () => {
|
|
233
|
+
r("update:visible", !1), r("close");
|
|
234
|
+
}, _ = (o) => {
|
|
235
|
+
k.value = o, r(
|
|
236
|
+
"select-category",
|
|
237
|
+
a.categories.find((u) => u.id === o)
|
|
238
|
+
);
|
|
239
|
+
}, c = (o) => {
|
|
240
|
+
r("question-click", o);
|
|
241
|
+
}, x = (o) => {
|
|
242
|
+
a.closeOnClickOutside && !o.composedPath().includes(f.value) && p();
|
|
243
|
+
}, f = m(null);
|
|
244
|
+
return (o, u) => v.visible ? (i(), d("div", {
|
|
245
|
+
key: 0,
|
|
246
|
+
class: "tr-question-modal-backdrop",
|
|
247
|
+
onMousedown: x
|
|
248
|
+
}, [
|
|
249
|
+
t("div", {
|
|
250
|
+
ref_key: "modalRef",
|
|
251
|
+
ref: f,
|
|
252
|
+
class: "tr-question-panel",
|
|
253
|
+
style: ue({ width: v.modalWidth }),
|
|
254
|
+
onMousedown: u[0] || (u[0] = ce(() => {
|
|
255
|
+
}, ["stop"]))
|
|
256
|
+
}, [
|
|
257
|
+
t("div", xe, [
|
|
258
|
+
t("div", Ee, [
|
|
259
|
+
t("div", null, [
|
|
260
|
+
M(q(te))
|
|
261
|
+
]),
|
|
262
|
+
u[1] || (u[1] = t("div", { class: "tr-question-header-title" }, "热门问题", -1))
|
|
263
|
+
]),
|
|
264
|
+
t("span", {
|
|
265
|
+
class: "tr-question-close-btn",
|
|
266
|
+
onClick: p
|
|
267
|
+
}, [
|
|
268
|
+
M(q(ve), {
|
|
269
|
+
icon: q(y),
|
|
270
|
+
type: "text"
|
|
271
|
+
}, null, 8, ["icon"])
|
|
272
|
+
])
|
|
273
|
+
]),
|
|
274
|
+
v.categories.length > 0 ? (i(), d("div", Qe, [
|
|
275
|
+
(i(!0), d(R, null, z(v.categories, (s) => (i(), d("div", {
|
|
276
|
+
key: s.id,
|
|
277
|
+
class: V(["tr-question-categories-item", { active: k.value === s.id }]),
|
|
278
|
+
onClick: (l) => _(s.id)
|
|
279
|
+
}, [
|
|
280
|
+
B(o.$slots, "category-label", { category: s }, () => [
|
|
281
|
+
t("div", We, [
|
|
282
|
+
M(q(se))
|
|
283
|
+
]),
|
|
284
|
+
t("span", null, S(s.label), 1)
|
|
285
|
+
])
|
|
286
|
+
], 10, Te))), 128))
|
|
287
|
+
])) : U("", !0),
|
|
288
|
+
t("div", Me, [
|
|
289
|
+
v.loading ? (i(), d("div", Be, [
|
|
290
|
+
B(o.$slots, "loading-indicator", {}, () => [
|
|
291
|
+
u[2] || (u[2] = t("div", { class: "tr-question-loading-spinner" }, null, -1))
|
|
292
|
+
])
|
|
293
|
+
])) : b.value.length > 0 ? (i(), d("ul", Se, [
|
|
294
|
+
(i(!0), d(R, null, z(b.value, (s, l) => (i(), d("li", {
|
|
295
|
+
key: s.id,
|
|
296
|
+
class: "tr-question-list-item",
|
|
297
|
+
onClick: (Q) => c(s)
|
|
298
|
+
}, [
|
|
299
|
+
B(o.$slots, "question-item", {
|
|
300
|
+
question: s,
|
|
301
|
+
index: l
|
|
302
|
+
}, () => [
|
|
303
|
+
t("span", null, S(l + 1) + ".", 1),
|
|
304
|
+
ee(" " + S(s.text), 1)
|
|
305
|
+
])
|
|
306
|
+
], 8, Oe))), 128))
|
|
307
|
+
])) : (i(), d("div", Le, [
|
|
308
|
+
B(o.$slots, "empty-state", {}, () => [
|
|
309
|
+
u[3] || (u[3] = t("p", null, "暂无相关问题", -1))
|
|
310
|
+
])
|
|
311
|
+
]))
|
|
312
|
+
])
|
|
313
|
+
], 36)
|
|
314
|
+
], 32)) : U("", !0);
|
|
315
|
+
}
|
|
316
|
+
}), Re = ["data-theme"], ze = { class: "tr-question__header" }, Ae = { class: "category-icon" }, Y = /* @__PURE__ */ j({
|
|
317
|
+
__name: "index",
|
|
318
|
+
props: {
|
|
319
|
+
categories: { default: () => [] },
|
|
320
|
+
commonQuestions: { default: () => [] },
|
|
321
|
+
initialExpanded: { type: Boolean, default: !1 },
|
|
322
|
+
modalWidth: { default: "640px" },
|
|
323
|
+
theme: { default: "light" },
|
|
324
|
+
closeOnClickOutside: { type: Boolean, default: !0 },
|
|
325
|
+
loading: { type: Boolean, default: !1 }
|
|
326
|
+
},
|
|
327
|
+
emits: ["question-click", "select-category"],
|
|
328
|
+
setup(v, { expose: w, emit: y }) {
|
|
329
|
+
const a = v, r = () => {
|
|
330
|
+
p.value = !p.value;
|
|
331
|
+
}, k = y, b = A(() => a.categories), p = m(a.initialExpanded), _ = m(!1), { modalVisible: c, currentTheme: x, setActiveCategory: f, openModal: o, closeModal: u, setTheme: s, refreshData: l } = he(b);
|
|
332
|
+
H(
|
|
333
|
+
() => a.theme,
|
|
334
|
+
(n) => {
|
|
335
|
+
s(n);
|
|
336
|
+
}
|
|
337
|
+
);
|
|
338
|
+
const Q = (n) => {
|
|
339
|
+
u(), k("question-click", n);
|
|
340
|
+
}, F = (n) => {
|
|
341
|
+
_.value = n;
|
|
342
|
+
}, P = (n) => {
|
|
343
|
+
n && (f(n.id), k("select-category", n));
|
|
344
|
+
};
|
|
345
|
+
return Z(() => {
|
|
346
|
+
document.documentElement.setAttribute("data-theme", x.value);
|
|
347
|
+
}), w({
|
|
348
|
+
openModal: o,
|
|
349
|
+
closeModal: u,
|
|
350
|
+
toggleFloating: r,
|
|
351
|
+
setActiveCategory: f,
|
|
352
|
+
refreshData: l
|
|
353
|
+
}), (n, C) => (i(), d("div", {
|
|
354
|
+
class: V(["tr-question-container", [`theme-${n.theme}`]]),
|
|
355
|
+
"data-theme": n.theme
|
|
356
|
+
}, [
|
|
357
|
+
t("div", ze, [
|
|
358
|
+
t("div", {
|
|
359
|
+
class: "tr-question__trigger",
|
|
360
|
+
onClick: C[0] || (C[0] = //@ts-ignore
|
|
361
|
+
(...e) => q(o) && q(o)(...e))
|
|
362
|
+
}, [
|
|
363
|
+
M(q(te))
|
|
364
|
+
]),
|
|
365
|
+
M(be, {
|
|
366
|
+
questions: n.commonQuestions,
|
|
367
|
+
isExpanded: p.value,
|
|
368
|
+
onQuestionClick: Q,
|
|
369
|
+
onHoverChange: F
|
|
370
|
+
}, null, 8, ["questions", "isExpanded"]),
|
|
371
|
+
_.value ? (i(), d("div", {
|
|
372
|
+
key: 0,
|
|
373
|
+
class: "tr-question__expand-button",
|
|
374
|
+
onClick: r
|
|
375
|
+
}, [
|
|
376
|
+
p.value ? (i(), K(q(re), { key: 1 })) : (i(), K(q(de), { key: 0 }))
|
|
377
|
+
])) : U("", !0)
|
|
378
|
+
]),
|
|
379
|
+
M(Ne, {
|
|
380
|
+
visible: q(c),
|
|
381
|
+
categories: b.value,
|
|
382
|
+
"modal-width": n.modalWidth,
|
|
383
|
+
loading: n.loading,
|
|
384
|
+
"close-on-click-outside": n.closeOnClickOutside,
|
|
385
|
+
"onUpdate:visible": C[1] || (C[1] = (e) => c.value = e),
|
|
386
|
+
onClose: C[2] || (C[2] = (e) => c.value = !1),
|
|
387
|
+
onQuestionClick: Q,
|
|
388
|
+
onSelectCategory: P
|
|
389
|
+
}, {
|
|
390
|
+
"category-label": I(({ category: e }) => [
|
|
391
|
+
B(n.$slots, "category-label", { category: e }, () => [
|
|
392
|
+
t("div", Ae, [
|
|
393
|
+
M(q(se))
|
|
394
|
+
]),
|
|
395
|
+
t("span", null, S(e.label), 1)
|
|
396
|
+
])
|
|
397
|
+
]),
|
|
398
|
+
"question-item": I(({ question: e, index: h }) => [
|
|
399
|
+
B(n.$slots, "question-item", {
|
|
400
|
+
question: e,
|
|
401
|
+
index: h
|
|
402
|
+
}, () => [
|
|
403
|
+
t("span", null, S(h + 1) + ".", 1),
|
|
404
|
+
ee(" " + S(e.text), 1)
|
|
405
|
+
])
|
|
406
|
+
]),
|
|
407
|
+
"loading-indicator": I(() => [
|
|
408
|
+
B(n.$slots, "loading-indicator", {}, () => [
|
|
409
|
+
C[3] || (C[3] = t("div", { class: "tr-question-loading-spinner" }, null, -1))
|
|
410
|
+
])
|
|
411
|
+
]),
|
|
412
|
+
"empty-state": I(() => [
|
|
413
|
+
B(n.$slots, "empty-state", {}, () => [
|
|
414
|
+
C[4] || (C[4] = t("p", null, "暂无相关问题", -1))
|
|
415
|
+
])
|
|
416
|
+
]),
|
|
417
|
+
_: 3
|
|
418
|
+
}, 8, ["visible", "categories", "modal-width", "loading", "close-on-click-outside"])
|
|
419
|
+
], 10, Re));
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
Y.name = "TrQuestion";
|
|
423
|
+
const He = function(v) {
|
|
424
|
+
v.component(Y.name, Y);
|
|
425
|
+
};
|
|
426
|
+
Y.install = He;
|
|
427
|
+
export {
|
|
428
|
+
Y as default
|
|
429
|
+
};
|