@opentiny/tiny-robot 0.1.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 (260) hide show
  1. package/.vscode/extensions.json +3 -0
  2. package/README.md +1 -0
  3. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  4. package/dist/bubble-item/components/actions/copy.vue.d.ts +10 -0
  5. package/dist/bubble-item/components/actions/index.d.ts +2 -0
  6. package/dist/bubble-item/components/actions/refresh.vue.d.ts +2 -0
  7. package/dist/bubble-item/components/icons/ai.vue.d.ts +2 -0
  8. package/dist/bubble-item/components/icons/index.d.ts +2 -0
  9. package/dist/bubble-item/components/icons/user.vue.d.ts +2 -0
  10. package/dist/bubble-item/index.d.ts +7 -0
  11. package/dist/bubble-list/bubble-list.vue.d.ts +5 -0
  12. package/dist/bubble-list/index.d.ts +8 -0
  13. package/dist/bubble-list/index.type.d.ts +55 -0
  14. package/dist/conversations/index.d.ts +7 -0
  15. package/dist/conversations/index.vue.d.ts +2 -0
  16. package/dist/index.d.ts +12 -0
  17. package/dist/index.js +29 -0
  18. package/dist/node_modules/.pnpm/@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js +2202 -0
  19. package/dist/node_modules/.pnpm/@opentiny_vue-button@3.22.0/node_modules/@opentiny/vue-button/lib/index.js +113 -0
  20. package/dist/node_modules/.pnpm/@opentiny_vue-button@3.22.0/node_modules/@opentiny/vue-button/lib/pc.js +93 -0
  21. package/dist/node_modules/.pnpm/@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js +725 -0
  22. package/dist/node_modules/.pnpm/@opentiny_vue-dialog-box@3.22.0/node_modules/@opentiny/vue-dialog-box/lib/index.js +198 -0
  23. package/dist/node_modules/.pnpm/@opentiny_vue-dialog-box@3.22.0/node_modules/@opentiny/vue-dialog-box/lib/pc.js +204 -0
  24. package/dist/node_modules/.pnpm/@opentiny_vue-directive@3.22.0/node_modules/@opentiny/vue-directive/index.js +57 -0
  25. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useEventListener.js +10 -0
  26. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useInstanceSlots.js +14 -0
  27. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useRelation.js +54 -0
  28. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popper.js +85 -0
  29. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popup.js +69 -0
  30. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/close.js +29 -0
  31. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/eyeclose.js +42 -0
  32. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/eyeopen.js +43 -0
  33. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/finish.js +34 -0
  34. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/fullscreen.js +30 -0
  35. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/loading-shadow.js +78 -0
  36. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/minscreen.js +30 -0
  37. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-after.js +24 -0
  38. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-before.js +24 -0
  39. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-after.js +24 -0
  40. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-before.js +24 -0
  41. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-center.js +24 -0
  42. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-left.js +24 -0
  43. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-right.js +24 -0
  44. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-bold.js +24 -0
  45. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-code-block.js +24 -0
  46. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-code-view.js +24 -0
  47. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-color.js +24 -0
  48. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-column.js +24 -0
  49. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-row.js +24 -0
  50. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-table.js +24 -0
  51. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-font-size.js +24 -0
  52. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-format-clear.js +24 -0
  53. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-h1.js +24 -0
  54. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-h2.js +24 -0
  55. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-h3.js +24 -0
  56. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-h4.js +24 -0
  57. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-h5.js +24 -0
  58. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-h6.js +24 -0
  59. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-heading.js +24 -0
  60. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-high-light.js +24 -0
  61. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-image.js +24 -0
  62. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-italic.js +24 -0
  63. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-line-height.js +24 -0
  64. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-link-unlink.js +24 -0
  65. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-link.js +24 -0
  66. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-list-ordered.js +24 -0
  67. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-list-unordered.js +24 -0
  68. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells-vertical.js +24 -0
  69. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells.js +24 -0
  70. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-node-delete.js +24 -0
  71. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-paragraph.js +24 -0
  72. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-quote-text.js +24 -0
  73. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-redo.js +24 -0
  74. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-horizontal.js +24 -0
  75. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-vertical.js +24 -0
  76. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-strike-through.js +24 -0
  77. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-subscript.js +24 -0
  78. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-superscript.js +24 -0
  79. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-table.js +24 -0
  80. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-task-list.js +24 -0
  81. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-underline.js +24 -0
  82. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-undo.js +24 -0
  83. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/sub-script.js +29 -0
  84. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/warn.js +26 -0
  85. package/dist/node_modules/.pnpm/@opentiny_vue-input@3.22.0/node_modules/@opentiny/vue-input/lib/index.js +196 -0
  86. package/dist/node_modules/.pnpm/@opentiny_vue-input@3.22.0/node_modules/@opentiny/vue-input/lib/pc.js +568 -0
  87. package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.22.0/node_modules/@opentiny/vue-locale/lib/index.js +1783 -0
  88. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/button/index.js +13 -0
  89. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/button/vue.js +34 -0
  90. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/chunk-G2ADBYYC.js +12 -0
  91. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/dialog-box/index.js +135 -0
  92. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/dialog-box/vue.js +149 -0
  93. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/input/index.js +228 -0
  94. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/input/vue.js +263 -0
  95. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tall-storage/index.js +63 -0
  96. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tall-storage/vue-storage-box.js +16 -0
  97. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tall-storage/vue.js +23 -0
  98. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/index.js +77 -0
  99. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/vue.js +90 -0
  100. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/index.js +176 -0
  101. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +248 -0
  102. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.js +277 -0
  103. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.js +46 -0
  104. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.js +7 -0
  105. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js +7 -0
  106. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.js +187 -0
  107. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.js +19 -0
  108. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +5 -0
  109. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +10 -0
  110. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTrim.js +8 -0
  111. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +4 -0
  112. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +15 -0
  113. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +7 -0
  114. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +5 -0
  115. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_trimmedEndIndex.js +9 -0
  116. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/debounce.js +54 -0
  117. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +7 -0
  118. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js +6 -0
  119. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js +9 -0
  120. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/now.js +7 -0
  121. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toNumber.js +22 -0
  122. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_blocks.js +67 -0
  123. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_re.js +5 -0
  124. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/utils.js +164 -0
  125. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/index.js +8 -0
  126. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_destination.js +44 -0
  127. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_label.js +21 -0
  128. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_title.js +37 -0
  129. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/index.js +112 -0
  130. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_block.js +63 -0
  131. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_core.js +34 -0
  132. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_inline.js +96 -0
  133. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/commonmark.js +78 -0
  134. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/default.js +40 -0
  135. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/zero.js +59 -0
  136. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/renderer.js +127 -0
  137. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/ruler.js +95 -0
  138. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/blockquote.js +59 -0
  139. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/code.js +23 -0
  140. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/fence.js +30 -0
  141. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/heading.js +28 -0
  142. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/hr.js +27 -0
  143. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/html_block.js +37 -0
  144. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/lheading.js +43 -0
  145. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/list.js +110 -0
  146. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/paragraph.js +25 -0
  147. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/reference.js +95 -0
  148. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/state_block.js +84 -0
  149. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/table.js +99 -0
  150. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/block.js +7 -0
  151. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/inline.js +10 -0
  152. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/linkify.js +57 -0
  153. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/normalize.js +9 -0
  154. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/replacements.js +31 -0
  155. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/smartquotes.js +80 -0
  156. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/state_core.js +8 -0
  157. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/text_join.js +16 -0
  158. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/autolink.js +46 -0
  159. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/backticks.js +31 -0
  160. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/balance_pairs.js +34 -0
  161. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/emphasis.js +57 -0
  162. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/entity.js +33 -0
  163. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/escape.js +32 -0
  164. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/fragments_join.js +10 -0
  165. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/html_inline.js +32 -0
  166. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/image.js +48 -0
  167. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/link.js +40 -0
  168. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/linkify.js +28 -0
  169. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/newline.js +23 -0
  170. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/state_inline.js +27 -0
  171. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/strikethrough.js +54 -0
  172. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/text.js +39 -0
  173. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/token.js +31 -0
  174. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.js +10 -0
  175. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.js +61 -0
  176. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.js +48 -0
  177. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.js +7 -0
  178. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.js +74 -0
  179. package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.js +139 -0
  180. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.js +4 -0
  181. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.js +4 -0
  182. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.js +4 -0
  183. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.js +4 -0
  184. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.js +4 -0
  185. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.js +14 -0
  186. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.js +4 -0
  187. package/dist/packages/components/src/assets/icons/accessory.svg.js +4 -0
  188. package/dist/packages/components/src/assets/icons/loading-speech.svg.js +4 -0
  189. package/dist/packages/components/src/assets/icons/loading.svg.js +4 -0
  190. package/dist/packages/components/src/assets/icons/send.svg.js +4 -0
  191. package/dist/packages/components/src/assets/icons/voice.svg.js +4 -0
  192. package/dist/packages/components/src/bubble-item/bubble-item.vue.js +7 -0
  193. package/dist/packages/components/src/bubble-item/bubble-item.vue2.js +111 -0
  194. package/dist/packages/components/src/bubble-item/components/actions/copy.vue.js +46 -0
  195. package/dist/packages/components/src/bubble-item/components/actions/copy.vue2.js +4 -0
  196. package/dist/packages/components/src/bubble-item/components/actions/refresh.vue.js +12 -0
  197. package/dist/packages/components/src/bubble-item/components/icons/ai.vue.js +45 -0
  198. package/dist/packages/components/src/bubble-item/components/icons/user.vue.js +63 -0
  199. package/dist/packages/components/src/bubble-item/index.js +9 -0
  200. package/dist/packages/components/src/bubble-list/bubble-list.vue.js +7 -0
  201. package/dist/packages/components/src/bubble-list/bubble-list.vue2.js +52 -0
  202. package/dist/packages/components/src/bubble-list/index.js +9 -0
  203. package/dist/packages/components/src/conversations/index.js +9 -0
  204. package/dist/packages/components/src/conversations/index.vue.js +9 -0
  205. package/dist/packages/components/src/sender/components/ActionButtons.vue.js +161 -0
  206. package/dist/packages/components/src/sender/components/ActionButtons.vue2.js +4 -0
  207. package/dist/packages/components/src/sender/composables/useInputHandler.js +34 -0
  208. package/dist/packages/components/src/sender/composables/useKeyboardHandler.js +31 -0
  209. package/dist/packages/components/src/sender/composables/useSpeechHandler.js +67 -0
  210. package/dist/packages/components/src/sender/index.js +9 -0
  211. package/dist/packages/components/src/sender/index.vue.js +233 -0
  212. package/dist/packages/components/src/sender/index.vue2.js +4 -0
  213. package/dist/packages/components/src/welcome/index.js +9 -0
  214. package/dist/packages/components/src/welcome/index.vue.js +9 -0
  215. package/dist/sender/components/ActionButtons.vue.d.ts +23 -0
  216. package/dist/sender/composables/useInputHandler.d.ts +17 -0
  217. package/dist/sender/composables/useKeyboardHandler.d.ts +18 -0
  218. package/dist/sender/composables/useSpeechHandler.d.ts +14 -0
  219. package/dist/sender/index.d.ts +7 -0
  220. package/dist/sender/index.type.d.ts +90 -0
  221. package/dist/sender/index.vue.d.ts +948 -0
  222. package/dist/style.css +1 -0
  223. package/dist/welcome/index.d.ts +7 -0
  224. package/dist/welcome/index.vue.d.ts +2 -0
  225. package/package.json +42 -0
  226. package/src/assets/icons/accessory.svg +12 -0
  227. package/src/assets/icons/loading-speech.svg +16 -0
  228. package/src/assets/icons/loading.svg +17 -0
  229. package/src/assets/icons/send.svg +21 -0
  230. package/src/assets/icons/voice.svg +22 -0
  231. package/src/bubble-item/bubble-item.vue +264 -0
  232. package/src/bubble-item/components/actions/copy.vue +47 -0
  233. package/src/bubble-item/components/actions/index.ts +2 -0
  234. package/src/bubble-item/components/actions/refresh.vue +27 -0
  235. package/src/bubble-item/components/icons/ai.vue +30 -0
  236. package/src/bubble-item/components/icons/index.ts +2 -0
  237. package/src/bubble-item/components/icons/user.vue +78 -0
  238. package/src/bubble-item/index.ts +12 -0
  239. package/src/bubble-list/bubble-list.vue +53 -0
  240. package/src/bubble-list/index.ts +14 -0
  241. package/src/bubble-list/index.type.ts +65 -0
  242. package/src/conversations/index.ts +12 -0
  243. package/src/conversations/index.vue +3 -0
  244. package/src/index.ts +30 -0
  245. package/src/sender/components/ActionButtons.vue +165 -0
  246. package/src/sender/composables/useInputHandler.ts +69 -0
  247. package/src/sender/composables/useKeyboardHandler.ts +99 -0
  248. package/src/sender/composables/useSpeechHandler.ts +128 -0
  249. package/src/sender/global.d.ts +44 -0
  250. package/src/sender/index.less +344 -0
  251. package/src/sender/index.ts +12 -0
  252. package/src/sender/index.type.ts +111 -0
  253. package/src/sender/index.vue +289 -0
  254. package/src/sender/vars.less +84 -0
  255. package/src/vite-env.d.ts +1 -0
  256. package/src/welcome/index.ts +12 -0
  257. package/src/welcome/index.vue +3 -0
  258. package/tsconfig.json +37 -0
  259. package/tsconfig.node.json +10 -0
  260. package/vite.config.ts +53 -0
@@ -0,0 +1,9 @@
1
+ import n from "../../../../_virtual/_plugin-vue_export-helper.js";
2
+ const r = {};
3
+ function e(o, t) {
4
+ return "conversations";
5
+ }
6
+ const s = /* @__PURE__ */ n(r, [["render", e]]);
7
+ export {
8
+ s as default
9
+ };
@@ -0,0 +1,161 @@
1
+ import { defineComponent as T, computed as n, createElementBlock as i, openBlock as t, createBlock as c, createCommentVNode as d, unref as o, withCtx as l, createVNode as r, createElementVNode as g, normalizeClass as R, resolveDynamicComponent as E } from "vue";
2
+ import N from "../../assets/icons/accessory.svg.js";
3
+ import V from "../../assets/icons/voice.svg.js";
4
+ import D from "../../assets/icons/loading-speech.svg.js";
5
+ import F from "../../assets/icons/send.svg.js";
6
+ import q from "../../assets/icons/loading.svg.js";
7
+ import u from "../../../../../node_modules/.pnpm/@opentiny_vue-button@3.22.0/node_modules/@opentiny/vue-button/lib/index.js";
8
+ import p from "../../../../../node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/index.js";
9
+ import x from "../../../../../node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/close.js";
10
+ const z = { class: "action-buttons" }, A = {
11
+ key: 0,
12
+ src: V,
13
+ class: "button-icon",
14
+ alt: "录音"
15
+ }, I = {
16
+ key: 1,
17
+ src: D,
18
+ class: "button-icon recording-icon",
19
+ alt: "语音中"
20
+ }, j = { class: "button-content" }, G = {
21
+ key: 0,
22
+ src: F,
23
+ alt: "发送"
24
+ }, H = {
25
+ key: 1,
26
+ src: q,
27
+ alt: "加载中",
28
+ class: "loading"
29
+ }, X = /* @__PURE__ */ T({
30
+ __name: "ActionButtons",
31
+ props: {
32
+ loading: { type: Boolean, default: !1 },
33
+ disabled: { type: Boolean, default: !1 },
34
+ showClear: { type: Boolean, default: !0 },
35
+ hasContent: { type: Boolean, default: !1 },
36
+ allowSpeech: { type: Boolean, default: !1 },
37
+ speechStatus: { default: () => ({
38
+ isRecording: !1,
39
+ isSupported: !1
40
+ }) },
41
+ allowFiles: { type: Boolean, default: !1 },
42
+ submitType: { default: "enter" },
43
+ showShortcuts: { type: Boolean }
44
+ },
45
+ emits: {
46
+ /**
47
+ * 清除内容事件
48
+ */
49
+ clear: () => !0,
50
+ /**
51
+ * 切换语音识别状态事件
52
+ * @param {boolean} state - 新的语音识别状态
53
+ */
54
+ "toggle-speech": (m) => !!m,
55
+ /**
56
+ * 提交内容事件
57
+ */
58
+ submit: () => !0
59
+ },
60
+ setup(m, { emit: _ }) {
61
+ const y = x(), a = m, f = _, v = n(() => a.allowSpeech), C = n(() => a.speechStatus.isRecording ? "停止录音" : "开始语音输入"), h = n(() => a.speechStatus.isRecording), k = n(() => a.loading ? "发送中..." : "发送消息"), s = n(() => a.disabled), B = () => {
62
+ s.value || f("clear");
63
+ }, S = () => {
64
+ if (!s.value) {
65
+ const e = !a.speechStatus.isRecording;
66
+ f("toggle-speech", e);
67
+ }
68
+ }, w = () => {
69
+ s.value || f("submit");
70
+ };
71
+ return (e, b) => (t(), i("div", z, [
72
+ e.allowFiles && !e.loading ? (t(), c(o(p), {
73
+ key: 0,
74
+ content: "上传文件",
75
+ placement: "top"
76
+ }, {
77
+ default: l(() => [
78
+ r(o(u), {
79
+ type: "text",
80
+ disabled: s.value
81
+ }, {
82
+ default: l(() => b[0] || (b[0] = [
83
+ g("img", {
84
+ src: N,
85
+ class: "button-icon",
86
+ alt: "上传文件"
87
+ }, null, -1)
88
+ ])),
89
+ _: 1
90
+ }, 8, ["disabled"])
91
+ ]),
92
+ _: 1
93
+ })) : d("", !0),
94
+ v.value && !e.loading ? (t(), c(o(p), {
95
+ key: 1,
96
+ content: C.value,
97
+ placement: "top"
98
+ }, {
99
+ default: l(() => [
100
+ r(o(u), {
101
+ type: "text",
102
+ disabled: s.value,
103
+ onClick: S,
104
+ class: R(["speech-button", { "is-recording": h.value }])
105
+ }, {
106
+ default: l(() => [
107
+ h.value ? (t(), i("img", I)) : (t(), i("img", A))
108
+ ]),
109
+ _: 1
110
+ }, 8, ["disabled", "class"])
111
+ ]),
112
+ _: 1
113
+ }, 8, ["content"])) : d("", !0),
114
+ e.showClear ? (t(), c(o(p), {
115
+ key: 2,
116
+ content: "清空内容",
117
+ placement: "top"
118
+ }, {
119
+ default: l(() => [
120
+ r(o(u), {
121
+ type: "text",
122
+ disabled: s.value || !e.hasContent,
123
+ onClick: B,
124
+ style: { "margin-left": "0" }
125
+ }, {
126
+ default: l(() => [
127
+ (t(), c(E(o(y)), { class: "button-icon" }))
128
+ ]),
129
+ _: 1
130
+ }, 8, ["disabled"])
131
+ ]),
132
+ _: 1
133
+ })) : d("", !0),
134
+ e.hasContent || e.loading ? (t(), c(o(p), {
135
+ key: 3,
136
+ content: k.value,
137
+ placement: "top"
138
+ }, {
139
+ default: l(() => [
140
+ r(o(u), {
141
+ type: "text",
142
+ onClick: w,
143
+ class: "submit-button",
144
+ disabled: s.value
145
+ }, {
146
+ default: l(() => [
147
+ g("div", j, [
148
+ e.loading ? (t(), i("img", H)) : (t(), i("img", G))
149
+ ])
150
+ ]),
151
+ _: 1
152
+ }, 8, ["disabled"])
153
+ ]),
154
+ _: 1
155
+ }, 8, ["content"])) : d("", !0)
156
+ ]));
157
+ }
158
+ });
159
+ export {
160
+ X as default
161
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ActionButtons.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,34 @@
1
+ import { ref as n, watch as m } from "vue";
2
+ import s from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/debounce.js";
3
+ function h(a, l) {
4
+ const u = n(a.defaultValue || ""), o = n(null);
5
+ m(
6
+ () => a.modelValue,
7
+ (e) => {
8
+ e !== void 0 && e !== u.value && (u.value = e);
9
+ }
10
+ );
11
+ const d = (e) => {
12
+ u.value = e, l("update:modelValue", e);
13
+ }, c = s((e) => {
14
+ !a.disabled && !a.loading && e.trim() && l("submit", e);
15
+ }, a.debounceSubmit), i = (e) => {
16
+ e == null || e.preventDefault(), c(u.value);
17
+ }, t = () => {
18
+ u.value = "", l("update:modelValue", ""), l("clear");
19
+ }, r = n(!1);
20
+ return {
21
+ inputValue: u,
22
+ inputWrapper: o,
23
+ isComposing: r,
24
+ handleChange: d,
25
+ handleSubmit: i,
26
+ handleClear: t,
27
+ clearInput: () => {
28
+ t();
29
+ }
30
+ };
31
+ }
32
+ export {
33
+ h as useInputHandler
34
+ };
@@ -0,0 +1,31 @@
1
+ function h(r, s, t, c, n, l, f) {
2
+ const a = (e) => !r.disabled && !r.loading && e.trim().length > 0, i = () => {
3
+ a(t.value) && (alert("提交成功"), s("submit", t.value.trim()));
4
+ }, o = (e, u) => {
5
+ if (!(e.key === "Enter")) return !1;
6
+ switch (u) {
7
+ case "enter":
8
+ return console.log("enter"), !e.shiftKey && !e.ctrlKey && !e.metaKey;
9
+ case "ctrlEnter":
10
+ return console.log("ctrlEnter"), (e.ctrlKey || e.metaKey) && !e.shiftKey;
11
+ case "shiftEnter":
12
+ return console.log("shiftEnter"), e.shiftKey && !e.ctrlKey && !e.metaKey;
13
+ default:
14
+ return !1;
15
+ }
16
+ };
17
+ return {
18
+ handleKeyPress: (e) => {
19
+ if (c.value) return;
20
+ if (e.key === "Escape") {
21
+ l.value ? (l.value = !1, e.preventDefault()) : n.isRecording && (f(), e.preventDefault()), s("escape-press");
22
+ return;
23
+ }
24
+ o(e, r.submitType) && a(t.value) && (e.preventDefault(), i());
25
+ },
26
+ triggerSubmit: i
27
+ };
28
+ }
29
+ export {
30
+ h as useKeyboardHandler
31
+ };
@@ -0,0 +1,67 @@
1
+ import { reactive as f } from "vue";
2
+ function R(r) {
3
+ const n = f({
4
+ isRecording: !1,
5
+ isSupported: "webkitSpeechRecognition" in window || "SpeechRecognition" in window,
6
+ error: void 0
7
+ }), a = n.isSupported ? new (window.webkitSpeechRecognition || window.SpeechRecognition)() : null;
8
+ a && (a.continuous = r.continuous ?? !1, a.interimResults = r.interimResults ?? !0, a.lang = r.lang ?? navigator.language, a.onstart = () => {
9
+ var e;
10
+ n.isRecording = !0, n.error = void 0, (e = r.onStart) == null || e.call(r);
11
+ }, a.onend = () => {
12
+ var e;
13
+ n.isRecording = !1, (e = r.onEnd) == null || e.call(r);
14
+ }, a.onresult = (e) => {
15
+ var i, u;
16
+ const c = Array.from(e.results).map((g) => g[0].transcript).join("");
17
+ e.results[0].isFinal ? (i = r.onFinal) == null || i.call(r, c) : (u = r.onInterim) == null || u.call(r, c);
18
+ }, a.onerror = (e) => {
19
+ var c;
20
+ n.error = new Error(e.error), n.isRecording = !1, (c = r.onError) == null || c.call(r, n.error);
21
+ });
22
+ const l = () => {
23
+ var e;
24
+ if (!a) {
25
+ const c = new Error("浏览器不支持语音识别");
26
+ n.error = c, (e = r.onError) == null || e.call(r, c);
27
+ return;
28
+ }
29
+ if (n.isRecording) {
30
+ try {
31
+ a.stop(), setTimeout(() => {
32
+ try {
33
+ a.start();
34
+ } catch (c) {
35
+ t(c);
36
+ }
37
+ }, 100);
38
+ } catch (c) {
39
+ t(c);
40
+ }
41
+ return;
42
+ }
43
+ try {
44
+ a.start();
45
+ } catch (c) {
46
+ t(c);
47
+ }
48
+ }, d = () => {
49
+ if (a && n.isRecording)
50
+ try {
51
+ a.stop();
52
+ } catch (e) {
53
+ t(e);
54
+ }
55
+ }, t = (e) => {
56
+ var c;
57
+ n.error = e instanceof Error ? e : new Error("语音识别操作失败"), n.isRecording = !1, (c = r.onError) == null || c.call(r, n.error);
58
+ };
59
+ return {
60
+ speechState: n,
61
+ start: l,
62
+ stop: d
63
+ };
64
+ }
65
+ export {
66
+ R as useSpeechHandler
67
+ };
@@ -0,0 +1,9 @@
1
+ import n from "./index.vue.js";
2
+ n.name = "TrSender";
3
+ const a = function(t) {
4
+ t.component(n.name, n);
5
+ };
6
+ n.install = a;
7
+ export {
8
+ n as default
9
+ };
@@ -0,0 +1,233 @@
1
+ import { defineComponent as G, ref as k, computed as r, watch as J, createElementBlock as o, openBlock as n, normalizeClass as z, createElementVNode as u, createVNode as d, createCommentVNode as i, Transition as L, withCtx as $, renderSlot as b, unref as l, isRef as Q, normalizeStyle as X, toDisplayString as _, Fragment as Y, renderList as Z } from "vue";
2
+ import x from "../../../../node_modules/.pnpm/@opentiny_vue-input@3.22.0/node_modules/@opentiny/vue-input/lib/index.js";
3
+ import { useInputHandler as ee } from "./composables/useInputHandler.js";
4
+ import { useKeyboardHandler as se } from "./composables/useKeyboardHandler.js";
5
+ import { useSpeechHandler as te } from "./composables/useSpeechHandler.js";
6
+ import j from "./components/ActionButtons.vue.js";
7
+ /* empty css */
8
+ const oe = ["data-theme"], ne = { class: "tiny-sender__container" }, le = { class: "tiny-sender__input-wrapper" }, ae = {
9
+ key: 0,
10
+ class: "tiny-sender__header-slot"
11
+ }, ie = {
12
+ key: 0,
13
+ class: "tiny-sender__prefix-slot"
14
+ }, re = { class: "tiny-sender__content-area" }, ue = {
15
+ key: 1,
16
+ class: "tiny-sender__actions-slot"
17
+ }, de = { class: "tiny-sender__buttons-container" }, ce = {
18
+ key: 0,
19
+ class: "tiny-sender__footer-slot"
20
+ }, pe = {
21
+ key: 0,
22
+ class: "tiny-sender__word-limit"
23
+ }, me = {
24
+ key: 1,
25
+ class: "tiny-sender__toolbar"
26
+ }, he = { class: "tiny-sender__buttons-container" }, fe = {
27
+ key: 0,
28
+ class: "tiny-sender__suggestions"
29
+ }, ye = ["onClick"], ge = {
30
+ key: 0,
31
+ class: "tiny-sender__error"
32
+ }, $e = /* @__PURE__ */ G({
33
+ __name: "index",
34
+ props: {
35
+ autofocus: { type: Boolean, default: !1 },
36
+ autoSize: { type: [Boolean, Object], default: !1 },
37
+ allowSpeech: { type: Boolean, default: !0 },
38
+ allowFiles: { type: Boolean, default: !1 },
39
+ clearable: { type: Boolean, default: !1 },
40
+ disabled: { type: Boolean, default: !1 },
41
+ defaultValue: {},
42
+ debounceSubmit: { default: 300 },
43
+ loading: { type: Boolean, default: !1 },
44
+ modelValue: { default: "" },
45
+ mode: { default: "single" },
46
+ maxLength: { default: 1 / 0 },
47
+ submitType: { default: "enter" },
48
+ speech: { type: [Boolean, Object] },
49
+ placeholder: { default: "请输入内容..." },
50
+ showWordLimit: { type: Boolean, default: !1 },
51
+ suggestions: {},
52
+ theme: { default: "light" }
53
+ },
54
+ emits: ["update:modelValue", "submit", "clear", "speech-start", "speech-end", "speech-interim", "speech-error", "suggestion-select", "focus", "blur", "escape-press"],
55
+ setup(F, { expose: E, emit: K }) {
56
+ const t = F, a = K, c = k(null), { inputValue: s, isComposing: h, clearInput: w } = ee(t, a), f = k(!1), B = r(() => !t.suggestions || !s.value ? [] : t.suggestions.filter((e) => e.toLowerCase().includes(s.value.toLowerCase()))), R = (e) => {
57
+ s.value = e, f.value = !1, a("suggestion-select", e);
58
+ }, W = r(() => ({
59
+ ...typeof t.speech == "object" ? t.speech : {},
60
+ onStart: () => a("speech-start"),
61
+ onEnd: (e) => a("speech-end", e),
62
+ onInterim: (e) => a("speech-interim", e),
63
+ onFinal: (e) => {
64
+ s.value = e, a("speech-end", e);
65
+ },
66
+ onError: (e) => {
67
+ P(e.message), a("speech-error", e);
68
+ }
69
+ })), { speechState: y, start: V, stop: I } = te(W.value), S = () => {
70
+ y.isRecording ? I() : V();
71
+ }, { handleKeyPress: H, triggerSubmit: C } = se(
72
+ t,
73
+ a,
74
+ s,
75
+ h,
76
+ y,
77
+ f,
78
+ S
79
+ ), N = (e) => {
80
+ a("focus", e);
81
+ }, O = (e) => {
82
+ a("blur", e);
83
+ }, q = r(() => t.mode === "multiple" ? "textarea" : "text"), D = r(
84
+ () => ({
85
+ display: "flex",
86
+ justifyContent: t.showWordLimit && t.maxLength !== 1 / 0 ? "space-between" : "flex-end",
87
+ alignItems: "center"
88
+ })
89
+ ), g = r(() => t.disabled), T = r(() => t.loading), M = r(() => ({
90
+ "is-disabled": g.value,
91
+ "is-loading": T.value,
92
+ "has-error": !!p.value
93
+ })), p = k(""), P = (e) => {
94
+ p.value = e, setTimeout(() => p.value = "", 5e3);
95
+ }, U = () => {
96
+ h.value = !1, setTimeout(() => h.value = !1, 50);
97
+ };
98
+ return J(s, () => {
99
+ f.value = !!t.suggestions && !!s.value;
100
+ }), E({
101
+ focus: () => {
102
+ if (c.value)
103
+ c.value.focus();
104
+ else {
105
+ const e = document.querySelector(".tiny-input__inner");
106
+ e == null || e.focus();
107
+ }
108
+ },
109
+ blur: () => {
110
+ if (c.value)
111
+ c.value.blur();
112
+ else {
113
+ const e = document.querySelector(".tiny-input__inner");
114
+ e == null || e.blur();
115
+ }
116
+ },
117
+ clear: w,
118
+ submit: C,
119
+ startSpeech: V,
120
+ stopSpeech: I
121
+ }), (e, v) => (n(), o("div", {
122
+ class: z(["tiny-sender", [M.value, `theme-${e.theme}`, `mode-${e.mode}`]]),
123
+ "data-theme": e.theme
124
+ }, [
125
+ u("div", ne, [
126
+ u("div", le, [
127
+ d(L, { name: "tiny-sender-slide-down" }, {
128
+ default: $(() => [
129
+ e.$slots.header ? (n(), o("div", ae, [
130
+ b(e.$slots, "header")
131
+ ])) : i("", !0)
132
+ ]),
133
+ _: 3
134
+ }),
135
+ u("div", {
136
+ class: z(["tiny-sender__input-row", { "has-prefix": e.$slots.prefix, "has-header": e.$slots.header }])
137
+ }, [
138
+ e.$slots.prefix ? (n(), o("div", ie, [
139
+ b(e.$slots, "prefix")
140
+ ])) : i("", !0),
141
+ u("div", re, [
142
+ d(l(x), {
143
+ ref_key: "inputRef",
144
+ ref: c,
145
+ autosize: e.autoSize,
146
+ type: q.value,
147
+ readonly: T.value,
148
+ resize: e.mode === "multiple" ? "none" : void 0,
149
+ modelValue: l(s),
150
+ "onUpdate:modelValue": v[0] || (v[0] = (m) => Q(s) ? s.value = m : null),
151
+ disabled: g.value,
152
+ placeholder: e.placeholder,
153
+ maxlength: e.maxLength,
154
+ autofocus: e.autofocus,
155
+ onKeydown: l(H),
156
+ onCompositionstart: v[1] || (v[1] = (m) => h.value = !0),
157
+ onCompositionend: U,
158
+ onFocus: N,
159
+ onBlur: O
160
+ }, null, 8, ["autosize", "type", "readonly", "resize", "modelValue", "disabled", "placeholder", "maxlength", "autofocus", "onKeydown"])
161
+ ]),
162
+ e.mode === "single" ? (n(), o("div", ue, [
163
+ u("div", de, [
164
+ b(e.$slots, "actions"),
165
+ d(j, {
166
+ class: "inline-buttons",
167
+ "allow-speech": e.allowSpeech,
168
+ "allow-files": e.allowFiles,
169
+ loading: e.loading,
170
+ disabled: g.value,
171
+ "show-clear": e.clearable,
172
+ "has-content": !!l(s),
173
+ "speech-status": l(y),
174
+ "submit-type": e.submitType,
175
+ onClear: l(w),
176
+ onToggleSpeech: S,
177
+ onSubmit: l(C)
178
+ }, null, 8, ["allow-speech", "allow-files", "loading", "disabled", "show-clear", "has-content", "speech-status", "submit-type", "onClear", "onSubmit"])
179
+ ])
180
+ ])) : i("", !0)
181
+ ], 2),
182
+ d(L, { name: "tiny-sender-slide-up" }, {
183
+ default: $(() => [
184
+ e.$slots.footer ? (n(), o("div", ce, [
185
+ b(e.$slots, "footer")
186
+ ])) : e.mode !== "single" || e.showWordLimit && e.maxLength !== 1 / 0 ? (n(), o("div", {
187
+ key: 1,
188
+ style: X(D.value),
189
+ class: "tiny-sender__footer-slot tiny-sender__bottom-row"
190
+ }, [
191
+ e.showWordLimit && e.maxLength !== 1 / 0 ? (n(), o("div", pe, _(l(s).length) + "/" + _(e.maxLength), 1)) : i("", !0),
192
+ e.mode === "multiple" ? (n(), o("div", me, [
193
+ u("div", he, [
194
+ d(j, {
195
+ "allow-speech": e.allowSpeech,
196
+ "allow-files": e.allowFiles,
197
+ loading: e.loading,
198
+ disabled: g.value,
199
+ "show-clear": e.clearable,
200
+ "has-content": !!l(s),
201
+ "speech-status": l(y),
202
+ "submit-type": e.submitType,
203
+ onClear: l(w),
204
+ onToggleSpeech: S,
205
+ onSubmit: l(C)
206
+ }, null, 8, ["allow-speech", "allow-files", "loading", "disabled", "show-clear", "has-content", "speech-status", "submit-type", "onClear", "onSubmit"])
207
+ ])
208
+ ])) : i("", !0)
209
+ ], 4)) : i("", !0)
210
+ ]),
211
+ _: 3
212
+ })
213
+ ])
214
+ ]),
215
+ d(L, { name: "tiny-sender-slide-up" }, {
216
+ default: $(() => [
217
+ f.value && B.value.length ? (n(), o("div", fe, [
218
+ (n(!0), o(Y, null, Z(B.value, (m, A) => (n(), o("div", {
219
+ key: A,
220
+ class: "suggestion-item",
221
+ onClick: (ve) => R(m)
222
+ }, _(m), 9, ye))), 128))
223
+ ])) : i("", !0)
224
+ ]),
225
+ _: 1
226
+ }),
227
+ p.value ? (n(), o("div", ge, _(p.value), 1)) : i("", !0)
228
+ ], 10, oe));
229
+ }
230
+ });
231
+ export {
232
+ $e as default
233
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,9 @@
1
+ import e from "./index.vue.js";
2
+ e.name = "TrWelcome";
3
+ const o = function(n) {
4
+ n.component(e.name, e);
5
+ };
6
+ e.install = o;
7
+ export {
8
+ e as default
9
+ };
@@ -0,0 +1,9 @@
1
+ import e from "../../../../_virtual/_plugin-vue_export-helper.js";
2
+ const c = {};
3
+ function r(o, t) {
4
+ return "Welcome";
5
+ }
6
+ const _ = /* @__PURE__ */ e(c, [["render", r]]);
7
+ export {
8
+ _ as default
9
+ };
@@ -0,0 +1,23 @@
1
+ import { ActionButtonsProps } from '../index.type';
2
+ declare const _default: import('vue').DefineComponent<ActionButtonsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
3
+ clear: () => void;
4
+ submit: () => void;
5
+ "toggle-speech": (state: boolean) => void;
6
+ }, string, import('vue').PublicProps, Readonly<ActionButtonsProps> & Readonly<{
7
+ onClear?: (() => any) | undefined;
8
+ onSubmit?: (() => any) | undefined;
9
+ "onToggle-speech"?: ((state: boolean) => any) | undefined;
10
+ }>, {
11
+ loading: boolean;
12
+ disabled: boolean;
13
+ showClear: boolean;
14
+ hasContent: boolean;
15
+ allowSpeech: boolean;
16
+ speechStatus: {
17
+ isRecording: boolean;
18
+ isSupported: boolean;
19
+ };
20
+ allowFiles: boolean;
21
+ submitType: import('../index.type').SubmitTrigger;
22
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
23
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import { SenderProps, SenderEmits } from '../index.type';
2
+ /**
3
+ * 输入框值处理 Hook
4
+ * 对输入框的值进行集中处理
5
+ *
6
+ * @param props 组件属性
7
+ * @param emit 组件方法
8
+ */
9
+ export declare function useInputHandler(props: SenderProps, emit: SenderEmits): {
10
+ inputValue: import('vue').Ref<string, string>;
11
+ inputWrapper: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
12
+ isComposing: import('vue').Ref<boolean, boolean>;
13
+ handleChange: (value: string) => void;
14
+ handleSubmit: (event?: Event) => void;
15
+ handleClear: () => void;
16
+ clearInput: () => void;
17
+ };
@@ -0,0 +1,18 @@
1
+ import { Ref } from 'vue';
2
+ import { SenderProps, SenderEmits, SpeechState } from '../index.type';
3
+ /**
4
+ * 键盘处理Hook
5
+ * 集中管理组件的键盘相关操作
6
+ *
7
+ * @param props - 组件属性
8
+ * @param emit - 组件方法
9
+ * @param inputValue - 输入值
10
+ * @param isComposing - 是否处于输入法组合状态(即编辑态)
11
+ * @param speechState - 语音识别状态
12
+ * @param showSuggestions - 是否显示建议列表
13
+ * @param toggleSpeech - 切换语音识别函数
14
+ */
15
+ export declare function useKeyboardHandler(props: SenderProps, emit: SenderEmits, inputValue: Ref<string>, isComposing: Ref<boolean>, speechState: SpeechState, showSuggestions: Ref<boolean>, toggleSpeech: () => void): {
16
+ handleKeyPress: (event: KeyboardEvent) => void;
17
+ triggerSubmit: () => void;
18
+ };
@@ -0,0 +1,14 @@
1
+ import { SpeechHookOptions, SpeechHandler } from '../index.type';
2
+ declare global {
3
+ interface Window {
4
+ webkitSpeechRecognition: typeof SpeechRecognition;
5
+ SpeechRecognition: typeof SpeechRecognition;
6
+ }
7
+ }
8
+ /**
9
+ * 语音识别处理 Hook
10
+ * 集中管理语音识别相关逻辑
11
+ *
12
+ * @param options 语音识别配置
13
+ */
14
+ export declare function useSpeechHandler(options: SpeechHookOptions): SpeechHandler;
@@ -0,0 +1,7 @@
1
+ import { App } from 'vue';
2
+ import { default as Sender } from './index.vue';
3
+ declare const install: <T>(app: App<T>) => void;
4
+ declare const _default: typeof Sender & {
5
+ install: typeof install;
6
+ };
7
+ export default _default;