@hanzo/ui 5.3.22 → 5.3.24

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.
@@ -8,7 +8,7 @@ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
8
8
  import { Slot } from '@radix-ui/react-slot';
9
9
  import { cva } from 'class-variance-authority';
10
10
  import * as React2 from 'react';
11
- import React2__default, { useRef, useImperativeHandle, useEffect, useState, cloneElement, useMemo } from 'react';
11
+ import React2__default, { createContext, useRef, useImperativeHandle, useEffect, useState, cloneElement, useMemo, Fragment as Fragment$1, use, useEffectEvent } from 'react';
12
12
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
13
13
  import useEmblaCarousel from 'embla-carousel-react';
14
14
  import { Command as Command$1 } from 'cmdk';
@@ -45,13 +45,63 @@ import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
45
45
  import NextImage from 'next/image';
46
46
  import Link2 from 'next/link';
47
47
  import Spline from '@splinetool/react-spline';
48
+ import { Sidebar as Sidebar$1, ChevronRight as ChevronRight$1, Text, Edit, Languages, Sun, Moon as Moon$1, Airplay, ChevronDown as ChevronDown$1, ChevronLeft } from '@icons';
49
+ import { cn as cn$1 } from '@/utils/cn';
50
+ import { buttonVariants as buttonVariants$1 } from '@/components/ui/button';
51
+ import * as Base from '@/components/sidebar/base';
52
+ import { useSidebar } from '@/components/sidebar/base';
53
+ import { createPageTreeRenderer } from '@/components/sidebar/page-tree';
54
+ import { createLinkItemRenderer } from '@/components/sidebar/link-item';
55
+ import { SearchToggle, LargeSearchToggle } from '@/layouts/shared/search-toggle';
56
+ import { mergeRefs } from '@/utils/merge-refs';
57
+ import { resolveLinkItems } from '@/layouts/shared';
58
+ import { LinkItem } from '@/layouts/shared/link-item';
59
+ import { LanguageToggle, LanguageToggleText } from '@/layouts/shared/language-toggle';
60
+ import { Image, usePathname } from '@hanzo/docs-core/framework';
61
+ import { isTabActive, isActive } from '@/utils/is-active';
62
+ import Link5 from '@hanzo/docs-core/link';
63
+ import { useIsScrollTop } from '@/utils/use-is-scroll-top';
64
+ import { TreeContextProvider, useTreePath, useTreeContext } from '@/contexts/tree';
65
+ import { getSidebarTabs } from '@/components/sidebar/tabs';
66
+ import { SidebarTabsDropdown } from '@/components/sidebar/tabs/dropdown';
67
+ import { Header } from '@/layouts/home/client';
68
+ import '@/components/ui/popover';
69
+ import { useI18n, I18nLabel } from '@/contexts/i18n';
70
+ import { getBreadcrumbItemsFromPath } from '@hanzo/docs-core/breadcrumb';
71
+ import { Collapsible as Collapsible$1, CollapsibleTrigger, CollapsibleContent } from '@/components/ui/collapsible';
72
+ import { TOCScrollArea, TOCProvider, useTOCItems } from '@/components/toc';
73
+ import { useActiveAnchor } from '@hanzo/docs-core/toc';
74
+ import { useFooterItems } from '@/utils/use-footer-items';
75
+ import * as TocDefault from '@/components/toc/default';
76
+ import * as TocClerk from '@/components/toc/clerk';
77
+ import { Cards, Card as Card$1 } from '@/components/card';
78
+ import { CalloutDescription, CalloutTitle, CalloutContainer, Callout } from '@/components/callout';
79
+ import { Heading } from '@/components/heading';
80
+ import { CodeBlockTabsTrigger, CodeBlockTabsList, CodeBlockTabs, CodeBlockTab, CodeBlock, Pre } from '@/components/codeblock';
81
+ import { RootProvider as RootProvider$1 } from '@/provider/base';
82
+ import { NextProvider } from '@hanzo/docs-core/framework/next';
83
+ import * as source_star from '@hanzo/docs-core/source';
84
+ import { loader } from '@hanzo/docs-core/source';
85
+ export { loader } from '@hanzo/docs-core/source';
48
86
 
49
87
  var __defProp = Object.defineProperty;
88
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
89
+ var __getOwnPropNames = Object.getOwnPropertyNames;
90
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
50
91
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
51
92
  var __export = (target, all) => {
52
93
  for (var name in all)
53
94
  __defProp(target, name, { get: all[name], enumerable: true });
54
95
  };
96
+ var __copyProps = (to, from, except, desc) => {
97
+ if (from && typeof from === "object" || typeof from === "function") {
98
+ for (let key of __getOwnPropNames(from))
99
+ if (!__hasOwnProp.call(to, key) && key !== except)
100
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
101
+ }
102
+ return to;
103
+ };
104
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget);
55
105
  function cn(...inputs) {
56
106
  return twMerge(clsx(inputs));
57
107
  }
@@ -1480,14 +1530,14 @@ var InputOTPGroup = React2.forwardRef(({ className, ...props }, ref) => /* @__PU
1480
1530
  InputOTPGroup.displayName = "InputOTPGroup";
1481
1531
  var InputOTPSlot = React2.forwardRef(({ index, className, ...props }, ref) => {
1482
1532
  const inputOTPContext = React2.useContext(OTPInputContext);
1483
- const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
1533
+ const { char, hasFakeCaret, isActive: isActive3 } = inputOTPContext.slots[index];
1484
1534
  return /* @__PURE__ */ jsxs(
1485
1535
  "div",
1486
1536
  {
1487
1537
  ref,
1488
1538
  className: cn(
1489
1539
  "relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
1490
- isActive && "z-10 ring-1 ring-ring",
1540
+ isActive3 && "z-10 ring-1 ring-ring",
1491
1541
  className
1492
1542
  ),
1493
1543
  ...props,
@@ -8083,5 +8133,1653 @@ var HanzoIcon = /* @__PURE__ */ __name(({ className }) => {
8083
8133
  }
8084
8134
  );
8085
8135
  }, "HanzoIcon");
8136
+ var itemVariants = cva(
8137
+ "relative flex flex-row items-center gap-2 rounded-lg p-2 text-start text-fd-muted-foreground wrap-anywhere [&_svg]:size-4 [&_svg]:shrink-0",
8138
+ {
8139
+ variants: {
8140
+ variant: {
8141
+ link: "transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none data-[active=true]:bg-fd-primary/10 data-[active=true]:text-fd-primary data-[active=true]:hover:transition-colors",
8142
+ button: "transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none"
8143
+ },
8144
+ highlight: {
8145
+ true: "data-[active=true]:before:content-[''] data-[active=true]:before:bg-fd-primary data-[active=true]:before:absolute data-[active=true]:before:w-px data-[active=true]:before:inset-y-2.5 data-[active=true]:before:start-2.5"
8146
+ }
8147
+ }
8148
+ }
8149
+ );
8150
+ function getItemOffset(depth) {
8151
+ return `calc(${2 + 3 * depth} * var(--spacing))`;
8152
+ }
8153
+ __name(getItemOffset, "getItemOffset");
8154
+ var Sidebar = Base.SidebarProvider;
8155
+ var SidebarFolder2 = Base.SidebarFolder;
8156
+ var SidebarCollapseTrigger2 = Base.SidebarCollapseTrigger;
8157
+ var SidebarViewport2 = Base.SidebarViewport;
8158
+ var SidebarTrigger2 = Base.SidebarTrigger;
8159
+ function SidebarContent2({
8160
+ ref: refProp,
8161
+ className,
8162
+ children,
8163
+ ...props
8164
+ }) {
8165
+ const ref = useRef(null);
8166
+ return /* @__PURE__ */ jsx(Base.SidebarContent, { children: ({ collapsed, hovered, ref: asideRef, ...rest }) => /* @__PURE__ */ jsxs(Fragment, { children: [
8167
+ /* @__PURE__ */ jsxs(
8168
+ "div",
8169
+ {
8170
+ "data-sidebar-placeholder": "",
8171
+ className: "sticky top-(--fd-docs-row-1) z-20 [grid-area:sidebar] pointer-events-none *:pointer-events-auto h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] md:layout:[--fd-sidebar-width:268px] max-md:hidden",
8172
+ children: [
8173
+ collapsed && /* @__PURE__ */ jsx("div", { className: "absolute start-0 inset-y-0 w-4", ...rest }),
8174
+ /* @__PURE__ */ jsx(
8175
+ "aside",
8176
+ {
8177
+ id: "nd-sidebar",
8178
+ ref: mergeRefs(ref, refProp, asideRef),
8179
+ "data-collapsed": collapsed,
8180
+ "data-hovered": collapsed && hovered,
8181
+ className: cn$1(
8182
+ "absolute flex flex-col w-full start-0 inset-y-0 items-end bg-fd-card text-sm border-e duration-250 *:w-(--fd-sidebar-width)",
8183
+ collapsed && [
8184
+ "inset-y-2 rounded-xl transition-transform border w-(--fd-sidebar-width)",
8185
+ hovered ? "shadow-lg translate-x-2 rtl:-translate-x-2" : "-translate-x-(--fd-sidebar-width) rtl:translate-x-full"
8186
+ ],
8187
+ ref.current && ref.current.getAttribute("data-collapsed") === "true" !== collapsed && "transition-[width,inset-block,translate,background-color]",
8188
+ className
8189
+ ),
8190
+ ...props,
8191
+ ...rest,
8192
+ children
8193
+ }
8194
+ )
8195
+ ]
8196
+ }
8197
+ ),
8198
+ /* @__PURE__ */ jsxs(
8199
+ "div",
8200
+ {
8201
+ "data-sidebar-panel": "",
8202
+ className: cn$1(
8203
+ "fixed flex top-[calc(--spacing(4)+var(--fd-toc-popover-height))] start-4 shadow-lg transition-opacity rounded-xl p-0.5 border bg-fd-muted text-fd-muted-foreground z-10",
8204
+ (!collapsed || hovered) && "pointer-events-none opacity-0"
8205
+ ),
8206
+ children: [
8207
+ /* @__PURE__ */ jsx(
8208
+ SidebarCollapseTrigger2,
8209
+ {
8210
+ className: cn$1(
8211
+ buttonVariants$1({
8212
+ color: "ghost",
8213
+ size: "icon-sm",
8214
+ className: "rounded-lg"
8215
+ })
8216
+ ),
8217
+ children: /* @__PURE__ */ jsx(Sidebar$1, {})
8218
+ }
8219
+ ),
8220
+ /* @__PURE__ */ jsx(SearchToggle, { className: "rounded-lg", hideIfDisabled: true })
8221
+ ]
8222
+ }
8223
+ )
8224
+ ] }) });
8225
+ }
8226
+ __name(SidebarContent2, "SidebarContent");
8227
+ function SidebarDrawer({
8228
+ children,
8229
+ className,
8230
+ ...props
8231
+ }) {
8232
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
8233
+ /* @__PURE__ */ jsx(Base.SidebarDrawerOverlay, { className: "fixed z-40 inset-0 backdrop-blur-xs data-[state=open]:animate-fd-fade-in data-[state=closed]:animate-fd-fade-out" }),
8234
+ /* @__PURE__ */ jsx(
8235
+ Base.SidebarDrawerContent,
8236
+ {
8237
+ className: cn$1(
8238
+ "fixed text-[0.9375rem] flex flex-col shadow-lg border-s end-0 inset-y-0 w-[85%] max-w-[380px] z-40 bg-fd-background data-[state=open]:animate-fd-sidebar-in data-[state=closed]:animate-fd-sidebar-out",
8239
+ className
8240
+ ),
8241
+ ...props,
8242
+ children
8243
+ }
8244
+ )
8245
+ ] });
8246
+ }
8247
+ __name(SidebarDrawer, "SidebarDrawer");
8248
+ function SidebarSeparator2({
8249
+ className,
8250
+ style,
8251
+ children,
8252
+ ...props
8253
+ }) {
8254
+ const depth = Base.useFolderDepth();
8255
+ return /* @__PURE__ */ jsx(
8256
+ Base.SidebarSeparator,
8257
+ {
8258
+ className: cn$1("[&_svg]:size-4 [&_svg]:shrink-0", className),
8259
+ style: {
8260
+ paddingInlineStart: getItemOffset(depth),
8261
+ ...style
8262
+ },
8263
+ ...props,
8264
+ children
8265
+ }
8266
+ );
8267
+ }
8268
+ __name(SidebarSeparator2, "SidebarSeparator");
8269
+ function SidebarItem2({
8270
+ className,
8271
+ style,
8272
+ children,
8273
+ ...props
8274
+ }) {
8275
+ const depth = Base.useFolderDepth();
8276
+ return /* @__PURE__ */ jsx(
8277
+ Base.SidebarItem,
8278
+ {
8279
+ className: cn$1(
8280
+ itemVariants({ variant: "link", highlight: depth >= 1 }),
8281
+ className
8282
+ ),
8283
+ style: {
8284
+ paddingInlineStart: getItemOffset(depth),
8285
+ ...style
8286
+ },
8287
+ ...props,
8288
+ children
8289
+ }
8290
+ );
8291
+ }
8292
+ __name(SidebarItem2, "SidebarItem");
8293
+ function SidebarFolderTrigger2({
8294
+ className,
8295
+ style,
8296
+ ...props
8297
+ }) {
8298
+ const { depth, collapsible } = Base.useFolder();
8299
+ return /* @__PURE__ */ jsx(
8300
+ Base.SidebarFolderTrigger,
8301
+ {
8302
+ className: cn$1(
8303
+ itemVariants({ variant: collapsible ? "button" : null }),
8304
+ "w-full",
8305
+ className
8306
+ ),
8307
+ style: {
8308
+ paddingInlineStart: getItemOffset(depth - 1),
8309
+ ...style
8310
+ },
8311
+ ...props,
8312
+ children: props.children
8313
+ }
8314
+ );
8315
+ }
8316
+ __name(SidebarFolderTrigger2, "SidebarFolderTrigger");
8317
+ function SidebarFolderLink2({
8318
+ className,
8319
+ style,
8320
+ ...props
8321
+ }) {
8322
+ const depth = Base.useFolderDepth();
8323
+ return /* @__PURE__ */ jsx(
8324
+ Base.SidebarFolderLink,
8325
+ {
8326
+ className: cn$1(
8327
+ itemVariants({ variant: "link", highlight: depth > 1 }),
8328
+ "w-full",
8329
+ className
8330
+ ),
8331
+ style: {
8332
+ paddingInlineStart: getItemOffset(depth - 1),
8333
+ ...style
8334
+ },
8335
+ ...props,
8336
+ children: props.children
8337
+ }
8338
+ );
8339
+ }
8340
+ __name(SidebarFolderLink2, "SidebarFolderLink");
8341
+ function SidebarFolderContent2({
8342
+ className,
8343
+ children,
8344
+ ...props
8345
+ }) {
8346
+ const depth = Base.useFolderDepth();
8347
+ return /* @__PURE__ */ jsx(
8348
+ Base.SidebarFolderContent,
8349
+ {
8350
+ className: cn$1(
8351
+ "relative",
8352
+ depth === 1 && "before:content-[''] before:absolute before:w-px before:inset-y-1 before:bg-fd-border before:start-2.5",
8353
+ className
8354
+ ),
8355
+ ...props,
8356
+ children
8357
+ }
8358
+ );
8359
+ }
8360
+ __name(SidebarFolderContent2, "SidebarFolderContent");
8361
+ var SidebarPageTree = createPageTreeRenderer({
8362
+ SidebarFolder: SidebarFolder2,
8363
+ SidebarFolderContent: SidebarFolderContent2,
8364
+ SidebarFolderLink: SidebarFolderLink2,
8365
+ SidebarFolderTrigger: SidebarFolderTrigger2,
8366
+ SidebarItem: SidebarItem2,
8367
+ SidebarSeparator: SidebarSeparator2
8368
+ });
8369
+ var SidebarLinkItem = createLinkItemRenderer({
8370
+ SidebarFolder: SidebarFolder2,
8371
+ SidebarFolderContent: SidebarFolderContent2,
8372
+ SidebarFolderLink: SidebarFolderLink2,
8373
+ SidebarFolderTrigger: SidebarFolderTrigger2,
8374
+ SidebarItem: SidebarItem2
8375
+ });
8376
+ var LayoutContext = createContext(null);
8377
+ function LayoutContextProvider({
8378
+ navTransparentMode = "none",
8379
+ children
8380
+ }) {
8381
+ const isTop = useIsScrollTop({ enabled: navTransparentMode === "top" }) ?? true;
8382
+ const isNavTransparent = navTransparentMode === "top" ? isTop : navTransparentMode === "always";
8383
+ return /* @__PURE__ */ jsx(
8384
+ LayoutContext,
8385
+ {
8386
+ value: useMemo(
8387
+ () => ({
8388
+ isNavTransparent
8389
+ }),
8390
+ [isNavTransparent]
8391
+ ),
8392
+ children
8393
+ }
8394
+ );
8395
+ }
8396
+ __name(LayoutContextProvider, "LayoutContextProvider");
8397
+ function LayoutHeader(props) {
8398
+ const { isNavTransparent } = use(LayoutContext);
8399
+ return /* @__PURE__ */ jsx("header", { "data-transparent": isNavTransparent, ...props, children: props.children });
8400
+ }
8401
+ __name(LayoutHeader, "LayoutHeader");
8402
+ function LayoutBody({
8403
+ className,
8404
+ style,
8405
+ children,
8406
+ ...props
8407
+ }) {
8408
+ const { collapsed } = useSidebar();
8409
+ return /* @__PURE__ */ jsx(
8410
+ "div",
8411
+ {
8412
+ id: "nd-docs-layout",
8413
+ className: cn$1(
8414
+ "grid transition-[grid-template-columns] overflow-x-clip min-h-(--fd-docs-height) auto-cols-auto auto-rows-auto [--fd-docs-height:100dvh] [--fd-header-height:0px] [--fd-toc-popover-height:0px] [--fd-sidebar-width:0px] [--fd-toc-width:0px]",
8415
+ className
8416
+ ),
8417
+ "data-sidebar-collapsed": collapsed,
8418
+ style: {
8419
+ gridTemplate: `"sidebar header toc"
8420
+ "sidebar toc-popover toc"
8421
+ "sidebar main toc" 1fr / minmax(var(--fd-sidebar-col), 1fr) minmax(0, calc(var(--fd-layout-width,97rem) - var(--fd-sidebar-width) - var(--fd-toc-width))) minmax(min-content, 1fr)`,
8422
+ "--fd-docs-row-1": "var(--fd-banner-height, 0px)",
8423
+ "--fd-docs-row-2": "calc(var(--fd-docs-row-1) + var(--fd-header-height))",
8424
+ "--fd-docs-row-3": "calc(var(--fd-docs-row-2) + var(--fd-toc-popover-height))",
8425
+ "--fd-sidebar-col": collapsed ? "0px" : "var(--fd-sidebar-width)",
8426
+ ...style
8427
+ },
8428
+ ...props,
8429
+ children
8430
+ }
8431
+ );
8432
+ }
8433
+ __name(LayoutBody, "LayoutBody");
8434
+ function LayoutTabs({
8435
+ options,
8436
+ ...props
8437
+ }) {
8438
+ const pathname = usePathname();
8439
+ const selected = useMemo(() => {
8440
+ return options.findLast((option) => isTabActive(option, pathname));
8441
+ }, [options, pathname]);
8442
+ return /* @__PURE__ */ jsx(
8443
+ "div",
8444
+ {
8445
+ ...props,
8446
+ className: cn$1(
8447
+ "flex flex-row items-end gap-6 overflow-auto [grid-area:main]",
8448
+ props.className
8449
+ ),
8450
+ children: options.map((option, i) => /* @__PURE__ */ jsx(
8451
+ Link5,
8452
+ {
8453
+ href: option.url,
8454
+ className: cn$1(
8455
+ "inline-flex border-b-2 border-transparent transition-colors items-center pb-1.5 font-medium gap-2 text-fd-muted-foreground text-sm text-nowrap hover:text-fd-accent-foreground",
8456
+ option.unlisted && selected !== option && "hidden",
8457
+ selected === option && "border-fd-primary text-fd-primary"
8458
+ ),
8459
+ children: option.title
8460
+ },
8461
+ i
8462
+ ))
8463
+ }
8464
+ );
8465
+ }
8466
+ __name(LayoutTabs, "LayoutTabs");
8467
+ var itemVariants2 = cva(
8468
+ "size-6.5 rounded-full p-1.5 text-fd-muted-foreground",
8469
+ {
8470
+ variants: {
8471
+ active: {
8472
+ true: "bg-fd-accent text-fd-accent-foreground",
8473
+ false: "text-fd-muted-foreground"
8474
+ }
8475
+ }
8476
+ }
8477
+ );
8478
+ var full = [
8479
+ ["light", Sun],
8480
+ ["dark", Moon$1],
8481
+ ["system", Airplay]
8482
+ ];
8483
+ function ThemeToggle({
8484
+ className,
8485
+ mode = "light-dark",
8486
+ ...props
8487
+ }) {
8488
+ const { setTheme, theme, resolvedTheme } = useTheme();
8489
+ const [mounted, setMounted] = useState(false);
8490
+ useEffect(() => {
8491
+ setMounted(true);
8492
+ }, []);
8493
+ const container = cn$1(
8494
+ "inline-flex items-center rounded-full border p-1",
8495
+ className
8496
+ );
8497
+ if (mode === "light-dark") {
8498
+ const value2 = mounted ? resolvedTheme : null;
8499
+ return /* @__PURE__ */ jsx(
8500
+ "button",
8501
+ {
8502
+ className: container,
8503
+ "aria-label": `Toggle Theme`,
8504
+ onClick: () => setTheme(value2 === "light" ? "dark" : "light"),
8505
+ "data-theme-toggle": "",
8506
+ children: full.map(([key, Icon2]) => {
8507
+ if (key === "system") return;
8508
+ return /* @__PURE__ */ jsx(
8509
+ Icon2,
8510
+ {
8511
+ fill: "currentColor",
8512
+ className: cn$1(itemVariants2({ active: value2 === key }))
8513
+ },
8514
+ key
8515
+ );
8516
+ })
8517
+ }
8518
+ );
8519
+ }
8520
+ const value = mounted ? theme : null;
8521
+ return /* @__PURE__ */ jsx("div", { className: container, "data-theme-toggle": "", ...props, children: full.map(([key, Icon2]) => /* @__PURE__ */ jsx(
8522
+ "button",
8523
+ {
8524
+ "aria-label": key,
8525
+ className: cn$1(itemVariants2({ active: value === key })),
8526
+ onClick: () => setTheme(key),
8527
+ children: /* @__PURE__ */ jsx(Icon2, { className: "size-full", fill: "currentColor" })
8528
+ },
8529
+ key
8530
+ )) });
8531
+ }
8532
+ __name(ThemeToggle, "ThemeToggle");
8533
+ function DocsLayout({
8534
+ nav: { transparentMode, ...nav } = {},
8535
+ sidebar: {
8536
+ tabs: sidebarTabs,
8537
+ enabled: sidebarEnabled = true,
8538
+ defaultOpenLevel,
8539
+ prefetch,
8540
+ ...sidebarProps
8541
+ } = {},
8542
+ searchToggle = {},
8543
+ themeSwitch = {},
8544
+ tabMode = "auto",
8545
+ i18n = false,
8546
+ children,
8547
+ tree,
8548
+ ...props
8549
+ }) {
8550
+ const tabs = useMemo(() => {
8551
+ if (Array.isArray(sidebarTabs)) {
8552
+ return sidebarTabs;
8553
+ }
8554
+ if (typeof sidebarTabs === "object") {
8555
+ return getSidebarTabs(tree, sidebarTabs);
8556
+ }
8557
+ if (sidebarTabs !== false) {
8558
+ return getSidebarTabs(tree);
8559
+ }
8560
+ return [];
8561
+ }, [tree, sidebarTabs]);
8562
+ const links = resolveLinkItems(props);
8563
+ function sidebar() {
8564
+ const {
8565
+ footer,
8566
+ banner,
8567
+ collapsible = true,
8568
+ component,
8569
+ components,
8570
+ ...rest
8571
+ } = sidebarProps;
8572
+ if (component) return component;
8573
+ const iconLinks = links.filter((item) => item.type === "icon");
8574
+ const viewport = /* @__PURE__ */ jsxs(SidebarViewport2, { children: [
8575
+ links.filter((v) => v.type !== "icon").map((item, i, list) => /* @__PURE__ */ jsx(
8576
+ SidebarLinkItem,
8577
+ {
8578
+ item,
8579
+ className: cn$1(i === list.length - 1 && "mb-4")
8580
+ },
8581
+ i
8582
+ )),
8583
+ /* @__PURE__ */ jsx(SidebarPageTree, { ...components })
8584
+ ] });
8585
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
8586
+ /* @__PURE__ */ jsxs(SidebarContent2, { ...rest, children: [
8587
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 p-4 pb-2", children: [
8588
+ /* @__PURE__ */ jsxs("div", { className: "flex", children: [
8589
+ /* @__PURE__ */ jsx(
8590
+ Link5,
8591
+ {
8592
+ href: nav.url ?? "/",
8593
+ className: "inline-flex text-[0.9375rem] items-center gap-2.5 font-medium me-auto",
8594
+ children: nav.title
8595
+ }
8596
+ ),
8597
+ nav.children,
8598
+ collapsible && /* @__PURE__ */ jsx(
8599
+ SidebarCollapseTrigger2,
8600
+ {
8601
+ className: cn$1(
8602
+ buttonVariants$1({
8603
+ color: "ghost",
8604
+ size: "icon-sm",
8605
+ className: "mb-auto text-fd-muted-foreground"
8606
+ })
8607
+ ),
8608
+ children: /* @__PURE__ */ jsx(Sidebar$1, {})
8609
+ }
8610
+ )
8611
+ ] }),
8612
+ searchToggle.enabled !== false && (searchToggle.components?.lg ?? /* @__PURE__ */ jsx(LargeSearchToggle, { hideIfDisabled: true })),
8613
+ tabs.length > 0 && tabMode === "auto" && /* @__PURE__ */ jsx(SidebarTabsDropdown, { options: tabs }),
8614
+ banner
8615
+ ] }),
8616
+ viewport,
8617
+ (i18n || iconLinks.length > 0 || themeSwitch?.enabled !== false || footer) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col border-t p-4 pt-2 empty:hidden", children: [
8618
+ /* @__PURE__ */ jsxs("div", { className: "flex text-fd-muted-foreground items-center empty:hidden", children: [
8619
+ i18n && /* @__PURE__ */ jsx(LanguageToggle, { children: /* @__PURE__ */ jsx(Languages, { className: "size-4.5" }) }),
8620
+ iconLinks.map((item, i) => /* @__PURE__ */ jsx(
8621
+ LinkItem,
8622
+ {
8623
+ item,
8624
+ className: cn$1(
8625
+ buttonVariants$1({ size: "icon-sm", color: "ghost" })
8626
+ ),
8627
+ "aria-label": item.label,
8628
+ children: item.icon
8629
+ },
8630
+ i
8631
+ )),
8632
+ themeSwitch.enabled !== false && (themeSwitch.component ?? /* @__PURE__ */ jsx(
8633
+ ThemeToggle,
8634
+ {
8635
+ className: "ms-auto p-0",
8636
+ mode: themeSwitch.mode
8637
+ }
8638
+ ))
8639
+ ] }),
8640
+ footer
8641
+ ] })
8642
+ ] }),
8643
+ /* @__PURE__ */ jsxs(SidebarDrawer, { children: [
8644
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 p-4 pb-2", children: [
8645
+ /* @__PURE__ */ jsxs("div", { className: "flex text-fd-muted-foreground items-center gap-1.5", children: [
8646
+ /* @__PURE__ */ jsx("div", { className: "flex flex-1", children: iconLinks.map((item, i) => /* @__PURE__ */ jsx(
8647
+ LinkItem,
8648
+ {
8649
+ item,
8650
+ className: cn$1(
8651
+ buttonVariants$1({
8652
+ size: "icon-sm",
8653
+ color: "ghost",
8654
+ className: "p-2"
8655
+ })
8656
+ ),
8657
+ "aria-label": item.label,
8658
+ children: item.icon
8659
+ },
8660
+ i
8661
+ )) }),
8662
+ i18n && /* @__PURE__ */ jsxs(LanguageToggle, { children: [
8663
+ /* @__PURE__ */ jsx(Languages, { className: "size-4.5" }),
8664
+ /* @__PURE__ */ jsx(LanguageToggleText, {})
8665
+ ] }),
8666
+ themeSwitch.enabled !== false && (themeSwitch.component ?? /* @__PURE__ */ jsx(ThemeToggle, { className: "p-0", mode: themeSwitch.mode })),
8667
+ /* @__PURE__ */ jsx(
8668
+ SidebarTrigger2,
8669
+ {
8670
+ className: cn$1(
8671
+ buttonVariants$1({
8672
+ color: "ghost",
8673
+ size: "icon-sm",
8674
+ className: "p-2"
8675
+ })
8676
+ ),
8677
+ children: /* @__PURE__ */ jsx(Sidebar$1, {})
8678
+ }
8679
+ )
8680
+ ] }),
8681
+ tabs.length > 0 && /* @__PURE__ */ jsx(SidebarTabsDropdown, { options: tabs }),
8682
+ banner
8683
+ ] }),
8684
+ viewport,
8685
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col border-t p-4 pt-2 empty:hidden", children: footer })
8686
+ ] })
8687
+ ] });
8688
+ }
8689
+ __name(sidebar, "sidebar");
8690
+ return /* @__PURE__ */ jsx(TreeContextProvider, { tree, children: /* @__PURE__ */ jsx(LayoutContextProvider, { navTransparentMode: transparentMode, children: /* @__PURE__ */ jsx(Sidebar, { defaultOpenLevel, prefetch, children: /* @__PURE__ */ jsxs(LayoutBody, { ...props.containerProps, children: [
8691
+ nav.enabled !== false && (nav.component ?? /* @__PURE__ */ jsxs(
8692
+ LayoutHeader,
8693
+ {
8694
+ id: "nd-subnav",
8695
+ className: "[grid-area:header] sticky top-(--fd-docs-row-1) z-30 flex items-center ps-4 pe-2.5 border-b transition-colors backdrop-blur-sm h-(--fd-header-height) md:hidden max-md:layout:[--fd-header-height:--spacing(14)] data-[transparent=false]:bg-fd-background/80",
8696
+ children: [
8697
+ /* @__PURE__ */ jsx(
8698
+ Link5,
8699
+ {
8700
+ href: nav.url ?? "/",
8701
+ className: "inline-flex items-center gap-2.5 font-semibold",
8702
+ children: nav.title
8703
+ }
8704
+ ),
8705
+ /* @__PURE__ */ jsx("div", { className: "flex-1", children: nav.children }),
8706
+ searchToggle.enabled !== false && (searchToggle.components?.sm ?? /* @__PURE__ */ jsx(SearchToggle, { className: "p-2", hideIfDisabled: true })),
8707
+ sidebarEnabled && /* @__PURE__ */ jsx(
8708
+ SidebarTrigger2,
8709
+ {
8710
+ className: cn$1(
8711
+ buttonVariants$1({
8712
+ color: "ghost",
8713
+ size: "icon-sm",
8714
+ className: "p-2"
8715
+ })
8716
+ ),
8717
+ children: /* @__PURE__ */ jsx(Sidebar$1, {})
8718
+ }
8719
+ )
8720
+ ]
8721
+ }
8722
+ )),
8723
+ sidebarEnabled && sidebar(),
8724
+ tabMode === "top" && tabs.length > 0 && /* @__PURE__ */ jsx(
8725
+ LayoutTabs,
8726
+ {
8727
+ options: tabs,
8728
+ className: "z-10 bg-fd-background border-b px-6 pt-3 xl:px-8 max-md:hidden"
8729
+ }
8730
+ ),
8731
+ children
8732
+ ] }) }) }) });
8733
+ }
8734
+ __name(DocsLayout, "DocsLayout");
8735
+ function HomeLayout(props) {
8736
+ const {
8737
+ nav = {},
8738
+ links,
8739
+ githubUrl,
8740
+ i18n,
8741
+ themeSwitch = {},
8742
+ searchToggle,
8743
+ ...rest
8744
+ } = props;
8745
+ return /* @__PURE__ */ jsxs(
8746
+ "main",
8747
+ {
8748
+ id: "nd-home-layout",
8749
+ ...rest,
8750
+ className: cn$1(
8751
+ "flex flex-1 flex-col [--fd-layout-width:1400px]",
8752
+ rest.className
8753
+ ),
8754
+ children: [
8755
+ nav.enabled !== false && (nav.component ?? /* @__PURE__ */ jsx(
8756
+ Header,
8757
+ {
8758
+ links,
8759
+ nav,
8760
+ themeSwitch,
8761
+ searchToggle,
8762
+ i18n,
8763
+ githubUrl
8764
+ }
8765
+ )),
8766
+ props.children
8767
+ ]
8768
+ }
8769
+ );
8770
+ }
8771
+ __name(HomeLayout, "HomeLayout");
8772
+ var LayoutContext2 = createContext(null);
8773
+
8774
+ // docs/layouts/docs/page/index.tsx
8775
+ var page_exports = {};
8776
+ __export(page_exports, {
8777
+ DocsBody: () => DocsBody,
8778
+ DocsDescription: () => DocsDescription,
8779
+ DocsPage: () => DocsPage,
8780
+ DocsTitle: () => DocsTitle,
8781
+ EditOnGitHub: () => EditOnGitHub,
8782
+ PageBreadcrumb: () => PageBreadcrumb,
8783
+ PageLastUpdate: () => PageLastUpdate
8784
+ });
8785
+ var TocPopoverContext = createContext(null);
8786
+ function PageTOCPopover({
8787
+ className,
8788
+ children,
8789
+ ...rest
8790
+ }) {
8791
+ const ref = useRef(null);
8792
+ const [open, setOpen] = useState(false);
8793
+ const { isNavTransparent } = use(LayoutContext);
8794
+ const onClick = useEffectEvent((e) => {
8795
+ if (!open) return;
8796
+ if (ref.current && !ref.current.contains(e.target))
8797
+ setOpen(false);
8798
+ });
8799
+ useEffect(() => {
8800
+ window.addEventListener("click", onClick);
8801
+ return () => {
8802
+ window.removeEventListener("click", onClick);
8803
+ };
8804
+ }, []);
8805
+ return /* @__PURE__ */ jsx(
8806
+ TocPopoverContext,
8807
+ {
8808
+ value: useMemo(
8809
+ () => ({
8810
+ open,
8811
+ setOpen
8812
+ }),
8813
+ [setOpen, open]
8814
+ ),
8815
+ children: /* @__PURE__ */ jsx(
8816
+ Collapsible$1,
8817
+ {
8818
+ open,
8819
+ onOpenChange: setOpen,
8820
+ "data-toc-popover": "",
8821
+ className: cn$1(
8822
+ "sticky top-(--fd-docs-row-2) z-10 [grid-area:toc-popover] h-(--fd-toc-popover-height) xl:hidden max-xl:layout:[--fd-toc-popover-height:--spacing(10)]",
8823
+ className
8824
+ ),
8825
+ ...rest,
8826
+ children: /* @__PURE__ */ jsx(
8827
+ "header",
8828
+ {
8829
+ ref,
8830
+ className: cn$1(
8831
+ "border-b backdrop-blur-sm transition-colors",
8832
+ (!isNavTransparent || open) && "bg-fd-background/80",
8833
+ open && "shadow-lg"
8834
+ ),
8835
+ children
8836
+ }
8837
+ )
8838
+ }
8839
+ )
8840
+ }
8841
+ );
8842
+ }
8843
+ __name(PageTOCPopover, "PageTOCPopover");
8844
+ function PageTOCPopoverTrigger({
8845
+ className,
8846
+ ...props
8847
+ }) {
8848
+ const { text } = useI18n();
8849
+ const { open } = use(TocPopoverContext);
8850
+ const items = useTOCItems();
8851
+ const active = useActiveAnchor();
8852
+ const selected = useMemo(
8853
+ () => items.findIndex((item) => active === item.url.slice(1)),
8854
+ [items, active]
8855
+ );
8856
+ const path = useTreePath().at(-1);
8857
+ const showItem = selected !== -1 && !open;
8858
+ return /* @__PURE__ */ jsxs(
8859
+ CollapsibleTrigger,
8860
+ {
8861
+ className: cn$1(
8862
+ "flex w-full h-10 items-center text-sm text-fd-muted-foreground gap-2.5 px-4 py-2.5 text-start focus-visible:outline-none [&_svg]:size-4 md:px-6",
8863
+ className
8864
+ ),
8865
+ "data-toc-popover-trigger": "",
8866
+ ...props,
8867
+ children: [
8868
+ /* @__PURE__ */ jsx(
8869
+ ProgressCircle,
8870
+ {
8871
+ value: (selected + 1) / Math.max(1, items.length),
8872
+ max: 1,
8873
+ className: cn$1("shrink-0", open && "text-fd-primary")
8874
+ }
8875
+ ),
8876
+ /* @__PURE__ */ jsxs("span", { className: "grid flex-1 *:my-auto *:row-start-1 *:col-start-1", children: [
8877
+ /* @__PURE__ */ jsx(
8878
+ "span",
8879
+ {
8880
+ className: cn$1(
8881
+ "truncate transition-all",
8882
+ open && "text-fd-foreground",
8883
+ showItem && "opacity-0 -translate-y-full pointer-events-none"
8884
+ ),
8885
+ children: path?.name ?? text.toc
8886
+ }
8887
+ ),
8888
+ /* @__PURE__ */ jsx(
8889
+ "span",
8890
+ {
8891
+ className: cn$1(
8892
+ "truncate transition-all",
8893
+ !showItem && "opacity-0 translate-y-full pointer-events-none"
8894
+ ),
8895
+ children: items[selected]?.title
8896
+ }
8897
+ )
8898
+ ] }),
8899
+ /* @__PURE__ */ jsx(
8900
+ ChevronDown$1,
8901
+ {
8902
+ className: cn$1(
8903
+ "shrink-0 transition-transform mx-0.5",
8904
+ open && "rotate-180"
8905
+ )
8906
+ }
8907
+ )
8908
+ ]
8909
+ }
8910
+ );
8911
+ }
8912
+ __name(PageTOCPopoverTrigger, "PageTOCPopoverTrigger");
8913
+ function clamp(input, min, max) {
8914
+ if (input < min) return min;
8915
+ if (input > max) return max;
8916
+ return input;
8917
+ }
8918
+ __name(clamp, "clamp");
8919
+ function ProgressCircle({
8920
+ value,
8921
+ strokeWidth = 2,
8922
+ size = 24,
8923
+ min = 0,
8924
+ max = 100,
8925
+ ...restSvgProps
8926
+ }) {
8927
+ const normalizedValue = clamp(value, min, max);
8928
+ const radius = (size - strokeWidth) / 2;
8929
+ const circumference = 2 * Math.PI * radius;
8930
+ const progress = normalizedValue / max * circumference;
8931
+ const circleProps = {
8932
+ cx: size / 2,
8933
+ cy: size / 2,
8934
+ r: radius,
8935
+ fill: "none",
8936
+ strokeWidth
8937
+ };
8938
+ return /* @__PURE__ */ jsxs(
8939
+ "svg",
8940
+ {
8941
+ role: "progressbar",
8942
+ viewBox: `0 0 ${size} ${size}`,
8943
+ "aria-valuenow": normalizedValue,
8944
+ "aria-valuemin": min,
8945
+ "aria-valuemax": max,
8946
+ ...restSvgProps,
8947
+ children: [
8948
+ /* @__PURE__ */ jsx("circle", { ...circleProps, className: "stroke-current/25" }),
8949
+ /* @__PURE__ */ jsx(
8950
+ "circle",
8951
+ {
8952
+ ...circleProps,
8953
+ stroke: "currentColor",
8954
+ strokeDasharray: circumference,
8955
+ strokeDashoffset: circumference - progress,
8956
+ strokeLinecap: "round",
8957
+ transform: `rotate(-90 ${size / 2} ${size / 2})`,
8958
+ className: "transition-all"
8959
+ }
8960
+ )
8961
+ ]
8962
+ }
8963
+ );
8964
+ }
8965
+ __name(ProgressCircle, "ProgressCircle");
8966
+ function PageTOCPopoverContent(props) {
8967
+ return /* @__PURE__ */ jsx(
8968
+ CollapsibleContent,
8969
+ {
8970
+ "data-toc-popover-content": "",
8971
+ ...props,
8972
+ className: cn$1("flex flex-col px-4 max-h-[50vh] md:px-6", props.className),
8973
+ children: props.children
8974
+ }
8975
+ );
8976
+ }
8977
+ __name(PageTOCPopoverContent, "PageTOCPopoverContent");
8978
+ function PageLastUpdate({
8979
+ date: value,
8980
+ ...props
8981
+ }) {
8982
+ const { text } = useI18n();
8983
+ const [date, setDate] = useState("");
8984
+ useEffect(() => {
8985
+ setDate(value.toLocaleDateString());
8986
+ }, [value]);
8987
+ return /* @__PURE__ */ jsxs(
8988
+ "p",
8989
+ {
8990
+ ...props,
8991
+ className: cn$1("text-sm text-fd-muted-foreground", props.className),
8992
+ children: [
8993
+ text.lastUpdate,
8994
+ " ",
8995
+ date
8996
+ ]
8997
+ }
8998
+ );
8999
+ }
9000
+ __name(PageLastUpdate, "PageLastUpdate");
9001
+ function PageFooter({ items, ...props }) {
9002
+ const footerList = useFooterItems();
9003
+ const pathname = usePathname();
9004
+ const { previous, next } = useMemo(() => {
9005
+ if (items) return items;
9006
+ const idx = footerList.findIndex(
9007
+ (item) => isActive(item.url, pathname, false)
9008
+ );
9009
+ if (idx === -1) return {};
9010
+ return {
9011
+ previous: footerList[idx - 1],
9012
+ next: footerList[idx + 1]
9013
+ };
9014
+ }, [footerList, items, pathname]);
9015
+ return /* @__PURE__ */ jsxs(
9016
+ "div",
9017
+ {
9018
+ ...props,
9019
+ className: cn$1(
9020
+ "@container grid gap-4",
9021
+ previous && next ? "grid-cols-2" : "grid-cols-1",
9022
+ props.className
9023
+ ),
9024
+ children: [
9025
+ previous ? /* @__PURE__ */ jsx(FooterItem, { item: previous, index: 0 }) : null,
9026
+ next ? /* @__PURE__ */ jsx(FooterItem, { item: next, index: 1 }) : null
9027
+ ]
9028
+ }
9029
+ );
9030
+ }
9031
+ __name(PageFooter, "PageFooter");
9032
+ function FooterItem({ item, index }) {
9033
+ const { text } = useI18n();
9034
+ const Icon2 = index === 0 ? ChevronLeft : ChevronRight$1;
9035
+ return /* @__PURE__ */ jsxs(
9036
+ Link5,
9037
+ {
9038
+ href: item.url,
9039
+ className: cn$1(
9040
+ "flex flex-col gap-2 rounded-lg border p-4 text-sm transition-colors hover:bg-fd-accent/80 hover:text-fd-accent-foreground @max-lg:col-span-full",
9041
+ index === 1 && "text-end"
9042
+ ),
9043
+ children: [
9044
+ /* @__PURE__ */ jsxs(
9045
+ "div",
9046
+ {
9047
+ className: cn$1(
9048
+ "inline-flex items-center gap-1.5 font-medium",
9049
+ index === 1 && "flex-row-reverse"
9050
+ ),
9051
+ children: [
9052
+ /* @__PURE__ */ jsx(Icon2, { className: "-mx-1 size-4 shrink-0 rtl:rotate-180" }),
9053
+ /* @__PURE__ */ jsx("p", { children: item.name })
9054
+ ]
9055
+ }
9056
+ ),
9057
+ /* @__PURE__ */ jsx("p", { className: "text-fd-muted-foreground truncate", children: item.description ?? (index === 0 ? text.previousPage : text.nextPage) })
9058
+ ]
9059
+ }
9060
+ );
9061
+ }
9062
+ __name(FooterItem, "FooterItem");
9063
+ function PageBreadcrumb({
9064
+ includeRoot,
9065
+ includeSeparator,
9066
+ includePage,
9067
+ ...props
9068
+ }) {
9069
+ const path = useTreePath();
9070
+ const { root } = useTreeContext();
9071
+ const items = useMemo(() => {
9072
+ return getBreadcrumbItemsFromPath(root, path, {
9073
+ includePage,
9074
+ includeSeparator,
9075
+ includeRoot
9076
+ });
9077
+ }, [includePage, includeRoot, includeSeparator, path, root]);
9078
+ if (items.length === 0) return null;
9079
+ return /* @__PURE__ */ jsx(
9080
+ "div",
9081
+ {
9082
+ ...props,
9083
+ className: cn$1(
9084
+ "flex items-center gap-1.5 text-sm text-fd-muted-foreground",
9085
+ props.className
9086
+ ),
9087
+ children: items.map((item, i) => {
9088
+ const className = cn$1(
9089
+ "truncate",
9090
+ i === items.length - 1 && "text-fd-primary font-medium"
9091
+ );
9092
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
9093
+ i !== 0 && /* @__PURE__ */ jsx(ChevronRight$1, { className: "size-3.5 shrink-0" }),
9094
+ item.url ? /* @__PURE__ */ jsx(
9095
+ Link5,
9096
+ {
9097
+ href: item.url,
9098
+ className: cn$1(className, "transition-opacity hover:opacity-80"),
9099
+ children: item.name
9100
+ }
9101
+ ) : /* @__PURE__ */ jsx("span", { className, children: item.name })
9102
+ ] }, i);
9103
+ })
9104
+ }
9105
+ );
9106
+ }
9107
+ __name(PageBreadcrumb, "PageBreadcrumb");
9108
+ function DocsPage({
9109
+ breadcrumb: {
9110
+ enabled: breadcrumbEnabled = true,
9111
+ component: breadcrumb,
9112
+ ...breadcrumbProps
9113
+ } = {},
9114
+ footer = {},
9115
+ full: full2 = false,
9116
+ tableOfContentPopover: {
9117
+ enabled: tocPopoverEnabled,
9118
+ component: tocPopover,
9119
+ ...tocPopoverOptions
9120
+ } = {},
9121
+ tableOfContent: {
9122
+ enabled: tocEnabled,
9123
+ component: tocReplace,
9124
+ ...tocOptions
9125
+ } = {},
9126
+ toc = [],
9127
+ children
9128
+ }) {
9129
+ tocEnabled ?? (tocEnabled = !full2 && (toc.length > 0 || tocOptions.footer !== void 0 || tocOptions.header !== void 0));
9130
+ tocPopoverEnabled ?? (tocPopoverEnabled = toc.length > 0 || tocPopoverOptions.header !== void 0 || tocPopoverOptions.footer !== void 0);
9131
+ let wrapper = /* @__PURE__ */ __name((children2) => children2, "wrapper");
9132
+ if (tocEnabled || tocPopoverEnabled) {
9133
+ wrapper = /* @__PURE__ */ __name((children2) => /* @__PURE__ */ jsx(TOCProvider, { single: tocOptions.single, toc, children: children2 }), "wrapper");
9134
+ }
9135
+ return wrapper(
9136
+ /* @__PURE__ */ jsxs(Fragment, { children: [
9137
+ tocPopoverEnabled && (tocPopover ?? /* @__PURE__ */ jsxs(PageTOCPopover, { children: [
9138
+ /* @__PURE__ */ jsx(PageTOCPopoverTrigger, {}),
9139
+ /* @__PURE__ */ jsxs(PageTOCPopoverContent, { children: [
9140
+ tocPopoverOptions.header,
9141
+ /* @__PURE__ */ jsx(TOCScrollArea, { children: tocPopoverOptions.style === "clerk" ? /* @__PURE__ */ jsx(TocClerk.TOCItems, {}) : /* @__PURE__ */ jsx(TocDefault.TOCItems, {}) }),
9142
+ tocPopoverOptions.footer
9143
+ ] })
9144
+ ] })),
9145
+ /* @__PURE__ */ jsxs(
9146
+ "article",
9147
+ {
9148
+ id: "nd-page",
9149
+ "data-full": full2,
9150
+ className: cn$1(
9151
+ "flex flex-col w-full max-w-[900px] mx-auto [grid-area:main] px-4 py-6 gap-4 md:px-6 md:pt-8 xl:px-8 xl:pt-14",
9152
+ full2 ? "max-w-[1200px]" : "xl:layout:[--fd-toc-width:268px]"
9153
+ ),
9154
+ children: [
9155
+ breadcrumbEnabled && (breadcrumb ?? /* @__PURE__ */ jsx(PageBreadcrumb, { ...breadcrumbProps })),
9156
+ children,
9157
+ footer.enabled !== false && (footer.component ?? /* @__PURE__ */ jsx(PageFooter, { items: footer.items }))
9158
+ ]
9159
+ }
9160
+ ),
9161
+ tocEnabled && (tocReplace ?? /* @__PURE__ */ jsxs(
9162
+ "div",
9163
+ {
9164
+ id: "nd-toc",
9165
+ className: "sticky top-(--fd-docs-row-1) h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] flex flex-col [grid-area:toc] w-(--fd-toc-width) pt-12 pe-4 pb-2 max-xl:hidden",
9166
+ children: [
9167
+ tocOptions.header,
9168
+ /* @__PURE__ */ jsxs(
9169
+ "h3",
9170
+ {
9171
+ id: "toc-title",
9172
+ className: "inline-flex items-center gap-1.5 text-sm text-fd-muted-foreground",
9173
+ children: [
9174
+ /* @__PURE__ */ jsx(Text, { className: "size-4" }),
9175
+ /* @__PURE__ */ jsx(I18nLabel, { label: "toc" })
9176
+ ]
9177
+ }
9178
+ ),
9179
+ /* @__PURE__ */ jsx(TOCScrollArea, { children: tocOptions.style === "clerk" ? /* @__PURE__ */ jsx(TocClerk.TOCItems, {}) : /* @__PURE__ */ jsx(TocDefault.TOCItems, {}) }),
9180
+ tocOptions.footer
9181
+ ]
9182
+ }
9183
+ ))
9184
+ ] })
9185
+ );
9186
+ }
9187
+ __name(DocsPage, "DocsPage");
9188
+ function EditOnGitHub(props) {
9189
+ return /* @__PURE__ */ jsx(
9190
+ "a",
9191
+ {
9192
+ target: "_blank",
9193
+ rel: "noreferrer noopener",
9194
+ ...props,
9195
+ className: cn$1(
9196
+ buttonVariants$1({
9197
+ color: "secondary",
9198
+ size: "sm",
9199
+ className: "gap-1.5 not-prose"
9200
+ }),
9201
+ props.className
9202
+ ),
9203
+ children: props.children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
9204
+ /* @__PURE__ */ jsx(Edit, { className: "size-3.5" }),
9205
+ /* @__PURE__ */ jsx(I18nLabel, { label: "editOnGithub" })
9206
+ ] })
9207
+ }
9208
+ );
9209
+ }
9210
+ __name(EditOnGitHub, "EditOnGitHub");
9211
+ function DocsBody({
9212
+ children,
9213
+ className,
9214
+ ...props
9215
+ }) {
9216
+ return /* @__PURE__ */ jsx("div", { ...props, className: cn$1("prose flex-1", className), children });
9217
+ }
9218
+ __name(DocsBody, "DocsBody");
9219
+ function DocsDescription({
9220
+ children,
9221
+ className,
9222
+ ...props
9223
+ }) {
9224
+ if (children === void 0) return null;
9225
+ return /* @__PURE__ */ jsx(
9226
+ "p",
9227
+ {
9228
+ ...props,
9229
+ className: cn$1("mb-8 text-lg text-fd-muted-foreground", className),
9230
+ children
9231
+ }
9232
+ );
9233
+ }
9234
+ __name(DocsDescription, "DocsDescription");
9235
+ function DocsTitle({
9236
+ children,
9237
+ className,
9238
+ ...props
9239
+ }) {
9240
+ return /* @__PURE__ */ jsx("h1", { ...props, className: cn$1("text-[1.75em] font-semibold", className), children });
9241
+ }
9242
+ __name(DocsTitle, "DocsTitle");
9243
+
9244
+ // docs/layouts/notebook/page/index.tsx
9245
+ var page_exports2 = {};
9246
+ __export(page_exports2, {
9247
+ DocsBody: () => DocsBody2,
9248
+ DocsDescription: () => DocsDescription2,
9249
+ DocsPage: () => DocsPage2,
9250
+ DocsTitle: () => DocsTitle2,
9251
+ EditOnGitHub: () => EditOnGitHub2,
9252
+ PageBreadcrumb: () => PageBreadcrumb2,
9253
+ PageLastUpdate: () => PageLastUpdate2
9254
+ });
9255
+ var TocPopoverContext2 = createContext(null);
9256
+ function PageTOCPopover2({
9257
+ className,
9258
+ children,
9259
+ ...rest
9260
+ }) {
9261
+ const ref = useRef(null);
9262
+ const [open, setOpen] = useState(false);
9263
+ const { isNavTransparent } = use(LayoutContext2);
9264
+ const onClick = useEffectEvent((e) => {
9265
+ if (!open) return;
9266
+ if (ref.current && !ref.current.contains(e.target))
9267
+ setOpen(false);
9268
+ });
9269
+ useEffect(() => {
9270
+ window.addEventListener("click", onClick);
9271
+ return () => {
9272
+ window.removeEventListener("click", onClick);
9273
+ };
9274
+ }, []);
9275
+ return /* @__PURE__ */ jsx(
9276
+ TocPopoverContext2,
9277
+ {
9278
+ value: useMemo(
9279
+ () => ({
9280
+ open,
9281
+ setOpen
9282
+ }),
9283
+ [setOpen, open]
9284
+ ),
9285
+ children: /* @__PURE__ */ jsx(
9286
+ Collapsible$1,
9287
+ {
9288
+ open,
9289
+ onOpenChange: setOpen,
9290
+ "data-toc-popover": "",
9291
+ className: cn$1(
9292
+ "sticky top-(--fd-docs-row-2) z-10 [grid-area:toc-popover] h-(--fd-toc-popover-height) xl:hidden max-xl:layout:[--fd-toc-popover-height:--spacing(10)]",
9293
+ className
9294
+ ),
9295
+ ...rest,
9296
+ children: /* @__PURE__ */ jsx(
9297
+ "header",
9298
+ {
9299
+ ref,
9300
+ className: cn$1(
9301
+ "border-b backdrop-blur-sm transition-colors",
9302
+ (!isNavTransparent || open) && "bg-fd-background/80",
9303
+ open && "shadow-lg"
9304
+ ),
9305
+ children
9306
+ }
9307
+ )
9308
+ }
9309
+ )
9310
+ }
9311
+ );
9312
+ }
9313
+ __name(PageTOCPopover2, "PageTOCPopover");
9314
+ function PageTOCPopoverTrigger2({
9315
+ className,
9316
+ ...props
9317
+ }) {
9318
+ const { text } = useI18n();
9319
+ const { open } = use(TocPopoverContext2);
9320
+ const items = useTOCItems();
9321
+ const active = useActiveAnchor();
9322
+ const selected = useMemo(
9323
+ () => items.findIndex((item) => active === item.url.slice(1)),
9324
+ [items, active]
9325
+ );
9326
+ const path = useTreePath().at(-1);
9327
+ const showItem = selected !== -1 && !open;
9328
+ return /* @__PURE__ */ jsxs(
9329
+ CollapsibleTrigger,
9330
+ {
9331
+ className: cn$1(
9332
+ "flex w-full h-10 items-center text-sm text-fd-muted-foreground gap-2.5 px-4 py-2.5 text-start focus-visible:outline-none [&_svg]:size-4 md:px-6",
9333
+ className
9334
+ ),
9335
+ "data-toc-popover-trigger": "",
9336
+ ...props,
9337
+ children: [
9338
+ /* @__PURE__ */ jsx(
9339
+ ProgressCircle2,
9340
+ {
9341
+ value: (selected + 1) / Math.max(1, items.length),
9342
+ max: 1,
9343
+ className: cn$1("shrink-0", open && "text-fd-primary")
9344
+ }
9345
+ ),
9346
+ /* @__PURE__ */ jsxs("span", { className: "grid flex-1 *:my-auto *:row-start-1 *:col-start-1", children: [
9347
+ /* @__PURE__ */ jsx(
9348
+ "span",
9349
+ {
9350
+ className: cn$1(
9351
+ "truncate transition-all",
9352
+ open && "text-fd-foreground",
9353
+ showItem && "opacity-0 -translate-y-full pointer-events-none"
9354
+ ),
9355
+ children: path?.name ?? text.toc
9356
+ }
9357
+ ),
9358
+ /* @__PURE__ */ jsx(
9359
+ "span",
9360
+ {
9361
+ className: cn$1(
9362
+ "truncate transition-all",
9363
+ !showItem && "opacity-0 translate-y-full pointer-events-none"
9364
+ ),
9365
+ children: items[selected]?.title
9366
+ }
9367
+ )
9368
+ ] }),
9369
+ /* @__PURE__ */ jsx(
9370
+ ChevronDown$1,
9371
+ {
9372
+ className: cn$1(
9373
+ "shrink-0 transition-transform mx-0.5",
9374
+ open && "rotate-180"
9375
+ )
9376
+ }
9377
+ )
9378
+ ]
9379
+ }
9380
+ );
9381
+ }
9382
+ __name(PageTOCPopoverTrigger2, "PageTOCPopoverTrigger");
9383
+ function clamp2(input, min, max) {
9384
+ if (input < min) return min;
9385
+ if (input > max) return max;
9386
+ return input;
9387
+ }
9388
+ __name(clamp2, "clamp");
9389
+ function ProgressCircle2({
9390
+ value,
9391
+ strokeWidth = 2,
9392
+ size = 24,
9393
+ min = 0,
9394
+ max = 100,
9395
+ ...restSvgProps
9396
+ }) {
9397
+ const normalizedValue = clamp2(value, min, max);
9398
+ const radius = (size - strokeWidth) / 2;
9399
+ const circumference = 2 * Math.PI * radius;
9400
+ const progress = normalizedValue / max * circumference;
9401
+ const circleProps = {
9402
+ cx: size / 2,
9403
+ cy: size / 2,
9404
+ r: radius,
9405
+ fill: "none",
9406
+ strokeWidth
9407
+ };
9408
+ return /* @__PURE__ */ jsxs(
9409
+ "svg",
9410
+ {
9411
+ role: "progressbar",
9412
+ viewBox: `0 0 ${size} ${size}`,
9413
+ "aria-valuenow": normalizedValue,
9414
+ "aria-valuemin": min,
9415
+ "aria-valuemax": max,
9416
+ ...restSvgProps,
9417
+ children: [
9418
+ /* @__PURE__ */ jsx("circle", { ...circleProps, className: "stroke-current/25" }),
9419
+ /* @__PURE__ */ jsx(
9420
+ "circle",
9421
+ {
9422
+ ...circleProps,
9423
+ stroke: "currentColor",
9424
+ strokeDasharray: circumference,
9425
+ strokeDashoffset: circumference - progress,
9426
+ strokeLinecap: "round",
9427
+ transform: `rotate(-90 ${size / 2} ${size / 2})`,
9428
+ className: "transition-all"
9429
+ }
9430
+ )
9431
+ ]
9432
+ }
9433
+ );
9434
+ }
9435
+ __name(ProgressCircle2, "ProgressCircle");
9436
+ function PageTOCPopoverContent2(props) {
9437
+ return /* @__PURE__ */ jsx(
9438
+ CollapsibleContent,
9439
+ {
9440
+ "data-toc-popover-content": "",
9441
+ ...props,
9442
+ className: cn$1("flex flex-col px-4 max-h-[50vh] md:px-6", props.className),
9443
+ children: props.children
9444
+ }
9445
+ );
9446
+ }
9447
+ __name(PageTOCPopoverContent2, "PageTOCPopoverContent");
9448
+ function PageLastUpdate2({
9449
+ date: value,
9450
+ ...props
9451
+ }) {
9452
+ const { text } = useI18n();
9453
+ const [date, setDate] = useState("");
9454
+ useEffect(() => {
9455
+ setDate(value.toLocaleDateString());
9456
+ }, [value]);
9457
+ return /* @__PURE__ */ jsxs(
9458
+ "p",
9459
+ {
9460
+ ...props,
9461
+ className: cn$1("text-sm text-fd-muted-foreground", props.className),
9462
+ children: [
9463
+ text.lastUpdate,
9464
+ " ",
9465
+ date
9466
+ ]
9467
+ }
9468
+ );
9469
+ }
9470
+ __name(PageLastUpdate2, "PageLastUpdate");
9471
+ function PageFooter2({ items, ...props }) {
9472
+ const footerList = useFooterItems();
9473
+ const pathname = usePathname();
9474
+ const { previous, next } = useMemo(() => {
9475
+ if (items) return items;
9476
+ const idx = footerList.findIndex(
9477
+ (item) => isActive(item.url, pathname, false)
9478
+ );
9479
+ if (idx === -1) return {};
9480
+ return {
9481
+ previous: footerList[idx - 1],
9482
+ next: footerList[idx + 1]
9483
+ };
9484
+ }, [footerList, items, pathname]);
9485
+ return /* @__PURE__ */ jsxs(
9486
+ "div",
9487
+ {
9488
+ ...props,
9489
+ className: cn$1(
9490
+ "@container grid gap-4",
9491
+ previous && next ? "grid-cols-2" : "grid-cols-1",
9492
+ props.className
9493
+ ),
9494
+ children: [
9495
+ previous ? /* @__PURE__ */ jsx(FooterItem2, { item: previous, index: 0 }) : null,
9496
+ next ? /* @__PURE__ */ jsx(FooterItem2, { item: next, index: 1 }) : null
9497
+ ]
9498
+ }
9499
+ );
9500
+ }
9501
+ __name(PageFooter2, "PageFooter");
9502
+ function FooterItem2({ item, index }) {
9503
+ const { text } = useI18n();
9504
+ const Icon2 = index === 0 ? ChevronLeft : ChevronRight$1;
9505
+ return /* @__PURE__ */ jsxs(
9506
+ Link5,
9507
+ {
9508
+ href: item.url,
9509
+ className: cn$1(
9510
+ "flex flex-col gap-2 rounded-lg border p-4 text-sm transition-colors hover:bg-fd-accent/80 hover:text-fd-accent-foreground @max-lg:col-span-full",
9511
+ index === 1 && "text-end"
9512
+ ),
9513
+ children: [
9514
+ /* @__PURE__ */ jsxs(
9515
+ "div",
9516
+ {
9517
+ className: cn$1(
9518
+ "inline-flex items-center gap-1.5 font-medium",
9519
+ index === 1 && "flex-row-reverse"
9520
+ ),
9521
+ children: [
9522
+ /* @__PURE__ */ jsx(Icon2, { className: "-mx-1 size-4 shrink-0 rtl:rotate-180" }),
9523
+ /* @__PURE__ */ jsx("p", { children: item.name })
9524
+ ]
9525
+ }
9526
+ ),
9527
+ /* @__PURE__ */ jsx("p", { className: "text-fd-muted-foreground truncate", children: item.description ?? (index === 0 ? text.previousPage : text.nextPage) })
9528
+ ]
9529
+ }
9530
+ );
9531
+ }
9532
+ __name(FooterItem2, "FooterItem");
9533
+ function PageBreadcrumb2({
9534
+ includeRoot,
9535
+ includeSeparator,
9536
+ includePage,
9537
+ ...props
9538
+ }) {
9539
+ const path = useTreePath();
9540
+ const { root } = useTreeContext();
9541
+ const items = useMemo(() => {
9542
+ return getBreadcrumbItemsFromPath(root, path, {
9543
+ includePage,
9544
+ includeSeparator,
9545
+ includeRoot
9546
+ });
9547
+ }, [includePage, includeRoot, includeSeparator, path, root]);
9548
+ if (items.length === 0) return null;
9549
+ return /* @__PURE__ */ jsx(
9550
+ "div",
9551
+ {
9552
+ ...props,
9553
+ className: cn$1(
9554
+ "flex items-center gap-1.5 text-sm text-fd-muted-foreground",
9555
+ props.className
9556
+ ),
9557
+ children: items.map((item, i) => {
9558
+ const className = cn$1(
9559
+ "truncate",
9560
+ i === items.length - 1 && "text-fd-primary font-medium"
9561
+ );
9562
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
9563
+ i !== 0 && /* @__PURE__ */ jsx(ChevronRight$1, { className: "size-3.5 shrink-0" }),
9564
+ item.url ? /* @__PURE__ */ jsx(
9565
+ Link5,
9566
+ {
9567
+ href: item.url,
9568
+ className: cn$1(className, "transition-opacity hover:opacity-80"),
9569
+ children: item.name
9570
+ }
9571
+ ) : /* @__PURE__ */ jsx("span", { className, children: item.name })
9572
+ ] }, i);
9573
+ })
9574
+ }
9575
+ );
9576
+ }
9577
+ __name(PageBreadcrumb2, "PageBreadcrumb");
9578
+ function DocsPage2({
9579
+ breadcrumb: {
9580
+ enabled: breadcrumbEnabled = true,
9581
+ component: breadcrumb,
9582
+ ...breadcrumbProps
9583
+ } = {},
9584
+ footer = {},
9585
+ full: full2 = false,
9586
+ tableOfContentPopover: {
9587
+ enabled: tocPopoverEnabled,
9588
+ component: tocPopover,
9589
+ ...tocPopoverOptions
9590
+ } = {},
9591
+ tableOfContent: {
9592
+ enabled: tocEnabled,
9593
+ component: tocReplace,
9594
+ ...tocOptions
9595
+ } = {},
9596
+ toc = [],
9597
+ children
9598
+ }) {
9599
+ tocEnabled ?? (tocEnabled = !full2 && (toc.length > 0 || tocOptions.footer !== void 0 || tocOptions.header !== void 0));
9600
+ tocPopoverEnabled ?? (tocPopoverEnabled = toc.length > 0 || tocPopoverOptions.header !== void 0 || tocPopoverOptions.footer !== void 0);
9601
+ let wrapper = /* @__PURE__ */ __name((children2) => children2, "wrapper");
9602
+ if (tocEnabled || tocPopoverEnabled) {
9603
+ wrapper = /* @__PURE__ */ __name((children2) => /* @__PURE__ */ jsx(TOCProvider, { single: tocOptions.single, toc, children: children2 }), "wrapper");
9604
+ }
9605
+ return wrapper(
9606
+ /* @__PURE__ */ jsxs(Fragment, { children: [
9607
+ tocPopoverEnabled && (tocPopover ?? /* @__PURE__ */ jsxs(PageTOCPopover2, { children: [
9608
+ /* @__PURE__ */ jsx(PageTOCPopoverTrigger2, {}),
9609
+ /* @__PURE__ */ jsxs(PageTOCPopoverContent2, { children: [
9610
+ tocPopoverOptions.header,
9611
+ /* @__PURE__ */ jsx(TOCScrollArea, { children: tocPopoverOptions.style === "clerk" ? /* @__PURE__ */ jsx(TocClerk.TOCItems, {}) : /* @__PURE__ */ jsx(TocDefault.TOCItems, {}) }),
9612
+ tocPopoverOptions.footer
9613
+ ] })
9614
+ ] })),
9615
+ /* @__PURE__ */ jsxs(
9616
+ "article",
9617
+ {
9618
+ id: "nd-page",
9619
+ "data-full": full2,
9620
+ className: cn$1(
9621
+ "flex flex-col [grid-area:main] px-4 py-6 gap-4 md:px-6 md:pt-8 xl:px-8 xl:pt-14 *:max-w-[900px]",
9622
+ full2 && "*:max-w-[1285px]"
9623
+ ),
9624
+ children: [
9625
+ breadcrumbEnabled && (breadcrumb ?? /* @__PURE__ */ jsx(PageBreadcrumb2, { ...breadcrumbProps })),
9626
+ children,
9627
+ footer.enabled !== false && (footer.component ?? /* @__PURE__ */ jsx(PageFooter2, { items: footer.items }))
9628
+ ]
9629
+ }
9630
+ ),
9631
+ tocEnabled && (tocReplace ?? /* @__PURE__ */ jsxs(
9632
+ "div",
9633
+ {
9634
+ id: "nd-toc",
9635
+ className: "sticky top-(--fd-docs-row-3) [grid-area:toc] h-[calc(var(--fd-docs-height)-var(--fd-docs-row-3))] flex flex-col w-(--fd-toc-width) pt-12 pe-4 pb-2 xl:layout:[--fd-toc-width:268px] max-xl:hidden",
9636
+ children: [
9637
+ tocOptions.header,
9638
+ /* @__PURE__ */ jsxs(
9639
+ "h3",
9640
+ {
9641
+ id: "toc-title",
9642
+ className: "inline-flex items-center gap-1.5 text-sm text-fd-muted-foreground",
9643
+ children: [
9644
+ /* @__PURE__ */ jsx(Text, { className: "size-4" }),
9645
+ /* @__PURE__ */ jsx(I18nLabel, { label: "toc" })
9646
+ ]
9647
+ }
9648
+ ),
9649
+ /* @__PURE__ */ jsx(TOCScrollArea, { children: tocOptions.style === "clerk" ? /* @__PURE__ */ jsx(TocClerk.TOCItems, {}) : /* @__PURE__ */ jsx(TocDefault.TOCItems, {}) }),
9650
+ tocOptions.footer
9651
+ ]
9652
+ }
9653
+ ))
9654
+ ] })
9655
+ );
9656
+ }
9657
+ __name(DocsPage2, "DocsPage");
9658
+ function EditOnGitHub2(props) {
9659
+ return /* @__PURE__ */ jsx(
9660
+ "a",
9661
+ {
9662
+ target: "_blank",
9663
+ rel: "noreferrer noopener",
9664
+ ...props,
9665
+ className: cn$1(
9666
+ buttonVariants$1({
9667
+ color: "secondary",
9668
+ size: "sm",
9669
+ className: "gap-1.5 not-prose"
9670
+ }),
9671
+ props.className
9672
+ ),
9673
+ children: props.children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
9674
+ /* @__PURE__ */ jsx(Edit, { className: "size-3.5" }),
9675
+ /* @__PURE__ */ jsx(I18nLabel, { label: "editOnGithub" })
9676
+ ] })
9677
+ }
9678
+ );
9679
+ }
9680
+ __name(EditOnGitHub2, "EditOnGitHub");
9681
+ function DocsBody2({
9682
+ children,
9683
+ className,
9684
+ ...props
9685
+ }) {
9686
+ return /* @__PURE__ */ jsx("div", { ...props, className: cn$1("prose flex-1", className), children });
9687
+ }
9688
+ __name(DocsBody2, "DocsBody");
9689
+ function DocsDescription2({
9690
+ children,
9691
+ className,
9692
+ ...props
9693
+ }) {
9694
+ if (children === void 0) return null;
9695
+ return /* @__PURE__ */ jsx(
9696
+ "p",
9697
+ {
9698
+ ...props,
9699
+ className: cn$1("mb-8 text-lg text-fd-muted-foreground", className),
9700
+ children
9701
+ }
9702
+ );
9703
+ }
9704
+ __name(DocsDescription2, "DocsDescription");
9705
+ function DocsTitle2({
9706
+ children,
9707
+ className,
9708
+ ...props
9709
+ }) {
9710
+ return /* @__PURE__ */ jsx("h1", { ...props, className: cn$1("text-[1.75em] font-semibold", className), children });
9711
+ }
9712
+ __name(DocsTitle2, "DocsTitle");
9713
+ function DocsPage3({
9714
+ lastUpdate,
9715
+ editOnGithub,
9716
+ children,
9717
+ ...props
9718
+ }) {
9719
+ const docsLayoutCtx = use(LayoutContext);
9720
+ const { DocsPage: DocsPage4, EditOnGitHub: EditOnGitHub3, PageLastUpdate: PageLastUpdate3 } = docsLayoutCtx ? page_exports : page_exports2;
9721
+ return /* @__PURE__ */ jsxs(DocsPage4, { ...props, children: [
9722
+ children,
9723
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-row flex-wrap items-center justify-between gap-4 empty:hidden", children: [
9724
+ editOnGithub && /* @__PURE__ */ jsx(
9725
+ EditOnGitHub3,
9726
+ {
9727
+ href: `https://github.com/${editOnGithub.owner}/${editOnGithub.repo}/blob/${editOnGithub.sha}/${editOnGithub.path.startsWith("/") ? editOnGithub.path.slice(1) : editOnGithub.path}`
9728
+ }
9729
+ ),
9730
+ lastUpdate && /* @__PURE__ */ jsx(PageLastUpdate3, { date: new Date(lastUpdate) })
9731
+ ] })
9732
+ ] });
9733
+ }
9734
+ __name(DocsPage3, "DocsPage");
9735
+ function Image5(props) {
9736
+ return /* @__PURE__ */ jsx(
9737
+ Image,
9738
+ {
9739
+ sizes: "(max-width: 768px) 100vw, (max-width: 1200px) 70vw, 900px",
9740
+ ...props,
9741
+ src: props.src,
9742
+ className: cn$1("rounded-lg", props.className)
9743
+ }
9744
+ );
9745
+ }
9746
+ __name(Image5, "Image");
9747
+ function Table2(props) {
9748
+ return /* @__PURE__ */ jsx("div", { className: "relative overflow-auto prose-no-margin my-6", children: /* @__PURE__ */ jsx("table", { ...props }) });
9749
+ }
9750
+ __name(Table2, "Table");
9751
+ var defaultMdxComponents = {
9752
+ CodeBlockTab,
9753
+ CodeBlockTabs,
9754
+ CodeBlockTabsList,
9755
+ CodeBlockTabsTrigger,
9756
+ pre: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsx(CodeBlock, { ...props, children: /* @__PURE__ */ jsx(Pre, { children: props.children }) }), "pre"),
9757
+ Card: Card$1,
9758
+ Cards,
9759
+ a: Link5,
9760
+ img: Image5,
9761
+ h1: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsx(Heading, { as: "h1", ...props }), "h1"),
9762
+ h2: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsx(Heading, { as: "h2", ...props }), "h2"),
9763
+ h3: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsx(Heading, { as: "h3", ...props }), "h3"),
9764
+ h4: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsx(Heading, { as: "h4", ...props }), "h4"),
9765
+ h5: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsx(Heading, { as: "h5", ...props }), "h5"),
9766
+ h6: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsx(Heading, { as: "h6", ...props }), "h6"),
9767
+ table: Table2,
9768
+ Callout,
9769
+ CalloutContainer,
9770
+ CalloutTitle,
9771
+ CalloutDescription
9772
+ };
9773
+ function RootProvider({ components, ...props }) {
9774
+ return /* @__PURE__ */ jsx(NextProvider, { Link: components?.Link, Image: components?.Image, children: /* @__PURE__ */ jsx(RootProvider$1, { ...props, children: props.children }) });
9775
+ }
9776
+ __name(RootProvider, "RootProvider");
9777
+
9778
+ // docs/source.ts
9779
+ var source_exports = {};
9780
+ __export(source_exports, {
9781
+ loader: () => loader
9782
+ });
9783
+ __reExport(source_exports, source_star);
8086
9784
 
8087
- export { AIAgentIcon, AISearchContentIcon, Accordion, AccordionContent, AccordionItem, AccordionTrigger, action_button_default as ActionButton, ActiveIcon, AddAgentIcon, AddCryptoWalletIcon, AddNewFolderIcon, AgentIcon, AiTasksIcon, AisIcon, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnthropicIcon, ApplyTypography, ArchiveIcon, ArchivedIcon, ArrowRightIcon, aspect_ratio_default as AspectRatio, AttachmentIcon, Avatar, AvatarFallback, AvatarImage, AyaCohereIcon, AzureIcon, badge_default as Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, breakpoint_indicator_default as BreakpointIndicator, BrowseSubscriptionIcon, button_default as Button, calendar_default as Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, CategoryIcon, ChatBubbleIcon, ChatInput, ChatInputArea, ChatSettingsIcon, checkbox_default as Checkbox, CloudModelIcon, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyToClipboardIcon, CreateAIIcon, CryptoWalletIcon, DeepSeekIcon, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, dialog_video_controller_default as DialogVideoController, DirectoryTypeIcon, DisconnectIcon, DotsLoader, DownloadIcon, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHandle, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmbeddingsGeneratedIcon, EthereumIcon, ExoIcon, ExportIcon, Field, FieldDescription, FieldGroup, FieldLabel, FieldSeparator, FileEmptyStateIcon, FileTypeIcon, FilesIcon, FormulaIcon, GeminiIcon, GenerateDocIcon, GenerateFromWebIcon, GoogleIcon, GrokIcon, GroqIcon, HanzoCombinationMarkIcon, HanzoIcon, HanzoLogoIcon, HanzoLogoSoloIcon, HomeIcon, HoverCard, HoverCardContent, HoverCardTrigger, icons_exports as Icons, image_default as Image, ImportIcon, InboxIcon, inline_icon_default as InlineIcon, input_default as Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, JobBubbleIcon, json_form_default as JsonForm, Kbd, KbdGroup, label_default as Label, link_element_default as LinkElement, list_box_default as ListBox, LmStudioIcon, loading_spinner_default as LoadingSpinner, LocalModelIcon, MCPIcon, mdx_link_default as MDXLink, media_stack_default as MediaStack, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MetaIcon, MetadataIcon, MicrosoftIcon, MistralIcon, MySubscriptionsIcon, nav_items_default as NavItems, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NetworkAgentIcon, NotificationIcon, OllamaIcon, OpenAIIcon, OpenBMBIcon, OpenRouterIcon, PaperClipIcon, PartyIcon, PerplexityIcon, PlusIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, PrettyJsonPrint, progress_default as Progress, PromptLibraryIcon, PythonIcon, QrIcon, QwenIcon, RadioGroup4 as RadioGroup, RadioGroupItem, ReactJsIcon, ReasoningIcon, ResizableHandle, ResizablePanel, ResizablePanelGroup, SaveIcon, ScheduledTasksComingSoonIcon, ScheduledTasksIcon, ScrollArea, ScrollBar, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, SendIcon, separator_default as Separator, SharedFolderIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFileIcon, SheetFooter, SheetHeader, SheetIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShortcutsIcon, skeleton_default as Skeleton, slider_default as Slider, SortingAToZ, SortingZToA, step_indicator_default as StepIndicator, StoreIcon, switch_default as Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, TogetherAI, Toggle, ToggleGroup, ToggleGroupItem, ToolAssetsIcon, ToolsDisabledIcon, ToolsIcon, Tooltip, TooltipArrow2 as TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, TracingIcon, TypeScriptIcon, USDCIcon, UnknownLanguageIcon, UploadVectorResourceIcon, video_player_default as VideoPlayer, WebSearchDisabledIcon, WebSearchIcon, youtube_embed_default as YouTubeEmbed, buttonVariants, fileIconMap, navigationMenuTriggerStyle, toggleVariants };
9785
+ export { AIAgentIcon, AISearchContentIcon, Accordion, AccordionContent, AccordionItem, AccordionTrigger, action_button_default as ActionButton, ActiveIcon, AddAgentIcon, AddCryptoWalletIcon, AddNewFolderIcon, AgentIcon, AiTasksIcon, AisIcon, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnthropicIcon, ApplyTypography, ArchiveIcon, ArchivedIcon, ArrowRightIcon, aspect_ratio_default as AspectRatio, AttachmentIcon, Avatar, AvatarFallback, AvatarImage, AyaCohereIcon, AzureIcon, badge_default as Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, breakpoint_indicator_default as BreakpointIndicator, BrowseSubscriptionIcon, button_default as Button, calendar_default as Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, CategoryIcon, ChatBubbleIcon, ChatInput, ChatInputArea, ChatSettingsIcon, checkbox_default as Checkbox, CloudModelIcon, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyToClipboardIcon, CreateAIIcon, CryptoWalletIcon, DeepSeekIcon, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, dialog_video_controller_default as DialogVideoController, DirectoryTypeIcon, DisconnectIcon, DocsBody, DocsDescription, DocsLayout, DocsPage3 as DocsPage, DocsTitle, DotsLoader, DownloadIcon, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHandle, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmbeddingsGeneratedIcon, EthereumIcon, ExoIcon, ExportIcon, Field, FieldDescription, FieldGroup, FieldLabel, FieldSeparator, FileEmptyStateIcon, FileTypeIcon, FilesIcon, FormulaIcon, GeminiIcon, GenerateDocIcon, GenerateFromWebIcon, GoogleIcon, GrokIcon, GroqIcon, HanzoCombinationMarkIcon, HanzoIcon, HanzoLogoIcon, HanzoLogoSoloIcon, HomeIcon, HomeLayout, HoverCard, HoverCardContent, HoverCardTrigger, icons_exports as Icons, image_default as Image, ImportIcon, InboxIcon, inline_icon_default as InlineIcon, input_default as Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, JobBubbleIcon, json_form_default as JsonForm, Kbd, KbdGroup, label_default as Label, link_element_default as LinkElement, list_box_default as ListBox, LmStudioIcon, loading_spinner_default as LoadingSpinner, LocalModelIcon, MCPIcon, mdx_link_default as MDXLink, media_stack_default as MediaStack, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MetaIcon, MetadataIcon, MicrosoftIcon, MistralIcon, MySubscriptionsIcon, nav_items_default as NavItems, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NetworkAgentIcon, NotificationIcon, OllamaIcon, OpenAIIcon, OpenBMBIcon, OpenRouterIcon, PaperClipIcon, PartyIcon, PerplexityIcon, PlusIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, PrettyJsonPrint, progress_default as Progress, PromptLibraryIcon, PythonIcon, QrIcon, QwenIcon, RadioGroup4 as RadioGroup, RadioGroupItem, ReactJsIcon, ReasoningIcon, ResizableHandle, ResizablePanel, ResizablePanelGroup, RootProvider, SaveIcon, ScheduledTasksComingSoonIcon, ScheduledTasksIcon, ScrollArea, ScrollBar, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, SendIcon, separator_default as Separator, SharedFolderIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFileIcon, SheetFooter, SheetHeader, SheetIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShortcutsIcon, skeleton_default as Skeleton, slider_default as Slider, SortingAToZ, SortingZToA, step_indicator_default as StepIndicator, StoreIcon, switch_default as Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, TogetherAI, Toggle, ToggleGroup, ToggleGroupItem, ToolAssetsIcon, ToolsDisabledIcon, ToolsIcon, Tooltip, TooltipArrow2 as TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, TracingIcon, TypeScriptIcon, USDCIcon, UnknownLanguageIcon, UploadVectorResourceIcon, video_player_default as VideoPlayer, WebSearchDisabledIcon, WebSearchIcon, youtube_embed_default as YouTubeEmbed, buttonVariants, defaultMdxComponents, fileIconMap, navigationMenuTriggerStyle, toggleVariants };