boltdocs 1.5.0 → 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.
@@ -3,7 +3,7 @@ import {
3
3
  Deno,
4
4
  NPM,
5
5
  Pnpm
6
- } from "./chunk-S5G55FBI.mjs";
6
+ } from "./chunk-7SFUJWTB.mjs";
7
7
  import {
8
8
  copyToClipboard
9
9
  } from "./chunk-FMTOYQLO.mjs";
@@ -1571,6 +1571,97 @@ a {
1571
1571
  .ld-list--arrow .ld-list__icon {
1572
1572
  color: var(--ld-color-primary);
1573
1573
  }
1574
+ .ld-file-tree {
1575
+ margin: 1.5rem 0;
1576
+ padding: 1rem;
1577
+ border-radius: var(--ld-radius-lg);
1578
+ border: 1px solid var(--ld-border-subtle);
1579
+ background: var(--ld-bg-soft);
1580
+ font-family: var(--ld-font-mono);
1581
+ font-size: 0.875rem;
1582
+ overflow-x: auto;
1583
+ }
1584
+ .ld-file-tree__list {
1585
+ list-style: none !important;
1586
+ margin: 0 !important;
1587
+ padding: 0;
1588
+ position: relative;
1589
+ }
1590
+ .ld-file-tree__list:not(.ld-file-tree__list--root) {
1591
+ padding-left: 1.25rem;
1592
+ margin-top: 0.25rem !important;
1593
+ position: relative;
1594
+ }
1595
+ .ld-file-tree__list:not(.ld-file-tree__list--root)::before {
1596
+ content: "";
1597
+ position: absolute;
1598
+ top: 0;
1599
+ bottom: 0;
1600
+ left: 0.45rem;
1601
+ width: 1px;
1602
+ background-color: var(--ld-border-subtle);
1603
+ z-index: 0;
1604
+ }
1605
+ .ld-file-tree__item {
1606
+ position: relative;
1607
+ margin: 0.2rem 0 !important;
1608
+ padding: 0 !important;
1609
+ display: block !important;
1610
+ }
1611
+ .ld-file-tree__label {
1612
+ display: inline-flex;
1613
+ align-items: center;
1614
+ gap: 0.5rem;
1615
+ color: var(--ld-text-muted);
1616
+ user-select: none;
1617
+ border-radius: var(--ld-radius-sm);
1618
+ padding: 0.25rem 0.6rem 0.25rem 0.4rem;
1619
+ transition: all 0.2s ease;
1620
+ position: relative;
1621
+ z-index: 1;
1622
+ }
1623
+ .ld-file-tree__label:hover {
1624
+ background: var(--ld-bg-mute);
1625
+ color: var(--ld-text-main);
1626
+ }
1627
+ .ld-file-tree__label--folder {
1628
+ color: var(--ld-text-main);
1629
+ font-weight: 500;
1630
+ }
1631
+ .ld-file-tree__icon {
1632
+ display: inline-flex;
1633
+ align-items: center;
1634
+ justify-content: center;
1635
+ opacity: 0.8;
1636
+ flex-shrink: 0;
1637
+ }
1638
+ .ld-file-tree__icon-folder {
1639
+ color: var(--ld-color-primary);
1640
+ }
1641
+ .ld-file-tree__name {
1642
+ white-space: nowrap;
1643
+ }
1644
+ .ld-file-tree__icon--chevron {
1645
+ width: 14px;
1646
+ height: 14px;
1647
+ opacity: 0.5;
1648
+ transition: opacity 0.2s ease;
1649
+ display: flex !important;
1650
+ align-items: center;
1651
+ justify-content: center;
1652
+ }
1653
+ .ld-file-tree__label:hover .ld-file-tree__icon--chevron {
1654
+ opacity: 1;
1655
+ }
1656
+ .ld-file-tree__chevron {
1657
+ transition: transform 0.2s ease;
1658
+ }
1659
+ .ld-file-tree__chevron--open {
1660
+ transform: rotate(90deg);
1661
+ }
1662
+ .ld-file-tree__icon--spacer {
1663
+ width: 14px;
1664
+ }
1574
1665
 
1575
1666
  /* src/client/theme/components/PackageManagerTabs/pkg-tabs.css */
1576
1667
  .pkg-tabs-wrapper {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Link
3
- } from "./chunk-FMQ4HRKZ.mjs";
3
+ } from "./chunk-HSPDIRTW.mjs";
4
4
  import "./chunk-FMTOYQLO.mjs";
5
5
 
6
6
  // src/client/theme/ui/SearchDialog/SearchDialog.tsx
@@ -83,10 +83,10 @@ var Pnpm = (props) => /* @__PURE__ */ jsxs2(
83
83
  /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__a40WtxIl8d", fill: "#f9ad00" }) }),
84
84
  /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__h2CN9AEEpe", fill: "#f9ad00" }) }),
85
85
  /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__dqv5133G8", fill: "#f9ad00" }) }),
86
- /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__b1Lv79ypvm", fill: "currentColor" }) }),
87
- /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__hy1IZWwLX", fill: "currentColor" }) }),
88
- /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__akQfjxQes", fill: "currentColor" }) }),
89
- /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__bdSrwE5pk", fill: "currentColor" }) })
86
+ /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__b1Lv79ypvm", fill: "#ffffff" }) }),
87
+ /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__hy1IZWwLX", fill: "#ffffff" }) }),
88
+ /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__akQfjxQes", fill: "#ffffff" }) }),
89
+ /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__bdSrwE5pk", fill: "#ffffff" }) })
90
90
  ] })
91
91
  ]
92
92
  }
@@ -720,7 +720,7 @@ var Video = lazy(
720
720
  () => import("./Video-KNTY5BNO.mjs").then((m) => ({ default: m.Video }))
721
721
  );
722
722
  var PackageManagerTabs = lazy(
723
- () => import("./PackageManagerTabs-XW3AVXVX.mjs").then((m) => ({
723
+ () => import("./PackageManagerTabs-NVT7G625.mjs").then((m) => ({
724
724
  default: m.PackageManagerTabs
725
725
  }))
726
726
  );
@@ -1510,7 +1510,7 @@ var XformerlyTwitter = (props) => /* @__PURE__ */ jsx20("svg", { ...props, fill:
1510
1510
  // src/client/theme/ui/Navbar/Navbar.tsx
1511
1511
  import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
1512
1512
  var SearchDialog = React10.lazy(
1513
- () => import("./SearchDialog-5ISK64QY.mjs").then((m) => ({ default: m.SearchDialog }))
1513
+ () => import("./SearchDialog-J3KNRGNO.mjs").then((m) => ({ default: m.SearchDialog }))
1514
1514
  );
1515
1515
  var ICON_MAP = {
1516
1516
  discord: Discord,
@@ -1624,6 +1624,97 @@ a {
1624
1624
  .ld-list--arrow .ld-list__icon {
1625
1625
  color: var(--ld-color-primary);
1626
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
+ }
1627
1718
 
1628
1719
  /* src/client/theme/components/PackageManagerTabs/pkg-tabs.css */
1629
1720
  .pkg-tabs-wrapper {
@@ -279,7 +279,6 @@ interface TabsProps {
279
279
  * <Tabs>
280
280
  * <Tab label="npm">npm install boltdocs</Tab>
281
281
  * <Tab label="pnpm">pnpm add boltdocs</Tab>
282
- * <Tab label="yarn">yarn add boltdocs</Tab>
283
282
  * </Tabs>
284
283
  * ```
285
284
  */
@@ -326,4 +325,22 @@ interface ListProps extends React.HTMLAttributes<HTMLUListElement> {
326
325
  */
327
326
  declare function List({ variant, children, className, ...rest }: ListProps): react_jsx_runtime.JSX.Element;
328
327
 
329
- export { Admonition, type AdmonitionProps, BackgroundGradient, Badge, type BadgeProps, BoltdocsConfig, Breadcrumbs, Button, type ButtonProps, Card, type CardProps, Cards, type CardsProps, CodeBlock, ComponentRoute, CreateBoltdocsAppOptions, Danger, Head, InfoBox, List, type ListProps, Loading, Navbar, NotFound, Note, OnThisPage, Playground, Sidebar, Tab, type TabProps, Tabs, type TabsProps, ThemeLayout, Tip, Video, Warning, createBoltdocsApp };
328
+ interface FileTreeProps {
329
+ children: React.ReactNode;
330
+ }
331
+ /**
332
+ * FileTree component displays a customized, styled tree structure for markdown lists.
333
+ *
334
+ * ```mdx
335
+ * <FileTree>
336
+ * - src/
337
+ * - index.ts
338
+ * - components/
339
+ * - Button.tsx
340
+ * - package.json
341
+ * </FileTree>
342
+ * ```
343
+ */
344
+ declare function FileTree({ children }: FileTreeProps): react_jsx_runtime.JSX.Element;
345
+
346
+ export { Admonition, type AdmonitionProps, BackgroundGradient, Badge, type BadgeProps, BoltdocsConfig, Breadcrumbs, Button, type ButtonProps, Card, type CardProps, Cards, type CardsProps, CodeBlock, ComponentRoute, CreateBoltdocsAppOptions, Danger, FileTree, type FileTreeProps, Head, InfoBox, List, type ListProps, Loading, Navbar, NotFound, Note, OnThisPage, Playground, Sidebar, Tab, type TabProps, Tabs, type TabsProps, ThemeLayout, Tip, Video, Warning, createBoltdocsApp };
@@ -279,7 +279,6 @@ interface TabsProps {
279
279
  * <Tabs>
280
280
  * <Tab label="npm">npm install boltdocs</Tab>
281
281
  * <Tab label="pnpm">pnpm add boltdocs</Tab>
282
- * <Tab label="yarn">yarn add boltdocs</Tab>
283
282
  * </Tabs>
284
283
  * ```
285
284
  */
@@ -326,4 +325,22 @@ interface ListProps extends React.HTMLAttributes<HTMLUListElement> {
326
325
  */
327
326
  declare function List({ variant, children, className, ...rest }: ListProps): react_jsx_runtime.JSX.Element;
328
327
 
329
- export { Admonition, type AdmonitionProps, BackgroundGradient, Badge, type BadgeProps, BoltdocsConfig, Breadcrumbs, Button, type ButtonProps, Card, type CardProps, Cards, type CardsProps, CodeBlock, ComponentRoute, CreateBoltdocsAppOptions, Danger, Head, InfoBox, List, type ListProps, Loading, Navbar, NotFound, Note, OnThisPage, Playground, Sidebar, Tab, type TabProps, Tabs, type TabsProps, ThemeLayout, Tip, Video, Warning, createBoltdocsApp };
328
+ interface FileTreeProps {
329
+ children: React.ReactNode;
330
+ }
331
+ /**
332
+ * FileTree component displays a customized, styled tree structure for markdown lists.
333
+ *
334
+ * ```mdx
335
+ * <FileTree>
336
+ * - src/
337
+ * - index.ts
338
+ * - components/
339
+ * - Button.tsx
340
+ * - package.json
341
+ * </FileTree>
342
+ * ```
343
+ */
344
+ declare function FileTree({ children }: FileTreeProps): react_jsx_runtime.JSX.Element;
345
+
346
+ export { Admonition, type AdmonitionProps, BackgroundGradient, Badge, type BadgeProps, BoltdocsConfig, Breadcrumbs, Button, type ButtonProps, Card, type CardProps, Cards, type CardsProps, CodeBlock, ComponentRoute, CreateBoltdocsAppOptions, Danger, FileTree, type FileTreeProps, Head, InfoBox, List, type ListProps, Loading, Navbar, NotFound, Note, OnThisPage, Playground, Sidebar, Tab, type TabProps, Tabs, type TabsProps, ThemeLayout, Tip, Video, Warning, createBoltdocsApp };
@@ -2081,10 +2081,10 @@ var init_pnpm = __esm({
2081
2081
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__a40WtxIl8d", fill: "#f9ad00" }) }),
2082
2082
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__h2CN9AEEpe", fill: "#f9ad00" }) }),
2083
2083
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__dqv5133G8", fill: "#f9ad00" }) }),
2084
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__b1Lv79ypvm", fill: "currentColor" }) }),
2085
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__hy1IZWwLX", fill: "currentColor" }) }),
2086
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__akQfjxQes", fill: "currentColor" }) }),
2087
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__bdSrwE5pk", fill: "currentColor" }) })
2084
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__b1Lv79ypvm", fill: "#ffffff" }) }),
2085
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__hy1IZWwLX", fill: "#ffffff" }) }),
2086
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__akQfjxQes", fill: "#ffffff" }) }),
2087
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__bdSrwE5pk", fill: "#ffffff" }) })
2088
2088
  ] })
2089
2089
  ]
2090
2090
  }
@@ -2558,6 +2558,7 @@ __export(client_exports, {
2558
2558
  Cards: () => Cards,
2559
2559
  CodeBlock: () => CodeBlock,
2560
2560
  Danger: () => Danger,
2561
+ FileTree: () => FileTree,
2561
2562
  Head: () => Head,
2562
2563
  InfoBox: () => InfoBox,
2563
2564
  List: () => List,
@@ -2766,39 +2767,17 @@ init_npm();
2766
2767
  init_pnpm();
2767
2768
  init_bun();
2768
2769
  init_deno();
2769
-
2770
- // src/client/theme/icons/yarn.tsx
2771
2770
  var import_jsx_runtime33 = require("react/jsx-runtime");
2772
- var Yarn = (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { ...props, viewBox: "0 0 256 256", children: [
2773
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2774
- "path",
2775
- {
2776
- fill: "#2C8EBB",
2777
- 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"
2778
- }
2779
- ),
2780
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2781
- "path",
2782
- {
2783
- fill: "#2C8EBB",
2784
- 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"
2785
- }
2786
- )
2787
- ] });
2788
-
2789
- // src/client/theme/components/mdx/Tabs.tsx
2790
- var import_jsx_runtime34 = require("react/jsx-runtime");
2791
2771
  function Tab({ children }) {
2792
- const content = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CodeBlock, { className: "language-bash", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("code", { children: children.trim() }) }) : children;
2793
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "ld-tab-panel", children: content });
2772
+ const content = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CodeBlock, { className: "language-bash", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("code", { children: children.trim() }) }) : children;
2773
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "ld-tab-panel", children: content });
2794
2774
  }
2795
2775
  var getIconForLabel = (label) => {
2796
2776
  const l = label.toLowerCase();
2797
- if (l.includes("npm")) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(NPM, {});
2798
- if (l.includes("pnpm")) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Pnpm, {});
2799
- if (l.includes("yarn")) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Yarn, {});
2800
- if (l.includes("bun")) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Bun, {});
2801
- if (l.includes("deno")) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Deno, {});
2777
+ if (l.includes("pnpm")) return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Pnpm, {});
2778
+ if (l.includes("npm")) return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(NPM, {});
2779
+ if (l.includes("bun")) return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Bun, {});
2780
+ if (l.includes("deno")) return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Deno, {});
2802
2781
  return null;
2803
2782
  };
2804
2783
  function Tabs({ defaultIndex = 0, children }) {
@@ -2819,11 +2798,11 @@ function Tabs({ defaultIndex = 0, children }) {
2819
2798
  tabRefs.current[newIndex]?.focus();
2820
2799
  }
2821
2800
  };
2822
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "ld-tabs", children: [
2823
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "ld-tabs__bar", role: "tablist", onKeyDown: handleKeyDown, children: tabs.map((child, i) => {
2801
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "ld-tabs", children: [
2802
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "ld-tabs__bar", role: "tablist", onKeyDown: handleKeyDown, children: tabs.map((child, i) => {
2824
2803
  const label = child.props.label;
2825
2804
  const Icon = getIconForLabel(label);
2826
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
2805
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
2827
2806
  "button",
2828
2807
  {
2829
2808
  role: "tab",
@@ -2838,13 +2817,13 @@ function Tabs({ defaultIndex = 0, children }) {
2838
2817
  onClick: () => setActive(i),
2839
2818
  children: [
2840
2819
  Icon,
2841
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: label })
2820
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: label })
2842
2821
  ]
2843
2822
  },
2844
2823
  i
2845
2824
  );
2846
2825
  }) }),
2847
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2826
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2848
2827
  "div",
2849
2828
  {
2850
2829
  className: "ld-tabs__content",
@@ -2859,13 +2838,13 @@ function Tabs({ defaultIndex = 0, children }) {
2859
2838
 
2860
2839
  // src/client/theme/components/mdx/Admonition.tsx
2861
2840
  var import_lucide_react16 = require("lucide-react");
2862
- var import_jsx_runtime35 = require("react/jsx-runtime");
2841
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2863
2842
  var ICON_MAP2 = {
2864
- note: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.Bookmark, { size: 18 }),
2865
- tip: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.Lightbulb, { size: 18 }),
2866
- info: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.Info, { size: 18 }),
2867
- warning: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.AlertTriangle, { size: 18 }),
2868
- danger: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.ShieldAlert, { size: 18 })
2843
+ note: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react16.Bookmark, { size: 18 }),
2844
+ tip: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react16.Lightbulb, { size: 18 }),
2845
+ info: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react16.Info, { size: 18 }),
2846
+ warning: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react16.AlertTriangle, { size: 18 }),
2847
+ danger: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react16.ShieldAlert, { size: 18 })
2869
2848
  };
2870
2849
  var LABEL_MAP = {
2871
2850
  note: "Note",
@@ -2881,35 +2860,35 @@ function Admonition({
2881
2860
  className = "",
2882
2861
  ...rest
2883
2862
  }) {
2884
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2863
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
2885
2864
  "div",
2886
2865
  {
2887
2866
  className: `ld-admonition ld-admonition--${type} ${className}`.trim(),
2888
2867
  role: type === "warning" || type === "danger" ? "alert" : "note",
2889
2868
  ...rest,
2890
2869
  children: [
2891
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "ld-admonition__header", children: [
2892
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ld-admonition__icon", children: ICON_MAP2[type] }),
2893
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ld-admonition__title", children: title || LABEL_MAP[type] })
2870
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "ld-admonition__header", children: [
2871
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "ld-admonition__icon", children: ICON_MAP2[type] }),
2872
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "ld-admonition__title", children: title || LABEL_MAP[type] })
2894
2873
  ] }),
2895
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "ld-admonition__body", children })
2874
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "ld-admonition__body", children })
2896
2875
  ]
2897
2876
  }
2898
2877
  );
2899
2878
  }
2900
- var Note = (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Admonition, { type: "note", ...props });
2901
- var Tip = (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Admonition, { type: "tip", ...props });
2902
- var Warning = (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Admonition, { type: "warning", ...props });
2903
- var Danger = (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Admonition, { type: "danger", ...props });
2904
- var InfoBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Admonition, { type: "info", ...props });
2879
+ var Note = (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Admonition, { type: "note", ...props });
2880
+ var Tip = (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Admonition, { type: "tip", ...props });
2881
+ var Warning = (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Admonition, { type: "warning", ...props });
2882
+ var Danger = (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Admonition, { type: "danger", ...props });
2883
+ var InfoBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Admonition, { type: "info", ...props });
2905
2884
 
2906
2885
  // src/client/theme/components/mdx/List.tsx
2907
2886
  var import_react22 = __toESM(require("react"));
2908
2887
  var import_lucide_react17 = require("lucide-react");
2909
- var import_jsx_runtime36 = require("react/jsx-runtime");
2888
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2910
2889
  var ICON_MAP3 = {
2911
- checked: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react17.Check, { size: 14, className: "ld-list__icon" }),
2912
- arrow: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react17.ChevronRight, { size: 14, className: "ld-list__icon" })
2890
+ checked: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react17.Check, { size: 14, className: "ld-list__icon" }),
2891
+ arrow: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react17.ChevronRight, { size: 14, className: "ld-list__icon" })
2913
2892
  };
2914
2893
  function List({
2915
2894
  variant = "default",
@@ -2918,17 +2897,154 @@ function List({
2918
2897
  ...rest
2919
2898
  }) {
2920
2899
  if (variant === "default") {
2921
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("ul", { className: `ld-list ${className}`.trim(), ...rest, children });
2900
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("ul", { className: `ld-list ${className}`.trim(), ...rest, children });
2922
2901
  }
2923
2902
  const icon = ICON_MAP3[variant];
2924
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("ul", { className: `ld-list ld-list--${variant} ${className}`.trim(), ...rest, children: import_react22.Children.map(children, (child) => {
2903
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("ul", { className: `ld-list ld-list--${variant} ${className}`.trim(), ...rest, children: import_react22.Children.map(children, (child) => {
2925
2904
  if (!import_react22.default.isValidElement(child)) return child;
2926
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("li", { className: "ld-list__item", children: [
2905
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("li", { className: "ld-list__item", children: [
2927
2906
  icon,
2928
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ld-list__text", children: child.props.children })
2907
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ld-list__text", children: child.props.children })
2929
2908
  ] });
2930
2909
  }) });
2931
2910
  }
2911
+
2912
+ // src/client/theme/components/mdx/FileTree.tsx
2913
+ var import_react23 = __toESM(require("react"));
2914
+ var import_lucide_react18 = require("lucide-react");
2915
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2916
+ function getTextContent(node) {
2917
+ if (typeof node === "string") return node;
2918
+ if (typeof node === "number") return node.toString();
2919
+ if (Array.isArray(node)) return node.map(getTextContent).join("");
2920
+ if ((0, import_react23.isValidElement)(node)) {
2921
+ return getTextContent(node.props.children);
2922
+ }
2923
+ return "";
2924
+ }
2925
+ function getFileIcon(filename) {
2926
+ const name = filename.toLowerCase();
2927
+ 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")) {
2928
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react18.FileCode, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
2929
+ }
2930
+ if (name.endsWith(".md") || name.endsWith(".mdx") || name.endsWith(".txt")) {
2931
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react18.FileText, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
2932
+ }
2933
+ if (name.endsWith(".png") || name.endsWith(".jpg") || name.endsWith(".jpeg") || name.endsWith(".svg") || name.endsWith(".gif")) {
2934
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2935
+ import_lucide_react18.FileImage,
2936
+ {
2937
+ size: 16,
2938
+ strokeWidth: 2,
2939
+ className: "ld-file-tree__icon-file"
2940
+ }
2941
+ );
2942
+ }
2943
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react18.File, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
2944
+ }
2945
+ function isListElement(node, tag) {
2946
+ if (typeof node.type === "string") {
2947
+ return node.type === tag;
2948
+ }
2949
+ if (typeof node.type === "function") {
2950
+ return node.type.name === tag || node.type.name?.toLowerCase() === tag;
2951
+ }
2952
+ if (node.props && node.props.originalType === tag) {
2953
+ return true;
2954
+ }
2955
+ if (node.props && node.props.mdxType === tag) {
2956
+ return true;
2957
+ }
2958
+ return false;
2959
+ }
2960
+ function FolderNode({
2961
+ labelText,
2962
+ nestedNodes,
2963
+ depth
2964
+ }) {
2965
+ const [isOpen, setIsOpen] = (0, import_react23.useState)(true);
2966
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("li", { className: "ld-file-tree__item", children: [
2967
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2968
+ "div",
2969
+ {
2970
+ className: "ld-file-tree__label ld-file-tree__label--folder",
2971
+ onClick: () => setIsOpen(!isOpen),
2972
+ style: { cursor: "pointer" },
2973
+ children: [
2974
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ld-file-tree__icon ld-file-tree__icon--chevron", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2975
+ import_lucide_react18.ChevronRight,
2976
+ {
2977
+ size: 14,
2978
+ className: `ld-file-tree__chevron ${isOpen ? "ld-file-tree__chevron--open" : ""}`,
2979
+ strokeWidth: 3
2980
+ }
2981
+ ) }),
2982
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ld-file-tree__icon", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2983
+ import_lucide_react18.Folder,
2984
+ {
2985
+ size: 16,
2986
+ strokeWidth: 2,
2987
+ className: "ld-file-tree__icon-folder",
2988
+ fill: "currentColor",
2989
+ fillOpacity: 0.15
2990
+ }
2991
+ ) }),
2992
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ld-file-tree__name", children: labelText })
2993
+ ]
2994
+ }
2995
+ ),
2996
+ isOpen && nestedNodes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "ld-file-tree__nested", children: nestedNodes.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react23.default.Fragment, { children: parseNode(child, depth) }, index)) })
2997
+ ] });
2998
+ }
2999
+ function parseNode(node, depth = 0) {
3000
+ if (!(0, import_react23.isValidElement)(node)) {
3001
+ return node;
3002
+ }
3003
+ if (isListElement(node, "ul")) {
3004
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3005
+ "ul",
3006
+ {
3007
+ className: `ld-file-tree__list ${depth === 0 ? "ld-file-tree__list--root" : ""}`,
3008
+ children: import_react23.Children.map(node.props.children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react23.default.Fragment, { children: parseNode(child, depth + 1) }, index))
3009
+ }
3010
+ );
3011
+ }
3012
+ if (isListElement(node, "li")) {
3013
+ const children = import_react23.Children.toArray(node.props.children);
3014
+ const nestedListIndex = children.findIndex(
3015
+ (child) => (0, import_react23.isValidElement)(child) && isListElement(child, "ul")
3016
+ );
3017
+ const hasNested = nestedListIndex !== -1;
3018
+ const labelNodes = hasNested ? children.slice(0, nestedListIndex) : children;
3019
+ const nestedNodes = hasNested ? children.slice(nestedListIndex) : [];
3020
+ const rawLabelContent = getTextContent(labelNodes).trim();
3021
+ const isExplicitDir = rawLabelContent.endsWith("/");
3022
+ const labelText = isExplicitDir ? rawLabelContent.slice(0, -1) : rawLabelContent;
3023
+ const isFolder = hasNested || isExplicitDir;
3024
+ if (isFolder) {
3025
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3026
+ FolderNode,
3027
+ {
3028
+ labelText,
3029
+ nestedNodes,
3030
+ depth
3031
+ }
3032
+ );
3033
+ }
3034
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("li", { className: "ld-file-tree__item", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "ld-file-tree__label ld-file-tree__label--file", children: [
3035
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ld-file-tree__icon ld-file-tree__icon--spacer" }),
3036
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ld-file-tree__icon", children: getFileIcon(labelText) }),
3037
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ld-file-tree__name", children: labelText })
3038
+ ] }) });
3039
+ }
3040
+ if (node.props.children) {
3041
+ return import_react23.Children.map(node.props.children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react23.default.Fragment, { children: parseNode(child, depth) }, index));
3042
+ }
3043
+ return node;
3044
+ }
3045
+ function FileTree({ children }) {
3046
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "ld-file-tree", dir: "ltr", children: import_react23.Children.map(children, (child) => parseNode(child, 0)) });
3047
+ }
2932
3048
  // Annotate the CommonJS export names for ESM import in node:
2933
3049
  0 && (module.exports = {
2934
3050
  Admonition,
@@ -2940,6 +3056,7 @@ function List({
2940
3056
  Cards,
2941
3057
  CodeBlock,
2942
3058
  Danger,
3059
+ FileTree,
2943
3060
  Head,
2944
3061
  InfoBox,
2945
3062
  List,