boltdocs 1.0.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 (137) hide show
  1. package/dist/CodeBlock-37XMKCYY.mjs +7 -0
  2. package/dist/PackageManagerTabs-4NWXLXQO.mjs +314 -0
  3. package/dist/Playground-OE2OE6B6.mjs +7 -0
  4. package/dist/SearchDialog-FTOQZ763.mjs +187 -0
  5. package/dist/SearchDialog-ZAZXYIFX.css +2147 -0
  6. package/dist/Video-I6QY4X7J.mjs +7 -0
  7. package/dist/chunk-2YRDWM6O.mjs +56 -0
  8. package/dist/chunk-PN4GCTYG.mjs +67 -0
  9. package/dist/chunk-X2TDGMTR.mjs +64 -0
  10. package/dist/chunk-X6BYQHVC.mjs +12 -0
  11. package/dist/chunk-Z7JHYNAS.mjs +57 -0
  12. package/dist/chunk-ZFCOLEXN.mjs +1644 -0
  13. package/dist/client/index.css +2147 -0
  14. package/dist/client/index.d.mts +298 -0
  15. package/dist/client/index.d.ts +298 -0
  16. package/dist/client/index.js +2793 -0
  17. package/dist/client/index.mjs +63 -0
  18. package/dist/client/ssr.css +2147 -0
  19. package/dist/client/ssr.d.mts +25 -0
  20. package/dist/client/ssr.d.ts +25 -0
  21. package/dist/client/ssr.js +2727 -0
  22. package/dist/client/ssr.mjs +32 -0
  23. package/dist/config-D2XmHJYe.d.mts +122 -0
  24. package/dist/config-D2XmHJYe.d.ts +122 -0
  25. package/dist/index-CRQKWAeo.d.mts +82 -0
  26. package/dist/index-CRQKWAeo.d.ts +82 -0
  27. package/dist/node/cli/index.d.mts +1 -0
  28. package/dist/node/cli/index.d.ts +1 -0
  29. package/dist/node/cli/index.js +199 -0
  30. package/dist/node/cli/index.mjs +154 -0
  31. package/dist/node/index.d.mts +79 -0
  32. package/dist/node/index.d.ts +79 -0
  33. package/dist/node/index.js +797 -0
  34. package/dist/node/index.mjs +719 -0
  35. package/package.json +79 -0
  36. package/src/client/app/index.tsx +422 -0
  37. package/src/client/app/preload.tsx +56 -0
  38. package/src/client/index.ts +40 -0
  39. package/src/client/ssr.tsx +50 -0
  40. package/src/client/theme/components/CodeBlock/CodeBlock.tsx +76 -0
  41. package/src/client/theme/components/CodeBlock/index.ts +1 -0
  42. package/src/client/theme/components/PackageManagerTabs/PackageManagerTabs.tsx +154 -0
  43. package/src/client/theme/components/PackageManagerTabs/index.ts +1 -0
  44. package/src/client/theme/components/PackageManagerTabs/pkg-tabs.css +64 -0
  45. package/src/client/theme/components/Playground/Playground.tsx +86 -0
  46. package/src/client/theme/components/Playground/index.ts +1 -0
  47. package/src/client/theme/components/Playground/playground.css +168 -0
  48. package/src/client/theme/components/Video/Video.tsx +84 -0
  49. package/src/client/theme/components/Video/index.ts +1 -0
  50. package/src/client/theme/components/Video/video.css +41 -0
  51. package/src/client/theme/components/mdx/Admonition.tsx +80 -0
  52. package/src/client/theme/components/mdx/Badge.tsx +31 -0
  53. package/src/client/theme/components/mdx/Button.tsx +50 -0
  54. package/src/client/theme/components/mdx/Card.tsx +80 -0
  55. package/src/client/theme/components/mdx/List.tsx +57 -0
  56. package/src/client/theme/components/mdx/Tabs.tsx +94 -0
  57. package/src/client/theme/components/mdx/index.ts +18 -0
  58. package/src/client/theme/components/mdx/mdx-components.css +405 -0
  59. package/src/client/theme/icons/bun.tsx +62 -0
  60. package/src/client/theme/icons/deno.tsx +20 -0
  61. package/src/client/theme/icons/discord.tsx +12 -0
  62. package/src/client/theme/icons/github.tsx +15 -0
  63. package/src/client/theme/icons/npm.tsx +13 -0
  64. package/src/client/theme/icons/pnpm.tsx +72 -0
  65. package/src/client/theme/icons/twitter.tsx +12 -0
  66. package/src/client/theme/styles/home.css +60 -0
  67. package/src/client/theme/styles/markdown.css +343 -0
  68. package/src/client/theme/styles/variables.css +162 -0
  69. package/src/client/theme/styles.css +38 -0
  70. package/src/client/theme/ui/BackgroundGradient/BackgroundGradient.tsx +10 -0
  71. package/src/client/theme/ui/BackgroundGradient/index.ts +1 -0
  72. package/src/client/theme/ui/Breadcrumbs/Breadcrumbs.tsx +68 -0
  73. package/src/client/theme/ui/Breadcrumbs/index.ts +1 -0
  74. package/src/client/theme/ui/Footer/footer.css +32 -0
  75. package/src/client/theme/ui/Head/Head.tsx +69 -0
  76. package/src/client/theme/ui/Head/index.ts +1 -0
  77. package/src/client/theme/ui/LanguageSwitcher/LanguageSwitcher.tsx +125 -0
  78. package/src/client/theme/ui/LanguageSwitcher/index.ts +1 -0
  79. package/src/client/theme/ui/LanguageSwitcher/language-switcher.css +98 -0
  80. package/src/client/theme/ui/Layout/Layout.tsx +213 -0
  81. package/src/client/theme/ui/Layout/base.css +76 -0
  82. package/src/client/theme/ui/Layout/index.ts +2 -0
  83. package/src/client/theme/ui/Layout/pagination.css +72 -0
  84. package/src/client/theme/ui/Layout/responsive.css +40 -0
  85. package/src/client/theme/ui/Link/Link.tsx +202 -0
  86. package/src/client/theme/ui/Link/index.ts +2 -0
  87. package/src/client/theme/ui/Loading/Loading.tsx +10 -0
  88. package/src/client/theme/ui/Loading/index.ts +1 -0
  89. package/src/client/theme/ui/Loading/loading.css +30 -0
  90. package/src/client/theme/ui/Navbar/GithubStars.tsx +27 -0
  91. package/src/client/theme/ui/Navbar/Navbar.tsx +145 -0
  92. package/src/client/theme/ui/Navbar/index.ts +2 -0
  93. package/src/client/theme/ui/Navbar/navbar.css +233 -0
  94. package/src/client/theme/ui/NotFound/NotFound.tsx +20 -0
  95. package/src/client/theme/ui/NotFound/index.ts +1 -0
  96. package/src/client/theme/ui/NotFound/not-found.css +64 -0
  97. package/src/client/theme/ui/OnThisPage/OnThisPage.tsx +192 -0
  98. package/src/client/theme/ui/OnThisPage/index.ts +1 -0
  99. package/src/client/theme/ui/OnThisPage/toc.css +132 -0
  100. package/src/client/theme/ui/PoweredBy/PoweredBy.tsx +18 -0
  101. package/src/client/theme/ui/PoweredBy/index.ts +1 -0
  102. package/src/client/theme/ui/PoweredBy/powered-by.css +76 -0
  103. package/src/client/theme/ui/SearchDialog/SearchDialog.tsx +199 -0
  104. package/src/client/theme/ui/SearchDialog/index.ts +1 -0
  105. package/src/client/theme/ui/SearchDialog/search.css +152 -0
  106. package/src/client/theme/ui/Sidebar/Sidebar.tsx +200 -0
  107. package/src/client/theme/ui/Sidebar/index.ts +1 -0
  108. package/src/client/theme/ui/Sidebar/sidebar.css +269 -0
  109. package/src/client/theme/ui/ThemeToggle/ThemeToggle.tsx +69 -0
  110. package/src/client/theme/ui/ThemeToggle/index.ts +1 -0
  111. package/src/client/theme/ui/VersionSwitcher/VersionSwitcher.tsx +136 -0
  112. package/src/client/theme/ui/VersionSwitcher/index.ts +1 -0
  113. package/src/client/utils.ts +26 -0
  114. package/src/node/cache.ts +94 -0
  115. package/src/node/cli/commands/config.ts +15 -0
  116. package/src/node/cli/commands/generate-css.ts +24 -0
  117. package/src/node/cli/constants.ts +70 -0
  118. package/src/node/cli/index.ts +22 -0
  119. package/src/node/config.ts +185 -0
  120. package/src/node/index.ts +21 -0
  121. package/src/node/mdx.ts +41 -0
  122. package/src/node/plugin/entry.ts +58 -0
  123. package/src/node/plugin/html.ts +55 -0
  124. package/src/node/plugin/index.ts +190 -0
  125. package/src/node/plugin/types.ts +11 -0
  126. package/src/node/routes/cache.ts +24 -0
  127. package/src/node/routes/index.ts +152 -0
  128. package/src/node/routes/parser.ts +127 -0
  129. package/src/node/routes/sorter.ts +42 -0
  130. package/src/node/routes/types.ts +49 -0
  131. package/src/node/ssg/index.ts +110 -0
  132. package/src/node/ssg/meta.ts +34 -0
  133. package/src/node/ssg/options.ts +13 -0
  134. package/src/node/ssg/sitemap.ts +54 -0
  135. package/src/node/utils.ts +134 -0
  136. package/tsconfig.json +20 -0
  137. package/tsup.config.ts +22 -0
@@ -0,0 +1,7 @@
1
+ import {
2
+ CodeBlock
3
+ } from "./chunk-2YRDWM6O.mjs";
4
+ import "./chunk-X6BYQHVC.mjs";
5
+ export {
6
+ CodeBlock
7
+ };
@@ -0,0 +1,314 @@
1
+ import "./chunk-X6BYQHVC.mjs";
2
+
3
+ // src/client/theme/components/PackageManagerTabs/PackageManagerTabs.tsx
4
+ import { useState, useCallback } from "react";
5
+ import { Copy, Check } from "lucide-react";
6
+
7
+ // src/client/theme/icons/npm.tsx
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ var NPM = (props) => /* @__PURE__ */ jsxs("svg", { ...props, viewBox: "0 0 2500 2500", children: [
10
+ /* @__PURE__ */ jsx("path", { fill: "#c00", d: "M0 0h2500v2500H0z" }),
11
+ /* @__PURE__ */ jsx(
12
+ "path",
13
+ {
14
+ fill: "#fff",
15
+ d: "M1241.5 268.5h-973v1962.9h972.9V763.5h495v1467.9h495V268.5z"
16
+ }
17
+ )
18
+ ] });
19
+
20
+ // src/client/theme/icons/pnpm.tsx
21
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
22
+ var Pnpm = (props) => /* @__PURE__ */ jsxs2(
23
+ "svg",
24
+ {
25
+ ...props,
26
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
27
+ viewBox: "76.58987244897958 44 164.00775510204068 164",
28
+ children: [
29
+ /* @__PURE__ */ jsxs2("defs", { children: [
30
+ /* @__PURE__ */ jsx2(
31
+ "path",
32
+ {
33
+ d: "M237.6 95L187.6 95L187.6 45L237.6 45L237.6 95Z",
34
+ id: "pnpm_dark__b45vdTD8hs"
35
+ }
36
+ ),
37
+ /* @__PURE__ */ jsx2(
38
+ "path",
39
+ {
40
+ d: "M182.59 95L132.59 95L132.59 45L182.59 45L182.59 95Z",
41
+ id: "pnpm_dark__a40WtxIl8d"
42
+ }
43
+ ),
44
+ /* @__PURE__ */ jsx2(
45
+ "path",
46
+ {
47
+ d: "M127.59 95L77.59 95L77.59 45L127.59 45L127.59 95Z",
48
+ id: "pnpm_dark__h2CN9AEEpe"
49
+ }
50
+ ),
51
+ /* @__PURE__ */ jsx2(
52
+ "path",
53
+ {
54
+ d: "M237.6 150L187.6 150L187.6 100L237.6 100L237.6 150Z",
55
+ id: "pnpm_dark__dqv5133G8"
56
+ }
57
+ ),
58
+ /* @__PURE__ */ jsx2(
59
+ "path",
60
+ {
61
+ d: "M182.59 150L132.59 150L132.59 100L182.59 100L182.59 150Z",
62
+ id: "pnpm_dark__b1Lv79ypvm"
63
+ }
64
+ ),
65
+ /* @__PURE__ */ jsx2(
66
+ "path",
67
+ {
68
+ d: "M182.59 205L132.59 205L132.59 155L182.59 155L182.59 205Z",
69
+ id: "pnpm_dark__hy1IZWwLX"
70
+ }
71
+ ),
72
+ /* @__PURE__ */ jsx2(
73
+ "path",
74
+ {
75
+ d: "M237.6 205L187.6 205L187.6 155L237.6 155L237.6 205Z",
76
+ id: "pnpm_dark__akQfjxQes"
77
+ }
78
+ ),
79
+ /* @__PURE__ */ jsx2(
80
+ "path",
81
+ {
82
+ d: "M127.59 205L77.59 205L77.59 155L127.59 155L127.59 205Z",
83
+ id: "pnpm_dark__bdSrwE5pk"
84
+ }
85
+ )
86
+ ] }),
87
+ /* @__PURE__ */ jsxs2("g", { children: [
88
+ /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__b45vdTD8hs", fill: "#f9ad00" }) }),
89
+ /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__a40WtxIl8d", fill: "#f9ad00" }) }),
90
+ /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__h2CN9AEEpe", fill: "#f9ad00" }) }),
91
+ /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__dqv5133G8", fill: "#f9ad00" }) }),
92
+ /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__b1Lv79ypvm", fill: "currentColor" }) }),
93
+ /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__hy1IZWwLX", fill: "currentColor" }) }),
94
+ /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__akQfjxQes", fill: "currentColor" }) }),
95
+ /* @__PURE__ */ jsx2("g", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: "#pnpm_dark__bdSrwE5pk", fill: "currentColor" }) })
96
+ ] })
97
+ ]
98
+ }
99
+ );
100
+
101
+ // src/client/theme/icons/bun.tsx
102
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
103
+ var Bun = (props) => /* @__PURE__ */ jsxs3("svg", { ...props, viewBox: "0 0 80 70", children: [
104
+ /* @__PURE__ */ jsx3("path", { d: "M71.09 20.74c-.16-.17-.33-.34-.5-.5s-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5A26.46 26.46 0 0 1 75.5 35.7c0 16.57-16.82 30.05-37.5 30.05-11.58 0-21.94-4.23-28.83-10.86l.5.5.5.5.5.5.5.5.5.5.5.5.5.5C19.55 65.3 30.14 69.75 42 69.75c20.68 0 37.5-13.48 37.5-30 0-7.06-3.04-13.75-8.41-19.01Z" }),
105
+ /* @__PURE__ */ jsx3(
106
+ "path",
107
+ {
108
+ d: "M73 35.7c0 15.21-15.67 27.54-35 27.54S3 50.91 3 35.7C3 26.27 9 17.94 18.22 13S33.18 3 38 3s8.94 4.13 19.78 10C67 17.94 73 26.27 73 35.7Z",
109
+ style: { fill: "#fbf0df" }
110
+ }
111
+ ),
112
+ /* @__PURE__ */ jsx3(
113
+ "path",
114
+ {
115
+ d: "M73 35.7a21.67 21.67 0 0 0-.8-5.78c-2.73 33.3-43.35 34.9-59.32 24.94A40 40 0 0 0 38 63.24c19.3 0 35-12.35 35-27.54Z",
116
+ style: { fill: "#f6dece" }
117
+ }
118
+ ),
119
+ /* @__PURE__ */ jsx3(
120
+ "path",
121
+ {
122
+ d: "M24.53 11.17C29 8.49 34.94 3.46 40.78 3.45A9.29 9.29 0 0 0 38 3c-2.42 0-5 1.25-8.25 3.13-1.13.66-2.3 1.39-3.54 2.15-2.33 1.44-5 3.07-8 4.7C8.69 18.13 3 26.62 3 35.7v1.19c6.06-21.41 17.07-23.04 21.53-25.72Z",
123
+ style: { fill: "#fffefc" }
124
+ }
125
+ ),
126
+ /* @__PURE__ */ jsx3(
127
+ "path",
128
+ {
129
+ d: "M35.12 5.53A16.41 16.41 0 0 1 29.49 18c-.28.25-.06.73.3.59 3.37-1.31 7.92-5.23 6-13.14-.08-.45-.67-.33-.67.08Zm2.27 0A16.24 16.24 0 0 1 39 19c-.12.35.31.65.55.36 2.19-2.8 4.1-8.36-1.62-14.36-.29-.26-.74.14-.54.49Zm2.76-.17A16.42 16.42 0 0 1 47 17.12a.33.33 0 0 0 .65.11c.92-3.49.4-9.44-7.17-12.53-.4-.16-.66.38-.33.62Zm-18.46 10.4a16.94 16.94 0 0 0 10.47-9c.18-.36.75-.22.66.18-1.73 8-7.52 9.67-11.12 9.45-.38.01-.37-.52-.01-.63Z",
130
+ style: { fill: "#ccbea7", fillRule: "evenodd" }
131
+ }
132
+ ),
133
+ /* @__PURE__ */ jsx3("path", { d: "M38 65.75C17.32 65.75.5 52.27.5 35.7c0-10 6.18-19.33 16.53-24.92 3-1.6 5.57-3.21 7.86-4.62 1.26-.78 2.45-1.51 3.6-2.19C32 1.89 35 .5 38 .5s5.62 1.2 8.9 3.14c1 .57 2 1.19 3.07 1.87 2.49 1.54 5.3 3.28 9 5.27C69.32 16.37 75.5 25.69 75.5 35.7c0 16.57-16.82 30.05-37.5 30.05ZM38 3c-2.42 0-5 1.25-8.25 3.13-1.13.66-2.3 1.39-3.54 2.15-2.33 1.44-5 3.07-8 4.7C8.69 18.13 3 26.62 3 35.7c0 15.19 15.7 27.55 35 27.55S73 50.89 73 35.7c0-9.08-5.69-17.57-15.22-22.7-3.78-2-6.73-3.88-9.12-5.36-1.09-.67-2.09-1.29-3-1.84C42.63 4 40.42 3 38 3Z" }),
134
+ /* @__PURE__ */ jsxs3("g", { children: [
135
+ /* @__PURE__ */ jsx3(
136
+ "path",
137
+ {
138
+ d: "M45.05 43a8.93 8.93 0 0 1-2.92 4.71 6.81 6.81 0 0 1-4 1.88A6.84 6.84 0 0 1 34 47.71 8.93 8.93 0 0 1 31.12 43a.72.72 0 0 1 .8-.81h12.34a.72.72 0 0 1 .79.81Z",
139
+ style: { fill: "#b71422" }
140
+ }
141
+ ),
142
+ /* @__PURE__ */ jsx3(
143
+ "path",
144
+ {
145
+ d: "M34 47.79a6.91 6.91 0 0 0 4.12 1.9 6.91 6.91 0 0 0 4.11-1.9 10.63 10.63 0 0 0 1-1.07 6.83 6.83 0 0 0-4.9-2.31 6.15 6.15 0 0 0-5 2.78c.23.21.43.41.67.6Z",
146
+ style: { fill: "#ff6164" }
147
+ }
148
+ ),
149
+ /* @__PURE__ */ jsx3("path", { d: "M34.16 47a5.36 5.36 0 0 1 4.19-2.08 6 6 0 0 1 4 1.69c.23-.25.45-.51.66-.77a7 7 0 0 0-4.71-1.93 6.36 6.36 0 0 0-4.89 2.36 9.53 9.53 0 0 0 .75.73Z" }),
150
+ /* @__PURE__ */ jsx3("path", { d: "M38.09 50.19a7.42 7.42 0 0 1-4.45-2 9.52 9.52 0 0 1-3.11-5.05 1.2 1.2 0 0 1 .26-1 1.41 1.41 0 0 1 1.13-.51h12.34a1.44 1.44 0 0 1 1.13.51 1.19 1.19 0 0 1 .25 1 9.52 9.52 0 0 1-3.11 5.05 7.42 7.42 0 0 1-4.44 2Zm-6.17-7.4c-.16 0-.2.07-.21.09a8.29 8.29 0 0 0 2.73 4.37A6.23 6.23 0 0 0 38.09 49a6.28 6.28 0 0 0 3.65-1.73 8.3 8.3 0 0 0 2.72-4.37.21.21 0 0 0-.2-.09Z" })
151
+ ] }),
152
+ /* @__PURE__ */ jsxs3("g", { children: [
153
+ /* @__PURE__ */ jsx3(
154
+ "ellipse",
155
+ {
156
+ cx: "53.22",
157
+ cy: "40.18",
158
+ rx: "5.85",
159
+ ry: "3.44",
160
+ style: { fill: "#febbd0" }
161
+ }
162
+ ),
163
+ /* @__PURE__ */ jsx3(
164
+ "ellipse",
165
+ {
166
+ cx: "22.95",
167
+ cy: "40.18",
168
+ rx: "5.85",
169
+ ry: "3.44",
170
+ style: { fill: "#febbd0" }
171
+ }
172
+ ),
173
+ /* @__PURE__ */ jsx3(
174
+ "path",
175
+ {
176
+ d: "M25.7 38.8a5.51 5.51 0 1 0-5.5-5.51 5.51 5.51 0 0 0 5.5 5.51Zm24.77 0A5.51 5.51 0 1 0 45 33.29a5.5 5.5 0 0 0 5.47 5.51Z",
177
+ style: { fillRule: "evenodd" }
178
+ }
179
+ ),
180
+ /* @__PURE__ */ jsx3(
181
+ "path",
182
+ {
183
+ d: "M24 33.64a2.07 2.07 0 1 0-2.06-2.07A2.07 2.07 0 0 0 24 33.64Zm24.77 0a2.07 2.07 0 1 0-2.06-2.07 2.07 2.07 0 0 0 2.04 2.07Z",
184
+ style: { fill: "#fff", fillRule: "evenodd" }
185
+ }
186
+ )
187
+ ] })
188
+ ] });
189
+
190
+ // src/client/theme/icons/deno.tsx
191
+ import { jsx as jsx4 } from "react/jsx-runtime";
192
+ var Deno = (props) => /* @__PURE__ */ jsx4(
193
+ "svg",
194
+ {
195
+ ...props,
196
+ xmlSpace: "preserve",
197
+ fillRule: "evenodd",
198
+ strokeLinejoin: "round",
199
+ strokeMiterlimit: "2",
200
+ clipRule: "evenodd",
201
+ viewBox: "0 0 441 441",
202
+ children: /* @__PURE__ */ jsx4(
203
+ "path",
204
+ {
205
+ fill: "currentColor",
206
+ d: "M229.858-2.62c121.29 5.675 215.154 108.755 209.479 230.045S330.582 442.578 209.292 436.903-5.863 328.149-.188 206.859 108.568-8.296 229.858-2.62Zm51.365 264.922c-13.886-.687-27.594-3.012-38.616-4.857-8.381-1.404-16.33-3.616-22.855-5.858a2.576 2.576 0 0 0-2.932.878c-.678.905-.777 2.22-.02 3.061 3.08 3.418 12.848 10.54 20.439 13.812-6.491 5.357-10.933 17.608-12.684 23.95-2.35 8.51-2.687 20.801-2.12 25.312 2.282 18.146 8.95 34.41 25.467 48.64 11.562 9.96 28.295 16.77 45.399 17.08 23.603.426 51.882-9.705 74.085-32.493 29.028-31.807 48.051-73.17 51.593-119.393 8.434-110.06-74.073-206.264-184.134-214.698C124.785 9.302 28.582 91.81 20.147 201.87c-4.368 56.998 15.655 110.28 51.267 149.576a3.185 3.185 0 0 0 5.422-2.974c-26.39-103.487 30.95-215.162 94.926-250.494 23.751-13.118 46.884-18.1 67.664-9.69 31.814 12.874 50 34.21 89.375 52.163 39.375 17.951 43.625 47.862 32.64 78.098-10.986 30.236-46.358 45.425-80.218 43.753Zm-68.863-160.08c-12.906 1.006-21.384 16.978-22.497 27.253-1.117 10.275 3.978 27.236 20.794 26.91 19.694-.383 25.681-17.238 23.525-33.55-1.618-12.25-11.033-21.456-21.822-20.613Z"
207
+ }
208
+ )
209
+ }
210
+ );
211
+
212
+ // src/client/theme/components/PackageManagerTabs/PackageManagerTabs.tsx
213
+ import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
214
+ var MANAGERS = [
215
+ { id: "npm", label: "npm", icon: NPM },
216
+ { id: "pnpm", label: "pnpm", icon: Pnpm },
217
+ { id: "bun", label: "bun", icon: Bun },
218
+ { id: "deno", label: "deno", icon: Deno }
219
+ ];
220
+ function getCommandForManager(manager, command, pkg) {
221
+ const isInstall = command === "install" || command === "add" || command === "i";
222
+ const isCreate = command === "create" || command === "init";
223
+ const isRun = command === "run" || command === "exec";
224
+ if (isInstall) {
225
+ const pkgArgs2 = pkg ? ` ${pkg}` : "";
226
+ if (manager === "npm") return `npm install${pkgArgs2}`;
227
+ if (manager === "pnpm") return pkg ? `pnpm add${pkgArgs2}` : `pnpm install`;
228
+ if (manager === "bun") return pkg ? `bun add${pkgArgs2}` : `bun install`;
229
+ if (manager === "deno")
230
+ return pkg ? `deno install npm:${pkg}` : `deno install`;
231
+ }
232
+ if (isCreate) {
233
+ const pkgArgs2 = pkg ? ` ${pkg}` : "";
234
+ if (manager === "npm") return `npm create${pkgArgs2}`;
235
+ if (manager === "pnpm") return `pnpm create${pkgArgs2}`;
236
+ if (manager === "bun") return `bun create${pkgArgs2}`;
237
+ if (manager === "deno") return `deno run -A npm:create-${pkg}`;
238
+ }
239
+ if (isRun) {
240
+ const pkgArgs2 = pkg ? ` ${pkg}` : "";
241
+ if (manager === "npm") return `npm run${pkgArgs2}`;
242
+ if (manager === "pnpm") return `pnpm run${pkgArgs2}`;
243
+ if (manager === "bun") return `bun run${pkgArgs2}`;
244
+ if (manager === "deno") return `deno task ${pkg}`;
245
+ }
246
+ const pkgArgs = pkg ? ` ${pkg}` : "";
247
+ return `${manager} ${command}${pkgArgs}`;
248
+ }
249
+ function PackageManagerTabs({
250
+ command,
251
+ pkg = "",
252
+ className = ""
253
+ }) {
254
+ const [activeTab, setActiveTab] = useState("npm");
255
+ const [copied, setCopied] = useState(false);
256
+ const activeCommand = getCommandForManager(activeTab, command, pkg);
257
+ const handleCopy = useCallback(async () => {
258
+ try {
259
+ await navigator.clipboard.writeText(activeCommand);
260
+ setCopied(true);
261
+ setTimeout(() => setCopied(false), 2e3);
262
+ } catch {
263
+ const textarea = document.createElement("textarea");
264
+ textarea.value = activeCommand;
265
+ textarea.style.position = "fixed";
266
+ textarea.style.opacity = "0";
267
+ document.body.appendChild(textarea);
268
+ textarea.select();
269
+ document.execCommand("copy");
270
+ document.body.removeChild(textarea);
271
+ setCopied(true);
272
+ setTimeout(() => setCopied(false), 2e3);
273
+ }
274
+ }, [activeCommand]);
275
+ return /* @__PURE__ */ jsxs4("div", { className: `pkg-tabs-wrapper ${className}`, children: [
276
+ /* @__PURE__ */ jsx5("div", { className: "pkg-tabs-header", children: MANAGERS.map((mgr) => {
277
+ const Icon = mgr.icon;
278
+ const isActive = activeTab === mgr.id;
279
+ return /* @__PURE__ */ jsxs4(
280
+ "button",
281
+ {
282
+ className: `pkg-tab-btn ${isActive ? "active" : ""}`,
283
+ onClick: () => setActiveTab(mgr.id),
284
+ "aria-selected": isActive,
285
+ role: "tab",
286
+ children: [
287
+ /* @__PURE__ */ jsx5(Icon, { className: "pkg-tab-icon", width: "16", height: "16" }),
288
+ /* @__PURE__ */ jsx5("span", { children: mgr.label })
289
+ ]
290
+ },
291
+ mgr.id
292
+ );
293
+ }) }),
294
+ /* @__PURE__ */ jsxs4("div", { className: "code-block-wrapper pkg-tabs-content", children: [
295
+ /* @__PURE__ */ jsxs4("div", { className: "code-block-header", children: [
296
+ /* @__PURE__ */ jsx5("span", { className: "code-block-lang", children: "bash" }),
297
+ /* @__PURE__ */ jsx5(
298
+ "button",
299
+ {
300
+ className: `code-block-copy ${copied ? "copied" : ""}`,
301
+ onClick: handleCopy,
302
+ type: "button",
303
+ "aria-label": "Copy code",
304
+ children: copied ? /* @__PURE__ */ jsx5(Fragment, { children: /* @__PURE__ */ jsx5(Check, { size: 12 }) }) : /* @__PURE__ */ jsx5(Fragment, { children: /* @__PURE__ */ jsx5(Copy, { size: 12 }) })
305
+ }
306
+ )
307
+ ] }),
308
+ /* @__PURE__ */ jsx5("pre", { children: /* @__PURE__ */ jsx5("code", { children: /* @__PURE__ */ jsx5("span", { className: "line", children: activeCommand }) }) })
309
+ ] })
310
+ ] });
311
+ }
312
+ export {
313
+ PackageManagerTabs
314
+ };
@@ -0,0 +1,7 @@
1
+ import {
2
+ Playground
3
+ } from "./chunk-PN4GCTYG.mjs";
4
+ import "./chunk-X6BYQHVC.mjs";
5
+ export {
6
+ Playground
7
+ };
@@ -0,0 +1,187 @@
1
+ import {
2
+ Link
3
+ } from "./chunk-ZFCOLEXN.mjs";
4
+ import "./chunk-X6BYQHVC.mjs";
5
+
6
+ // src/client/theme/ui/SearchDialog/SearchDialog.tsx
7
+ import React, { useState, useEffect, useRef } from "react";
8
+ import { createPortal } from "react-dom";
9
+ import { Search } from "lucide-react";
10
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
+ function SearchDialog({ routes }) {
12
+ const [isOpen, setIsOpen] = useState(false);
13
+ const [query, setQuery] = useState("");
14
+ const inputRef = useRef(null);
15
+ useEffect(() => {
16
+ const handleKeyDown = (e) => {
17
+ if ((e.metaKey || e.ctrlKey) && e.key === "k") {
18
+ e.preventDefault();
19
+ setIsOpen((prev) => !prev);
20
+ }
21
+ if (e.key === "Escape" && isOpen) {
22
+ setIsOpen(false);
23
+ }
24
+ };
25
+ window.addEventListener("keydown", handleKeyDown);
26
+ return () => window.removeEventListener("keydown", handleKeyDown);
27
+ }, [isOpen]);
28
+ useEffect(() => {
29
+ if (isOpen) {
30
+ setTimeout(() => inputRef.current?.focus(), 50);
31
+ } else {
32
+ setQuery("");
33
+ }
34
+ }, [isOpen]);
35
+ const searchResults = React.useMemo(() => {
36
+ if (!query) {
37
+ return routes.slice(0, 10).map((r) => ({
38
+ title: r.title,
39
+ path: r.path,
40
+ groupTitle: r.groupTitle
41
+ }));
42
+ }
43
+ const results = [];
44
+ const lowerQuery = query.toLowerCase();
45
+ for (const route of routes) {
46
+ if (route.title && route.title.toLowerCase().includes(lowerQuery)) {
47
+ results.push({
48
+ title: route.title,
49
+ path: route.path,
50
+ groupTitle: route.groupTitle
51
+ });
52
+ }
53
+ if (route.headings) {
54
+ for (const heading of route.headings) {
55
+ if (heading.text.toLowerCase().includes(lowerQuery)) {
56
+ results.push({
57
+ title: heading.text,
58
+ path: `${route.path}#${heading.id}`,
59
+ groupTitle: route.title,
60
+ isHeading: true
61
+ });
62
+ }
63
+ }
64
+ }
65
+ }
66
+ const uniqueResults = [];
67
+ const seenPaths = /* @__PURE__ */ new Set();
68
+ for (const res of results) {
69
+ if (!seenPaths.has(res.path)) {
70
+ seenPaths.add(res.path);
71
+ uniqueResults.push(res);
72
+ }
73
+ }
74
+ return uniqueResults.slice(0, 10);
75
+ }, [routes, query]);
76
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
77
+ /* @__PURE__ */ jsxs(
78
+ "div",
79
+ {
80
+ className: "navbar-search",
81
+ role: "button",
82
+ tabIndex: 0,
83
+ onClick: () => setIsOpen(true),
84
+ onKeyDown: (e) => {
85
+ if (e.key === "Enter" || e.key === " ") {
86
+ e.preventDefault();
87
+ setIsOpen(true);
88
+ }
89
+ },
90
+ "aria-label": "Open search dialog",
91
+ children: [
92
+ /* @__PURE__ */ jsx(Search, { className: "boltdocs-search-icon", size: 18 }),
93
+ "Search docs...",
94
+ /* @__PURE__ */ jsx("kbd", { children: "\u2318K" })
95
+ ]
96
+ }
97
+ ),
98
+ isOpen && createPortal(
99
+ /* @__PURE__ */ jsx(
100
+ "div",
101
+ {
102
+ className: "boltdocs-search-overlay",
103
+ onPointerDown: () => setIsOpen(false),
104
+ children: /* @__PURE__ */ jsxs(
105
+ "div",
106
+ {
107
+ className: "boltdocs-search-modal",
108
+ role: "dialog",
109
+ "aria-modal": "true",
110
+ "aria-label": "Search",
111
+ onPointerDown: (e) => e.stopPropagation(),
112
+ children: [
113
+ /* @__PURE__ */ jsxs("div", { className: "boltdocs-search-header", children: [
114
+ /* @__PURE__ */ jsx(Search, { size: 18 }),
115
+ /* @__PURE__ */ jsx(
116
+ "input",
117
+ {
118
+ ref: inputRef,
119
+ type: "text",
120
+ "aria-label": "Search documentation input",
121
+ placeholder: "Search documentation...",
122
+ value: query,
123
+ onChange: (e) => setQuery(e.target.value)
124
+ }
125
+ ),
126
+ /* @__PURE__ */ jsx(
127
+ "button",
128
+ {
129
+ className: "boltdocs-search-close",
130
+ onClick: () => setIsOpen(false),
131
+ "aria-label": "Close search",
132
+ children: "ESC"
133
+ }
134
+ )
135
+ ] }),
136
+ /* @__PURE__ */ jsx("div", { className: "boltdocs-search-results", children: searchResults.length > 0 ? searchResults.map((result) => /* @__PURE__ */ jsxs(
137
+ Link,
138
+ {
139
+ to: result.path === "" ? "/" : result.path,
140
+ className: `boltdocs-search-result-item ${result.isHeading ? "is-heading" : ""}`,
141
+ onClick: (e) => {
142
+ const isSamePath = result.path.split("#")[0] === window.location.pathname;
143
+ if (isSamePath && result.isHeading) {
144
+ e.preventDefault();
145
+ const id = result.path.split("#")[1];
146
+ const el = document.getElementById(id);
147
+ if (el) {
148
+ const offset = 80;
149
+ const bodyRect = document.body.getBoundingClientRect().top;
150
+ const elementRect = el.getBoundingClientRect().top;
151
+ const elementPosition = elementRect - bodyRect;
152
+ const offsetPosition = elementPosition - offset;
153
+ window.scrollTo({
154
+ top: offsetPosition,
155
+ behavior: "smooth"
156
+ });
157
+ window.history.pushState(null, "", `#${id}`);
158
+ }
159
+ }
160
+ setIsOpen(false);
161
+ },
162
+ children: [
163
+ /* @__PURE__ */ jsxs("span", { className: "boltdocs-search-result-title", children: [
164
+ result.isHeading ? /* @__PURE__ */ jsx("span", { className: "heading-indicator", children: "#" }) : null,
165
+ result.title
166
+ ] }),
167
+ result.groupTitle && /* @__PURE__ */ jsx("span", { className: "boltdocs-search-result-group", children: result.groupTitle })
168
+ ]
169
+ },
170
+ result.path
171
+ )) : /* @__PURE__ */ jsxs("div", { className: "boltdocs-search-empty", children: [
172
+ 'No results found for "',
173
+ query,
174
+ '"'
175
+ ] }) })
176
+ ]
177
+ }
178
+ )
179
+ }
180
+ ),
181
+ document.body
182
+ )
183
+ ] });
184
+ }
185
+ export {
186
+ SearchDialog
187
+ };