@opentiny/tiny-robot 0.2.0-alpha.2 → 0.2.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (414) hide show
  1. package/dist/_plugin-vue_export-helper.js +9 -0
  2. package/dist/action-group/index.js +142 -0
  3. package/dist/bubble/index.js +3211 -0
  4. package/dist/{node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/close.js → close.js} +9 -9
  5. package/dist/container/index.js +60 -0
  6. package/dist/conversations/index.js +14 -0
  7. package/dist/feedback/index.js +192 -0
  8. package/dist/history/index.js +228 -0
  9. package/dist/icon-button/index.js +31 -0
  10. package/dist/index.d.ts +2200 -26
  11. package/dist/index.js +35 -43
  12. package/dist/index2.js +376 -0
  13. package/dist/index3.js +3895 -0
  14. package/dist/index4.js +637 -0
  15. package/dist/index5.js +3237 -0
  16. package/dist/index6.js +4623 -0
  17. package/dist/prompts/index.js +83 -0
  18. package/dist/question/index.js +429 -0
  19. package/dist/sender/index.js +772 -0
  20. package/dist/style.css +1 -1
  21. package/dist/suggestion/index.js +497 -0
  22. package/dist/{packages/svgs/dist/tiny-robot-svgs.js → tiny-robot-svgs.js} +107 -107
  23. package/dist/welcome/index.js +38 -0
  24. package/package.json +7 -3
  25. package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
  26. package/dist/action-group/ActionGroup.vue.d.ts +0 -26
  27. package/dist/action-group/ActionGroupItem.vue.d.ts +0 -18
  28. package/dist/action-group/index.d.ts +0 -12
  29. package/dist/action-group/index.type.d.ts +0 -17
  30. package/dist/bubble/BubbleList.vue.d.ts +0 -5
  31. package/dist/bubble/index.d.ts +0 -12
  32. package/dist/bubble/index.type.d.ts +0 -51
  33. package/dist/container/index.d.ts +0 -7
  34. package/dist/container/index.type.d.ts +0 -16
  35. package/dist/container/index.vue.d.ts +0 -26
  36. package/dist/conversations/index.d.ts +0 -7
  37. package/dist/conversations/index.vue.d.ts +0 -2
  38. package/dist/feedback/components/SourceList.vue.d.ts +0 -11
  39. package/dist/feedback/components/index.d.ts +0 -1
  40. package/dist/feedback/index.d.ts +0 -7
  41. package/dist/feedback/index.type.d.ts +0 -25
  42. package/dist/feedback/index.vue.d.ts +0 -13
  43. package/dist/history/components/index.d.ts +0 -2
  44. package/dist/history/components/item-tag.vue.d.ts +0 -5
  45. package/dist/history/components/search-empty.vue.d.ts +0 -7
  46. package/dist/history/composables/index.d.ts +0 -1
  47. package/dist/history/composables/useEditItemTitle.d.ts +0 -12
  48. package/dist/history/index.d.ts +0 -6
  49. package/dist/history/index.type.d.ts +0 -43
  50. package/dist/history/index.vue.d.ts +0 -2
  51. package/dist/icon-button/index.d.ts +0 -7
  52. package/dist/icon-button/index.type.d.ts +0 -6
  53. package/dist/icon-button/index.vue.d.ts +0 -6
  54. package/dist/node_modules/.pnpm/@opentiny_utils@1.0.0/node_modules/@opentiny/utils/dist/opentiny-utils.es.js +0 -832
  55. package/dist/node_modules/.pnpm/@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js +0 -2116
  56. package/dist/node_modules/.pnpm/@opentiny_vue-button@3.21.0/node_modules/@opentiny/vue-button/lib/index.js +0 -113
  57. package/dist/node_modules/.pnpm/@opentiny_vue-button@3.21.0/node_modules/@opentiny/vue-button/lib/pc.js +0 -93
  58. package/dist/node_modules/.pnpm/@opentiny_vue-common@3.21.0/node_modules/@opentiny/vue-common/lib/index.js +0 -727
  59. package/dist/node_modules/.pnpm/@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js +0 -710
  60. package/dist/node_modules/.pnpm/@opentiny_vue-dialog-box@3.21.0/node_modules/@opentiny/vue-dialog-box/lib/index.js +0 -198
  61. package/dist/node_modules/.pnpm/@opentiny_vue-dialog-box@3.21.0/node_modules/@opentiny/vue-dialog-box/lib/pc.js +0 -204
  62. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useEventListener.js +0 -10
  63. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useInstanceSlots.js +0 -14
  64. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useRelation.js +0 -54
  65. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popper.js +0 -85
  66. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/close.js +0 -29
  67. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/eyeclose.js +0 -42
  68. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/eyeopen.js +0 -43
  69. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/finish.js +0 -34
  70. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/fullscreen.js +0 -30
  71. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/loading-shadow.js +0 -77
  72. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/minscreen.js +0 -30
  73. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-after.js +0 -24
  74. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-before.js +0 -24
  75. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-after.js +0 -24
  76. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-before.js +0 -24
  77. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-center.js +0 -24
  78. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-left.js +0 -24
  79. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-right.js +0 -24
  80. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-bold.js +0 -24
  81. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-code-block.js +0 -24
  82. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-code-view.js +0 -24
  83. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-color.js +0 -24
  84. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-column.js +0 -24
  85. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-row.js +0 -24
  86. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-table.js +0 -24
  87. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-font-size.js +0 -24
  88. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-format-clear.js +0 -24
  89. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h1.js +0 -24
  90. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h2.js +0 -24
  91. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h3.js +0 -24
  92. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h4.js +0 -24
  93. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h5.js +0 -24
  94. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h6.js +0 -24
  95. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-heading.js +0 -24
  96. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-high-light.js +0 -24
  97. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-image.js +0 -24
  98. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-italic.js +0 -24
  99. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-line-height.js +0 -24
  100. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-link-unlink.js +0 -24
  101. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-link.js +0 -24
  102. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-list-ordered.js +0 -24
  103. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-list-unordered.js +0 -24
  104. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells-vertical.js +0 -24
  105. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells.js +0 -24
  106. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-node-delete.js +0 -24
  107. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-paragraph.js +0 -24
  108. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-quote-text.js +0 -24
  109. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-redo.js +0 -24
  110. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-horizontal.js +0 -24
  111. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-vertical.js +0 -24
  112. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-strike-through.js +0 -24
  113. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-subscript.js +0 -24
  114. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-superscript.js +0 -24
  115. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-table.js +0 -24
  116. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-task-list.js +0 -24
  117. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-underline.js +0 -24
  118. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-undo.js +0 -24
  119. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/sub-script.js +0 -29
  120. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/warn.js +0 -26
  121. package/dist/node_modules/.pnpm/@opentiny_vue-input@3.21.0/node_modules/@opentiny/vue-input/lib/index.js +0 -196
  122. package/dist/node_modules/.pnpm/@opentiny_vue-input@3.21.0/node_modules/@opentiny/vue-input/lib/pc.js +0 -568
  123. package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.21.0/node_modules/@opentiny/vue-locale/lib/index.js +0 -1783
  124. package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.22.0/node_modules/@opentiny/vue-locale/lib/index.js +0 -1783
  125. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/button/index.js +0 -13
  126. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/button/vue.js +0 -34
  127. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/chunk-G2ADBYYC.js +0 -12
  128. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/browser.js +0 -36
  129. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/clickoutside.js +0 -47
  130. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/debounce.js +0 -7
  131. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/dom.js +0 -45
  132. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popper.js +0 -320
  133. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popup-manager.js +0 -118
  134. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/throttle.js +0 -23
  135. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useEventListener.js +0 -9
  136. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useInstanceSlots.js +0 -14
  137. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useRelation.js +0 -54
  138. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popper.js +0 -84
  139. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popup.js +0 -73
  140. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/event.js +0 -13
  141. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/function.js +0 -5
  142. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/index.js +0 -11
  143. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/object.js +0 -84
  144. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/string.js +0 -28
  145. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/type.js +0 -28
  146. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/dialog-box/index.js +0 -136
  147. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/dialog-box/vue.js +0 -148
  148. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/input/index.js +0 -228
  149. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/input/vue.js +0 -263
  150. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/index.js +0 -63
  151. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/vue-storage-box.js +0 -16
  152. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/vue.js +0 -23
  153. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tooltip/index.js +0 -78
  154. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tooltip/vue.js +0 -90
  155. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/index.js +0 -77
  156. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/vue.js +0 -90
  157. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.21.0/node_modules/@opentiny/vue-tooltip/lib/index.js +0 -173
  158. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.21.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +0 -248
  159. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/index.js +0 -176
  160. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +0 -248
  161. package/dist/node_modules/.pnpm/@vueuse_core@13.1.0_vue@3.5.13/node_modules/@vueuse/core/index.js +0 -310
  162. package/dist/node_modules/.pnpm/@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js +0 -110
  163. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.js +0 -277
  164. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.js +0 -46
  165. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.js +0 -7
  166. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js +0 -7
  167. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.js +0 -187
  168. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.js +0 -19
  169. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_blocks.js +0 -67
  170. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_re.js +0 -5
  171. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/utils.js +0 -164
  172. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/index.js +0 -8
  173. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_destination.js +0 -44
  174. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_label.js +0 -21
  175. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_title.js +0 -37
  176. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/index.js +0 -112
  177. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_block.js +0 -63
  178. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_core.js +0 -34
  179. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_inline.js +0 -96
  180. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/commonmark.js +0 -78
  181. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/default.js +0 -40
  182. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/zero.js +0 -59
  183. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/renderer.js +0 -127
  184. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/ruler.js +0 -95
  185. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/blockquote.js +0 -59
  186. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/code.js +0 -23
  187. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/fence.js +0 -30
  188. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/heading.js +0 -28
  189. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/hr.js +0 -27
  190. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/html_block.js +0 -37
  191. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/lheading.js +0 -43
  192. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/list.js +0 -110
  193. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/paragraph.js +0 -25
  194. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/reference.js +0 -95
  195. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/state_block.js +0 -84
  196. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/table.js +0 -99
  197. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/block.js +0 -7
  198. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/inline.js +0 -10
  199. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/linkify.js +0 -57
  200. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/normalize.js +0 -9
  201. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/replacements.js +0 -31
  202. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/smartquotes.js +0 -80
  203. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/state_core.js +0 -8
  204. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/text_join.js +0 -16
  205. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/autolink.js +0 -46
  206. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/backticks.js +0 -31
  207. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/balance_pairs.js +0 -34
  208. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/emphasis.js +0 -57
  209. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/entity.js +0 -33
  210. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/escape.js +0 -32
  211. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/fragments_join.js +0 -10
  212. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/html_inline.js +0 -32
  213. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/image.js +0 -48
  214. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/link.js +0 -40
  215. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/linkify.js +0 -28
  216. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/newline.js +0 -23
  217. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/state_inline.js +0 -27
  218. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/strikethrough.js +0 -54
  219. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/text.js +0 -39
  220. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/token.js +0 -31
  221. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.js +0 -10
  222. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.js +0 -61
  223. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.js +0 -48
  224. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.js +0 -7
  225. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.js +0 -74
  226. package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.js +0 -139
  227. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.js +0 -4
  228. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.js +0 -4
  229. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.js +0 -4
  230. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.js +0 -4
  231. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.js +0 -4
  232. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.js +0 -14
  233. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.js +0 -4
  234. package/dist/packages/components/src/action-group/ActionGroup.vue.js +0 -7
  235. package/dist/packages/components/src/action-group/ActionGroup.vue2.js +0 -121
  236. package/dist/packages/components/src/action-group/ActionGroupItem.vue.js +0 -14
  237. package/dist/packages/components/src/action-group/ActionGroupItem.vue2.js +0 -4
  238. package/dist/packages/components/src/action-group/index.js +0 -17
  239. package/dist/packages/components/src/assets/icons/accessory.svg.js +0 -4
  240. package/dist/packages/components/src/assets/icons/loading-speech.svg.js +0 -4
  241. package/dist/packages/components/src/assets/icons/loading.svg.js +0 -4
  242. package/dist/packages/components/src/assets/icons/send.svg.js +0 -4
  243. package/dist/packages/components/src/assets/icons/voice.svg.js +0 -4
  244. package/dist/packages/components/src/bubble/Bubble.vue.js +0 -7
  245. package/dist/packages/components/src/bubble/Bubble.vue2.js +0 -76
  246. package/dist/packages/components/src/bubble/BubbleList.vue.js +0 -7
  247. package/dist/packages/components/src/bubble/BubbleList.vue2.js +0 -50
  248. package/dist/packages/components/src/bubble/index.js +0 -18
  249. package/dist/packages/components/src/container/index.js +0 -9
  250. package/dist/packages/components/src/container/index.vue.js +0 -7
  251. package/dist/packages/components/src/container/index.vue2.js +0 -55
  252. package/dist/packages/components/src/conversations/index.js +0 -9
  253. package/dist/packages/components/src/conversations/index.vue.js +0 -9
  254. package/dist/packages/components/src/feedback/components/SourceList.vue.js +0 -7
  255. package/dist/packages/components/src/feedback/components/SourceList.vue2.js +0 -52
  256. package/dist/packages/components/src/feedback/index.js +0 -9
  257. package/dist/packages/components/src/feedback/index.vue.js +0 -7
  258. package/dist/packages/components/src/feedback/index.vue2.js +0 -143
  259. package/dist/packages/components/src/history/components/item-tag.vue.js +0 -7
  260. package/dist/packages/components/src/history/components/item-tag.vue2.js +0 -21
  261. package/dist/packages/components/src/history/components/search-empty.vue.js +0 -7
  262. package/dist/packages/components/src/history/components/search-empty.vue2.js +0 -20
  263. package/dist/packages/components/src/history/composables/useEditItemTitle.js +0 -43
  264. package/dist/packages/components/src/history/index.js +0 -11
  265. package/dist/packages/components/src/history/index.vue.js +0 -7
  266. package/dist/packages/components/src/history/index.vue2.js +0 -130
  267. package/dist/packages/components/src/icon-button/index.js +0 -9
  268. package/dist/packages/components/src/icon-button/index.vue.js +0 -7
  269. package/dist/packages/components/src/icon-button/index.vue2.js +0 -22
  270. package/dist/packages/components/src/prompts/index.js +0 -18
  271. package/dist/packages/components/src/prompts/prompt.vue.js +0 -7
  272. package/dist/packages/components/src/prompts/prompt.vue2.js +0 -39
  273. package/dist/packages/components/src/prompts/prompts.vue.js +0 -7
  274. package/dist/packages/components/src/prompts/prompts.vue2.js +0 -36
  275. package/dist/packages/components/src/question/components/CommonQuestions.vue.js +0 -89
  276. package/dist/packages/components/src/question/components/CommonQuestions.vue2.js +0 -4
  277. package/dist/packages/components/src/question/components/HotQuestions.vue.js +0 -140
  278. package/dist/packages/components/src/question/components/HotQuestions.vue2.js +0 -4
  279. package/dist/packages/components/src/question/composables/useQuestions.js +0 -48
  280. package/dist/packages/components/src/question/index.js +0 -9
  281. package/dist/packages/components/src/question/index.vue.js +0 -113
  282. package/dist/packages/components/src/question/index.vue2.js +0 -4
  283. package/dist/packages/components/src/sender/components/ActionButtons.vue.js +0 -143
  284. package/dist/packages/components/src/sender/components/ActionButtons.vue2.js +0 -4
  285. package/dist/packages/components/src/sender/components/TemplateEditor.vue.js +0 -7
  286. package/dist/packages/components/src/sender/components/TemplateEditor.vue2.js +0 -175
  287. package/dist/packages/components/src/sender/composables/useInputHandler.js +0 -38
  288. package/dist/packages/components/src/sender/composables/useKeyboardHandler.js +0 -31
  289. package/dist/packages/components/src/sender/composables/useSpeechHandler.js +0 -67
  290. package/dist/packages/components/src/sender/index.js +0 -9
  291. package/dist/packages/components/src/sender/index.vue.js +0 -255
  292. package/dist/packages/components/src/sender/index.vue2.js +0 -4
  293. package/dist/packages/components/src/suggestion/components/CategoryNav.vue.js +0 -38
  294. package/dist/packages/components/src/suggestion/components/CategoryNav.vue2.js +0 -4
  295. package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue.js +0 -107
  296. package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue2.js +0 -4
  297. package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue.js +0 -123
  298. package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue2.js +0 -4
  299. package/dist/packages/components/src/suggestion/composables/useKeyboardNavigation.js +0 -45
  300. package/dist/packages/components/src/suggestion/composables/useTriggerDetection.js +0 -17
  301. package/dist/packages/components/src/suggestion/index.js +0 -9
  302. package/dist/packages/components/src/suggestion/index.vue.js +0 -179
  303. package/dist/packages/components/src/suggestion/index.vue2.js +0 -4
  304. package/dist/packages/components/src/suggestion/utils/dom.js +0 -18
  305. package/dist/packages/components/src/welcome/index.js +0 -9
  306. package/dist/packages/components/src/welcome/index.vue.js +0 -7
  307. package/dist/packages/components/src/welcome/index.vue2.js +0 -32
  308. package/dist/prompts/index.d.ts +0 -12
  309. package/dist/prompts/index.type.d.ts +0 -55
  310. package/dist/prompts/prompt.vue.d.ts +0 -3
  311. package/dist/prompts/prompts.vue.d.ts +0 -20
  312. package/dist/question/components/CommonQuestions.vue.d.ts +0 -32
  313. package/dist/question/components/HotQuestions.vue.d.ts +0 -89
  314. package/dist/question/composables/useQuestions.d.ts +0 -17
  315. package/dist/question/index.d.ts +0 -7
  316. package/dist/question/index.type.d.ts +0 -74
  317. package/dist/question/index.vue.d.ts +0 -46
  318. package/dist/sender/components/ActionButtons.vue.d.ts +0 -25
  319. package/dist/sender/components/TemplateEditor.vue.d.ts +0 -18
  320. package/dist/sender/composables/useInputHandler.d.ts +0 -17
  321. package/dist/sender/composables/useKeyboardHandler.d.ts +0 -18
  322. package/dist/sender/composables/useSpeechHandler.d.ts +0 -8
  323. package/dist/sender/index.d.ts +0 -7
  324. package/dist/sender/index.type.d.ts +0 -137
  325. package/dist/sender/index.vue.d.ts +0 -1012
  326. package/dist/suggestion/components/CategoryNav.vue.d.ts +0 -45
  327. package/dist/suggestion/components/SuggestionCapsule.vue.d.ts +0 -32
  328. package/dist/suggestion/components/SuggestionPanel.vue.d.ts +0 -84
  329. package/dist/suggestion/composables/useKeyboardNavigation.d.ts +0 -18
  330. package/dist/suggestion/composables/useSuggestionFilter.d.ts +0 -10
  331. package/dist/suggestion/composables/useTriggerDetection.d.ts +0 -11
  332. package/dist/suggestion/index.d.ts +0 -7
  333. package/dist/suggestion/index.type.d.ts +0 -94
  334. package/dist/suggestion/index.vue.d.ts +0 -343
  335. package/dist/suggestion/utils/dom.d.ts +0 -20
  336. package/dist/welcome/index.d.ts +0 -7
  337. package/dist/welcome/index.type.d.ts +0 -10
  338. package/dist/welcome/index.vue.d.ts +0 -18
  339. package/src/action-group/ActionGroup.vue +0 -247
  340. package/src/action-group/ActionGroupItem.vue +0 -9
  341. package/src/action-group/index.ts +0 -25
  342. package/src/action-group/index.type.ts +0 -21
  343. package/src/assets/icons/accessory.svg +0 -12
  344. package/src/assets/icons/loading-speech.svg +0 -16
  345. package/src/assets/icons/loading.svg +0 -17
  346. package/src/assets/icons/send.svg +0 -21
  347. package/src/assets/icons/voice.svg +0 -22
  348. package/src/bubble/Bubble.vue +0 -153
  349. package/src/bubble/BubbleList.vue +0 -55
  350. package/src/bubble/index.ts +0 -23
  351. package/src/bubble/index.type.ts +0 -49
  352. package/src/container/index.ts +0 -12
  353. package/src/container/index.type.ts +0 -17
  354. package/src/container/index.vue +0 -109
  355. package/src/conversations/index.ts +0 -12
  356. package/src/conversations/index.vue +0 -3
  357. package/src/feedback/components/SourceList.vue +0 -112
  358. package/src/feedback/components/index.ts +0 -1
  359. package/src/feedback/index.ts +0 -12
  360. package/src/feedback/index.type.ts +0 -27
  361. package/src/feedback/index.vue +0 -166
  362. package/src/history/components/index.ts +0 -2
  363. package/src/history/components/item-tag.vue +0 -49
  364. package/src/history/components/search-empty.vue +0 -38
  365. package/src/history/composables/index.ts +0 -1
  366. package/src/history/composables/useEditItemTitle.ts +0 -75
  367. package/src/history/index.ts +0 -12
  368. package/src/history/index.type.ts +0 -50
  369. package/src/history/index.vue +0 -292
  370. package/src/icon-button/index.ts +0 -12
  371. package/src/icon-button/index.type.ts +0 -7
  372. package/src/icon-button/index.vue +0 -58
  373. package/src/index.ts +0 -76
  374. package/src/prompts/index.ts +0 -25
  375. package/src/prompts/index.type.ts +0 -59
  376. package/src/prompts/prompt.vue +0 -101
  377. package/src/prompts/prompts.vue +0 -50
  378. package/src/question/components/CommonQuestions.vue +0 -146
  379. package/src/question/components/HotQuestions.vue +0 -148
  380. package/src/question/composables/useQuestions.ts +0 -106
  381. package/src/question/index.less +0 -447
  382. package/src/question/index.ts +0 -12
  383. package/src/question/index.type.ts +0 -86
  384. package/src/question/index.vue +0 -140
  385. package/src/question/vars.less +0 -135
  386. package/src/sender/components/ActionButtons.vue +0 -168
  387. package/src/sender/components/TemplateEditor.vue +0 -465
  388. package/src/sender/composables/useInputHandler.ts +0 -74
  389. package/src/sender/composables/useKeyboardHandler.ts +0 -101
  390. package/src/sender/composables/useSpeechHandler.ts +0 -122
  391. package/src/sender/index.less +0 -352
  392. package/src/sender/index.ts +0 -12
  393. package/src/sender/index.type.ts +0 -162
  394. package/src/sender/index.vue +0 -338
  395. package/src/sender/vars.less +0 -84
  396. package/src/suggestion/components/CategoryNav.vue +0 -38
  397. package/src/suggestion/components/SuggestionCapsule.vue +0 -183
  398. package/src/suggestion/components/SuggestionPanel.vue +0 -147
  399. package/src/suggestion/composables/useKeyboardNavigation.ts +0 -101
  400. package/src/suggestion/composables/useSuggestionFilter.ts +0 -34
  401. package/src/suggestion/composables/useTriggerDetection.ts +0 -46
  402. package/src/suggestion/index.less +0 -497
  403. package/src/suggestion/index.ts +0 -12
  404. package/src/suggestion/index.type.ts +0 -101
  405. package/src/suggestion/index.vue +0 -338
  406. package/src/suggestion/utils/dom.ts +0 -66
  407. package/src/suggestion/vars.less +0 -141
  408. package/src/vite-env.d.ts +0 -1
  409. package/src/welcome/index.ts +0 -12
  410. package/src/welcome/index.type.ts +0 -12
  411. package/src/welcome/index.vue +0 -69
  412. package/tsconfig.json +0 -37
  413. package/tsconfig.node.json +0 -10
  414. package/vite.config.ts +0 -53
@@ -1,75 +0,0 @@
1
- import { onClickOutside } from '@vueuse/core'
2
- import { ComponentPublicInstance, nextTick, ref, watchEffect } from 'vue'
3
- import { HistoryEvents, HistoryItem } from '../index.type'
4
-
5
- export const useEditItemTitle = (emit: HistoryEvents) => {
6
- const editingItem = ref<Pick<HistoryItem, 'id' | 'title'> & { rawData: HistoryItem }>()
7
-
8
- const handleEdit = (item: HistoryItem) => {
9
- editingItem.value = {
10
- id: item.id,
11
- title: item.title,
12
- rawData: item,
13
- }
14
- }
15
-
16
- const inputRef = ref<HTMLInputElement | null>(null)
17
-
18
- const handleEditorInputRef = (el: Element | ComponentPublicInstance | null) => {
19
- if (!el) {
20
- return
21
- }
22
-
23
- nextTick(() => {
24
- inputRef.value = el as HTMLInputElement
25
- inputRef.value.focus()
26
- })
27
- }
28
-
29
- let stopFn: (() => void) | undefined = undefined
30
-
31
- const handleConfirm = () => {
32
- if (editingItem.value) {
33
- if (editingItem.value.title !== editingItem.value.rawData.title) {
34
- const { title, rawData } = editingItem.value
35
- emit('item-title-change', title, rawData)
36
- }
37
- editingItem.value = undefined
38
- }
39
-
40
- stopFn?.()
41
- stopFn = undefined
42
- }
43
-
44
- const handleCancel = () => {
45
- editingItem.value = undefined
46
- stopFn?.()
47
- stopFn = undefined
48
- }
49
-
50
- const handleKeyDown = (e: KeyboardEvent) => {
51
- if (e.key === 'Enter') {
52
- handleConfirm()
53
- } else if (e.key === 'Escape') {
54
- handleCancel()
55
- }
56
- }
57
-
58
- watchEffect(() => {
59
- if (!inputRef.value) {
60
- return
61
- }
62
-
63
- stopFn?.()
64
- stopFn = onClickOutside(inputRef, () => {
65
- handleConfirm()
66
- })
67
- })
68
-
69
- return {
70
- editingItem,
71
- handleEdit,
72
- handleEditorInputRef,
73
- handleKeyDown,
74
- }
75
- }
@@ -1,12 +0,0 @@
1
- import { App } from 'vue'
2
- import History from './index.vue'
3
-
4
- const install = function <T>(app: App<T>) {
5
- app.component('TrHistory', History)
6
- }
7
-
8
- export default {
9
- ...History,
10
- install,
11
- name: 'TrHistory',
12
- }
@@ -1,50 +0,0 @@
1
- import { CSSProperties } from 'vue'
2
-
3
- interface BaseHistoryProps {
4
- activeTab?: string
5
- searchBar?: boolean
6
- searchQuery?: string
7
- searchPlaceholder?: string
8
- searchFn?: (query: string, item: HistoryItem) => boolean
9
- selected?: string
10
- }
11
-
12
- export type SingleTabHistoryProps = {
13
- tabTitle: string
14
- data: HistoryGroup[]
15
- } & BaseHistoryProps
16
-
17
- export type MultiTabHistoryProps = {
18
- tabs: {
19
- title: string
20
- id: string
21
- }[]
22
- data: Record<string, HistoryGroup[]>
23
- } & BaseHistoryProps
24
-
25
- export type HistoryProps = SingleTabHistoryProps | MultiTabHistoryProps
26
-
27
- export interface HistoryGroup<T = Record<string, unknown>> {
28
- date: string
29
- items: HistoryItem<T>[]
30
- }
31
-
32
- export interface HistoryItemTagProps {
33
- text: string
34
- type?: 'success' | 'warning' | 'error' | 'info' | 'default'
35
- style?: CSSProperties
36
- }
37
-
38
- export interface HistoryItem<T = Record<string, unknown>> {
39
- id: string
40
- title: string
41
- tag?: HistoryItemTagProps
42
- data?: T
43
- }
44
-
45
- export interface HistoryEvents {
46
- (e: 'close'): void
47
- (e: 'item-click', item: HistoryItem): void
48
- (e: 'item-title-change', newTitle: string, rawData: HistoryItem): void
49
- (e: 'item-delete', item: HistoryItem): void
50
- }
@@ -1,292 +0,0 @@
1
- <script lang="ts" setup>
2
- import { IconClose, IconDelete, IconEditPen, IconSearch } from '@opentiny/tiny-robot-svgs'
3
- import { TinyButton, TinyInput } from '@opentiny/vue'
4
- import { computed } from 'vue'
5
- import { ItemTag, SearchEmpty } from './components'
6
- import { useEditItemTitle } from './composables'
7
- import type {
8
- HistoryEvents,
9
- HistoryGroup,
10
- HistoryItem,
11
- HistoryProps,
12
- MultiTabHistoryProps,
13
- SingleTabHistoryProps,
14
- } from './index.type'
15
-
16
- const props = withDefaults(defineProps<HistoryProps>(), {
17
- searchFn: (query: string, { title }: HistoryItem) => {
18
- if (!query) {
19
- return true
20
- }
21
-
22
- return title.toLowerCase().includes(query.toLowerCase())
23
- },
24
- })
25
-
26
- const activeTab = defineModel<HistoryProps['activeTab']>('activeTab')
27
- const searchQuery = defineModel<HistoryProps['searchQuery']>('searchQuery')
28
-
29
- const emit = defineEmits<HistoryEvents>()
30
-
31
- const computedTabs = computed(() => {
32
- if (Array.isArray((props as MultiTabHistoryProps).tabs)) {
33
- return (props as MultiTabHistoryProps).tabs
34
- }
35
-
36
- return [{ title: (props as SingleTabHistoryProps).tabTitle, id: '0' }]
37
- })
38
-
39
- const computedActiveTab = computed(() => {
40
- return activeTab.value || computedTabs.value[0].id
41
- })
42
-
43
- const enableTabBottomBorder = computed(() => {
44
- return computedTabs.value.length > 1
45
- })
46
-
47
- const groups = computed(() => {
48
- if (Array.isArray(props.data)) {
49
- return props.data || []
50
- }
51
-
52
- return props.data[computedActiveTab.value] || []
53
- })
54
-
55
- const filteredGroups = computed(() => {
56
- if (!props.searchBar) {
57
- return groups.value
58
- }
59
-
60
- const groupsWithFilteredItems = groups.value.map((group) => {
61
- return {
62
- ...group,
63
- items: group.items.filter((item) => props.searchFn(searchQuery.value || '', item)),
64
- } as HistoryGroup
65
- })
66
-
67
- return groupsWithFilteredItems.filter((group) => group.items.length > 0)
68
- })
69
-
70
- const handleItemClick = (item: HistoryItem) => {
71
- if (item.id === editingItem.value?.id) {
72
- return
73
- }
74
-
75
- emit('item-click', item)
76
- }
77
-
78
- const handleClose = () => {
79
- emit('close')
80
- }
81
-
82
- const handleDelete = (item: HistoryItem) => {
83
- // TODO 删除确认弹窗
84
- emit('item-delete', item)
85
- }
86
-
87
- const { editingItem, handleEdit, handleEditorInputRef, handleKeyDown } = useEditItemTitle(emit)
88
- </script>
89
-
90
- <template>
91
- <div class="tr-history">
92
- <div class="tr-history__tabs">
93
- <div
94
- v-for="tab in computedTabs"
95
- :key="tab.id"
96
- :class="['tr-history__tab', { active: computedActiveTab === tab.id }]"
97
- @click="activeTab = tab.id"
98
- >
99
- {{ tab.title }}
100
- </div>
101
- </div>
102
- <div v-if="props.searchBar" class="tr-history__search">
103
- <tiny-input
104
- v-model="searchQuery"
105
- :placeholder="props.searchPlaceholder || '搜索对话名称'"
106
- :prefix-icon="IconSearch"
107
- clearable
108
- />
109
- </div>
110
- <div class="tr-history__content">
111
- <template v-if="filteredGroups.length > 0">
112
- <div v-for="group in filteredGroups" :key="group.date" class="tr-history__group">
113
- <div class="tr-history__date">
114
- <span>{{ group.date }}</span>
115
- </div>
116
- <div
117
- v-for="item in group.items"
118
- :key="`${item.id}-${item.title}`"
119
- :class="['tr-history__item', { selected: props.selected === item.id }]"
120
- @click="handleItemClick(item)"
121
- >
122
- <template v-if="editingItem?.id !== item.id">
123
- <span class="tr-history__item-title">{{ item.title }}</span>
124
- <ItemTag v-if="item.tag" class="tr-history__item-tag" v-bind="item.tag" />
125
- <div class="tr-history__item-actions">
126
- <!-- TODO add popover提示 -->
127
- <tiny-button :icon="IconEditPen" type="text" size="mini" @click.stop="handleEdit(item)" />
128
- <tiny-button :icon="IconDelete" type="text" size="mini" @click.stop="handleDelete(item)" />
129
- </div>
130
- </template>
131
- <template v-else>
132
- <input
133
- v-model="editingItem.title"
134
- class="tr-history__item-edit"
135
- :ref="handleEditorInputRef"
136
- v-on:keydown="handleKeyDown"
137
- />
138
- </template>
139
- </div>
140
- </div>
141
- </template>
142
- <SearchEmpty v-else :text="searchQuery ? '暂无搜索结果' : '暂无内容'" />
143
- </div>
144
- <div class="tr-history__close">
145
- <tiny-button :icon="IconClose" type="text" size="mini" @click="handleClose" />
146
- </div>
147
- </div>
148
- </template>
149
-
150
- <style lang="less" scoped>
151
- .tr-history {
152
- display: flex;
153
- gap: 16px;
154
- flex-direction: column;
155
- background: #fff;
156
- border-radius: 24px;
157
- padding: 0 20px;
158
- position: relative;
159
- color: rgb(25, 25, 25);
160
-
161
- .tr-history__tabs {
162
- flex-shrink: 0;
163
- display: flex;
164
- padding-top: 24px;
165
- gap: 32px;
166
- font-size: 16px;
167
- line-height: 1.5;
168
- border-bottom: v-bind("enableTabBottomBorder ? '1px solid rgb(240, 240, 240)': 'none'");
169
-
170
- .tr-history__tab {
171
- cursor: pointer;
172
- padding-bottom: 8px;
173
-
174
- &.active {
175
- font-weight: 600;
176
- border-bottom: v-bind("enableTabBottomBorder ? '2px solid rgb(25, 25, 25)': 'none'");
177
- }
178
- }
179
- }
180
-
181
- .tr-history__close {
182
- position: absolute;
183
- right: 16px;
184
- top: 16px;
185
- }
186
-
187
- .tr-history__search {
188
- flex-shrink: 0;
189
-
190
- :deep(.tiny-input__inner) {
191
- border-radius: 999px;
192
- }
193
- }
194
-
195
- .tr-history__content {
196
- flex: 1;
197
- display: flex;
198
- flex-direction: column;
199
- gap: 12px;
200
- overflow-y: auto;
201
- padding: 0 20px;
202
- margin: 0 -20px;
203
- margin-bottom: 12px;
204
-
205
- .tr-history__date {
206
- font-size: 12px;
207
- line-height: 20px;
208
- padding: 4px 12px;
209
- color: rgb(128, 128, 128);
210
- background-color: rgb(255, 255, 255);
211
- position: sticky;
212
- top: 0;
213
- z-index: 10;
214
- }
215
-
216
- .tr-history__item {
217
- --tr-history-item-bg: rgb(255, 255, 255);
218
-
219
- display: flex;
220
- align-items: center;
221
- font-size: 14px;
222
- line-height: 24px;
223
- border-radius: 12px;
224
- background-color: var(--tr-history-item-bg);
225
- cursor: pointer;
226
- position: relative;
227
- z-index: 1;
228
- transition: box-shadow 0.3s ease;
229
-
230
- &:hover {
231
- box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.08);
232
- z-index: 20;
233
-
234
- .tr-history__item-actions {
235
- opacity: 1;
236
- }
237
- }
238
-
239
- &.selected {
240
- --tr-history-item-bg: rgb(222, 236, 255);
241
- }
242
-
243
- .tr-history__item-title {
244
- padding: 10px 12px;
245
- font-size: 14px;
246
- overflow: hidden;
247
- text-overflow: ellipsis;
248
- white-space: nowrap;
249
- }
250
-
251
- .tr-history__item-tag {
252
- flex-shrink: 0;
253
- margin-right: 12px;
254
- }
255
-
256
- .tr-history__item-actions {
257
- display: flex;
258
- gap: 8px;
259
- opacity: 0;
260
- position: absolute;
261
- right: 12px;
262
- background-color: var(--tr-history-item-bg);
263
-
264
- &::before {
265
- content: '';
266
- position: absolute;
267
- right: 100%;
268
- width: 40px;
269
- height: 100%;
270
-
271
- background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, var(--tr-history-item-bg) 100%);
272
- }
273
- }
274
-
275
- .tr-history__item-edit {
276
- width: 100%;
277
- font-size: 14px;
278
- height: 44px;
279
- border-radius: 12px;
280
- border: 1px solid rgb(20, 118, 255);
281
- padding: 0 12px;
282
- }
283
- }
284
- }
285
-
286
- .tiny-button {
287
- --tv-Button-height: 20px;
288
- --tv-Button-border-radius-only-icon-ontext: 999px;
289
- margin: 0;
290
- }
291
- }
292
- </style>
@@ -1,12 +0,0 @@
1
- import { App } from 'vue'
2
- import IconButton from './index.vue'
3
-
4
- IconButton.name = 'TrIconButton'
5
-
6
- const install = function <T>(app: App<T>) {
7
- app.component(IconButton.name!, IconButton)
8
- }
9
-
10
- IconButton.install = install
11
-
12
- export default IconButton as typeof IconButton & { install: typeof install }
@@ -1,7 +0,0 @@
1
- import { Component, VNode } from 'vue'
2
-
3
- export interface IconButtonProps {
4
- icon: VNode | Component
5
- size?: string | number
6
- svgSize?: string | number
7
- }
@@ -1,58 +0,0 @@
1
- <script setup lang="ts">
2
- import { IconButtonProps } from './index.type'
3
- import { computed } from 'vue'
4
-
5
- const props = withDefaults(defineProps<IconButtonProps>(), {
6
- size: '24px',
7
- svgSize: '16px',
8
- })
9
-
10
- const formatSize = (size: string | number) => {
11
- if (!isNaN(Number(size))) {
12
- return `${size}px`
13
- }
14
-
15
- return size as string
16
- }
17
-
18
- const size = computed(() => formatSize(props.size))
19
- const svgSize = computed(() => formatSize(props.svgSize))
20
- </script>
21
-
22
- <template>
23
- <button class="tr-icon-button">
24
- <component :is="props.icon" />
25
- </button>
26
- </template>
27
- <style lang="less" scoped>
28
- button.tr-icon-button {
29
- --tr-icon-button-bg: transparent;
30
- --tr-icon-button-hover-bg: rgba(0, 0, 0, 0.04);
31
- --tr-icon-button-active-bg: rgba(0, 0, 0, 0.15);
32
- --tr-icon-button-border-radius: 8px;
33
-
34
- width: v-bind('size');
35
- height: v-bind('size');
36
- display: inline-flex;
37
- align-items: center;
38
- justify-content: center;
39
- border: none;
40
- border-radius: var(--tr-icon-button-border-radius);
41
- cursor: pointer;
42
- padding: 0;
43
- transition: background-color 0.3s;
44
- background-color: var(--tr-icon-button-bg);
45
-
46
- &:hover {
47
- background-color: var(--tr-icon-button-hover-bg);
48
- }
49
-
50
- &:active {
51
- background-color: var(--tr-icon-button-active-bg);
52
- }
53
-
54
- svg {
55
- font-size: v-bind('svgSize');
56
- }
57
- }
58
- </style>
package/src/index.ts DELETED
@@ -1,76 +0,0 @@
1
- import { App } from 'vue'
2
- import { Bubble, BubbleList } from './bubble'
3
- import Container from './container'
4
- import Conversations from './conversations'
5
- import Feedback from './feedback'
6
- import History from './history'
7
- import IconButton from './icon-button'
8
- import { Prompt, Prompts } from './prompts'
9
- import Question from './question'
10
- import Sender from './sender'
11
- import Welcome from './welcome'
12
- import Suggestion from './suggestion'
13
-
14
- export * from './bubble/index.type'
15
- export * from './container/index.type'
16
- export * from './feedback/index.type'
17
- export * from './history/index.type'
18
- export * from './icon-button/index.type'
19
- export * from './prompts/index.type'
20
- export * from './sender/index.type'
21
- export * from './welcome/index.type'
22
- export * from './suggestion/index.type'
23
-
24
- const components = [
25
- Bubble,
26
- BubbleList,
27
- Container,
28
- Conversations,
29
- Feedback,
30
- History,
31
- IconButton,
32
- Prompt,
33
- Prompts,
34
- Question,
35
- Sender,
36
- Welcome,
37
- Suggestion,
38
- ]
39
-
40
- export default {
41
- install<T>(app: App<T>) {
42
- components.forEach((component) => {
43
- const name = component.name!.replace(/^Tiny/, '').replace(/^Tr/, '')
44
- app.component(`Tr${name}`, component)
45
- })
46
- },
47
- }
48
-
49
- export {
50
- Bubble,
51
- Bubble as TrBubble,
52
- BubbleList,
53
- BubbleList as TrBubbleList,
54
- Container,
55
- Container as TrContainer,
56
- Conversations,
57
- Conversations as TrConversations,
58
- Feedback,
59
- Feedback as TrFeedback,
60
- History,
61
- History as TrHistory,
62
- IconButton,
63
- IconButton as TrIconButton,
64
- Prompt,
65
- Prompt as TrPrompt,
66
- Prompts,
67
- Prompts as TrPrompts,
68
- Sender,
69
- Sender as TrSender,
70
- Welcome,
71
- Welcome as TrWelcome,
72
- Suggestion,
73
- Suggestion as TrSuggestion,
74
- Question,
75
- Question as TrQuestion,
76
- }
@@ -1,25 +0,0 @@
1
- import { App } from 'vue'
2
- import PromptComp from './prompt.vue'
3
- import PromptsComp from './prompts.vue'
4
-
5
- // TrPrompt
6
- PromptComp.name = 'TrPrompt'
7
-
8
- const installPrompt = function <T>(app: App<T>) {
9
- app.component(PromptComp.name!, PromptComp)
10
- }
11
-
12
- PromptComp.install = installPrompt
13
-
14
- export const Prompt = PromptComp as typeof PromptComp & { install: typeof installPrompt }
15
-
16
- // TrPrompts
17
- PromptsComp.name = 'TrPrompts'
18
-
19
- const installPrompts = function <T>(app: App<T>) {
20
- app.component(PromptsComp.name!, PromptsComp)
21
- }
22
-
23
- PromptsComp.install = installPrompts
24
-
25
- export const Prompts = PromptsComp as typeof PromptsComp & { install: typeof installPrompts }
@@ -1,59 +0,0 @@
1
- import { CSSProperties, VNode } from 'vue'
2
-
3
- export interface PromptProps {
4
- /**
5
- * 提示标签,显示提示的主要内容
6
- */
7
- label: string
8
- /**
9
- * 唯一标识用于区分每个提示项,用于 Prompts 列表。如果不传此参数,则使用 index 作为 key
10
- */
11
- id?: string
12
- /**
13
- * 提示描述,提供额外的信息
14
- */
15
- description?: string
16
- /**
17
- * 提示图标,显示在提示项的左侧
18
- */
19
- icon?: VNode
20
- /**
21
- * 是否禁用。默认 false
22
- */
23
- disabled?: boolean
24
- /**
25
- * 提示徽章,显示在提示项的右上角
26
- */
27
- badge?: string | VNode
28
- }
29
-
30
- export interface PromptsProps {
31
- /**
32
- * 包含多个提示项的列表
33
- */
34
- items: PromptProps[]
35
- /**
36
- * 自定义样式,用于各个提示项的不同部分
37
- */
38
- itemStyle?: string | CSSProperties
39
- /**
40
- * 自定义类名,用于各个提示项的不同部分
41
- */
42
- itemClass?: string | string[]
43
- /**
44
- * 提示列表是否垂直排列。默认 false
45
- */
46
- vertical?: boolean
47
- /**
48
- * 提示列表是否折行。默认 false
49
- */
50
- wrap?: boolean
51
- }
52
-
53
- export interface PromptsEvents {
54
- (e: 'item-click', ev: MouseEvent, item: PromptProps): void
55
- }
56
-
57
- export interface PromptsSlots {
58
- footer?: () => unknown
59
- }