@docubook/mdx-content 2.1.1 → 2.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 +3 -3
- package/dist/components/CardMdx.d.ts.map +1 -1
- package/dist/components/CardMdx.js +0 -2
- package/dist/components/CardMdx.js.map +1 -1
- package/dist/components/KeyboardMdx.d.ts.map +1 -1
- package/dist/components/KeyboardMdx.js +42 -8
- package/dist/components/KeyboardMdx.js.map +1 -1
- package/package.json +2 -3
- package/components.md +0 -240
package/README.md
CHANGED
|
@@ -203,13 +203,13 @@ The current rename rollout uses a migration phase, not an immediate hard-breakin
|
|
|
203
203
|
- Legacy tags are still supported as deprecated aliases for backward compatibility (`AccordionGroup`, `CardGroup`, `Stepper`, `StepperItem`).
|
|
204
204
|
- A true breaking change happens when deprecated aliases are removed in a future major release.
|
|
205
205
|
|
|
206
|
-
For migration examples, see [components.md](
|
|
206
|
+
For migration examples, see [components.md](https://github.com/DocuBook/docubook/blob/main/packages/mdx-content/components.md).
|
|
207
207
|
|
|
208
208
|
---
|
|
209
209
|
|
|
210
210
|
## Available Components
|
|
211
211
|
|
|
212
|
-
For full usage examples of all built-in components, refer to [components.md](
|
|
212
|
+
For full usage examples of all built-in components, refer to [components.md](https://github.com/DocuBook/docubook/blob/main/packages/mdx-content/components.md).
|
|
213
213
|
|
|
214
214
|
Components included out of the box:
|
|
215
215
|
|
|
@@ -233,4 +233,4 @@ Components included out of the box:
|
|
|
233
233
|
|
|
234
234
|
## License
|
|
235
235
|
|
|
236
|
-
MIT — see [LICENSE](
|
|
236
|
+
MIT — see [LICENSE](https://github.com/DocuBook/docubook/blob/main/packages/mdx-content/LICENSE) for details.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardMdx.d.ts","sourceRoot":"","sources":["../../src/components/CardMdx.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErF,OAAO,EAAE,QAAQ,EAAqB,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,KAAK,YAAY,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;
|
|
1
|
+
{"version":3,"file":"CardMdx.d.ts","sourceRoot":"","sources":["../../src/components/CardMdx.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErF,OAAO,EAAE,QAAQ,EAAqB,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,KAAK,YAAY,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,yFAAyF;IACzF,eAAe,CAAC,EAAE,YAAY,CAAC;CAChC,CAAC;AAgBF,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,KAAK,EACL,SAAS,EACT,eAAe,EACf,GAAG,KAAK,EACT,EAAE,YAAY,2CAqGd"}
|
|
@@ -31,8 +31,6 @@ export function CardMdx({ title, icon, href, horizontal, children, style, classN
|
|
|
31
31
|
justifyContent: "center",
|
|
32
32
|
width: "1rem",
|
|
33
33
|
height: "1rem",
|
|
34
|
-
borderRadius: "999px",
|
|
35
|
-
backgroundColor: "hsl(var(--primary, 210 81% 56%) / 0.14)",
|
|
36
34
|
color: "hsl(var(--primary, 210 81% 56%))",
|
|
37
35
|
fontSize: "2rem",
|
|
38
36
|
transition: "transform 0.2s ease, color 0.2s ease",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardMdx.js","sourceRoot":"","sources":["../../src/components/CardMdx.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAY,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAgBxD,MAAM,SAAS,GAAkB;IAC/B,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,2CAA2C;IACnD,YAAY,EAAE,EAAE;IAChB,UAAU,EAAE,6BAA6B;IACzC,KAAK,EAAE,qCAAqC;IAC5C,cAAc,EAAE,MAAM;IACtB,OAAO,EAAE,MAAM;IACf,SAAS,EAAE,GAAG;IACd,SAAS,EAAE,qBAAqB;IAChC,UAAU,EAAE,sFAAsF;IAClG,QAAQ,EAAE,QAAQ;CACnB,CAAC;AAEF,MAAM,UAAU,OAAO,CAAC,EACtB,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,KAAK,EACL,SAAS,EACT,eAAe,EACf,GAAG,KAAK,EACK;IACb,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1C,MAAM,YAAY,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,aAAa,GAAG,eAAe,IAAI,OAAO,CAAC;IAEjD,MAAM,OAAO,GAAG,CACd,eACE,KAAK,EAAE;YACL,OAAO,EAAE,MAAM;YACf,mBAAmB,EAAE,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK;Y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x.d.ts","sourceRoot":"","sources":["../../src/components/KeyboardMdx.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAa,MAAM,OAAO,CAAC;AAEtD,KAAK,gBAAgB,GAAG;
|
|
1
|
+
{"version":3,"file":"KeyboardMdx.d.ts","sourceRoot":"","sources":["../../src/components/KeyboardMdx.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAa,MAAM,OAAO,CAAC;AAEtD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IACxB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AA0EF,wBAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,IAAe,EAAE,KAAK,EAAE,EAAE,gBAAgB,2CAKxE"}
|
|
@@ -16,25 +16,59 @@ const wrapperStyle = {
|
|
|
16
16
|
lineHeight: 1,
|
|
17
17
|
};
|
|
18
18
|
const aliases = {
|
|
19
|
-
cmd: "
|
|
19
|
+
cmd: "Win",
|
|
20
|
+
command: "Win",
|
|
20
21
|
ctrl: "Ctrl",
|
|
21
|
-
|
|
22
|
+
control: "Ctrl",
|
|
22
23
|
alt: "Alt",
|
|
23
|
-
option: "
|
|
24
|
+
option: "Alt",
|
|
25
|
+
shift: "Shift",
|
|
26
|
+
tab: "Tab",
|
|
24
27
|
enter: "Enter",
|
|
28
|
+
return: "Enter",
|
|
29
|
+
delete: "Del",
|
|
30
|
+
del: "Del",
|
|
31
|
+
escape: "Esc",
|
|
25
32
|
esc: "Esc",
|
|
33
|
+
space: "Space",
|
|
34
|
+
up: "↑",
|
|
35
|
+
down: "↓",
|
|
36
|
+
left: "←",
|
|
37
|
+
right: "→",
|
|
38
|
+
};
|
|
39
|
+
const macSymbols = {
|
|
40
|
+
cmd: "⌘",
|
|
41
|
+
command: "⌘",
|
|
42
|
+
ctrl: "⌃",
|
|
43
|
+
control: "⌃",
|
|
44
|
+
alt: "⌥",
|
|
45
|
+
option: "⌥",
|
|
46
|
+
shift: "⇧",
|
|
47
|
+
tab: "⇥",
|
|
48
|
+
enter: "⏎",
|
|
49
|
+
return: "⏎",
|
|
50
|
+
delete: "⌫",
|
|
51
|
+
del: "⌫",
|
|
52
|
+
escape: "⎋",
|
|
53
|
+
esc: "⎋",
|
|
54
|
+
space: "␣",
|
|
26
55
|
up: "↑",
|
|
27
56
|
down: "↓",
|
|
28
57
|
left: "←",
|
|
29
58
|
right: "→",
|
|
30
59
|
};
|
|
31
|
-
function normalize(show) {
|
|
60
|
+
function normalize(show, type) {
|
|
32
61
|
const token = (show || "").toLowerCase();
|
|
33
|
-
|
|
62
|
+
const label = aliases[token] || show || "Key";
|
|
63
|
+
if (type === "mac") {
|
|
64
|
+
return macSymbols[token] || label;
|
|
65
|
+
}
|
|
66
|
+
return label;
|
|
34
67
|
}
|
|
35
68
|
export function KbdMdx({ show, type = "window", style }) {
|
|
36
|
-
const label = normalize(show);
|
|
37
|
-
const
|
|
38
|
-
|
|
69
|
+
const label = normalize(show, type);
|
|
70
|
+
const isLetter = /^[a-zA-Z]$/.test(show);
|
|
71
|
+
const display = isLetter ? show.toUpperCase() : label;
|
|
72
|
+
return _jsx("kbd", { style: { ...wrapperStyle, ...style }, children: display });
|
|
39
73
|
}
|
|
40
74
|
//# sourceMappingURL=KeyboardMdx.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyboardMdx.js","sourceRoot":"","sources":["../../src/components/KeyboardMdx.tsx"],"names":[],"mappings":";AAQA,MAAM,YAAY,GAAkB;IAClC,OAAO,EAAE,aAAa;IACtB,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;IACxB,MAAM,EAAE,2CAA2C;IACnD,iBAAiB,EAAE,CAAC;IACpB,YAAY,EAAE,CAAC;IACf,UAAU,EAAE,gCAAgC;IAC5C,KAAK,EAAE,qCAAqC;IAC5C,QAAQ,EAAE,Q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C;AACpE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docubook/mdx-content",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Portable MDX components and framework adapters for DocuBook",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,8 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
|
-
"dist"
|
|
32
|
-
"components.md"
|
|
31
|
+
"dist"
|
|
33
32
|
],
|
|
34
33
|
"scripts": {
|
|
35
34
|
"build": "rm -rf dist tsconfig.tsbuildinfo && tsc -p tsconfig.json",
|
package/components.md
DELETED
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
## accordion
|
|
2
|
-
|
|
3
|
-
for example :
|
|
4
|
-
<Accordion title="Click to expand">
|
|
5
|
-
This is a simple accordion component that can be toggled by clicking the header. The content can include any valid React nodes, including text, components, and markdown.
|
|
6
|
-
</Accordion>
|
|
7
|
-
|
|
8
|
-
with icon (lucide icon name string only) :
|
|
9
|
-
<Accordion title="Code Block" icon="Code">
|
|
10
|
-
```javascript:main.js showLineNumbers {3-4}
|
|
11
|
-
function isRocketAboutToCrash() {
|
|
12
|
-
// Check if the rocket is stable
|
|
13
|
-
if (!isStable()) {
|
|
14
|
-
NoCrash(); // Prevent the crash
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
```
|
|
18
|
-
</Accordion>
|
|
19
|
-
|
|
20
|
-
## accordion group
|
|
21
|
-
|
|
22
|
-
for example :
|
|
23
|
-
<Accordions>
|
|
24
|
-
<Accordion title="Basic Usage">
|
|
25
|
-
This accordion includes a [Lucide Icon](https://lucide.dev/icons/) because the `icon` prop is provided.
|
|
26
|
-
</Accordion>
|
|
27
|
-
|
|
28
|
-
<Accordion title="With icon props" icon="MousePointerClick">
|
|
29
|
-
This accordion includes a Lucide icon because the `icon` prop is provided.
|
|
30
|
-
</Accordion>
|
|
31
|
-
|
|
32
|
-
<Accordion title="With Code Block">
|
|
33
|
-
You can put other components inside Accordions.
|
|
34
|
-
```jsx:helloword.jsx
|
|
35
|
-
class HelloWorld {
|
|
36
|
-
public static void main(String[] args) {
|
|
37
|
-
System.out.println("Hello, World!");
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
```
|
|
41
|
-
</Accordion>
|
|
42
|
-
</Accordions>
|
|
43
|
-
|
|
44
|
-
deprecated alias: `AccordionGroup`
|
|
45
|
-
|
|
46
|
-
## button
|
|
47
|
-
|
|
48
|
-
for example :
|
|
49
|
-
<Button
|
|
50
|
-
text="Learn More"
|
|
51
|
-
href="https://learn.example.com"
|
|
52
|
-
icon="MoveUpRight"
|
|
53
|
-
size="md"
|
|
54
|
-
target="_blank"
|
|
55
|
-
variant="primary"
|
|
56
|
-
/>
|
|
57
|
-
|
|
58
|
-
## card
|
|
59
|
-
|
|
60
|
-
for example :
|
|
61
|
-
<Card title="Card with Link and icon" icon="Link" href="/docs/components/card-group">
|
|
62
|
-
This is how you use a card with an icon and a link. Clicking on this card
|
|
63
|
-
brings you to the Card Group page.
|
|
64
|
-
</Card>
|
|
65
|
-
|
|
66
|
-
## card group
|
|
67
|
-
|
|
68
|
-
for example :
|
|
69
|
-
<Cards cols={2}>
|
|
70
|
-
<Card title="Heading 1" icon="Heading1">
|
|
71
|
-
This is an example of card content with columns.
|
|
72
|
-
</Card>
|
|
73
|
-
<Card title="Heading 2" icon="Heading2">
|
|
74
|
-
This is an example of card content with columns.
|
|
75
|
-
</Card>
|
|
76
|
-
<Card title="Grid Card" icon="Grid" horizontal>
|
|
77
|
-
This is a horizontal card layout.
|
|
78
|
-
</Card>
|
|
79
|
-
<Card title="Horizontal Card" icon="Layout" horizontal>
|
|
80
|
-
This is a horizontal card layout.
|
|
81
|
-
</Card>
|
|
82
|
-
</Cards>
|
|
83
|
-
|
|
84
|
-
deprecated alias: `CardGroup`
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
## code block
|
|
88
|
-
|
|
89
|
-
for example :
|
|
90
|
-
```javascript:main.js showLineNumbers {3-4}
|
|
91
|
-
function isRocketAboutToCrash() {
|
|
92
|
-
// Check if the rocket is stable
|
|
93
|
-
if (!isStable()) {
|
|
94
|
-
NoCrash(); // Prevent the crash
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## file tree
|
|
100
|
-
|
|
101
|
-
for example :
|
|
102
|
-
<Files>
|
|
103
|
-
<Folder name="src">
|
|
104
|
-
<File name="App.tsx" />
|
|
105
|
-
<File name="index.tsx" />
|
|
106
|
-
<Folder name="components">
|
|
107
|
-
<File name="Button.tsx" />
|
|
108
|
-
<File name="Card.tsx" />
|
|
109
|
-
</Folder>
|
|
110
|
-
<Folder name="pages">
|
|
111
|
-
<File name="Home.tsx" />
|
|
112
|
-
<File name="About.tsx" />
|
|
113
|
-
</Folder>
|
|
114
|
-
</Folder>
|
|
115
|
-
</Files>
|
|
116
|
-
|
|
117
|
-
## image
|
|
118
|
-
|
|
119
|
-
for example :
|
|
120
|
-

|
|
121
|
-
|
|
122
|
-
## keyboard
|
|
123
|
-
|
|
124
|
-
for example :
|
|
125
|
-
{/* Windows style (default) */}
|
|
126
|
-
<Kbd show="ctrl" /> + <Kbd show="v" />
|
|
127
|
-
|
|
128
|
-
{/* Mac style */}
|
|
129
|
-
<Kbd show="cmd" type="mac" /> + <Kbd show="v" type="mac" />
|
|
130
|
-
|
|
131
|
-
## link
|
|
132
|
-
|
|
133
|
-
for example :
|
|
134
|
-
[Visit OpenAI](https://www.openai.com)
|
|
135
|
-
|
|
136
|
-
## note
|
|
137
|
-
|
|
138
|
-
for example :
|
|
139
|
-
<Note type="note" title="Note">
|
|
140
|
-
This is a general note to convey information to the user.
|
|
141
|
-
</Note>
|
|
142
|
-
<Note type="danger" title="Danger">
|
|
143
|
-
This is a danger alert to notify the user of a critical issue.
|
|
144
|
-
</Note>
|
|
145
|
-
<Note type="warning" title="Warning">
|
|
146
|
-
This is a warning alert for issues that require attention.
|
|
147
|
-
</Note>
|
|
148
|
-
<Note type="success" title="Success">
|
|
149
|
-
This is a success message to inform the user of successful actions.
|
|
150
|
-
</Note>
|
|
151
|
-
|
|
152
|
-
## release
|
|
153
|
-
|
|
154
|
-
for example :
|
|
155
|
-
<Release version="1.10.1" date="2025-05-24" title="Accessibility Improvements and Bug Fixes">
|
|
156
|
-
<Changes type="added">
|
|
157
|
-
- New feature to improve accessibility
|
|
158
|
-
- Keyboard navigation support for dialog components
|
|
159
|
-
</Changes>
|
|
160
|
-
<Changes type="fixed">
|
|
161
|
-
- Bug fix for mobile menu
|
|
162
|
-
- Fixed loading issues on documentation pages
|
|
163
|
-
</Changes>
|
|
164
|
-
</Release>
|
|
165
|
-
|
|
166
|
-
## stepper
|
|
167
|
-
|
|
168
|
-
for example :
|
|
169
|
-
<Steps>
|
|
170
|
-
<Step title="Step 1: Clone the DocuBook Repository">
|
|
171
|
-
```bash
|
|
172
|
-
git clone https://github.com/DocuBook/docubook.git
|
|
173
|
-
```
|
|
174
|
-
</Step>
|
|
175
|
-
<Step title="Step 2: Access the Project Directory">
|
|
176
|
-
```bash
|
|
177
|
-
cd docubook
|
|
178
|
-
```
|
|
179
|
-
</Step>
|
|
180
|
-
<Step title="Step 3: Install Required Dependencies">
|
|
181
|
-
```bash
|
|
182
|
-
pnpm install
|
|
183
|
-
```
|
|
184
|
-
</Step>
|
|
185
|
-
</Steps>
|
|
186
|
-
|
|
187
|
-
deprecated aliases: `Stepper`, `StepperItem`
|
|
188
|
-
|
|
189
|
-
## tabs
|
|
190
|
-
|
|
191
|
-
default active tab will use the first `Tab` item.
|
|
192
|
-
|
|
193
|
-
for example :
|
|
194
|
-
<Tabs className="pt-5 pb-1">
|
|
195
|
-
<Tab title="Java">
|
|
196
|
-
```java:HelloWorld.java
|
|
197
|
-
// HelloWorld.java
|
|
198
|
-
public class HelloWorld {
|
|
199
|
-
public static void main(String[] args) {
|
|
200
|
-
System.out.println("Hello, World!");
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
```
|
|
204
|
-
</Tab>
|
|
205
|
-
<Tab title="TypeScript">
|
|
206
|
-
```typescript:helloWorld.ts
|
|
207
|
-
// helloWorld.ts
|
|
208
|
-
function helloWorld(): void {
|
|
209
|
-
console.log("Hello, World!");
|
|
210
|
-
}
|
|
211
|
-
helloWorld();
|
|
212
|
-
```
|
|
213
|
-
</Tab>
|
|
214
|
-
</Tabs>
|
|
215
|
-
|
|
216
|
-
deprecated legacy API: `TabsList`, `TabsTrigger`, `TabsContent`
|
|
217
|
-
|
|
218
|
-
## tooltips
|
|
219
|
-
|
|
220
|
-
for example :
|
|
221
|
-
What do you know about <Tooltip text="DocuBook" tip="npx @docubook/create@latest" /> ? Create interactive nested documentations using MDX.
|
|
222
|
-
|
|
223
|
-
## tables
|
|
224
|
-
|
|
225
|
-
for example :
|
|
226
|
-
| Property | Description | Type | Default |
|
|
227
|
-
| ------------- | ---------------------------- | -------- | ------- |
|
|
228
|
-
| `title` | The title of the table | `string` | - |
|
|
229
|
-
| `description` | The description of the table | `string` | - |
|
|
230
|
-
|
|
231
|
-
| Left | Center | Right |
|
|
232
|
-
| :--- | :---: | ---: |
|
|
233
|
-
| Left-aligned text | Center-aligned text | Right-aligned text |
|
|
234
|
-
| Left-aligned text | Center-aligned text | Right-aligned text |
|
|
235
|
-
|
|
236
|
-
## youtube
|
|
237
|
-
|
|
238
|
-
for example :
|
|
239
|
-
<Youtube videoId="OPM2t54T-Vo" />
|
|
240
|
-
|