@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.
@@ -30,20 +30,6 @@ function AccordionGroupProvider({ children }) {
30
30
 
31
31
  // src/core/components/Accordion.tsx
32
32
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
33
- var accordionDefaultClasses = {
34
- rootStandalone: "rounded-lg border shadow-sm",
35
- rootInGroup: "border-border border-b last:border-b-0",
36
- button: "bg-muted/40 dark:bg-muted/20 hover:bg-muted/70 dark:hover:bg-muted/70 flex w-full cursor-pointer items-center gap-2 px-4 py-3 text-start transition-colors",
37
- chevron: "text-muted-foreground h-4 w-4 shrink-0 transition-transform duration-200",
38
- chevronOpen: "rotate-90",
39
- icon: "text-foreground h-4 w-4 shrink-0",
40
- title: "text-foreground m-0! text-base font-medium",
41
- contentGrid: "grid transition-[grid-template-rows] duration-200 ease-out",
42
- contentGridOpen: "grid-rows-[1fr]",
43
- contentGridClosed: "grid-rows-[0fr]",
44
- contentOverflow: "overflow-hidden",
45
- contentBody: "dark:bg-muted/10 bg-muted/15 px-4 py-3"
46
- };
47
33
  function Accordion({ title, children, icon }) {
48
34
  const baseId = useId2();
49
35
  const triggerId = `${baseId}-trigger`;
@@ -65,11 +51,9 @@ function Accordion({ title, children, icon }) {
65
51
  return /* @__PURE__ */ jsxs(
66
52
  "div",
67
53
  {
68
- "data-docubook": "accordion",
69
54
  className: cn(
70
- "dbk-accordion",
71
- !isInGroup && accordionDefaultClasses.rootStandalone,
72
- isInGroup && accordionDefaultClasses.rootInGroup
55
+ !isInGroup && "rounded-lg border shadow-sm",
56
+ isInGroup && "border-border border-b last:border-b-0"
73
57
  ),
74
58
  children: [
75
59
  /* @__PURE__ */ jsxs(
@@ -77,25 +61,22 @@ function Accordion({ title, children, icon }) {
77
61
  {
78
62
  type: "button",
79
63
  onClick: handleToggle,
80
- className: cn("dbk-accordion__button", accordionDefaultClasses.button),
64
+ className: "bg-muted/40 dark:bg-muted/20 hover:bg-muted/70 dark:hover:bg-muted/70 flex w-full cursor-pointer items-center gap-2 px-4 py-3 text-start transition-colors",
81
65
  "aria-expanded": isOpen,
82
66
  "aria-controls": contentId,
83
67
  id: triggerId,
84
- "data-docubook": "accordion-button",
85
68
  children: [
86
69
  /* @__PURE__ */ jsx2(
87
70
  ChevronRight,
88
71
  {
89
72
  className: cn(
90
- "dbk-accordion__chevron",
91
- accordionDefaultClasses.chevron,
92
- isOpen && accordionDefaultClasses.chevronOpen
93
- ),
94
- "data-docubook": "accordion-chevron"
73
+ "text-muted-foreground h-4 w-4 shrink-0 transition-transform duration-200",
74
+ isOpen && "rotate-90"
75
+ )
95
76
  }
96
77
  ),
97
- Icon && /* @__PURE__ */ jsx2(Icon, { className: cn("dbk-accordion__icon", accordionDefaultClasses.icon), "data-docubook": "accordion-icon" }),
98
- /* @__PURE__ */ jsx2("h3", { className: cn("dbk-accordion__title", accordionDefaultClasses.title), "data-docubook": "accordion-title", children: title })
78
+ Icon && /* @__PURE__ */ jsx2(Icon, { className: "text-foreground h-4 w-4 shrink-0" }),
79
+ /* @__PURE__ */ jsx2("h3", { className: "text-foreground m-0! text-base font-medium", children: title })
99
80
  ]
100
81
  }
101
82
  ),
@@ -103,15 +84,13 @@ function Accordion({ title, children, icon }) {
103
84
  "div",
104
85
  {
105
86
  className: cn(
106
- "dbk-accordion__content-grid",
107
- accordionDefaultClasses.contentGrid,
108
- isOpen ? accordionDefaultClasses.contentGridOpen : accordionDefaultClasses.contentGridClosed
87
+ "grid transition-[grid-template-rows] duration-200 ease-out",
88
+ isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
109
89
  ),
110
- "data-docubook": "accordion-content-grid",
111
90
  id: contentId,
112
91
  role: "region",
113
92
  "aria-labelledby": triggerId,
114
- children: /* @__PURE__ */ jsx2("div", { className: cn("dbk-accordion__content-overflow", accordionDefaultClasses.contentOverflow), "data-docubook": "accordion-content-overflow", children: /* @__PURE__ */ jsx2("div", { className: cn("dbk-accordion__content-body", accordionDefaultClasses.contentBody), "data-docubook": "accordion-content-body", children }) })
93
+ children: /* @__PURE__ */ jsx2("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx2("div", { className: "dark:bg-muted/10 bg-muted/15 px-4 py-3", children }) })
115
94
  }
116
95
  )
117
96
  ]
@@ -122,18 +101,8 @@ function Accordion({ title, children, icon }) {
122
101
  // src/core/components/AccordionGroup.tsx
123
102
  import clsx2 from "clsx";
124
103
  import { jsx as jsx3 } from "react/jsx-runtime";
125
- var accordionGroupDefaultClasses = {
126
- root: "overflow-hidden rounded-lg border"
127
- };
128
104
  function AccordionGroup({ children, className }) {
129
- return /* @__PURE__ */ jsx3(AccordionGroupProvider, { children: /* @__PURE__ */ jsx3(
130
- "div",
131
- {
132
- className: clsx2("dbk-accordion-group", accordionGroupDefaultClasses.root, className),
133
- "data-docubook": "accordion-group",
134
- children
135
- }
136
- ) });
105
+ return /* @__PURE__ */ jsx3(AccordionGroupProvider, { children: /* @__PURE__ */ jsx3("div", { className: clsx2("overflow-hidden rounded-lg border", className), children }) });
137
106
  }
138
107
 
139
108
  // src/core/components/Button.tsx
@@ -207,7 +176,6 @@ function Card({
207
176
  "div",
208
177
  {
209
178
  className: clsx3(
210
- "dbk-card",
211
179
  "border rounded-lg shadow-sm p-4 transition-all duration-200",
212
180
  "bg-card text-card-foreground border-border",
213
181
  "hover:bg-accent/5 hover:border-accent/30",
@@ -215,21 +183,20 @@ function Card({
215
183
  horizontal ? "flex-row items-start gap-1" : "flex-col space-y-1",
216
184
  className
217
185
  ),
218
- "data-docubook": "card",
219
186
  children: [
220
- Icon && /* @__PURE__ */ jsx5(Icon, { className: clsx3("dbk-card__icon", "w-5 h-5 text-primary shrink-0", horizontal && "mt-0.5"), "data-docubook": "card-icon" }),
221
- /* @__PURE__ */ jsxs3("div", { className: "dbk-card__body flex-1 min-w-0", "data-docubook": "card-body", children: [
222
- /* @__PURE__ */ jsx5("div", { className: "dbk-card__title text-base font-semibold text-foreground leading-6", "data-docubook": "card-title", children: title }),
223
- /* @__PURE__ */ jsx5("div", { className: "dbk-card__content text-sm text-muted-foreground -mt-3", "data-docubook": "card-content", children })
187
+ Icon && /* @__PURE__ */ jsx5(Icon, { className: clsx3("w-5 h-5 text-primary shrink-0", horizontal && "mt-0.5") }),
188
+ /* @__PURE__ */ jsxs3("div", { className: "flex-1 min-w-0", children: [
189
+ /* @__PURE__ */ jsx5("div", { className: "text-base font-semibold text-foreground leading-6", children: title }),
190
+ /* @__PURE__ */ jsx5("div", { className: "text-sm text-muted-foreground -mt-3", children })
224
191
  ] })
225
192
  ]
226
193
  }
227
194
  );
228
195
  if (!href) return content;
229
196
  if (LinkComponent) {
230
- return /* @__PURE__ */ jsx5(LinkComponent, { href, className: "dbk-card__link no-underline block", "data-docubook": "card-link", children: content });
197
+ return /* @__PURE__ */ jsx5(LinkComponent, { href, className: "no-underline block", children: content });
231
198
  }
232
- return /* @__PURE__ */ jsx5("a", { className: "dbk-card__link no-underline block", href, "data-docubook": "card-link", children: content });
199
+ return /* @__PURE__ */ jsx5("a", { className: "no-underline block", href, children: content });
233
200
  }
234
201
 
235
202
  // src/core/components/CardGroup.tsx
@@ -261,40 +228,6 @@ import {
261
228
  FolderOpen
262
229
  } from "lucide-react";
263
230
  import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
264
- var fileDefaultClasses = {
265
- root: "flex items-center gap-2 py-1.5 pl-7 pr-3 text-sm rounded-md transition-colors duration-150 cursor-default select-none hover:bg-muted/50",
266
- rootHover: "bg-accent/10",
267
- icon: "h-3.5 w-3.5 shrink-0 transition-colors text-muted-foreground",
268
- iconHover: "text-accent",
269
- text: "font-mono text-sm text-foreground truncate",
270
- extension: "ml-auto text-xs text-muted-foreground/80"
271
- };
272
- var folderDefaultClasses = {
273
- root: "relative",
274
- header: "flex items-center gap-2 py-1.5 pl-4 pr-3 rounded-md transition-colors duration-150 select-none",
275
- headerHover: "bg-muted/60",
276
- headerOpen: "text-foreground",
277
- headerClosed: "text-foreground/80",
278
- headerPointer: "cursor-pointer",
279
- headerDefault: "cursor-default",
280
- chevron: "h-3.5 w-3.5 shrink-0 transition-transform duration-200",
281
- chevronOpen: "rotate-90",
282
- chevronHover: "text-foreground/70",
283
- chevronDefault: "text-muted-foreground",
284
- spacer: "w-3.5",
285
- icon: "h-4 w-4 shrink-0 transition-colors",
286
- iconOpenHover: "text-accent",
287
- iconOpenDefault: "text-muted-foreground",
288
- iconClosedHover: "text-accent/80",
289
- iconClosedDefault: "text-muted-foreground/80",
290
- text: "font-medium transition-colors duration-150",
291
- textHover: "text-accent",
292
- children: "ml-5 border-l-2 border-muted/50 pl-2"
293
- };
294
- var filesDefaultClasses = {
295
- root: "rounded-xl border border-muted/20 bg-card/20 backdrop-blur-sm shadow-sm overflow-hidden transition-all duration-200 hover:shadow-md hover:border-muted/60",
296
- content: "p-2"
297
- };
298
231
  function FileComponent({
299
232
  name
300
233
  }) {
@@ -304,18 +237,24 @@ function FileComponent({
304
237
  "div",
305
238
  {
306
239
  className: cn(
307
- "dbk-file-tree__file",
308
- fileDefaultClasses.root,
309
- isHovered && fileDefaultClasses.rootHover
240
+ "flex items-center gap-2 py-1.5 pl-7 pr-3 text-sm rounded-md transition-colors duration-150 cursor-default select-none",
241
+ isHovered ? "bg-accent/10" : "hover:bg-muted/50"
310
242
  ),
311
- "data-docubook": "file-tree-file",
312
243
  onMouseEnter: () => setIsHovered(true),
313
244
  onMouseLeave: () => setIsHovered(false),
314
245
  tabIndex: -1,
315
246
  children: [
316
- /* @__PURE__ */ jsx7(FileIcon, { className: cn("dbk-file-tree__file-icon", fileDefaultClasses.icon, isHovered && fileDefaultClasses.iconHover), "data-docubook": "file-tree-file-icon" }),
317
- /* @__PURE__ */ jsx7("span", { className: cn("dbk-file-tree__file-text", fileDefaultClasses.text), "data-docubook": "file-tree-file-text", children: name }),
318
- isHovered && fileExtension && /* @__PURE__ */ jsx7("span", { className: cn("dbk-file-tree__file-extension", fileDefaultClasses.extension), "data-docubook": "file-tree-file-extension", children: fileExtension })
247
+ /* @__PURE__ */ jsx7(
248
+ FileIcon,
249
+ {
250
+ className: cn(
251
+ "h-3.5 w-3.5 shrink-0 transition-colors",
252
+ isHovered ? "text-accent" : "text-muted-foreground"
253
+ )
254
+ }
255
+ ),
256
+ /* @__PURE__ */ jsx7("span", { className: "font-mono text-sm text-foreground truncate", children: name }),
257
+ isHovered && fileExtension && /* @__PURE__ */ jsx7("span", { className: "ml-auto text-xs text-muted-foreground/80", children: fileExtension })
319
258
  ]
320
259
  }
321
260
  );
@@ -327,73 +266,73 @@ function FolderComponent({
327
266
  const [isOpen, setIsOpen] = useState3(true);
328
267
  const [isHovered, setIsHovered] = useState3(false);
329
268
  const hasChildren = Children.count(children) > 0;
330
- return /* @__PURE__ */ jsxs4("div", { className: cn("dbk-file-tree__folder", folderDefaultClasses.root), "data-docubook": "file-tree-folder", children: [
269
+ return /* @__PURE__ */ jsxs4("div", { className: "relative", children: [
331
270
  /* @__PURE__ */ jsxs4(
332
- "button",
271
+ "div",
333
272
  {
334
- type: "button",
335
273
  className: cn(
336
- "dbk-file-tree__folder-button",
337
- folderDefaultClasses.header,
338
- isHovered && folderDefaultClasses.headerHover,
339
- isOpen ? folderDefaultClasses.headerOpen : folderDefaultClasses.headerClosed,
340
- hasChildren ? folderDefaultClasses.headerPointer : folderDefaultClasses.headerDefault
274
+ "flex items-center gap-2 py-1.5 pl-4 pr-3 rounded-md transition-colors duration-150 select-none",
275
+ isHovered ? "bg-muted/60" : "",
276
+ isOpen ? "text-foreground" : "text-foreground/80",
277
+ hasChildren ? "cursor-pointer" : "cursor-default"
341
278
  ),
342
279
  onClick: () => hasChildren && setIsOpen(!isOpen),
343
280
  onMouseEnter: () => setIsHovered(true),
344
281
  onMouseLeave: () => setIsHovered(false),
282
+ tabIndex: -1,
283
+ onKeyDown: (event) => event.preventDefault(),
345
284
  "aria-expanded": hasChildren ? isOpen : void 0,
346
- "data-docubook": "file-tree-folder-button",
347
285
  children: [
348
286
  hasChildren ? /* @__PURE__ */ jsx7(
349
287
  ChevronRight2,
350
288
  {
351
289
  className: cn(
352
- "dbk-file-tree__folder-chevron",
353
- folderDefaultClasses.chevron,
354
- isOpen && folderDefaultClasses.chevronOpen,
355
- isHovered ? folderDefaultClasses.chevronHover : folderDefaultClasses.chevronDefault
356
- ),
357
- "data-docubook": "file-tree-folder-chevron"
290
+ "h-3.5 w-3.5 shrink-0 transition-transform duration-200",
291
+ isOpen ? "rotate-90" : "",
292
+ isHovered ? "text-foreground/70" : "text-muted-foreground"
293
+ )
358
294
  }
359
- ) : /* @__PURE__ */ jsx7("div", { className: cn("dbk-file-tree__folder-spacer", folderDefaultClasses.spacer), "data-docubook": "file-tree-folder-spacer" }),
295
+ ) : /* @__PURE__ */ jsx7("div", { className: "w-3.5" }),
360
296
  isOpen ? /* @__PURE__ */ jsx7(
361
297
  FolderOpen,
362
298
  {
363
299
  className: cn(
364
- "dbk-file-tree__folder-icon",
365
- folderDefaultClasses.icon,
366
- isHovered ? folderDefaultClasses.iconOpenHover : folderDefaultClasses.iconOpenDefault
367
- ),
368
- "data-docubook": "file-tree-folder-icon"
300
+ "h-4 w-4 shrink-0 transition-colors",
301
+ isHovered ? "text-accent" : "text-muted-foreground"
302
+ )
369
303
  }
370
304
  ) : /* @__PURE__ */ jsx7(
371
305
  FolderIcon,
372
306
  {
373
307
  className: cn(
374
- "dbk-file-tree__folder-icon",
375
- folderDefaultClasses.icon,
376
- isHovered ? folderDefaultClasses.iconClosedHover : folderDefaultClasses.iconClosedDefault
377
- ),
378
- "data-docubook": "file-tree-folder-icon"
308
+ "h-4 w-4 shrink-0 transition-colors",
309
+ isHovered ? "text-accent/80" : "text-muted-foreground/80"
310
+ )
379
311
  }
380
312
  ),
381
- /* @__PURE__ */ jsx7("span", { className: cn("dbk-file-tree__folder-text", folderDefaultClasses.text, isHovered && folderDefaultClasses.textHover), "data-docubook": "file-tree-folder-text", children: name })
313
+ /* @__PURE__ */ jsx7("span", { className: cn("font-medium transition-colors duration-150", isHovered ? "text-accent" : ""), children: name })
382
314
  ]
383
315
  }
384
316
  ),
385
- isOpen && hasChildren && /* @__PURE__ */ jsx7("div", { className: cn("dbk-file-tree__folder-children", folderDefaultClasses.children), "data-docubook": "file-tree-folder-children", children })
317
+ isOpen && hasChildren && /* @__PURE__ */ jsx7("div", { className: "ml-5 border-l-2 border-muted/50 pl-2", children })
386
318
  ] });
387
319
  }
388
320
  function Files({
389
321
  children
390
322
  }) {
391
- return /* @__PURE__ */ jsx7("div", { className: cn("dbk-file-tree", filesDefaultClasses.root), "data-docubook": "file-tree", children: /* @__PURE__ */ jsx7("div", { className: cn("dbk-file-tree__content", filesDefaultClasses.content), "data-docubook": "file-tree-content", children: Children.map(children, (child, index) => {
392
- if (isValidElement(child)) {
393
- return cloneElement(child, { key: index });
323
+ return /* @__PURE__ */ jsx7(
324
+ "div",
325
+ {
326
+ className: "rounded-xl border border-muted/20 bg-card/20 backdrop-blur-sm shadow-sm overflow-hidden transition-all duration-200 hover:shadow-md hover:border-muted/60",
327
+ onKeyDown: (event) => event.preventDefault(),
328
+ children: /* @__PURE__ */ jsx7("div", { className: "p-2", children: Children.map(children, (child, index) => {
329
+ if (isValidElement(child)) {
330
+ return cloneElement(child, { key: index });
331
+ }
332
+ return null;
333
+ }) })
394
334
  }
395
- return null;
396
- }) }) });
335
+ );
397
336
  }
398
337
  function Folder({
399
338
  name,
@@ -581,8 +520,7 @@ function Kbd({
581
520
  return /* @__PURE__ */ jsx9(
582
521
  "kbd",
583
522
  {
584
- className: "dbk-kbd 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",
585
- "data-docubook": "kbd",
523
+ 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",
586
524
  ...props,
587
525
  children: renderContent()
588
526
  }
@@ -655,30 +593,19 @@ function Note({
655
593
  ...props
656
594
  }) {
657
595
  const Icon = iconMap[type] || Info;
658
- const noteRole = type === "danger" ? "alert" : "status";
659
- return /* @__PURE__ */ jsxs6(
660
- "div",
661
- {
662
- className: cn("dbk-note", noteVariants({ variant: type }), className),
663
- "data-docubook": "note",
664
- "data-variant": type,
665
- role: noteRole,
666
- ...props,
667
- children: [
668
- /* @__PURE__ */ jsx11(Icon, { className: cn("dbk-note__icon", noteDefaultClasses.icon), "data-docubook": "note-icon" }),
669
- /* @__PURE__ */ jsxs6("div", { className: cn("dbk-note__content-wrapper", noteDefaultClasses.contentWrapper), "data-docubook": "note-content-wrapper", children: [
670
- /* @__PURE__ */ jsx11("h5", { className: cn("dbk-note__title", noteDefaultClasses.title), "data-docubook": "note-title", children: title }),
671
- /* @__PURE__ */ jsx11("div", { className: cn("dbk-note__content", noteDefaultClasses.content), "data-docubook": "note-content", children })
672
- ] })
673
- ]
674
- }
675
- );
596
+ return /* @__PURE__ */ jsxs6("div", { className: cn(noteVariants({ variant: type }), className), ...props, children: [
597
+ /* @__PURE__ */ jsx11(Icon, { className: noteDefaultClasses.icon }),
598
+ /* @__PURE__ */ jsxs6("div", { className: noteDefaultClasses.contentWrapper, children: [
599
+ /* @__PURE__ */ jsx11("h5", { className: noteDefaultClasses.title, children: title }),
600
+ /* @__PURE__ */ jsx11("div", { className: noteDefaultClasses.content, children })
601
+ ] })
602
+ ] });
676
603
  }
677
604
 
678
605
  // src/core/components/Copy.tsx
679
606
  import { ClipboardCheckIcon, ClipboardIcon } from "lucide-react";
680
607
  import { useState as useState5 } from "react";
681
- import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
608
+ import { jsx as jsx12 } from "react/jsx-runtime";
682
609
  function Copy({ content }) {
683
610
  const [isCopied, setIsCopied] = useState5(false);
684
611
  async function handleCopy() {
@@ -692,18 +619,14 @@ function Copy({ content }) {
692
619
  setIsCopied(false);
693
620
  }
694
621
  }
695
- return /* @__PURE__ */ jsxs7(
622
+ return /* @__PURE__ */ jsx12(
696
623
  "button",
697
624
  {
698
625
  type: "button",
699
- className: "dbk-copy inline-flex h-6 w-6 items-center justify-center rounded-md border bg-secondary text-secondary-foreground transition-colors hover:bg-secondary/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-copy",
626
+ className: "border cursor-copy inline-flex h-6 w-6 items-center justify-center rounded-md",
700
627
  onClick: handleCopy,
701
628
  "aria-label": isCopied ? "Copied" : "Copy code",
702
- "data-docubook": "copy-button",
703
- children: [
704
- isCopied ? /* @__PURE__ */ jsx12(ClipboardCheckIcon, { className: "dbk-copy__icon w-3 h-3", "data-docubook": "copy-icon" }) : /* @__PURE__ */ jsx12(ClipboardIcon, { className: "dbk-copy__icon w-3 h-3", "data-docubook": "copy-icon" }),
705
- /* @__PURE__ */ jsx12("span", { className: "sr-only", "aria-live": "polite", children: isCopied ? "Copied" : "Copy" })
706
- ]
629
+ children: isCopied ? /* @__PURE__ */ jsx12(ClipboardCheckIcon, { className: "w-3 h-3" }) : /* @__PURE__ */ jsx12(ClipboardIcon, { className: "w-3 h-3" })
707
630
  }
708
631
  );
709
632
  }
@@ -734,7 +657,7 @@ import {
734
657
  } from "react-icons/si";
735
658
  import { FaJava, FaCode } from "react-icons/fa";
736
659
  import { TbJson } from "react-icons/tb";
737
- import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
660
+ import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
738
661
  function LanguageIcon({ lang }) {
739
662
  const iconProps = { size: 16, className: "w-4 h-4" };
740
663
  const languageToIconMap = {
@@ -785,9 +708,9 @@ function Pre({ children, raw, ...rest }) {
785
708
  const { "data-title": title, className, ...restProps } = rest;
786
709
  const language = getLanguage(className);
787
710
  const hasTitle = !!title;
788
- return /* @__PURE__ */ jsxs8("div", { className: "code-block-container", children: [
711
+ return /* @__PURE__ */ jsxs7("div", { className: "code-block-container", children: [
789
712
  /* @__PURE__ */ jsx13("div", { className: "code-block-actions", children: raw && /* @__PURE__ */ jsx13(Copy, { content: raw }) }),
790
- hasTitle && /* @__PURE__ */ jsx13("div", { className: "code-block-header", children: /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2", children: [
713
+ hasTitle && /* @__PURE__ */ jsx13("div", { className: "code-block-header", children: /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-2", children: [
791
714
  /* @__PURE__ */ jsx13(LanguageIcon, { lang: language }),
792
715
  /* @__PURE__ */ jsx13("span", { children: title })
793
716
  ] }) }),
@@ -804,33 +727,32 @@ import {
804
727
  XCircle,
805
728
  Zap
806
729
  } from "lucide-react";
807
- import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
730
+ import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
808
731
  function Release({ version, title, date, children }) {
809
- return /* @__PURE__ */ jsxs9("div", { className: "dbk-release mb-16 group", "data-docubook": "release", children: [
810
- /* @__PURE__ */ jsxs9("div", { className: "dbk-release__header flex items-center gap-3 mt-6 mb-2", "data-docubook": "release-header", children: [
811
- /* @__PURE__ */ jsxs9(
732
+ return /* @__PURE__ */ jsxs8("div", { className: "mb-16 group", children: [
733
+ /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-3 mt-6 mb-2", children: [
734
+ /* @__PURE__ */ jsxs8(
812
735
  "div",
813
736
  {
814
737
  id: version,
815
- className: "dbk-release__version 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",
816
- "data-docubook": "release-version",
738
+ 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",
817
739
  children: [
818
740
  "v",
819
741
  version
820
742
  ]
821
743
  }
822
744
  ),
823
- date && /* @__PURE__ */ jsxs9("div", { className: "dbk-release__date-wrapper flex items-center gap-3 text-sm font-medium text-muted-foreground", "data-docubook": "release-date-wrapper", children: [
745
+ date && /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-3 text-sm font-medium text-muted-foreground", children: [
824
746
  /* @__PURE__ */ jsx14("span", { className: "h-1 w-1 rounded-full bg-muted-foreground/30" }),
825
- /* @__PURE__ */ jsx14("time", { className: "dbk-release__date", "data-docubook": "release-date", dateTime: date, children: new Date(date).toLocaleDateString("en-US", {
747
+ /* @__PURE__ */ jsx14("time", { dateTime: date, children: new Date(date).toLocaleDateString("en-US", {
826
748
  year: "numeric",
827
749
  month: "long",
828
750
  day: "numeric"
829
751
  }) })
830
752
  ] })
831
753
  ] }),
832
- /* @__PURE__ */ jsx14("h3", { className: "dbk-release__title text-2xl font-bold text-foreground/90 mb-6 mt-0!", "data-docubook": "release-title", children: title }),
833
- /* @__PURE__ */ jsx14("div", { className: "dbk-release__content space-y-8", "data-docubook": "release-content", children })
754
+ /* @__PURE__ */ jsx14("h3", { className: "text-2xl font-bold text-foreground/90 mb-6 mt-0!", children: title }),
755
+ /* @__PURE__ */ jsx14("div", { className: "space-y-8", children })
834
756
  ] });
835
757
  }
836
758
  var typeConfig = {
@@ -862,25 +784,23 @@ var typeConfig = {
862
784
  };
863
785
  function Changes({ type, children }) {
864
786
  const config = typeConfig[type] || typeConfig.added;
865
- return /* @__PURE__ */ jsxs9("div", { className: "dbk-release-changes space-y-3 mb-8", "data-docubook": "release-changes", "data-type": type, children: [
866
- /* @__PURE__ */ jsx14("div", { className: "dbk-release-changes__header flex items-center gap-2", "data-docubook": "release-changes-header", children: /* @__PURE__ */ jsxs9(
787
+ return /* @__PURE__ */ jsxs8("div", { className: "space-y-3 mb-8", children: [
788
+ /* @__PURE__ */ jsx14("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxs8(
867
789
  "div",
868
790
  {
869
791
  className: cn(
870
- "dbk-release-changes__badge",
871
792
  "px-3 py-1 rounded-full text-sm font-medium flex items-center gap-1.5",
872
793
  config.className
873
794
  ),
874
- "data-docubook": "release-changes-badge",
875
795
  children: [
876
- /* @__PURE__ */ jsx14(config.icon, { className: "dbk-release-changes__icon h-3.5 w-3.5", "data-docubook": "release-changes-icon" }),
877
- /* @__PURE__ */ jsx14("span", { className: "dbk-release-changes__label", "data-docubook": "release-changes-label", children: config.label })
796
+ /* @__PURE__ */ jsx14(config.icon, { className: "h-3.5 w-3.5" }),
797
+ /* @__PURE__ */ jsx14("span", { children: config.label })
878
798
  ]
879
799
  }
880
800
  ) }),
881
- /* @__PURE__ */ jsx14("ul", { className: "dbk-release-changes__list list-none pl-0 space-y-2 text-foreground/80", "data-docubook": "release-changes-list", children: Children2.map(children, (child, index) => {
801
+ /* @__PURE__ */ jsx14("ul", { className: "list-none pl-0 space-y-2 text-foreground/80", children: Children2.map(children, (child, index) => {
882
802
  const processedChild = typeof child === "string" ? child.trim().replace(/^[-*]\s+/, "") : child;
883
- return /* @__PURE__ */ jsx14("li", { className: "dbk-release-changes__item leading-relaxed", "data-docubook": "release-changes-item", children: processedChild }, index);
803
+ return /* @__PURE__ */ jsx14("li", { className: "leading-relaxed", children: processedChild }, index);
884
804
  }) })
885
805
  ] });
886
806
  }
@@ -888,36 +808,23 @@ function Changes({ type, children }) {
888
808
  // src/core/components/Stepper.tsx
889
809
  import clsx5 from "clsx";
890
810
  import { Children as Children3 } from "react";
891
- import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
892
- var stepperDefaultClasses = {
893
- root: "flex flex-col",
894
- item: "border-l border-muted pl-9 ml-3 relative",
895
- itemWithConnector: "pb-5 ",
896
- 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"
897
- };
898
- var stepperItemDefaultClasses = {
899
- root: "pt-0.5",
900
- title: "mt-0",
901
- content: ""
902
- };
811
+ import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
903
812
  function Stepper({
904
813
  children
905
814
  }) {
906
815
  const length = Children3.count(children);
907
- return /* @__PURE__ */ jsx15("ol", { className: cn("dbk-stepper", stepperDefaultClasses.root), "data-docubook": "stepper", children: Children3.map(children, (child, index) => {
908
- return /* @__PURE__ */ jsxs10(
909
- "li",
816
+ return /* @__PURE__ */ jsx15("div", { className: "flex flex-col", children: Children3.map(children, (child, index) => {
817
+ return /* @__PURE__ */ jsxs9(
818
+ "div",
910
819
  {
911
820
  className: cn(
912
- "dbk-stepper__item",
913
- stepperDefaultClasses.item,
821
+ "border-l border-muted pl-9 ml-3 relative",
914
822
  clsx5({
915
- [stepperDefaultClasses.itemWithConnector]: index < length - 1
823
+ "pb-5 ": index < length - 1
916
824
  })
917
825
  ),
918
- "data-docubook": "stepper-item",
919
826
  children: [
920
- /* @__PURE__ */ jsx15("div", { className: cn("dbk-stepper__number", stepperDefaultClasses.number), "data-docubook": "stepper-number", "aria-hidden": "true", children: index + 1 }),
827
+ /* @__PURE__ */ jsx15("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 }),
921
828
  child
922
829
  ]
923
830
  }
@@ -928,49 +835,34 @@ function StepperItem({
928
835
  children,
929
836
  title
930
837
  }) {
931
- return /* @__PURE__ */ jsxs10("div", { className: cn("dbk-stepper-item", stepperItemDefaultClasses.root), "data-docubook": "stepper-item-content", children: [
932
- /* @__PURE__ */ jsx15("h4", { className: cn("dbk-stepper-item__title", stepperItemDefaultClasses.title), "data-docubook": "stepper-item-title", children: title }),
933
- /* @__PURE__ */ jsx15("div", { className: cn("dbk-stepper-item__content", stepperItemDefaultClasses.content), "data-docubook": "stepper-item-body", children })
838
+ return /* @__PURE__ */ jsxs9("div", { className: "pt-0.5", children: [
839
+ /* @__PURE__ */ jsx15("h4", { className: "mt-0", children: title }),
840
+ /* @__PURE__ */ jsx15("div", { children })
934
841
  ] });
935
842
  }
936
843
 
937
844
  // src/core/components/Tooltip.tsx
938
845
  import { useState as useState6 } from "react";
939
- import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
940
- var tooltipDefaultClasses = {
941
- root: "relative inline-flex items-center cursor-help text-primary hover:text-primary/80 transition-colors",
942
- trigger: "border-b border-dashed border-primary/60 pb-0.5",
943
- content: "absolute bottom-full left-1/2 -translate-x-1/2 mb-3 w-64 bg-popover text-popover-foreground text-sm p-3 rounded-md shadow-lg border border-border/50 wrap-break-word text-left z-50",
944
- arrow: "absolute -bottom-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-popover rotate-45 border-b border-r border-border/50 -z-10"
945
- };
846
+ import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
946
847
  var Tooltip = ({ text, tip }) => {
947
848
  const [visible, setVisible] = useState6(false);
948
- return /* @__PURE__ */ jsxs11(
849
+ return /* @__PURE__ */ jsxs10(
949
850
  "span",
950
851
  {
951
- className: cn("dbk-tooltip", tooltipDefaultClasses.root),
952
- "data-docubook": "tooltip",
852
+ className: "relative inline-flex items-center cursor-help text-primary hover:text-primary/80 transition-colors",
953
853
  onMouseEnter: () => setVisible(true),
954
854
  onMouseLeave: () => setVisible(false),
955
855
  children: [
956
856
  /* @__PURE__ */ jsx16(
957
- "button",
857
+ "span",
958
858
  {
959
- type: "button",
960
- className: cn("dbk-tooltip__trigger", tooltipDefaultClasses.trigger),
961
- "data-docubook": "tooltip-trigger",
962
- onFocus: () => setVisible(true),
963
- onBlur: () => setVisible(false),
964
- onKeyDown: (event) => {
965
- if (event.key === "Escape") setVisible(false);
966
- },
967
- "aria-expanded": visible,
859
+ className: "border-b border-dashed border-primary/60 pb-0.5",
968
860
  children: text
969
861
  }
970
862
  ),
971
- visible && /* @__PURE__ */ jsxs11("span", { className: cn("dbk-tooltip__content", tooltipDefaultClasses.content), role: "tooltip", "data-docubook": "tooltip-content", children: [
863
+ visible && /* @__PURE__ */ jsxs10("span", { className: "absolute bottom-full left-1/2 -translate-x-1/2 mb-3 w-64 bg-popover text-popover-foreground text-sm p-3 rounded-md shadow-lg border border-border/50 wrap-break-word text-left z-50", role: "tooltip", children: [
972
864
  tip,
973
- /* @__PURE__ */ jsx16("span", { className: cn("dbk-tooltip__arrow", tooltipDefaultClasses.arrow), "data-docubook": "tooltip-arrow" })
865
+ /* @__PURE__ */ jsx16("span", { className: "absolute -bottom-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-popover rotate-45 border-b border-r border-border/50 -z-10" })
974
866
  ] })
975
867
  ]
976
868
  }