boltdocs 2.7.11 → 2.8.1

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 (85) hide show
  1. package/README.md +2 -54
  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 +782 -443
  7. package/dist/client/index.d.cts +86 -110
  8. package/dist/client/index.d.ts +87 -111
  9. package/dist/client/index.js +773 -439
  10. package/dist/client/mdx.cjs +8 -3
  11. package/dist/client/mdx.d.cts +39 -93
  12. package/dist/client/mdx.d.ts +38 -93
  13. package/dist/client/mdx.js +3 -3
  14. package/dist/client/primitives.cjs +7 -7
  15. package/dist/client/primitives.d.cts +411 -347
  16. package/dist/client/primitives.d.ts +411 -347
  17. package/dist/client/primitives.js +4 -4
  18. package/dist/client/theme/neutral.css +1 -1
  19. package/dist/{docs-layout-BXHV0xw_.cjs → docs-layout-CwCq42Zt.cjs} +95 -178
  20. package/dist/{docs-layout-DwFndmj5.js → docs-layout-Dn6S5g59.js} +99 -163
  21. package/dist/doctor-BArviV8X.cjs +28 -0
  22. package/dist/doctor-CgLA7_Uv.mjs +28 -0
  23. package/dist/{doctor-CrytFkqW.cjs → doctor-DyNUVe96.cjs} +1 -1
  24. package/dist/{routes-DP1vmWRj.cjs → doctor-aN_leTbh.mjs} +1 -1
  25. package/dist/{generator-ClVanhvi.mjs → generator-BHCrLU6h.mjs} +2 -2
  26. package/dist/{generator-CHqxiQhF.cjs → generator-CC2yHzhZ.cjs} +2 -2
  27. package/dist/{icons-dev-3cZMyt8r.cjs → icons-dev-DvJ-hh9x.cjs} +116 -111
  28. package/dist/{icons-dev-Df8OQ481.js → icons-dev-Oju24Wjp.js} +120 -114
  29. package/dist/{image-DtrI2cw3.cjs → image-Ch4-GxdO.cjs} +13 -13
  30. package/dist/{image-jxPb-2iV.js → image-Do8V9PCW.js} +13 -13
  31. package/dist/{mdx-UTTLFWJq.js → mdx-5oeCOFhH.js} +111 -81
  32. package/dist/{mdx-BdWkJTeB.cjs → mdx-BGM7LjW5.cjs} +109 -97
  33. package/dist/node/cli-entry.cjs +3 -1
  34. package/dist/node/cli-entry.mjs +3 -1
  35. package/dist/node/index.cjs +1 -1
  36. package/dist/node/index.d.cts +258 -152
  37. package/dist/node/index.d.mts +258 -150
  38. package/dist/node/index.mjs +1 -1
  39. package/dist/node/routes/worker.cjs +1 -1
  40. package/dist/node/routes/worker.mjs +1 -1
  41. package/dist/node-CefnjllX.cjs +159 -0
  42. package/dist/node-DruKROCt.mjs +159 -0
  43. package/dist/package-CmP_9rJ8.cjs +6 -0
  44. package/dist/{package-K0zsjGIz.mjs → package-DpbnBMR1.mjs} +1 -1
  45. package/dist/parser-B0YtJPDz.mjs +6 -0
  46. package/dist/parser-B7-6PyQz.cjs +6 -0
  47. package/dist/{parser-Aq8LoH-0.cjs → parser-BzB-zCkF.cjs} +1 -1
  48. package/dist/routes-ChS-zgzh.mjs +6 -0
  49. package/dist/routes-DJNJ-rTt.cjs +6 -0
  50. package/dist/routes-DiYC4nD2.cjs +6 -0
  51. package/dist/routes-rKlxFkqq.mjs +6 -0
  52. package/dist/{search-dialog-C7xuvyNk.cjs → search-dialog-BXVoecTx.cjs} +175 -78
  53. package/dist/{search-dialog-BwkDuI9R.cjs → search-dialog-BYhOov4S.cjs} +118 -7
  54. package/dist/{search-dialog-D-DDN7zJ.js → search-dialog-C09riYmx.js} +113 -8
  55. package/dist/{search-dialog-CIQg6k8c.cjs → search-dialog-CUeAfy-8.cjs} +1 -1
  56. package/dist/{search-dialog-BNF10tDl.js → search-dialog-D8gLkhUV.js} +158 -80
  57. package/dist/{search-dialog-BHuIiUC6.js → search-dialog-DHc_8FFX.js} +1 -1
  58. package/dist/{sidebar-CyZS9YOm.d.ts → sidebar-DNq4_ZAa.d.ts} +117 -51
  59. package/dist/{sidebar-CcBkrm06.d.cts → sidebar-Dlkgbxs6.d.cts} +117 -51
  60. package/dist/utils-BYITg7T5.mjs +7 -0
  61. package/dist/utils-Cjmx1hhk.cjs +7 -0
  62. package/dist/worker-pool-CtqklOXq.cjs +6 -0
  63. package/dist/worker-pool-k0DY6k8T.mjs +6 -0
  64. package/package.json +3 -3
  65. package/src/shared/config-utils.ts +4 -0
  66. package/src/shared/types.ts +52 -6
  67. package/dist/cache-Ba-DZQNH.cjs +0 -6
  68. package/dist/cache-BuMZ58L5.mjs +0 -6
  69. package/dist/cards-BakZPTz9.d.ts +0 -30
  70. package/dist/cards-CQn9mXZS.d.cts +0 -30
  71. package/dist/doctor-Be7Ly1oM.mjs +0 -21
  72. package/dist/doctor-jMxWZyLJ.cjs +0 -21
  73. package/dist/node-BSM4qcDK.cjs +0 -111
  74. package/dist/node-BspZN3R2.mjs +0 -111
  75. package/dist/package-DIIrjuWI.cjs +0 -6
  76. package/dist/parser-CdNbqN5y.cjs +0 -6
  77. package/dist/parser-nE792MLO.mjs +0 -6
  78. package/dist/rolldown-runtime-fkIsjY3S.mjs +0 -6
  79. package/dist/routes-2k3tbUmC.cjs +0 -6
  80. package/dist/routes-CpxZIsMM.mjs +0 -6
  81. package/dist/utils-CG65J0Sc.mjs +0 -7
  82. package/dist/utils-CKunkU96.cjs +0 -7
  83. package/dist/worker-pool-CGn7DrLb.mjs +0 -6
  84. package/dist/worker-pool-Crbqgw5R.cjs +0 -6
  85. /package/dist/{meta-loader-CWg2gnbY.mjs → meta-loader-DzwDFtdT.mjs} +0 -0
@@ -3,45 +3,114 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- const require_icons_dev = require('./icons-dev-3cZMyt8r.cjs');
6
+ const require_icons_dev = require('./icons-dev-DvJ-hh9x.cjs');
7
7
  let react = require("react");
8
+ react = require_icons_dev.__toESM(react);
8
9
  let react_jsx_runtime = require("react/jsx-runtime");
9
10
  let react_aria_components = require("react-aria-components");
10
11
  react_aria_components = require_icons_dev.__toESM(react_aria_components);
11
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
12
81
  //#region src/client/components/primitives/navbar.tsx
13
- const Navbar = ({ children, className, ...props }) => {
82
+ function Navbar({ children, className, ...props }) {
14
83
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
15
84
  className: require_icons_dev.cn("boltdocs-navbar sticky top-0 z-50 w-full", className),
16
85
  ...props,
17
86
  children
18
87
  });
19
- };
20
- const NavbarContent = ({ children, className }) => {
88
+ }
89
+ function NavbarContent({ children, className }) {
21
90
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
22
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),
23
92
  children
24
93
  });
25
- };
26
- const NavbarLeft = ({ children, className }) => {
94
+ }
95
+ function NavbarLeft({ children, className }) {
27
96
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
28
97
  className: require_icons_dev.cn("flex flex-1 items-center justify-start gap-4 min-w-0", className),
29
98
  children
30
99
  });
31
- };
32
- const NavbarRight = ({ children, className }) => {
100
+ }
101
+ function NavbarRight({ children, className }) {
33
102
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
34
103
  className: require_icons_dev.cn("flex flex-1 items-center justify-end gap-2 md:gap-4 min-w-0", className),
35
104
  children
36
105
  });
37
- };
38
- const NavbarCenter = ({ children, className }) => {
106
+ }
107
+ function NavbarCenter({ children, className }) {
39
108
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
40
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),
41
110
  children
42
111
  });
43
- };
44
- const NavbarLogo = ({ src, alt, width = 24, height = 24, className, href = "/" }) => {
112
+ }
113
+ function NavbarLogo({ src, alt, width = 24, height = 24, className, href = "/" }) {
45
114
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Link, {
46
115
  href,
47
116
  className: require_icons_dev.cn("flex items-center gap-2 shrink-0 outline-none", className),
@@ -53,8 +122,8 @@ const NavbarLogo = ({ src, alt, width = 24, height = 24, className, href = "/" }
53
122
  className: "h-6 w-6 object-contain"
54
123
  }) : null
55
124
  });
56
- };
57
- const NavbarTitle = ({ children, className, href = "/" }) => {
125
+ }
126
+ function NavbarTitle({ children, className, href = "/" }) {
58
127
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Link, {
59
128
  href,
60
129
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
@@ -62,14 +131,14 @@ const NavbarTitle = ({ children, className, href = "/" }) => {
62
131
  children
63
132
  })
64
133
  });
65
- };
66
- const NavbarLinks = ({ children, className }) => {
134
+ }
135
+ function NavbarLinks({ children, className }) {
67
136
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
68
137
  className: require_icons_dev.cn("hidden md:flex items-center gap-6 text-sm font-medium", className),
69
138
  children
70
139
  });
71
- };
72
- const NavbarLink = ({ label, href, to, className }) => {
140
+ }
141
+ function NavbarLink({ label, href, to, className }) {
73
142
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_icons_dev.Link, {
74
143
  href,
75
144
  target: to === "external" ? "_blank" : void 0,
@@ -79,8 +148,8 @@ const NavbarLink = ({ label, href, to, className }) => {
79
148
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.ExternalLink, { size: 12 })
80
149
  })]
81
150
  });
82
- };
83
- const NavbarDropdown = ({ label, className, children }) => {
151
+ }
152
+ function NavbarDropdown({ label, className, children }) {
84
153
  const [isOpen, setIsOpen] = (0, react.useState)(false);
85
154
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
86
155
  className: require_icons_dev.cn("relative", className),
@@ -112,30 +181,30 @@ const NavbarDropdown = ({ label, className, children }) => {
112
181
  })
113
182
  })]
114
183
  });
115
- };
116
- const NavbarDropdownItem = ({ href, label, className }) => {
184
+ }
185
+ function NavbarDropdownItem({ href, label, className }) {
117
186
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Link, {
118
187
  href,
119
188
  className: require_icons_dev.cn("block px-2 py-1.5 rounded hover:bg-surface", className),
120
189
  children: label
121
190
  });
122
- };
123
- const NavbarSearchTriggerDesktop = ({ className, onPress, children }) => {
191
+ }
192
+ function NavbarSearchTriggerDesktop({ className, onPress, children }) {
124
193
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
125
194
  onPress,
126
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),
127
196
  children
128
197
  });
129
- };
130
- const NavbarSearchTriggerMobile = ({ className, onPress, children }) => {
198
+ }
199
+ function NavbarSearchTriggerMobile({ className, onPress, children }) {
131
200
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
132
201
  onPress,
133
202
  className: require_icons_dev.cn("lg:hidden flex h-10 w-10 items-center justify-center outline-none cursor-pointer", className),
134
203
  "aria-label": "Search",
135
204
  children
136
205
  });
137
- };
138
- const NavbarSearchTriggerKbd = ({ className }) => {
206
+ }
207
+ function NavbarSearchTriggerKbd({ className }) {
139
208
  const [mounted, setMounted] = (0, react.useState)(false);
140
209
  const isMac = mounted && /Mac|iPod|iPhone|iPad/.test(navigator.platform);
141
210
  (0, react.useEffect)(() => {
@@ -151,13 +220,13 @@ const NavbarSearchTriggerKbd = ({ className }) => {
151
220
  children: "K"
152
221
  })]
153
222
  });
154
- };
223
+ }
155
224
  const NavbarSearchTrigger = {
156
225
  Desktop: NavbarSearchTriggerDesktop,
157
226
  Mobile: NavbarSearchTriggerMobile,
158
227
  Kbd: NavbarSearchTriggerKbd
159
228
  };
160
- const NavbarTheme = ({ className, theme, onThemeChange }) => {
229
+ function NavbarTheme({ className, theme, onThemeChange }) {
161
230
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.ToggleButton, {
162
231
  isSelected: theme === "dark",
163
232
  onChange: onThemeChange,
@@ -165,14 +234,14 @@ const NavbarTheme = ({ className, theme, onThemeChange }) => {
165
234
  "aria-label": "Toggle theme",
166
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 })
167
236
  });
168
- };
169
- const Icon = ({ name }) => {
237
+ }
238
+ function Icon({ name }) {
170
239
  if (name === "github") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Github, {});
171
240
  if (name === "discord") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Discord, {});
172
241
  if (name === "x") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.XSocial, {});
173
242
  if (name === "bluesky") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Bluesky, {});
174
- };
175
- const NavbarSocials = ({ icon, link, className }) => {
243
+ }
244
+ function NavbarSocials({ icon, link, className }) {
176
245
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Link, {
177
246
  href: link,
178
247
  target: "_blank",
@@ -180,22 +249,22 @@ const NavbarSocials = ({ icon, link, className }) => {
180
249
  className: require_icons_dev.cn("outline-none", className),
181
250
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: icon })
182
251
  });
183
- };
184
- const NavbarSplit = ({ className }) => {
252
+ }
253
+ function NavbarSplit({ className }) {
185
254
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Separator, {
186
255
  orientation: "vertical",
187
256
  className: require_icons_dev.cn("h-full w-px", className)
188
257
  });
189
- };
190
- const NavbarMore = ({ onPress, className }) => {
258
+ }
259
+ function NavbarMore({ onPress, className }) {
191
260
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
192
261
  onPress,
193
262
  className: require_icons_dev.cn("md:hidden flex items-center justify-center outline-none cursor-pointer", className),
194
263
  "aria-label": "More navigation",
195
264
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.MoreVertical, { size: 20 })
196
265
  });
197
- };
198
- const NavbarMobileMenu = ({ isOpen, onClose, children, className }) => {
266
+ }
267
+ function NavbarMobileMenu({ isOpen, onClose, children, className }) {
199
268
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.ModalOverlay, {
200
269
  isOpen,
201
270
  onOpenChange: (open) => !open && onClose(),
@@ -220,8 +289,8 @@ const NavbarMobileMenu = ({ isOpen, onClose, children, className }) => {
220
289
  })
221
290
  })
222
291
  });
223
- };
224
- const NavbarMobileLink = ({ label, href, to, onPress, className }) => {
292
+ }
293
+ function NavbarMobileLink({ label, href, to, onPress, className }) {
225
294
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Link, {
226
295
  href,
227
296
  target: to === "external" ? "_blank" : void 0,
@@ -229,7 +298,7 @@ const NavbarMobileLink = ({ label, href, to, onPress, className }) => {
229
298
  className: require_icons_dev.cn("group flex items-center outline-none", className),
230
299
  children: label
231
300
  });
232
- };
301
+ }
233
302
  Navbar.Root = Navbar;
234
303
  Navbar.Left = NavbarLeft;
235
304
  Navbar.Right = NavbarRight;
@@ -254,52 +323,62 @@ Navbar.MobileLink = NavbarMobileLink;
254
323
  /**
255
324
  * Pure, unstyled SearchDialog Overlay (maps to RAC.ModalOverlay)
256
325
  */
257
- const SearchDialog = ({ className, ...props }) => {
326
+ function SearchDialog({ className, ...props }) {
258
327
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.ModalOverlay, {
259
328
  className: require_icons_dev.cn("fixed inset-0 z-100", className),
260
329
  ...props
261
330
  });
262
- };
331
+ }
263
332
  /**
264
333
  * Pure, unstyled SearchDialog Content (maps to RAC.Modal)
265
334
  */
266
- const SearchDialogContent = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Modal, {
267
- className: require_icons_dev.cn(className),
268
- ...props
269
- });
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
+ }
270
341
  /**
271
342
  * Pure, unstyled SearchDialog Dialog (maps to RAC.Dialog)
272
343
  */
273
- const SearchDialogDialog = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Dialog, {
274
- className: require_icons_dev.cn("flex flex-col focus:outline-none", className),
275
- ...props
276
- });
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
+ }
277
350
  /**
278
351
  * Pure, unstyled SearchDialog Input Field (maps to RAC.SearchField)
279
352
  */
280
- const SearchDialogField = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.SearchField, {
281
- className: require_icons_dev.cn("flex items-center", className),
282
- ...props
283
- });
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
+ }
284
359
  /**
285
360
  * Pure, unstyled SearchInput (maps to RAC.Input)
286
361
  */
287
- const SearchDialogSearchInput = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Input, {
288
- className: require_icons_dev.cn("w-full bg-transparent outline-none border-none", className),
289
- ...props
290
- });
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
+ }
291
368
  /**
292
369
  * Pure, unstyled Clear Button (maps to RAC.Button with slot="clear")
293
370
  */
294
- const SearchDialogClearButton = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
295
- slot: "clear",
296
- className: require_icons_dev.cn(className),
297
- ...props
298
- });
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
+ }
299
378
  /**
300
379
  * Pure, unstyled Autocomplete container (maps to RAC.Autocomplete)
301
380
  */
302
- const SearchDialogAutocomplete = ({ children, className, onSelectionChange, ...props }) => {
381
+ function SearchDialogAutocomplete({ children, className, onSelectionChange, ...props }) {
303
382
  const Autocomplete = react_aria_components.Autocomplete;
304
383
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
305
384
  className: require_icons_dev.cn("flex-1 min-h-0", className),
@@ -310,21 +389,21 @@ const SearchDialogAutocomplete = ({ children, className, onSelectionChange, ...p
310
389
  children
311
390
  })
312
391
  });
313
- };
392
+ }
314
393
  /**
315
394
  * Pure, unstyled List Box (maps to RAC.ListBox)
316
395
  */
317
- const SearchDialogList = ({ children, className, ...props }) => {
396
+ function SearchDialogList({ children, className, ...props }) {
318
397
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.ListBox, {
319
398
  ...props,
320
399
  className: require_icons_dev.cn("flex-1 overflow-y-auto outline-none min-h-0", className),
321
400
  children
322
401
  });
323
- };
402
+ }
324
403
  /**
325
404
  * Pure, unstyled List Box Item (maps to RAC.ListBoxItem)
326
405
  */
327
- const SearchDialogItemRoot = ({ children, className, ...props }) => {
406
+ function SearchDialogItemRoot({ children, className, ...props }) {
328
407
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.ListBoxItem, {
329
408
  ...props,
330
409
  className: require_icons_dev.cn("group flex items-center outline-none cursor-pointer", className),
@@ -336,25 +415,25 @@ const SearchDialogItemRoot = ({ children, className, ...props }) => {
336
415
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.CornerDownLeft, { size: 10 })]
337
416
  })] })
338
417
  });
339
- };
340
- const SearchDialogItemIcon = ({ isHeading, className }) => {
418
+ }
419
+ function SearchDialogItemIcon({ isHeading, className }) {
341
420
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
342
421
  className: require_icons_dev.cn("shrink-0", className),
343
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 })
344
423
  });
345
- };
346
- const SearchDialogItemTitle = ({ children, className }) => {
424
+ }
425
+ function SearchDialogItemTitle({ children, className }) {
347
426
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
348
427
  className: require_icons_dev.cn("block truncate flex-1", className),
349
428
  children
350
429
  });
351
- };
352
- const SearchDialogItemBio = ({ children, className }) => {
430
+ }
431
+ function SearchDialogItemBio({ children, className }) {
353
432
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
354
433
  className: require_icons_dev.cn("ml-2 truncate hidden sm:inline", className),
355
434
  children
356
435
  });
357
- };
436
+ }
358
437
  SearchDialog.Root = SearchDialog;
359
438
  SearchDialog.Overlay = SearchDialog;
360
439
  SearchDialog.Content = SearchDialogContent;
@@ -372,6 +451,24 @@ SearchDialog.Item = Object.assign(SearchDialogItemRoot, {
372
451
  });
373
452
 
374
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
+ });
375
472
  Object.defineProperty(exports, 'Navbar', {
376
473
  enumerable: true,
377
474
  get: function () {
@@ -3,22 +3,56 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- const require_icons_dev = require('./icons-dev-3cZMyt8r.cjs');
7
- const require_search_dialog = require('./search-dialog-C7xuvyNk.cjs');
8
- let react_router_dom = require("react-router-dom");
6
+ const require_icons_dev = require('./icons-dev-DvJ-hh9x.cjs');
7
+ const require_search_dialog = require('./search-dialog-BXVoecTx.cjs');
9
8
  let react = require("react");
9
+ let react_router_dom = require("react-router-dom");
10
10
  let react_jsx_runtime = require("react/jsx-runtime");
11
11
  let flexsearch = require("flexsearch");
12
12
  let virtual_boltdocs_search = require("virtual:boltdocs-search");
13
13
  virtual_boltdocs_search = require_icons_dev.__toESM(virtual_boltdocs_search);
14
14
 
15
+ //#region src/client/components/internal/error-boundary.tsx
16
+ function InternalFallback({ error, resetErrorBoundary }) {
17
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
18
+ className: "p-2 font-mono flex flex-col items-center justify-between min-h-[30vh]",
19
+ children: [
20
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
21
+ className: "text-lg font-semibold text-red-500",
22
+ children: "Something went wrong"
23
+ }),
24
+ error?.message && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
25
+ className: "text-sm mt-2 max-w-md overflow-auto whitespace-pre-wrap break-word",
26
+ children: error.message
27
+ }),
28
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
29
+ type: "button",
30
+ onClick: resetErrorBoundary,
31
+ className: "px-2 py-3 mt-2 bg-slate-100 rounded border-slate-200 border font-mono font-semibold text-slate-700 hover:scale-105 transition-transform active:scale-95 cursor-pointer",
32
+ children: "Try again"
33
+ })
34
+ ]
35
+ });
36
+ }
37
+ function InternalErrorBoundary({ children, fallback }) {
38
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_search_dialog.ErrorBoundary, {
39
+ fallback,
40
+ FallbackComponent: !fallback ? InternalFallback : void 0,
41
+ children
42
+ });
43
+ }
44
+
45
+ //#endregion
15
46
  //#region src/client/hooks/use-search.ts
16
47
  function useSearch(routes) {
17
48
  const { currentLocale, currentVersion } = require_icons_dev.useRoutes();
49
+ const algoliaConfig = require_icons_dev.useConfig().integrations?.algolia;
18
50
  const [isOpen, setIsOpen] = (0, react.useState)(false);
19
51
  const [query, setQuery] = (0, react.useState)("");
20
52
  const [index, setIndex] = (0, react.useState)(null);
53
+ const [algoliaResults, setAlgoliaResults] = (0, react.useState)([]);
21
54
  (0, react.useEffect)(() => {
55
+ if (algoliaConfig) return;
22
56
  if (!isOpen || index) return;
23
57
  const newIndex = new flexsearch.Index({
24
58
  preset: "match",
@@ -28,7 +62,75 @@ function useSearch(routes) {
28
62
  });
29
63
  for (const doc of virtual_boltdocs_search.default) newIndex.add(doc.id, `${doc.title} ${doc.content}`);
30
64
  setIndex(newIndex);
31
- }, [isOpen, index]);
65
+ }, [
66
+ isOpen,
67
+ index,
68
+ algoliaConfig
69
+ ]);
70
+ (0, react.useEffect)(() => {
71
+ if (!algoliaConfig) return;
72
+ if (!query) {
73
+ setAlgoliaResults([]);
74
+ return;
75
+ }
76
+ const delayDebounceFn = setTimeout(async () => {
77
+ try {
78
+ const url = `https://${algoliaConfig.appId}-dsn.algolia.net/1/indexes/${algoliaConfig.indexName}/query`;
79
+ const facetFilters = [];
80
+ if (currentLocale) facetFilters.push(`lang:${currentLocale}`);
81
+ if (currentVersion) facetFilters.push(`version:${currentVersion}`);
82
+ let params = `query=${encodeURIComponent(query)}&hitsPerPage=20`;
83
+ if (facetFilters.length > 0) params += `&facetFilters=${encodeURIComponent(JSON.stringify(facetFilters))}`;
84
+ const response = await fetch(url, {
85
+ method: "POST",
86
+ headers: {
87
+ "Content-Type": "application/json",
88
+ "X-Algolia-API-Key": algoliaConfig.apiKey,
89
+ "X-Algolia-Application-Id": algoliaConfig.appId
90
+ },
91
+ body: JSON.stringify({ params })
92
+ });
93
+ if (!response.ok) throw new Error(`Algolia search request failed: ${response.statusText}`);
94
+ setAlgoliaResults(((await response.json()).hits || []).map((hit) => {
95
+ let path = hit.url || "";
96
+ try {
97
+ if (path.startsWith("http://") || path.startsWith("https://")) {
98
+ const urlObj = new URL(path);
99
+ path = urlObj.pathname + urlObj.search + urlObj.hash;
100
+ }
101
+ } catch (e) {}
102
+ const hierarchy = hit.hierarchy || {};
103
+ const levels = [
104
+ hierarchy.lvl0,
105
+ hierarchy.lvl1,
106
+ hierarchy.lvl2,
107
+ hierarchy.lvl3,
108
+ hierarchy.lvl4,
109
+ hierarchy.lvl5,
110
+ hierarchy.lvl6
111
+ ].filter(Boolean);
112
+ const title = levels[levels.length - 1] || "Documentation";
113
+ const bio = levels.join(" > ");
114
+ return {
115
+ id: hit.objectID || path,
116
+ title,
117
+ path,
118
+ bio,
119
+ groupTitle: hierarchy.lvl0 || "Docs",
120
+ isHeading: !!hit.anchor || path.includes("#")
121
+ };
122
+ }));
123
+ } catch (err) {
124
+ console.error("Error fetching search results from Algolia:", err);
125
+ }
126
+ }, 250);
127
+ return () => clearTimeout(delayDebounceFn);
128
+ }, [
129
+ query,
130
+ algoliaConfig,
131
+ currentLocale,
132
+ currentVersion
133
+ ]);
32
134
  const searchDataMap = (0, react.useMemo)(() => {
33
135
  const map = /* @__PURE__ */ new Map();
34
136
  for (const doc of virtual_boltdocs_search.default) map.set(doc.id, doc);
@@ -51,6 +153,7 @@ function useSearch(routes) {
51
153
  bio: r.description || "",
52
154
  groupTitle: r.groupTitle
53
155
  }));
156
+ if (algoliaConfig) return algoliaResults;
54
157
  if (!index) return [];
55
158
  const searchResults = index.search(query, {
56
159
  limit: 20,
@@ -82,7 +185,9 @@ function useSearch(routes) {
82
185
  currentLocale,
83
186
  currentVersion,
84
187
  routes,
85
- searchDataMap
188
+ searchDataMap,
189
+ algoliaConfig,
190
+ algoliaResults
86
191
  ]),
87
192
  input: {
88
193
  value: query,
@@ -146,7 +251,7 @@ function SearchDialog({ routes }) {
146
251
  className: "rounded-xl text-muted transition-all duration-200 hover:text-body active:scale-95 focus-visible:ring-2 focus-visible:ring-primary-500/30",
147
252
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Search, { size: 20 })
148
253
  }),
149
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_search_dialog.SearchDialog.Overlay, {
254
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InternalErrorBoundary, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_search_dialog.SearchDialog.Overlay, {
150
255
  isOpen,
151
256
  isDismissable: true,
152
257
  onOpenChange: () => setIsOpen(false),
@@ -201,11 +306,17 @@ function SearchDialog({ routes }) {
201
306
  })
202
307
  })
203
308
  })
204
- })
309
+ }) })
205
310
  ] });
206
311
  }
207
312
 
208
313
  //#endregion
314
+ Object.defineProperty(exports, 'InternalErrorBoundary', {
315
+ enumerable: true,
316
+ get: function () {
317
+ return InternalErrorBoundary;
318
+ }
319
+ });
209
320
  Object.defineProperty(exports, 'SearchDialog', {
210
321
  enumerable: true,
211
322
  get: function () {