@yuhuanowo/yunui 0.2.16 → 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.
- package/README.md +10 -1
- package/README.zh-CN.md +9 -0
- package/README.zh-TW.md +9 -0
- package/dist/ai.d.ts +94 -6
- package/dist/ai.js +458 -72
- package/dist/ai.js.map +1 -1
- package/dist/chat.d.ts +21 -2
- package/dist/chat.js +62 -9
- package/dist/chat.js.map +1 -1
- package/dist/{chunk-5TOGZTAO.js → chunk-BCOKFWXC.js} +112 -60
- package/dist/chunk-BCOKFWXC.js.map +1 -0
- package/dist/{chunk-UYYG4XDW.js → chunk-DDUP7GAX.js} +13 -6
- package/dist/chunk-DDUP7GAX.js.map +1 -0
- package/dist/{chunk-GSPJ5YI6.js → chunk-F2HG4TOQ.js} +34 -16
- package/dist/chunk-F2HG4TOQ.js.map +1 -0
- package/dist/{chunk-5E3O6ANF.js → chunk-HH3JBHRP.js} +105 -48
- package/dist/chunk-HH3JBHRP.js.map +1 -0
- package/dist/chunk-N4QO7RN5.js +98 -0
- package/dist/chunk-N4QO7RN5.js.map +1 -0
- package/dist/content.d.ts +39 -5
- package/dist/content.js +190 -16
- package/dist/content.js.map +1 -1
- package/dist/index.d.ts +55 -8
- package/dist/index.js +4 -4
- package/dist/patterns.d.ts +90 -7
- package/dist/patterns.js +307 -69
- package/dist/patterns.js.map +1 -1
- package/icons/apps/aistudio.webp +0 -0
- package/icons/apps/application.png +0 -0
- package/icons/apps/baixiaoying.webp +0 -0
- package/icons/apps/coze.webp +0 -0
- package/icons/apps/dify.webp +0 -0
- package/icons/apps/doubao.webp +0 -0
- package/icons/apps/flowith.webp +0 -0
- package/icons/apps/gemini.webp +0 -0
- package/icons/apps/github-copilot.webp +0 -0
- package/icons/apps/google.webp +0 -0
- package/icons/apps/grok.webp +0 -0
- package/icons/apps/kimi.webp +0 -0
- package/icons/apps/longcat.webp +0 -0
- package/icons/apps/metaso.webp +0 -0
- package/icons/apps/monica.webp +0 -0
- package/icons/apps/n8n.webp +0 -0
- package/icons/apps/nm-search.webp +0 -0
- package/icons/apps/notebooklm.webp +0 -0
- package/icons/apps/perplexity.webp +0 -0
- package/icons/apps/poe.webp +0 -0
- package/icons/apps/qingyan.webp +0 -0
- package/icons/apps/stepfun.webp +0 -0
- package/icons/apps/tiangong.webp +0 -0
- package/icons/apps/xiaoyi.webp +0 -0
- package/icons/apps/yuanbao.webp +0 -0
- package/icons/apps/zai.webp +0 -0
- package/icons/models/ai21.webp +0 -0
- package/icons/models/aimass.webp +0 -0
- package/icons/models/anthropic.webp +0 -0
- package/icons/models/baichuan.webp +0 -0
- package/icons/models/byte_dance.webp +0 -0
- package/icons/models/chatglm.webp +0 -0
- package/icons/models/claude.webp +0 -0
- package/icons/models/codegeex.webp +0 -0
- package/icons/models/cogview3flash.webp +0 -0
- package/icons/models/cohere.webp +0 -0
- package/icons/models/copilot.webp +0 -0
- package/icons/models/dalle.webp +0 -0
- package/icons/models/dbrx.webp +0 -0
- package/icons/models/deepseek.webp +0 -0
- package/icons/models/doubao.webp +0 -0
- package/icons/models/flux.webp +0 -0
- package/icons/models/gemini.webp +0 -0
- package/icons/models/gemma.webp +0 -0
- package/icons/models/google.webp +0 -0
- package/icons/models/grok.webp +0 -0
- package/icons/models/hailuo.webp +0 -0
- package/icons/models/huggingface.webp +0 -0
- package/icons/models/hunyuan.webp +0 -0
- package/icons/models/ibm.webp +0 -0
- package/icons/models/ideogram.webp +0 -0
- package/icons/models/internlm.webp +0 -0
- package/icons/models/jina.webp +0 -0
- package/icons/models/llava.webp +0 -0
- package/icons/models/luma.webp +0 -0
- package/icons/models/magic.webp +0 -0
- package/icons/models/microsoft.webp +0 -0
- package/icons/models/midjourney.webp +0 -0
- package/icons/models/minimax.webp +0 -0
- package/icons/models/mistral.webp +0 -0
- package/icons/models/moonshot.webp +0 -0
- package/icons/models/nousresearch.webp +0 -0
- package/icons/models/nvidia.webp +0 -0
- package/icons/models/o3.webp +0 -0
- package/icons/models/openai.webp +0 -0
- package/icons/models/palm.webp +0 -0
- package/icons/models/perplexity.webp +0 -0
- package/icons/models/qwen.webp +0 -0
- package/icons/models/stability.webp +0 -0
- package/icons/models/step.webp +0 -0
- package/icons/models/suno.webp +0 -0
- package/icons/models/upstage.webp +0 -0
- package/icons/models/vidu.webp +0 -0
- package/icons/models/volcengine.webp +0 -0
- package/icons/models/voyageai.webp +0 -0
- package/icons/models/wenxin.webp +0 -0
- package/icons/models/xirang.png +0 -0
- package/icons/models/xirang_dark.png +0 -0
- package/icons/models/yi.webp +0 -0
- package/icons/models/zai.webp +0 -0
- package/icons/models/zero-one.webp +0 -0
- package/icons/models/zhipu.webp +0 -0
- package/icons/providers/302ai.webp +0 -0
- package/icons/providers/DMXAPI-to-img.webp +0 -0
- package/icons/providers/Tesseract.js.png +0 -0
- package/icons/providers/ace.webp +0 -0
- package/icons/providers/adobe.webp +0 -0
- package/icons/providers/adobefirefly.webp +0 -0
- package/icons/providers/agentvoice.webp +0 -0
- package/icons/providers/agui.webp +0 -0
- package/icons/providers/ai2.webp +0 -0
- package/icons/providers/ai21.webp +0 -0
- package/icons/providers/ai302.webp +0 -0
- package/icons/providers/ai360.webp +0 -0
- package/icons/providers/aiOnly.webp +0 -0
- package/icons/providers/aihubmix.webp +0 -0
- package/icons/providers/aimass.webp +0 -0
- package/icons/providers/aionlabs.webp +0 -0
- package/icons/providers/airjelly.webp +0 -0
- package/icons/providers/aistudio.webp +0 -0
- package/icons/providers/akashchat.webp +0 -0
- package/icons/providers/alephalpha.webp +0 -0
- package/icons/providers/alibaba.webp +0 -0
- package/icons/providers/alibabacloud.webp +0 -0
- package/icons/providers/amp.webp +0 -0
- package/icons/providers/antgroup.webp +0 -0
- package/icons/providers/anthropic.webp +0 -0
- package/icons/providers/antigravity.webp +0 -0
- package/icons/providers/anyscale.webp +0 -0
- package/icons/providers/apertis.webp +0 -0
- package/icons/providers/apple.webp +0 -0
- package/icons/providers/arcee.webp +0 -0
- package/icons/providers/askverdict.webp +0 -0
- package/icons/providers/assemblyai.webp +0 -0
- package/icons/providers/atlascloud.webp +0 -0
- package/icons/providers/automatic.webp +0 -0
- package/icons/providers/aws-bedrock.webp +0 -0
- package/icons/providers/aws.webp +0 -0
- package/icons/providers/aya.webp +0 -0
- package/icons/providers/azure.webp +0 -0
- package/icons/providers/azureai.webp +0 -0
- package/icons/providers/baai.webp +0 -0
- package/icons/providers/baichuan.webp +0 -0
- package/icons/providers/baidu-cloud.webp +0 -0
- package/icons/providers/baidu.webp +0 -0
- package/icons/providers/baiducloud.webp +0 -0
- package/icons/providers/bailian.webp +0 -0
- package/icons/providers/baseten.webp +0 -0
- package/icons/providers/bedrock.webp +0 -0
- package/icons/providers/bfl.webp +0 -0
- package/icons/providers/bigModel.webp +0 -0
- package/icons/providers/bilibili.webp +0 -0
- package/icons/providers/bilibiliindex.webp +0 -0
- package/icons/providers/bing.webp +0 -0
- package/icons/providers/briaai.webp +0 -0
- package/icons/providers/burncloud.webp +0 -0
- package/icons/providers/bytedance.webp +0 -0
- package/icons/providers/capcut.webp +0 -0
- package/icons/providers/centml.webp +0 -0
- package/icons/providers/cephalon.jpeg +0 -0
- package/icons/providers/cerebras.webp +0 -0
- package/icons/providers/chatglm.webp +0 -0
- package/icons/providers/cherryin.png +0 -0
- package/icons/providers/cherrystudio.webp +0 -0
- package/icons/providers/civitai.webp +0 -0
- package/icons/providers/claude.webp +0 -0
- package/icons/providers/claudecode.webp +0 -0
- package/icons/providers/cline.webp +0 -0
- package/icons/providers/clipdrop.webp +0 -0
- package/icons/providers/cloudflare.webp +0 -0
- package/icons/providers/codebuddy.webp +0 -0
- package/icons/providers/codeflicker.webp +0 -0
- package/icons/providers/codegeex.webp +0 -0
- package/icons/providers/codex.webp +0 -0
- package/icons/providers/cogvideo.webp +0 -0
- package/icons/providers/cogview.webp +0 -0
- package/icons/providers/cogview3flash.webp +0 -0
- package/icons/providers/cohere.webp +0 -0
- package/icons/providers/colab.webp +0 -0
- package/icons/providers/cometapi.webp +0 -0
- package/icons/providers/comfyui.webp +0 -0
- package/icons/providers/commanda.webp +0 -0
- package/icons/providers/copilot.webp +0 -0
- package/icons/providers/copilotkit.webp +0 -0
- package/icons/providers/coqui.webp +0 -0
- package/icons/providers/coze.webp +0 -0
- package/icons/providers/crewai.webp +0 -0
- package/icons/providers/crusoe.webp +0 -0
- package/icons/providers/cursor.webp +0 -0
- package/icons/providers/cybercut.webp +0 -0
- package/icons/providers/dalle.webp +0 -0
- package/icons/providers/dbrx.webp +0 -0
- package/icons/providers/deepai.webp +0 -0
- package/icons/providers/deepcogito.webp +0 -0
- package/icons/providers/deepinfra.webp +0 -0
- package/icons/providers/deepl.webp +0 -0
- package/icons/providers/deepmind.webp +0 -0
- package/icons/providers/deepseek.webp +0 -0
- package/icons/providers/devin.webp +0 -0
- package/icons/providers/dify.webp +0 -0
- package/icons/providers/dmxapi-logo-dark.webp +0 -0
- package/icons/providers/dmxapi-logo.webp +0 -0
- package/icons/providers/doc2x.webp +0 -0
- package/icons/providers/docsearch.webp +0 -0
- package/icons/providers/dolphin.webp +0 -0
- package/icons/providers/doubao.webp +0 -0
- package/icons/providers/dreammachine.webp +0 -0
- package/icons/providers/elevenlabs.webp +0 -0
- package/icons/providers/elevenx.webp +0 -0
- package/icons/providers/essentialai.webp +0 -0
- package/icons/providers/exa.webp +0 -0
- package/icons/providers/fal.webp +0 -0
- package/icons/providers/fastgpt.webp +0 -0
- package/icons/providers/featherless.webp +0 -0
- package/icons/providers/figma.webp +0 -0
- package/icons/providers/fireworks.webp +0 -0
- package/icons/providers/fishaudio.webp +0 -0
- package/icons/providers/flora.webp +0 -0
- package/icons/providers/flowith.webp +0 -0
- package/icons/providers/flux.webp +0 -0
- package/icons/providers/friendli.webp +0 -0
- package/icons/providers/gemini.webp +0 -0
- package/icons/providers/geminicli.webp +0 -0
- package/icons/providers/gemma.webp +0 -0
- package/icons/providers/gitee-ai.webp +0 -0
- package/icons/providers/giteeai.webp +0 -0
- package/icons/providers/github.webp +0 -0
- package/icons/providers/githubcopilot.webp +0 -0
- package/icons/providers/glama.webp +0 -0
- package/icons/providers/glif.webp +0 -0
- package/icons/providers/glmv.webp +0 -0
- package/icons/providers/google.webp +0 -0
- package/icons/providers/googlecloud.webp +0 -0
- package/icons/providers/goose.webp +0 -0
- package/icons/providers/gradio.webp +0 -0
- package/icons/providers/greptile.webp +0 -0
- package/icons/providers/grok.webp +0 -0
- package/icons/providers/groq.webp +0 -0
- package/icons/providers/hailuo.webp +0 -0
- package/icons/providers/haiper.webp +0 -0
- package/icons/providers/hedra.webp +0 -0
- package/icons/providers/hermesagent.webp +0 -0
- package/icons/providers/higress.webp +0 -0
- package/icons/providers/huawei.webp +0 -0
- package/icons/providers/huaweicloud.webp +0 -0
- package/icons/providers/huggingface.webp +0 -0
- package/icons/providers/hunyuan.webp +0 -0
- package/icons/providers/hyperbolic.webp +0 -0
- package/icons/providers/ibm.webp +0 -0
- package/icons/providers/ideogram.webp +0 -0
- package/icons/providers/iflytekcloud.webp +0 -0
- package/icons/providers/inception.webp +0 -0
- package/icons/providers/inference.webp +0 -0
- package/icons/providers/infermatic.webp +0 -0
- package/icons/providers/infini.webp +0 -0
- package/icons/providers/infinigence.webp +0 -0
- package/icons/providers/inflection.webp +0 -0
- package/icons/providers/internlm.webp +0 -0
- package/icons/providers/jimeng.webp +0 -0
- package/icons/providers/jina.webp +0 -0
- package/icons/providers/junie.webp +0 -0
- package/icons/providers/kilocode.webp +0 -0
- package/icons/providers/kimi.webp +0 -0
- package/icons/providers/kiro.webp +0 -0
- package/icons/providers/kling.webp +0 -0
- package/icons/providers/kluster.webp +0 -0
- package/icons/providers/kolors.webp +0 -0
- package/icons/providers/krea.webp +0 -0
- package/icons/providers/kwaikat.webp +0 -0
- package/icons/providers/kwaipilot.webp +0 -0
- package/icons/providers/lambda.webp +0 -0
- package/icons/providers/langchain.webp +0 -0
- package/icons/providers/langfuse.webp +0 -0
- package/icons/providers/langgraph.webp +0 -0
- package/icons/providers/langsmith.webp +0 -0
- package/icons/providers/leptonai.webp +0 -0
- package/icons/providers/lg.webp +0 -0
- package/icons/providers/lightricks.webp +0 -0
- package/icons/providers/liquid.webp +0 -0
- package/icons/providers/livekit.webp +0 -0
- package/icons/providers/llamaindex.webp +0 -0
- package/icons/providers/llava.webp +0 -0
- package/icons/providers/llmapi.webp +0 -0
- package/icons/providers/lmstudio.webp +0 -0
- package/icons/providers/lobehub.webp +0 -0
- package/icons/providers/longcat.webp +0 -0
- package/icons/providers/lovable.webp +0 -0
- package/icons/providers/lovart.webp +0 -0
- package/icons/providers/luma.webp +0 -0
- package/icons/providers/magic.webp +0 -0
- package/icons/providers/make.webp +0 -0
- package/icons/providers/manus.webp +0 -0
- package/icons/providers/mastra.webp +0 -0
- package/icons/providers/mcp.webp +0 -0
- package/icons/providers/mcpso.webp +0 -0
- package/icons/providers/menlo.webp +0 -0
- package/icons/providers/meshy.webp +0 -0
- package/icons/providers/meta.webp +0 -0
- package/icons/providers/metaai.webp +0 -0
- package/icons/providers/metagpt.webp +0 -0
- package/icons/providers/microsoft.webp +0 -0
- package/icons/providers/midjourney.webp +0 -0
- package/icons/providers/minimax.webp +0 -0
- package/icons/providers/mistral.webp +0 -0
- package/icons/providers/modelscope.webp +0 -0
- package/icons/providers/monica.webp +0 -0
- package/icons/providers/moonshot.webp +0 -0
- package/icons/providers/morph.webp +0 -0
- package/icons/providers/moxt.webp +0 -0
- package/icons/providers/myshell.webp +0 -0
- package/icons/providers/n8n.webp +0 -0
- package/icons/providers/nanobanana.webp +0 -0
- package/icons/providers/nebius.webp +0 -0
- package/icons/providers/newapi.webp +0 -0
- package/icons/providers/notebooklm.webp +0 -0
- package/icons/providers/notion.webp +0 -0
- package/icons/providers/nousresearch.webp +0 -0
- package/icons/providers/nova.webp +0 -0
- package/icons/providers/novelai.webp +0 -0
- package/icons/providers/novita.webp +0 -0
- package/icons/providers/nplcloud.webp +0 -0
- package/icons/providers/nvidia.webp +0 -0
- package/icons/providers/o3.webp +0 -0
- package/icons/providers/obsidian.webp +0 -0
- package/icons/providers/ollama.webp +0 -0
- package/icons/providers/openai.webp +0 -0
- package/icons/providers/openchat.webp +0 -0
- package/icons/providers/openclaw.webp +0 -0
- package/icons/providers/opencode.webp +0 -0
- package/icons/providers/openhands.webp +0 -0
- package/icons/providers/openhuman.webp +0 -0
- package/icons/providers/openrouter.webp +0 -0
- package/icons/providers/openwebui.webp +0 -0
- package/icons/providers/paddleocr.webp +0 -0
- package/icons/providers/palm.webp +0 -0
- package/icons/providers/parasail.webp +0 -0
- package/icons/providers/perplexity.webp +0 -0
- package/icons/providers/phidata.webp +0 -0
- package/icons/providers/phind.webp +0 -0
- package/icons/providers/pika.webp +0 -0
- package/icons/providers/pixverse.webp +0 -0
- package/icons/providers/player2.webp +0 -0
- package/icons/providers/poe.webp +0 -0
- package/icons/providers/pollinations.webp +0 -0
- package/icons/providers/ppio.webp +0 -0
- package/icons/providers/prunaai.webp +0 -0
- package/icons/providers/pydanticai.webp +0 -0
- package/icons/providers/qingyan.webp +0 -0
- package/icons/providers/qiniu.webp +0 -0
- package/icons/providers/qoder.webp +0 -0
- package/icons/providers/qwen.webp +0 -0
- package/icons/providers/railway.webp +0 -0
- package/icons/providers/recraft.webp +0 -0
- package/icons/providers/relace.webp +0 -0
- package/icons/providers/replicate.webp +0 -0
- package/icons/providers/replit.webp +0 -0
- package/icons/providers/reve.webp +0 -0
- package/icons/providers/roocode.webp +0 -0
- package/icons/providers/rsshub.webp +0 -0
- package/icons/providers/runway.webp +0 -0
- package/icons/providers/rwkv.webp +0 -0
- package/icons/providers/sambanova.webp +0 -0
- package/icons/providers/search1api.webp +0 -0
- package/icons/providers/searchapi.webp +0 -0
- package/icons/providers/sensenova.webp +0 -0
- package/icons/providers/silicon.webp +0 -0
- package/icons/providers/siliconcloud.webp +0 -0
- package/icons/providers/sillytavern.webp +0 -0
- package/icons/providers/skywork.webp +0 -0
- package/icons/providers/slock.webp +0 -0
- package/icons/providers/smithery.webp +0 -0
- package/icons/providers/snowflake.webp +0 -0
- package/icons/providers/sophnet.webp +0 -0
- package/icons/providers/sora.webp +0 -0
- package/icons/providers/spark.webp +0 -0
- package/icons/providers/speedai.webp +0 -0
- package/icons/providers/stability.webp +0 -0
- package/icons/providers/statecloud.webp +0 -0
- package/icons/providers/step.webp +0 -0
- package/icons/providers/stepfun.webp +0 -0
- package/icons/providers/straico.webp +0 -0
- package/icons/providers/streamlake.webp +0 -0
- package/icons/providers/submodel.webp +0 -0
- package/icons/providers/suno.webp +0 -0
- package/icons/providers/sync.webp +0 -0
- package/icons/providers/targon.webp +0 -0
- package/icons/providers/tavily.webp +0 -0
- package/icons/providers/tencent-cloud-ti.webp +0 -0
- package/icons/providers/tencent.webp +0 -0
- package/icons/providers/tencentcloud.webp +0 -0
- package/icons/providers/tiangong.webp +0 -0
- package/icons/providers/tii.webp +0 -0
- package/icons/providers/together.webp +0 -0
- package/icons/providers/tokenrouter.png +0 -0
- package/icons/providers/topazlabs.webp +0 -0
- package/icons/providers/trae.webp +0 -0
- package/icons/providers/tripo.webp +0 -0
- package/icons/providers/turix.webp +0 -0
- package/icons/providers/udio.webp +0 -0
- package/icons/providers/unstructured.webp +0 -0
- package/icons/providers/upstage.webp +0 -0
- package/icons/providers/v0.webp +0 -0
- package/icons/providers/vectorizerai.webp +0 -0
- package/icons/providers/venice.webp +0 -0
- package/icons/providers/vercel.webp +0 -0
- package/icons/providers/vertexai.webp +0 -0
- package/icons/providers/vidu.webp +0 -0
- package/icons/providers/viggle.webp +0 -0
- package/icons/providers/vllm.webp +0 -0
- package/icons/providers/volcengine.webp +0 -0
- package/icons/providers/voyage.webp +0 -0
- package/icons/providers/voyageai.webp +0 -0
- package/icons/providers/wenxin.webp +0 -0
- package/icons/providers/windsurf.webp +0 -0
- package/icons/providers/workersai.webp +0 -0
- package/icons/providers/worldrouter.webp +0 -0
- package/icons/providers/xai.webp +0 -0
- package/icons/providers/xiaomimimo.webp +0 -0
- package/icons/providers/xinference.webp +0 -0
- package/icons/providers/xirang.png +0 -0
- package/icons/providers/xpay.webp +0 -0
- package/icons/providers/xuanyuan.webp +0 -0
- package/icons/providers/yandex.webp +0 -0
- package/icons/providers/yi.webp +0 -0
- package/icons/providers/youmind.webp +0 -0
- package/icons/providers/yuanbao.webp +0 -0
- package/icons/providers/zai.webp +0 -0
- package/icons/providers/zapier.webp +0 -0
- package/icons/providers/zeabur.webp +0 -0
- package/icons/providers/zencoder.webp +0 -0
- package/icons/providers/zenmux.webp +0 -0
- package/icons/providers/zero-one.webp +0 -0
- package/icons/providers/zeroone.webp +0 -0
- package/icons/providers/zhipu.webp +0 -0
- package/package.json +36 -35
- package/styles/yunui.css +161 -17
- package/dist/chunk-5E3O6ANF.js.map +0 -1
- package/dist/chunk-5TOGZTAO.js.map +0 -1
- package/dist/chunk-AV5TGEJS.js +0 -54
- package/dist/chunk-AV5TGEJS.js.map +0 -1
- package/dist/chunk-GSPJ5YI6.js.map +0 -1
- package/dist/chunk-UYYG4XDW.js.map +0 -1
package/dist/patterns.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { ReactNode, ElementType } from 'react';
|
|
2
|
+
import React__default, { ReactNode, ElementType, HTMLAttributes } from 'react';
|
|
3
3
|
export { F as Footer, a as FooterLink, b as FooterProps, c as FooterSection, d as FooterSocial } from './footer-BoFu7Wqq.js';
|
|
4
4
|
|
|
5
5
|
declare function BackgroundEffects(): React$1.JSX.Element;
|
|
@@ -117,6 +117,33 @@ interface BlogPaginationProps {
|
|
|
117
117
|
}
|
|
118
118
|
declare function BlogPagination({ currentPage, totalPages, onPageChange, labels, }: BlogPaginationProps): React$1.JSX.Element | null;
|
|
119
119
|
|
|
120
|
+
interface ReadingProgressProps {
|
|
121
|
+
/** Scroll distance, in px, before the control appears. */
|
|
122
|
+
threshold?: number;
|
|
123
|
+
/** Draw the circular progress ring around the button. */
|
|
124
|
+
bar?: boolean;
|
|
125
|
+
/** Make the control a back-to-top button (arrow + click-to-top). */
|
|
126
|
+
backToTop?: boolean;
|
|
127
|
+
/** Localized labels; default to English. */
|
|
128
|
+
labels?: {
|
|
129
|
+
backToTop?: string;
|
|
130
|
+
};
|
|
131
|
+
className?: string;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* How far through a long page the reader is, and a way back to the start —
|
|
135
|
+
* as one floating control in the corner, not a mystery hairline across the top.
|
|
136
|
+
*
|
|
137
|
+
* A circular ring fills as you scroll; an up-arrow sits in the middle and
|
|
138
|
+
* returns you to the top on click. Both live in one component because they
|
|
139
|
+
* answer the same question — where am I — and share a single scroll listener.
|
|
140
|
+
* Two components would mean two listeners on the pages least able to afford them.
|
|
141
|
+
*
|
|
142
|
+
* The host app owns nothing here: no data, no routing, no copy beyond an
|
|
143
|
+
* overridable label.
|
|
144
|
+
*/
|
|
145
|
+
declare function ReadingProgress({ threshold, bar, backToTop, labels, className, }: ReadingProgressProps): React$1.JSX.Element | null;
|
|
146
|
+
|
|
120
147
|
interface SimplePaginationProps {
|
|
121
148
|
/** 1-indexed current page, shown in the centre indicator. */
|
|
122
149
|
currentPage: number;
|
|
@@ -197,9 +224,21 @@ interface SidebarProps {
|
|
|
197
224
|
loading?: boolean;
|
|
198
225
|
/** sessionStorage key for persisting nav scroll position across navigations. */
|
|
199
226
|
scrollStorageKey?: string;
|
|
227
|
+
/** Fixed application rail or an in-flow shell owned by the host layout. */
|
|
228
|
+
layout?: "fixed" | "inline";
|
|
229
|
+
/** Replaces the built-in logo row while retaining the Sidebar shell. */
|
|
230
|
+
header?: ReactNode;
|
|
231
|
+
/** Replaces generated sections with custom dynamic Sidebar content. */
|
|
232
|
+
children?: ReactNode;
|
|
233
|
+
/** Additional shell classes. */
|
|
234
|
+
className?: string;
|
|
235
|
+
/** Landmark role for custom application layouts. */
|
|
236
|
+
role?: "navigation" | "complementary";
|
|
237
|
+
/** Accessible name for the Sidebar landmark. */
|
|
238
|
+
ariaLabel?: string;
|
|
200
239
|
}
|
|
201
240
|
/** App navigation sidebar: logo, grouped nav sections with active-state matching, a mobile drawer, desktop collapse, and a footer slot. */
|
|
202
|
-
declare function Sidebar({ appName, logoSrc, homeHref, sections, currentPath, isOpen, onClose, collapsed, onToggleCollapse, onNavigate, footer, closeLabel, loading, scrollStorageKey, }: SidebarProps): React$1.JSX.Element;
|
|
241
|
+
declare function Sidebar({ appName, logoSrc, homeHref, sections, currentPath, isOpen, onClose, collapsed, onToggleCollapse, onNavigate, footer, closeLabel, loading, scrollStorageKey, layout, header, children, className, role, ariaLabel, }: SidebarProps): React$1.JSX.Element;
|
|
203
242
|
|
|
204
243
|
interface PageHeaderProps {
|
|
205
244
|
title: string;
|
|
@@ -238,12 +277,12 @@ declare function PageLoadingState({ message }: PageLoadingStateProps): React$1.J
|
|
|
238
277
|
interface PageErrorStateProps {
|
|
239
278
|
/** Error message to display. */
|
|
240
279
|
message: string;
|
|
241
|
-
/** When provided, shows a retry
|
|
280
|
+
/** When provided, shows a retry button that calls this. */
|
|
242
281
|
onRetry?: () => void;
|
|
243
|
-
/** Label for the retry
|
|
282
|
+
/** Label for the retry button. @defaultValue "Retry" */
|
|
244
283
|
retryLabel?: string;
|
|
245
284
|
}
|
|
246
|
-
/** Centered in-page error state with an optional retry
|
|
285
|
+
/** Centered, compact in-page error state with an optional retry action. */
|
|
247
286
|
declare function PageErrorState({ message, onRetry, retryLabel }: PageErrorStateProps): React$1.JSX.Element;
|
|
248
287
|
interface PageEmptyStateProps {
|
|
249
288
|
/** Optional icon component shown above the title. */
|
|
@@ -451,13 +490,28 @@ interface SessionItemProps {
|
|
|
451
490
|
/** Dims the row and shows an "inactive" badge. */
|
|
452
491
|
inactive?: boolean;
|
|
453
492
|
inactiveLabel?: ReactNode;
|
|
493
|
+
/** Marks the row selected without adding a badge. */
|
|
494
|
+
selected?: boolean;
|
|
495
|
+
/** Shows a pulsing leading activity rail and exposes aria-busy. */
|
|
496
|
+
running?: boolean;
|
|
497
|
+
/** Screen-reader label announced while the row is running. */
|
|
498
|
+
runningLabel?: ReactNode;
|
|
454
499
|
/** Revoke handler — when set (and not current), shows the revoke button. */
|
|
455
500
|
onRevoke?: () => void;
|
|
456
501
|
revoking?: boolean;
|
|
457
502
|
revokeLabel?: string;
|
|
458
503
|
className?: string;
|
|
459
504
|
}
|
|
460
|
-
declare function SessionItem({ icon, name, detail, ip, time, current, currentLabel, inactive, inactiveLabel, onRevoke, revoking, revokeLabel, className, }: SessionItemProps): React$1.JSX.Element;
|
|
505
|
+
declare function SessionItem({ icon, name, detail, ip, time, current, currentLabel, inactive, inactiveLabel, selected, running, runningLabel, onRevoke, revoking, revokeLabel, className, }: SessionItemProps): React$1.JSX.Element;
|
|
506
|
+
|
|
507
|
+
interface NavStateIndicatorProps extends HTMLAttributes<HTMLSpanElement> {
|
|
508
|
+
/** Shows the indicator in its selected state. */
|
|
509
|
+
active?: boolean;
|
|
510
|
+
/** Animates the same indicator without changing its geometry. */
|
|
511
|
+
running?: boolean;
|
|
512
|
+
}
|
|
513
|
+
/** The single active/running indicator shared by YunUI navigation surfaces. */
|
|
514
|
+
declare function NavStateIndicator({ active, running, className, ...props }: NavStateIndicatorProps): React$1.JSX.Element;
|
|
461
515
|
|
|
462
516
|
interface MetricBarProps {
|
|
463
517
|
/** Leading icon; when omitted a small color dot (using `color`) is shown. */
|
|
@@ -650,6 +704,35 @@ interface SettingRowProps {
|
|
|
650
704
|
}
|
|
651
705
|
declare function SettingRow({ title, description, control, className }: SettingRowProps): React$1.JSX.Element;
|
|
652
706
|
|
|
707
|
+
interface SettingsNavItem {
|
|
708
|
+
key: string;
|
|
709
|
+
label: ReactNode;
|
|
710
|
+
icon?: ElementType;
|
|
711
|
+
}
|
|
712
|
+
interface SettingsNavGroup {
|
|
713
|
+
key: string;
|
|
714
|
+
label?: ReactNode;
|
|
715
|
+
items: SettingsNavItem[];
|
|
716
|
+
}
|
|
717
|
+
interface SettingsShellProps {
|
|
718
|
+
/** Dialog/page heading. Pass the host's accessible title primitive here. */
|
|
719
|
+
header: ReactNode;
|
|
720
|
+
groups: SettingsNavGroup[];
|
|
721
|
+
value: string;
|
|
722
|
+
onValueChange: (key: string) => void;
|
|
723
|
+
children: ReactNode;
|
|
724
|
+
navigationLabel?: string;
|
|
725
|
+
className?: string;
|
|
726
|
+
sidebarClassName?: string;
|
|
727
|
+
contentClassName?: string;
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* Canonical settings layout: grouped desktop navigation, compact mobile
|
|
731
|
+
* navigation and one scroll-safe content lane. The host owns the active panel
|
|
732
|
+
* and dialog lifecycle; YunUI owns all navigation spacing and active states.
|
|
733
|
+
*/
|
|
734
|
+
declare function SettingsShell({ header, groups, value, onValueChange, children, navigationLabel, className, sidebarClassName, contentClassName, }: SettingsShellProps): React$1.JSX.Element;
|
|
735
|
+
|
|
653
736
|
interface LinkRowProps {
|
|
654
737
|
icon?: ReactNode;
|
|
655
738
|
title: ReactNode;
|
|
@@ -700,4 +783,4 @@ interface AvatarUploaderProps {
|
|
|
700
783
|
}
|
|
701
784
|
declare function AvatarUploader({ src, fallback, size, uploading, onSelectFile, label, className, }: AvatarUploaderProps): React$1.JSX.Element;
|
|
702
785
|
|
|
703
|
-
export { AccountLockedCard, type AccountLockedCardProps, ActiveBadge, AudioPlayer, type AudioPlayerProps, AvatarUploader, type AvatarUploaderProps, BackgroundEffects, Banner, type BannerProps, type BannerTone, BlogCard, BlogPagination, BlogPostHeader, CapabilityBadge, CategoryFilter, CodeBlock, CodeDemo, ConnectedAccountRow, type ConnectedAccountRowProps, DeprecatedBadge, ErrorBoundary, type ErrorBoundaryLabels, FAQ, type FAQItem, type FAQProps, FeatureLockedState, type FeatureLockedStateProps, FellowBadge, FellowsBanner, type FellowsBannerProps, LLMCopyButton, LinkRow, type LinkRowProps, MediaEmptyState, MediaErrorState, MediaGallery, type MediaGalleryLabels, type MediaGalleryProps, MediaLoadingState, MediaPageHeader, type MediaResult, type MediaStatus, MetricBar, type MetricBarProps, NotificationBell, type NotificationBellProps, NotificationItem, type NotificationItemProps, NotificationPanel, type NotificationPanelProps, PageEmptyState, PageErrorState, PageHeader, PageLayout, type PageLayoutProps, PageLoadingState, SessionItem, type SessionItemProps, SettingRow, type SettingRowProps, Sidebar, type SidebarNavItem, type SidebarProps, type SidebarSection, SimplePagination, SourceBadge, StatCard, StatusBadge, ViewOptions };
|
|
786
|
+
export { AccountLockedCard, type AccountLockedCardProps, ActiveBadge, AudioPlayer, type AudioPlayerProps, AvatarUploader, type AvatarUploaderProps, BackgroundEffects, Banner, type BannerProps, type BannerTone, BlogCard, BlogPagination, BlogPostHeader, CapabilityBadge, CategoryFilter, CodeBlock, CodeDemo, ConnectedAccountRow, type ConnectedAccountRowProps, DeprecatedBadge, ErrorBoundary, type ErrorBoundaryLabels, FAQ, type FAQItem, type FAQProps, FeatureLockedState, type FeatureLockedStateProps, FellowBadge, FellowsBanner, type FellowsBannerProps, LLMCopyButton, LinkRow, type LinkRowProps, MediaEmptyState, MediaErrorState, MediaGallery, type MediaGalleryLabels, type MediaGalleryProps, MediaLoadingState, MediaPageHeader, type MediaResult, type MediaStatus, MetricBar, type MetricBarProps, NavStateIndicator, type NavStateIndicatorProps, NotificationBell, type NotificationBellProps, NotificationItem, type NotificationItemProps, NotificationPanel, type NotificationPanelProps, PageEmptyState, PageErrorState, PageHeader, PageLayout, type PageLayoutProps, PageLoadingState, ReadingProgress, SessionItem, type SessionItemProps, SettingRow, type SettingRowProps, type SettingsNavGroup, type SettingsNavItem, SettingsShell, type SettingsShellProps, Sidebar, type SidebarNavItem, type SidebarProps, type SidebarSection, SimplePagination, SourceBadge, StatCard, StatusBadge, ViewOptions };
|
package/dist/patterns.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import './chunk-
|
|
3
|
-
import { copyToClipboard } from './chunk-
|
|
4
|
-
export { Footer } from './chunk-
|
|
5
|
-
import './chunk-
|
|
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
6
|
import { ImageLightbox } from './chunk-QEIBYOG2.js';
|
|
7
|
-
import { Button, Card, Badge, Avatar, AvatarImage, AvatarFallback, IconButton, Spinner } from './chunk-
|
|
8
|
-
import { cn } from './chunk-
|
|
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
9
|
import { useYunUI } from './chunk-3RT24MSH.js';
|
|
10
10
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
11
11
|
import React, { useState, useEffect, useCallback, useRef, useMemo } from 'react';
|
|
12
|
-
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, Pause, Play, Download, Grid, List, Bell, Trash2, Camera, Info, CheckCircle2, AlertTriangle } from 'lucide-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';
|
|
13
13
|
|
|
14
14
|
function BackgroundEffects() {
|
|
15
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(
|
|
@@ -201,7 +201,7 @@ function CodeBlock({
|
|
|
201
201
|
}
|
|
202
202
|
)
|
|
203
203
|
] }),
|
|
204
|
-
/* @__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(
|
|
205
205
|
"div",
|
|
206
206
|
{
|
|
207
207
|
className: "table",
|
|
@@ -564,6 +564,99 @@ function BlogPagination({
|
|
|
564
564
|
)
|
|
565
565
|
] });
|
|
566
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
|
+
}
|
|
567
660
|
function SimplePagination({
|
|
568
661
|
currentPage,
|
|
569
662
|
hasPrevious,
|
|
@@ -623,6 +716,23 @@ function CategoryFilter({
|
|
|
623
716
|
))
|
|
624
717
|
] });
|
|
625
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
|
+
}
|
|
626
736
|
function isItemActive(item, currentPath, homeHref) {
|
|
627
737
|
if (currentPath === item.href) return true;
|
|
628
738
|
if (item.href !== homeHref && currentPath.startsWith(item.href)) return true;
|
|
@@ -642,7 +752,13 @@ function Sidebar({
|
|
|
642
752
|
footer,
|
|
643
753
|
closeLabel = "Close",
|
|
644
754
|
loading = false,
|
|
645
|
-
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"
|
|
646
762
|
}) {
|
|
647
763
|
const { Link, Image } = useYunUI();
|
|
648
764
|
const navRef = useRef(null);
|
|
@@ -656,7 +772,7 @@ function Sidebar({
|
|
|
656
772
|
return () => nav.removeEventListener("scroll", onScroll);
|
|
657
773
|
}, [scrollStorageKey]);
|
|
658
774
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
659
|
-
isOpen && /* @__PURE__ */ jsx(
|
|
775
|
+
layout === "fixed" && isOpen && /* @__PURE__ */ jsx(
|
|
660
776
|
"div",
|
|
661
777
|
{
|
|
662
778
|
className: "fixed inset-0 bg-black/20 backdrop-blur-sm z-40 lg:hidden",
|
|
@@ -667,17 +783,16 @@ function Sidebar({
|
|
|
667
783
|
/* @__PURE__ */ jsxs(
|
|
668
784
|
"aside",
|
|
669
785
|
{
|
|
670
|
-
role
|
|
671
|
-
"aria-label":
|
|
672
|
-
className:
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
`,
|
|
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
|
+
),
|
|
679
794
|
children: [
|
|
680
|
-
/* @__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: [
|
|
681
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: [
|
|
682
797
|
/* @__PURE__ */ jsx(Image, { src: logoSrc, alt: appName, width: 36, height: 36, className: "shrink-0" }),
|
|
683
798
|
/* @__PURE__ */ jsx("span", { className: "font-semibold text-[18px] truncate", children: appName })
|
|
@@ -696,16 +811,17 @@ function Sidebar({
|
|
|
696
811
|
] }),
|
|
697
812
|
onClose && /* @__PURE__ */ jsx(IconButton, { icon: /* @__PURE__ */ jsx(X, { size: 20 }), label: closeLabel, onClick: onClose, className: "lg:hidden" })
|
|
698
813
|
] }) }),
|
|
699
|
-
/* @__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: [
|
|
700
815
|
section.title && /* @__PURE__ */ jsx("div", { className: "nav-section", children: section.title }),
|
|
701
816
|
section.items.map((item) => {
|
|
702
817
|
const active = isItemActive(item, currentPath, homeHref);
|
|
703
818
|
const Icon = item.icon;
|
|
704
819
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
820
|
+
/* @__PURE__ */ jsx(NavStateIndicator, { active }),
|
|
705
821
|
Icon && /* @__PURE__ */ jsx(Icon, { size: 18, strokeWidth: 1.75, className: "shrink-0" }),
|
|
706
822
|
/* @__PURE__ */ jsx("span", { className: "flex-1 min-w-0 truncate", children: item.label })
|
|
707
823
|
] });
|
|
708
|
-
const
|
|
824
|
+
const className2 = `nav-item ${active ? "active" : ""}`;
|
|
709
825
|
return onNavigate ? /* @__PURE__ */ jsx(
|
|
710
826
|
"a",
|
|
711
827
|
{
|
|
@@ -715,11 +831,11 @@ function Sidebar({
|
|
|
715
831
|
onNavigate(item.href);
|
|
716
832
|
onClose?.();
|
|
717
833
|
},
|
|
718
|
-
className,
|
|
834
|
+
className: className2,
|
|
719
835
|
children: content
|
|
720
836
|
},
|
|
721
837
|
item.href
|
|
722
|
-
) : /* @__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);
|
|
723
839
|
})
|
|
724
840
|
] }, i)) }),
|
|
725
841
|
footer && /* @__PURE__ */ jsx("div", { className: "p-3 shrink-0", children: footer })
|
|
@@ -759,17 +875,28 @@ function PageLoadingState({ message }) {
|
|
|
759
875
|
] });
|
|
760
876
|
}
|
|
761
877
|
function PageErrorState({ message, onRetry, retryLabel = "Retry" }) {
|
|
762
|
-
return /* @__PURE__ */ jsxs(
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
"
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
className: "
|
|
769
|
-
children:
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
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
|
+
);
|
|
773
900
|
}
|
|
774
901
|
function PageEmptyState({ icon: Icon, title, description, action }) {
|
|
775
902
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
|
|
@@ -1100,44 +1227,70 @@ function SessionItem({
|
|
|
1100
1227
|
currentLabel,
|
|
1101
1228
|
inactive,
|
|
1102
1229
|
inactiveLabel,
|
|
1230
|
+
selected,
|
|
1231
|
+
running,
|
|
1232
|
+
runningLabel,
|
|
1103
1233
|
onRevoke,
|
|
1104
1234
|
revoking,
|
|
1105
1235
|
revokeLabel,
|
|
1106
1236
|
className
|
|
1107
1237
|
}) {
|
|
1108
|
-
return /* @__PURE__ */ jsxs(
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
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
|
+
] })
|
|
1121
1278
|
] }),
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
children: revoking ? /* @__PURE__ */ jsx(Loader2, { size: 12, className: "animate-spin" }) : /* @__PURE__ */ jsx(LogOut, { size: 12 })
|
|
1138
|
-
}
|
|
1139
|
-
)
|
|
1140
|
-
] });
|
|
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
|
+
);
|
|
1141
1294
|
}
|
|
1142
1295
|
function MetricBar({ icon, label, value, percentage, color, className }) {
|
|
1143
1296
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-3", className), children: [
|
|
@@ -1748,7 +1901,7 @@ function NotificationPanel({
|
|
|
1748
1901
|
"div",
|
|
1749
1902
|
{
|
|
1750
1903
|
className: cn(
|
|
1751
|
-
"w-80 sm:w-[400px] rounded-2xl border border-border bg-
|
|
1904
|
+
"w-80 sm:w-[400px] rounded-2xl border border-border bg-popover/85 backdrop-blur-2xl shadow-lg shadow-black/5",
|
|
1752
1905
|
className
|
|
1753
1906
|
),
|
|
1754
1907
|
children: [
|
|
@@ -1780,6 +1933,91 @@ function SettingRow({ title, description, control, className }) {
|
|
|
1780
1933
|
control != null && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: control })
|
|
1781
1934
|
] });
|
|
1782
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
|
+
}
|
|
1783
2021
|
function LinkRow({ icon, title, description, href, external, className }) {
|
|
1784
2022
|
const { Link } = useYunUI();
|
|
1785
2023
|
const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -1891,6 +2129,6 @@ function AvatarUploader({
|
|
|
1891
2129
|
);
|
|
1892
2130
|
}
|
|
1893
2131
|
|
|
1894
|
-
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, 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 };
|
|
1895
2133
|
//# sourceMappingURL=patterns.js.map
|
|
1896
2134
|
//# sourceMappingURL=patterns.js.map
|