@hanzo/ui 5.3.23 → 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.
- package/dist/index.js +1717 -5
- package/dist/index.mjs +1702 -4
- package/dist/primitives/index.js +1717 -5
- package/dist/primitives/index.mjs +1702 -4
- package/dist/primitives-export.js +1717 -5
- package/dist/primitives-export.mjs +1702 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -45,6 +45,41 @@ var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
|
|
|
45
45
|
var NextImage = require('next/image');
|
|
46
46
|
var Link2 = require('next/link');
|
|
47
47
|
var Spline = require('@splinetool/react-spline');
|
|
48
|
+
var _icons = require('@icons');
|
|
49
|
+
var cn$1 = require('@/utils/cn');
|
|
50
|
+
var button = require('@/components/ui/button');
|
|
51
|
+
var Base = require('@/components/sidebar/base');
|
|
52
|
+
var pageTree = require('@/components/sidebar/page-tree');
|
|
53
|
+
var linkItem = require('@/components/sidebar/link-item');
|
|
54
|
+
var searchToggle = require('@/layouts/shared/search-toggle');
|
|
55
|
+
var mergeRefs = require('@/utils/merge-refs');
|
|
56
|
+
var shared = require('@/layouts/shared');
|
|
57
|
+
var linkItem$1 = require('@/layouts/shared/link-item');
|
|
58
|
+
var languageToggle = require('@/layouts/shared/language-toggle');
|
|
59
|
+
var framework = require('@hanzo/docs-core/framework');
|
|
60
|
+
var isActive = require('@/utils/is-active');
|
|
61
|
+
var Link5 = require('@hanzo/docs-core/link');
|
|
62
|
+
var useIsScrollTop = require('@/utils/use-is-scroll-top');
|
|
63
|
+
var tree = require('@/contexts/tree');
|
|
64
|
+
var tabs = require('@/components/sidebar/tabs');
|
|
65
|
+
var dropdown = require('@/components/sidebar/tabs/dropdown');
|
|
66
|
+
var client = require('@/layouts/home/client');
|
|
67
|
+
require('@/components/ui/popover');
|
|
68
|
+
var i18n = require('@/contexts/i18n');
|
|
69
|
+
var breadcrumb = require('@hanzo/docs-core/breadcrumb');
|
|
70
|
+
var collapsible = require('@/components/ui/collapsible');
|
|
71
|
+
var toc = require('@/components/toc');
|
|
72
|
+
var toc$1 = require('@hanzo/docs-core/toc');
|
|
73
|
+
var useFooterItems = require('@/utils/use-footer-items');
|
|
74
|
+
var TocDefault = require('@/components/toc/default');
|
|
75
|
+
var TocClerk = require('@/components/toc/clerk');
|
|
76
|
+
var card = require('@/components/card');
|
|
77
|
+
var callout = require('@/components/callout');
|
|
78
|
+
var heading = require('@/components/heading');
|
|
79
|
+
var codeblock = require('@/components/codeblock');
|
|
80
|
+
var base = require('@/provider/base');
|
|
81
|
+
var next = require('@hanzo/docs-core/framework/next');
|
|
82
|
+
var source_star = require('@hanzo/docs-core/source');
|
|
48
83
|
|
|
49
84
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
50
85
|
|
|
@@ -97,13 +132,30 @@ var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroup
|
|
|
97
132
|
var NextImage__default = /*#__PURE__*/_interopDefault(NextImage);
|
|
98
133
|
var Link2__default = /*#__PURE__*/_interopDefault(Link2);
|
|
99
134
|
var Spline__default = /*#__PURE__*/_interopDefault(Spline);
|
|
135
|
+
var Base__namespace = /*#__PURE__*/_interopNamespace(Base);
|
|
136
|
+
var Link5__default = /*#__PURE__*/_interopDefault(Link5);
|
|
137
|
+
var TocDefault__namespace = /*#__PURE__*/_interopNamespace(TocDefault);
|
|
138
|
+
var TocClerk__namespace = /*#__PURE__*/_interopNamespace(TocClerk);
|
|
139
|
+
var source_star__namespace = /*#__PURE__*/_interopNamespace(source_star);
|
|
100
140
|
|
|
101
141
|
var __defProp = Object.defineProperty;
|
|
142
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
143
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
144
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
102
145
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
103
146
|
var __export = (target, all) => {
|
|
104
147
|
for (var name in all)
|
|
105
148
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
106
149
|
};
|
|
150
|
+
var __copyProps = (to, from, except, desc) => {
|
|
151
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
152
|
+
for (let key of __getOwnPropNames(from))
|
|
153
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
154
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
155
|
+
}
|
|
156
|
+
return to;
|
|
157
|
+
};
|
|
158
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget);
|
|
107
159
|
function cn(...inputs) {
|
|
108
160
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
109
161
|
}
|
|
@@ -1532,14 +1584,14 @@ var InputOTPGroup = React2__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
1532
1584
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1533
1585
|
var InputOTPSlot = React2__namespace.forwardRef(({ index, className, ...props }, ref) => {
|
|
1534
1586
|
const inputOTPContext = React2__namespace.useContext(inputOtp.OTPInputContext);
|
|
1535
|
-
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1587
|
+
const { char, hasFakeCaret, isActive: isActive3 } = inputOTPContext.slots[index];
|
|
1536
1588
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1537
1589
|
"div",
|
|
1538
1590
|
{
|
|
1539
1591
|
ref,
|
|
1540
1592
|
className: cn(
|
|
1541
1593
|
"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",
|
|
1542
|
-
|
|
1594
|
+
isActive3 && "z-10 ring-1 ring-ring",
|
|
1543
1595
|
className
|
|
1544
1596
|
),
|
|
1545
1597
|
...props,
|
|
@@ -8135,10 +8187,1662 @@ var HanzoIcon = /* @__PURE__ */ __name(({ className }) => {
|
|
|
8135
8187
|
}
|
|
8136
8188
|
);
|
|
8137
8189
|
}, "HanzoIcon");
|
|
8190
|
+
var itemVariants = classVarianceAuthority.cva(
|
|
8191
|
+
"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",
|
|
8192
|
+
{
|
|
8193
|
+
variants: {
|
|
8194
|
+
variant: {
|
|
8195
|
+
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",
|
|
8196
|
+
button: "transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none"
|
|
8197
|
+
},
|
|
8198
|
+
highlight: {
|
|
8199
|
+
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"
|
|
8200
|
+
}
|
|
8201
|
+
}
|
|
8202
|
+
}
|
|
8203
|
+
);
|
|
8204
|
+
function getItemOffset(depth) {
|
|
8205
|
+
return `calc(${2 + 3 * depth} * var(--spacing))`;
|
|
8206
|
+
}
|
|
8207
|
+
__name(getItemOffset, "getItemOffset");
|
|
8208
|
+
var Sidebar = Base__namespace.SidebarProvider;
|
|
8209
|
+
var SidebarFolder2 = Base__namespace.SidebarFolder;
|
|
8210
|
+
var SidebarCollapseTrigger2 = Base__namespace.SidebarCollapseTrigger;
|
|
8211
|
+
var SidebarViewport2 = Base__namespace.SidebarViewport;
|
|
8212
|
+
var SidebarTrigger2 = Base__namespace.SidebarTrigger;
|
|
8213
|
+
function SidebarContent2({
|
|
8214
|
+
ref: refProp,
|
|
8215
|
+
className,
|
|
8216
|
+
children,
|
|
8217
|
+
...props
|
|
8218
|
+
}) {
|
|
8219
|
+
const ref = React2.useRef(null);
|
|
8220
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Base__namespace.SidebarContent, { children: ({ collapsed, hovered, ref: asideRef, ...rest }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8221
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8222
|
+
"div",
|
|
8223
|
+
{
|
|
8224
|
+
"data-sidebar-placeholder": "",
|
|
8225
|
+
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",
|
|
8226
|
+
children: [
|
|
8227
|
+
collapsed && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute start-0 inset-y-0 w-4", ...rest }),
|
|
8228
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8229
|
+
"aside",
|
|
8230
|
+
{
|
|
8231
|
+
id: "nd-sidebar",
|
|
8232
|
+
ref: mergeRefs.mergeRefs(ref, refProp, asideRef),
|
|
8233
|
+
"data-collapsed": collapsed,
|
|
8234
|
+
"data-hovered": collapsed && hovered,
|
|
8235
|
+
className: cn$1.cn(
|
|
8236
|
+
"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)",
|
|
8237
|
+
collapsed && [
|
|
8238
|
+
"inset-y-2 rounded-xl transition-transform border w-(--fd-sidebar-width)",
|
|
8239
|
+
hovered ? "shadow-lg translate-x-2 rtl:-translate-x-2" : "-translate-x-(--fd-sidebar-width) rtl:translate-x-full"
|
|
8240
|
+
],
|
|
8241
|
+
ref.current && ref.current.getAttribute("data-collapsed") === "true" !== collapsed && "transition-[width,inset-block,translate,background-color]",
|
|
8242
|
+
className
|
|
8243
|
+
),
|
|
8244
|
+
...props,
|
|
8245
|
+
...rest,
|
|
8246
|
+
children
|
|
8247
|
+
}
|
|
8248
|
+
)
|
|
8249
|
+
]
|
|
8250
|
+
}
|
|
8251
|
+
),
|
|
8252
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8253
|
+
"div",
|
|
8254
|
+
{
|
|
8255
|
+
"data-sidebar-panel": "",
|
|
8256
|
+
className: cn$1.cn(
|
|
8257
|
+
"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",
|
|
8258
|
+
(!collapsed || hovered) && "pointer-events-none opacity-0"
|
|
8259
|
+
),
|
|
8260
|
+
children: [
|
|
8261
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8262
|
+
SidebarCollapseTrigger2,
|
|
8263
|
+
{
|
|
8264
|
+
className: cn$1.cn(
|
|
8265
|
+
button.buttonVariants({
|
|
8266
|
+
color: "ghost",
|
|
8267
|
+
size: "icon-sm",
|
|
8268
|
+
className: "rounded-lg"
|
|
8269
|
+
})
|
|
8270
|
+
),
|
|
8271
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(_icons.Sidebar, {})
|
|
8272
|
+
}
|
|
8273
|
+
),
|
|
8274
|
+
/* @__PURE__ */ jsxRuntime.jsx(searchToggle.SearchToggle, { className: "rounded-lg", hideIfDisabled: true })
|
|
8275
|
+
]
|
|
8276
|
+
}
|
|
8277
|
+
)
|
|
8278
|
+
] }) });
|
|
8279
|
+
}
|
|
8280
|
+
__name(SidebarContent2, "SidebarContent");
|
|
8281
|
+
function SidebarDrawer({
|
|
8282
|
+
children,
|
|
8283
|
+
className,
|
|
8284
|
+
...props
|
|
8285
|
+
}) {
|
|
8286
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8287
|
+
/* @__PURE__ */ jsxRuntime.jsx(Base__namespace.SidebarDrawerOverlay, { className: "fixed z-40 inset-0 backdrop-blur-xs data-[state=open]:animate-fd-fade-in data-[state=closed]:animate-fd-fade-out" }),
|
|
8288
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8289
|
+
Base__namespace.SidebarDrawerContent,
|
|
8290
|
+
{
|
|
8291
|
+
className: cn$1.cn(
|
|
8292
|
+
"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",
|
|
8293
|
+
className
|
|
8294
|
+
),
|
|
8295
|
+
...props,
|
|
8296
|
+
children
|
|
8297
|
+
}
|
|
8298
|
+
)
|
|
8299
|
+
] });
|
|
8300
|
+
}
|
|
8301
|
+
__name(SidebarDrawer, "SidebarDrawer");
|
|
8302
|
+
function SidebarSeparator2({
|
|
8303
|
+
className,
|
|
8304
|
+
style,
|
|
8305
|
+
children,
|
|
8306
|
+
...props
|
|
8307
|
+
}) {
|
|
8308
|
+
const depth = Base__namespace.useFolderDepth();
|
|
8309
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8310
|
+
Base__namespace.SidebarSeparator,
|
|
8311
|
+
{
|
|
8312
|
+
className: cn$1.cn("[&_svg]:size-4 [&_svg]:shrink-0", className),
|
|
8313
|
+
style: {
|
|
8314
|
+
paddingInlineStart: getItemOffset(depth),
|
|
8315
|
+
...style
|
|
8316
|
+
},
|
|
8317
|
+
...props,
|
|
8318
|
+
children
|
|
8319
|
+
}
|
|
8320
|
+
);
|
|
8321
|
+
}
|
|
8322
|
+
__name(SidebarSeparator2, "SidebarSeparator");
|
|
8323
|
+
function SidebarItem2({
|
|
8324
|
+
className,
|
|
8325
|
+
style,
|
|
8326
|
+
children,
|
|
8327
|
+
...props
|
|
8328
|
+
}) {
|
|
8329
|
+
const depth = Base__namespace.useFolderDepth();
|
|
8330
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8331
|
+
Base__namespace.SidebarItem,
|
|
8332
|
+
{
|
|
8333
|
+
className: cn$1.cn(
|
|
8334
|
+
itemVariants({ variant: "link", highlight: depth >= 1 }),
|
|
8335
|
+
className
|
|
8336
|
+
),
|
|
8337
|
+
style: {
|
|
8338
|
+
paddingInlineStart: getItemOffset(depth),
|
|
8339
|
+
...style
|
|
8340
|
+
},
|
|
8341
|
+
...props,
|
|
8342
|
+
children
|
|
8343
|
+
}
|
|
8344
|
+
);
|
|
8345
|
+
}
|
|
8346
|
+
__name(SidebarItem2, "SidebarItem");
|
|
8347
|
+
function SidebarFolderTrigger2({
|
|
8348
|
+
className,
|
|
8349
|
+
style,
|
|
8350
|
+
...props
|
|
8351
|
+
}) {
|
|
8352
|
+
const { depth, collapsible } = Base__namespace.useFolder();
|
|
8353
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8354
|
+
Base__namespace.SidebarFolderTrigger,
|
|
8355
|
+
{
|
|
8356
|
+
className: cn$1.cn(
|
|
8357
|
+
itemVariants({ variant: collapsible ? "button" : null }),
|
|
8358
|
+
"w-full",
|
|
8359
|
+
className
|
|
8360
|
+
),
|
|
8361
|
+
style: {
|
|
8362
|
+
paddingInlineStart: getItemOffset(depth - 1),
|
|
8363
|
+
...style
|
|
8364
|
+
},
|
|
8365
|
+
...props,
|
|
8366
|
+
children: props.children
|
|
8367
|
+
}
|
|
8368
|
+
);
|
|
8369
|
+
}
|
|
8370
|
+
__name(SidebarFolderTrigger2, "SidebarFolderTrigger");
|
|
8371
|
+
function SidebarFolderLink2({
|
|
8372
|
+
className,
|
|
8373
|
+
style,
|
|
8374
|
+
...props
|
|
8375
|
+
}) {
|
|
8376
|
+
const depth = Base__namespace.useFolderDepth();
|
|
8377
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8378
|
+
Base__namespace.SidebarFolderLink,
|
|
8379
|
+
{
|
|
8380
|
+
className: cn$1.cn(
|
|
8381
|
+
itemVariants({ variant: "link", highlight: depth > 1 }),
|
|
8382
|
+
"w-full",
|
|
8383
|
+
className
|
|
8384
|
+
),
|
|
8385
|
+
style: {
|
|
8386
|
+
paddingInlineStart: getItemOffset(depth - 1),
|
|
8387
|
+
...style
|
|
8388
|
+
},
|
|
8389
|
+
...props,
|
|
8390
|
+
children: props.children
|
|
8391
|
+
}
|
|
8392
|
+
);
|
|
8393
|
+
}
|
|
8394
|
+
__name(SidebarFolderLink2, "SidebarFolderLink");
|
|
8395
|
+
function SidebarFolderContent2({
|
|
8396
|
+
className,
|
|
8397
|
+
children,
|
|
8398
|
+
...props
|
|
8399
|
+
}) {
|
|
8400
|
+
const depth = Base__namespace.useFolderDepth();
|
|
8401
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8402
|
+
Base__namespace.SidebarFolderContent,
|
|
8403
|
+
{
|
|
8404
|
+
className: cn$1.cn(
|
|
8405
|
+
"relative",
|
|
8406
|
+
depth === 1 && "before:content-[''] before:absolute before:w-px before:inset-y-1 before:bg-fd-border before:start-2.5",
|
|
8407
|
+
className
|
|
8408
|
+
),
|
|
8409
|
+
...props,
|
|
8410
|
+
children
|
|
8411
|
+
}
|
|
8412
|
+
);
|
|
8413
|
+
}
|
|
8414
|
+
__name(SidebarFolderContent2, "SidebarFolderContent");
|
|
8415
|
+
var SidebarPageTree = pageTree.createPageTreeRenderer({
|
|
8416
|
+
SidebarFolder: SidebarFolder2,
|
|
8417
|
+
SidebarFolderContent: SidebarFolderContent2,
|
|
8418
|
+
SidebarFolderLink: SidebarFolderLink2,
|
|
8419
|
+
SidebarFolderTrigger: SidebarFolderTrigger2,
|
|
8420
|
+
SidebarItem: SidebarItem2,
|
|
8421
|
+
SidebarSeparator: SidebarSeparator2
|
|
8422
|
+
});
|
|
8423
|
+
var SidebarLinkItem = linkItem.createLinkItemRenderer({
|
|
8424
|
+
SidebarFolder: SidebarFolder2,
|
|
8425
|
+
SidebarFolderContent: SidebarFolderContent2,
|
|
8426
|
+
SidebarFolderLink: SidebarFolderLink2,
|
|
8427
|
+
SidebarFolderTrigger: SidebarFolderTrigger2,
|
|
8428
|
+
SidebarItem: SidebarItem2
|
|
8429
|
+
});
|
|
8430
|
+
var LayoutContext = React2.createContext(null);
|
|
8431
|
+
function LayoutContextProvider({
|
|
8432
|
+
navTransparentMode = "none",
|
|
8433
|
+
children
|
|
8434
|
+
}) {
|
|
8435
|
+
const isTop = useIsScrollTop.useIsScrollTop({ enabled: navTransparentMode === "top" }) ?? true;
|
|
8436
|
+
const isNavTransparent = navTransparentMode === "top" ? isTop : navTransparentMode === "always";
|
|
8437
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8438
|
+
LayoutContext,
|
|
8439
|
+
{
|
|
8440
|
+
value: React2.useMemo(
|
|
8441
|
+
() => ({
|
|
8442
|
+
isNavTransparent
|
|
8443
|
+
}),
|
|
8444
|
+
[isNavTransparent]
|
|
8445
|
+
),
|
|
8446
|
+
children
|
|
8447
|
+
}
|
|
8448
|
+
);
|
|
8449
|
+
}
|
|
8450
|
+
__name(LayoutContextProvider, "LayoutContextProvider");
|
|
8451
|
+
function LayoutHeader(props) {
|
|
8452
|
+
const { isNavTransparent } = React2.use(LayoutContext);
|
|
8453
|
+
return /* @__PURE__ */ jsxRuntime.jsx("header", { "data-transparent": isNavTransparent, ...props, children: props.children });
|
|
8454
|
+
}
|
|
8455
|
+
__name(LayoutHeader, "LayoutHeader");
|
|
8456
|
+
function LayoutBody({
|
|
8457
|
+
className,
|
|
8458
|
+
style,
|
|
8459
|
+
children,
|
|
8460
|
+
...props
|
|
8461
|
+
}) {
|
|
8462
|
+
const { collapsed } = Base.useSidebar();
|
|
8463
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8464
|
+
"div",
|
|
8465
|
+
{
|
|
8466
|
+
id: "nd-docs-layout",
|
|
8467
|
+
className: cn$1.cn(
|
|
8468
|
+
"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]",
|
|
8469
|
+
className
|
|
8470
|
+
),
|
|
8471
|
+
"data-sidebar-collapsed": collapsed,
|
|
8472
|
+
style: {
|
|
8473
|
+
gridTemplate: `"sidebar header toc"
|
|
8474
|
+
"sidebar toc-popover toc"
|
|
8475
|
+
"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)`,
|
|
8476
|
+
"--fd-docs-row-1": "var(--fd-banner-height, 0px)",
|
|
8477
|
+
"--fd-docs-row-2": "calc(var(--fd-docs-row-1) + var(--fd-header-height))",
|
|
8478
|
+
"--fd-docs-row-3": "calc(var(--fd-docs-row-2) + var(--fd-toc-popover-height))",
|
|
8479
|
+
"--fd-sidebar-col": collapsed ? "0px" : "var(--fd-sidebar-width)",
|
|
8480
|
+
...style
|
|
8481
|
+
},
|
|
8482
|
+
...props,
|
|
8483
|
+
children
|
|
8484
|
+
}
|
|
8485
|
+
);
|
|
8486
|
+
}
|
|
8487
|
+
__name(LayoutBody, "LayoutBody");
|
|
8488
|
+
function LayoutTabs({
|
|
8489
|
+
options,
|
|
8490
|
+
...props
|
|
8491
|
+
}) {
|
|
8492
|
+
const pathname = framework.usePathname();
|
|
8493
|
+
const selected = React2.useMemo(() => {
|
|
8494
|
+
return options.findLast((option) => isActive.isTabActive(option, pathname));
|
|
8495
|
+
}, [options, pathname]);
|
|
8496
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8497
|
+
"div",
|
|
8498
|
+
{
|
|
8499
|
+
...props,
|
|
8500
|
+
className: cn$1.cn(
|
|
8501
|
+
"flex flex-row items-end gap-6 overflow-auto [grid-area:main]",
|
|
8502
|
+
props.className
|
|
8503
|
+
),
|
|
8504
|
+
children: options.map((option, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8505
|
+
Link5__default.default,
|
|
8506
|
+
{
|
|
8507
|
+
href: option.url,
|
|
8508
|
+
className: cn$1.cn(
|
|
8509
|
+
"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",
|
|
8510
|
+
option.unlisted && selected !== option && "hidden",
|
|
8511
|
+
selected === option && "border-fd-primary text-fd-primary"
|
|
8512
|
+
),
|
|
8513
|
+
children: option.title
|
|
8514
|
+
},
|
|
8515
|
+
i
|
|
8516
|
+
))
|
|
8517
|
+
}
|
|
8518
|
+
);
|
|
8519
|
+
}
|
|
8520
|
+
__name(LayoutTabs, "LayoutTabs");
|
|
8521
|
+
var itemVariants2 = classVarianceAuthority.cva(
|
|
8522
|
+
"size-6.5 rounded-full p-1.5 text-fd-muted-foreground",
|
|
8523
|
+
{
|
|
8524
|
+
variants: {
|
|
8525
|
+
active: {
|
|
8526
|
+
true: "bg-fd-accent text-fd-accent-foreground",
|
|
8527
|
+
false: "text-fd-muted-foreground"
|
|
8528
|
+
}
|
|
8529
|
+
}
|
|
8530
|
+
}
|
|
8531
|
+
);
|
|
8532
|
+
var full = [
|
|
8533
|
+
["light", _icons.Sun],
|
|
8534
|
+
["dark", _icons.Moon],
|
|
8535
|
+
["system", _icons.Airplay]
|
|
8536
|
+
];
|
|
8537
|
+
function ThemeToggle({
|
|
8538
|
+
className,
|
|
8539
|
+
mode = "light-dark",
|
|
8540
|
+
...props
|
|
8541
|
+
}) {
|
|
8542
|
+
const { setTheme, theme, resolvedTheme } = nextThemes.useTheme();
|
|
8543
|
+
const [mounted, setMounted] = React2.useState(false);
|
|
8544
|
+
React2.useEffect(() => {
|
|
8545
|
+
setMounted(true);
|
|
8546
|
+
}, []);
|
|
8547
|
+
const container = cn$1.cn(
|
|
8548
|
+
"inline-flex items-center rounded-full border p-1",
|
|
8549
|
+
className
|
|
8550
|
+
);
|
|
8551
|
+
if (mode === "light-dark") {
|
|
8552
|
+
const value2 = mounted ? resolvedTheme : null;
|
|
8553
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8554
|
+
"button",
|
|
8555
|
+
{
|
|
8556
|
+
className: container,
|
|
8557
|
+
"aria-label": `Toggle Theme`,
|
|
8558
|
+
onClick: () => setTheme(value2 === "light" ? "dark" : "light"),
|
|
8559
|
+
"data-theme-toggle": "",
|
|
8560
|
+
children: full.map(([key, Icon2]) => {
|
|
8561
|
+
if (key === "system") return;
|
|
8562
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8563
|
+
Icon2,
|
|
8564
|
+
{
|
|
8565
|
+
fill: "currentColor",
|
|
8566
|
+
className: cn$1.cn(itemVariants2({ active: value2 === key }))
|
|
8567
|
+
},
|
|
8568
|
+
key
|
|
8569
|
+
);
|
|
8570
|
+
})
|
|
8571
|
+
}
|
|
8572
|
+
);
|
|
8573
|
+
}
|
|
8574
|
+
const value = mounted ? theme : null;
|
|
8575
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: container, "data-theme-toggle": "", ...props, children: full.map(([key, Icon2]) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8576
|
+
"button",
|
|
8577
|
+
{
|
|
8578
|
+
"aria-label": key,
|
|
8579
|
+
className: cn$1.cn(itemVariants2({ active: value === key })),
|
|
8580
|
+
onClick: () => setTheme(key),
|
|
8581
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "size-full", fill: "currentColor" })
|
|
8582
|
+
},
|
|
8583
|
+
key
|
|
8584
|
+
)) });
|
|
8585
|
+
}
|
|
8586
|
+
__name(ThemeToggle, "ThemeToggle");
|
|
8587
|
+
function DocsLayout({
|
|
8588
|
+
nav: { transparentMode, ...nav } = {},
|
|
8589
|
+
sidebar: {
|
|
8590
|
+
tabs: sidebarTabs,
|
|
8591
|
+
enabled: sidebarEnabled = true,
|
|
8592
|
+
defaultOpenLevel,
|
|
8593
|
+
prefetch,
|
|
8594
|
+
...sidebarProps
|
|
8595
|
+
} = {},
|
|
8596
|
+
searchToggle: searchToggle$1 = {},
|
|
8597
|
+
themeSwitch = {},
|
|
8598
|
+
tabMode = "auto",
|
|
8599
|
+
i18n = false,
|
|
8600
|
+
children,
|
|
8601
|
+
tree: tree$1,
|
|
8602
|
+
...props
|
|
8603
|
+
}) {
|
|
8604
|
+
const tabs$1 = React2.useMemo(() => {
|
|
8605
|
+
if (Array.isArray(sidebarTabs)) {
|
|
8606
|
+
return sidebarTabs;
|
|
8607
|
+
}
|
|
8608
|
+
if (typeof sidebarTabs === "object") {
|
|
8609
|
+
return tabs.getSidebarTabs(tree$1, sidebarTabs);
|
|
8610
|
+
}
|
|
8611
|
+
if (sidebarTabs !== false) {
|
|
8612
|
+
return tabs.getSidebarTabs(tree$1);
|
|
8613
|
+
}
|
|
8614
|
+
return [];
|
|
8615
|
+
}, [tree$1, sidebarTabs]);
|
|
8616
|
+
const links = shared.resolveLinkItems(props);
|
|
8617
|
+
function sidebar() {
|
|
8618
|
+
const {
|
|
8619
|
+
footer,
|
|
8620
|
+
banner,
|
|
8621
|
+
collapsible = true,
|
|
8622
|
+
component,
|
|
8623
|
+
components,
|
|
8624
|
+
...rest
|
|
8625
|
+
} = sidebarProps;
|
|
8626
|
+
if (component) return component;
|
|
8627
|
+
const iconLinks = links.filter((item) => item.type === "icon");
|
|
8628
|
+
const viewport = /* @__PURE__ */ jsxRuntime.jsxs(SidebarViewport2, { children: [
|
|
8629
|
+
links.filter((v) => v.type !== "icon").map((item, i, list) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8630
|
+
SidebarLinkItem,
|
|
8631
|
+
{
|
|
8632
|
+
item,
|
|
8633
|
+
className: cn$1.cn(i === list.length - 1 && "mb-4")
|
|
8634
|
+
},
|
|
8635
|
+
i
|
|
8636
|
+
)),
|
|
8637
|
+
/* @__PURE__ */ jsxRuntime.jsx(SidebarPageTree, { ...components })
|
|
8638
|
+
] });
|
|
8639
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8640
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SidebarContent2, { ...rest, children: [
|
|
8641
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3 p-4 pb-2", children: [
|
|
8642
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex", children: [
|
|
8643
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8644
|
+
Link5__default.default,
|
|
8645
|
+
{
|
|
8646
|
+
href: nav.url ?? "/",
|
|
8647
|
+
className: "inline-flex text-[0.9375rem] items-center gap-2.5 font-medium me-auto",
|
|
8648
|
+
children: nav.title
|
|
8649
|
+
}
|
|
8650
|
+
),
|
|
8651
|
+
nav.children,
|
|
8652
|
+
collapsible && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8653
|
+
SidebarCollapseTrigger2,
|
|
8654
|
+
{
|
|
8655
|
+
className: cn$1.cn(
|
|
8656
|
+
button.buttonVariants({
|
|
8657
|
+
color: "ghost",
|
|
8658
|
+
size: "icon-sm",
|
|
8659
|
+
className: "mb-auto text-fd-muted-foreground"
|
|
8660
|
+
})
|
|
8661
|
+
),
|
|
8662
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(_icons.Sidebar, {})
|
|
8663
|
+
}
|
|
8664
|
+
)
|
|
8665
|
+
] }),
|
|
8666
|
+
searchToggle$1.enabled !== false && (searchToggle$1.components?.lg ?? /* @__PURE__ */ jsxRuntime.jsx(searchToggle.LargeSearchToggle, { hideIfDisabled: true })),
|
|
8667
|
+
tabs$1.length > 0 && tabMode === "auto" && /* @__PURE__ */ jsxRuntime.jsx(dropdown.SidebarTabsDropdown, { options: tabs$1 }),
|
|
8668
|
+
banner
|
|
8669
|
+
] }),
|
|
8670
|
+
viewport,
|
|
8671
|
+
(i18n || iconLinks.length > 0 || themeSwitch?.enabled !== false || footer) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col border-t p-4 pt-2 empty:hidden", children: [
|
|
8672
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex text-fd-muted-foreground items-center empty:hidden", children: [
|
|
8673
|
+
i18n && /* @__PURE__ */ jsxRuntime.jsx(languageToggle.LanguageToggle, { children: /* @__PURE__ */ jsxRuntime.jsx(_icons.Languages, { className: "size-4.5" }) }),
|
|
8674
|
+
iconLinks.map((item, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8675
|
+
linkItem$1.LinkItem,
|
|
8676
|
+
{
|
|
8677
|
+
item,
|
|
8678
|
+
className: cn$1.cn(
|
|
8679
|
+
button.buttonVariants({ size: "icon-sm", color: "ghost" })
|
|
8680
|
+
),
|
|
8681
|
+
"aria-label": item.label,
|
|
8682
|
+
children: item.icon
|
|
8683
|
+
},
|
|
8684
|
+
i
|
|
8685
|
+
)),
|
|
8686
|
+
themeSwitch.enabled !== false && (themeSwitch.component ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8687
|
+
ThemeToggle,
|
|
8688
|
+
{
|
|
8689
|
+
className: "ms-auto p-0",
|
|
8690
|
+
mode: themeSwitch.mode
|
|
8691
|
+
}
|
|
8692
|
+
))
|
|
8693
|
+
] }),
|
|
8694
|
+
footer
|
|
8695
|
+
] })
|
|
8696
|
+
] }),
|
|
8697
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SidebarDrawer, { children: [
|
|
8698
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3 p-4 pb-2", children: [
|
|
8699
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex text-fd-muted-foreground items-center gap-1.5", children: [
|
|
8700
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1", children: iconLinks.map((item, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8701
|
+
linkItem$1.LinkItem,
|
|
8702
|
+
{
|
|
8703
|
+
item,
|
|
8704
|
+
className: cn$1.cn(
|
|
8705
|
+
button.buttonVariants({
|
|
8706
|
+
size: "icon-sm",
|
|
8707
|
+
color: "ghost",
|
|
8708
|
+
className: "p-2"
|
|
8709
|
+
})
|
|
8710
|
+
),
|
|
8711
|
+
"aria-label": item.label,
|
|
8712
|
+
children: item.icon
|
|
8713
|
+
},
|
|
8714
|
+
i
|
|
8715
|
+
)) }),
|
|
8716
|
+
i18n && /* @__PURE__ */ jsxRuntime.jsxs(languageToggle.LanguageToggle, { children: [
|
|
8717
|
+
/* @__PURE__ */ jsxRuntime.jsx(_icons.Languages, { className: "size-4.5" }),
|
|
8718
|
+
/* @__PURE__ */ jsxRuntime.jsx(languageToggle.LanguageToggleText, {})
|
|
8719
|
+
] }),
|
|
8720
|
+
themeSwitch.enabled !== false && (themeSwitch.component ?? /* @__PURE__ */ jsxRuntime.jsx(ThemeToggle, { className: "p-0", mode: themeSwitch.mode })),
|
|
8721
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8722
|
+
SidebarTrigger2,
|
|
8723
|
+
{
|
|
8724
|
+
className: cn$1.cn(
|
|
8725
|
+
button.buttonVariants({
|
|
8726
|
+
color: "ghost",
|
|
8727
|
+
size: "icon-sm",
|
|
8728
|
+
className: "p-2"
|
|
8729
|
+
})
|
|
8730
|
+
),
|
|
8731
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(_icons.Sidebar, {})
|
|
8732
|
+
}
|
|
8733
|
+
)
|
|
8734
|
+
] }),
|
|
8735
|
+
tabs$1.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(dropdown.SidebarTabsDropdown, { options: tabs$1 }),
|
|
8736
|
+
banner
|
|
8737
|
+
] }),
|
|
8738
|
+
viewport,
|
|
8739
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col border-t p-4 pt-2 empty:hidden", children: footer })
|
|
8740
|
+
] })
|
|
8741
|
+
] });
|
|
8742
|
+
}
|
|
8743
|
+
__name(sidebar, "sidebar");
|
|
8744
|
+
return /* @__PURE__ */ jsxRuntime.jsx(tree.TreeContextProvider, { tree: tree$1, children: /* @__PURE__ */ jsxRuntime.jsx(LayoutContextProvider, { navTransparentMode: transparentMode, children: /* @__PURE__ */ jsxRuntime.jsx(Sidebar, { defaultOpenLevel, prefetch, children: /* @__PURE__ */ jsxRuntime.jsxs(LayoutBody, { ...props.containerProps, children: [
|
|
8745
|
+
nav.enabled !== false && (nav.component ?? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8746
|
+
LayoutHeader,
|
|
8747
|
+
{
|
|
8748
|
+
id: "nd-subnav",
|
|
8749
|
+
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",
|
|
8750
|
+
children: [
|
|
8751
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8752
|
+
Link5__default.default,
|
|
8753
|
+
{
|
|
8754
|
+
href: nav.url ?? "/",
|
|
8755
|
+
className: "inline-flex items-center gap-2.5 font-semibold",
|
|
8756
|
+
children: nav.title
|
|
8757
|
+
}
|
|
8758
|
+
),
|
|
8759
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: nav.children }),
|
|
8760
|
+
searchToggle$1.enabled !== false && (searchToggle$1.components?.sm ?? /* @__PURE__ */ jsxRuntime.jsx(searchToggle.SearchToggle, { className: "p-2", hideIfDisabled: true })),
|
|
8761
|
+
sidebarEnabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8762
|
+
SidebarTrigger2,
|
|
8763
|
+
{
|
|
8764
|
+
className: cn$1.cn(
|
|
8765
|
+
button.buttonVariants({
|
|
8766
|
+
color: "ghost",
|
|
8767
|
+
size: "icon-sm",
|
|
8768
|
+
className: "p-2"
|
|
8769
|
+
})
|
|
8770
|
+
),
|
|
8771
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(_icons.Sidebar, {})
|
|
8772
|
+
}
|
|
8773
|
+
)
|
|
8774
|
+
]
|
|
8775
|
+
}
|
|
8776
|
+
)),
|
|
8777
|
+
sidebarEnabled && sidebar(),
|
|
8778
|
+
tabMode === "top" && tabs$1.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8779
|
+
LayoutTabs,
|
|
8780
|
+
{
|
|
8781
|
+
options: tabs$1,
|
|
8782
|
+
className: "z-10 bg-fd-background border-b px-6 pt-3 xl:px-8 max-md:hidden"
|
|
8783
|
+
}
|
|
8784
|
+
),
|
|
8785
|
+
children
|
|
8786
|
+
] }) }) }) });
|
|
8787
|
+
}
|
|
8788
|
+
__name(DocsLayout, "DocsLayout");
|
|
8789
|
+
function HomeLayout(props) {
|
|
8790
|
+
const {
|
|
8791
|
+
nav = {},
|
|
8792
|
+
links,
|
|
8793
|
+
githubUrl,
|
|
8794
|
+
i18n,
|
|
8795
|
+
themeSwitch = {},
|
|
8796
|
+
searchToggle,
|
|
8797
|
+
...rest
|
|
8798
|
+
} = props;
|
|
8799
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8800
|
+
"main",
|
|
8801
|
+
{
|
|
8802
|
+
id: "nd-home-layout",
|
|
8803
|
+
...rest,
|
|
8804
|
+
className: cn$1.cn(
|
|
8805
|
+
"flex flex-1 flex-col [--fd-layout-width:1400px]",
|
|
8806
|
+
rest.className
|
|
8807
|
+
),
|
|
8808
|
+
children: [
|
|
8809
|
+
nav.enabled !== false && (nav.component ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8810
|
+
client.Header,
|
|
8811
|
+
{
|
|
8812
|
+
links,
|
|
8813
|
+
nav,
|
|
8814
|
+
themeSwitch,
|
|
8815
|
+
searchToggle,
|
|
8816
|
+
i18n,
|
|
8817
|
+
githubUrl
|
|
8818
|
+
}
|
|
8819
|
+
)),
|
|
8820
|
+
props.children
|
|
8821
|
+
]
|
|
8822
|
+
}
|
|
8823
|
+
);
|
|
8824
|
+
}
|
|
8825
|
+
__name(HomeLayout, "HomeLayout");
|
|
8826
|
+
var LayoutContext2 = React2.createContext(null);
|
|
8138
8827
|
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8828
|
+
// docs/layouts/docs/page/index.tsx
|
|
8829
|
+
var page_exports = {};
|
|
8830
|
+
__export(page_exports, {
|
|
8831
|
+
DocsBody: () => DocsBody,
|
|
8832
|
+
DocsDescription: () => DocsDescription,
|
|
8833
|
+
DocsPage: () => DocsPage,
|
|
8834
|
+
DocsTitle: () => DocsTitle,
|
|
8835
|
+
EditOnGitHub: () => EditOnGitHub,
|
|
8836
|
+
PageBreadcrumb: () => PageBreadcrumb,
|
|
8837
|
+
PageLastUpdate: () => PageLastUpdate
|
|
8838
|
+
});
|
|
8839
|
+
var TocPopoverContext = React2.createContext(null);
|
|
8840
|
+
function PageTOCPopover({
|
|
8841
|
+
className,
|
|
8842
|
+
children,
|
|
8843
|
+
...rest
|
|
8844
|
+
}) {
|
|
8845
|
+
const ref = React2.useRef(null);
|
|
8846
|
+
const [open, setOpen] = React2.useState(false);
|
|
8847
|
+
const { isNavTransparent } = React2.use(LayoutContext);
|
|
8848
|
+
const onClick = React2.useEffectEvent((e) => {
|
|
8849
|
+
if (!open) return;
|
|
8850
|
+
if (ref.current && !ref.current.contains(e.target))
|
|
8851
|
+
setOpen(false);
|
|
8852
|
+
});
|
|
8853
|
+
React2.useEffect(() => {
|
|
8854
|
+
window.addEventListener("click", onClick);
|
|
8855
|
+
return () => {
|
|
8856
|
+
window.removeEventListener("click", onClick);
|
|
8857
|
+
};
|
|
8858
|
+
}, []);
|
|
8859
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8860
|
+
TocPopoverContext,
|
|
8861
|
+
{
|
|
8862
|
+
value: React2.useMemo(
|
|
8863
|
+
() => ({
|
|
8864
|
+
open,
|
|
8865
|
+
setOpen
|
|
8866
|
+
}),
|
|
8867
|
+
[setOpen, open]
|
|
8868
|
+
),
|
|
8869
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8870
|
+
collapsible.Collapsible,
|
|
8871
|
+
{
|
|
8872
|
+
open,
|
|
8873
|
+
onOpenChange: setOpen,
|
|
8874
|
+
"data-toc-popover": "",
|
|
8875
|
+
className: cn$1.cn(
|
|
8876
|
+
"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)]",
|
|
8877
|
+
className
|
|
8878
|
+
),
|
|
8879
|
+
...rest,
|
|
8880
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8881
|
+
"header",
|
|
8882
|
+
{
|
|
8883
|
+
ref,
|
|
8884
|
+
className: cn$1.cn(
|
|
8885
|
+
"border-b backdrop-blur-sm transition-colors",
|
|
8886
|
+
(!isNavTransparent || open) && "bg-fd-background/80",
|
|
8887
|
+
open && "shadow-lg"
|
|
8888
|
+
),
|
|
8889
|
+
children
|
|
8890
|
+
}
|
|
8891
|
+
)
|
|
8892
|
+
}
|
|
8893
|
+
)
|
|
8894
|
+
}
|
|
8895
|
+
);
|
|
8896
|
+
}
|
|
8897
|
+
__name(PageTOCPopover, "PageTOCPopover");
|
|
8898
|
+
function PageTOCPopoverTrigger({
|
|
8899
|
+
className,
|
|
8900
|
+
...props
|
|
8901
|
+
}) {
|
|
8902
|
+
const { text } = i18n.useI18n();
|
|
8903
|
+
const { open } = React2.use(TocPopoverContext);
|
|
8904
|
+
const items = toc.useTOCItems();
|
|
8905
|
+
const active = toc$1.useActiveAnchor();
|
|
8906
|
+
const selected = React2.useMemo(
|
|
8907
|
+
() => items.findIndex((item) => active === item.url.slice(1)),
|
|
8908
|
+
[items, active]
|
|
8909
|
+
);
|
|
8910
|
+
const path = tree.useTreePath().at(-1);
|
|
8911
|
+
const showItem = selected !== -1 && !open;
|
|
8912
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8913
|
+
collapsible.CollapsibleTrigger,
|
|
8914
|
+
{
|
|
8915
|
+
className: cn$1.cn(
|
|
8916
|
+
"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",
|
|
8917
|
+
className
|
|
8918
|
+
),
|
|
8919
|
+
"data-toc-popover-trigger": "",
|
|
8920
|
+
...props,
|
|
8921
|
+
children: [
|
|
8922
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8923
|
+
ProgressCircle,
|
|
8924
|
+
{
|
|
8925
|
+
value: (selected + 1) / Math.max(1, items.length),
|
|
8926
|
+
max: 1,
|
|
8927
|
+
className: cn$1.cn("shrink-0", open && "text-fd-primary")
|
|
8928
|
+
}
|
|
8929
|
+
),
|
|
8930
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "grid flex-1 *:my-auto *:row-start-1 *:col-start-1", children: [
|
|
8931
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8932
|
+
"span",
|
|
8933
|
+
{
|
|
8934
|
+
className: cn$1.cn(
|
|
8935
|
+
"truncate transition-all",
|
|
8936
|
+
open && "text-fd-foreground",
|
|
8937
|
+
showItem && "opacity-0 -translate-y-full pointer-events-none"
|
|
8938
|
+
),
|
|
8939
|
+
children: path?.name ?? text.toc
|
|
8940
|
+
}
|
|
8941
|
+
),
|
|
8942
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8943
|
+
"span",
|
|
8944
|
+
{
|
|
8945
|
+
className: cn$1.cn(
|
|
8946
|
+
"truncate transition-all",
|
|
8947
|
+
!showItem && "opacity-0 translate-y-full pointer-events-none"
|
|
8948
|
+
),
|
|
8949
|
+
children: items[selected]?.title
|
|
8950
|
+
}
|
|
8951
|
+
)
|
|
8952
|
+
] }),
|
|
8953
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8954
|
+
_icons.ChevronDown,
|
|
8955
|
+
{
|
|
8956
|
+
className: cn$1.cn(
|
|
8957
|
+
"shrink-0 transition-transform mx-0.5",
|
|
8958
|
+
open && "rotate-180"
|
|
8959
|
+
)
|
|
8960
|
+
}
|
|
8961
|
+
)
|
|
8962
|
+
]
|
|
8963
|
+
}
|
|
8964
|
+
);
|
|
8965
|
+
}
|
|
8966
|
+
__name(PageTOCPopoverTrigger, "PageTOCPopoverTrigger");
|
|
8967
|
+
function clamp(input, min, max) {
|
|
8968
|
+
if (input < min) return min;
|
|
8969
|
+
if (input > max) return max;
|
|
8970
|
+
return input;
|
|
8971
|
+
}
|
|
8972
|
+
__name(clamp, "clamp");
|
|
8973
|
+
function ProgressCircle({
|
|
8974
|
+
value,
|
|
8975
|
+
strokeWidth = 2,
|
|
8976
|
+
size = 24,
|
|
8977
|
+
min = 0,
|
|
8978
|
+
max = 100,
|
|
8979
|
+
...restSvgProps
|
|
8980
|
+
}) {
|
|
8981
|
+
const normalizedValue = clamp(value, min, max);
|
|
8982
|
+
const radius = (size - strokeWidth) / 2;
|
|
8983
|
+
const circumference = 2 * Math.PI * radius;
|
|
8984
|
+
const progress = normalizedValue / max * circumference;
|
|
8985
|
+
const circleProps = {
|
|
8986
|
+
cx: size / 2,
|
|
8987
|
+
cy: size / 2,
|
|
8988
|
+
r: radius,
|
|
8989
|
+
fill: "none",
|
|
8990
|
+
strokeWidth
|
|
8991
|
+
};
|
|
8992
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8993
|
+
"svg",
|
|
8994
|
+
{
|
|
8995
|
+
role: "progressbar",
|
|
8996
|
+
viewBox: `0 0 ${size} ${size}`,
|
|
8997
|
+
"aria-valuenow": normalizedValue,
|
|
8998
|
+
"aria-valuemin": min,
|
|
8999
|
+
"aria-valuemax": max,
|
|
9000
|
+
...restSvgProps,
|
|
9001
|
+
children: [
|
|
9002
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { ...circleProps, className: "stroke-current/25" }),
|
|
9003
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9004
|
+
"circle",
|
|
9005
|
+
{
|
|
9006
|
+
...circleProps,
|
|
9007
|
+
stroke: "currentColor",
|
|
9008
|
+
strokeDasharray: circumference,
|
|
9009
|
+
strokeDashoffset: circumference - progress,
|
|
9010
|
+
strokeLinecap: "round",
|
|
9011
|
+
transform: `rotate(-90 ${size / 2} ${size / 2})`,
|
|
9012
|
+
className: "transition-all"
|
|
9013
|
+
}
|
|
9014
|
+
)
|
|
9015
|
+
]
|
|
9016
|
+
}
|
|
9017
|
+
);
|
|
9018
|
+
}
|
|
9019
|
+
__name(ProgressCircle, "ProgressCircle");
|
|
9020
|
+
function PageTOCPopoverContent(props) {
|
|
9021
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9022
|
+
collapsible.CollapsibleContent,
|
|
9023
|
+
{
|
|
9024
|
+
"data-toc-popover-content": "",
|
|
9025
|
+
...props,
|
|
9026
|
+
className: cn$1.cn("flex flex-col px-4 max-h-[50vh] md:px-6", props.className),
|
|
9027
|
+
children: props.children
|
|
9028
|
+
}
|
|
9029
|
+
);
|
|
9030
|
+
}
|
|
9031
|
+
__name(PageTOCPopoverContent, "PageTOCPopoverContent");
|
|
9032
|
+
function PageLastUpdate({
|
|
9033
|
+
date: value,
|
|
9034
|
+
...props
|
|
9035
|
+
}) {
|
|
9036
|
+
const { text } = i18n.useI18n();
|
|
9037
|
+
const [date, setDate] = React2.useState("");
|
|
9038
|
+
React2.useEffect(() => {
|
|
9039
|
+
setDate(value.toLocaleDateString());
|
|
9040
|
+
}, [value]);
|
|
9041
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9042
|
+
"p",
|
|
9043
|
+
{
|
|
9044
|
+
...props,
|
|
9045
|
+
className: cn$1.cn("text-sm text-fd-muted-foreground", props.className),
|
|
9046
|
+
children: [
|
|
9047
|
+
text.lastUpdate,
|
|
9048
|
+
" ",
|
|
9049
|
+
date
|
|
9050
|
+
]
|
|
9051
|
+
}
|
|
9052
|
+
);
|
|
9053
|
+
}
|
|
9054
|
+
__name(PageLastUpdate, "PageLastUpdate");
|
|
9055
|
+
function PageFooter({ items, ...props }) {
|
|
9056
|
+
const footerList = useFooterItems.useFooterItems();
|
|
9057
|
+
const pathname = framework.usePathname();
|
|
9058
|
+
const { previous, next } = React2.useMemo(() => {
|
|
9059
|
+
if (items) return items;
|
|
9060
|
+
const idx = footerList.findIndex(
|
|
9061
|
+
(item) => isActive.isActive(item.url, pathname, false)
|
|
9062
|
+
);
|
|
9063
|
+
if (idx === -1) return {};
|
|
9064
|
+
return {
|
|
9065
|
+
previous: footerList[idx - 1],
|
|
9066
|
+
next: footerList[idx + 1]
|
|
9067
|
+
};
|
|
9068
|
+
}, [footerList, items, pathname]);
|
|
9069
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9070
|
+
"div",
|
|
9071
|
+
{
|
|
9072
|
+
...props,
|
|
9073
|
+
className: cn$1.cn(
|
|
9074
|
+
"@container grid gap-4",
|
|
9075
|
+
previous && next ? "grid-cols-2" : "grid-cols-1",
|
|
9076
|
+
props.className
|
|
9077
|
+
),
|
|
9078
|
+
children: [
|
|
9079
|
+
previous ? /* @__PURE__ */ jsxRuntime.jsx(FooterItem, { item: previous, index: 0 }) : null,
|
|
9080
|
+
next ? /* @__PURE__ */ jsxRuntime.jsx(FooterItem, { item: next, index: 1 }) : null
|
|
9081
|
+
]
|
|
9082
|
+
}
|
|
9083
|
+
);
|
|
9084
|
+
}
|
|
9085
|
+
__name(PageFooter, "PageFooter");
|
|
9086
|
+
function FooterItem({ item, index }) {
|
|
9087
|
+
const { text } = i18n.useI18n();
|
|
9088
|
+
const Icon2 = index === 0 ? _icons.ChevronLeft : _icons.ChevronRight;
|
|
9089
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9090
|
+
Link5__default.default,
|
|
9091
|
+
{
|
|
9092
|
+
href: item.url,
|
|
9093
|
+
className: cn$1.cn(
|
|
9094
|
+
"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",
|
|
9095
|
+
index === 1 && "text-end"
|
|
9096
|
+
),
|
|
9097
|
+
children: [
|
|
9098
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9099
|
+
"div",
|
|
9100
|
+
{
|
|
9101
|
+
className: cn$1.cn(
|
|
9102
|
+
"inline-flex items-center gap-1.5 font-medium",
|
|
9103
|
+
index === 1 && "flex-row-reverse"
|
|
9104
|
+
),
|
|
9105
|
+
children: [
|
|
9106
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "-mx-1 size-4 shrink-0 rtl:rotate-180" }),
|
|
9107
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: item.name })
|
|
9108
|
+
]
|
|
9109
|
+
}
|
|
9110
|
+
),
|
|
9111
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-fd-muted-foreground truncate", children: item.description ?? (index === 0 ? text.previousPage : text.nextPage) })
|
|
9112
|
+
]
|
|
9113
|
+
}
|
|
9114
|
+
);
|
|
9115
|
+
}
|
|
9116
|
+
__name(FooterItem, "FooterItem");
|
|
9117
|
+
function PageBreadcrumb({
|
|
9118
|
+
includeRoot,
|
|
9119
|
+
includeSeparator,
|
|
9120
|
+
includePage,
|
|
9121
|
+
...props
|
|
9122
|
+
}) {
|
|
9123
|
+
const path = tree.useTreePath();
|
|
9124
|
+
const { root } = tree.useTreeContext();
|
|
9125
|
+
const items = React2.useMemo(() => {
|
|
9126
|
+
return breadcrumb.getBreadcrumbItemsFromPath(root, path, {
|
|
9127
|
+
includePage,
|
|
9128
|
+
includeSeparator,
|
|
9129
|
+
includeRoot
|
|
9130
|
+
});
|
|
9131
|
+
}, [includePage, includeRoot, includeSeparator, path, root]);
|
|
9132
|
+
if (items.length === 0) return null;
|
|
9133
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9134
|
+
"div",
|
|
9135
|
+
{
|
|
9136
|
+
...props,
|
|
9137
|
+
className: cn$1.cn(
|
|
9138
|
+
"flex items-center gap-1.5 text-sm text-fd-muted-foreground",
|
|
9139
|
+
props.className
|
|
9140
|
+
),
|
|
9141
|
+
children: items.map((item, i) => {
|
|
9142
|
+
const className = cn$1.cn(
|
|
9143
|
+
"truncate",
|
|
9144
|
+
i === items.length - 1 && "text-fd-primary font-medium"
|
|
9145
|
+
);
|
|
9146
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React2.Fragment, { children: [
|
|
9147
|
+
i !== 0 && /* @__PURE__ */ jsxRuntime.jsx(_icons.ChevronRight, { className: "size-3.5 shrink-0" }),
|
|
9148
|
+
item.url ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
9149
|
+
Link5__default.default,
|
|
9150
|
+
{
|
|
9151
|
+
href: item.url,
|
|
9152
|
+
className: cn$1.cn(className, "transition-opacity hover:opacity-80"),
|
|
9153
|
+
children: item.name
|
|
9154
|
+
}
|
|
9155
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className, children: item.name })
|
|
9156
|
+
] }, i);
|
|
9157
|
+
})
|
|
9158
|
+
}
|
|
9159
|
+
);
|
|
9160
|
+
}
|
|
9161
|
+
__name(PageBreadcrumb, "PageBreadcrumb");
|
|
9162
|
+
function DocsPage({
|
|
9163
|
+
breadcrumb: {
|
|
9164
|
+
enabled: breadcrumbEnabled = true,
|
|
9165
|
+
component: breadcrumb,
|
|
9166
|
+
...breadcrumbProps
|
|
9167
|
+
} = {},
|
|
9168
|
+
footer = {},
|
|
9169
|
+
full: full2 = false,
|
|
9170
|
+
tableOfContentPopover: {
|
|
9171
|
+
enabled: tocPopoverEnabled,
|
|
9172
|
+
component: tocPopover,
|
|
9173
|
+
...tocPopoverOptions
|
|
9174
|
+
} = {},
|
|
9175
|
+
tableOfContent: {
|
|
9176
|
+
enabled: tocEnabled,
|
|
9177
|
+
component: tocReplace,
|
|
9178
|
+
...tocOptions
|
|
9179
|
+
} = {},
|
|
9180
|
+
toc: toc$1 = [],
|
|
9181
|
+
children
|
|
9182
|
+
}) {
|
|
9183
|
+
tocEnabled ?? (tocEnabled = !full2 && (toc$1.length > 0 || tocOptions.footer !== void 0 || tocOptions.header !== void 0));
|
|
9184
|
+
tocPopoverEnabled ?? (tocPopoverEnabled = toc$1.length > 0 || tocPopoverOptions.header !== void 0 || tocPopoverOptions.footer !== void 0);
|
|
9185
|
+
let wrapper = /* @__PURE__ */ __name((children2) => children2, "wrapper");
|
|
9186
|
+
if (tocEnabled || tocPopoverEnabled) {
|
|
9187
|
+
wrapper = /* @__PURE__ */ __name((children2) => /* @__PURE__ */ jsxRuntime.jsx(toc.TOCProvider, { single: tocOptions.single, toc: toc$1, children: children2 }), "wrapper");
|
|
9188
|
+
}
|
|
9189
|
+
return wrapper(
|
|
9190
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9191
|
+
tocPopoverEnabled && (tocPopover ?? /* @__PURE__ */ jsxRuntime.jsxs(PageTOCPopover, { children: [
|
|
9192
|
+
/* @__PURE__ */ jsxRuntime.jsx(PageTOCPopoverTrigger, {}),
|
|
9193
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PageTOCPopoverContent, { children: [
|
|
9194
|
+
tocPopoverOptions.header,
|
|
9195
|
+
/* @__PURE__ */ jsxRuntime.jsx(toc.TOCScrollArea, { children: tocPopoverOptions.style === "clerk" ? /* @__PURE__ */ jsxRuntime.jsx(TocClerk__namespace.TOCItems, {}) : /* @__PURE__ */ jsxRuntime.jsx(TocDefault__namespace.TOCItems, {}) }),
|
|
9196
|
+
tocPopoverOptions.footer
|
|
9197
|
+
] })
|
|
9198
|
+
] })),
|
|
9199
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9200
|
+
"article",
|
|
9201
|
+
{
|
|
9202
|
+
id: "nd-page",
|
|
9203
|
+
"data-full": full2,
|
|
9204
|
+
className: cn$1.cn(
|
|
9205
|
+
"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",
|
|
9206
|
+
full2 ? "max-w-[1200px]" : "xl:layout:[--fd-toc-width:268px]"
|
|
9207
|
+
),
|
|
9208
|
+
children: [
|
|
9209
|
+
breadcrumbEnabled && (breadcrumb ?? /* @__PURE__ */ jsxRuntime.jsx(PageBreadcrumb, { ...breadcrumbProps })),
|
|
9210
|
+
children,
|
|
9211
|
+
footer.enabled !== false && (footer.component ?? /* @__PURE__ */ jsxRuntime.jsx(PageFooter, { items: footer.items }))
|
|
9212
|
+
]
|
|
9213
|
+
}
|
|
9214
|
+
),
|
|
9215
|
+
tocEnabled && (tocReplace ?? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9216
|
+
"div",
|
|
9217
|
+
{
|
|
9218
|
+
id: "nd-toc",
|
|
9219
|
+
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",
|
|
9220
|
+
children: [
|
|
9221
|
+
tocOptions.header,
|
|
9222
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9223
|
+
"h3",
|
|
9224
|
+
{
|
|
9225
|
+
id: "toc-title",
|
|
9226
|
+
className: "inline-flex items-center gap-1.5 text-sm text-fd-muted-foreground",
|
|
9227
|
+
children: [
|
|
9228
|
+
/* @__PURE__ */ jsxRuntime.jsx(_icons.Text, { className: "size-4" }),
|
|
9229
|
+
/* @__PURE__ */ jsxRuntime.jsx(i18n.I18nLabel, { label: "toc" })
|
|
9230
|
+
]
|
|
9231
|
+
}
|
|
9232
|
+
),
|
|
9233
|
+
/* @__PURE__ */ jsxRuntime.jsx(toc.TOCScrollArea, { children: tocOptions.style === "clerk" ? /* @__PURE__ */ jsxRuntime.jsx(TocClerk__namespace.TOCItems, {}) : /* @__PURE__ */ jsxRuntime.jsx(TocDefault__namespace.TOCItems, {}) }),
|
|
9234
|
+
tocOptions.footer
|
|
9235
|
+
]
|
|
9236
|
+
}
|
|
9237
|
+
))
|
|
9238
|
+
] })
|
|
9239
|
+
);
|
|
9240
|
+
}
|
|
9241
|
+
__name(DocsPage, "DocsPage");
|
|
9242
|
+
function EditOnGitHub(props) {
|
|
9243
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9244
|
+
"a",
|
|
9245
|
+
{
|
|
9246
|
+
target: "_blank",
|
|
9247
|
+
rel: "noreferrer noopener",
|
|
9248
|
+
...props,
|
|
9249
|
+
className: cn$1.cn(
|
|
9250
|
+
button.buttonVariants({
|
|
9251
|
+
color: "secondary",
|
|
9252
|
+
size: "sm",
|
|
9253
|
+
className: "gap-1.5 not-prose"
|
|
9254
|
+
}),
|
|
9255
|
+
props.className
|
|
9256
|
+
),
|
|
9257
|
+
children: props.children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9258
|
+
/* @__PURE__ */ jsxRuntime.jsx(_icons.Edit, { className: "size-3.5" }),
|
|
9259
|
+
/* @__PURE__ */ jsxRuntime.jsx(i18n.I18nLabel, { label: "editOnGithub" })
|
|
9260
|
+
] })
|
|
9261
|
+
}
|
|
9262
|
+
);
|
|
9263
|
+
}
|
|
9264
|
+
__name(EditOnGitHub, "EditOnGitHub");
|
|
9265
|
+
function DocsBody({
|
|
9266
|
+
children,
|
|
9267
|
+
className,
|
|
9268
|
+
...props
|
|
9269
|
+
}) {
|
|
9270
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...props, className: cn$1.cn("prose flex-1", className), children });
|
|
9271
|
+
}
|
|
9272
|
+
__name(DocsBody, "DocsBody");
|
|
9273
|
+
function DocsDescription({
|
|
9274
|
+
children,
|
|
9275
|
+
className,
|
|
9276
|
+
...props
|
|
9277
|
+
}) {
|
|
9278
|
+
if (children === void 0) return null;
|
|
9279
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9280
|
+
"p",
|
|
9281
|
+
{
|
|
9282
|
+
...props,
|
|
9283
|
+
className: cn$1.cn("mb-8 text-lg text-fd-muted-foreground", className),
|
|
9284
|
+
children
|
|
9285
|
+
}
|
|
9286
|
+
);
|
|
9287
|
+
}
|
|
9288
|
+
__name(DocsDescription, "DocsDescription");
|
|
9289
|
+
function DocsTitle({
|
|
9290
|
+
children,
|
|
9291
|
+
className,
|
|
9292
|
+
...props
|
|
9293
|
+
}) {
|
|
9294
|
+
return /* @__PURE__ */ jsxRuntime.jsx("h1", { ...props, className: cn$1.cn("text-[1.75em] font-semibold", className), children });
|
|
9295
|
+
}
|
|
9296
|
+
__name(DocsTitle, "DocsTitle");
|
|
9297
|
+
|
|
9298
|
+
// docs/layouts/notebook/page/index.tsx
|
|
9299
|
+
var page_exports2 = {};
|
|
9300
|
+
__export(page_exports2, {
|
|
9301
|
+
DocsBody: () => DocsBody2,
|
|
9302
|
+
DocsDescription: () => DocsDescription2,
|
|
9303
|
+
DocsPage: () => DocsPage2,
|
|
9304
|
+
DocsTitle: () => DocsTitle2,
|
|
9305
|
+
EditOnGitHub: () => EditOnGitHub2,
|
|
9306
|
+
PageBreadcrumb: () => PageBreadcrumb2,
|
|
9307
|
+
PageLastUpdate: () => PageLastUpdate2
|
|
9308
|
+
});
|
|
9309
|
+
var TocPopoverContext2 = React2.createContext(null);
|
|
9310
|
+
function PageTOCPopover2({
|
|
9311
|
+
className,
|
|
9312
|
+
children,
|
|
9313
|
+
...rest
|
|
9314
|
+
}) {
|
|
9315
|
+
const ref = React2.useRef(null);
|
|
9316
|
+
const [open, setOpen] = React2.useState(false);
|
|
9317
|
+
const { isNavTransparent } = React2.use(LayoutContext2);
|
|
9318
|
+
const onClick = React2.useEffectEvent((e) => {
|
|
9319
|
+
if (!open) return;
|
|
9320
|
+
if (ref.current && !ref.current.contains(e.target))
|
|
9321
|
+
setOpen(false);
|
|
9322
|
+
});
|
|
9323
|
+
React2.useEffect(() => {
|
|
9324
|
+
window.addEventListener("click", onClick);
|
|
9325
|
+
return () => {
|
|
9326
|
+
window.removeEventListener("click", onClick);
|
|
9327
|
+
};
|
|
9328
|
+
}, []);
|
|
9329
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9330
|
+
TocPopoverContext2,
|
|
9331
|
+
{
|
|
9332
|
+
value: React2.useMemo(
|
|
9333
|
+
() => ({
|
|
9334
|
+
open,
|
|
9335
|
+
setOpen
|
|
9336
|
+
}),
|
|
9337
|
+
[setOpen, open]
|
|
9338
|
+
),
|
|
9339
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9340
|
+
collapsible.Collapsible,
|
|
9341
|
+
{
|
|
9342
|
+
open,
|
|
9343
|
+
onOpenChange: setOpen,
|
|
9344
|
+
"data-toc-popover": "",
|
|
9345
|
+
className: cn$1.cn(
|
|
9346
|
+
"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)]",
|
|
9347
|
+
className
|
|
9348
|
+
),
|
|
9349
|
+
...rest,
|
|
9350
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9351
|
+
"header",
|
|
9352
|
+
{
|
|
9353
|
+
ref,
|
|
9354
|
+
className: cn$1.cn(
|
|
9355
|
+
"border-b backdrop-blur-sm transition-colors",
|
|
9356
|
+
(!isNavTransparent || open) && "bg-fd-background/80",
|
|
9357
|
+
open && "shadow-lg"
|
|
9358
|
+
),
|
|
9359
|
+
children
|
|
9360
|
+
}
|
|
9361
|
+
)
|
|
9362
|
+
}
|
|
9363
|
+
)
|
|
9364
|
+
}
|
|
9365
|
+
);
|
|
9366
|
+
}
|
|
9367
|
+
__name(PageTOCPopover2, "PageTOCPopover");
|
|
9368
|
+
function PageTOCPopoverTrigger2({
|
|
9369
|
+
className,
|
|
9370
|
+
...props
|
|
9371
|
+
}) {
|
|
9372
|
+
const { text } = i18n.useI18n();
|
|
9373
|
+
const { open } = React2.use(TocPopoverContext2);
|
|
9374
|
+
const items = toc.useTOCItems();
|
|
9375
|
+
const active = toc$1.useActiveAnchor();
|
|
9376
|
+
const selected = React2.useMemo(
|
|
9377
|
+
() => items.findIndex((item) => active === item.url.slice(1)),
|
|
9378
|
+
[items, active]
|
|
9379
|
+
);
|
|
9380
|
+
const path = tree.useTreePath().at(-1);
|
|
9381
|
+
const showItem = selected !== -1 && !open;
|
|
9382
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9383
|
+
collapsible.CollapsibleTrigger,
|
|
9384
|
+
{
|
|
9385
|
+
className: cn$1.cn(
|
|
9386
|
+
"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",
|
|
9387
|
+
className
|
|
9388
|
+
),
|
|
9389
|
+
"data-toc-popover-trigger": "",
|
|
9390
|
+
...props,
|
|
9391
|
+
children: [
|
|
9392
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9393
|
+
ProgressCircle2,
|
|
9394
|
+
{
|
|
9395
|
+
value: (selected + 1) / Math.max(1, items.length),
|
|
9396
|
+
max: 1,
|
|
9397
|
+
className: cn$1.cn("shrink-0", open && "text-fd-primary")
|
|
9398
|
+
}
|
|
9399
|
+
),
|
|
9400
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "grid flex-1 *:my-auto *:row-start-1 *:col-start-1", children: [
|
|
9401
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9402
|
+
"span",
|
|
9403
|
+
{
|
|
9404
|
+
className: cn$1.cn(
|
|
9405
|
+
"truncate transition-all",
|
|
9406
|
+
open && "text-fd-foreground",
|
|
9407
|
+
showItem && "opacity-0 -translate-y-full pointer-events-none"
|
|
9408
|
+
),
|
|
9409
|
+
children: path?.name ?? text.toc
|
|
9410
|
+
}
|
|
9411
|
+
),
|
|
9412
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9413
|
+
"span",
|
|
9414
|
+
{
|
|
9415
|
+
className: cn$1.cn(
|
|
9416
|
+
"truncate transition-all",
|
|
9417
|
+
!showItem && "opacity-0 translate-y-full pointer-events-none"
|
|
9418
|
+
),
|
|
9419
|
+
children: items[selected]?.title
|
|
9420
|
+
}
|
|
9421
|
+
)
|
|
9422
|
+
] }),
|
|
9423
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9424
|
+
_icons.ChevronDown,
|
|
9425
|
+
{
|
|
9426
|
+
className: cn$1.cn(
|
|
9427
|
+
"shrink-0 transition-transform mx-0.5",
|
|
9428
|
+
open && "rotate-180"
|
|
9429
|
+
)
|
|
9430
|
+
}
|
|
9431
|
+
)
|
|
9432
|
+
]
|
|
9433
|
+
}
|
|
9434
|
+
);
|
|
9435
|
+
}
|
|
9436
|
+
__name(PageTOCPopoverTrigger2, "PageTOCPopoverTrigger");
|
|
9437
|
+
function clamp2(input, min, max) {
|
|
9438
|
+
if (input < min) return min;
|
|
9439
|
+
if (input > max) return max;
|
|
9440
|
+
return input;
|
|
9441
|
+
}
|
|
9442
|
+
__name(clamp2, "clamp");
|
|
9443
|
+
function ProgressCircle2({
|
|
9444
|
+
value,
|
|
9445
|
+
strokeWidth = 2,
|
|
9446
|
+
size = 24,
|
|
9447
|
+
min = 0,
|
|
9448
|
+
max = 100,
|
|
9449
|
+
...restSvgProps
|
|
9450
|
+
}) {
|
|
9451
|
+
const normalizedValue = clamp2(value, min, max);
|
|
9452
|
+
const radius = (size - strokeWidth) / 2;
|
|
9453
|
+
const circumference = 2 * Math.PI * radius;
|
|
9454
|
+
const progress = normalizedValue / max * circumference;
|
|
9455
|
+
const circleProps = {
|
|
9456
|
+
cx: size / 2,
|
|
9457
|
+
cy: size / 2,
|
|
9458
|
+
r: radius,
|
|
9459
|
+
fill: "none",
|
|
9460
|
+
strokeWidth
|
|
9461
|
+
};
|
|
9462
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9463
|
+
"svg",
|
|
9464
|
+
{
|
|
9465
|
+
role: "progressbar",
|
|
9466
|
+
viewBox: `0 0 ${size} ${size}`,
|
|
9467
|
+
"aria-valuenow": normalizedValue,
|
|
9468
|
+
"aria-valuemin": min,
|
|
9469
|
+
"aria-valuemax": max,
|
|
9470
|
+
...restSvgProps,
|
|
9471
|
+
children: [
|
|
9472
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { ...circleProps, className: "stroke-current/25" }),
|
|
9473
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9474
|
+
"circle",
|
|
9475
|
+
{
|
|
9476
|
+
...circleProps,
|
|
9477
|
+
stroke: "currentColor",
|
|
9478
|
+
strokeDasharray: circumference,
|
|
9479
|
+
strokeDashoffset: circumference - progress,
|
|
9480
|
+
strokeLinecap: "round",
|
|
9481
|
+
transform: `rotate(-90 ${size / 2} ${size / 2})`,
|
|
9482
|
+
className: "transition-all"
|
|
9483
|
+
}
|
|
9484
|
+
)
|
|
9485
|
+
]
|
|
9486
|
+
}
|
|
9487
|
+
);
|
|
9488
|
+
}
|
|
9489
|
+
__name(ProgressCircle2, "ProgressCircle");
|
|
9490
|
+
function PageTOCPopoverContent2(props) {
|
|
9491
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9492
|
+
collapsible.CollapsibleContent,
|
|
9493
|
+
{
|
|
9494
|
+
"data-toc-popover-content": "",
|
|
9495
|
+
...props,
|
|
9496
|
+
className: cn$1.cn("flex flex-col px-4 max-h-[50vh] md:px-6", props.className),
|
|
9497
|
+
children: props.children
|
|
9498
|
+
}
|
|
9499
|
+
);
|
|
9500
|
+
}
|
|
9501
|
+
__name(PageTOCPopoverContent2, "PageTOCPopoverContent");
|
|
9502
|
+
function PageLastUpdate2({
|
|
9503
|
+
date: value,
|
|
9504
|
+
...props
|
|
9505
|
+
}) {
|
|
9506
|
+
const { text } = i18n.useI18n();
|
|
9507
|
+
const [date, setDate] = React2.useState("");
|
|
9508
|
+
React2.useEffect(() => {
|
|
9509
|
+
setDate(value.toLocaleDateString());
|
|
9510
|
+
}, [value]);
|
|
9511
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9512
|
+
"p",
|
|
9513
|
+
{
|
|
9514
|
+
...props,
|
|
9515
|
+
className: cn$1.cn("text-sm text-fd-muted-foreground", props.className),
|
|
9516
|
+
children: [
|
|
9517
|
+
text.lastUpdate,
|
|
9518
|
+
" ",
|
|
9519
|
+
date
|
|
9520
|
+
]
|
|
9521
|
+
}
|
|
9522
|
+
);
|
|
9523
|
+
}
|
|
9524
|
+
__name(PageLastUpdate2, "PageLastUpdate");
|
|
9525
|
+
function PageFooter2({ items, ...props }) {
|
|
9526
|
+
const footerList = useFooterItems.useFooterItems();
|
|
9527
|
+
const pathname = framework.usePathname();
|
|
9528
|
+
const { previous, next } = React2.useMemo(() => {
|
|
9529
|
+
if (items) return items;
|
|
9530
|
+
const idx = footerList.findIndex(
|
|
9531
|
+
(item) => isActive.isActive(item.url, pathname, false)
|
|
9532
|
+
);
|
|
9533
|
+
if (idx === -1) return {};
|
|
9534
|
+
return {
|
|
9535
|
+
previous: footerList[idx - 1],
|
|
9536
|
+
next: footerList[idx + 1]
|
|
9537
|
+
};
|
|
9538
|
+
}, [footerList, items, pathname]);
|
|
9539
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9540
|
+
"div",
|
|
9541
|
+
{
|
|
9542
|
+
...props,
|
|
9543
|
+
className: cn$1.cn(
|
|
9544
|
+
"@container grid gap-4",
|
|
9545
|
+
previous && next ? "grid-cols-2" : "grid-cols-1",
|
|
9546
|
+
props.className
|
|
9547
|
+
),
|
|
9548
|
+
children: [
|
|
9549
|
+
previous ? /* @__PURE__ */ jsxRuntime.jsx(FooterItem2, { item: previous, index: 0 }) : null,
|
|
9550
|
+
next ? /* @__PURE__ */ jsxRuntime.jsx(FooterItem2, { item: next, index: 1 }) : null
|
|
9551
|
+
]
|
|
9552
|
+
}
|
|
9553
|
+
);
|
|
9554
|
+
}
|
|
9555
|
+
__name(PageFooter2, "PageFooter");
|
|
9556
|
+
function FooterItem2({ item, index }) {
|
|
9557
|
+
const { text } = i18n.useI18n();
|
|
9558
|
+
const Icon2 = index === 0 ? _icons.ChevronLeft : _icons.ChevronRight;
|
|
9559
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9560
|
+
Link5__default.default,
|
|
9561
|
+
{
|
|
9562
|
+
href: item.url,
|
|
9563
|
+
className: cn$1.cn(
|
|
9564
|
+
"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",
|
|
9565
|
+
index === 1 && "text-end"
|
|
9566
|
+
),
|
|
9567
|
+
children: [
|
|
9568
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9569
|
+
"div",
|
|
9570
|
+
{
|
|
9571
|
+
className: cn$1.cn(
|
|
9572
|
+
"inline-flex items-center gap-1.5 font-medium",
|
|
9573
|
+
index === 1 && "flex-row-reverse"
|
|
9574
|
+
),
|
|
9575
|
+
children: [
|
|
9576
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "-mx-1 size-4 shrink-0 rtl:rotate-180" }),
|
|
9577
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: item.name })
|
|
9578
|
+
]
|
|
9579
|
+
}
|
|
9580
|
+
),
|
|
9581
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-fd-muted-foreground truncate", children: item.description ?? (index === 0 ? text.previousPage : text.nextPage) })
|
|
9582
|
+
]
|
|
9583
|
+
}
|
|
9584
|
+
);
|
|
9585
|
+
}
|
|
9586
|
+
__name(FooterItem2, "FooterItem");
|
|
9587
|
+
function PageBreadcrumb2({
|
|
9588
|
+
includeRoot,
|
|
9589
|
+
includeSeparator,
|
|
9590
|
+
includePage,
|
|
9591
|
+
...props
|
|
9592
|
+
}) {
|
|
9593
|
+
const path = tree.useTreePath();
|
|
9594
|
+
const { root } = tree.useTreeContext();
|
|
9595
|
+
const items = React2.useMemo(() => {
|
|
9596
|
+
return breadcrumb.getBreadcrumbItemsFromPath(root, path, {
|
|
9597
|
+
includePage,
|
|
9598
|
+
includeSeparator,
|
|
9599
|
+
includeRoot
|
|
9600
|
+
});
|
|
9601
|
+
}, [includePage, includeRoot, includeSeparator, path, root]);
|
|
9602
|
+
if (items.length === 0) return null;
|
|
9603
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9604
|
+
"div",
|
|
9605
|
+
{
|
|
9606
|
+
...props,
|
|
9607
|
+
className: cn$1.cn(
|
|
9608
|
+
"flex items-center gap-1.5 text-sm text-fd-muted-foreground",
|
|
9609
|
+
props.className
|
|
9610
|
+
),
|
|
9611
|
+
children: items.map((item, i) => {
|
|
9612
|
+
const className = cn$1.cn(
|
|
9613
|
+
"truncate",
|
|
9614
|
+
i === items.length - 1 && "text-fd-primary font-medium"
|
|
9615
|
+
);
|
|
9616
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React2.Fragment, { children: [
|
|
9617
|
+
i !== 0 && /* @__PURE__ */ jsxRuntime.jsx(_icons.ChevronRight, { className: "size-3.5 shrink-0" }),
|
|
9618
|
+
item.url ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
9619
|
+
Link5__default.default,
|
|
9620
|
+
{
|
|
9621
|
+
href: item.url,
|
|
9622
|
+
className: cn$1.cn(className, "transition-opacity hover:opacity-80"),
|
|
9623
|
+
children: item.name
|
|
9624
|
+
}
|
|
9625
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className, children: item.name })
|
|
9626
|
+
] }, i);
|
|
9627
|
+
})
|
|
9628
|
+
}
|
|
9629
|
+
);
|
|
9630
|
+
}
|
|
9631
|
+
__name(PageBreadcrumb2, "PageBreadcrumb");
|
|
9632
|
+
function DocsPage2({
|
|
9633
|
+
breadcrumb: {
|
|
9634
|
+
enabled: breadcrumbEnabled = true,
|
|
9635
|
+
component: breadcrumb,
|
|
9636
|
+
...breadcrumbProps
|
|
9637
|
+
} = {},
|
|
9638
|
+
footer = {},
|
|
9639
|
+
full: full2 = false,
|
|
9640
|
+
tableOfContentPopover: {
|
|
9641
|
+
enabled: tocPopoverEnabled,
|
|
9642
|
+
component: tocPopover,
|
|
9643
|
+
...tocPopoverOptions
|
|
9644
|
+
} = {},
|
|
9645
|
+
tableOfContent: {
|
|
9646
|
+
enabled: tocEnabled,
|
|
9647
|
+
component: tocReplace,
|
|
9648
|
+
...tocOptions
|
|
9649
|
+
} = {},
|
|
9650
|
+
toc: toc$1 = [],
|
|
9651
|
+
children
|
|
9652
|
+
}) {
|
|
9653
|
+
tocEnabled ?? (tocEnabled = !full2 && (toc$1.length > 0 || tocOptions.footer !== void 0 || tocOptions.header !== void 0));
|
|
9654
|
+
tocPopoverEnabled ?? (tocPopoverEnabled = toc$1.length > 0 || tocPopoverOptions.header !== void 0 || tocPopoverOptions.footer !== void 0);
|
|
9655
|
+
let wrapper = /* @__PURE__ */ __name((children2) => children2, "wrapper");
|
|
9656
|
+
if (tocEnabled || tocPopoverEnabled) {
|
|
9657
|
+
wrapper = /* @__PURE__ */ __name((children2) => /* @__PURE__ */ jsxRuntime.jsx(toc.TOCProvider, { single: tocOptions.single, toc: toc$1, children: children2 }), "wrapper");
|
|
9658
|
+
}
|
|
9659
|
+
return wrapper(
|
|
9660
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9661
|
+
tocPopoverEnabled && (tocPopover ?? /* @__PURE__ */ jsxRuntime.jsxs(PageTOCPopover2, { children: [
|
|
9662
|
+
/* @__PURE__ */ jsxRuntime.jsx(PageTOCPopoverTrigger2, {}),
|
|
9663
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PageTOCPopoverContent2, { children: [
|
|
9664
|
+
tocPopoverOptions.header,
|
|
9665
|
+
/* @__PURE__ */ jsxRuntime.jsx(toc.TOCScrollArea, { children: tocPopoverOptions.style === "clerk" ? /* @__PURE__ */ jsxRuntime.jsx(TocClerk__namespace.TOCItems, {}) : /* @__PURE__ */ jsxRuntime.jsx(TocDefault__namespace.TOCItems, {}) }),
|
|
9666
|
+
tocPopoverOptions.footer
|
|
9667
|
+
] })
|
|
9668
|
+
] })),
|
|
9669
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9670
|
+
"article",
|
|
9671
|
+
{
|
|
9672
|
+
id: "nd-page",
|
|
9673
|
+
"data-full": full2,
|
|
9674
|
+
className: cn$1.cn(
|
|
9675
|
+
"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]",
|
|
9676
|
+
full2 && "*:max-w-[1285px]"
|
|
9677
|
+
),
|
|
9678
|
+
children: [
|
|
9679
|
+
breadcrumbEnabled && (breadcrumb ?? /* @__PURE__ */ jsxRuntime.jsx(PageBreadcrumb2, { ...breadcrumbProps })),
|
|
9680
|
+
children,
|
|
9681
|
+
footer.enabled !== false && (footer.component ?? /* @__PURE__ */ jsxRuntime.jsx(PageFooter2, { items: footer.items }))
|
|
9682
|
+
]
|
|
9683
|
+
}
|
|
9684
|
+
),
|
|
9685
|
+
tocEnabled && (tocReplace ?? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9686
|
+
"div",
|
|
9687
|
+
{
|
|
9688
|
+
id: "nd-toc",
|
|
9689
|
+
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",
|
|
9690
|
+
children: [
|
|
9691
|
+
tocOptions.header,
|
|
9692
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9693
|
+
"h3",
|
|
9694
|
+
{
|
|
9695
|
+
id: "toc-title",
|
|
9696
|
+
className: "inline-flex items-center gap-1.5 text-sm text-fd-muted-foreground",
|
|
9697
|
+
children: [
|
|
9698
|
+
/* @__PURE__ */ jsxRuntime.jsx(_icons.Text, { className: "size-4" }),
|
|
9699
|
+
/* @__PURE__ */ jsxRuntime.jsx(i18n.I18nLabel, { label: "toc" })
|
|
9700
|
+
]
|
|
9701
|
+
}
|
|
9702
|
+
),
|
|
9703
|
+
/* @__PURE__ */ jsxRuntime.jsx(toc.TOCScrollArea, { children: tocOptions.style === "clerk" ? /* @__PURE__ */ jsxRuntime.jsx(TocClerk__namespace.TOCItems, {}) : /* @__PURE__ */ jsxRuntime.jsx(TocDefault__namespace.TOCItems, {}) }),
|
|
9704
|
+
tocOptions.footer
|
|
9705
|
+
]
|
|
9706
|
+
}
|
|
9707
|
+
))
|
|
9708
|
+
] })
|
|
9709
|
+
);
|
|
9710
|
+
}
|
|
9711
|
+
__name(DocsPage2, "DocsPage");
|
|
9712
|
+
function EditOnGitHub2(props) {
|
|
9713
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9714
|
+
"a",
|
|
9715
|
+
{
|
|
9716
|
+
target: "_blank",
|
|
9717
|
+
rel: "noreferrer noopener",
|
|
9718
|
+
...props,
|
|
9719
|
+
className: cn$1.cn(
|
|
9720
|
+
button.buttonVariants({
|
|
9721
|
+
color: "secondary",
|
|
9722
|
+
size: "sm",
|
|
9723
|
+
className: "gap-1.5 not-prose"
|
|
9724
|
+
}),
|
|
9725
|
+
props.className
|
|
9726
|
+
),
|
|
9727
|
+
children: props.children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9728
|
+
/* @__PURE__ */ jsxRuntime.jsx(_icons.Edit, { className: "size-3.5" }),
|
|
9729
|
+
/* @__PURE__ */ jsxRuntime.jsx(i18n.I18nLabel, { label: "editOnGithub" })
|
|
9730
|
+
] })
|
|
9731
|
+
}
|
|
9732
|
+
);
|
|
9733
|
+
}
|
|
9734
|
+
__name(EditOnGitHub2, "EditOnGitHub");
|
|
9735
|
+
function DocsBody2({
|
|
9736
|
+
children,
|
|
9737
|
+
className,
|
|
9738
|
+
...props
|
|
9739
|
+
}) {
|
|
9740
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...props, className: cn$1.cn("prose flex-1", className), children });
|
|
9741
|
+
}
|
|
9742
|
+
__name(DocsBody2, "DocsBody");
|
|
9743
|
+
function DocsDescription2({
|
|
9744
|
+
children,
|
|
9745
|
+
className,
|
|
9746
|
+
...props
|
|
9747
|
+
}) {
|
|
9748
|
+
if (children === void 0) return null;
|
|
9749
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9750
|
+
"p",
|
|
9751
|
+
{
|
|
9752
|
+
...props,
|
|
9753
|
+
className: cn$1.cn("mb-8 text-lg text-fd-muted-foreground", className),
|
|
9754
|
+
children
|
|
9755
|
+
}
|
|
9756
|
+
);
|
|
9757
|
+
}
|
|
9758
|
+
__name(DocsDescription2, "DocsDescription");
|
|
9759
|
+
function DocsTitle2({
|
|
9760
|
+
children,
|
|
9761
|
+
className,
|
|
9762
|
+
...props
|
|
9763
|
+
}) {
|
|
9764
|
+
return /* @__PURE__ */ jsxRuntime.jsx("h1", { ...props, className: cn$1.cn("text-[1.75em] font-semibold", className), children });
|
|
9765
|
+
}
|
|
9766
|
+
__name(DocsTitle2, "DocsTitle");
|
|
9767
|
+
function DocsPage3({
|
|
9768
|
+
lastUpdate,
|
|
9769
|
+
editOnGithub,
|
|
9770
|
+
children,
|
|
9771
|
+
...props
|
|
9772
|
+
}) {
|
|
9773
|
+
const docsLayoutCtx = React2.use(LayoutContext);
|
|
9774
|
+
const { DocsPage: DocsPage4, EditOnGitHub: EditOnGitHub3, PageLastUpdate: PageLastUpdate3 } = docsLayoutCtx ? page_exports : page_exports2;
|
|
9775
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(DocsPage4, { ...props, children: [
|
|
9776
|
+
children,
|
|
9777
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row flex-wrap items-center justify-between gap-4 empty:hidden", children: [
|
|
9778
|
+
editOnGithub && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9779
|
+
EditOnGitHub3,
|
|
9780
|
+
{
|
|
9781
|
+
href: `https://github.com/${editOnGithub.owner}/${editOnGithub.repo}/blob/${editOnGithub.sha}/${editOnGithub.path.startsWith("/") ? editOnGithub.path.slice(1) : editOnGithub.path}`
|
|
9782
|
+
}
|
|
9783
|
+
),
|
|
9784
|
+
lastUpdate && /* @__PURE__ */ jsxRuntime.jsx(PageLastUpdate3, { date: new Date(lastUpdate) })
|
|
9785
|
+
] })
|
|
9786
|
+
] });
|
|
9787
|
+
}
|
|
9788
|
+
__name(DocsPage3, "DocsPage");
|
|
9789
|
+
function Image5(props) {
|
|
9790
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9791
|
+
framework.Image,
|
|
9792
|
+
{
|
|
9793
|
+
sizes: "(max-width: 768px) 100vw, (max-width: 1200px) 70vw, 900px",
|
|
9794
|
+
...props,
|
|
9795
|
+
src: props.src,
|
|
9796
|
+
className: cn$1.cn("rounded-lg", props.className)
|
|
9797
|
+
}
|
|
9798
|
+
);
|
|
9799
|
+
}
|
|
9800
|
+
__name(Image5, "Image");
|
|
9801
|
+
function Table2(props) {
|
|
9802
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative overflow-auto prose-no-margin my-6", children: /* @__PURE__ */ jsxRuntime.jsx("table", { ...props }) });
|
|
9803
|
+
}
|
|
9804
|
+
__name(Table2, "Table");
|
|
9805
|
+
var defaultMdxComponents = {
|
|
9806
|
+
CodeBlockTab: codeblock.CodeBlockTab,
|
|
9807
|
+
CodeBlockTabs: codeblock.CodeBlockTabs,
|
|
9808
|
+
CodeBlockTabsList: codeblock.CodeBlockTabsList,
|
|
9809
|
+
CodeBlockTabsTrigger: codeblock.CodeBlockTabsTrigger,
|
|
9810
|
+
pre: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsxRuntime.jsx(codeblock.CodeBlock, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(codeblock.Pre, { children: props.children }) }), "pre"),
|
|
9811
|
+
Card: card.Card,
|
|
9812
|
+
Cards: card.Cards,
|
|
9813
|
+
a: Link5__default.default,
|
|
9814
|
+
img: Image5,
|
|
9815
|
+
h1: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsxRuntime.jsx(heading.Heading, { as: "h1", ...props }), "h1"),
|
|
9816
|
+
h2: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsxRuntime.jsx(heading.Heading, { as: "h2", ...props }), "h2"),
|
|
9817
|
+
h3: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsxRuntime.jsx(heading.Heading, { as: "h3", ...props }), "h3"),
|
|
9818
|
+
h4: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsxRuntime.jsx(heading.Heading, { as: "h4", ...props }), "h4"),
|
|
9819
|
+
h5: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsxRuntime.jsx(heading.Heading, { as: "h5", ...props }), "h5"),
|
|
9820
|
+
h6: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsxRuntime.jsx(heading.Heading, { as: "h6", ...props }), "h6"),
|
|
9821
|
+
table: Table2,
|
|
9822
|
+
Callout: callout.Callout,
|
|
9823
|
+
CalloutContainer: callout.CalloutContainer,
|
|
9824
|
+
CalloutTitle: callout.CalloutTitle,
|
|
9825
|
+
CalloutDescription: callout.CalloutDescription
|
|
9826
|
+
};
|
|
9827
|
+
function RootProvider({ components, ...props }) {
|
|
9828
|
+
return /* @__PURE__ */ jsxRuntime.jsx(next.NextProvider, { Link: components?.Link, Image: components?.Image, children: /* @__PURE__ */ jsxRuntime.jsx(base.RootProvider, { ...props, children: props.children }) });
|
|
9829
|
+
}
|
|
9830
|
+
__name(RootProvider, "RootProvider");
|
|
9831
|
+
|
|
9832
|
+
// docs/source.ts
|
|
9833
|
+
var source_exports = {};
|
|
9834
|
+
__export(source_exports, {
|
|
9835
|
+
loader: () => source_star.loader
|
|
9836
|
+
});
|
|
9837
|
+
__reExport(source_exports, source_star__namespace);
|
|
9838
|
+
|
|
9839
|
+
Object.defineProperty(exports, "toast", {
|
|
9840
|
+
enumerable: true,
|
|
9841
|
+
get: function () { return sonner.toast; }
|
|
9842
|
+
});
|
|
9843
|
+
Object.defineProperty(exports, "loader", {
|
|
9844
|
+
enumerable: true,
|
|
9845
|
+
get: function () { return source_star.loader; }
|
|
8142
9846
|
});
|
|
8143
9847
|
exports.AIAgentIcon = AIAgentIcon;
|
|
8144
9848
|
exports.AISearchContentIcon = AISearchContentIcon;
|
|
@@ -8252,6 +9956,11 @@ exports.DialogTrigger = DialogTrigger;
|
|
|
8252
9956
|
exports.DialogVideoController = dialog_video_controller_default;
|
|
8253
9957
|
exports.DirectoryTypeIcon = DirectoryTypeIcon;
|
|
8254
9958
|
exports.DisconnectIcon = DisconnectIcon;
|
|
9959
|
+
exports.DocsBody = DocsBody;
|
|
9960
|
+
exports.DocsDescription = DocsDescription;
|
|
9961
|
+
exports.DocsLayout = DocsLayout;
|
|
9962
|
+
exports.DocsPage = DocsPage3;
|
|
9963
|
+
exports.DocsTitle = DocsTitle;
|
|
8255
9964
|
exports.DotsLoader = DotsLoader;
|
|
8256
9965
|
exports.DownloadIcon = DownloadIcon;
|
|
8257
9966
|
exports.Drawer = Drawer;
|
|
@@ -8304,6 +10013,7 @@ exports.HanzoIcon = HanzoIcon;
|
|
|
8304
10013
|
exports.HanzoLogoIcon = HanzoLogoIcon;
|
|
8305
10014
|
exports.HanzoLogoSoloIcon = HanzoLogoSoloIcon;
|
|
8306
10015
|
exports.HomeIcon = HomeIcon;
|
|
10016
|
+
exports.HomeLayout = HomeLayout;
|
|
8307
10017
|
exports.HoverCard = HoverCard;
|
|
8308
10018
|
exports.HoverCardContent = HoverCardContent;
|
|
8309
10019
|
exports.HoverCardTrigger = HoverCardTrigger;
|
|
@@ -8388,6 +10098,7 @@ exports.ReasoningIcon = ReasoningIcon;
|
|
|
8388
10098
|
exports.ResizableHandle = ResizableHandle;
|
|
8389
10099
|
exports.ResizablePanel = ResizablePanel;
|
|
8390
10100
|
exports.ResizablePanelGroup = ResizablePanelGroup;
|
|
10101
|
+
exports.RootProvider = RootProvider;
|
|
8391
10102
|
exports.SaveIcon = SaveIcon;
|
|
8392
10103
|
exports.ScheduledTasksComingSoonIcon = ScheduledTasksComingSoonIcon;
|
|
8393
10104
|
exports.ScheduledTasksIcon = ScheduledTasksIcon;
|
|
@@ -8462,6 +10173,7 @@ exports.WebSearchDisabledIcon = WebSearchDisabledIcon;
|
|
|
8462
10173
|
exports.WebSearchIcon = WebSearchIcon;
|
|
8463
10174
|
exports.YouTubeEmbed = youtube_embed_default;
|
|
8464
10175
|
exports.buttonVariants = buttonVariants;
|
|
10176
|
+
exports.defaultMdxComponents = defaultMdxComponents;
|
|
8465
10177
|
exports.fileIconMap = fileIconMap;
|
|
8466
10178
|
exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle;
|
|
8467
10179
|
exports.toggleVariants = toggleVariants;
|