@yuhuanowo/yunui 0.2.14 → 0.2.15
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 +17 -1
- package/README.zh-CN.md +17 -1
- package/README.zh-TW.md +17 -1
- package/dist/ai.js +130 -95
- package/dist/ai.js.map +1 -1
- package/dist/{chunk-VXFEANVX.js → chunk-6MZN3GOP.js} +218 -143
- package/dist/chunk-6MZN3GOP.js.map +1 -0
- package/dist/{chunk-GHO4RCDR.js → chunk-LLNTUA5K.js} +87 -17
- package/dist/chunk-LLNTUA5K.js.map +1 -0
- package/dist/index.d.ts +91 -2
- package/dist/index.js +2 -2
- package/dist/patterns.d.ts +21 -1
- package/dist/patterns.js +20 -5
- package/dist/patterns.js.map +1 -1
- package/package.json +1 -1
- package/styles/tokens.css +704 -352
- package/styles/yunui.css +102 -0
- package/dist/chunk-GHO4RCDR.js.map +0 -1
- package/dist/chunk-VXFEANVX.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
# YunUI
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@yuhuanowo/yunui)
|
|
4
|
+
[](https://ui.yuhuanstudio.com)
|
|
4
5
|
|
|
5
6
|
**English** · [简体中文](./README.zh-CN.md) · [繁體中文](./README.zh-TW.md)
|
|
6
7
|
|
|
7
|
-
A standalone, versioned
|
|
8
|
+
A standalone, versioned React 19 + Tailwind v4 design system that doesn't shout — every detail quietly considered.
|
|
9
|
+
|
|
10
|
+
🔗 **Live showcase & docs → [ui.yuhuanstudio.com](https://ui.yuhuanstudio.com)**
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://ui.yuhuanstudio.com"><img src="https://raw.githubusercontent.com/YuhuanStudio/YunUI/main/assets/hero-light.png" alt="YunUI — quietly beautiful, quietly engineered" width="100%"></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<img src="https://raw.githubusercontent.com/YuhuanStudio/YunUI/main/assets/showcase-light.png" alt="Every YunUI component on one page" width="49%">
|
|
18
|
+
<img src="https://raw.githubusercontent.com/YuhuanStudio/YunUI/main/assets/hero-dark.png" alt="YunUI in the true-black theme" width="49%">
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<p align="center">
|
|
22
|
+
<img src="https://raw.githubusercontent.com/YuhuanStudio/YunUI/main/assets/theming.png" alt="Live theming — 12 multi-color presets, 24 OKLCH palettes, token-driven effects" width="100%">
|
|
23
|
+
</p>
|
|
8
24
|
|
|
9
25
|
Edit YunUI once → publish a new version → every project picks up the same **design tokens, animations, and components** on its next upgrade (`pnpm up`). Already running in production at Yunxin.
|
|
10
26
|
|
package/README.zh-CN.md
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
# YunUI
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@yuhuanowo/yunui)
|
|
4
|
+
[](https://ui.yuhuanstudio.com)
|
|
4
5
|
|
|
5
6
|
[English](./README.md) · **简体中文** · [繁體中文](./README.zh-TW.md)
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
一套不喧哗的 React 19 + Tailwind v4 设计系统 —— 每个细节都被好好想过。
|
|
9
|
+
|
|
10
|
+
🔗 **在线展示与文档 → [ui.yuhuanstudio.com](https://ui.yuhuanstudio.com)**
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://ui.yuhuanstudio.com"><img src="https://raw.githubusercontent.com/YuhuanStudio/YunUI/main/assets/hero-light.png" alt="YunUI — 安静的好看,安静的扎实" width="100%"></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<img src="https://raw.githubusercontent.com/YuhuanStudio/YunUI/main/assets/showcase-light.png" alt="所有 YunUI 组件,尽在一页" width="49%">
|
|
18
|
+
<img src="https://raw.githubusercontent.com/YuhuanStudio/YunUI/main/assets/hero-dark.png" alt="YunUI 纯黑主题" width="49%">
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<p align="center">
|
|
22
|
+
<img src="https://raw.githubusercontent.com/YuhuanStudio/YunUI/main/assets/theming.png" alt="即时主题 — 12 套多色预设、24 套 OKLCH 色盘、令牌驱动特效" width="100%">
|
|
23
|
+
</p>
|
|
8
24
|
|
|
9
25
|
改 YunUI 一处 → 发版 → 各项目升级版本号即可同步获得统一的 **设计 token、动画、组件**。已在 Yunxin 生产环境使用。
|
|
10
26
|
|
package/README.zh-TW.md
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
# YunUI
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@yuhuanowo/yunui)
|
|
4
|
+
[](https://ui.yuhuanstudio.com)
|
|
4
5
|
|
|
5
6
|
[English](./README.md) · [简体中文](./README.zh-CN.md) · **繁體中文**
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
一套不喧嘩的 React 19 + Tailwind v4 設計系統 —— 每個細節都被好好想過。
|
|
9
|
+
|
|
10
|
+
🔗 **線上展示與文件 → [ui.yuhuanstudio.com](https://ui.yuhuanstudio.com)**
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://ui.yuhuanstudio.com"><img src="https://raw.githubusercontent.com/YuhuanStudio/YunUI/main/assets/hero-light.png" alt="YunUI — 安靜的好看,安靜的扎實" width="100%"></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<img src="https://raw.githubusercontent.com/YuhuanStudio/YunUI/main/assets/showcase-light.png" alt="所有 YunUI 元件,盡在一頁" width="49%">
|
|
18
|
+
<img src="https://raw.githubusercontent.com/YuhuanStudio/YunUI/main/assets/hero-dark.png" alt="YunUI 純黑主題" width="49%">
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<p align="center">
|
|
22
|
+
<img src="https://raw.githubusercontent.com/YuhuanStudio/YunUI/main/assets/theming.png" alt="即時主題 — 12 套多色預設、24 套 OKLCH 色盤、權杖驅動特效" width="100%">
|
|
23
|
+
</p>
|
|
8
24
|
|
|
9
25
|
改 YunUI 一處 → 發版 → 各專案升級版本號即可同步取得統一的 **設計 token、動畫、元件**。已在 Yunxin 生產環境使用。
|
|
10
26
|
|
package/dist/ai.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { copyToClipboard } from './chunk-N53PNMPJ.js';
|
|
3
3
|
export { DiscordIcon, Footer, GithubIcon, InstagramIcon } from './chunk-N53PNMPJ.js';
|
|
4
|
-
import { cn, ThemeToggle } from './chunk-
|
|
4
|
+
import { cn, useAnchoredPosition, ThemeToggle } from './chunk-LLNTUA5K.js';
|
|
5
5
|
import { useYunUI } from './chunk-U2LNRVMI.js';
|
|
6
6
|
import { memo, useState, useRef, useMemo, useEffect } from 'react';
|
|
7
7
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
@@ -142,7 +142,7 @@ function ModelCard({
|
|
|
142
142
|
/* @__PURE__ */ jsxs("div", { className: "mt-auto flex flex-wrap items-center justify-between gap-x-3 gap-y-1.5 text-[11px] text-muted-foreground pt-3 border-t border-border", children: [
|
|
143
143
|
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5 min-w-0", children: [
|
|
144
144
|
developer?.iconUrl && /* @__PURE__ */ jsx("div", { className: "rounded-md overflow-hidden bg-muted", style: { width: 12, height: 12 }, children: /* @__PURE__ */ jsx(Image, { src: developer.iconUrl, alt: developer.label, width: 12, height: 12, className: "object-cover" }) }),
|
|
145
|
-
developer?.label && /* @__PURE__ */ jsx("span", { children: developer.label })
|
|
145
|
+
developer?.label && /* @__PURE__ */ jsx("span", { className: "truncate min-w-0", children: developer.label })
|
|
146
146
|
] }),
|
|
147
147
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
148
148
|
context && /* @__PURE__ */ jsx("span", { className: "bg-muted px-1.5 py-0.5 rounded-sm font-medium", children: context }),
|
|
@@ -182,6 +182,8 @@ function ModelSelect({
|
|
|
182
182
|
const rootRef = useRef(null);
|
|
183
183
|
const inputRef = useRef(null);
|
|
184
184
|
const listRef = useRef(null);
|
|
185
|
+
const panelRef = useRef(null);
|
|
186
|
+
const { shift, maxHeight } = useAnchoredPosition(isOpen, panelRef);
|
|
185
187
|
const pinnedSet = useMemo(() => new Set(pinned ?? []), [pinned]);
|
|
186
188
|
useEffect(() => {
|
|
187
189
|
const onDown = (e) => {
|
|
@@ -315,11 +317,12 @@ function ModelSelect({
|
|
|
315
317
|
isOpen && /* @__PURE__ */ jsxs(
|
|
316
318
|
motion.div,
|
|
317
319
|
{
|
|
320
|
+
ref: panelRef,
|
|
318
321
|
initial: { opacity: 0, y: -8, scale: 0.96 },
|
|
319
322
|
animate: { opacity: 1, y: 0, scale: 1 },
|
|
320
323
|
transition: { duration: 0.16, ease: "easeOut" },
|
|
321
|
-
style: { maxWidth: "calc(100vw - 1rem)" },
|
|
322
|
-
className: "origin-top absolute z-50 top-full left-0 mt-2 w-96 bg-
|
|
324
|
+
style: { maxWidth: "calc(100vw - 1rem)", marginLeft: shift, maxHeight },
|
|
325
|
+
className: "origin-top absolute z-50 top-full left-0 mt-2 w-96 max-w-[calc(100vw-1rem)] flex flex-col bg-background/60 backdrop-blur-2xl border border-border rounded-2xl shadow-lg shadow-black/5 text-popover-foreground overflow-hidden",
|
|
323
326
|
children: [
|
|
324
327
|
/* @__PURE__ */ jsxs("div", { className: "p-2.5 border-b border-border/50", children: [
|
|
325
328
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
@@ -332,6 +335,7 @@ function ModelSelect({
|
|
|
332
335
|
onChange: (e) => setSearch(e.target.value),
|
|
333
336
|
onKeyDown: onSearchKeyDown,
|
|
334
337
|
placeholder: L.search,
|
|
338
|
+
"aria-label": L.search,
|
|
335
339
|
role: "combobox",
|
|
336
340
|
"aria-expanded": isOpen,
|
|
337
341
|
"aria-controls": "yunui-ms-listbox",
|
|
@@ -349,7 +353,7 @@ function ModelSelect({
|
|
|
349
353
|
activeFilters.length > 0 && /* @__PURE__ */ jsx("button", { type: "button", onClick: () => setActiveFilters([]), title: L.clearFilters, "aria-label": L.clearFilters, className: "p-1 rounded-md text-muted-foreground hover:bg-muted outline-none focus-visible:ring-2 focus-visible:ring-ring", children: /* @__PURE__ */ jsx(X, { size: 14 }) })
|
|
350
354
|
] })
|
|
351
355
|
] }),
|
|
352
|
-
groups.length > 1 && /* @__PURE__ */ jsx("div", { className: "px-2.5 py-2 border-b border-border/50 overflow-x-auto", children: /* @__PURE__ */ jsxs("div", { className: "flex gap-1 min-w-max", children: [
|
|
356
|
+
groups.length > 1 && /* @__PURE__ */ jsx("div", { className: "px-2.5 py-2 border-b border-border/50 overflow-x-auto overflow-y-hidden overscroll-x-contain", children: /* @__PURE__ */ jsxs("div", { className: "flex gap-1 min-w-max", children: [
|
|
353
357
|
/* @__PURE__ */ jsxs("button", { type: "button", onClick: () => setActiveGroup(null), "aria-pressed": !activeGroup, className: cn("px-2.5 py-1.5 text-xs rounded-lg font-medium transition-colors whitespace-nowrap outline-none focus-visible:ring-2 focus-visible:ring-ring", !activeGroup ? "bg-foreground text-background" : "bg-muted text-muted-foreground hover:bg-muted/80"), children: [
|
|
354
358
|
L.all,
|
|
355
359
|
" (",
|
|
@@ -361,7 +365,7 @@ function ModelSelect({
|
|
|
361
365
|
groupLabel[g] ?? g
|
|
362
366
|
] }, g))
|
|
363
367
|
] }) }),
|
|
364
|
-
/* @__PURE__ */ jsxs("div", { ref: listRef, onWheel, onMouseMove: clearActiveOnPointer, id: "yunui-ms-listbox", role: "listbox", className: "max-h-96 overflow-y-auto overscroll-contain", children: [
|
|
368
|
+
/* @__PURE__ */ jsxs("div", { ref: listRef, onWheel, onMouseMove: clearActiveOnPointer, id: "yunui-ms-listbox", role: "listbox", className: "flex-1 min-h-0 max-h-96 overflow-y-auto overscroll-contain", children: [
|
|
365
369
|
pinnedList.length > 0 && /* @__PURE__ */ jsxs("div", { className: "px-1.5 py-1.5 border-b border-border/40", children: [
|
|
366
370
|
/* @__PURE__ */ jsxs("div", { className: "text-[10px] font-medium text-muted-foreground uppercase tracking-wide px-2 mb-1 flex items-center gap-1", children: [
|
|
367
371
|
/* @__PURE__ */ jsx(Pin, { size: 9 }),
|
|
@@ -1530,6 +1534,9 @@ function LanguageSwitcher({
|
|
|
1530
1534
|
}) {
|
|
1531
1535
|
const [isOpen, setIsOpen] = useState(false);
|
|
1532
1536
|
const containerRef = useRef(null);
|
|
1537
|
+
const triggerRef = useRef(null);
|
|
1538
|
+
const panelRef = useRef(null);
|
|
1539
|
+
const { shift, maxHeight } = useAnchoredPosition(isOpen, panelRef);
|
|
1533
1540
|
useEffect(() => {
|
|
1534
1541
|
const handleClickOutside = (e) => {
|
|
1535
1542
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -1539,6 +1546,17 @@ function LanguageSwitcher({
|
|
|
1539
1546
|
document.addEventListener("mousedown", handleClickOutside);
|
|
1540
1547
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1541
1548
|
}, []);
|
|
1549
|
+
useEffect(() => {
|
|
1550
|
+
if (!isOpen) return;
|
|
1551
|
+
const onKey = (e) => {
|
|
1552
|
+
if (e.key === "Escape") {
|
|
1553
|
+
setIsOpen(false);
|
|
1554
|
+
triggerRef.current?.focus();
|
|
1555
|
+
}
|
|
1556
|
+
};
|
|
1557
|
+
document.addEventListener("keydown", onKey);
|
|
1558
|
+
return () => document.removeEventListener("keydown", onKey);
|
|
1559
|
+
}, [isOpen]);
|
|
1542
1560
|
const handleLocaleChange = (newLocale) => {
|
|
1543
1561
|
if (newLocale === currentLocale || pending) return;
|
|
1544
1562
|
setIsOpen(false);
|
|
@@ -1549,6 +1567,7 @@ function LanguageSwitcher({
|
|
|
1549
1567
|
variant === "pill" ? /* @__PURE__ */ jsxs(
|
|
1550
1568
|
"button",
|
|
1551
1569
|
{
|
|
1570
|
+
ref: triggerRef,
|
|
1552
1571
|
onClick: () => setIsOpen(!isOpen),
|
|
1553
1572
|
className: "flex items-center gap-1.5 h-9 px-2.5 sm:px-3 rounded-full text-sm font-medium transition-all bg-(--bg-elevated) hover:bg-(--bg-elevated)/80 border border-(--border-hairline) text-(--text-secondary) hover:text-(--text-primary) disabled:opacity-50 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
1554
1573
|
disabled: pending,
|
|
@@ -1563,6 +1582,7 @@ function LanguageSwitcher({
|
|
|
1563
1582
|
) : /* @__PURE__ */ jsx(
|
|
1564
1583
|
"button",
|
|
1565
1584
|
{
|
|
1585
|
+
ref: triggerRef,
|
|
1566
1586
|
onClick: () => setIsOpen(!isOpen),
|
|
1567
1587
|
className: "w-9 h-9 rounded-lg flex items-center justify-center hover:bg-foreground/5 transition-colors disabled:opacity-50 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
1568
1588
|
disabled: pending,
|
|
@@ -1572,15 +1592,23 @@ function LanguageSwitcher({
|
|
|
1572
1592
|
children: /* @__PURE__ */ jsx(Globe, { className: "h-[1.2rem] w-[1.2rem]" })
|
|
1573
1593
|
}
|
|
1574
1594
|
),
|
|
1575
|
-
isOpen && /* @__PURE__ */ jsx(
|
|
1576
|
-
"
|
|
1595
|
+
isOpen && /* @__PURE__ */ jsx(
|
|
1596
|
+
"div",
|
|
1577
1597
|
{
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1598
|
+
ref: panelRef,
|
|
1599
|
+
style: { marginLeft: shift, maxHeight },
|
|
1600
|
+
className: `absolute ${align === "left" ? "left-0" : "right-0"} top-full mt-2 z-50 flex flex-col overflow-hidden rounded-2xl border border-border bg-background/60 backdrop-blur-2xl text-popover-foreground shadow-lg shadow-black/5 animate-in fade-in-0 zoom-in-95 duration-200`,
|
|
1601
|
+
children: /* @__PURE__ */ jsx("div", { className: "p-1 flex-1 min-h-0 overflow-y-auto", children: locales.map((lang) => /* @__PURE__ */ jsx(
|
|
1602
|
+
"button",
|
|
1603
|
+
{
|
|
1604
|
+
onClick: () => handleLocaleChange(lang.value),
|
|
1605
|
+
className: `dropdown-item w-full text-left ${currentLocale === lang.value ? "active" : ""}`,
|
|
1606
|
+
children: /* @__PURE__ */ jsx("span", { className: "flex-1", children: lang.label })
|
|
1607
|
+
},
|
|
1608
|
+
lang.value
|
|
1609
|
+
)) })
|
|
1610
|
+
}
|
|
1611
|
+
)
|
|
1584
1612
|
] });
|
|
1585
1613
|
}
|
|
1586
1614
|
function Navbar({
|
|
@@ -1642,92 +1670,99 @@ function Navbar({
|
|
|
1642
1670
|
}
|
|
1643
1671
|
return false;
|
|
1644
1672
|
};
|
|
1645
|
-
return /* @__PURE__ */ jsxs(
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
children:
|
|
1656
|
-
/* @__PURE__ */ jsx("span", { className: `text-sm relative z-10 ${isActive(link.href) ? "text-foreground font-medium" : "text-muted-foreground"}`, children: link.label }),
|
|
1657
|
-
/* @__PURE__ */ jsx("span", { className: `absolute bottom-1.5 left-1/2 -translate-x-1/2 h-0.5 bg-foreground rounded-full transition-all duration-200 yunui-accent-bg ${isActive(link.href) ? "w-8" : "w-0 group-hover:w-8"}` })
|
|
1658
|
-
]
|
|
1659
|
-
},
|
|
1660
|
-
link.href
|
|
1661
|
-
)) }),
|
|
1662
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 shrink-0", children: [
|
|
1663
|
-
/* @__PURE__ */ jsx("span", { className: "hidden md:flex items-center gap-1.5", children: languageSwitcher }),
|
|
1664
|
-
themeToggle ?? /* @__PURE__ */ jsx(ThemeToggle, { variant: "pill" }),
|
|
1665
|
-
variant !== "minimal" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1666
|
-
/* @__PURE__ */ jsx(
|
|
1667
|
-
Link,
|
|
1668
|
-
{
|
|
1669
|
-
href: loginHref,
|
|
1670
|
-
className: "hidden md:block text-sm text-muted-foreground hover:text-foreground transition-colors duration-200 py-2 whitespace-nowrap min-w-15 text-center",
|
|
1671
|
-
children: signIn
|
|
1672
|
-
}
|
|
1673
|
-
),
|
|
1674
|
-
/* @__PURE__ */ jsx(
|
|
1675
|
-
Link,
|
|
1676
|
-
{
|
|
1677
|
-
href: signupHref,
|
|
1678
|
-
className: "hidden md:inline-block px-4 py-2 bg-foreground text-background text-sm font-medium rounded-lg hover:bg-foreground/90 hover:shadow-md transition-all duration-200 whitespace-nowrap min-w-20 text-center yunui-accent-bg yunui-accent-on",
|
|
1679
|
-
children: signUp
|
|
1680
|
-
}
|
|
1681
|
-
)
|
|
1682
|
-
] }),
|
|
1683
|
-
variant === "public" && /* @__PURE__ */ jsx(
|
|
1684
|
-
"button",
|
|
1685
|
-
{
|
|
1686
|
-
type: "button",
|
|
1687
|
-
onClick: () => setMenuOpen((o) => !o),
|
|
1688
|
-
className: "md:hidden w-9 h-9 rounded-full flex items-center justify-center hover:bg-foreground/5 transition-colors",
|
|
1689
|
-
"aria-label": menuLabel,
|
|
1690
|
-
"aria-expanded": menuOpen,
|
|
1691
|
-
children: menuOpen ? /* @__PURE__ */ jsx(X, { className: "w-5 h-5" }) : /* @__PURE__ */ jsx(Menu, { className: "w-5 h-5" })
|
|
1692
|
-
}
|
|
1693
|
-
)
|
|
1694
|
-
] }),
|
|
1695
|
-
variant === "public" && menuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1696
|
-
/* @__PURE__ */ jsx("div", { className: "md:hidden fixed inset-0 -z-10", onClick: () => setMenuOpen(false) }),
|
|
1697
|
-
/* @__PURE__ */ jsxs("div", { className: "md:hidden absolute top-full left-0 right-0 mt-3 p-2 bg-background/95 backdrop-blur-xl border border-border rounded-2xl shadow-lg flex flex-col gap-0.5", children: [
|
|
1698
|
-
links.map((link) => /* @__PURE__ */ jsx(
|
|
1673
|
+
return /* @__PURE__ */ jsxs(
|
|
1674
|
+
"nav",
|
|
1675
|
+
{
|
|
1676
|
+
style: { top: "max(1.5rem, env(safe-area-inset-top))" },
|
|
1677
|
+
className: "fixed left-1/2 -translate-x-1/2 z-50 px-6 py-2.5 max-w-6xl w-[calc(100%-48px)] bg-background/80 backdrop-blur-xl border border-border rounded-full shadow-md flex items-center justify-between",
|
|
1678
|
+
children: [
|
|
1679
|
+
/* @__PURE__ */ jsxs(Link, { href: homeHref, className: "flex items-center gap-2 min-w-0 rounded-lg px-2 py-1 -mx-2 hover:bg-foreground/5 transition-colors duration-200", children: [
|
|
1680
|
+
/* @__PURE__ */ jsx(Image, { src: logoSrc, alt: appName, width: 28, height: 28, className: "w-7 h-7 shrink-0" }),
|
|
1681
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold text-sm tracking-tight truncate", children: appName })
|
|
1682
|
+
] }),
|
|
1683
|
+
variant === "public" && /* @__PURE__ */ jsx("div", { className: "hidden md:flex items-center gap-6 lg:gap-8 absolute left-1/2 -translate-x-1/2", children: links.map((link) => /* @__PURE__ */ jsxs(
|
|
1699
1684
|
Link,
|
|
1700
1685
|
{
|
|
1701
1686
|
href: link.href,
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1687
|
+
className: "group relative px-2 lg:px-3 py-2 whitespace-nowrap min-w-15 text-center",
|
|
1688
|
+
children: [
|
|
1689
|
+
/* @__PURE__ */ jsx("span", { className: `text-sm relative z-10 ${isActive(link.href) ? "text-foreground font-medium" : "text-muted-foreground"}`, children: link.label }),
|
|
1690
|
+
/* @__PURE__ */ jsx("span", { className: `absolute bottom-1.5 left-1/2 -translate-x-1/2 h-0.5 bg-foreground rounded-full transition-all duration-200 yunui-accent-bg ${isActive(link.href) ? "w-8" : "w-0 group-hover:w-8"}` })
|
|
1691
|
+
]
|
|
1705
1692
|
},
|
|
1706
1693
|
link.href
|
|
1707
|
-
)),
|
|
1708
|
-
/* @__PURE__ */
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1694
|
+
)) }),
|
|
1695
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 shrink-0", children: [
|
|
1696
|
+
/* @__PURE__ */ jsx("span", { className: "hidden md:flex items-center gap-1.5", children: languageSwitcher }),
|
|
1697
|
+
themeToggle ?? /* @__PURE__ */ jsx(ThemeToggle, { variant: "pill" }),
|
|
1698
|
+
variant !== "minimal" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1699
|
+
/* @__PURE__ */ jsx(
|
|
1700
|
+
Link,
|
|
1701
|
+
{
|
|
1702
|
+
href: loginHref,
|
|
1703
|
+
className: "hidden md:block text-sm text-muted-foreground hover:text-foreground transition-colors duration-200 py-2 whitespace-nowrap min-w-15 text-center",
|
|
1704
|
+
children: signIn
|
|
1705
|
+
}
|
|
1706
|
+
),
|
|
1707
|
+
/* @__PURE__ */ jsx(
|
|
1708
|
+
Link,
|
|
1709
|
+
{
|
|
1710
|
+
href: signupHref,
|
|
1711
|
+
className: "hidden md:inline-block px-4 py-2 bg-foreground text-background text-sm font-medium rounded-lg hover:bg-foreground/90 hover:shadow-md transition-all duration-200 whitespace-nowrap min-w-20 text-center yunui-accent-bg yunui-accent-on",
|
|
1712
|
+
children: signUp
|
|
1713
|
+
}
|
|
1714
|
+
)
|
|
1715
|
+
] }),
|
|
1716
|
+
variant === "public" && /* @__PURE__ */ jsx(
|
|
1717
|
+
"button",
|
|
1718
|
+
{
|
|
1719
|
+
type: "button",
|
|
1720
|
+
onClick: () => setMenuOpen((o) => !o),
|
|
1721
|
+
className: "md:hidden w-9 h-9 rounded-full flex items-center justify-center hover:bg-foreground/5 transition-colors",
|
|
1722
|
+
"aria-label": menuLabel,
|
|
1723
|
+
"aria-expanded": menuOpen,
|
|
1724
|
+
children: menuOpen ? /* @__PURE__ */ jsx(X, { className: "w-5 h-5" }) : /* @__PURE__ */ jsx(Menu, { className: "w-5 h-5" })
|
|
1725
|
+
}
|
|
1726
|
+
)
|
|
1727
|
+
] }),
|
|
1728
|
+
variant === "public" && menuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1729
|
+
/* @__PURE__ */ jsx("div", { className: "md:hidden fixed inset-0 -z-10", "aria-hidden": "true", onClick: () => setMenuOpen(false) }),
|
|
1730
|
+
/* @__PURE__ */ jsxs("div", { className: "md:hidden absolute top-full left-0 right-0 mt-3 p-2 bg-background/60 backdrop-blur-2xl border border-border rounded-2xl shadow-lg shadow-black/5 flex flex-col gap-0.5", children: [
|
|
1731
|
+
links.map((link) => /* @__PURE__ */ jsx(
|
|
1732
|
+
Link,
|
|
1733
|
+
{
|
|
1734
|
+
href: link.href,
|
|
1735
|
+
onClick: () => setMenuOpen(false),
|
|
1736
|
+
className: `px-4 py-2.5 rounded-xl text-sm transition-colors hover:bg-foreground/5 ${isActive(link.href) ? "text-foreground font-medium" : "text-muted-foreground"}`,
|
|
1737
|
+
children: link.label
|
|
1738
|
+
},
|
|
1739
|
+
link.href
|
|
1740
|
+
)),
|
|
1741
|
+
/* @__PURE__ */ jsx("div", { className: "my-1 border-t border-border" }),
|
|
1742
|
+
languageSwitcher && /* @__PURE__ */ jsx("div", { className: "px-2 py-1.5", children: languageSwitcher }),
|
|
1743
|
+
/* @__PURE__ */ jsx(
|
|
1744
|
+
Link,
|
|
1745
|
+
{
|
|
1746
|
+
href: loginHref,
|
|
1747
|
+
onClick: () => setMenuOpen(false),
|
|
1748
|
+
className: "px-4 py-2.5 rounded-xl text-sm text-muted-foreground transition-colors hover:bg-foreground/5",
|
|
1749
|
+
children: signIn
|
|
1750
|
+
}
|
|
1751
|
+
),
|
|
1752
|
+
/* @__PURE__ */ jsx(
|
|
1753
|
+
Link,
|
|
1754
|
+
{
|
|
1755
|
+
href: signupHref,
|
|
1756
|
+
onClick: () => setMenuOpen(false),
|
|
1757
|
+
className: "mt-0.5 px-4 py-2.5 rounded-xl text-sm font-medium text-center bg-foreground text-background hover:bg-foreground/90 transition-colors yunui-accent-bg yunui-accent-on",
|
|
1758
|
+
children: signUp
|
|
1759
|
+
}
|
|
1760
|
+
)
|
|
1761
|
+
] })
|
|
1762
|
+
] })
|
|
1763
|
+
]
|
|
1764
|
+
}
|
|
1765
|
+
);
|
|
1731
1766
|
}
|
|
1732
1767
|
|
|
1733
1768
|
export { CapabilityIcon, CapabilitySelector, IDBadge, LanguageSwitcher, ModelAvatar, ModelCard, ModelIcon, ModelManagerCard, ModelSelect, ModelTypeIcon, Navbar, PROVIDER_ICON_SLUGS, ProviderAvatar, ProviderIcon, ProviderIconImg, ProviderNames, ThinkingBlock, buttonVariants, getDeveloperIconPath, getIconPath, getProviderIconOptions, getProviderName, isKnownCapability, normalizeProviderId };
|