@yuhuanowo/yunui 0.2.15 → 0.2.17

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 (453) hide show
  1. package/README.md +11 -0
  2. package/README.zh-CN.md +9 -0
  3. package/README.zh-TW.md +9 -0
  4. package/dist/adapters.js +1 -1
  5. package/dist/ai.d.ts +94 -6
  6. package/dist/ai.js +466 -76
  7. package/dist/ai.js.map +1 -1
  8. package/dist/chat.d.ts +152 -0
  9. package/dist/chat.js +321 -0
  10. package/dist/chat.js.map +1 -0
  11. package/dist/{chunk-U2LNRVMI.js → chunk-3RT24MSH.js} +4 -3
  12. package/dist/chunk-3RT24MSH.js.map +1 -0
  13. package/dist/{chunk-6MZN3GOP.js → chunk-BCOKFWXC.js} +326 -891
  14. package/dist/chunk-BCOKFWXC.js.map +1 -0
  15. package/dist/{chunk-N53PNMPJ.js → chunk-DDUP7GAX.js} +14 -7
  16. package/dist/chunk-DDUP7GAX.js.map +1 -0
  17. package/dist/{chunk-LLNTUA5K.js → chunk-F2HG4TOQ.js} +44 -67
  18. package/dist/chunk-F2HG4TOQ.js.map +1 -0
  19. package/dist/chunk-HH3JBHRP.js +1211 -0
  20. package/dist/chunk-HH3JBHRP.js.map +1 -0
  21. package/dist/chunk-N4QO7RN5.js +98 -0
  22. package/dist/chunk-N4QO7RN5.js.map +1 -0
  23. package/dist/chunk-QEIBYOG2.js +188 -0
  24. package/dist/chunk-QEIBYOG2.js.map +1 -0
  25. package/dist/content.d.ts +178 -0
  26. package/dist/content.js +1064 -0
  27. package/dist/content.js.map +1 -0
  28. package/dist/index.d.ts +237 -12
  29. package/dist/index.js +5 -3
  30. package/dist/patterns.d.ts +176 -7
  31. package/dist/patterns.js +745 -69
  32. package/dist/patterns.js.map +1 -1
  33. package/icons/apps/aistudio.webp +0 -0
  34. package/icons/apps/application.png +0 -0
  35. package/icons/apps/baixiaoying.webp +0 -0
  36. package/icons/apps/coze.webp +0 -0
  37. package/icons/apps/dify.webp +0 -0
  38. package/icons/apps/doubao.webp +0 -0
  39. package/icons/apps/flowith.webp +0 -0
  40. package/icons/apps/gemini.webp +0 -0
  41. package/icons/apps/github-copilot.webp +0 -0
  42. package/icons/apps/google.webp +0 -0
  43. package/icons/apps/grok.webp +0 -0
  44. package/icons/apps/kimi.webp +0 -0
  45. package/icons/apps/longcat.webp +0 -0
  46. package/icons/apps/metaso.webp +0 -0
  47. package/icons/apps/monica.webp +0 -0
  48. package/icons/apps/n8n.webp +0 -0
  49. package/icons/apps/nm-search.webp +0 -0
  50. package/icons/apps/notebooklm.webp +0 -0
  51. package/icons/apps/perplexity.webp +0 -0
  52. package/icons/apps/poe.webp +0 -0
  53. package/icons/apps/qingyan.webp +0 -0
  54. package/icons/apps/stepfun.webp +0 -0
  55. package/icons/apps/tiangong.webp +0 -0
  56. package/icons/apps/xiaoyi.webp +0 -0
  57. package/icons/apps/yuanbao.webp +0 -0
  58. package/icons/apps/zai.webp +0 -0
  59. package/icons/models/ai21.webp +0 -0
  60. package/icons/models/aimass.webp +0 -0
  61. package/icons/models/anthropic.webp +0 -0
  62. package/icons/models/baichuan.webp +0 -0
  63. package/icons/models/byte_dance.webp +0 -0
  64. package/icons/models/chatglm.webp +0 -0
  65. package/icons/models/claude.webp +0 -0
  66. package/icons/models/codegeex.webp +0 -0
  67. package/icons/models/cogview3flash.webp +0 -0
  68. package/icons/models/cohere.webp +0 -0
  69. package/icons/models/copilot.webp +0 -0
  70. package/icons/models/dalle.webp +0 -0
  71. package/icons/models/dbrx.webp +0 -0
  72. package/icons/models/deepseek.webp +0 -0
  73. package/icons/models/doubao.webp +0 -0
  74. package/icons/models/flux.webp +0 -0
  75. package/icons/models/gemini.webp +0 -0
  76. package/icons/models/gemma.webp +0 -0
  77. package/icons/models/google.webp +0 -0
  78. package/icons/models/grok.webp +0 -0
  79. package/icons/models/hailuo.webp +0 -0
  80. package/icons/models/huggingface.webp +0 -0
  81. package/icons/models/hunyuan.webp +0 -0
  82. package/icons/models/ibm.webp +0 -0
  83. package/icons/models/ideogram.webp +0 -0
  84. package/icons/models/internlm.webp +0 -0
  85. package/icons/models/jina.webp +0 -0
  86. package/icons/models/llava.webp +0 -0
  87. package/icons/models/luma.webp +0 -0
  88. package/icons/models/magic.webp +0 -0
  89. package/icons/models/microsoft.webp +0 -0
  90. package/icons/models/midjourney.webp +0 -0
  91. package/icons/models/minimax.webp +0 -0
  92. package/icons/models/mistral.webp +0 -0
  93. package/icons/models/moonshot.webp +0 -0
  94. package/icons/models/nousresearch.webp +0 -0
  95. package/icons/models/nvidia.webp +0 -0
  96. package/icons/models/o3.webp +0 -0
  97. package/icons/models/openai.webp +0 -0
  98. package/icons/models/palm.webp +0 -0
  99. package/icons/models/perplexity.webp +0 -0
  100. package/icons/models/qwen.webp +0 -0
  101. package/icons/models/stability.webp +0 -0
  102. package/icons/models/step.webp +0 -0
  103. package/icons/models/suno.webp +0 -0
  104. package/icons/models/upstage.webp +0 -0
  105. package/icons/models/vidu.webp +0 -0
  106. package/icons/models/volcengine.webp +0 -0
  107. package/icons/models/voyageai.webp +0 -0
  108. package/icons/models/wenxin.webp +0 -0
  109. package/icons/models/xirang.png +0 -0
  110. package/icons/models/xirang_dark.png +0 -0
  111. package/icons/models/yi.webp +0 -0
  112. package/icons/models/zai.webp +0 -0
  113. package/icons/models/zero-one.webp +0 -0
  114. package/icons/models/zhipu.webp +0 -0
  115. package/icons/providers/302ai.webp +0 -0
  116. package/icons/providers/DMXAPI-to-img.webp +0 -0
  117. package/icons/providers/Tesseract.js.png +0 -0
  118. package/icons/providers/ace.webp +0 -0
  119. package/icons/providers/adobe.webp +0 -0
  120. package/icons/providers/adobefirefly.webp +0 -0
  121. package/icons/providers/agentvoice.webp +0 -0
  122. package/icons/providers/agui.webp +0 -0
  123. package/icons/providers/ai2.webp +0 -0
  124. package/icons/providers/ai21.webp +0 -0
  125. package/icons/providers/ai302.webp +0 -0
  126. package/icons/providers/ai360.webp +0 -0
  127. package/icons/providers/aiOnly.webp +0 -0
  128. package/icons/providers/aihubmix.webp +0 -0
  129. package/icons/providers/aimass.webp +0 -0
  130. package/icons/providers/aionlabs.webp +0 -0
  131. package/icons/providers/airjelly.webp +0 -0
  132. package/icons/providers/aistudio.webp +0 -0
  133. package/icons/providers/akashchat.webp +0 -0
  134. package/icons/providers/alephalpha.webp +0 -0
  135. package/icons/providers/alibaba.webp +0 -0
  136. package/icons/providers/alibabacloud.webp +0 -0
  137. package/icons/providers/amp.webp +0 -0
  138. package/icons/providers/antgroup.webp +0 -0
  139. package/icons/providers/anthropic.webp +0 -0
  140. package/icons/providers/antigravity.webp +0 -0
  141. package/icons/providers/anyscale.webp +0 -0
  142. package/icons/providers/apertis.webp +0 -0
  143. package/icons/providers/apple.webp +0 -0
  144. package/icons/providers/arcee.webp +0 -0
  145. package/icons/providers/askverdict.webp +0 -0
  146. package/icons/providers/assemblyai.webp +0 -0
  147. package/icons/providers/atlascloud.webp +0 -0
  148. package/icons/providers/automatic.webp +0 -0
  149. package/icons/providers/aws-bedrock.webp +0 -0
  150. package/icons/providers/aws.webp +0 -0
  151. package/icons/providers/aya.webp +0 -0
  152. package/icons/providers/azure.webp +0 -0
  153. package/icons/providers/azureai.webp +0 -0
  154. package/icons/providers/baai.webp +0 -0
  155. package/icons/providers/baichuan.webp +0 -0
  156. package/icons/providers/baidu-cloud.webp +0 -0
  157. package/icons/providers/baidu.webp +0 -0
  158. package/icons/providers/baiducloud.webp +0 -0
  159. package/icons/providers/bailian.webp +0 -0
  160. package/icons/providers/baseten.webp +0 -0
  161. package/icons/providers/bedrock.webp +0 -0
  162. package/icons/providers/bfl.webp +0 -0
  163. package/icons/providers/bigModel.webp +0 -0
  164. package/icons/providers/bilibili.webp +0 -0
  165. package/icons/providers/bilibiliindex.webp +0 -0
  166. package/icons/providers/bing.webp +0 -0
  167. package/icons/providers/briaai.webp +0 -0
  168. package/icons/providers/burncloud.webp +0 -0
  169. package/icons/providers/bytedance.webp +0 -0
  170. package/icons/providers/capcut.webp +0 -0
  171. package/icons/providers/centml.webp +0 -0
  172. package/icons/providers/cephalon.jpeg +0 -0
  173. package/icons/providers/cerebras.webp +0 -0
  174. package/icons/providers/chatglm.webp +0 -0
  175. package/icons/providers/cherryin.png +0 -0
  176. package/icons/providers/cherrystudio.webp +0 -0
  177. package/icons/providers/civitai.webp +0 -0
  178. package/icons/providers/claude.webp +0 -0
  179. package/icons/providers/claudecode.webp +0 -0
  180. package/icons/providers/cline.webp +0 -0
  181. package/icons/providers/clipdrop.webp +0 -0
  182. package/icons/providers/cloudflare.webp +0 -0
  183. package/icons/providers/codebuddy.webp +0 -0
  184. package/icons/providers/codeflicker.webp +0 -0
  185. package/icons/providers/codegeex.webp +0 -0
  186. package/icons/providers/codex.webp +0 -0
  187. package/icons/providers/cogvideo.webp +0 -0
  188. package/icons/providers/cogview.webp +0 -0
  189. package/icons/providers/cogview3flash.webp +0 -0
  190. package/icons/providers/cohere.webp +0 -0
  191. package/icons/providers/colab.webp +0 -0
  192. package/icons/providers/cometapi.webp +0 -0
  193. package/icons/providers/comfyui.webp +0 -0
  194. package/icons/providers/commanda.webp +0 -0
  195. package/icons/providers/copilot.webp +0 -0
  196. package/icons/providers/copilotkit.webp +0 -0
  197. package/icons/providers/coqui.webp +0 -0
  198. package/icons/providers/coze.webp +0 -0
  199. package/icons/providers/crewai.webp +0 -0
  200. package/icons/providers/crusoe.webp +0 -0
  201. package/icons/providers/cursor.webp +0 -0
  202. package/icons/providers/cybercut.webp +0 -0
  203. package/icons/providers/dalle.webp +0 -0
  204. package/icons/providers/dbrx.webp +0 -0
  205. package/icons/providers/deepai.webp +0 -0
  206. package/icons/providers/deepcogito.webp +0 -0
  207. package/icons/providers/deepinfra.webp +0 -0
  208. package/icons/providers/deepl.webp +0 -0
  209. package/icons/providers/deepmind.webp +0 -0
  210. package/icons/providers/deepseek.webp +0 -0
  211. package/icons/providers/devin.webp +0 -0
  212. package/icons/providers/dify.webp +0 -0
  213. package/icons/providers/dmxapi-logo-dark.webp +0 -0
  214. package/icons/providers/dmxapi-logo.webp +0 -0
  215. package/icons/providers/doc2x.webp +0 -0
  216. package/icons/providers/docsearch.webp +0 -0
  217. package/icons/providers/dolphin.webp +0 -0
  218. package/icons/providers/doubao.webp +0 -0
  219. package/icons/providers/dreammachine.webp +0 -0
  220. package/icons/providers/elevenlabs.webp +0 -0
  221. package/icons/providers/elevenx.webp +0 -0
  222. package/icons/providers/essentialai.webp +0 -0
  223. package/icons/providers/exa.webp +0 -0
  224. package/icons/providers/fal.webp +0 -0
  225. package/icons/providers/fastgpt.webp +0 -0
  226. package/icons/providers/featherless.webp +0 -0
  227. package/icons/providers/figma.webp +0 -0
  228. package/icons/providers/fireworks.webp +0 -0
  229. package/icons/providers/fishaudio.webp +0 -0
  230. package/icons/providers/flora.webp +0 -0
  231. package/icons/providers/flowith.webp +0 -0
  232. package/icons/providers/flux.webp +0 -0
  233. package/icons/providers/friendli.webp +0 -0
  234. package/icons/providers/gemini.webp +0 -0
  235. package/icons/providers/geminicli.webp +0 -0
  236. package/icons/providers/gemma.webp +0 -0
  237. package/icons/providers/gitee-ai.webp +0 -0
  238. package/icons/providers/giteeai.webp +0 -0
  239. package/icons/providers/github.webp +0 -0
  240. package/icons/providers/githubcopilot.webp +0 -0
  241. package/icons/providers/glama.webp +0 -0
  242. package/icons/providers/glif.webp +0 -0
  243. package/icons/providers/glmv.webp +0 -0
  244. package/icons/providers/google.webp +0 -0
  245. package/icons/providers/googlecloud.webp +0 -0
  246. package/icons/providers/goose.webp +0 -0
  247. package/icons/providers/gradio.webp +0 -0
  248. package/icons/providers/greptile.webp +0 -0
  249. package/icons/providers/grok.webp +0 -0
  250. package/icons/providers/groq.webp +0 -0
  251. package/icons/providers/hailuo.webp +0 -0
  252. package/icons/providers/haiper.webp +0 -0
  253. package/icons/providers/hedra.webp +0 -0
  254. package/icons/providers/hermesagent.webp +0 -0
  255. package/icons/providers/higress.webp +0 -0
  256. package/icons/providers/huawei.webp +0 -0
  257. package/icons/providers/huaweicloud.webp +0 -0
  258. package/icons/providers/huggingface.webp +0 -0
  259. package/icons/providers/hunyuan.webp +0 -0
  260. package/icons/providers/hyperbolic.webp +0 -0
  261. package/icons/providers/ibm.webp +0 -0
  262. package/icons/providers/ideogram.webp +0 -0
  263. package/icons/providers/iflytekcloud.webp +0 -0
  264. package/icons/providers/inception.webp +0 -0
  265. package/icons/providers/inference.webp +0 -0
  266. package/icons/providers/infermatic.webp +0 -0
  267. package/icons/providers/infini.webp +0 -0
  268. package/icons/providers/infinigence.webp +0 -0
  269. package/icons/providers/inflection.webp +0 -0
  270. package/icons/providers/internlm.webp +0 -0
  271. package/icons/providers/jimeng.webp +0 -0
  272. package/icons/providers/jina.webp +0 -0
  273. package/icons/providers/junie.webp +0 -0
  274. package/icons/providers/kilocode.webp +0 -0
  275. package/icons/providers/kimi.webp +0 -0
  276. package/icons/providers/kiro.webp +0 -0
  277. package/icons/providers/kling.webp +0 -0
  278. package/icons/providers/kluster.webp +0 -0
  279. package/icons/providers/kolors.webp +0 -0
  280. package/icons/providers/krea.webp +0 -0
  281. package/icons/providers/kwaikat.webp +0 -0
  282. package/icons/providers/kwaipilot.webp +0 -0
  283. package/icons/providers/lambda.webp +0 -0
  284. package/icons/providers/langchain.webp +0 -0
  285. package/icons/providers/langfuse.webp +0 -0
  286. package/icons/providers/langgraph.webp +0 -0
  287. package/icons/providers/langsmith.webp +0 -0
  288. package/icons/providers/leptonai.webp +0 -0
  289. package/icons/providers/lg.webp +0 -0
  290. package/icons/providers/lightricks.webp +0 -0
  291. package/icons/providers/liquid.webp +0 -0
  292. package/icons/providers/livekit.webp +0 -0
  293. package/icons/providers/llamaindex.webp +0 -0
  294. package/icons/providers/llava.webp +0 -0
  295. package/icons/providers/llmapi.webp +0 -0
  296. package/icons/providers/lmstudio.webp +0 -0
  297. package/icons/providers/lobehub.webp +0 -0
  298. package/icons/providers/longcat.webp +0 -0
  299. package/icons/providers/lovable.webp +0 -0
  300. package/icons/providers/lovart.webp +0 -0
  301. package/icons/providers/luma.webp +0 -0
  302. package/icons/providers/magic.webp +0 -0
  303. package/icons/providers/make.webp +0 -0
  304. package/icons/providers/manus.webp +0 -0
  305. package/icons/providers/mastra.webp +0 -0
  306. package/icons/providers/mcp.webp +0 -0
  307. package/icons/providers/mcpso.webp +0 -0
  308. package/icons/providers/menlo.webp +0 -0
  309. package/icons/providers/meshy.webp +0 -0
  310. package/icons/providers/meta.webp +0 -0
  311. package/icons/providers/metaai.webp +0 -0
  312. package/icons/providers/metagpt.webp +0 -0
  313. package/icons/providers/microsoft.webp +0 -0
  314. package/icons/providers/midjourney.webp +0 -0
  315. package/icons/providers/minimax.webp +0 -0
  316. package/icons/providers/mistral.webp +0 -0
  317. package/icons/providers/modelscope.webp +0 -0
  318. package/icons/providers/monica.webp +0 -0
  319. package/icons/providers/moonshot.webp +0 -0
  320. package/icons/providers/morph.webp +0 -0
  321. package/icons/providers/moxt.webp +0 -0
  322. package/icons/providers/myshell.webp +0 -0
  323. package/icons/providers/n8n.webp +0 -0
  324. package/icons/providers/nanobanana.webp +0 -0
  325. package/icons/providers/nebius.webp +0 -0
  326. package/icons/providers/newapi.webp +0 -0
  327. package/icons/providers/notebooklm.webp +0 -0
  328. package/icons/providers/notion.webp +0 -0
  329. package/icons/providers/nousresearch.webp +0 -0
  330. package/icons/providers/nova.webp +0 -0
  331. package/icons/providers/novelai.webp +0 -0
  332. package/icons/providers/novita.webp +0 -0
  333. package/icons/providers/nplcloud.webp +0 -0
  334. package/icons/providers/nvidia.webp +0 -0
  335. package/icons/providers/o3.webp +0 -0
  336. package/icons/providers/obsidian.webp +0 -0
  337. package/icons/providers/ollama.webp +0 -0
  338. package/icons/providers/openai.webp +0 -0
  339. package/icons/providers/openchat.webp +0 -0
  340. package/icons/providers/openclaw.webp +0 -0
  341. package/icons/providers/opencode.webp +0 -0
  342. package/icons/providers/openhands.webp +0 -0
  343. package/icons/providers/openhuman.webp +0 -0
  344. package/icons/providers/openrouter.webp +0 -0
  345. package/icons/providers/openwebui.webp +0 -0
  346. package/icons/providers/paddleocr.webp +0 -0
  347. package/icons/providers/palm.webp +0 -0
  348. package/icons/providers/parasail.webp +0 -0
  349. package/icons/providers/perplexity.webp +0 -0
  350. package/icons/providers/phidata.webp +0 -0
  351. package/icons/providers/phind.webp +0 -0
  352. package/icons/providers/pika.webp +0 -0
  353. package/icons/providers/pixverse.webp +0 -0
  354. package/icons/providers/player2.webp +0 -0
  355. package/icons/providers/poe.webp +0 -0
  356. package/icons/providers/pollinations.webp +0 -0
  357. package/icons/providers/ppio.webp +0 -0
  358. package/icons/providers/prunaai.webp +0 -0
  359. package/icons/providers/pydanticai.webp +0 -0
  360. package/icons/providers/qingyan.webp +0 -0
  361. package/icons/providers/qiniu.webp +0 -0
  362. package/icons/providers/qoder.webp +0 -0
  363. package/icons/providers/qwen.webp +0 -0
  364. package/icons/providers/railway.webp +0 -0
  365. package/icons/providers/recraft.webp +0 -0
  366. package/icons/providers/relace.webp +0 -0
  367. package/icons/providers/replicate.webp +0 -0
  368. package/icons/providers/replit.webp +0 -0
  369. package/icons/providers/reve.webp +0 -0
  370. package/icons/providers/roocode.webp +0 -0
  371. package/icons/providers/rsshub.webp +0 -0
  372. package/icons/providers/runway.webp +0 -0
  373. package/icons/providers/rwkv.webp +0 -0
  374. package/icons/providers/sambanova.webp +0 -0
  375. package/icons/providers/search1api.webp +0 -0
  376. package/icons/providers/searchapi.webp +0 -0
  377. package/icons/providers/sensenova.webp +0 -0
  378. package/icons/providers/silicon.webp +0 -0
  379. package/icons/providers/siliconcloud.webp +0 -0
  380. package/icons/providers/sillytavern.webp +0 -0
  381. package/icons/providers/skywork.webp +0 -0
  382. package/icons/providers/slock.webp +0 -0
  383. package/icons/providers/smithery.webp +0 -0
  384. package/icons/providers/snowflake.webp +0 -0
  385. package/icons/providers/sophnet.webp +0 -0
  386. package/icons/providers/sora.webp +0 -0
  387. package/icons/providers/spark.webp +0 -0
  388. package/icons/providers/speedai.webp +0 -0
  389. package/icons/providers/stability.webp +0 -0
  390. package/icons/providers/statecloud.webp +0 -0
  391. package/icons/providers/step.webp +0 -0
  392. package/icons/providers/stepfun.webp +0 -0
  393. package/icons/providers/straico.webp +0 -0
  394. package/icons/providers/streamlake.webp +0 -0
  395. package/icons/providers/submodel.webp +0 -0
  396. package/icons/providers/suno.webp +0 -0
  397. package/icons/providers/sync.webp +0 -0
  398. package/icons/providers/targon.webp +0 -0
  399. package/icons/providers/tavily.webp +0 -0
  400. package/icons/providers/tencent-cloud-ti.webp +0 -0
  401. package/icons/providers/tencent.webp +0 -0
  402. package/icons/providers/tencentcloud.webp +0 -0
  403. package/icons/providers/tiangong.webp +0 -0
  404. package/icons/providers/tii.webp +0 -0
  405. package/icons/providers/together.webp +0 -0
  406. package/icons/providers/tokenrouter.png +0 -0
  407. package/icons/providers/topazlabs.webp +0 -0
  408. package/icons/providers/trae.webp +0 -0
  409. package/icons/providers/tripo.webp +0 -0
  410. package/icons/providers/turix.webp +0 -0
  411. package/icons/providers/udio.webp +0 -0
  412. package/icons/providers/unstructured.webp +0 -0
  413. package/icons/providers/upstage.webp +0 -0
  414. package/icons/providers/v0.webp +0 -0
  415. package/icons/providers/vectorizerai.webp +0 -0
  416. package/icons/providers/venice.webp +0 -0
  417. package/icons/providers/vercel.webp +0 -0
  418. package/icons/providers/vertexai.webp +0 -0
  419. package/icons/providers/vidu.webp +0 -0
  420. package/icons/providers/viggle.webp +0 -0
  421. package/icons/providers/vllm.webp +0 -0
  422. package/icons/providers/volcengine.webp +0 -0
  423. package/icons/providers/voyage.webp +0 -0
  424. package/icons/providers/voyageai.webp +0 -0
  425. package/icons/providers/wenxin.webp +0 -0
  426. package/icons/providers/windsurf.webp +0 -0
  427. package/icons/providers/workersai.webp +0 -0
  428. package/icons/providers/worldrouter.webp +0 -0
  429. package/icons/providers/xai.webp +0 -0
  430. package/icons/providers/xiaomimimo.webp +0 -0
  431. package/icons/providers/xinference.webp +0 -0
  432. package/icons/providers/xirang.png +0 -0
  433. package/icons/providers/xpay.webp +0 -0
  434. package/icons/providers/xuanyuan.webp +0 -0
  435. package/icons/providers/yandex.webp +0 -0
  436. package/icons/providers/yi.webp +0 -0
  437. package/icons/providers/youmind.webp +0 -0
  438. package/icons/providers/yuanbao.webp +0 -0
  439. package/icons/providers/zai.webp +0 -0
  440. package/icons/providers/zapier.webp +0 -0
  441. package/icons/providers/zeabur.webp +0 -0
  442. package/icons/providers/zencoder.webp +0 -0
  443. package/icons/providers/zenmux.webp +0 -0
  444. package/icons/providers/zero-one.webp +0 -0
  445. package/icons/providers/zeroone.webp +0 -0
  446. package/icons/providers/zhipu.webp +0 -0
  447. package/package.json +105 -32
  448. package/styles/content.css +129 -0
  449. package/styles/yunui.css +185 -21
  450. package/dist/chunk-6MZN3GOP.js.map +0 -1
  451. package/dist/chunk-LLNTUA5K.js.map +0 -1
  452. package/dist/chunk-N53PNMPJ.js.map +0 -1
  453. package/dist/chunk-U2LNRVMI.js.map +0 -1
package/dist/patterns.js CHANGED
@@ -1,12 +1,15 @@
1
1
  "use client";
2
- import { Button, Card, Badge, Avatar, AvatarImage, AvatarFallback, IconButton, Spinner } from './chunk-6MZN3GOP.js';
3
- import { copyToClipboard } from './chunk-N53PNMPJ.js';
4
- export { Footer } from './chunk-N53PNMPJ.js';
5
- import { cn } from './chunk-LLNTUA5K.js';
6
- import { useYunUI } from './chunk-U2LNRVMI.js';
2
+ import './chunk-HH3JBHRP.js';
3
+ import { copyToClipboard } from './chunk-DDUP7GAX.js';
4
+ export { Footer } from './chunk-DDUP7GAX.js';
5
+ import './chunk-F2HG4TOQ.js';
6
+ import { ImageLightbox } from './chunk-QEIBYOG2.js';
7
+ import { Button, Card, Badge, Avatar, AvatarImage, AvatarFallback, IconButton, Spinner, Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-BCOKFWXC.js';
8
+ import { cn } from './chunk-N4QO7RN5.js';
9
+ import { useYunUI } from './chunk-3RT24MSH.js';
7
10
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
- import React, { useState, useEffect, useCallback, useRef } from 'react';
9
- import { AlertCircle, RefreshCw, Check, Copy, Plus, FileText, ExternalLink, Calendar, Clock, User, ChevronLeft, ChevronRight, PanelLeftClose, X, ArrowUpRight, ArrowDownRight, GraduationCap, ArrowRight, Award, Waves, SlidersHorizontal, Layers, Fingerprint, Ban, Image, Brain, Eye, Code, MessageSquare, XCircle, Zap, CheckCircle, FileCode, EyeOff, Sparkles, Globe, Loader2, LogOut, Bell, Trash2, Camera, Info, CheckCircle2, AlertTriangle } from 'lucide-react';
11
+ import React, { useState, useEffect, useCallback, useRef, useMemo } from 'react';
12
+ import { AlertCircle, RefreshCw, Check, Copy, Plus, FileText, ExternalLink, Calendar, Clock, User, ChevronLeft, ChevronRight, ArrowUp, PanelLeftClose, X, ArrowUpRight, ArrowDownRight, GraduationCap, ArrowRight, Award, Waves, SlidersHorizontal, Layers, Fingerprint, Ban, Image, Brain, Eye, Code, MessageSquare, XCircle, Zap, CheckCircle, FileCode, EyeOff, Sparkles, Globe, Loader2, LogOut, Pause, Play, Download, Grid, List, Bell, Trash2, Camera, Info, CheckCircle2, AlertTriangle } from 'lucide-react';
10
13
 
11
14
  function BackgroundEffects() {
12
15
  return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 -z-10 h-full w-full pointer-events-none select-none overflow-hidden bg-(--bg-base)", children: /* @__PURE__ */ jsx(
@@ -198,7 +201,7 @@ function CodeBlock({
198
201
  }
199
202
  )
200
203
  ] }),
201
- /* @__PURE__ */ jsx("div", { className: "p-4 bg-(--bg-base)", children: /* @__PURE__ */ jsx("pre", { className: "text-sm overflow-x-auto", children: /* @__PURE__ */ jsx("code", { className: "font-mono", style: { color: "var(--text-primary)" }, children: showLineNumbers ? /* @__PURE__ */ jsx(
204
+ /* @__PURE__ */ jsx("div", { className: "p-4 bg-(--bg-base)", children: /* @__PURE__ */ jsx("pre", { className: "text-sm overflow-x-auto", tabIndex: 0, children: /* @__PURE__ */ jsx("code", { className: "font-mono", style: { color: "var(--text-primary)" }, children: showLineNumbers ? /* @__PURE__ */ jsx(
202
205
  "div",
203
206
  {
204
207
  className: "table",
@@ -561,6 +564,99 @@ function BlogPagination({
561
564
  )
562
565
  ] });
563
566
  }
567
+ var RING_RADIUS = 21;
568
+ var RING_CIRCUMFERENCE = 2 * Math.PI * RING_RADIUS;
569
+ function ReadingProgress({
570
+ threshold = 600,
571
+ bar = true,
572
+ backToTop = true,
573
+ labels,
574
+ className = ""
575
+ }) {
576
+ const [progress, setProgress] = useState(0);
577
+ const [show, setShow] = useState(false);
578
+ const backToTopLabel = labels?.backToTop ?? "Back to top";
579
+ useEffect(() => {
580
+ let frame = 0;
581
+ const measure = () => {
582
+ frame = 0;
583
+ const scrolled = window.scrollY;
584
+ const reach = document.documentElement.scrollHeight - window.innerHeight;
585
+ setProgress(reach > 0 ? Math.min(100, scrolled / reach * 100) : 0);
586
+ setShow(scrolled > threshold);
587
+ };
588
+ const onScroll = () => {
589
+ if (!frame) frame = window.requestAnimationFrame(measure);
590
+ };
591
+ measure();
592
+ window.addEventListener("scroll", onScroll, { passive: true });
593
+ window.addEventListener("resize", onScroll, { passive: true });
594
+ return () => {
595
+ window.removeEventListener("scroll", onScroll);
596
+ window.removeEventListener("resize", onScroll);
597
+ if (frame) window.cancelAnimationFrame(frame);
598
+ };
599
+ }, [threshold]);
600
+ if (!bar && !backToTop) return null;
601
+ const interactive = backToTop;
602
+ const Tag = interactive ? "button" : "div";
603
+ return /* @__PURE__ */ jsxs(
604
+ Tag,
605
+ {
606
+ ...interactive ? {
607
+ type: "button",
608
+ "aria-label": backToTopLabel,
609
+ onClick: () => window.scrollTo({ top: 0, behavior: "smooth" })
610
+ } : { "aria-hidden": true },
611
+ className: (
612
+ // The canonical YunUI elevated-overlay surface (same recipe as menus &
613
+ // dropdowns): translucent popover + backdrop blur, hairline border, the
614
+ // house shadow and focus ring. House colour classes bridge to the token
615
+ // system through @theme.
616
+ "group fixed bottom-6 right-6 z-50 grid h-12 w-12 place-items-center rounded-full border border-border bg-popover/85 backdrop-blur-2xl text-muted-foreground shadow-lg shadow-black/5 transition-all duration-300 ease-out " + (interactive ? "hover:-translate-y-0.5 hover:bg-popover hover:text-foreground hover:shadow-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background " : "pointer-events-none ") + (show ? "translate-y-0 scale-100 opacity-100 " : "pointer-events-none translate-y-3 scale-90 opacity-0 ") + className
617
+ ),
618
+ children: [
619
+ bar && /* @__PURE__ */ jsxs(
620
+ "svg",
621
+ {
622
+ viewBox: "0 0 48 48",
623
+ className: "absolute inset-0 h-full w-full -rotate-90",
624
+ "aria-hidden": "true",
625
+ children: [
626
+ /* @__PURE__ */ jsx(
627
+ "circle",
628
+ {
629
+ cx: "24",
630
+ cy: "24",
631
+ r: RING_RADIUS,
632
+ fill: "none",
633
+ strokeWidth: "2",
634
+ style: { stroke: "var(--border)" }
635
+ }
636
+ ),
637
+ /* @__PURE__ */ jsx(
638
+ "circle",
639
+ {
640
+ cx: "24",
641
+ cy: "24",
642
+ r: RING_RADIUS,
643
+ fill: "none",
644
+ strokeWidth: "2.5",
645
+ strokeLinecap: "round",
646
+ className: "transition-[stroke-dashoffset] duration-150 ease-out",
647
+ style: { stroke: "var(--accent)" },
648
+ strokeDasharray: RING_CIRCUMFERENCE,
649
+ strokeDashoffset: RING_CIRCUMFERENCE * (1 - progress / 100)
650
+ }
651
+ )
652
+ ]
653
+ }
654
+ ),
655
+ backToTop && /* @__PURE__ */ jsx(ArrowUp, { size: 17, strokeWidth: 2, className: "relative transition-transform duration-200 group-hover:-translate-y-0.5" })
656
+ ]
657
+ }
658
+ );
659
+ }
564
660
  function SimplePagination({
565
661
  currentPage,
566
662
  hasPrevious,
@@ -620,6 +716,23 @@ function CategoryFilter({
620
716
  ))
621
717
  ] });
622
718
  }
719
+ function NavStateIndicator({
720
+ active,
721
+ running,
722
+ className,
723
+ ...props
724
+ }) {
725
+ return /* @__PURE__ */ jsx(
726
+ "span",
727
+ {
728
+ "aria-hidden": "true",
729
+ "data-active": active || void 0,
730
+ "data-running": running || void 0,
731
+ className: cn("nav-state-indicator", className),
732
+ ...props
733
+ }
734
+ );
735
+ }
623
736
  function isItemActive(item, currentPath, homeHref) {
624
737
  if (currentPath === item.href) return true;
625
738
  if (item.href !== homeHref && currentPath.startsWith(item.href)) return true;
@@ -639,7 +752,13 @@ function Sidebar({
639
752
  footer,
640
753
  closeLabel = "Close",
641
754
  loading = false,
642
- scrollStorageKey = "yunui-sidebar-scroll"
755
+ scrollStorageKey = "yunui-sidebar-scroll",
756
+ layout = "fixed",
757
+ header,
758
+ children,
759
+ className,
760
+ role = "navigation",
761
+ ariaLabel = "Main navigation"
643
762
  }) {
644
763
  const { Link, Image } = useYunUI();
645
764
  const navRef = useRef(null);
@@ -653,7 +772,7 @@ function Sidebar({
653
772
  return () => nav.removeEventListener("scroll", onScroll);
654
773
  }, [scrollStorageKey]);
655
774
  return /* @__PURE__ */ jsxs(Fragment, { children: [
656
- isOpen && /* @__PURE__ */ jsx(
775
+ layout === "fixed" && isOpen && /* @__PURE__ */ jsx(
657
776
  "div",
658
777
  {
659
778
  className: "fixed inset-0 bg-black/20 backdrop-blur-sm z-40 lg:hidden",
@@ -664,17 +783,16 @@ function Sidebar({
664
783
  /* @__PURE__ */ jsxs(
665
784
  "aside",
666
785
  {
667
- role: "navigation",
668
- "aria-label": "Main navigation",
669
- className: `
670
- fixed inset-y-0 left-0 z-50
671
- min-w-64 w-64 bg-(--bg-base) border-r border-(--border-hairline)
672
- flex flex-col h-dvh
673
- transition-transform duration-200 ease-in-out
674
- ${isOpen ? "translate-x-0" : collapsed ? "-translate-x-full" : "-translate-x-full lg:translate-x-0"}
675
- `,
786
+ role,
787
+ "aria-label": ariaLabel,
788
+ className: cn(
789
+ "min-w-64 w-64 bg-(--bg-base) border-r border-(--border-hairline) flex flex-col",
790
+ layout === "fixed" ? "fixed inset-y-0 left-0 z-50 h-dvh transition-transform duration-200 ease-in-out" : "relative z-0 h-full min-w-0 w-full",
791
+ layout === "fixed" && (isOpen ? "translate-x-0" : collapsed ? "-translate-x-full" : "-translate-x-full lg:translate-x-0"),
792
+ className
793
+ ),
676
794
  children: [
677
- /* @__PURE__ */ jsx("div", { className: "py-3 px-3 shrink-0", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center py-2 pl-0 pr-1 gap-2", children: [
795
+ header !== void 0 ? header : /* @__PURE__ */ jsx("div", { className: "py-3 px-3 shrink-0", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center py-2 pl-0 pr-1 gap-2", children: [
678
796
  /* @__PURE__ */ jsxs(Link, { href: homeHref, className: "flex-1 min-w-0 flex items-center gap-2.5 rounded-lg pl-3 pr-3 py-1.5 hover:bg-foreground/5 transition-colors duration-200", children: [
679
797
  /* @__PURE__ */ jsx(Image, { src: logoSrc, alt: appName, width: 36, height: 36, className: "shrink-0" }),
680
798
  /* @__PURE__ */ jsx("span", { className: "font-semibold text-[18px] truncate", children: appName })
@@ -693,16 +811,17 @@ function Sidebar({
693
811
  ] }),
694
812
  onClose && /* @__PURE__ */ jsx(IconButton, { icon: /* @__PURE__ */ jsx(X, { size: 20 }), label: closeLabel, onClick: onClose, className: "lg:hidden" })
695
813
  ] }) }),
696
- /* @__PURE__ */ jsx("nav", { ref: navRef, className: "flex-1 overflow-y-auto py-3 px-3", children: loading ? /* @__PURE__ */ jsx("div", { className: "space-y-2 animate-pulse", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx("div", { className: "h-9 rounded-lg bg-foreground/5" }, i)) }) : sections.map((section, i) => /* @__PURE__ */ jsxs("div", { className: i > 0 ? "mt-4" : "", children: [
814
+ children != null ? /* @__PURE__ */ jsx("div", { className: "flex min-h-0 flex-1 flex-col", children }) : /* @__PURE__ */ jsx("nav", { ref: navRef, className: "flex-1 overflow-y-auto py-3 px-3", children: loading ? /* @__PURE__ */ jsx("div", { className: "space-y-2 animate-pulse", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx("div", { className: "h-9 rounded-lg bg-foreground/5" }, i)) }) : sections.map((section, i) => /* @__PURE__ */ jsxs("div", { className: i > 0 ? "mt-4" : "", children: [
697
815
  section.title && /* @__PURE__ */ jsx("div", { className: "nav-section", children: section.title }),
698
816
  section.items.map((item) => {
699
817
  const active = isItemActive(item, currentPath, homeHref);
700
818
  const Icon = item.icon;
701
819
  const content = /* @__PURE__ */ jsxs(Fragment, { children: [
820
+ /* @__PURE__ */ jsx(NavStateIndicator, { active }),
702
821
  Icon && /* @__PURE__ */ jsx(Icon, { size: 18, strokeWidth: 1.75, className: "shrink-0" }),
703
822
  /* @__PURE__ */ jsx("span", { className: "flex-1 min-w-0 truncate", children: item.label })
704
823
  ] });
705
- const className = `nav-item ${active ? "active" : ""}`;
824
+ const className2 = `nav-item ${active ? "active" : ""}`;
706
825
  return onNavigate ? /* @__PURE__ */ jsx(
707
826
  "a",
708
827
  {
@@ -712,11 +831,11 @@ function Sidebar({
712
831
  onNavigate(item.href);
713
832
  onClose?.();
714
833
  },
715
- className,
834
+ className: className2,
716
835
  children: content
717
836
  },
718
837
  item.href
719
- ) : /* @__PURE__ */ jsx(Link, { href: item.href, onClick: () => onClose?.(), className, children: content }, item.href);
838
+ ) : /* @__PURE__ */ jsx(Link, { href: item.href, onClick: () => onClose?.(), className: className2, children: content }, item.href);
720
839
  })
721
840
  ] }, i)) }),
722
841
  footer && /* @__PURE__ */ jsx("div", { className: "p-3 shrink-0", children: footer })
@@ -756,17 +875,28 @@ function PageLoadingState({ message }) {
756
875
  ] });
757
876
  }
758
877
  function PageErrorState({ message, onRetry, retryLabel = "Retry" }) {
759
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
760
- /* @__PURE__ */ jsx("div", { className: "text-error font-medium mb-2", children: message }),
761
- onRetry && /* @__PURE__ */ jsx(
762
- "button",
763
- {
764
- onClick: onRetry,
765
- className: "text-sm text-muted-foreground hover:text-foreground transition-colors underline outline-none focus-visible:ring-2 focus-visible:ring-ring rounded",
766
- children: retryLabel
767
- }
768
- )
769
- ] });
878
+ return /* @__PURE__ */ jsxs(
879
+ "div",
880
+ {
881
+ role: "alert",
882
+ className: "mx-auto flex w-full max-w-sm flex-col items-center justify-center px-4 py-12 text-center",
883
+ children: [
884
+ /* @__PURE__ */ jsx("span", { className: "mb-3 flex h-10 w-10 items-center justify-center rounded-xl bg-error-soft", children: /* @__PURE__ */ jsx(AlertCircle, { size: 20, className: "text-error", "aria-hidden": "true" }) }),
885
+ /* @__PURE__ */ jsx("div", { className: "max-w-full text-sm font-medium leading-6 text-foreground", children: message }),
886
+ onRetry && /* @__PURE__ */ jsx(
887
+ Button,
888
+ {
889
+ type: "button",
890
+ variant: "outline",
891
+ size: "sm",
892
+ onClick: onRetry,
893
+ className: "mt-4 min-w-20",
894
+ children: retryLabel
895
+ }
896
+ )
897
+ ]
898
+ }
899
+ );
770
900
  }
771
901
  function PageEmptyState({ icon: Icon, title, description, action }) {
772
902
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
@@ -1097,44 +1227,70 @@ function SessionItem({
1097
1227
  currentLabel,
1098
1228
  inactive,
1099
1229
  inactiveLabel,
1230
+ selected,
1231
+ running,
1232
+ runningLabel,
1100
1233
  onRevoke,
1101
1234
  revoking,
1102
1235
  revokeLabel,
1103
1236
  className
1104
1237
  }) {
1105
- return /* @__PURE__ */ jsxs("div", { className: cn("flex items-start gap-3 p-2 rounded-lg bg-(--bg-elevated) relative", inactive && "opacity-50", className), children: [
1106
- icon != null && /* @__PURE__ */ jsx("div", { className: "w-8 h-8 rounded-lg bg-muted flex items-center justify-center shrink-0", children: icon }),
1107
- /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
1108
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
1109
- /* @__PURE__ */ jsx("span", { className: "text-xs font-medium truncate", children: name }),
1110
- current && /* @__PURE__ */ jsx("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full badge-success shrink-0", children: currentLabel }),
1111
- inactive && /* @__PURE__ */ jsx("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full badge-neutral shrink-0", children: inactiveLabel })
1112
- ] }),
1113
- detail && /* @__PURE__ */ jsx("div", { className: "text-[10px] text-(--text-tertiary) mt-0.5 truncate", children: detail }),
1114
- (ip != null || time != null) && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2 mt-1 text-[10px] text-(--text-tertiary)", children: [
1115
- ip != null && /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-0.5", children: [
1116
- /* @__PURE__ */ jsx(Globe, { size: 8 }),
1117
- ip
1238
+ return /* @__PURE__ */ jsxs(
1239
+ "div",
1240
+ {
1241
+ "data-selected": selected || void 0,
1242
+ "data-running": running || void 0,
1243
+ "aria-busy": running || void 0,
1244
+ className: cn(
1245
+ "relative flex items-start gap-3 overflow-hidden rounded-lg bg-(--bg-elevated) p-2",
1246
+ selected && "text-foreground",
1247
+ inactive && "opacity-50",
1248
+ className
1249
+ ),
1250
+ children: [
1251
+ (selected || running) && /* @__PURE__ */ jsx(
1252
+ NavStateIndicator,
1253
+ {
1254
+ active: true,
1255
+ running,
1256
+ "data-session-activity-rail": true
1257
+ }
1258
+ ),
1259
+ running && runningLabel != null && /* @__PURE__ */ jsx("span", { className: "sr-only", children: runningLabel }),
1260
+ icon != null && /* @__PURE__ */ jsx("div", { className: "w-8 h-8 rounded-lg bg-muted flex items-center justify-center shrink-0", children: icon }),
1261
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
1262
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
1263
+ /* @__PURE__ */ jsx("span", { className: "block min-w-0 flex-1 truncate text-xs font-medium", children: name }),
1264
+ current && /* @__PURE__ */ jsx("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full badge-success shrink-0", children: currentLabel }),
1265
+ inactive && /* @__PURE__ */ jsx("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full badge-neutral shrink-0", children: inactiveLabel })
1266
+ ] }),
1267
+ detail && /* @__PURE__ */ jsx("div", { className: "text-[10px] text-(--text-tertiary) mt-0.5 truncate", children: detail }),
1268
+ (ip != null || time != null) && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2 mt-1 text-[10px] text-(--text-tertiary)", children: [
1269
+ ip != null && /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-0.5", children: [
1270
+ /* @__PURE__ */ jsx(Globe, { size: 8 }),
1271
+ ip
1272
+ ] }),
1273
+ time != null && /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-0.5", children: [
1274
+ /* @__PURE__ */ jsx(Clock, { size: 8 }),
1275
+ time
1276
+ ] })
1277
+ ] })
1118
1278
  ] }),
1119
- time != null && /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-0.5", children: [
1120
- /* @__PURE__ */ jsx(Clock, { size: 8 }),
1121
- time
1122
- ] })
1123
- ] })
1124
- ] }),
1125
- !current && onRevoke && /* @__PURE__ */ jsx(
1126
- "button",
1127
- {
1128
- type: "button",
1129
- onClick: onRevoke,
1130
- disabled: revoking,
1131
- "aria-label": revokeLabel,
1132
- title: revokeLabel,
1133
- className: "p-1.5 hover:bg-error-soft rounded text-(--text-tertiary) hover:text-error transition-colors shrink-0 outline-none focus-visible:ring-2 focus-visible:ring-ring",
1134
- children: revoking ? /* @__PURE__ */ jsx(Loader2, { size: 12, className: "animate-spin" }) : /* @__PURE__ */ jsx(LogOut, { size: 12 })
1135
- }
1136
- )
1137
- ] });
1279
+ !current && onRevoke && /* @__PURE__ */ jsx(
1280
+ "button",
1281
+ {
1282
+ type: "button",
1283
+ onClick: onRevoke,
1284
+ disabled: revoking,
1285
+ "aria-label": revokeLabel,
1286
+ title: revokeLabel,
1287
+ className: "p-1.5 hover:bg-error-soft rounded text-(--text-tertiary) hover:text-error transition-colors shrink-0 outline-none focus-visible:ring-2 focus-visible:ring-ring",
1288
+ children: revoking ? /* @__PURE__ */ jsx(Loader2, { size: 12, className: "animate-spin" }) : /* @__PURE__ */ jsx(LogOut, { size: 12 })
1289
+ }
1290
+ )
1291
+ ]
1292
+ }
1293
+ );
1138
1294
  }
1139
1295
  function MetricBar({ icon, label, value, percentage, color, className }) {
1140
1296
  return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-3", className), children: [
@@ -1158,6 +1314,441 @@ function MetricBar({ icon, label, value, percentage, color, className }) {
1158
1314
  ] })
1159
1315
  ] });
1160
1316
  }
1317
+ var fmtTime = (s) => {
1318
+ if (!Number.isFinite(s) || s < 0) return "0:00";
1319
+ const m = Math.floor(s / 60);
1320
+ const sec = Math.floor(s % 60);
1321
+ return `${m}:${sec.toString().padStart(2, "0")}`;
1322
+ };
1323
+ function AudioPlayer({ src, title, downloadName, autoPlay = false, labels, className }) {
1324
+ const audioRef = useRef(null);
1325
+ const [playing, setPlaying] = useState(false);
1326
+ const [current, setCurrent] = useState(0);
1327
+ const [duration, setDuration] = useState(0);
1328
+ useEffect(() => {
1329
+ setPlaying(false);
1330
+ setCurrent(0);
1331
+ setDuration(0);
1332
+ }, [src]);
1333
+ const toggle = () => {
1334
+ const el = audioRef.current;
1335
+ if (!el) return;
1336
+ if (el.paused) {
1337
+ void el.play();
1338
+ } else {
1339
+ el.pause();
1340
+ }
1341
+ };
1342
+ const seek = (e) => {
1343
+ const el = audioRef.current;
1344
+ if (!el) return;
1345
+ const t = Number(e.target.value);
1346
+ el.currentTime = t;
1347
+ setCurrent(t);
1348
+ };
1349
+ const pct = duration > 0 ? current / duration * 100 : 0;
1350
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2 rounded-xl border border-border bg-card p-3", className), children: [
1351
+ title && /* @__PURE__ */ jsx("div", { className: "truncate text-sm font-medium", children: title }),
1352
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
1353
+ /* @__PURE__ */ jsx(
1354
+ "button",
1355
+ {
1356
+ type: "button",
1357
+ onClick: toggle,
1358
+ "aria-label": playing ? labels?.pause ?? "Pause" : labels?.play ?? "Play",
1359
+ className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-accent text-accent-foreground transition-opacity hover:opacity-90",
1360
+ children: playing ? /* @__PURE__ */ jsx(Pause, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Play, { className: "h-4 w-4 translate-x-px" })
1361
+ }
1362
+ ),
1363
+ /* @__PURE__ */ jsx(
1364
+ "input",
1365
+ {
1366
+ type: "range",
1367
+ min: 0,
1368
+ max: duration || 0,
1369
+ step: "any",
1370
+ value: current,
1371
+ onChange: seek,
1372
+ "aria-label": labels?.seek ?? "Seek",
1373
+ className: "h-1.5 flex-1 cursor-pointer appearance-none rounded-full bg-muted accent-[var(--color-accent)]",
1374
+ style: {
1375
+ background: `linear-gradient(to right, var(--color-accent) ${pct}%, var(--color-muted) ${pct}%)`
1376
+ }
1377
+ }
1378
+ ),
1379
+ /* @__PURE__ */ jsxs("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: [
1380
+ fmtTime(current),
1381
+ " / ",
1382
+ fmtTime(duration)
1383
+ ] }),
1384
+ downloadName && /* @__PURE__ */ jsx(
1385
+ "a",
1386
+ {
1387
+ href: src,
1388
+ download: downloadName,
1389
+ "aria-label": labels?.download ?? "Download audio",
1390
+ className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
1391
+ children: /* @__PURE__ */ jsx(Download, { className: "h-4 w-4" })
1392
+ }
1393
+ )
1394
+ ] }),
1395
+ /* @__PURE__ */ jsx(
1396
+ "audio",
1397
+ {
1398
+ ref: audioRef,
1399
+ src,
1400
+ autoPlay,
1401
+ onPlay: () => setPlaying(true),
1402
+ onPause: () => setPlaying(false),
1403
+ onTimeUpdate: (e) => setCurrent(e.currentTarget.currentTime),
1404
+ onLoadedMetadata: (e) => setDuration(e.currentTarget.duration),
1405
+ onEnded: () => setPlaying(false),
1406
+ className: "hidden"
1407
+ }
1408
+ )
1409
+ ] });
1410
+ }
1411
+ var DEFAULT_LABELS = {
1412
+ starting: "Starting\u2026",
1413
+ processing: "Processing\u2026",
1414
+ failed: "Generation failed",
1415
+ expired: "Media expired",
1416
+ download: "Download",
1417
+ delete: "Delete",
1418
+ gridView: "Grid view",
1419
+ listView: "List view"
1420
+ };
1421
+ function isUrlExpired(url) {
1422
+ try {
1423
+ const expires = new URL(url).searchParams.get("Expires");
1424
+ if (expires) {
1425
+ const ts = parseInt(expires, 10);
1426
+ return Date.now() / 1e3 > ts - 60;
1427
+ }
1428
+ } catch {
1429
+ return true;
1430
+ }
1431
+ return false;
1432
+ }
1433
+ function MediaBody({
1434
+ item,
1435
+ labels
1436
+ }) {
1437
+ const [loading, setLoading] = useState(true);
1438
+ const [loadFailed, setLoadFailed] = useState(false);
1439
+ const kind = item.kind ?? "image";
1440
+ const status = item.status ?? "completed";
1441
+ const isExpired = useMemo(() => {
1442
+ if (!item.url || item.url.startsWith("data:") || item.url.startsWith("blob:")) return false;
1443
+ return isUrlExpired(item.url);
1444
+ }, [item.url]);
1445
+ const isProcessing = status === "pending" || status === "processing";
1446
+ const showError = isExpired || loadFailed || status === "failed";
1447
+ if (isProcessing) {
1448
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col items-center justify-center gap-2 bg-muted", children: [
1449
+ /* @__PURE__ */ jsx(Spinner, { size: "lg" }),
1450
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: status === "pending" ? labels.starting : labels.processing }),
1451
+ item.progress !== void 0 && item.progress > 0 && /* @__PURE__ */ jsx("div", { className: "mt-1 h-1.5 w-24 overflow-hidden rounded-full bg-muted-foreground/20", children: /* @__PURE__ */ jsx(
1452
+ "div",
1453
+ {
1454
+ className: "h-full bg-primary transition-all duration-300",
1455
+ style: { width: `${Math.min(item.progress, 95)}%` }
1456
+ }
1457
+ ) })
1458
+ ] });
1459
+ }
1460
+ if (showError) {
1461
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col items-center justify-center gap-1 bg-muted px-3 text-center", children: [
1462
+ /* @__PURE__ */ jsx(AlertCircle, { size: 22, className: "text-error" }),
1463
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-error", children: status === "failed" ? labels.failed : labels.expired }),
1464
+ item.error && /* @__PURE__ */ jsx("span", { className: "mt-0.5 max-w-[85%] truncate text-xs text-error/70", children: item.error })
1465
+ ] });
1466
+ }
1467
+ if (kind === "audio") {
1468
+ return /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center bg-muted/40 px-3", children: /* @__PURE__ */ jsx(AudioPlayer, { src: item.url, className: "w-full" }) });
1469
+ }
1470
+ if (kind === "video") {
1471
+ return (
1472
+ // eslint-disable-next-line jsx-a11y/media-has-caption
1473
+ /* @__PURE__ */ jsx(
1474
+ "video",
1475
+ {
1476
+ src: item.url,
1477
+ controls: true,
1478
+ className: "h-full w-full bg-black object-contain",
1479
+ onLoadedData: () => setLoading(false),
1480
+ onError: () => {
1481
+ setLoading(false);
1482
+ setLoadFailed(true);
1483
+ }
1484
+ }
1485
+ )
1486
+ );
1487
+ }
1488
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1489
+ loading && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 animate-pulse bg-muted" }),
1490
+ /* @__PURE__ */ jsx(
1491
+ "img",
1492
+ {
1493
+ src: item.url,
1494
+ alt: typeof item.prompt === "string" ? item.prompt : "",
1495
+ className: cn("h-full w-full object-cover", loading && "opacity-0"),
1496
+ onLoad: () => setLoading(false),
1497
+ onError: () => {
1498
+ setLoading(false);
1499
+ setLoadFailed(true);
1500
+ }
1501
+ }
1502
+ )
1503
+ ] });
1504
+ }
1505
+ function MediaCard({
1506
+ item,
1507
+ index,
1508
+ view,
1509
+ onDownload,
1510
+ onDelete,
1511
+ onPreview,
1512
+ labels
1513
+ }) {
1514
+ const status = item.status ?? "completed";
1515
+ const kind = item.kind ?? "image";
1516
+ const isProcessing = status === "pending" || status === "processing";
1517
+ const isDone = status === "completed";
1518
+ const canPreview = Boolean(onPreview) && isDone && kind === "image";
1519
+ const modelShort = item.model?.split("/").pop();
1520
+ const caption = /* @__PURE__ */ jsxs("div", { className: cn(view === "list" ? "min-w-0 flex-1" : "p-3"), children: [
1521
+ item.prompt !== void 0 && /* @__PURE__ */ jsx("div", { className: "line-clamp-2 text-sm", children: item.prompt }),
1522
+ (modelShort || item.meta) && /* @__PURE__ */ jsxs("div", { className: "mt-1 flex flex-wrap items-center gap-2 text-xs text-muted-foreground", children: [
1523
+ modelShort && /* @__PURE__ */ jsx("span", { className: "truncate", children: modelShort }),
1524
+ modelShort && item.meta && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/40", children: "\u2022" }),
1525
+ item.meta
1526
+ ] })
1527
+ ] });
1528
+ const overlayBtn = "flex h-9 w-9 items-center justify-center rounded-full bg-card text-foreground shadow-md ring-1 ring-border backdrop-blur transition hover:scale-105 disabled:pointer-events-none disabled:opacity-40";
1529
+ const actions = (onDownload || onDelete) && (view === "grid" ? /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 flex items-center justify-center gap-2.5 bg-foreground/0 opacity-0 transition-all group-hover:bg-foreground/30 group-hover:opacity-100", children: [
1530
+ onDownload && /* @__PURE__ */ jsx(
1531
+ "button",
1532
+ {
1533
+ type: "button",
1534
+ className: overlayBtn,
1535
+ disabled: !isDone,
1536
+ "aria-label": labels.download,
1537
+ onClick: (e) => {
1538
+ e.stopPropagation();
1539
+ onDownload(item);
1540
+ },
1541
+ children: /* @__PURE__ */ jsx(Download, { size: 18 })
1542
+ }
1543
+ ),
1544
+ onDelete && /* @__PURE__ */ jsx(
1545
+ "button",
1546
+ {
1547
+ type: "button",
1548
+ className: cn(overlayBtn, "text-error"),
1549
+ "aria-label": labels.delete,
1550
+ onClick: (e) => {
1551
+ e.stopPropagation();
1552
+ onDelete(item);
1553
+ },
1554
+ children: /* @__PURE__ */ jsx(Trash2, { size: 18 })
1555
+ }
1556
+ )
1557
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
1558
+ onDownload && /* @__PURE__ */ jsx(
1559
+ Button,
1560
+ {
1561
+ size: "icon",
1562
+ variant: "ghost",
1563
+ disabled: !isDone,
1564
+ "aria-label": labels.download,
1565
+ onClick: (e) => {
1566
+ e.stopPropagation();
1567
+ onDownload(item);
1568
+ },
1569
+ children: /* @__PURE__ */ jsx(Download, { size: 16 })
1570
+ }
1571
+ ),
1572
+ onDelete && /* @__PURE__ */ jsx(
1573
+ Button,
1574
+ {
1575
+ size: "icon",
1576
+ variant: "ghost",
1577
+ "aria-label": labels.delete,
1578
+ onClick: (e) => {
1579
+ e.stopPropagation();
1580
+ onDelete(item);
1581
+ },
1582
+ children: /* @__PURE__ */ jsx(Trash2, { size: 16, className: "text-error" })
1583
+ }
1584
+ )
1585
+ ] }));
1586
+ if (kind === "audio") {
1587
+ const showError = status === "failed";
1588
+ return /* @__PURE__ */ jsxs("div", { className: "card space-y-2.5 p-3", children: [
1589
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
1590
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
1591
+ item.prompt !== void 0 && /* @__PURE__ */ jsx("div", { className: "line-clamp-2 text-sm", children: item.prompt }),
1592
+ (modelShort || item.meta) && /* @__PURE__ */ jsxs("div", { className: "mt-1 flex flex-wrap items-center gap-2 text-xs text-muted-foreground", children: [
1593
+ modelShort && /* @__PURE__ */ jsx("span", { className: "truncate", children: modelShort }),
1594
+ modelShort && item.meta && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/40", children: "\u2022" }),
1595
+ item.meta
1596
+ ] })
1597
+ ] }),
1598
+ (onDownload || onDelete) && /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [
1599
+ onDownload && /* @__PURE__ */ jsx(
1600
+ Button,
1601
+ {
1602
+ size: "icon",
1603
+ variant: "ghost",
1604
+ disabled: !isDone,
1605
+ "aria-label": labels.download,
1606
+ onClick: () => onDownload(item),
1607
+ children: /* @__PURE__ */ jsx(Download, { size: 16 })
1608
+ }
1609
+ ),
1610
+ onDelete && /* @__PURE__ */ jsx(
1611
+ Button,
1612
+ {
1613
+ size: "icon",
1614
+ variant: "ghost",
1615
+ "aria-label": labels.delete,
1616
+ onClick: () => onDelete(item),
1617
+ children: /* @__PURE__ */ jsx(Trash2, { size: 16, className: "text-error" })
1618
+ }
1619
+ )
1620
+ ] })
1621
+ ] }),
1622
+ isProcessing ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 py-2 text-xs text-muted-foreground", children: [
1623
+ /* @__PURE__ */ jsx(Spinner, { size: "sm" }),
1624
+ " ",
1625
+ status === "pending" ? labels.starting : labels.processing
1626
+ ] }) : showError ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 py-2 text-xs text-error", children: [
1627
+ /* @__PURE__ */ jsx(AlertCircle, { size: 14 }),
1628
+ " ",
1629
+ labels.failed,
1630
+ item.error ? `: ${item.error}` : ""
1631
+ ] }) : /* @__PURE__ */ jsx(AudioPlayer, { src: item.url, className: "w-full" })
1632
+ ] });
1633
+ }
1634
+ if (view === "list") {
1635
+ return /* @__PURE__ */ jsxs("div", { className: "card flex items-center gap-3 p-3", children: [
1636
+ /* @__PURE__ */ jsx("div", { className: "relative h-16 w-16 shrink-0 overflow-hidden rounded-md bg-muted", children: /* @__PURE__ */ jsx(MediaBody, { item, labels }) }),
1637
+ caption,
1638
+ actions
1639
+ ] });
1640
+ }
1641
+ return /* @__PURE__ */ jsxs(
1642
+ "div",
1643
+ {
1644
+ className: cn(
1645
+ "card group animate-enter overflow-hidden",
1646
+ canPreview && "cursor-pointer"
1647
+ ),
1648
+ style: { animationDelay: `${Math.min(index, 10) * 50}ms` },
1649
+ onClick: () => canPreview && onPreview?.(item),
1650
+ children: [
1651
+ /* @__PURE__ */ jsxs("div", { className: "relative aspect-square", children: [
1652
+ /* @__PURE__ */ jsx(MediaBody, { item, labels }),
1653
+ !isProcessing && actions
1654
+ ] }),
1655
+ caption
1656
+ ]
1657
+ }
1658
+ );
1659
+ }
1660
+ function MediaGallery({
1661
+ items,
1662
+ viewMode,
1663
+ onViewModeChange,
1664
+ onDownload,
1665
+ onDelete,
1666
+ onPreview,
1667
+ title,
1668
+ empty,
1669
+ labels,
1670
+ className
1671
+ }) {
1672
+ const [internalView, setInternalView] = useState("grid");
1673
+ const view = viewMode ?? internalView;
1674
+ const setView = onViewModeChange ?? setInternalView;
1675
+ const showToggle = Boolean(onViewModeChange) || items.length > 0;
1676
+ const l = { ...DEFAULT_LABELS, ...labels };
1677
+ const [lightbox, setLightbox] = useState(null);
1678
+ const handlePreview = (item) => {
1679
+ if (onPreview) onPreview(item);
1680
+ else setLightbox(item);
1681
+ };
1682
+ return /* @__PURE__ */ jsxs("div", { className, children: [
1683
+ /* @__PURE__ */ jsx(
1684
+ ImageLightbox,
1685
+ {
1686
+ src: lightbox?.url,
1687
+ alt: typeof lightbox?.prompt === "string" ? lightbox.prompt : "",
1688
+ isOpen: lightbox !== null,
1689
+ onClose: () => setLightbox(null)
1690
+ }
1691
+ ),
1692
+ (title || showToggle) && /* @__PURE__ */ jsxs("div", { className: "mb-4 flex items-center justify-between gap-3", children: [
1693
+ title ? /* @__PURE__ */ jsx("h2", { className: "heading-md", children: title }) : /* @__PURE__ */ jsx("span", {}),
1694
+ showToggle && /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
1695
+ /* @__PURE__ */ jsx(
1696
+ "button",
1697
+ {
1698
+ type: "button",
1699
+ onClick: () => setView("grid"),
1700
+ "aria-label": l.gridView,
1701
+ "aria-pressed": view === "grid",
1702
+ className: cn(
1703
+ "rounded-lg p-2 transition-colors",
1704
+ view === "grid" ? "bg-muted" : "hover:bg-muted/50"
1705
+ ),
1706
+ children: /* @__PURE__ */ jsx(Grid, { size: 16 })
1707
+ }
1708
+ ),
1709
+ /* @__PURE__ */ jsx(
1710
+ "button",
1711
+ {
1712
+ type: "button",
1713
+ onClick: () => setView("list"),
1714
+ "aria-label": l.listView,
1715
+ "aria-pressed": view === "list",
1716
+ className: cn(
1717
+ "rounded-lg p-2 transition-colors",
1718
+ view === "list" ? "bg-muted" : "hover:bg-muted/50"
1719
+ ),
1720
+ children: /* @__PURE__ */ jsx(List, { size: 16 })
1721
+ }
1722
+ )
1723
+ ] })
1724
+ ] }),
1725
+ items.length === 0 ? empty ?? null : view === "grid" ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4", children: items.map((item, i) => /* @__PURE__ */ jsx(
1726
+ MediaCard,
1727
+ {
1728
+ item,
1729
+ index: i,
1730
+ view: "grid",
1731
+ onDownload,
1732
+ onDelete,
1733
+ onPreview: handlePreview,
1734
+ labels: l
1735
+ },
1736
+ item.id
1737
+ )) }) : /* @__PURE__ */ jsx("div", { className: "space-y-2", children: items.map((item, i) => /* @__PURE__ */ jsx(
1738
+ MediaCard,
1739
+ {
1740
+ item,
1741
+ index: i,
1742
+ view: "list",
1743
+ onDownload,
1744
+ onDelete,
1745
+ onPreview: handlePreview,
1746
+ labels: l
1747
+ },
1748
+ item.id
1749
+ )) })
1750
+ ] });
1751
+ }
1161
1752
  var TONES2 = {
1162
1753
  info: {
1163
1754
  bg: "bg-linear-to-r from-blue-500/10 via-blue-500/5 to-blue-500/10",
@@ -1310,7 +1901,7 @@ function NotificationPanel({
1310
1901
  "div",
1311
1902
  {
1312
1903
  className: cn(
1313
- "w-80 sm:w-[400px] rounded-2xl border border-border bg-background/60 backdrop-blur-2xl shadow-lg shadow-black/5",
1904
+ "w-80 sm:w-[400px] rounded-2xl border border-border bg-popover/85 backdrop-blur-2xl shadow-lg shadow-black/5",
1314
1905
  className
1315
1906
  ),
1316
1907
  children: [
@@ -1342,6 +1933,91 @@ function SettingRow({ title, description, control, className }) {
1342
1933
  control != null && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: control })
1343
1934
  ] });
1344
1935
  }
1936
+ function SettingsShell({
1937
+ header,
1938
+ groups,
1939
+ value,
1940
+ onValueChange,
1941
+ children,
1942
+ navigationLabel = "Settings",
1943
+ className,
1944
+ sidebarClassName,
1945
+ contentClassName
1946
+ }) {
1947
+ const items = groups.flatMap((group) => group.items);
1948
+ const activeItem = items.find((item) => item.key === value);
1949
+ const ActiveIcon = activeItem?.icon;
1950
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex h-full min-h-0", className), children: [
1951
+ /* @__PURE__ */ jsxs(
1952
+ "aside",
1953
+ {
1954
+ className: cn(
1955
+ "hidden w-56 shrink-0 flex-col border-r border-border bg-muted/15 sm:flex",
1956
+ sidebarClassName
1957
+ ),
1958
+ children: [
1959
+ /* @__PURE__ */ jsx("div", { className: "shrink-0 px-6 pb-4 pt-6", children: header }),
1960
+ /* @__PURE__ */ jsx(
1961
+ "nav",
1962
+ {
1963
+ "aria-label": navigationLabel,
1964
+ className: "min-h-0 flex-1 overflow-y-auto px-3 pb-5",
1965
+ children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs(
1966
+ "section",
1967
+ {
1968
+ "aria-label": typeof group.label === "string" ? group.label : void 0,
1969
+ className: cn(groupIndex > 0 && "mt-4 border-t border-border/70 pt-4"),
1970
+ children: [
1971
+ group.label ? /* @__PURE__ */ jsx("div", { className: "px-3 pb-1.5 text-[10px] font-semibold uppercase tracking-[0.08em] text-muted-foreground", children: group.label }) : null,
1972
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1", children: group.items.map((item) => {
1973
+ const Icon = item.icon;
1974
+ const active = item.key === value;
1975
+ return /* @__PURE__ */ jsxs(
1976
+ "button",
1977
+ {
1978
+ type: "button",
1979
+ className: cn(
1980
+ "nav-item w-full text-left",
1981
+ active && "active"
1982
+ ),
1983
+ "aria-current": active ? "page" : void 0,
1984
+ onClick: () => onValueChange(item.key),
1985
+ children: [
1986
+ /* @__PURE__ */ jsx(NavStateIndicator, { active }),
1987
+ Icon ? /* @__PURE__ */ jsx(Icon, { "aria-hidden": true, size: 18, strokeWidth: 1.75, className: "shrink-0" }) : null,
1988
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-left", children: item.label })
1989
+ ]
1990
+ },
1991
+ item.key
1992
+ );
1993
+ }) })
1994
+ ]
1995
+ },
1996
+ group.key
1997
+ ))
1998
+ }
1999
+ )
2000
+ ]
2001
+ }
2002
+ ),
2003
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [
2004
+ /* @__PURE__ */ jsxs("div", { className: "shrink-0 border-b border-border px-4 pb-3 pt-4 sm:hidden", children: [
2005
+ /* @__PURE__ */ jsx("div", { className: "mb-3", children: header }),
2006
+ /* @__PURE__ */ jsxs(Select, { value, onValueChange, children: [
2007
+ /* @__PURE__ */ jsx(SelectTrigger, { "aria-label": navigationLabel, className: "h-10 bg-background", children: /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [
2008
+ ActiveIcon ? /* @__PURE__ */ jsx(ActiveIcon, { "aria-hidden": true, size: 16, strokeWidth: 1.75, className: "shrink-0 text-muted-foreground" }) : null,
2009
+ /* @__PURE__ */ jsx(SelectValue, {})
2010
+ ] }) }),
2011
+ /* @__PURE__ */ jsx(SelectContent, { className: "bg-popover backdrop-blur-none", children: groups.map((group) => /* @__PURE__ */ jsxs("div", { children: [
2012
+ group.label ? /* @__PURE__ */ jsx("div", { className: "px-3 pb-1 pt-2 text-[10px] font-semibold uppercase tracking-[0.08em] text-muted-foreground", children: group.label }) : null,
2013
+ group.items.map((item) => /* @__PURE__ */ jsx(SelectItem, { value: item.key, children: item.label }, item.key))
2014
+ ] }, group.key)) })
2015
+ ] })
2016
+ ] }),
2017
+ /* @__PURE__ */ jsx("div", { className: cn("min-h-0 flex-1 overflow-hidden", contentClassName), children })
2018
+ ] })
2019
+ ] });
2020
+ }
1345
2021
  function LinkRow({ icon, title, description, href, external, className }) {
1346
2022
  const { Link } = useYunUI();
1347
2023
  const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -1453,6 +2129,6 @@ function AvatarUploader({
1453
2129
  );
1454
2130
  }
1455
2131
 
1456
- export { AccountLockedCard, ActiveBadge, AvatarUploader, BackgroundEffects, Banner, BlogCard, BlogPagination, BlogPostHeader, CapabilityBadge, CategoryFilter, CodeBlock, CodeDemo, ConnectedAccountRow, DeprecatedBadge, ErrorBoundary, FAQ, FeatureLockedState, FellowBadge, FellowsBanner, LLMCopyButton, LinkRow, MediaEmptyState, MediaErrorState, MediaLoadingState, MediaPageHeader, MetricBar, NotificationBell, NotificationItem, NotificationPanel, PageEmptyState, PageErrorState, PageHeader, PageLayout, PageLoadingState, SessionItem, SettingRow, Sidebar, SimplePagination, SourceBadge, StatCard, StatusBadge, ViewOptions };
2132
+ export { AccountLockedCard, ActiveBadge, AudioPlayer, AvatarUploader, BackgroundEffects, Banner, BlogCard, BlogPagination, BlogPostHeader, CapabilityBadge, CategoryFilter, CodeBlock, CodeDemo, ConnectedAccountRow, DeprecatedBadge, ErrorBoundary, FAQ, FeatureLockedState, FellowBadge, FellowsBanner, LLMCopyButton, LinkRow, MediaEmptyState, MediaErrorState, MediaGallery, MediaLoadingState, MediaPageHeader, MetricBar, NavStateIndicator, NotificationBell, NotificationItem, NotificationPanel, PageEmptyState, PageErrorState, PageHeader, PageLayout, PageLoadingState, ReadingProgress, SessionItem, SettingRow, SettingsShell, Sidebar, SimplePagination, SourceBadge, StatCard, StatusBadge, ViewOptions };
1457
2133
  //# sourceMappingURL=patterns.js.map
1458
2134
  //# sourceMappingURL=patterns.js.map