@opentiny/tiny-robot 0.1.0-alpha.0 → 0.2.0-alpha.0
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/{bubble-item → bubble}/components/actions/copy.vue.d.ts +3 -3
- package/dist/{bubble-item → bubble}/components/actions/refresh.vue.d.ts +1 -1
- package/dist/bubble/index.d.ts +12 -0
- package/dist/bubble/index.type.d.ts +53 -0
- package/dist/bubble/useScroll.d.ts +4 -0
- package/dist/container/index.d.ts +7 -0
- package/dist/container/index.type.d.ts +16 -0
- package/dist/container/index.vue.d.ts +26 -0
- package/dist/index.d.ts +10 -5
- package/dist/index.js +31 -20
- package/dist/node_modules/.pnpm/@opentiny_utils@1.0.0/node_modules/@opentiny/utils/dist/opentiny-utils.es.js +832 -0
- package/dist/node_modules/.pnpm/@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js +959 -1496
- package/dist/node_modules/.pnpm/{@opentiny_vue-button@3.22.0 → @opentiny_vue-button@3.21.0}/node_modules/@opentiny/vue-button/lib/index.js +21 -21
- package/dist/node_modules/.pnpm/{@opentiny_vue-button@3.22.0 → @opentiny_vue-button@3.21.0}/node_modules/@opentiny/vue-button/lib/pc.js +3 -3
- package/dist/node_modules/.pnpm/@opentiny_vue-common@3.21.0/node_modules/@opentiny/vue-common/lib/index.js +727 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js +144 -675
- package/dist/node_modules/.pnpm/{@opentiny_vue-dialog-box@3.22.0 → @opentiny_vue-dialog-box@3.21.0}/node_modules/@opentiny/vue-dialog-box/lib/index.js +9 -9
- package/dist/node_modules/.pnpm/{@opentiny_vue-dialog-box@3.22.0 → @opentiny_vue-dialog-box@3.21.0}/node_modules/@opentiny/vue-dialog-box/lib/pc.js +5 -5
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/close.js +29 -0
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/eyeclose.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/eyeopen.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/finish.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/fullscreen.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/loading-shadow.js +21 -22
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/minscreen.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-after.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-before.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-after.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-before.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-align-center.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-align-left.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-align-right.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-bold.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-code-block.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-code-view.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-color.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-delete-column.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-delete-row.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-delete-table.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-font-size.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-format-clear.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-h1.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-h2.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-h3.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-h4.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-h5.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-h6.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-heading.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-high-light.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-image.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-italic.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-line-height.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-link-unlink.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-link.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-list-ordered.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-list-unordered.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells-vertical.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-node-delete.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-paragraph.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-quote-text.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-redo.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-horizontal.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-vertical.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-strike-through.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-subscript.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-superscript.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-table.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-task-list.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-underline.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-undo.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/sub-script.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/warn.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-input@3.22.0 → @opentiny_vue-input@3.21.0}/node_modules/@opentiny/vue-input/lib/index.js +3 -3
- package/dist/node_modules/.pnpm/{@opentiny_vue-input@3.22.0 → @opentiny_vue-input@3.21.0}/node_modules/@opentiny/vue-input/lib/pc.js +36 -36
- package/dist/node_modules/.pnpm/{@opentiny_vue-locale@3.22.0 → @opentiny_vue-locale@3.21.0}/node_modules/@opentiny/vue-locale/lib/index.js +63 -63
- package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/button/index.js +1 -1
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/browser.js +36 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/clickoutside.js +47 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/debounce.js +7 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/dom.js +45 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popper.js +320 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popup-manager.js +118 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/throttle.js +23 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useEventListener.js +9 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useInstanceSlots.js +14 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useRelation.js +54 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popper.js +84 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popup.js +73 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/event.js +13 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/function.js +5 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/index.js +11 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/object.js +84 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/string.js +28 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/type.js +28 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/dialog-box/index.js +136 -0
- package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/dialog-box/vue.js +33 -34
- package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/input/index.js +22 -22
- package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/input/vue.js +9 -9
- package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/tall-storage/index.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/tall-storage/vue.js +5 -5
- package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/tooltip/index.js +41 -40
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tooltip/vue.js +90 -0
- package/dist/node_modules/.pnpm/{@opentiny_vue-tooltip@3.22.0 → @opentiny_vue-tooltip@3.21.0}/node_modules/@opentiny/vue-tooltip/lib/index.js +3 -6
- package/dist/node_modules/.pnpm/{@opentiny_vue-tooltip@3.22.0 → @opentiny_vue-tooltip@3.21.0}/node_modules/@opentiny/vue-tooltip/lib/pc.js +2 -2
- package/dist/packages/components/src/{bubble-list → bubble}/bubble-list.vue.js +2 -2
- package/dist/packages/components/src/bubble/bubble-list.vue2.js +37 -0
- package/dist/packages/components/src/bubble/bubble.vue.js +7 -0
- package/dist/packages/components/src/bubble/bubble.vue2.js +118 -0
- package/dist/packages/components/src/bubble/components/actions/copy.vue.js +7 -0
- package/dist/packages/components/src/bubble/components/actions/copy.vue2.js +35 -0
- package/dist/packages/components/src/bubble/components/actions/refresh.vue.js +7 -0
- package/dist/packages/components/src/bubble/components/actions/refresh.vue2.js +16 -0
- package/dist/packages/components/src/bubble/index.js +18 -0
- package/dist/packages/components/src/bubble/useScroll.js +13 -0
- package/dist/packages/components/src/container/index.js +9 -0
- package/dist/packages/components/src/container/index.vue.js +7 -0
- package/dist/packages/components/src/container/index.vue2.js +55 -0
- package/dist/packages/components/src/conversations/index.js +1 -1
- package/dist/packages/components/src/prompts/index.js +18 -0
- package/dist/packages/components/src/prompts/prompt.vue.js +7 -0
- package/dist/packages/components/src/prompts/prompt.vue2.js +37 -0
- package/dist/packages/components/src/prompts/prompts.vue.js +7 -0
- package/dist/packages/components/src/prompts/prompts.vue2.js +36 -0
- package/dist/packages/components/src/question/components/CommonQuestions.vue.js +89 -0
- package/dist/packages/components/src/question/components/CommonQuestions.vue2.js +4 -0
- package/dist/packages/components/src/question/components/HotQuestions.vue.js +140 -0
- package/dist/packages/components/src/question/components/HotQuestions.vue2.js +4 -0
- package/dist/packages/components/src/question/composables/useQuestions.js +48 -0
- package/dist/packages/components/src/question/index.js +9 -0
- package/dist/packages/components/src/question/index.vue.js +113 -0
- package/dist/packages/components/src/question/index.vue2.js +4 -0
- package/dist/packages/components/src/sender/components/ActionButtons.vue.js +105 -123
- package/dist/packages/components/src/sender/composables/useInputHandler.js +26 -22
- package/dist/packages/components/src/sender/composables/useKeyboardHandler.js +11 -11
- package/dist/packages/components/src/sender/composables/useSpeechHandler.js +9 -9
- package/dist/packages/components/src/sender/index.vue.js +67 -66
- package/dist/packages/components/src/welcome/index.vue.js +5 -7
- package/dist/packages/components/src/welcome/index.vue2.js +32 -0
- package/dist/packages/svgs/dist/tiny-robot-svgs.js +223 -0
- package/dist/prompts/index.d.ts +12 -0
- package/dist/prompts/index.type.d.ts +55 -0
- package/dist/prompts/prompt.vue.d.ts +3 -0
- package/dist/prompts/prompts.vue.d.ts +20 -0
- package/dist/question/components/CommonQuestions.vue.d.ts +32 -0
- package/dist/question/components/HotQuestions.vue.d.ts +89 -0
- package/dist/question/composables/useQuestions.d.ts +17 -0
- package/dist/question/index.d.ts +7 -0
- package/dist/question/index.type.d.ts +74 -0
- package/dist/question/index.vue.d.ts +46 -0
- package/dist/sender/components/ActionButtons.vue.d.ts +6 -4
- package/dist/sender/composables/useSpeechHandler.d.ts +0 -6
- package/dist/sender/index.type.d.ts +1 -1
- package/dist/sender/index.vue.d.ts +3 -4
- package/dist/style.css +1 -1
- package/dist/welcome/index.type.d.ts +10 -0
- package/dist/welcome/index.vue.d.ts +17 -1
- package/package.json +6 -5
- package/src/bubble/bubble-list.vue +42 -0
- package/src/bubble/bubble.vue +247 -0
- package/src/bubble/components/actions/copy.vue +54 -0
- package/src/bubble/components/actions/refresh.vue +31 -0
- package/src/bubble/index.ts +23 -0
- package/src/bubble/index.type.ts +63 -0
- package/src/bubble/useScroll.ts +14 -0
- package/src/container/index.ts +12 -0
- package/src/container/index.type.ts +17 -0
- package/src/container/index.vue +135 -0
- package/src/conversations/index.ts +1 -1
- package/src/index.ts +26 -12
- package/src/prompts/index.ts +25 -0
- package/src/prompts/index.type.ts +59 -0
- package/src/prompts/prompt.vue +115 -0
- package/src/prompts/prompts.vue +50 -0
- package/src/question/components/CommonQuestions.vue +146 -0
- package/src/question/components/HotQuestions.vue +148 -0
- package/src/question/composables/useQuestions.ts +106 -0
- package/src/question/index.less +448 -0
- package/src/question/index.ts +12 -0
- package/src/question/index.type.ts +86 -0
- package/src/question/index.vue +140 -0
- package/src/question/vars.less +135 -0
- package/src/sender/components/ActionButtons.vue +42 -39
- package/src/sender/composables/useInputHandler.ts +15 -10
- package/src/sender/composables/useKeyboardHandler.ts +6 -4
- package/src/sender/composables/useSpeechHandler.ts +5 -11
- package/src/sender/index.less +3 -5
- package/src/sender/index.type.ts +1 -1
- package/src/sender/index.vue +3 -2
- package/src/welcome/index.type.ts +12 -0
- package/src/welcome/index.vue +68 -2
- package/.vscode/extensions.json +0 -3
- package/dist/bubble-item/components/icons/ai.vue.d.ts +0 -2
- package/dist/bubble-item/components/icons/index.d.ts +0 -2
- package/dist/bubble-item/components/icons/user.vue.d.ts +0 -2
- package/dist/bubble-item/index.d.ts +0 -7
- package/dist/bubble-list/index.d.ts +0 -8
- package/dist/bubble-list/index.type.d.ts +0 -55
- package/dist/node_modules/.pnpm/@opentiny_vue-directive@3.22.0/node_modules/@opentiny/vue-directive/index.js +0 -57
- 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-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popup.js +0 -69
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/dialog-box/index.js +0 -135
- 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/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTrim.js +0 -8
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +0 -15
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/debounce.js +0 -54
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js +0 -9
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/now.js +0 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toNumber.js +0 -22
- package/dist/packages/components/src/bubble-item/bubble-item.vue.js +0 -7
- package/dist/packages/components/src/bubble-item/bubble-item.vue2.js +0 -111
- package/dist/packages/components/src/bubble-item/components/actions/copy.vue.js +0 -46
- package/dist/packages/components/src/bubble-item/components/actions/copy.vue2.js +0 -4
- package/dist/packages/components/src/bubble-item/components/actions/refresh.vue.js +0 -12
- package/dist/packages/components/src/bubble-item/components/icons/ai.vue.js +0 -45
- package/dist/packages/components/src/bubble-item/components/icons/user.vue.js +0 -63
- package/dist/packages/components/src/bubble-item/index.js +0 -9
- package/dist/packages/components/src/bubble-list/bubble-list.vue2.js +0 -52
- package/dist/packages/components/src/bubble-list/index.js +0 -9
- package/src/bubble-item/bubble-item.vue +0 -264
- package/src/bubble-item/components/actions/copy.vue +0 -47
- package/src/bubble-item/components/actions/refresh.vue +0 -27
- package/src/bubble-item/components/icons/ai.vue +0 -30
- package/src/bubble-item/components/icons/index.ts +0 -2
- package/src/bubble-item/components/icons/user.vue +0 -78
- package/src/bubble-item/index.ts +0 -12
- package/src/bubble-list/bubble-list.vue +0 -53
- package/src/bubble-list/index.ts +0 -14
- package/src/bubble-list/index.type.ts +0 -65
- package/src/sender/global.d.ts +0 -44
- /package/dist/{bubble-list → bubble}/bubble-list.vue.d.ts +0 -0
- /package/dist/{bubble-item → bubble}/components/actions/index.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/button/vue.js +0 -0
- /package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/chunk-G2ADBYYC.js +0 -0
- /package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/tall-storage/vue-storage-box.js +0 -0
- /package/src/{bubble-item → bubble}/components/actions/index.ts +0 -0
package/src/sender/index.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, ref, watch } from 'vue'
|
|
3
|
-
import
|
|
3
|
+
import TinyInput from '@opentiny/vue-input'
|
|
4
4
|
import type { SenderProps, SenderEmits, InputHandler, KeyboardHandler } from './index.type'
|
|
5
5
|
import { useInputHandler } from './composables/useInputHandler'
|
|
6
6
|
import { useKeyboardHandler } from './composables/useKeyboardHandler'
|
|
@@ -15,7 +15,6 @@ const props = withDefaults(defineProps<SenderProps>(), {
|
|
|
15
15
|
allowFiles: false,
|
|
16
16
|
clearable: false,
|
|
17
17
|
disabled: false,
|
|
18
|
-
debounceSubmit: 300,
|
|
19
18
|
loading: false,
|
|
20
19
|
modelValue: '',
|
|
21
20
|
mode: 'single',
|
|
@@ -224,6 +223,7 @@ defineExpose({
|
|
|
224
223
|
@clear="clearInput"
|
|
225
224
|
@toggle-speech="toggleSpeech"
|
|
226
225
|
@submit="triggerSubmit"
|
|
226
|
+
@cancel="$emit('cancel')"
|
|
227
227
|
/>
|
|
228
228
|
</div>
|
|
229
229
|
</div>
|
|
@@ -259,6 +259,7 @@ defineExpose({
|
|
|
259
259
|
@clear="clearInput"
|
|
260
260
|
@toggle-speech="toggleSpeech"
|
|
261
261
|
@submit="triggerSubmit"
|
|
262
|
+
@cancel="$emit('cancel')"
|
|
262
263
|
/>
|
|
263
264
|
</div>
|
|
264
265
|
</div>
|
package/src/welcome/index.vue
CHANGED
|
@@ -1,3 +1,69 @@
|
|
|
1
|
-
<script setup lang="ts"
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { WelcomeProps, WelcomeSlots } from './index.type'
|
|
2
3
|
|
|
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/.vscode/extensions.json
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, SVGSVGElement>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, SVGSVGElement>;
|
|
2
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
2
|
-
import { default as BubbleList } from './bubble-list.vue';
|
|
3
|
-
export type BA = typeof BubbleList;
|
|
4
|
-
declare const install: (app: App) => void;
|
|
5
|
-
declare const _default: typeof BubbleList & {
|
|
6
|
-
install: typeof install;
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Options as MarkdownItOptions } from 'markdown-it';
|
|
2
|
-
import { Component, CSSProperties, VNode } from 'vue';
|
|
3
|
-
export type BubbleRole = 'ai' | 'user';
|
|
4
|
-
export interface BubbleRoleConfig {
|
|
5
|
-
avatar?: VNode;
|
|
6
|
-
align: 'left' | 'right';
|
|
7
|
-
}
|
|
8
|
-
export type BubbleStatus = 'loading' | 'generating' | 'aborted' | 'complete' | 'error';
|
|
9
|
-
export interface BubbleActionOptions {
|
|
10
|
-
name: string;
|
|
11
|
-
vnode: VNode | Component;
|
|
12
|
-
show?: boolean | ((props: BubbleItemProps) => boolean);
|
|
13
|
-
}
|
|
14
|
-
export type BubbleAction = 'copy' | 'regenerate' | 'like' | 'dislike' | 'continue' | 'edit' | BubbleActionOptions;
|
|
15
|
-
export interface BubbleItemProps {
|
|
16
|
-
/**
|
|
17
|
-
* 角色,`ai` 或 `user`
|
|
18
|
-
*/
|
|
19
|
-
role: BubbleRole;
|
|
20
|
-
/**
|
|
21
|
-
* 内容
|
|
22
|
-
*/
|
|
23
|
-
content?: string;
|
|
24
|
-
/**
|
|
25
|
-
* 内容类型
|
|
26
|
-
*/
|
|
27
|
-
type?: 'text' | 'markdown';
|
|
28
|
-
/**
|
|
29
|
-
* 气泡状态
|
|
30
|
-
*/
|
|
31
|
-
status?: BubbleStatus;
|
|
32
|
-
/**
|
|
33
|
-
* 角色配置项
|
|
34
|
-
*/
|
|
35
|
-
roleConfig?: BubbleRoleConfig;
|
|
36
|
-
/**
|
|
37
|
-
* type 为 'markdown' 时,markdown 的配置项
|
|
38
|
-
*/
|
|
39
|
-
mdConfig?: MarkdownItOptions;
|
|
40
|
-
showActions?: boolean;
|
|
41
|
-
actions?: BubbleAction[];
|
|
42
|
-
maxWidth?: CSSProperties['maxWidth'];
|
|
43
|
-
}
|
|
44
|
-
export interface BubbleActionConfig {
|
|
45
|
-
show?: boolean;
|
|
46
|
-
actions?: BubbleAction[];
|
|
47
|
-
}
|
|
48
|
-
export interface BubbleListProps {
|
|
49
|
-
items: BubbleItemProps[];
|
|
50
|
-
roleConfigs?: Partial<Record<BubbleRole, BubbleRoleConfig>>;
|
|
51
|
-
mdConfig?: MarkdownItOptions;
|
|
52
|
-
actionConfigs?: Partial<Record<BubbleRole, BubbleActionConfig>>;
|
|
53
|
-
autoScroll?: boolean;
|
|
54
|
-
maxWidth?: CSSProperties['maxWidth'];
|
|
55
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import "../../../../@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js";
|
|
2
|
-
import { isServer as h, on as g } from "../../../../@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js";
|
|
3
|
-
import * as _ from "vue";
|
|
4
|
-
_.ref("");
|
|
5
|
-
var d = [], r = "@@clickoutsideContext", c, E = 0;
|
|
6
|
-
h || (g(document, "mousedown", function(a) {
|
|
7
|
-
c = a, d.filter(function(e) {
|
|
8
|
-
return e[r].mousedownTrigger;
|
|
9
|
-
}).forEach(function(e) {
|
|
10
|
-
return e[r].documentHandler(a, c);
|
|
11
|
-
});
|
|
12
|
-
}), g(document, "mouseup", function(a) {
|
|
13
|
-
d.filter(function(e) {
|
|
14
|
-
return !e[r].mousedownTrigger;
|
|
15
|
-
}).forEach(function(e) {
|
|
16
|
-
var o;
|
|
17
|
-
return e[r].documentHandler(a, (o = e[r]) != null && o.mouseupTrigger ? a : c);
|
|
18
|
-
}), c = null;
|
|
19
|
-
}));
|
|
20
|
-
var v = function(e, o, n) {
|
|
21
|
-
return function(t, i) {
|
|
22
|
-
var m, s;
|
|
23
|
-
t === void 0 && (t = {}), i === void 0 && (i = {});
|
|
24
|
-
var u = n.context.popperElm || n.context.state && n.context.state.popperElm;
|
|
25
|
-
!((m = t) != null && m.target) || !((s = i) != null && s.target) || e.contains(t.target) || e.contains(i.target) || e === t.target || u && (u.contains(t.target) || u.contains(i.target)) || (o.expression && e[r].methodName && n.context[e[r].methodName] ? n.context[e[r].methodName]() : e[r].bindingFn && e[r].bindingFn());
|
|
26
|
-
};
|
|
27
|
-
}, N = {
|
|
28
|
-
bind: function(e, o, n) {
|
|
29
|
-
d.push(e);
|
|
30
|
-
var t = E++, i = o.modifiers, m = o.expression, s = o.value, u = i || {}, f = u.mousedown, p = f === void 0 ? !1 : f, l = u.mouseup, x = l === void 0 ? !1 : l;
|
|
31
|
-
e[r] = {
|
|
32
|
-
id: t,
|
|
33
|
-
documentHandler: v(e, o, n),
|
|
34
|
-
methodName: m,
|
|
35
|
-
bindingFn: s,
|
|
36
|
-
mousedownTrigger: p,
|
|
37
|
-
mouseupTrigger: x
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
update: function(e, o, n) {
|
|
41
|
-
var t = o.modifiers, i = o.expression, m = o.value, s = t || {}, u = s.mousedown, f = u === void 0 ? !1 : u, p = s.mouseup, l = p === void 0 ? !1 : p;
|
|
42
|
-
e[r].documentHandler = v(e, o, n), e[r].methodName = i, e[r].bindingFn = m, e[r].mousedownTrigger = f, e[r].mouseupTrigger = l;
|
|
43
|
-
},
|
|
44
|
-
unbind: function(e) {
|
|
45
|
-
if (e.nodeType === Node.ELEMENT_NODE) {
|
|
46
|
-
for (var o = d.length, n = 0; n < o; n++)
|
|
47
|
-
if (d[n][r].id === e[r].id) {
|
|
48
|
-
d.splice(n, 1);
|
|
49
|
-
break;
|
|
50
|
-
}
|
|
51
|
-
d.length === 0 && c && (c = null), delete e[r];
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
export {
|
|
56
|
-
N as Clickoutside
|
|
57
|
-
};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { off as A, PopupManager as B, isDisplayNone as x, isServer as $, PopperJS as N, on as I } from "../../../../../../@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js";
|
|
2
|
-
const v = (n) => n.stopPropagation(), P = ({ state: n, props: a, vm: t, slots: l }) => {
|
|
3
|
-
let s = n.referenceElm || a.reference || t.$refs.reference && t.$refs.reference.$el || t.$refs.reference;
|
|
4
|
-
return !s && l.reference && l.reference()[0] && (n.referenceElm = l.reference()[0].elm || l.reference()[0].el, s = n.referenceElm), s;
|
|
5
|
-
}, O = (n) => {
|
|
6
|
-
if (!n || !n.nodeType) return;
|
|
7
|
-
let a = (s) => parseInt(window.getComputedStyle(s).zIndex, 10) || 0, t = a(n), l;
|
|
8
|
-
do {
|
|
9
|
-
if (n = n.parentNode, n && n instanceof ShadowRoot && n.host && (n = n.host), n)
|
|
10
|
-
l = a(n);
|
|
11
|
-
else
|
|
12
|
-
break;
|
|
13
|
-
t = l > t ? l : t;
|
|
14
|
-
} while (n !== document.body);
|
|
15
|
-
return t + 1 + "";
|
|
16
|
-
}, R = (n) => {
|
|
17
|
-
const {
|
|
18
|
-
parent: a,
|
|
19
|
-
emit: t,
|
|
20
|
-
nextTick: l,
|
|
21
|
-
onBeforeUnmount: s,
|
|
22
|
-
onDeactivated: J,
|
|
23
|
-
props: p,
|
|
24
|
-
watch: y,
|
|
25
|
-
reactive: h,
|
|
26
|
-
vm: m,
|
|
27
|
-
slots: E,
|
|
28
|
-
toRefs: T,
|
|
29
|
-
popperVmRef: _
|
|
30
|
-
} = n, e = h({
|
|
31
|
-
popperJS: null,
|
|
32
|
-
appended: !1,
|
|
33
|
-
// arrow 是否添加
|
|
34
|
-
popperElm: null,
|
|
35
|
-
showPopper: p.manual ? !!p.modelValue : !1,
|
|
36
|
-
referenceElm: null,
|
|
37
|
-
currentPlacement: ""
|
|
38
|
-
}), b = (r) => {
|
|
39
|
-
if (e.appended)
|
|
40
|
-
return;
|
|
41
|
-
e.appended = !0;
|
|
42
|
-
const o = document.createElement("div");
|
|
43
|
-
o.setAttribute("x-arrow", ""), o.className = "popper__arrow", r.appendChild(o);
|
|
44
|
-
}, w = (r) => {
|
|
45
|
-
const { followReferenceHide: o = !0 } = (p == null ? void 0 : p.popperOptions) || {}, { _popper: d, _reference: c } = r;
|
|
46
|
-
o && x(c) && (d.style.display = "none");
|
|
47
|
-
}, S = (r) => p.zIndex === "relative" ? O(r) : B.nextZIndex(), g = (r) => {
|
|
48
|
-
if ($ || (e.currentPlacement = e.currentPlacement || p.placement, !/^(top|bottom|left|right)(-start|-end)?$/g.test(e.currentPlacement)))
|
|
49
|
-
return;
|
|
50
|
-
const o = p.popperOptions || { gpuAcceleration: !1 };
|
|
51
|
-
e.popperElm = e.popperElm || p.popper || m.$refs.popper || _.popper || r;
|
|
52
|
-
const d = e.popperElm;
|
|
53
|
-
let c = P({ state: e, props: p, vm: m, slots: E });
|
|
54
|
-
!d || !c || c.nodeType !== Node.ELEMENT_NODE || (p.visibleArrow && b(d), p.appendToBody || p.popperAppendToBody ? document.body.appendChild(e.popperElm) : (a && a.$el && a.$el.appendChild(e.popperElm), o.forceAbsolute = !0), o.placement = e.currentPlacement, o.offset = p.offset || 0, o.arrowOffset = p.arrowOffset || 0, o.adjustArrow = p.adjustArrow || !1, o.appendToBody = p.appendToBody || p.popperAppendToBody, e.popperJS = new N(c, d, o), t("created", e), typeof o.onUpdate == "function" && e.popperJS.onUpdate(o.onUpdate), e.popperJS._popper.style.zIndex = S(e.popperJS._reference), w(e.popperJS), I(e.popperElm, "click", v));
|
|
55
|
-
}, u = (r) => {
|
|
56
|
-
r && r !== !0 && (e.popperElm = r);
|
|
57
|
-
const o = e.popperJS;
|
|
58
|
-
o ? (o._reference = P({ state: e, props: p, vm: m, slots: E }), o.update(), o._popper && r !== !0 && (o._popper.style.zIndex = S(o._reference), w(e.popperJS))) : g(r && r !== !0 ? r : void 0);
|
|
59
|
-
}, f = (r) => {
|
|
60
|
-
!e.popperJS || e.showPopper && !r || (e.popperJS.destroy(), e.popperJS = null);
|
|
61
|
-
}, i = (r) => {
|
|
62
|
-
r && e.popperElm && e.popperElm.parentNode === document.body && (A(e.popperElm, "click", v), e.popperElm.remove());
|
|
63
|
-
};
|
|
64
|
-
return y(
|
|
65
|
-
() => e.showPopper,
|
|
66
|
-
(r) => {
|
|
67
|
-
p.disabled || (r && l(u), p.trigger === "manual" && t("update:modelValue", r));
|
|
68
|
-
}
|
|
69
|
-
), y(
|
|
70
|
-
() => p.placement,
|
|
71
|
-
(r) => {
|
|
72
|
-
var o;
|
|
73
|
-
e.currentPlacement = r, (o = e.popperJS) == null || o.setOptions({ placement: r }), !p.disabled && (r && l(u), p.trigger === "manual" && t("update:modelValue", r));
|
|
74
|
-
}
|
|
75
|
-
), s(() => {
|
|
76
|
-
l(() => {
|
|
77
|
-
f(!0), (p.appendToBody || p.popperAppendToBody) && i("remove");
|
|
78
|
-
});
|
|
79
|
-
}), J(() => {
|
|
80
|
-
f(!0), (p.appendToBody || p.popperAppendToBody) && i("remove");
|
|
81
|
-
}), { updatePopper: u, destroyPopper: i, doDestroy: f, ...T(e) };
|
|
82
|
-
};
|
|
83
|
-
export {
|
|
84
|
-
R as userPopper
|
|
85
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { PopupManager as n, merge as _, isServer as T, addClass as f } from "../../../../../../@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js";
|
|
2
|
-
let g = 1;
|
|
3
|
-
const x = ({
|
|
4
|
-
onMounted: t,
|
|
5
|
-
onBeforeUnmount: e,
|
|
6
|
-
watch: s,
|
|
7
|
-
vm: o,
|
|
8
|
-
api: r,
|
|
9
|
-
props: d,
|
|
10
|
-
state: p,
|
|
11
|
-
nextTick: i
|
|
12
|
-
}) => {
|
|
13
|
-
t(() => {
|
|
14
|
-
o._popupId = `popup-${g++}`, n.register(o._popupId, o);
|
|
15
|
-
}), e(() => {
|
|
16
|
-
n.deregister(o._popupId), n.closeModal(o._popupId);
|
|
17
|
-
}), s(
|
|
18
|
-
() => d.visible,
|
|
19
|
-
(l) => {
|
|
20
|
-
if (l) {
|
|
21
|
-
if (o._opening)
|
|
22
|
-
return;
|
|
23
|
-
p.rendered ? r.open() : (p.rendered = !0, i(() => {
|
|
24
|
-
r.open();
|
|
25
|
-
}));
|
|
26
|
-
} else
|
|
27
|
-
r.close();
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
}, I = ({ state: t, vm: e }) => (s) => {
|
|
31
|
-
t.rendered || (t.rendered = !0);
|
|
32
|
-
const o = _({}, e.$props || e, s);
|
|
33
|
-
e._closeTimer && (clearTimeout(e._closeTimer), e._closeTimer = null), clearTimeout(e._openTimer);
|
|
34
|
-
const r = () => {
|
|
35
|
-
if (T || t.opened)
|
|
36
|
-
return;
|
|
37
|
-
e._opening = !0;
|
|
38
|
-
const p = e.$el, i = o.modal, l = o.zIndex;
|
|
39
|
-
l && (n.zIndex = l), i && (e._closing && (n.closeModal(e._popupId), e._closing = !1), n.openModal(
|
|
40
|
-
e._popupId,
|
|
41
|
-
n.nextZIndex(),
|
|
42
|
-
o.modalAppendToBody ? void 0 : p,
|
|
43
|
-
o.modalClass,
|
|
44
|
-
o.modalFade
|
|
45
|
-
), o.lockScroll && (n.fixBodyBorder(), f(document.body, n.popLockClass))), getComputedStyle(p).position === "static" && (p.style.position = "absolute"), p.style.zIndex = n.nextZIndex().toString(), t.opened = !0, e._opening = !1;
|
|
46
|
-
}, d = Number(o.openDelay);
|
|
47
|
-
d > 0 ? e._openTimer = setTimeout(() => {
|
|
48
|
-
e._openTimer = null, r();
|
|
49
|
-
}, d) : r();
|
|
50
|
-
}, v = ({ state: t, vm: e }) => () => {
|
|
51
|
-
e._openTimer !== null && (clearTimeout(e._openTimer), e._openTimer = null), clearTimeout(e._closeTimer);
|
|
52
|
-
const s = () => {
|
|
53
|
-
e._closing = !0, t.opened = !1, n.closeModal(e._popupId), e._closing = !1;
|
|
54
|
-
}, o = Number(e.closeDelay);
|
|
55
|
-
o > 0 ? e._closeTimer = setTimeout(() => {
|
|
56
|
-
e._closeTimer = null, s();
|
|
57
|
-
}, o) : s();
|
|
58
|
-
}, y = (t) => {
|
|
59
|
-
const { api: e, nextTick: s, onBeforeUnmount: o, onMounted: r, props: d, reactive: p, toRefs: i, vm: l, watch: u } = t, a = p({
|
|
60
|
-
opened: !1,
|
|
61
|
-
rendered: !1
|
|
62
|
-
});
|
|
63
|
-
x({ onMounted: r, onBeforeUnmount: o, watch: u, vm: l, api: e, props: d, state: a, nextTick: s });
|
|
64
|
-
const c = I({ state: a, vm: l }), m = v({ state: a, vm: l });
|
|
65
|
-
return { open: c, close: m, PopupManager: n, ...i(a) };
|
|
66
|
-
};
|
|
67
|
-
export {
|
|
68
|
-
y as usePopup
|
|
69
|
-
};
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { __spreadValues as y } from "../chunk-G2ADBYYC.js";
|
|
2
|
-
import { getDomNode as C, addClass as _, removeClass as w, on as F, off as N, emitEvent as O } from "../../../../../@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js";
|
|
3
|
-
const E = ({ constants: e, props: o }) => () => o.rightSlide ? e.DIALOG_SLIDER_RIGHT : e.DIALOG_FADE, g = (e) => isNaN(Number(e)) ? e : e + "px", M = ({ props: e, state: o, designConfig: l }) => () => {
|
|
4
|
-
var i;
|
|
5
|
-
let t = {}, { width: r, top: s, rightSlide: d, maxHeight: a } = e;
|
|
6
|
-
return s === void 0 && (s = d ? "0" : (i = l == null ? void 0 : l.state) != null && i.top ? "" : "15vh"), r = g(r), s = g(s), a = g(a), o.isFull || (t.width = r, t.top = o.top || s, t.maxHeight = a, d ? (t.right = 0, t.height = "calc(100vh - " + t.top + ")") : t.left = o.left || "calc((100vw - " + r + ") / 2)"), o.dragStyle && (t = y(y({}, t), o.dragStyle), o.isFull && (t = { left: "0px", top: "0px" })), e.customStyle && (t = Object.assign(t, e.customStyle)), t;
|
|
7
|
-
}, P = ({
|
|
8
|
-
api: e,
|
|
9
|
-
constants: o,
|
|
10
|
-
emit: l,
|
|
11
|
-
nextTick: i,
|
|
12
|
-
parent: t,
|
|
13
|
-
props: r,
|
|
14
|
-
vm: s,
|
|
15
|
-
state: d
|
|
16
|
-
}) => (a) => {
|
|
17
|
-
const u = t.$el;
|
|
18
|
-
if (r.lockScroll && (a ? e.showScrollbar() : e.hideScrollbar()), d.move = !1, d.isFull = r.fullscreen, l("update:visible", a), a)
|
|
19
|
-
d.closed = !1, l("open"), F(u, "scroll", e.updatePopper), i(() => {
|
|
20
|
-
s.$refs.dialog.scrollTop = 0;
|
|
21
|
-
}), r.appendToBody && document.body.appendChild(u);
|
|
22
|
-
else if (N(u, "scroll", e.updatePopper), d.closed || (d.emitter.emit("boxclose", r.isFormReset), l("close")), r.destroyOnClose && i(() => d.key++), r.rightSlide && d.current !== "default") {
|
|
23
|
-
const m = `[data-tag=${o.DIALOG_BOX_DATA_TAG}]`;
|
|
24
|
-
r.rightSlide && (u.querySelector(m).style.left = "");
|
|
25
|
-
}
|
|
26
|
-
}, X = ({ api: e, parent: o, props: l }) => () => {
|
|
27
|
-
if (l.lockScroll && l.visible && e.showScrollbar(), l.visible) {
|
|
28
|
-
const i = o.$el;
|
|
29
|
-
e.open(), l.appendToBody && document.body.appendChild(i);
|
|
30
|
-
}
|
|
31
|
-
}, L = ({ api: e, parent: o, props: l }) => () => {
|
|
32
|
-
const i = o.$el;
|
|
33
|
-
e.hideScrollbar(), l.appendToBody && i && i.parentNode && i.parentNode.removeChild(i);
|
|
34
|
-
}, T = ({ state: e }) => (o) => {
|
|
35
|
-
e.mouseDownWrapperFlag = !1, /tiny-dialog-box__wrapper/.test(o.target.className) && o.type === "mousedown" && (e.mouseDownWrapperFlag = !0);
|
|
36
|
-
}, B = ({ state: e }) => (o) => {
|
|
37
|
-
e.mouseUpWrapperFlag = !1, /tiny-dialog-box__wrapper/.test(o.target.className) && o.type === "mouseup" && (e.mouseUpWrapperFlag = !0);
|
|
38
|
-
}, Y = ({ api: e, props: o, state: l }) => () => {
|
|
39
|
-
o.closeOnClickModal && l.mouseDownWrapperFlag && l.mouseUpWrapperFlag && e.handleClose("mask");
|
|
40
|
-
}, G = ({
|
|
41
|
-
api: e,
|
|
42
|
-
constants: o,
|
|
43
|
-
emit: l,
|
|
44
|
-
parent: i,
|
|
45
|
-
props: t
|
|
46
|
-
}) => (r = "close") => {
|
|
47
|
-
if (typeof t.beforeClose == "function" && t.beforeClose(r) === !1)
|
|
48
|
-
return;
|
|
49
|
-
const s = i.$el;
|
|
50
|
-
if (t.rightSlide) {
|
|
51
|
-
const d = s.querySelector(o.DIALOG_BOX_CLASS) || s;
|
|
52
|
-
d.style.left = "";
|
|
53
|
-
}
|
|
54
|
-
O(l, "before-close", e.hide) && e.hide(r);
|
|
55
|
-
}, H = ({ api: e, emit: o, state: l, props: i }) => (t) => {
|
|
56
|
-
t !== !1 && (l.emitter.emit("boxclose", i.isFormReset), o("update:visible", !1), o("change", !1), o("close", t), l.closed = !0, e.hideScrollbar());
|
|
57
|
-
}, I = ({ api: e, emit: o }) => () => {
|
|
58
|
-
o("confirm"), e.handleClose("confirm");
|
|
59
|
-
}, R = ({ api: e, emit: o }) => () => {
|
|
60
|
-
o("cancel"), e.handleClose("cancel");
|
|
61
|
-
}, U = ({ api: e, constants: o }) => () => {
|
|
62
|
-
e.broadcast(o.SELECT_DROPDOWN, "updatePopper"), e.broadcast(o.DROPDOWN_MENU, "updatePopper");
|
|
63
|
-
}, k = (e) => () => {
|
|
64
|
-
e("opened");
|
|
65
|
-
}, j = (e) => () => {
|
|
66
|
-
e("closed");
|
|
67
|
-
}, x = ({
|
|
68
|
-
vm: e,
|
|
69
|
-
componentList: o
|
|
70
|
-
}) => {
|
|
71
|
-
const l = e.$children;
|
|
72
|
-
return !l || l.length === 0 ? [] : (l.forEach((i) => {
|
|
73
|
-
i.$options.componentName === "Select" && o.push(i), x({ vm: i, componentList: o });
|
|
74
|
-
}), o);
|
|
75
|
-
}, $ = (e) => {
|
|
76
|
-
x({ vm: e, componentList: [] }).forEach((o) => {
|
|
77
|
-
o.state.visible = !1;
|
|
78
|
-
});
|
|
79
|
-
}, q = ({
|
|
80
|
-
parent: e,
|
|
81
|
-
props: o,
|
|
82
|
-
state: l,
|
|
83
|
-
emit: i,
|
|
84
|
-
vm: t
|
|
85
|
-
}) => (r) => {
|
|
86
|
-
if (!o.draggable || l.isFull)
|
|
87
|
-
return;
|
|
88
|
-
let s = t.$refs.dialog;
|
|
89
|
-
r.preventDefault();
|
|
90
|
-
let d = document.onmousemove, a = document.onmouseup, u = r.clientX - s.offsetLeft, m = r.clientY - s.offsetTop, { visibleHeight: b, visibleWidth: S } = C();
|
|
91
|
-
document.onmousemove = (f) => {
|
|
92
|
-
f.preventDefault(), l.move || (i("drag-start", f), $(e), l.move = !0);
|
|
93
|
-
let D = s.offsetWidth, v = s.offsetHeight, c, n;
|
|
94
|
-
if (o.dragOutsideWindow) {
|
|
95
|
-
let p = S - 10, h = b - 10;
|
|
96
|
-
c = f.clientX - u, n = f.clientY - m, c = f.clientX < 0 ? -u : c > p ? p : c, n = f.clientY < 0 ? -m : n > h ? h : n;
|
|
97
|
-
} else {
|
|
98
|
-
let p = Math.max(S - D, 0), h = Math.max(b - v, 0);
|
|
99
|
-
c = f.clientX - u, n = f.clientY - m, c = c < 0 ? 0 : c > p ? p : c, n = n < 0 ? 0 : n > h ? h : n;
|
|
100
|
-
}
|
|
101
|
-
l.isFull || (l.dragStyle = { left: `${c}px`, top: `${n}px` }), l.left = `${c}px`, l.top = `${n}px`, l.emitter.emit("boxdrag"), i("drag-move", f);
|
|
102
|
-
}, document.onmouseup = () => {
|
|
103
|
-
document.onmousemove = d, document.onmouseup = a, o.draggable && l.move && i("drag-end", r), l.move = !1;
|
|
104
|
-
};
|
|
105
|
-
}, V = (e) => () => {
|
|
106
|
-
_(document.body, e);
|
|
107
|
-
}, z = (e) => () => {
|
|
108
|
-
w(document.body, e);
|
|
109
|
-
}, Z = ({ state: e, emit: o, nextTick: l, vm: i }) => (t) => {
|
|
110
|
-
e.isFull = t, l(() => {
|
|
111
|
-
o("resize", { fullscreen: t, dialog: i.$refs.dialog });
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
export {
|
|
115
|
-
k as afterEnter,
|
|
116
|
-
j as afterLeave,
|
|
117
|
-
g as computedAddUnit,
|
|
118
|
-
E as computedAnimationName,
|
|
119
|
-
M as computedStyle,
|
|
120
|
-
R as handleCancel,
|
|
121
|
-
G as handleClose,
|
|
122
|
-
I as handleConfirm,
|
|
123
|
-
q as handleDrag,
|
|
124
|
-
Y as handleWrapperClick,
|
|
125
|
-
H as hide,
|
|
126
|
-
z as hideScrollbar,
|
|
127
|
-
X as mounted,
|
|
128
|
-
V as showScrollbar,
|
|
129
|
-
Z as toggleFullScreen,
|
|
130
|
-
L as unMounted,
|
|
131
|
-
U as updatePopper,
|
|
132
|
-
T as useMouseEventDown,
|
|
133
|
-
B as useMouseEventUp,
|
|
134
|
-
P as watchVisible
|
|
135
|
-
};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { observeCallback as y, handleDocumentClick as k, focusHandler as D, bindEvent as H, handleClosePopper as B, handleShowPopper as O, setExpectedState as $, debounceClose as M, handleFocus as V, handleBlur as j, removeFocusing as A, watchFocusing as I, bindPopper as J, destroyed as L, hide as R, show as W } from "./index.js";
|
|
2
|
-
import { guid as q } from "../../../../../@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js";
|
|
3
|
-
import { userPopper as z } from "../../../../../@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popper.js";
|
|
4
|
-
const U = [
|
|
5
|
-
"state",
|
|
6
|
-
"bindEvent",
|
|
7
|
-
"hide",
|
|
8
|
-
"show",
|
|
9
|
-
"doDestroy",
|
|
10
|
-
"handleFocus",
|
|
11
|
-
"debounceClose",
|
|
12
|
-
"handleShowPopper",
|
|
13
|
-
"handleClosePopper",
|
|
14
|
-
"setExpectedState",
|
|
15
|
-
"updatePopper",
|
|
16
|
-
"focusHandler"
|
|
17
|
-
], G = ({ reactive: t, showPopper: a, popperElm: d, referenceElm: r, props: i, inject: p, popperJS: l, currentPlacement: c }) => t({
|
|
18
|
-
popperJS: l,
|
|
19
|
-
showPopper: a,
|
|
20
|
-
popperElm: d,
|
|
21
|
-
referenceElm: r,
|
|
22
|
-
currentPlacement: c,
|
|
23
|
-
timeout: null,
|
|
24
|
-
focusing: !1,
|
|
25
|
-
expectedState: void 0,
|
|
26
|
-
tooltipId: q("tiny-tooltip-", 4),
|
|
27
|
-
tabindex: i.tabindex,
|
|
28
|
-
xPlacement: "bottom",
|
|
29
|
-
showContent: p("showContent", null),
|
|
30
|
-
tipsMaxWidth: p("tips-max-width", null)
|
|
31
|
-
}), X = (t, {
|
|
32
|
-
watch: a,
|
|
33
|
-
toRefs: d,
|
|
34
|
-
reactive: r,
|
|
35
|
-
onBeforeUnmount: i,
|
|
36
|
-
onDeactivated: p,
|
|
37
|
-
onMounted: l,
|
|
38
|
-
onUnmounted: c,
|
|
39
|
-
inject: f
|
|
40
|
-
}, { vm: n, emit: m, slots: b, nextTick: u, parent: w }) => {
|
|
41
|
-
const e = {}, s = {}, P = { emit: m, props: t, nextTick: u, toRefs: d, reactive: r, parent: w.$parent, vm: n, popperVmRef: s };
|
|
42
|
-
Object.assign(P, { slots: b, onBeforeUnmount: i, onDeactivated: p, watch: a });
|
|
43
|
-
const { showPopper: C, updatePopper: g, popperElm: v, referenceElm: S, doDestroy: x, popperJS: E, currentPlacement: F } = z(
|
|
44
|
-
P
|
|
45
|
-
), o = G({
|
|
46
|
-
reactive: r,
|
|
47
|
-
showPopper: C,
|
|
48
|
-
popperElm: v,
|
|
49
|
-
referenceElm: S,
|
|
50
|
-
props: t,
|
|
51
|
-
inject: f,
|
|
52
|
-
popperJS: E,
|
|
53
|
-
currentPlacement: F
|
|
54
|
-
});
|
|
55
|
-
return Object.assign(e, {
|
|
56
|
-
state: o,
|
|
57
|
-
doDestroy: x,
|
|
58
|
-
updatePopper: g,
|
|
59
|
-
show: W({ api: e, state: o, props: t }),
|
|
60
|
-
hide: R(e),
|
|
61
|
-
destroyed: L({ state: o, api: e, vm: n }),
|
|
62
|
-
bindPopper: J({ vm: n, nextTick: u, popperVmRef: s }),
|
|
63
|
-
watchFocusing: I(o),
|
|
64
|
-
removeFocusing: A({ api: e, state: o }),
|
|
65
|
-
handleBlur: j({ api: e, state: o }),
|
|
66
|
-
handleFocus: V({ api: e, state: o }),
|
|
67
|
-
debounceClose: M({ api: e, props: t }),
|
|
68
|
-
setExpectedState: $({ state: o }),
|
|
69
|
-
handleShowPopper: O({ props: t, state: o }),
|
|
70
|
-
handleClosePopper: B({ api: e, props: t, state: o }),
|
|
71
|
-
bindEvent: H({ api: e, state: o, vm: n }),
|
|
72
|
-
focusHandler: D({ slots: b, api: e }),
|
|
73
|
-
handleDocumentClick: k({ props: t, api: e, state: o, popperVmRef: s }),
|
|
74
|
-
observeCallback: y({ state: o, popperVmRef: s })
|
|
75
|
-
}), a(() => o.focusing, e.watchFocusing), a(
|
|
76
|
-
() => t.modelValue,
|
|
77
|
-
(h) => u(() => t.manual && (o.showPopper = h))
|
|
78
|
-
), l(() => {
|
|
79
|
-
if (e.bindPopper(), t.genArrowByHtml) {
|
|
80
|
-
const h = { attributes: !0, childList: !1, subtree: !1 };
|
|
81
|
-
e.observer = new MutationObserver(e.observeCallback), e.observer.observe(s.popper, h);
|
|
82
|
-
}
|
|
83
|
-
}), n.$on("tooltip-update", e.bindPopper), c(() => {
|
|
84
|
-
e.destroyed(), e.observer && e.observer.disconnect(), n.$off("tooltip-update");
|
|
85
|
-
}), e;
|
|
86
|
-
};
|
|
87
|
-
export {
|
|
88
|
-
U as api,
|
|
89
|
-
X as renderless
|
|
90
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import t from "./_Symbol.js";
|
|
2
|
-
import e from "./_getRawTag.js";
|
|
3
|
-
import o from "./_objectToString.js";
|
|
4
|
-
var i = "[object Null]", f = "[object Undefined]", r = t ? t.toStringTag : void 0;
|
|
5
|
-
function m(n) {
|
|
6
|
-
return n == null ? n === void 0 ? f : i : r && r in Object(n) ? e(n) : o(n);
|
|
7
|
-
}
|
|
8
|
-
export {
|
|
9
|
-
m as default
|
|
10
|
-
};
|