unplugin-docubook 1.0.0 → 1.0.2

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 (110) hide show
  1. package/README.md +142 -2
  2. package/dist/astro.cjs +152 -0
  3. package/dist/astro.cjs.map +1 -0
  4. package/dist/astro.js +125 -12
  5. package/dist/astro.js.map +1 -1
  6. package/dist/bun.cjs +140 -0
  7. package/dist/bun.cjs.map +1 -0
  8. package/dist/bun.js +115 -5
  9. package/dist/bun.js.map +1 -1
  10. package/dist/components/index.cjs +829 -0
  11. package/dist/components/index.cjs.map +1 -0
  12. package/dist/components/index.js +720 -512
  13. package/dist/components/index.js.map +1 -1
  14. package/dist/esbuild.cjs +140 -0
  15. package/dist/esbuild.cjs.map +1 -0
  16. package/dist/esbuild.js +115 -5
  17. package/dist/esbuild.js.map +1 -1
  18. package/dist/farm.cjs +140 -0
  19. package/dist/farm.cjs.map +1 -0
  20. package/dist/farm.js +115 -5
  21. package/dist/farm.js.map +1 -1
  22. package/dist/index.cjs +143 -0
  23. package/dist/index.cjs.map +1 -0
  24. package/dist/index.js +116 -2
  25. package/dist/index.js.map +1 -0
  26. package/dist/next.cjs +140 -0
  27. package/dist/next.cjs.map +1 -0
  28. package/dist/next.js +119 -0
  29. package/dist/next.js.map +1 -0
  30. package/dist/nuxt.cjs +160 -0
  31. package/dist/nuxt.cjs.map +1 -0
  32. package/dist/nuxt.js +134 -16
  33. package/dist/nuxt.js.map +1 -1
  34. package/dist/rolldown.cjs +140 -0
  35. package/dist/rolldown.cjs.map +1 -0
  36. package/dist/rolldown.js +115 -5
  37. package/dist/rolldown.js.map +1 -1
  38. package/dist/rollup.cjs +140 -0
  39. package/dist/rollup.cjs.map +1 -0
  40. package/dist/rollup.js +115 -5
  41. package/dist/rollup.js.map +1 -1
  42. package/dist/rspack.cjs +140 -0
  43. package/dist/rspack.cjs.map +1 -0
  44. package/dist/rspack.js +115 -5
  45. package/dist/rspack.js.map +1 -1
  46. package/dist/types.cjs +19 -0
  47. package/dist/types.cjs.map +1 -0
  48. package/dist/types.js +1 -1
  49. package/dist/types.js.map +1 -0
  50. package/dist/vite.cjs +140 -0
  51. package/dist/vite.cjs.map +1 -0
  52. package/dist/vite.js +115 -5
  53. package/dist/vite.js.map +1 -1
  54. package/dist/webpack.cjs +140 -0
  55. package/dist/webpack.cjs.map +1 -0
  56. package/dist/webpack.js +115 -5
  57. package/dist/webpack.js.map +1 -1
  58. package/package.json +92 -33
  59. package/dist/adapters/next-DNQX7_ln.d.ts +0 -24
  60. package/dist/adapters/next-DNQX7_ln.d.ts.map +0 -1
  61. package/dist/adapters/next.js +0 -38
  62. package/dist/adapters/next.js.map +0 -1
  63. package/dist/adapters/react-C9Vk6aTD.d.ts +0 -24
  64. package/dist/adapters/react-C9Vk6aTD.d.ts.map +0 -1
  65. package/dist/adapters/react.js +0 -39
  66. package/dist/adapters/react.js.map +0 -1
  67. package/dist/adapters/svelte-C-dhzdmU.d.ts +0 -19
  68. package/dist/adapters/svelte-C-dhzdmU.d.ts.map +0 -1
  69. package/dist/adapters/svelte.js +0 -43
  70. package/dist/adapters/svelte.js.map +0 -1
  71. package/dist/adapters/vue-BWv1EZit.d.ts +0 -22
  72. package/dist/adapters/vue-BWv1EZit.d.ts.map +0 -1
  73. package/dist/adapters/vue.js +0 -41
  74. package/dist/adapters/vue.js.map +0 -1
  75. package/dist/astro-BcckVQ-2.d.ts +0 -19
  76. package/dist/astro-BcckVQ-2.d.ts.map +0 -1
  77. package/dist/bun-DYPhytPs.d.ts +0 -7
  78. package/dist/bun-DYPhytPs.d.ts.map +0 -1
  79. package/dist/components/index-LWFtIGRd.d.ts +0 -265
  80. package/dist/components/index-LWFtIGRd.d.ts.map +0 -1
  81. package/dist/context-BKx0jIwX.js +0 -49
  82. package/dist/context-BKx0jIwX.js.map +0 -1
  83. package/dist/esbuild-BD42nX0_.d.ts +0 -8
  84. package/dist/esbuild-BD42nX0_.d.ts.map +0 -1
  85. package/dist/farm-C3XYk4nf.d.ts +0 -7
  86. package/dist/farm-C3XYk4nf.d.ts.map +0 -1
  87. package/dist/framework/index-98dEoo0g.d.ts +0 -11
  88. package/dist/framework/index-98dEoo0g.d.ts.map +0 -1
  89. package/dist/framework/index.js +0 -29
  90. package/dist/framework/index.js.map +0 -1
  91. package/dist/index-2f48-Fxc.d.ts +0 -10
  92. package/dist/index-2f48-Fxc.d.ts.map +0 -1
  93. package/dist/nuxt-BidHgMAG.d.ts +0 -5
  94. package/dist/nuxt-BidHgMAG.d.ts.map +0 -1
  95. package/dist/rolldown-CrcgSKP1.d.ts +0 -8
  96. package/dist/rolldown-CrcgSKP1.d.ts.map +0 -1
  97. package/dist/rollup-DDEc1C_K.d.ts +0 -8
  98. package/dist/rollup-DDEc1C_K.d.ts.map +0 -1
  99. package/dist/rspack-QbbymFlY.d.ts +0 -7
  100. package/dist/rspack-QbbymFlY.d.ts.map +0 -1
  101. package/dist/src-KZV_M01u.js +0 -165
  102. package/dist/src-KZV_M01u.js.map +0 -1
  103. package/dist/types-BQhWL5Qs.d.ts +0 -34
  104. package/dist/types-BQhWL5Qs.d.ts.map +0 -1
  105. package/dist/types-uxY1cMXO.d.ts +0 -28
  106. package/dist/types-uxY1cMXO.d.ts.map +0 -1
  107. package/dist/vite-9CqZQPO-.d.ts +0 -8
  108. package/dist/vite-9CqZQPO-.d.ts.map +0 -1
  109. package/dist/webpack-CBuuXltg.d.ts +0 -7
  110. package/dist/webpack-CBuuXltg.d.ts.map +0 -1
@@ -1,566 +1,774 @@
1
- import { n as useDocuBook, t as DocuBookProvider } from "../context-BKx0jIwX.js";
2
- import React, { Children, cloneElement, createContext, isValidElement, useContext, useEffect, useState } from "react";
3
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
- import * as Icons from "lucide-react";
5
- import { AlertCircle, AlertTriangle, Check, CheckCircle, ChevronRight, Copy as Copy$1, File as File$1, Folder as Folder$1, FolderOpen, Info, Plus, Search, Wrench, X, XCircle, Zap } from "lucide-react";
6
- import clsx from "clsx";
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+
33
+ // src/components/react/context.tsx
34
+ import { createContext, useContext } from "react";
35
+ import { jsx } from "react/jsx-runtime";
36
+ var DefaultLink = (_a) => {
37
+ var _b = _a, {
38
+ href,
39
+ children
40
+ } = _b, props = __objRest(_b, [
41
+ "href",
42
+ "children"
43
+ ]);
44
+ return /* @__PURE__ */ jsx("a", __spreadProps(__spreadValues({ href }, props), { children }));
45
+ };
46
+ var DefaultImage = (_a) => {
47
+ var _b = _a, {
48
+ src,
49
+ alt
50
+ } = _b, props = __objRest(_b, [
51
+ "src",
52
+ "alt"
53
+ ]);
54
+ return /* @__PURE__ */ jsx("img", __spreadValues({ src, alt }, props));
55
+ };
56
+ var defaults = {
57
+ Link: DefaultLink,
58
+ Image: DefaultImage
59
+ };
60
+ var DocuBookContext = createContext(defaults);
61
+ var DocuBookProvider = DocuBookContext.Provider;
62
+ function useDocuBook() {
63
+ return useContext(DocuBookContext);
64
+ }
7
65
 
8
- //#region src/components/react/Note.tsx
9
- const noteVariants = {
10
- note: "bg-blue-50 dark:bg-blue-950/30 border-blue-200 dark:border-blue-800 border-l-blue-500 text-blue-900 dark:text-blue-100",
11
- danger: "bg-red-50 dark:bg-red-950/30 border-red-200 dark:border-red-800 border-l-red-500 text-red-900 dark:text-red-100",
12
- warning: "bg-orange-50 dark:bg-orange-950/30 border-orange-200 dark:border-orange-800 border-l-orange-500 text-orange-900 dark:text-orange-100",
13
- success: "bg-emerald-50 dark:bg-emerald-950/30 border-emerald-200 dark:border-emerald-800 border-l-emerald-500 text-emerald-900 dark:text-emerald-100"
66
+ // src/components/react/Note.tsx
67
+ import { Info, AlertTriangle, AlertCircle, CheckCircle } from "lucide-react";
68
+ import clsx from "clsx";
69
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
70
+ var noteVariants = {
71
+ note: "bg-blue-50 dark:bg-blue-950/30 border-blue-200 dark:border-blue-800 border-l-blue-500 text-blue-900 dark:text-blue-100",
72
+ danger: "bg-red-50 dark:bg-red-950/30 border-red-200 dark:border-red-800 border-l-red-500 text-red-900 dark:text-red-100",
73
+ warning: "bg-orange-50 dark:bg-orange-950/30 border-orange-200 dark:border-orange-800 border-l-orange-500 text-orange-900 dark:text-orange-100",
74
+ success: "bg-emerald-50 dark:bg-emerald-950/30 border-emerald-200 dark:border-emerald-800 border-l-emerald-500 text-emerald-900 dark:text-emerald-100"
14
75
  };
15
- const iconMap = {
16
- note: Info,
17
- danger: AlertCircle,
18
- warning: AlertTriangle,
19
- success: CheckCircle
76
+ var iconMap = {
77
+ note: Info,
78
+ danger: AlertCircle,
79
+ warning: AlertTriangle,
80
+ success: CheckCircle
20
81
  };
21
- function Note({ className, title = "Note", type = "note", children, ...props }) {
22
- const Icon = iconMap[type];
23
- return /* @__PURE__ */ jsxs("div", {
24
- className: clsx("relative w-full rounded-lg border border-l-4 p-4 mb-4", noteVariants[type], className),
25
- ...props,
26
- children: [/* @__PURE__ */ jsx("div", {
27
- className: "absolute left-4 top-4",
28
- children: /* @__PURE__ */ jsx(Icon, { className: "w-5 h-5" })
29
- }), /* @__PURE__ */ jsxs("div", {
30
- className: "pl-8",
31
- children: [/* @__PURE__ */ jsx("h5", {
32
- className: "mb-1 font-medium leading-none tracking-tight",
33
- children: title
34
- }), /* @__PURE__ */ jsx("div", {
35
- className: "text-sm opacity-90",
36
- children
37
- })]
38
- })]
39
- });
82
+ function Note(_a) {
83
+ var _b = _a, {
84
+ className,
85
+ title = "Note",
86
+ type = "note",
87
+ children
88
+ } = _b, props = __objRest(_b, [
89
+ "className",
90
+ "title",
91
+ "type",
92
+ "children"
93
+ ]);
94
+ const Icon = iconMap[type];
95
+ return /* @__PURE__ */ jsxs(
96
+ "div",
97
+ __spreadProps(__spreadValues({
98
+ className: clsx(
99
+ "relative w-full rounded-lg border border-l-4 p-4 mb-4",
100
+ noteVariants[type],
101
+ className
102
+ )
103
+ }, props), {
104
+ children: [
105
+ /* @__PURE__ */ jsx2("div", { className: "absolute left-4 top-4", children: /* @__PURE__ */ jsx2(Icon, { className: "w-5 h-5" }) }),
106
+ /* @__PURE__ */ jsxs("div", { className: "pl-8", children: [
107
+ /* @__PURE__ */ jsx2("h5", { className: "mb-1 font-medium leading-none tracking-tight", children: title }),
108
+ /* @__PURE__ */ jsx2("div", { className: "text-sm opacity-90", children })
109
+ ] })
110
+ ]
111
+ })
112
+ );
40
113
  }
41
114
 
42
- //#endregion
43
- //#region src/components/react/Card.tsx
44
- const Card = ({ title, icon, href, horizontal, children, className }) => {
45
- const { Link } = useDocuBook();
46
- const Icon = icon ? Icons[icon] : null;
47
- const content = /* @__PURE__ */ jsxs("div", {
48
- className: clsx("border rounded-lg shadow-sm p-4 transition-all duration-200", "bg-card text-card-foreground border-border", "hover:bg-accent/5 hover:border-accent/30", "flex gap-2", horizontal ? "flex-row items-center gap-1" : "flex-col space-y-1", className),
49
- children: [Icon && /* @__PURE__ */ jsx(Icon, { className: "w-5 h-5 text-primary flex-shrink-0" }), /* @__PURE__ */ jsxs("div", {
50
- className: "flex-1 min-w-0 my-auto h-full",
51
- children: [/* @__PURE__ */ jsx("span", {
52
- className: "text-base font-semibold text-foreground",
53
- children: title
54
- }), /* @__PURE__ */ jsx("div", {
55
- className: "text-sm text-muted-foreground -mt-3",
56
- children
57
- })]
58
- })]
59
- });
60
- return href ? /* @__PURE__ */ jsx(Link, {
61
- className: "no-underline block",
62
- href,
63
- children: content
64
- }) : content;
115
+ // src/components/react/Card.tsx
116
+ import * as Icons from "lucide-react";
117
+ import clsx2 from "clsx";
118
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
119
+ var Card = ({ title, icon, href, horizontal, children, className }) => {
120
+ const { Link } = useDocuBook();
121
+ const Icon = icon ? Icons[icon] : null;
122
+ const content = /* @__PURE__ */ jsxs2(
123
+ "div",
124
+ {
125
+ className: clsx2(
126
+ "border rounded-lg shadow-sm p-4 transition-all duration-200",
127
+ "bg-card text-card-foreground border-border",
128
+ "hover:bg-accent/5 hover:border-accent/30",
129
+ "flex gap-2",
130
+ horizontal ? "flex-row items-center gap-1" : "flex-col space-y-1",
131
+ className
132
+ ),
133
+ children: [
134
+ Icon && /* @__PURE__ */ jsx3(Icon, { className: "w-5 h-5 text-primary flex-shrink-0" }),
135
+ /* @__PURE__ */ jsxs2("div", { className: "flex-1 min-w-0 my-auto h-full", children: [
136
+ /* @__PURE__ */ jsx3("span", { className: "text-base font-semibold text-foreground", children: title }),
137
+ /* @__PURE__ */ jsx3("div", { className: "text-sm text-muted-foreground -mt-3", children })
138
+ ] })
139
+ ]
140
+ }
141
+ );
142
+ return href ? /* @__PURE__ */ jsx3(Link, { className: "no-underline block", href, children: content }) : content;
65
143
  };
66
144
 
67
- //#endregion
68
- //#region src/components/react/CardGroup.tsx
145
+ // src/components/react/CardGroup.tsx
146
+ import React2 from "react";
147
+ import clsx3 from "clsx";
148
+ import { jsx as jsx4 } from "react/jsx-runtime";
69
149
  function CardGroup({ children, cols = 2, className }) {
70
- const cardsArray = React.Children.toArray(children);
71
- return /* @__PURE__ */ jsx("div", {
72
- className: clsx("grid gap-4", {
73
- 1: "grid-cols-1",
74
- 2: "grid-cols-1 sm:grid-cols-2",
75
- 3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
76
- 4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
77
- }[cols] || "grid-cols-1 sm:grid-cols-2", className),
78
- children: cardsArray.map((card, index) => /* @__PURE__ */ jsx("div", { children: card }, index))
79
- });
150
+ const cardsArray = React2.Children.toArray(children);
151
+ const gridColsClass = {
152
+ 1: "grid-cols-1",
153
+ 2: "grid-cols-1 sm:grid-cols-2",
154
+ 3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
155
+ 4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
156
+ };
157
+ return /* @__PURE__ */ jsx4("div", { className: clsx3("grid gap-4", gridColsClass[cols] || "grid-cols-1 sm:grid-cols-2", className), children: cardsArray.map((card, index) => /* @__PURE__ */ jsx4("div", { children: card }, index)) });
80
158
  }
81
159
 
82
- //#endregion
83
- //#region src/components/react/AccordionContext.tsx
84
- /**
85
- * Context that tells child Accordion components they are inside a group.
86
- */
87
- const AccordionGroupContext = createContext({ inGroup: false });
160
+ // src/components/react/Accordion.tsx
161
+ import { useState, useContext as useContext2 } from "react";
162
+ import { ChevronRight } from "lucide-react";
163
+ import * as Icons2 from "lucide-react";
164
+ import clsx4 from "clsx";
88
165
 
89
- //#endregion
90
- //#region src/components/react/Accordion.tsx
91
- const Accordion = ({ title, children, defaultOpen = false, icon }) => {
92
- const isInGroup = useContext(AccordionGroupContext)?.inGroup === true;
93
- const [isOpen, setIsOpen] = useState(defaultOpen);
94
- const Icon = icon ? Icons[icon] : null;
95
- return /* @__PURE__ */ jsxs("div", {
96
- className: clsx(!isInGroup && "border rounded-lg shadow-sm", isInGroup && "border-b last:border-b-0 border-border"),
97
- children: [/* @__PURE__ */ jsxs("button", {
98
- type: "button",
99
- onClick: () => setIsOpen(!isOpen),
100
- className: "flex items-center gap-2 w-full px-4 py-3 transition-colors bg-muted/40 dark:bg-muted/20 hover:bg-muted/70 dark:hover:bg-muted/70 cursor-pointer text-start",
101
- children: [
102
- /* @__PURE__ */ jsx(ChevronRight, { className: clsx("w-4 h-4 text-muted-foreground transition-transform duration-200 flex-shrink-0", isOpen && "rotate-90") }),
103
- Icon && /* @__PURE__ */ jsx(Icon, { className: "text-foreground w-4 h-4 flex-shrink-0" }),
104
- /* @__PURE__ */ jsx("h3", {
105
- className: "font-medium text-base text-foreground !m-0",
106
- children: title
107
- })
108
- ]
109
- }), isOpen && /* @__PURE__ */ jsx("div", {
110
- className: "px-4 py-3 dark:bg-muted/10 bg-muted/15",
111
- children
112
- })]
113
- });
166
+ // src/components/react/AccordionContext.tsx
167
+ import { createContext as createContext2 } from "react";
168
+ var AccordionGroupContext = createContext2({
169
+ inGroup: false
170
+ });
171
+
172
+ // src/components/react/Accordion.tsx
173
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
174
+ var Accordion = ({
175
+ title,
176
+ children,
177
+ defaultOpen = false,
178
+ icon
179
+ }) => {
180
+ const groupContext = useContext2(AccordionGroupContext);
181
+ const isInGroup = (groupContext == null ? void 0 : groupContext.inGroup) === true;
182
+ const [isOpen, setIsOpen] = useState(defaultOpen);
183
+ const Icon = icon ? Icons2[icon] : null;
184
+ return /* @__PURE__ */ jsxs3(
185
+ "div",
186
+ {
187
+ className: clsx4(
188
+ !isInGroup && "border rounded-lg shadow-sm",
189
+ isInGroup && "border-b last:border-b-0 border-border"
190
+ ),
191
+ children: [
192
+ /* @__PURE__ */ jsxs3(
193
+ "button",
194
+ {
195
+ type: "button",
196
+ onClick: () => setIsOpen(!isOpen),
197
+ className: "flex items-center gap-2 w-full px-4 py-3 transition-colors bg-muted/40 dark:bg-muted/20 hover:bg-muted/70 dark:hover:bg-muted/70 cursor-pointer text-start",
198
+ children: [
199
+ /* @__PURE__ */ jsx5(
200
+ ChevronRight,
201
+ {
202
+ className: clsx4(
203
+ "w-4 h-4 text-muted-foreground transition-transform duration-200 flex-shrink-0",
204
+ isOpen && "rotate-90"
205
+ )
206
+ }
207
+ ),
208
+ Icon && /* @__PURE__ */ jsx5(Icon, { className: "text-foreground w-4 h-4 flex-shrink-0" }),
209
+ /* @__PURE__ */ jsx5("h3", { className: "font-medium text-base text-foreground !m-0", children: title })
210
+ ]
211
+ }
212
+ ),
213
+ isOpen && /* @__PURE__ */ jsx5("div", { className: "px-4 py-3 dark:bg-muted/10 bg-muted/15", children })
214
+ ]
215
+ }
216
+ );
114
217
  };
218
+ var Accordion_default = Accordion;
115
219
 
116
- //#endregion
117
- //#region src/components/react/AccordionGroup.tsx
118
- const AccordionGroup = ({ children, className }) => {
119
- return /* @__PURE__ */ jsx(AccordionGroupContext.Provider, {
120
- value: { inGroup: true },
121
- children: /* @__PURE__ */ jsx("div", {
122
- className: clsx("border rounded-lg overflow-hidden", className),
123
- children
124
- })
125
- });
220
+ // src/components/react/AccordionGroup.tsx
221
+ import clsx5 from "clsx";
222
+ import { jsx as jsx6 } from "react/jsx-runtime";
223
+ var AccordionGroup = ({ children, className }) => {
224
+ return /* @__PURE__ */ jsx6(AccordionGroupContext.Provider, { value: { inGroup: true }, children: /* @__PURE__ */ jsx6(
225
+ "div",
226
+ {
227
+ className: clsx5(
228
+ "border rounded-lg overflow-hidden",
229
+ className
230
+ ),
231
+ children
232
+ }
233
+ ) });
126
234
  };
235
+ var AccordionGroup_default = AccordionGroup;
127
236
 
128
- //#endregion
129
- //#region src/components/react/Stepper.tsx
237
+ // src/components/react/Stepper.tsx
238
+ import { Children } from "react";
239
+ import clsx6 from "clsx";
240
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
130
241
  function Stepper({ children }) {
131
- const length = Children.count(children);
132
- return /* @__PURE__ */ jsx("div", {
133
- className: "flex flex-col",
134
- children: Children.map(children, (child, index) => /* @__PURE__ */ jsxs("div", {
135
- className: clsx("border-l border-gray-200 dark:border-gray-700 pl-9 ml-3 relative", index < length - 1 && "pb-5"),
136
- children: [/* @__PURE__ */ jsx("div", {
137
- className: "bg-gray-100 dark:bg-gray-800 text-gray-500 dark:text-gray-400 w-8 h-8 text-xs font-medium rounded-md border border-gray-300/50 dark:border-gray-600/50 flex items-center justify-center absolute -left-4 font-mono",
138
- children: index + 1
139
- }), child]
140
- }))
141
- });
242
+ const length = Children.count(children);
243
+ return /* @__PURE__ */ jsx7("div", { className: "flex flex-col", children: Children.map(children, (child, index) => /* @__PURE__ */ jsxs4(
244
+ "div",
245
+ {
246
+ className: clsx6(
247
+ "border-l border-gray-200 dark:border-gray-700 pl-9 ml-3 relative",
248
+ index < length - 1 && "pb-5"
249
+ ),
250
+ children: [
251
+ /* @__PURE__ */ jsx7("div", { className: "bg-gray-100 dark:bg-gray-800 text-gray-500 dark:text-gray-400 w-8 h-8 text-xs font-medium rounded-md border border-gray-300/50 dark:border-gray-600/50 flex items-center justify-center absolute -left-4 font-mono", children: index + 1 }),
252
+ child
253
+ ]
254
+ }
255
+ )) });
142
256
  }
143
- function StepperItem({ children, title }) {
144
- return /* @__PURE__ */ jsxs("div", {
145
- className: "pt-0.5",
146
- children: [title && /* @__PURE__ */ jsx("h4", {
147
- className: "mt-0",
148
- children: title
149
- }), /* @__PURE__ */ jsx("div", { children })]
150
- });
257
+ function StepperItem({
258
+ children,
259
+ title
260
+ }) {
261
+ return /* @__PURE__ */ jsxs4("div", { className: "pt-0.5", children: [
262
+ title && /* @__PURE__ */ jsx7("h4", { className: "mt-0", children: title }),
263
+ /* @__PURE__ */ jsx7("div", { children })
264
+ ] });
151
265
  }
152
266
 
153
- //#endregion
154
- //#region src/components/react/FileTree.tsx
155
- const FileComponent = ({ name }) => {
156
- const [isHovered, setIsHovered] = useState(false);
157
- const fileExtension = name.split(".").pop()?.toUpperCase();
158
- return /* @__PURE__ */ jsxs("div", {
159
- className: clsx("flex items-center gap-2 py-1.5 pl-7 pr-3 text-sm rounded-md transition-colors duration-150 cursor-default select-none", isHovered ? "bg-blue-50 dark:bg-blue-950/20" : "hover:bg-gray-100/50 dark:hover:bg-gray-800/50"),
160
- onMouseEnter: () => setIsHovered(true),
161
- onMouseLeave: () => setIsHovered(false),
162
- tabIndex: -1,
163
- children: [
164
- /* @__PURE__ */ jsx(File$1, { className: clsx("flex-shrink-0 transition-colors", isHovered ? "text-blue-500" : "text-gray-400 dark:text-gray-500") }),
165
- /* @__PURE__ */ jsx("span", {
166
- className: "font-mono text-sm truncate",
167
- children: name
168
- }),
169
- isHovered && fileExtension && /* @__PURE__ */ jsx("span", {
170
- className: "ml-auto text-xs text-gray-400/80",
171
- children: fileExtension
172
- })
173
- ]
174
- });
267
+ // src/components/react/FileTree.tsx
268
+ import React4, { useState as useState2, Children as Children2, isValidElement, cloneElement } from "react";
269
+ import { ChevronRight as ChevronRightIcon, File as FileIcon, Folder as FolderIcon, FolderOpen as FolderOpenIcon } from "lucide-react";
270
+ import clsx7 from "clsx";
271
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
272
+ var FileComponent = ({ name }) => {
273
+ var _a;
274
+ const [isHovered, setIsHovered] = useState2(false);
275
+ const fileExtension = (_a = name.split(".").pop()) == null ? void 0 : _a.toUpperCase();
276
+ return /* @__PURE__ */ jsxs5(
277
+ "div",
278
+ {
279
+ className: clsx7(
280
+ "flex items-center gap-2 py-1.5 pl-7 pr-3 text-sm rounded-md transition-colors duration-150 cursor-default select-none",
281
+ isHovered ? "bg-blue-50 dark:bg-blue-950/20" : "hover:bg-gray-100/50 dark:hover:bg-gray-800/50"
282
+ ),
283
+ onMouseEnter: () => setIsHovered(true),
284
+ onMouseLeave: () => setIsHovered(false),
285
+ tabIndex: -1,
286
+ children: [
287
+ /* @__PURE__ */ jsx8(
288
+ FileIcon,
289
+ {
290
+ className: clsx7(
291
+ "flex-shrink-0 transition-colors",
292
+ isHovered ? "text-blue-500" : "text-gray-400 dark:text-gray-500"
293
+ )
294
+ }
295
+ ),
296
+ /* @__PURE__ */ jsx8("span", { className: "font-mono text-sm truncate", children: name }),
297
+ isHovered && fileExtension && /* @__PURE__ */ jsx8("span", { className: "ml-auto text-xs text-gray-400/80", children: fileExtension })
298
+ ]
299
+ }
300
+ );
175
301
  };
176
- const FolderComponent = ({ name, children }) => {
177
- const [isOpen, setIsOpen] = useState(true);
178
- const [isHovered, setIsHovered] = useState(false);
179
- const hasChildren = React.Children.count(children) > 0;
180
- return /* @__PURE__ */ jsxs("div", {
181
- className: "relative",
182
- children: [/* @__PURE__ */ jsxs("div", {
183
- className: clsx("flex items-center gap-2 py-1.5 pl-4 pr-3 rounded-md transition-colors duration-150 select-none", isHovered && "bg-gray-100/60 dark:bg-gray-800/60", isOpen ? "text-gray-900 dark:text-gray-100" : "text-gray-700 dark:text-gray-300", hasChildren ? "cursor-pointer" : "cursor-default"),
184
- onClick: () => hasChildren && setIsOpen(!isOpen),
185
- onMouseEnter: () => setIsHovered(true),
186
- onMouseLeave: () => setIsHovered(false),
187
- tabIndex: -1,
188
- onKeyDown: (e) => e.preventDefault(),
189
- children: [
190
- hasChildren ? /* @__PURE__ */ jsx(ChevronRight, { className: clsx("flex-shrink-0 transition-transform duration-200", isOpen && "rotate-90", isHovered ? "text-gray-600 dark:text-gray-400" : "text-gray-400 dark:text-gray-500") }) : /* @__PURE__ */ jsx("div", { className: "w-3.5" }),
191
- isOpen ? /* @__PURE__ */ jsx(FolderOpen, { className: clsx("flex-shrink-0 transition-colors", isHovered ? "text-blue-500" : "text-gray-400 dark:text-gray-500") }) : /* @__PURE__ */ jsx(Folder$1, { className: clsx("flex-shrink-0 transition-colors", isHovered ? "text-blue-400" : "text-gray-400/80 dark:text-gray-500/80") }),
192
- /* @__PURE__ */ jsx("span", {
193
- className: clsx("font-medium transition-colors duration-150", isHovered && "text-blue-500"),
194
- children: name
195
- })
196
- ]
197
- }), isOpen && hasChildren && /* @__PURE__ */ jsx("div", {
198
- className: "ml-5 border-l-2 border-gray-200/50 dark:border-gray-700/50 pl-2",
199
- children
200
- })]
201
- });
302
+ var FolderComponent = ({ name, children }) => {
303
+ const [isOpen, setIsOpen] = useState2(true);
304
+ const [isHovered, setIsHovered] = useState2(false);
305
+ const hasChildren = React4.Children.count(children) > 0;
306
+ return /* @__PURE__ */ jsxs5("div", { className: "relative", children: [
307
+ /* @__PURE__ */ jsxs5(
308
+ "div",
309
+ {
310
+ className: clsx7(
311
+ "flex items-center gap-2 py-1.5 pl-4 pr-3 rounded-md transition-colors duration-150 select-none",
312
+ isHovered && "bg-gray-100/60 dark:bg-gray-800/60",
313
+ isOpen ? "text-gray-900 dark:text-gray-100" : "text-gray-700 dark:text-gray-300",
314
+ hasChildren ? "cursor-pointer" : "cursor-default"
315
+ ),
316
+ onClick: () => hasChildren && setIsOpen(!isOpen),
317
+ onMouseEnter: () => setIsHovered(true),
318
+ onMouseLeave: () => setIsHovered(false),
319
+ tabIndex: -1,
320
+ onKeyDown: (e) => e.preventDefault(),
321
+ children: [
322
+ hasChildren ? /* @__PURE__ */ jsx8(
323
+ ChevronRightIcon,
324
+ {
325
+ className: clsx7(
326
+ "flex-shrink-0 transition-transform duration-200",
327
+ isOpen && "rotate-90",
328
+ isHovered ? "text-gray-600 dark:text-gray-400" : "text-gray-400 dark:text-gray-500"
329
+ )
330
+ }
331
+ ) : /* @__PURE__ */ jsx8("div", { className: "w-3.5" }),
332
+ isOpen ? /* @__PURE__ */ jsx8(
333
+ FolderOpenIcon,
334
+ {
335
+ className: clsx7(
336
+ "flex-shrink-0 transition-colors",
337
+ isHovered ? "text-blue-500" : "text-gray-400 dark:text-gray-500"
338
+ )
339
+ }
340
+ ) : /* @__PURE__ */ jsx8(
341
+ FolderIcon,
342
+ {
343
+ className: clsx7(
344
+ "flex-shrink-0 transition-colors",
345
+ isHovered ? "text-blue-400" : "text-gray-400/80 dark:text-gray-500/80"
346
+ )
347
+ }
348
+ ),
349
+ /* @__PURE__ */ jsx8(
350
+ "span",
351
+ {
352
+ className: clsx7(
353
+ "font-medium transition-colors duration-150",
354
+ isHovered && "text-blue-500"
355
+ ),
356
+ children: name
357
+ }
358
+ )
359
+ ]
360
+ }
361
+ ),
362
+ isOpen && hasChildren && /* @__PURE__ */ jsx8("div", { className: "ml-5 border-l-2 border-gray-200/50 dark:border-gray-700/50 pl-2", children })
363
+ ] });
202
364
  };
203
365
  function Files({ children }) {
204
- return /* @__PURE__ */ jsx("div", {
205
- className: "rounded-xl border border-gray-200/20 dark:border-gray-700/20 bg-white/20 dark:bg-gray-900/20 backdrop-blur-sm shadow-sm overflow-hidden transition-all duration-200 hover:shadow-md hover:border-gray-300/60 dark:hover:border-gray-600/60",
206
- onKeyDown: (e) => e.preventDefault(),
207
- children: /* @__PURE__ */ jsx("div", {
208
- className: "p-2",
209
- children: Children.map(children, (child, index) => {
210
- if (isValidElement(child)) return cloneElement(child, { key: index });
211
- return null;
212
- })
213
- })
214
- });
366
+ return /* @__PURE__ */ jsx8(
367
+ "div",
368
+ {
369
+ className: "rounded-xl border border-gray-200/20 dark:border-gray-700/20 bg-white/20 dark:bg-gray-900/20 backdrop-blur-sm shadow-sm overflow-hidden transition-all duration-200 hover:shadow-md hover:border-gray-300/60 dark:hover:border-gray-600/60",
370
+ onKeyDown: (e) => e.preventDefault(),
371
+ children: /* @__PURE__ */ jsx8("div", { className: "p-2", children: Children2.map(children, (child, index) => {
372
+ if (isValidElement(child)) {
373
+ return cloneElement(child, { key: index });
374
+ }
375
+ return null;
376
+ }) })
377
+ }
378
+ );
215
379
  }
216
380
  function Folder({ name, children }) {
217
- return /* @__PURE__ */ jsx(FolderComponent, {
218
- name,
219
- children
220
- });
381
+ return /* @__PURE__ */ jsx8(FolderComponent, { name, children });
221
382
  }
222
383
  function File({ name }) {
223
- return /* @__PURE__ */ jsx(FileComponent, { name });
384
+ return /* @__PURE__ */ jsx8(FileComponent, { name });
224
385
  }
225
386
 
226
- //#endregion
227
- //#region src/components/react/Kbd.tsx
228
- const macKeyMap = {
229
- command: "",
230
- cmd: "",
231
- option: "",
232
- alt: "",
233
- shift: "",
234
- ctrl: "",
235
- control: "",
236
- tab: "",
237
- caps: "",
238
- enter: "",
239
- return: "",
240
- delete: "",
241
- escape: "",
242
- esc: "",
243
- up: "",
244
- down: "",
245
- left: "",
246
- right: "",
247
- space: ""
387
+ // src/components/react/Kbd.tsx
388
+ import { jsx as jsx9 } from "react/jsx-runtime";
389
+ var macKeyMap = {
390
+ command: "\u2318",
391
+ cmd: "\u2318",
392
+ option: "\u2325",
393
+ alt: "\u2325",
394
+ shift: "\u21E7",
395
+ ctrl: "\u2303",
396
+ control: "\u2303",
397
+ tab: "\u21E5",
398
+ caps: "\u21EA",
399
+ enter: "\u23CE",
400
+ return: "\u23CE",
401
+ delete: "\u232B",
402
+ escape: "\u238B",
403
+ esc: "\u238B",
404
+ up: "\u2191",
405
+ down: "\u2193",
406
+ left: "\u2190",
407
+ right: "\u2192",
408
+ space: "\u2423"
248
409
  };
249
- const windowsKeyMap = {
250
- command: "Win",
251
- cmd: "Win",
252
- option: "Alt",
253
- alt: "Alt",
254
- ctrl: "Ctrl",
255
- control: "Ctrl",
256
- delete: "Del",
257
- escape: "Esc",
258
- esc: "Esc",
259
- enter: "Enter",
260
- return: "Enter",
261
- tab: "Tab",
262
- caps: "Caps",
263
- shift: "Shift",
264
- space: "Space",
265
- up: "",
266
- down: "",
267
- left: "",
268
- right: ""
410
+ var windowsKeyMap = {
411
+ command: "Win",
412
+ cmd: "Win",
413
+ option: "Alt",
414
+ alt: "Alt",
415
+ ctrl: "Ctrl",
416
+ control: "Ctrl",
417
+ delete: "Del",
418
+ escape: "Esc",
419
+ esc: "Esc",
420
+ enter: "Enter",
421
+ return: "Enter",
422
+ tab: "Tab",
423
+ caps: "Caps",
424
+ shift: "Shift",
425
+ space: "Space",
426
+ up: "\u2191",
427
+ down: "\u2193",
428
+ left: "\u2190",
429
+ right: "\u2192"
269
430
  };
270
- function Kbd({ show: keyProp, type = "window", children, ...props }) {
271
- const getKeyDisplay = () => {
272
- if (!keyProp || typeof keyProp !== "string") return null;
273
- const lowerKey = keyProp.toLowerCase();
274
- if (type === "mac") return macKeyMap[lowerKey] || keyProp;
275
- return windowsKeyMap[lowerKey] || keyProp.charAt(0).toUpperCase() + keyProp.slice(1);
276
- };
277
- const renderContent = () => {
278
- if (children !== void 0 && children !== null && children !== "") return children;
279
- return getKeyDisplay() || keyProp || "";
280
- };
281
- return /* @__PURE__ */ jsx("kbd", {
282
- className: "inline-flex items-center justify-center px-2 py-1 mx-0.5 text-xs font-mono font-medium bg-gray-100 dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-md",
283
- ...props,
284
- children: renderContent()
285
- });
431
+ function Kbd(_a) {
432
+ var _b = _a, { show: keyProp, type = "window", children } = _b, props = __objRest(_b, ["show", "type", "children"]);
433
+ const getKeyDisplay = () => {
434
+ if (!keyProp || typeof keyProp !== "string") return null;
435
+ const lowerKey = keyProp.toLowerCase();
436
+ if (type === "mac") return macKeyMap[lowerKey] || keyProp;
437
+ return windowsKeyMap[lowerKey] || keyProp.charAt(0).toUpperCase() + keyProp.slice(1);
438
+ };
439
+ const renderContent = () => {
440
+ if (children !== void 0 && children !== null && children !== "") return children;
441
+ return getKeyDisplay() || keyProp || "";
442
+ };
443
+ return /* @__PURE__ */ jsx9(
444
+ "kbd",
445
+ __spreadProps(__spreadValues({
446
+ className: "inline-flex items-center justify-center px-2 py-1 mx-0.5 text-xs font-mono font-medium bg-gray-100 dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-md"
447
+ }, props), {
448
+ children: renderContent()
449
+ })
450
+ );
286
451
  }
287
452
 
288
- //#endregion
289
- //#region src/components/react/Tooltip.tsx
453
+ // src/components/react/Tooltip.tsx
454
+ import { useState as useState3 } from "react";
455
+ import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
290
456
  function Tooltip({ text, tip }) {
291
- const [visible, setVisible] = useState(false);
292
- return /* @__PURE__ */ jsxs("span", {
293
- className: "relative inline-flex items-center cursor-help text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300 transition-colors",
294
- onMouseEnter: () => setVisible(true),
295
- onMouseLeave: () => setVisible(false),
296
- children: [/* @__PURE__ */ jsx("span", {
297
- className: "border-b border-dashed border-blue-500/60 pb-0.5",
298
- children: text
299
- }), visible && /* @__PURE__ */ jsxs("span", {
300
- className: "absolute bottom-full left-1/2 -translate-x-1/2 mb-3 w-64 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 text-sm p-3 rounded-md shadow-lg border border-gray-200/50 dark:border-gray-700/50 break-words text-left z-50",
301
- children: [tip, /* @__PURE__ */ jsx("span", { className: "absolute -bottom-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-white dark:bg-gray-800 rotate-45 border-b border-r border-gray-200/50 dark:border-gray-700/50 -z-10" })]
302
- })]
303
- });
457
+ const [visible, setVisible] = useState3(false);
458
+ return /* @__PURE__ */ jsxs6(
459
+ "span",
460
+ {
461
+ className: "relative inline-flex items-center cursor-help text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300 transition-colors",
462
+ onMouseEnter: () => setVisible(true),
463
+ onMouseLeave: () => setVisible(false),
464
+ children: [
465
+ /* @__PURE__ */ jsx10("span", { className: "border-b border-dashed border-blue-500/60 pb-0.5", children: text }),
466
+ visible && /* @__PURE__ */ jsxs6("span", { className: "absolute bottom-full left-1/2 -translate-x-1/2 mb-3 w-64 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 text-sm p-3 rounded-md shadow-lg border border-gray-200/50 dark:border-gray-700/50 break-words text-left z-50", children: [
467
+ tip,
468
+ /* @__PURE__ */ jsx10("span", { className: "absolute -bottom-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-white dark:bg-gray-800 rotate-45 border-b border-r border-gray-200/50 dark:border-gray-700/50 -z-10" })
469
+ ] })
470
+ ]
471
+ }
472
+ );
304
473
  }
305
474
 
306
- //#endregion
307
- //#region src/components/react/Youtube.tsx
475
+ // src/components/react/Youtube.tsx
476
+ import { jsx as jsx11 } from "react/jsx-runtime";
308
477
  function Youtube({ videoId, className }) {
309
- return /* @__PURE__ */ jsx("div", {
310
- className: `aspect-video w-full ${className || ""}`,
311
- children: /* @__PURE__ */ jsx("iframe", {
312
- src: `https://www.youtube.com/embed/${videoId}?rel=0&modestbranding=1&showinfo=0&autohide=1&controls=1`,
313
- title: "YouTube video player",
314
- frameBorder: "0",
315
- allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
316
- allowFullScreen: true,
317
- className: "w-full h-full rounded-lg"
318
- })
319
- });
478
+ return /* @__PURE__ */ jsx11("div", { className: `aspect-video w-full ${className || ""}`, children: /* @__PURE__ */ jsx11(
479
+ "iframe",
480
+ {
481
+ src: `https://www.youtube.com/embed/${videoId}?rel=0&modestbranding=1&showinfo=0&autohide=1&controls=1`,
482
+ title: "YouTube video player",
483
+ frameBorder: "0",
484
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
485
+ allowFullScreen: true,
486
+ className: "w-full h-full rounded-lg"
487
+ }
488
+ ) });
320
489
  }
321
490
 
322
- //#endregion
323
- //#region src/components/react/Button.tsx
324
- const Button = ({ icon, text, href, target, size = "md", variation = "primary" }) => {
325
- const { Link } = useDocuBook();
326
- const baseStyles = "inline-flex items-center justify-center rounded font-medium focus:outline-none transition no-underline";
327
- const sizeStyles = {
328
- sm: "px-3 py-1 my-6 text-sm",
329
- md: "px-4 py-2 my-6 text-base",
330
- lg: "px-5 py-3 my-6 text-lg"
331
- };
332
- const variationStyles = {
333
- primary: "bg-primary text-white hover:bg-primary/90",
334
- accent: "bg-accent text-white hover:bg-accent/90",
335
- outline: "border border-accent text-accent hover:bg-accent/10"
336
- };
337
- const Icon = icon ? Icons[icon] : null;
338
- return /* @__PURE__ */ jsxs(Link, {
339
- href,
340
- target,
341
- rel: target === "_blank" ? "noopener noreferrer" : void 0,
342
- className: clsx(baseStyles, sizeStyles[size], variationStyles[variation]),
343
- children: [text && /* @__PURE__ */ jsx("span", { children: text }), Icon && /* @__PURE__ */ jsx(Icon, { className: "mr-2 h-5 w-5" })]
344
- });
491
+ // src/components/react/Button.tsx
492
+ import * as Icons3 from "lucide-react";
493
+ import clsx8 from "clsx";
494
+ import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
495
+ var Button = ({
496
+ icon,
497
+ text,
498
+ href,
499
+ target,
500
+ size = "md",
501
+ variation = "primary"
502
+ }) => {
503
+ const { Link } = useDocuBook();
504
+ const baseStyles = "inline-flex items-center justify-center rounded font-medium focus:outline-none transition no-underline";
505
+ const sizeStyles = {
506
+ sm: "px-3 py-1 my-6 text-sm",
507
+ md: "px-4 py-2 my-6 text-base",
508
+ lg: "px-5 py-3 my-6 text-lg"
509
+ };
510
+ const variationStyles = {
511
+ primary: "bg-primary text-white hover:bg-primary/90",
512
+ accent: "bg-accent text-white hover:bg-accent/90",
513
+ outline: "border border-accent text-accent hover:bg-accent/10"
514
+ };
515
+ const Icon = icon ? Icons3[icon] : null;
516
+ return /* @__PURE__ */ jsxs7(
517
+ Link,
518
+ {
519
+ href,
520
+ target,
521
+ rel: target === "_blank" ? "noopener noreferrer" : void 0,
522
+ className: clsx8(baseStyles, sizeStyles[size], variationStyles[variation]),
523
+ children: [
524
+ text && /* @__PURE__ */ jsx12("span", { children: text }),
525
+ Icon && /* @__PURE__ */ jsx12(Icon, { className: "mr-2 h-5 w-5" })
526
+ ]
527
+ }
528
+ );
345
529
  };
530
+ var Button_default = Button;
346
531
 
347
- //#endregion
348
- //#region src/components/react/Link.tsx
349
- /**
350
- * Framework-agnostic Link component.
351
- * Named `DocuLink` to avoid collision with native HTML `<link>` in MDX.
352
- */
353
- function DocuLink({ href, ...props }) {
354
- const { Link } = useDocuBook();
355
- if (!href) return null;
356
- return /* @__PURE__ */ jsx(Link, {
357
- href,
358
- target: "_blank",
359
- rel: "noopener noreferrer",
360
- ...props
361
- });
532
+ // src/components/react/Link.tsx
533
+ import { jsx as jsx13 } from "react/jsx-runtime";
534
+ function DocuLink(_a) {
535
+ var _b = _a, { href } = _b, props = __objRest(_b, ["href"]);
536
+ const { Link } = useDocuBook();
537
+ if (!href) return null;
538
+ return /* @__PURE__ */ jsx13(
539
+ Link,
540
+ __spreadValues({
541
+ href,
542
+ target: "_blank",
543
+ rel: "noopener noreferrer"
544
+ }, props)
545
+ );
362
546
  }
363
547
 
364
- //#endregion
365
- //#region src/components/react/Image.tsx
366
- /**
367
- * Framework-agnostic Image component with lightbox.
368
- * Uses useDocuBook().Image for the rendering primitive.
369
- */
370
- function DocuImage({ src, alt = "alt", width = 800, height = 350, className, ...props }) {
371
- const { Image } = useDocuBook();
372
- const [isOpen, setIsOpen] = useState(false);
373
- useEffect(() => {
374
- if (isOpen) {
375
- document.body.style.overflow = "hidden";
376
- const handleEsc = (e) => {
377
- if (e.key === "Escape") setIsOpen(false);
378
- };
379
- window.addEventListener("keydown", handleEsc);
380
- return () => {
381
- document.body.style.overflow = "auto";
382
- window.removeEventListener("keydown", handleEsc);
383
- };
384
- }
385
- }, [isOpen]);
386
- if (!src) return null;
387
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("button", {
388
- type: "button",
389
- className: "relative group cursor-zoom-in my-6 w-full flex justify-center rounded-lg",
390
- onClick: () => setIsOpen(true),
391
- "aria-label": "Zoom image",
392
- children: [/* @__PURE__ */ jsx("span", {
393
- className: "absolute inset-0 bg-black/0 group-hover:bg-black/5 transition-colors z-10 flex items-center justify-center opacity-0 group-hover:opacity-100 rounded-lg",
394
- children: /* @__PURE__ */ jsx(Search, { className: "w-8 h-8 text-white drop-shadow-md" })
395
- }), /* @__PURE__ */ jsx(Image, {
396
- src,
397
- alt,
398
- width,
399
- height,
400
- className: `w-full h-auto rounded-lg transition-transform duration-300 group-hover:scale-[1.01] ${className || ""}`,
401
- ...props
402
- })]
403
- }), isOpen && /* @__PURE__ */ jsxs("div", {
404
- className: "fixed inset-0 z-[99999] flex items-center justify-center bg-black/90 backdrop-blur-md p-4 md:p-10 cursor-zoom-out",
405
- onClick: () => setIsOpen(false),
406
- children: [
407
- /* @__PURE__ */ jsx("button", {
408
- className: "absolute top-4 right-4 z-50 p-2 text-white/70 hover:text-white bg-black/20 hover:bg-white/10 rounded-full transition-colors",
409
- onClick: (e) => {
410
- e.stopPropagation();
411
- setIsOpen(false);
412
- },
413
- children: /* @__PURE__ */ jsx(X, { className: "w-6 h-6" })
414
- }),
415
- /* @__PURE__ */ jsx("div", {
416
- className: "relative max-w-7xl w-full h-full flex items-center justify-center",
417
- children: /* @__PURE__ */ jsx(Image, {
418
- src,
419
- alt,
420
- width: 1920,
421
- height: 1080,
422
- className: "object-contain max-h-[90vh] w-auto h-auto rounded-md shadow-2xl"
423
- })
424
- }),
425
- alt && alt !== "alt" && /* @__PURE__ */ jsx("div", {
426
- className: "absolute bottom-6 left-1/2 -translate-x-1/2 bg-black/60 text-white px-4 py-2 rounded-full text-sm font-medium backdrop-blur-md border border-white/10",
427
- children: alt
428
- })
429
- ]
430
- })] });
548
+ // src/components/react/Image.tsx
549
+ import { useState as useState4, useEffect } from "react";
550
+ import { Search, X } from "lucide-react";
551
+ import { Fragment, jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
552
+ function DocuImage(_a) {
553
+ var _b = _a, {
554
+ src,
555
+ alt = "alt",
556
+ width = 800,
557
+ height = 350,
558
+ className
559
+ } = _b, props = __objRest(_b, [
560
+ "src",
561
+ "alt",
562
+ "width",
563
+ "height",
564
+ "className"
565
+ ]);
566
+ const { Image } = useDocuBook();
567
+ const [isOpen, setIsOpen] = useState4(false);
568
+ useEffect(() => {
569
+ if (isOpen) {
570
+ document.body.style.overflow = "hidden";
571
+ const handleEsc = (e) => {
572
+ if (e.key === "Escape") setIsOpen(false);
573
+ };
574
+ window.addEventListener("keydown", handleEsc);
575
+ return () => {
576
+ document.body.style.overflow = "auto";
577
+ window.removeEventListener("keydown", handleEsc);
578
+ };
579
+ }
580
+ }, [isOpen]);
581
+ if (!src) return null;
582
+ return /* @__PURE__ */ jsxs8(Fragment, { children: [
583
+ /* @__PURE__ */ jsxs8(
584
+ "button",
585
+ {
586
+ type: "button",
587
+ className: "relative group cursor-zoom-in my-6 w-full flex justify-center rounded-lg",
588
+ onClick: () => setIsOpen(true),
589
+ "aria-label": "Zoom image",
590
+ children: [
591
+ /* @__PURE__ */ jsx14("span", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/5 transition-colors z-10 flex items-center justify-center opacity-0 group-hover:opacity-100 rounded-lg", children: /* @__PURE__ */ jsx14(Search, { className: "w-8 h-8 text-white drop-shadow-md" }) }),
592
+ /* @__PURE__ */ jsx14(
593
+ Image,
594
+ __spreadValues({
595
+ src,
596
+ alt,
597
+ width,
598
+ height,
599
+ className: `w-full h-auto rounded-lg transition-transform duration-300 group-hover:scale-[1.01] ${className || ""}`
600
+ }, props)
601
+ )
602
+ ]
603
+ }
604
+ ),
605
+ isOpen && /* @__PURE__ */ jsxs8(
606
+ "div",
607
+ {
608
+ className: "fixed inset-0 z-[99999] flex items-center justify-center bg-black/90 backdrop-blur-md p-4 md:p-10 cursor-zoom-out",
609
+ onClick: () => setIsOpen(false),
610
+ children: [
611
+ /* @__PURE__ */ jsx14(
612
+ "button",
613
+ {
614
+ className: "absolute top-4 right-4 z-50 p-2 text-white/70 hover:text-white bg-black/20 hover:bg-white/10 rounded-full transition-colors",
615
+ onClick: (e) => {
616
+ e.stopPropagation();
617
+ setIsOpen(false);
618
+ },
619
+ children: /* @__PURE__ */ jsx14(X, { className: "w-6 h-6" })
620
+ }
621
+ ),
622
+ /* @__PURE__ */ jsx14("div", { className: "relative max-w-7xl w-full h-full flex items-center justify-center", children: /* @__PURE__ */ jsx14(
623
+ Image,
624
+ {
625
+ src,
626
+ alt,
627
+ width: 1920,
628
+ height: 1080,
629
+ className: "object-contain max-h-[90vh] w-auto h-auto rounded-md shadow-2xl"
630
+ }
631
+ ) }),
632
+ alt && alt !== "alt" && /* @__PURE__ */ jsx14("div", { className: "absolute bottom-6 left-1/2 -translate-x-1/2 bg-black/60 text-white px-4 py-2 rounded-full text-sm font-medium backdrop-blur-md border border-white/10", children: alt })
633
+ ]
634
+ }
635
+ )
636
+ ] });
431
637
  }
432
638
 
433
- //#endregion
434
- //#region src/components/react/Release.tsx
639
+ // src/components/react/Release.tsx
640
+ import React7 from "react";
641
+ import { Plus, Wrench, Zap, AlertTriangle as AlertTriangle2, XCircle } from "lucide-react";
642
+ import clsx9 from "clsx";
643
+ import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
435
644
  function Release({ version, title, date, children }) {
436
- return /* @__PURE__ */ jsxs("div", {
437
- className: "mb-16 group",
438
- children: [
439
- /* @__PURE__ */ jsxs("div", {
440
- className: "flex items-center gap-3 mt-6 mb-2",
441
- children: [/* @__PURE__ */ jsxs("div", {
442
- id: version,
443
- className: "inline-flex items-center rounded-full border border-blue-500/20 bg-blue-500/10 px-3 py-1 text-sm font-semibold text-blue-600 dark:text-blue-400 transition-colors hover:bg-blue-500/15 scroll-m-20 backdrop-blur-sm",
444
- children: ["v", version]
445
- }), date && /* @__PURE__ */ jsxs("div", {
446
- className: "flex items-center gap-3 text-sm font-medium text-gray-500 dark:text-gray-400",
447
- children: [/* @__PURE__ */ jsx("span", { className: "h-1 w-1 rounded-full bg-gray-400/30" }), /* @__PURE__ */ jsx("time", {
448
- dateTime: date,
449
- children: new Date(date).toLocaleDateString("en-US", {
450
- year: "numeric",
451
- month: "long",
452
- day: "numeric"
453
- })
454
- })]
455
- })]
456
- }),
457
- /* @__PURE__ */ jsx("h3", {
458
- className: "text-2xl font-bold text-gray-900/90 dark:text-gray-100/90 mb-6 mt-0",
459
- children: title
460
- }),
461
- /* @__PURE__ */ jsx("div", {
462
- className: "space-y-8",
463
- children
464
- })
465
- ]
466
- });
645
+ return /* @__PURE__ */ jsxs9("div", { className: "mb-16 group", children: [
646
+ /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-3 mt-6 mb-2", children: [
647
+ /* @__PURE__ */ jsxs9(
648
+ "div",
649
+ {
650
+ id: version,
651
+ className: "inline-flex items-center rounded-full border border-blue-500/20 bg-blue-500/10 px-3 py-1 text-sm font-semibold text-blue-600 dark:text-blue-400 transition-colors hover:bg-blue-500/15 scroll-m-20 backdrop-blur-sm",
652
+ children: [
653
+ "v",
654
+ version
655
+ ]
656
+ }
657
+ ),
658
+ date && /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-3 text-sm font-medium text-gray-500 dark:text-gray-400", children: [
659
+ /* @__PURE__ */ jsx15("span", { className: "h-1 w-1 rounded-full bg-gray-400/30" }),
660
+ /* @__PURE__ */ jsx15("time", { dateTime: date, children: new Date(date).toLocaleDateString("en-US", {
661
+ year: "numeric",
662
+ month: "long",
663
+ day: "numeric"
664
+ }) })
665
+ ] })
666
+ ] }),
667
+ /* @__PURE__ */ jsx15("h3", { className: "text-2xl font-bold text-gray-900/90 dark:text-gray-100/90 mb-6 mt-0", children: title }),
668
+ /* @__PURE__ */ jsx15("div", { className: "space-y-8", children })
669
+ ] });
467
670
  }
468
- const typeConfig = {
469
- added: {
470
- label: "Added",
471
- className: "bg-green-100 dark:bg-green-900/50 text-green-700 dark:text-green-300",
472
- icon: Plus
473
- },
474
- fixed: {
475
- label: "Fixed",
476
- className: "bg-yellow-100 dark:bg-yellow-900/50 text-yellow-700 dark:text-yellow-300",
477
- icon: Wrench
478
- },
479
- improved: {
480
- label: "Improved",
481
- className: "bg-cyan-100 dark:bg-cyan-900/50 text-cyan-700 dark:text-cyan-300",
482
- icon: Zap
483
- },
484
- deprecated: {
485
- label: "Deprecated",
486
- className: "bg-orange-100 dark:bg-orange-900/50 text-orange-700 dark:text-orange-300",
487
- icon: AlertTriangle
488
- },
489
- removed: {
490
- label: "Removed",
491
- className: "bg-pink-100 dark:bg-pink-900/50 text-pink-700 dark:text-pink-300",
492
- icon: XCircle
493
- }
671
+ var typeConfig = {
672
+ added: {
673
+ label: "Added",
674
+ className: "bg-green-100 dark:bg-green-900/50 text-green-700 dark:text-green-300",
675
+ icon: Plus
676
+ },
677
+ fixed: {
678
+ label: "Fixed",
679
+ className: "bg-yellow-100 dark:bg-yellow-900/50 text-yellow-700 dark:text-yellow-300",
680
+ icon: Wrench
681
+ },
682
+ improved: {
683
+ label: "Improved",
684
+ className: "bg-cyan-100 dark:bg-cyan-900/50 text-cyan-700 dark:text-cyan-300",
685
+ icon: Zap
686
+ },
687
+ deprecated: {
688
+ label: "Deprecated",
689
+ className: "bg-orange-100 dark:bg-orange-900/50 text-orange-700 dark:text-orange-300",
690
+ icon: AlertTriangle2
691
+ },
692
+ removed: {
693
+ label: "Removed",
694
+ className: "bg-pink-100 dark:bg-pink-900/50 text-pink-700 dark:text-pink-300",
695
+ icon: XCircle
696
+ }
494
697
  };
495
698
  function Changes({ type, children }) {
496
- const config = typeConfig[type] || typeConfig.added;
497
- const Icon = config.icon;
498
- return /* @__PURE__ */ jsxs("div", {
499
- className: "space-y-3 mb-8",
500
- children: [/* @__PURE__ */ jsx("div", {
501
- className: "flex items-center gap-2",
502
- children: /* @__PURE__ */ jsxs("div", {
503
- className: clsx("px-3 py-1 rounded-full text-sm font-medium flex items-center gap-1.5", config.className),
504
- children: [/* @__PURE__ */ jsx(Icon, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ jsx("span", { children: config.label })]
505
- })
506
- }), /* @__PURE__ */ jsx("ul", {
507
- className: "list-none pl-0 space-y-2 text-gray-700 dark:text-gray-300",
508
- children: React.Children.map(children, (child, index) => {
509
- return /* @__PURE__ */ jsx("li", {
510
- className: "leading-relaxed",
511
- children: typeof child === "string" ? child.trim().replace(/^[-*]\s+/, "") : child
512
- }, index);
513
- })
514
- })]
515
- });
699
+ const config = typeConfig[type] || typeConfig.added;
700
+ const Icon = config.icon;
701
+ return /* @__PURE__ */ jsxs9("div", { className: "space-y-3 mb-8", children: [
702
+ /* @__PURE__ */ jsx15("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxs9("div", { className: clsx9("px-3 py-1 rounded-full text-sm font-medium flex items-center gap-1.5", config.className), children: [
703
+ /* @__PURE__ */ jsx15(Icon, { className: "w-3.5 h-3.5" }),
704
+ /* @__PURE__ */ jsx15("span", { children: config.label })
705
+ ] }) }),
706
+ /* @__PURE__ */ jsx15("ul", { className: "list-none pl-0 space-y-2 text-gray-700 dark:text-gray-300", children: React7.Children.map(children, (child, index) => {
707
+ const processedChild = typeof child === "string" ? child.trim().replace(/^[-*]\s+/, "") : child;
708
+ return /* @__PURE__ */ jsx15("li", { className: "leading-relaxed", children: processedChild }, index);
709
+ }) })
710
+ ] });
516
711
  }
517
712
 
518
- //#endregion
519
- //#region src/components/react/Copy.tsx
520
- const Copy = ({ content }) => {
521
- const [isCopied, setIsCopied] = useState(false);
522
- async function handleCopy() {
523
- await navigator.clipboard.writeText(content);
524
- setIsCopied(true);
525
- setTimeout(() => {
526
- setIsCopied(false);
527
- }, 2e3);
528
- }
529
- return /* @__PURE__ */ jsx("button", {
530
- type: "button",
531
- className: "inline-flex items-center justify-center px-2 py-1 text-xs font-medium border rounded transition-colors bg-muted hover:bg-muted/70 border-border cursor-copy",
532
- onClick: handleCopy,
533
- children: isCopied ? /* @__PURE__ */ jsx(Check, { className: "w-3 h-3" }) : /* @__PURE__ */ jsx(Copy$1, { className: "w-3 h-3" })
534
- });
713
+ // src/components/react/Copy.tsx
714
+ import { useState as useState5 } from "react";
715
+ import { Check, Copy as CopyIcon } from "lucide-react";
716
+ import { jsx as jsx16 } from "react/jsx-runtime";
717
+ var Copy = ({ content }) => {
718
+ const [isCopied, setIsCopied] = useState5(false);
719
+ async function handleCopy() {
720
+ await navigator.clipboard.writeText(content);
721
+ setIsCopied(true);
722
+ setTimeout(() => {
723
+ setIsCopied(false);
724
+ }, 2e3);
725
+ }
726
+ return /* @__PURE__ */ jsx16(
727
+ "button",
728
+ {
729
+ type: "button",
730
+ className: "inline-flex items-center justify-center px-2 py-1 text-xs font-medium border rounded transition-colors bg-muted hover:bg-muted/70 border-border cursor-copy",
731
+ onClick: handleCopy,
732
+ children: isCopied ? /* @__PURE__ */ jsx16(Check, { className: "w-3 h-3" }) : /* @__PURE__ */ jsx16(CopyIcon, { className: "w-3 h-3" })
733
+ }
734
+ );
535
735
  };
736
+ var Copy_default = Copy;
536
737
 
537
- //#endregion
538
- //#region src/components/react/Pre.tsx
539
- function Pre({ children, raw, ...rest }) {
540
- const { "data-title": title, className, ...restProps } = rest;
541
- return /* @__PURE__ */ jsxs("div", {
542
- className: "relative rounded-lg border border-gray-200 dark:border-gray-700 my-4 overflow-hidden",
543
- children: [
544
- /* @__PURE__ */ jsx("div", {
545
- className: "absolute top-2 right-2 z-10",
546
- children: raw && /* @__PURE__ */ jsx(Copy, { content: raw })
547
- }),
548
- !!title && /* @__PURE__ */ jsx("div", {
549
- className: "flex items-center gap-2 px-4 py-2 text-sm font-medium border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50",
550
- children: /* @__PURE__ */ jsx("span", { children: title })
551
- }),
552
- /* @__PURE__ */ jsx("div", {
553
- className: "overflow-x-auto",
554
- children: /* @__PURE__ */ jsx("pre", {
555
- className,
556
- ...restProps,
557
- children
558
- })
559
- })
560
- ]
561
- });
738
+ // src/components/react/Pre.tsx
739
+ import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
740
+ function Pre(_a) {
741
+ var _b = _a, { children, raw } = _b, rest = __objRest(_b, ["children", "raw"]);
742
+ const _a2 = rest, { "data-title": title, className } = _a2, restProps = __objRest(_a2, ["data-title", "className"]);
743
+ const hasTitle = !!title;
744
+ return /* @__PURE__ */ jsxs10("div", { className: "relative rounded-lg border border-gray-200 dark:border-gray-700 my-4 overflow-hidden", children: [
745
+ /* @__PURE__ */ jsx17("div", { className: "absolute top-2 right-2 z-10", children: raw && /* @__PURE__ */ jsx17(Copy_default, { content: raw }) }),
746
+ hasTitle && /* @__PURE__ */ jsx17("div", { className: "flex items-center gap-2 px-4 py-2 text-sm font-medium border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50", children: /* @__PURE__ */ jsx17("span", { children: title }) }),
747
+ /* @__PURE__ */ jsx17("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsx17("pre", __spreadProps(__spreadValues({ className }, restProps), { children })) })
748
+ ] });
562
749
  }
563
-
564
- //#endregion
565
- export { Accordion, AccordionGroup, Button, Card, CardGroup, Changes, Copy, DocuBookProvider, DocuImage, DocuLink, File, Files, Folder, Kbd, Note, Pre, Release, Stepper, StepperItem, Tooltip, Youtube, useDocuBook };
750
+ export {
751
+ Accordion_default as Accordion,
752
+ AccordionGroup_default as AccordionGroup,
753
+ Button_default as Button,
754
+ Card,
755
+ CardGroup,
756
+ Changes,
757
+ Copy_default as Copy,
758
+ DocuBookProvider,
759
+ DocuImage,
760
+ DocuLink,
761
+ File,
762
+ Files,
763
+ Folder,
764
+ Kbd,
765
+ Note,
766
+ Pre,
767
+ Release,
768
+ Stepper,
769
+ StepperItem,
770
+ Tooltip,
771
+ Youtube,
772
+ useDocuBook
773
+ };
566
774
  //# sourceMappingURL=index.js.map