@yuhuanowo/yunui 0.2.17 → 0.2.19
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 +56 -5
- package/README.zh-CN.md +21 -3
- package/README.zh-TW.md +21 -3
- package/THIRD_PARTY_NOTICES.md +13 -0
- package/agent/catalog.generated.json +29368 -0
- package/agent/recipes/analytics.tsx +121 -0
- package/agent/recipes/chat.tsx +154 -0
- package/agent/recipes/conversation-units.tsx +28 -0
- package/agent/recipes/dashboard.tsx +38 -0
- package/agent/recipes/landing.tsx +26 -0
- package/agent/recipes/setup.md +44 -0
- package/agent/skills/yunui/SKILL.md +82 -0
- package/dist/adapters.d.ts +5 -0
- package/dist/adapters.js +1 -1
- package/dist/ai.d.ts +478 -273
- package/dist/ai.js +1334 -1964
- package/dist/ai.js.map +1 -1
- package/dist/charts.d.ts +149 -0
- package/dist/charts.js +849 -0
- package/dist/charts.js.map +1 -0
- package/dist/chat.d.ts +204 -18
- package/dist/chat.js +887 -132
- package/dist/chat.js.map +1 -1
- package/dist/{chunk-F2HG4TOQ.js → chunk-ASPPAL7E.js} +25 -29
- package/dist/chunk-ASPPAL7E.js.map +1 -0
- package/dist/chunk-AVXIR7ZQ.js +197 -0
- package/dist/chunk-AVXIR7ZQ.js.map +1 -0
- package/dist/chunk-FJ52MVRF.js +82 -0
- package/dist/chunk-FJ52MVRF.js.map +1 -0
- package/dist/chunk-GRUB2GXF.js +15 -0
- package/dist/chunk-GRUB2GXF.js.map +1 -0
- package/dist/{chunk-3RT24MSH.js → chunk-GWD5W5F5.js} +2 -2
- package/dist/{chunk-3RT24MSH.js.map → chunk-GWD5W5F5.js.map} +1 -1
- package/dist/{chunk-BCOKFWXC.js → chunk-I2DAKAD5.js} +423 -281
- package/dist/chunk-I2DAKAD5.js.map +1 -0
- package/dist/chunk-OM7B4O6K.js +193 -0
- package/dist/chunk-OM7B4O6K.js.map +1 -0
- package/dist/chunk-OZIDZFMF.js +70 -0
- package/dist/chunk-OZIDZFMF.js.map +1 -0
- package/dist/chunk-P6LU2FWV.js +35 -0
- package/dist/chunk-P6LU2FWV.js.map +1 -0
- package/dist/chunk-SXWMKFKM.js +41 -0
- package/dist/chunk-SXWMKFKM.js.map +1 -0
- package/dist/chunk-TMTXJFNN.js +2715 -0
- package/dist/chunk-TMTXJFNN.js.map +1 -0
- package/dist/chunk-VNKAEQKU.js +501 -0
- package/dist/chunk-VNKAEQKU.js.map +1 -0
- package/dist/chunk-VSS7ASN2.js +12 -0
- package/dist/chunk-VSS7ASN2.js.map +1 -0
- package/dist/chunk-VYVFMNM7.js +112 -0
- package/dist/chunk-VYVFMNM7.js.map +1 -0
- package/dist/chunk-YKUQ7GCJ.js +230 -0
- package/dist/chunk-YKUQ7GCJ.js.map +1 -0
- package/dist/chunk-Z6WXDNBJ.js +366 -0
- package/dist/chunk-Z6WXDNBJ.js.map +1 -0
- package/dist/chunk-ZBRV6NHL.js +1115 -0
- package/dist/chunk-ZBRV6NHL.js.map +1 -0
- package/dist/code.d.ts +42 -0
- package/dist/code.js +8 -0
- package/dist/code.js.map +1 -0
- package/dist/content.d.ts +26 -40
- package/dist/content.js +400 -418
- package/dist/content.js.map +1 -1
- package/dist/footer-BCd-S806.d.ts +122 -0
- package/dist/index.d.ts +814 -88
- package/dist/index.js +7 -5
- package/dist/language.d.ts +30 -0
- package/dist/language.js +5 -0
- package/dist/language.js.map +1 -0
- package/dist/model-card.d.ts +43 -0
- package/dist/model-card.js +116 -0
- package/dist/model-card.js.map +1 -0
- package/dist/model.d.ts +51 -0
- package/dist/model.js +91 -0
- package/dist/model.js.map +1 -0
- package/dist/motion.d.ts +11 -0
- package/dist/motion.js +9 -0
- package/dist/motion.js.map +1 -0
- package/dist/patterns.d.ts +913 -29
- package/dist/patterns.js +1987 -259
- package/dist/patterns.js.map +1 -1
- package/dist/pickers.d.ts +134 -0
- package/dist/pickers.js +751 -0
- package/dist/pickers.js.map +1 -0
- package/dist/provider-icons-bgBTnami.d.ts +88 -0
- package/dist/segmented-bar-Bsr0PZIL.d.ts +58 -0
- package/dist/sparkline-vy5ec5C6.d.ts +67 -0
- package/icons/apps/aistudio.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/ling.webp +0 -0
- package/icons/apps/longcat.webp +0 -0
- package/icons/apps/monica.webp +0 -0
- package/icons/apps/n8n.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/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/ling.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/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/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/agnesai.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/aihubmix.webp +0 -0
- package/icons/providers/aimass.webp +0 -0
- package/icons/providers/aimlapi.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/amdradeoncloud.webp +0 -0
- package/icons/providers/amp.webp +0 -0
- package/icons/providers/anspire.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/appwrite.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/bocha.webp +0 -0
- package/icons/providers/brave.webp +0 -0
- package/icons/providers/briaai.webp +0 -0
- package/icons/providers/browserless.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/celestoai.webp +0 -0
- package/icons/providers/centml.webp +0 -0
- package/icons/providers/cerebras.webp +0 -0
- package/icons/providers/chatglm.webp +0 -0
- package/icons/providers/cheaperinference.webp +0 -0
- package/icons/providers/cherrystudio.webp +0 -0
- package/icons/providers/chutes.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/commandcode.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/decart.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/digitalocean.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/dothoosh.webp +0 -0
- package/icons/providers/dotsstudio.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/empiriolabs.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/firecrawl.webp +0 -0
- package/icons/providers/fireworks.webp +0 -0
- package/icons/providers/fishaudio.webp +0 -0
- package/icons/providers/flexai.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/gmi.svg +5 -0
- package/icons/providers/gmicloud.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/greenpt.webp +0 -0
- package/icons/providers/greptile.webp +0 -0
- package/icons/providers/grok.webp +0 -0
- package/icons/providers/grokbot.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/happyhorse.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/inceptron.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/ionet.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/kagi.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/ling.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/llmgateway.webp +0 -0
- package/icons/providers/lmstudio.webp +0 -0
- package/icons/providers/lobehub.webp +0 -0
- package/icons/providers/lobot.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/magpie.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/muse.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/nextbit.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/omlx.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/perceptron.webp +0 -0
- package/icons/providers/perplexity.webp +0 -0
- package/icons/providers/phala.webp +0 -0
- package/icons/providers/phidata.webp +0 -0
- package/icons/providers/phind.webp +0 -0
- package/icons/providers/pi.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/poolside.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/reflection.webp +0 -0
- package/icons/providers/reka.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/sakana.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/searxng.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/sub2api.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/tabbit.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/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/typesafeai.webp +0 -0
- package/icons/providers/udio.webp +0 -0
- package/icons/providers/unionalpha.webp +0 -0
- package/icons/providers/unsloth.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/wafer.webp +0 -0
- package/icons/providers/wandb.webp +0 -0
- package/icons/providers/wavespeed.webp +0 -0
- package/icons/providers/wenxin.webp +0 -0
- package/icons/providers/windsurf.webp +0 -0
- package/icons/providers/workbuddy.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/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/licenses/beautiful-ui-MIT.txt +21 -0
- package/package.json +53 -10
- package/scripts/yunui-audit.mjs +664 -0
- package/scripts/yunui-cli.mjs +868 -0
- package/scripts/yunui-init.mjs +138 -0
- package/styles/content.css +37 -3
- package/styles/tokens.css +41 -0
- package/styles/yunui.css +1586 -141
- package/dist/chunk-BCOKFWXC.js.map +0 -1
- package/dist/chunk-DDUP7GAX.js +0 -86
- package/dist/chunk-DDUP7GAX.js.map +0 -1
- package/dist/chunk-F2HG4TOQ.js.map +0 -1
- package/dist/chunk-HH3JBHRP.js +0 -1211
- package/dist/chunk-HH3JBHRP.js.map +0 -1
- package/dist/chunk-N4QO7RN5.js +0 -98
- package/dist/chunk-N4QO7RN5.js.map +0 -1
- package/dist/chunk-QEIBYOG2.js +0 -188
- package/dist/chunk-QEIBYOG2.js.map +0 -1
- package/dist/footer-BoFu7Wqq.d.ts +0 -46
- package/icons/apps/ling.png +0 -0
- package/icons/models/ling.png +0 -0
- package/icons/providers/Kwaipilot.png +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as framer_motion from 'framer-motion';
|
|
2
1
|
import * as React$1 from 'react';
|
|
3
|
-
import { ReactNode, ButtonHTMLAttributes, RefObject } from 'react';
|
|
2
|
+
import { ReactNode, ButtonHTMLAttributes, HTMLAttributes, RefObject } from 'react';
|
|
4
3
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
4
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
6
5
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
@@ -13,6 +12,8 @@ import { LucideIcon } from 'lucide-react';
|
|
|
13
12
|
import * as Primitive from '@radix-ui/react-collapsible';
|
|
14
13
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
15
14
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
15
|
+
export { M as MetricChartGroup, a as MetricChartGroupProps, c as Sparkline, d as SparklineProps, e as SparklineTone, u as useMetricGroup } from './sparkline-vy5ec5C6.js';
|
|
16
|
+
export { B as BarMark, a as BarSegment, S as SegmentTone, b as SegmentedBar, c as SegmentedBarProps } from './segmented-bar-Bsr0PZIL.js';
|
|
16
17
|
import { ToasterProps } from 'sonner';
|
|
17
18
|
import { ClassValue } from 'clsx';
|
|
18
19
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
@@ -145,15 +146,25 @@ interface SheetProps {
|
|
|
145
146
|
children: React.ReactNode;
|
|
146
147
|
/** Optional header title. */
|
|
147
148
|
title?: string;
|
|
149
|
+
/** Accessible name for the close button. The library ships no copy of its
|
|
150
|
+
* own; the English default only keeps it usable untranslated. */
|
|
151
|
+
closeLabel?: string;
|
|
148
152
|
/** Hide on large screens (`lg`+) — for mobile-only drawers (e.g. a sidebar
|
|
149
153
|
* that's permanent on desktop). @defaultValue false (shows on all sizes). */
|
|
150
154
|
mobileOnly?: boolean;
|
|
155
|
+
/** Optional secondary line under the title (12px, muted). */
|
|
156
|
+
description?: string;
|
|
157
|
+
/** Sticky footer actions, pinned under the scrolling body. */
|
|
158
|
+
footer?: React.ReactNode;
|
|
151
159
|
}
|
|
152
|
-
/**
|
|
153
|
-
*
|
|
154
|
-
|
|
160
|
+
/** Floating card panel. On phones (< `sm`) it is a content-height bottom card with
|
|
161
|
+
* a grabber that closes on swipe-down; from `sm` up it is an inset side card on the
|
|
162
|
+
* right. Header = title (14/600) + optional description + close; `footer` is sticky;
|
|
163
|
+
* the body fades at its bottom edge. Enter 280 ms expo ease-out, exit 200 ms ease-in (motion tokens); opacity only under
|
|
164
|
+
* reduced motion. Set `mobileOnly` to hide it on `lg`+. */
|
|
165
|
+
declare function Sheet({ open, onClose, children, title, description, footer, closeLabel, mobileOnly }: SheetProps): React$1.ReactPortal | null;
|
|
155
166
|
|
|
156
|
-
interface CheckboxProps {
|
|
167
|
+
interface CheckboxProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "checked" | "onChange" | "type" | "role" | "disabled" | "id" | "className"> {
|
|
157
168
|
/** Whether the box is checked. `"indeterminate"` shows a dash — for a
|
|
158
169
|
* select-all that's only partially selected. Defaults to `false`. */
|
|
159
170
|
checked?: boolean | "indeterminate";
|
|
@@ -163,7 +174,14 @@ interface CheckboxProps {
|
|
|
163
174
|
/** Disable interaction and dim the control. */
|
|
164
175
|
disabled?: boolean;
|
|
165
176
|
className?: string;
|
|
166
|
-
/**
|
|
177
|
+
/**
|
|
178
|
+
* Element id.
|
|
179
|
+
*
|
|
180
|
+
* NOTE: this renders a `<button role="checkbox">`, and `<label>` — whether
|
|
181
|
+
* wrapping or via `htmlFor` — only names real form controls. It does
|
|
182
|
+
* nothing for a button. Name it with `aria-label`, or point
|
|
183
|
+
* `aria-labelledby` at the text beside it.
|
|
184
|
+
*/
|
|
167
185
|
id?: string;
|
|
168
186
|
}
|
|
169
187
|
/** Controlled checkbox rendered as an accessible toggle button. Supports an
|
|
@@ -199,6 +217,12 @@ interface ComboboxProps {
|
|
|
199
217
|
onChange: (value: string) => void;
|
|
200
218
|
/** Placeholder for the input (falls back to i18n default). */
|
|
201
219
|
placeholder?: string;
|
|
220
|
+
/** Accessible names for the clear / toggle affordances. The library ships no
|
|
221
|
+
* copy of its own; the English defaults only keep it usable untranslated. */
|
|
222
|
+
labels?: {
|
|
223
|
+
clear?: string;
|
|
224
|
+
toggle?: string;
|
|
225
|
+
};
|
|
202
226
|
className?: string;
|
|
203
227
|
/** Disable interaction and dim the control. */
|
|
204
228
|
disabled?: boolean;
|
|
@@ -215,7 +239,7 @@ interface ComboboxProps {
|
|
|
215
239
|
}
|
|
216
240
|
/** Searchable, optionally creatable combobox — type to filter, Enter to pick or create.
|
|
217
241
|
* For long lists where users type to narrow; see `Select`'s doc for "which select do I use". */
|
|
218
|
-
declare function Combobox({ options, value, onChange, placeholder, className, disabled, clearable, allowCustom, creatableText, creatableFilter, creatableIcon, }: ComboboxProps): React$1.JSX.Element;
|
|
242
|
+
declare function Combobox({ options, value, onChange, placeholder, labels, className, disabled, clearable, allowCustom, creatableText, creatableFilter, creatableIcon, }: ComboboxProps): React$1.JSX.Element;
|
|
219
243
|
|
|
220
244
|
/**
|
|
221
245
|
* Radix Accordion root — a vertically stacked set of collapsible sections.
|
|
@@ -230,9 +254,9 @@ declare const AccordionItem: React$1.ForwardRefExoticComponent<Omit<AccordionPri
|
|
|
230
254
|
/** Clickable header that toggles its section; shows a chevron that rotates when open. */
|
|
231
255
|
declare const AccordionTrigger: React$1.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
232
256
|
/**
|
|
233
|
-
* Collapsible panel body. Animates its height open/closed
|
|
234
|
-
* `grid-template-rows` `0fr` → `1fr` track,
|
|
235
|
-
*
|
|
257
|
+
* Collapsible panel body. Animates its height open/closed with a keyframe on the
|
|
258
|
+
* `grid-template-rows` `0fr` → `1fr` track (`.yunui-rows-motion`). It has to be a keyframe, not a
|
|
259
|
+
* transition: Radix unmounts the closed content as soon as no animation is running.
|
|
236
260
|
*/
|
|
237
261
|
declare const AccordionContent: React$1.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
238
262
|
|
|
@@ -347,6 +371,13 @@ declare const Stack: React$1.ForwardRefExoticComponent<Omit<FlexProps, "directio
|
|
|
347
371
|
declare const Table: React$1.ForwardRefExoticComponent<React$1.TableHTMLAttributes<HTMLTableElement> & {
|
|
348
372
|
/** Class applied to the outer scroll/overflow wrapper. */
|
|
349
373
|
containerClassName?: string;
|
|
374
|
+
/**
|
|
375
|
+
* Accessible name for the scroll region, used only when the table is
|
|
376
|
+
* actually overflowing and therefore focusable (e.g. "Transactions,
|
|
377
|
+
* scrollable"). The library ships no copy, so without it the region is
|
|
378
|
+
* focusable but unnamed.
|
|
379
|
+
*/
|
|
380
|
+
scrollLabel?: string;
|
|
350
381
|
/**
|
|
351
382
|
* Stack each row into a labelled card below the `md` breakpoint, so dense
|
|
352
383
|
* many-column tables stay readable on narrow screens instead of forcing a
|
|
@@ -374,6 +405,8 @@ declare const TableHead: React$1.ForwardRefExoticComponent<React$1.ThHTMLAttribu
|
|
|
374
405
|
onSort?: () => void;
|
|
375
406
|
sortDirection?: "asc" | "desc" | false;
|
|
376
407
|
align?: "left" | "right" | "center";
|
|
408
|
+
/** `true` (default) is the uppercase, tracked label; `false` is normal case, as in ModelCompare. */
|
|
409
|
+
uppercase?: boolean;
|
|
377
410
|
} & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
378
411
|
/** Standard data cell (`<td>`). */
|
|
379
412
|
declare const TableCell: React$1.ForwardRefExoticComponent<React$1.TdHTMLAttributes<HTMLTableCellElement> & {
|
|
@@ -441,12 +474,26 @@ interface PaginationProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "onC
|
|
|
441
474
|
* @defaultValue 1
|
|
442
475
|
*/
|
|
443
476
|
siblingCount?: number;
|
|
444
|
-
/** Accessible label for the previous-page button. @defaultValue "Go to previous page" */
|
|
445
|
-
previousLabel?: string;
|
|
446
|
-
/** Accessible label for the next-page button. @defaultValue "Go to next page" */
|
|
447
|
-
nextLabel?: string;
|
|
448
477
|
/** Accessible name for the wrapping nav landmark. @defaultValue "Pagination" */
|
|
449
478
|
ariaLabel?: string;
|
|
479
|
+
/** @deprecated Use labels.previous. Retained for 0.2.17 compatibility. */
|
|
480
|
+
previousLabel?: string;
|
|
481
|
+
/** @deprecated Use labels.next. Retained for 0.2.17 compatibility. */
|
|
482
|
+
nextLabel?: string;
|
|
483
|
+
/** Every string the control announces. Matches `BlogPagination.labels`. */
|
|
484
|
+
labels?: {
|
|
485
|
+
/** Previous-page button. @defaultValue "Go to previous page" */
|
|
486
|
+
previous?: string;
|
|
487
|
+
/** Next-page button. @defaultValue "Go to next page" */
|
|
488
|
+
next?: string;
|
|
489
|
+
/**
|
|
490
|
+
* Names a numbered page button. The number alone is not a usable name
|
|
491
|
+
* — this used to be a hardcoded `Go to page N`, in English, with no way
|
|
492
|
+
* for the host to translate it.
|
|
493
|
+
* @defaultValue (n) => `Go to page ${n}`
|
|
494
|
+
*/
|
|
495
|
+
page?: (page: number) => string;
|
|
496
|
+
};
|
|
450
497
|
}
|
|
451
498
|
/**
|
|
452
499
|
* Controlled pagination control. Renders previous/next arrows plus numbered
|
|
@@ -458,12 +505,12 @@ declare const Pagination: React$1.ForwardRefExoticComponent<PaginationProps & Re
|
|
|
458
505
|
|
|
459
506
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
460
507
|
/**
|
|
461
|
-
* Visual style. Options: `primary`, `secondary`, `ghost`, `accent`, `outline`, `amber`, `red`/`destructive`.
|
|
508
|
+
* Visual style. Options: `primary`, `secondary`, `ghost`, `link`, `accent`, `outline`, `amber`, `red`/`destructive`.
|
|
462
509
|
* @defaultValue "default"
|
|
463
510
|
*/
|
|
464
|
-
variant?: /** @deprecated alias of `primary` */ "default" | "primary" | "secondary" | "ghost" | "accent" | /** Solid fill from the runtime-themeable brand token (data-brand). */ "brand" | "outline" | "amber" | /** @deprecated alias of `destructive` */ "red" | "destructive";
|
|
465
|
-
/** Size: `sm`, `md` (default), `lg`, or `icon` (square 40×40). */
|
|
466
|
-
size?: "sm" | "md" | "lg" | "icon";
|
|
511
|
+
variant?: /** @deprecated alias of `primary` */ "default" | "primary" | "secondary" | "ghost" | /** Text action: no fill, no padding, underline on hover. */ "link" | "accent" | /** Solid fill from the runtime-themeable brand token (data-brand). */ "brand" | "outline" | "amber" | /** @deprecated alias of `destructive` */ "red" | "destructive";
|
|
512
|
+
/** Size: `xs` (11px text, compact line box), `sm`, `md` (default), `lg`, or `icon` (square 40×40). */
|
|
513
|
+
size?: "xs" | "sm" | "md" | "lg" | "icon";
|
|
467
514
|
/** Show a spinner before the children and disable the button while busy. */
|
|
468
515
|
loading?: boolean;
|
|
469
516
|
/** Render the single child element with the button styling instead of a <button> (e.g. wrap a <Link>). */
|
|
@@ -568,7 +615,7 @@ interface SeparatorProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
568
615
|
/** A thin divider line. Horizontal by default; set `orientation="vertical"` inside a flex row. */
|
|
569
616
|
declare function Separator({ className, orientation, decorative, ...props }: SeparatorProps): React$1.JSX.Element;
|
|
570
617
|
interface AlertProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
571
|
-
variant?: "info" | "success" | "warning" | "error" | "accent";
|
|
618
|
+
variant?: "info" | "success" | "warning" | "error" | "accent" | "neutral";
|
|
572
619
|
/** Optional bold title above the body. */
|
|
573
620
|
title?: React$1.ReactNode;
|
|
574
621
|
/** Leading icon. Defaults to a variant-appropriate icon; pass `null` to hide. */
|
|
@@ -584,6 +631,17 @@ interface TagProps extends React$1.HTMLAttributes<HTMLSpanElement> {
|
|
|
584
631
|
}
|
|
585
632
|
/** A small label, optionally removable. Use `Badge` for non-interactive status text. */
|
|
586
633
|
declare function Tag({ className, children, onRemove, removeLabel, ...props }: TagProps): React$1.JSX.Element;
|
|
634
|
+
interface ChipProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
635
|
+
/** Pressed (selected) state of a filter chip. Rendered as `aria-pressed`. @defaultValue false */
|
|
636
|
+
pressed?: boolean;
|
|
637
|
+
/** Render the single child element with the chip styling instead of a <button> (e.g. wrap a trigger). */
|
|
638
|
+
asChild?: boolean;
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* Interactive pill for filters and toggles. Unlike `Badge` (a static status label) it is a
|
|
642
|
+
* button with a pressed state; it reuses Badge's `text-xs` size and colour tokens.
|
|
643
|
+
*/
|
|
644
|
+
declare const Chip: React$1.ForwardRefExoticComponent<ChipProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
587
645
|
interface StatusIndicatorProps extends React$1.HTMLAttributes<HTMLSpanElement> {
|
|
588
646
|
status?: "online" | "offline" | "busy" | "away" | "neutral";
|
|
589
647
|
/** Add a pulsing halo to signal "live". */
|
|
@@ -609,10 +667,13 @@ declare function InlineStatus({ status, label, progress, size, className }: Inli
|
|
|
609
667
|
/** Inline `<code>` styling for code spans in prose or chat. Use `Kbd` for keys. */
|
|
610
668
|
declare function InlineCode({ className, ...props }: React$1.HTMLAttributes<HTMLElement>): React$1.JSX.Element;
|
|
611
669
|
interface Step {
|
|
670
|
+
/** The milestone's label. */
|
|
612
671
|
title: React$1.ReactNode;
|
|
672
|
+
/** Optional second line under the title. */
|
|
613
673
|
description?: React$1.ReactNode;
|
|
614
674
|
}
|
|
615
675
|
interface StepsProps extends Omit<React$1.HTMLAttributes<HTMLOListElement>, "children"> {
|
|
676
|
+
/** The milestones, in order, from first to last. */
|
|
616
677
|
steps: Step[];
|
|
617
678
|
/** Zero-based index of the active step; earlier steps render as completed. */
|
|
618
679
|
current?: number;
|
|
@@ -637,7 +698,11 @@ declare const DialogClose: React$1.ForwardRefExoticComponent<DialogPrimitive.Dia
|
|
|
637
698
|
/** Dimmed, blurred backdrop behind the dialog content. */
|
|
638
699
|
declare const DialogOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
639
700
|
/** Centered, animated dialog panel (includes the overlay and a built-in close button). */
|
|
640
|
-
declare const DialogContent: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> &
|
|
701
|
+
declare const DialogContent: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
702
|
+
/** Accessible name for the built-in close button. The library ships no
|
|
703
|
+
* copy of its own; the English default only keeps it usable untranslated. */
|
|
704
|
+
closeLabel?: string;
|
|
705
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
641
706
|
/** Header layout block for the dialog title/description. */
|
|
642
707
|
declare function DialogHeader({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
643
708
|
/** Accessible dialog title (labels the dialog for screen readers). */
|
|
@@ -665,7 +730,10 @@ declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.Sel
|
|
|
665
730
|
/** Groups related SelectItems together. */
|
|
666
731
|
declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
667
732
|
/** Button that opens the select dropdown and shows the current value. */
|
|
668
|
-
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> &
|
|
733
|
+
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
734
|
+
/** `md` (default) is the 40 px trigger; `sm` is a 32 px compact trigger for dense toolbars. */
|
|
735
|
+
size?: "md" | "sm";
|
|
736
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
669
737
|
/** Portalled, animated dropdown panel holding the SelectItems. */
|
|
670
738
|
declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
671
739
|
/** A selectable option in the dropdown (shows a check when selected). */
|
|
@@ -679,16 +747,44 @@ declare const SelectScrollUpButton: React$1.ForwardRefExoticComponent<Omit<Selec
|
|
|
679
747
|
/** Auto-scroll affordance shown at the bottom of a long, scrollable list. */
|
|
680
748
|
declare const SelectScrollDownButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
681
749
|
/** Range slider with a track, filled range, and draggable thumb. */
|
|
682
|
-
declare const Slider: React$1.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> &
|
|
683
|
-
/**
|
|
750
|
+
declare const Slider: React$1.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
751
|
+
/**
|
|
752
|
+
* Accessible name for the thumb. Radix gives it `role="slider"`, and a
|
|
753
|
+
* slider with no name is announced as an unlabelled one — the value
|
|
754
|
+
* without any idea what it sets.
|
|
755
|
+
*/
|
|
756
|
+
label?: string;
|
|
757
|
+
} & React$1.RefAttributes<HTMLSpanElement>>;
|
|
758
|
+
/**
|
|
759
|
+
* Horizontal progress bar; `value` is the percent complete (0–100). Set
|
|
760
|
+
* `indeterminate` when the amount of work is unknown (waiting on a queue,
|
|
761
|
+
* loading a model): the bar slides, the root drops `aria-valuenow` and gains
|
|
762
|
+
* `aria-busy`. Under `prefers-reduced-motion` the slide stops and a static
|
|
763
|
+
* half-strength bar is shown instead.
|
|
764
|
+
*/
|
|
684
765
|
declare const Progress: React$1.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
685
|
-
/** Percent complete, 0–100. */
|
|
766
|
+
/** Percent complete, 0–100. Ignored while `indeterminate`. */
|
|
686
767
|
value?: number;
|
|
768
|
+
/** Unknown duration: animated sliding bar, no percentage announced. */
|
|
769
|
+
indeterminate?: boolean;
|
|
770
|
+
/**
|
|
771
|
+
* Accessible name, e.g. "Upload progress". Radix gives the root
|
|
772
|
+
* `role="progressbar"`, and a progressbar with no name is announced as
|
|
773
|
+
* an unlabelled one — the percentage without any idea what it measures.
|
|
774
|
+
*/
|
|
775
|
+
label?: string;
|
|
687
776
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
688
777
|
/** Radix Tabs root — manages the active tab. Compose with TabsList/TabsTrigger/TabsContent. */
|
|
689
778
|
declare const Tabs: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
690
779
|
/** Horizontal container holding the TabsTriggers. */
|
|
691
|
-
declare const TabsList: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>, "ref"> &
|
|
780
|
+
declare const TabsList: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
781
|
+
/**
|
|
782
|
+
* Draw a raised indicator behind the active trigger that slides to the next one (0.15 s
|
|
783
|
+
* ease-out, none on first paint, instant under reduced motion). The active trigger then
|
|
784
|
+
* needs no fill of its own. Reads `--tray-selected` / `--tray-selected-ring` when defined.
|
|
785
|
+
*/
|
|
786
|
+
indicator?: boolean;
|
|
787
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
692
788
|
/** Clickable tab that activates its matching TabsContent. */
|
|
693
789
|
declare const TabsTrigger: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
694
790
|
/** Panel shown when its matching TabsTrigger is active. */
|
|
@@ -713,7 +809,7 @@ declare const Tooltip: React$1.FC<TooltipPrimitive.TooltipProps>;
|
|
|
713
809
|
declare const TooltipTrigger: React$1.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
714
810
|
/** The floating tooltip bubble. */
|
|
715
811
|
declare const TooltipContent: React$1.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
716
|
-
/**
|
|
812
|
+
/** Calm shimmering placeholder block (one low-contrast sweep, linear 1.6 s) for loading states; size it via `className`. */
|
|
717
813
|
declare function Skeleton({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
718
814
|
interface SpinnerProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
719
815
|
/** Size: `sm` (16px), `md` (24px, default), or `lg` (32px). */
|
|
@@ -732,17 +828,23 @@ declare function PageLoader({ title, subtitle, className, ...props }: PageLoader
|
|
|
732
828
|
interface EmptyStateProps {
|
|
733
829
|
/** Icon/illustration shown above the title. */
|
|
734
830
|
icon?: React$1.ReactNode;
|
|
735
|
-
/** Heading text. */
|
|
831
|
+
/** Heading text. In the `inline` size this is the message itself. */
|
|
736
832
|
title: string;
|
|
737
833
|
/** Supporting text below the title. */
|
|
738
834
|
description?: string;
|
|
739
835
|
/** Action slot (e.g. a primary button) below the text. */
|
|
740
836
|
action?: React$1.ReactNode;
|
|
837
|
+
/**
|
|
838
|
+
* `default` is the full-screen placeholder. `inline` is the compact variant for a card or
|
|
839
|
+
* pane that has nothing in it (after YunDesign's `YunEmptyState`): a 26px light glyph over a
|
|
840
|
+
* 13px tertiary message, centred, at most 260px wide. A card holding one line of grey text
|
|
841
|
+
* reads as a bug; a glyph above the sentence makes the emptiness look deliberate.
|
|
842
|
+
*/
|
|
843
|
+
size?: "default" | "inline";
|
|
844
|
+
className?: string;
|
|
741
845
|
}
|
|
742
846
|
/** Centered "nothing here" placeholder with an icon, title, description, and action. */
|
|
743
|
-
declare function EmptyState({ icon, title, description, action }: EmptyStateProps): React$1.JSX.Element;
|
|
744
|
-
declare const MotionDiv: framer_motion.ForwardRefComponent<HTMLDivElement, framer_motion.HTMLMotionProps<"div">>;
|
|
745
|
-
declare const MotionSpan: framer_motion.ForwardRefComponent<HTMLSpanElement, framer_motion.HTMLMotionProps<"span">>;
|
|
847
|
+
declare function EmptyState({ icon, title, description, action, size, className }: EmptyStateProps): React$1.JSX.Element;
|
|
746
848
|
declare const fadeIn: {
|
|
747
849
|
initial: {
|
|
748
850
|
opacity: number;
|
|
@@ -782,11 +884,28 @@ interface IconButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement
|
|
|
782
884
|
icon: React$1.ReactNode;
|
|
783
885
|
/** Accessible label, also shown as the hover tooltip. */
|
|
784
886
|
label: string;
|
|
887
|
+
/**
|
|
888
|
+
* `md` (default) is the padded 8 px button. `sm` is a 32 px box, for dense toolbars and
|
|
889
|
+
* docs navigation. `xs` is an 11 px glyph box with a 24 px hit area (`hit-area`), for inline close buttons.
|
|
890
|
+
* @defaultValue "md"
|
|
891
|
+
*/
|
|
892
|
+
size?: "xs" | "sm" | "md";
|
|
893
|
+
/** Show the hover/focus tooltip with `label`. Pass `false` when the label is enough. @defaultValue true */
|
|
894
|
+
tooltip?: boolean;
|
|
785
895
|
}
|
|
786
896
|
/** Icon-only button with a built-in tooltip (uses `label` for both a11y and the tooltip text). */
|
|
787
897
|
declare const IconButton: React$1.ForwardRefExoticComponent<IconButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
898
|
+
interface LabelProps extends React$1.LabelHTMLAttributes<HTMLLabelElement> {
|
|
899
|
+
/**
|
|
900
|
+
* `xs` (default) is the compact 11px label; `sm` is 12px, for denser forms
|
|
901
|
+
* where the label sits directly above a full-height input and 11px reads as
|
|
902
|
+
* an afterthought.
|
|
903
|
+
* @defaultValue "xs"
|
|
904
|
+
*/
|
|
905
|
+
size?: "xs" | "sm";
|
|
906
|
+
}
|
|
788
907
|
/** Uppercase, muted form-field label. */
|
|
789
|
-
declare function Label({ className, ...props }:
|
|
908
|
+
declare function Label({ className, size, ...props }: LabelProps): React$1.JSX.Element;
|
|
790
909
|
/** Radix DropdownMenu root — a contextual actions menu. Compose with DropdownMenu* parts. */
|
|
791
910
|
declare const DropdownMenu: React$1.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
792
911
|
/** Element that opens the dropdown menu. */
|
|
@@ -898,10 +1017,22 @@ interface SegmentedSelectProps<T = string> {
|
|
|
898
1017
|
className?: string;
|
|
899
1018
|
/** Disable interaction and dim the control. */
|
|
900
1019
|
disabled?: boolean;
|
|
1020
|
+
/**
|
|
1021
|
+
* Break the row into balanced lines instead of letting the last one run short (six options that
|
|
1022
|
+
* fit five per line go three and three, never five and one). Never uses more lines than the
|
|
1023
|
+
* default wrap. After YunDesign's `YunWrap(balanced:)`.
|
|
1024
|
+
*/
|
|
1025
|
+
wrap?: boolean;
|
|
1026
|
+
/**
|
|
1027
|
+
* Give every option on a line an equal share of the width so both edges are flush and a wrapped
|
|
1028
|
+
* control reads as a grid drawn on purpose. Implies `wrap`. After YunDesign's `YunWrap(fills:)`.
|
|
1029
|
+
*/
|
|
1030
|
+
fill?: boolean;
|
|
901
1031
|
}
|
|
902
1032
|
/** Inline segmented control — a row of buttons where one option is active at a time.
|
|
903
|
-
* For 2-5 always-visible choices (not a dropdown); see `Select`'s doc for "which select do I use".
|
|
904
|
-
|
|
1033
|
+
* For 2-5 always-visible choices (not a dropdown); see `Select`'s doc for "which select do I use".
|
|
1034
|
+
* `wrap` balances line breaks and `fill` makes each line flush on both edges; both are opt-in. */
|
|
1035
|
+
declare function SegmentedSelect<T = string>({ options, value, onChange, className, disabled, wrap, fill, }: SegmentedSelectProps<T>): React$1.JSX.Element;
|
|
905
1036
|
|
|
906
1037
|
interface NavTab {
|
|
907
1038
|
/** Unique key; matched against `activeKey` to mark the active tab. */
|
|
@@ -934,6 +1065,61 @@ interface NavTabsProps {
|
|
|
934
1065
|
*/
|
|
935
1066
|
declare function NavTabs({ tabs, activeKey, onChange, className, ariaLabel }: NavTabsProps): React$1.JSX.Element;
|
|
936
1067
|
|
|
1068
|
+
interface NavItemProps {
|
|
1069
|
+
/** The row's text. */
|
|
1070
|
+
label: ReactNode;
|
|
1071
|
+
/** Optional leading icon. */
|
|
1072
|
+
icon?: ReactNode;
|
|
1073
|
+
/** When set, the item renders as a route Link instead of a button. */
|
|
1074
|
+
href?: string;
|
|
1075
|
+
/** Button-mode click handler. Ignored when `href` is set. */
|
|
1076
|
+
onClick?: () => void;
|
|
1077
|
+
/** Marks the current item (`.nav-item.active`; `aria-current="page"` in link mode). */
|
|
1078
|
+
active?: boolean;
|
|
1079
|
+
/**
|
|
1080
|
+
* For a disclosure row (a folder). Sets `aria-expanded` on the control.
|
|
1081
|
+
* Omit it for a plain navigation row.
|
|
1082
|
+
*/
|
|
1083
|
+
expanded?: boolean;
|
|
1084
|
+
/** Trailing slot, e.g. a chevron that turns with `expanded`. Pushed to the right edge. */
|
|
1085
|
+
chevron?: ReactNode;
|
|
1086
|
+
/**
|
|
1087
|
+
* Nesting level of a row in a tree (0 = top level, the default). Each level adds one
|
|
1088
|
+
* `--nav-indent` step of left padding through the `.nav-item` token.
|
|
1089
|
+
*/
|
|
1090
|
+
depth?: number;
|
|
1091
|
+
className?: string;
|
|
1092
|
+
}
|
|
1093
|
+
/**
|
|
1094
|
+
* A sidebar navigation row built on the `.nav-item` class. It is a button (in-page action or
|
|
1095
|
+
* disclosure toggle, with `expanded`) or a Link (when `href` is set), with the same hover, focus
|
|
1096
|
+
* and active indicator as the sidebar. `NavTabs` is the horizontal counterpart.
|
|
1097
|
+
*/
|
|
1098
|
+
declare function NavItem({ label, icon, href, onClick, active, expanded, chevron, depth, className }: NavItemProps): React$1.JSX.Element;
|
|
1099
|
+
|
|
1100
|
+
interface ListItemProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
1101
|
+
/** Render the single child element with the row styling instead of a <button> (e.g. a routing link). */
|
|
1102
|
+
asChild?: boolean;
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* A full-width, left-aligned selectable row on the `.dropdown-item` style, for result lists
|
|
1106
|
+
* (search hits, pick lists). Put it inside an `<li>` in a `divide-y` list.
|
|
1107
|
+
*/
|
|
1108
|
+
declare const ListItem: React$1.ForwardRefExoticComponent<ListItemProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1109
|
+
|
|
1110
|
+
interface EmptyValueProps extends Omit<HTMLAttributes<HTMLSpanElement>, "title"> {
|
|
1111
|
+
/** The short reason shown in place of the number ("No cold prefill yet"). Never a bare dash. */
|
|
1112
|
+
label: ReactNode;
|
|
1113
|
+
/** Longer explanation, available as the tooltip and to assistive tech. Defaults to `label` when it is a string. */
|
|
1114
|
+
why?: string;
|
|
1115
|
+
}
|
|
1116
|
+
/**
|
|
1117
|
+
* A value that has nothing to show yet, and says why. Use it in a stat, table cell or readout instead of "-":
|
|
1118
|
+
* `label` is the reason in a few words, `why` the full sentence (tooltip + accessible description). Muted,
|
|
1119
|
+
* normal weight, so it never reads as data.
|
|
1120
|
+
*/
|
|
1121
|
+
declare function EmptyValue({ label, why, className, ...rest }: EmptyValueProps): React$1.JSX.Element;
|
|
1122
|
+
|
|
937
1123
|
/** CTA button with an animated shimmer sweep and a trailing arrow; renders a Link when `href` is set. */
|
|
938
1124
|
declare function ShinyButton({ children, className, href, onClick, }: {
|
|
939
1125
|
children: ReactNode;
|
|
@@ -1034,6 +1220,12 @@ interface SwitchProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onC
|
|
|
1034
1220
|
/** Checked-state color: `default`, `success`, `warning`, or `danger`. */
|
|
1035
1221
|
variant?: "default" | "success" | "warning" | "danger";
|
|
1036
1222
|
className?: string;
|
|
1223
|
+
/**
|
|
1224
|
+
* Accessible name. A `role="switch"` with no name is announced as an
|
|
1225
|
+
* unlabelled control, and this one has no text of its own — so either pass
|
|
1226
|
+
* this or pair the switch with a `<Label htmlFor>` via `id`.
|
|
1227
|
+
*/
|
|
1228
|
+
label?: string;
|
|
1037
1229
|
/** Element id (e.g. to pair with a `<label htmlFor>`). */
|
|
1038
1230
|
id?: string;
|
|
1039
1231
|
}
|
|
@@ -1045,40 +1237,155 @@ interface AnimatedNumberProps {
|
|
|
1045
1237
|
suffix?: string;
|
|
1046
1238
|
/** Decimal places; trailing zeros are stripped (100.00 → 100). */
|
|
1047
1239
|
decimals?: number;
|
|
1240
|
+
/**
|
|
1241
|
+
* Skip the animation and print `value` immediately.
|
|
1242
|
+
*
|
|
1243
|
+
* Left undefined, this turns itself on in the two cases where a spring is
|
|
1244
|
+
* wrong rather than merely unwanted: when the reader has asked for reduced
|
|
1245
|
+
* motion, and under a test runner. In jsdom nothing drives the animation
|
|
1246
|
+
* frame, so a spring never leaves 0 — a component that counted up would
|
|
1247
|
+
* assert as `"0"` forever, which is why Yunxin's copy of this carried its own
|
|
1248
|
+
* `NODE_ENV === "test"` escape hatch. Pass an explicit boolean to override.
|
|
1249
|
+
*/
|
|
1250
|
+
immediate?: boolean;
|
|
1251
|
+
/**
|
|
1252
|
+
* Minimum time, in ms, between two value changes for the spring to run on the
|
|
1253
|
+
* second one. A value that updates faster than this (a polled metric) jumps
|
|
1254
|
+
* straight to its new value instead of springing, so digits never keep
|
|
1255
|
+
* moving. The first run on mount always springs. Default 5000; pass 0 to
|
|
1256
|
+
* always spring.
|
|
1257
|
+
*/
|
|
1258
|
+
settleMs?: number;
|
|
1048
1259
|
}
|
|
1049
1260
|
/**
|
|
1050
|
-
* A number that springs from 0 up to `value` on mount
|
|
1261
|
+
* A number that springs from 0 up to `value` on mount. Later changes spring only when
|
|
1262
|
+
* they are at least `settleMs` apart; faster (polled) updates jump, so the digits are never
|
|
1263
|
+
* mid-flight. Tabular figures keep the width constant while it runs.
|
|
1051
1264
|
* Starts at 0 on both server and client, so it is SSR-hydration safe.
|
|
1052
1265
|
*/
|
|
1053
|
-
declare function AnimatedNumber({ value, suffix, decimals }: AnimatedNumberProps): React$1.JSX.Element;
|
|
1266
|
+
declare function AnimatedNumber({ value, suffix, decimals, immediate, settleMs, }: AnimatedNumberProps): React$1.JSX.Element;
|
|
1054
1267
|
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1268
|
+
interface MotionNumberProps {
|
|
1269
|
+
/** A number, or an already formatted string (digits roll, other characters stay put). */
|
|
1270
|
+
value: number | string;
|
|
1271
|
+
/** Decimal places (fixed). Default 0. */
|
|
1272
|
+
decimals?: number;
|
|
1273
|
+
prefix?: string;
|
|
1274
|
+
suffix?: string;
|
|
1275
|
+
/** Custom formatter; wins over `decimals`. Digits in its output roll, other characters pop in. */
|
|
1276
|
+
format?: (value: number) => string;
|
|
1277
|
+
/** Group thousands with the locale separator. Default false. */
|
|
1278
|
+
grouping?: boolean;
|
|
1279
|
+
locale?: string;
|
|
1280
|
+
className?: string;
|
|
1281
|
+
}
|
|
1282
|
+
/**
|
|
1283
|
+
* A number whose changing digits roll vertically (with a short blur), in tabular figures; the box
|
|
1284
|
+
* width animates when the digit count changes. The first paint is static (no entrance), and under
|
|
1285
|
+
* reduced motion a change is an instant swap. Use it for metrics that change discretely (counters,
|
|
1286
|
+
* totals). Readings that tick continuously at 1-4 Hz should glide with a tween instead.
|
|
1287
|
+
* The only text in the DOM is the formatted string (visually hidden); the digit strips and the other
|
|
1288
|
+
* characters are drawn with CSS content, so `textContent` and screen readers see the value once.
|
|
1289
|
+
*/
|
|
1290
|
+
declare function MotionNumber({ value, decimals, prefix, suffix, format, grouping, locale, className }: MotionNumberProps): React$1.JSX.Element;
|
|
1291
|
+
|
|
1292
|
+
type ViewTransitionKind = "page" | "theme";
|
|
1293
|
+
/**
|
|
1294
|
+
* Run a synchronous DOM-changing `update` (typically a React state change) inside
|
|
1295
|
+
* `document.startViewTransition` where it exists, so the old and new states cross-fade
|
|
1296
|
+
* (`page`: outgoing 120 ms, incoming does the soft entrance; `theme`: plain cross-fade with every
|
|
1297
|
+
* element transition switched off for the duration, so nothing flashes). Without the API, or
|
|
1298
|
+
* under `prefers-reduced-motion`, `update` simply runs. `flushSync` makes React commit inside the
|
|
1299
|
+
* snapshot callback. Resolves when the transition has finished.
|
|
1300
|
+
*/
|
|
1301
|
+
declare function runViewTransition(update: () => void, kind?: ViewTransitionKind): Promise<void>;
|
|
1302
|
+
/** `const { start } = useViewTransition(); start(() => setTheme("dark"), "theme")`. */
|
|
1303
|
+
declare function useViewTransition(): {
|
|
1304
|
+
start: (update: () => void, kind?: ViewTransitionKind) => Promise<void>;
|
|
1305
|
+
};
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* One element that slides between the items of a group (nav, tabs, segmented control)
|
|
1309
|
+
* instead of each item toggling its own background.
|
|
1310
|
+
*
|
|
1311
|
+
* Render `<span ref={pillRef} className="yunui-slider-pill" aria-hidden />` as the first child of the
|
|
1312
|
+
* `position: relative` container that `containerRef` points at. The hook finds the active item with
|
|
1313
|
+
* `selector`, writes its box into CSS variables (`--pill-x/y/w/h`, `--pill-o`) and the stylesheet
|
|
1314
|
+
* animates transform + size with the motion tokens. The first placement and any container resize
|
|
1315
|
+
* are instant (`data-ready="false"`), so nothing slides in from 0,0 on mount.
|
|
1316
|
+
* Only transform / size / opacity change; no React state, so no re-render per move.
|
|
1317
|
+
*/
|
|
1318
|
+
declare function useSlidingPill<C extends HTMLElement = HTMLElement, P extends HTMLElement = HTMLElement>(selector: string, deps: readonly unknown[]): {
|
|
1319
|
+
containerRef: RefObject<C | null>;
|
|
1320
|
+
pillRef: RefObject<P | null>;
|
|
1321
|
+
};
|
|
1322
|
+
|
|
1323
|
+
type MetricHeroState = "live" | "held" | "idle";
|
|
1324
|
+
interface MetricHeroProps {
|
|
1325
|
+
/** The headline value. `null`/`undefined` renders an em dash. */
|
|
1326
|
+
value?: number | null;
|
|
1327
|
+
/** Unit shown beside the number, e.g. "tok/s". */
|
|
1328
|
+
unit?: ReactNode;
|
|
1329
|
+
/** Caption above the number, e.g. "Decode speed". Also the accessible name. */
|
|
1330
|
+
label: string;
|
|
1331
|
+
/**
|
|
1332
|
+
* `live` — the value is updating now (green pulse dot, pulse stops under
|
|
1333
|
+
* reduced motion); `held` — the last value kept after the source stopped;
|
|
1334
|
+
* `idle` — no state indicator (default).
|
|
1335
|
+
*/
|
|
1336
|
+
state?: MetricHeroState;
|
|
1337
|
+
/** Decimal places (trailing zeros stripped, as AnimatedNumber). */
|
|
1338
|
+
decimals?: number;
|
|
1339
|
+
/** Rolling window drawn as a Sparkline to the right. Fewer than 2 points hides it. */
|
|
1340
|
+
history?: number[];
|
|
1341
|
+
/** Sparkline axis bounds; default to the data range. */
|
|
1072
1342
|
min?: number;
|
|
1073
|
-
/** Upper bound of the value axis. Defaults to the data maximum. */
|
|
1074
1343
|
max?: number;
|
|
1344
|
+
/**
|
|
1345
|
+
* Spring the number toward each new value. Off by default: a value that
|
|
1346
|
+
* changes many times a second should show the true reading, not trail it.
|
|
1347
|
+
* Reduced-motion users never get the spring either way.
|
|
1348
|
+
*/
|
|
1349
|
+
animate?: boolean;
|
|
1350
|
+
/** State chip text. English defaults: "Live" / "Held". */
|
|
1351
|
+
labels?: {
|
|
1352
|
+
live?: string;
|
|
1353
|
+
held?: string;
|
|
1354
|
+
};
|
|
1075
1355
|
className?: string;
|
|
1076
1356
|
}
|
|
1077
1357
|
/**
|
|
1078
|
-
* A
|
|
1079
|
-
*
|
|
1358
|
+
* A big tabular number with unit, live/held state and optional sparkline. The
|
|
1359
|
+
* number is announced once as "label: value unit" (state included) via a hidden
|
|
1360
|
+
* summary; the animated digits themselves are hidden from assistive tech so a
|
|
1361
|
+
* fast-updating value never floods a screen reader.
|
|
1080
1362
|
*/
|
|
1081
|
-
declare function
|
|
1363
|
+
declare function MetricHero({ value, unit, label, state, decimals, history, min, max, animate, labels, className, }: MetricHeroProps): React$1.JSX.Element;
|
|
1364
|
+
|
|
1365
|
+
type StackedProgressTone = "accent" | "info" | "success" | "warning" | "error" | "neutral";
|
|
1366
|
+
interface StackedProgressSegment {
|
|
1367
|
+
/** Size in the same unit as `total` (tokens, bytes). Negative or non-finite counts as 0. */
|
|
1368
|
+
value: number;
|
|
1369
|
+
tone: StackedProgressTone;
|
|
1370
|
+
/** What this segment is ("Cache hit"); shown in the tooltip. */
|
|
1371
|
+
label?: string;
|
|
1372
|
+
}
|
|
1373
|
+
interface StackedProgressProps {
|
|
1374
|
+
segments: readonly StackedProgressSegment[];
|
|
1375
|
+
/** The whole: the bar is full when the segments add up to it. */
|
|
1376
|
+
total: number;
|
|
1377
|
+
/** Accessible name. */
|
|
1378
|
+
label: string;
|
|
1379
|
+
/** Human reading for assistive tech and the tooltip ("12,000 of 48,000 tokens"). */
|
|
1380
|
+
valueText?: string;
|
|
1381
|
+
height?: number;
|
|
1382
|
+
className?: string;
|
|
1383
|
+
}
|
|
1384
|
+
/** Each segment's width as a fraction of the total; their sum never passes 1. */
|
|
1385
|
+
declare function stackedFractions(segments: readonly {
|
|
1386
|
+
value: number;
|
|
1387
|
+
}[], total: number): number[];
|
|
1388
|
+
declare function StackedProgress({ segments, total, label, valueText, height, className }: StackedProgressProps): React$1.JSX.Element;
|
|
1082
1389
|
|
|
1083
1390
|
type GaugeTone = "accent" | "success" | "warning" | "error" | "info" | "neutral";
|
|
1084
1391
|
interface GaugeProps {
|
|
@@ -1094,6 +1401,11 @@ interface GaugeProps {
|
|
|
1094
1401
|
color?: string;
|
|
1095
1402
|
/** Center content. Defaults to the rounded percentage; pass `null` to hide. */
|
|
1096
1403
|
label?: ReactNode;
|
|
1404
|
+
/**
|
|
1405
|
+
* Accessible name, when `label` is a node rather than a string. Radix aside,
|
|
1406
|
+
* a `role="progressbar"` with no name announces a bare percentage.
|
|
1407
|
+
*/
|
|
1408
|
+
ariaLabel?: string;
|
|
1097
1409
|
/** Start the arc from the top and sweep clockwise (default) or counter-clockwise. */
|
|
1098
1410
|
counterClockwise?: boolean;
|
|
1099
1411
|
className?: string;
|
|
@@ -1102,37 +1414,91 @@ interface GaugeProps {
|
|
|
1102
1414
|
* A circular percentage gauge. Feed it a `value` (0–100) and it fills the ring
|
|
1103
1415
|
* proportionally; the center renders the value unless you pass a custom `label`.
|
|
1104
1416
|
*/
|
|
1105
|
-
declare function Gauge({ value, size, thickness, tone, color, label, counterClockwise, className, }: GaugeProps): React$1.JSX.Element;
|
|
1417
|
+
declare function Gauge({ value, size, thickness, tone, color, label, ariaLabel, counterClockwise, className, }: GaugeProps): React$1.JSX.Element;
|
|
1106
1418
|
|
|
1107
|
-
type
|
|
1108
|
-
|
|
1109
|
-
|
|
1419
|
+
type SegmentMeterTone = "accent" | "info" | "success" | "warning" | "error" | "neutral";
|
|
1420
|
+
/**
|
|
1421
|
+
* How a `0..1` value maps to a position on the bar.
|
|
1422
|
+
*
|
|
1423
|
+
* - `linear` - position equals value. Right for memory, queue depth, fill ratios.
|
|
1424
|
+
* - `log` - a straight decibel scale from -60 dB to 0 dB. Overcorrects: a healthy -11 dB
|
|
1425
|
+
* signal lands at 82% and looks like it is about to clip.
|
|
1426
|
+
* - `broadcast` - the value is an amplitude; the top 20 dB take half the bar and the 40 dB
|
|
1427
|
+
* below take the other half, as in YunDesign's level meter.
|
|
1428
|
+
*/
|
|
1429
|
+
type SegmentMeterCurve = "linear" | "log" | "broadcast";
|
|
1430
|
+
/** Maps an amplitude-like value in `0..1` to a bar position in `0..1` along the chosen curve. */
|
|
1431
|
+
declare function meterPosition(value: number, curve?: SegmentMeterCurve): number;
|
|
1432
|
+
type SegmentBand = "tone" | "warning" | "danger";
|
|
1433
|
+
/**
|
|
1434
|
+
* The band a segment belongs to. A segment is in a headroom band when its upper edge is past the
|
|
1435
|
+
* threshold, so the defaults (0.9, 0.96) on 24 segments give segments 21 and 22 warning and 23 danger,
|
|
1436
|
+
* the same split as YunDesign. Pass `warnAt`/`dangerAt` as `null` to turn a band off.
|
|
1437
|
+
*/
|
|
1438
|
+
declare function segmentBand(index: number, segments: number, warnAt: number | null, dangerAt: number | null): SegmentBand;
|
|
1439
|
+
interface SegmentMeterProps {
|
|
1440
|
+
/** Current value, `0..1` (clamped). Mapped through `curve`. */
|
|
1110
1441
|
value: number;
|
|
1111
|
-
/**
|
|
1112
|
-
|
|
1113
|
-
/**
|
|
1114
|
-
|
|
1115
|
-
/**
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
/**
|
|
1120
|
-
|
|
1121
|
-
/**
|
|
1122
|
-
|
|
1123
|
-
/**
|
|
1124
|
-
|
|
1125
|
-
/**
|
|
1126
|
-
|
|
1127
|
-
/**
|
|
1128
|
-
|
|
1442
|
+
/** Peak-hold value, `0..1`. Drawn as the lit color at 45% opacity on the segment it reaches, when that segment is not lit. */
|
|
1443
|
+
hold?: number;
|
|
1444
|
+
/** Number of segments. Default 24. */
|
|
1445
|
+
segments?: number;
|
|
1446
|
+
/** Value to position mapping. Default `linear`; `broadcast` is for audio amplitude only. */
|
|
1447
|
+
curve?: SegmentMeterCurve;
|
|
1448
|
+
/** Bar position above which segments use the warning hue. Default 0.9; `null` disables. */
|
|
1449
|
+
warnAt?: number | null;
|
|
1450
|
+
/** Bar position above which segments use the danger hue. Default 0.96; `null` disables. */
|
|
1451
|
+
dangerAt?: number | null;
|
|
1452
|
+
/** Lit color of the normal band. Default `accent`. */
|
|
1453
|
+
tone?: SegmentMeterTone;
|
|
1454
|
+
/** Accessible name of the meter. */
|
|
1455
|
+
label: string;
|
|
1456
|
+
/** Human-readable reading for assistive tech ("18.2 / 64 GB"). Default: a percentage. */
|
|
1457
|
+
valueText?: string;
|
|
1458
|
+
/** Color of unlit segments. Default `--bg-elevated`; pass a stronger one when the meter sits on an elevated surface. */
|
|
1459
|
+
trackColor?: string;
|
|
1129
1460
|
className?: string;
|
|
1130
1461
|
}
|
|
1131
1462
|
/**
|
|
1132
|
-
*
|
|
1133
|
-
*
|
|
1463
|
+
* Segmented level meter with a warning/danger headroom band and an optional peak-hold marker.
|
|
1464
|
+
* Unlit segments use `--bg-elevated`; lit segments use the tone, the top segments `--warning` and `--error`.
|
|
1134
1465
|
*/
|
|
1135
|
-
declare function
|
|
1466
|
+
declare function SegmentMeter({ value, hold, segments, curve, warnAt, dangerAt, tone, label, valueText, trackColor, className, }: SegmentMeterProps): React$1.JSX.Element;
|
|
1467
|
+
|
|
1468
|
+
/** Default fade depth in CSS pixels. Shallow enough never to cover a whole row (rows are 28px and up). */
|
|
1469
|
+
declare const SCROLL_FADE_DEPTH = 22;
|
|
1470
|
+
/** True while the scroller can still scroll down. `tolerance` absorbs sub-pixel rounding. */
|
|
1471
|
+
declare function hasMoreBelow(metrics: {
|
|
1472
|
+
scrollTop: number;
|
|
1473
|
+
clientHeight: number;
|
|
1474
|
+
scrollHeight: number;
|
|
1475
|
+
}, tolerance?: number): boolean;
|
|
1476
|
+
interface ScrollFadeProps extends HTMLAttributes<HTMLDivElement> {
|
|
1477
|
+
/** Fade depth in pixels. Default 22; keep it a constant, not a percentage. */
|
|
1478
|
+
depth?: number;
|
|
1479
|
+
}
|
|
1480
|
+
/**
|
|
1481
|
+
* A vertically scrolling region that fades its bottom edge only while more content is below.
|
|
1482
|
+
* Give it a bounded height (`max-h-*` or a flex/grid parent); scrollbars are untouched.
|
|
1483
|
+
*/
|
|
1484
|
+
declare const ScrollFade: React$1.ForwardRefExoticComponent<ScrollFadeProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1485
|
+
|
|
1486
|
+
/**
|
|
1487
|
+
* Where lines break in a wrapping row, as a pure function of the item widths.
|
|
1488
|
+
* After YunDesign's `YunWrap.breaks` (YunAudio).
|
|
1489
|
+
*
|
|
1490
|
+
* Greedy packing is right for a row of pills that happens to be long. It is wrong for a tab bar:
|
|
1491
|
+
* six tabs across a column that fits five leave one alone on a second line, which reads as a
|
|
1492
|
+
* mistake. Balanced, the same six go three and three and it reads as deliberate. Balancing never
|
|
1493
|
+
* uses more lines than greedy packing would: the point is the shape of the wrap, not more wrapping.
|
|
1494
|
+
*
|
|
1495
|
+
* @param widths natural width of each item
|
|
1496
|
+
* @param maxWidth space available to one line
|
|
1497
|
+
* @param spacing distance between neighbouring items
|
|
1498
|
+
* @param balanced spread the items evenly over as many lines as greedy packing used
|
|
1499
|
+
* @returns the item indices assigned to each line
|
|
1500
|
+
*/
|
|
1501
|
+
declare function balancedBreaks(widths: readonly number[], maxWidth: number, spacing: number, balanced: boolean): number[][];
|
|
1136
1502
|
|
|
1137
1503
|
interface FileDropzoneProps {
|
|
1138
1504
|
/** Called with the selected/dropped files (already filtered to a File[]). */
|
|
@@ -1198,12 +1564,150 @@ interface AreaChartProps {
|
|
|
1198
1564
|
*/
|
|
1199
1565
|
declare function AreaChart({ data, tone, color, height, formatValue, showGrid, showTooltip, showXAxis, strokeWidth, ariaLabel, noDataLabel, className, }: AreaChartProps): React$1.JSX.Element;
|
|
1200
1566
|
|
|
1567
|
+
type TimeSeriesTone = "accent" | "info" | "success" | "warning" | "error" | "neutral";
|
|
1568
|
+
interface TimeSeriesPoint {
|
|
1569
|
+
/** Numeric domain value (for example a timestamp in epoch milliseconds). */
|
|
1570
|
+
x: number;
|
|
1571
|
+
/** Missing, null, undefined, NaN and infinities are gaps, never zeroes. */
|
|
1572
|
+
values: Readonly<Record<string, number | null | undefined>>;
|
|
1573
|
+
}
|
|
1574
|
+
interface TimeSeriesDefinition {
|
|
1575
|
+
/** Stable key that selects the corresponding value in each point. */
|
|
1576
|
+
key: string;
|
|
1577
|
+
label: string;
|
|
1578
|
+
tone?: TimeSeriesTone;
|
|
1579
|
+
/** Explicit CSS color override for this series. */
|
|
1580
|
+
color?: string;
|
|
1581
|
+
dashed?: boolean;
|
|
1582
|
+
}
|
|
1583
|
+
interface TimeSeriesChartProps {
|
|
1584
|
+
data: readonly TimeSeriesPoint[];
|
|
1585
|
+
series: readonly TimeSeriesDefinition[];
|
|
1586
|
+
ariaLabel: string;
|
|
1587
|
+
emptyLabel?: string;
|
|
1588
|
+
unavailableLabel?: string;
|
|
1589
|
+
hiddenLabel?: string;
|
|
1590
|
+
missingValueLabel?: string;
|
|
1591
|
+
legendLabel?: string;
|
|
1592
|
+
keyboardHint?: string;
|
|
1593
|
+
height?: number;
|
|
1594
|
+
formatX?: (value: number) => string;
|
|
1595
|
+
formatY?: (value: number) => string;
|
|
1596
|
+
/** Break a line when adjacent sorted x values differ by more than this value. */
|
|
1597
|
+
maxGap?: number;
|
|
1598
|
+
/** Controlled selection; without `onActiveXChange`, a supplied value is read-only. */
|
|
1599
|
+
activeX?: number | null;
|
|
1600
|
+
/** Render the always-on value row under the plot (default true). Hosts that read values from the tooltip and legend turn it off. */
|
|
1601
|
+
showReadout?: boolean;
|
|
1602
|
+
onActiveXChange?: (value: number | null) => void;
|
|
1603
|
+
showLegend?: boolean;
|
|
1604
|
+
/**
|
|
1605
|
+
* Opt-in idle treatment (YunDesign's idle spectrum): the plot is drawn at 35% opacity with two
|
|
1606
|
+
* faint hairline rules at one third and two thirds of its height, so the quiet chart still reads
|
|
1607
|
+
* as headroom rather than as a broken or empty one. Axes, legend and keyboard behavior are unchanged.
|
|
1608
|
+
*/
|
|
1609
|
+
idle?: boolean;
|
|
1610
|
+
/**
|
|
1611
|
+
* Value-axis floor. "zero" (default) starts non-negative series at 0 so noise between 19.7 and 19.8
|
|
1612
|
+
* renders as a flat line instead of a canyon; "auto" zooms to the data range.
|
|
1613
|
+
*/
|
|
1614
|
+
baseline?: "zero" | "auto";
|
|
1615
|
+
/**
|
|
1616
|
+
* Fixed x domain `[min, max]`. By default the x axis spans the first to the newest sample, so every new
|
|
1617
|
+
* sample re-scales everything. A host that animates time itself (a live chart that slides with the clock)
|
|
1618
|
+
* passes the window instead, and points sit at positions that depend on their own time only.
|
|
1619
|
+
*/
|
|
1620
|
+
xDomain?: readonly [number, number];
|
|
1621
|
+
/** Explicit x tick values (absolute, inside `xDomain` or the data extent); replaces the sample-snapped ticks. */
|
|
1622
|
+
xTicks?: readonly number[];
|
|
1623
|
+
/**
|
|
1624
|
+
* Upper bound of the value axis. The axis never ends below the data (it grows to fit), but it does not
|
|
1625
|
+
* shrink to the data either, so a host can hold a stable "nice" maximum and the plot stops rescaling
|
|
1626
|
+
* on every sample.
|
|
1627
|
+
*/
|
|
1628
|
+
yMax?: number;
|
|
1629
|
+
/** Below this many samples the chart shows the calm idle treatment with dots only, not a jagged line. */
|
|
1630
|
+
minSamples?: number;
|
|
1631
|
+
/** Caption shown over the idle plot while fewer than `minSamples` samples exist. */
|
|
1632
|
+
collectingLabel?: (have: number, need: number) => string;
|
|
1633
|
+
className?: string;
|
|
1634
|
+
}
|
|
1635
|
+
/** Responsive, dependency-free multi-series time chart for arbitrary numeric x data. */
|
|
1636
|
+
declare function TimeSeriesChart({ data, series, ariaLabel, emptyLabel, unavailableLabel, hiddenLabel, missingValueLabel, legendLabel, keyboardHint, height, formatX, formatY, maxGap, activeX, showReadout, onActiveXChange, showLegend, idle: idleProp, baseline, xDomain, xTicks, yMax, minSamples, collectingLabel, className, }: TimeSeriesChartProps): React$1.JSX.Element;
|
|
1637
|
+
|
|
1638
|
+
/** Semantic roles used by the distribution charts. */
|
|
1639
|
+
type ChartTone = "accent" | "success" | "warning" | "error" | "info" | "neutral";
|
|
1640
|
+
/** One host-supplied chart value. `null` means unavailable, while `0` is data. */
|
|
1641
|
+
interface ChartDatum {
|
|
1642
|
+
id: string;
|
|
1643
|
+
label: string;
|
|
1644
|
+
value: number | null;
|
|
1645
|
+
tone?: ChartTone;
|
|
1646
|
+
/** Explicit CSS color for this datum, when a semantic tone is insufficient. */
|
|
1647
|
+
color?: string;
|
|
1648
|
+
}
|
|
1649
|
+
interface BarChartProps {
|
|
1650
|
+
/** Values must be nonnegative; negative and non-finite values are shown as unavailable. */
|
|
1651
|
+
data: readonly ChartDatum[];
|
|
1652
|
+
ariaLabel: string;
|
|
1653
|
+
formatValue?: (value: number) => string;
|
|
1654
|
+
emptyLabel?: string;
|
|
1655
|
+
unavailableLabel?: string;
|
|
1656
|
+
height?: number;
|
|
1657
|
+
onSelect?: (datum: ChartDatum) => void;
|
|
1658
|
+
className?: string;
|
|
1659
|
+
}
|
|
1660
|
+
interface DonutChartProps extends Omit<BarChartProps, "height"> {
|
|
1661
|
+
/**
|
|
1662
|
+
* Color the slices as a single-hue ink ramp (strongest first) instead of one semantic tone per
|
|
1663
|
+
* datum. Explicit `color` values still win. Use when slice identity is carried by the legend.
|
|
1664
|
+
*/
|
|
1665
|
+
monochrome?: boolean;
|
|
1666
|
+
center?: ReactNode;
|
|
1667
|
+
size?: number;
|
|
1668
|
+
}
|
|
1669
|
+
interface HeatmapProps {
|
|
1670
|
+
rows: readonly string[];
|
|
1671
|
+
columns: readonly string[];
|
|
1672
|
+
data: readonly (readonly (number | null)[])[];
|
|
1673
|
+
ariaLabel: string;
|
|
1674
|
+
formatValue?: (value: number) => string;
|
|
1675
|
+
emptyLabel?: string;
|
|
1676
|
+
unavailableLabel?: string;
|
|
1677
|
+
tone?: ChartTone;
|
|
1678
|
+
onSelect?: (rowIndex: number, columnIndex: number) => void;
|
|
1679
|
+
className?: string;
|
|
1680
|
+
}
|
|
1681
|
+
/**
|
|
1682
|
+
* A vertical comparison of nonnegative values. When the bars do not fit at 56px each, they
|
|
1683
|
+
* shrink to the container (no sideways scroll) and only every n-th bar prints its value and label;
|
|
1684
|
+
* every bar keeps its aria-label and title.
|
|
1685
|
+
*/
|
|
1686
|
+
declare function BarChart({ data, ariaLabel, formatValue, emptyLabel, unavailableLabel, height, onSelect, className, }: BarChartProps): React$1.JSX.Element;
|
|
1687
|
+
/** A proportional ring with a textual legend; negative/non-finite values are unavailable. */
|
|
1688
|
+
declare function DonutChart({ data, ariaLabel, formatValue, emptyLabel, unavailableLabel, center, monochrome, size, onSelect, className, }: DonutChartProps): React$1.JSX.Element;
|
|
1689
|
+
/** A semantic grid for comparing signed or unsigned values across named rows/columns. */
|
|
1690
|
+
declare function Heatmap({ rows, columns, data, ariaLabel, formatValue, emptyLabel, unavailableLabel, tone, onSelect, className, }: HeatmapProps): React$1.JSX.Element;
|
|
1691
|
+
|
|
1201
1692
|
declare function Toaster({ position, visibleToasts, expand, toastOptions, ...props }: ToasterProps): React$1.JSX.Element;
|
|
1693
|
+
/** A button inside the toast, e.g. "Undo". The toast closes after `onClick` runs. */
|
|
1694
|
+
interface ToastAction {
|
|
1695
|
+
label: string;
|
|
1696
|
+
onClick: () => void;
|
|
1697
|
+
}
|
|
1698
|
+
interface ToastOptions {
|
|
1699
|
+
/** One action button on the right of the toast. */
|
|
1700
|
+
action?: ToastAction;
|
|
1701
|
+
/** Milliseconds before it closes; `Infinity` keeps it until dismissed. */
|
|
1702
|
+
duration?: number;
|
|
1703
|
+
/** Reuse an id to replace a toast instead of stacking a new one. */
|
|
1704
|
+
id?: string | number;
|
|
1705
|
+
}
|
|
1202
1706
|
declare const toast: {
|
|
1203
|
-
success: (message: string, description?: string) => void;
|
|
1204
|
-
error: (message: string, description?: string) => void;
|
|
1205
|
-
info: (message: string, description?: string) => void;
|
|
1206
|
-
warning: (message: string, description?: string) => void;
|
|
1707
|
+
success: (message: string, description?: string, options?: ToastOptions) => void;
|
|
1708
|
+
error: (message: string, description?: string, options?: ToastOptions) => void;
|
|
1709
|
+
info: (message: string, description?: string, options?: ToastOptions) => void;
|
|
1710
|
+
warning: (message: string, description?: string, options?: ToastOptions) => void;
|
|
1207
1711
|
loading: (message: string) => string | number;
|
|
1208
1712
|
dismiss: (id?: string | number) => void;
|
|
1209
1713
|
promise: <T>(promise: Promise<T>, messages: {
|
|
@@ -1240,7 +1744,9 @@ declare const toast: {
|
|
|
1240
1744
|
* ```
|
|
1241
1745
|
*/
|
|
1242
1746
|
declare function useEscapeKey(onEscape: () => void, enabled?: boolean): void;
|
|
1243
|
-
declare function useBodyScrollLock(locked?: boolean
|
|
1747
|
+
declare function useBodyScrollLock(locked?: boolean, options?: {
|
|
1748
|
+
pin?: boolean;
|
|
1749
|
+
}): void;
|
|
1244
1750
|
/**
|
|
1245
1751
|
* Combined hook for modal behavior: Escape key + body scroll lock
|
|
1246
1752
|
*
|
|
@@ -1258,6 +1764,160 @@ declare function useBodyScrollLock(locked?: boolean): void;
|
|
|
1258
1764
|
*/
|
|
1259
1765
|
declare function useModalBehavior(isOpen: boolean, onClose: () => void): void;
|
|
1260
1766
|
declare function useFocusTrap(containerRef: RefObject<HTMLElement | null>, enabled?: boolean): void;
|
|
1767
|
+
/**
|
|
1768
|
+
* Dismiss a floating panel when the pointer goes down outside it.
|
|
1769
|
+
*
|
|
1770
|
+
* Six components in this library hand-rolled this, and no two agreed:
|
|
1771
|
+
* `CustomSelect`, `Combobox`, `ThemeToggle` and `LanguageSwitcher` registered
|
|
1772
|
+
* the listener permanently (it ran on every click in the app, open or not) and
|
|
1773
|
+
* listened for `mousedown` only — so on a touch device, tapping away did not
|
|
1774
|
+
* reliably close them. `ModelSelect` added `touchstart` but still never
|
|
1775
|
+
* unregistered while closed. `AccountMenu` gated on open and handled Escape.
|
|
1776
|
+
*
|
|
1777
|
+
* This is the union of the correct halves: the listeners exist only while
|
|
1778
|
+
* `open`, cover both mouse and touch, and optionally close on Escape.
|
|
1779
|
+
*
|
|
1780
|
+
* @param open Whether the panel is currently showing.
|
|
1781
|
+
* @param onDismiss Called on an outside press (and on Escape, if enabled).
|
|
1782
|
+
* @param ref The panel's outermost element — a press inside it is ignored.
|
|
1783
|
+
* @param options.escape Also dismiss on Escape. @defaultValue true
|
|
1784
|
+
* @param options.extraRefs Further elements to treat as "inside" — for a panel
|
|
1785
|
+
* rendered through a portal, whose DOM is not a descendant of the trigger.
|
|
1786
|
+
*
|
|
1787
|
+
* @example
|
|
1788
|
+
* ```tsx
|
|
1789
|
+
* const ref = useRef<HTMLDivElement>(null);
|
|
1790
|
+
* const [open, setOpen] = useState(false);
|
|
1791
|
+
* useDismissOnOutside(open, () => setOpen(false), ref);
|
|
1792
|
+
* ```
|
|
1793
|
+
*/
|
|
1794
|
+
declare function useDismissOnOutside(open: boolean, onDismiss: () => void, ref: RefObject<HTMLElement | null>, options?: {
|
|
1795
|
+
escape?: boolean;
|
|
1796
|
+
extraRefs?: RefObject<HTMLElement | null>[];
|
|
1797
|
+
}): void;
|
|
1798
|
+
/**
|
|
1799
|
+
* Make a scroll container keyboard-reachable, but only while it actually
|
|
1800
|
+
* scrolls.
|
|
1801
|
+
*
|
|
1802
|
+
* Chrome quietly makes overflowing scroll containers focusable; Safari and
|
|
1803
|
+
* Firefox do not. So a wide `<table>` of plain cells — no links, no buttons —
|
|
1804
|
+
* has *no* keyboard route to the columns past the right edge in those engines:
|
|
1805
|
+
* the content is simply unreachable. The usual fix is a permanent
|
|
1806
|
+
* `tabIndex={0}`, which then adds a dead tab stop to every table that fits.
|
|
1807
|
+
*
|
|
1808
|
+
* This measures instead. It returns `0` while the element overflows and
|
|
1809
|
+
* `undefined` when it does not, re-checking on resize and on content changes.
|
|
1810
|
+
*
|
|
1811
|
+
* @param ref The scrolling element.
|
|
1812
|
+
* @param axis Which overflow to watch. @defaultValue "x"
|
|
1813
|
+
*
|
|
1814
|
+
* @example
|
|
1815
|
+
* ```tsx
|
|
1816
|
+
* const ref = useRef<HTMLDivElement>(null);
|
|
1817
|
+
* const tabIndex = useScrollableTabStop(ref);
|
|
1818
|
+
* return <div ref={ref} tabIndex={tabIndex} className="overflow-x-auto">…</div>;
|
|
1819
|
+
* ```
|
|
1820
|
+
*/
|
|
1821
|
+
declare function useScrollableTabStop(ref: RefObject<HTMLElement | null>, axis?: "x" | "y"): 0 | undefined;
|
|
1822
|
+
/**
|
|
1823
|
+
* Presence without a motion library: `present` keeps a floating panel mounted while its exit
|
|
1824
|
+
* transition runs, `shown` drives the CSS (opacity / transform) so it enters one frame after mount
|
|
1825
|
+
* and leaves before it unmounts. Under reduced motion it mounts and unmounts at once.
|
|
1826
|
+
*/
|
|
1827
|
+
declare function usePresence(open: boolean, exitMs?: number): {
|
|
1828
|
+
present: boolean;
|
|
1829
|
+
shown: boolean;
|
|
1830
|
+
};
|
|
1831
|
+
|
|
1832
|
+
interface AnchoredPosition {
|
|
1833
|
+
/** Horizontal nudge (px) to keep the panel on-screen. Apply as `marginLeft`
|
|
1834
|
+
* — it never collides with `transform` (framer-motion / `animate-in`) or the
|
|
1835
|
+
* panel's left/right anchor. */
|
|
1836
|
+
shift: number;
|
|
1837
|
+
/** Cap (px) so the panel can't run off the edge; pair with an internal scroll
|
|
1838
|
+
* region (`flex-1 min-h-0` / `overflow-y-auto`). */
|
|
1839
|
+
maxHeight?: number;
|
|
1840
|
+
/** Optional width cap for panels that must fit a narrow clipping ancestor. */
|
|
1841
|
+
maxWidth?: number;
|
|
1842
|
+
/** Which side of the trigger to render on. `"top"` when there isn't room
|
|
1843
|
+
* below but there is above — the consumer flips `top-full mt-*` to
|
|
1844
|
+
* `bottom-full mb-*`. Defaults to `"bottom"`. */
|
|
1845
|
+
placement: "top" | "bottom";
|
|
1846
|
+
}
|
|
1847
|
+
/**
|
|
1848
|
+
* Viewport-collision for HAND-ROLLED floating panels (the Radix ones flip/shift
|
|
1849
|
+
* on their own). Given the open state and a ref to the absolutely-positioned
|
|
1850
|
+
* panel, returns a horizontal `shift`, a `maxHeight`, and a `placement` that keep
|
|
1851
|
+
* it inside the viewport and any scroll/clipping ancestor — flipping above the
|
|
1852
|
+
* trigger when the usable space below is too small and there's more room above.
|
|
1853
|
+
* Measures via untransformed `offset*` / `getBoundingClientRect` so an in-flight
|
|
1854
|
+
* scale/translate animation doesn't skew it.
|
|
1855
|
+
*/
|
|
1856
|
+
declare function useAnchoredPosition(open: boolean, panelRef: React.RefObject<HTMLElement | null>, opts?: {
|
|
1857
|
+
gutter?: number;
|
|
1858
|
+
minHeight?: number;
|
|
1859
|
+
maxWidth?: number;
|
|
1860
|
+
}): AnchoredPosition;
|
|
1861
|
+
|
|
1862
|
+
interface FloatingPosition {
|
|
1863
|
+
/** Viewport x of the panel's left edge (px). */
|
|
1864
|
+
left: number;
|
|
1865
|
+
/** Viewport y of the panel's top edge (px) when it opens below the anchor. */
|
|
1866
|
+
top?: number;
|
|
1867
|
+
/** Distance from the viewport bottom (px) when it opens above the anchor. */
|
|
1868
|
+
bottom?: number;
|
|
1869
|
+
/** Height cap (px): the room left on the chosen side. Undefined when the content fits. */
|
|
1870
|
+
maxHeight?: number;
|
|
1871
|
+
/** Width cap (px): the viewport minus the gutters. */
|
|
1872
|
+
maxWidth: number;
|
|
1873
|
+
/** Exact width (px) when the panel is asked to follow the anchor's width. */
|
|
1874
|
+
width?: number;
|
|
1875
|
+
placement: "top" | "bottom";
|
|
1876
|
+
/** The anchor has scrolled out of every box that shows it: hide the panel (it comes back with the anchor). */
|
|
1877
|
+
hidden?: boolean;
|
|
1878
|
+
}
|
|
1879
|
+
interface FloatingOptions {
|
|
1880
|
+
/** Which anchor edge the panel lines up with. `"end"` hangs the panel's right edge
|
|
1881
|
+
* on the anchor's right edge. @defaultValue "start" */
|
|
1882
|
+
align?: "start" | "end";
|
|
1883
|
+
/** Minimum distance (px) kept to every viewport edge. @defaultValue 8 */
|
|
1884
|
+
gutter?: number;
|
|
1885
|
+
/** Gap (px) between the anchor and the panel. @defaultValue 8 */
|
|
1886
|
+
offset?: number;
|
|
1887
|
+
/** Follow the anchor's width instead of the panel's own width. */
|
|
1888
|
+
matchWidth?: boolean;
|
|
1889
|
+
}
|
|
1890
|
+
/**
|
|
1891
|
+
* Viewport placement for a panel that is portaled to `document.body` and positioned
|
|
1892
|
+
* with `position: fixed`, so no ancestor's `overflow` or `transform` can clip it.
|
|
1893
|
+
* Opens below the anchor and lines up with its `align` edge, flips above when the
|
|
1894
|
+
* room below is smaller than the content and the room above is larger, shifts
|
|
1895
|
+
* sideways to stay `gutter` px inside the viewport, and caps its width and height to
|
|
1896
|
+
* what is left. Follows scroll, resize and size changes of the anchor and the panel.
|
|
1897
|
+
*/
|
|
1898
|
+
declare function useFloatingPosition(open: boolean, anchorRef: RefObject<HTMLElement | null>, panelRef: RefObject<HTMLElement | null>, opts?: FloatingOptions): FloatingPosition;
|
|
1899
|
+
interface FloatingPanelProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
1900
|
+
/** The element the panel hangs from (usually the trigger's wrapper). */
|
|
1901
|
+
anchorRef: RefObject<HTMLElement | null>;
|
|
1902
|
+
align?: "start" | "end";
|
|
1903
|
+
gutter?: number;
|
|
1904
|
+
offset?: number;
|
|
1905
|
+
matchWidth?: boolean;
|
|
1906
|
+
/** A CSS length the height never exceeds, combined with the room left on the chosen side. */
|
|
1907
|
+
maxHeightLimit?: string;
|
|
1908
|
+
/** Tab / Shift+Tab from anywhere in the panel leaves it for the control after / the trigger (a select
|
|
1909
|
+
* that closes on Tab). By default only the first and last control of the panel hand focus across. */
|
|
1910
|
+
tabExits?: boolean;
|
|
1911
|
+
children?: ReactNode;
|
|
1912
|
+
}
|
|
1913
|
+
/**
|
|
1914
|
+
* A dropdown panel that floats: rendered into `document.body` with `position: fixed`
|
|
1915
|
+
* (never clipped by an ancestor's overflow), placed by {@link useFloatingPosition}.
|
|
1916
|
+
* Mount it only while the dropdown is open. The panel is outside the trigger's DOM,
|
|
1917
|
+
* so pass its ref to `useDismissOnOutside(..., { extraRefs })`; React events still
|
|
1918
|
+
* bubble to the trigger's component tree, so key handlers on the wrapper keep working.
|
|
1919
|
+
*/
|
|
1920
|
+
declare const FloatingPanel: React$1.ForwardRefExoticComponent<FloatingPanelProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1261
1921
|
|
|
1262
1922
|
/**
|
|
1263
1923
|
* Runtime theming for YunUI's token system.
|
|
@@ -1406,4 +2066,70 @@ declare function readTheme(el?: HTMLElement | null): YunUITheme;
|
|
|
1406
2066
|
*/
|
|
1407
2067
|
declare function useYunUITheme(defaults?: YunUITheme): [YunUITheme, (patch: YunUITheme) => void];
|
|
1408
2068
|
|
|
1409
|
-
|
|
2069
|
+
interface CommandPaletteItem {
|
|
2070
|
+
id: string;
|
|
2071
|
+
/** Primary line. */
|
|
2072
|
+
title: ReactNode;
|
|
2073
|
+
/** Secondary line under the title. */
|
|
2074
|
+
description?: ReactNode;
|
|
2075
|
+
/** Leading glyph. */
|
|
2076
|
+
icon?: ReactNode;
|
|
2077
|
+
/** Group heading this item sits under. */
|
|
2078
|
+
group?: string;
|
|
2079
|
+
/** Run on select. */
|
|
2080
|
+
onSelect?: () => void;
|
|
2081
|
+
/**
|
|
2082
|
+
* Navigate here on select. When set, the row renders as a real anchor
|
|
2083
|
+
* (through the adapter's `Link`) rather than a button — so ⌘-click,
|
|
2084
|
+
* middle-click and "open in new tab" work, and the destination shows in the
|
|
2085
|
+
* status bar. A search result is a link; a command is a button.
|
|
2086
|
+
*/
|
|
2087
|
+
href?: string;
|
|
2088
|
+
}
|
|
2089
|
+
interface CommandPaletteProps {
|
|
2090
|
+
open: boolean;
|
|
2091
|
+
onClose: () => void;
|
|
2092
|
+
/** Current query — controlled, so the host can drive a remote search. */
|
|
2093
|
+
query: string;
|
|
2094
|
+
onQueryChange: (query: string) => void;
|
|
2095
|
+
/** Results to show. */
|
|
2096
|
+
items?: CommandPaletteItem[];
|
|
2097
|
+
/** Show a spinner in place of the list. */
|
|
2098
|
+
loading?: boolean;
|
|
2099
|
+
/** Rendered when there is a query but no results. */
|
|
2100
|
+
empty?: ReactNode;
|
|
2101
|
+
/** Rendered before anything is typed — recents, shortcuts, tips. */
|
|
2102
|
+
initial?: ReactNode;
|
|
2103
|
+
/**
|
|
2104
|
+
* A hint bar under the list — result counts, keyboard legends. Omit it and
|
|
2105
|
+
* the bar is not rendered at all.
|
|
2106
|
+
*/
|
|
2107
|
+
footer?: ReactNode;
|
|
2108
|
+
/** Every string this renders. */
|
|
2109
|
+
labels?: {
|
|
2110
|
+
placeholder?: string;
|
|
2111
|
+
title?: string;
|
|
2112
|
+
close?: string;
|
|
2113
|
+
};
|
|
2114
|
+
className?: string;
|
|
2115
|
+
}
|
|
2116
|
+
/**
|
|
2117
|
+
* The ⌘K command palette: a centered overlay with one input, a keyboard-driven
|
|
2118
|
+
* result list, and Escape to leave.
|
|
2119
|
+
*
|
|
2120
|
+
* Controlled on purpose — `query` and `items` live with the host, so the same
|
|
2121
|
+
* component covers a local fuzzy filter and a debounced server search without
|
|
2122
|
+
* knowing which it is. Pair it with {@link useCommandPaletteShortcut}.
|
|
2123
|
+
*
|
|
2124
|
+
* Arrow keys move the cursor and Enter selects, so the list is reachable
|
|
2125
|
+
* without touching the mouse; the cursor resets whenever the results change so
|
|
2126
|
+
* it never points at a row that has scrolled out from under it.
|
|
2127
|
+
*/
|
|
2128
|
+
declare function CommandPalette({ open, onClose, query, onQueryChange, items, loading, empty, initial, footer, labels, className, }: CommandPaletteProps): React$1.ReactPortal | null;
|
|
2129
|
+
/**
|
|
2130
|
+
* Opens the palette on ⌘K / Ctrl-K. Kept separate so a host that already owns a
|
|
2131
|
+
* shortcut layer can skip it.
|
|
2132
|
+
*/
|
|
2133
|
+
declare function useCommandPaletteShortcut(onOpen: () => void): void;
|
|
2134
|
+
|
|
2135
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AnimatedNumber, type AnimatedNumberProps, AreaChart, type AreaChartPoint, type AreaChartProps, type AreaChartTone, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, BarChart, type BarChartProps, BentoCard, BentoGrid, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type ChartDatum, type ChartTone, Checkbox, type CheckboxProps, Chip, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Column, Combobox, type ComboboxOption, CommandPalette, type CommandPaletteItem, type CommandPaletteProps, ConfirmModal, type ConfirmModalVariant, CustomSelect, DeleteConfirmModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DonutChart, type DonutChartProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyValue, type EmptyValueProps, FileDropzone, type FileDropzoneProps, Flex, type FlexProps, type FloatingOptions, FloatingPanel, type FloatingPanelProps, type FloatingPosition, Gauge, type GaugeProps, type GaugeTone, Grid, type GridCount, type GridProps, Heatmap, type HeatmapProps, IconButton, InlineCode, InlineStatus, type InlineStatusKind, Input, Kbd, Label, type LabelProps, ListItem, type ListItemProps, Marquee, MetricHero, type MetricHeroProps, type MetricHeroState, Modal, MotionNumber, type MotionNumberProps, NavItem, type NavItemProps, type NavTab, NavTabs, NumberInput, PageLoader, Pagination, type PaginationProps, PasswordInput, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, RegenerateConfirmModal, Row, SCROLL_FADE_DEPTH, ScrollArea, ScrollBar, ScrollFade, type ScrollFadeProps, SearchInput, type SegmentBand, SegmentMeter, type SegmentMeterCurve, type SegmentMeterProps, type SegmentMeterTone, type SegmentedOption, SegmentedSelect, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, ShinyButton, Skeleton, Slider, type SpacingScale, Spinner, Stack, StackedProgress, type StackedProgressProps, type StackedProgressSegment, type StackedProgressTone, StatusIndicator, Steps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TableBody as Tbody, TableCell as Td, TextShimmer, type TextShimmerProps, Textarea, TableFooter as Tfoot, TableHead as Th, TableHeader as Thead, ThemeToggle, TimeSeriesChart, type TimeSeriesChartProps, type TimeSeriesDefinition, type TimeSeriesPoint, type TimeSeriesTone, type ToastAction, type ToastOptions, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TableRow as Tr, type ViewTransitionKind, YUNUI_PALETTES, YUNUI_THEME_PRESETS, type YunUIAccentSource, type YunUIColorScheme, type YunUIPalette, type YunUISolid, type YunUISurface, type YunUITheme, type YunUIThemePreset, type YunUIThemePresetName, applyTheme, balancedBreaks, cn, fadeIn, hasMoreBelow, meterPosition, readTheme, runViewTransition, segmentBand, stackedFractions, staggerContainer, staggerItem, toast, useAnchoredPosition, useBodyScrollLock, useCommandPaletteShortcut, useDismissOnOutside, useEscapeKey, useFloatingPosition, useFocusTrap, useModalBehavior, usePresence, useScrollableTabStop, useSlidingPill, useViewTransition, useYunUITheme };
|