boltdocs 1.4.1 → 1.6.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.
Files changed (43) hide show
  1. package/dist/{PackageManagerTabs-XW3AVXVX.mjs → PackageManagerTabs-NVT7G625.mjs} +1 -1
  2. package/dist/{SearchDialog-O3V36MXA.css → SearchDialog-3QICRMWF.css} +145 -5
  3. package/dist/{SearchDialog-FBNGKRPK.mjs → SearchDialog-J3KNRGNO.mjs} +1 -1
  4. package/dist/{chunk-S5G55FBI.mjs → chunk-7SFUJWTB.mjs} +4 -4
  5. package/dist/{chunk-D7YBQG6H.mjs → chunk-HSPDIRTW.mjs} +312 -134
  6. package/dist/client/index.css +145 -5
  7. package/dist/client/index.d.mts +22 -5
  8. package/dist/client/index.d.ts +22 -5
  9. package/dist/client/index.js +725 -459
  10. package/dist/client/index.mjs +182 -61
  11. package/dist/client/ssr.css +145 -5
  12. package/dist/client/ssr.d.mts +1 -1
  13. package/dist/client/ssr.d.ts +1 -1
  14. package/dist/client/ssr.js +544 -395
  15. package/dist/client/ssr.mjs +1 -1
  16. package/dist/{config-BD5ZHz15.d.mts → config-DkZg5aCf.d.mts} +2 -0
  17. package/dist/{config-BD5ZHz15.d.ts → config-DkZg5aCf.d.ts} +2 -0
  18. package/dist/node/index.d.mts +2 -2
  19. package/dist/node/index.d.ts +2 -2
  20. package/dist/node/index.js +5 -1
  21. package/dist/node/index.mjs +5 -1
  22. package/dist/{types-CvrzTbEX.d.mts → types-DGIo1VKD.d.mts} +2 -0
  23. package/dist/{types-CvrzTbEX.d.ts → types-DGIo1VKD.d.ts} +2 -0
  24. package/package.json +1 -1
  25. package/src/client/app/index.tsx +2 -12
  26. package/src/client/app/preload.tsx +3 -1
  27. package/src/client/index.ts +2 -0
  28. package/src/client/theme/components/CodeBlock/CodeBlock.tsx +0 -11
  29. package/src/client/theme/components/mdx/FileTree.tsx +229 -0
  30. package/src/client/theme/components/mdx/Tabs.tsx +1 -4
  31. package/src/client/theme/components/mdx/index.ts +3 -0
  32. package/src/client/theme/components/mdx/mdx-components.css +109 -0
  33. package/src/client/theme/icons/pnpm.tsx +5 -5
  34. package/src/client/theme/styles/markdown.css +1 -5
  35. package/src/client/theme/ui/Link/Link.tsx +156 -18
  36. package/src/client/theme/ui/Link/LinkPreview.tsx +64 -0
  37. package/src/client/theme/ui/Link/link-preview.css +64 -0
  38. package/src/client/types.ts +2 -0
  39. package/src/node/config.ts +2 -0
  40. package/src/node/routes/parser.ts +14 -1
  41. package/dist/CodeBlock-QYIKJMEB.mjs +0 -7
  42. package/dist/chunk-KS5B3O6W.mjs +0 -43
  43. package/src/client/theme/icons/yarn.tsx +0 -16
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  BackgroundGradient,
3
3
  Breadcrumbs,
4
+ CodeBlock,
4
5
  Head,
5
6
  Loading,
6
7
  Navbar,
@@ -9,10 +10,7 @@ import {
9
10
  Sidebar,
10
11
  ThemeLayout,
11
12
  createBoltdocsApp
12
- } from "../chunk-D7YBQG6H.mjs";
13
- import {
14
- CodeBlock
15
- } from "../chunk-KS5B3O6W.mjs";
13
+ } from "../chunk-HSPDIRTW.mjs";
16
14
  import {
17
15
  Video
18
16
  } from "../chunk-Z7JHYNAS.mjs";
@@ -21,7 +19,7 @@ import {
21
19
  Deno,
22
20
  NPM,
23
21
  Pnpm
24
- } from "../chunk-S5G55FBI.mjs";
22
+ } from "../chunk-7SFUJWTB.mjs";
25
23
  import "../chunk-FMTOYQLO.mjs";
26
24
 
27
25
  // src/client/theme/components/Playground/Playground.tsx
@@ -193,39 +191,17 @@ function Card({
193
191
 
194
192
  // src/client/theme/components/mdx/Tabs.tsx
195
193
  import { useState as useState2, Children, isValidElement, useRef } from "react";
196
-
197
- // src/client/theme/icons/yarn.tsx
198
194
  import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
199
- var Yarn = (props) => /* @__PURE__ */ jsxs3("svg", { ...props, viewBox: "0 0 256 256", children: [
200
- /* @__PURE__ */ jsx5(
201
- "path",
202
- {
203
- fill: "#2C8EBB",
204
- d: "M128 0C57.307 0 0 57.307 0 128s57.307 128 128 128 128-57.307 128-128S198.693 0 128 0zm0 234.667C69.195 234.667 21.333 186.805 21.333 128S69.195 21.333 128 21.333 234.667 69.195 234.667 128 186.805 234.667 128 234.667z"
205
- }
206
- ),
207
- /* @__PURE__ */ jsx5(
208
- "path",
209
- {
210
- fill: "#2C8EBB",
211
- d: "M173.045 74.053c-4.632-4.632-12.144-4.632-16.776 0L128 102.323l-28.269-28.27c-4.632-4.632-12.144-4.632-16.776 0-4.632 4.632-4.632 12.144 0 16.776L111.224 119.1l-28.269 28.269c-4.632 4.632-4.632 12.144 0 16.776 2.316 2.316 5.352 3.474 8.388 3.474s6.072-1.158 8.388-3.474L128 135.877l28.269 28.268c2.316 2.316 5.352 3.474 8.388 3.474s6.072-1.158 8.388-3.474c4.632-4.632 4.632-12.144 0-16.776L144.776 119.1l28.269-28.271 c4.632-4.632 4.632-12.144 0-16.776z"
212
- }
213
- )
214
- ] });
215
-
216
- // src/client/theme/components/mdx/Tabs.tsx
217
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
218
195
  function Tab({ children }) {
219
- const content = typeof children === "string" ? /* @__PURE__ */ jsx6(CodeBlock, { className: "language-bash", children: /* @__PURE__ */ jsx6("code", { children: children.trim() }) }) : children;
220
- return /* @__PURE__ */ jsx6("div", { className: "ld-tab-panel", children: content });
196
+ const content = typeof children === "string" ? /* @__PURE__ */ jsx5(CodeBlock, { className: "language-bash", children: /* @__PURE__ */ jsx5("code", { children: children.trim() }) }) : children;
197
+ return /* @__PURE__ */ jsx5("div", { className: "ld-tab-panel", children: content });
221
198
  }
222
199
  var getIconForLabel = (label) => {
223
200
  const l = label.toLowerCase();
224
- if (l.includes("npm")) return /* @__PURE__ */ jsx6(NPM, {});
225
- if (l.includes("pnpm")) return /* @__PURE__ */ jsx6(Pnpm, {});
226
- if (l.includes("yarn")) return /* @__PURE__ */ jsx6(Yarn, {});
227
- if (l.includes("bun")) return /* @__PURE__ */ jsx6(Bun, {});
228
- if (l.includes("deno")) return /* @__PURE__ */ jsx6(Deno, {});
201
+ if (l.includes("pnpm")) return /* @__PURE__ */ jsx5(Pnpm, {});
202
+ if (l.includes("npm")) return /* @__PURE__ */ jsx5(NPM, {});
203
+ if (l.includes("bun")) return /* @__PURE__ */ jsx5(Bun, {});
204
+ if (l.includes("deno")) return /* @__PURE__ */ jsx5(Deno, {});
229
205
  return null;
230
206
  };
231
207
  function Tabs({ defaultIndex = 0, children }) {
@@ -246,11 +222,11 @@ function Tabs({ defaultIndex = 0, children }) {
246
222
  tabRefs.current[newIndex]?.focus();
247
223
  }
248
224
  };
249
- return /* @__PURE__ */ jsxs4("div", { className: "ld-tabs", children: [
250
- /* @__PURE__ */ jsx6("div", { className: "ld-tabs__bar", role: "tablist", onKeyDown: handleKeyDown, children: tabs.map((child, i) => {
225
+ return /* @__PURE__ */ jsxs3("div", { className: "ld-tabs", children: [
226
+ /* @__PURE__ */ jsx5("div", { className: "ld-tabs__bar", role: "tablist", onKeyDown: handleKeyDown, children: tabs.map((child, i) => {
251
227
  const label = child.props.label;
252
228
  const Icon = getIconForLabel(label);
253
- return /* @__PURE__ */ jsxs4(
229
+ return /* @__PURE__ */ jsxs3(
254
230
  "button",
255
231
  {
256
232
  role: "tab",
@@ -265,13 +241,13 @@ function Tabs({ defaultIndex = 0, children }) {
265
241
  onClick: () => setActive(i),
266
242
  children: [
267
243
  Icon,
268
- /* @__PURE__ */ jsx6("span", { children: label })
244
+ /* @__PURE__ */ jsx5("span", { children: label })
269
245
  ]
270
246
  },
271
247
  i
272
248
  );
273
249
  }) }),
274
- /* @__PURE__ */ jsx6(
250
+ /* @__PURE__ */ jsx5(
275
251
  "div",
276
252
  {
277
253
  className: "ld-tabs__content",
@@ -292,13 +268,13 @@ import {
292
268
  ShieldAlert,
293
269
  Bookmark
294
270
  } from "lucide-react";
295
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
271
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
296
272
  var ICON_MAP = {
297
- note: /* @__PURE__ */ jsx7(Bookmark, { size: 18 }),
298
- tip: /* @__PURE__ */ jsx7(Lightbulb, { size: 18 }),
299
- info: /* @__PURE__ */ jsx7(Info, { size: 18 }),
300
- warning: /* @__PURE__ */ jsx7(AlertTriangle, { size: 18 }),
301
- danger: /* @__PURE__ */ jsx7(ShieldAlert, { size: 18 })
273
+ note: /* @__PURE__ */ jsx6(Bookmark, { size: 18 }),
274
+ tip: /* @__PURE__ */ jsx6(Lightbulb, { size: 18 }),
275
+ info: /* @__PURE__ */ jsx6(Info, { size: 18 }),
276
+ warning: /* @__PURE__ */ jsx6(AlertTriangle, { size: 18 }),
277
+ danger: /* @__PURE__ */ jsx6(ShieldAlert, { size: 18 })
302
278
  };
303
279
  var LABEL_MAP = {
304
280
  note: "Note",
@@ -314,35 +290,35 @@ function Admonition({
314
290
  className = "",
315
291
  ...rest
316
292
  }) {
317
- return /* @__PURE__ */ jsxs5(
293
+ return /* @__PURE__ */ jsxs4(
318
294
  "div",
319
295
  {
320
296
  className: `ld-admonition ld-admonition--${type} ${className}`.trim(),
321
297
  role: type === "warning" || type === "danger" ? "alert" : "note",
322
298
  ...rest,
323
299
  children: [
324
- /* @__PURE__ */ jsxs5("div", { className: "ld-admonition__header", children: [
325
- /* @__PURE__ */ jsx7("span", { className: "ld-admonition__icon", children: ICON_MAP[type] }),
326
- /* @__PURE__ */ jsx7("span", { className: "ld-admonition__title", children: title || LABEL_MAP[type] })
300
+ /* @__PURE__ */ jsxs4("div", { className: "ld-admonition__header", children: [
301
+ /* @__PURE__ */ jsx6("span", { className: "ld-admonition__icon", children: ICON_MAP[type] }),
302
+ /* @__PURE__ */ jsx6("span", { className: "ld-admonition__title", children: title || LABEL_MAP[type] })
327
303
  ] }),
328
- /* @__PURE__ */ jsx7("div", { className: "ld-admonition__body", children })
304
+ /* @__PURE__ */ jsx6("div", { className: "ld-admonition__body", children })
329
305
  ]
330
306
  }
331
307
  );
332
308
  }
333
- var Note = (props) => /* @__PURE__ */ jsx7(Admonition, { type: "note", ...props });
334
- var Tip = (props) => /* @__PURE__ */ jsx7(Admonition, { type: "tip", ...props });
335
- var Warning = (props) => /* @__PURE__ */ jsx7(Admonition, { type: "warning", ...props });
336
- var Danger = (props) => /* @__PURE__ */ jsx7(Admonition, { type: "danger", ...props });
337
- var InfoBox = (props) => /* @__PURE__ */ jsx7(Admonition, { type: "info", ...props });
309
+ var Note = (props) => /* @__PURE__ */ jsx6(Admonition, { type: "note", ...props });
310
+ var Tip = (props) => /* @__PURE__ */ jsx6(Admonition, { type: "tip", ...props });
311
+ var Warning = (props) => /* @__PURE__ */ jsx6(Admonition, { type: "warning", ...props });
312
+ var Danger = (props) => /* @__PURE__ */ jsx6(Admonition, { type: "danger", ...props });
313
+ var InfoBox = (props) => /* @__PURE__ */ jsx6(Admonition, { type: "info", ...props });
338
314
 
339
315
  // src/client/theme/components/mdx/List.tsx
340
316
  import React3, { Children as Children2 } from "react";
341
317
  import { Check as Check2, ChevronRight } from "lucide-react";
342
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
318
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
343
319
  var ICON_MAP2 = {
344
- checked: /* @__PURE__ */ jsx8(Check2, { size: 14, className: "ld-list__icon" }),
345
- arrow: /* @__PURE__ */ jsx8(ChevronRight, { size: 14, className: "ld-list__icon" })
320
+ checked: /* @__PURE__ */ jsx7(Check2, { size: 14, className: "ld-list__icon" }),
321
+ arrow: /* @__PURE__ */ jsx7(ChevronRight, { size: 14, className: "ld-list__icon" })
346
322
  };
347
323
  function List({
348
324
  variant = "default",
@@ -351,17 +327,161 @@ function List({
351
327
  ...rest
352
328
  }) {
353
329
  if (variant === "default") {
354
- return /* @__PURE__ */ jsx8("ul", { className: `ld-list ${className}`.trim(), ...rest, children });
330
+ return /* @__PURE__ */ jsx7("ul", { className: `ld-list ${className}`.trim(), ...rest, children });
355
331
  }
356
332
  const icon = ICON_MAP2[variant];
357
- return /* @__PURE__ */ jsx8("ul", { className: `ld-list ld-list--${variant} ${className}`.trim(), ...rest, children: Children2.map(children, (child) => {
333
+ return /* @__PURE__ */ jsx7("ul", { className: `ld-list ld-list--${variant} ${className}`.trim(), ...rest, children: Children2.map(children, (child) => {
358
334
  if (!React3.isValidElement(child)) return child;
359
- return /* @__PURE__ */ jsxs6("li", { className: "ld-list__item", children: [
335
+ return /* @__PURE__ */ jsxs5("li", { className: "ld-list__item", children: [
360
336
  icon,
361
- /* @__PURE__ */ jsx8("span", { className: "ld-list__text", children: child.props.children })
337
+ /* @__PURE__ */ jsx7("span", { className: "ld-list__text", children: child.props.children })
362
338
  ] });
363
339
  }) });
364
340
  }
341
+
342
+ // src/client/theme/components/mdx/FileTree.tsx
343
+ import React4, { Children as Children3, isValidElement as isValidElement2, useState as useState3 } from "react";
344
+ import {
345
+ Folder,
346
+ FileText,
347
+ File,
348
+ FileCode,
349
+ FileImage,
350
+ ChevronRight as ChevronRight2
351
+ } from "lucide-react";
352
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
353
+ function getTextContent(node) {
354
+ if (typeof node === "string") return node;
355
+ if (typeof node === "number") return node.toString();
356
+ if (Array.isArray(node)) return node.map(getTextContent).join("");
357
+ if (isValidElement2(node)) {
358
+ return getTextContent(node.props.children);
359
+ }
360
+ return "";
361
+ }
362
+ function getFileIcon(filename) {
363
+ const name = filename.toLowerCase();
364
+ if (name.endsWith(".ts") || name.endsWith(".tsx") || name.endsWith(".js") || name.endsWith(".jsx") || name.endsWith(".json") || name.endsWith(".mjs") || name.endsWith(".cjs") || name.endsWith(".astro") || name.endsWith(".vue") || name.endsWith(".svelte")) {
365
+ return /* @__PURE__ */ jsx8(FileCode, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
366
+ }
367
+ if (name.endsWith(".md") || name.endsWith(".mdx") || name.endsWith(".txt")) {
368
+ return /* @__PURE__ */ jsx8(FileText, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
369
+ }
370
+ if (name.endsWith(".png") || name.endsWith(".jpg") || name.endsWith(".jpeg") || name.endsWith(".svg") || name.endsWith(".gif")) {
371
+ return /* @__PURE__ */ jsx8(
372
+ FileImage,
373
+ {
374
+ size: 16,
375
+ strokeWidth: 2,
376
+ className: "ld-file-tree__icon-file"
377
+ }
378
+ );
379
+ }
380
+ return /* @__PURE__ */ jsx8(File, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
381
+ }
382
+ function isListElement(node, tag) {
383
+ if (typeof node.type === "string") {
384
+ return node.type === tag;
385
+ }
386
+ if (typeof node.type === "function") {
387
+ return node.type.name === tag || node.type.name?.toLowerCase() === tag;
388
+ }
389
+ if (node.props && node.props.originalType === tag) {
390
+ return true;
391
+ }
392
+ if (node.props && node.props.mdxType === tag) {
393
+ return true;
394
+ }
395
+ return false;
396
+ }
397
+ function FolderNode({
398
+ labelText,
399
+ nestedNodes,
400
+ depth
401
+ }) {
402
+ const [isOpen, setIsOpen] = useState3(true);
403
+ return /* @__PURE__ */ jsxs6("li", { className: "ld-file-tree__item", children: [
404
+ /* @__PURE__ */ jsxs6(
405
+ "div",
406
+ {
407
+ className: "ld-file-tree__label ld-file-tree__label--folder",
408
+ onClick: () => setIsOpen(!isOpen),
409
+ style: { cursor: "pointer" },
410
+ children: [
411
+ /* @__PURE__ */ jsx8("span", { className: "ld-file-tree__icon ld-file-tree__icon--chevron", children: /* @__PURE__ */ jsx8(
412
+ ChevronRight2,
413
+ {
414
+ size: 14,
415
+ className: `ld-file-tree__chevron ${isOpen ? "ld-file-tree__chevron--open" : ""}`,
416
+ strokeWidth: 3
417
+ }
418
+ ) }),
419
+ /* @__PURE__ */ jsx8("span", { className: "ld-file-tree__icon", children: /* @__PURE__ */ jsx8(
420
+ Folder,
421
+ {
422
+ size: 16,
423
+ strokeWidth: 2,
424
+ className: "ld-file-tree__icon-folder",
425
+ fill: "currentColor",
426
+ fillOpacity: 0.15
427
+ }
428
+ ) }),
429
+ /* @__PURE__ */ jsx8("span", { className: "ld-file-tree__name", children: labelText })
430
+ ]
431
+ }
432
+ ),
433
+ isOpen && nestedNodes.length > 0 && /* @__PURE__ */ jsx8("div", { className: "ld-file-tree__nested", children: nestedNodes.map((child, index) => /* @__PURE__ */ jsx8(React4.Fragment, { children: parseNode(child, depth) }, index)) })
434
+ ] });
435
+ }
436
+ function parseNode(node, depth = 0) {
437
+ if (!isValidElement2(node)) {
438
+ return node;
439
+ }
440
+ if (isListElement(node, "ul")) {
441
+ return /* @__PURE__ */ jsx8(
442
+ "ul",
443
+ {
444
+ className: `ld-file-tree__list ${depth === 0 ? "ld-file-tree__list--root" : ""}`,
445
+ children: Children3.map(node.props.children, (child, index) => /* @__PURE__ */ jsx8(React4.Fragment, { children: parseNode(child, depth + 1) }, index))
446
+ }
447
+ );
448
+ }
449
+ if (isListElement(node, "li")) {
450
+ const children = Children3.toArray(node.props.children);
451
+ const nestedListIndex = children.findIndex(
452
+ (child) => isValidElement2(child) && isListElement(child, "ul")
453
+ );
454
+ const hasNested = nestedListIndex !== -1;
455
+ const labelNodes = hasNested ? children.slice(0, nestedListIndex) : children;
456
+ const nestedNodes = hasNested ? children.slice(nestedListIndex) : [];
457
+ const rawLabelContent = getTextContent(labelNodes).trim();
458
+ const isExplicitDir = rawLabelContent.endsWith("/");
459
+ const labelText = isExplicitDir ? rawLabelContent.slice(0, -1) : rawLabelContent;
460
+ const isFolder = hasNested || isExplicitDir;
461
+ if (isFolder) {
462
+ return /* @__PURE__ */ jsx8(
463
+ FolderNode,
464
+ {
465
+ labelText,
466
+ nestedNodes,
467
+ depth
468
+ }
469
+ );
470
+ }
471
+ return /* @__PURE__ */ jsx8("li", { className: "ld-file-tree__item", children: /* @__PURE__ */ jsxs6("div", { className: "ld-file-tree__label ld-file-tree__label--file", children: [
472
+ /* @__PURE__ */ jsx8("span", { className: "ld-file-tree__icon ld-file-tree__icon--spacer" }),
473
+ /* @__PURE__ */ jsx8("span", { className: "ld-file-tree__icon", children: getFileIcon(labelText) }),
474
+ /* @__PURE__ */ jsx8("span", { className: "ld-file-tree__name", children: labelText })
475
+ ] }) });
476
+ }
477
+ if (node.props.children) {
478
+ return Children3.map(node.props.children, (child, index) => /* @__PURE__ */ jsx8(React4.Fragment, { children: parseNode(child, depth) }, index));
479
+ }
480
+ return node;
481
+ }
482
+ function FileTree({ children }) {
483
+ return /* @__PURE__ */ jsx8("div", { className: "ld-file-tree", dir: "ltr", children: Children3.map(children, (child) => parseNode(child, 0)) });
484
+ }
365
485
  export {
366
486
  Admonition,
367
487
  BackgroundGradient,
@@ -372,6 +492,7 @@ export {
372
492
  Cards,
373
493
  CodeBlock,
374
494
  Danger,
495
+ FileTree,
375
496
  Head,
376
497
  InfoBox,
377
498
  List,
@@ -1,5 +1,58 @@
1
1
  @import "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";
2
2
 
3
+ /* src/client/theme/ui/Link/link-preview.css */
4
+ .boltdocs-link-preview {
5
+ position: fixed;
6
+ z-index: 1000;
7
+ width: 320px;
8
+ padding: 1rem;
9
+ background-color: var(--ld-navbar-bg);
10
+ backdrop-filter: blur(var(--ld-navbar-blur));
11
+ -webkit-backdrop-filter: blur(var(--ld-navbar-blur));
12
+ border: 1px solid var(--ld-border-subtle);
13
+ border-radius: var(--ld-radius-md);
14
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
15
+ pointer-events: none;
16
+ opacity: 0;
17
+ transform: translateY(10px) scale(0.95);
18
+ transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
19
+ font-family: var(--ld-font-sans);
20
+ }
21
+ .boltdocs-link-preview.is-visible {
22
+ opacity: 1;
23
+ transform: translateY(0) scale(1);
24
+ }
25
+ .boltdocs-link-preview-title {
26
+ display: block;
27
+ font-weight: 600;
28
+ font-size: 0.95rem;
29
+ color: var(--ld-text-main);
30
+ margin-bottom: 0.5rem;
31
+ line-height: 1.4;
32
+ }
33
+ .boltdocs-link-preview-summary {
34
+ display: block;
35
+ font-size: 0.85rem;
36
+ color: var(--ld-text-muted);
37
+ line-height: 1.5;
38
+ display: -webkit-box;
39
+ -webkit-line-clamp: 4;
40
+ line-clamp: 4;
41
+ -webkit-box-orient: vertical;
42
+ overflow: hidden;
43
+ }
44
+ [data-theme=dark] .boltdocs-link-preview {
45
+ background-color: var(--ld-navbar-bg);
46
+ border-color: var(--ld-border-subtle);
47
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
48
+ }
49
+ [data-theme=dark] .boltdocs-link-preview-title {
50
+ color: #f8fafc;
51
+ }
52
+ [data-theme=dark] .boltdocs-link-preview-summary {
53
+ color: #94a3b8;
54
+ }
55
+
3
56
  /* src/client/theme/styles/variables.css */
4
57
  :root[data-theme=light],
5
58
  :root.theme-light {
@@ -1072,7 +1125,7 @@ a {
1072
1125
  right: 0.75rem;
1073
1126
  z-index: 50;
1074
1127
  padding: 0.4rem;
1075
- background-color: rgba(20, 20, 30, 0.8);
1128
+ background-color: var(--ld-surface);
1076
1129
  backdrop-filter: blur(8px);
1077
1130
  -webkit-backdrop-filter: blur(8px);
1078
1131
  border: 1px solid var(--ld-border-subtle);
@@ -1081,13 +1134,9 @@ a {
1081
1134
  cursor: pointer;
1082
1135
  transition: all 0.2s ease;
1083
1136
  opacity: 0;
1084
- visibility: hidden;
1085
- pointer-events: none;
1086
1137
  }
1087
1138
  .code-block-wrapper:hover .code-block-copy {
1088
1139
  opacity: 1;
1089
- visibility: visible;
1090
- pointer-events: auto;
1091
1140
  }
1092
1141
  .code-block-copy:hover {
1093
1142
  color: var(--ld-text-main);
@@ -1575,6 +1624,97 @@ a {
1575
1624
  .ld-list--arrow .ld-list__icon {
1576
1625
  color: var(--ld-color-primary);
1577
1626
  }
1627
+ .ld-file-tree {
1628
+ margin: 1.5rem 0;
1629
+ padding: 1rem;
1630
+ border-radius: var(--ld-radius-lg);
1631
+ border: 1px solid var(--ld-border-subtle);
1632
+ background: var(--ld-bg-soft);
1633
+ font-family: var(--ld-font-mono);
1634
+ font-size: 0.875rem;
1635
+ overflow-x: auto;
1636
+ }
1637
+ .ld-file-tree__list {
1638
+ list-style: none !important;
1639
+ margin: 0 !important;
1640
+ padding: 0;
1641
+ position: relative;
1642
+ }
1643
+ .ld-file-tree__list:not(.ld-file-tree__list--root) {
1644
+ padding-left: 1.25rem;
1645
+ margin-top: 0.25rem !important;
1646
+ position: relative;
1647
+ }
1648
+ .ld-file-tree__list:not(.ld-file-tree__list--root)::before {
1649
+ content: "";
1650
+ position: absolute;
1651
+ top: 0;
1652
+ bottom: 0;
1653
+ left: 0.45rem;
1654
+ width: 1px;
1655
+ background-color: var(--ld-border-subtle);
1656
+ z-index: 0;
1657
+ }
1658
+ .ld-file-tree__item {
1659
+ position: relative;
1660
+ margin: 0.2rem 0 !important;
1661
+ padding: 0 !important;
1662
+ display: block !important;
1663
+ }
1664
+ .ld-file-tree__label {
1665
+ display: inline-flex;
1666
+ align-items: center;
1667
+ gap: 0.5rem;
1668
+ color: var(--ld-text-muted);
1669
+ user-select: none;
1670
+ border-radius: var(--ld-radius-sm);
1671
+ padding: 0.25rem 0.6rem 0.25rem 0.4rem;
1672
+ transition: all 0.2s ease;
1673
+ position: relative;
1674
+ z-index: 1;
1675
+ }
1676
+ .ld-file-tree__label:hover {
1677
+ background: var(--ld-bg-mute);
1678
+ color: var(--ld-text-main);
1679
+ }
1680
+ .ld-file-tree__label--folder {
1681
+ color: var(--ld-text-main);
1682
+ font-weight: 500;
1683
+ }
1684
+ .ld-file-tree__icon {
1685
+ display: inline-flex;
1686
+ align-items: center;
1687
+ justify-content: center;
1688
+ opacity: 0.8;
1689
+ flex-shrink: 0;
1690
+ }
1691
+ .ld-file-tree__icon-folder {
1692
+ color: var(--ld-color-primary);
1693
+ }
1694
+ .ld-file-tree__name {
1695
+ white-space: nowrap;
1696
+ }
1697
+ .ld-file-tree__icon--chevron {
1698
+ width: 14px;
1699
+ height: 14px;
1700
+ opacity: 0.5;
1701
+ transition: opacity 0.2s ease;
1702
+ display: flex !important;
1703
+ align-items: center;
1704
+ justify-content: center;
1705
+ }
1706
+ .ld-file-tree__label:hover .ld-file-tree__icon--chevron {
1707
+ opacity: 1;
1708
+ }
1709
+ .ld-file-tree__chevron {
1710
+ transition: transform 0.2s ease;
1711
+ }
1712
+ .ld-file-tree__chevron--open {
1713
+ transform: rotate(90deg);
1714
+ }
1715
+ .ld-file-tree__icon--spacer {
1716
+ width: 14px;
1717
+ }
1578
1718
 
1579
1719
  /* src/client/theme/components/PackageManagerTabs/pkg-tabs.css */
1580
1720
  .pkg-tabs-wrapper {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { a as ComponentRoute } from '../types-CvrzTbEX.mjs';
2
+ import { a as ComponentRoute } from '../types-DGIo1VKD.mjs';
3
3
 
4
4
  /**
5
5
  * Options for rendering the Boltdocs application on the server (SSG).
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { a as ComponentRoute } from '../types-CvrzTbEX.js';
2
+ import { a as ComponentRoute } from '../types-DGIo1VKD.js';
3
3
 
4
4
  /**
5
5
  * Options for rendering the Boltdocs application on the server (SSG).