boltdocs 2.7.10 → 2.8.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 (193) hide show
  1. package/README.md +2 -2
  2. package/dist/banner-3N4Jd_L9.d.ts +100 -0
  3. package/dist/banner-MynZD_Ox.d.cts +100 -0
  4. package/dist/cache-BMUyNiiA.mjs +6 -0
  5. package/dist/cache-CKm45d2w.cjs +6 -0
  6. package/dist/client/index.cjs +2268 -1
  7. package/dist/client/index.d.cts +86 -110
  8. package/dist/client/index.d.ts +87 -111
  9. package/dist/client/index.js +2214 -1
  10. package/dist/client/mdx.cjs +12 -1
  11. package/dist/client/mdx.d.cts +39 -93
  12. package/dist/client/mdx.d.ts +38 -93
  13. package/dist/client/mdx.js +7 -1
  14. package/dist/client/primitives.cjs +60 -1
  15. package/dist/client/primitives.d.cts +411 -347
  16. package/dist/client/primitives.d.ts +411 -347
  17. package/dist/client/primitives.js +20 -1
  18. package/dist/docs-layout-CwCq42Zt.cjs +1348 -0
  19. package/dist/docs-layout-Dn6S5g59.js +1167 -0
  20. package/dist/doctor-BArviV8X.cjs +28 -0
  21. package/dist/doctor-CgLA7_Uv.mjs +28 -0
  22. package/dist/{doctor-CrytFkqW.cjs → doctor-DyNUVe96.cjs} +1 -1
  23. package/dist/{routes-DP1vmWRj.cjs → doctor-aN_leTbh.mjs} +1 -1
  24. package/dist/{generator-ClVanhvi.mjs → generator-BHCrLU6h.mjs} +2 -2
  25. package/dist/{generator-CHqxiQhF.cjs → generator-CC2yHzhZ.cjs} +2 -2
  26. package/dist/icons-dev-DvJ-hh9x.cjs +1209 -0
  27. package/dist/icons-dev-Oju24Wjp.js +845 -0
  28. package/dist/image-Ch4-GxdO.cjs +268 -0
  29. package/dist/image-Do8V9PCW.js +214 -0
  30. package/dist/mdx-D3A2_l7P.js +520 -0
  31. package/dist/mdx-PLhhPJRS.cjs +531 -0
  32. package/dist/node/cli-entry.cjs +3 -1
  33. package/dist/node/cli-entry.mjs +3 -1
  34. package/dist/node/index.cjs +1 -1
  35. package/dist/node/index.d.cts +258 -152
  36. package/dist/node/index.d.mts +258 -150
  37. package/dist/node/index.mjs +1 -1
  38. package/dist/node/routes/worker.cjs +1 -1
  39. package/dist/node/routes/worker.mjs +1 -1
  40. package/dist/node-BmlP0eBP.cjs +159 -0
  41. package/dist/node-Y8_4ayje.mjs +159 -0
  42. package/dist/package-2nFy_NsW.cjs +6 -0
  43. package/dist/{package--0Yf0t1N.mjs → package-DAbtltXX.mjs} +1 -1
  44. package/dist/parser-B7-6PyQz.cjs +6 -0
  45. package/dist/{parser-Aq8LoH-0.cjs → parser-BzB-zCkF.cjs} +1 -1
  46. package/dist/parser-WGZdWs0X.mjs +6 -0
  47. package/dist/routes-BDDSxAl0.mjs +6 -0
  48. package/dist/routes-DJNJ-rTt.cjs +6 -0
  49. package/dist/routes-DiYC4nD2.cjs +6 -0
  50. package/dist/routes-_Bb2f4eI.mjs +6 -0
  51. package/dist/search-dialog-BXVoecTx.cjs +483 -0
  52. package/dist/search-dialog-BYhOov4S.cjs +331 -0
  53. package/dist/search-dialog-C09riYmx.js +313 -0
  54. package/dist/search-dialog-CUeAfy-8.cjs +8 -0
  55. package/dist/search-dialog-D8gLkhUV.js +453 -0
  56. package/dist/search-dialog-DHc_8FFX.js +8 -0
  57. package/dist/{sidebar-CcBkrm06.d.cts → sidebar-DNq4_ZAa.d.ts} +118 -52
  58. package/dist/{sidebar-CyZS9YOm.d.ts → sidebar-Dlkgbxs6.d.cts} +118 -52
  59. package/dist/utils-BYITg7T5.mjs +7 -0
  60. package/dist/utils-Cjmx1hhk.cjs +7 -0
  61. package/dist/worker-pool-CtqklOXq.cjs +6 -0
  62. package/dist/worker-pool-k0DY6k8T.mjs +6 -0
  63. package/package.json +5 -6
  64. package/src/shared/config-utils.ts +4 -0
  65. package/src/shared/types.ts +52 -6
  66. package/dist/cache-Ba-DZQNH.cjs +0 -6
  67. package/dist/cache-BuMZ58L5.mjs +0 -6
  68. package/dist/cards-BakZPTz9.d.ts +0 -30
  69. package/dist/cards-CQn9mXZS.d.cts +0 -30
  70. package/dist/docs-layout-KoWNZc8_.js +0 -6
  71. package/dist/docs-layout-x2yKt2cL.cjs +0 -6
  72. package/dist/doctor-Be7Ly1oM.mjs +0 -21
  73. package/dist/doctor-jMxWZyLJ.cjs +0 -21
  74. package/dist/icons-dev-B_RZIyxu.js +0 -6
  75. package/dist/icons-dev-BlV3wWFT.cjs +0 -6
  76. package/dist/image-BHhTvQzr.cjs +0 -6
  77. package/dist/image-CqKzYD8f.js +0 -6
  78. package/dist/mdx-DudBEac0.js +0 -7
  79. package/dist/mdx-r4cDQxWu.cjs +0 -7
  80. package/dist/node-DtEDyN1u.cjs +0 -111
  81. package/dist/node-_1jhMGYx.mjs +0 -111
  82. package/dist/package-DrwtlXfk.cjs +0 -6
  83. package/dist/parser-CdNbqN5y.cjs +0 -6
  84. package/dist/parser-nE792MLO.mjs +0 -6
  85. package/dist/rolldown-runtime-fkIsjY3S.mjs +0 -6
  86. package/dist/routes-2k3tbUmC.cjs +0 -6
  87. package/dist/routes-CpxZIsMM.mjs +0 -6
  88. package/dist/search-dialog-B584t9ZF.js +0 -6
  89. package/dist/search-dialog-BvBopRsZ.cjs +0 -6
  90. package/dist/search-dialog-ByvGScjt.js +0 -6
  91. package/dist/search-dialog-Cyko6TJm.cjs +0 -6
  92. package/dist/search-dialog-D6BNohIJ.js +0 -6
  93. package/dist/search-dialog-DuYTIefy.cjs +0 -6
  94. package/dist/utils-CG65J0Sc.mjs +0 -7
  95. package/dist/utils-CKunkU96.cjs +0 -7
  96. package/dist/worker-pool-CGn7DrLb.mjs +0 -6
  97. package/dist/worker-pool-Crbqgw5R.cjs +0 -6
  98. package/src/client/app/config-context.tsx +0 -51
  99. package/src/client/app/doc-page.tsx +0 -38
  100. package/src/client/app/docs-layout.tsx +0 -28
  101. package/src/client/app/head.tsx +0 -122
  102. package/src/client/app/helmet-compat.tsx +0 -36
  103. package/src/client/app/mdx-component.tsx +0 -8
  104. package/src/client/app/mdx-components-context.tsx +0 -72
  105. package/src/client/app/routes-context.tsx +0 -34
  106. package/src/client/app/scroll-handler.tsx +0 -74
  107. package/src/client/app/theme-context.tsx +0 -103
  108. package/src/client/app/ui-context.tsx +0 -42
  109. package/src/client/components/docs-layout-default.tsx +0 -85
  110. package/src/client/components/icons-dev.tsx +0 -282
  111. package/src/client/components/mdx/callout.tsx +0 -97
  112. package/src/client/components/mdx/card.tsx +0 -99
  113. package/src/client/components/mdx/cards.tsx +0 -27
  114. package/src/client/components/mdx/code-block.tsx +0 -184
  115. package/src/client/components/mdx/field.tsx +0 -33
  116. package/src/client/components/mdx/image.tsx +0 -44
  117. package/src/client/components/mdx/index.ts +0 -19
  118. package/src/client/components/mdx/table.tsx +0 -54
  119. package/src/client/components/mdx/typographics.tsx +0 -120
  120. package/src/client/components/mdx/use-code-block.ts +0 -34
  121. package/src/client/components/primitives/breadcrumbs.tsx +0 -54
  122. package/src/client/components/primitives/button-group.tsx +0 -54
  123. package/src/client/components/primitives/button.tsx +0 -6
  124. package/src/client/components/primitives/code-block.tsx +0 -120
  125. package/src/client/components/primitives/docs-layout.tsx +0 -125
  126. package/src/client/components/primitives/error-boundary.tsx +0 -107
  127. package/src/client/components/primitives/heading.tsx +0 -128
  128. package/src/client/components/primitives/helpers/observer.ts +0 -141
  129. package/src/client/components/primitives/image.tsx +0 -26
  130. package/src/client/components/primitives/link.tsx +0 -102
  131. package/src/client/components/primitives/menu.tsx +0 -137
  132. package/src/client/components/primitives/navbar.tsx +0 -466
  133. package/src/client/components/primitives/on-this-page.tsx +0 -430
  134. package/src/client/components/primitives/page-nav.tsx +0 -51
  135. package/src/client/components/primitives/popover.tsx +0 -28
  136. package/src/client/components/primitives/search-dialog.tsx +0 -193
  137. package/src/client/components/primitives/sidebar.tsx +0 -423
  138. package/src/client/components/primitives/skeleton.tsx +0 -26
  139. package/src/client/components/primitives/tabs.tsx +0 -70
  140. package/src/client/components/primitives/tooltip.tsx +0 -81
  141. package/src/client/components/primitives/types.ts +0 -11
  142. package/src/client/components/ui-base/banner.tsx +0 -66
  143. package/src/client/components/ui-base/breadcrumbs.tsx +0 -44
  144. package/src/client/components/ui-base/copy-markdown.tsx +0 -107
  145. package/src/client/components/ui-base/error-boundary.tsx +0 -15
  146. package/src/client/components/ui-base/github-stars.tsx +0 -29
  147. package/src/client/components/ui-base/icons.tsx +0 -240
  148. package/src/client/components/ui-base/index.ts +0 -16
  149. package/src/client/components/ui-base/last-updated.tsx +0 -27
  150. package/src/client/components/ui-base/navbar.tsx +0 -266
  151. package/src/client/components/ui-base/not-found.tsx +0 -26
  152. package/src/client/components/ui-base/on-this-page.tsx +0 -57
  153. package/src/client/components/ui-base/page-nav.tsx +0 -50
  154. package/src/client/components/ui-base/search-dialog.tsx +0 -163
  155. package/src/client/components/ui-base/search-highlight.tsx +0 -10
  156. package/src/client/components/ui-base/sidebar.tsx +0 -92
  157. package/src/client/components/ui-base/tabs.tsx +0 -83
  158. package/src/client/components/ui-base/theme-toggle.tsx +0 -130
  159. package/src/client/components/ui-base/version-i18n.tsx +0 -80
  160. package/src/client/hooks/index.ts +0 -13
  161. package/src/client/hooks/use-analytics.ts +0 -272
  162. package/src/client/hooks/use-breadcrumbs.ts +0 -22
  163. package/src/client/hooks/use-i18n.ts +0 -182
  164. package/src/client/hooks/use-localized-to.ts +0 -113
  165. package/src/client/hooks/use-location.ts +0 -5
  166. package/src/client/hooks/use-navbar.ts +0 -130
  167. package/src/client/hooks/use-page-nav.ts +0 -46
  168. package/src/client/hooks/use-routes.ts +0 -108
  169. package/src/client/hooks/use-search-highlight.ts +0 -185
  170. package/src/client/hooks/use-search.ts +0 -118
  171. package/src/client/hooks/use-sidebar.ts +0 -205
  172. package/src/client/hooks/use-tabs.ts +0 -46
  173. package/src/client/hooks/use-version.ts +0 -111
  174. package/src/client/index.ts +0 -31
  175. package/src/client/mdx.ts +0 -2
  176. package/src/client/primitives.ts +0 -19
  177. package/src/client/ssg/boltdocs-shell.tsx +0 -148
  178. package/src/client/ssg/create-routes.tsx +0 -473
  179. package/src/client/ssg/index.ts +0 -4
  180. package/src/client/ssg/mdx-page.tsx +0 -38
  181. package/src/client/store/boltdocs-context.tsx +0 -137
  182. package/src/client/theme/neutral.css +0 -141
  183. package/src/client/theme/reset.css +0 -189
  184. package/src/client/types.ts +0 -116
  185. package/src/client/utils/cn.ts +0 -6
  186. package/src/client/utils/copy-clipboard.ts +0 -22
  187. package/src/client/utils/get-base-file-path.ts +0 -21
  188. package/src/client/utils/github.ts +0 -121
  189. package/src/client/utils/i18n.ts +0 -23
  190. package/src/client/utils/path.ts +0 -9
  191. package/src/client/utils/react-to-text.ts +0 -34
  192. package/src/client/virtual.d.ts +0 -24
  193. /package/dist/{meta-loader-CWg2gnbY.mjs → meta-loader-DzwDFtdT.mjs} +0 -0
@@ -0,0 +1,483 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ const require_icons_dev = require('./icons-dev-DvJ-hh9x.cjs');
7
+ let react = require("react");
8
+ react = require_icons_dev.__toESM(react);
9
+ let react_jsx_runtime = require("react/jsx-runtime");
10
+ let react_aria_components = require("react-aria-components");
11
+ react_aria_components = require_icons_dev.__toESM(react_aria_components);
12
+
13
+ //#region src/client/components/primitives/button.tsx
14
+ function Button({ ...props }) {
15
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, { ...props });
16
+ }
17
+
18
+ //#endregion
19
+ //#region src/client/components/primitives/error-boundary.tsx
20
+ var ErrorBoundary = class extends react.Component {
21
+ state = {
22
+ hasError: false,
23
+ error: null
24
+ };
25
+ static getDerivedStateFromError(error) {
26
+ return {
27
+ hasError: true,
28
+ error
29
+ };
30
+ }
31
+ componentDidCatch(error, errorInfo) {
32
+ if (this.props.onError) this.props.onError(error, errorInfo);
33
+ else console.error("ErrorBoundary caught an unhandled error:", error, errorInfo);
34
+ }
35
+ resetErrorBoundary = () => {
36
+ if (this.props.onReset) this.props.onReset();
37
+ this.setState({
38
+ hasError: false,
39
+ error: null
40
+ });
41
+ };
42
+ render() {
43
+ const { hasError, error } = this.state;
44
+ const { children, fallback, FallbackComponent } = this.props;
45
+ if (hasError && error) {
46
+ if (FallbackComponent) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FallbackComponent, {
47
+ error,
48
+ resetErrorBoundary: this.resetErrorBoundary
49
+ });
50
+ if (fallback) return fallback;
51
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ErrorBoundaryFallback, {
52
+ error,
53
+ resetErrorBoundary: this.resetErrorBoundary
54
+ });
55
+ }
56
+ return children;
57
+ }
58
+ };
59
+ function ErrorBoundaryFallback({ error, resetErrorBoundary }) {
60
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
61
+ className: "flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-6 py-8 border border-subtle bg-surface rounded-2xl max-w-lg mx-auto shadow-xs",
62
+ children: [
63
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
64
+ className: "text-lg font-bold text-rose-600 dark:text-rose-400",
65
+ children: "Something went wrong"
66
+ }),
67
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
68
+ className: "text-sm text-muted max-w-sm leading-relaxed",
69
+ children: error?.message || "An unexpected error occurred while rendering this page."
70
+ }),
71
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
72
+ className: "rounded-xl border border-subtle bg-main px-6 py-2.5 text-xs font-semibold text-body hover:bg-primary-50/50 hover:border-primary-500/50 transition-all duration-300 cursor-pointer outline-none select-none",
73
+ onPress: resetErrorBoundary,
74
+ children: "Try again"
75
+ })
76
+ ]
77
+ });
78
+ }
79
+
80
+ //#endregion
81
+ //#region src/client/components/primitives/navbar.tsx
82
+ function Navbar({ children, className, ...props }) {
83
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
84
+ className: require_icons_dev.cn("boltdocs-navbar sticky top-0 z-50 w-full", className),
85
+ ...props,
86
+ children
87
+ });
88
+ }
89
+ function NavbarContent({ children, className }) {
90
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
91
+ className: require_icons_dev.cn("mx-auto flex lg:h-navbar max-w-(--breakpoint-3xl) items-center justify-between px-4 md:px-6", className),
92
+ children
93
+ });
94
+ }
95
+ function NavbarLeft({ children, className }) {
96
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
97
+ className: require_icons_dev.cn("flex flex-1 items-center justify-start gap-4 min-w-0", className),
98
+ children
99
+ });
100
+ }
101
+ function NavbarRight({ children, className }) {
102
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
103
+ className: require_icons_dev.cn("flex flex-1 items-center justify-end gap-2 md:gap-4 min-w-0", className),
104
+ children
105
+ });
106
+ }
107
+ function NavbarCenter({ children, className }) {
108
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
109
+ className: require_icons_dev.cn("hidden lg:flex flex-1 justify-center items-center gap-4 px-4 min-w-0 w-full", className),
110
+ children
111
+ });
112
+ }
113
+ function NavbarLogo({ src, alt, width = 24, height = 24, className, href = "/" }) {
114
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Link, {
115
+ href,
116
+ className: require_icons_dev.cn("flex items-center gap-2 shrink-0 outline-none", className),
117
+ children: src ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
118
+ src,
119
+ alt,
120
+ width,
121
+ height,
122
+ className: "h-6 w-6 object-contain"
123
+ }) : null
124
+ });
125
+ }
126
+ function NavbarTitle({ children, className, href = "/" }) {
127
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Link, {
128
+ href,
129
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
130
+ className: require_icons_dev.cn("text-lg font-bold tracking-tight hidden sm:inline-block", className),
131
+ children
132
+ })
133
+ });
134
+ }
135
+ function NavbarLinks({ children, className }) {
136
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
137
+ className: require_icons_dev.cn("hidden md:flex items-center gap-6 text-sm font-medium", className),
138
+ children
139
+ });
140
+ }
141
+ function NavbarLink({ label, href, to, className }) {
142
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_icons_dev.Link, {
143
+ href,
144
+ target: to === "external" ? "_blank" : void 0,
145
+ className: require_icons_dev.cn("transition-all outline-none", className),
146
+ children: [label, to === "external" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
147
+ className: "ml-1 inline-block",
148
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.ExternalLink, { size: 12 })
149
+ })]
150
+ });
151
+ }
152
+ function NavbarDropdown({ label, className, children }) {
153
+ const [isOpen, setIsOpen] = (0, react.useState)(false);
154
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
155
+ className: require_icons_dev.cn("relative", className),
156
+ onMouseEnter: () => {
157
+ setIsOpen(true);
158
+ },
159
+ onMouseLeave: () => {
160
+ setIsOpen(false);
161
+ },
162
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
163
+ className: require_icons_dev.cn("flex items-center gap-1 outline-none cursor-pointer select-none font-medium text-muted hover:text-body transition-colors"),
164
+ children: [label, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
165
+ className: require_icons_dev.cn("w-4 h-4 transition-transform", isOpen && "rotate-180"),
166
+ fill: "none",
167
+ viewBox: "0 0 24 24",
168
+ stroke: "currentColor",
169
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
170
+ strokeLinecap: "round",
171
+ strokeLinejoin: "round",
172
+ strokeWidth: 2,
173
+ d: "M19 9l-7 7-7-7"
174
+ })
175
+ })]
176
+ }), isOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
177
+ className: "absolute top-full left-0 pt-1 z-[9999]",
178
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
179
+ className: "min-w-[180px] p-1 bg-surface border border-subtle rounded-md shadow-lg",
180
+ children
181
+ })
182
+ })]
183
+ });
184
+ }
185
+ function NavbarDropdownItem({ href, label, className }) {
186
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Link, {
187
+ href,
188
+ className: require_icons_dev.cn("block px-2 py-1.5 rounded hover:bg-surface", className),
189
+ children: label
190
+ });
191
+ }
192
+ function NavbarSearchTriggerDesktop({ className, onPress, children }) {
193
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
194
+ onPress,
195
+ className: require_icons_dev.cn("hidden lg:flex items-center justify-between gap-2 px-3 py-2 text-sm outline-none cursor-pointer w-full max-w-[720px]", className),
196
+ children
197
+ });
198
+ }
199
+ function NavbarSearchTriggerMobile({ className, onPress, children }) {
200
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
201
+ onPress,
202
+ className: require_icons_dev.cn("lg:hidden flex h-10 w-10 items-center justify-center outline-none cursor-pointer", className),
203
+ "aria-label": "Search",
204
+ children
205
+ });
206
+ }
207
+ function NavbarSearchTriggerKbd({ className }) {
208
+ const [mounted, setMounted] = (0, react.useState)(false);
209
+ const isMac = mounted && /Mac|iPod|iPhone|iPad/.test(navigator.platform);
210
+ (0, react.useEffect)(() => {
211
+ setMounted(true);
212
+ }, []);
213
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
214
+ className: require_icons_dev.cn("hidden sm:flex items-center gap-1 pointer-events-none select-none", className),
215
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("kbd", {
216
+ className: "flex items-center justify-center font-mono text-[10px]",
217
+ children: isMac ? "⌘" : "Ctrl"
218
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("kbd", {
219
+ className: "flex items-center justify-center font-mono text-[10px]",
220
+ children: "K"
221
+ })]
222
+ });
223
+ }
224
+ const NavbarSearchTrigger = {
225
+ Desktop: NavbarSearchTriggerDesktop,
226
+ Mobile: NavbarSearchTriggerMobile,
227
+ Kbd: NavbarSearchTriggerKbd
228
+ };
229
+ function NavbarTheme({ className, theme, onThemeChange }) {
230
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.ToggleButton, {
231
+ isSelected: theme === "dark",
232
+ onChange: onThemeChange,
233
+ className: require_icons_dev.cn("outline-none cursor-pointer", className),
234
+ "aria-label": "Toggle theme",
235
+ children: theme === "dark" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Sun, { size: 20 }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Moon, { size: 20 })
236
+ });
237
+ }
238
+ function Icon({ name }) {
239
+ if (name === "github") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Github, {});
240
+ if (name === "discord") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Discord, {});
241
+ if (name === "x") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.XSocial, {});
242
+ if (name === "bluesky") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Bluesky, {});
243
+ }
244
+ function NavbarSocials({ icon, link, className }) {
245
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Link, {
246
+ href: link,
247
+ target: "_blank",
248
+ rel: "noopener noreferrer",
249
+ className: require_icons_dev.cn("outline-none", className),
250
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: icon })
251
+ });
252
+ }
253
+ function NavbarSplit({ className }) {
254
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Separator, {
255
+ orientation: "vertical",
256
+ className: require_icons_dev.cn("h-full w-px", className)
257
+ });
258
+ }
259
+ function NavbarMore({ onPress, className }) {
260
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
261
+ onPress,
262
+ className: require_icons_dev.cn("md:hidden flex items-center justify-center outline-none cursor-pointer", className),
263
+ "aria-label": "More navigation",
264
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.MoreVertical, { size: 20 })
265
+ });
266
+ }
267
+ function NavbarMobileMenu({ isOpen, onClose, children, className }) {
268
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.ModalOverlay, {
269
+ isOpen,
270
+ onOpenChange: (open) => !open && onClose(),
271
+ isDismissable: true,
272
+ className: require_icons_dev.cn("fixed inset-0 z-60 md:hidden transition-all duration-100", className),
273
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Modal, {
274
+ className: "fixed inset-0 outline-none",
275
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_aria_components.Dialog, {
276
+ className: "relative h-full outline-none flex flex-col p-6 pt-[calc(1.5rem+env(safe-area-inset-top,0px))] pb-[calc(1.5rem+env(safe-area-inset-bottom,0px))] px-[calc(1.5rem+env(safe-area-inset-left,0px))]",
277
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
278
+ className: "flex items-center justify-between mb-6",
279
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
280
+ onPress: onClose,
281
+ className: "flex items-center justify-center outline-none cursor-pointer text-muted hover:text-body transition-colors",
282
+ "aria-label": "Close menu",
283
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.X, { size: 24 })
284
+ })]
285
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
286
+ className: "flex-1 overflow-y-auto flex flex-col gap-4",
287
+ children
288
+ })]
289
+ })
290
+ })
291
+ });
292
+ }
293
+ function NavbarMobileLink({ label, href, to, onPress, className }) {
294
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Link, {
295
+ href,
296
+ target: to === "external" ? "_blank" : void 0,
297
+ onClick: onPress,
298
+ className: require_icons_dev.cn("group flex items-center outline-none", className),
299
+ children: label
300
+ });
301
+ }
302
+ Navbar.Root = Navbar;
303
+ Navbar.Left = NavbarLeft;
304
+ Navbar.Right = NavbarRight;
305
+ Navbar.Center = NavbarCenter;
306
+ Navbar.Logo = NavbarLogo;
307
+ Navbar.Title = NavbarTitle;
308
+ Navbar.Links = NavbarLinks;
309
+ Navbar.Link = NavbarLink;
310
+ Navbar.Dropdown = NavbarDropdown;
311
+ Navbar.DropdownItem = NavbarDropdownItem;
312
+ Navbar.SearchTrigger = NavbarSearchTrigger;
313
+ Navbar.Theme = NavbarTheme;
314
+ Navbar.Socials = NavbarSocials;
315
+ Navbar.Split = NavbarSplit;
316
+ Navbar.Content = NavbarContent;
317
+ Navbar.More = NavbarMore;
318
+ Navbar.MobileMenu = NavbarMobileMenu;
319
+ Navbar.MobileLink = NavbarMobileLink;
320
+
321
+ //#endregion
322
+ //#region src/client/components/primitives/search-dialog.tsx
323
+ /**
324
+ * Pure, unstyled SearchDialog Overlay (maps to RAC.ModalOverlay)
325
+ */
326
+ function SearchDialog({ className, ...props }) {
327
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.ModalOverlay, {
328
+ className: require_icons_dev.cn("fixed inset-0 z-100", className),
329
+ ...props
330
+ });
331
+ }
332
+ /**
333
+ * Pure, unstyled SearchDialog Content (maps to RAC.Modal)
334
+ */
335
+ function SearchDialogContent({ className, ...props }) {
336
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Modal, {
337
+ className: require_icons_dev.cn(className),
338
+ ...props
339
+ });
340
+ }
341
+ /**
342
+ * Pure, unstyled SearchDialog Dialog (maps to RAC.Dialog)
343
+ */
344
+ function SearchDialogDialog({ className, ...props }) {
345
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Dialog, {
346
+ className: require_icons_dev.cn("flex flex-col focus:outline-none", className),
347
+ ...props
348
+ });
349
+ }
350
+ /**
351
+ * Pure, unstyled SearchDialog Input Field (maps to RAC.SearchField)
352
+ */
353
+ function SearchDialogField({ className, ...props }) {
354
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.SearchField, {
355
+ className: require_icons_dev.cn("flex items-center", className),
356
+ ...props
357
+ });
358
+ }
359
+ /**
360
+ * Pure, unstyled SearchInput (maps to RAC.Input)
361
+ */
362
+ function SearchDialogSearchInput({ className, ...props }) {
363
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Input, {
364
+ className: require_icons_dev.cn("w-full bg-transparent outline-none border-none", className),
365
+ ...props
366
+ });
367
+ }
368
+ /**
369
+ * Pure, unstyled Clear Button (maps to RAC.Button with slot="clear")
370
+ */
371
+ function SearchDialogClearButton({ className, ...props }) {
372
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
373
+ slot: "clear",
374
+ className: require_icons_dev.cn(className),
375
+ ...props
376
+ });
377
+ }
378
+ /**
379
+ * Pure, unstyled Autocomplete container (maps to RAC.Autocomplete)
380
+ */
381
+ function SearchDialogAutocomplete({ children, className, onSelectionChange, ...props }) {
382
+ const Autocomplete = react_aria_components.Autocomplete;
383
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
384
+ className: require_icons_dev.cn("flex-1 min-h-0", className),
385
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Autocomplete, {
386
+ ...props,
387
+ onSelectionChange,
388
+ className: "flex flex-col min-h-0",
389
+ children
390
+ })
391
+ });
392
+ }
393
+ /**
394
+ * Pure, unstyled List Box (maps to RAC.ListBox)
395
+ */
396
+ function SearchDialogList({ children, className, ...props }) {
397
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.ListBox, {
398
+ ...props,
399
+ className: require_icons_dev.cn("flex-1 overflow-y-auto outline-none min-h-0", className),
400
+ children
401
+ });
402
+ }
403
+ /**
404
+ * Pure, unstyled List Box Item (maps to RAC.ListBoxItem)
405
+ */
406
+ function SearchDialogItemRoot({ children, className, ...props }) {
407
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.ListBoxItem, {
408
+ ...props,
409
+ className: require_icons_dev.cn("group flex items-center outline-none cursor-pointer", className),
410
+ children: (itemProps) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [children, (itemProps.isFocused || itemProps.isSelected) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
411
+ className: "ml-auto opacity-50 flex items-center gap-1",
412
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
413
+ className: "text-[10px]",
414
+ children: "Select"
415
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.CornerDownLeft, { size: 10 })]
416
+ })] })
417
+ });
418
+ }
419
+ function SearchDialogItemIcon({ isHeading, className }) {
420
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
421
+ className: require_icons_dev.cn("shrink-0", className),
422
+ children: isHeading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Hash, { size: 18 }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.FileText, { size: 18 })
423
+ });
424
+ }
425
+ function SearchDialogItemTitle({ children, className }) {
426
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
427
+ className: require_icons_dev.cn("block truncate flex-1", className),
428
+ children
429
+ });
430
+ }
431
+ function SearchDialogItemBio({ children, className }) {
432
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
433
+ className: require_icons_dev.cn("ml-2 truncate hidden sm:inline", className),
434
+ children
435
+ });
436
+ }
437
+ SearchDialog.Root = SearchDialog;
438
+ SearchDialog.Overlay = SearchDialog;
439
+ SearchDialog.Content = SearchDialogContent;
440
+ SearchDialog.Dialog = SearchDialogDialog;
441
+ SearchDialog.Autocomplete = SearchDialogAutocomplete;
442
+ SearchDialog.List = SearchDialogList;
443
+ SearchDialog.Input = Object.assign(SearchDialogField, {
444
+ SearchInput: SearchDialogSearchInput,
445
+ Button: SearchDialogClearButton
446
+ });
447
+ SearchDialog.Item = Object.assign(SearchDialogItemRoot, {
448
+ Icon: SearchDialogItemIcon,
449
+ Title: SearchDialogItemTitle,
450
+ Bio: SearchDialogItemBio
451
+ });
452
+
453
+ //#endregion
454
+ Object.defineProperty(exports, 'Button', {
455
+ enumerable: true,
456
+ get: function () {
457
+ return Button;
458
+ }
459
+ });
460
+ Object.defineProperty(exports, 'ErrorBoundary', {
461
+ enumerable: true,
462
+ get: function () {
463
+ return ErrorBoundary;
464
+ }
465
+ });
466
+ Object.defineProperty(exports, 'ErrorBoundaryFallback', {
467
+ enumerable: true,
468
+ get: function () {
469
+ return ErrorBoundaryFallback;
470
+ }
471
+ });
472
+ Object.defineProperty(exports, 'Navbar', {
473
+ enumerable: true,
474
+ get: function () {
475
+ return Navbar;
476
+ }
477
+ });
478
+ Object.defineProperty(exports, 'SearchDialog', {
479
+ enumerable: true,
480
+ get: function () {
481
+ return SearchDialog;
482
+ }
483
+ });