@docubook/mdx-content 3.4.0 → 3.4.2

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.
Files changed (212) hide show
  1. package/dist/adapters/next/index.d.ts +54 -5
  2. package/dist/adapters/next/index.js +420 -4
  3. package/dist/adapters/next/index.js.map +1 -1
  4. package/dist/chunk-PSDC53TU.js +1056 -0
  5. package/dist/chunk-PSDC53TU.js.map +1 -0
  6. package/dist/client.d.ts +91 -9
  7. package/dist/client.js +1191 -8
  8. package/dist/client.js.map +1 -1
  9. package/dist/index.d.ts +91 -20
  10. package/dist/index.js +1245 -19
  11. package/dist/index.js.map +1 -1
  12. package/dist/server-BObcTM97.d.ts +100 -0
  13. package/dist/server.d.ts +3 -11
  14. package/dist/server.js +40 -10
  15. package/dist/server.js.map +1 -1
  16. package/package.json +5 -4
  17. package/dist/__test__/AccordionMdx.test.d.ts +0 -2
  18. package/dist/__test__/AccordionMdx.test.d.ts.map +0 -1
  19. package/dist/__test__/AccordionMdx.test.js +0 -21
  20. package/dist/__test__/AccordionMdx.test.js.map +0 -1
  21. package/dist/__test__/AccordionsMdx.test.d.ts +0 -2
  22. package/dist/__test__/AccordionsMdx.test.d.ts.map +0 -1
  23. package/dist/__test__/AccordionsMdx.test.js +0 -22
  24. package/dist/__test__/AccordionsMdx.test.js.map +0 -1
  25. package/dist/__test__/ButtonMdx.test.d.ts +0 -2
  26. package/dist/__test__/ButtonMdx.test.d.ts.map +0 -1
  27. package/dist/__test__/ButtonMdx.test.js +0 -20
  28. package/dist/__test__/ButtonMdx.test.js.map +0 -1
  29. package/dist/__test__/CardMdx.test.d.ts +0 -2
  30. package/dist/__test__/CardMdx.test.d.ts.map +0 -1
  31. package/dist/__test__/CardMdx.test.js +0 -29
  32. package/dist/__test__/CardMdx.test.js.map +0 -1
  33. package/dist/__test__/CardsMdx.test.d.ts +0 -2
  34. package/dist/__test__/CardsMdx.test.d.ts.map +0 -1
  35. package/dist/__test__/CardsMdx.test.js +0 -33
  36. package/dist/__test__/CardsMdx.test.js.map +0 -1
  37. package/dist/__test__/CodeBlockMdx.test.d.ts +0 -2
  38. package/dist/__test__/CodeBlockMdx.test.d.ts.map +0 -1
  39. package/dist/__test__/CodeBlockMdx.test.js +0 -48
  40. package/dist/__test__/CodeBlockMdx.test.js.map +0 -1
  41. package/dist/__test__/FileTreeMdx.test.d.ts +0 -2
  42. package/dist/__test__/FileTreeMdx.test.d.ts.map +0 -1
  43. package/dist/__test__/FileTreeMdx.test.js +0 -26
  44. package/dist/__test__/FileTreeMdx.test.js.map +0 -1
  45. package/dist/__test__/ImageMdx.test.d.ts +0 -2
  46. package/dist/__test__/ImageMdx.test.d.ts.map +0 -1
  47. package/dist/__test__/ImageMdx.test.js +0 -32
  48. package/dist/__test__/ImageMdx.test.js.map +0 -1
  49. package/dist/__test__/KbdMdx.test.d.ts +0 -2
  50. package/dist/__test__/KbdMdx.test.d.ts.map +0 -1
  51. package/dist/__test__/KbdMdx.test.js +0 -27
  52. package/dist/__test__/KbdMdx.test.js.map +0 -1
  53. package/dist/__test__/LinkMdx.test.d.ts +0 -2
  54. package/dist/__test__/LinkMdx.test.d.ts.map +0 -1
  55. package/dist/__test__/LinkMdx.test.js +0 -29
  56. package/dist/__test__/LinkMdx.test.js.map +0 -1
  57. package/dist/__test__/MermaidMdx.test.d.ts +0 -2
  58. package/dist/__test__/MermaidMdx.test.d.ts.map +0 -1
  59. package/dist/__test__/MermaidMdx.test.js +0 -207
  60. package/dist/__test__/MermaidMdx.test.js.map +0 -1
  61. package/dist/__test__/NoteMdx.test.d.ts +0 -2
  62. package/dist/__test__/NoteMdx.test.d.ts.map +0 -1
  63. package/dist/__test__/NoteMdx.test.js +0 -39
  64. package/dist/__test__/NoteMdx.test.js.map +0 -1
  65. package/dist/__test__/ReleaseMdx.test.d.ts +0 -2
  66. package/dist/__test__/ReleaseMdx.test.d.ts.map +0 -1
  67. package/dist/__test__/ReleaseMdx.test.js +0 -39
  68. package/dist/__test__/ReleaseMdx.test.js.map +0 -1
  69. package/dist/__test__/StepperMdx.test.d.ts +0 -2
  70. package/dist/__test__/StepperMdx.test.d.ts.map +0 -1
  71. package/dist/__test__/StepperMdx.test.js +0 -25
  72. package/dist/__test__/StepperMdx.test.js.map +0 -1
  73. package/dist/__test__/TableMdx.test.d.ts +0 -2
  74. package/dist/__test__/TableMdx.test.d.ts.map +0 -1
  75. package/dist/__test__/TableMdx.test.js +0 -25
  76. package/dist/__test__/TableMdx.test.js.map +0 -1
  77. package/dist/__test__/TabsMdx.test.d.ts +0 -2
  78. package/dist/__test__/TabsMdx.test.d.ts.map +0 -1
  79. package/dist/__test__/TabsMdx.test.js +0 -30
  80. package/dist/__test__/TabsMdx.test.js.map +0 -1
  81. package/dist/__test__/TooltipMdx.test.d.ts +0 -2
  82. package/dist/__test__/TooltipMdx.test.d.ts.map +0 -1
  83. package/dist/__test__/TooltipMdx.test.js +0 -23
  84. package/dist/__test__/TooltipMdx.test.js.map +0 -1
  85. package/dist/__test__/YoutubeMdx.test.d.ts +0 -2
  86. package/dist/__test__/YoutubeMdx.test.d.ts.map +0 -1
  87. package/dist/__test__/YoutubeMdx.test.js +0 -25
  88. package/dist/__test__/YoutubeMdx.test.js.map +0 -1
  89. package/dist/__test__/utils/ExpandableCode.test.d.ts +0 -2
  90. package/dist/__test__/utils/ExpandableCode.test.d.ts.map +0 -1
  91. package/dist/__test__/utils/ExpandableCode.test.js +0 -62
  92. package/dist/__test__/utils/ExpandableCode.test.js.map +0 -1
  93. package/dist/__test__/utils/Icon.test.d.ts +0 -2
  94. package/dist/__test__/utils/Icon.test.d.ts.map +0 -1
  95. package/dist/__test__/utils/Icon.test.js +0 -29
  96. package/dist/__test__/utils/Icon.test.js.map +0 -1
  97. package/dist/adapters/next/ButtonMdx.d.ts +0 -4
  98. package/dist/adapters/next/ButtonMdx.d.ts.map +0 -1
  99. package/dist/adapters/next/ButtonMdx.js +0 -8
  100. package/dist/adapters/next/ButtonMdx.js.map +0 -1
  101. package/dist/adapters/next/CardMdx.d.ts +0 -4
  102. package/dist/adapters/next/CardMdx.d.ts.map +0 -1
  103. package/dist/adapters/next/CardMdx.js +0 -8
  104. package/dist/adapters/next/CardMdx.js.map +0 -1
  105. package/dist/adapters/next/ImageMdx.d.ts +0 -8
  106. package/dist/adapters/next/ImageMdx.d.ts.map +0 -1
  107. package/dist/adapters/next/ImageMdx.js +0 -8
  108. package/dist/adapters/next/ImageMdx.js.map +0 -1
  109. package/dist/adapters/next/LinkMdx.d.ts +0 -3
  110. package/dist/adapters/next/LinkMdx.d.ts.map +0 -1
  111. package/dist/adapters/next/LinkMdx.js +0 -11
  112. package/dist/adapters/next/LinkMdx.js.map +0 -1
  113. package/dist/adapters/next/index.d.ts.map +0 -1
  114. package/dist/client.d.ts.map +0 -1
  115. package/dist/components/AccordionMdx.d.ts +0 -11
  116. package/dist/components/AccordionMdx.d.ts.map +0 -1
  117. package/dist/components/AccordionMdx.js +0 -64
  118. package/dist/components/AccordionMdx.js.map +0 -1
  119. package/dist/components/AccordionsMdx.d.ts +0 -7
  120. package/dist/components/AccordionsMdx.d.ts.map +0 -1
  121. package/dist/components/AccordionsMdx.js +0 -14
  122. package/dist/components/AccordionsMdx.js.map +0 -1
  123. package/dist/components/ButtonMdx.d.ts +0 -17
  124. package/dist/components/ButtonMdx.d.ts.map +0 -1
  125. package/dist/components/ButtonMdx.js +0 -57
  126. package/dist/components/ButtonMdx.js.map +0 -1
  127. package/dist/components/CardMdx.d.ts +0 -17
  128. package/dist/components/CardMdx.d.ts.map +0 -1
  129. package/dist/components/CardMdx.js +0 -52
  130. package/dist/components/CardMdx.js.map +0 -1
  131. package/dist/components/CardsMdx.d.ts +0 -9
  132. package/dist/components/CardsMdx.d.ts.map +0 -1
  133. package/dist/components/CardsMdx.js +0 -9
  134. package/dist/components/CardsMdx.js.map +0 -1
  135. package/dist/components/CodeBlockMdx.d.ts +0 -11
  136. package/dist/components/CodeBlockMdx.d.ts.map +0 -1
  137. package/dist/components/CodeBlockMdx.js +0 -135
  138. package/dist/components/CodeBlockMdx.js.map +0 -1
  139. package/dist/components/FileTreeMdx.d.ts +0 -19
  140. package/dist/components/FileTreeMdx.d.ts.map +0 -1
  141. package/dist/components/FileTreeMdx.js +0 -99
  142. package/dist/components/FileTreeMdx.js.map +0 -1
  143. package/dist/components/ImageMdx.d.ts +0 -8
  144. package/dist/components/ImageMdx.d.ts.map +0 -1
  145. package/dist/components/ImageMdx.js +0 -111
  146. package/dist/components/ImageMdx.js.map +0 -1
  147. package/dist/components/KbdMdx.d.ts +0 -9
  148. package/dist/components/KbdMdx.d.ts.map +0 -1
  149. package/dist/components/KbdMdx.js +0 -74
  150. package/dist/components/KbdMdx.js.map +0 -1
  151. package/dist/components/LinkMdx.d.ts +0 -4
  152. package/dist/components/LinkMdx.d.ts.map +0 -1
  153. package/dist/components/LinkMdx.js +0 -10
  154. package/dist/components/LinkMdx.js.map +0 -1
  155. package/dist/components/MermaidMdx.d.ts +0 -13
  156. package/dist/components/MermaidMdx.d.ts.map +0 -1
  157. package/dist/components/MermaidMdx.js +0 -211
  158. package/dist/components/MermaidMdx.js.map +0 -1
  159. package/dist/components/NoteMdx.d.ts +0 -13
  160. package/dist/components/NoteMdx.d.ts.map +0 -1
  161. package/dist/components/NoteMdx.js +0 -79
  162. package/dist/components/NoteMdx.js.map +0 -1
  163. package/dist/components/ReleaseMdx.d.ts +0 -16
  164. package/dist/components/ReleaseMdx.d.ts.map +0 -1
  165. package/dist/components/ReleaseMdx.js +0 -44
  166. package/dist/components/ReleaseMdx.js.map +0 -1
  167. package/dist/components/StepperMdx.d.ts +0 -17
  168. package/dist/components/StepperMdx.d.ts.map +0 -1
  169. package/dist/components/StepperMdx.js +0 -74
  170. package/dist/components/StepperMdx.js.map +0 -1
  171. package/dist/components/TableMdx.d.ts +0 -9
  172. package/dist/components/TableMdx.d.ts.map +0 -1
  173. package/dist/components/TableMdx.js +0 -56
  174. package/dist/components/TableMdx.js.map +0 -1
  175. package/dist/components/TabsMdx.d.ts +0 -13
  176. package/dist/components/TabsMdx.d.ts.map +0 -1
  177. package/dist/components/TabsMdx.js +0 -67
  178. package/dist/components/TabsMdx.js.map +0 -1
  179. package/dist/components/TooltipMdx.d.ts +0 -10
  180. package/dist/components/TooltipMdx.d.ts.map +0 -1
  181. package/dist/components/TooltipMdx.js +0 -36
  182. package/dist/components/TooltipMdx.js.map +0 -1
  183. package/dist/components/YoutubeMdx.d.ts +0 -7
  184. package/dist/components/YoutubeMdx.d.ts.map +0 -1
  185. package/dist/components/YoutubeMdx.js +0 -24
  186. package/dist/components/YoutubeMdx.js.map +0 -1
  187. package/dist/components/index.d.ts +0 -19
  188. package/dist/components/index.d.ts.map +0 -1
  189. package/dist/components/index.js +0 -19
  190. package/dist/components/index.js.map +0 -1
  191. package/dist/index.d.ts.map +0 -1
  192. package/dist/registry/index.d.ts +0 -4
  193. package/dist/registry/index.d.ts.map +0 -1
  194. package/dist/registry/index.js +0 -38
  195. package/dist/registry/index.js.map +0 -1
  196. package/dist/server.d.ts.map +0 -1
  197. package/dist/utils/AccordionGroupContext.d.ts +0 -8
  198. package/dist/utils/AccordionGroupContext.d.ts.map +0 -1
  199. package/dist/utils/AccordionGroupContext.js +0 -4
  200. package/dist/utils/AccordionGroupContext.js.map +0 -1
  201. package/dist/utils/CopyButton.d.ts +0 -6
  202. package/dist/utils/CopyButton.d.ts.map +0 -1
  203. package/dist/utils/CopyButton.js +0 -39
  204. package/dist/utils/CopyButton.js.map +0 -1
  205. package/dist/utils/ExpandableCode.d.ts +0 -11
  206. package/dist/utils/ExpandableCode.d.ts.map +0 -1
  207. package/dist/utils/ExpandableCode.js +0 -78
  208. package/dist/utils/ExpandableCode.js.map +0 -1
  209. package/dist/utils/Icon.d.ts +0 -6
  210. package/dist/utils/Icon.d.ts.map +0 -1
  211. package/dist/utils/Icon.js +0 -12
  212. package/dist/utils/Icon.js.map +0 -1
@@ -0,0 +1,1056 @@
1
+ // src/components/LinkMdx.tsx
2
+ import { jsx } from "react/jsx-runtime";
3
+ function LinkMdx({ href, rel, target, ...props }) {
4
+ if (!href) return null;
5
+ const external = /^https?:\/\//.test(href);
6
+ const computedTarget = target ?? (external ? "_blank" : void 0);
7
+ const computedRel = rel ?? (external ? "noopener noreferrer" : void 0);
8
+ return /* @__PURE__ */ jsx("a", { href, target: computedTarget, rel: computedRel, ...props });
9
+ }
10
+
11
+ // src/utils/Icon.tsx
12
+ import * as LucideIcons from "lucide-react";
13
+ import { jsx as jsx2 } from "react/jsx-runtime";
14
+ var DEFAULT_ICON_SIZE = 20;
15
+ function resolveLucideIcon(icon) {
16
+ const normalized = typeof icon === "string" ? icon.trim() : icon;
17
+ if (!normalized || !Object.hasOwn(LucideIcons, normalized)) {
18
+ return void 0;
19
+ }
20
+ const IconComponent = LucideIcons[normalized];
21
+ return /* @__PURE__ */ jsx2(IconComponent, { size: DEFAULT_ICON_SIZE });
22
+ }
23
+
24
+ // src/components/ButtonMdx.tsx
25
+ import { Fragment, jsx as jsx3, jsxs } from "react/jsx-runtime";
26
+ var baseStyle = {
27
+ display: "inline-flex",
28
+ alignItems: "center",
29
+ justifyContent: "center",
30
+ gap: "0.375rem",
31
+ borderRadius: 10,
32
+ border: "1px solid hsl(var(--border-color, 210 20% 85%))",
33
+ background: "hsl(var(--card, 0 0% 100%))",
34
+ color: "hsl(var(--foreground, 220 30% 15%))",
35
+ textDecoration: "none",
36
+ fontWeight: 600,
37
+ fontSize: "0.9rem",
38
+ lineHeight: 1,
39
+ padding: "0.65rem 0.85rem",
40
+ cursor: "pointer"
41
+ };
42
+ var variantStyles = {
43
+ primary: {
44
+ background: "hsl(var(--accent, 200 100% 40%))",
45
+ borderColor: "hsl(var(--accent, 200 100% 40%))",
46
+ color: "#ffffff"
47
+ },
48
+ secondary: {
49
+ background: "hsl(var(--muted, 210 20% 92%))",
50
+ color: "hsl(var(--foreground, 220 30% 15%))"
51
+ },
52
+ ghost: {
53
+ background: "transparent",
54
+ borderColor: "transparent",
55
+ color: "hsl(var(--foreground, 220 30% 15%))"
56
+ }
57
+ };
58
+ var sizeStyles = {
59
+ sm: { padding: "0.45rem 0.6rem", fontSize: "0.8rem" },
60
+ md: { padding: "0.65rem 0.85rem", fontSize: "0.9rem" },
61
+ lg: { padding: "0.8rem 1rem", fontSize: "0.96rem" }
62
+ };
63
+ function ButtonMdx({
64
+ href,
65
+ variant,
66
+ size = "md",
67
+ icon,
68
+ text,
69
+ style,
70
+ children,
71
+ target,
72
+ __LinkComponent,
73
+ ...props
74
+ }) {
75
+ const resolvedVariant = variant ?? "secondary";
76
+ const mergedStyle = {
77
+ ...baseStyle,
78
+ ...variantStyles[resolvedVariant],
79
+ ...sizeStyles[size],
80
+ ...style
81
+ };
82
+ const resolvedIcon = resolveLucideIcon(icon);
83
+ const LinkComponent = __LinkComponent ?? LinkMdx;
84
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
85
+ resolvedIcon ? /* @__PURE__ */ jsx3(
86
+ "span",
87
+ {
88
+ "aria-hidden": "true",
89
+ style: { display: "inline-flex", alignItems: "center", justifyContent: "center" },
90
+ children: resolvedIcon
91
+ }
92
+ ) : null,
93
+ text ?? children
94
+ ] });
95
+ if (href) {
96
+ return /* @__PURE__ */ jsx3(LinkComponent, { href, target, style: mergedStyle, children: content });
97
+ }
98
+ return /* @__PURE__ */ jsx3("button", { type: props.type ?? "button", ...props, style: mergedStyle, children: content });
99
+ }
100
+
101
+ // src/components/CardsMdx.tsx
102
+ import { jsx as jsx4 } from "react/jsx-runtime";
103
+ function CardsMdx({ cols = 2, children, style }) {
104
+ const columnCount = Math.max(1, Math.min(4, cols));
105
+ return /* @__PURE__ */ jsx4(
106
+ "div",
107
+ {
108
+ className: "docubook-card-group",
109
+ style: {
110
+ "--docubook-card-group-template": `repeat(${columnCount}, minmax(240px, 1fr))`,
111
+ ...style
112
+ },
113
+ children
114
+ }
115
+ );
116
+ }
117
+
118
+ // src/components/CodeBlockMdx.tsx
119
+ import { isValidElement } from "react";
120
+ import {
121
+ SiJavascript,
122
+ SiTypescript,
123
+ SiReact,
124
+ SiPython,
125
+ SiGo,
126
+ SiPhp,
127
+ SiRuby,
128
+ SiSwift,
129
+ SiKotlin,
130
+ SiHtml5,
131
+ SiCss,
132
+ SiSass,
133
+ SiPostgresql,
134
+ SiGraphql,
135
+ SiYaml,
136
+ SiToml,
137
+ SiDocker,
138
+ SiNginx,
139
+ SiGit,
140
+ SiGnubash,
141
+ SiMarkdown
142
+ } from "react-icons/si";
143
+ import { FaJava, FaCode, FaRegFileAlt } from "react-icons/fa";
144
+ import { TbJson } from "react-icons/tb";
145
+
146
+ // src/utils/CopyButton.tsx
147
+ import { useEffect, useId, useRef, useState } from "react";
148
+ import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
149
+ function CopyButton({ content }) {
150
+ const [copied, setCopied] = useState(false);
151
+ const timeoutRef = useRef(null);
152
+ const statusId = useId();
153
+ useEffect(() => {
154
+ return () => {
155
+ if (timeoutRef.current) {
156
+ clearTimeout(timeoutRef.current);
157
+ }
158
+ };
159
+ }, []);
160
+ async function onCopy() {
161
+ try {
162
+ await navigator.clipboard.writeText(content);
163
+ setCopied(true);
164
+ if (timeoutRef.current) {
165
+ clearTimeout(timeoutRef.current);
166
+ }
167
+ timeoutRef.current = setTimeout(() => setCopied(false), 1600);
168
+ } catch {
169
+ setCopied(false);
170
+ }
171
+ }
172
+ return /* @__PURE__ */ jsxs2(
173
+ "button",
174
+ {
175
+ type: "button",
176
+ onClick: onCopy,
177
+ "aria-label": copied ? "Copied" : "Copy code",
178
+ "aria-describedby": statusId,
179
+ style: {
180
+ position: "relative",
181
+ border: "1px solid hsl(var(--border-color, 210 20% 85%))",
182
+ borderRadius: 8,
183
+ background: "hsl(var(--card, 0 0% 100%))",
184
+ color: "hsl(var(--foreground, 220 30% 15%))",
185
+ fontSize: "0.78rem",
186
+ padding: "0.35rem 0.55rem",
187
+ cursor: "copy"
188
+ },
189
+ children: [
190
+ copied ? "Copied" : "Copy",
191
+ /* @__PURE__ */ jsx5(
192
+ "span",
193
+ {
194
+ id: statusId,
195
+ "aria-live": "polite",
196
+ style: { position: "absolute", left: -9999, top: "auto" },
197
+ children: copied ? "Code copied to clipboard" : "Ready to copy code"
198
+ }
199
+ )
200
+ ]
201
+ }
202
+ );
203
+ }
204
+
205
+ // src/utils/ExpandableCode.tsx
206
+ import { useEffect as useEffect2, useState as useState2, useRef as useRef2 } from "react";
207
+ import { Ellipsis } from "lucide-react";
208
+ import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
209
+ var DEFAULT_VISIBLE_LINES = 20;
210
+ var FALLBACK_LINE_HEIGHT_PX = 24;
211
+ function ExpandableCode({
212
+ isExpandable,
213
+ totalLines,
214
+ preContent,
215
+ preProps,
216
+ className
217
+ }) {
218
+ const [isOpen, setIsOpen] = useState2(false);
219
+ const [collapsedMaxHeight, setCollapsedMaxHeight] = useState2(
220
+ `${DEFAULT_VISIBLE_LINES * FALLBACK_LINE_HEIGHT_PX}px`
221
+ );
222
+ const preRef = useRef2(null);
223
+ const shouldShow = isExpandable && totalLines > DEFAULT_VISIBLE_LINES;
224
+ const isCollapsed = shouldShow && !isOpen;
225
+ useEffect2(() => {
226
+ const pre = preRef.current;
227
+ if (!pre) return;
228
+ const calculateCollapsedHeight = () => {
229
+ const styles = window.getComputedStyle(pre);
230
+ const paddingTop = Number.parseFloat(styles.paddingTop) || 0;
231
+ const paddingBottom = Number.parseFloat(styles.paddingBottom) || 0;
232
+ const contentHeight = Math.max(pre.scrollHeight - paddingTop - paddingBottom, 0);
233
+ if (totalLines > 0 && contentHeight > 0) {
234
+ const lineHeight2 = contentHeight / totalLines;
235
+ setCollapsedMaxHeight(
236
+ `${DEFAULT_VISIBLE_LINES * lineHeight2 + paddingTop + paddingBottom}px`
237
+ );
238
+ return;
239
+ }
240
+ let lineHeight = Number.parseFloat(styles.lineHeight);
241
+ if (!Number.isFinite(lineHeight) || lineHeight === 0) {
242
+ const fontSize = Number.parseFloat(styles.fontSize);
243
+ lineHeight = Number.isFinite(fontSize) ? fontSize * 1.5 : FALLBACK_LINE_HEIGHT_PX;
244
+ }
245
+ setCollapsedMaxHeight(`${DEFAULT_VISIBLE_LINES * lineHeight + paddingTop + paddingBottom}px`);
246
+ };
247
+ const frame = requestAnimationFrame(calculateCollapsedHeight);
248
+ const timeout = window.setTimeout(calculateCollapsedHeight, 50);
249
+ window.addEventListener("resize", calculateCollapsedHeight);
250
+ return () => {
251
+ cancelAnimationFrame(frame);
252
+ window.clearTimeout(timeout);
253
+ window.removeEventListener("resize", calculateCollapsedHeight);
254
+ };
255
+ }, [preContent, totalLines]);
256
+ return /* @__PURE__ */ jsxs3(Fragment2, { children: [
257
+ /* @__PURE__ */ jsx6("div", { className: "mdx-expandable-code-container", children: /* @__PURE__ */ jsx6(
258
+ "pre",
259
+ {
260
+ ref: preRef,
261
+ ...preProps,
262
+ className: `${className || ""} mdx-expandable-code`,
263
+ style: {
264
+ margin: 0,
265
+ padding: "0.9rem",
266
+ overflowX: "auto",
267
+ minWidth: "100%",
268
+ maxHeight: isCollapsed ? collapsedMaxHeight : "none",
269
+ overflowY: isCollapsed ? "hidden" : "visible",
270
+ transition: "max-height 0.3s ease",
271
+ scrollbarWidth: "thin"
272
+ },
273
+ children: preContent
274
+ }
275
+ ) }),
276
+ shouldShow && /* @__PURE__ */ jsx6(
277
+ "div",
278
+ {
279
+ className: "code-block-expandable-footer",
280
+ style: {
281
+ display: "flex",
282
+ alignItems: "center",
283
+ justifyContent: "center",
284
+ padding: "0.6rem",
285
+ background: "hsl(var(--muted, 210 20% 92%))",
286
+ borderTop: "1px solid hsl(var(--border-color, 210 20% 85%))"
287
+ },
288
+ children: /* @__PURE__ */ jsxs3(
289
+ "button",
290
+ {
291
+ className: "code-block-expandable-toggle",
292
+ onClick: () => setIsOpen(!isOpen),
293
+ style: {
294
+ display: "flex",
295
+ alignItems: "center",
296
+ gap: "0.5rem",
297
+ padding: "0.4rem 0.8rem",
298
+ border: "1px solid hsl(var(--border-color, 210 20% 85%))",
299
+ borderRadius: 6,
300
+ background: "hsl(var(--background, 210 40% 98%))",
301
+ color: "hsl(var(--foreground, 220 30% 15%))",
302
+ fontSize: "0.85rem",
303
+ fontWeight: 500,
304
+ cursor: "pointer",
305
+ transition: "all 0.2s ease",
306
+ fontFamily: "inherit"
307
+ },
308
+ children: [
309
+ /* @__PURE__ */ jsx6(
310
+ Ellipsis,
311
+ {
312
+ size: 16,
313
+ style: {
314
+ transform: isOpen ? "rotate(180deg)" : "rotate(0deg)",
315
+ transition: "transform 0.2s ease"
316
+ }
317
+ }
318
+ ),
319
+ /* @__PURE__ */ jsx6("span", { children: isOpen ? "Collapse" : `See all ${totalLines} lines` })
320
+ ]
321
+ }
322
+ )
323
+ }
324
+ )
325
+ ] });
326
+ }
327
+
328
+ // src/components/CodeBlockMdx.tsx
329
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
330
+ function getLanguage(className = "") {
331
+ const match = className.match(/language-(\w+)/);
332
+ return match ? match[1] : "text";
333
+ }
334
+ function resolveLanguage(preClassName, dataLanguage, children) {
335
+ if (typeof dataLanguage === "string" && dataLanguage.trim().length > 0) {
336
+ return dataLanguage.trim().toLowerCase();
337
+ }
338
+ const languageFromPre = getLanguage(preClassName ?? "");
339
+ if (languageFromPre !== "text") return languageFromPre;
340
+ if (isValidElement(children)) {
341
+ const childProps = children.props;
342
+ if (typeof childProps.className === "string") {
343
+ const languageFromCode = getLanguage(childProps.className);
344
+ if (languageFromCode !== "text") return languageFromCode;
345
+ }
346
+ }
347
+ return "text";
348
+ }
349
+ function getLanguageIcon(language) {
350
+ const normalized = language.toLowerCase();
351
+ const iconProps = { size: 14 };
352
+ const map = {
353
+ gitignore: /* @__PURE__ */ jsx7(SiGit, { ...iconProps }),
354
+ docker: /* @__PURE__ */ jsx7(SiDocker, { ...iconProps }),
355
+ dockerfile: /* @__PURE__ */ jsx7(SiDocker, { ...iconProps }),
356
+ nginx: /* @__PURE__ */ jsx7(SiNginx, { ...iconProps }),
357
+ sql: /* @__PURE__ */ jsx7(SiPostgresql, { ...iconProps }),
358
+ graphql: /* @__PURE__ */ jsx7(SiGraphql, { ...iconProps }),
359
+ yaml: /* @__PURE__ */ jsx7(SiYaml, { ...iconProps }),
360
+ yml: /* @__PURE__ */ jsx7(SiYaml, { ...iconProps }),
361
+ toml: /* @__PURE__ */ jsx7(SiToml, { ...iconProps }),
362
+ json: /* @__PURE__ */ jsx7(TbJson, { ...iconProps }),
363
+ md: /* @__PURE__ */ jsx7(SiMarkdown, { ...iconProps }),
364
+ markdown: /* @__PURE__ */ jsx7(SiMarkdown, { ...iconProps }),
365
+ bash: /* @__PURE__ */ jsx7(SiGnubash, { ...iconProps }),
366
+ sh: /* @__PURE__ */ jsx7(SiGnubash, { ...iconProps }),
367
+ shell: /* @__PURE__ */ jsx7(SiGnubash, { ...iconProps }),
368
+ swift: /* @__PURE__ */ jsx7(SiSwift, { ...iconProps }),
369
+ kotlin: /* @__PURE__ */ jsx7(SiKotlin, { ...iconProps }),
370
+ kt: /* @__PURE__ */ jsx7(SiKotlin, { ...iconProps }),
371
+ kts: /* @__PURE__ */ jsx7(SiKotlin, { ...iconProps }),
372
+ rb: /* @__PURE__ */ jsx7(SiRuby, { ...iconProps }),
373
+ ruby: /* @__PURE__ */ jsx7(SiRuby, { ...iconProps }),
374
+ php: /* @__PURE__ */ jsx7(SiPhp, { ...iconProps }),
375
+ go: /* @__PURE__ */ jsx7(SiGo, { ...iconProps }),
376
+ py: /* @__PURE__ */ jsx7(SiPython, { ...iconProps }),
377
+ python: /* @__PURE__ */ jsx7(SiPython, { ...iconProps }),
378
+ java: /* @__PURE__ */ jsx7(FaJava, { ...iconProps }),
379
+ tsx: /* @__PURE__ */ jsx7(SiReact, { ...iconProps }),
380
+ typescript: /* @__PURE__ */ jsx7(SiTypescript, { ...iconProps }),
381
+ ts: /* @__PURE__ */ jsx7(SiTypescript, { ...iconProps }),
382
+ jsx: /* @__PURE__ */ jsx7(SiReact, { ...iconProps }),
383
+ js: /* @__PURE__ */ jsx7(SiJavascript, { ...iconProps }),
384
+ javascript: /* @__PURE__ */ jsx7(SiJavascript, { ...iconProps }),
385
+ html: /* @__PURE__ */ jsx7(SiHtml5, { ...iconProps }),
386
+ css: /* @__PURE__ */ jsx7(SiCss, { ...iconProps }),
387
+ scss: /* @__PURE__ */ jsx7(SiSass, { ...iconProps }),
388
+ sass: /* @__PURE__ */ jsx7(SiSass, { ...iconProps }),
389
+ text: /* @__PURE__ */ jsx7(FaRegFileAlt, { ...iconProps }),
390
+ plaintext: /* @__PURE__ */ jsx7(FaRegFileAlt, { ...iconProps })
391
+ };
392
+ return map[normalized] || /* @__PURE__ */ jsx7(FaCode, { ...iconProps });
393
+ }
394
+ function countCodeLines(raw) {
395
+ let normalized = raw.replace(/\r\n/g, "\n");
396
+ if (normalized.startsWith("\n")) normalized = normalized.slice(1);
397
+ if (normalized.endsWith("\n")) normalized = normalized.slice(0, -1);
398
+ if (normalized.length === 0) return 0;
399
+ return normalized.split("\n").length;
400
+ }
401
+ function CodeBlock({ children, raw, ...rest }) {
402
+ const {
403
+ className,
404
+ "data-title": title,
405
+ "data-language": dataLanguage,
406
+ "data-expandable": isExpandable,
407
+ "data-expandable-lines": totalLinesStr,
408
+ ...props
409
+ } = rest;
410
+ const language = resolveLanguage(
411
+ typeof className === "string" ? className : void 0,
412
+ dataLanguage,
413
+ children
414
+ );
415
+ const totalLinesFromMeta = parseInt(totalLinesStr, 10) || 0;
416
+ const totalLinesFromRaw = raw ? countCodeLines(raw) : 0;
417
+ const totalLines = totalLinesFromRaw || totalLinesFromMeta;
418
+ const hasExpandableClass = typeof className === "string" && className.split(" ").includes("mdx-expandable-code");
419
+ const shouldExpand = isExpandable === "true" || hasExpandableClass;
420
+ const preProps = {
421
+ ...props,
422
+ "data-expandable": isExpandable,
423
+ "data-expandable-lines": totalLinesStr
424
+ };
425
+ return /* @__PURE__ */ jsxs4(
426
+ "div",
427
+ {
428
+ className: "code-block-container not-prose",
429
+ style: {
430
+ position: "relative",
431
+ margin: "1.5rem 0",
432
+ border: "1px solid hsl(var(--border-color, 210 20% 85%))",
433
+ overflow: "hidden",
434
+ fontSize: "0.875rem",
435
+ borderRadius: "0.75rem"
436
+ },
437
+ children: [
438
+ /* @__PURE__ */ jsxs4(
439
+ "div",
440
+ {
441
+ className: "code-block-header",
442
+ style: {
443
+ display: "flex",
444
+ alignItems: "center",
445
+ justifyContent: "space-between",
446
+ gap: "0.75rem",
447
+ background: "hsl(var(--muted, 210 20% 92%))",
448
+ padding: "0.5rem 1rem",
449
+ borderBottom: "1px solid hsl(var(--border-color, 210 20% 85%))",
450
+ color: "hsl(var(--muted-foreground, 220 15% 50%))",
451
+ fontFamily: "monospace",
452
+ fontSize: "0.8rem"
453
+ },
454
+ children: [
455
+ /* @__PURE__ */ jsxs4(
456
+ "div",
457
+ {
458
+ style: {
459
+ display: "flex",
460
+ alignItems: "center",
461
+ gap: 6,
462
+ fontSize: "0.78rem",
463
+ color: "hsl(var(--muted-foreground, 220 15% 50%))"
464
+ },
465
+ children: [
466
+ getLanguageIcon(language),
467
+ /* @__PURE__ */ jsx7("span", { children: title || language })
468
+ ]
469
+ }
470
+ ),
471
+ raw ? /* @__PURE__ */ jsx7(
472
+ "div",
473
+ {
474
+ className: "code-block-actions",
475
+ style: {
476
+ display: "inline-flex",
477
+ alignItems: "center",
478
+ marginLeft: "auto"
479
+ },
480
+ children: /* @__PURE__ */ jsx7(
481
+ "div",
482
+ {
483
+ style: {
484
+ color: "hsl(var(--muted-foreground, 220 15% 50%))",
485
+ transition: "color 0.2s ease-in-out"
486
+ },
487
+ children: /* @__PURE__ */ jsx7(CopyButton, { content: raw })
488
+ }
489
+ )
490
+ }
491
+ ) : null
492
+ ]
493
+ }
494
+ ),
495
+ /* @__PURE__ */ jsx7(
496
+ "div",
497
+ {
498
+ className: "code-block-body",
499
+ style: {
500
+ overflowY: "visible",
501
+ backgroundColor: "hsl(var(--background, 210 40% 98%))",
502
+ willChange: "transform",
503
+ borderBottom: "none"
504
+ },
505
+ children: /* @__PURE__ */ jsx7(
506
+ ExpandableCode,
507
+ {
508
+ isExpandable: shouldExpand,
509
+ totalLines,
510
+ preContent: children,
511
+ preProps,
512
+ className
513
+ }
514
+ )
515
+ }
516
+ )
517
+ ]
518
+ }
519
+ );
520
+ }
521
+
522
+ // src/components/KbdMdx.tsx
523
+ import { jsx as jsx8 } from "react/jsx-runtime";
524
+ var wrapperStyle = {
525
+ display: "inline-flex",
526
+ alignItems: "center",
527
+ justifyContent: "center",
528
+ border: "1px solid hsl(var(--border-color, 210 20% 85%))",
529
+ borderBottomWidth: 2,
530
+ borderRadius: 8,
531
+ background: "hsl(var(--muted, 210 20% 92%))",
532
+ color: "hsl(var(--foreground, 220 30% 15%))",
533
+ minWidth: "1.9rem",
534
+ height: "1.7rem",
535
+ padding: "0 0.45rem",
536
+ fontSize: "0.8rem",
537
+ fontWeight: 600,
538
+ lineHeight: 1
539
+ };
540
+ var aliases = {
541
+ cmd: "Win",
542
+ command: "Win",
543
+ ctrl: "Ctrl",
544
+ control: "Ctrl",
545
+ alt: "Alt",
546
+ option: "Alt",
547
+ shift: "Shift",
548
+ tab: "Tab",
549
+ enter: "Enter",
550
+ return: "Enter",
551
+ delete: "Del",
552
+ del: "Del",
553
+ escape: "Esc",
554
+ esc: "Esc",
555
+ space: "Space",
556
+ up: "\u2191",
557
+ down: "\u2193",
558
+ left: "\u2190",
559
+ right: "\u2192"
560
+ };
561
+ var macSymbols = {
562
+ cmd: "\u2318",
563
+ command: "\u2318",
564
+ ctrl: "\u2303",
565
+ control: "\u2303",
566
+ alt: "\u2325",
567
+ option: "\u2325",
568
+ shift: "\u21E7",
569
+ tab: "\u21E5",
570
+ enter: "\u23CE",
571
+ return: "\u23CE",
572
+ delete: "\u232B",
573
+ del: "\u232B",
574
+ escape: "\u238B",
575
+ esc: "\u238B",
576
+ space: "\u2423",
577
+ up: "\u2191",
578
+ down: "\u2193",
579
+ left: "\u2190",
580
+ right: "\u2192"
581
+ };
582
+ function normalize(show, type) {
583
+ const token = (show || "").toLowerCase();
584
+ const label = aliases[token] || show || "Key";
585
+ if (type === "mac") {
586
+ return macSymbols[token] || label;
587
+ }
588
+ return label;
589
+ }
590
+ function KbdMdx({ show, type = "window", style }) {
591
+ const label = normalize(show, type);
592
+ const isLetter = /^[a-zA-Z]$/.test(show);
593
+ const display = isLetter ? show.toUpperCase() : label;
594
+ return /* @__PURE__ */ jsx8("kbd", { style: { ...wrapperStyle, ...style }, children: display });
595
+ }
596
+
597
+ // src/components/NoteMdx.tsx
598
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
599
+ var palette = {
600
+ danger: {
601
+ border: "hsl(var(--destructive, 0 85% 60%))",
602
+ bg: "hsl(var(--destructive, 0 85% 60%) / 0.16)",
603
+ text: "hsl(var(--foreground, 220 30% 15%))",
604
+ header: "hsl(var(--destructive, 0 85% 60%))",
605
+ content: "hsl(var(--destructive, 0 85% 60%) / 0.75)",
606
+ defaultIcon: "Siren"
607
+ },
608
+ warning: {
609
+ border: "hsl(36 100% 56%)",
610
+ bg: "rgba(249, 115, 22, 0.14)",
611
+ text: "hsl(24 100% 18%)",
612
+ header: "hsl(36 100% 56%)",
613
+ content: "hsl(36 100% 56% / 0.75)",
614
+ defaultIcon: "AlertTriangle"
615
+ },
616
+ success: {
617
+ border: "hsl(145 63% 42%)",
618
+ bg: "hsl(145 63% 42% / 0.16)",
619
+ text: "hsl(var(--foreground, 220 30% 15%))",
620
+ header: "hsl(145 63% 42%)",
621
+ content: "hsl(145 63% 42% / 0.75)",
622
+ defaultIcon: "CheckCircle2"
623
+ },
624
+ info: {
625
+ border: "hsl(var(--primary, 210 81% 56%))",
626
+ bg: "hsl(var(--primary, 210 81% 56%) / 0.16)",
627
+ text: "hsl(var(--foreground, 220 30% 15%))",
628
+ header: "hsl(var(--primary, 210 81% 56%))",
629
+ content: "hsl(var(--primary, 210 81% 56%) / 0.75)",
630
+ defaultIcon: "Info"
631
+ },
632
+ tip: {
633
+ border: "hsl(137 50% 35%)",
634
+ bg: "hsl(137 50% 35% / 0.16)",
635
+ text: "hsl(var(--foreground, 220 30% 15%))",
636
+ header: "hsl(137 50% 35%)",
637
+ content: "hsl(137 50% 35% / 0.75)",
638
+ defaultIcon: "Lightbulb"
639
+ }
640
+ };
641
+ function NoteMdx({
642
+ type = "info",
643
+ title,
644
+ icon,
645
+ children,
646
+ style,
647
+ className,
648
+ ...props
649
+ }) {
650
+ const safeType = Object.hasOwn(palette, type) ? type : "info";
651
+ const token = palette[safeType];
652
+ if (!token) return null;
653
+ const normalizedTitle = typeof title === "string" ? title.trim() : title;
654
+ const resolvedIcon = resolveLucideIcon(icon || token.defaultIcon);
655
+ const fallbackTitle = normalizedTitle || type.charAt(0).toUpperCase() + type.slice(1);
656
+ return /* @__PURE__ */ jsxs5(
657
+ "aside",
658
+ {
659
+ role: "note",
660
+ className,
661
+ ...props,
662
+ style: {
663
+ border: "1px solid transparent",
664
+ borderLeft: `4px solid ${token.border}`,
665
+ borderRadius: 10,
666
+ background: token.bg,
667
+ color: token.text,
668
+ padding: "0.5rem 1rem",
669
+ margin: "1rem 0",
670
+ boxShadow: "0 1px 2px rgba(15, 23, 42, 0.08)",
671
+ ...style
672
+ },
673
+ children: [
674
+ fallbackTitle || resolvedIcon ? /* @__PURE__ */ jsxs5(
675
+ "div",
676
+ {
677
+ style: {
678
+ display: "flex",
679
+ alignItems: "center",
680
+ gap: "0.5rem",
681
+ fontWeight: 700,
682
+ marginBottom: "0.35rem",
683
+ color: token.header
684
+ },
685
+ children: [
686
+ resolvedIcon ? /* @__PURE__ */ jsx9(
687
+ "span",
688
+ {
689
+ "aria-hidden": "true",
690
+ style: {
691
+ display: "inline-flex",
692
+ alignItems: "center",
693
+ justifyContent: "center",
694
+ width: 20,
695
+ height: 20,
696
+ color: token.header
697
+ },
698
+ children: resolvedIcon
699
+ }
700
+ ) : null,
701
+ /* @__PURE__ */ jsx9("span", { style: { color: token.header }, children: fallbackTitle })
702
+ ]
703
+ }
704
+ ) : null,
705
+ /* @__PURE__ */ jsx9("div", { style: { color: token.content, lineHeight: 1.5 }, children })
706
+ ]
707
+ }
708
+ );
709
+ }
710
+
711
+ // src/components/ReleaseMdx.tsx
712
+ import {
713
+ AlertTriangle,
714
+ PlusCircle,
715
+ RefreshCw,
716
+ Wrench,
717
+ Zap,
718
+ XCircle
719
+ } from "lucide-react";
720
+ import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
721
+ var changeConfig = {
722
+ added: { label: "Added", color: "#14b8a6", icon: PlusCircle },
723
+ changed: { label: "Changed", color: "#f59e0b", icon: RefreshCw },
724
+ fixed: { label: "Fixed", color: "#ef4444", icon: Wrench },
725
+ improved: { label: "Improved", color: "#3b82f6", icon: Zap },
726
+ deprecated: { label: "Deprecated", color: "#f97316", icon: AlertTriangle },
727
+ removed: { label: "Removed", color: "#ec4899", icon: XCircle }
728
+ };
729
+ function ReleaseMdx({ version, date, title, children, style }) {
730
+ const formattedDate = date ? new Date(date).toLocaleDateString("en-US", {
731
+ year: "numeric",
732
+ month: "long",
733
+ day: "numeric"
734
+ }) : void 0;
735
+ const displayVersion = version.startsWith("v") ? version : `v${version}`;
736
+ return /* @__PURE__ */ jsxs6(
737
+ "section",
738
+ {
739
+ style: {
740
+ border: "1px solid hsl(var(--border-color, 210 20% 85%))",
741
+ borderRadius: 12,
742
+ padding: "1rem",
743
+ margin: "1rem 0",
744
+ background: "hsl(var(--card, 0 0% 100%))",
745
+ ...style
746
+ },
747
+ children: [
748
+ /* @__PURE__ */ jsxs6("div", { style: { display: "flex", gap: "0.6rem", alignItems: "center", marginBottom: "0.5rem" }, children: [
749
+ /* @__PURE__ */ jsx10("span", { style: { fontWeight: 700, color: "hsl(var(--accent, 200 100% 40%))" }, children: displayVersion }),
750
+ formattedDate ? /* @__PURE__ */ jsx10("span", { style: { color: "hsl(var(--muted-foreground, 220 15% 50%))" }, children: formattedDate }) : null
751
+ ] }),
752
+ /* @__PURE__ */ jsx10("h3", { style: { margin: 0 }, children: title }),
753
+ /* @__PURE__ */ jsx10("div", { style: { marginTop: "0.75rem" }, children })
754
+ ]
755
+ }
756
+ );
757
+ }
758
+ function ChangesMdx({ type = "changed", children }) {
759
+ const config = changeConfig[type] || changeConfig.changed;
760
+ const Icon = config.icon;
761
+ return /* @__PURE__ */ jsxs6("div", { style: { margin: "0.75rem 0" }, children: [
762
+ /* @__PURE__ */ jsxs6(
763
+ "span",
764
+ {
765
+ style: {
766
+ display: "inline-flex",
767
+ alignItems: "center",
768
+ gap: "0.35rem",
769
+ borderRadius: 999,
770
+ padding: "0.2rem 0.55rem",
771
+ fontSize: "0.8rem",
772
+ fontWeight: 700,
773
+ color: config.color,
774
+ background: `${config.color}1f`
775
+ },
776
+ children: [
777
+ /* @__PURE__ */ jsx10(Icon, { size: 13, "aria-hidden": "true" }),
778
+ config.label
779
+ ]
780
+ }
781
+ ),
782
+ /* @__PURE__ */ jsx10("div", { style: { marginTop: "0.45rem" }, children })
783
+ ] });
784
+ }
785
+
786
+ // src/components/StepperMdx.tsx
787
+ import {
788
+ Children,
789
+ cloneElement,
790
+ isValidElement as isValidElement2
791
+ } from "react";
792
+ import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
793
+ function StepsMdx({ children, style, className, ...props }) {
794
+ const items = Children.toArray(children);
795
+ return /* @__PURE__ */ jsxs7(
796
+ "ol",
797
+ {
798
+ className,
799
+ ...props,
800
+ style: {
801
+ listStyle: "none",
802
+ position: "relative",
803
+ margin: "1.2rem 0",
804
+ padding: 0,
805
+ display: "grid",
806
+ gap: 0,
807
+ ...style
808
+ },
809
+ children: [
810
+ items.map((child, index) => {
811
+ if (!isValidElement2(child)) {
812
+ return child;
813
+ }
814
+ const item = child;
815
+ return cloneElement(item, {
816
+ stepNumber: index + 1
817
+ });
818
+ }),
819
+ items.length > 1 ? /* @__PURE__ */ jsx11(
820
+ "span",
821
+ {
822
+ "aria-hidden": "true",
823
+ style: {
824
+ position: "absolute",
825
+ left: "1.05rem",
826
+ top: "0.8rem",
827
+ bottom: "0.8rem",
828
+ width: 1,
829
+ background: "hsl(var(--border-color, 210 20% 85%))",
830
+ pointerEvents: "none"
831
+ }
832
+ }
833
+ ) : null
834
+ ]
835
+ }
836
+ );
837
+ }
838
+ function StepMdx({ title, children, style, className, ...props }) {
839
+ const { stepNumber, ...liProps } = props;
840
+ return /* @__PURE__ */ jsxs7(
841
+ "li",
842
+ {
843
+ className,
844
+ ...liProps,
845
+ style: {
846
+ position: "relative",
847
+ zIndex: 1,
848
+ width: "100%",
849
+ minWidth: 0,
850
+ boxSizing: "border-box",
851
+ marginLeft: "0.25rem",
852
+ paddingLeft: "2.6rem",
853
+ paddingBottom: "1.15rem",
854
+ ...style
855
+ },
856
+ children: [
857
+ /* @__PURE__ */ jsx11(
858
+ "span",
859
+ {
860
+ "aria-hidden": "true",
861
+ style: {
862
+ position: "absolute",
863
+ left: 0,
864
+ top: 0,
865
+ width: stepNumber && stepNumber >= 10 ? "1.9rem" : "1.6rem",
866
+ height: "1.6rem",
867
+ borderRadius: 10,
868
+ display: "inline-flex",
869
+ alignItems: "center",
870
+ justifyContent: "center",
871
+ fontSize: "0.82rem",
872
+ fontWeight: 600,
873
+ color: "hsl(var(--muted-foreground, 220 15% 50%))",
874
+ background: "hsl(var(--muted, 210 12% 92%))",
875
+ border: "1px solid hsl(var(--border-color, 210 20% 85%))"
876
+ },
877
+ children: stepNumber ?? "-"
878
+ }
879
+ ),
880
+ /* @__PURE__ */ jsx11(
881
+ "div",
882
+ {
883
+ style: {
884
+ fontWeight: 700,
885
+ fontSize: "1.02rem",
886
+ lineHeight: 1.35,
887
+ marginBottom: children ? "0.55rem" : 0,
888
+ color: "hsl(var(--foreground, 220 30% 15%))"
889
+ },
890
+ children: title
891
+ }
892
+ ),
893
+ children ? /* @__PURE__ */ jsx11(
894
+ "div",
895
+ {
896
+ style: {
897
+ color: "hsl(var(--muted-foreground, 220 15% 50%))",
898
+ display: "flow-root",
899
+ width: "100%",
900
+ minWidth: 0,
901
+ maxWidth: "100%",
902
+ overflowX: "auto",
903
+ overflowY: "hidden"
904
+ },
905
+ children
906
+ }
907
+ ) : null
908
+ ]
909
+ }
910
+ );
911
+ }
912
+
913
+ // src/components/TableMdx.tsx
914
+ import { jsx as jsx12 } from "react/jsx-runtime";
915
+ var tableShellStyle = {
916
+ position: "relative",
917
+ width: "100%",
918
+ overflowX: "auto",
919
+ overflowY: "hidden",
920
+ border: "1px solid hsl(var(--border-color, 210 20% 85%))",
921
+ borderRadius: 10,
922
+ margin: "1rem 0"
923
+ };
924
+ var cellBaseStyle = {
925
+ padding: "0.6rem 0.75rem",
926
+ verticalAlign: "middle",
927
+ borderBottom: "1px solid hsl(var(--border-color, 210 20% 85%))"
928
+ };
929
+ function TableMdx({ style, ...props }) {
930
+ return /* @__PURE__ */ jsx12("div", { style: { ...tableShellStyle }, children: /* @__PURE__ */ jsx12(
931
+ "table",
932
+ {
933
+ ...props,
934
+ style: {
935
+ width: "100%",
936
+ fontSize: "0.925rem",
937
+ borderCollapse: "collapse",
938
+ margin: 0,
939
+ ...style
940
+ }
941
+ }
942
+ ) });
943
+ }
944
+ function TableHeaderMdx(props) {
945
+ return /* @__PURE__ */ jsx12(
946
+ "thead",
947
+ {
948
+ ...props,
949
+ style: {
950
+ background: "hsl(var(--muted, 210 20% 92%))",
951
+ ...props.style
952
+ }
953
+ }
954
+ );
955
+ }
956
+ function TableBodyMdx(props) {
957
+ return /* @__PURE__ */ jsx12("tbody", { ...props });
958
+ }
959
+ function TableFooterMdx(props) {
960
+ return /* @__PURE__ */ jsx12(
961
+ "tfoot",
962
+ {
963
+ ...props,
964
+ style: {
965
+ background: "hsl(var(--muted, 210 20% 92%))",
966
+ borderTop: "1px solid hsl(var(--border-color, 210 20% 85%))",
967
+ ...props.style
968
+ }
969
+ }
970
+ );
971
+ }
972
+ function TableRowMdx(props) {
973
+ return /* @__PURE__ */ jsx12("tr", { ...props });
974
+ }
975
+ function TableHeadMdx(props) {
976
+ return /* @__PURE__ */ jsx12(
977
+ "th",
978
+ {
979
+ scope: props.scope ?? "col",
980
+ ...props,
981
+ style: {
982
+ ...cellBaseStyle,
983
+ textAlign: "left",
984
+ color: "hsl(var(--muted-foreground, 220 15% 50%))",
985
+ fontWeight: 600,
986
+ ...props.style
987
+ }
988
+ }
989
+ );
990
+ }
991
+ function TableCellMdx(props) {
992
+ return /* @__PURE__ */ jsx12("td", { ...props, style: { ...cellBaseStyle, ...props.style } });
993
+ }
994
+
995
+ // src/components/YoutubeMdx.tsx
996
+ import { jsx as jsx13 } from "react/jsx-runtime";
997
+ function YoutubeMdx({ videoId, title = "YouTube video" }) {
998
+ const src = `https://www.youtube-nocookie.com/embed/${videoId}`;
999
+ return /* @__PURE__ */ jsx13(
1000
+ "div",
1001
+ {
1002
+ style: {
1003
+ position: "relative",
1004
+ width: "100%",
1005
+ paddingBottom: "56.25%",
1006
+ height: 0,
1007
+ overflow: "hidden",
1008
+ background: "#000",
1009
+ borderRadius: 8,
1010
+ boxShadow: "0 4px 20px rgba(0, 0, 0, 0.2)",
1011
+ margin: "1rem 0"
1012
+ },
1013
+ children: /* @__PURE__ */ jsx13(
1014
+ "iframe",
1015
+ {
1016
+ src,
1017
+ title,
1018
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
1019
+ allowFullScreen: true,
1020
+ style: {
1021
+ position: "absolute",
1022
+ top: 0,
1023
+ left: 0,
1024
+ width: "100%",
1025
+ height: "100%",
1026
+ border: "none",
1027
+ borderRadius: 8
1028
+ }
1029
+ }
1030
+ )
1031
+ }
1032
+ );
1033
+ }
1034
+
1035
+ export {
1036
+ resolveLucideIcon,
1037
+ LinkMdx,
1038
+ ButtonMdx,
1039
+ CardsMdx,
1040
+ CodeBlock,
1041
+ KbdMdx,
1042
+ NoteMdx,
1043
+ ReleaseMdx,
1044
+ ChangesMdx,
1045
+ StepsMdx,
1046
+ StepMdx,
1047
+ TableMdx,
1048
+ TableHeaderMdx,
1049
+ TableBodyMdx,
1050
+ TableFooterMdx,
1051
+ TableRowMdx,
1052
+ TableHeadMdx,
1053
+ TableCellMdx,
1054
+ YoutubeMdx
1055
+ };
1056
+ //# sourceMappingURL=chunk-PSDC53TU.js.map