@opentiny/tiny-robot 0.2.0-alpha.1 → 0.2.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_plugin-vue_export-helper.js +9 -0
- package/dist/action-group/index.js +142 -0
- package/dist/bubble/index.js +3211 -0
- package/dist/{node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/close.js → close.js} +9 -9
- package/dist/container/index.js +60 -0
- package/dist/conversations/index.js +14 -0
- package/dist/feedback/index.js +192 -0
- package/dist/history/index.js +228 -0
- package/dist/icon-button/index.js +31 -0
- package/dist/index.d.ts +2190 -26
- package/dist/index.js +35 -43
- package/dist/index2.js +376 -0
- package/dist/index3.js +3895 -0
- package/dist/index4.js +637 -0
- package/dist/index5.js +3237 -0
- package/dist/index6.js +4623 -0
- package/dist/prompts/index.js +83 -0
- package/dist/question/index.js +375 -0
- package/dist/sender/index.js +683 -0
- package/dist/style.css +1 -1
- package/dist/suggestion/index.js +497 -0
- package/dist/{packages/svgs/dist/tiny-robot-svgs.js → tiny-robot-svgs.js} +100 -100
- package/dist/welcome/index.js +38 -0
- package/package.json +7 -3
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
- package/dist/action-group/ActionGroup.vue.d.ts +0 -26
- package/dist/action-group/ActionGroupItem.vue.d.ts +0 -18
- package/dist/action-group/index.d.ts +0 -12
- package/dist/action-group/index.type.d.ts +0 -16
- package/dist/bubble/bubble-list.vue.d.ts +0 -5
- package/dist/bubble/components/actions/copy.vue.d.ts +0 -10
- package/dist/bubble/components/actions/index.d.ts +0 -2
- package/dist/bubble/components/actions/refresh.vue.d.ts +0 -2
- package/dist/bubble/index.d.ts +0 -12
- package/dist/bubble/index.type.d.ts +0 -53
- package/dist/bubble/useScroll.d.ts +0 -4
- package/dist/container/index.d.ts +0 -7
- package/dist/container/index.type.d.ts +0 -16
- package/dist/container/index.vue.d.ts +0 -26
- package/dist/conversations/index.d.ts +0 -7
- package/dist/conversations/index.vue.d.ts +0 -2
- package/dist/feedback/components/SourceList.vue.d.ts +0 -11
- package/dist/feedback/components/index.d.ts +0 -1
- package/dist/feedback/index.d.ts +0 -7
- package/dist/feedback/index.type.d.ts +0 -25
- package/dist/feedback/index.vue.d.ts +0 -13
- package/dist/history/components/index.d.ts +0 -2
- package/dist/history/components/item-tag.vue.d.ts +0 -5
- package/dist/history/components/search-empty.vue.d.ts +0 -7
- package/dist/history/composables/index.d.ts +0 -1
- package/dist/history/composables/useEditItemTitle.d.ts +0 -12
- package/dist/history/index.d.ts +0 -6
- package/dist/history/index.type.d.ts +0 -43
- package/dist/history/index.vue.d.ts +0 -2
- package/dist/icon-button/index.d.ts +0 -7
- package/dist/icon-button/index.type.d.ts +0 -7
- package/dist/icon-button/index.vue.d.ts +0 -6
- package/dist/node_modules/.pnpm/@opentiny_utils@1.0.0/node_modules/@opentiny/utils/dist/opentiny-utils.es.js +0 -832
- package/dist/node_modules/.pnpm/@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js +0 -2116
- package/dist/node_modules/.pnpm/@opentiny_vue-button@3.21.0/node_modules/@opentiny/vue-button/lib/index.js +0 -113
- package/dist/node_modules/.pnpm/@opentiny_vue-button@3.21.0/node_modules/@opentiny/vue-button/lib/pc.js +0 -93
- package/dist/node_modules/.pnpm/@opentiny_vue-common@3.21.0/node_modules/@opentiny/vue-common/lib/index.js +0 -727
- package/dist/node_modules/.pnpm/@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js +0 -710
- package/dist/node_modules/.pnpm/@opentiny_vue-dialog-box@3.21.0/node_modules/@opentiny/vue-dialog-box/lib/index.js +0 -198
- package/dist/node_modules/.pnpm/@opentiny_vue-dialog-box@3.21.0/node_modules/@opentiny/vue-dialog-box/lib/pc.js +0 -204
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useEventListener.js +0 -10
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useInstanceSlots.js +0 -14
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useRelation.js +0 -54
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popper.js +0 -85
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/close.js +0 -29
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/eyeclose.js +0 -42
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/eyeopen.js +0 -43
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/finish.js +0 -34
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/fullscreen.js +0 -30
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/loading-shadow.js +0 -77
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/minscreen.js +0 -30
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-after.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-before.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-after.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-before.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-center.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-left.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-right.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-bold.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-code-block.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-code-view.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-color.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-column.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-row.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-table.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-font-size.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-format-clear.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h1.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h2.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h3.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h4.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h5.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h6.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-heading.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-high-light.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-image.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-italic.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-line-height.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-link-unlink.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-link.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-list-ordered.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-list-unordered.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells-vertical.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-node-delete.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-paragraph.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-quote-text.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-redo.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-horizontal.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-vertical.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-strike-through.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-subscript.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-superscript.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-table.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-task-list.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-underline.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-undo.js +0 -24
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/sub-script.js +0 -29
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/warn.js +0 -26
- package/dist/node_modules/.pnpm/@opentiny_vue-input@3.21.0/node_modules/@opentiny/vue-input/lib/index.js +0 -196
- package/dist/node_modules/.pnpm/@opentiny_vue-input@3.21.0/node_modules/@opentiny/vue-input/lib/pc.js +0 -568
- package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.21.0/node_modules/@opentiny/vue-locale/lib/index.js +0 -1783
- package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.22.0/node_modules/@opentiny/vue-locale/lib/index.js +0 -1783
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/button/index.js +0 -13
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/button/vue.js +0 -34
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/chunk-G2ADBYYC.js +0 -12
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/browser.js +0 -36
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/clickoutside.js +0 -47
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/debounce.js +0 -7
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/dom.js +0 -45
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popper.js +0 -320
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popup-manager.js +0 -118
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/throttle.js +0 -23
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useEventListener.js +0 -9
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useInstanceSlots.js +0 -14
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useRelation.js +0 -54
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popper.js +0 -84
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popup.js +0 -73
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/event.js +0 -13
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/function.js +0 -5
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/index.js +0 -11
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/object.js +0 -84
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/string.js +0 -28
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/type.js +0 -28
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/dialog-box/index.js +0 -136
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/dialog-box/vue.js +0 -148
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/input/index.js +0 -228
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/input/vue.js +0 -263
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/index.js +0 -63
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/vue-storage-box.js +0 -16
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/vue.js +0 -23
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tooltip/index.js +0 -78
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tooltip/vue.js +0 -90
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/index.js +0 -77
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/vue.js +0 -90
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.21.0/node_modules/@opentiny/vue-tooltip/lib/index.js +0 -173
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.21.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +0 -248
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/index.js +0 -176
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +0 -248
- package/dist/node_modules/.pnpm/@vueuse_core@13.1.0_vue@3.5.13/node_modules/@vueuse/core/index.js +0 -190
- package/dist/node_modules/.pnpm/@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js +0 -53
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.js +0 -277
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.js +0 -46
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.js +0 -7
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js +0 -7
- package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.js +0 -187
- package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.js +0 -19
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_blocks.js +0 -67
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_re.js +0 -5
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/utils.js +0 -164
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/index.js +0 -8
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_destination.js +0 -44
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_label.js +0 -21
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_title.js +0 -37
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/index.js +0 -112
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_block.js +0 -63
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_core.js +0 -34
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_inline.js +0 -96
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/commonmark.js +0 -78
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/default.js +0 -40
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/zero.js +0 -59
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/renderer.js +0 -127
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/ruler.js +0 -95
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/blockquote.js +0 -59
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/code.js +0 -23
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/fence.js +0 -30
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/heading.js +0 -28
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/hr.js +0 -27
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/html_block.js +0 -37
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/lheading.js +0 -43
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/list.js +0 -110
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/paragraph.js +0 -25
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/reference.js +0 -95
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/state_block.js +0 -84
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/table.js +0 -99
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/block.js +0 -7
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/inline.js +0 -10
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/linkify.js +0 -57
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/normalize.js +0 -9
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/replacements.js +0 -31
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/smartquotes.js +0 -80
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/state_core.js +0 -8
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/text_join.js +0 -16
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/autolink.js +0 -46
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/backticks.js +0 -31
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/balance_pairs.js +0 -34
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/emphasis.js +0 -57
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/entity.js +0 -33
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/escape.js +0 -32
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/fragments_join.js +0 -10
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/html_inline.js +0 -32
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/image.js +0 -48
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/link.js +0 -40
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/linkify.js +0 -28
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/newline.js +0 -23
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/state_inline.js +0 -27
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/strikethrough.js +0 -54
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/text.js +0 -39
- package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/token.js +0 -31
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.js +0 -10
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.js +0 -61
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.js +0 -48
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.js +0 -7
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.js +0 -74
- package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.js +0 -139
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.js +0 -4
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.js +0 -14
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.js +0 -4
- package/dist/packages/components/src/action-group/ActionGroup.vue.js +0 -7
- package/dist/packages/components/src/action-group/ActionGroup.vue2.js +0 -97
- package/dist/packages/components/src/action-group/ActionGroupItem.vue.js +0 -14
- package/dist/packages/components/src/action-group/ActionGroupItem.vue2.js +0 -4
- package/dist/packages/components/src/action-group/index.js +0 -17
- package/dist/packages/components/src/assets/icons/accessory.svg.js +0 -4
- package/dist/packages/components/src/assets/icons/loading-speech.svg.js +0 -4
- package/dist/packages/components/src/assets/icons/loading.svg.js +0 -4
- package/dist/packages/components/src/assets/icons/send.svg.js +0 -4
- package/dist/packages/components/src/assets/icons/voice.svg.js +0 -4
- package/dist/packages/components/src/bubble/bubble-list.vue.js +0 -7
- package/dist/packages/components/src/bubble/bubble-list.vue2.js +0 -37
- package/dist/packages/components/src/bubble/bubble.vue.js +0 -7
- package/dist/packages/components/src/bubble/bubble.vue2.js +0 -118
- package/dist/packages/components/src/bubble/components/actions/copy.vue.js +0 -7
- package/dist/packages/components/src/bubble/components/actions/copy.vue2.js +0 -35
- package/dist/packages/components/src/bubble/components/actions/refresh.vue.js +0 -7
- package/dist/packages/components/src/bubble/components/actions/refresh.vue2.js +0 -16
- package/dist/packages/components/src/bubble/index.js +0 -18
- package/dist/packages/components/src/bubble/useScroll.js +0 -13
- package/dist/packages/components/src/container/index.js +0 -9
- package/dist/packages/components/src/container/index.vue.js +0 -7
- package/dist/packages/components/src/container/index.vue2.js +0 -55
- package/dist/packages/components/src/conversations/index.js +0 -9
- package/dist/packages/components/src/conversations/index.vue.js +0 -9
- package/dist/packages/components/src/feedback/components/SourceList.vue.js +0 -7
- package/dist/packages/components/src/feedback/components/SourceList.vue2.js +0 -52
- package/dist/packages/components/src/feedback/index.js +0 -9
- package/dist/packages/components/src/feedback/index.vue.js +0 -7
- package/dist/packages/components/src/feedback/index.vue2.js +0 -142
- package/dist/packages/components/src/history/components/item-tag.vue.js +0 -7
- package/dist/packages/components/src/history/components/item-tag.vue2.js +0 -21
- package/dist/packages/components/src/history/components/search-empty.vue.js +0 -7
- package/dist/packages/components/src/history/components/search-empty.vue2.js +0 -20
- package/dist/packages/components/src/history/composables/useEditItemTitle.js +0 -43
- package/dist/packages/components/src/history/index.js +0 -11
- package/dist/packages/components/src/history/index.vue.js +0 -7
- package/dist/packages/components/src/history/index.vue2.js +0 -130
- package/dist/packages/components/src/icon-button/index.js +0 -9
- package/dist/packages/components/src/icon-button/index.vue.js +0 -7
- package/dist/packages/components/src/icon-button/index.vue2.js +0 -40
- package/dist/packages/components/src/prompts/index.js +0 -18
- package/dist/packages/components/src/prompts/prompt.vue.js +0 -7
- package/dist/packages/components/src/prompts/prompt.vue2.js +0 -39
- package/dist/packages/components/src/prompts/prompts.vue.js +0 -7
- package/dist/packages/components/src/prompts/prompts.vue2.js +0 -36
- package/dist/packages/components/src/question/components/CommonQuestions.vue.js +0 -89
- package/dist/packages/components/src/question/components/CommonQuestions.vue2.js +0 -4
- package/dist/packages/components/src/question/components/HotQuestions.vue.js +0 -140
- package/dist/packages/components/src/question/components/HotQuestions.vue2.js +0 -4
- package/dist/packages/components/src/question/composables/useQuestions.js +0 -48
- package/dist/packages/components/src/question/index.js +0 -9
- package/dist/packages/components/src/question/index.vue.js +0 -113
- package/dist/packages/components/src/question/index.vue2.js +0 -4
- package/dist/packages/components/src/sender/components/ActionButtons.vue.js +0 -143
- package/dist/packages/components/src/sender/components/ActionButtons.vue2.js +0 -4
- package/dist/packages/components/src/sender/components/TemplateEditor.vue.js +0 -7
- package/dist/packages/components/src/sender/components/TemplateEditor.vue2.js +0 -121
- package/dist/packages/components/src/sender/composables/useInputHandler.js +0 -38
- package/dist/packages/components/src/sender/composables/useKeyboardHandler.js +0 -31
- package/dist/packages/components/src/sender/composables/useSpeechHandler.js +0 -67
- package/dist/packages/components/src/sender/index.js +0 -9
- package/dist/packages/components/src/sender/index.vue.js +0 -255
- package/dist/packages/components/src/sender/index.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/components/CategoryNav.vue.js +0 -38
- package/dist/packages/components/src/suggestion/components/CategoryNav.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue.js +0 -107
- package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue.js +0 -123
- package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/composables/useKeyboardNavigation.js +0 -45
- package/dist/packages/components/src/suggestion/composables/useTriggerDetection.js +0 -17
- package/dist/packages/components/src/suggestion/index.js +0 -9
- package/dist/packages/components/src/suggestion/index.vue.js +0 -179
- package/dist/packages/components/src/suggestion/index.vue2.js +0 -4
- package/dist/packages/components/src/suggestion/utils/dom.js +0 -18
- package/dist/packages/components/src/welcome/index.js +0 -9
- package/dist/packages/components/src/welcome/index.vue.js +0 -7
- package/dist/packages/components/src/welcome/index.vue2.js +0 -32
- package/dist/prompts/index.d.ts +0 -12
- package/dist/prompts/index.type.d.ts +0 -55
- package/dist/prompts/prompt.vue.d.ts +0 -3
- package/dist/prompts/prompts.vue.d.ts +0 -20
- package/dist/question/components/CommonQuestions.vue.d.ts +0 -32
- package/dist/question/components/HotQuestions.vue.d.ts +0 -89
- package/dist/question/composables/useQuestions.d.ts +0 -17
- package/dist/question/index.d.ts +0 -7
- package/dist/question/index.type.d.ts +0 -74
- package/dist/question/index.vue.d.ts +0 -46
- package/dist/sender/components/ActionButtons.vue.d.ts +0 -25
- package/dist/sender/components/TemplateEditor.vue.d.ts +0 -18
- package/dist/sender/composables/useInputHandler.d.ts +0 -17
- package/dist/sender/composables/useKeyboardHandler.d.ts +0 -18
- package/dist/sender/composables/useSpeechHandler.d.ts +0 -8
- package/dist/sender/index.d.ts +0 -7
- package/dist/sender/index.type.d.ts +0 -137
- package/dist/sender/index.vue.d.ts +0 -1012
- package/dist/suggestion/components/CategoryNav.vue.d.ts +0 -45
- package/dist/suggestion/components/SuggestionCapsule.vue.d.ts +0 -32
- package/dist/suggestion/components/SuggestionPanel.vue.d.ts +0 -84
- package/dist/suggestion/composables/useKeyboardNavigation.d.ts +0 -18
- package/dist/suggestion/composables/useSuggestionFilter.d.ts +0 -10
- package/dist/suggestion/composables/useTriggerDetection.d.ts +0 -11
- package/dist/suggestion/index.d.ts +0 -7
- package/dist/suggestion/index.type.d.ts +0 -94
- package/dist/suggestion/index.vue.d.ts +0 -343
- package/dist/suggestion/utils/dom.d.ts +0 -20
- package/dist/welcome/index.d.ts +0 -7
- package/dist/welcome/index.type.d.ts +0 -10
- package/dist/welcome/index.vue.d.ts +0 -18
- package/src/action-group/ActionGroup.vue +0 -232
- package/src/action-group/ActionGroupItem.vue +0 -9
- package/src/action-group/index.ts +0 -25
- package/src/action-group/index.type.ts +0 -20
- package/src/assets/icons/accessory.svg +0 -12
- package/src/assets/icons/loading-speech.svg +0 -16
- package/src/assets/icons/loading.svg +0 -17
- package/src/assets/icons/send.svg +0 -21
- package/src/assets/icons/voice.svg +0 -22
- package/src/bubble/bubble-list.vue +0 -42
- package/src/bubble/bubble.vue +0 -237
- package/src/bubble/components/actions/copy.vue +0 -54
- package/src/bubble/components/actions/index.ts +0 -2
- package/src/bubble/components/actions/refresh.vue +0 -31
- package/src/bubble/index.ts +0 -23
- package/src/bubble/index.type.ts +0 -63
- package/src/bubble/useScroll.ts +0 -14
- package/src/container/index.ts +0 -12
- package/src/container/index.type.ts +0 -17
- package/src/container/index.vue +0 -134
- package/src/conversations/index.ts +0 -12
- package/src/conversations/index.vue +0 -3
- package/src/feedback/components/SourceList.vue +0 -112
- package/src/feedback/components/index.ts +0 -1
- package/src/feedback/index.ts +0 -12
- package/src/feedback/index.type.ts +0 -27
- package/src/feedback/index.vue +0 -166
- package/src/history/components/index.ts +0 -2
- package/src/history/components/item-tag.vue +0 -49
- package/src/history/components/search-empty.vue +0 -38
- package/src/history/composables/index.ts +0 -1
- package/src/history/composables/useEditItemTitle.ts +0 -75
- package/src/history/index.ts +0 -12
- package/src/history/index.type.ts +0 -50
- package/src/history/index.vue +0 -292
- package/src/icon-button/index.ts +0 -12
- package/src/icon-button/index.type.ts +0 -8
- package/src/icon-button/index.vue +0 -52
- package/src/index.ts +0 -76
- package/src/prompts/index.ts +0 -25
- package/src/prompts/index.type.ts +0 -59
- package/src/prompts/prompt.vue +0 -101
- package/src/prompts/prompts.vue +0 -50
- package/src/question/components/CommonQuestions.vue +0 -146
- package/src/question/components/HotQuestions.vue +0 -148
- package/src/question/composables/useQuestions.ts +0 -106
- package/src/question/index.less +0 -447
- package/src/question/index.ts +0 -12
- package/src/question/index.type.ts +0 -86
- package/src/question/index.vue +0 -140
- package/src/question/vars.less +0 -135
- package/src/sender/components/ActionButtons.vue +0 -168
- package/src/sender/components/TemplateEditor.vue +0 -274
- package/src/sender/composables/useInputHandler.ts +0 -74
- package/src/sender/composables/useKeyboardHandler.ts +0 -101
- package/src/sender/composables/useSpeechHandler.ts +0 -122
- package/src/sender/index.less +0 -352
- package/src/sender/index.ts +0 -12
- package/src/sender/index.type.ts +0 -162
- package/src/sender/index.vue +0 -338
- package/src/sender/vars.less +0 -84
- package/src/suggestion/components/CategoryNav.vue +0 -38
- package/src/suggestion/components/SuggestionCapsule.vue +0 -183
- package/src/suggestion/components/SuggestionPanel.vue +0 -147
- package/src/suggestion/composables/useKeyboardNavigation.ts +0 -101
- package/src/suggestion/composables/useSuggestionFilter.ts +0 -34
- package/src/suggestion/composables/useTriggerDetection.ts +0 -46
- package/src/suggestion/index.less +0 -497
- package/src/suggestion/index.ts +0 -12
- package/src/suggestion/index.type.ts +0 -101
- package/src/suggestion/index.vue +0 -338
- package/src/suggestion/utils/dom.ts +0 -66
- package/src/suggestion/vars.less +0 -141
- package/src/vite-env.d.ts +0 -1
- package/src/welcome/index.ts +0 -12
- package/src/welcome/index.type.ts +0 -12
- package/src/welcome/index.vue +0 -69
- package/tsconfig.json +0 -37
- package/tsconfig.node.json +0 -10
- package/vite.config.ts +0 -53
package/src/suggestion/index.vue
DELETED
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { ref, computed, watch, onMounted, onBeforeUnmount } from 'vue'
|
|
3
|
-
import SuggestionCapsule from './components/SuggestionCapsule.vue'
|
|
4
|
-
import SuggestionPanel from './components/SuggestionPanel.vue'
|
|
5
|
-
import { useTriggerDetection } from './composables/useTriggerDetection'
|
|
6
|
-
import type {
|
|
7
|
-
SuggestionItem,
|
|
8
|
-
SuggestionProps,
|
|
9
|
-
SuggestionEmits,
|
|
10
|
-
TriggerHandler,
|
|
11
|
-
TriggerInfo,
|
|
12
|
-
TriggerContext,
|
|
13
|
-
Category,
|
|
14
|
-
} from './index.type'
|
|
15
|
-
import { IconHotQuestion, IconArrowUp, IconArrowDown } from '@opentiny/tiny-robot-svgs'
|
|
16
|
-
|
|
17
|
-
import './index.less'
|
|
18
|
-
|
|
19
|
-
const props = withDefaults(defineProps<SuggestionProps>(), {
|
|
20
|
-
open: undefined,
|
|
21
|
-
theme: 'light',
|
|
22
|
-
loading: false,
|
|
23
|
-
title: '快捷指令',
|
|
24
|
-
items: () => [],
|
|
25
|
-
categories: () => [],
|
|
26
|
-
triggerKeys: () => ['/'],
|
|
27
|
-
maxVisibleItems: 5,
|
|
28
|
-
defaultExpanded: false,
|
|
29
|
-
closeOnOutsideClick: true,
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
const emit = defineEmits<SuggestionEmits>()
|
|
33
|
-
|
|
34
|
-
// 状态管理
|
|
35
|
-
const internalOpen = ref(false)
|
|
36
|
-
const currentItems = ref<SuggestionItem[]>([])
|
|
37
|
-
const triggerInfo = ref<TriggerContext>({
|
|
38
|
-
text: '',
|
|
39
|
-
position: 0,
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
// 是否展开完整指令列表
|
|
43
|
-
const isExpanded = ref(props.defaultExpanded)
|
|
44
|
-
|
|
45
|
-
// 是否显示展开按钮
|
|
46
|
-
const showExpandButton = ref(false)
|
|
47
|
-
|
|
48
|
-
// 切换指令列表的展开状态
|
|
49
|
-
const toggleExpand = () => {
|
|
50
|
-
isExpanded.value = !isExpanded.value
|
|
51
|
-
emit('update:expanded', isExpanded.value)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// 处理显示展开按钮
|
|
55
|
-
const handleShowExpandButton = (value: boolean) => {
|
|
56
|
-
showExpandButton.value = value
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// 当前激活的分类
|
|
60
|
-
const activeCategory = ref<string>('')
|
|
61
|
-
|
|
62
|
-
// 当前选中的项目索引
|
|
63
|
-
const activeItemIndex = ref(-1)
|
|
64
|
-
|
|
65
|
-
// 元素引用
|
|
66
|
-
const rootRef = ref<HTMLElement | null>(null)
|
|
67
|
-
const panelRef = ref<InstanceType<typeof SuggestionPanel> | null>(null)
|
|
68
|
-
|
|
69
|
-
// 计算实际打开状态
|
|
70
|
-
const panelOpen = computed(() => (props.open !== undefined ? props.open : internalOpen.value))
|
|
71
|
-
|
|
72
|
-
// 计算当前激活分类的项目列表
|
|
73
|
-
const activeItems = computed(() => {
|
|
74
|
-
// 如果没有分类或没有选中分类,直接显示 items
|
|
75
|
-
if (props.categories.length === 0 || !activeCategory.value) {
|
|
76
|
-
return currentItems.value
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// 查找当前激活的分类
|
|
80
|
-
const category = props.categories.find((cat) => cat.id === activeCategory.value)
|
|
81
|
-
return category ? category.items : []
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
// 监听打开状态变化,重置选中项
|
|
85
|
-
watch(panelOpen, (isOpen) => {
|
|
86
|
-
if (isOpen) {
|
|
87
|
-
// 初始化选中项
|
|
88
|
-
activeItemIndex.value = activeItems.value.length > 0 ? 0 : -1
|
|
89
|
-
} else {
|
|
90
|
-
// 重置选中项
|
|
91
|
-
activeItemIndex.value = -1
|
|
92
|
-
}
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
// 监听项目列表变化,更新选中项
|
|
96
|
-
watch(activeItems, (items) => {
|
|
97
|
-
if (items.length > 0 && activeItemIndex.value === -1) {
|
|
98
|
-
activeItemIndex.value = 0
|
|
99
|
-
} else if (items.length === 0) {
|
|
100
|
-
activeItemIndex.value = -1
|
|
101
|
-
} else if (activeItemIndex.value >= items.length) {
|
|
102
|
-
activeItemIndex.value = items.length - 1
|
|
103
|
-
}
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
// 初始化激活的分类
|
|
107
|
-
watch(
|
|
108
|
-
() => props.categories,
|
|
109
|
-
(categories) => {
|
|
110
|
-
if (categories.length > 0 && !activeCategory.value) {
|
|
111
|
-
activeCategory.value = categories[0].id
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
{ immediate: true },
|
|
115
|
-
)
|
|
116
|
-
|
|
117
|
-
// 处理 items 数据
|
|
118
|
-
const processItems = () => {
|
|
119
|
-
currentItems.value = [...props.items]
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// 初始化hooks
|
|
123
|
-
const { detectTrigger } = useTriggerDetection(props)
|
|
124
|
-
|
|
125
|
-
// 处理胶囊式指令点击
|
|
126
|
-
const handleSuggestionClick = (item: SuggestionItem) => {
|
|
127
|
-
// 发出事件,便于父组件处理回填
|
|
128
|
-
emit('suggestion-select', item)
|
|
129
|
-
|
|
130
|
-
// 如果存在触发信息,可以利用它进行回填
|
|
131
|
-
// 否则直接将值传递给父组件
|
|
132
|
-
emit('select', item.value, {
|
|
133
|
-
text: '',
|
|
134
|
-
position: 0,
|
|
135
|
-
})
|
|
136
|
-
|
|
137
|
-
// 如果指令包含模板,在选择后填充模板
|
|
138
|
-
if (item.template) {
|
|
139
|
-
emit('fill-template', item.template)
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// 触发事件处理
|
|
144
|
-
const handleTrigger: TriggerHandler = (info: TriggerInfo) => {
|
|
145
|
-
if (info === false) {
|
|
146
|
-
closePanel()
|
|
147
|
-
} else {
|
|
148
|
-
// 保存触发信息,用于回填
|
|
149
|
-
if (typeof info === 'object' && info !== null) {
|
|
150
|
-
triggerInfo.value = {
|
|
151
|
-
text: info.text || '',
|
|
152
|
-
position: info.position || 0,
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
processItems()
|
|
156
|
-
internalOpen.value = true
|
|
157
|
-
emit('update:open', true)
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// 核心功能:处理输入事件,用于检测触发字符
|
|
162
|
-
const handleInputEvent = (event: Event, text: string) => {
|
|
163
|
-
// 检测触发条件
|
|
164
|
-
const newTriggerInfo = detectTrigger(event, text)
|
|
165
|
-
|
|
166
|
-
if (newTriggerInfo) {
|
|
167
|
-
// 设置触发信息
|
|
168
|
-
triggerInfo.value = newTriggerInfo
|
|
169
|
-
|
|
170
|
-
// 触发指令面板
|
|
171
|
-
handleTrigger(newTriggerInfo)
|
|
172
|
-
return true
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// 如果指令面板已打开,关闭面板
|
|
176
|
-
if (panelOpen.value && text === '') {
|
|
177
|
-
handleTrigger(false)
|
|
178
|
-
return true
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
return false
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// 键盘事件处理,委托给面板组件
|
|
185
|
-
const handleKeyDown = (e: KeyboardEvent) => {
|
|
186
|
-
if (panelOpen.value && panelRef.value) {
|
|
187
|
-
panelRef.value.handleKeyDown(e)
|
|
188
|
-
return
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// 关闭面板
|
|
193
|
-
const closePanel = () => {
|
|
194
|
-
if (props.open === undefined) {
|
|
195
|
-
internalOpen.value = false
|
|
196
|
-
}
|
|
197
|
-
emit('update:open', false)
|
|
198
|
-
emit('close')
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// 处理分类选择
|
|
202
|
-
const handleCategorySelect = (category: Category) => {
|
|
203
|
-
activeCategory.value = category.id
|
|
204
|
-
// 重置选中项索引
|
|
205
|
-
activeItemIndex.value = 0
|
|
206
|
-
|
|
207
|
-
emit('category-select', category)
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
// 处理指令选择
|
|
211
|
-
const handleSelect = (value: SuggestionItem, context: TriggerContext) => {
|
|
212
|
-
emit('select', value.text, context)
|
|
213
|
-
|
|
214
|
-
// 如果指令包含模板,在选择后填充模板
|
|
215
|
-
if (value.template) {
|
|
216
|
-
emit('fill-template', value.template)
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
closePanel()
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// 点击外部关闭
|
|
223
|
-
const handleClickOutside = (event: MouseEvent) => {
|
|
224
|
-
if (props.closeOnOutsideClick && panelOpen.value && rootRef.value && !rootRef.value.contains(event.target as Node)) {
|
|
225
|
-
closePanel()
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// 按钮切换面板是否可见
|
|
230
|
-
const handleOpenPanel = () => {
|
|
231
|
-
if (panelOpen.value) {
|
|
232
|
-
closePanel()
|
|
233
|
-
} else {
|
|
234
|
-
processItems()
|
|
235
|
-
internalOpen.value = true
|
|
236
|
-
emit('update:open', true)
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
// 监听点击外部事件
|
|
241
|
-
onMounted(() => {
|
|
242
|
-
if (props.closeOnOutsideClick) {
|
|
243
|
-
document.addEventListener('click', handleClickOutside)
|
|
244
|
-
}
|
|
245
|
-
})
|
|
246
|
-
|
|
247
|
-
onBeforeUnmount(() => {
|
|
248
|
-
if (props.closeOnOutsideClick) {
|
|
249
|
-
document.removeEventListener('click', handleClickOutside)
|
|
250
|
-
}
|
|
251
|
-
})
|
|
252
|
-
|
|
253
|
-
// 暴露给父组件的方法
|
|
254
|
-
defineExpose({
|
|
255
|
-
trigger: handleTrigger,
|
|
256
|
-
keyDown: handleKeyDown,
|
|
257
|
-
input: handleInputEvent,
|
|
258
|
-
toggleExpand,
|
|
259
|
-
})
|
|
260
|
-
</script>
|
|
261
|
-
|
|
262
|
-
<template>
|
|
263
|
-
<div ref="rootRef" :class="['tr-suggestion', className, { 'tr-suggestion--dark': theme === 'dark' }]">
|
|
264
|
-
<div class="tr-suggestion__header">
|
|
265
|
-
<div class="tr-suggestion__trigger" @click="handleOpenPanel">
|
|
266
|
-
<IconHotQuestion />
|
|
267
|
-
</div>
|
|
268
|
-
|
|
269
|
-
<!-- 胶囊式指令 -->
|
|
270
|
-
<SuggestionCapsule
|
|
271
|
-
:suggestions="items"
|
|
272
|
-
:isExpanded="isExpanded"
|
|
273
|
-
@suggestion-click="handleSuggestionClick"
|
|
274
|
-
@show-expand-button="handleShowExpandButton"
|
|
275
|
-
>
|
|
276
|
-
<template #suggestion-icon="slotProps">
|
|
277
|
-
<slot name="capsule-icon" :suggestion="slotProps.suggestion">
|
|
278
|
-
<IconEdit />
|
|
279
|
-
</slot>
|
|
280
|
-
</template>
|
|
281
|
-
</SuggestionCapsule>
|
|
282
|
-
|
|
283
|
-
<!-- 常规指令完整内容触发按钮 -->
|
|
284
|
-
<div v-if="showExpandButton" class="tr-suggestion__expand-button" @click="toggleExpand">
|
|
285
|
-
<IconArrowUp v-if="!isExpanded" />
|
|
286
|
-
<IconArrowDown v-else />
|
|
287
|
-
</div>
|
|
288
|
-
</div>
|
|
289
|
-
|
|
290
|
-
<!-- 自定义输入区域 -->
|
|
291
|
-
<slot name="trigger" :onTrigger="handleTrigger" :onKeyDown="handleKeyDown" :onInput="handleInputEvent">
|
|
292
|
-
<!-- 默认输入框实现 -->
|
|
293
|
-
</slot>
|
|
294
|
-
|
|
295
|
-
<!-- 指令面板(弹窗显示在输入框上方) -->
|
|
296
|
-
<SuggestionPanel
|
|
297
|
-
v-if="panelOpen"
|
|
298
|
-
ref="panelRef"
|
|
299
|
-
class="tr-suggestion-panel placement-top"
|
|
300
|
-
:items="currentItems"
|
|
301
|
-
:categories="categories"
|
|
302
|
-
:loading="loading"
|
|
303
|
-
:title="title"
|
|
304
|
-
:maxVisibleItems="maxVisibleItems"
|
|
305
|
-
:triggerContext="triggerInfo"
|
|
306
|
-
@close="closePanel"
|
|
307
|
-
@select="handleSelect"
|
|
308
|
-
@category-select="handleCategorySelect"
|
|
309
|
-
>
|
|
310
|
-
<!-- 转发所有插槽到面板组件 -->
|
|
311
|
-
<template #title-icon>
|
|
312
|
-
<slot name="title-icon">
|
|
313
|
-
<IconHotQuestion style="font-size: 36px" />
|
|
314
|
-
</slot>
|
|
315
|
-
</template>
|
|
316
|
-
|
|
317
|
-
<template #category-label="slotProps">
|
|
318
|
-
<slot name="category-label" :category="slotProps.category"></slot>
|
|
319
|
-
</template>
|
|
320
|
-
|
|
321
|
-
<template #item="slotProps">
|
|
322
|
-
<slot name="item" :item="slotProps.item" :active="slotProps.active"></slot>
|
|
323
|
-
</template>
|
|
324
|
-
|
|
325
|
-
<template #loading-indicator>
|
|
326
|
-
<slot name="loading-indicator">
|
|
327
|
-
<div class="tr-suggestion__loading-spinner"></div>
|
|
328
|
-
</slot>
|
|
329
|
-
</template>
|
|
330
|
-
|
|
331
|
-
<template #empty>
|
|
332
|
-
<slot name="empty">
|
|
333
|
-
<p>无匹配结果</p>
|
|
334
|
-
</slot>
|
|
335
|
-
</template>
|
|
336
|
-
</SuggestionPanel>
|
|
337
|
-
</div>
|
|
338
|
-
</template>
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 测量元素文本宽度
|
|
3
|
-
* @param text 要测量的文本
|
|
4
|
-
* @param className 应用的样式类名
|
|
5
|
-
* @returns 测量后的宽度
|
|
6
|
-
*/
|
|
7
|
-
export function measureTextWidth(text: string, className: string = ''): number {
|
|
8
|
-
// 创建临时元素
|
|
9
|
-
const temp = document.createElement('div')
|
|
10
|
-
if (className) {
|
|
11
|
-
temp.className = className
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// 设置样式确保准确测量
|
|
15
|
-
temp.style.visibility = 'hidden'
|
|
16
|
-
temp.style.position = 'absolute'
|
|
17
|
-
temp.style.whiteSpace = 'nowrap'
|
|
18
|
-
temp.textContent = text
|
|
19
|
-
|
|
20
|
-
// 添加到DOM并测量
|
|
21
|
-
document.body.appendChild(temp)
|
|
22
|
-
const width = temp.offsetWidth
|
|
23
|
-
document.body.removeChild(temp)
|
|
24
|
-
|
|
25
|
-
return width
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* 确保元素在容器中可见
|
|
30
|
-
* @param container 容器元素
|
|
31
|
-
* @param element 需要显示的元素
|
|
32
|
-
*/
|
|
33
|
-
export function ensureElementVisible(container: HTMLElement, element: HTMLElement): void {
|
|
34
|
-
const containerRect = container.getBoundingClientRect()
|
|
35
|
-
const elementRect = element.getBoundingClientRect()
|
|
36
|
-
|
|
37
|
-
if (elementRect.bottom > containerRect.bottom) {
|
|
38
|
-
// 元素底部超出容器
|
|
39
|
-
container.scrollTop += elementRect.bottom - containerRect.bottom
|
|
40
|
-
} else if (elementRect.top < containerRect.top) {
|
|
41
|
-
// 元素顶部超出容器
|
|
42
|
-
container.scrollTop -= containerRect.top - elementRect.top
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// 文本宽度缓存
|
|
47
|
-
const widthCache = new Map<string, number>()
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* 带缓存的文本宽度测量
|
|
51
|
-
* @param text 要测量的文本
|
|
52
|
-
* @param className 样式类名
|
|
53
|
-
* @returns 测量后的宽度
|
|
54
|
-
*/
|
|
55
|
-
export function getCachedTextWidth(text: string, className: string = ''): number {
|
|
56
|
-
const key = `${text}::${className}`
|
|
57
|
-
|
|
58
|
-
if (widthCache.has(key)) {
|
|
59
|
-
return widthCache.get(key)!
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const width = measureTextWidth(text, className)
|
|
63
|
-
widthCache.set(key, width)
|
|
64
|
-
|
|
65
|
-
return width
|
|
66
|
-
}
|
package/src/suggestion/vars.less
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/* ----------------- 颜色变量 ----------------- */
|
|
2
|
-
:root {
|
|
3
|
-
/* 主题基础颜色 */
|
|
4
|
-
--tr-suggestion-primary-color: #1890ff;
|
|
5
|
-
--tr-suggestion-background-color: #ffffff;
|
|
6
|
-
--tr-suggestion-modal-background-color: #ffffff;
|
|
7
|
-
--tr-suggestion-text-color: #333333;
|
|
8
|
-
--tr-suggestion-text-color-secondary: #666666;
|
|
9
|
-
--tr-suggestion-border-color: #e8e8e8;
|
|
10
|
-
--tr-suggestion-hover-color: #f5f5f5;
|
|
11
|
-
--tr-suggestion-tab-hover-bg: #f0f0f0;
|
|
12
|
-
--tr-suggestion-active-tab-color: var(--tr-suggestion-primary-color);
|
|
13
|
-
--tr-suggestion-active-tab-bg: #e6f7ff;
|
|
14
|
-
|
|
15
|
-
/* 弹窗相关颜色 */
|
|
16
|
-
--tr-suggestion-header-bg: #f9f9f9;
|
|
17
|
-
--tr-suggestion-title-color: #1d2129;
|
|
18
|
-
--tr-suggestion-close-icon-color: #86909c;
|
|
19
|
-
--tr-suggestion-tab-active-bg: #e8f3ff;
|
|
20
|
-
--tr-suggestion-tab-active-text: #1890ff;
|
|
21
|
-
--tr-suggestion-tab-text: #4e5969;
|
|
22
|
-
--tr-suggestion-tab-border: #f0f0f0;
|
|
23
|
-
--tr-suggestion-list-divider-color: #f0f0f0;
|
|
24
|
-
--tr-suggestion-modal-backdrop-color: rgba(0, 0, 0, 0.5);
|
|
25
|
-
|
|
26
|
-
/* 常见内容颜色 */
|
|
27
|
-
--tr-suggestion-common-bg: #fff;
|
|
28
|
-
--tr-suggestion-common-text: #191919;
|
|
29
|
-
--tr-suggestion-common-hover-bg: #ebebeb;
|
|
30
|
-
--tr-suggestion-common-shadow: rgba(0, 0, 0, 0.04);
|
|
31
|
-
|
|
32
|
-
/* 背景颜色 */
|
|
33
|
-
--tr-suggestion-container-bg: #f8f8f8;
|
|
34
|
-
--tr-suggestion-list-item-bg: #fff;
|
|
35
|
-
--tr-suggestion-list-hover-shadow: rgba(0, 0, 0, 0.08);
|
|
36
|
-
--tr-suggestion-category-bg: rgba(0, 0, 0, 0.04);
|
|
37
|
-
--tr-suggestion-category-hover-bg: rgba(0, 0, 0, 0.08);
|
|
38
|
-
--tr-suggestion-category-active-border: #191919;
|
|
39
|
-
--tr-suggestion-item-border-color: rgba(0, 0, 0, 0.04);
|
|
40
|
-
|
|
41
|
-
/* 滚动条颜色 */
|
|
42
|
-
--tr-suggestion-scrollbar-track-bg: rgba(16, 31, 28, 0.1);
|
|
43
|
-
--tr-suggestion-scrollbar-thumb-bg: rgba(144, 147, 153, 0.5);
|
|
44
|
-
--tr-suggestion-scrollbar-thumb-hover-bg: rgba(144, 147, 153, 0.3);
|
|
45
|
-
|
|
46
|
-
/* ----------------- 尺寸变量 ----------------- */
|
|
47
|
-
/* 圆角 */
|
|
48
|
-
--tr-suggestion-border-radius: 24px;
|
|
49
|
-
--tr-suggestion-category-border-radius: 8px;
|
|
50
|
-
--tr-suggestion-list-border-radius: 12px;
|
|
51
|
-
--tr-suggestion-common-border-radius: 16px;
|
|
52
|
-
--tr-suggestion-scrollbar-border-radius: 2em;
|
|
53
|
-
|
|
54
|
-
/* 间距和尺寸 */
|
|
55
|
-
--tr-suggestion-spacing: 16px;
|
|
56
|
-
--tr-suggestion-icon-size: 16px;
|
|
57
|
-
--tr-suggestion-container-height: 46px;
|
|
58
|
-
--tr-suggestion-item-height: 85px;
|
|
59
|
-
--tr-suggestion-trigger-size: 32px;
|
|
60
|
-
--tr-suggestion-common-item-height: 32px;
|
|
61
|
-
--tr-suggestion-category-height: 38px;
|
|
62
|
-
--tr-suggestion-scrollbar-width: 4px;
|
|
63
|
-
--tr-suggestion-modal-padding: 20px;
|
|
64
|
-
--tr-suggestion-modal-max-height: 553px;
|
|
65
|
-
--tr-suggestion-modal-max-width: 640px;
|
|
66
|
-
--tr-suggestion-content-max-height: calc(553px - 120px);
|
|
67
|
-
--tr-suggestion-z-index: 1000;
|
|
68
|
-
|
|
69
|
-
/* ----------------- 文字变量 ----------------- */
|
|
70
|
-
/* 字体 */
|
|
71
|
-
--tr-suggestion-font-size: 14px;
|
|
72
|
-
--tr-suggestion-title-font-size: 18px;
|
|
73
|
-
--tr-suggestion-title-font-weight: 600;
|
|
74
|
-
--tr-suggestion-item-font-weight: 500;
|
|
75
|
-
--tr-suggestion-line-height: 1.5;
|
|
76
|
-
--tr-suggestion-item-line-height: 22px;
|
|
77
|
-
--tr-suggestion-item-extra-font-size: 14px;
|
|
78
|
-
--tr-suggestion-item-extra-color: #191919;
|
|
79
|
-
|
|
80
|
-
/* ----------------- 特效变量 ----------------- */
|
|
81
|
-
/* 阴影 */
|
|
82
|
-
--tr-suggestion-panel-shadow:
|
|
83
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
|
84
|
-
--tr-suggestion-trigger-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
|
|
85
|
-
--tr-suggestion-common-item-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
|
|
86
|
-
--tr-suggestion-list-item-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
|
|
87
|
-
--tr-suggestion-wrap-trigger-shadow: 2px 0 9px rgba(0, 0, 0, 0.04);
|
|
88
|
-
|
|
89
|
-
/* 动画 */
|
|
90
|
-
--tr-suggestion-transition-duration: 0.3s;
|
|
91
|
-
--tr-suggestion-transition-timing: ease;
|
|
92
|
-
--tr-suggestion-hover-transition: all var(--tr-suggestion-transition-duration) var(--tr-suggestion-transition-timing);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/* ----------------- 暗色主题变量 ----------------- */
|
|
96
|
-
[data-theme='dark'],
|
|
97
|
-
.theme-dark {
|
|
98
|
-
/* 主题基础颜色 */
|
|
99
|
-
--tr-suggestion-primary-color: #177ddc;
|
|
100
|
-
--tr-suggestion-background-color: #1f1f1f;
|
|
101
|
-
--tr-suggestion-modal-background-color: #2a2a2a;
|
|
102
|
-
--tr-suggestion-text-color: #f0f0f0;
|
|
103
|
-
--tr-suggestion-text-color-secondary: #aaaaaa;
|
|
104
|
-
--tr-suggestion-border-color: #434343;
|
|
105
|
-
--tr-suggestion-hover-color: #303030;
|
|
106
|
-
--tr-suggestion-tab-hover-bg: #3a3a3a;
|
|
107
|
-
--tr-suggestion-active-tab-color: var(--tr-suggestion-primary-color);
|
|
108
|
-
--tr-suggestion-active-tab-bg: #113a5c;
|
|
109
|
-
|
|
110
|
-
/* 弹窗相关颜色 */
|
|
111
|
-
--tr-suggestion-header-bg: #2a2a2a;
|
|
112
|
-
--tr-suggestion-title-color: #c9d1d9;
|
|
113
|
-
--tr-suggestion-close-icon-color: #8b949e;
|
|
114
|
-
--tr-suggestion-tab-active-bg: #30363d;
|
|
115
|
-
--tr-suggestion-tab-active-text: #58a6ff;
|
|
116
|
-
--tr-suggestion-tab-text: #8b949e;
|
|
117
|
-
--tr-suggestion-tab-border: #30363d;
|
|
118
|
-
--tr-suggestion-list-divider-color: #30363d;
|
|
119
|
-
--tr-suggestion-modal-backdrop-color: rgba(0, 0, 0, 0.7);
|
|
120
|
-
|
|
121
|
-
/* 常见内容颜色 */
|
|
122
|
-
--tr-suggestion-common-bg: #2a2a2a;
|
|
123
|
-
--tr-suggestion-common-text: #e6e6e6;
|
|
124
|
-
--tr-suggestion-common-hover-bg: #3a3a3a;
|
|
125
|
-
--tr-suggestion-common-shadow: rgba(0, 0, 0, 0.2);
|
|
126
|
-
|
|
127
|
-
/* 背景颜色 */
|
|
128
|
-
--tr-suggestion-container-bg: #141414;
|
|
129
|
-
--tr-suggestion-list-item-bg: #2a2a2a;
|
|
130
|
-
--tr-suggestion-list-hover-shadow: rgba(0, 0, 0, 0.3);
|
|
131
|
-
--tr-suggestion-category-bg: rgba(255, 255, 255, 0.04);
|
|
132
|
-
--tr-suggestion-category-hover-bg: rgba(255, 255, 255, 0.08);
|
|
133
|
-
--tr-suggestion-category-active-border: #e6e6e6;
|
|
134
|
-
--tr-suggestion-item-border-color: rgba(255, 255, 255, 0.04);
|
|
135
|
-
|
|
136
|
-
/* 滚动条颜色 */
|
|
137
|
-
--tr-suggestion-scrollbar-track-bg: rgba(255, 255, 255, 0.05);
|
|
138
|
-
--tr-suggestion-scrollbar-thumb-bg: rgba(255, 255, 255, 0.2);
|
|
139
|
-
--tr-suggestion-scrollbar-thumb-hover-bg: rgba(255, 255, 255, 0.3);
|
|
140
|
-
--tr-suggestion-item-extra-color: #aaaaaa;
|
|
141
|
-
}
|
package/src/vite-env.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
package/src/welcome/index.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue'
|
|
2
|
-
import Welcome from './index.vue'
|
|
3
|
-
|
|
4
|
-
Welcome.name = 'TrWelcome'
|
|
5
|
-
|
|
6
|
-
const install = function <T>(app: App<T>) {
|
|
7
|
-
app.component(Welcome.name!, Welcome)
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
Welcome.install = install
|
|
11
|
-
|
|
12
|
-
export default Welcome as typeof Welcome & { install: typeof install }
|
package/src/welcome/index.vue
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { WelcomeProps, WelcomeSlots } from './index.type'
|
|
3
|
-
|
|
4
|
-
const props = withDefaults(defineProps<WelcomeProps>(), {
|
|
5
|
-
align: 'center',
|
|
6
|
-
})
|
|
7
|
-
|
|
8
|
-
defineSlots<WelcomeSlots>()
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<div class="tr-welcome">
|
|
13
|
-
<div class="tr-welcome__title-wrapper">
|
|
14
|
-
<span v-if="props.icon" class="tr-welcome__icon">
|
|
15
|
-
<component :is="props.icon"></component>
|
|
16
|
-
</span>
|
|
17
|
-
<h3 class="tr-welcome__title">{{ props.title }}</h3>
|
|
18
|
-
</div>
|
|
19
|
-
<span class="tr-welcome__description">{{ props.description }}</span>
|
|
20
|
-
<slot name="footer"></slot>
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<style lang="less" scoped>
|
|
25
|
-
.tr-welcome {
|
|
26
|
-
--title-font: 40px;
|
|
27
|
-
--title-color: rgb(25, 25, 25);
|
|
28
|
-
--title-font-size: 40px;
|
|
29
|
-
--title-line-height: 56px;
|
|
30
|
-
--title-font-weight: 600;
|
|
31
|
-
--description-color: rgb(25, 25, 25);
|
|
32
|
-
--description-font-size: 20px;
|
|
33
|
-
--description-line-height: 34px;
|
|
34
|
-
--description-font-weight: 500;
|
|
35
|
-
|
|
36
|
-
text-align: v-bind('props.align');
|
|
37
|
-
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-direction: column;
|
|
40
|
-
padding: 16px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.tr-welcome__title-wrapper {
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.tr-welcome__icon {
|
|
47
|
-
margin-right: 16px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.tr-welcome__title {
|
|
51
|
-
color: var(--title-color);
|
|
52
|
-
font-size: var(--title-font-size);
|
|
53
|
-
line-height: var(--title-line-height);
|
|
54
|
-
font-weight: var(--title-font-weight);
|
|
55
|
-
|
|
56
|
-
padding: 0;
|
|
57
|
-
margin: 0;
|
|
58
|
-
display: inline-block;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.tr-welcome__description {
|
|
62
|
-
color: var(--description-color);
|
|
63
|
-
font-size: var(--description-font-size);
|
|
64
|
-
line-height: var(--description-line-height);
|
|
65
|
-
font-weight: var(--description-font-weight);
|
|
66
|
-
|
|
67
|
-
margin-top: 32px;
|
|
68
|
-
}
|
|
69
|
-
</style>
|
package/tsconfig.json
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"lib": [
|
|
7
|
-
"ES2020",
|
|
8
|
-
"DOM",
|
|
9
|
-
"DOM.Iterable"
|
|
10
|
-
],
|
|
11
|
-
"skipLibCheck": true,
|
|
12
|
-
/* Bundler mode */
|
|
13
|
-
"moduleResolution": "bundler",
|
|
14
|
-
"allowImportingTsExtensions": true,
|
|
15
|
-
"resolveJsonModule": true,
|
|
16
|
-
"isolatedModules": true,
|
|
17
|
-
"noEmit": true,
|
|
18
|
-
"jsx": "preserve",
|
|
19
|
-
"jsxImportSource": "vue",
|
|
20
|
-
|
|
21
|
-
/* Linting */
|
|
22
|
-
"strict": true,
|
|
23
|
-
"noUnusedLocals": true,
|
|
24
|
-
"noUnusedParameters": true,
|
|
25
|
-
"noFallthroughCasesInSwitch": true
|
|
26
|
-
},
|
|
27
|
-
"include": [
|
|
28
|
-
"src/**/*.ts",
|
|
29
|
-
"src/**/*.tsx",
|
|
30
|
-
"src/**/*.vue"
|
|
31
|
-
],
|
|
32
|
-
"references": [
|
|
33
|
-
{
|
|
34
|
-
"path": "./tsconfig.node.json"
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
}
|