@next-library/theme 1.0.6 → 1.0.8
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/dist/client.js +127 -88
- package/dist/client.js.map +1 -1
- package/dist/components/navigation/navbar/mobile-menu.d.ts.map +1 -1
- package/dist/components/navigation/sidebar-left/sidebar.d.ts +7 -1
- package/dist/components/navigation/sidebar-left/sidebar.d.ts.map +1 -1
- package/dist/components/navigation/sidebar-right/github-contributors.d.ts.map +1 -1
- package/dist/index.js +127 -88
- package/dist/index.js.map +1 -1
- package/dist/lib/mobile-menu-store.d.ts +3 -0
- package/dist/lib/mobile-menu-store.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React6 from 'react';
|
|
3
|
-
import React6__default, { useState, useRef, useEffect, useCallback, useMemo } from 'react';
|
|
3
|
+
import React6__default, { useState, useRef, useEffect, useCallback, useMemo, useSyncExternalStore } from 'react';
|
|
4
4
|
import { useScroll, useMotionValueEvent, motion } from 'motion/react';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -2293,7 +2293,7 @@ function StickyBanner({
|
|
|
2293
2293
|
locale = "en",
|
|
2294
2294
|
closeLabel
|
|
2295
2295
|
}) {
|
|
2296
|
-
const [
|
|
2296
|
+
const [open2, setOpen] = useState(true);
|
|
2297
2297
|
const { scrollY } = useScroll();
|
|
2298
2298
|
const translations2 = getTranslations(locale);
|
|
2299
2299
|
const ariaLabel = closeLabel || translations2.closeBanner;
|
|
@@ -2316,8 +2316,8 @@ function StickyBanner({
|
|
|
2316
2316
|
opacity: 0
|
|
2317
2317
|
},
|
|
2318
2318
|
animate: {
|
|
2319
|
-
y:
|
|
2320
|
-
opacity:
|
|
2319
|
+
y: open2 ? 0 : -100,
|
|
2320
|
+
opacity: open2 ? 1 : 0
|
|
2321
2321
|
},
|
|
2322
2322
|
transition: {
|
|
2323
2323
|
duration: 0.3,
|
|
@@ -2335,7 +2335,7 @@ function StickyBanner({
|
|
|
2335
2335
|
scale: 1
|
|
2336
2336
|
},
|
|
2337
2337
|
className: "absolute top-1/2 right-2 -translate-y-1/2 cursor-pointer",
|
|
2338
|
-
onClick: () => setOpen(!
|
|
2338
|
+
onClick: () => setOpen(!open2),
|
|
2339
2339
|
"aria-label": ariaLabel,
|
|
2340
2340
|
children: /* @__PURE__ */ jsx(CloseIcon, { className: "h-5 w-5 text-white", "aria-hidden": "true" })
|
|
2341
2341
|
}
|
|
@@ -2487,7 +2487,7 @@ function SearchBar({ language = "en", className }) {
|
|
|
2487
2487
|
const router = useRouter();
|
|
2488
2488
|
const translations2 = getTranslations(language);
|
|
2489
2489
|
const [mounted, setMounted] = useState(false);
|
|
2490
|
-
const [
|
|
2490
|
+
const [open2, setOpen] = useState(false);
|
|
2491
2491
|
const [query, setQuery] = useState("");
|
|
2492
2492
|
const [results, setResults] = useState([]);
|
|
2493
2493
|
const [recent, setRecent] = useState([]);
|
|
@@ -2534,7 +2534,7 @@ function SearchBar({ language = "en", className }) {
|
|
|
2534
2534
|
return () => window.removeEventListener("keydown", onKey);
|
|
2535
2535
|
}, [isMac]);
|
|
2536
2536
|
useEffect(() => {
|
|
2537
|
-
if (!
|
|
2537
|
+
if (!open2) return;
|
|
2538
2538
|
setRecent(readRecent());
|
|
2539
2539
|
const t = setTimeout(() => inputRef.current?.focus(), 20);
|
|
2540
2540
|
const prev = document.body.style.overflow;
|
|
@@ -2543,9 +2543,9 @@ function SearchBar({ language = "en", className }) {
|
|
|
2543
2543
|
clearTimeout(t);
|
|
2544
2544
|
document.body.style.overflow = prev;
|
|
2545
2545
|
};
|
|
2546
|
-
}, [
|
|
2546
|
+
}, [open2]);
|
|
2547
2547
|
useEffect(() => {
|
|
2548
|
-
if (!
|
|
2548
|
+
if (!open2) return;
|
|
2549
2549
|
if (!query.trim()) {
|
|
2550
2550
|
setResults([]);
|
|
2551
2551
|
setIsLoading(false);
|
|
@@ -2566,10 +2566,10 @@ function SearchBar({ language = "en", className }) {
|
|
|
2566
2566
|
}
|
|
2567
2567
|
}, 180);
|
|
2568
2568
|
return () => clearTimeout(id2);
|
|
2569
|
-
}, [query, language,
|
|
2570
|
-
const flat = query.trim() ? results : [];
|
|
2569
|
+
}, [query, language, open2]);
|
|
2570
|
+
const flat = useMemo(() => query.trim() ? results : [], [query, results]);
|
|
2571
2571
|
useEffect(() => {
|
|
2572
|
-
if (!
|
|
2572
|
+
if (!open2) return;
|
|
2573
2573
|
const onKey = (e) => {
|
|
2574
2574
|
if (e.key === "Escape") {
|
|
2575
2575
|
e.preventDefault();
|
|
@@ -2588,7 +2588,7 @@ function SearchBar({ language = "en", className }) {
|
|
|
2588
2588
|
};
|
|
2589
2589
|
window.addEventListener("keydown", onKey);
|
|
2590
2590
|
return () => window.removeEventListener("keydown", onKey);
|
|
2591
|
-
}, [
|
|
2591
|
+
}, [open2, flat, selected, close, go]);
|
|
2592
2592
|
useEffect(() => {
|
|
2593
2593
|
const node = listRef.current?.querySelector('[data-selected="true"]');
|
|
2594
2594
|
node?.scrollIntoView({ block: "nearest" });
|
|
@@ -2615,7 +2615,7 @@ function SearchBar({ language = "en", className }) {
|
|
|
2615
2615
|
]
|
|
2616
2616
|
}
|
|
2617
2617
|
);
|
|
2618
|
-
const modal =
|
|
2618
|
+
const modal = open2 && mounted ? createPortal(
|
|
2619
2619
|
/* @__PURE__ */ jsxs("div", { className: "fixed inset-0 z-[100] flex items-start justify-center p-4 pt-[12vh]", role: "dialog", "aria-modal": "true", children: [
|
|
2620
2620
|
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-background/70 backdrop-blur-sm", onClick: close, "aria-hidden": "true" }),
|
|
2621
2621
|
/* @__PURE__ */ jsx("div", { className: "cl-beam relative w-full max-w-xl shadow-[0_30px_90px_-24px_rgb(0_0_0/0.55)]", children: /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-[calc(var(--radius)+2px)] bg-popover", children: [
|
|
@@ -2653,11 +2653,7 @@ function SearchBar({ language = "en", className }) {
|
|
|
2653
2653
|
] }) : /* @__PURE__ */ jsx("p", { className: "px-2 py-8 text-center text-sm text-muted-foreground", children: translations2.searchPlaceholder }) : isLoading && !flat.length ? /* @__PURE__ */ jsxs("p", { className: "px-2 py-8 text-center text-sm text-muted-foreground", children: [
|
|
2654
2654
|
translations2.search,
|
|
2655
2655
|
"..."
|
|
2656
|
-
] }) : !flat.length ? /* @__PURE__ */
|
|
2657
|
-
'No results for "',
|
|
2658
|
-
query,
|
|
2659
|
-
'"'
|
|
2660
|
-
] }) : Object.entries(groups).map(([section, items]) => /* @__PURE__ */ jsxs("div", { className: "mb-1", children: [
|
|
2656
|
+
] }) : !flat.length ? /* @__PURE__ */ jsx("p", { className: "px-2 py-8 text-center text-sm text-muted-foreground", children: `No results for "${query}"` }) : Object.entries(groups).map(([section, items]) => /* @__PURE__ */ jsxs("div", { className: "mb-1", children: [
|
|
2661
2657
|
/* @__PURE__ */ jsx("p", { className: "px-2 py-1.5 text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: section }),
|
|
2662
2658
|
items.map(({ result, index }) => /* @__PURE__ */ jsxs(
|
|
2663
2659
|
"button",
|
|
@@ -3470,10 +3466,10 @@ function SidebarProvider({
|
|
|
3470
3466
|
const isMobile = useIsMobile();
|
|
3471
3467
|
const [openMobile, setOpenMobile] = React6.useState(false);
|
|
3472
3468
|
const [_open, _setOpen] = React6.useState(defaultOpen);
|
|
3473
|
-
const
|
|
3469
|
+
const open2 = openProp ?? _open;
|
|
3474
3470
|
const setOpen = React6.useCallback(
|
|
3475
3471
|
(value) => {
|
|
3476
|
-
const openState = typeof value === "function" ? value(
|
|
3472
|
+
const openState = typeof value === "function" ? value(open2) : value;
|
|
3477
3473
|
if (setOpenProp) {
|
|
3478
3474
|
setOpenProp(openState);
|
|
3479
3475
|
} else {
|
|
@@ -3481,10 +3477,10 @@ function SidebarProvider({
|
|
|
3481
3477
|
}
|
|
3482
3478
|
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
3483
3479
|
},
|
|
3484
|
-
[setOpenProp,
|
|
3480
|
+
[setOpenProp, open2]
|
|
3485
3481
|
);
|
|
3486
3482
|
const toggleSidebar = React6.useCallback(() => {
|
|
3487
|
-
return isMobile ? setOpenMobile((
|
|
3483
|
+
return isMobile ? setOpenMobile((open3) => !open3) : setOpen((open3) => !open3);
|
|
3488
3484
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
3489
3485
|
React6.useEffect(() => {
|
|
3490
3486
|
const handleKeyDown = (event) => {
|
|
@@ -3496,18 +3492,18 @@ function SidebarProvider({
|
|
|
3496
3492
|
window.addEventListener("keydown", handleKeyDown);
|
|
3497
3493
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
3498
3494
|
}, [toggleSidebar]);
|
|
3499
|
-
const state =
|
|
3495
|
+
const state = open2 ? "expanded" : "collapsed";
|
|
3500
3496
|
const contextValue = React6.useMemo(
|
|
3501
3497
|
() => ({
|
|
3502
3498
|
state,
|
|
3503
|
-
open,
|
|
3499
|
+
open: open2,
|
|
3504
3500
|
setOpen,
|
|
3505
3501
|
isMobile,
|
|
3506
3502
|
openMobile,
|
|
3507
3503
|
setOpenMobile,
|
|
3508
3504
|
toggleSidebar
|
|
3509
3505
|
}),
|
|
3510
|
-
[state,
|
|
3506
|
+
[state, open2, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
3511
3507
|
);
|
|
3512
3508
|
return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
|
|
3513
3509
|
"div",
|
|
@@ -4047,6 +4043,7 @@ function SidebarNavigation({
|
|
|
4047
4043
|
nodes,
|
|
4048
4044
|
currentPath,
|
|
4049
4045
|
language: _language = "en",
|
|
4046
|
+
onNavigateLeaf,
|
|
4050
4047
|
translations: translations2 = {}
|
|
4051
4048
|
}) {
|
|
4052
4049
|
const { toggleFolder = "Toggle folder" } = translations2;
|
|
@@ -4054,65 +4051,76 @@ function SidebarNavigation({
|
|
|
4054
4051
|
if (!node.websitePath) return null;
|
|
4055
4052
|
const isActive = isActiveNode(node, currentPath);
|
|
4056
4053
|
const hasActiveChildNode = hasActiveChild(node, currentPath);
|
|
4057
|
-
return node.children && Object.keys(node.children).length > 0 ? /* @__PURE__ */ jsx(
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
{
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
children
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4054
|
+
return node.children && Object.keys(node.children).length > 0 ? /* @__PURE__ */ jsx(
|
|
4055
|
+
Collapsible,
|
|
4056
|
+
{
|
|
4057
|
+
defaultOpen: isActive || hasActiveChildNode,
|
|
4058
|
+
className: "group/collapsible",
|
|
4059
|
+
children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsxs(SidebarMenuItem, { children: [
|
|
4060
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-nowrap items-center gap-2", children: [
|
|
4061
|
+
/* @__PURE__ */ jsxs(
|
|
4062
|
+
Link3,
|
|
4063
|
+
{
|
|
4064
|
+
href: node.websitePath,
|
|
4065
|
+
className: `group/row relative flex flex-nowrap items-center gap-2 flex-auto py-1.5 pl-3 pr-2 rounded-md text-sm transition-colors hover:bg-accent ${isActive ? "bg-accent font-medium text-foreground before:absolute before:inset-y-1 before:left-0 before:w-0.5 before:rounded-full before:bg-foreground" : hasActiveChildNode ? "text-foreground" : "text-muted-foreground hover:text-foreground"}`,
|
|
4066
|
+
children: [
|
|
4067
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-none", children: [
|
|
4068
|
+
/* @__PURE__ */ jsx(FolderOpenIcon, { className: "h-4 w-4 group-data-[state=closed]/collapsible:hidden" }),
|
|
4069
|
+
/* @__PURE__ */ jsx(FolderClosedIcon, { className: "h-4 w-4 group-data-[state=open]/collapsible:hidden" })
|
|
4070
|
+
] }),
|
|
4071
|
+
/* @__PURE__ */ jsx("span", { className: `flex-auto ${isActive ? "font-medium" : ""}`, children: node.title })
|
|
4072
|
+
]
|
|
4073
|
+
}
|
|
4074
|
+
),
|
|
4075
|
+
/* @__PURE__ */ jsxs(
|
|
4076
|
+
CollapsibleTrigger2,
|
|
4077
|
+
{
|
|
4078
|
+
className: "p-1.5 rounded-md text-muted-foreground/70 transition-colors hover:bg-accent hover:text-foreground self-center",
|
|
4079
|
+
"aria-label": `${toggleFolder}: ${node.title}`,
|
|
4080
|
+
children: [
|
|
4081
|
+
/* @__PURE__ */ jsx(
|
|
4082
|
+
ChevronRight,
|
|
4083
|
+
{
|
|
4084
|
+
className: "h-4 w-4 group-data-[state=open]/collapsible:hidden",
|
|
4085
|
+
"aria-hidden": "true"
|
|
4086
|
+
}
|
|
4087
|
+
),
|
|
4088
|
+
/* @__PURE__ */ jsx(
|
|
4089
|
+
ChevronDown,
|
|
4090
|
+
{
|
|
4091
|
+
className: "h-4 w-4 group-data-[state=closed]/collapsible:hidden",
|
|
4092
|
+
"aria-hidden": "true"
|
|
4093
|
+
}
|
|
4094
|
+
)
|
|
4095
|
+
]
|
|
4096
|
+
}
|
|
4097
|
+
)
|
|
4098
|
+
] }),
|
|
4099
|
+
/* @__PURE__ */ jsx(CollapsibleContent2, { children: /* @__PURE__ */ jsx(SidebarMenuSub, { children: Object.entries(node.children || {}).map(([, child]) => {
|
|
4100
|
+
if (!child.websitePath) return null;
|
|
4101
|
+
const isChildActive = isActiveNode(child, currentPath);
|
|
4102
|
+
const childIsLeaf = !child.children || Object.keys(child.children).length === 0;
|
|
4103
|
+
return /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxs(
|
|
4104
|
+
Link3,
|
|
4105
|
+
{
|
|
4106
|
+
href: child.websitePath,
|
|
4107
|
+
onClick: childIsLeaf ? onNavigateLeaf : void 0,
|
|
4108
|
+
className: `group/row relative flex items-center gap-2 py-1.5 pl-3 pr-2 rounded-md text-sm transition-colors hover:bg-accent ${isChildActive ? "bg-accent font-medium text-foreground before:absolute before:inset-y-1 before:left-0 before:w-0.5 before:rounded-full before:bg-foreground" : "text-muted-foreground hover:text-foreground"}`,
|
|
4109
|
+
children: [
|
|
4110
|
+
child.children && Object.keys(child.children).length > 0 ? /* @__PURE__ */ jsx(FolderClosedIcon, { className: "h-4 w-4 flex-none" }) : /* @__PURE__ */ jsx(FileTextIcon, { className: "h-4 w-4 flex-none" }),
|
|
4111
|
+
/* @__PURE__ */ jsx("span", { className: "", children: child.title })
|
|
4112
|
+
]
|
|
4113
|
+
}
|
|
4114
|
+
) }, child.websitePath);
|
|
4115
|
+
}) }) })
|
|
4116
|
+
] }, node.websitePath) }, `menu-${node.websitePath}`)
|
|
4117
|
+
},
|
|
4118
|
+
node.websitePath
|
|
4119
|
+
) : /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxs(
|
|
4113
4120
|
Link3,
|
|
4114
4121
|
{
|
|
4115
4122
|
href: node.websitePath,
|
|
4123
|
+
onClick: onNavigateLeaf,
|
|
4116
4124
|
className: `group/row relative flex items-center gap-2 py-1.5 pl-3 pr-2 rounded-md text-sm transition-colors hover:bg-accent ${isActive ? "bg-accent font-medium text-foreground before:absolute before:inset-y-1 before:left-0 before:w-0.5 before:rounded-full before:bg-foreground" : "text-muted-foreground hover:text-foreground"}`,
|
|
4117
4125
|
children: [
|
|
4118
4126
|
/* @__PURE__ */ jsx(FileTextIcon, { className: "h-4 w-4 flex-none" }),
|
|
@@ -4122,7 +4130,34 @@ function SidebarNavigation({
|
|
|
4122
4130
|
) }, node.websitePath) }, `menu-${node.websitePath}`);
|
|
4123
4131
|
}) }) });
|
|
4124
4132
|
}
|
|
4133
|
+
var open = false;
|
|
4134
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
4135
|
+
function emit() {
|
|
4136
|
+
for (const listener of listeners) listener();
|
|
4137
|
+
}
|
|
4138
|
+
function setMobileMenuOpen(value) {
|
|
4139
|
+
if (open === value) return;
|
|
4140
|
+
open = value;
|
|
4141
|
+
emit();
|
|
4142
|
+
}
|
|
4143
|
+
function subscribe(listener) {
|
|
4144
|
+
listeners.add(listener);
|
|
4145
|
+
return () => {
|
|
4146
|
+
listeners.delete(listener);
|
|
4147
|
+
};
|
|
4148
|
+
}
|
|
4149
|
+
function getSnapshot() {
|
|
4150
|
+
return open;
|
|
4151
|
+
}
|
|
4152
|
+
function getServerSnapshot() {
|
|
4153
|
+
return false;
|
|
4154
|
+
}
|
|
4155
|
+
function useMobileMenuOpen() {
|
|
4156
|
+
const value = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
4157
|
+
return [value, setMobileMenuOpen];
|
|
4158
|
+
}
|
|
4125
4159
|
function MobileMenu({ pageData, translations: translations2 = {} }) {
|
|
4160
|
+
const [open2, setOpen] = useMobileMenuOpen();
|
|
4126
4161
|
if (!pageData) {
|
|
4127
4162
|
return null;
|
|
4128
4163
|
}
|
|
@@ -4132,7 +4167,7 @@ function MobileMenu({ pageData, translations: translations2 = {} }) {
|
|
|
4132
4167
|
mobileMenuDescription = "Mobile navigation menu"
|
|
4133
4168
|
} = translations2;
|
|
4134
4169
|
const { sidebar, navigation: nav, computed } = pageData;
|
|
4135
|
-
return /* @__PURE__ */ jsx("div", { className: "lg:hidden", children: /* @__PURE__ */ jsxs(Drawer, { direction: "right", children: [
|
|
4170
|
+
return /* @__PURE__ */ jsx("div", { className: "lg:hidden", children: /* @__PURE__ */ jsxs(Drawer, { direction: "right", open: open2, onOpenChange: setOpen, children: [
|
|
4136
4171
|
/* @__PURE__ */ jsx(DrawerTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "icon", className: "h-9 w-9", children: [
|
|
4137
4172
|
/* @__PURE__ */ jsx(Menu, { className: "h-4 w-4" }),
|
|
4138
4173
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: openMobileMenu })
|
|
@@ -4167,7 +4202,8 @@ function MobileMenu({ pageData, translations: translations2 = {} }) {
|
|
|
4167
4202
|
{
|
|
4168
4203
|
nodes: sidebar.items,
|
|
4169
4204
|
currentPath: `/${computed.lang}/docs/${computed.path}`,
|
|
4170
|
-
language: computed.lang
|
|
4205
|
+
language: computed.lang,
|
|
4206
|
+
onNavigateLeaf: () => setOpen(false)
|
|
4171
4207
|
}
|
|
4172
4208
|
)
|
|
4173
4209
|
] })
|
|
@@ -4399,7 +4435,10 @@ function GithubContributors({
|
|
|
4399
4435
|
return null;
|
|
4400
4436
|
}
|
|
4401
4437
|
return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
|
|
4402
|
-
/* @__PURE__ */
|
|
4438
|
+
/* @__PURE__ */ jsxs("h3", { className: "mb-3 flex items-center gap-2 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: [
|
|
4439
|
+
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "size-3.5", children: /* @__PURE__ */ jsx("path", { d: "M16 19a4 4 0 0 0-8 0M12 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6M20 19a3.5 3.5 0 0 0-5-3.2M18.5 10.3a2.6 2.6 0 0 0 0-4.6" }) }),
|
|
4440
|
+
contributorsLabel
|
|
4441
|
+
] }),
|
|
4403
4442
|
/* @__PURE__ */ jsxs("div", { className: "isolate flex -space-x-2 overflow-hidden pl-1", children: [
|
|
4404
4443
|
contributors.slice(0, 8).map((contributor, index) => /* @__PURE__ */ jsx(
|
|
4405
4444
|
Link3,
|
|
@@ -4539,7 +4578,7 @@ function useMediaQuery(query) {
|
|
|
4539
4578
|
return value;
|
|
4540
4579
|
}
|
|
4541
4580
|
function BreadcrumbToggle({ overflowItems, className }) {
|
|
4542
|
-
const [
|
|
4581
|
+
const [open2, setOpen] = React6.useState(false);
|
|
4543
4582
|
const isDesktop = useMediaQuery("(min-width: 768px)");
|
|
4544
4583
|
const handleOverflowItemClick = useCallback(() => {
|
|
4545
4584
|
setOpen(false);
|
|
@@ -4547,7 +4586,7 @@ function BreadcrumbToggle({ overflowItems, className }) {
|
|
|
4547
4586
|
if (overflowItems.length === 0) {
|
|
4548
4587
|
return null;
|
|
4549
4588
|
}
|
|
4550
|
-
return /* @__PURE__ */ jsx(BreadcrumbItem, { className, children: isDesktop ? /* @__PURE__ */ jsxs(DropdownMenu, { open, onOpenChange: setOpen, children: [
|
|
4589
|
+
return /* @__PURE__ */ jsx(BreadcrumbItem, { className, children: isDesktop ? /* @__PURE__ */ jsxs(DropdownMenu, { open: open2, onOpenChange: setOpen, children: [
|
|
4551
4590
|
/* @__PURE__ */ jsxs(
|
|
4552
4591
|
DropdownMenuTrigger,
|
|
4553
4592
|
{
|
|
@@ -4568,7 +4607,7 @@ function BreadcrumbToggle({ overflowItems, className }) {
|
|
|
4568
4607
|
children: item.label
|
|
4569
4608
|
}
|
|
4570
4609
|
) }) }, index)) })
|
|
4571
|
-
] }) : /* @__PURE__ */ jsxs(Drawer, { open, onOpenChange: setOpen, children: [
|
|
4610
|
+
] }) : /* @__PURE__ */ jsxs(Drawer, { open: open2, onOpenChange: setOpen, children: [
|
|
4572
4611
|
/* @__PURE__ */ jsx(DrawerTrigger, { "aria-label": "Show more breadcrumb items", children: /* @__PURE__ */ jsx(BreadcrumbEllipsis, { className: "h-4 w-4" }) }),
|
|
4573
4612
|
/* @__PURE__ */ jsxs(DrawerContent, { children: [
|
|
4574
4613
|
/* @__PURE__ */ jsx("div", { className: "grid gap-1 p-4 overflow-y-auto", children: overflowItems.map((item, index) => /* @__PURE__ */ jsx(
|