@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.
Files changed (244) hide show
  1. package/dist/{bubble-item → bubble}/components/actions/copy.vue.d.ts +3 -3
  2. package/dist/{bubble-item → bubble}/components/actions/refresh.vue.d.ts +1 -1
  3. package/dist/bubble/index.d.ts +12 -0
  4. package/dist/bubble/index.type.d.ts +53 -0
  5. package/dist/bubble/useScroll.d.ts +4 -0
  6. package/dist/container/index.d.ts +7 -0
  7. package/dist/container/index.type.d.ts +16 -0
  8. package/dist/container/index.vue.d.ts +26 -0
  9. package/dist/index.d.ts +10 -5
  10. package/dist/index.js +31 -20
  11. package/dist/node_modules/.pnpm/@opentiny_utils@1.0.0/node_modules/@opentiny/utils/dist/opentiny-utils.es.js +832 -0
  12. package/dist/node_modules/.pnpm/@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js +959 -1496
  13. 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
  14. 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
  15. package/dist/node_modules/.pnpm/@opentiny_vue-common@3.21.0/node_modules/@opentiny/vue-common/lib/index.js +727 -0
  16. package/dist/node_modules/.pnpm/@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js +144 -675
  17. 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
  18. 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
  19. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/close.js +29 -0
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. 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
  33. 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
  34. 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
  35. 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
  36. 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
  37. 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
  38. 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
  39. 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
  40. 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
  41. 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
  42. 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
  43. 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
  44. 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
  45. 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
  46. 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
  47. 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
  48. 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
  49. 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
  50. 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
  51. 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
  52. 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
  53. 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
  54. 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
  55. 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
  56. 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
  57. 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
  58. 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
  59. 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
  60. 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
  61. 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
  62. 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
  63. 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
  64. 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
  65. 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
  66. 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
  67. 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
  68. 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
  69. 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
  70. 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
  71. 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
  72. 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
  73. 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
  74. 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
  75. 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
  76. 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
  77. 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
  78. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/browser.js +36 -0
  79. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/clickoutside.js +47 -0
  80. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/debounce.js +7 -0
  81. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/dom.js +45 -0
  82. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popper.js +320 -0
  83. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popup-manager.js +118 -0
  84. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/throttle.js +23 -0
  85. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useEventListener.js +9 -0
  86. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useInstanceSlots.js +14 -0
  87. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useRelation.js +54 -0
  88. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popper.js +84 -0
  89. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popup.js +73 -0
  90. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/event.js +13 -0
  91. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/function.js +5 -0
  92. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/index.js +11 -0
  93. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/object.js +84 -0
  94. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/string.js +28 -0
  95. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/type.js +28 -0
  96. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/dialog-box/index.js +136 -0
  97. 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
  98. 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
  99. 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
  100. 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
  101. 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
  102. 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
  103. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tooltip/vue.js +90 -0
  104. 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
  105. 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
  106. package/dist/packages/components/src/{bubble-list → bubble}/bubble-list.vue.js +2 -2
  107. package/dist/packages/components/src/bubble/bubble-list.vue2.js +37 -0
  108. package/dist/packages/components/src/bubble/bubble.vue.js +7 -0
  109. package/dist/packages/components/src/bubble/bubble.vue2.js +118 -0
  110. package/dist/packages/components/src/bubble/components/actions/copy.vue.js +7 -0
  111. package/dist/packages/components/src/bubble/components/actions/copy.vue2.js +35 -0
  112. package/dist/packages/components/src/bubble/components/actions/refresh.vue.js +7 -0
  113. package/dist/packages/components/src/bubble/components/actions/refresh.vue2.js +16 -0
  114. package/dist/packages/components/src/bubble/index.js +18 -0
  115. package/dist/packages/components/src/bubble/useScroll.js +13 -0
  116. package/dist/packages/components/src/container/index.js +9 -0
  117. package/dist/packages/components/src/container/index.vue.js +7 -0
  118. package/dist/packages/components/src/container/index.vue2.js +55 -0
  119. package/dist/packages/components/src/conversations/index.js +1 -1
  120. package/dist/packages/components/src/prompts/index.js +18 -0
  121. package/dist/packages/components/src/prompts/prompt.vue.js +7 -0
  122. package/dist/packages/components/src/prompts/prompt.vue2.js +37 -0
  123. package/dist/packages/components/src/prompts/prompts.vue.js +7 -0
  124. package/dist/packages/components/src/prompts/prompts.vue2.js +36 -0
  125. package/dist/packages/components/src/question/components/CommonQuestions.vue.js +89 -0
  126. package/dist/packages/components/src/question/components/CommonQuestions.vue2.js +4 -0
  127. package/dist/packages/components/src/question/components/HotQuestions.vue.js +140 -0
  128. package/dist/packages/components/src/question/components/HotQuestions.vue2.js +4 -0
  129. package/dist/packages/components/src/question/composables/useQuestions.js +48 -0
  130. package/dist/packages/components/src/question/index.js +9 -0
  131. package/dist/packages/components/src/question/index.vue.js +113 -0
  132. package/dist/packages/components/src/question/index.vue2.js +4 -0
  133. package/dist/packages/components/src/sender/components/ActionButtons.vue.js +105 -123
  134. package/dist/packages/components/src/sender/composables/useInputHandler.js +26 -22
  135. package/dist/packages/components/src/sender/composables/useKeyboardHandler.js +11 -11
  136. package/dist/packages/components/src/sender/composables/useSpeechHandler.js +9 -9
  137. package/dist/packages/components/src/sender/index.vue.js +67 -66
  138. package/dist/packages/components/src/welcome/index.vue.js +5 -7
  139. package/dist/packages/components/src/welcome/index.vue2.js +32 -0
  140. package/dist/packages/svgs/dist/tiny-robot-svgs.js +223 -0
  141. package/dist/prompts/index.d.ts +12 -0
  142. package/dist/prompts/index.type.d.ts +55 -0
  143. package/dist/prompts/prompt.vue.d.ts +3 -0
  144. package/dist/prompts/prompts.vue.d.ts +20 -0
  145. package/dist/question/components/CommonQuestions.vue.d.ts +32 -0
  146. package/dist/question/components/HotQuestions.vue.d.ts +89 -0
  147. package/dist/question/composables/useQuestions.d.ts +17 -0
  148. package/dist/question/index.d.ts +7 -0
  149. package/dist/question/index.type.d.ts +74 -0
  150. package/dist/question/index.vue.d.ts +46 -0
  151. package/dist/sender/components/ActionButtons.vue.d.ts +6 -4
  152. package/dist/sender/composables/useSpeechHandler.d.ts +0 -6
  153. package/dist/sender/index.type.d.ts +1 -1
  154. package/dist/sender/index.vue.d.ts +3 -4
  155. package/dist/style.css +1 -1
  156. package/dist/welcome/index.type.d.ts +10 -0
  157. package/dist/welcome/index.vue.d.ts +17 -1
  158. package/package.json +6 -5
  159. package/src/bubble/bubble-list.vue +42 -0
  160. package/src/bubble/bubble.vue +247 -0
  161. package/src/bubble/components/actions/copy.vue +54 -0
  162. package/src/bubble/components/actions/refresh.vue +31 -0
  163. package/src/bubble/index.ts +23 -0
  164. package/src/bubble/index.type.ts +63 -0
  165. package/src/bubble/useScroll.ts +14 -0
  166. package/src/container/index.ts +12 -0
  167. package/src/container/index.type.ts +17 -0
  168. package/src/container/index.vue +135 -0
  169. package/src/conversations/index.ts +1 -1
  170. package/src/index.ts +26 -12
  171. package/src/prompts/index.ts +25 -0
  172. package/src/prompts/index.type.ts +59 -0
  173. package/src/prompts/prompt.vue +115 -0
  174. package/src/prompts/prompts.vue +50 -0
  175. package/src/question/components/CommonQuestions.vue +146 -0
  176. package/src/question/components/HotQuestions.vue +148 -0
  177. package/src/question/composables/useQuestions.ts +106 -0
  178. package/src/question/index.less +448 -0
  179. package/src/question/index.ts +12 -0
  180. package/src/question/index.type.ts +86 -0
  181. package/src/question/index.vue +140 -0
  182. package/src/question/vars.less +135 -0
  183. package/src/sender/components/ActionButtons.vue +42 -39
  184. package/src/sender/composables/useInputHandler.ts +15 -10
  185. package/src/sender/composables/useKeyboardHandler.ts +6 -4
  186. package/src/sender/composables/useSpeechHandler.ts +5 -11
  187. package/src/sender/index.less +3 -5
  188. package/src/sender/index.type.ts +1 -1
  189. package/src/sender/index.vue +3 -2
  190. package/src/welcome/index.type.ts +12 -0
  191. package/src/welcome/index.vue +68 -2
  192. package/.vscode/extensions.json +0 -3
  193. package/dist/bubble-item/components/icons/ai.vue.d.ts +0 -2
  194. package/dist/bubble-item/components/icons/index.d.ts +0 -2
  195. package/dist/bubble-item/components/icons/user.vue.d.ts +0 -2
  196. package/dist/bubble-item/index.d.ts +0 -7
  197. package/dist/bubble-list/index.d.ts +0 -8
  198. package/dist/bubble-list/index.type.d.ts +0 -55
  199. package/dist/node_modules/.pnpm/@opentiny_vue-directive@3.22.0/node_modules/@opentiny/vue-directive/index.js +0 -57
  200. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popper.js +0 -85
  201. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popup.js +0 -69
  202. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/dialog-box/index.js +0 -135
  203. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/vue.js +0 -90
  204. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +0 -5
  205. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +0 -10
  206. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTrim.js +0 -8
  207. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +0 -4
  208. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +0 -15
  209. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +0 -7
  210. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +0 -5
  211. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
  212. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/debounce.js +0 -54
  213. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +0 -7
  214. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js +0 -6
  215. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js +0 -9
  216. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/now.js +0 -7
  217. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toNumber.js +0 -22
  218. package/dist/packages/components/src/bubble-item/bubble-item.vue.js +0 -7
  219. package/dist/packages/components/src/bubble-item/bubble-item.vue2.js +0 -111
  220. package/dist/packages/components/src/bubble-item/components/actions/copy.vue.js +0 -46
  221. package/dist/packages/components/src/bubble-item/components/actions/copy.vue2.js +0 -4
  222. package/dist/packages/components/src/bubble-item/components/actions/refresh.vue.js +0 -12
  223. package/dist/packages/components/src/bubble-item/components/icons/ai.vue.js +0 -45
  224. package/dist/packages/components/src/bubble-item/components/icons/user.vue.js +0 -63
  225. package/dist/packages/components/src/bubble-item/index.js +0 -9
  226. package/dist/packages/components/src/bubble-list/bubble-list.vue2.js +0 -52
  227. package/dist/packages/components/src/bubble-list/index.js +0 -9
  228. package/src/bubble-item/bubble-item.vue +0 -264
  229. package/src/bubble-item/components/actions/copy.vue +0 -47
  230. package/src/bubble-item/components/actions/refresh.vue +0 -27
  231. package/src/bubble-item/components/icons/ai.vue +0 -30
  232. package/src/bubble-item/components/icons/index.ts +0 -2
  233. package/src/bubble-item/components/icons/user.vue +0 -78
  234. package/src/bubble-item/index.ts +0 -12
  235. package/src/bubble-list/bubble-list.vue +0 -53
  236. package/src/bubble-list/index.ts +0 -14
  237. package/src/bubble-list/index.type.ts +0 -65
  238. package/src/sender/global.d.ts +0 -44
  239. /package/dist/{bubble-list → bubble}/bubble-list.vue.d.ts +0 -0
  240. /package/dist/{bubble-item → bubble}/components/actions/index.d.ts +0 -0
  241. /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
  242. /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
  243. /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
  244. /package/src/{bubble-item → bubble}/components/actions/index.ts +0 -0
@@ -0,0 +1,55 @@
1
+ import { defineComponent as f, useCssVars as v, useModel as i, computed as p, createElementBlock as _, openBlock as m, createElementVNode as e, renderSlot as n, createVNode as a, unref as c } from "vue";
2
+ import { IconCancelFullScreen as b, IconFullScreen as h, IconClose as w } from "../../../svgs/dist/tiny-robot-svgs.js";
3
+ const $ = { class: "tr-container" }, g = { class: "tr-container__header" }, C = { class: "tr-container__header-operations" }, S = { class: "tr-container__body" }, k = { class: "tr-container__footer" }, I = /* @__PURE__ */ f({
4
+ __name: "index",
5
+ props: {
6
+ show: { type: Boolean, required: !0 },
7
+ showModifiers: {},
8
+ fullscreen: { type: Boolean },
9
+ fullscreenModifiers: {}
10
+ },
11
+ emits: ["update:show", "update:fullscreen"],
12
+ setup(r) {
13
+ v((o) => ({
14
+ "4f670360": s.value ? "0" : "unset",
15
+ "01550f1a": s.value ? "unset" : "var(--tr-container-width)",
16
+ "9b01cee4": l.value ? "100" : "-1",
17
+ "46b87c3c": l.value ? "1" : "0"
18
+ }));
19
+ const l = i(r, "show"), s = i(r, "fullscreen"), u = p(() => s.value ? b : h);
20
+ return (o, t) => (m(), _("div", $, [
21
+ t[3] || (t[3] = e("div", { class: "tr-container__dragging-bar-wrapper" }, [
22
+ e("div", { class: "tr-container__dragging-bar" })
23
+ ], -1)),
24
+ e("div", g, [
25
+ n(o.$slots, "title", {}, () => [
26
+ t[2] || (t[2] = e("h3", { class: "tr-container__title" }, "OpenTiny NEXT", -1))
27
+ ], !0),
28
+ e("div", C, [
29
+ n(o.$slots, "operations", {}, void 0, !0),
30
+ e("button", {
31
+ class: "icon-btn",
32
+ onClick: t[0] || (t[0] = (d) => o.$emit("update:fullscreen", !s.value))
33
+ }, [
34
+ a(c(u))
35
+ ]),
36
+ e("button", {
37
+ class: "icon-btn",
38
+ onClick: t[1] || (t[1] = (d) => o.$emit("update:show", !1))
39
+ }, [
40
+ a(c(w))
41
+ ])
42
+ ])
43
+ ]),
44
+ e("div", S, [
45
+ n(o.$slots, "default", {}, void 0, !0)
46
+ ]),
47
+ e("div", k, [
48
+ n(o.$slots, "footer", {}, void 0, !0)
49
+ ])
50
+ ]));
51
+ }
52
+ });
53
+ export {
54
+ I as default
55
+ };
@@ -1,5 +1,5 @@
1
1
  import n from "./index.vue.js";
2
- n.name = "TrConversations";
2
+ n.name = "Conversations";
3
3
  const t = function(o) {
4
4
  o.component(n.name, n);
5
5
  };
@@ -0,0 +1,18 @@
1
+ import o from "./prompt.vue.js";
2
+ import t from "./prompts.vue.js";
3
+ o.name = "TrPrompt";
4
+ const n = function(m) {
5
+ m.component(o.name, o);
6
+ };
7
+ o.install = n;
8
+ const a = o;
9
+ t.name = "TrPrompts";
10
+ const p = function(m) {
11
+ m.component(t.name, t);
12
+ };
13
+ t.install = p;
14
+ const c = t;
15
+ export {
16
+ a as Prompt,
17
+ c as Prompts
18
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./prompt.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3ef50849"]]);
5
+ export {
6
+ f as default
7
+ };
@@ -0,0 +1,37 @@
1
+ import { defineComponent as s, computed as c, createElementBlock as p, openBlock as t, normalizeClass as a, createElementVNode as o, createBlock as i, resolveDynamicComponent as l, createCommentVNode as b, toDisplayString as d } from "vue";
2
+ const g = { class: "tr-prompt__icon" }, v = { class: "tr-prompt__content" }, C = { class: "tr-prompt__content-label" }, f = {
3
+ key: 0,
4
+ class: "tr-prompt__content-description"
5
+ }, k = /* @__PURE__ */ s({
6
+ __name: "prompt",
7
+ props: {
8
+ label: {},
9
+ id: {},
10
+ description: {},
11
+ icon: {},
12
+ disabled: { type: Boolean },
13
+ badge: {}
14
+ },
15
+ setup(_) {
16
+ const e = _, r = (n) => n ? s(() => () => n) : null, m = c(() => r(e.icon)), u = c(() => r(e.badge));
17
+ return (n, h) => (t(), p("div", {
18
+ class: a(["tr-prompt", { disabled: e.disabled }])
19
+ }, [
20
+ o("div", g, [
21
+ (t(), i(l(m.value)))
22
+ ]),
23
+ o("div", v, [
24
+ o("h6", C, d(e.label), 1),
25
+ e.description ? (t(), p("p", f, d(e.description), 1)) : b("", !0)
26
+ ]),
27
+ o("div", {
28
+ class: a(["tr-prompt__badge", { label: typeof e.badge == "string" }])
29
+ }, [
30
+ (t(), i(l(u.value)))
31
+ ], 2)
32
+ ], 2));
33
+ }
34
+ });
35
+ export {
36
+ k as default
37
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./prompts.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a3ceb6f3"]]);
5
+ export {
6
+ a as default
7
+ };
@@ -0,0 +1,36 @@
1
+ import { defineComponent as d, createElementBlock as l, openBlock as o, createElementVNode as u, renderSlot as _, normalizeClass as k, Fragment as f, renderList as C, createBlock as y, mergeProps as v, toRaw as B } from "vue";
2
+ import w from "./prompt.vue.js";
3
+ const h = { class: "tr-prompts" }, E = /* @__PURE__ */ d({
4
+ __name: "prompts",
5
+ props: {
6
+ items: {},
7
+ itemStyle: {},
8
+ itemClass: {},
9
+ vertical: { type: Boolean },
10
+ wrap: { type: Boolean }
11
+ },
12
+ emits: ["item-click"],
13
+ setup(i, { emit: c }) {
14
+ const e = i, n = c, a = (t, s) => {
15
+ n("item-click", t, B(s));
16
+ };
17
+ return (t, s) => (o(), l("div", h, [
18
+ u("div", {
19
+ class: k(["tr-prompts__list-container", { wrap: e.wrap, vertical: e.vertical }])
20
+ }, [
21
+ (o(!0), l(f, null, C(e.items, (r, m) => (o(), y(w, v({
22
+ key: r.id || m,
23
+ ref_for: !0
24
+ }, r, {
25
+ style: e.itemStyle,
26
+ class: e.itemClass,
27
+ onClick: (p) => a(p, r)
28
+ }), null, 16, ["style", "class", "onClick"]))), 128))
29
+ ], 2),
30
+ _(t.$slots, "footer", {}, void 0, !0)
31
+ ]));
32
+ }
33
+ });
34
+ export {
35
+ E as default
36
+ };
@@ -0,0 +1,89 @@
1
+ import { defineComponent as W, ref as a, watch as C, onMounted as z, onBeforeUnmount as R, createElementBlock as o, openBlock as s, normalizeClass as V, createCommentVNode as L, Fragment as w, renderList as E, createElementVNode as I, createTextVNode as q, createVNode as g, unref as b, toDisplayString as Q, nextTick as T } from "vue";
2
+ import { IconEdit as $ } from "../../../../svgs/dist/tiny-robot-svgs.js";
3
+ const A = ["onClick"], D = { style: { display: "flex", "align-items": "center" } }, F = { key: 0 }, M = ["onClick"], U = /* @__PURE__ */ W({
4
+ __name: "CommonQuestions",
5
+ props: {
6
+ questions: {
7
+ type: Array,
8
+ required: !0
9
+ },
10
+ isExpanded: {
11
+ type: Boolean,
12
+ default: !1
13
+ }
14
+ },
15
+ emits: ["question-click", "show-expand-button"],
16
+ setup(B, { emit: N }) {
17
+ const i = B, h = N, d = a(null), r = a(!1), c = a(!1), m = a([]), u = a([]);
18
+ C(
19
+ () => i.isExpanded,
20
+ (n) => {
21
+ c.value = n;
22
+ }
23
+ );
24
+ const v = async () => {
25
+ if (await T(), d.value) {
26
+ const n = d.value, k = n.clientWidth;
27
+ if (m.value = [], u.value = [], i.questions.length === 0) {
28
+ r.value = !1;
29
+ return;
30
+ }
31
+ let e = 0;
32
+ const l = 8, t = document.createElement("div");
33
+ t.className = "tr-common-questions_item", t.style.visibility = "hidden", t.style.position = "absolute", n.appendChild(t);
34
+ for (let p = 0; p < i.questions.length; p++) {
35
+ const f = i.questions[p];
36
+ t.textContent = f.text;
37
+ const y = t.offsetWidth + l;
38
+ e + y <= k ? (e += y, m.value.push(f)) : u.value.push(f);
39
+ }
40
+ n.removeChild(t), r.value = u.value.length > 0, c.value = !1, h("show-expand-button", r.value);
41
+ }
42
+ }, _ = (n) => {
43
+ h("question-click", n);
44
+ };
45
+ C(
46
+ () => i.questions,
47
+ () => {
48
+ v();
49
+ },
50
+ { deep: !0 }
51
+ );
52
+ const x = () => {
53
+ v();
54
+ };
55
+ return z(() => {
56
+ v(), window.addEventListener("resize", x);
57
+ }), R(() => {
58
+ window.removeEventListener("resize", x);
59
+ }), (n, k) => (s(), o("div", {
60
+ class: V(["tr-common-questions", { expanded: c.value }]),
61
+ ref_key: "commonQuestionsRef",
62
+ ref: d
63
+ }, [
64
+ (s(!0), o(w, null, E(m.value, (e, l) => (s(), o("div", {
65
+ key: `visible-${e.id}-${l}`,
66
+ class: "tr-common-questions_item",
67
+ onClick: (t) => _(e)
68
+ }, [
69
+ I("div", D, [
70
+ g(b($))
71
+ ]),
72
+ q(" " + Q(e.text), 1)
73
+ ], 8, A))), 128)),
74
+ c.value ? (s(), o("div", F, [
75
+ (s(!0), o(w, null, E(u.value, (e, l) => (s(), o("div", {
76
+ key: `hidden-${e.id}-${l}`,
77
+ class: "tr-common-questions_item",
78
+ onClick: (t) => _(e)
79
+ }, [
80
+ g(b($)),
81
+ q(" " + Q(e.text), 1)
82
+ ], 8, M))), 128))
83
+ ])) : L("", !0)
84
+ ], 2));
85
+ }
86
+ });
87
+ export {
88
+ U as default
89
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CommonQuestions.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,140 @@
1
+ import { defineComponent as S, ref as k, computed as _, watch as x, createElementBlock as i, createCommentVNode as h, openBlock as l, createElementVNode as s, withModifiers as M, normalizeStyle as N, createVNode as v, unref as r, Fragment as C, renderList as q, normalizeClass as Q, renderSlot as u, toDisplayString as f, createTextVNode as V } from "vue";
2
+ import T from "../../../../../node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/close.js";
3
+ import z from "../../../../../node_modules/.pnpm/@opentiny_vue-button@3.21.0/node_modules/@opentiny/vue-button/lib/index.js";
4
+ import { IconHotQuestion as A, IconTypeAll as E } from "../../../../svgs/dist/tiny-robot-svgs.js";
5
+ const H = { class: "tr-question-header" }, I = { style: { display: "flex", "align-items": "center", gap: "12px" } }, R = {
6
+ key: 0,
7
+ class: "tr-question-categories"
8
+ }, W = ["onClick"], D = { class: "category-icon" }, F = { class: "tr-question-content" }, L = {
9
+ key: 0,
10
+ class: "tr-question-loading"
11
+ }, P = { key: 1 }, j = ["onClick"], G = {
12
+ key: 2,
13
+ class: "tr-question-empty"
14
+ }, Z = /* @__PURE__ */ S({
15
+ __name: "HotQuestions",
16
+ props: {
17
+ visible: {
18
+ type: Boolean,
19
+ default: !1
20
+ },
21
+ categories: {
22
+ type: Array,
23
+ default: () => []
24
+ },
25
+ modalWidth: {
26
+ type: String,
27
+ default: "640px"
28
+ },
29
+ loading: {
30
+ type: Boolean,
31
+ default: !1
32
+ },
33
+ closeOnClickOutside: {
34
+ type: Boolean,
35
+ default: !0
36
+ }
37
+ },
38
+ emits: ["update:visible", "close", "select-category", "question-click"],
39
+ setup(n, { emit: b }) {
40
+ const w = T(), a = n, c = b, d = k(""), p = _(() => {
41
+ if (!d.value && a.categories.length > 0)
42
+ return a.categories[0].questions || [];
43
+ const e = a.categories.find((t) => t.id === d.value);
44
+ return e ? e.questions : [];
45
+ });
46
+ x(
47
+ () => a.categories,
48
+ (e) => {
49
+ e.length > 0 && !d.value && (d.value = e[0].id);
50
+ },
51
+ { immediate: !0 }
52
+ );
53
+ const y = () => {
54
+ c("update:visible", !1), c("close");
55
+ }, B = (e) => {
56
+ d.value = e, c(
57
+ "select-category",
58
+ a.categories.find((t) => t.id === e)
59
+ );
60
+ }, $ = (e) => {
61
+ c("question-click", e);
62
+ }, O = (e) => {
63
+ a.closeOnClickOutside && !e.composedPath().includes(g.value) && y();
64
+ }, g = k(null);
65
+ return (e, t) => n.visible ? (l(), i("div", {
66
+ key: 0,
67
+ class: "tr-question-modal-backdrop",
68
+ onMousedown: O
69
+ }, [
70
+ s("div", {
71
+ ref_key: "modalRef",
72
+ ref: g,
73
+ class: "tr-question-panel",
74
+ style: N({ width: n.modalWidth }),
75
+ onMousedown: t[0] || (t[0] = M(() => {
76
+ }, ["stop"]))
77
+ }, [
78
+ s("div", H, [
79
+ s("div", I, [
80
+ s("div", null, [
81
+ v(r(A))
82
+ ]),
83
+ t[1] || (t[1] = s("div", { class: "tr-question-header-title" }, "热门问题", -1))
84
+ ]),
85
+ s("span", {
86
+ class: "tr-question-close-btn",
87
+ onClick: y
88
+ }, [
89
+ v(r(z), {
90
+ icon: r(w),
91
+ type: "text"
92
+ }, null, 8, ["icon"])
93
+ ])
94
+ ]),
95
+ n.categories.length > 0 ? (l(), i("div", R, [
96
+ (l(!0), i(C, null, q(n.categories, (o) => (l(), i("div", {
97
+ key: o.id,
98
+ class: Q(["tr-question-categories-item", { active: d.value === o.id }]),
99
+ onClick: (m) => B(o.id)
100
+ }, [
101
+ u(e.$slots, "category-label", { category: o }, () => [
102
+ s("div", D, [
103
+ v(r(E))
104
+ ]),
105
+ s("span", null, f(o.label), 1)
106
+ ])
107
+ ], 10, W))), 128))
108
+ ])) : h("", !0),
109
+ s("div", F, [
110
+ n.loading ? (l(), i("div", L, [
111
+ u(e.$slots, "loading-indicator", {}, () => [
112
+ t[2] || (t[2] = s("div", { class: "tr-question-loading-spinner" }, null, -1))
113
+ ])
114
+ ])) : p.value.length > 0 ? (l(), i("ul", P, [
115
+ (l(!0), i(C, null, q(p.value, (o, m) => (l(), i("li", {
116
+ key: o.id,
117
+ class: "tr-question-list-item",
118
+ onClick: (J) => $(o)
119
+ }, [
120
+ u(e.$slots, "question-item", {
121
+ question: o,
122
+ index: m
123
+ }, () => [
124
+ s("span", null, f(m + 1) + ".", 1),
125
+ V(" " + f(o.text), 1)
126
+ ])
127
+ ], 8, j))), 128))
128
+ ])) : (l(), i("div", G, [
129
+ u(e.$slots, "empty-state", {}, () => [
130
+ t[3] || (t[3] = s("p", null, "暂无相关问题", -1))
131
+ ])
132
+ ]))
133
+ ])
134
+ ], 36)
135
+ ], 32)) : h("", !0);
136
+ }
137
+ });
138
+ export {
139
+ Z as default
140
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./HotQuestions.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,48 @@
1
+ import { ref as l, computed as h, watch as y } from "vue";
2
+ function b(a = l([])) {
3
+ const s = l(""), c = l(!1), n = l(!1), o = l("light"), r = h(() => {
4
+ if (!s.value && a.value.length > 0)
5
+ return a.value[0].questions;
6
+ const t = a.value.find((e) => e.id === s.value);
7
+ return t ? t.questions : [];
8
+ }), i = (t) => {
9
+ s.value = t;
10
+ }, d = () => {
11
+ n.value = !0;
12
+ }, m = () => {
13
+ n.value = !1;
14
+ }, v = () => {
15
+ c.value = !c.value;
16
+ }, u = (t) => {
17
+ const e = document.body;
18
+ if (t) {
19
+ const g = window.scrollY || document.documentElement.scrollTop;
20
+ e.style.position = "fixed", e.style.width = "100%", e.style.top = `-${g}px`, e.style.overflowY = "scroll", e.classList.add("tr-modal-open");
21
+ } else
22
+ e.style.position = "", e.style.width = "", e.style.top = "", e.style.overflowY = "", e.classList.remove("tr-modal-open");
23
+ };
24
+ return y(n, (t) => {
25
+ u(t);
26
+ }), {
27
+ activeCategory: s,
28
+ isFloatingExpanded: c,
29
+ modalVisible: n,
30
+ currentTheme: o,
31
+ activeQuestions: r,
32
+ setActiveCategory: i,
33
+ openModal: d,
34
+ closeModal: m,
35
+ toggleFloating: v,
36
+ toggleTheme: () => {
37
+ o.value = o.value === "light" ? "dark" : "light", document.documentElement.setAttribute("data-theme", o.value);
38
+ },
39
+ setTheme: (t) => {
40
+ o.value = t, document.documentElement.setAttribute("data-theme", t);
41
+ },
42
+ refreshData: async () => Promise.resolve(),
43
+ toggleBodyScroll: u
44
+ };
45
+ }
46
+ export {
47
+ b as useQuestions
48
+ };
@@ -0,0 +1,9 @@
1
+ import n from "./index.vue.js";
2
+ n.name = "TrQuestion";
3
+ const o = function(t) {
4
+ t.component(n.name, n);
5
+ };
6
+ n.install = o;
7
+ export {
8
+ n as default
9
+ };
@@ -0,0 +1,113 @@
1
+ import { defineComponent as N, computed as O, ref as E, watch as T, onMounted as D, createElementBlock as b, openBlock as i, normalizeClass as M, createElementVNode as l, createVNode as a, createCommentVNode as U, unref as n, withCtx as d, renderSlot as r, createTextVNode as W, toDisplayString as p, createBlock as q } from "vue";
2
+ import { useQuestions as z } from "./composables/useQuestions.js";
3
+ import F from "./components/CommonQuestions.vue.js";
4
+ import H from "./components/HotQuestions.vue.js";
5
+ import { IconHotQuestion as j, IconTypeAll as G, IconArrowUp as J, IconArrowDown as K } from "../../../svgs/dist/tiny-robot-svgs.js";
6
+ /* empty css */
7
+ const L = ["data-theme"], P = { class: "category-icon" }, te = /* @__PURE__ */ N({
8
+ __name: "index",
9
+ props: {
10
+ categories: { default: () => [] },
11
+ commonQuestions: { default: () => [] },
12
+ initialExpanded: { type: Boolean, default: !1 },
13
+ modalWidth: { default: "640px" },
14
+ theme: { default: "light" },
15
+ closeOnClickOutside: { type: Boolean, default: !0 },
16
+ loading: { type: Boolean, default: !1 }
17
+ },
18
+ emits: ["question-click", "select-category"],
19
+ setup(B, { expose: $, emit: Q }) {
20
+ const u = B, g = () => {
21
+ s.value = !s.value;
22
+ }, f = Q, v = O(() => u.categories), s = E(u.initialExpanded), { modalVisible: m, currentTheme: x, setActiveCategory: h, openModal: c, closeModal: k, setTheme: S, refreshData: A } = z(v);
23
+ T(
24
+ () => u.theme,
25
+ (e) => {
26
+ S(e);
27
+ }
28
+ );
29
+ const y = (e) => {
30
+ k(), f("question-click", e);
31
+ }, V = (e) => {
32
+ e && (h(e.id), f("select-category", e));
33
+ }, C = E(!1), I = (e) => {
34
+ C.value = e;
35
+ };
36
+ return D(() => {
37
+ document.documentElement.setAttribute("data-theme", x.value);
38
+ }), $({
39
+ openModal: c,
40
+ closeModal: k,
41
+ toggleFloating: g,
42
+ setActiveCategory: h,
43
+ refreshData: A
44
+ }), (e, t) => (i(), b("div", {
45
+ class: M(["tr-question-container", [`theme-${e.theme}`]]),
46
+ "data-theme": e.theme
47
+ }, [
48
+ l("div", {
49
+ class: "tr-question-trigger",
50
+ onClick: t[0] || (t[0] = //@ts-ignore
51
+ (...o) => n(c) && n(c)(...o))
52
+ }, [
53
+ a(n(j))
54
+ ]),
55
+ a(H, {
56
+ visible: n(m),
57
+ categories: v.value,
58
+ "modal-width": e.modalWidth,
59
+ loading: e.loading,
60
+ "close-on-click-outside": e.closeOnClickOutside,
61
+ "onUpdate:visible": t[1] || (t[1] = (o) => m.value = o),
62
+ onClose: t[2] || (t[2] = (o) => m.value = !1),
63
+ onQuestionClick: y,
64
+ onSelectCategory: V
65
+ }, {
66
+ "category-label": d(({ category: o }) => [
67
+ r(e.$slots, "category-label", { category: o }, () => [
68
+ l("div", P, [
69
+ a(n(G))
70
+ ]),
71
+ l("span", null, p(o.label), 1)
72
+ ])
73
+ ]),
74
+ "question-item": d(({ question: o, index: w }) => [
75
+ r(e.$slots, "question-item", {
76
+ question: o,
77
+ index: w
78
+ }, () => [
79
+ l("span", null, p(w + 1) + ".", 1),
80
+ W(" " + p(o.text), 1)
81
+ ])
82
+ ]),
83
+ "loading-indicator": d(() => [
84
+ r(e.$slots, "loading-indicator", {}, () => [
85
+ t[3] || (t[3] = l("div", { class: "tr-question-loading-spinner" }, null, -1))
86
+ ])
87
+ ]),
88
+ "empty-state": d(() => [
89
+ r(e.$slots, "empty-state", {}, () => [
90
+ t[4] || (t[4] = l("p", null, "暂无相关问题", -1))
91
+ ])
92
+ ]),
93
+ _: 3
94
+ }, 8, ["visible", "categories", "modal-width", "loading", "close-on-click-outside"]),
95
+ a(F, {
96
+ isExpanded: s.value,
97
+ questions: e.commonQuestions,
98
+ onShowExpandButton: I,
99
+ onQuestionClick: y
100
+ }, null, 8, ["isExpanded", "questions"]),
101
+ C.value ? (i(), b("div", {
102
+ key: 0,
103
+ class: "tr-question-wrap-trigger",
104
+ onClick: g
105
+ }, [
106
+ s.value ? (i(), q(n(K), { key: 1 })) : (i(), q(n(J), { key: 0 }))
107
+ ])) : U("", !0)
108
+ ], 10, L));
109
+ }
110
+ });
111
+ export {
112
+ te as default
113
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.js";
2
+ export {
3
+ f as default
4
+ };