@inklu/docs 0.2.0

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/components.json +25 -0
  3. package/dist/index.d.mts +271 -0
  4. package/dist/index.d.ts +271 -0
  5. package/dist/index.js +2455 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.mjs +2368 -0
  8. package/dist/index.mjs.map +1 -0
  9. package/dist/shiki.d.mts +10 -0
  10. package/dist/shiki.d.ts +10 -0
  11. package/dist/shiki.js +47 -0
  12. package/dist/shiki.js.map +1 -0
  13. package/dist/shiki.mjs +22 -0
  14. package/dist/shiki.mjs.map +1 -0
  15. package/dist/styles.css +2556 -0
  16. package/package.json +55 -0
  17. package/src/components/content/changelog-content.tsx +119 -0
  18. package/src/components/content/code-block.tsx +111 -0
  19. package/src/components/content/docs-content.tsx +113 -0
  20. package/src/components/layout/docs-layout.tsx +192 -0
  21. package/src/components/layout/site-header.tsx +152 -0
  22. package/src/components/layout/site-layout.tsx +28 -0
  23. package/src/components/layout/site-provider.tsx +23 -0
  24. package/src/components/layout/site-template.tsx +20 -0
  25. package/src/components/layout/theme-provider.tsx +10 -0
  26. package/src/components/layout/theme-switcher.tsx +42 -0
  27. package/src/components/motion-primitives/morph-icon.tsx +97 -0
  28. package/src/components/motion-primitives/progressive-blur.tsx +64 -0
  29. package/src/components/motion-primitives/sliding-number.tsx +131 -0
  30. package/src/components/motion-primitives/text-effect.tsx +290 -0
  31. package/src/components/motion-primitives/text-morph.tsx +77 -0
  32. package/src/components/motion-primitives/text-scramble.tsx +87 -0
  33. package/src/components/shared/command-block.tsx +193 -0
  34. package/src/components/shared/scroll-fade.tsx +22 -0
  35. package/src/components/ui/badge.tsx +50 -0
  36. package/src/components/ui/brand-logo.tsx +68 -0
  37. package/src/components/ui/button-group.tsx +87 -0
  38. package/src/components/ui/button.tsx +104 -0
  39. package/src/components/ui/card.tsx +97 -0
  40. package/src/components/ui/direction.tsx +6 -0
  41. package/src/components/ui/hover-card.tsx +51 -0
  42. package/src/components/ui/item.tsx +201 -0
  43. package/src/components/ui/separator.tsx +25 -0
  44. package/src/components/ui/toast.tsx +322 -0
  45. package/src/components/ui/tooltip.tsx +66 -0
  46. package/src/hooks/use-copy-to-clipboard.ts +54 -0
  47. package/src/index.ts +30 -0
  48. package/src/lib/constants.ts +63 -0
  49. package/src/lib/motions.ts +21 -0
  50. package/src/lib/utils/audio.ts +56 -0
  51. package/src/lib/utils.ts +14 -0
  52. package/src/shiki.ts +25 -0
  53. package/src/styles.css +112 -0
  54. package/src/typeset.css +513 -0
  55. package/tsconfig.json +15 -0
  56. package/tsup.config.ts +11 -0
package/dist/index.mjs ADDED
@@ -0,0 +1,2368 @@
1
+ "use client";
2
+
3
+ // src/components/content/changelog-content.tsx
4
+ import { motion, useReducedMotion } from "motion/react";
5
+
6
+ // src/components/ui/badge.tsx
7
+ import { mergeProps } from "@base-ui/react/merge-props";
8
+ import { useRender } from "@base-ui/react/use-render";
9
+ import { SmoothCorners } from "@lisse/react";
10
+ import { cva } from "class-variance-authority";
11
+
12
+ // src/lib/utils.ts
13
+ import { clsx } from "clsx";
14
+ import { twMerge } from "tailwind-merge";
15
+ function cn(...inputs) {
16
+ return twMerge(clsx(inputs));
17
+ }
18
+ function formatChangelogDate(date) {
19
+ return new Date(date).toLocaleDateString("en-US", {
20
+ month: "long",
21
+ day: "numeric",
22
+ year: "numeric"
23
+ });
24
+ }
25
+
26
+ // src/components/ui/badge.tsx
27
+ import { jsx } from "react/jsx-runtime";
28
+ var badgeVariants = cva(
29
+ "inline-flex h-4 items-center justify-center px-1.5 text-[10px] font-mono uppercase tracking-wide transition-all whitespace-nowrap",
30
+ {
31
+ variants: {
32
+ variant: {
33
+ default: "bg-primary text-primary-foreground",
34
+ secondary: "bg-secondary text-muted-foreground hover:text-foreground",
35
+ outline: "border border-border text-foreground"
36
+ }
37
+ },
38
+ defaultVariants: {
39
+ variant: "default"
40
+ }
41
+ }
42
+ );
43
+ function Badge({
44
+ className,
45
+ variant = "default",
46
+ render,
47
+ ...props
48
+ }) {
49
+ return /* @__PURE__ */ jsx(SmoothCorners, { asChild: true, corners: { radius: 4, smoothing: 1 }, children: useRender({
50
+ defaultTagName: "span",
51
+ props: mergeProps(
52
+ {
53
+ className: cn(badgeVariants({ variant }), className)
54
+ },
55
+ props
56
+ ),
57
+ render,
58
+ state: {
59
+ slot: "badge",
60
+ variant
61
+ }
62
+ }) });
63
+ }
64
+
65
+ // src/lib/constants.ts
66
+ var CHANGELOG = [
67
+ {
68
+ version: "1.1.0",
69
+ title: "The Components Update",
70
+ date: "2024-03-15",
71
+ summary: "Introduced a new suite of reusable components to accelerate your workflow.",
72
+ changes: [
73
+ {
74
+ kind: "new",
75
+ text: "Added generic button component with variants."
76
+ },
77
+ {
78
+ kind: "new",
79
+ text: "Added customizable dialog and modal components."
80
+ },
81
+ {
82
+ kind: "improved",
83
+ text: "Enhanced accessibility across all interactive elements."
84
+ }
85
+ ]
86
+ },
87
+ {
88
+ version: "1.0.1",
89
+ title: "Bug Fixes",
90
+ date: "2024-01-10",
91
+ summary: "Minor fixes and performance improvements.",
92
+ changes: [
93
+ {
94
+ kind: "fixed",
95
+ text: "Fixed hydration error on initial load."
96
+ },
97
+ {
98
+ kind: "improved",
99
+ text: "Optimized font loading for better Core Web Vitals."
100
+ }
101
+ ]
102
+ },
103
+ {
104
+ version: "1.0.0",
105
+ title: "Initial Release",
106
+ date: "2024-01-01",
107
+ summary: "First version of the project.",
108
+ changes: [
109
+ {
110
+ kind: "new",
111
+ text: "Added initial template architecture."
112
+ },
113
+ {
114
+ kind: "new",
115
+ text: "Established monochromatic Liquid Glass design tokens."
116
+ }
117
+ ]
118
+ }
119
+ ];
120
+
121
+ // src/lib/motions.ts
122
+ var EASE_OUT = [0.22, 1, 0.36, 1];
123
+ var REVEAL_DURATION = 0.28;
124
+ var HERO_STAGGER = 0.06;
125
+ var heroChild = {
126
+ hidden: { opacity: 0, y: 12 },
127
+ show: {
128
+ opacity: 1,
129
+ y: 0,
130
+ transition: { duration: REVEAL_DURATION, ease: EASE_OUT }
131
+ }
132
+ };
133
+ var colReveal = {
134
+ hidden: { opacity: 0, y: 12 },
135
+ show: {
136
+ opacity: 1,
137
+ y: 0,
138
+ transition: { duration: REVEAL_DURATION, ease: EASE_OUT }
139
+ }
140
+ };
141
+
142
+ // src/components/content/changelog-content.tsx
143
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
144
+ function Col({ children }) {
145
+ const reduced = useReducedMotion() ?? false;
146
+ return /* @__PURE__ */ jsx2(
147
+ motion.div,
148
+ {
149
+ className: "mx-auto w-full",
150
+ initial: reduced ? false : "hidden",
151
+ whileInView: "show",
152
+ viewport: { once: true, margin: "0px 0px -64px 0px" },
153
+ variants: colReveal,
154
+ children
155
+ }
156
+ );
157
+ }
158
+ var KIND_LABEL = {
159
+ new: "New",
160
+ improved: "Improved",
161
+ fixed: "Fixed"
162
+ };
163
+ function KindTag({ kind }) {
164
+ return /* @__PURE__ */ jsx2(Badge, { variant: "secondary", className: "align-top mt-0.5", children: KIND_LABEL[kind] });
165
+ }
166
+ function ChangelogContent() {
167
+ return /* @__PURE__ */ jsx2("div", { className: "w-full", children: /* @__PURE__ */ jsx2("div", { className: "relative mx-auto w-full", children: /* @__PURE__ */ jsxs("main", { className: "typeset typeset-docs mx-auto max-w-(--layout-content-width) w-full", children: [
168
+ /* @__PURE__ */ jsx2("section", { id: "changelog-header", className: "scroll-mt-24", children: /* @__PURE__ */ jsxs(Col, { children: [
169
+ /* @__PURE__ */ jsx2("h1", { className: "tracking-tight mb-2", children: "Changelog" }),
170
+ /* @__PURE__ */ jsx2("p", { className: "text-muted-foreground/60 mb-8 mt-0", children: "16 February, 2026" })
171
+ ] }) }),
172
+ CHANGELOG.map((entry) => /* @__PURE__ */ jsx2(
173
+ "section",
174
+ {
175
+ id: `v${entry.version}`,
176
+ className: "scroll-mt-24",
177
+ children: /* @__PURE__ */ jsxs(Col, { children: [
178
+ /* @__PURE__ */ jsxs("div", { className: "not-typeset mt-16 flex items-center gap-3", children: [
179
+ /* @__PURE__ */ jsx2(
180
+ Badge,
181
+ {
182
+ variant: "secondary",
183
+ className: "text-foreground align-middle",
184
+ children: entry.version === "next" ? "Up next" : `v${entry.version}`
185
+ }
186
+ ),
187
+ /* @__PURE__ */ jsx2("span", { className: "text-muted-foreground", children: entry.date ? formatChangelogDate(entry.date) : "In progress" })
188
+ ] }),
189
+ /* @__PURE__ */ jsx2("h2", { children: entry.title }),
190
+ /* @__PURE__ */ jsx2("p", { children: entry.summary }),
191
+ /* @__PURE__ */ jsx2("div", { className: "not-typeset mt-4 overflow-hidden rounded-2xl bg-card", children: entry.changes.map(
192
+ (change, i) => /* @__PURE__ */ jsxs(
193
+ "div",
194
+ {
195
+ className: cn(
196
+ "flex gap-3 px-4 py-3",
197
+ i > 0 && "border-t border-border"
198
+ ),
199
+ children: [
200
+ /* @__PURE__ */ jsx2(KindTag, { kind: change.kind }),
201
+ /* @__PURE__ */ jsx2("span", { className: "text-muted-foreground", children: change.text })
202
+ ]
203
+ },
204
+ change.text
205
+ )
206
+ ) })
207
+ ] })
208
+ },
209
+ entry.version
210
+ )),
211
+ /* @__PURE__ */ jsx2(Col, { children: /* @__PURE__ */ jsxs("p", { className: "mt-16", children: [
212
+ "Full commit history lives on",
213
+ " ",
214
+ /* @__PURE__ */ jsx2(
215
+ "a",
216
+ {
217
+ href: "https://github.com/your-username/your-repo",
218
+ target: "_blank",
219
+ rel: "noopener noreferrer",
220
+ children: "GitHub"
221
+ }
222
+ ),
223
+ "."
224
+ ] }) })
225
+ ] }) }) });
226
+ }
227
+
228
+ // src/components/content/code-block.tsx
229
+ import * as React from "react";
230
+
231
+ // src/components/shared/command-block.tsx
232
+ import { AnimatePresence as AnimatePresence2, motion as motion3, useReducedMotion as useReducedMotion2 } from "motion/react";
233
+ import { useRef as useRef2, useState as useState2 } from "react";
234
+
235
+ // src/components/ui/button.tsx
236
+ import { mergeProps as mergeProps2, useRender as useRender2 } from "@base-ui/react";
237
+ import { SmoothCorners as SmoothCorners2 } from "@lisse/react";
238
+ import { cva as cva2 } from "class-variance-authority";
239
+ import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
240
+ var buttonVariants = cva2(
241
+ "group/button inline-flex shrink-0 items-center justify-center border border-transparent font-medium whitespace-nowrap transition duration-[160ms] ease-out outline-none select-none focus-visible:ring-2 focus-visible:ring-white/20 active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50",
242
+ {
243
+ variants: {
244
+ variant: {
245
+ default: "bg-primary text-primary-foreground border-transparent hover:bg-primary/90",
246
+ outline: "border-border text-foreground hover:bg-accent hover:text-accent-foreground",
247
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
248
+ ghost: "text-foreground hover:bg-accent hover:text-accent-foreground",
249
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
250
+ link: "text-foreground underline-offset-4 hover:underline"
251
+ },
252
+ size: {
253
+ default: "h-9 px-[calc(--spacing(3)-1px)] sm:h-8",
254
+ icon: "size-9 sm:size-8",
255
+ "icon-lg": "size-10 sm:size-9",
256
+ "icon-sm": "size-8 sm:size-7",
257
+ "icon-xl": "size-11 sm:size-10 [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5",
258
+ "icon-xs": "size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-3.5",
259
+ lg: "h-10 px-[calc(--spacing(3.5)-1px)] sm:h-9",
260
+ sm: "h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:h-7",
261
+ xl: "h-11 px-[calc(--spacing(4)-1px)] text-lg sm:h-10 sm:text-base [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5",
262
+ xs: "h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5"
263
+ }
264
+ },
265
+ defaultVariants: {
266
+ variant: "default",
267
+ size: "default"
268
+ }
269
+ }
270
+ );
271
+ function Button({
272
+ className,
273
+ variant,
274
+ size = "default",
275
+ render,
276
+ children,
277
+ loading = false,
278
+ disabled: disabledProp,
279
+ ...props
280
+ }) {
281
+ const isDisabled = Boolean(loading || disabledProp);
282
+ const typeValue = render ? void 0 : "button";
283
+ const defaultProps = {
284
+ children: /* @__PURE__ */ jsxs2(Fragment, { children: [
285
+ children,
286
+ loading && /* @__PURE__ */ jsx3(
287
+ "div",
288
+ {
289
+ className: "pointer-events-none absolute",
290
+ "data-slot": "button-loading-indicator"
291
+ }
292
+ )
293
+ ] }),
294
+ className: cn(buttonVariants({ className, size, variant })),
295
+ "aria-disabled": loading || void 0,
296
+ "data-loading": loading ? "" : void 0,
297
+ "data-slot": "button",
298
+ disabled: isDisabled,
299
+ type: typeValue
300
+ };
301
+ let radius = 8;
302
+ if (size === "default") radius = 8;
303
+ else if (size === "sm") radius = 7;
304
+ else if (size === "xs") radius = 5;
305
+ else if (size === "lg") radius = 10;
306
+ else if (size === "xl") radius = 12;
307
+ else if (size === "icon") radius = 8;
308
+ else if (size === "icon-lg") radius = 10;
309
+ else if (size === "icon-sm") radius = 7;
310
+ else if (size === "icon-xl") radius = 12;
311
+ else if (size === "icon-xs") radius = 5;
312
+ return /* @__PURE__ */ jsx3(SmoothCorners2, { asChild: true, corners: { radius, smoothing: 1 }, children: useRender2({
313
+ defaultTagName: "button",
314
+ props: mergeProps2(defaultProps, props),
315
+ render
316
+ }) });
317
+ }
318
+
319
+ // src/components/ui/toast.tsx
320
+ import { Toast } from "@base-ui/react/toast";
321
+ import {
322
+ CheckCircledIcon,
323
+ CrossCircledIcon,
324
+ ExclamationTriangleIcon,
325
+ InfoCircledIcon,
326
+ ReloadIcon
327
+ } from "@radix-ui/react-icons";
328
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
329
+ var TOAST_ICONS = {
330
+ error: CrossCircledIcon,
331
+ info: InfoCircledIcon,
332
+ loading: ReloadIcon,
333
+ success: CheckCircledIcon,
334
+ warning: ExclamationTriangleIcon
335
+ };
336
+ function getSwipeDirection(position) {
337
+ const verticalDirection = position.startsWith("top") ? "up" : "down";
338
+ if (position.includes("center")) {
339
+ return [verticalDirection];
340
+ }
341
+ if (position.includes("left")) {
342
+ return ["left", verticalDirection];
343
+ }
344
+ return ["right", verticalDirection];
345
+ }
346
+ function upsertReplayClassName(toast) {
347
+ const k = toast.updateKey ?? 0;
348
+ if (k <= 0) return void 0;
349
+ const isEven = k % 2 === 0;
350
+ if (toast.type === "error") {
351
+ return isEven ? "animate-toast-error-even" : "animate-toast-error-odd";
352
+ }
353
+ return isEven ? "animate-toast-success-even" : "animate-toast-success-odd";
354
+ }
355
+ function Toasts({
356
+ position,
357
+ portalProps
358
+ }) {
359
+ const { toasts } = Toast.useToastManager();
360
+ const swipeDirection = getSwipeDirection(position);
361
+ return /* @__PURE__ */ jsx4(Toast.Portal, { "data-slot": "toast-portal", ...portalProps, children: /* @__PURE__ */ jsx4(
362
+ Toast.Viewport,
363
+ {
364
+ className: cn(
365
+ "fixed z-60 mx-auto flex w-[calc(100%-var(--toast-inset)*2)] max-w-90 [--toast-inset:--spacing(4)] sm:[--toast-inset:--spacing(8)]",
366
+ // Vertical positioning
367
+ "data-[position*=top]:top-(--toast-inset)",
368
+ "data-[position*=bottom]:bottom-(--toast-inset)",
369
+ // Horizontal positioning
370
+ "data-[position*=left]:left-(--toast-inset)",
371
+ "data-[position*=right]:right-(--toast-inset)",
372
+ "data-[position*=center]:left-1/2 data-[position*=center]:-translate-x-1/2"
373
+ ),
374
+ "data-position": position,
375
+ "data-slot": "toast-viewport",
376
+ children: toasts.map((toast) => {
377
+ const Icon = toast.type ? TOAST_ICONS[toast.type] : null;
378
+ const toastData = toast.data;
379
+ return /* @__PURE__ */ jsx4(
380
+ Toast.Root,
381
+ {
382
+ className: cn(
383
+ "absolute z-[calc(9999-var(--toast-index))] h-(--toast-calc-height) w-full select-none rounded-lg border bg-popover text-popover-foreground [transition:transform_.5s_cubic-bezier(.22,1,.36,1),opacity_.5s,height_.15s,background-color_.5s]",
384
+ // Base positioning using data-position
385
+ "data-[position*=right]:right-0 data-[position*=right]:left-auto",
386
+ "data-[position*=left]:right-auto data-[position*=left]:left-0",
387
+ "data-[position*=center]:right-0 data-[position*=center]:left-0",
388
+ "data-[position*=top]:top-0 data-[position*=top]:bottom-auto data-[position*=top]:origin-[50%_calc(50%-50%*min(var(--toast-index,0),1))]",
389
+ "data-[position*=bottom]:top-auto data-[position*=bottom]:bottom-0 data-[position*=bottom]:origin-[50%_calc(50%+50%*min(var(--toast-index,0),1))]",
390
+ // Gap fill for hover
391
+ "after:absolute after:left-0 after:h-[calc(var(--toast-gap)+1px)] after:w-full",
392
+ "data-[position*=top]:after:top-full",
393
+ "data-[position*=bottom]:after:bottom-full",
394
+ // Define some variables
395
+ "[--toast-calc-height:var(--toast-frontmost-height,var(--toast-height))] [--toast-gap:--spacing(3)] [--toast-peek:--spacing(3)] [--toast-scale:calc(max(0,1-(var(--toast-index)*.1)))] [--toast-shrink:calc(1-var(--toast-scale))]",
396
+ // Define offset-y variable
397
+ "data-[position*=top]:[--toast-calc-offset-y:calc(var(--toast-offset-y)+var(--toast-index)*var(--toast-gap)+var(--toast-swipe-movement-y))]",
398
+ "data-[position*=bottom]:[--toast-calc-offset-y:calc(var(--toast-offset-y)*-1+var(--toast-index)*var(--toast-gap)*-1+var(--toast-swipe-movement-y))]",
399
+ // Default state transform
400
+ "data-[position*=top]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)+(var(--toast-index)*var(--toast-peek))+(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]",
401
+ "data-[position*=bottom]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--toast-peek))-(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]",
402
+ // Limited state
403
+ "data-limited:opacity-0",
404
+ // Expanded state
405
+ "data-expanded:h-(--toast-height)",
406
+ "data-position:data-expanded:transform-[translateX(var(--toast-swipe-movement-x))_translateY(var(--toast-calc-offset-y))]",
407
+ // Starting and ending animations
408
+ "data-[position*=top]:data-starting-style:transform-[translateY(calc(-100%-var(--toast-inset)))]",
409
+ "data-[position*=bottom]:data-starting-style:transform-[translateY(calc(100%+var(--toast-inset)))]",
410
+ "data-ending-style:opacity-0",
411
+ // Ending animations (direction-aware)
412
+ "data-ending-style:not-data-limited:not-data-swipe-direction:transform-[translateY(calc(100%+var(--toast-inset)))]",
413
+ "data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]",
414
+ "data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]",
415
+ "data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]",
416
+ "data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]",
417
+ // Ending animations (expanded)
418
+ "data-expanded:data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]",
419
+ "data-expanded:data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]",
420
+ "data-expanded:data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]",
421
+ "data-expanded:data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]",
422
+ upsertReplayClassName(toast)
423
+ ),
424
+ ...toastData?.rootProps,
425
+ "data-position": position,
426
+ swipeDirection,
427
+ toast,
428
+ children: /* @__PURE__ */ jsxs3(Toast.Content, { className: "pointer-events-auto flex items-center justify-between gap-1.5 overflow-hidden px-3.5 py-3 text-sm transition-opacity duration-250 data-behind:not-data-expanded:pointer-events-none data-behind:opacity-0 data-expanded:opacity-100", children: [
429
+ /* @__PURE__ */ jsxs3("div", { className: "flex gap-2", children: [
430
+ Icon && /* @__PURE__ */ jsx4(
431
+ "div",
432
+ {
433
+ className: "[&>svg]:h-lh [&>svg]:w-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
434
+ "data-slot": "toast-icon",
435
+ children: /* @__PURE__ */ jsx4(Icon, { className: "in-data-[type=loading]:animate-spin in-data-[type=error]:text-destructive in-data-[type=info]:text-info in-data-[type=success]:text-success in-data-[type=warning]:text-warning in-data-[type=loading]:opacity-80" })
436
+ }
437
+ ),
438
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-0.5", children: [
439
+ /* @__PURE__ */ jsx4(
440
+ Toast.Title,
441
+ {
442
+ className: "font-medium",
443
+ "data-slot": "toast-title"
444
+ }
445
+ ),
446
+ /* @__PURE__ */ jsx4(
447
+ Toast.Description,
448
+ {
449
+ className: "text-muted-foreground",
450
+ "data-slot": "toast-description"
451
+ }
452
+ )
453
+ ] })
454
+ ] }),
455
+ toast.actionProps && /* @__PURE__ */ jsx4(
456
+ Toast.Action,
457
+ {
458
+ className: buttonVariants({ size: "xs" }),
459
+ "data-slot": "toast-action",
460
+ children: toast.actionProps.children
461
+ }
462
+ )
463
+ ] })
464
+ },
465
+ toast.id
466
+ );
467
+ })
468
+ }
469
+ ) });
470
+ }
471
+ function AnchoredToasts({
472
+ portalProps
473
+ }) {
474
+ const { toasts } = Toast.useToastManager();
475
+ return /* @__PURE__ */ jsx4(Toast.Portal, { "data-slot": "toast-portal-anchored", ...portalProps, children: /* @__PURE__ */ jsx4(
476
+ Toast.Viewport,
477
+ {
478
+ className: "outline-none",
479
+ "data-slot": "toast-viewport-anchored",
480
+ children: toasts.map((toast) => {
481
+ const Icon = toast.type ? TOAST_ICONS[toast.type] : null;
482
+ const toastData = toast.data;
483
+ const tooltipStyle = toastData?.tooltipStyle ?? false;
484
+ const positionerProps = toast.positionerProps;
485
+ if (!positionerProps?.anchor) {
486
+ return null;
487
+ }
488
+ return /* @__PURE__ */ jsx4(
489
+ Toast.Positioner,
490
+ {
491
+ className: "z-50 max-w-[min(--spacing(64),var(--available-width))]",
492
+ "data-slot": "toast-positioner",
493
+ sideOffset: positionerProps.sideOffset ?? 4,
494
+ toast,
495
+ children: /* @__PURE__ */ jsx4(
496
+ Toast.Root,
497
+ {
498
+ className: cn(
499
+ "relative text-balance border bg-popover text-popover-foreground text-xs transition-[scale,opacity] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0",
500
+ tooltipStyle ? "rounded-md" : "rounded-lg",
501
+ upsertReplayClassName(toast)
502
+ ),
503
+ ...toastData?.rootProps,
504
+ "data-slot": "toast-popup",
505
+ toast,
506
+ children: tooltipStyle ? /* @__PURE__ */ jsx4(Toast.Content, { className: "pointer-events-auto px-2 py-1", children: /* @__PURE__ */ jsx4(Toast.Title, { "data-slot": "toast-title" }) }) : /* @__PURE__ */ jsxs3(Toast.Content, { className: "pointer-events-auto flex items-center justify-between gap-1.5 overflow-hidden px-3.5 py-3 text-sm", children: [
507
+ /* @__PURE__ */ jsxs3("div", { className: "flex gap-2", children: [
508
+ Icon && /* @__PURE__ */ jsx4(
509
+ "div",
510
+ {
511
+ className: "[&>svg]:h-lh [&>svg]:w-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
512
+ "data-slot": "toast-icon",
513
+ children: /* @__PURE__ */ jsx4(Icon, { className: "in-data-[type=loading]:animate-spin in-data-[type=error]:text-destructive in-data-[type=info]:text-info in-data-[type=success]:text-success in-data-[type=warning]:text-warning in-data-[type=loading]:opacity-80" })
514
+ }
515
+ ),
516
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-0.5", children: [
517
+ /* @__PURE__ */ jsx4(
518
+ Toast.Title,
519
+ {
520
+ className: "font-medium",
521
+ "data-slot": "toast-title"
522
+ }
523
+ ),
524
+ /* @__PURE__ */ jsx4(
525
+ Toast.Description,
526
+ {
527
+ className: "text-muted-foreground",
528
+ "data-slot": "toast-description"
529
+ }
530
+ )
531
+ ] })
532
+ ] }),
533
+ toast.actionProps && /* @__PURE__ */ jsx4(
534
+ Toast.Action,
535
+ {
536
+ className: buttonVariants({ size: "xs" }),
537
+ "data-slot": "toast-action",
538
+ children: toast.actionProps.children
539
+ }
540
+ )
541
+ ] })
542
+ }
543
+ )
544
+ },
545
+ toast.id
546
+ );
547
+ })
548
+ }
549
+ ) });
550
+ }
551
+ var toastManager = Toast.createToastManager();
552
+ var anchoredToastManager = Toast.createToastManager();
553
+ function ToastProvider({
554
+ children,
555
+ position = "bottom-right",
556
+ portalProps,
557
+ ...props
558
+ }) {
559
+ return /* @__PURE__ */ jsxs3(Toast.Provider, { toastManager, ...props, children: [
560
+ children,
561
+ /* @__PURE__ */ jsx4(Toasts, { portalProps, position })
562
+ ] });
563
+ }
564
+ function AnchoredToastProvider({
565
+ children,
566
+ portalProps,
567
+ ...props
568
+ }) {
569
+ return /* @__PURE__ */ jsxs3(Toast.Provider, { toastManager: anchoredToastManager, ...props, children: [
570
+ children,
571
+ /* @__PURE__ */ jsx4(AnchoredToasts, { portalProps })
572
+ ] });
573
+ }
574
+
575
+ // src/hooks/use-copy-to-clipboard.ts
576
+ import { useCallback, useEffect, useRef, useState } from "react";
577
+ function useCopyToClipboard(options = {}) {
578
+ const { timeout = 2e3, onCopy } = options;
579
+ const [isCopied, setIsCopied] = useState(false);
580
+ const timeoutRef = useRef(null);
581
+ const copyToClipboard = useCallback(
582
+ async (value) => {
583
+ if (!value || typeof window === "undefined" || !navigator.clipboard) {
584
+ return false;
585
+ }
586
+ try {
587
+ if (timeoutRef.current) {
588
+ window.clearTimeout(timeoutRef.current);
589
+ }
590
+ await navigator.clipboard.writeText(value);
591
+ setIsCopied(true);
592
+ onCopy?.();
593
+ if (timeout > 0) {
594
+ timeoutRef.current = window.setTimeout(() => {
595
+ setIsCopied(false);
596
+ }, timeout);
597
+ }
598
+ return true;
599
+ } catch (error) {
600
+ console.error("Failed to copy to clipboard", error);
601
+ return false;
602
+ }
603
+ },
604
+ [timeout, onCopy]
605
+ );
606
+ useEffect(() => {
607
+ return () => {
608
+ if (timeoutRef.current) {
609
+ window.clearTimeout(timeoutRef.current);
610
+ }
611
+ };
612
+ }, []);
613
+ return {
614
+ copyToClipboard,
615
+ isCopied
616
+ };
617
+ }
618
+
619
+ // src/lib/utils/audio.ts
620
+ function playBeep(frequency, duration, type = "sine") {
621
+ if (typeof window === "undefined" || // biome-ignore lint/suspicious/noExplicitAny: window may not have webkitAudioContext
622
+ !window.AudioContext && !window.webkitAudioContext)
623
+ return;
624
+ try {
625
+ const AudioContext = (
626
+ // biome-ignore lint/suspicious/noExplicitAny: window may not have webkitAudioContext
627
+ window.AudioContext || window.webkitAudioContext
628
+ );
629
+ const ctx = new AudioContext();
630
+ const osc = ctx.createOscillator();
631
+ const gain = ctx.createGain();
632
+ osc.type = type;
633
+ osc.frequency.setValueAtTime(frequency, ctx.currentTime);
634
+ gain.gain.setValueAtTime(0.1, ctx.currentTime);
635
+ gain.gain.exponentialRampToValueAtTime(1e-3, ctx.currentTime + duration);
636
+ osc.connect(gain);
637
+ gain.connect(ctx.destination);
638
+ osc.start();
639
+ osc.stop(ctx.currentTime + duration);
640
+ } catch (_e) {
641
+ }
642
+ }
643
+ function tap() {
644
+ playBeep(400, 0.1);
645
+ }
646
+ function turn(direction) {
647
+ if (direction === "forward") {
648
+ playBeep(600, 0.1);
649
+ } else {
650
+ playBeep(300, 0.1);
651
+ }
652
+ }
653
+ function copy() {
654
+ playBeep(800, 0.15, "triangle");
655
+ }
656
+ function deny() {
657
+ playBeep(150, 0.2, "sawtooth");
658
+ }
659
+
660
+ // src/components/motion-primitives/text-morph.tsx
661
+ import {
662
+ AnimatePresence,
663
+ motion as motion2
664
+ } from "motion/react";
665
+ import { useId, useMemo } from "react";
666
+ import { jsx as jsx5 } from "react/jsx-runtime";
667
+ function TextMorph({
668
+ children,
669
+ as: Component = "p",
670
+ className,
671
+ style,
672
+ variants,
673
+ transition
674
+ }) {
675
+ const uniqueId = useId();
676
+ const characters = useMemo(() => {
677
+ const charCounts = {};
678
+ return children.split("").map((char) => {
679
+ const lowerChar = char.toLowerCase();
680
+ charCounts[lowerChar] = (charCounts[lowerChar] || 0) + 1;
681
+ return {
682
+ id: `${uniqueId}-${lowerChar}${charCounts[lowerChar]}`,
683
+ label: char === " " ? "\xA0" : char
684
+ };
685
+ });
686
+ }, [children, uniqueId]);
687
+ const defaultVariants = {
688
+ initial: { opacity: 0 },
689
+ animate: { opacity: 1 },
690
+ exit: { opacity: 0 }
691
+ };
692
+ const defaultTransition = {
693
+ type: "spring",
694
+ bounce: 0,
695
+ duration: 0.3
696
+ };
697
+ return /* @__PURE__ */ jsx5(Component, { className: cn(className), "aria-label": children, style, children: /* @__PURE__ */ jsx5(AnimatePresence, { mode: "popLayout", initial: false, children: characters.map((character) => /* @__PURE__ */ jsx5(
698
+ motion2.span,
699
+ {
700
+ layoutId: character.id,
701
+ className: "inline-block",
702
+ "aria-hidden": "true",
703
+ initial: "initial",
704
+ animate: "animate",
705
+ exit: "exit",
706
+ variants: variants || defaultVariants,
707
+ transition: transition || defaultTransition,
708
+ children: character.label
709
+ },
710
+ character.id
711
+ )) }) });
712
+ }
713
+
714
+ // src/components/shared/command-block.tsx
715
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
716
+ var SLIDE_SPRING = { type: "spring", stiffness: 520, damping: 34 };
717
+ var MORPH_EASE = { duration: 0.16, ease: "easeOut" };
718
+ function CopyMorphIcon({ copied }) {
719
+ const reduced = useReducedMotion2() ?? false;
720
+ const t = reduced ? { duration: 0 } : MORPH_EASE;
721
+ return /* @__PURE__ */ jsx6(
722
+ "span",
723
+ {
724
+ "aria-hidden": "true",
725
+ className: "relative grid size-3.5 place-items-center",
726
+ children: /* @__PURE__ */ jsx6(AnimatePresence2, { initial: false, mode: "popLayout", children: copied ? /* @__PURE__ */ jsx6(
727
+ motion3.svg,
728
+ {
729
+ "aria-hidden": "true",
730
+ width: "15",
731
+ height: "15",
732
+ viewBox: "0 0 16 16",
733
+ fill: "none",
734
+ className: "absolute text-foreground",
735
+ initial: { opacity: 0, scale: 0.8 },
736
+ animate: { opacity: 1, scale: 1 },
737
+ exit: { opacity: 0, scale: 0.8 },
738
+ transition: t,
739
+ children: /* @__PURE__ */ jsx6(
740
+ motion3.path,
741
+ {
742
+ d: "M1.83398 10.0625L6.00065 13.5L14.1673 2.5",
743
+ stroke: "currentColor",
744
+ strokeWidth: "1.25",
745
+ strokeLinecap: "round",
746
+ strokeLinejoin: "round",
747
+ initial: { pathLength: reduced ? 1 : 0 },
748
+ animate: { pathLength: 1 },
749
+ transition: reduced ? { duration: 0 } : { duration: 0.18, ease: "easeOut" }
750
+ }
751
+ )
752
+ },
753
+ "check"
754
+ ) : /* @__PURE__ */ jsx6(
755
+ motion3.svg,
756
+ {
757
+ "aria-hidden": "true",
758
+ width: "15",
759
+ height: "15",
760
+ viewBox: "0 0 16 16",
761
+ fill: "none",
762
+ className: "absolute",
763
+ initial: { opacity: 0, scale: 0.8 },
764
+ animate: { opacity: 1, scale: 1 },
765
+ exit: { opacity: 0, scale: 0.8 },
766
+ transition: t,
767
+ children: /* @__PURE__ */ jsx6(
768
+ "path",
769
+ {
770
+ d: "M10.1667 3.16634H12.8334V14.1663H3.16675V3.16634H5.83341M5.83341 1.83301H10.1667V4.83301H5.83341V1.83301Z",
771
+ stroke: "currentColor",
772
+ strokeWidth: "1.25",
773
+ strokeLinecap: "round",
774
+ strokeLinejoin: "round"
775
+ }
776
+ )
777
+ },
778
+ "copy"
779
+ ) })
780
+ }
781
+ );
782
+ }
783
+ function CommandBlock({
784
+ items
785
+ }) {
786
+ const [active, setActive] = useState2(0);
787
+ const { copyToClipboard, isCopied } = useCopyToClipboard({ timeout: 2e3 });
788
+ const reduced = useReducedMotion2() ?? false;
789
+ const cur = items[active];
790
+ const copyButtonRef = useRef2(null);
791
+ const handleCopy = async () => {
792
+ const success = await copyToClipboard(cur.command);
793
+ if (success) {
794
+ tap();
795
+ anchoredToastManager.add({
796
+ title: "Copied!",
797
+ positionerProps: {
798
+ anchor: copyButtonRef.current,
799
+ sideOffset: 6
800
+ },
801
+ data: {
802
+ tooltipStyle: true
803
+ },
804
+ timeout: 2e3
805
+ });
806
+ } else {
807
+ deny();
808
+ anchoredToastManager.add({
809
+ title: "Failed to copy",
810
+ positionerProps: {
811
+ anchor: copyButtonRef.current,
812
+ sideOffset: 6
813
+ },
814
+ data: {
815
+ tooltipStyle: true
816
+ },
817
+ timeout: 2e3
818
+ });
819
+ }
820
+ };
821
+ return /* @__PURE__ */ jsxs4("div", { className: "not-typeset mt-6 rounded-2xl border-0 bg-code overflow-hidden", children: [
822
+ items.length > 1 && /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-0.5 px-3 pb-1.5 pt-3 justify-between", children: [
823
+ /* @__PURE__ */ jsx6("div", { className: "flex items-center gap-0.5 ", children: items.map((it, i) => {
824
+ const isActive = i === active;
825
+ return /* @__PURE__ */ jsxs4(
826
+ "button",
827
+ {
828
+ type: "button",
829
+ onClick: () => setActive(i),
830
+ className: cn(
831
+ "relative cursor-pointer rounded-md px-1.5 py-0.5 font-mono outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring",
832
+ isActive ? "text-foreground" : "text-muted-foreground hover:bg-accent hover:text-foreground"
833
+ ),
834
+ children: [
835
+ isActive && /* @__PURE__ */ jsx6(
836
+ motion3.span,
837
+ {
838
+ "aria-hidden": "true",
839
+ layoutId: "pkg-tab-active",
840
+ transition: reduced ? { duration: 0 } : SLIDE_SPRING,
841
+ className: "absolute inset-0 rounded-md bg-accent"
842
+ }
843
+ ),
844
+ /* @__PURE__ */ jsx6("span", { className: "relative", children: it.id })
845
+ ]
846
+ },
847
+ it.id
848
+ );
849
+ }) }),
850
+ /* @__PURE__ */ jsx6(
851
+ Button,
852
+ {
853
+ ref: copyButtonRef,
854
+ variant: "ghost",
855
+ size: "icon",
856
+ onClick: handleCopy,
857
+ className: "ml-auto text-muted-foreground hover:text-foreground focus-visible:ring-1 focus-visible:ring-ring",
858
+ title: "Copy to clipboard",
859
+ "aria-label": "Copy install command",
860
+ children: /* @__PURE__ */ jsx6(CopyMorphIcon, { copied: isCopied })
861
+ }
862
+ )
863
+ ] }),
864
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center", children: [
865
+ /* @__PURE__ */ jsx6("div", { className: "flex-1 overflow-x-auto", children: /* @__PURE__ */ jsx6("pre", { className: "flex items-center overflow-x-auto px-5 py-4 font-mono text-foreground", children: /* @__PURE__ */ jsx6("code", { children: /* @__PURE__ */ jsx6(TextMorph, { children: cur.command }) }) }) }),
866
+ items.length === 1 && /* @__PURE__ */ jsx6(
867
+ Button,
868
+ {
869
+ ref: copyButtonRef,
870
+ variant: "ghost",
871
+ size: "icon-sm",
872
+ onClick: handleCopy,
873
+ className: "mr-2 text-muted-foreground hover:text-foreground focus-visible:ring-1 focus-visible:ring-ring",
874
+ title: "Copy to clipboard",
875
+ "aria-label": "Copy install command",
876
+ children: /* @__PURE__ */ jsx6(CopyMorphIcon, { copied: isCopied })
877
+ }
878
+ )
879
+ ] })
880
+ ] });
881
+ }
882
+
883
+ // src/components/content/code-block.tsx
884
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
885
+ function CodeBlock({ html, code, className }) {
886
+ const buttonRef = React.useRef(null);
887
+ const { copyToClipboard, isCopied } = useCopyToClipboard({ timeout: 1800 });
888
+ async function handleCopy() {
889
+ const success = await copyToClipboard(code);
890
+ if (success) {
891
+ copy();
892
+ anchoredToastManager.add({
893
+ title: "Copied!",
894
+ positionerProps: {
895
+ anchor: buttonRef.current,
896
+ sideOffset: 6
897
+ },
898
+ data: {
899
+ tooltipStyle: true
900
+ },
901
+ timeout: 2e3
902
+ });
903
+ } else {
904
+ anchoredToastManager.add({
905
+ title: "Failed to copy",
906
+ positionerProps: {
907
+ anchor: buttonRef.current,
908
+ sideOffset: 6
909
+ },
910
+ data: {
911
+ tooltipStyle: true
912
+ },
913
+ timeout: 2e3
914
+ });
915
+ }
916
+ }
917
+ return /* @__PURE__ */ jsxs5(
918
+ "div",
919
+ {
920
+ className: cn(
921
+ "group relative mt-6 overflow-hidden rounded-xl not-typeset",
922
+ "bg-code",
923
+ "transition-colors",
924
+ className
925
+ ),
926
+ children: [
927
+ /* @__PURE__ */ jsx7(
928
+ Button,
929
+ {
930
+ ref: buttonRef,
931
+ variant: "ghost",
932
+ size: "icon-xs",
933
+ onClick: handleCopy,
934
+ className: cn(
935
+ "absolute right-3 top-3 z-20 rounded-lg",
936
+ "bg-transparent",
937
+ "text-muted-foreground",
938
+ "opacity-0",
939
+ "translate-y-1",
940
+ "transition-all duration-200",
941
+ "group-hover:translate-y-0",
942
+ "group-hover:opacity-100",
943
+ "hover:bg-code-foreground/10",
944
+ "hover:text-code-foreground",
945
+ "focus-visible:translate-y-0",
946
+ "focus-visible:opacity-100"
947
+ ),
948
+ children: /* @__PURE__ */ jsx7(CopyMorphIcon, { copied: isCopied })
949
+ }
950
+ ),
951
+ /* @__PURE__ */ jsx7(
952
+ "div",
953
+ {
954
+ className: cn(
955
+ "[&_pre]:m-0",
956
+ "[&_pre]:overflow-x-auto",
957
+ "[&_pre]:bg-transparent!",
958
+ "[&_pre]:px-5",
959
+ "[&_pre]:py-4",
960
+ "[&_pre]:font-mono",
961
+ "[&_pre]:leading-relaxed",
962
+ "[&_code]:bg-transparent!",
963
+ "[&_code]:p-0",
964
+ "[&_code]:font-inherit",
965
+ "[&_.line]:min-h-6",
966
+ "[&_pre::-webkit-scrollbar]:h-2",
967
+ "[&_pre::-webkit-scrollbar-track]:bg-transparent",
968
+ "[&_pre::-webkit-scrollbar-thumb]:rounded-full",
969
+ "[&_pre::-webkit-scrollbar-thumb]:bg-code-foreground/10",
970
+ "[&_pre::-webkit-scrollbar-thumb:hover]:bg-code-foreground/20"
971
+ ),
972
+ dangerouslySetInnerHTML: {
973
+ __html: html
974
+ }
975
+ }
976
+ )
977
+ ]
978
+ }
979
+ );
980
+ }
981
+
982
+ // src/components/content/docs-content.tsx
983
+ import { motion as motion5, useReducedMotion as useReducedMotion3 } from "motion/react";
984
+
985
+ // src/components/shared/scroll-fade.tsx
986
+ import { useEffect as useEffect2, useState as useState3 } from "react";
987
+ import { jsx as jsx8 } from "react/jsx-runtime";
988
+ function ScrollFade() {
989
+ const [visible, setVisible] = useState3(false);
990
+ useEffect2(() => {
991
+ const handleScroll = () => setVisible(window.scrollY > 50);
992
+ handleScroll();
993
+ window.addEventListener("scroll", handleScroll, { passive: true });
994
+ return () => window.removeEventListener("scroll", handleScroll);
995
+ }, []);
996
+ return /* @__PURE__ */ jsx8(
997
+ "div",
998
+ {
999
+ className: `pointer-events-none fixed inset-x-0 top-0 z-(--z-scroll-fade) h-20 bg-gradient-to-b from-background to-transparent transition-opacity duration-300 ${visible ? "opacity-100" : "opacity-0"}`
1000
+ }
1001
+ );
1002
+ }
1003
+
1004
+ // src/components/motion-primitives/text-effect.tsx
1005
+ import { AnimatePresence as AnimatePresence3, motion as motion4 } from "motion/react";
1006
+ import React2 from "react";
1007
+ import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
1008
+ var defaultStaggerTimes = {
1009
+ char: 0.03,
1010
+ word: 0.05,
1011
+ line: 0.1
1012
+ };
1013
+ var defaultContainerVariants = {
1014
+ hidden: { opacity: 0 },
1015
+ visible: {
1016
+ opacity: 1,
1017
+ transition: {
1018
+ staggerChildren: 0.05
1019
+ }
1020
+ },
1021
+ exit: {
1022
+ transition: { staggerChildren: 0.05, staggerDirection: -1 }
1023
+ }
1024
+ };
1025
+ var defaultItemVariants = {
1026
+ hidden: { opacity: 0 },
1027
+ visible: {
1028
+ opacity: 1
1029
+ },
1030
+ exit: { opacity: 0 }
1031
+ };
1032
+ var presetVariants = {
1033
+ blur: {
1034
+ container: defaultContainerVariants,
1035
+ item: {
1036
+ hidden: { opacity: 0, filter: "blur(12px)" },
1037
+ visible: { opacity: 1, filter: "blur(0px)" },
1038
+ exit: { opacity: 0, filter: "blur(12px)" }
1039
+ }
1040
+ },
1041
+ "fade-in-blur": {
1042
+ container: defaultContainerVariants,
1043
+ item: {
1044
+ hidden: { opacity: 0, y: 8, filter: "blur(12px)" },
1045
+ visible: { opacity: 1, y: 0, filter: "blur(0px)" },
1046
+ exit: { opacity: 0, y: 8, filter: "blur(12px)" }
1047
+ }
1048
+ },
1049
+ scale: {
1050
+ container: defaultContainerVariants,
1051
+ item: {
1052
+ hidden: { opacity: 0, scale: 0.95 },
1053
+ visible: { opacity: 1, scale: 1 },
1054
+ exit: { opacity: 0, scale: 0.95 }
1055
+ }
1056
+ },
1057
+ fade: {
1058
+ container: defaultContainerVariants,
1059
+ item: {
1060
+ hidden: { opacity: 0 },
1061
+ visible: { opacity: 1 },
1062
+ exit: { opacity: 0 }
1063
+ }
1064
+ },
1065
+ slide: {
1066
+ container: defaultContainerVariants,
1067
+ item: {
1068
+ hidden: { opacity: 0, y: 8 },
1069
+ visible: { opacity: 1, y: 0 },
1070
+ exit: { opacity: 0, y: 8 }
1071
+ }
1072
+ }
1073
+ };
1074
+ var AnimationComponent = React2.memo(({ segment, variants, per, segmentWrapperClassName }) => {
1075
+ const content = per === "line" ? /* @__PURE__ */ jsx9(motion4.span, { variants, className: "block", children: segment }) : per === "word" ? /* @__PURE__ */ jsx9(
1076
+ motion4.span,
1077
+ {
1078
+ "aria-hidden": "true",
1079
+ variants,
1080
+ className: "inline-block whitespace-pre",
1081
+ children: segment
1082
+ }
1083
+ ) : /* @__PURE__ */ jsx9(motion4.span, { className: "inline-block whitespace-pre", children: segment.split("").map((char, charIndex) => /* @__PURE__ */ jsx9(
1084
+ motion4.span,
1085
+ {
1086
+ "aria-hidden": "true",
1087
+ variants,
1088
+ className: "inline-block whitespace-pre",
1089
+ children: char
1090
+ },
1091
+ `char-${charIndex}`
1092
+ )) });
1093
+ if (!segmentWrapperClassName) {
1094
+ return content;
1095
+ }
1096
+ const defaultWrapperClassName = per === "line" ? "block" : "inline-block";
1097
+ return /* @__PURE__ */ jsx9("span", { className: cn(defaultWrapperClassName, segmentWrapperClassName), children: content });
1098
+ });
1099
+ AnimationComponent.displayName = "AnimationComponent";
1100
+ var splitText = (text, per) => {
1101
+ if (per === "line") return text.split("\n");
1102
+ return text.split(/(\s+)/);
1103
+ };
1104
+ var hasTransition = (variant) => {
1105
+ if (!variant) return false;
1106
+ return typeof variant === "object" && "transition" in variant;
1107
+ };
1108
+ var createVariantsWithTransition = (baseVariants, transition) => {
1109
+ if (!transition) return baseVariants;
1110
+ const { exit: _, ...mainTransition } = transition;
1111
+ return {
1112
+ ...baseVariants,
1113
+ visible: {
1114
+ ...baseVariants.visible,
1115
+ transition: {
1116
+ ...hasTransition(baseVariants.visible) ? baseVariants.visible.transition : {},
1117
+ ...mainTransition
1118
+ }
1119
+ },
1120
+ exit: {
1121
+ ...baseVariants.exit,
1122
+ transition: {
1123
+ ...hasTransition(baseVariants.exit) ? baseVariants.exit.transition : {},
1124
+ ...mainTransition,
1125
+ staggerDirection: -1
1126
+ }
1127
+ }
1128
+ };
1129
+ };
1130
+ function TextEffect({
1131
+ children,
1132
+ per = "word",
1133
+ as = "p",
1134
+ variants,
1135
+ className,
1136
+ preset = "fade",
1137
+ delay = 0,
1138
+ speedReveal = 1,
1139
+ speedSegment = 1,
1140
+ trigger = true,
1141
+ onAnimationComplete,
1142
+ onAnimationStart,
1143
+ segmentWrapperClassName,
1144
+ containerTransition,
1145
+ segmentTransition,
1146
+ style
1147
+ }) {
1148
+ const segments = splitText(children, per);
1149
+ const MotionTag = motion4[as];
1150
+ const baseVariants = preset ? presetVariants[preset] : { container: defaultContainerVariants, item: defaultItemVariants };
1151
+ const stagger = defaultStaggerTimes[per] / speedReveal;
1152
+ const baseDuration = 0.3 / speedSegment;
1153
+ const customStagger = hasTransition(variants?.container?.visible ?? {}) ? (variants?.container?.visible).transition?.staggerChildren : void 0;
1154
+ const customDelay = hasTransition(variants?.container?.visible ?? {}) ? (variants?.container?.visible).transition?.delayChildren : void 0;
1155
+ const computedVariants = {
1156
+ container: createVariantsWithTransition(
1157
+ variants?.container || baseVariants.container,
1158
+ {
1159
+ staggerChildren: customStagger ?? stagger,
1160
+ delayChildren: customDelay ?? delay,
1161
+ ...containerTransition,
1162
+ exit: {
1163
+ staggerChildren: customStagger ?? stagger,
1164
+ staggerDirection: -1
1165
+ }
1166
+ }
1167
+ ),
1168
+ item: createVariantsWithTransition(variants?.item || baseVariants.item, {
1169
+ duration: baseDuration,
1170
+ ...segmentTransition
1171
+ })
1172
+ };
1173
+ return /* @__PURE__ */ jsx9(AnimatePresence3, { mode: "popLayout", children: trigger && /* @__PURE__ */ jsxs6(
1174
+ MotionTag,
1175
+ {
1176
+ initial: "hidden",
1177
+ animate: "visible",
1178
+ exit: "exit",
1179
+ variants: computedVariants.container,
1180
+ className,
1181
+ onAnimationComplete,
1182
+ onAnimationStart,
1183
+ style,
1184
+ children: [
1185
+ per !== "line" ? /* @__PURE__ */ jsx9("span", { className: "sr-only", children }) : null,
1186
+ segments.map((segment, index) => /* @__PURE__ */ jsx9(
1187
+ AnimationComponent,
1188
+ {
1189
+ segment,
1190
+ variants: computedVariants.item,
1191
+ per,
1192
+ segmentWrapperClassName
1193
+ },
1194
+ `${per}-${index}-${segment}`
1195
+ ))
1196
+ ]
1197
+ }
1198
+ ) });
1199
+ }
1200
+
1201
+ // src/components/content/docs-content.tsx
1202
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
1203
+ function DocsCol({ children }) {
1204
+ const reduced = useReducedMotion3() ?? false;
1205
+ return /* @__PURE__ */ jsx10(
1206
+ motion5.div,
1207
+ {
1208
+ className: "mx-auto w-full",
1209
+ initial: reduced ? false : "hidden",
1210
+ whileInView: "show",
1211
+ viewport: { once: true, margin: "0px 0px -64px 0px" },
1212
+ variants: colReveal,
1213
+ children
1214
+ }
1215
+ );
1216
+ }
1217
+ function DocsFrame({ children }) {
1218
+ return /* @__PURE__ */ jsxs7("div", { className: "relative min-h-screen overflow-x-clip pb-24", children: [
1219
+ /* @__PURE__ */ jsx10(ScrollFade, {}),
1220
+ /* @__PURE__ */ jsx10("style", { children: `.docs-code .shiki{margin:0;padding:16px 18px;overflow-x:auto;line-height:1.65;background:transparent !important;font-size:var(--typeset-size)}.docs-code .shiki code{background:transparent;padding:0}` }),
1221
+ /* @__PURE__ */ jsx10("div", { className: "w-full", children: /* @__PURE__ */ jsx10("div", { className: "relative mx-auto w-full", children: /* @__PURE__ */ jsx10("main", { className: "typeset typeset-docs mx-auto max-w-(--layout-content-width) w-full", children }) }) })
1222
+ ] });
1223
+ }
1224
+ function DocsHeader({
1225
+ title,
1226
+ date,
1227
+ children
1228
+ }) {
1229
+ return /* @__PURE__ */ jsx10("section", { id: "docs-header", className: "scroll-mt-24", children: /* @__PURE__ */ jsxs7(DocsCol, { children: [
1230
+ /* @__PURE__ */ jsx10("h1", { className: "tracking-tight mb-2", children: /* @__PURE__ */ jsx10(TextEffect, { preset: "fade-in-blur", per: "word", children: title }) }),
1231
+ /* @__PURE__ */ jsx10("p", { className: "text-muted-foreground/60 mb-8 mt-0", children: date }),
1232
+ children
1233
+ ] }) });
1234
+ }
1235
+ function DocsOverview({ children }) {
1236
+ return /* @__PURE__ */ jsx10("section", { id: "overview", className: "scroll-mt-24", children: /* @__PURE__ */ jsx10(DocsCol, { children }) });
1237
+ }
1238
+ function DocsSection({
1239
+ id,
1240
+ title,
1241
+ children
1242
+ }) {
1243
+ return /* @__PURE__ */ jsx10("section", { id, className: "scroll-mt-24 mt-12", children: /* @__PURE__ */ jsxs7(DocsCol, { children: [
1244
+ title && /* @__PURE__ */ jsx10("h2", { children: title }),
1245
+ children
1246
+ ] }) });
1247
+ }
1248
+ function DocsInstallation({
1249
+ install
1250
+ }) {
1251
+ return /* @__PURE__ */ jsxs7(DocsSection, { id: "installation", title: "Installation", children: [
1252
+ /* @__PURE__ */ jsx10("p", { children: "Install the package using your preferred package manager:" }),
1253
+ /* @__PURE__ */ jsx10(CommandBlock, { items: install })
1254
+ ] });
1255
+ }
1256
+ function DocsCode({ code, html }) {
1257
+ return /* @__PURE__ */ jsx10(CodeBlock, { code, html });
1258
+ }
1259
+
1260
+ // src/components/layout/docs-layout.tsx
1261
+ import { ArrowLeftIcon } from "@radix-ui/react-icons";
1262
+ import { motion as motion7, useMotionValueEvent, useScroll } from "motion/react";
1263
+ import Link from "next/link";
1264
+ import { usePathname } from "next/navigation";
1265
+ import * as React3 from "react";
1266
+
1267
+ // src/components/motion-primitives/sliding-number.tsx
1268
+ import {
1269
+ motion as motion6,
1270
+ motionValue,
1271
+ useSpring,
1272
+ useTransform
1273
+ } from "motion/react";
1274
+ import { useEffect as useEffect3, useId as useId2 } from "react";
1275
+ import useMeasure from "react-use-measure";
1276
+ import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
1277
+ var TRANSITION = {
1278
+ type: "spring",
1279
+ bounce: 0,
1280
+ duration: 0.3
1281
+ };
1282
+ function Digit({ value, place }) {
1283
+ const valueRoundedToPlace = Math.floor(value / place) % 10;
1284
+ const initial = motionValue(valueRoundedToPlace);
1285
+ const animatedValue = useSpring(initial, TRANSITION);
1286
+ useEffect3(() => {
1287
+ animatedValue.set(valueRoundedToPlace);
1288
+ }, [animatedValue, valueRoundedToPlace]);
1289
+ return /* @__PURE__ */ jsxs8("div", { className: "relative inline-block w-[1ch] overflow-x-visible overflow-y-clip leading-none tabular-nums", children: [
1290
+ /* @__PURE__ */ jsx11("div", { className: "invisible", children: "0" }),
1291
+ Array.from({ length: 10 }, (_, i) => (
1292
+ // biome-ignore lint/suspicious/noArrayIndexKey: order is static
1293
+ /* @__PURE__ */ jsx11(SlidingDigitNumber, { mv: animatedValue, number: i }, `digit-${i}`)
1294
+ ))
1295
+ ] });
1296
+ }
1297
+ function SlidingDigitNumber({
1298
+ mv,
1299
+ number
1300
+ }) {
1301
+ const uniqueId = useId2();
1302
+ const [ref, bounds] = useMeasure();
1303
+ const y = useTransform(mv, (latest) => {
1304
+ if (!bounds.height) return 0;
1305
+ const placeValue = latest % 10;
1306
+ const offset = (10 + number - placeValue) % 10;
1307
+ let memo = offset * bounds.height;
1308
+ if (offset > 5) {
1309
+ memo -= 10 * bounds.height;
1310
+ }
1311
+ return memo;
1312
+ });
1313
+ if (!bounds.height) {
1314
+ return /* @__PURE__ */ jsx11("span", { ref, className: "invisible absolute", children: number });
1315
+ }
1316
+ return /* @__PURE__ */ jsx11(
1317
+ motion6.span,
1318
+ {
1319
+ style: { y },
1320
+ layoutId: `${uniqueId}-${number}`,
1321
+ className: "absolute inset-0 flex items-center justify-center",
1322
+ transition: TRANSITION,
1323
+ ref,
1324
+ children: number
1325
+ }
1326
+ );
1327
+ }
1328
+ function SlidingNumber({
1329
+ value,
1330
+ padStart = false,
1331
+ decimalSeparator = "."
1332
+ }) {
1333
+ const absValue = Math.abs(value);
1334
+ const [integerPart, decimalPart] = absValue.toString().split(".");
1335
+ const integerValue = parseInt(integerPart, 10);
1336
+ const paddedInteger = padStart && integerValue < 10 ? `0${integerPart}` : integerPart;
1337
+ const integerDigits = paddedInteger.split("");
1338
+ const integerPlaces = integerDigits.map(
1339
+ (_, i) => 10 ** (integerDigits.length - i - 1)
1340
+ );
1341
+ return /* @__PURE__ */ jsxs8("div", { className: "flex items-center", children: [
1342
+ value < 0 && "-",
1343
+ integerDigits.map((_, index) => /* @__PURE__ */ jsx11(
1344
+ Digit,
1345
+ {
1346
+ value: integerValue,
1347
+ place: integerPlaces[index]
1348
+ },
1349
+ `pos-${integerPlaces[index]}`
1350
+ )),
1351
+ decimalPart && /* @__PURE__ */ jsxs8(Fragment2, { children: [
1352
+ /* @__PURE__ */ jsx11("span", { children: decimalSeparator }),
1353
+ decimalPart.split("").map((_, index) => {
1354
+ const place = 10 ** (decimalPart.length - index - 1);
1355
+ return /* @__PURE__ */ jsx11(
1356
+ Digit,
1357
+ {
1358
+ value: parseInt(decimalPart, 10),
1359
+ place
1360
+ },
1361
+ `decimal-${place}`
1362
+ );
1363
+ })
1364
+ ] })
1365
+ ] });
1366
+ }
1367
+
1368
+ // src/components/layout/docs-layout.tsx
1369
+ import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
1370
+ function DocsLayout({
1371
+ children,
1372
+ links,
1373
+ indexUrl = "/",
1374
+ indexLabel = "Index",
1375
+ header
1376
+ }) {
1377
+ const pathname = usePathname();
1378
+ const [activeHash, setActiveHash] = React3.useState("");
1379
+ const { scrollYProgress } = useScroll();
1380
+ const [progress, setProgress] = React3.useState(0);
1381
+ useMotionValueEvent(scrollYProgress, "change", (latest) => {
1382
+ setProgress(Math.round(latest * 100));
1383
+ });
1384
+ React3.useEffect(() => {
1385
+ const currentPathLinks = links.flatMap(
1386
+ (g) => g.items.filter((i) => i.isAnchor && i.url.startsWith(pathname))
1387
+ );
1388
+ const sections = currentPathLinks.map((i) => i.url.split("#")[1]);
1389
+ if (!sections.length) {
1390
+ setActiveHash("");
1391
+ return;
1392
+ }
1393
+ const observerOptions = {
1394
+ root: null,
1395
+ rootMargin: "-20% 0px -60% 0px",
1396
+ // Trigger when the section occupies the main focal area
1397
+ threshold: 0
1398
+ };
1399
+ const observer = new IntersectionObserver((entries) => {
1400
+ for (const entry of entries) {
1401
+ if (entry.isIntersecting) {
1402
+ setActiveHash(`#${entry.target.id}`);
1403
+ }
1404
+ }
1405
+ }, observerOptions);
1406
+ for (const id of sections) {
1407
+ if (id) {
1408
+ const el = document.getElementById(id);
1409
+ if (el) observer.observe(el);
1410
+ }
1411
+ }
1412
+ if (typeof window !== "undefined" && window.location.hash) {
1413
+ setActiveHash(window.location.hash);
1414
+ } else {
1415
+ setActiveHash(`#${sections[0]}`);
1416
+ }
1417
+ return () => {
1418
+ observer.disconnect();
1419
+ };
1420
+ }, [links, pathname]);
1421
+ const handleAnchorClick = (e, url) => {
1422
+ if (!url.includes("#")) return;
1423
+ const hash = url.split("#")[1];
1424
+ const element = document.getElementById(hash);
1425
+ if (element && url.startsWith(pathname)) {
1426
+ e.preventDefault();
1427
+ element.scrollIntoView({ behavior: "smooth" });
1428
+ window.history.pushState(null, "", `#${hash}`);
1429
+ setActiveHash(`#${hash}`);
1430
+ }
1431
+ };
1432
+ const isLinkActive = (url, isAnchor) => {
1433
+ if (isAnchor) {
1434
+ if (!url.startsWith(pathname)) return false;
1435
+ const hash = url.split("#")[1];
1436
+ if (activeHash) {
1437
+ return activeHash === `#${hash}`;
1438
+ }
1439
+ return false;
1440
+ }
1441
+ return pathname === url;
1442
+ };
1443
+ return /* @__PURE__ */ jsxs9(Fragment3, { children: [
1444
+ /* @__PURE__ */ jsx12(ScrollFade, {}),
1445
+ header,
1446
+ /* @__PURE__ */ jsxs9("div", { className: "mx-auto w-full max-w-(--layout-max-width) px-6 py-12 md:py-24 flex flex-col md:flex-row gap-10 md:gap-16", children: [
1447
+ /* @__PURE__ */ jsxs9("aside", { className: "w-full md:w-48 shrink-0 md:sticky md:top-24 md:self-start flex flex-col gap-6 md:gap-8", children: [
1448
+ /* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between", children: [
1449
+ /* @__PURE__ */ jsxs9(
1450
+ Link,
1451
+ {
1452
+ href: indexUrl,
1453
+ className: "text-sm text-muted-foreground hover:text-foreground flex items-center gap-1.5 transition-opacity duration-200 select-none opacity-60 hover:opacity-100",
1454
+ children: [
1455
+ /* @__PURE__ */ jsx12(ArrowLeftIcon, { className: "size-3.5" }),
1456
+ indexLabel
1457
+ ]
1458
+ }
1459
+ ),
1460
+ /* @__PURE__ */ jsxs9("div", { className: "text-xs font-mono text-muted-foreground opacity-50 flex items-center gap-0.5", children: [
1461
+ /* @__PURE__ */ jsx12(SlidingNumber, { value: progress }),
1462
+ "%"
1463
+ ] })
1464
+ ] }),
1465
+ /* @__PURE__ */ jsx12("div", { className: "flex flex-row flex-wrap gap-x-6 gap-y-2 md:flex-col md:gap-y-4", children: links.map((group) => /* @__PURE__ */ jsx12("div", { className: "flex flex-col gap-1.5 md:gap-2", children: /* @__PURE__ */ jsx12("nav", { className: "flex flex-row flex-wrap gap-x-1 gap-y-1 md:flex-col md:gap-y-1", children: group.items.map((link) => {
1466
+ const active = isLinkActive(link.url, link.isAnchor);
1467
+ return /* @__PURE__ */ jsxs9(
1468
+ Link,
1469
+ {
1470
+ href: link.url,
1471
+ onClick: (e) => handleAnchorClick(e, link.url),
1472
+ className: `relative text-sm transition-colors duration-200 px-2 py-1.5 -ml-2 rounded-md ${active ? "text-foreground font-medium" : "text-muted-foreground hover:text-foreground"}`,
1473
+ children: [
1474
+ active && /* @__PURE__ */ jsx12(
1475
+ motion7.div,
1476
+ {
1477
+ layoutId: "activeDocsLinkBg",
1478
+ className: "absolute inset-0 bg-secondary/50 rounded-md",
1479
+ transition: {
1480
+ type: "spring",
1481
+ duration: 0.3,
1482
+ bounce: 0
1483
+ }
1484
+ }
1485
+ ),
1486
+ /* @__PURE__ */ jsx12("span", { className: "relative z-10", children: link.title })
1487
+ ]
1488
+ },
1489
+ link.title
1490
+ );
1491
+ }) }) }, group.group)) })
1492
+ ] }),
1493
+ /* @__PURE__ */ jsx12("main", { className: "flex-1 min-w-0", children })
1494
+ ] })
1495
+ ] });
1496
+ }
1497
+ function DocsNavbar({
1498
+ logo,
1499
+ right
1500
+ }) {
1501
+ return /* @__PURE__ */ jsxs9("header", { className: "sticky top-4 z-(--z-header) mx-auto flex w-full max-w-(--layout-max-width) items-center justify-between px-(--layout-padding) py-3", children: [
1502
+ logo,
1503
+ right
1504
+ ] });
1505
+ }
1506
+
1507
+ // src/components/layout/site-header.tsx
1508
+ import { GitHubLogoIcon } from "@radix-ui/react-icons";
1509
+ import { motion as motion10 } from "motion/react";
1510
+ import Link2 from "next/link";
1511
+ import { usePathname as usePathname2 } from "next/navigation";
1512
+
1513
+ // src/components/layout/theme-switcher.tsx
1514
+ import { MoonIcon, SunIcon } from "@radix-ui/react-icons";
1515
+ import { useTheme } from "next-themes";
1516
+ import { useEffect as useEffect5, useState as useState5 } from "react";
1517
+
1518
+ // src/components/motion-primitives/morph-icon.tsx
1519
+ import { AnimatePresence as AnimatePresence4, motion as motion8 } from "motion/react";
1520
+ import { jsx as jsx13 } from "react/jsx-runtime";
1521
+ function MorphIcon({
1522
+ isActive,
1523
+ activeIcon,
1524
+ inactiveIcon,
1525
+ className,
1526
+ variant = "rotate"
1527
+ }) {
1528
+ const variants = {
1529
+ scale: {
1530
+ initial: { opacity: 0, scale: 0.95 },
1531
+ animate: { opacity: 1, scale: 1 },
1532
+ exit: { opacity: 0, scale: 0.95 }
1533
+ },
1534
+ rotate: {
1535
+ initial: { opacity: 0, rotate: -90, scale: 0.95 },
1536
+ animate: { opacity: 1, rotate: 0, scale: 1 },
1537
+ exit: { opacity: 0, rotate: 90, scale: 0.95 }
1538
+ },
1539
+ slide: {
1540
+ initial: { opacity: 0, y: -10 },
1541
+ animate: { opacity: 1, y: 0 },
1542
+ exit: { opacity: 0, y: 10 }
1543
+ }
1544
+ };
1545
+ return /* @__PURE__ */ jsx13(AnimatePresence4, { mode: "popLayout", initial: false, children: /* @__PURE__ */ jsx13(
1546
+ motion8.span,
1547
+ {
1548
+ initial: "initial",
1549
+ animate: "animate",
1550
+ exit: "exit",
1551
+ variants: variants[variant],
1552
+ transition: { duration: 0.15, ease: [0.23, 1, 0.32, 1] },
1553
+ className: `inline-flex items-center justify-center ${className ?? ""}`,
1554
+ children: isActive ? activeIcon : inactiveIcon
1555
+ },
1556
+ isActive ? "active" : "inactive"
1557
+ ) });
1558
+ }
1559
+
1560
+ // src/components/layout/theme-switcher.tsx
1561
+ import { jsx as jsx14 } from "react/jsx-runtime";
1562
+ function ThemeSwitcher() {
1563
+ const { theme, setTheme, systemTheme } = useTheme();
1564
+ const [mounted, setMounted] = useState5(false);
1565
+ useEffect5(() => {
1566
+ setMounted(true);
1567
+ }, []);
1568
+ if (!mounted) {
1569
+ return /* @__PURE__ */ jsx14(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Toggle theme", children: /* @__PURE__ */ jsx14(SunIcon, { "aria-hidden": "true" }) });
1570
+ }
1571
+ const currentTheme = theme === "system" ? systemTheme : theme;
1572
+ return /* @__PURE__ */ jsx14(
1573
+ Button,
1574
+ {
1575
+ variant: "ghost",
1576
+ size: "icon-sm",
1577
+ onClick: () => setTheme(currentTheme === "dark" ? "light" : "dark"),
1578
+ "aria-label": "Toggle theme",
1579
+ children: /* @__PURE__ */ jsx14(
1580
+ MorphIcon,
1581
+ {
1582
+ isActive: currentTheme === "dark",
1583
+ activeIcon: /* @__PURE__ */ jsx14(MoonIcon, { "aria-hidden": "true" }),
1584
+ inactiveIcon: /* @__PURE__ */ jsx14(SunIcon, { "aria-hidden": "true" }),
1585
+ variant: "rotate"
1586
+ }
1587
+ )
1588
+ }
1589
+ );
1590
+ }
1591
+
1592
+ // src/components/ui/brand-logo.tsx
1593
+ import { AnimatePresence as AnimatePresence5, motion as motion9 } from "motion/react";
1594
+ import { forwardRef, useState as useState6 } from "react";
1595
+ import { jsx as jsx15 } from "react/jsx-runtime";
1596
+ var BrandLogo = forwardRef(
1597
+ ({ className = "", ...props }, ref) => {
1598
+ const [isHovered, setIsHovered] = useState6(false);
1599
+ const springConfig = {
1600
+ type: "spring",
1601
+ duration: 0.5,
1602
+ bounce: 0.2
1603
+ };
1604
+ const easeOut = [0.23, 1, 0.32, 1];
1605
+ return /* @__PURE__ */ jsx15(
1606
+ motion9.div,
1607
+ {
1608
+ ref,
1609
+ className: `relative flex items-center justify-center overflow-hidden transition-shadow ${className}`,
1610
+ onHoverStart: () => setIsHovered(true),
1611
+ onHoverEnd: () => setIsHovered(false),
1612
+ whileTap: { scale: 0.97 },
1613
+ layout: true,
1614
+ transition: springConfig,
1615
+ style: {
1616
+ height: 24,
1617
+ // Keeps vertical rhythm stable
1618
+ cursor: "pointer"
1619
+ },
1620
+ ...props,
1621
+ children: /* @__PURE__ */ jsx15(AnimatePresence5, { mode: "popLayout", initial: false, children: isHovered ? /* @__PURE__ */ jsx15(
1622
+ motion9.span,
1623
+ {
1624
+ initial: { opacity: 0, scale: 0.95, filter: "blur(6px)" },
1625
+ animate: { opacity: 1, scale: 1, filter: "blur(0px)" },
1626
+ exit: { opacity: 0, scale: 0.95, filter: "blur(6px)" },
1627
+ transition: { duration: 0.2, ease: easeOut },
1628
+ className: "whitespace-nowrap font-sans text-[16px] font-extrabold lowercase leading-none tracking-tight text-slate-900 dark:text-white",
1629
+ children: "inklu"
1630
+ },
1631
+ "text"
1632
+ ) : /* @__PURE__ */ jsx15(
1633
+ motion9.div,
1634
+ {
1635
+ initial: { opacity: 0, scale: 0.95, filter: "blur(6px)" },
1636
+ animate: { opacity: 1, scale: 1, filter: "blur(0px)" },
1637
+ exit: { opacity: 0, scale: 0.95, filter: "blur(6px)" },
1638
+ transition: { duration: 0.2, ease: easeOut },
1639
+ className: "h-4 w-4 rounded-sm bg-slate-900 dark:bg-white"
1640
+ },
1641
+ "icon"
1642
+ ) })
1643
+ }
1644
+ );
1645
+ }
1646
+ );
1647
+ BrandLogo.displayName = "BrandLogo";
1648
+
1649
+ // src/components/ui/hover-card.tsx
1650
+ import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
1651
+ import { jsx as jsx16 } from "react/jsx-runtime";
1652
+ function HoverCard({ ...props }) {
1653
+ return /* @__PURE__ */ jsx16(PreviewCardPrimitive.Root, { "data-slot": "hover-card", ...props });
1654
+ }
1655
+ function HoverCardTrigger({ ...props }) {
1656
+ return /* @__PURE__ */ jsx16(PreviewCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props });
1657
+ }
1658
+ function HoverCardContent({
1659
+ className,
1660
+ side = "bottom",
1661
+ sideOffset = 4,
1662
+ align = "center",
1663
+ alignOffset = 4,
1664
+ ...props
1665
+ }) {
1666
+ return /* @__PURE__ */ jsx16(PreviewCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsx16(
1667
+ PreviewCardPrimitive.Positioner,
1668
+ {
1669
+ align,
1670
+ alignOffset,
1671
+ side,
1672
+ sideOffset,
1673
+ className: "isolate z-50",
1674
+ children: /* @__PURE__ */ jsx16(
1675
+ PreviewCardPrimitive.Popup,
1676
+ {
1677
+ "data-slot": "hover-card-content",
1678
+ className: cn(
1679
+ "z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-200 ease-out data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
1680
+ className
1681
+ ),
1682
+ ...props
1683
+ }
1684
+ )
1685
+ }
1686
+ ) });
1687
+ }
1688
+
1689
+ // src/components/ui/tooltip.tsx
1690
+ import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
1691
+ import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
1692
+ function TooltipProvider({
1693
+ delay = 0,
1694
+ ...props
1695
+ }) {
1696
+ return /* @__PURE__ */ jsx17(
1697
+ TooltipPrimitive.Provider,
1698
+ {
1699
+ "data-slot": "tooltip-provider",
1700
+ delay,
1701
+ ...props
1702
+ }
1703
+ );
1704
+ }
1705
+ function Tooltip({ ...props }) {
1706
+ return /* @__PURE__ */ jsx17(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props });
1707
+ }
1708
+ function TooltipTrigger({ ...props }) {
1709
+ return /* @__PURE__ */ jsx17(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
1710
+ }
1711
+ function TooltipContent({
1712
+ className,
1713
+ side = "top",
1714
+ sideOffset = 4,
1715
+ align = "center",
1716
+ alignOffset = 0,
1717
+ children,
1718
+ ...props
1719
+ }) {
1720
+ return /* @__PURE__ */ jsx17(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx17(
1721
+ TooltipPrimitive.Positioner,
1722
+ {
1723
+ align,
1724
+ alignOffset,
1725
+ side,
1726
+ sideOffset,
1727
+ className: "isolate z-50",
1728
+ children: /* @__PURE__ */ jsxs10(
1729
+ TooltipPrimitive.Popup,
1730
+ {
1731
+ "data-slot": "tooltip-content",
1732
+ className: cn(
1733
+ "z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 duration-150 ease-out data-instant:duration-0 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
1734
+ className
1735
+ ),
1736
+ ...props,
1737
+ children: [
1738
+ children,
1739
+ /* @__PURE__ */ jsx17(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })
1740
+ ]
1741
+ }
1742
+ )
1743
+ }
1744
+ ) });
1745
+ }
1746
+
1747
+ // src/components/layout/site-header.tsx
1748
+ import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
1749
+ function SiteHeader({
1750
+ navItems = [],
1751
+ logo = /* @__PURE__ */ jsx18(BrandLogo, {}),
1752
+ version = "v0.1",
1753
+ githubUrl = "https://github.com/your-username/your-repo",
1754
+ right
1755
+ }) {
1756
+ const pathname = usePathname2();
1757
+ const isActive = (href) => href === "/" ? pathname === "/" : pathname?.startsWith(href) ?? false;
1758
+ return /* @__PURE__ */ jsxs11("header", { className: "sticky top-4 z-(--z-header) flex w-full items-center justify-between rounded-xl", children: [
1759
+ /* @__PURE__ */ jsx18(
1760
+ Link2,
1761
+ {
1762
+ href: "/",
1763
+ "aria-label": "Home",
1764
+ className: "flex items-center text-foreground transition-opacity hover:opacity-80",
1765
+ children: logo
1766
+ }
1767
+ ),
1768
+ /* @__PURE__ */ jsx18("nav", { className: "absolute left-1/2 flex -translate-x-1/2 items-center gap-4 md:gap-5", children: navItems.map((item) => {
1769
+ const active = isActive(item.href);
1770
+ return /* @__PURE__ */ jsxs11(
1771
+ Link2,
1772
+ {
1773
+ href: item.href,
1774
+ "aria-current": active ? "page" : void 0,
1775
+ onClick: () => {
1776
+ if (!active) turn(item.href === "/" ? "back" : "forward");
1777
+ },
1778
+ className: cn(
1779
+ "relative font-medium text-sm leading-5 transition-colors px-3 py-1.5 rounded-full",
1780
+ active ? "text-foreground" : "text-muted-foreground hover:text-foreground"
1781
+ ),
1782
+ children: [
1783
+ active && /* @__PURE__ */ jsx18(
1784
+ motion10.div,
1785
+ {
1786
+ layoutId: "activeHeaderNavBg",
1787
+ className: "absolute inset-0 bg-secondary/60 rounded-full",
1788
+ transition: { type: "spring", duration: 0.3, bounce: 0 }
1789
+ }
1790
+ ),
1791
+ /* @__PURE__ */ jsx18("span", { className: "relative z-10", children: item.label })
1792
+ ]
1793
+ },
1794
+ item.href
1795
+ );
1796
+ }) }),
1797
+ /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-1", children: [
1798
+ version && /* @__PURE__ */ jsxs11(HoverCard, { children: [
1799
+ /* @__PURE__ */ jsx18(
1800
+ HoverCardTrigger,
1801
+ {
1802
+ render: /* @__PURE__ */ jsx18(
1803
+ Badge,
1804
+ {
1805
+ variant: "secondary",
1806
+ className: "align-middle cursor-default hover:bg-secondary/80 transition-colors",
1807
+ children: version
1808
+ }
1809
+ )
1810
+ }
1811
+ ),
1812
+ /* @__PURE__ */ jsx18(
1813
+ HoverCardContent,
1814
+ {
1815
+ side: "bottom",
1816
+ sideOffset: 8,
1817
+ align: "center",
1818
+ className: "w-64 p-2",
1819
+ children: /* @__PURE__ */ jsxs11("div", { className: "space-y-1.5", children: [
1820
+ /* @__PURE__ */ jsxs11("h1", { className: " font-medium", children: [
1821
+ "Release ",
1822
+ version
1823
+ ] }),
1824
+ /* @__PURE__ */ jsx18("p", { className: "text-muted-foreground", children: "You are viewing the documentation for the latest release." })
1825
+ ] })
1826
+ }
1827
+ )
1828
+ ] }),
1829
+ right,
1830
+ githubUrl && /* @__PURE__ */ jsx18(TooltipProvider, { delay: 200, children: /* @__PURE__ */ jsxs11(Tooltip, { children: [
1831
+ /* @__PURE__ */ jsx18(
1832
+ TooltipTrigger,
1833
+ {
1834
+ render: /* @__PURE__ */ jsxs11(
1835
+ Button,
1836
+ {
1837
+ variant: "ghost",
1838
+ size: "sm",
1839
+ render: (props) => /* @__PURE__ */ jsx18(
1840
+ "a",
1841
+ {
1842
+ ...props,
1843
+ href: githubUrl,
1844
+ target: "_blank",
1845
+ rel: "noopener noreferrer",
1846
+ onClick: (e) => {
1847
+ props.onClick?.(e);
1848
+ tap();
1849
+ }
1850
+ }
1851
+ ),
1852
+ children: [
1853
+ /* @__PURE__ */ jsx18(GitHubLogoIcon, {}),
1854
+ /* @__PURE__ */ jsx18("span", { className: "hidden sm:inline", children: "GitHub" })
1855
+ ]
1856
+ }
1857
+ )
1858
+ }
1859
+ ),
1860
+ /* @__PURE__ */ jsx18(TooltipContent, { side: "bottom", sideOffset: 6, children: "View source on GitHub" })
1861
+ ] }) }),
1862
+ /* @__PURE__ */ jsx18(ThemeSwitcher, {})
1863
+ ] })
1864
+ ] });
1865
+ }
1866
+
1867
+ // src/components/layout/site-layout.tsx
1868
+ import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
1869
+ function SiteLayout({ children, header, footer }) {
1870
+ return /* @__PURE__ */ jsxs12("div", { className: "relative flex flex-col items-center min-h-screen pb-24 overflow-x-clip", children: [
1871
+ /* @__PURE__ */ jsx19(ScrollFade, {}),
1872
+ /* @__PURE__ */ jsxs12("section", { className: "w-full px-6 flex flex-col gap-3 pt-3", children: [
1873
+ header,
1874
+ children
1875
+ ] }),
1876
+ footer && /* @__PURE__ */ jsx19("div", { className: "flex flex-col gap-10 items-center text-center mt-32 px-4", children: footer })
1877
+ ] });
1878
+ }
1879
+
1880
+ // src/components/ui/direction.tsx
1881
+ import {
1882
+ DirectionProvider,
1883
+ useDirection
1884
+ } from "@base-ui/react/direction-provider";
1885
+
1886
+ // src/components/layout/theme-provider.tsx
1887
+ import { ThemeProvider as NextThemesProvider } from "next-themes";
1888
+ import { jsx as jsx20 } from "react/jsx-runtime";
1889
+ function ThemeProvider(props) {
1890
+ return /* @__PURE__ */ jsx20(NextThemesProvider, { ...props });
1891
+ }
1892
+
1893
+ // src/components/layout/site-provider.tsx
1894
+ import { jsx as jsx21 } from "react/jsx-runtime";
1895
+ function SiteProvider({ children }) {
1896
+ return /* @__PURE__ */ jsx21(
1897
+ ThemeProvider,
1898
+ {
1899
+ attribute: "class",
1900
+ defaultTheme: "dark",
1901
+ enableSystem: true,
1902
+ disableTransitionOnChange: true,
1903
+ children: /* @__PURE__ */ jsx21(DirectionProvider, { direction: "ltr", children: /* @__PURE__ */ jsx21(ToastProvider, { position: "bottom-right", children: /* @__PURE__ */ jsx21(AnchoredToastProvider, { children }) }) })
1904
+ }
1905
+ );
1906
+ }
1907
+
1908
+ // src/components/layout/site-template.tsx
1909
+ import { motion as motion11, useReducedMotion as useReducedMotion4 } from "motion/react";
1910
+ import { jsx as jsx22 } from "react/jsx-runtime";
1911
+ function SiteTemplate({ children }) {
1912
+ const reduced = useReducedMotion4();
1913
+ return /* @__PURE__ */ jsx22(
1914
+ motion11.div,
1915
+ {
1916
+ initial: reduced ? false : { opacity: 0 },
1917
+ animate: { opacity: 1 },
1918
+ transition: reduced ? { duration: 0 } : { duration: 0.24, ease: [0.22, 1, 0.36, 1] },
1919
+ children
1920
+ }
1921
+ );
1922
+ }
1923
+
1924
+ // src/components/ui/button-group.tsx
1925
+ import { mergeProps as mergeProps3 } from "@base-ui/react/merge-props";
1926
+ import { useRender as useRender3 } from "@base-ui/react/use-render";
1927
+ import { cva as cva3 } from "class-variance-authority";
1928
+
1929
+ // src/components/ui/separator.tsx
1930
+ import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
1931
+ import { jsx as jsx23 } from "react/jsx-runtime";
1932
+ function Separator({
1933
+ className,
1934
+ orientation = "horizontal",
1935
+ ...props
1936
+ }) {
1937
+ return /* @__PURE__ */ jsx23(
1938
+ SeparatorPrimitive,
1939
+ {
1940
+ "data-slot": "separator",
1941
+ orientation,
1942
+ className: cn(
1943
+ "shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
1944
+ className
1945
+ ),
1946
+ ...props
1947
+ }
1948
+ );
1949
+ }
1950
+
1951
+ // src/components/ui/button-group.tsx
1952
+ import { jsx as jsx24 } from "react/jsx-runtime";
1953
+ var buttonGroupVariants = cva3(
1954
+ "flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-e-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
1955
+ {
1956
+ variants: {
1957
+ orientation: {
1958
+ horizontal: "*:data-slot:rounded-e-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-e-md! [&>[data-slot]~[data-slot]]:rounded-s-none [&>[data-slot]~[data-slot]]:border-s-0",
1959
+ vertical: "flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-md! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0"
1960
+ }
1961
+ },
1962
+ defaultVariants: {
1963
+ orientation: "horizontal"
1964
+ }
1965
+ }
1966
+ );
1967
+ function ButtonGroup({
1968
+ className,
1969
+ orientation,
1970
+ ...props
1971
+ }) {
1972
+ return (
1973
+ // biome-ignore lint/a11y/useSemanticElements: Button group pattern
1974
+ /* @__PURE__ */ jsx24(
1975
+ "div",
1976
+ {
1977
+ role: "group",
1978
+ "data-slot": "button-group",
1979
+ "data-orientation": orientation,
1980
+ className: cn(buttonGroupVariants({ orientation }), className),
1981
+ ...props
1982
+ }
1983
+ )
1984
+ );
1985
+ }
1986
+ function ButtonGroupText({
1987
+ className,
1988
+ render,
1989
+ ...props
1990
+ }) {
1991
+ return useRender3({
1992
+ defaultTagName: "div",
1993
+ props: mergeProps3(
1994
+ {
1995
+ className: cn(
1996
+ "flex items-center gap-2 rounded-md border bg-muted px-2.5 text-xs/relaxed font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
1997
+ className
1998
+ )
1999
+ },
2000
+ props
2001
+ ),
2002
+ render,
2003
+ state: {
2004
+ slot: "button-group-text"
2005
+ }
2006
+ });
2007
+ }
2008
+ function ButtonGroupSeparator({
2009
+ className,
2010
+ orientation = "vertical",
2011
+ ...props
2012
+ }) {
2013
+ return /* @__PURE__ */ jsx24(
2014
+ Separator,
2015
+ {
2016
+ "data-slot": "button-group-separator",
2017
+ orientation,
2018
+ className: cn(
2019
+ "relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto",
2020
+ className
2021
+ ),
2022
+ ...props
2023
+ }
2024
+ );
2025
+ }
2026
+
2027
+ // src/components/ui/card.tsx
2028
+ import { SmoothCorners as SmoothCorners3 } from "@lisse/react";
2029
+ import { jsx as jsx25 } from "react/jsx-runtime";
2030
+ function Card({
2031
+ className,
2032
+ size = "default",
2033
+ ...props
2034
+ }) {
2035
+ return /* @__PURE__ */ jsx25(SmoothCorners3, { asChild: true, corners: { radius: 24, smoothing: 1 }, children: /* @__PURE__ */ jsx25(
2036
+ "div",
2037
+ {
2038
+ "data-slot": "card",
2039
+ "data-size": size,
2040
+ className: cn(
2041
+ "group/card flex flex-col overflow-hidden bg-card hover:bg-accent transition-colors text-card-foreground",
2042
+ className
2043
+ ),
2044
+ ...props
2045
+ }
2046
+ ) });
2047
+ }
2048
+ function CardHeader({ className, ...props }) {
2049
+ return /* @__PURE__ */ jsx25(
2050
+ "div",
2051
+ {
2052
+ "data-slot": "card-header",
2053
+ className: cn("flex flex-col gap-1.5 mb-4", className),
2054
+ ...props
2055
+ }
2056
+ );
2057
+ }
2058
+ function CardTitle({ className, ...props }) {
2059
+ return /* @__PURE__ */ jsx25(
2060
+ "div",
2061
+ {
2062
+ "data-slot": "card-title",
2063
+ className: cn("font-medium leading-none tracking-tight", className),
2064
+ ...props
2065
+ }
2066
+ );
2067
+ }
2068
+ function CardDescription({ className, ...props }) {
2069
+ return /* @__PURE__ */ jsx25(
2070
+ "div",
2071
+ {
2072
+ "data-slot": "card-description",
2073
+ className: cn("text-muted-foreground", className),
2074
+ ...props
2075
+ }
2076
+ );
2077
+ }
2078
+ function CardAction({ className, ...props }) {
2079
+ return /* @__PURE__ */ jsx25(
2080
+ "div",
2081
+ {
2082
+ "data-slot": "card-action",
2083
+ className: cn(
2084
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
2085
+ className
2086
+ ),
2087
+ ...props
2088
+ }
2089
+ );
2090
+ }
2091
+ function CardContent({ className, ...props }) {
2092
+ return /* @__PURE__ */ jsx25(
2093
+ "div",
2094
+ {
2095
+ "data-slot": "card-content",
2096
+ className: cn("text-muted-foreground", className),
2097
+ ...props
2098
+ }
2099
+ );
2100
+ }
2101
+ function CardFooter({ className, ...props }) {
2102
+ return /* @__PURE__ */ jsx25(
2103
+ "div",
2104
+ {
2105
+ "data-slot": "card-footer",
2106
+ className: cn("flex items-center pt-4", className),
2107
+ ...props
2108
+ }
2109
+ );
2110
+ }
2111
+
2112
+ // src/components/ui/item.tsx
2113
+ import { mergeProps as mergeProps4 } from "@base-ui/react/merge-props";
2114
+ import { useRender as useRender4 } from "@base-ui/react/use-render";
2115
+ import { cva as cva4 } from "class-variance-authority";
2116
+ import { jsx as jsx26 } from "react/jsx-runtime";
2117
+ function ItemGroup({ className, ...props }) {
2118
+ return (
2119
+ // biome-ignore lint/a11y/useSemanticElements: ARIA list pattern
2120
+ /* @__PURE__ */ jsx26(
2121
+ "div",
2122
+ {
2123
+ role: "list",
2124
+ "data-slot": "item-group",
2125
+ className: cn(
2126
+ "group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
2127
+ className
2128
+ ),
2129
+ ...props
2130
+ }
2131
+ )
2132
+ );
2133
+ }
2134
+ function ItemSeparator({
2135
+ className,
2136
+ ...props
2137
+ }) {
2138
+ return /* @__PURE__ */ jsx26(
2139
+ Separator,
2140
+ {
2141
+ "data-slot": "item-separator",
2142
+ orientation: "horizontal",
2143
+ className: cn("my-2", className),
2144
+ ...props
2145
+ }
2146
+ );
2147
+ }
2148
+ var itemVariants = cva4(
2149
+ "group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition duration-[160ms] ease-out outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted active:scale-[0.97]",
2150
+ {
2151
+ variants: {
2152
+ variant: {
2153
+ default: "border-transparent",
2154
+ outline: "border-border",
2155
+ muted: "border-transparent bg-muted/50"
2156
+ },
2157
+ size: {
2158
+ default: "gap-2.5 px-3 py-2.5",
2159
+ sm: "gap-2.5 px-3 py-2.5",
2160
+ xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
2161
+ }
2162
+ },
2163
+ defaultVariants: {
2164
+ variant: "default",
2165
+ size: "default"
2166
+ }
2167
+ }
2168
+ );
2169
+ function Item({
2170
+ className,
2171
+ variant = "default",
2172
+ size = "default",
2173
+ render,
2174
+ ...props
2175
+ }) {
2176
+ return useRender4({
2177
+ defaultTagName: "div",
2178
+ props: mergeProps4(
2179
+ {
2180
+ className: cn(itemVariants({ variant, size, className }))
2181
+ },
2182
+ props
2183
+ ),
2184
+ render,
2185
+ state: {
2186
+ slot: "item",
2187
+ variant,
2188
+ size
2189
+ }
2190
+ });
2191
+ }
2192
+ var itemMediaVariants = cva4(
2193
+ "flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none",
2194
+ {
2195
+ variants: {
2196
+ variant: {
2197
+ default: "bg-transparent",
2198
+ icon: "[&_svg:not([class*='size-'])]:size-4",
2199
+ image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
2200
+ }
2201
+ },
2202
+ defaultVariants: {
2203
+ variant: "default"
2204
+ }
2205
+ }
2206
+ );
2207
+ function ItemMedia({
2208
+ className,
2209
+ variant = "default",
2210
+ ...props
2211
+ }) {
2212
+ return /* @__PURE__ */ jsx26(
2213
+ "div",
2214
+ {
2215
+ "data-slot": "item-media",
2216
+ "data-variant": variant,
2217
+ className: cn(itemMediaVariants({ variant, className })),
2218
+ ...props
2219
+ }
2220
+ );
2221
+ }
2222
+ function ItemContent({ className, ...props }) {
2223
+ return /* @__PURE__ */ jsx26(
2224
+ "div",
2225
+ {
2226
+ "data-slot": "item-content",
2227
+ className: cn(
2228
+ "flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none",
2229
+ className
2230
+ ),
2231
+ ...props
2232
+ }
2233
+ );
2234
+ }
2235
+ function ItemTitle({ className, ...props }) {
2236
+ return /* @__PURE__ */ jsx26(
2237
+ "div",
2238
+ {
2239
+ "data-slot": "item-title",
2240
+ className: cn(
2241
+ "line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
2242
+ className
2243
+ ),
2244
+ ...props
2245
+ }
2246
+ );
2247
+ }
2248
+ function ItemDescription({ className, ...props }) {
2249
+ return /* @__PURE__ */ jsx26(
2250
+ "p",
2251
+ {
2252
+ "data-slot": "item-description",
2253
+ className: cn(
2254
+ "line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
2255
+ className
2256
+ ),
2257
+ ...props
2258
+ }
2259
+ );
2260
+ }
2261
+ function ItemActions({ className, ...props }) {
2262
+ return /* @__PURE__ */ jsx26(
2263
+ "div",
2264
+ {
2265
+ "data-slot": "item-actions",
2266
+ className: cn("flex items-center gap-2", className),
2267
+ ...props
2268
+ }
2269
+ );
2270
+ }
2271
+ function ItemHeader({ className, ...props }) {
2272
+ return /* @__PURE__ */ jsx26(
2273
+ "div",
2274
+ {
2275
+ "data-slot": "item-header",
2276
+ className: cn(
2277
+ "flex basis-full items-center justify-between gap-2",
2278
+ className
2279
+ ),
2280
+ ...props
2281
+ }
2282
+ );
2283
+ }
2284
+ function ItemFooter({ className, ...props }) {
2285
+ return /* @__PURE__ */ jsx26(
2286
+ "div",
2287
+ {
2288
+ "data-slot": "item-footer",
2289
+ className: cn(
2290
+ "flex basis-full items-center justify-between gap-2",
2291
+ className
2292
+ ),
2293
+ ...props
2294
+ }
2295
+ );
2296
+ }
2297
+ export {
2298
+ AnchoredToastProvider,
2299
+ Badge,
2300
+ BrandLogo,
2301
+ Button,
2302
+ ButtonGroup,
2303
+ ButtonGroupSeparator,
2304
+ ButtonGroupText,
2305
+ Card,
2306
+ CardAction,
2307
+ CardContent,
2308
+ CardDescription,
2309
+ CardFooter,
2310
+ CardHeader,
2311
+ CardTitle,
2312
+ ChangelogContent,
2313
+ CodeBlock,
2314
+ CommandBlock,
2315
+ CopyMorphIcon,
2316
+ DirectionProvider,
2317
+ DocsCode,
2318
+ DocsCol,
2319
+ DocsFrame,
2320
+ DocsHeader,
2321
+ DocsInstallation,
2322
+ DocsLayout,
2323
+ DocsNavbar,
2324
+ DocsOverview,
2325
+ DocsSection,
2326
+ EASE_OUT,
2327
+ HERO_STAGGER,
2328
+ HoverCard,
2329
+ HoverCardContent,
2330
+ HoverCardTrigger,
2331
+ Item,
2332
+ ItemActions,
2333
+ ItemContent,
2334
+ ItemDescription,
2335
+ ItemFooter,
2336
+ ItemGroup,
2337
+ ItemHeader,
2338
+ ItemMedia,
2339
+ ItemSeparator,
2340
+ ItemTitle,
2341
+ REVEAL_DURATION,
2342
+ ScrollFade,
2343
+ Separator,
2344
+ SiteHeader,
2345
+ SiteLayout,
2346
+ SiteProvider,
2347
+ SiteTemplate,
2348
+ SlidingNumber,
2349
+ TextEffect,
2350
+ TextMorph,
2351
+ ThemeProvider,
2352
+ ThemeSwitcher,
2353
+ Toast as ToastPrimitive,
2354
+ ToastProvider,
2355
+ Tooltip,
2356
+ TooltipContent,
2357
+ TooltipProvider,
2358
+ TooltipTrigger,
2359
+ anchoredToastManager,
2360
+ badgeVariants,
2361
+ buttonGroupVariants,
2362
+ buttonVariants,
2363
+ colReveal,
2364
+ heroChild,
2365
+ toastManager,
2366
+ useDirection
2367
+ };
2368
+ //# sourceMappingURL=index.mjs.map