@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,1300 @@
1
+ <script setup>
2
+ import { useNamespace, useLocale } from "@yh-ui/hooks";
3
+ import { useComponentTheme } from "@yh-ui/theme";
4
+ import { computed, ref, onBeforeUnmount, watchEffect, shallowRef, watch } from "vue";
5
+ import { aiBubbleProps } from "./ai-bubble";
6
+ import { YhAvatar } from "../../avatar";
7
+ import { YhButton } from "../../button";
8
+ import { YhIcon } from "../../icon";
9
+ import MarkdownIt from "markdown-it";
10
+ import hljs from "highlight.js";
11
+ import "highlight.js/styles/atom-one-dark.css";
12
+ defineOptions({
13
+ name: "YhAiBubble"
14
+ });
15
+ const props = defineProps(aiBubbleProps);
16
+ const ns = useNamespace("ai-bubble");
17
+ const { t } = useLocale();
18
+ const { themeStyle } = useComponentTheme(
19
+ "ai-bubble",
20
+ computed(() => props.themeOverrides)
21
+ );
22
+ const playingAsset = ref(null);
23
+ let audioInstance = null;
24
+ const handleAudioToggle = (url) => {
25
+ if (playingAsset.value === url) {
26
+ audioInstance?.pause();
27
+ playingAsset.value = null;
28
+ } else {
29
+ if (audioInstance) {
30
+ audioInstance.pause();
31
+ }
32
+ playingAsset.value = url;
33
+ audioInstance = new Audio(url);
34
+ audioInstance.play().catch((err) => {
35
+ console.warn("Audio playback failed:", err);
36
+ playingAsset.value = null;
37
+ });
38
+ audioInstance.onended = () => {
39
+ playingAsset.value = null;
40
+ };
41
+ }
42
+ };
43
+ const handleDownload = (url) => {
44
+ window.open(url, "_blank");
45
+ };
46
+ const getFileIcon = (url = "") => {
47
+ const ext = url.split(".").pop()?.toLowerCase() || "";
48
+ switch (ext) {
49
+ case "pdf":
50
+ return "file-pdf";
51
+ case "xlsx":
52
+ case "xls":
53
+ case "csv":
54
+ return "file-excel";
55
+ case "doc":
56
+ case "docx":
57
+ return "file-word";
58
+ case "mp4":
59
+ case "webm":
60
+ case "mov":
61
+ return "file-video";
62
+ case "mp3":
63
+ case "wav":
64
+ case "ogg":
65
+ return "file-audio";
66
+ case "txt":
67
+ case "md":
68
+ return "file-txt";
69
+ default:
70
+ return "document";
71
+ }
72
+ };
73
+ const getMarkdownInstance = () => {
74
+ const md = new MarkdownIt({
75
+ html: false,
76
+ linkify: true,
77
+ typographer: true,
78
+ highlight: function(str, lang) {
79
+ if (lang && hljs.getLanguage(lang)) {
80
+ try {
81
+ return hljs.highlight(str, { language: lang, ignoreIllegals: true }).value;
82
+ } catch {
83
+ }
84
+ }
85
+ return "";
86
+ }
87
+ });
88
+ md.inline.ruler.after("text", "citation", (state, silent) => {
89
+ const start = state.pos;
90
+ if (state.src.charCodeAt(start) !== 91) return false;
91
+ const match = state.src.slice(start).match(/^\[(\d+)\]/);
92
+ if (!match) return false;
93
+ if (!silent) {
94
+ const id = match[1];
95
+ let token = state.push("citation_open", "sup", 1);
96
+ token.attrs = [
97
+ ["class", "yh-ai-citation"],
98
+ ["data-id", id]
99
+ ];
100
+ token = state.push("text", "", 0);
101
+ token.content = id;
102
+ state.push("citation_close", "sup", -1);
103
+ }
104
+ state.pos += match[0].length;
105
+ return true;
106
+ });
107
+ return md;
108
+ };
109
+ const mdi = shallowRef(null);
110
+ watchEffect(() => {
111
+ if (props.markdown && !mdi.value) {
112
+ mdi.value = getMarkdownInstance();
113
+ }
114
+ });
115
+ onBeforeUnmount(() => {
116
+ if (audioInstance) {
117
+ audioInstance.pause();
118
+ audioInstance = null;
119
+ }
120
+ mdi.value = null;
121
+ });
122
+ const parsedContent = ref(props.content);
123
+ let renderRafId = null;
124
+ watch(
125
+ () => props.content,
126
+ (newContent) => {
127
+ if (!props.markdown || !props.typing) {
128
+ if (renderRafId && typeof cancelAnimationFrame !== "undefined") {
129
+ cancelAnimationFrame(renderRafId);
130
+ renderRafId = null;
131
+ }
132
+ parsedContent.value = props.markdown && mdi.value ? mdi.value.render(newContent || "") : newContent;
133
+ return;
134
+ }
135
+ if (typeof requestAnimationFrame === "undefined") {
136
+ parsedContent.value = mdi.value ? mdi.value.render(newContent || "") : newContent;
137
+ return;
138
+ }
139
+ if (renderRafId) return;
140
+ renderRafId = requestAnimationFrame(() => {
141
+ parsedContent.value = mdi.value ? mdi.value.render(newContent || "") : newContent;
142
+ renderRafId = null;
143
+ });
144
+ },
145
+ { immediate: true }
146
+ );
147
+ const computedPlacement = computed(() => {
148
+ if (props.placement) return props.placement;
149
+ return props.role === "user" ? "end" : "start";
150
+ });
151
+ const classes = computed(() => [
152
+ ns.b(),
153
+ ns.m(props.role),
154
+ ns.m(`placement-${computedPlacement.value}`),
155
+ ns.m(`shape-${props.shape}`),
156
+ ns.m(`variant-${props.variant}`),
157
+ ns.is("loading", props.loading),
158
+ ns.is("typing", props.typing)
159
+ ]);
160
+ const hoveredCitation = ref(null);
161
+ const citationTooltipStyle = ref({
162
+ top: "0px",
163
+ left: "0px",
164
+ position: "fixed",
165
+ transform: "",
166
+ zIndex: "9999"
167
+ });
168
+ let citationHoverTimer = null;
169
+ const handleCitationHover = (e) => {
170
+ const target = e.target;
171
+ if (target && target.classList && target.classList.contains("yh-ai-citation")) {
172
+ const id = target.getAttribute("data-id");
173
+ const citation = props.citations?.find((c) => String(c.id) === id);
174
+ if (citation) {
175
+ if (citationHoverTimer) clearTimeout(citationHoverTimer);
176
+ hoveredCitation.value = citation;
177
+ const rect = target.getBoundingClientRect();
178
+ citationTooltipStyle.value = {
179
+ top: `${rect.top - 10}px`,
180
+ left: `${rect.left + rect.width / 2}px`,
181
+ transform: "translate(-50%, -100%)",
182
+ position: "fixed",
183
+ zIndex: "9999"
184
+ };
185
+ }
186
+ }
187
+ };
188
+ const handleCitationLeave = (e) => {
189
+ const target = e.target;
190
+ if (target && target.classList && target.classList.contains("yh-ai-citation")) {
191
+ citationHoverTimer = setTimeout(() => {
192
+ hoveredCitation.value = null;
193
+ }, 200);
194
+ }
195
+ };
196
+ const handleTooltipEnter = () => {
197
+ if (citationHoverTimer) clearTimeout(citationHoverTimer);
198
+ };
199
+ const handleTooltipLeave = () => {
200
+ citationHoverTimer = setTimeout(() => {
201
+ hoveredCitation.value = null;
202
+ }, 200);
203
+ };
204
+ </script>
205
+
206
+ <template>
207
+ <div :class="classes" :style="themeStyle">
208
+ <!-- Avatar -->
209
+ <div :class="ns.e('avatar')" v-if="role !== 'system'">
210
+ <slot name="avatar">
211
+ <YhAvatar v-if="avatar" :src="avatar" />
212
+ <YhAvatar v-else>
213
+ <YhIcon :name="role === 'user' ? 'user' : 'robot'" />
214
+ </YhAvatar>
215
+ </slot>
216
+ </div>
217
+
218
+ <!-- Content Wrapper -->
219
+ <div :class="ns.e('content-wrapper')">
220
+ <!-- Header -->
221
+ <div :class="ns.e('header')" v-if="$slots.header || time">
222
+ <slot name="header">
223
+ <span v-if="time" :class="ns.e('time')">{{ time }}</span>
224
+ </slot>
225
+ </div>
226
+
227
+ <!-- Body -->
228
+ <div :class="ns.e('body')">
229
+ <template v-if="loading && !content">
230
+ <span :class="ns.e('typing-indicator')"> <span></span><span></span><span></span> </span>
231
+ </template>
232
+ <template v-else>
233
+ <!-- Multimodal: Images (Above text) -->
234
+ <div
235
+ v-if="multimodal && multimodal.some(m => m.type === 'image')"
236
+ :class="ns.e('image-grid')"
237
+ >
238
+ <div
239
+ v-for="(img, idx) in multimodal.filter(m => m.type === 'image')"
240
+ :key="idx"
241
+ :class="ns.e('image-item')"
242
+ >
243
+ <img :src="img.url" :alt="img.title" />
244
+ </div>
245
+ </div>
246
+
247
+ <slot>
248
+ <!-- eslint-disable vue/no-v-html -->
249
+ <div
250
+ v-if="markdown"
251
+ :class="[ns.e('text'), ns.e('markdown')]"
252
+ v-html="parsedContent"
253
+ @mouseover="handleCitationHover"
254
+ @mouseout="handleCitationLeave"
255
+ ></div>
256
+ <!-- eslint-enable vue/no-v-html -->
257
+ <div v-else :class="ns.e('text')">{{ content }}</div>
258
+ </slot>
259
+
260
+ <!-- Multimodal: Audio/Files (Below text) -->
261
+ <div
262
+ v-if="multimodal && multimodal.some(m => m.type !== 'image')"
263
+ :class="ns.e('multimodal-assets')"
264
+ >
265
+ <template v-for="(asset, idx) in multimodal" :key="idx">
266
+ <!-- Audio Player -->
267
+ <div
268
+ v-if="asset.type === 'audio'"
269
+ :class="[ns.e('audio-player'), {
270
+ 'is-active': playingAsset === asset.url
271
+ }]"
272
+ >
273
+ <YhButton
274
+ circle
275
+ size="small"
276
+ :type="role === 'user' ? 'default' : 'primary'"
277
+ @click="handleAudioToggle(asset.url)"
278
+ >
279
+ <template #icon>
280
+ <YhIcon :name="playingAsset === asset.url ? 'video-pause' : 'video-play'" />
281
+ </template>
282
+ </YhButton>
283
+ <div :class="[ns.e('audio-waveform'), {
284
+ 'is-active': playingAsset === asset.url
285
+ }]">
286
+ <span v-for="i in 12" :key="i" :style="{
287
+ '--delay': i * 0.1 + 's'
288
+ }"></span>
289
+ </div>
290
+ <span :class="ns.e('audio-duration')">{{ asset.extra?.duration || "0:00" }}</span>
291
+ </div>
292
+
293
+ <!-- File/Table Card -->
294
+ <div v-else-if="asset.type === 'file'" :class="ns.e('file-card')">
295
+ <div :class="ns.e('file-icon')">
296
+ <YhIcon :name="getFileIcon(asset.url)" />
297
+ </div>
298
+ <div :class="ns.e('file-info')">
299
+ <div :class="ns.e('file-name')">{{ asset.title }}</div>
300
+ <div :class="ns.e('file-meta')">{{ asset.size }}</div>
301
+ </div>
302
+ <YhButton text circle @click="handleDownload(asset.url)">
303
+ <template #icon>
304
+ <YhIcon name="download" />
305
+ </template>
306
+ </YhButton>
307
+ </div>
308
+ </template>
309
+ </div>
310
+
311
+ <!-- Citations -->
312
+ <div v-if="citations && citations.length > 0" :class="ns.e('citations')">
313
+ <div :class="ns.e('citations-title')">
314
+ <YhIcon name="document" />
315
+ <span>{{ t("ai.bubble.citations") || "\u53C2\u8003\u5F15\u7528" }}</span>
316
+ <span :class="ns.e('citations-count')">{{ citations.length }}</span>
317
+ </div>
318
+ <div :class="ns.e('citations-list')">
319
+ <a
320
+ v-for="(cite, index) in citations"
321
+ :key="index"
322
+ :href="cite.url"
323
+ target="_blank"
324
+ :class="ns.e('citation-item')"
325
+ :title="cite.title"
326
+ >
327
+ <span :class="ns.e('citation-index')">{{ cite.id || index + 1 }}</span>
328
+ <span :class="ns.e('citation-text')">{{ cite.title }}</span>
329
+ <YhIcon v-if="cite.url" name="arrow-right" :class="ns.e('citation-link-icon')" />
330
+ </a>
331
+ </div>
332
+ </div>
333
+ </template>
334
+ </div>
335
+
336
+ <!-- Footer -->
337
+ <div :class="ns.e('footer')" v-if="$slots.footer">
338
+ <slot name="footer"></slot>
339
+ </div>
340
+ </div>
341
+
342
+ <!-- Floating Citation Tooltip -->
343
+ <Teleport to="body">
344
+ <Transition name="yh-fade-in-scale-up">
345
+ <div
346
+ v-if="hoveredCitation"
347
+ :class="ns.e('citation-tooltip-wrapper')"
348
+ :style="citationTooltipStyle"
349
+ @mouseenter="handleTooltipEnter"
350
+ @mouseleave="handleTooltipLeave"
351
+ >
352
+ <div :class="ns.e('citation-tooltip')">
353
+ <div :class="ns.e('citation-tooltip-header')">
354
+ <YhIcon :name="hoveredCitation.icon || 'document'" />
355
+ <span>{{ hoveredCitation.source || hoveredCitation.title }}</span>
356
+ </div>
357
+ <div :class="ns.e('citation-tooltip-body')">
358
+ <h4>{{ hoveredCitation.title }}</h4>
359
+ </div>
360
+ </div>
361
+ </div>
362
+ </Transition>
363
+ </Teleport>
364
+ </div>
365
+ </template>
366
+
367
+ <style>
368
+ @charset "UTF-8";
369
+ /**
370
+ * YH-UI CSS Variables
371
+ * 全局 CSS 变量定义 - 业内最佳主题系统
372
+ */
373
+ :root {
374
+ /* ==================== 密度/紧凑度系统 ==================== */
375
+ --yh-density-factor: 1;
376
+ --yh-component-size-default: 32px;
377
+ --yh-component-size-small: 24px;
378
+ --yh-component-size-large: 40px;
379
+ --yh-padding-default: 12px 16px;
380
+ --yh-padding-small: 8px 12px;
381
+ --yh-padding-large: 16px 20px;
382
+ --yh-spacing-unit: 8px;
383
+ /* ==================== 基础颜色 ==================== */
384
+ --yh-color-white: #ffffff;
385
+ --yh-color-black: #000000;
386
+ /* ==================== 颜色系统 ==================== */
387
+ /* 主色 */
388
+ --yh-color-primary: #409eff;
389
+ --yh-color-primary-light-1: #53a8ff;
390
+ --yh-color-primary-light-2: #66b1ff;
391
+ --yh-color-primary-light-3: #79bbff;
392
+ --yh-color-primary-light-4: #8cc5ff;
393
+ --yh-color-primary-light-5: #a0cfff;
394
+ --yh-color-primary-light-6: #b3d8ff;
395
+ --yh-color-primary-light-7: #c6e2ff;
396
+ --yh-color-primary-light-8: #d9ecff;
397
+ --yh-color-primary-light-9: #ecf5ff;
398
+ --yh-color-primary-dark-2: #337ecc;
399
+ /* 成功色 */
400
+ --yh-color-success: #67c23a;
401
+ --yh-color-success-light-3: #95d475;
402
+ --yh-color-success-light-5: #b3e19d;
403
+ --yh-color-success-light-7: #d1edc4;
404
+ --yh-color-success-light-9: #f0f9eb;
405
+ --yh-color-success-dark-2: #529b2e;
406
+ /* 警告色 */
407
+ --yh-color-warning: #e6a23c;
408
+ --yh-color-warning-light-3: #eebe77;
409
+ --yh-color-warning-light-5: #f3d19e;
410
+ --yh-color-warning-light-7: #f8e3c5;
411
+ --yh-color-warning-light-9: #fdf6ec;
412
+ --yh-color-warning-dark-2: #b88230;
413
+ /* 危险色 */
414
+ --yh-color-danger: #f56c6c;
415
+ --yh-color-danger-light-3: #f89898;
416
+ --yh-color-danger-light-5: #fab6b6;
417
+ --yh-color-danger-light-7: #fcd3d3;
418
+ --yh-color-danger-light-9: #fef0f0;
419
+ --yh-color-danger-dark-2: #c45656;
420
+ /* 信息色 */
421
+ --yh-color-info: #909399;
422
+ --yh-color-info-light-3: #b1b3b8;
423
+ --yh-color-info-light-5: #c8c9cc;
424
+ --yh-color-info-light-7: #dedfe0;
425
+ --yh-color-info-light-9: #f4f4f5;
426
+ --yh-color-info-dark-2: #73767a;
427
+ /* 文字颜色 */
428
+ --yh-text-color-primary: #303133;
429
+ --yh-text-color-regular: #606266;
430
+ --yh-text-color-secondary: #909399;
431
+ --yh-text-color-placeholder: #a8abb2;
432
+ --yh-text-color-disabled: #c0c4cc;
433
+ /* 边框颜色 */
434
+ --yh-border-color: #dcdfe6;
435
+ --yh-border-color-hover: var(--yh-color-primary);
436
+ --yh-border-color-light: #e4e7ed;
437
+ --yh-border-color-lighter: #ebeef5;
438
+ --yh-border-color-extra-light: #f2f6fc;
439
+ --yh-border-color-dark: #d4d7de;
440
+ --yh-border-color-darker: #cdd0d6;
441
+ /* 填充颜色 */
442
+ --yh-fill-color: #f0f2f5;
443
+ --yh-fill-color-light: #f5f7fa;
444
+ --yh-fill-color-lighter: #fafafa;
445
+ --yh-fill-color-extra-light: #fafcff;
446
+ --yh-fill-color-dark: #ebedf0;
447
+ --yh-fill-color-darker: #e6e8eb;
448
+ --yh-fill-color-blank: #ffffff;
449
+ /* 背景颜色 */
450
+ --yh-bg-color: #ffffff;
451
+ --yh-bg-color-page: #f2f3f5;
452
+ --yh-bg-color-overlay: #ffffff;
453
+ /* ==================== 间距系统 ==================== */
454
+ --yh-spacing-none: 0;
455
+ --yh-spacing-xs: 4px;
456
+ --yh-spacing-sm: 8px;
457
+ --yh-spacing-md: 16px;
458
+ --yh-spacing-lg: 24px;
459
+ --yh-spacing-xl: 32px;
460
+ --yh-spacing-xxl: 48px;
461
+ /* ==================== 圆角系统 ==================== */
462
+ --yh-radius-none: 0;
463
+ --yh-radius-sm: 2px;
464
+ --yh-radius-base: 4px;
465
+ --yh-radius-md: 8px;
466
+ --yh-radius-lg: 12px;
467
+ --yh-radius-xl: 16px;
468
+ --yh-radius-round: 20px;
469
+ --yh-radius-circle: 50%;
470
+ /* ==================== 字体系统 ==================== */
471
+ --yh-font-family:
472
+ -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans',
473
+ sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
474
+ /* 字号 */
475
+ --yh-font-size-xs: 12px;
476
+ --yh-font-size-sm: 13px;
477
+ --yh-font-size-base: 14px;
478
+ --yh-font-size-md: 16px;
479
+ --yh-font-size-lg: 18px;
480
+ --yh-font-size-xl: 20px;
481
+ --yh-font-size-xxl: 24px;
482
+ /* 行高 */
483
+ --yh-line-height-none: 1;
484
+ --yh-line-height-tight: 1.25;
485
+ --yh-line-height-snug: 1.375;
486
+ --yh-line-height-normal: 1.5;
487
+ --yh-line-height-relaxed: 1.625;
488
+ --yh-line-height-loose: 2;
489
+ /* 字重 */
490
+ --yh-font-weight-light: 300;
491
+ --yh-font-weight-normal: 400;
492
+ --yh-font-weight-medium: 500;
493
+ --yh-font-weight-semibold: 600;
494
+ --yh-font-weight-bold: 700;
495
+ /* ==================== 阴影系统 ==================== */
496
+ --yh-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
497
+ --yh-shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
498
+ --yh-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
499
+ --yh-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
500
+ --yh-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
501
+ /* ==================== 过渡动效 ==================== */
502
+ --yh-duration-fast: 150ms;
503
+ --yh-duration-base: 200ms;
504
+ --yh-duration-slow: 300ms;
505
+ --yh-timing-ease: ease;
506
+ --yh-timing-ease-in: cubic-bezier(0.4, 0, 1, 1);
507
+ --yh-timing-ease-out: cubic-bezier(0, 0, 0.2, 1);
508
+ --yh-timing-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
509
+ --yh-timing-linear: linear;
510
+ --yh-transition-base: all var(--yh-duration-base) var(--yh-timing-ease-in-out);
511
+ --yh-transition-fast: all var(--yh-duration-fast) var(--yh-timing-ease-in-out);
512
+ --yh-transition-slow: all var(--yh-duration-slow) var(--yh-timing-ease-in-out);
513
+ /* ==================== 层级系统 ==================== */
514
+ --yh-z-index-normal: 1;
515
+ --yh-z-index-top: 1000;
516
+ --yh-z-index-popper: 2000;
517
+ --yh-z-index-overlay: 2001;
518
+ --yh-z-index-modal: 2002;
519
+ --yh-z-index-popover: 2003;
520
+ --yh-z-index-tooltip: 2004;
521
+ --yh-z-index-loading: 2005;
522
+ /* ==================== 组件尺寸 ==================== */
523
+ /* Large */
524
+ --yh-component-size-large: 40px;
525
+ --yh-component-size-large-font: 14px;
526
+ --yh-component-size-large-padding: 20px;
527
+ /* Default */
528
+ --yh-component-size-default: 32px;
529
+ --yh-component-size-default-font: 14px;
530
+ --yh-component-size-default-padding: 16px;
531
+ /* Small */
532
+ --yh-component-size-small: 24px;
533
+ --yh-component-size-small-font: 12px;
534
+ --yh-component-size-small-padding: 12px;
535
+ /* ==================== 组件语义化变量 ==================== */
536
+ --yh-border-radius-base: var(--yh-radius-base);
537
+ --yh-border-radius-small: var(--yh-radius-sm);
538
+ --yh-border-radius-round: var(--yh-radius-round);
539
+ /* Message 消息提示 */
540
+ --yh-message-bg-color: var(--yh-bg-color-overlay);
541
+ --yh-message-border-color: var(--yh-border-color-lighter);
542
+ --yh-message-shadow: var(--yh-shadow-lg);
543
+ --yh-message-text-color: var(--yh-text-color-primary);
544
+ --yh-message-close-color: var(--yh-text-color-secondary);
545
+ --yh-message-close-hover-color: var(--yh-text-color-primary);
546
+ /* Notification 通知 */
547
+ --yh-notification-bg-color: var(--yh-bg-color-overlay);
548
+ --yh-notification-border-color: var(--yh-border-color-lighter);
549
+ --yh-notification-shadow: var(--yh-shadow-lg);
550
+ --yh-notification-title-color: var(--yh-text-color-primary);
551
+ --yh-notification-content-color: var(--yh-text-color-regular);
552
+ /* Badge 徽标 */
553
+ --yh-badge-bg-color: var(--yh-color-danger);
554
+ --yh-badge-text-color: #ffffff;
555
+ --yh-badge-border-color: var(--yh-bg-color);
556
+ /* Card 卡片 */
557
+ --yh-card-bg-color: var(--yh-bg-color-overlay);
558
+ --yh-card-border-color: var(--yh-border-color-lighter);
559
+ --yh-card-shadow: var(--yh-shadow-base);
560
+ --yh-card-header-padding: 18px 20px;
561
+ --yh-card-body-padding: 20px;
562
+ /* Input 输入框 */
563
+ --yh-input-bg-color: var(--yh-fill-color-blank);
564
+ --yh-input-text-color: var(--yh-text-color-regular);
565
+ --yh-input-border-color: var(--yh-border-color);
566
+ --yh-input-hover-border-color: var(--yh-color-primary);
567
+ --yh-input-focus-border-color: var(--yh-color-primary);
568
+ --yh-input-placeholder-color: var(--yh-text-color-placeholder);
569
+ --yh-input-icon-color: var(--yh-text-color-placeholder);
570
+ --yh-input-disabled-bg-color: var(--yh-fill-color-light);
571
+ --yh-input-disabled-text-color: var(--yh-text-color-disabled);
572
+ --yh-input-disabled-border-color: var(--yh-border-color-light);
573
+ /* Image 图片 */
574
+ --yh-image-placeholder-bg-color: var(--yh-fill-color-light);
575
+ --yh-image-placeholder-text-color: var(--yh-text-color-placeholder);
576
+ --yh-image-error-bg-color: var(--yh-fill-color-extra-light);
577
+ --yh-image-error-text-color: var(--yh-text-color-placeholder);
578
+ /* Image Viewer 预览器 */
579
+ --yh-image-viewer-mask-bg-color: rgba(0, 0, 0, 0.5);
580
+ --yh-image-viewer-btn-bg-color: var(--yh-text-color-regular);
581
+ --yh-image-viewer-btn-color: #ffffff;
582
+ --yh-image-viewer-btn-hover-bg-color: var(--yh-color-primary);
583
+ /* Calendar 日历 */
584
+ --yh-calendar-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
585
+ --yh-calendar-border-color: rgba(0, 0, 0, 0.06);
586
+ --yh-calendar-border-radius: var(--yh-radius-xl);
587
+ --yh-calendar-header-bg: rgba(255, 255, 255, 0.95);
588
+ --yh-calendar-header-border: rgba(0, 0, 0, 0.04);
589
+ --yh-calendar-header-padding: 18px 22px;
590
+ --yh-calendar-body-padding: 14px 18px 18px;
591
+ /* Calendar 尺寸 */
592
+ --yh-calendar-cell-height: 85px;
593
+ --yh-calendar-cell-height-small: 52px;
594
+ --yh-calendar-cell-height-large: 110px;
595
+ --yh-calendar-cell-radius: 10px;
596
+ --yh-calendar-cell-radius-small: 6px;
597
+ --yh-calendar-cell-radius-large: 12px;
598
+ /* Calendar 颜色 */
599
+ --yh-calendar-primary: var(--yh-color-primary);
600
+ --yh-calendar-primary-light: rgba(59, 130, 246, 0.1);
601
+ --yh-calendar-selected-bg: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
602
+ --yh-calendar-selected-border: rgba(59, 130, 246, 0.4);
603
+ --yh-calendar-today-dot: var(--yh-color-primary);
604
+ --yh-calendar-weekend-color: #f97316;
605
+ --yh-calendar-disabled-color: var(--yh-text-color-disabled);
606
+ --yh-calendar-other-month-opacity: 0.35;
607
+ /* Calendar 假日 */
608
+ --yh-calendar-holiday-color: var(--yh-color-success);
609
+ --yh-calendar-holiday-bg: rgba(16, 185, 129, 0.12);
610
+ --yh-calendar-holiday-border: rgba(16, 185, 129, 0.25);
611
+ --yh-calendar-workday-color: var(--yh-color-warning);
612
+ --yh-calendar-workday-bg: rgba(245, 158, 11, 0.12);
613
+ --yh-calendar-workday-border: rgba(245, 158, 11, 0.25);
614
+ /* Calendar 范围选择 */
615
+ --yh-calendar-range-bg: rgba(59, 130, 246, 0.08);
616
+ --yh-calendar-range-border: rgba(59, 130, 246, 0.2);
617
+ /* Calendar 字体 */
618
+ --yh-calendar-weekday-font-size: var(--yh-font-size-sm);
619
+ --yh-calendar-weekday-color: var(--yh-text-color-secondary);
620
+ --yh-calendar-day-font-size: 15px;
621
+ --yh-calendar-day-color: var(--yh-text-color-primary);
622
+ --yh-calendar-badge-font-size: 9px;
623
+ /* Table 表格 */
624
+ --yh-table-border-color: var(--yh-border-color-lighter);
625
+ --yh-table-header-bg: var(--yh-fill-color-light);
626
+ --yh-table-header-text-color: var(--yh-text-color-primary);
627
+ --yh-table-header-font-weight: var(--yh-font-weight-semibold);
628
+ --yh-table-row-bg: var(--yh-bg-color);
629
+ --yh-table-row-hover-bg: var(--yh-fill-color-light);
630
+ --yh-table-row-stripe-bg: var(--yh-fill-color-lighter);
631
+ --yh-table-row-current-bg: var(--yh-color-primary-light-9);
632
+ --yh-table-row-selected-bg: var(--yh-color-primary-light-8);
633
+ --yh-table-row-success-bg: var(--yh-color-success-light-9);
634
+ --yh-table-row-warning-bg: var(--yh-color-warning-light-9);
635
+ --yh-table-text-color: var(--yh-text-color-regular);
636
+ --yh-table-empty-text-color: var(--yh-text-color-secondary);
637
+ --yh-table-font-size: var(--yh-font-size-base);
638
+ --yh-table-cell-padding: 12px 0;
639
+ --yh-table-cell-spacing: 12px;
640
+ --yh-table-fixed-left-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.15);
641
+ --yh-table-fixed-right-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
642
+ /* ==================== 边框基础 ==================== */
643
+ --yh-border-width: 1px;
644
+ --yh-border-style: solid;
645
+ --yh-border: var(--yh-border-width) var(--yh-border-style) var(--yh-border-color);
646
+ /* ==================== 断点系统 ==================== */
647
+ --yh-breakpoint-xs: 0;
648
+ --yh-breakpoint-sm: 576px;
649
+ --yh-breakpoint-md: 768px;
650
+ --yh-breakpoint-lg: 992px;
651
+ --yh-breakpoint-xl: 1200px;
652
+ --yh-breakpoint-xxl: 1400px;
653
+ /* ==================== 字体系统扩展 ==================== */
654
+ --yh-font-family-monospace:
655
+ 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
656
+ --yh-font-family-serif: Georgia, Cambria, 'Times New Roman', Times, serif;
657
+ /* ==================== 无障碍/聚焦系统 ==================== */
658
+ --yh-focus-ring-color: var(--yh-color-primary);
659
+ --yh-focus-ring-width: 2px;
660
+ --yh-focus-ring-offset: 2px;
661
+ --yh-focus-ring-opacity: 0.2;
662
+ --yh-focus-ring:
663
+ 0 0 0 var(--yh-focus-ring-offset) var(--yh-bg-color),
664
+ 0 0 0 calc(var(--yh-focus-ring-offset) + var(--yh-focus-ring-width)) var(--yh-focus-ring-color);
665
+ /* 高对比度模式支持 */
666
+ --yh-high-contrast-outline: 2px solid transparent;
667
+ --yh-high-contrast-outline-offset: 2px;
668
+ /* ==================== 滚动条样式 ==================== */
669
+ --yh-scrollbar-width: 6px;
670
+ --yh-scrollbar-thumb-color: var(--yh-text-color-disabled);
671
+ --yh-scrollbar-thumb-hover-color: var(--yh-text-color-secondary);
672
+ --yh-scrollbar-track-color: transparent;
673
+ --yh-scrollbar-thumb-radius: 3px;
674
+ /* ==================== 遮罩层 ==================== */
675
+ --yh-mask-color: rgba(0, 0, 0, 0.5);
676
+ --yh-mask-color-light: rgba(0, 0, 0, 0.3);
677
+ --yh-mask-color-extra-light: rgba(0, 0, 0, 0.1);
678
+ }
679
+
680
+ /* ==================== 暗黑模式 ==================== */
681
+ html.dark {
682
+ --yh-color-primary: #409eff;
683
+ --yh-color-primary-light-3: #3375b9;
684
+ --yh-color-primary-light-5: #2a598a;
685
+ --yh-color-primary-light-7: #213d5b;
686
+ --yh-color-primary-light-9: #18222c;
687
+ --yh-color-primary-dark-2: #66b1ff;
688
+ --yh-color-success: #67c23a;
689
+ --yh-color-success-light-3: #4e8e2f;
690
+ --yh-color-success-light-5: #3e6b27;
691
+ --yh-color-success-light-7: #2d481f;
692
+ --yh-color-success-light-9: #1d2518;
693
+ --yh-color-warning: #e6a23c;
694
+ --yh-color-warning-light-3: #a77730;
695
+ --yh-color-warning-light-5: #7d5b28;
696
+ --yh-color-warning-light-7: #533f20;
697
+ --yh-color-warning-light-9: #292218;
698
+ --yh-color-danger: #f56c6c;
699
+ --yh-color-danger-light-3: #b25252;
700
+ --yh-color-danger-light-5: #854040;
701
+ --yh-color-danger-light-7: #582e2e;
702
+ --yh-color-danger-light-9: #2b1d1d;
703
+ --yh-color-info: #909399;
704
+ --yh-color-info-light-3: #6b6d71;
705
+ --yh-color-info-light-5: #525457;
706
+ --yh-color-info-light-7: #393b3e;
707
+ --yh-color-info-light-9: #202124;
708
+ --yh-text-color-primary: #e5eaf3;
709
+ --yh-text-color-regular: #cfd3dc;
710
+ --yh-text-color-secondary: #a3a6ad;
711
+ --yh-text-color-placeholder: #8d9095;
712
+ --yh-text-color-disabled: #6c6e72;
713
+ --yh-border-color: #4c4d4f;
714
+ --yh-border-color-light: #414243;
715
+ --yh-border-color-lighter: #363637;
716
+ --yh-border-color-extra-light: #2b2b2c;
717
+ --yh-border-color-dark: #58585b;
718
+ --yh-border-color-darker: #636466;
719
+ --yh-fill-color: #303030;
720
+ --yh-fill-color-light: #262727;
721
+ --yh-fill-color-lighter: #1d1d1d;
722
+ --yh-fill-color-extra-light: #191919;
723
+ --yh-fill-color-dark: #39393a;
724
+ --yh-fill-color-darker: #424243;
725
+ --yh-fill-color-blank: transparent;
726
+ --yh-bg-color: #141414;
727
+ --yh-bg-color-page: #0a0a0a;
728
+ --yh-bg-color-overlay: #1d1e1f;
729
+ /* 组件暗色模式覆盖 */
730
+ --yh-message-bg-color: var(--yh-bg-color-overlay);
731
+ --yh-message-border-color: var(--yh-border-color-lighter);
732
+ --yh-notification-bg-color: var(--yh-bg-color-overlay);
733
+ --yh-notification-border-color: var(--yh-border-color-lighter);
734
+ --yh-badge-border-color: var(--yh-bg-color);
735
+ --yh-card-bg-color: var(--yh-bg-color-overlay);
736
+ --yh-card-border-color: var(--yh-border-color-lighter);
737
+ /* Calendar 暗黑模式 */
738
+ --yh-calendar-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
739
+ --yh-calendar-border-color: rgba(255, 255, 255, 0.08);
740
+ --yh-calendar-header-bg: rgba(30, 30, 30, 0.95);
741
+ --yh-calendar-header-border: rgba(255, 255, 255, 0.06);
742
+ --yh-calendar-day-color: var(--yh-text-color-primary);
743
+ --yh-calendar-weekday-color: var(--yh-text-color-secondary);
744
+ --yh-calendar-selected-bg: linear-gradient(
745
+ 135deg,
746
+ rgba(59, 130, 246, 0.2) 0%,
747
+ rgba(59, 130, 246, 0.1) 100%
748
+ );
749
+ /* Table 暗黑模式 */
750
+ --yh-table-border-color: var(--yh-border-color-lighter);
751
+ --yh-table-header-bg: var(--yh-fill-color-dark);
752
+ --yh-table-header-text-color: var(--yh-text-color-primary);
753
+ --yh-table-row-bg: var(--yh-bg-color);
754
+ --yh-table-row-hover-bg: var(--yh-fill-color);
755
+ --yh-table-row-stripe-bg: var(--yh-fill-color-light);
756
+ --yh-table-row-current-bg: var(--yh-color-primary-light-9);
757
+ --yh-table-row-selected-bg: var(--yh-color-primary-light-9);
758
+ --yh-table-row-success-bg: var(--yh-color-success-light-9);
759
+ --yh-table-row-warning-bg: var(--yh-color-warning-light-9);
760
+ --yh-table-fixed-left-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.3);
761
+ --yh-table-fixed-right-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.3);
762
+ /* 遮罩层暗黑模式 */
763
+ --yh-mask-color: rgba(0, 0, 0, 0.7);
764
+ --yh-mask-color-light: rgba(0, 0, 0, 0.5);
765
+ --yh-mask-color-extra-light: rgba(0, 0, 0, 0.3);
766
+ /* 滚动条暗黑模式 */
767
+ --yh-scrollbar-thumb-color: var(--yh-fill-color-darker);
768
+ --yh-scrollbar-thumb-hover-color: var(--yh-text-color-placeholder);
769
+ }
770
+
771
+ /* ==================== 减少动画偏好支持 ==================== */
772
+ @media (prefers-reduced-motion: reduce) {
773
+ :root,
774
+ html.dark {
775
+ --yh-duration-fast: 0ms;
776
+ --yh-duration-base: 0ms;
777
+ --yh-duration-slow: 0ms;
778
+ --yh-transition-base: none;
779
+ --yh-transition-fast: none;
780
+ --yh-transition-slow: none;
781
+ }
782
+ *,
783
+ *::before,
784
+ *::after {
785
+ animation-duration: 0.01ms !important;
786
+ animation-iteration-count: 1 !important;
787
+ transition-duration: 0.01ms !important;
788
+ scroll-behavior: auto !important;
789
+ }
790
+ }
791
+ /* ==================== 高对比度模式支持 ==================== */
792
+ @media (prefers-contrast: high) {
793
+ :root {
794
+ --yh-border-color: #000000;
795
+ --yh-border-color-light: #333333;
796
+ --yh-text-color-primary: #000000;
797
+ --yh-text-color-regular: #1a1a1a;
798
+ --yh-focus-ring-width: 3px;
799
+ --yh-focus-ring-color: #000000;
800
+ }
801
+ html.dark {
802
+ --yh-border-color: #ffffff;
803
+ --yh-border-color-light: #cccccc;
804
+ --yh-text-color-primary: #ffffff;
805
+ --yh-text-color-regular: #e5e5e5;
806
+ --yh-focus-ring-color: #ffffff;
807
+ }
808
+ }
809
+ /* ==================== 强制颜色模式支持 (Windows 高对比度) ==================== */
810
+ @media (forced-colors: active) {
811
+ :root {
812
+ --yh-color-primary: LinkText;
813
+ --yh-border-color: ButtonBorder;
814
+ --yh-bg-color: Canvas;
815
+ --yh-text-color-primary: CanvasText;
816
+ --yh-focus-ring-color: Highlight;
817
+ }
818
+ }
819
+ .yh-ai-bubble {
820
+ --yh-ai-bubble-user-bg: var(--yh-color-primary);
821
+ --yh-ai-bubble-user-color: var(--yh-color-white);
822
+ --yh-ai-bubble-assistant-bg: var(--yh-fill-color-light);
823
+ --yh-ai-bubble-assistant-color: var(--yh-text-color-primary);
824
+ --yh-ai-bubble-border-radius: 12px;
825
+ display: flex;
826
+ margin-bottom: var(--yh-spacing-lg);
827
+ gap: var(--yh-spacing-md);
828
+ animation: yh-fade-in-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
829
+ /* Placement */
830
+ }
831
+ .yh-ai-bubble--placement-start {
832
+ flex-direction: row;
833
+ }
834
+ .yh-ai-bubble--placement-start .yh-ai-bubble__content-wrapper {
835
+ align-items: flex-start;
836
+ }
837
+
838
+ .yh-ai-bubble--placement-end {
839
+ flex-direction: row-reverse;
840
+ }
841
+ .yh-ai-bubble--placement-end .yh-ai-bubble__content-wrapper {
842
+ align-items: flex-end;
843
+ }
844
+
845
+ .yh-ai-bubble__avatar {
846
+ flex-shrink: 0;
847
+ }
848
+
849
+ .yh-ai-bubble__content-wrapper {
850
+ display: flex;
851
+ flex-direction: column;
852
+ gap: 4px;
853
+ width: 100%;
854
+ max-width: 85%;
855
+ }
856
+
857
+ .yh-ai-bubble__header {
858
+ font-size: 12px;
859
+ color: var(--yh-text-color-placeholder);
860
+ display: flex;
861
+ align-items: center;
862
+ gap: 8px;
863
+ }
864
+
865
+ .yh-ai-bubble__time {
866
+ opacity: 0.8;
867
+ }
868
+
869
+ .yh-ai-bubble__body {
870
+ line-height: 1.6;
871
+ word-break: break-word;
872
+ border-radius: var(--yh-ai-bubble-border-radius);
873
+ transition: all 0.3s;
874
+ overflow: hidden;
875
+ padding: 12px 16px;
876
+ position: relative;
877
+ border: 1px solid transparent;
878
+ /* Theme-specific adjustments for quality */
879
+ }
880
+ :html.dark .yh-ai-bubble__body {
881
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
882
+ }
883
+
884
+ .yh-ai-bubble {
885
+ /* Shape Modifiers */
886
+ }
887
+ .yh-ai-bubble--shape-corner.yh-ai-bubble--placement-start .yh-ai-bubble__body {
888
+ border-top-left-radius: 2px;
889
+ }
890
+
891
+ .yh-ai-bubble--shape-corner.yh-ai-bubble--placement-end .yh-ai-bubble__body {
892
+ border-top-right-radius: 2px;
893
+ }
894
+
895
+ .yh-ai-bubble--shape-round .yh-ai-bubble__body {
896
+ border-radius: 24px;
897
+ padding: 12px 20px;
898
+ }
899
+
900
+ .yh-ai-bubble {
901
+ /* Variant Modifiers */
902
+ }
903
+ .yh-ai-bubble--variant-filled.yh-ai-bubble--user .yh-ai-bubble__body {
904
+ background-color: var(--yh-ai-bubble-user-bg);
905
+ color: var(--yh-ai-bubble-user-color);
906
+ }
907
+
908
+ .yh-ai-bubble--variant-filled.yh-ai-bubble--assistant .yh-ai-bubble__body {
909
+ background-color: var(--yh-ai-bubble-assistant-bg);
910
+ color: var(--yh-ai-bubble-assistant-color);
911
+ border-color: var(--yh-border-color-extra-light);
912
+ }
913
+
914
+ .yh-ai-bubble--variant-outlined .yh-ai-bubble__body {
915
+ background-color: transparent;
916
+ border: 1px solid var(--yh-border-color);
917
+ color: var(--yh-text-color-primary);
918
+ }
919
+
920
+ .yh-ai-bubble--variant-outlined.yh-ai-bubble--user .yh-ai-bubble__body {
921
+ border-color: var(--yh-color-primary);
922
+ }
923
+
924
+ .yh-ai-bubble--variant-shadow .yh-ai-bubble__body {
925
+ background-color: var(--yh-bg-color-overlay);
926
+ color: var(--yh-text-color-primary);
927
+ box-shadow: var(--yh-shadow-md);
928
+ }
929
+
930
+ .yh-ai-bubble__text {
931
+ white-space: pre-wrap;
932
+ }
933
+
934
+ .yh-ai-bubble__markdown {
935
+ white-space: normal;
936
+ }
937
+ .yh-ai-bubble__markdown p {
938
+ margin: 0 0 8px 0;
939
+ }
940
+ .yh-ai-bubble__markdown p:last-child {
941
+ margin-bottom: 0;
942
+ }
943
+ .yh-ai-bubble__markdown {
944
+ /* 学术脚注气泡角标样式 */
945
+ }
946
+ .yh-ai-bubble__markdown .yh-ai-citation {
947
+ color: var(--yh-color-primary);
948
+ background-color: var(--yh-color-primary-light-9);
949
+ border: 1px solid var(--yh-color-primary-light-5);
950
+ font-size: 11px;
951
+ font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
952
+ padding: 0 4px;
953
+ margin: 0 2px;
954
+ border-radius: 4px;
955
+ cursor: pointer;
956
+ text-decoration: none;
957
+ transition: all var(--yh-transition-duration-fast) ease;
958
+ vertical-align: super;
959
+ }
960
+ .yh-ai-bubble__markdown .yh-ai-citation:hover {
961
+ background-color: var(--yh-color-primary);
962
+ color: #fff;
963
+ transform: translateY(-2px);
964
+ box-shadow: 0 2px 8px rgba(var(--yh-color-primary-rgb), 0.3);
965
+ }
966
+ .yh-ai-bubble__markdown pre {
967
+ background: #282c34;
968
+ color: #abb2bf;
969
+ padding: 12px;
970
+ border-radius: 8px;
971
+ overflow-x: auto;
972
+ margin: 12px 0;
973
+ }
974
+ .yh-ai-bubble__markdown code {
975
+ background: rgba(127, 127, 127, 0.15);
976
+ padding: 2px 4px;
977
+ border-radius: 4px;
978
+ font-size: 0.9em;
979
+ }
980
+
981
+ .yh-ai-bubble {
982
+ /* Multimodal: Image Grid */
983
+ }
984
+ .yh-ai-bubble__image-grid {
985
+ display: grid;
986
+ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
987
+ gap: 8px;
988
+ margin-bottom: 12px;
989
+ width: 100%;
990
+ }
991
+
992
+ .yh-ai-bubble__image-item {
993
+ aspect-ratio: 1;
994
+ border-radius: 8px;
995
+ overflow: hidden;
996
+ border: 1px solid var(--yh-border-color-lighter);
997
+ }
998
+ .yh-ai-bubble__image-item img {
999
+ width: 100%;
1000
+ height: 100%;
1001
+ object-fit: cover;
1002
+ transition: transform 0.3s;
1003
+ cursor: zoom-in;
1004
+ }
1005
+ .yh-ai-bubble__image-item img:hover {
1006
+ transform: scale(1.05);
1007
+ }
1008
+
1009
+ .yh-ai-bubble {
1010
+ /* Multimodal: Assets (Audio, Files) */
1011
+ }
1012
+ .yh-ai-bubble__multimodal-assets {
1013
+ margin-top: 12px;
1014
+ display: flex;
1015
+ flex-direction: column;
1016
+ gap: 8px;
1017
+ }
1018
+
1019
+ .yh-ai-bubble__audio-player {
1020
+ display: flex;
1021
+ align-items: center;
1022
+ gap: 12px;
1023
+ padding: 8px 12px;
1024
+ background: rgba(0, 0, 0, 0.03);
1025
+ border-radius: 20px;
1026
+ width: fit-content;
1027
+ min-width: 200px;
1028
+ border: 1px solid var(--yh-border-color-extra-light);
1029
+ }
1030
+ :html.dark .yh-ai-bubble__audio-player {
1031
+ background: rgba(255, 255, 255, 0.05);
1032
+ }
1033
+
1034
+ .yh-ai-bubble__audio-waveform {
1035
+ display: flex;
1036
+ align-items: center;
1037
+ gap: 2px;
1038
+ height: 16px;
1039
+ flex: 1;
1040
+ }
1041
+ .yh-ai-bubble__audio-waveform span {
1042
+ width: 2px;
1043
+ height: 60%;
1044
+ background: currentColor;
1045
+ border-radius: 1px;
1046
+ opacity: 0.4;
1047
+ animation: yh-waveform 1.2s ease-in-out infinite;
1048
+ animation-play-state: paused;
1049
+ animation-delay: var(--delay);
1050
+ }
1051
+ .is-active .yh-ai-bubble__audio-waveform span {
1052
+ animation-play-state: running;
1053
+ opacity: 0.8;
1054
+ }
1055
+
1056
+ .yh-ai-bubble__audio-duration {
1057
+ font-size: 12px;
1058
+ opacity: 0.7;
1059
+ font-family: var(--yh-font-family-mono);
1060
+ }
1061
+
1062
+ .yh-ai-bubble__file-card {
1063
+ display: flex;
1064
+ align-items: center;
1065
+ gap: 12px;
1066
+ padding: 10px 14px;
1067
+ background: var(--yh-bg-color-overlay);
1068
+ border: 1px solid var(--yh-border-color-lighter);
1069
+ border-radius: 10px;
1070
+ transition: all 0.2s;
1071
+ }
1072
+ .yh-ai-bubble__file-card:hover {
1073
+ border-color: var(--yh-color-primary);
1074
+ box-shadow: var(--yh-shadow-sm);
1075
+ }
1076
+
1077
+ .yh-ai-bubble__file-icon {
1078
+ width: 36px;
1079
+ height: 36px;
1080
+ background: var(--yh-fill-color-light);
1081
+ border-radius: 8px;
1082
+ display: flex;
1083
+ align-items: center;
1084
+ justify-content: center;
1085
+ color: var(--yh-color-primary);
1086
+ font-size: 20px;
1087
+ }
1088
+
1089
+ .yh-ai-bubble__file-info {
1090
+ flex: 1;
1091
+ min-width: 0;
1092
+ }
1093
+
1094
+ .yh-ai-bubble__file-name {
1095
+ font-size: 13px;
1096
+ font-weight: 500;
1097
+ color: var(--yh-text-color-primary);
1098
+ overflow: hidden;
1099
+ text-overflow: ellipsis;
1100
+ white-space: nowrap;
1101
+ }
1102
+
1103
+ .yh-ai-bubble__file-meta {
1104
+ font-size: 11px;
1105
+ color: var(--yh-text-color-placeholder);
1106
+ margin-top: 2px;
1107
+ }
1108
+
1109
+ .yh-ai-bubble {
1110
+ /* Citations Section - Correctly placed */
1111
+ }
1112
+ .yh-ai-bubble__citations {
1113
+ margin-top: var(--yh-spacing-md);
1114
+ padding-top: var(--yh-spacing-sm);
1115
+ border-top: 1px solid var(--yh-border-color-lighter);
1116
+ display: flex;
1117
+ flex-direction: column;
1118
+ gap: var(--yh-spacing-xs);
1119
+ }
1120
+
1121
+ .yh-ai-bubble__citations-title {
1122
+ display: flex;
1123
+ align-items: center;
1124
+ gap: 6px;
1125
+ font-size: 13px;
1126
+ color: var(--yh-text-color-secondary);
1127
+ font-weight: 500;
1128
+ }
1129
+
1130
+ .yh-ai-bubble__citations-count {
1131
+ background: var(--yh-fill-color-light);
1132
+ padding: 0 6px;
1133
+ border-radius: 10px;
1134
+ font-size: 11px;
1135
+ margin-left: 4px;
1136
+ }
1137
+
1138
+ .yh-ai-bubble__citations-list {
1139
+ display: flex;
1140
+ flex-wrap: wrap;
1141
+ gap: 8px;
1142
+ }
1143
+
1144
+ .yh-ai-bubble__citation-item {
1145
+ display: flex;
1146
+ align-items: center;
1147
+ gap: 6px;
1148
+ padding: 4px 10px 4px 6px;
1149
+ background: var(--yh-bg-color-overlay);
1150
+ border: 1px solid var(--yh-border-color-lighter);
1151
+ border-radius: 6px;
1152
+ font-size: 12px;
1153
+ text-decoration: none;
1154
+ color: var(--yh-text-color-primary);
1155
+ max-width: 220px;
1156
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
1157
+ }
1158
+ .yh-ai-bubble__citation-item:hover {
1159
+ background: var(--yh-fill-color-light);
1160
+ border-color: var(--yh-color-primary-light-5);
1161
+ transform: translateY(-1px);
1162
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
1163
+ }
1164
+ .yh-ai-bubble__citation-item:hover .yh-ai-bubble__citation-index {
1165
+ background: var(--yh-color-primary);
1166
+ color: white;
1167
+ }
1168
+
1169
+ .yh-ai-bubble__citation-index {
1170
+ display: flex;
1171
+ align-items: center;
1172
+ justify-content: center;
1173
+ min-width: 16px;
1174
+ height: 16px;
1175
+ background: var(--yh-fill-color-dark);
1176
+ border-radius: 4px;
1177
+ font-size: 10px;
1178
+ font-weight: bold;
1179
+ color: var(--yh-text-color-secondary);
1180
+ }
1181
+
1182
+ .yh-ai-bubble__citation-text {
1183
+ overflow: hidden;
1184
+ text-overflow: ellipsis;
1185
+ white-space: nowrap;
1186
+ opacity: 0.9;
1187
+ }
1188
+
1189
+ .yh-ai-bubble__typing-indicator {
1190
+ display: inline-flex;
1191
+ align-items: center;
1192
+ gap: 4px;
1193
+ }
1194
+ .yh-ai-bubble__typing-indicator span {
1195
+ width: 4px;
1196
+ height: 4px;
1197
+ background-color: currentColor;
1198
+ border-radius: 50%;
1199
+ animation: yh-typing-bounce 1.4s infinite ease-in-out both;
1200
+ }
1201
+ .yh-ai-bubble__typing-indicator span:nth-child(1) {
1202
+ animation-delay: -0.32s;
1203
+ }
1204
+ .yh-ai-bubble__typing-indicator span:nth-child(2) {
1205
+ animation-delay: -0.16s;
1206
+ }
1207
+
1208
+ .yh-ai-bubble__footer {
1209
+ display: flex;
1210
+ align-items: center;
1211
+ gap: 8px;
1212
+ margin-top: 4px;
1213
+ }
1214
+
1215
+ @keyframes yh-typing-bounce {
1216
+ 0%, 80%, 100% {
1217
+ transform: scale(0);
1218
+ opacity: 0.5;
1219
+ }
1220
+ 40% {
1221
+ transform: scale(1);
1222
+ opacity: 1;
1223
+ }
1224
+ }
1225
+ @keyframes yh-waveform {
1226
+ 0%, 100% {
1227
+ height: 40%;
1228
+ }
1229
+ 50% {
1230
+ height: 100%;
1231
+ }
1232
+ }
1233
+ @keyframes yh-fade-in-up {
1234
+ 0% {
1235
+ opacity: 0;
1236
+ transform: translateY(10px) scale(0.95);
1237
+ }
1238
+ 100% {
1239
+ opacity: 1;
1240
+ transform: translateY(0) scale(1);
1241
+ }
1242
+ }
1243
+ /* 引用专属独立悬浮卡片 (Teleported 到 Body) */
1244
+ .yh-ai-bubble__citation-tooltip-wrapper {
1245
+ position: fixed;
1246
+ padding-bottom: 10px;
1247
+ z-index: 9999;
1248
+ pointer-events: auto;
1249
+ }
1250
+ .yh-ai-bubble__citation-tooltip-wrapper .yh-ai-bubble__citation-tooltip {
1251
+ min-width: 260px;
1252
+ max-width: 380px;
1253
+ background: var(--yh-bg-color-overlay, #ffffff);
1254
+ border: 1px solid var(--yh-border-color-light, #ebeef5);
1255
+ border-radius: var(--yh-border-radius-large, 8px);
1256
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
1257
+ padding: 12px 16px;
1258
+ position: relative;
1259
+ }
1260
+ .yh-ai-bubble__citation-tooltip-wrapper .yh-ai-bubble__citation-tooltip::after {
1261
+ content: "";
1262
+ position: absolute;
1263
+ bottom: -6px;
1264
+ left: 50%;
1265
+ transform: translateX(-50%) rotate(45deg);
1266
+ width: 12px;
1267
+ height: 12px;
1268
+ background: inherit;
1269
+ border-right: 1px solid var(--yh-border-color-light, #ebeef5);
1270
+ border-bottom: 1px solid var(--yh-border-color-light, #ebeef5);
1271
+ }
1272
+ .yh-ai-bubble__citation-tooltip-wrapper .yh-ai-bubble__citation-tooltip-header {
1273
+ display: flex;
1274
+ align-items: center;
1275
+ gap: 6px;
1276
+ margin-bottom: 8px;
1277
+ color: var(--yh-text-color-secondary, #909399);
1278
+ font-size: 12px;
1279
+ font-weight: 500;
1280
+ }
1281
+ .yh-ai-bubble__citation-tooltip-wrapper .yh-ai-bubble__citation-tooltip-body h4 {
1282
+ margin: 0;
1283
+ font-size: 14px;
1284
+ font-weight: 500;
1285
+ line-height: 1.5;
1286
+ color: var(--yh-text-color-primary, #303133);
1287
+ }
1288
+
1289
+ .yh-fade-in-scale-up-enter-active,
1290
+ .yh-fade-in-scale-up-leave-active {
1291
+ transition: opacity 0.2s cubic-bezier(0.23, 1, 0.32, 1), transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
1292
+ transform-origin: bottom center;
1293
+ }
1294
+
1295
+ .yh-fade-in-scale-up-enter-from,
1296
+ .yh-fade-in-scale-up-leave-to {
1297
+ opacity: 0;
1298
+ transform: translate(-50%, -85%) scale(0.95) !important;
1299
+ }
1300
+ </style>