@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,289 @@
1
+ <script setup lang="ts">
2
+ import { computed, ref, watch } from 'vue'
3
+ import { TinyInput } from '@opentiny/vue'
4
+ import type { SenderProps, SenderEmits, InputHandler, KeyboardHandler } from './index.type'
5
+ import { useInputHandler } from './composables/useInputHandler'
6
+ import { useKeyboardHandler } from './composables/useKeyboardHandler'
7
+ import { useSpeechHandler } from './composables/useSpeechHandler'
8
+ import ActionButtons from './components/ActionButtons.vue'
9
+ import './index.less'
10
+
11
+ const props = withDefaults(defineProps<SenderProps>(), {
12
+ autofocus: false,
13
+ autoSize: false,
14
+ allowSpeech: true,
15
+ allowFiles: false,
16
+ clearable: false,
17
+ disabled: false,
18
+ debounceSubmit: 300,
19
+ loading: false,
20
+ modelValue: '',
21
+ mode: 'single',
22
+ maxLength: Infinity,
23
+ placeholder: '请输入内容...',
24
+ showWordLimit: false,
25
+ submitType: 'enter',
26
+ theme: 'light',
27
+ })
28
+
29
+ const emit = defineEmits<SenderEmits>()
30
+
31
+ // 输入引用
32
+ const inputRef = ref<HTMLElement | null>(null)
33
+
34
+ // 输入控制
35
+ const { inputValue, isComposing, clearInput }: InputHandler = useInputHandler(props, emit)
36
+
37
+ // 输入建议
38
+ const showSuggestions = ref(false)
39
+ const filteredSuggestions = computed(() => {
40
+ if (!props.suggestions || !inputValue.value) return []
41
+ return props.suggestions.filter((item) => item.toLowerCase().includes(inputValue.value.toLowerCase()))
42
+ })
43
+
44
+ const selectSuggestion = (value: string) => {
45
+ inputValue.value = value
46
+ showSuggestions.value = false
47
+ emit('suggestion-select', value)
48
+ }
49
+
50
+ // 语音识别
51
+ const speechOptions = computed(() => ({
52
+ ...(typeof props.speech === 'object' ? props.speech : {}),
53
+ onStart: () => emit('speech-start'),
54
+ onEnd: (transcript?: string) => emit('speech-end', transcript),
55
+ onInterim: (transcript: string) => emit('speech-interim', transcript),
56
+ onFinal: (text: string) => {
57
+ inputValue.value = text
58
+ emit('speech-end', text)
59
+ },
60
+ onError: (err: Error) => {
61
+ showError(err.message)
62
+ emit('speech-error', err)
63
+ },
64
+ }))
65
+
66
+ const { speechState, start: startSpeech, stop: stopSpeech } = useSpeechHandler(speechOptions.value)
67
+
68
+ // 语音控制
69
+ const toggleSpeech = () => {
70
+ if (speechState.isRecording) {
71
+ stopSpeech()
72
+ } else {
73
+ startSpeech()
74
+ }
75
+ }
76
+
77
+ // 键盘处理
78
+ const { handleKeyPress, triggerSubmit }: KeyboardHandler = useKeyboardHandler(
79
+ props,
80
+ emit,
81
+ inputValue,
82
+ isComposing,
83
+ speechState,
84
+ showSuggestions,
85
+ toggleSpeech,
86
+ )
87
+
88
+ // 处理焦点事件
89
+ const handleFocus = (event: FocusEvent) => {
90
+ emit('focus', event)
91
+ }
92
+
93
+ const handleBlur = (event: FocusEvent) => {
94
+ emit('blur', event)
95
+ }
96
+
97
+ // 输入框类型计算
98
+ const inputType = computed(() => (props.mode === 'multiple' ? 'textarea' : 'text'))
99
+
100
+ const justifyContent = computed(
101
+ (): {
102
+ display: string
103
+ justifyContent: 'space-between' | 'flex-end'
104
+ alignItems: string
105
+ } => {
106
+ const justifyContent = props.showWordLimit && props.maxLength !== Infinity ? 'space-between' : 'flex-end'
107
+
108
+ return {
109
+ display: 'flex',
110
+ justifyContent,
111
+ alignItems: 'center',
112
+ }
113
+ },
114
+ )
115
+
116
+ // 状态计算
117
+ const isDisabled = computed(() => props.disabled)
118
+ const isLoading = computed(() => props.loading)
119
+
120
+ // 样式类
121
+ const senderClasses = computed(() => ({
122
+ 'is-disabled': isDisabled.value,
123
+ 'is-loading': isLoading.value,
124
+ 'has-error': !!errorMessage.value,
125
+ }))
126
+
127
+ // 错误处理
128
+ const errorMessage = ref<string>('')
129
+ const showError = (msg: string) => {
130
+ errorMessage.value = msg
131
+ setTimeout(() => (errorMessage.value = ''), 5000)
132
+ }
133
+
134
+ // 输入法结束处理
135
+ const handleCompositionEnd = () => {
136
+ isComposing.value = false
137
+ setTimeout(() => (isComposing.value = false), 50)
138
+ }
139
+
140
+ // 监听输入变化
141
+ watch(inputValue, () => {
142
+ showSuggestions.value = !!props.suggestions && !!inputValue.value
143
+ })
144
+
145
+ // 暴露方法
146
+ defineExpose({
147
+ focus: () => {
148
+ if (inputRef.value) {
149
+ inputRef.value.focus()
150
+ } else {
151
+ const input = document.querySelector('.tiny-input__inner') as HTMLInputElement
152
+ input?.focus()
153
+ }
154
+ },
155
+ blur: () => {
156
+ if (inputRef.value) {
157
+ inputRef.value.blur()
158
+ } else {
159
+ const input = document.querySelector('.tiny-input__inner') as HTMLInputElement
160
+ input?.blur()
161
+ }
162
+ },
163
+ clear: clearInput,
164
+ submit: triggerSubmit,
165
+ startSpeech,
166
+ stopSpeech,
167
+ })
168
+ </script>
169
+
170
+ <template>
171
+ <div class="tiny-sender" :class="[senderClasses, `theme-${theme}`, `mode-${mode}`]" :data-theme="theme">
172
+ <!-- 输入区域容器 -->
173
+ <div class="tiny-sender__container">
174
+ <div class="tiny-sender__input-wrapper">
175
+ <!-- 头部插槽 -->
176
+ <Transition name="tiny-sender-slide-down">
177
+ <div v-if="$slots.header" class="tiny-sender__header-slot">
178
+ <slot name="header"></slot>
179
+ </div>
180
+ </Transition>
181
+
182
+ <!-- 输入行 - 横向布局 -->
183
+ <div class="tiny-sender__input-row" :class="{ 'has-prefix': $slots.prefix, 'has-header': $slots.header }">
184
+ <!-- 前缀插槽 -->
185
+ <div v-if="$slots.prefix" class="tiny-sender__prefix-slot">
186
+ <slot name="prefix" />
187
+ </div>
188
+
189
+ <!-- 内容区域 - 确保最小宽度,不被挤占 -->
190
+ <div class="tiny-sender__content-area">
191
+ <tiny-input
192
+ ref="inputRef"
193
+ :autosize="autoSize"
194
+ :type="inputType"
195
+ :readonly="isLoading"
196
+ :resize="mode === 'multiple' ? 'none' : undefined"
197
+ v-model="inputValue"
198
+ :disabled="isDisabled"
199
+ :placeholder="placeholder"
200
+ :maxlength="maxLength"
201
+ :autofocus="autofocus"
202
+ @keydown="handleKeyPress"
203
+ @compositionstart="isComposing = true"
204
+ @compositionend="handleCompositionEnd"
205
+ @focus="handleFocus"
206
+ @blur="handleBlur"
207
+ />
208
+ </div>
209
+
210
+ <!-- 操作区域/后置插槽 -->
211
+ <div v-if="mode === 'single'" class="tiny-sender__actions-slot">
212
+ <div class="tiny-sender__buttons-container">
213
+ <slot name="actions" />
214
+ <action-buttons
215
+ class="inline-buttons"
216
+ :allow-speech="allowSpeech"
217
+ :allow-files="allowFiles"
218
+ :loading="loading"
219
+ :disabled="isDisabled"
220
+ :show-clear="clearable"
221
+ :has-content="!!inputValue"
222
+ :speech-status="speechState"
223
+ :submit-type="submitType"
224
+ @clear="clearInput"
225
+ @toggle-speech="toggleSpeech"
226
+ @submit="triggerSubmit"
227
+ />
228
+ </div>
229
+ </div>
230
+ </div>
231
+
232
+ <!-- 底部插槽 - 底部工具栏作为默认内容 -->
233
+ <Transition name="tiny-sender-slide-up">
234
+ <div v-if="$slots.footer" class="tiny-sender__footer-slot">
235
+ <slot name="footer"></slot>
236
+ </div>
237
+ <div
238
+ v-else-if="mode !== 'single' || (showWordLimit && maxLength !== Infinity)"
239
+ :style="justifyContent"
240
+ class="tiny-sender__footer-slot tiny-sender__bottom-row"
241
+ >
242
+ <!-- 字数限制 -->
243
+ <div v-if="showWordLimit && maxLength !== Infinity" class="tiny-sender__word-limit">
244
+ {{ inputValue.length }}/{{ maxLength }}
245
+ </div>
246
+
247
+ <!-- 多行模式下的操作按钮 -->
248
+ <div v-if="mode === 'multiple'" class="tiny-sender__toolbar">
249
+ <div class="tiny-sender__buttons-container">
250
+ <action-buttons
251
+ :allow-speech="allowSpeech"
252
+ :allow-files="allowFiles"
253
+ :loading="loading"
254
+ :disabled="isDisabled"
255
+ :show-clear="clearable"
256
+ :has-content="!!inputValue"
257
+ :speech-status="speechState"
258
+ :submit-type="submitType"
259
+ @clear="clearInput"
260
+ @toggle-speech="toggleSpeech"
261
+ @submit="triggerSubmit"
262
+ />
263
+ </div>
264
+ </div>
265
+ </div>
266
+ </Transition>
267
+ </div>
268
+ </div>
269
+
270
+ <!-- 输入建议 -->
271
+ <Transition name="tiny-sender-slide-up">
272
+ <div v-if="showSuggestions && filteredSuggestions.length" class="tiny-sender__suggestions">
273
+ <div
274
+ v-for="(item, index) in filteredSuggestions"
275
+ :key="index"
276
+ class="suggestion-item"
277
+ @click="selectSuggestion(item)"
278
+ >
279
+ {{ item }}
280
+ </div>
281
+ </div>
282
+ </Transition>
283
+
284
+ <!-- 错误提示 -->
285
+ <div v-if="errorMessage" class="tiny-sender__error">
286
+ {{ errorMessage }}
287
+ </div>
288
+ </div>
289
+ </template>
@@ -0,0 +1,84 @@
1
+ // 主题变量
2
+ :root {
3
+ // 基础颜色
4
+ --tr-sender-border-color: #dcdfe6;
5
+ --tr-sender-bg-color: #fff;
6
+ --tr-sender-text-color: #303133;
7
+ --tr-sender-text-color-secondary: #909399;
8
+ --tr-sender-error-color: #f56c6c;
9
+ --tr-sender-input-disabled-bg-color: #f0f0f0;
10
+ --tr-sender-word-limit-color: #808080;
11
+ --tr-sender-button-icon-color: #5e7ce0;
12
+
13
+ // 尺寸
14
+ --tr-sender-border-radius: 28px;
15
+ --tr-sender-padding-top: 15px;
16
+ --tr-sender-padding-right: 10px;
17
+ --tr-sender-padding-bottom: 10px;
18
+ --tr-sender-padding-left: 24px;
19
+ --tr-sender-gap: 8px;
20
+ --tr-sender-input-height: 100px;
21
+ --tr-sender-input-min-height: 60px;
22
+ --tr-sender-icon-size: 22px;
23
+ --tr-sender-icon-size-small: 18px;
24
+
25
+ // 字体
26
+ --tr-sender-font-size: 14px;
27
+ --tr-sender-font-size-small: 12px;
28
+
29
+ // 动画
30
+ --tr-sender-transition-duration: 0.2s;
31
+
32
+ // 阴影
33
+ --tr-sender-box-shadow: 0 4px 16px 0px rgba(0, 0, 0, 0.08);
34
+ --tr-sender-focus-shadow: 0 0 0 2px rgba(94, 124, 224, 0.3);
35
+
36
+ // 插槽变量
37
+ // 头部插槽 (Header)
38
+ --tr-sender-header-max-height: 120px;
39
+ --tr-sender-header-min-height: 40px;
40
+ --tr-sender-header-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
41
+ --tr-sender-header-padding: 10px;
42
+
43
+ // 前缀插槽 (Prefix)
44
+ --tr-sender-prefix-width: 60px;
45
+ --tr-sender-prefix-min-width: 44px;
46
+ --tr-sender-prefix-hover-bg: #f5f5f5;
47
+ --tr-sender-prefix-padding-left: 16px;
48
+
49
+ // 内容区域 (Content)
50
+ --tr-sender-content-min-width: 180px;
51
+ --tr-sender-content-padding: 15px 10px 10px 24px;
52
+ --tr-sender-content-padding-with-prefix: 15px 10px 10px 8px;
53
+ --tr-sender-content-flex-grow: 1;
54
+
55
+ // 操作区域 (Actions)
56
+ --tr-sender-actions-width: auto;
57
+ --tr-sender-actions-min-width: 32px;
58
+ --tr-sender-actions-gap: 8px;
59
+ --tr-sender-actions-icon-size: 20px;
60
+ --tr-sender-actions-padding-right: 10px;
61
+
62
+ // 底部插槽 (Footer)
63
+ --tr-sender-footer-max-height: 200px;
64
+ --tr-sender-footer-min-height: 0;
65
+ --tr-sender-footer-bg: #fff;
66
+ --tr-sender-footer-hover: #f9f9f9;
67
+ }
68
+
69
+ /* 暗色主题 */
70
+ .theme-dark,
71
+ [data-theme="dark"] {
72
+ --tr-sender-border-color: #4c4d4f;
73
+ --tr-sender-bg-color: #1c1c1c;
74
+ --tr-sender-text-color: #ffffff;
75
+ --tr-sender-text-color-secondary: #a0a0a0;
76
+ --tr-sender-input-disabled-bg-color: #2a2a2a;
77
+ --tr-sender-box-shadow: 0 4px 16px 0px rgba(0, 0, 0, 0.2);
78
+ --tr-sender-button-icon-color: #a0a0a0;
79
+
80
+ // 暗色主题插槽变量
81
+ --tr-sender-prefix-hover-bg: #333;
82
+ --tr-sender-footer-bg: #2c2c2c;
83
+ --tr-sender-footer-hover: #3a3a3a;
84
+ }
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,12 @@
1
+ import { App } from 'vue'
2
+ import Welcome from './index.vue'
3
+
4
+ Welcome.name = 'TrWelcome'
5
+
6
+ const install = function <T>(app: App<T>) {
7
+ app.component(Welcome.name!, Welcome)
8
+ }
9
+
10
+ Welcome.install = install
11
+
12
+ export default Welcome as typeof Welcome & { install: typeof install }
@@ -0,0 +1,3 @@
1
+ <script setup lang="ts"></script>
2
+
3
+ <template>Welcome</template>
package/tsconfig.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "module": "ESNext",
6
+ "lib": [
7
+ "ES2020",
8
+ "DOM",
9
+ "DOM.Iterable"
10
+ ],
11
+ "skipLibCheck": true,
12
+ /* Bundler mode */
13
+ "moduleResolution": "bundler",
14
+ "allowImportingTsExtensions": true,
15
+ "resolveJsonModule": true,
16
+ "isolatedModules": true,
17
+ "noEmit": true,
18
+ "jsx": "preserve",
19
+ "jsxImportSource": "vue",
20
+
21
+ /* Linting */
22
+ "strict": true,
23
+ "noUnusedLocals": true,
24
+ "noUnusedParameters": true,
25
+ "noFallthroughCasesInSwitch": true
26
+ },
27
+ "include": [
28
+ "src/**/*.ts",
29
+ "src/**/*.tsx",
30
+ "src/**/*.vue"
31
+ ],
32
+ "references": [
33
+ {
34
+ "path": "./tsconfig.node.json"
35
+ }
36
+ ]
37
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "skipLibCheck": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "allowSyntheticDefaultImports": true
8
+ },
9
+ "include": ["vite.config.ts"]
10
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,53 @@
1
+ import { defineConfig } from 'vite'
2
+ import vue from '@vitejs/plugin-vue'
3
+ import vuejsx from '@vitejs/plugin-vue-jsx'
4
+ import dts from 'vite-plugin-dts'
5
+ import importPlugin from '@opentiny/vue-vite-import'
6
+
7
+ // https://vitejs.dev/config/
8
+ export default defineConfig({
9
+ plugins: [
10
+ vue(),
11
+ vuejsx(),
12
+ dts(),
13
+ importPlugin(
14
+ [
15
+ {
16
+ libraryName: '@opentiny/vue',
17
+ },
18
+ {
19
+ libraryName: `@opentiny/vue-icon`,
20
+ customName: (name) => {
21
+ return `@opentiny/vue-icon/lib/${name.replace(/^icon-/, '')}.js`
22
+ },
23
+ },
24
+ ],
25
+ 'pc', // 此配置非必选,按需配置 (pc|mobile|mobile-first)
26
+ ),
27
+ ],
28
+ resolve: {
29
+ extensions: ['.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
30
+ },
31
+ build: {
32
+ lib: {
33
+ entry: './src/index.ts',
34
+ },
35
+ minify: true,
36
+ rollupOptions: {
37
+ external: ['vue', 'vue-router'],
38
+ input: {
39
+ index: './src/index.ts',
40
+ },
41
+ output: [
42
+ {
43
+ format: 'es',
44
+ entryFileNames: '[name].js',
45
+ preserveModules: true,
46
+ exports: 'named',
47
+ dir: 'dist',
48
+ },
49
+ ],
50
+ },
51
+ outDir: 'dist',
52
+ },
53
+ })