@docubook/mdx 1.0.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 +26 -0
- package/dist/{Stepper-B7xt0Dyr.d.cts → Stepper-I9nywkZb.d.cts} +1 -1
- package/dist/{Stepper-B7xt0Dyr.d.ts → Stepper-I9nywkZb.d.ts} +1 -1
- package/dist/core/index.cjs +85 -47
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +86 -48
- package/dist/core/server.cjs +14 -6
- package/dist/core/server.d.cts +2 -2
- package/dist/core/server.d.ts +2 -2
- package/dist/core/server.js +14 -6
- package/dist/index.cjs +14 -6
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
Framework-agnostic MDX components for React with adapter entrypoints.
|
|
4
4
|
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
Install from npm registry:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @docubook/mdx
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm add @docubook/mdx
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
yarn add @docubook/mdx
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
bun add @docubook/mdx
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If you are using a pnpm workspace/monorepo and want to add it to a specific app package, run the command from that app directory, or use filter:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pnpm --filter <your-app-package-name> add @docubook/mdx
|
|
29
|
+
```
|
|
30
|
+
|
|
5
31
|
## Entrypoints
|
|
6
32
|
|
|
7
33
|
- `@docubook/mdx`: server-safe convenience export (alias to subset `core/server`).
|
|
@@ -45,7 +45,7 @@ interface ChangesProps extends PropsWithChildren {
|
|
|
45
45
|
}
|
|
46
46
|
declare function Changes({ type, children }: ChangesProps): react_jsx_runtime.JSX.Element;
|
|
47
47
|
|
|
48
|
-
declare function Stepper({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
48
|
+
declare function Stepper({ children, }: PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
49
49
|
declare function StepperItem({ children, title, }: PropsWithChildren & {
|
|
50
50
|
title?: string;
|
|
51
51
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -45,7 +45,7 @@ interface ChangesProps extends PropsWithChildren {
|
|
|
45
45
|
}
|
|
46
46
|
declare function Changes({ type, children }: ChangesProps): react_jsx_runtime.JSX.Element;
|
|
47
47
|
|
|
48
|
-
declare function Stepper({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
48
|
+
declare function Stepper({ children, }: PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
49
49
|
declare function StepperItem({ children, title, }: PropsWithChildren & {
|
|
50
50
|
title?: string;
|
|
51
51
|
}): react_jsx_runtime.JSX.Element;
|
package/dist/core/index.cjs
CHANGED
|
@@ -86,6 +86,9 @@ function AccordionGroupProvider({ children }) {
|
|
|
86
86
|
// src/core/components/Accordion.tsx
|
|
87
87
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
88
88
|
function Accordion({ title, children, icon }) {
|
|
89
|
+
const baseId = (0, import_react2.useId)();
|
|
90
|
+
const triggerId = `${baseId}-trigger`;
|
|
91
|
+
const contentId = `${baseId}-content`;
|
|
89
92
|
const groupContext = (0, import_react2.useContext)(AccordionGroupContext);
|
|
90
93
|
const isInGroup = groupContext?.inGroup === true;
|
|
91
94
|
const groupOpen = groupContext?.openTitle === title;
|
|
@@ -114,6 +117,9 @@ function Accordion({ title, children, icon }) {
|
|
|
114
117
|
type: "button",
|
|
115
118
|
onClick: handleToggle,
|
|
116
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",
|
|
120
|
+
"aria-expanded": isOpen,
|
|
121
|
+
"aria-controls": contentId,
|
|
122
|
+
id: triggerId,
|
|
117
123
|
children: [
|
|
118
124
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
119
125
|
import_lucide_react.ChevronRight,
|
|
@@ -136,6 +142,9 @@ function Accordion({ title, children, icon }) {
|
|
|
136
142
|
"grid transition-[grid-template-rows] duration-200 ease-out",
|
|
137
143
|
isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
138
144
|
),
|
|
145
|
+
id: contentId,
|
|
146
|
+
role: "region",
|
|
147
|
+
"aria-labelledby": triggerId,
|
|
139
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 }) })
|
|
140
149
|
}
|
|
141
150
|
)
|
|
@@ -264,17 +273,18 @@ function CardGroup({ children, cols = 2, className }) {
|
|
|
264
273
|
var import_react4 = require("react");
|
|
265
274
|
var import_lucide_react2 = require("lucide-react");
|
|
266
275
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
267
|
-
function FileComponent({
|
|
276
|
+
function FileComponent({
|
|
277
|
+
name
|
|
278
|
+
}) {
|
|
268
279
|
const [isHovered, setIsHovered] = (0, import_react4.useState)(false);
|
|
269
280
|
const fileExtension = name.split(".").pop()?.toUpperCase();
|
|
270
281
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
271
282
|
"div",
|
|
272
283
|
{
|
|
273
|
-
className:
|
|
274
|
-
flex items-center gap-2 py-1.5 pl-7 pr-3 text-sm rounded-md
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
`,
|
|
284
|
+
className: cn(
|
|
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"
|
|
287
|
+
),
|
|
278
288
|
onMouseEnter: () => setIsHovered(true),
|
|
279
289
|
onMouseLeave: () => setIsHovered(false),
|
|
280
290
|
tabIndex: -1,
|
|
@@ -282,10 +292,10 @@ function FileComponent({ name }) {
|
|
|
282
292
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
283
293
|
import_lucide_react2.File,
|
|
284
294
|
{
|
|
285
|
-
className:
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
295
|
+
className: cn(
|
|
296
|
+
"h-3.5 w-3.5 shrink-0 transition-colors",
|
|
297
|
+
isHovered ? "text-accent" : "text-muted-foreground"
|
|
298
|
+
)
|
|
289
299
|
}
|
|
290
300
|
),
|
|
291
301
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "font-mono text-sm text-foreground truncate", children: name }),
|
|
@@ -294,7 +304,10 @@ function FileComponent({ name }) {
|
|
|
294
304
|
}
|
|
295
305
|
);
|
|
296
306
|
}
|
|
297
|
-
function FolderComponent({
|
|
307
|
+
function FolderComponent({
|
|
308
|
+
name,
|
|
309
|
+
children
|
|
310
|
+
}) {
|
|
298
311
|
const [isOpen, setIsOpen] = (0, import_react4.useState)(true);
|
|
299
312
|
const [isHovered, setIsHovered] = (0, import_react4.useState)(false);
|
|
300
313
|
const hasChildren = import_react4.Children.count(children) > 0;
|
|
@@ -302,57 +315,61 @@ function FolderComponent({ name, children }) {
|
|
|
302
315
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
303
316
|
"div",
|
|
304
317
|
{
|
|
305
|
-
className:
|
|
306
|
-
flex items-center gap-2 py-1.5 pl-4 pr-3 rounded-md
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
`,
|
|
318
|
+
className: cn(
|
|
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"
|
|
323
|
+
),
|
|
312
324
|
onClick: () => hasChildren && setIsOpen(!isOpen),
|
|
313
325
|
onMouseEnter: () => setIsHovered(true),
|
|
314
326
|
onMouseLeave: () => setIsHovered(false),
|
|
315
327
|
tabIndex: -1,
|
|
328
|
+
onKeyDown: (event) => event.preventDefault(),
|
|
329
|
+
"aria-expanded": hasChildren ? isOpen : void 0,
|
|
316
330
|
children: [
|
|
317
331
|
hasChildren ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
318
332
|
import_lucide_react2.ChevronRight,
|
|
319
333
|
{
|
|
320
|
-
className:
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
334
|
+
className: cn(
|
|
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
|
+
)
|
|
325
339
|
}
|
|
326
340
|
) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w-3.5" }),
|
|
327
341
|
isOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
328
342
|
import_lucide_react2.FolderOpen,
|
|
329
343
|
{
|
|
330
|
-
className:
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
344
|
+
className: cn(
|
|
345
|
+
"h-4 w-4 shrink-0 transition-colors",
|
|
346
|
+
isHovered ? "text-accent" : "text-muted-foreground"
|
|
347
|
+
)
|
|
334
348
|
}
|
|
335
349
|
) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
336
350
|
import_lucide_react2.Folder,
|
|
337
351
|
{
|
|
338
|
-
className:
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
352
|
+
className: cn(
|
|
353
|
+
"h-4 w-4 shrink-0 transition-colors",
|
|
354
|
+
isHovered ? "text-accent/80" : "text-muted-foreground/80"
|
|
355
|
+
)
|
|
342
356
|
}
|
|
343
357
|
),
|
|
344
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className:
|
|
358
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cn("font-medium transition-colors duration-150", isHovered ? "text-accent" : ""), children: name })
|
|
345
359
|
]
|
|
346
360
|
}
|
|
347
361
|
),
|
|
348
362
|
isOpen && hasChildren && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "ml-5 border-l-2 border-muted/50 pl-2", children })
|
|
349
363
|
] });
|
|
350
364
|
}
|
|
351
|
-
function Files({
|
|
365
|
+
function Files({
|
|
366
|
+
children
|
|
367
|
+
}) {
|
|
352
368
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
353
369
|
"div",
|
|
354
370
|
{
|
|
355
|
-
className: "
|
|
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(),
|
|
356
373
|
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "p-2", children: import_react4.Children.map(children, (child, index) => {
|
|
357
374
|
if ((0, import_react4.isValidElement)(child)) {
|
|
358
375
|
return (0, import_react4.cloneElement)(child, { key: index });
|
|
@@ -362,7 +379,10 @@ function Files({ children }) {
|
|
|
362
379
|
}
|
|
363
380
|
);
|
|
364
381
|
}
|
|
365
|
-
function Folder({
|
|
382
|
+
function Folder({
|
|
383
|
+
name,
|
|
384
|
+
children
|
|
385
|
+
}) {
|
|
366
386
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FolderComponent, { name, children });
|
|
367
387
|
}
|
|
368
388
|
function File({ name }) {
|
|
@@ -599,6 +619,12 @@ var iconMap = {
|
|
|
599
619
|
warning: import_lucide_react4.AlertTriangle,
|
|
600
620
|
success: import_lucide_react4.CheckCircle2
|
|
601
621
|
};
|
|
622
|
+
var noteDefaultClasses = {
|
|
623
|
+
icon: "h-5 w-5",
|
|
624
|
+
contentWrapper: "pl-8",
|
|
625
|
+
title: "mb-1 font-medium leading-none tracking-tight",
|
|
626
|
+
content: "text-sm [&_p]:leading-relaxed opacity-90"
|
|
627
|
+
};
|
|
602
628
|
function Note({
|
|
603
629
|
className,
|
|
604
630
|
title = "Note",
|
|
@@ -608,10 +634,10 @@ function Note({
|
|
|
608
634
|
}) {
|
|
609
635
|
const Icon = iconMap[type] || import_lucide_react4.Info;
|
|
610
636
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cn(noteVariants({ variant: type }), className), ...props, children: [
|
|
611
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { className:
|
|
612
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className:
|
|
613
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h5", { className:
|
|
614
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className:
|
|
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 })
|
|
615
641
|
] })
|
|
616
642
|
] });
|
|
617
643
|
}
|
|
@@ -623,11 +649,15 @@ var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
|
623
649
|
function Copy({ content }) {
|
|
624
650
|
const [isCopied, setIsCopied] = (0, import_react6.useState)(false);
|
|
625
651
|
async function handleCopy() {
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
652
|
+
try {
|
|
653
|
+
await navigator.clipboard.writeText(content);
|
|
654
|
+
setIsCopied(true);
|
|
655
|
+
setTimeout(() => {
|
|
656
|
+
setIsCopied(false);
|
|
657
|
+
}, 2e3);
|
|
658
|
+
} catch {
|
|
629
659
|
setIsCopied(false);
|
|
630
|
-
}
|
|
660
|
+
}
|
|
631
661
|
}
|
|
632
662
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
633
663
|
"button",
|
|
@@ -791,7 +821,9 @@ function Changes({ type, children }) {
|
|
|
791
821
|
var import_clsx5 = __toESM(require("clsx"), 1);
|
|
792
822
|
var import_react8 = require("react");
|
|
793
823
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
794
|
-
function Stepper({
|
|
824
|
+
function Stepper({
|
|
825
|
+
children
|
|
826
|
+
}) {
|
|
795
827
|
const length = import_react8.Children.count(children);
|
|
796
828
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex flex-col", children: import_react8.Children.map(children, (child, index) => {
|
|
797
829
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
@@ -804,7 +836,7 @@ function Stepper({ children }) {
|
|
|
804
836
|
})
|
|
805
837
|
),
|
|
806
838
|
children: [
|
|
807
|
-
/* @__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", 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 }),
|
|
808
840
|
child
|
|
809
841
|
]
|
|
810
842
|
}
|
|
@@ -833,8 +865,14 @@ var Tooltip = ({ text, tip }) => {
|
|
|
833
865
|
onMouseEnter: () => setVisible(true),
|
|
834
866
|
onMouseLeave: () => setVisible(false),
|
|
835
867
|
children: [
|
|
836
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
837
|
-
|
|
868
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
869
|
+
"span",
|
|
870
|
+
{
|
|
871
|
+
className: "border-b border-dashed border-primary/60 pb-0.5",
|
|
872
|
+
children: text
|
|
873
|
+
}
|
|
874
|
+
),
|
|
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: [
|
|
838
876
|
tip,
|
|
839
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" })
|
|
840
878
|
] })
|
package/dist/core/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FC, ReactNode, ComponentProps } from 'react';
|
|
3
|
-
import { C as CardGroup, K as Kbd, N as Note, S as Stepper, a as StepperItem, Y as YoutubeProps, R as Release, b as Changes, L as Link } from '../Stepper-
|
|
4
|
-
export { c as Youtube } from '../Stepper-
|
|
3
|
+
import { C as CardGroup, K as Kbd, N as Note, S as Stepper, a as StepperItem, Y as YoutubeProps, R as Release, b as Changes, L as Link } from '../Stepper-I9nywkZb.cjs';
|
|
4
|
+
export { c as Youtube } from '../Stepper-I9nywkZb.cjs';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import * as Icons from 'lucide-react';
|
|
7
7
|
import { B as Button, C as Card } from '../Card-L5O7G4xG.cjs';
|
|
@@ -33,10 +33,10 @@ interface FileProps {
|
|
|
33
33
|
name: string;
|
|
34
34
|
children?: ReactNode;
|
|
35
35
|
}
|
|
36
|
-
declare function Files({ children }: {
|
|
36
|
+
declare function Files({ children, }: {
|
|
37
37
|
children: ReactNode;
|
|
38
38
|
}): react_jsx_runtime.JSX.Element;
|
|
39
|
-
declare function Folder({ name, children }: FileProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
declare function Folder({ name, children, }: FileProps): react_jsx_runtime.JSX.Element;
|
|
40
40
|
declare function File({ name }: FileProps): react_jsx_runtime.JSX.Element;
|
|
41
41
|
|
|
42
42
|
type PreProps = ComponentProps<"pre"> & {
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FC, ReactNode, ComponentProps } from 'react';
|
|
3
|
-
import { C as CardGroup, K as Kbd, N as Note, S as Stepper, a as StepperItem, Y as YoutubeProps, R as Release, b as Changes, L as Link } from '../Stepper-
|
|
4
|
-
export { c as Youtube } from '../Stepper-
|
|
3
|
+
import { C as CardGroup, K as Kbd, N as Note, S as Stepper, a as StepperItem, Y as YoutubeProps, R as Release, b as Changes, L as Link } from '../Stepper-I9nywkZb.js';
|
|
4
|
+
export { c as Youtube } from '../Stepper-I9nywkZb.js';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import * as Icons from 'lucide-react';
|
|
7
7
|
import { B as Button, C as Card } from '../Card-L5O7G4xG.js';
|
|
@@ -33,10 +33,10 @@ interface FileProps {
|
|
|
33
33
|
name: string;
|
|
34
34
|
children?: ReactNode;
|
|
35
35
|
}
|
|
36
|
-
declare function Files({ children }: {
|
|
36
|
+
declare function Files({ children, }: {
|
|
37
37
|
children: ReactNode;
|
|
38
38
|
}): react_jsx_runtime.JSX.Element;
|
|
39
|
-
declare function Folder({ name, children }: FileProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
declare function Folder({ name, children, }: FileProps): react_jsx_runtime.JSX.Element;
|
|
40
40
|
declare function File({ name }: FileProps): react_jsx_runtime.JSX.Element;
|
|
41
41
|
|
|
42
42
|
type PreProps = ComponentProps<"pre"> & {
|
package/dist/core/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
// src/core/components/Accordion.tsx
|
|
4
|
-
import { useContext, useState as useState2 } from "react";
|
|
4
|
+
import { useContext, useId as useId2, useState as useState2 } from "react";
|
|
5
5
|
import { ChevronRight } from "lucide-react";
|
|
6
6
|
import * as Icons from "lucide-react";
|
|
7
7
|
|
|
@@ -31,6 +31,9 @@ function AccordionGroupProvider({ children }) {
|
|
|
31
31
|
// src/core/components/Accordion.tsx
|
|
32
32
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
33
33
|
function Accordion({ title, children, icon }) {
|
|
34
|
+
const baseId = useId2();
|
|
35
|
+
const triggerId = `${baseId}-trigger`;
|
|
36
|
+
const contentId = `${baseId}-content`;
|
|
34
37
|
const groupContext = useContext(AccordionGroupContext);
|
|
35
38
|
const isInGroup = groupContext?.inGroup === true;
|
|
36
39
|
const groupOpen = groupContext?.openTitle === title;
|
|
@@ -59,6 +62,9 @@ function Accordion({ title, children, icon }) {
|
|
|
59
62
|
type: "button",
|
|
60
63
|
onClick: handleToggle,
|
|
61
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",
|
|
65
|
+
"aria-expanded": isOpen,
|
|
66
|
+
"aria-controls": contentId,
|
|
67
|
+
id: triggerId,
|
|
62
68
|
children: [
|
|
63
69
|
/* @__PURE__ */ jsx2(
|
|
64
70
|
ChevronRight,
|
|
@@ -81,6 +87,9 @@ function Accordion({ title, children, icon }) {
|
|
|
81
87
|
"grid transition-[grid-template-rows] duration-200 ease-out",
|
|
82
88
|
isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
83
89
|
),
|
|
90
|
+
id: contentId,
|
|
91
|
+
role: "region",
|
|
92
|
+
"aria-labelledby": triggerId,
|
|
84
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 }) })
|
|
85
94
|
}
|
|
86
95
|
)
|
|
@@ -219,17 +228,18 @@ import {
|
|
|
219
228
|
FolderOpen
|
|
220
229
|
} from "lucide-react";
|
|
221
230
|
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
222
|
-
function FileComponent({
|
|
231
|
+
function FileComponent({
|
|
232
|
+
name
|
|
233
|
+
}) {
|
|
223
234
|
const [isHovered, setIsHovered] = useState3(false);
|
|
224
235
|
const fileExtension = name.split(".").pop()?.toUpperCase();
|
|
225
236
|
return /* @__PURE__ */ jsxs4(
|
|
226
237
|
"div",
|
|
227
238
|
{
|
|
228
|
-
className:
|
|
229
|
-
flex items-center gap-2 py-1.5 pl-7 pr-3 text-sm rounded-md
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
`,
|
|
239
|
+
className: cn(
|
|
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"
|
|
242
|
+
),
|
|
233
243
|
onMouseEnter: () => setIsHovered(true),
|
|
234
244
|
onMouseLeave: () => setIsHovered(false),
|
|
235
245
|
tabIndex: -1,
|
|
@@ -237,10 +247,10 @@ function FileComponent({ name }) {
|
|
|
237
247
|
/* @__PURE__ */ jsx7(
|
|
238
248
|
FileIcon,
|
|
239
249
|
{
|
|
240
|
-
className:
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
250
|
+
className: cn(
|
|
251
|
+
"h-3.5 w-3.5 shrink-0 transition-colors",
|
|
252
|
+
isHovered ? "text-accent" : "text-muted-foreground"
|
|
253
|
+
)
|
|
244
254
|
}
|
|
245
255
|
),
|
|
246
256
|
/* @__PURE__ */ jsx7("span", { className: "font-mono text-sm text-foreground truncate", children: name }),
|
|
@@ -249,7 +259,10 @@ function FileComponent({ name }) {
|
|
|
249
259
|
}
|
|
250
260
|
);
|
|
251
261
|
}
|
|
252
|
-
function FolderComponent({
|
|
262
|
+
function FolderComponent({
|
|
263
|
+
name,
|
|
264
|
+
children
|
|
265
|
+
}) {
|
|
253
266
|
const [isOpen, setIsOpen] = useState3(true);
|
|
254
267
|
const [isHovered, setIsHovered] = useState3(false);
|
|
255
268
|
const hasChildren = Children.count(children) > 0;
|
|
@@ -257,57 +270,61 @@ function FolderComponent({ name, children }) {
|
|
|
257
270
|
/* @__PURE__ */ jsxs4(
|
|
258
271
|
"div",
|
|
259
272
|
{
|
|
260
|
-
className:
|
|
261
|
-
flex items-center gap-2 py-1.5 pl-4 pr-3 rounded-md
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
`,
|
|
273
|
+
className: cn(
|
|
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"
|
|
278
|
+
),
|
|
267
279
|
onClick: () => hasChildren && setIsOpen(!isOpen),
|
|
268
280
|
onMouseEnter: () => setIsHovered(true),
|
|
269
281
|
onMouseLeave: () => setIsHovered(false),
|
|
270
282
|
tabIndex: -1,
|
|
283
|
+
onKeyDown: (event) => event.preventDefault(),
|
|
284
|
+
"aria-expanded": hasChildren ? isOpen : void 0,
|
|
271
285
|
children: [
|
|
272
286
|
hasChildren ? /* @__PURE__ */ jsx7(
|
|
273
287
|
ChevronRight2,
|
|
274
288
|
{
|
|
275
|
-
className:
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
289
|
+
className: cn(
|
|
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
|
+
)
|
|
280
294
|
}
|
|
281
295
|
) : /* @__PURE__ */ jsx7("div", { className: "w-3.5" }),
|
|
282
296
|
isOpen ? /* @__PURE__ */ jsx7(
|
|
283
297
|
FolderOpen,
|
|
284
298
|
{
|
|
285
|
-
className:
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
299
|
+
className: cn(
|
|
300
|
+
"h-4 w-4 shrink-0 transition-colors",
|
|
301
|
+
isHovered ? "text-accent" : "text-muted-foreground"
|
|
302
|
+
)
|
|
289
303
|
}
|
|
290
304
|
) : /* @__PURE__ */ jsx7(
|
|
291
305
|
FolderIcon,
|
|
292
306
|
{
|
|
293
|
-
className:
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
307
|
+
className: cn(
|
|
308
|
+
"h-4 w-4 shrink-0 transition-colors",
|
|
309
|
+
isHovered ? "text-accent/80" : "text-muted-foreground/80"
|
|
310
|
+
)
|
|
297
311
|
}
|
|
298
312
|
),
|
|
299
|
-
/* @__PURE__ */ jsx7("span", { className:
|
|
313
|
+
/* @__PURE__ */ jsx7("span", { className: cn("font-medium transition-colors duration-150", isHovered ? "text-accent" : ""), children: name })
|
|
300
314
|
]
|
|
301
315
|
}
|
|
302
316
|
),
|
|
303
317
|
isOpen && hasChildren && /* @__PURE__ */ jsx7("div", { className: "ml-5 border-l-2 border-muted/50 pl-2", children })
|
|
304
318
|
] });
|
|
305
319
|
}
|
|
306
|
-
function Files({
|
|
320
|
+
function Files({
|
|
321
|
+
children
|
|
322
|
+
}) {
|
|
307
323
|
return /* @__PURE__ */ jsx7(
|
|
308
324
|
"div",
|
|
309
325
|
{
|
|
310
|
-
className: "
|
|
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(),
|
|
311
328
|
children: /* @__PURE__ */ jsx7("div", { className: "p-2", children: Children.map(children, (child, index) => {
|
|
312
329
|
if (isValidElement(child)) {
|
|
313
330
|
return cloneElement(child, { key: index });
|
|
@@ -317,7 +334,10 @@ function Files({ children }) {
|
|
|
317
334
|
}
|
|
318
335
|
);
|
|
319
336
|
}
|
|
320
|
-
function Folder({
|
|
337
|
+
function Folder({
|
|
338
|
+
name,
|
|
339
|
+
children
|
|
340
|
+
}) {
|
|
321
341
|
return /* @__PURE__ */ jsx7(FolderComponent, { name, children });
|
|
322
342
|
}
|
|
323
343
|
function File({ name }) {
|
|
@@ -559,6 +579,12 @@ var iconMap = {
|
|
|
559
579
|
warning: AlertTriangle,
|
|
560
580
|
success: CheckCircle2
|
|
561
581
|
};
|
|
582
|
+
var noteDefaultClasses = {
|
|
583
|
+
icon: "h-5 w-5",
|
|
584
|
+
contentWrapper: "pl-8",
|
|
585
|
+
title: "mb-1 font-medium leading-none tracking-tight",
|
|
586
|
+
content: "text-sm [&_p]:leading-relaxed opacity-90"
|
|
587
|
+
};
|
|
562
588
|
function Note({
|
|
563
589
|
className,
|
|
564
590
|
title = "Note",
|
|
@@ -568,10 +594,10 @@ function Note({
|
|
|
568
594
|
}) {
|
|
569
595
|
const Icon = iconMap[type] || Info;
|
|
570
596
|
return /* @__PURE__ */ jsxs6("div", { className: cn(noteVariants({ variant: type }), className), ...props, children: [
|
|
571
|
-
/* @__PURE__ */ jsx11(Icon, { className:
|
|
572
|
-
/* @__PURE__ */ jsxs6("div", { className:
|
|
573
|
-
/* @__PURE__ */ jsx11("h5", { className:
|
|
574
|
-
/* @__PURE__ */ jsx11("div", { className:
|
|
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 })
|
|
575
601
|
] })
|
|
576
602
|
] });
|
|
577
603
|
}
|
|
@@ -583,11 +609,15 @@ import { jsx as jsx12 } from "react/jsx-runtime";
|
|
|
583
609
|
function Copy({ content }) {
|
|
584
610
|
const [isCopied, setIsCopied] = useState5(false);
|
|
585
611
|
async function handleCopy() {
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
612
|
+
try {
|
|
613
|
+
await navigator.clipboard.writeText(content);
|
|
614
|
+
setIsCopied(true);
|
|
615
|
+
setTimeout(() => {
|
|
616
|
+
setIsCopied(false);
|
|
617
|
+
}, 2e3);
|
|
618
|
+
} catch {
|
|
589
619
|
setIsCopied(false);
|
|
590
|
-
}
|
|
620
|
+
}
|
|
591
621
|
}
|
|
592
622
|
return /* @__PURE__ */ jsx12(
|
|
593
623
|
"button",
|
|
@@ -779,7 +809,9 @@ function Changes({ type, children }) {
|
|
|
779
809
|
import clsx5 from "clsx";
|
|
780
810
|
import { Children as Children3 } from "react";
|
|
781
811
|
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
782
|
-
function Stepper({
|
|
812
|
+
function Stepper({
|
|
813
|
+
children
|
|
814
|
+
}) {
|
|
783
815
|
const length = Children3.count(children);
|
|
784
816
|
return /* @__PURE__ */ jsx15("div", { className: "flex flex-col", children: Children3.map(children, (child, index) => {
|
|
785
817
|
return /* @__PURE__ */ jsxs9(
|
|
@@ -792,7 +824,7 @@ function Stepper({ children }) {
|
|
|
792
824
|
})
|
|
793
825
|
),
|
|
794
826
|
children: [
|
|
795
|
-
/* @__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", 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 }),
|
|
796
828
|
child
|
|
797
829
|
]
|
|
798
830
|
}
|
|
@@ -821,8 +853,14 @@ var Tooltip = ({ text, tip }) => {
|
|
|
821
853
|
onMouseEnter: () => setVisible(true),
|
|
822
854
|
onMouseLeave: () => setVisible(false),
|
|
823
855
|
children: [
|
|
824
|
-
/* @__PURE__ */ jsx16(
|
|
825
|
-
|
|
856
|
+
/* @__PURE__ */ jsx16(
|
|
857
|
+
"span",
|
|
858
|
+
{
|
|
859
|
+
className: "border-b border-dashed border-primary/60 pb-0.5",
|
|
860
|
+
children: text
|
|
861
|
+
}
|
|
862
|
+
),
|
|
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: [
|
|
826
864
|
tip,
|
|
827
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" })
|
|
828
866
|
] })
|
package/dist/core/server.cjs
CHANGED
|
@@ -284,6 +284,12 @@ var iconMap = {
|
|
|
284
284
|
warning: import_lucide_react.AlertTriangle,
|
|
285
285
|
success: import_lucide_react.CheckCircle2
|
|
286
286
|
};
|
|
287
|
+
var noteDefaultClasses = {
|
|
288
|
+
icon: "h-5 w-5",
|
|
289
|
+
contentWrapper: "pl-8",
|
|
290
|
+
title: "mb-1 font-medium leading-none tracking-tight",
|
|
291
|
+
content: "text-sm [&_p]:leading-relaxed opacity-90"
|
|
292
|
+
};
|
|
287
293
|
function Note({
|
|
288
294
|
className,
|
|
289
295
|
title = "Note",
|
|
@@ -293,10 +299,10 @@ function Note({
|
|
|
293
299
|
}) {
|
|
294
300
|
const Icon = iconMap[type] || import_lucide_react.Info;
|
|
295
301
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: cn(noteVariants({ variant: type }), className), ...props, children: [
|
|
296
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { className:
|
|
297
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className:
|
|
298
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h5", { className:
|
|
299
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className:
|
|
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 })
|
|
300
306
|
] })
|
|
301
307
|
] });
|
|
302
308
|
}
|
|
@@ -386,7 +392,9 @@ function Changes({ type, children }) {
|
|
|
386
392
|
var import_clsx4 = __toESM(require("clsx"), 1);
|
|
387
393
|
var import_react3 = require("react");
|
|
388
394
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
389
|
-
function Stepper({
|
|
395
|
+
function Stepper({
|
|
396
|
+
children
|
|
397
|
+
}) {
|
|
390
398
|
const length = import_react3.Children.count(children);
|
|
391
399
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-col", children: import_react3.Children.map(children, (child, index) => {
|
|
392
400
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
@@ -399,7 +407,7 @@ function Stepper({ children }) {
|
|
|
399
407
|
})
|
|
400
408
|
),
|
|
401
409
|
children: [
|
|
402
|
-
/* @__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", children: index + 1 }),
|
|
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 }),
|
|
403
411
|
child
|
|
404
412
|
]
|
|
405
413
|
}
|
package/dist/core/server.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { C as CardGroup, K as Kbd, N as Note, S as Stepper, a as StepperItem, Y as YoutubeProps, R as Release, b as Changes, L as Link } from '../Stepper-
|
|
3
|
-
export { c as Youtube } from '../Stepper-
|
|
2
|
+
import { C as CardGroup, K as Kbd, N as Note, S as Stepper, a as StepperItem, Y as YoutubeProps, R as Release, b as Changes, L as Link } from '../Stepper-I9nywkZb.cjs';
|
|
3
|
+
export { c as Youtube } from '../Stepper-I9nywkZb.cjs';
|
|
4
4
|
import { B as Button, C as Card } from '../Card-L5O7G4xG.cjs';
|
|
5
5
|
export { L as LinkLikeProps, a as LinkRenderer } from '../Card-L5O7G4xG.cjs';
|
|
6
6
|
import 'react/jsx-runtime';
|
package/dist/core/server.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { C as CardGroup, K as Kbd, N as Note, S as Stepper, a as StepperItem, Y as YoutubeProps, R as Release, b as Changes, L as Link } from '../Stepper-
|
|
3
|
-
export { c as Youtube } from '../Stepper-
|
|
2
|
+
import { C as CardGroup, K as Kbd, N as Note, S as Stepper, a as StepperItem, Y as YoutubeProps, R as Release, b as Changes, L as Link } from '../Stepper-I9nywkZb.js';
|
|
3
|
+
export { c as Youtube } from '../Stepper-I9nywkZb.js';
|
|
4
4
|
import { B as Button, C as Card } from '../Card-L5O7G4xG.js';
|
|
5
5
|
export { L as LinkLikeProps, a as LinkRenderer } from '../Card-L5O7G4xG.js';
|
|
6
6
|
import 'react/jsx-runtime';
|
package/dist/core/server.js
CHANGED
|
@@ -242,6 +242,12 @@ var iconMap = {
|
|
|
242
242
|
warning: AlertTriangle,
|
|
243
243
|
success: CheckCircle2
|
|
244
244
|
};
|
|
245
|
+
var noteDefaultClasses = {
|
|
246
|
+
icon: "h-5 w-5",
|
|
247
|
+
contentWrapper: "pl-8",
|
|
248
|
+
title: "mb-1 font-medium leading-none tracking-tight",
|
|
249
|
+
content: "text-sm [&_p]:leading-relaxed opacity-90"
|
|
250
|
+
};
|
|
245
251
|
function Note({
|
|
246
252
|
className,
|
|
247
253
|
title = "Note",
|
|
@@ -251,10 +257,10 @@ function Note({
|
|
|
251
257
|
}) {
|
|
252
258
|
const Icon = iconMap[type] || Info;
|
|
253
259
|
return /* @__PURE__ */ jsxs3("div", { className: cn(noteVariants({ variant: type }), className), ...props, children: [
|
|
254
|
-
/* @__PURE__ */ jsx6(Icon, { className:
|
|
255
|
-
/* @__PURE__ */ jsxs3("div", { className:
|
|
256
|
-
/* @__PURE__ */ jsx6("h5", { className:
|
|
257
|
-
/* @__PURE__ */ jsx6("div", { className:
|
|
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 })
|
|
258
264
|
] })
|
|
259
265
|
] });
|
|
260
266
|
}
|
|
@@ -350,7 +356,9 @@ function Changes({ type, children }) {
|
|
|
350
356
|
import clsx4 from "clsx";
|
|
351
357
|
import { Children as Children2 } from "react";
|
|
352
358
|
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
353
|
-
function Stepper({
|
|
359
|
+
function Stepper({
|
|
360
|
+
children
|
|
361
|
+
}) {
|
|
354
362
|
const length = Children2.count(children);
|
|
355
363
|
return /* @__PURE__ */ jsx8("div", { className: "flex flex-col", children: Children2.map(children, (child, index) => {
|
|
356
364
|
return /* @__PURE__ */ jsxs5(
|
|
@@ -363,7 +371,7 @@ function Stepper({ children }) {
|
|
|
363
371
|
})
|
|
364
372
|
),
|
|
365
373
|
children: [
|
|
366
|
-
/* @__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", children: index + 1 }),
|
|
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 }),
|
|
367
375
|
child
|
|
368
376
|
]
|
|
369
377
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -284,6 +284,12 @@ var iconMap = {
|
|
|
284
284
|
warning: import_lucide_react.AlertTriangle,
|
|
285
285
|
success: import_lucide_react.CheckCircle2
|
|
286
286
|
};
|
|
287
|
+
var noteDefaultClasses = {
|
|
288
|
+
icon: "h-5 w-5",
|
|
289
|
+
contentWrapper: "pl-8",
|
|
290
|
+
title: "mb-1 font-medium leading-none tracking-tight",
|
|
291
|
+
content: "text-sm [&_p]:leading-relaxed opacity-90"
|
|
292
|
+
};
|
|
287
293
|
function Note({
|
|
288
294
|
className,
|
|
289
295
|
title = "Note",
|
|
@@ -293,10 +299,10 @@ function Note({
|
|
|
293
299
|
}) {
|
|
294
300
|
const Icon = iconMap[type] || import_lucide_react.Info;
|
|
295
301
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: cn(noteVariants({ variant: type }), className), ...props, children: [
|
|
296
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { className:
|
|
297
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className:
|
|
298
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h5", { className:
|
|
299
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className:
|
|
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 })
|
|
300
306
|
] })
|
|
301
307
|
] });
|
|
302
308
|
}
|
|
@@ -386,7 +392,9 @@ function Changes({ type, children }) {
|
|
|
386
392
|
var import_clsx4 = __toESM(require("clsx"), 1);
|
|
387
393
|
var import_react3 = require("react");
|
|
388
394
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
389
|
-
function Stepper({
|
|
395
|
+
function Stepper({
|
|
396
|
+
children
|
|
397
|
+
}) {
|
|
390
398
|
const length = import_react3.Children.count(children);
|
|
391
399
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-col", children: import_react3.Children.map(children, (child, index) => {
|
|
392
400
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
@@ -399,7 +407,7 @@ function Stepper({ children }) {
|
|
|
399
407
|
})
|
|
400
408
|
),
|
|
401
409
|
children: [
|
|
402
|
-
/* @__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", children: index + 1 }),
|
|
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 }),
|
|
403
411
|
child
|
|
404
412
|
]
|
|
405
413
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { createCoreServerMdxComponents } from './core/server.cjs';
|
|
2
2
|
export { B as Button, C as Card, L as LinkLikeProps, a as LinkRenderer } from './Card-L5O7G4xG.cjs';
|
|
3
|
-
export { C as CardGroup, b as Changes, K as Kbd, L as Link, N as Note, R as Release, S as Stepper, a as StepperItem, c as Youtube } from './Stepper-
|
|
3
|
+
export { C as CardGroup, b as Changes, K as Kbd, L as Link, N as Note, R as Release, S as Stepper, a as StepperItem, c as Youtube } from './Stepper-I9nywkZb.cjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'class-variance-authority/types';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { createCoreServerMdxComponents } from './core/server.js';
|
|
2
2
|
export { B as Button, C as Card, L as LinkLikeProps, a as LinkRenderer } from './Card-L5O7G4xG.js';
|
|
3
|
-
export { C as CardGroup, b as Changes, K as Kbd, L as Link, N as Note, R as Release, S as Stepper, a as StepperItem, c as Youtube } from './Stepper-
|
|
3
|
+
export { C as CardGroup, b as Changes, K as Kbd, L as Link, N as Note, R as Release, S as Stepper, a as StepperItem, c as Youtube } from './Stepper-I9nywkZb.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'class-variance-authority/types';
|
package/dist/index.js
CHANGED
|
@@ -242,6 +242,12 @@ var iconMap = {
|
|
|
242
242
|
warning: AlertTriangle,
|
|
243
243
|
success: CheckCircle2
|
|
244
244
|
};
|
|
245
|
+
var noteDefaultClasses = {
|
|
246
|
+
icon: "h-5 w-5",
|
|
247
|
+
contentWrapper: "pl-8",
|
|
248
|
+
title: "mb-1 font-medium leading-none tracking-tight",
|
|
249
|
+
content: "text-sm [&_p]:leading-relaxed opacity-90"
|
|
250
|
+
};
|
|
245
251
|
function Note({
|
|
246
252
|
className,
|
|
247
253
|
title = "Note",
|
|
@@ -251,10 +257,10 @@ function Note({
|
|
|
251
257
|
}) {
|
|
252
258
|
const Icon = iconMap[type] || Info;
|
|
253
259
|
return /* @__PURE__ */ jsxs3("div", { className: cn(noteVariants({ variant: type }), className), ...props, children: [
|
|
254
|
-
/* @__PURE__ */ jsx6(Icon, { className:
|
|
255
|
-
/* @__PURE__ */ jsxs3("div", { className:
|
|
256
|
-
/* @__PURE__ */ jsx6("h5", { className:
|
|
257
|
-
/* @__PURE__ */ jsx6("div", { className:
|
|
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 })
|
|
258
264
|
] })
|
|
259
265
|
] });
|
|
260
266
|
}
|
|
@@ -350,7 +356,9 @@ function Changes({ type, children }) {
|
|
|
350
356
|
import clsx4 from "clsx";
|
|
351
357
|
import { Children as Children2 } from "react";
|
|
352
358
|
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
353
|
-
function Stepper({
|
|
359
|
+
function Stepper({
|
|
360
|
+
children
|
|
361
|
+
}) {
|
|
354
362
|
const length = Children2.count(children);
|
|
355
363
|
return /* @__PURE__ */ jsx8("div", { className: "flex flex-col", children: Children2.map(children, (child, index) => {
|
|
356
364
|
return /* @__PURE__ */ jsxs5(
|
|
@@ -363,7 +371,7 @@ function Stepper({ children }) {
|
|
|
363
371
|
})
|
|
364
372
|
),
|
|
365
373
|
children: [
|
|
366
|
-
/* @__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", children: index + 1 }),
|
|
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 }),
|
|
367
375
|
child
|
|
368
376
|
]
|
|
369
377
|
}
|