@docubook/mdx 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -95
- package/dist/adapters/next/index.cjs +6 -8
- package/dist/adapters/next/index.js +6 -8
- package/dist/adapters/react-router/index.cjs +6 -8
- package/dist/adapters/react-router/index.js +6 -8
- package/dist/core/index.cjs +101 -209
- package/dist/core/index.js +111 -219
- package/dist/core/server.cjs +35 -65
- package/dist/core/server.js +35 -65
- package/dist/index.cjs +35 -65
- package/dist/index.js +35 -65
- package/package.json +1 -1
package/dist/core/server.cjs
CHANGED
|
@@ -116,7 +116,6 @@ function Card({
|
|
|
116
116
|
"div",
|
|
117
117
|
{
|
|
118
118
|
className: (0, import_clsx.default)(
|
|
119
|
-
"dbk-card",
|
|
120
119
|
"border rounded-lg shadow-sm p-4 transition-all duration-200",
|
|
121
120
|
"bg-card text-card-foreground border-border",
|
|
122
121
|
"hover:bg-accent/5 hover:border-accent/30",
|
|
@@ -124,21 +123,20 @@ function Card({
|
|
|
124
123
|
horizontal ? "flex-row items-start gap-1" : "flex-col space-y-1",
|
|
125
124
|
className
|
|
126
125
|
),
|
|
127
|
-
"data-docubook": "card",
|
|
128
126
|
children: [
|
|
129
|
-
Icon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { className: (0, import_clsx.default)("
|
|
130
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "
|
|
131
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "
|
|
132
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "
|
|
127
|
+
Icon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { className: (0, import_clsx.default)("w-5 h-5 text-primary shrink-0", horizontal && "mt-0.5") }),
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "text-base font-semibold text-foreground leading-6", children: title }),
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "text-sm text-muted-foreground -mt-3", children })
|
|
133
131
|
] })
|
|
134
132
|
]
|
|
135
133
|
}
|
|
136
134
|
);
|
|
137
135
|
if (!href) return content;
|
|
138
136
|
if (LinkComponent) {
|
|
139
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LinkComponent, { href, className: "
|
|
137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LinkComponent, { href, className: "no-underline block", children: content });
|
|
140
138
|
}
|
|
141
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("a", { className: "
|
|
139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("a", { className: "no-underline block", href, children: content });
|
|
142
140
|
}
|
|
143
141
|
|
|
144
142
|
// src/core/components/CardGroup.tsx
|
|
@@ -223,8 +221,7 @@ function Kbd({
|
|
|
223
221
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
224
222
|
"kbd",
|
|
225
223
|
{
|
|
226
|
-
className: "
|
|
227
|
-
"data-docubook": "kbd",
|
|
224
|
+
className: "inline-flex items-center justify-center px-2 py-1 mx-0.5 text-xs font-mono font-medium text-foreground bg-secondary/70 border rounded-md",
|
|
228
225
|
...props,
|
|
229
226
|
children: renderContent()
|
|
230
227
|
}
|
|
@@ -301,24 +298,13 @@ function Note({
|
|
|
301
298
|
...props
|
|
302
299
|
}) {
|
|
303
300
|
const Icon = iconMap[type] || import_lucide_react.Info;
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
"div",
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
role: noteRole,
|
|
312
|
-
...props,
|
|
313
|
-
children: [
|
|
314
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { className: cn("dbk-note__icon", noteDefaultClasses.icon), "data-docubook": "note-icon" }),
|
|
315
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: cn("dbk-note__content-wrapper", noteDefaultClasses.contentWrapper), "data-docubook": "note-content-wrapper", children: [
|
|
316
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h5", { className: cn("dbk-note__title", noteDefaultClasses.title), "data-docubook": "note-title", children: title }),
|
|
317
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: cn("dbk-note__content", noteDefaultClasses.content), "data-docubook": "note-content", children })
|
|
318
|
-
] })
|
|
319
|
-
]
|
|
320
|
-
}
|
|
321
|
-
);
|
|
301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: cn(noteVariants({ variant: type }), className), ...props, children: [
|
|
302
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { className: noteDefaultClasses.icon }),
|
|
303
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: noteDefaultClasses.contentWrapper, children: [
|
|
304
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h5", { className: noteDefaultClasses.title, children: title }),
|
|
305
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: noteDefaultClasses.content, children })
|
|
306
|
+
] })
|
|
307
|
+
] });
|
|
322
308
|
}
|
|
323
309
|
|
|
324
310
|
// src/core/components/Release.tsx
|
|
@@ -326,31 +312,30 @@ var import_react2 = require("react");
|
|
|
326
312
|
var import_lucide_react2 = require("lucide-react");
|
|
327
313
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
328
314
|
function Release({ version, title, date, children }) {
|
|
329
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "
|
|
330
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "
|
|
315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "mb-16 group", children: [
|
|
316
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-3 mt-6 mb-2", children: [
|
|
331
317
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
332
318
|
"div",
|
|
333
319
|
{
|
|
334
320
|
id: version,
|
|
335
|
-
className: "
|
|
336
|
-
"data-docubook": "release-version",
|
|
321
|
+
className: "inline-flex items-center rounded-full border border-primary/20 bg-primary/10 px-3 py-1 text-sm font-semibold text-primary transition-colors hover:bg-primary/15 scroll-m-20 backdrop-blur-sm",
|
|
337
322
|
children: [
|
|
338
323
|
"v",
|
|
339
324
|
version
|
|
340
325
|
]
|
|
341
326
|
}
|
|
342
327
|
),
|
|
343
|
-
date && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "
|
|
328
|
+
date && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-3 text-sm font-medium text-muted-foreground", children: [
|
|
344
329
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "h-1 w-1 rounded-full bg-muted-foreground/30" }),
|
|
345
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("time", {
|
|
330
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("time", { dateTime: date, children: new Date(date).toLocaleDateString("en-US", {
|
|
346
331
|
year: "numeric",
|
|
347
332
|
month: "long",
|
|
348
333
|
day: "numeric"
|
|
349
334
|
}) })
|
|
350
335
|
] })
|
|
351
336
|
] }),
|
|
352
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: "
|
|
353
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "
|
|
337
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: "text-2xl font-bold text-foreground/90 mb-6 mt-0!", children: title }),
|
|
338
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "space-y-8", children })
|
|
354
339
|
] });
|
|
355
340
|
}
|
|
356
341
|
var typeConfig = {
|
|
@@ -382,25 +367,23 @@ var typeConfig = {
|
|
|
382
367
|
};
|
|
383
368
|
function Changes({ type, children }) {
|
|
384
369
|
const config = typeConfig[type] || typeConfig.added;
|
|
385
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "
|
|
386
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "
|
|
370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "space-y-3 mb-8", children: [
|
|
371
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
387
372
|
"div",
|
|
388
373
|
{
|
|
389
374
|
className: cn(
|
|
390
|
-
"dbk-release-changes__badge",
|
|
391
375
|
"px-3 py-1 rounded-full text-sm font-medium flex items-center gap-1.5",
|
|
392
376
|
config.className
|
|
393
377
|
),
|
|
394
|
-
"data-docubook": "release-changes-badge",
|
|
395
378
|
children: [
|
|
396
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(config.icon, { className: "
|
|
397
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", {
|
|
379
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(config.icon, { className: "h-3.5 w-3.5" }),
|
|
380
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: config.label })
|
|
398
381
|
]
|
|
399
382
|
}
|
|
400
383
|
) }),
|
|
401
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: "
|
|
384
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: "list-none pl-0 space-y-2 text-foreground/80", children: import_react2.Children.map(children, (child, index) => {
|
|
402
385
|
const processedChild = typeof child === "string" ? child.trim().replace(/^[-*]\s+/, "") : child;
|
|
403
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("li", { className: "
|
|
386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("li", { className: "leading-relaxed", children: processedChild }, index);
|
|
404
387
|
}) })
|
|
405
388
|
] });
|
|
406
389
|
}
|
|
@@ -409,35 +392,22 @@ function Changes({ type, children }) {
|
|
|
409
392
|
var import_clsx4 = __toESM(require("clsx"), 1);
|
|
410
393
|
var import_react3 = require("react");
|
|
411
394
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
412
|
-
var stepperDefaultClasses = {
|
|
413
|
-
root: "flex flex-col",
|
|
414
|
-
item: "border-l border-muted pl-9 ml-3 relative",
|
|
415
|
-
itemWithConnector: "pb-5 ",
|
|
416
|
-
number: "bg-muted text-muted-foreground w-8 h-8 text-xs font-medium rounded-md border border-border/50 flex items-center justify-center absolute -left-4 font-code"
|
|
417
|
-
};
|
|
418
|
-
var stepperItemDefaultClasses = {
|
|
419
|
-
root: "pt-0.5",
|
|
420
|
-
title: "mt-0",
|
|
421
|
-
content: ""
|
|
422
|
-
};
|
|
423
395
|
function Stepper({
|
|
424
396
|
children
|
|
425
397
|
}) {
|
|
426
398
|
const length = import_react3.Children.count(children);
|
|
427
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("
|
|
399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-col", children: import_react3.Children.map(children, (child, index) => {
|
|
428
400
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
429
|
-
"
|
|
401
|
+
"div",
|
|
430
402
|
{
|
|
431
403
|
className: cn(
|
|
432
|
-
"
|
|
433
|
-
stepperDefaultClasses.item,
|
|
404
|
+
"border-l border-muted pl-9 ml-3 relative",
|
|
434
405
|
(0, import_clsx4.default)({
|
|
435
|
-
|
|
406
|
+
"pb-5 ": index < length - 1
|
|
436
407
|
})
|
|
437
408
|
),
|
|
438
|
-
"data-docubook": "stepper-item",
|
|
439
409
|
children: [
|
|
440
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className:
|
|
410
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "bg-muted text-muted-foreground w-8 h-8 text-xs font-medium rounded-md border border-border/50 flex items-center justify-center absolute -left-4 font-code", "aria-hidden": "true", children: index + 1 }),
|
|
441
411
|
child
|
|
442
412
|
]
|
|
443
413
|
}
|
|
@@ -448,9 +418,9 @@ function StepperItem({
|
|
|
448
418
|
children,
|
|
449
419
|
title
|
|
450
420
|
}) {
|
|
451
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className:
|
|
452
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h4", { className:
|
|
453
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", {
|
|
421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "pt-0.5", children: [
|
|
422
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h4", { className: "mt-0", children: title }),
|
|
423
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { children })
|
|
454
424
|
] });
|
|
455
425
|
}
|
|
456
426
|
|
package/dist/core/server.js
CHANGED
|
@@ -69,7 +69,6 @@ function Card({
|
|
|
69
69
|
"div",
|
|
70
70
|
{
|
|
71
71
|
className: clsx(
|
|
72
|
-
"dbk-card",
|
|
73
72
|
"border rounded-lg shadow-sm p-4 transition-all duration-200",
|
|
74
73
|
"bg-card text-card-foreground border-border",
|
|
75
74
|
"hover:bg-accent/5 hover:border-accent/30",
|
|
@@ -77,21 +76,20 @@ function Card({
|
|
|
77
76
|
horizontal ? "flex-row items-start gap-1" : "flex-col space-y-1",
|
|
78
77
|
className
|
|
79
78
|
),
|
|
80
|
-
"data-docubook": "card",
|
|
81
79
|
children: [
|
|
82
|
-
Icon && /* @__PURE__ */ jsx2(Icon, { className: clsx("
|
|
83
|
-
/* @__PURE__ */ jsxs2("div", { className: "
|
|
84
|
-
/* @__PURE__ */ jsx2("div", { className: "
|
|
85
|
-
/* @__PURE__ */ jsx2("div", { className: "
|
|
80
|
+
Icon && /* @__PURE__ */ jsx2(Icon, { className: clsx("w-5 h-5 text-primary shrink-0", horizontal && "mt-0.5") }),
|
|
81
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex-1 min-w-0", children: [
|
|
82
|
+
/* @__PURE__ */ jsx2("div", { className: "text-base font-semibold text-foreground leading-6", children: title }),
|
|
83
|
+
/* @__PURE__ */ jsx2("div", { className: "text-sm text-muted-foreground -mt-3", children })
|
|
86
84
|
] })
|
|
87
85
|
]
|
|
88
86
|
}
|
|
89
87
|
);
|
|
90
88
|
if (!href) return content;
|
|
91
89
|
if (LinkComponent) {
|
|
92
|
-
return /* @__PURE__ */ jsx2(LinkComponent, { href, className: "
|
|
90
|
+
return /* @__PURE__ */ jsx2(LinkComponent, { href, className: "no-underline block", children: content });
|
|
93
91
|
}
|
|
94
|
-
return /* @__PURE__ */ jsx2("a", { className: "
|
|
92
|
+
return /* @__PURE__ */ jsx2("a", { className: "no-underline block", href, children: content });
|
|
95
93
|
}
|
|
96
94
|
|
|
97
95
|
// src/core/components/CardGroup.tsx
|
|
@@ -176,8 +174,7 @@ function Kbd({
|
|
|
176
174
|
return /* @__PURE__ */ jsx4(
|
|
177
175
|
"kbd",
|
|
178
176
|
{
|
|
179
|
-
className: "
|
|
180
|
-
"data-docubook": "kbd",
|
|
177
|
+
className: "inline-flex items-center justify-center px-2 py-1 mx-0.5 text-xs font-mono font-medium text-foreground bg-secondary/70 border rounded-md",
|
|
181
178
|
...props,
|
|
182
179
|
children: renderContent()
|
|
183
180
|
}
|
|
@@ -259,24 +256,13 @@ function Note({
|
|
|
259
256
|
...props
|
|
260
257
|
}) {
|
|
261
258
|
const Icon = iconMap[type] || Info;
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
"div",
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
role: noteRole,
|
|
270
|
-
...props,
|
|
271
|
-
children: [
|
|
272
|
-
/* @__PURE__ */ jsx6(Icon, { className: cn("dbk-note__icon", noteDefaultClasses.icon), "data-docubook": "note-icon" }),
|
|
273
|
-
/* @__PURE__ */ jsxs3("div", { className: cn("dbk-note__content-wrapper", noteDefaultClasses.contentWrapper), "data-docubook": "note-content-wrapper", children: [
|
|
274
|
-
/* @__PURE__ */ jsx6("h5", { className: cn("dbk-note__title", noteDefaultClasses.title), "data-docubook": "note-title", children: title }),
|
|
275
|
-
/* @__PURE__ */ jsx6("div", { className: cn("dbk-note__content", noteDefaultClasses.content), "data-docubook": "note-content", children })
|
|
276
|
-
] })
|
|
277
|
-
]
|
|
278
|
-
}
|
|
279
|
-
);
|
|
259
|
+
return /* @__PURE__ */ jsxs3("div", { className: cn(noteVariants({ variant: type }), className), ...props, children: [
|
|
260
|
+
/* @__PURE__ */ jsx6(Icon, { className: noteDefaultClasses.icon }),
|
|
261
|
+
/* @__PURE__ */ jsxs3("div", { className: noteDefaultClasses.contentWrapper, children: [
|
|
262
|
+
/* @__PURE__ */ jsx6("h5", { className: noteDefaultClasses.title, children: title }),
|
|
263
|
+
/* @__PURE__ */ jsx6("div", { className: noteDefaultClasses.content, children })
|
|
264
|
+
] })
|
|
265
|
+
] });
|
|
280
266
|
}
|
|
281
267
|
|
|
282
268
|
// src/core/components/Release.tsx
|
|
@@ -290,31 +276,30 @@ import {
|
|
|
290
276
|
} from "lucide-react";
|
|
291
277
|
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
292
278
|
function Release({ version, title, date, children }) {
|
|
293
|
-
return /* @__PURE__ */ jsxs4("div", { className: "
|
|
294
|
-
/* @__PURE__ */ jsxs4("div", { className: "
|
|
279
|
+
return /* @__PURE__ */ jsxs4("div", { className: "mb-16 group", children: [
|
|
280
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-3 mt-6 mb-2", children: [
|
|
295
281
|
/* @__PURE__ */ jsxs4(
|
|
296
282
|
"div",
|
|
297
283
|
{
|
|
298
284
|
id: version,
|
|
299
|
-
className: "
|
|
300
|
-
"data-docubook": "release-version",
|
|
285
|
+
className: "inline-flex items-center rounded-full border border-primary/20 bg-primary/10 px-3 py-1 text-sm font-semibold text-primary transition-colors hover:bg-primary/15 scroll-m-20 backdrop-blur-sm",
|
|
301
286
|
children: [
|
|
302
287
|
"v",
|
|
303
288
|
version
|
|
304
289
|
]
|
|
305
290
|
}
|
|
306
291
|
),
|
|
307
|
-
date && /* @__PURE__ */ jsxs4("div", { className: "
|
|
292
|
+
date && /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-3 text-sm font-medium text-muted-foreground", children: [
|
|
308
293
|
/* @__PURE__ */ jsx7("span", { className: "h-1 w-1 rounded-full bg-muted-foreground/30" }),
|
|
309
|
-
/* @__PURE__ */ jsx7("time", {
|
|
294
|
+
/* @__PURE__ */ jsx7("time", { dateTime: date, children: new Date(date).toLocaleDateString("en-US", {
|
|
310
295
|
year: "numeric",
|
|
311
296
|
month: "long",
|
|
312
297
|
day: "numeric"
|
|
313
298
|
}) })
|
|
314
299
|
] })
|
|
315
300
|
] }),
|
|
316
|
-
/* @__PURE__ */ jsx7("h3", { className: "
|
|
317
|
-
/* @__PURE__ */ jsx7("div", { className: "
|
|
301
|
+
/* @__PURE__ */ jsx7("h3", { className: "text-2xl font-bold text-foreground/90 mb-6 mt-0!", children: title }),
|
|
302
|
+
/* @__PURE__ */ jsx7("div", { className: "space-y-8", children })
|
|
318
303
|
] });
|
|
319
304
|
}
|
|
320
305
|
var typeConfig = {
|
|
@@ -346,25 +331,23 @@ var typeConfig = {
|
|
|
346
331
|
};
|
|
347
332
|
function Changes({ type, children }) {
|
|
348
333
|
const config = typeConfig[type] || typeConfig.added;
|
|
349
|
-
return /* @__PURE__ */ jsxs4("div", { className: "
|
|
350
|
-
/* @__PURE__ */ jsx7("div", { className: "
|
|
334
|
+
return /* @__PURE__ */ jsxs4("div", { className: "space-y-3 mb-8", children: [
|
|
335
|
+
/* @__PURE__ */ jsx7("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxs4(
|
|
351
336
|
"div",
|
|
352
337
|
{
|
|
353
338
|
className: cn(
|
|
354
|
-
"dbk-release-changes__badge",
|
|
355
339
|
"px-3 py-1 rounded-full text-sm font-medium flex items-center gap-1.5",
|
|
356
340
|
config.className
|
|
357
341
|
),
|
|
358
|
-
"data-docubook": "release-changes-badge",
|
|
359
342
|
children: [
|
|
360
|
-
/* @__PURE__ */ jsx7(config.icon, { className: "
|
|
361
|
-
/* @__PURE__ */ jsx7("span", {
|
|
343
|
+
/* @__PURE__ */ jsx7(config.icon, { className: "h-3.5 w-3.5" }),
|
|
344
|
+
/* @__PURE__ */ jsx7("span", { children: config.label })
|
|
362
345
|
]
|
|
363
346
|
}
|
|
364
347
|
) }),
|
|
365
|
-
/* @__PURE__ */ jsx7("ul", { className: "
|
|
348
|
+
/* @__PURE__ */ jsx7("ul", { className: "list-none pl-0 space-y-2 text-foreground/80", children: Children.map(children, (child, index) => {
|
|
366
349
|
const processedChild = typeof child === "string" ? child.trim().replace(/^[-*]\s+/, "") : child;
|
|
367
|
-
return /* @__PURE__ */ jsx7("li", { className: "
|
|
350
|
+
return /* @__PURE__ */ jsx7("li", { className: "leading-relaxed", children: processedChild }, index);
|
|
368
351
|
}) })
|
|
369
352
|
] });
|
|
370
353
|
}
|
|
@@ -373,35 +356,22 @@ function Changes({ type, children }) {
|
|
|
373
356
|
import clsx4 from "clsx";
|
|
374
357
|
import { Children as Children2 } from "react";
|
|
375
358
|
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
376
|
-
var stepperDefaultClasses = {
|
|
377
|
-
root: "flex flex-col",
|
|
378
|
-
item: "border-l border-muted pl-9 ml-3 relative",
|
|
379
|
-
itemWithConnector: "pb-5 ",
|
|
380
|
-
number: "bg-muted text-muted-foreground w-8 h-8 text-xs font-medium rounded-md border border-border/50 flex items-center justify-center absolute -left-4 font-code"
|
|
381
|
-
};
|
|
382
|
-
var stepperItemDefaultClasses = {
|
|
383
|
-
root: "pt-0.5",
|
|
384
|
-
title: "mt-0",
|
|
385
|
-
content: ""
|
|
386
|
-
};
|
|
387
359
|
function Stepper({
|
|
388
360
|
children
|
|
389
361
|
}) {
|
|
390
362
|
const length = Children2.count(children);
|
|
391
|
-
return /* @__PURE__ */ jsx8("
|
|
363
|
+
return /* @__PURE__ */ jsx8("div", { className: "flex flex-col", children: Children2.map(children, (child, index) => {
|
|
392
364
|
return /* @__PURE__ */ jsxs5(
|
|
393
|
-
"
|
|
365
|
+
"div",
|
|
394
366
|
{
|
|
395
367
|
className: cn(
|
|
396
|
-
"
|
|
397
|
-
stepperDefaultClasses.item,
|
|
368
|
+
"border-l border-muted pl-9 ml-3 relative",
|
|
398
369
|
clsx4({
|
|
399
|
-
|
|
370
|
+
"pb-5 ": index < length - 1
|
|
400
371
|
})
|
|
401
372
|
),
|
|
402
|
-
"data-docubook": "stepper-item",
|
|
403
373
|
children: [
|
|
404
|
-
/* @__PURE__ */ jsx8("div", { className:
|
|
374
|
+
/* @__PURE__ */ jsx8("div", { className: "bg-muted text-muted-foreground w-8 h-8 text-xs font-medium rounded-md border border-border/50 flex items-center justify-center absolute -left-4 font-code", "aria-hidden": "true", children: index + 1 }),
|
|
405
375
|
child
|
|
406
376
|
]
|
|
407
377
|
}
|
|
@@ -412,9 +382,9 @@ function StepperItem({
|
|
|
412
382
|
children,
|
|
413
383
|
title
|
|
414
384
|
}) {
|
|
415
|
-
return /* @__PURE__ */ jsxs5("div", { className:
|
|
416
|
-
/* @__PURE__ */ jsx8("h4", { className:
|
|
417
|
-
/* @__PURE__ */ jsx8("div", {
|
|
385
|
+
return /* @__PURE__ */ jsxs5("div", { className: "pt-0.5", children: [
|
|
386
|
+
/* @__PURE__ */ jsx8("h4", { className: "mt-0", children: title }),
|
|
387
|
+
/* @__PURE__ */ jsx8("div", { children })
|
|
418
388
|
] });
|
|
419
389
|
}
|
|
420
390
|
|
package/dist/index.cjs
CHANGED
|
@@ -116,7 +116,6 @@ function Card({
|
|
|
116
116
|
"div",
|
|
117
117
|
{
|
|
118
118
|
className: (0, import_clsx.default)(
|
|
119
|
-
"dbk-card",
|
|
120
119
|
"border rounded-lg shadow-sm p-4 transition-all duration-200",
|
|
121
120
|
"bg-card text-card-foreground border-border",
|
|
122
121
|
"hover:bg-accent/5 hover:border-accent/30",
|
|
@@ -124,21 +123,20 @@ function Card({
|
|
|
124
123
|
horizontal ? "flex-row items-start gap-1" : "flex-col space-y-1",
|
|
125
124
|
className
|
|
126
125
|
),
|
|
127
|
-
"data-docubook": "card",
|
|
128
126
|
children: [
|
|
129
|
-
Icon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { className: (0, import_clsx.default)("
|
|
130
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "
|
|
131
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "
|
|
132
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "
|
|
127
|
+
Icon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { className: (0, import_clsx.default)("w-5 h-5 text-primary shrink-0", horizontal && "mt-0.5") }),
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "text-base font-semibold text-foreground leading-6", children: title }),
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "text-sm text-muted-foreground -mt-3", children })
|
|
133
131
|
] })
|
|
134
132
|
]
|
|
135
133
|
}
|
|
136
134
|
);
|
|
137
135
|
if (!href) return content;
|
|
138
136
|
if (LinkComponent) {
|
|
139
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LinkComponent, { href, className: "
|
|
137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LinkComponent, { href, className: "no-underline block", children: content });
|
|
140
138
|
}
|
|
141
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("a", { className: "
|
|
139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("a", { className: "no-underline block", href, children: content });
|
|
142
140
|
}
|
|
143
141
|
|
|
144
142
|
// src/core/components/CardGroup.tsx
|
|
@@ -223,8 +221,7 @@ function Kbd({
|
|
|
223
221
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
224
222
|
"kbd",
|
|
225
223
|
{
|
|
226
|
-
className: "
|
|
227
|
-
"data-docubook": "kbd",
|
|
224
|
+
className: "inline-flex items-center justify-center px-2 py-1 mx-0.5 text-xs font-mono font-medium text-foreground bg-secondary/70 border rounded-md",
|
|
228
225
|
...props,
|
|
229
226
|
children: renderContent()
|
|
230
227
|
}
|
|
@@ -301,24 +298,13 @@ function Note({
|
|
|
301
298
|
...props
|
|
302
299
|
}) {
|
|
303
300
|
const Icon = iconMap[type] || import_lucide_react.Info;
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
"div",
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
role: noteRole,
|
|
312
|
-
...props,
|
|
313
|
-
children: [
|
|
314
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { className: cn("dbk-note__icon", noteDefaultClasses.icon), "data-docubook": "note-icon" }),
|
|
315
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: cn("dbk-note__content-wrapper", noteDefaultClasses.contentWrapper), "data-docubook": "note-content-wrapper", children: [
|
|
316
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h5", { className: cn("dbk-note__title", noteDefaultClasses.title), "data-docubook": "note-title", children: title }),
|
|
317
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: cn("dbk-note__content", noteDefaultClasses.content), "data-docubook": "note-content", children })
|
|
318
|
-
] })
|
|
319
|
-
]
|
|
320
|
-
}
|
|
321
|
-
);
|
|
301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: cn(noteVariants({ variant: type }), className), ...props, children: [
|
|
302
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { className: noteDefaultClasses.icon }),
|
|
303
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: noteDefaultClasses.contentWrapper, children: [
|
|
304
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h5", { className: noteDefaultClasses.title, children: title }),
|
|
305
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: noteDefaultClasses.content, children })
|
|
306
|
+
] })
|
|
307
|
+
] });
|
|
322
308
|
}
|
|
323
309
|
|
|
324
310
|
// src/core/components/Release.tsx
|
|
@@ -326,31 +312,30 @@ var import_react2 = require("react");
|
|
|
326
312
|
var import_lucide_react2 = require("lucide-react");
|
|
327
313
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
328
314
|
function Release({ version, title, date, children }) {
|
|
329
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "
|
|
330
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "
|
|
315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "mb-16 group", children: [
|
|
316
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-3 mt-6 mb-2", children: [
|
|
331
317
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
332
318
|
"div",
|
|
333
319
|
{
|
|
334
320
|
id: version,
|
|
335
|
-
className: "
|
|
336
|
-
"data-docubook": "release-version",
|
|
321
|
+
className: "inline-flex items-center rounded-full border border-primary/20 bg-primary/10 px-3 py-1 text-sm font-semibold text-primary transition-colors hover:bg-primary/15 scroll-m-20 backdrop-blur-sm",
|
|
337
322
|
children: [
|
|
338
323
|
"v",
|
|
339
324
|
version
|
|
340
325
|
]
|
|
341
326
|
}
|
|
342
327
|
),
|
|
343
|
-
date && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "
|
|
328
|
+
date && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-3 text-sm font-medium text-muted-foreground", children: [
|
|
344
329
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "h-1 w-1 rounded-full bg-muted-foreground/30" }),
|
|
345
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("time", {
|
|
330
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("time", { dateTime: date, children: new Date(date).toLocaleDateString("en-US", {
|
|
346
331
|
year: "numeric",
|
|
347
332
|
month: "long",
|
|
348
333
|
day: "numeric"
|
|
349
334
|
}) })
|
|
350
335
|
] })
|
|
351
336
|
] }),
|
|
352
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: "
|
|
353
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "
|
|
337
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: "text-2xl font-bold text-foreground/90 mb-6 mt-0!", children: title }),
|
|
338
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "space-y-8", children })
|
|
354
339
|
] });
|
|
355
340
|
}
|
|
356
341
|
var typeConfig = {
|
|
@@ -382,25 +367,23 @@ var typeConfig = {
|
|
|
382
367
|
};
|
|
383
368
|
function Changes({ type, children }) {
|
|
384
369
|
const config = typeConfig[type] || typeConfig.added;
|
|
385
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "
|
|
386
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "
|
|
370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "space-y-3 mb-8", children: [
|
|
371
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
387
372
|
"div",
|
|
388
373
|
{
|
|
389
374
|
className: cn(
|
|
390
|
-
"dbk-release-changes__badge",
|
|
391
375
|
"px-3 py-1 rounded-full text-sm font-medium flex items-center gap-1.5",
|
|
392
376
|
config.className
|
|
393
377
|
),
|
|
394
|
-
"data-docubook": "release-changes-badge",
|
|
395
378
|
children: [
|
|
396
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(config.icon, { className: "
|
|
397
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", {
|
|
379
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(config.icon, { className: "h-3.5 w-3.5" }),
|
|
380
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: config.label })
|
|
398
381
|
]
|
|
399
382
|
}
|
|
400
383
|
) }),
|
|
401
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: "
|
|
384
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: "list-none pl-0 space-y-2 text-foreground/80", children: import_react2.Children.map(children, (child, index) => {
|
|
402
385
|
const processedChild = typeof child === "string" ? child.trim().replace(/^[-*]\s+/, "") : child;
|
|
403
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("li", { className: "
|
|
386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("li", { className: "leading-relaxed", children: processedChild }, index);
|
|
404
387
|
}) })
|
|
405
388
|
] });
|
|
406
389
|
}
|
|
@@ -409,35 +392,22 @@ function Changes({ type, children }) {
|
|
|
409
392
|
var import_clsx4 = __toESM(require("clsx"), 1);
|
|
410
393
|
var import_react3 = require("react");
|
|
411
394
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
412
|
-
var stepperDefaultClasses = {
|
|
413
|
-
root: "flex flex-col",
|
|
414
|
-
item: "border-l border-muted pl-9 ml-3 relative",
|
|
415
|
-
itemWithConnector: "pb-5 ",
|
|
416
|
-
number: "bg-muted text-muted-foreground w-8 h-8 text-xs font-medium rounded-md border border-border/50 flex items-center justify-center absolute -left-4 font-code"
|
|
417
|
-
};
|
|
418
|
-
var stepperItemDefaultClasses = {
|
|
419
|
-
root: "pt-0.5",
|
|
420
|
-
title: "mt-0",
|
|
421
|
-
content: ""
|
|
422
|
-
};
|
|
423
395
|
function Stepper({
|
|
424
396
|
children
|
|
425
397
|
}) {
|
|
426
398
|
const length = import_react3.Children.count(children);
|
|
427
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("
|
|
399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-col", children: import_react3.Children.map(children, (child, index) => {
|
|
428
400
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
429
|
-
"
|
|
401
|
+
"div",
|
|
430
402
|
{
|
|
431
403
|
className: cn(
|
|
432
|
-
"
|
|
433
|
-
stepperDefaultClasses.item,
|
|
404
|
+
"border-l border-muted pl-9 ml-3 relative",
|
|
434
405
|
(0, import_clsx4.default)({
|
|
435
|
-
|
|
406
|
+
"pb-5 ": index < length - 1
|
|
436
407
|
})
|
|
437
408
|
),
|
|
438
|
-
"data-docubook": "stepper-item",
|
|
439
409
|
children: [
|
|
440
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className:
|
|
410
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "bg-muted text-muted-foreground w-8 h-8 text-xs font-medium rounded-md border border-border/50 flex items-center justify-center absolute -left-4 font-code", "aria-hidden": "true", children: index + 1 }),
|
|
441
411
|
child
|
|
442
412
|
]
|
|
443
413
|
}
|
|
@@ -448,9 +418,9 @@ function StepperItem({
|
|
|
448
418
|
children,
|
|
449
419
|
title
|
|
450
420
|
}) {
|
|
451
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className:
|
|
452
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h4", { className:
|
|
453
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", {
|
|
421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "pt-0.5", children: [
|
|
422
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h4", { className: "mt-0", children: title }),
|
|
423
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { children })
|
|
454
424
|
] });
|
|
455
425
|
}
|
|
456
426
|
|