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