@yh-ui/components 0.1.10 → 0.1.12

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 (386) hide show
  1. package/dist/ai-action-group/__tests__/ai-action-group.ssr.test.cjs +55 -0
  2. package/dist/ai-action-group/__tests__/ai-action-group.ssr.test.d.ts +1 -0
  3. package/dist/ai-action-group/__tests__/ai-action-group.ssr.test.mjs +39 -0
  4. package/dist/ai-action-group/__tests__/ai-action-group.test.cjs +149 -0
  5. package/dist/ai-action-group/__tests__/ai-action-group.test.d.ts +1 -0
  6. package/dist/ai-action-group/__tests__/ai-action-group.test.mjs +104 -0
  7. package/dist/ai-action-group/index.cjs +26 -0
  8. package/dist/ai-action-group/index.d.ts +3 -0
  9. package/dist/ai-action-group/index.mjs +5 -0
  10. package/dist/ai-action-group/src/ai-action-group.cjs +50 -0
  11. package/dist/ai-action-group/src/ai-action-group.css +517 -0
  12. package/dist/ai-action-group/src/ai-action-group.d.ts +55 -0
  13. package/dist/ai-action-group/src/ai-action-group.d.vue.ts +40 -0
  14. package/dist/ai-action-group/src/ai-action-group.mjs +44 -0
  15. package/dist/ai-action-group/src/ai-action-group.vue +602 -0
  16. package/dist/ai-action-group/src/ai-action-group.vue.d.ts +40 -0
  17. package/dist/ai-agent-card/__tests__/ai-agent-card.ssr.test.cjs +61 -0
  18. package/dist/ai-agent-card/__tests__/ai-agent-card.ssr.test.d.ts +1 -0
  19. package/dist/ai-agent-card/__tests__/ai-agent-card.ssr.test.mjs +65 -0
  20. package/dist/ai-agent-card/__tests__/ai-agent-card.test.cjs +70 -0
  21. package/dist/ai-agent-card/__tests__/ai-agent-card.test.d.ts +1 -0
  22. package/dist/ai-agent-card/__tests__/ai-agent-card.test.mjs +64 -0
  23. package/dist/ai-agent-card/index.cjs +26 -0
  24. package/dist/ai-agent-card/index.d.ts +3 -0
  25. package/dist/ai-agent-card/index.mjs +5 -0
  26. package/dist/ai-agent-card/src/ai-agent-card.cjs +74 -0
  27. package/dist/ai-agent-card/src/ai-agent-card.css +859 -0
  28. package/dist/ai-agent-card/src/ai-agent-card.d.ts +122 -0
  29. package/dist/ai-agent-card/src/ai-agent-card.d.vue.ts +62 -0
  30. package/dist/ai-agent-card/src/ai-agent-card.mjs +68 -0
  31. package/dist/ai-agent-card/src/ai-agent-card.vue +1029 -0
  32. package/dist/ai-agent-card/src/ai-agent-card.vue.d.ts +62 -0
  33. package/dist/ai-artifacts/__tests__/ai-artifacts.ssr.test.cjs +73 -0
  34. package/dist/ai-artifacts/__tests__/ai-artifacts.ssr.test.d.ts +1 -0
  35. package/dist/ai-artifacts/__tests__/ai-artifacts.ssr.test.mjs +68 -0
  36. package/dist/ai-artifacts/__tests__/ai-artifacts.test.cjs +128 -0
  37. package/dist/ai-artifacts/__tests__/ai-artifacts.test.d.ts +1 -0
  38. package/dist/ai-artifacts/__tests__/ai-artifacts.test.mjs +109 -0
  39. package/dist/ai-artifacts/index.cjs +26 -0
  40. package/dist/ai-artifacts/index.d.ts +3 -0
  41. package/dist/ai-artifacts/index.mjs +5 -0
  42. package/dist/ai-artifacts/src/ai-artifacts.cjs +55 -0
  43. package/dist/ai-artifacts/src/ai-artifacts.css +633 -0
  44. package/dist/ai-artifacts/src/ai-artifacts.d.ts +93 -0
  45. package/dist/ai-artifacts/src/ai-artifacts.d.vue.ts +33 -0
  46. package/dist/ai-artifacts/src/ai-artifacts.mjs +49 -0
  47. package/dist/ai-artifacts/src/ai-artifacts.vue +803 -0
  48. package/dist/ai-artifacts/src/ai-artifacts.vue.d.ts +33 -0
  49. package/dist/ai-bubble/__tests__/ai-bubble.ssr.test.cjs +87 -0
  50. package/dist/ai-bubble/__tests__/ai-bubble.ssr.test.d.ts +1 -0
  51. package/dist/ai-bubble/__tests__/ai-bubble.ssr.test.mjs +58 -0
  52. package/dist/ai-bubble/__tests__/ai-bubble.test.cjs +227 -0
  53. package/dist/ai-bubble/__tests__/ai-bubble.test.d.ts +1 -0
  54. package/dist/ai-bubble/__tests__/ai-bubble.test.mjs +123 -0
  55. package/dist/ai-bubble/index.cjs +26 -0
  56. package/dist/ai-bubble/index.d.ts +3 -0
  57. package/dist/ai-bubble/index.mjs +5 -0
  58. package/dist/ai-bubble/src/ai-bubble.cjs +86 -0
  59. package/dist/ai-bubble/src/ai-bubble.css +932 -0
  60. package/dist/ai-bubble/src/ai-bubble.d.ts +126 -0
  61. package/dist/ai-bubble/src/ai-bubble.d.vue.ts +110 -0
  62. package/dist/ai-bubble/src/ai-bubble.mjs +80 -0
  63. package/dist/ai-bubble/src/ai-bubble.vue +1300 -0
  64. package/dist/ai-bubble/src/ai-bubble.vue.d.ts +110 -0
  65. package/dist/ai-chat/__tests__/ai-chat.ssr.test.cjs +82 -0
  66. package/dist/ai-chat/__tests__/ai-chat.ssr.test.d.ts +1 -0
  67. package/dist/ai-chat/__tests__/ai-chat.ssr.test.mjs +69 -0
  68. package/dist/ai-chat/__tests__/ai-chat.test.cjs +169 -0
  69. package/dist/ai-chat/__tests__/ai-chat.test.d.ts +1 -0
  70. package/dist/ai-chat/__tests__/ai-chat.test.mjs +121 -0
  71. package/dist/ai-chat/index.cjs +26 -0
  72. package/dist/ai-chat/index.d.ts +3 -0
  73. package/dist/ai-chat/index.mjs +5 -0
  74. package/dist/ai-chat/src/ai-chat.cjs +41 -0
  75. package/dist/ai-chat/src/ai-chat.css +503 -0
  76. package/dist/ai-chat/src/ai-chat.d.ts +57 -0
  77. package/dist/ai-chat/src/ai-chat.d.vue.ts +43 -0
  78. package/dist/ai-chat/src/ai-chat.mjs +35 -0
  79. package/dist/ai-chat/src/ai-chat.vue +606 -0
  80. package/dist/ai-chat/src/ai-chat.vue.d.ts +43 -0
  81. package/dist/ai-code-block/__tests__/ai-code-block.ssr.test.cjs +66 -0
  82. package/dist/ai-code-block/__tests__/ai-code-block.ssr.test.d.ts +1 -0
  83. package/dist/ai-code-block/__tests__/ai-code-block.ssr.test.mjs +48 -0
  84. package/dist/ai-code-block/__tests__/ai-code-block.test.cjs +174 -0
  85. package/dist/ai-code-block/__tests__/ai-code-block.test.d.ts +1 -0
  86. package/dist/ai-code-block/__tests__/ai-code-block.test.mjs +108 -0
  87. package/dist/ai-code-block/index.cjs +26 -0
  88. package/dist/ai-code-block/index.d.ts +3 -0
  89. package/dist/ai-code-block/index.mjs +5 -0
  90. package/dist/ai-code-block/src/ai-code-block.cjs +79 -0
  91. package/dist/ai-code-block/src/ai-code-block.css +589 -0
  92. package/dist/ai-code-block/src/ai-code-block.d.ts +76 -0
  93. package/dist/ai-code-block/src/ai-code-block.d.vue.ts +63 -0
  94. package/dist/ai-code-block/src/ai-code-block.mjs +73 -0
  95. package/dist/ai-code-block/src/ai-code-block.vue +706 -0
  96. package/dist/ai-code-block/src/ai-code-block.vue.d.ts +63 -0
  97. package/dist/ai-conversations/__tests__/ai-conversations.ssr.test.cjs +50 -0
  98. package/dist/ai-conversations/__tests__/ai-conversations.ssr.test.d.ts +1 -0
  99. package/dist/ai-conversations/__tests__/ai-conversations.ssr.test.mjs +42 -0
  100. package/dist/ai-conversations/__tests__/ai-conversations.test.cjs +67 -0
  101. package/dist/ai-conversations/__tests__/ai-conversations.test.d.ts +1 -0
  102. package/dist/ai-conversations/__tests__/ai-conversations.test.mjs +51 -0
  103. package/dist/ai-conversations/index.cjs +26 -0
  104. package/dist/ai-conversations/index.d.ts +3 -0
  105. package/dist/ai-conversations/index.mjs +5 -0
  106. package/dist/ai-conversations/src/ai-conversations.cjs +69 -0
  107. package/dist/ai-conversations/src/ai-conversations.css +679 -0
  108. package/dist/ai-conversations/src/ai-conversations.d.ts +67 -0
  109. package/dist/ai-conversations/src/ai-conversations.d.vue.ts +52 -0
  110. package/dist/ai-conversations/src/ai-conversations.mjs +63 -0
  111. package/dist/ai-conversations/src/ai-conversations.vue +949 -0
  112. package/dist/ai-conversations/src/ai-conversations.vue.d.ts +52 -0
  113. package/dist/ai-editor-sender/__tests__/ai-editor-sender.ssr.test.cjs +62 -0
  114. package/dist/ai-editor-sender/__tests__/ai-editor-sender.ssr.test.d.ts +1 -0
  115. package/dist/ai-editor-sender/__tests__/ai-editor-sender.ssr.test.mjs +50 -0
  116. package/dist/ai-editor-sender/__tests__/ai-editor-sender.test.cjs +315 -0
  117. package/dist/ai-editor-sender/__tests__/ai-editor-sender.test.d.ts +1 -0
  118. package/dist/ai-editor-sender/__tests__/ai-editor-sender.test.mjs +226 -0
  119. package/dist/ai-editor-sender/index.cjs +26 -0
  120. package/dist/ai-editor-sender/index.d.ts +3 -0
  121. package/dist/ai-editor-sender/index.mjs +5 -0
  122. package/dist/ai-editor-sender/src/ai-editor-sender.cjs +66 -0
  123. package/dist/ai-editor-sender/src/ai-editor-sender.css +566 -0
  124. package/dist/ai-editor-sender/src/ai-editor-sender.d.ts +70 -0
  125. package/dist/ai-editor-sender/src/ai-editor-sender.d.vue.ts +70 -0
  126. package/dist/ai-editor-sender/src/ai-editor-sender.mjs +60 -0
  127. package/dist/ai-editor-sender/src/ai-editor-sender.vue +713 -0
  128. package/dist/ai-editor-sender/src/ai-editor-sender.vue.d.ts +70 -0
  129. package/dist/ai-prompts/__tests__/ai-prompts.ssr.test.cjs +49 -0
  130. package/dist/ai-prompts/__tests__/ai-prompts.ssr.test.d.ts +1 -0
  131. package/dist/ai-prompts/__tests__/ai-prompts.ssr.test.mjs +41 -0
  132. package/dist/ai-prompts/__tests__/ai-prompts.test.cjs +54 -0
  133. package/dist/ai-prompts/__tests__/ai-prompts.test.d.ts +1 -0
  134. package/dist/ai-prompts/__tests__/ai-prompts.test.mjs +38 -0
  135. package/dist/ai-prompts/index.cjs +26 -0
  136. package/dist/ai-prompts/index.d.ts +3 -0
  137. package/dist/ai-prompts/index.mjs +5 -0
  138. package/dist/ai-prompts/src/ai-prompts.cjs +42 -0
  139. package/dist/ai-prompts/src/ai-prompts.css +572 -0
  140. package/dist/ai-prompts/src/ai-prompts.d.ts +45 -0
  141. package/dist/ai-prompts/src/ai-prompts.d.vue.ts +44 -0
  142. package/dist/ai-prompts/src/ai-prompts.mjs +36 -0
  143. package/dist/ai-prompts/src/ai-prompts.vue +646 -0
  144. package/dist/ai-prompts/src/ai-prompts.vue.d.ts +44 -0
  145. package/dist/ai-provider/__tests__/ai-provider.ssr.test.cjs +33 -0
  146. package/dist/ai-provider/__tests__/ai-provider.ssr.test.d.ts +1 -0
  147. package/dist/ai-provider/__tests__/ai-provider.ssr.test.mjs +34 -0
  148. package/dist/ai-provider/__tests__/ai-provider.test.cjs +38 -0
  149. package/dist/ai-provider/__tests__/ai-provider.test.d.ts +1 -0
  150. package/dist/ai-provider/__tests__/ai-provider.test.mjs +33 -0
  151. package/dist/ai-provider/index.cjs +38 -0
  152. package/dist/ai-provider/index.d.ts +4 -0
  153. package/dist/ai-provider/index.mjs +6 -0
  154. package/dist/ai-provider/src/ai-provider.cjs +7 -0
  155. package/dist/ai-provider/src/ai-provider.d.ts +88 -0
  156. package/dist/ai-provider/src/ai-provider.d.vue.ts +48 -0
  157. package/dist/ai-provider/src/ai-provider.mjs +1 -0
  158. package/dist/ai-provider/src/ai-provider.vue +24 -0
  159. package/dist/ai-provider/src/ai-provider.vue.d.ts +48 -0
  160. package/dist/ai-provider/src/use-ai-provider.cjs +11 -0
  161. package/dist/ai-provider/src/use-ai-provider.d.ts +10 -0
  162. package/dist/ai-provider/src/use-ai-provider.mjs +5 -0
  163. package/dist/ai-sender/__tests__/ai-sender.ssr.test.cjs +46 -0
  164. package/dist/ai-sender/__tests__/ai-sender.ssr.test.d.ts +1 -0
  165. package/dist/ai-sender/__tests__/ai-sender.ssr.test.mjs +37 -0
  166. package/dist/ai-sender/__tests__/ai-sender.test.cjs +388 -0
  167. package/dist/ai-sender/__tests__/ai-sender.test.d.ts +1 -0
  168. package/dist/ai-sender/__tests__/ai-sender.test.mjs +248 -0
  169. package/dist/ai-sender/index.cjs +26 -0
  170. package/dist/ai-sender/index.d.ts +3 -0
  171. package/dist/ai-sender/index.mjs +5 -0
  172. package/dist/ai-sender/src/ai-sender.cjs +91 -0
  173. package/dist/ai-sender/src/ai-sender.css +754 -0
  174. package/dist/ai-sender/src/ai-sender.d.ts +140 -0
  175. package/dist/ai-sender/src/ai-sender.d.vue.ts +69 -0
  176. package/dist/ai-sender/src/ai-sender.mjs +85 -0
  177. package/dist/ai-sender/src/ai-sender.vue +1032 -0
  178. package/dist/ai-sender/src/ai-sender.vue.d.ts +69 -0
  179. package/dist/ai-sources/__tests__/ai-sources.ssr.test.cjs +72 -0
  180. package/dist/ai-sources/__tests__/ai-sources.ssr.test.d.ts +1 -0
  181. package/dist/ai-sources/__tests__/ai-sources.ssr.test.mjs +82 -0
  182. package/dist/ai-sources/__tests__/ai-sources.test.cjs +93 -0
  183. package/dist/ai-sources/__tests__/ai-sources.test.d.ts +1 -0
  184. package/dist/ai-sources/__tests__/ai-sources.test.mjs +89 -0
  185. package/dist/ai-sources/index.cjs +26 -0
  186. package/dist/ai-sources/index.d.ts +3 -0
  187. package/dist/ai-sources/index.mjs +5 -0
  188. package/dist/ai-sources/src/ai-sources.cjs +59 -0
  189. package/dist/ai-sources/src/ai-sources.css +830 -0
  190. package/dist/ai-sources/src/ai-sources.d.ts +79 -0
  191. package/dist/ai-sources/src/ai-sources.d.vue.ts +45 -0
  192. package/dist/ai-sources/src/ai-sources.mjs +53 -0
  193. package/dist/ai-sources/src/ai-sources.vue +1109 -0
  194. package/dist/ai-sources/src/ai-sources.vue.d.ts +45 -0
  195. package/dist/ai-thinking/__tests__/ai-thinking.ssr.test.cjs +56 -0
  196. package/dist/ai-thinking/__tests__/ai-thinking.ssr.test.d.ts +1 -0
  197. package/dist/ai-thinking/__tests__/ai-thinking.ssr.test.mjs +42 -0
  198. package/dist/ai-thinking/__tests__/ai-thinking.test.cjs +151 -0
  199. package/dist/ai-thinking/__tests__/ai-thinking.test.d.ts +1 -0
  200. package/dist/ai-thinking/__tests__/ai-thinking.test.mjs +96 -0
  201. package/dist/ai-thinking/index.cjs +26 -0
  202. package/dist/ai-thinking/index.d.ts +3 -0
  203. package/dist/ai-thinking/index.mjs +5 -0
  204. package/dist/ai-thinking/src/ai-thinking.cjs +44 -0
  205. package/dist/ai-thinking/src/ai-thinking.css +543 -0
  206. package/dist/ai-thinking/src/ai-thinking.d.ts +42 -0
  207. package/dist/ai-thinking/src/ai-thinking.d.vue.ts +33 -0
  208. package/dist/ai-thinking/src/ai-thinking.mjs +38 -0
  209. package/dist/ai-thinking/src/ai-thinking.vue +631 -0
  210. package/dist/ai-thinking/src/ai-thinking.vue.d.ts +33 -0
  211. package/dist/ai-thought-chain/__tests__/ai-thought-chain.ssr.test.cjs +83 -0
  212. package/dist/ai-thought-chain/__tests__/ai-thought-chain.ssr.test.d.ts +1 -0
  213. package/dist/ai-thought-chain/__tests__/ai-thought-chain.ssr.test.mjs +52 -0
  214. package/dist/ai-thought-chain/__tests__/ai-thought-chain.test.cjs +204 -0
  215. package/dist/ai-thought-chain/__tests__/ai-thought-chain.test.d.ts +1 -0
  216. package/dist/ai-thought-chain/__tests__/ai-thought-chain.test.mjs +134 -0
  217. package/dist/ai-thought-chain/index.cjs +26 -0
  218. package/dist/ai-thought-chain/index.d.ts +3 -0
  219. package/dist/ai-thought-chain/index.mjs +5 -0
  220. package/dist/ai-thought-chain/src/ai-thought-chain.cjs +68 -0
  221. package/dist/ai-thought-chain/src/ai-thought-chain.css +668 -0
  222. package/dist/ai-thought-chain/src/ai-thought-chain.d.ts +82 -0
  223. package/dist/ai-thought-chain/src/ai-thought-chain.d.vue.ts +83 -0
  224. package/dist/ai-thought-chain/src/ai-thought-chain.mjs +62 -0
  225. package/dist/ai-thought-chain/src/ai-thought-chain.vue +813 -0
  226. package/dist/ai-thought-chain/src/ai-thought-chain.vue.d.ts +83 -0
  227. package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.ssr.test.cjs +32 -0
  228. package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.ssr.test.d.ts +1 -0
  229. package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.ssr.test.mjs +25 -0
  230. package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.test.cjs +113 -0
  231. package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.test.d.ts +1 -0
  232. package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.test.mjs +93 -0
  233. package/dist/ai-voice-trigger/index.cjs +26 -0
  234. package/dist/ai-voice-trigger/index.d.ts +3 -0
  235. package/dist/ai-voice-trigger/index.mjs +5 -0
  236. package/dist/ai-voice-trigger/src/ai-voice-trigger.cjs +35 -0
  237. package/dist/ai-voice-trigger/src/ai-voice-trigger.css +603 -0
  238. package/dist/ai-voice-trigger/src/ai-voice-trigger.d.ts +37 -0
  239. package/dist/ai-voice-trigger/src/ai-voice-trigger.d.vue.ts +29 -0
  240. package/dist/ai-voice-trigger/src/ai-voice-trigger.mjs +29 -0
  241. package/dist/ai-voice-trigger/src/ai-voice-trigger.vue +708 -0
  242. package/dist/ai-voice-trigger/src/ai-voice-trigger.vue.d.ts +29 -0
  243. package/dist/ai-welcome/__tests__/ai-welcome.ssr.test.cjs +57 -0
  244. package/dist/ai-welcome/__tests__/ai-welcome.ssr.test.d.ts +1 -0
  245. package/dist/ai-welcome/__tests__/ai-welcome.ssr.test.mjs +39 -0
  246. package/dist/ai-welcome/__tests__/ai-welcome.test.cjs +169 -0
  247. package/dist/ai-welcome/__tests__/ai-welcome.test.d.ts +1 -0
  248. package/dist/ai-welcome/__tests__/ai-welcome.test.mjs +113 -0
  249. package/dist/ai-welcome/index.cjs +26 -0
  250. package/dist/ai-welcome/index.d.ts +3 -0
  251. package/dist/ai-welcome/index.mjs +5 -0
  252. package/dist/ai-welcome/src/ai-welcome.cjs +56 -0
  253. package/dist/ai-welcome/src/ai-welcome.css +591 -0
  254. package/dist/ai-welcome/src/ai-welcome.d.ts +59 -0
  255. package/dist/ai-welcome/src/ai-welcome.d.vue.ts +51 -0
  256. package/dist/ai-welcome/src/ai-welcome.mjs +50 -0
  257. package/dist/ai-welcome/src/ai-welcome.vue +655 -0
  258. package/dist/ai-welcome/src/ai-welcome.vue.d.ts +51 -0
  259. package/dist/alert/src/alert.d.vue.ts +5 -5
  260. package/dist/alert/src/alert.vue.d.ts +5 -5
  261. package/dist/autocomplete/src/autocomplete.d.vue.ts +2 -2
  262. package/dist/autocomplete/src/autocomplete.vue.d.ts +2 -2
  263. package/dist/avatar/index.d.ts +39 -1
  264. package/dist/back-top/src/back-top.d.vue.ts +1 -1
  265. package/dist/back-top/src/back-top.vue.d.ts +1 -1
  266. package/dist/button/index.d.ts +3 -3
  267. package/dist/button/src/button.css +3 -3
  268. package/dist/button/src/button.d.vue.ts +1 -1
  269. package/dist/button/src/button.vue +3 -3
  270. package/dist/button/src/button.vue.d.ts +1 -1
  271. package/dist/calendar/src/calendar.d.vue.ts +2 -2
  272. package/dist/calendar/src/calendar.vue.d.ts +2 -2
  273. package/dist/cascader/src/cascader-panel.d.vue.ts +2 -2
  274. package/dist/cascader/src/cascader-panel.vue.d.ts +2 -2
  275. package/dist/checkbox/index.d.ts +3 -3
  276. package/dist/checkbox/src/checkbox-group.d.vue.ts +1 -1
  277. package/dist/checkbox/src/checkbox-group.vue +13 -1
  278. package/dist/checkbox/src/checkbox-group.vue.d.ts +1 -1
  279. package/dist/checkbox/src/checkbox.d.ts +12 -0
  280. package/dist/col/src/col.d.vue.ts +4 -4
  281. package/dist/col/src/col.vue.d.ts +4 -4
  282. package/dist/color-picker/src/color-picker.d.vue.ts +1 -1
  283. package/dist/color-picker/src/color-picker.vue.d.ts +1 -1
  284. package/dist/component.d.ts +63 -0
  285. package/dist/date-picker/src/date-picker.d.vue.ts +4 -4
  286. package/dist/date-picker/src/date-picker.vue.d.ts +4 -4
  287. package/dist/descriptions/src/description-item.d.vue.ts +1 -1
  288. package/dist/descriptions/src/description-item.vue.d.ts +1 -1
  289. package/dist/dialog/src/dialog.d.vue.ts +6 -6
  290. package/dist/dialog/src/dialog.vue.d.ts +6 -6
  291. package/dist/drawer/src/drawer.d.vue.ts +3 -3
  292. package/dist/drawer/src/drawer.vue.d.ts +3 -3
  293. package/dist/dropdown/src/dropdown-item.d.vue.ts +1 -1
  294. package/dist/dropdown/src/dropdown-item.vue.d.ts +1 -1
  295. package/dist/dropdown/src/dropdown.d.vue.ts +8 -8
  296. package/dist/dropdown/src/dropdown.vue.d.ts +8 -8
  297. package/dist/form/__tests__/form-schema.test.cjs +477 -24
  298. package/dist/form/__tests__/form-schema.test.mjs +277 -57
  299. package/dist/form/index.cjs +12 -0
  300. package/dist/form/index.d.ts +1 -2
  301. package/dist/form/index.mjs +1 -0
  302. package/dist/form/src/form-item.d.vue.ts +2 -1
  303. package/dist/form/src/form-item.vue +3 -1
  304. package/dist/form/src/form-item.vue.d.ts +2 -1
  305. package/dist/form/src/form-schema.cjs +2 -1
  306. package/dist/form/src/form-schema.d.ts +124 -19
  307. package/dist/form/src/form-schema.d.vue.ts +69 -19
  308. package/dist/form/src/form-schema.mjs +2 -1
  309. package/dist/form/src/form-schema.vue +522 -160
  310. package/dist/form/src/form-schema.vue.d.ts +69 -19
  311. package/dist/form/src/form.cjs +7 -0
  312. package/dist/form/src/form.d.ts +20 -0
  313. package/dist/form/src/form.d.vue.ts +10 -1
  314. package/dist/form/src/form.mjs +7 -0
  315. package/dist/form/src/form.vue +22 -10
  316. package/dist/form/src/form.vue.d.ts +10 -1
  317. package/dist/grid/src/grid.d.vue.ts +1 -1
  318. package/dist/grid/src/grid.vue.d.ts +1 -1
  319. package/dist/icon/src/icons/index.cjs +122 -2
  320. package/dist/icon/src/icons/index.d.ts +24 -0
  321. package/dist/icon/src/icons/index.mjs +145 -1
  322. package/dist/image/index.d.ts +356 -2
  323. package/dist/image/src/image-viewer.d.vue.ts +3 -3
  324. package/dist/image/src/image-viewer.vue.d.ts +3 -3
  325. package/dist/image/src/image.d.vue.ts +4 -4
  326. package/dist/image/src/image.vue.d.ts +4 -4
  327. package/dist/index.cjs +193 -1
  328. package/dist/index.d.ts +16 -0
  329. package/dist/index.mjs +49 -1
  330. package/dist/input/index.d.ts +18 -18
  331. package/dist/input/src/input.d.vue.ts +6 -6
  332. package/dist/input/src/input.vue.d.ts +6 -6
  333. package/dist/input-tag/src/input-tag.d.vue.ts +2 -2
  334. package/dist/input-tag/src/input-tag.vue.d.ts +2 -2
  335. package/dist/mention/src/mention.d.vue.ts +8 -8
  336. package/dist/mention/src/mention.vue.d.ts +8 -8
  337. package/dist/menu/src/menu.d.vue.ts +4 -4
  338. package/dist/menu/src/menu.vue.d.ts +4 -4
  339. package/dist/message/src/message.d.vue.ts +1 -1
  340. package/dist/message/src/message.vue.d.ts +1 -1
  341. package/dist/popconfirm/src/popconfirm.d.vue.ts +5 -5
  342. package/dist/popconfirm/src/popconfirm.vue.d.ts +5 -5
  343. package/dist/popover/src/popover.d.vue.ts +4 -4
  344. package/dist/popover/src/popover.vue.d.ts +4 -4
  345. package/dist/progress/src/progress.d.vue.ts +1 -1
  346. package/dist/progress/src/progress.vue.d.ts +1 -1
  347. package/dist/radio/src/radio-group.d.vue.ts +1 -1
  348. package/dist/radio/src/radio-group.vue +25 -4
  349. package/dist/radio/src/radio-group.vue.d.ts +1 -1
  350. package/dist/radio/src/radio.d.ts +12 -0
  351. package/dist/rate/src/rate.d.vue.ts +1 -1
  352. package/dist/rate/src/rate.vue.d.ts +1 -1
  353. package/dist/select/src/select.d.vue.ts +1 -1
  354. package/dist/select/src/select.vue.d.ts +1 -1
  355. package/dist/skeleton/src/skeleton.d.vue.ts +1 -1
  356. package/dist/skeleton/src/skeleton.vue.d.ts +1 -1
  357. package/dist/slider/src/slider.d.vue.ts +1 -1
  358. package/dist/slider/src/slider.vue.d.ts +1 -1
  359. package/dist/steps/src/step.d.vue.ts +1 -1
  360. package/dist/steps/src/step.vue.d.ts +1 -1
  361. package/dist/switch/src/switch.d.vue.ts +2 -2
  362. package/dist/switch/src/switch.vue.d.ts +2 -2
  363. package/dist/table/__tests__/table.perf.test.cjs +2 -2
  364. package/dist/table/__tests__/table.perf.test.mjs +2 -2
  365. package/dist/table/__tests__/table.test.cjs +18 -0
  366. package/dist/table/__tests__/table.test.mjs +18 -0
  367. package/dist/table/__tests__/use-table-import.test.cjs +6 -0
  368. package/dist/table/__tests__/use-table-import.test.mjs +8 -1
  369. package/dist/table/src/table-column.d.vue.ts +1 -1
  370. package/dist/table/src/table-column.vue.d.ts +1 -1
  371. package/dist/table/src/table.d.vue.ts +1 -1
  372. package/dist/table/src/table.vue.d.ts +1 -1
  373. package/dist/tabs/src/tab-pane.d.vue.ts +1 -1
  374. package/dist/tabs/src/tab-pane.vue.d.ts +1 -1
  375. package/dist/tabs/src/tabs.d.vue.ts +2 -2
  376. package/dist/tabs/src/tabs.vue.d.ts +2 -2
  377. package/dist/tooltip/index.d.ts +7 -7
  378. package/dist/tooltip/src/tooltip.d.vue.ts +7 -7
  379. package/dist/tooltip/src/tooltip.vue.d.ts +7 -7
  380. package/dist/tree/src/tree.d.vue.ts +1 -1
  381. package/dist/tree/src/tree.vue.d.ts +1 -1
  382. package/dist/tree-select/src/tree-select.d.vue.ts +3 -3
  383. package/dist/tree-select/src/tree-select.vue.d.ts +3 -3
  384. package/dist/upload/src/upload.d.vue.ts +1 -1
  385. package/dist/upload/src/upload.vue.d.ts +1 -1
  386. package/package.json +8 -5
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+
3
+ var _vitest = require("vitest");
4
+ var _serverRenderer = require("@vue/server-renderer");
5
+ var _vue = require("vue");
6
+ var _aiThoughtChain = _interopRequireDefault(require("../src/ai-thought-chain.vue"));
7
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
8
+ (0, _vitest.describe)("YhAiThoughtChain SSR", () => {
9
+ (0, _vitest.it)("should render to string on server", async () => {
10
+ const html = await (0, _serverRenderer.renderToString)((0, _vue.h)(_aiThoughtChain.default));
11
+ (0, _vitest.expect)(html).toContain("yh-ai-thought-chain");
12
+ });
13
+ (0, _vitest.it)("should render single node header on server", async () => {
14
+ const html = await (0, _serverRenderer.renderToString)((0, _vue.h)(_aiThoughtChain.default, {
15
+ title: "SSR Thought"
16
+ }));
17
+ (0, _vitest.expect)(html).toContain("SSR Thought");
18
+ (0, _vitest.expect)(html).toContain("yh-ai-thought-chain__header");
19
+ });
20
+ (0, _vitest.it)("should render thinking is-thinking class on server", async () => {
21
+ const html = await (0, _serverRenderer.renderToString)((0, _vue.h)(_aiThoughtChain.default, {
22
+ thinking: true
23
+ }));
24
+ (0, _vitest.expect)(html).toContain("is-thinking");
25
+ });
26
+ (0, _vitest.it)("should render timeline items on server", async () => {
27
+ const items = [{
28
+ title: "Step One",
29
+ status: "complete",
30
+ content: "Done"
31
+ }, {
32
+ title: "Step Two",
33
+ status: "thinking",
34
+ content: "In progress"
35
+ }];
36
+ const html = await (0, _serverRenderer.renderToString)((0, _vue.h)(_aiThoughtChain.default, {
37
+ items
38
+ }));
39
+ (0, _vitest.expect)(html).toContain("Step One");
40
+ (0, _vitest.expect)(html).toContain("Step Two");
41
+ (0, _vitest.expect)(html).toContain("yh-ai-thought-chain__item");
42
+ (0, _vitest.expect)(html).toContain("is-timeline");
43
+ });
44
+ (0, _vitest.it)("should render is-last class on last item on server", async () => {
45
+ const items = [{
46
+ title: "First",
47
+ status: "complete"
48
+ }, {
49
+ title: "Last",
50
+ status: "complete"
51
+ }];
52
+ const html = await (0, _serverRenderer.renderToString)((0, _vue.h)(_aiThoughtChain.default, {
53
+ items
54
+ }));
55
+ (0, _vitest.expect)(html).toContain("is-last");
56
+ });
57
+ (0, _vitest.it)("should render is-active class for thinking item on server", async () => {
58
+ const items = [{
59
+ title: "Running",
60
+ status: "thinking"
61
+ }];
62
+ const html = await (0, _serverRenderer.renderToString)((0, _vue.h)(_aiThoughtChain.default, {
63
+ items
64
+ }));
65
+ (0, _vitest.expect)(html).toContain("is-active");
66
+ });
67
+ (0, _vitest.it)("should render content text on server", async () => {
68
+ const html = await (0, _serverRenderer.renderToString)((0, _vue.h)(_aiThoughtChain.default, {
69
+ content: "SSR thought content"
70
+ }));
71
+ (0, _vitest.expect)(html).toContain("SSR thought content");
72
+ });
73
+ (0, _vitest.it)("should render status icon wrappers on server in timeline mode", async () => {
74
+ const items = [{
75
+ title: "Done",
76
+ status: "complete"
77
+ }];
78
+ const html = await (0, _serverRenderer.renderToString)((0, _vue.h)(_aiThoughtChain.default, {
79
+ items
80
+ }));
81
+ (0, _vitest.expect)(html).toContain("yh-ai-thought-chain__item-dot-wrapper");
82
+ });
83
+ });
@@ -0,0 +1,52 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { renderToString } from "@vue/server-renderer";
3
+ import { h } from "vue";
4
+ import AiThoughtChain from "../src/ai-thought-chain.vue";
5
+ describe("YhAiThoughtChain SSR", () => {
6
+ it("should render to string on server", async () => {
7
+ const html = await renderToString(h(AiThoughtChain));
8
+ expect(html).toContain("yh-ai-thought-chain");
9
+ });
10
+ it("should render single node header on server", async () => {
11
+ const html = await renderToString(h(AiThoughtChain, { title: "SSR Thought" }));
12
+ expect(html).toContain("SSR Thought");
13
+ expect(html).toContain("yh-ai-thought-chain__header");
14
+ });
15
+ it("should render thinking is-thinking class on server", async () => {
16
+ const html = await renderToString(h(AiThoughtChain, { thinking: true }));
17
+ expect(html).toContain("is-thinking");
18
+ });
19
+ it("should render timeline items on server", async () => {
20
+ const items = [
21
+ { title: "Step One", status: "complete", content: "Done" },
22
+ { title: "Step Two", status: "thinking", content: "In progress" }
23
+ ];
24
+ const html = await renderToString(h(AiThoughtChain, { items }));
25
+ expect(html).toContain("Step One");
26
+ expect(html).toContain("Step Two");
27
+ expect(html).toContain("yh-ai-thought-chain__item");
28
+ expect(html).toContain("is-timeline");
29
+ });
30
+ it("should render is-last class on last item on server", async () => {
31
+ const items = [
32
+ { title: "First", status: "complete" },
33
+ { title: "Last", status: "complete" }
34
+ ];
35
+ const html = await renderToString(h(AiThoughtChain, { items }));
36
+ expect(html).toContain("is-last");
37
+ });
38
+ it("should render is-active class for thinking item on server", async () => {
39
+ const items = [{ title: "Running", status: "thinking" }];
40
+ const html = await renderToString(h(AiThoughtChain, { items }));
41
+ expect(html).toContain("is-active");
42
+ });
43
+ it("should render content text on server", async () => {
44
+ const html = await renderToString(h(AiThoughtChain, { content: "SSR thought content" }));
45
+ expect(html).toContain("SSR thought content");
46
+ });
47
+ it("should render status icon wrappers on server in timeline mode", async () => {
48
+ const items = [{ title: "Done", status: "complete" }];
49
+ const html = await renderToString(h(AiThoughtChain, { items }));
50
+ expect(html).toContain("yh-ai-thought-chain__item-dot-wrapper");
51
+ });
52
+ });
@@ -0,0 +1,204 @@
1
+ "use strict";
2
+
3
+ var _vitest = require("vitest");
4
+ var _testUtils = require("@vue/test-utils");
5
+ var _vue = require("vue");
6
+ var _aiThoughtChain = _interopRequireDefault(require("../src/ai-thought-chain.vue"));
7
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
8
+ const makeItem = (title, status = "complete", content = "") => ({
9
+ title,
10
+ status,
11
+ content
12
+ });
13
+ (0, _vitest.describe)("YhAiThoughtChain", () => {
14
+ (0, _vitest.it)("should render with base class", () => {
15
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default);
16
+ (0, _vitest.expect)(wrapper.find(".yh-ai-thought-chain").exists()).toBe(true);
17
+ });
18
+ (0, _vitest.it)("should render single node header when no items", () => {
19
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
20
+ props: {
21
+ title: "My Thought"
22
+ }
23
+ });
24
+ (0, _vitest.expect)(wrapper.find(".yh-ai-thought-chain__header").exists()).toBe(true);
25
+ });
26
+ (0, _vitest.it)("should render title in single node mode", () => {
27
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
28
+ props: {
29
+ title: "Thinking Title"
30
+ }
31
+ });
32
+ (0, _vitest.expect)(wrapper.find(".yh-ai-thought-chain__title").text()).toBe("Thinking Title");
33
+ });
34
+ (0, _vitest.it)("should fallback to default title when no title provided", () => {
35
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default);
36
+ (0, _vitest.expect)(wrapper.find(".yh-ai-thought-chain__title").text().length).toBeGreaterThan(0);
37
+ });
38
+ (0, _vitest.it)("should compute thinking status when thinking=true", () => {
39
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
40
+ props: {
41
+ thinking: true
42
+ }
43
+ });
44
+ (0, _vitest.expect)(wrapper.classes()).toContain("is-thinking");
45
+ });
46
+ (0, _vitest.it)("should compute complete status when thinking=false", () => {
47
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
48
+ props: {
49
+ thinking: false
50
+ }
51
+ });
52
+ (0, _vitest.expect)(wrapper.classes()).not.toContain("is-thinking");
53
+ });
54
+ (0, _vitest.it)("should use explicit status prop over thinking", () => {
55
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
56
+ props: {
57
+ status: "error",
58
+ thinking: true
59
+ }
60
+ });
61
+ (0, _vitest.expect)(wrapper.classes()).not.toContain("is-thinking");
62
+ });
63
+ (0, _vitest.it)("should be collapsed by default in single mode", () => {
64
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
65
+ props: {
66
+ content: "Some content"
67
+ }
68
+ });
69
+ (0, _vitest.expect)(wrapper.classes()).not.toContain("is-expanded");
70
+ });
71
+ (0, _vitest.it)("should expand on header click in single node mode", async () => {
72
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
73
+ props: {
74
+ title: "Title",
75
+ content: "Detail"
76
+ }
77
+ });
78
+ await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
79
+ (0, _vitest.expect)(wrapper.classes()).toContain("is-expanded");
80
+ });
81
+ (0, _vitest.it)("should collapse again on second header click", async () => {
82
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
83
+ props: {
84
+ content: "Detail"
85
+ }
86
+ });
87
+ await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
88
+ await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
89
+ (0, _vitest.expect)(wrapper.classes()).not.toContain("is-expanded");
90
+ });
91
+ (0, _vitest.it)("should render content in single mode when expanded", async () => {
92
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
93
+ props: {
94
+ content: "Thought Content Detail"
95
+ }
96
+ });
97
+ await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
98
+ (0, _vitest.expect)(wrapper.find(".yh-ai-thought-chain__text").text()).toBe("Thought Content Detail");
99
+ });
100
+ (0, _vitest.it)("should auto-collapse when status becomes complete and autoCollapse=true", async () => {
101
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
102
+ props: {
103
+ status: "thinking",
104
+ autoCollapse: true
105
+ }
106
+ });
107
+ await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
108
+ (0, _vitest.expect)(wrapper.classes()).toContain("is-expanded");
109
+ await wrapper.setProps({
110
+ status: "complete"
111
+ });
112
+ await (0, _vue.nextTick)();
113
+ (0, _vitest.expect)(wrapper.classes()).not.toContain("is-expanded");
114
+ });
115
+ (0, _vitest.it)("should apply is-timeline class when items provided", () => {
116
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
117
+ props: {
118
+ items: [makeItem("Step 1"), makeItem("Step 2")]
119
+ }
120
+ });
121
+ (0, _vitest.expect)(wrapper.classes()).toContain("is-timeline");
122
+ });
123
+ (0, _vitest.it)("should render correct number of timeline items", () => {
124
+ const items = [makeItem("Step 1"), makeItem("Step 2"), makeItem("Step 3")];
125
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
126
+ props: {
127
+ items
128
+ }
129
+ });
130
+ (0, _vitest.expect)(wrapper.findAll(".yh-ai-thought-chain__item").length).toBe(3);
131
+ });
132
+ (0, _vitest.it)("should render item titles", () => {
133
+ const items = [makeItem("Alpha"), makeItem("Beta")];
134
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
135
+ props: {
136
+ items
137
+ }
138
+ });
139
+ const titles = wrapper.findAll(".yh-ai-thought-chain__item-title");
140
+ (0, _vitest.expect)(titles[0].text()).toBe("Alpha");
141
+ (0, _vitest.expect)(titles[1].text()).toBe("Beta");
142
+ });
143
+ (0, _vitest.it)("should apply is-last class to last item", () => {
144
+ const items = [makeItem("First"), makeItem("Last")];
145
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
146
+ props: {
147
+ items
148
+ }
149
+ });
150
+ const allItems = wrapper.findAll(".yh-ai-thought-chain__item");
151
+ (0, _vitest.expect)(allItems[allItems.length - 1].classes()).toContain("is-last");
152
+ });
153
+ (0, _vitest.it)("should apply is-active class to thinking item", () => {
154
+ const items = [makeItem("Done", "complete"), makeItem("Running", "thinking")];
155
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
156
+ props: {
157
+ items
158
+ }
159
+ });
160
+ const allItems = wrapper.findAll(".yh-ai-thought-chain__item");
161
+ (0, _vitest.expect)(allItems[1].classes()).toContain("is-active");
162
+ });
163
+ (0, _vitest.it)("should expand last item by default in timeline mode", () => {
164
+ const items = [makeItem("Step 1", "complete", "done"), makeItem("Step 2", "complete", "also done")];
165
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
166
+ props: {
167
+ items
168
+ }
169
+ });
170
+ const lastContent = wrapper.findAll(".yh-ai-thought-chain__item-content");
171
+ (0, _vitest.expect)(lastContent.length).toBeGreaterThan(0);
172
+ });
173
+ (0, _vitest.it)("should toggle item expand on item header click", async () => {
174
+ const items = [makeItem("Step", "complete", "content here")];
175
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
176
+ props: {
177
+ items
178
+ }
179
+ });
180
+ const itemHeader = wrapper.find(".yh-ai-thought-chain__item-header");
181
+ await itemHeader.trigger("click");
182
+ (0, _vitest.expect)(wrapper.find(".yh-ai-thought-chain__item").exists()).toBe(true);
183
+ });
184
+ (0, _vitest.it)("should apply dotSize prop to item dots", () => {
185
+ const items = [makeItem("Step", "complete")];
186
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
187
+ props: {
188
+ items,
189
+ dotSize: "large"
190
+ }
191
+ });
192
+ const dotEl = wrapper.find(".yh-ai-thought-chain__item-dot");
193
+ (0, _vitest.expect)(dotEl.exists()).toBe(true);
194
+ (0, _vitest.expect)(dotEl.classes().join(" ")).toContain("large");
195
+ });
196
+ (0, _vitest.it)("should render default slot in single node mode", () => {
197
+ const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
198
+ slots: {
199
+ default: '<em class="slot-content">Slot</em>'
200
+ }
201
+ });
202
+ (0, _vitest.expect)(wrapper.find(".slot-content").exists()).toBe(true);
203
+ });
204
+ });
@@ -0,0 +1,134 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { mount } from "@vue/test-utils";
3
+ import { nextTick } from "vue";
4
+ import AiThoughtChain from "../src/ai-thought-chain.vue";
5
+ const makeItem = (title, status = "complete", content = "") => ({
6
+ title,
7
+ status,
8
+ content
9
+ });
10
+ describe("YhAiThoughtChain", () => {
11
+ it("should render with base class", () => {
12
+ const wrapper = mount(AiThoughtChain);
13
+ expect(wrapper.find(".yh-ai-thought-chain").exists()).toBe(true);
14
+ });
15
+ it("should render single node header when no items", () => {
16
+ const wrapper = mount(AiThoughtChain, { props: { title: "My Thought" } });
17
+ expect(wrapper.find(".yh-ai-thought-chain__header").exists()).toBe(true);
18
+ });
19
+ it("should render title in single node mode", () => {
20
+ const wrapper = mount(AiThoughtChain, { props: { title: "Thinking Title" } });
21
+ expect(wrapper.find(".yh-ai-thought-chain__title").text()).toBe("Thinking Title");
22
+ });
23
+ it("should fallback to default title when no title provided", () => {
24
+ const wrapper = mount(AiThoughtChain);
25
+ expect(wrapper.find(".yh-ai-thought-chain__title").text().length).toBeGreaterThan(0);
26
+ });
27
+ it("should compute thinking status when thinking=true", () => {
28
+ const wrapper = mount(AiThoughtChain, { props: { thinking: true } });
29
+ expect(wrapper.classes()).toContain("is-thinking");
30
+ });
31
+ it("should compute complete status when thinking=false", () => {
32
+ const wrapper = mount(AiThoughtChain, { props: { thinking: false } });
33
+ expect(wrapper.classes()).not.toContain("is-thinking");
34
+ });
35
+ it("should use explicit status prop over thinking", () => {
36
+ const wrapper = mount(AiThoughtChain, {
37
+ props: { status: "error", thinking: true }
38
+ });
39
+ expect(wrapper.classes()).not.toContain("is-thinking");
40
+ });
41
+ it("should be collapsed by default in single mode", () => {
42
+ const wrapper = mount(AiThoughtChain, { props: { content: "Some content" } });
43
+ expect(wrapper.classes()).not.toContain("is-expanded");
44
+ });
45
+ it("should expand on header click in single node mode", async () => {
46
+ const wrapper = mount(AiThoughtChain, {
47
+ props: { title: "Title", content: "Detail" }
48
+ });
49
+ await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
50
+ expect(wrapper.classes()).toContain("is-expanded");
51
+ });
52
+ it("should collapse again on second header click", async () => {
53
+ const wrapper = mount(AiThoughtChain, { props: { content: "Detail" } });
54
+ await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
55
+ await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
56
+ expect(wrapper.classes()).not.toContain("is-expanded");
57
+ });
58
+ it("should render content in single mode when expanded", async () => {
59
+ const wrapper = mount(AiThoughtChain, {
60
+ props: { content: "Thought Content Detail" }
61
+ });
62
+ await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
63
+ expect(wrapper.find(".yh-ai-thought-chain__text").text()).toBe("Thought Content Detail");
64
+ });
65
+ it("should auto-collapse when status becomes complete and autoCollapse=true", async () => {
66
+ const wrapper = mount(AiThoughtChain, {
67
+ props: { status: "thinking", autoCollapse: true }
68
+ });
69
+ await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
70
+ expect(wrapper.classes()).toContain("is-expanded");
71
+ await wrapper.setProps({ status: "complete" });
72
+ await nextTick();
73
+ expect(wrapper.classes()).not.toContain("is-expanded");
74
+ });
75
+ it("should apply is-timeline class when items provided", () => {
76
+ const wrapper = mount(AiThoughtChain, {
77
+ props: { items: [makeItem("Step 1"), makeItem("Step 2")] }
78
+ });
79
+ expect(wrapper.classes()).toContain("is-timeline");
80
+ });
81
+ it("should render correct number of timeline items", () => {
82
+ const items = [makeItem("Step 1"), makeItem("Step 2"), makeItem("Step 3")];
83
+ const wrapper = mount(AiThoughtChain, { props: { items } });
84
+ expect(wrapper.findAll(".yh-ai-thought-chain__item").length).toBe(3);
85
+ });
86
+ it("should render item titles", () => {
87
+ const items = [makeItem("Alpha"), makeItem("Beta")];
88
+ const wrapper = mount(AiThoughtChain, { props: { items } });
89
+ const titles = wrapper.findAll(".yh-ai-thought-chain__item-title");
90
+ expect(titles[0].text()).toBe("Alpha");
91
+ expect(titles[1].text()).toBe("Beta");
92
+ });
93
+ it("should apply is-last class to last item", () => {
94
+ const items = [makeItem("First"), makeItem("Last")];
95
+ const wrapper = mount(AiThoughtChain, { props: { items } });
96
+ const allItems = wrapper.findAll(".yh-ai-thought-chain__item");
97
+ expect(allItems[allItems.length - 1].classes()).toContain("is-last");
98
+ });
99
+ it("should apply is-active class to thinking item", () => {
100
+ const items = [makeItem("Done", "complete"), makeItem("Running", "thinking")];
101
+ const wrapper = mount(AiThoughtChain, { props: { items } });
102
+ const allItems = wrapper.findAll(".yh-ai-thought-chain__item");
103
+ expect(allItems[1].classes()).toContain("is-active");
104
+ });
105
+ it("should expand last item by default in timeline mode", () => {
106
+ const items = [
107
+ makeItem("Step 1", "complete", "done"),
108
+ makeItem("Step 2", "complete", "also done")
109
+ ];
110
+ const wrapper = mount(AiThoughtChain, { props: { items } });
111
+ const lastContent = wrapper.findAll(".yh-ai-thought-chain__item-content");
112
+ expect(lastContent.length).toBeGreaterThan(0);
113
+ });
114
+ it("should toggle item expand on item header click", async () => {
115
+ const items = [makeItem("Step", "complete", "content here")];
116
+ const wrapper = mount(AiThoughtChain, { props: { items } });
117
+ const itemHeader = wrapper.find(".yh-ai-thought-chain__item-header");
118
+ await itemHeader.trigger("click");
119
+ expect(wrapper.find(".yh-ai-thought-chain__item").exists()).toBe(true);
120
+ });
121
+ it("should apply dotSize prop to item dots", () => {
122
+ const items = [makeItem("Step", "complete")];
123
+ const wrapper = mount(AiThoughtChain, { props: { items, dotSize: "large" } });
124
+ const dotEl = wrapper.find(".yh-ai-thought-chain__item-dot");
125
+ expect(dotEl.exists()).toBe(true);
126
+ expect(dotEl.classes().join(" ")).toContain("large");
127
+ });
128
+ it("should render default slot in single node mode", () => {
129
+ const wrapper = mount(AiThoughtChain, {
130
+ slots: { default: '<em class="slot-content">Slot</em>' }
131
+ });
132
+ expect(wrapper.find(".slot-content").exists()).toBe(true);
133
+ });
134
+ });
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ YhAiThoughtChain: true
8
+ };
9
+ module.exports = exports.YhAiThoughtChain = void 0;
10
+ var _utils = require("@yh-ui/utils");
11
+ var _aiThoughtChain = _interopRequireDefault(require("./src/ai-thought-chain.vue"));
12
+ var _aiThoughtChain2 = require("./src/ai-thought-chain.cjs");
13
+ Object.keys(_aiThoughtChain2).forEach(function (key) {
14
+ if (key === "default" || key === "__esModule") return;
15
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
16
+ if (key in exports && exports[key] === _aiThoughtChain2[key]) return;
17
+ Object.defineProperty(exports, key, {
18
+ enumerable: true,
19
+ get: function () {
20
+ return _aiThoughtChain2[key];
21
+ }
22
+ });
23
+ });
24
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
25
+ const YhAiThoughtChain = exports.YhAiThoughtChain = (0, _utils.withInstall)(_aiThoughtChain.default);
26
+ module.exports = YhAiThoughtChain;
@@ -0,0 +1,3 @@
1
+ export declare const YhAiThoughtChain: any;
2
+ export default YhAiThoughtChain;
3
+ export * from './src/ai-thought-chain';
@@ -0,0 +1,5 @@
1
+ import { withInstall } from "@yh-ui/utils";
2
+ import AiThoughtChain from "./src/ai-thought-chain.vue";
3
+ export const YhAiThoughtChain = withInstall(AiThoughtChain);
4
+ export default YhAiThoughtChain;
5
+ export * from "./src/ai-thought-chain.mjs";
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.aiThoughtChainProps = exports.aiThoughtChainEmits = void 0;
7
+ const aiThoughtChainProps = exports.aiThoughtChainProps = {
8
+ /**
9
+ * @description 思考标题 (单节点模式)
10
+ */
11
+ title: String,
12
+ /**
13
+ * @description 是否正在思考 (兼容旧版,新版推荐 status)
14
+ */
15
+ thinking: {
16
+ type: Boolean,
17
+ default: false
18
+ },
19
+ /**
20
+ * @description 显示内容 (单节点模式)
21
+ */
22
+ content: String,
23
+ /**
24
+ * @description 当前总状态
25
+ */
26
+ status: {
27
+ type: String,
28
+ default: "none"
29
+ },
30
+ /**
31
+ * @description 推理链节点列表,如果提供了 items,将启用多节点时间轴模式
32
+ */
33
+ items: {
34
+ type: Array,
35
+ default: () => []
36
+ },
37
+ /**
38
+ * @description 当状态变为已完成时是否自动收起
39
+ */
40
+ autoCollapse: {
41
+ type: Boolean,
42
+ default: true
43
+ },
44
+ /**
45
+ * @description 节点圆点大小
46
+ */
47
+ dotSize: {
48
+ type: String,
49
+ default: "default"
50
+ },
51
+ /**
52
+ * @description 节点连接线是否显示渐变
53
+ */
54
+ lineGradient: {
55
+ type: Boolean,
56
+ default: false
57
+ },
58
+ /**
59
+ * @description 主题覆盖变量
60
+ */
61
+ themeOverrides: {
62
+ type: Object,
63
+ default: void 0
64
+ }
65
+ };
66
+ const aiThoughtChainEmits = exports.aiThoughtChainEmits = {
67
+ "update:items": items => Array.isArray(items)
68
+ };