@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.
@@ -85,20 +85,6 @@ function AccordionGroupProvider({ children }) {
85
85
 
86
86
  // src/core/components/Accordion.tsx
87
87
  var import_jsx_runtime2 = require("react/jsx-runtime");
88
- var accordionDefaultClasses = {
89
- rootStandalone: "rounded-lg border shadow-sm",
90
- rootInGroup: "border-border border-b last:border-b-0",
91
- 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",
92
- chevron: "text-muted-foreground h-4 w-4 shrink-0 transition-transform duration-200",
93
- chevronOpen: "rotate-90",
94
- icon: "text-foreground h-4 w-4 shrink-0",
95
- title: "text-foreground m-0! text-base font-medium",
96
- contentGrid: "grid transition-[grid-template-rows] duration-200 ease-out",
97
- contentGridOpen: "grid-rows-[1fr]",
98
- contentGridClosed: "grid-rows-[0fr]",
99
- contentOverflow: "overflow-hidden",
100
- contentBody: "dark:bg-muted/10 bg-muted/15 px-4 py-3"
101
- };
102
88
  function Accordion({ title, children, icon }) {
103
89
  const baseId = (0, import_react2.useId)();
104
90
  const triggerId = `${baseId}-trigger`;
@@ -120,11 +106,9 @@ function Accordion({ title, children, icon }) {
120
106
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
121
107
  "div",
122
108
  {
123
- "data-docubook": "accordion",
124
109
  className: cn(
125
- "dbk-accordion",
126
- !isInGroup && accordionDefaultClasses.rootStandalone,
127
- isInGroup && accordionDefaultClasses.rootInGroup
110
+ !isInGroup && "rounded-lg border shadow-sm",
111
+ isInGroup && "border-border border-b last:border-b-0"
128
112
  ),
129
113
  children: [
130
114
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
@@ -132,25 +116,22 @@ function Accordion({ title, children, icon }) {
132
116
  {
133
117
  type: "button",
134
118
  onClick: handleToggle,
135
- className: cn("dbk-accordion__button", accordionDefaultClasses.button),
119
+ 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",
136
120
  "aria-expanded": isOpen,
137
121
  "aria-controls": contentId,
138
122
  id: triggerId,
139
- "data-docubook": "accordion-button",
140
123
  children: [
141
124
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
142
125
  import_lucide_react.ChevronRight,
143
126
  {
144
127
  className: cn(
145
- "dbk-accordion__chevron",
146
- accordionDefaultClasses.chevron,
147
- isOpen && accordionDefaultClasses.chevronOpen
148
- ),
149
- "data-docubook": "accordion-chevron"
128
+ "text-muted-foreground h-4 w-4 shrink-0 transition-transform duration-200",
129
+ isOpen && "rotate-90"
130
+ )
150
131
  }
151
132
  ),
152
- Icon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { className: cn("dbk-accordion__icon", accordionDefaultClasses.icon), "data-docubook": "accordion-icon" }),
153
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h3", { className: cn("dbk-accordion__title", accordionDefaultClasses.title), "data-docubook": "accordion-title", children: title })
133
+ Icon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { className: "text-foreground h-4 w-4 shrink-0" }),
134
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h3", { className: "text-foreground m-0! text-base font-medium", children: title })
154
135
  ]
155
136
  }
156
137
  ),
@@ -158,15 +139,13 @@ function Accordion({ title, children, icon }) {
158
139
  "div",
159
140
  {
160
141
  className: cn(
161
- "dbk-accordion__content-grid",
162
- accordionDefaultClasses.contentGrid,
163
- isOpen ? accordionDefaultClasses.contentGridOpen : accordionDefaultClasses.contentGridClosed
142
+ "grid transition-[grid-template-rows] duration-200 ease-out",
143
+ isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
164
144
  ),
165
- "data-docubook": "accordion-content-grid",
166
145
  id: contentId,
167
146
  role: "region",
168
147
  "aria-labelledby": triggerId,
169
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: cn("dbk-accordion__content-overflow", accordionDefaultClasses.contentOverflow), "data-docubook": "accordion-content-overflow", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: cn("dbk-accordion__content-body", accordionDefaultClasses.contentBody), "data-docubook": "accordion-content-body", children }) })
148
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dark:bg-muted/10 bg-muted/15 px-4 py-3", children }) })
170
149
  }
171
150
  )
172
151
  ]
@@ -177,18 +156,8 @@ function Accordion({ title, children, icon }) {
177
156
  // src/core/components/AccordionGroup.tsx
178
157
  var import_clsx2 = __toESM(require("clsx"), 1);
179
158
  var import_jsx_runtime3 = require("react/jsx-runtime");
180
- var accordionGroupDefaultClasses = {
181
- root: "overflow-hidden rounded-lg border"
182
- };
183
159
  function AccordionGroup({ children, className }) {
184
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AccordionGroupProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
185
- "div",
186
- {
187
- className: (0, import_clsx2.default)("dbk-accordion-group", accordionGroupDefaultClasses.root, className),
188
- "data-docubook": "accordion-group",
189
- children
190
- }
191
- ) });
160
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AccordionGroupProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: (0, import_clsx2.default)("overflow-hidden rounded-lg border", className), children }) });
192
161
  }
193
162
 
194
163
  // src/core/components/Button.tsx
@@ -262,7 +231,6 @@ function Card({
262
231
  "div",
263
232
  {
264
233
  className: (0, import_clsx3.default)(
265
- "dbk-card",
266
234
  "border rounded-lg shadow-sm p-4 transition-all duration-200",
267
235
  "bg-card text-card-foreground border-border",
268
236
  "hover:bg-accent/5 hover:border-accent/30",
@@ -270,21 +238,20 @@ function Card({
270
238
  horizontal ? "flex-row items-start gap-1" : "flex-col space-y-1",
271
239
  className
272
240
  ),
273
- "data-docubook": "card",
274
241
  children: [
275
- Icon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { className: (0, import_clsx3.default)("dbk-card__icon", "w-5 h-5 text-primary shrink-0", horizontal && "mt-0.5"), "data-docubook": "card-icon" }),
276
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "dbk-card__body flex-1 min-w-0", "data-docubook": "card-body", children: [
277
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "dbk-card__title text-base font-semibold text-foreground leading-6", "data-docubook": "card-title", children: title }),
278
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "dbk-card__content text-sm text-muted-foreground -mt-3", "data-docubook": "card-content", children })
242
+ Icon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { className: (0, import_clsx3.default)("w-5 h-5 text-primary shrink-0", horizontal && "mt-0.5") }),
243
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex-1 min-w-0", children: [
244
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "text-base font-semibold text-foreground leading-6", children: title }),
245
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "text-sm text-muted-foreground -mt-3", children })
279
246
  ] })
280
247
  ]
281
248
  }
282
249
  );
283
250
  if (!href) return content;
284
251
  if (LinkComponent) {
285
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(LinkComponent, { href, className: "dbk-card__link no-underline block", "data-docubook": "card-link", children: content });
252
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(LinkComponent, { href, className: "no-underline block", children: content });
286
253
  }
287
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("a", { className: "dbk-card__link no-underline block", href, "data-docubook": "card-link", children: content });
254
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("a", { className: "no-underline block", href, children: content });
288
255
  }
289
256
 
290
257
  // src/core/components/CardGroup.tsx
@@ -306,40 +273,6 @@ function CardGroup({ children, cols = 2, className }) {
306
273
  var import_react4 = require("react");
307
274
  var import_lucide_react2 = require("lucide-react");
308
275
  var import_jsx_runtime7 = require("react/jsx-runtime");
309
- var fileDefaultClasses = {
310
- 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",
311
- rootHover: "bg-accent/10",
312
- icon: "h-3.5 w-3.5 shrink-0 transition-colors text-muted-foreground",
313
- iconHover: "text-accent",
314
- text: "font-mono text-sm text-foreground truncate",
315
- extension: "ml-auto text-xs text-muted-foreground/80"
316
- };
317
- var folderDefaultClasses = {
318
- root: "relative",
319
- header: "flex items-center gap-2 py-1.5 pl-4 pr-3 rounded-md transition-colors duration-150 select-none",
320
- headerHover: "bg-muted/60",
321
- headerOpen: "text-foreground",
322
- headerClosed: "text-foreground/80",
323
- headerPointer: "cursor-pointer",
324
- headerDefault: "cursor-default",
325
- chevron: "h-3.5 w-3.5 shrink-0 transition-transform duration-200",
326
- chevronOpen: "rotate-90",
327
- chevronHover: "text-foreground/70",
328
- chevronDefault: "text-muted-foreground",
329
- spacer: "w-3.5",
330
- icon: "h-4 w-4 shrink-0 transition-colors",
331
- iconOpenHover: "text-accent",
332
- iconOpenDefault: "text-muted-foreground",
333
- iconClosedHover: "text-accent/80",
334
- iconClosedDefault: "text-muted-foreground/80",
335
- text: "font-medium transition-colors duration-150",
336
- textHover: "text-accent",
337
- children: "ml-5 border-l-2 border-muted/50 pl-2"
338
- };
339
- var filesDefaultClasses = {
340
- 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",
341
- content: "p-2"
342
- };
343
276
  function FileComponent({
344
277
  name
345
278
  }) {
@@ -349,18 +282,24 @@ function FileComponent({
349
282
  "div",
350
283
  {
351
284
  className: cn(
352
- "dbk-file-tree__file",
353
- fileDefaultClasses.root,
354
- isHovered && fileDefaultClasses.rootHover
285
+ "flex items-center gap-2 py-1.5 pl-7 pr-3 text-sm rounded-md transition-colors duration-150 cursor-default select-none",
286
+ isHovered ? "bg-accent/10" : "hover:bg-muted/50"
355
287
  ),
356
- "data-docubook": "file-tree-file",
357
288
  onMouseEnter: () => setIsHovered(true),
358
289
  onMouseLeave: () => setIsHovered(false),
359
290
  tabIndex: -1,
360
291
  children: [
361
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react2.File, { className: cn("dbk-file-tree__file-icon", fileDefaultClasses.icon, isHovered && fileDefaultClasses.iconHover), "data-docubook": "file-tree-file-icon" }),
362
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cn("dbk-file-tree__file-text", fileDefaultClasses.text), "data-docubook": "file-tree-file-text", children: name }),
363
- isHovered && fileExtension && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cn("dbk-file-tree__file-extension", fileDefaultClasses.extension), "data-docubook": "file-tree-file-extension", children: fileExtension })
292
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
293
+ import_lucide_react2.File,
294
+ {
295
+ className: cn(
296
+ "h-3.5 w-3.5 shrink-0 transition-colors",
297
+ isHovered ? "text-accent" : "text-muted-foreground"
298
+ )
299
+ }
300
+ ),
301
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "font-mono text-sm text-foreground truncate", children: name }),
302
+ isHovered && fileExtension && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "ml-auto text-xs text-muted-foreground/80", children: fileExtension })
364
303
  ]
365
304
  }
366
305
  );
@@ -372,73 +311,73 @@ function FolderComponent({
372
311
  const [isOpen, setIsOpen] = (0, import_react4.useState)(true);
373
312
  const [isHovered, setIsHovered] = (0, import_react4.useState)(false);
374
313
  const hasChildren = import_react4.Children.count(children) > 0;
375
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: cn("dbk-file-tree__folder", folderDefaultClasses.root), "data-docubook": "file-tree-folder", children: [
314
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "relative", children: [
376
315
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
377
- "button",
316
+ "div",
378
317
  {
379
- type: "button",
380
318
  className: cn(
381
- "dbk-file-tree__folder-button",
382
- folderDefaultClasses.header,
383
- isHovered && folderDefaultClasses.headerHover,
384
- isOpen ? folderDefaultClasses.headerOpen : folderDefaultClasses.headerClosed,
385
- hasChildren ? folderDefaultClasses.headerPointer : folderDefaultClasses.headerDefault
319
+ "flex items-center gap-2 py-1.5 pl-4 pr-3 rounded-md transition-colors duration-150 select-none",
320
+ isHovered ? "bg-muted/60" : "",
321
+ isOpen ? "text-foreground" : "text-foreground/80",
322
+ hasChildren ? "cursor-pointer" : "cursor-default"
386
323
  ),
387
324
  onClick: () => hasChildren && setIsOpen(!isOpen),
388
325
  onMouseEnter: () => setIsHovered(true),
389
326
  onMouseLeave: () => setIsHovered(false),
327
+ tabIndex: -1,
328
+ onKeyDown: (event) => event.preventDefault(),
390
329
  "aria-expanded": hasChildren ? isOpen : void 0,
391
- "data-docubook": "file-tree-folder-button",
392
330
  children: [
393
331
  hasChildren ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
394
332
  import_lucide_react2.ChevronRight,
395
333
  {
396
334
  className: cn(
397
- "dbk-file-tree__folder-chevron",
398
- folderDefaultClasses.chevron,
399
- isOpen && folderDefaultClasses.chevronOpen,
400
- isHovered ? folderDefaultClasses.chevronHover : folderDefaultClasses.chevronDefault
401
- ),
402
- "data-docubook": "file-tree-folder-chevron"
335
+ "h-3.5 w-3.5 shrink-0 transition-transform duration-200",
336
+ isOpen ? "rotate-90" : "",
337
+ isHovered ? "text-foreground/70" : "text-muted-foreground"
338
+ )
403
339
  }
404
- ) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: cn("dbk-file-tree__folder-spacer", folderDefaultClasses.spacer), "data-docubook": "file-tree-folder-spacer" }),
340
+ ) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w-3.5" }),
405
341
  isOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
406
342
  import_lucide_react2.FolderOpen,
407
343
  {
408
344
  className: cn(
409
- "dbk-file-tree__folder-icon",
410
- folderDefaultClasses.icon,
411
- isHovered ? folderDefaultClasses.iconOpenHover : folderDefaultClasses.iconOpenDefault
412
- ),
413
- "data-docubook": "file-tree-folder-icon"
345
+ "h-4 w-4 shrink-0 transition-colors",
346
+ isHovered ? "text-accent" : "text-muted-foreground"
347
+ )
414
348
  }
415
349
  ) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
416
350
  import_lucide_react2.Folder,
417
351
  {
418
352
  className: cn(
419
- "dbk-file-tree__folder-icon",
420
- folderDefaultClasses.icon,
421
- isHovered ? folderDefaultClasses.iconClosedHover : folderDefaultClasses.iconClosedDefault
422
- ),
423
- "data-docubook": "file-tree-folder-icon"
353
+ "h-4 w-4 shrink-0 transition-colors",
354
+ isHovered ? "text-accent/80" : "text-muted-foreground/80"
355
+ )
424
356
  }
425
357
  ),
426
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cn("dbk-file-tree__folder-text", folderDefaultClasses.text, isHovered && folderDefaultClasses.textHover), "data-docubook": "file-tree-folder-text", children: name })
358
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cn("font-medium transition-colors duration-150", isHovered ? "text-accent" : ""), children: name })
427
359
  ]
428
360
  }
429
361
  ),
430
- isOpen && hasChildren && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: cn("dbk-file-tree__folder-children", folderDefaultClasses.children), "data-docubook": "file-tree-folder-children", children })
362
+ isOpen && hasChildren && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "ml-5 border-l-2 border-muted/50 pl-2", children })
431
363
  ] });
432
364
  }
433
365
  function Files({
434
366
  children
435
367
  }) {
436
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: cn("dbk-file-tree", filesDefaultClasses.root), "data-docubook": "file-tree", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: cn("dbk-file-tree__content", filesDefaultClasses.content), "data-docubook": "file-tree-content", children: import_react4.Children.map(children, (child, index) => {
437
- if ((0, import_react4.isValidElement)(child)) {
438
- return (0, import_react4.cloneElement)(child, { key: index });
368
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
369
+ "div",
370
+ {
371
+ 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",
372
+ onKeyDown: (event) => event.preventDefault(),
373
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "p-2", children: import_react4.Children.map(children, (child, index) => {
374
+ if ((0, import_react4.isValidElement)(child)) {
375
+ return (0, import_react4.cloneElement)(child, { key: index });
376
+ }
377
+ return null;
378
+ }) })
439
379
  }
440
- return null;
441
- }) }) });
380
+ );
442
381
  }
443
382
  function Folder({
444
383
  name,
@@ -626,8 +565,7 @@ function Kbd({
626
565
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
627
566
  "kbd",
628
567
  {
629
- 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",
630
- "data-docubook": "kbd",
568
+ 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",
631
569
  ...props,
632
570
  children: renderContent()
633
571
  }
@@ -695,24 +633,13 @@ function Note({
695
633
  ...props
696
634
  }) {
697
635
  const Icon = iconMap[type] || import_lucide_react4.Info;
698
- const noteRole = type === "danger" ? "alert" : "status";
699
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
700
- "div",
701
- {
702
- className: cn("dbk-note", noteVariants({ variant: type }), className),
703
- "data-docubook": "note",
704
- "data-variant": type,
705
- role: noteRole,
706
- ...props,
707
- children: [
708
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { className: cn("dbk-note__icon", noteDefaultClasses.icon), "data-docubook": "note-icon" }),
709
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cn("dbk-note__content-wrapper", noteDefaultClasses.contentWrapper), "data-docubook": "note-content-wrapper", children: [
710
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h5", { className: cn("dbk-note__title", noteDefaultClasses.title), "data-docubook": "note-title", children: title }),
711
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: cn("dbk-note__content", noteDefaultClasses.content), "data-docubook": "note-content", children })
712
- ] })
713
- ]
714
- }
715
- );
636
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cn(noteVariants({ variant: type }), className), ...props, children: [
637
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { className: noteDefaultClasses.icon }),
638
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: noteDefaultClasses.contentWrapper, children: [
639
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h5", { className: noteDefaultClasses.title, children: title }),
640
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: noteDefaultClasses.content, children })
641
+ ] })
642
+ ] });
716
643
  }
717
644
 
718
645
  // src/core/components/Copy.tsx
@@ -732,18 +659,14 @@ function Copy({ content }) {
732
659
  setIsCopied(false);
733
660
  }
734
661
  }
735
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
662
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
736
663
  "button",
737
664
  {
738
665
  type: "button",
739
- 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",
666
+ className: "border cursor-copy inline-flex h-6 w-6 items-center justify-center rounded-md",
740
667
  onClick: handleCopy,
741
668
  "aria-label": isCopied ? "Copied" : "Copy code",
742
- "data-docubook": "copy-button",
743
- children: [
744
- isCopied ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.ClipboardCheckIcon, { className: "dbk-copy__icon w-3 h-3", "data-docubook": "copy-icon" }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.ClipboardIcon, { className: "dbk-copy__icon w-3 h-3", "data-docubook": "copy-icon" }),
745
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sr-only", "aria-live": "polite", children: isCopied ? "Copied" : "Copy" })
746
- ]
669
+ children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.ClipboardCheckIcon, { className: "w-3 h-3" }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.ClipboardIcon, { className: "w-3 h-3" })
747
670
  }
748
671
  );
749
672
  }
@@ -818,31 +741,30 @@ var import_react7 = require("react");
818
741
  var import_lucide_react6 = require("lucide-react");
819
742
  var import_jsx_runtime14 = require("react/jsx-runtime");
820
743
  function Release({ version, title, date, children }) {
821
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dbk-release mb-16 group", "data-docubook": "release", children: [
822
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dbk-release__header flex items-center gap-3 mt-6 mb-2", "data-docubook": "release-header", children: [
744
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "mb-16 group", children: [
745
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-3 mt-6 mb-2", children: [
823
746
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
824
747
  "div",
825
748
  {
826
749
  id: version,
827
- 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",
828
- "data-docubook": "release-version",
750
+ 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",
829
751
  children: [
830
752
  "v",
831
753
  version
832
754
  ]
833
755
  }
834
756
  ),
835
- date && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dbk-release__date-wrapper flex items-center gap-3 text-sm font-medium text-muted-foreground", "data-docubook": "release-date-wrapper", children: [
757
+ date && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-3 text-sm font-medium text-muted-foreground", children: [
836
758
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "h-1 w-1 rounded-full bg-muted-foreground/30" }),
837
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("time", { className: "dbk-release__date", "data-docubook": "release-date", dateTime: date, children: new Date(date).toLocaleDateString("en-US", {
759
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("time", { dateTime: date, children: new Date(date).toLocaleDateString("en-US", {
838
760
  year: "numeric",
839
761
  month: "long",
840
762
  day: "numeric"
841
763
  }) })
842
764
  ] })
843
765
  ] }),
844
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h3", { className: "dbk-release__title text-2xl font-bold text-foreground/90 mb-6 mt-0!", "data-docubook": "release-title", children: title }),
845
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "dbk-release__content space-y-8", "data-docubook": "release-content", children })
766
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h3", { className: "text-2xl font-bold text-foreground/90 mb-6 mt-0!", children: title }),
767
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "space-y-8", children })
846
768
  ] });
847
769
  }
848
770
  var typeConfig = {
@@ -874,25 +796,23 @@ var typeConfig = {
874
796
  };
875
797
  function Changes({ type, children }) {
876
798
  const config = typeConfig[type] || typeConfig.added;
877
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dbk-release-changes space-y-3 mb-8", "data-docubook": "release-changes", "data-type": type, children: [
878
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "dbk-release-changes__header flex items-center gap-2", "data-docubook": "release-changes-header", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
799
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "space-y-3 mb-8", children: [
800
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
879
801
  "div",
880
802
  {
881
803
  className: cn(
882
- "dbk-release-changes__badge",
883
804
  "px-3 py-1 rounded-full text-sm font-medium flex items-center gap-1.5",
884
805
  config.className
885
806
  ),
886
- "data-docubook": "release-changes-badge",
887
807
  children: [
888
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(config.icon, { className: "dbk-release-changes__icon h-3.5 w-3.5", "data-docubook": "release-changes-icon" }),
889
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "dbk-release-changes__label", "data-docubook": "release-changes-label", children: config.label })
808
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(config.icon, { className: "h-3.5 w-3.5" }),
809
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: config.label })
890
810
  ]
891
811
  }
892
812
  ) }),
893
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "dbk-release-changes__list list-none pl-0 space-y-2 text-foreground/80", "data-docubook": "release-changes-list", children: import_react7.Children.map(children, (child, index) => {
813
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "list-none pl-0 space-y-2 text-foreground/80", children: import_react7.Children.map(children, (child, index) => {
894
814
  const processedChild = typeof child === "string" ? child.trim().replace(/^[-*]\s+/, "") : child;
895
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { className: "dbk-release-changes__item leading-relaxed", "data-docubook": "release-changes-item", children: processedChild }, index);
815
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { className: "leading-relaxed", children: processedChild }, index);
896
816
  }) })
897
817
  ] });
898
818
  }
@@ -901,35 +821,22 @@ function Changes({ type, children }) {
901
821
  var import_clsx5 = __toESM(require("clsx"), 1);
902
822
  var import_react8 = require("react");
903
823
  var import_jsx_runtime15 = require("react/jsx-runtime");
904
- var stepperDefaultClasses = {
905
- root: "flex flex-col",
906
- item: "border-l border-muted pl-9 ml-3 relative",
907
- itemWithConnector: "pb-5 ",
908
- 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"
909
- };
910
- var stepperItemDefaultClasses = {
911
- root: "pt-0.5",
912
- title: "mt-0",
913
- content: ""
914
- };
915
824
  function Stepper({
916
825
  children
917
826
  }) {
918
827
  const length = import_react8.Children.count(children);
919
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ol", { className: cn("dbk-stepper", stepperDefaultClasses.root), "data-docubook": "stepper", children: import_react8.Children.map(children, (child, index) => {
828
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex flex-col", children: import_react8.Children.map(children, (child, index) => {
920
829
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
921
- "li",
830
+ "div",
922
831
  {
923
832
  className: cn(
924
- "dbk-stepper__item",
925
- stepperDefaultClasses.item,
833
+ "border-l border-muted pl-9 ml-3 relative",
926
834
  (0, import_clsx5.default)({
927
- [stepperDefaultClasses.itemWithConnector]: index < length - 1
835
+ "pb-5 ": index < length - 1
928
836
  })
929
837
  ),
930
- "data-docubook": "stepper-item",
931
838
  children: [
932
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: cn("dbk-stepper__number", stepperDefaultClasses.number), "data-docubook": "stepper-number", "aria-hidden": "true", children: index + 1 }),
839
+ /* @__PURE__ */ (0, import_jsx_runtime15.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 }),
933
840
  child
934
841
  ]
935
842
  }
@@ -940,49 +847,34 @@ function StepperItem({
940
847
  children,
941
848
  title
942
849
  }) {
943
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cn("dbk-stepper-item", stepperItemDefaultClasses.root), "data-docubook": "stepper-item-content", children: [
944
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { className: cn("dbk-stepper-item__title", stepperItemDefaultClasses.title), "data-docubook": "stepper-item-title", children: title }),
945
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: cn("dbk-stepper-item__content", stepperItemDefaultClasses.content), "data-docubook": "stepper-item-body", children })
850
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "pt-0.5", children: [
851
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { className: "mt-0", children: title }),
852
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children })
946
853
  ] });
947
854
  }
948
855
 
949
856
  // src/core/components/Tooltip.tsx
950
857
  var import_react9 = require("react");
951
858
  var import_jsx_runtime16 = require("react/jsx-runtime");
952
- var tooltipDefaultClasses = {
953
- root: "relative inline-flex items-center cursor-help text-primary hover:text-primary/80 transition-colors",
954
- trigger: "border-b border-dashed border-primary/60 pb-0.5",
955
- 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",
956
- 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"
957
- };
958
859
  var Tooltip = ({ text, tip }) => {
959
860
  const [visible, setVisible] = (0, import_react9.useState)(false);
960
861
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
961
862
  "span",
962
863
  {
963
- className: cn("dbk-tooltip", tooltipDefaultClasses.root),
964
- "data-docubook": "tooltip",
864
+ className: "relative inline-flex items-center cursor-help text-primary hover:text-primary/80 transition-colors",
965
865
  onMouseEnter: () => setVisible(true),
966
866
  onMouseLeave: () => setVisible(false),
967
867
  children: [
968
868
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
969
- "button",
869
+ "span",
970
870
  {
971
- type: "button",
972
- className: cn("dbk-tooltip__trigger", tooltipDefaultClasses.trigger),
973
- "data-docubook": "tooltip-trigger",
974
- onFocus: () => setVisible(true),
975
- onBlur: () => setVisible(false),
976
- onKeyDown: (event) => {
977
- if (event.key === "Escape") setVisible(false);
978
- },
979
- "aria-expanded": visible,
871
+ className: "border-b border-dashed border-primary/60 pb-0.5",
980
872
  children: text
981
873
  }
982
874
  ),
983
- visible && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: cn("dbk-tooltip__content", tooltipDefaultClasses.content), role: "tooltip", "data-docubook": "tooltip-content", children: [
875
+ visible && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("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: [
984
876
  tip,
985
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: cn("dbk-tooltip__arrow", tooltipDefaultClasses.arrow), "data-docubook": "tooltip-arrow" })
877
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("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" })
986
878
  ] })
987
879
  ]
988
880
  }