boltdocs 2.7.11 → 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.
- package/README.md +2 -2
- package/dist/banner-3N4Jd_L9.d.ts +100 -0
- package/dist/banner-MynZD_Ox.d.cts +100 -0
- package/dist/cache-BMUyNiiA.mjs +6 -0
- package/dist/cache-CKm45d2w.cjs +6 -0
- package/dist/client/index.cjs +782 -443
- package/dist/client/index.d.cts +86 -110
- package/dist/client/index.d.ts +87 -111
- package/dist/client/index.js +773 -439
- package/dist/client/mdx.cjs +8 -3
- package/dist/client/mdx.d.cts +39 -93
- package/dist/client/mdx.d.ts +38 -93
- package/dist/client/mdx.js +3 -3
- package/dist/client/primitives.cjs +7 -7
- package/dist/client/primitives.d.cts +411 -347
- package/dist/client/primitives.d.ts +411 -347
- package/dist/client/primitives.js +4 -4
- package/dist/{docs-layout-BXHV0xw_.cjs → docs-layout-CwCq42Zt.cjs} +95 -178
- package/dist/{docs-layout-DwFndmj5.js → docs-layout-Dn6S5g59.js} +99 -163
- package/dist/doctor-BArviV8X.cjs +28 -0
- package/dist/doctor-CgLA7_Uv.mjs +28 -0
- package/dist/{doctor-CrytFkqW.cjs → doctor-DyNUVe96.cjs} +1 -1
- package/dist/{routes-DP1vmWRj.cjs → doctor-aN_leTbh.mjs} +1 -1
- package/dist/{generator-ClVanhvi.mjs → generator-BHCrLU6h.mjs} +2 -2
- package/dist/{generator-CHqxiQhF.cjs → generator-CC2yHzhZ.cjs} +2 -2
- package/dist/{icons-dev-3cZMyt8r.cjs → icons-dev-DvJ-hh9x.cjs} +116 -111
- package/dist/{icons-dev-Df8OQ481.js → icons-dev-Oju24Wjp.js} +120 -114
- package/dist/{image-DtrI2cw3.cjs → image-Ch4-GxdO.cjs} +13 -13
- package/dist/{image-jxPb-2iV.js → image-Do8V9PCW.js} +13 -13
- package/dist/{mdx-UTTLFWJq.js → mdx-D3A2_l7P.js} +106 -80
- package/dist/{mdx-BdWkJTeB.cjs → mdx-PLhhPJRS.cjs} +104 -96
- package/dist/node/cli-entry.cjs +3 -1
- package/dist/node/cli-entry.mjs +3 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +258 -152
- package/dist/node/index.d.mts +258 -150
- package/dist/node/index.mjs +1 -1
- package/dist/node/routes/worker.cjs +1 -1
- package/dist/node/routes/worker.mjs +1 -1
- package/dist/node-BmlP0eBP.cjs +159 -0
- package/dist/node-Y8_4ayje.mjs +159 -0
- package/dist/package-2nFy_NsW.cjs +6 -0
- package/dist/{package-K0zsjGIz.mjs → package-DAbtltXX.mjs} +1 -1
- package/dist/parser-B7-6PyQz.cjs +6 -0
- package/dist/{parser-Aq8LoH-0.cjs → parser-BzB-zCkF.cjs} +1 -1
- package/dist/parser-WGZdWs0X.mjs +6 -0
- package/dist/routes-BDDSxAl0.mjs +6 -0
- package/dist/routes-DJNJ-rTt.cjs +6 -0
- package/dist/routes-DiYC4nD2.cjs +6 -0
- package/dist/routes-_Bb2f4eI.mjs +6 -0
- package/dist/{search-dialog-C7xuvyNk.cjs → search-dialog-BXVoecTx.cjs} +175 -78
- package/dist/{search-dialog-BwkDuI9R.cjs → search-dialog-BYhOov4S.cjs} +118 -7
- package/dist/{search-dialog-D-DDN7zJ.js → search-dialog-C09riYmx.js} +113 -8
- package/dist/{search-dialog-CIQg6k8c.cjs → search-dialog-CUeAfy-8.cjs} +1 -1
- package/dist/{search-dialog-BNF10tDl.js → search-dialog-D8gLkhUV.js} +158 -80
- package/dist/{search-dialog-BHuIiUC6.js → search-dialog-DHc_8FFX.js} +1 -1
- package/dist/{sidebar-CyZS9YOm.d.ts → sidebar-DNq4_ZAa.d.ts} +117 -51
- package/dist/{sidebar-CcBkrm06.d.cts → sidebar-Dlkgbxs6.d.cts} +117 -51
- package/dist/utils-BYITg7T5.mjs +7 -0
- package/dist/utils-Cjmx1hhk.cjs +7 -0
- package/dist/worker-pool-CtqklOXq.cjs +6 -0
- package/dist/worker-pool-k0DY6k8T.mjs +6 -0
- package/package.json +3 -3
- package/src/shared/config-utils.ts +4 -0
- package/src/shared/types.ts +52 -6
- package/dist/cache-Ba-DZQNH.cjs +0 -6
- package/dist/cache-BuMZ58L5.mjs +0 -6
- package/dist/cards-BakZPTz9.d.ts +0 -30
- package/dist/cards-CQn9mXZS.d.cts +0 -30
- package/dist/doctor-Be7Ly1oM.mjs +0 -21
- package/dist/doctor-jMxWZyLJ.cjs +0 -21
- package/dist/node-BSM4qcDK.cjs +0 -111
- package/dist/node-BspZN3R2.mjs +0 -111
- package/dist/package-DIIrjuWI.cjs +0 -6
- package/dist/parser-CdNbqN5y.cjs +0 -6
- package/dist/parser-nE792MLO.mjs +0 -6
- package/dist/rolldown-runtime-fkIsjY3S.mjs +0 -6
- package/dist/routes-2k3tbUmC.cjs +0 -6
- package/dist/routes-CpxZIsMM.mjs +0 -6
- package/dist/utils-CG65J0Sc.mjs +0 -7
- package/dist/utils-CKunkU96.cjs +0 -7
- package/dist/worker-pool-CGn7DrLb.mjs +0 -6
- package/dist/worker-pool-Crbqgw5R.cjs +0 -6
- /package/dist/{meta-loader-CWg2gnbY.mjs → meta-loader-DzwDFtdT.mjs} +0 -0
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Copyright (c) 2026 Jesus Alcala
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
+
import { createContext, use, useEffect, useMemo, useState } from "react";
|
|
6
7
|
import { useLocation, useNavigate } from "react-router-dom";
|
|
7
|
-
import React, { createContext, use, useEffect, useMemo, useState } from "react";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { clsx } from "clsx";
|
|
10
10
|
import { twMerge } from "tailwind-merge";
|
|
@@ -25,44 +25,6 @@ var __exportAll = (all, no_symbols) => {
|
|
|
25
25
|
return target;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
//#endregion
|
|
29
|
-
//#region src/client/app/config-context.tsx
|
|
30
|
-
/**
|
|
31
|
-
* Context for the global documentation configuration.
|
|
32
|
-
* Using a global singleton pattern to survive dual-package or duplicated-code hazards.
|
|
33
|
-
*/
|
|
34
|
-
const CONFIG_CONTEXT_SYMBOL = Symbol.for("__BDOCS_CONFIG_CONTEXT__");
|
|
35
|
-
const CONFIG_INSTANCE_SYMBOL = Symbol.for("__BDOCS_CONFIG_INSTANCE__");
|
|
36
|
-
const ConfigContext = globalThis[CONFIG_CONTEXT_SYMBOL] || (globalThis[CONFIG_CONTEXT_SYMBOL] = createContext(null));
|
|
37
|
-
/**
|
|
38
|
-
* Hook to access the Boltdocs configuration.
|
|
39
|
-
*/
|
|
40
|
-
function useConfig() {
|
|
41
|
-
const context = use(ConfigContext);
|
|
42
|
-
if (!context && typeof globalThis !== "undefined" && globalThis[CONFIG_INSTANCE_SYMBOL]) return globalThis[CONFIG_INSTANCE_SYMBOL];
|
|
43
|
-
if (!context) throw new Error("useConfig must be used within a ConfigProvider");
|
|
44
|
-
return context;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/client/app/routes-context.tsx
|
|
49
|
-
const RoutesContext = createContext({ routes: [] });
|
|
50
|
-
/**
|
|
51
|
-
* Hook to access the processed routes list from the closest provider.
|
|
52
|
-
*/
|
|
53
|
-
function useRoutesContext() {
|
|
54
|
-
return use(RoutesContext);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Provider component for the documentation routes.
|
|
58
|
-
*/
|
|
59
|
-
function RoutesProvider({ routes, children }) {
|
|
60
|
-
return /* @__PURE__ */ jsx(RoutesContext.Provider, {
|
|
61
|
-
value: { routes },
|
|
62
|
-
children
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
|
|
66
28
|
//#endregion
|
|
67
29
|
//#region src/client/store/boltdocs-context.tsx
|
|
68
30
|
const PREFERENCES_KEY = "boltdocs-user-preferences";
|
|
@@ -143,75 +105,22 @@ function useBoltdocsContext() {
|
|
|
143
105
|
}
|
|
144
106
|
|
|
145
107
|
//#endregion
|
|
146
|
-
//#region src/client/
|
|
108
|
+
//#region src/client/app/config-context.tsx
|
|
147
109
|
/**
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* @param p - The path to normalize.
|
|
151
|
-
* @returns The normalized path.
|
|
110
|
+
* Context for the global documentation configuration.
|
|
111
|
+
* Using a global singleton pattern to survive dual-package or duplicated-code hazards.
|
|
152
112
|
*/
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
//#endregion
|
|
158
|
-
//#region src/client/hooks/use-routes.ts
|
|
113
|
+
const CONFIG_CONTEXT_SYMBOL = Symbol.for("__BDOCS_CONFIG_CONTEXT__");
|
|
114
|
+
const CONFIG_INSTANCE_SYMBOL = Symbol.for("__BDOCS_CONFIG_INSTANCE__");
|
|
115
|
+
const ConfigContext = globalThis[CONFIG_CONTEXT_SYMBOL] || (globalThis[CONFIG_CONTEXT_SYMBOL] = createContext(null));
|
|
159
116
|
/**
|
|
160
|
-
* Hook to access the
|
|
161
|
-
* Returns both the complete set of routes and a filtered list based on the current
|
|
162
|
-
* version and locale.
|
|
117
|
+
* Hook to access the Boltdocs configuration.
|
|
163
118
|
*/
|
|
164
|
-
function
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
const currentPath = normalizePath(location.pathname);
|
|
170
|
-
const currentRoute = allRoutes?.find?.((r) => normalizePath(r.path) === currentPath);
|
|
171
|
-
const currentLocale = config.i18n ? currentLocaleStore || config.i18n.defaultLocale : void 0;
|
|
172
|
-
const currentVersion = config.versions ? currentVersionStore || config.versions.defaultVersion : void 0;
|
|
173
|
-
return {
|
|
174
|
-
routes: useMemo(() => {
|
|
175
|
-
if (!allRoutes) return [];
|
|
176
|
-
const alternateCounts = /* @__PURE__ */ new Map();
|
|
177
|
-
const defaultLocale = config.i18n?.defaultLocale || "";
|
|
178
|
-
const defaultVersion = config.versions?.defaultVersion || "";
|
|
179
|
-
for (const r of allRoutes) {
|
|
180
|
-
const locale = r.locale || defaultLocale;
|
|
181
|
-
const version = r.version || defaultVersion;
|
|
182
|
-
const key = `${r.filePath}::${locale}::${version}`;
|
|
183
|
-
alternateCounts.set(key, (alternateCounts.get(key) || 0) + 1);
|
|
184
|
-
}
|
|
185
|
-
return allRoutes.filter((r) => {
|
|
186
|
-
const localeMatch = config.i18n ? (r.locale || config.i18n.defaultLocale) === currentLocale : true;
|
|
187
|
-
const versionMatch = config.versions ? (r.version || config.versions.defaultVersion) === currentVersion : true;
|
|
188
|
-
if (!(localeMatch && versionMatch)) return false;
|
|
189
|
-
const isCurrentLocalePrefixed = !!currentRoute?.locale;
|
|
190
|
-
const isCurrentVersionPrefixed = !!currentRoute?.version;
|
|
191
|
-
const isRouteLocalePrefixed = !!r.locale;
|
|
192
|
-
const isRouteVersionPrefixed = !!r.version;
|
|
193
|
-
const locale = r.locale || defaultLocale;
|
|
194
|
-
const version = r.version || defaultVersion;
|
|
195
|
-
const key = `${r.filePath}::${locale}::${version}`;
|
|
196
|
-
if ((alternateCounts.get(key) || 0) > 1) {
|
|
197
|
-
const localeMismatch = config.i18n && isCurrentLocalePrefixed !== isRouteLocalePrefixed;
|
|
198
|
-
const versionMismatch = config.versions && isCurrentVersionPrefixed !== isRouteVersionPrefixed;
|
|
199
|
-
if (localeMismatch || versionMismatch) return false;
|
|
200
|
-
}
|
|
201
|
-
return true;
|
|
202
|
-
});
|
|
203
|
-
}, [
|
|
204
|
-
allRoutes,
|
|
205
|
-
config,
|
|
206
|
-
currentLocale,
|
|
207
|
-
currentVersion,
|
|
208
|
-
currentRoute
|
|
209
|
-
]),
|
|
210
|
-
allRoutes,
|
|
211
|
-
currentRoute,
|
|
212
|
-
currentLocale,
|
|
213
|
-
currentVersion
|
|
214
|
-
};
|
|
119
|
+
function useConfig() {
|
|
120
|
+
const context = use(ConfigContext);
|
|
121
|
+
if (!context && typeof globalThis !== "undefined" && globalThis[CONFIG_INSTANCE_SYMBOL]) return globalThis[CONFIG_INSTANCE_SYMBOL];
|
|
122
|
+
if (!context) throw new Error("useConfig must be used within a ConfigProvider");
|
|
123
|
+
return context;
|
|
215
124
|
}
|
|
216
125
|
|
|
217
126
|
//#endregion
|
|
@@ -235,7 +144,7 @@ var icons_exports = /* @__PURE__ */ __exportAll({
|
|
|
235
144
|
Info: () => Info,
|
|
236
145
|
Languages: () => Languages,
|
|
237
146
|
Lightbulb: () => Lightbulb,
|
|
238
|
-
Link: () => Link$
|
|
147
|
+
Link: () => Link$2,
|
|
239
148
|
Menu: () => Menu,
|
|
240
149
|
Monitor: () => Monitor,
|
|
241
150
|
Moon: () => Moon,
|
|
@@ -248,7 +157,7 @@ var icons_exports = /* @__PURE__ */ __exportAll({
|
|
|
248
157
|
});
|
|
249
158
|
function createIcon(displayName, paths, viewBox = "0 0 24 24") {
|
|
250
159
|
const Component = ({ size = 24, className, ...props }) => {
|
|
251
|
-
return /* @__PURE__ */
|
|
160
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
252
161
|
xmlns: "http://www.w3.org/2000/svg",
|
|
253
162
|
width: size,
|
|
254
163
|
height: size,
|
|
@@ -260,7 +169,7 @@ function createIcon(displayName, paths, viewBox = "0 0 24 24") {
|
|
|
260
169
|
strokeLinejoin: "round",
|
|
261
170
|
className,
|
|
262
171
|
...props,
|
|
263
|
-
children: paths
|
|
172
|
+
children: [/* @__PURE__ */ jsx("title", { children: displayName }), paths]
|
|
264
173
|
});
|
|
265
174
|
};
|
|
266
175
|
Component.displayName = displayName;
|
|
@@ -438,7 +347,7 @@ const Menu = createIcon("Menu", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
|
438
347
|
})
|
|
439
348
|
] }));
|
|
440
349
|
const X = createIcon("X", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }), /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })] }));
|
|
441
|
-
const Link$
|
|
350
|
+
const Link$2 = createIcon("Link", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }), /* @__PURE__ */ jsx("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" })] }));
|
|
442
351
|
const ChevronRight = createIcon("ChevronRight", /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" }));
|
|
443
352
|
const MoreVertical = createIcon("MoreVertical", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
444
353
|
/* @__PURE__ */ jsx("circle", {
|
|
@@ -493,6 +402,103 @@ const FileText = createIcon("FileText", /* @__PURE__ */ jsxs(Fragment, { childre
|
|
|
493
402
|
] }));
|
|
494
403
|
const CornerDownLeft = createIcon("CornerDownLeft", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("polyline", { points: "9 10 4 15 9 20" }), /* @__PURE__ */ jsx("path", { d: "M20 4v7a4 4 0 0 1-4 4H4" })] }));
|
|
495
404
|
|
|
405
|
+
//#endregion
|
|
406
|
+
//#region src/client/app/routes-context.tsx
|
|
407
|
+
const RoutesContext = createContext({ routes: [] });
|
|
408
|
+
/**
|
|
409
|
+
* Hook to access the processed routes list from the closest provider.
|
|
410
|
+
*/
|
|
411
|
+
function useRoutesContext() {
|
|
412
|
+
return use(RoutesContext);
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Provider component for the documentation routes.
|
|
416
|
+
*/
|
|
417
|
+
function RoutesProvider({ routes, children }) {
|
|
418
|
+
return /* @__PURE__ */ jsx(RoutesContext.Provider, {
|
|
419
|
+
value: { routes },
|
|
420
|
+
children
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
//#endregion
|
|
425
|
+
//#region src/client/utils/path.ts
|
|
426
|
+
/**
|
|
427
|
+
* Normalizes a URL path by stripping any trailing slash unless it's the root path.
|
|
428
|
+
*
|
|
429
|
+
* @param p - The path to normalize.
|
|
430
|
+
* @returns The normalized path.
|
|
431
|
+
*/
|
|
432
|
+
function normalizePath(p) {
|
|
433
|
+
return p.endsWith("/") && p.length > 1 ? p.slice(0, -1) : p;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
//#endregion
|
|
437
|
+
//#region src/client/hooks/use-routes.ts
|
|
438
|
+
/**
|
|
439
|
+
* Hook to access the framework's routing state.
|
|
440
|
+
* Returns both the complete set of routes and a filtered list based on the current
|
|
441
|
+
* version and locale.
|
|
442
|
+
*/
|
|
443
|
+
function useRoutes() {
|
|
444
|
+
const { routes: allRoutes } = useRoutesContext();
|
|
445
|
+
const config = useConfig();
|
|
446
|
+
const location = useLocation();
|
|
447
|
+
const { hasHydrated, currentLocale: currentLocaleStore, currentVersion: currentVersionStore } = useBoltdocsContext();
|
|
448
|
+
const currentPath = normalizePath(location.pathname);
|
|
449
|
+
const currentRoute = allRoutes?.find?.((r) => normalizePath(r.path) === currentPath);
|
|
450
|
+
const currentLocale = config.i18n ? currentLocaleStore || config.i18n.defaultLocale : void 0;
|
|
451
|
+
const currentVersion = config.versions ? currentVersionStore || config.versions.defaultVersion : void 0;
|
|
452
|
+
const routes = useMemo(() => {
|
|
453
|
+
if (!allRoutes) return [];
|
|
454
|
+
const alternateCounts = /* @__PURE__ */ new Map();
|
|
455
|
+
const defaultLocale = config.i18n?.defaultLocale || "";
|
|
456
|
+
const defaultVersion = config.versions?.defaultVersion || "";
|
|
457
|
+
for (const r of allRoutes) {
|
|
458
|
+
const locale = r.locale || defaultLocale;
|
|
459
|
+
const version = r.version || defaultVersion;
|
|
460
|
+
const key = `${r.filePath}::${locale}::${version}`;
|
|
461
|
+
alternateCounts.set(key, (alternateCounts.get(key) || 0) + 1);
|
|
462
|
+
}
|
|
463
|
+
return allRoutes.filter((r) => {
|
|
464
|
+
const localeMatch = config.i18n ? (r.locale || config.i18n.defaultLocale) === currentLocale : true;
|
|
465
|
+
const versionMatch = config.versions ? (r.version || config.versions.defaultVersion) === currentVersion : true;
|
|
466
|
+
if (!(localeMatch && versionMatch)) return false;
|
|
467
|
+
const isCurrentLocalePrefixed = !!currentRoute?.locale;
|
|
468
|
+
const isCurrentVersionPrefixed = !!currentRoute?.version;
|
|
469
|
+
const isRouteLocalePrefixed = !!r.locale;
|
|
470
|
+
const isRouteVersionPrefixed = !!r.version;
|
|
471
|
+
const locale = r.locale || defaultLocale;
|
|
472
|
+
const version = r.version || defaultVersion;
|
|
473
|
+
const key = `${r.filePath}::${locale}::${version}`;
|
|
474
|
+
if ((alternateCounts.get(key) || 0) > 1) {
|
|
475
|
+
const localeMismatch = config.i18n && isCurrentLocalePrefixed !== isRouteLocalePrefixed;
|
|
476
|
+
const versionMismatch = config.versions && isCurrentVersionPrefixed !== isRouteVersionPrefixed;
|
|
477
|
+
if (localeMismatch || versionMismatch) return false;
|
|
478
|
+
}
|
|
479
|
+
return true;
|
|
480
|
+
});
|
|
481
|
+
}, [
|
|
482
|
+
allRoutes,
|
|
483
|
+
config,
|
|
484
|
+
currentLocale,
|
|
485
|
+
currentVersion,
|
|
486
|
+
currentRoute
|
|
487
|
+
]);
|
|
488
|
+
const collections = useMemo(() => {
|
|
489
|
+
return new Set((allRoutes || []).map((r) => r.collection).filter(Boolean));
|
|
490
|
+
}, [allRoutes]);
|
|
491
|
+
const currentSegment = location.pathname.split("/").filter(Boolean)[0]?.toLowerCase();
|
|
492
|
+
return {
|
|
493
|
+
routes,
|
|
494
|
+
allRoutes,
|
|
495
|
+
currentRoute,
|
|
496
|
+
isCollectionPage: !!currentRoute?.collection || (currentSegment ? collections.has(currentSegment) : false),
|
|
497
|
+
currentLocale,
|
|
498
|
+
currentVersion
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
|
|
496
502
|
//#endregion
|
|
497
503
|
//#region src/client/hooks/use-localized-to.ts
|
|
498
504
|
function useLocalizedTo(to) {
|
|
@@ -543,7 +549,7 @@ function cn(...inputs) {
|
|
|
543
549
|
* A primitive Link component that wraps a standard anchor tag
|
|
544
550
|
* and adds framework-specific logic for path localization and preloading.
|
|
545
551
|
*/
|
|
546
|
-
|
|
552
|
+
function Link$1(props) {
|
|
547
553
|
const { href, onMouseEnter, onFocus, onClick, ...rest } = props;
|
|
548
554
|
const navigate = useNavigate();
|
|
549
555
|
const localizedHref = useLocalizedTo(href ?? "");
|
|
@@ -568,24 +574,24 @@ const Link = (props) => {
|
|
|
568
574
|
onMouseEnter: handleMouseEnter,
|
|
569
575
|
onFocus: handleFocus
|
|
570
576
|
});
|
|
571
|
-
}
|
|
577
|
+
}
|
|
572
578
|
/**
|
|
573
579
|
* A primitive NavLink component that provides active state detection.
|
|
574
580
|
*/
|
|
575
|
-
|
|
581
|
+
function NavLink(props) {
|
|
576
582
|
const { href, end = false, className, children, ...rest } = props;
|
|
577
583
|
const location = useLocation();
|
|
578
584
|
const localizedHref = useLocalizedTo(href ?? "");
|
|
579
585
|
const isActive = end ? location.pathname === localizedHref : location.pathname.startsWith(localizedHref);
|
|
580
586
|
const resolvedClassName = typeof className === "function" ? className({ isActive }) : cn(className, isActive && "active");
|
|
581
587
|
const resolvedChildren = typeof children === "function" ? children({ isActive }) : children;
|
|
582
|
-
return /* @__PURE__ */ jsx(Link, {
|
|
588
|
+
return /* @__PURE__ */ jsx(Link$1, {
|
|
583
589
|
...rest,
|
|
584
590
|
href,
|
|
585
591
|
className: resolvedClassName,
|
|
586
592
|
children: resolvedChildren
|
|
587
593
|
});
|
|
588
|
-
}
|
|
594
|
+
}
|
|
589
595
|
|
|
590
596
|
//#endregion
|
|
591
597
|
//#region src/client/components/icons-dev.tsx
|
|
@@ -836,4 +842,4 @@ const BracketsRed = (props) => /* @__PURE__ */ jsxs("svg", {
|
|
|
836
842
|
});
|
|
837
843
|
|
|
838
844
|
//#endregion
|
|
839
|
-
export {
|
|
845
|
+
export { ConfigContext as $, ChevronRight as A, Languages as B, RoutesProvider as C, Check as D, ArrowLeft as E, File as F, Moon as G, Link$2 as H, FileText as I, Search as J, MoreVertical as K, Hash as L, Copy as M, CornerDownLeft as N, ChevronDown as O, ExternalLink as P, icons_exports as Q, Home as R, normalizePath as S, AlertTriangle as T, Menu as U, Lightbulb as V, Monitor as W, TextAlignStart as X, Sun as Y, X as Z, Link$1 as _, Csv as a, useLocalizedTo as b, JavaScript as c, React$1 as d, useConfig as et, Rust as f, Yaml as g, XSocial as h, Css as i, CircleHelp as j, ChevronLeft as k, Json as l, TypeScript as m, BracketsOrange as n, useBoltdocsContext as nt, Discord as o, Shell as p, Pencil as q, BracketsRed as r, Github as s, Bluesky as t, BoltdocsProvider as tt, Markdown as u, NavLink as v, AlertCircle as w, useRoutes as x, cn as y, Info as z };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2026 Jesus Alcala
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
const require_icons_dev = require('./icons-dev-
|
|
6
|
+
const require_icons_dev = require('./icons-dev-DvJ-hh9x.cjs');
|
|
7
7
|
let react = require("react");
|
|
8
8
|
react = require_icons_dev.__toESM(react);
|
|
9
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -120,45 +120,45 @@ Heading.displayName = "Heading";
|
|
|
120
120
|
* Root component for code blocks.
|
|
121
121
|
* Handles background, borders, and general layout.
|
|
122
122
|
*/
|
|
123
|
-
|
|
123
|
+
function CodeBlock({ children, className, plain = false, ...props }) {
|
|
124
124
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
125
125
|
className: require_icons_dev.cn("not-prose boltdocs-code-block", "group relative overflow-hidden bg-(--color-code-bg)", "contain-layout contain-paint", { "my-6 rounded-xl border border-subtle": !plain }, className),
|
|
126
126
|
...props,
|
|
127
127
|
children
|
|
128
128
|
});
|
|
129
|
-
}
|
|
129
|
+
}
|
|
130
130
|
/**
|
|
131
131
|
* Header section of the code block.
|
|
132
132
|
* Usually contains the title, language label, and action buttons.
|
|
133
133
|
*/
|
|
134
|
-
|
|
134
|
+
function CodeBlockHeader({ children, className, ...props }) {
|
|
135
135
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
136
136
|
className: require_icons_dev.cn("flex h-9 items-center justify-between px-4 py-1.5", "text-[13px] font-medium text-muted", className),
|
|
137
137
|
...props,
|
|
138
138
|
children
|
|
139
139
|
});
|
|
140
|
-
}
|
|
140
|
+
}
|
|
141
141
|
/**
|
|
142
142
|
* Horizontal group for organizing items within the header (e.g., logo + label).
|
|
143
143
|
*/
|
|
144
|
-
|
|
144
|
+
function CodeBlockGroup({ children, className, ...props }) {
|
|
145
145
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
146
146
|
className: require_icons_dev.cn("flex items-center space-x-2", className),
|
|
147
147
|
...props,
|
|
148
148
|
children
|
|
149
149
|
});
|
|
150
|
-
}
|
|
150
|
+
}
|
|
151
151
|
/**
|
|
152
152
|
* Content area of the code block.
|
|
153
153
|
* Wraps the `<pre>` or `<div>` containing the code.
|
|
154
154
|
*/
|
|
155
|
-
|
|
155
|
+
function CodeBlockContent({ className, children, shouldTruncate = false, ...props }) {
|
|
156
156
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
157
157
|
className: require_icons_dev.cn("relative", { "[&>pre]:max-h-[300px] [&>pre]:overflow-hidden [&>div>pre]:max-h-[300px] [&>div>pre]:overflow-hidden": shouldTruncate }, className),
|
|
158
158
|
...props,
|
|
159
159
|
children
|
|
160
160
|
});
|
|
161
|
-
}
|
|
161
|
+
}
|
|
162
162
|
CodeBlock.Header = CodeBlockHeader;
|
|
163
163
|
CodeBlock.Group = CodeBlockGroup;
|
|
164
164
|
CodeBlock.Content = CodeBlockContent;
|
|
@@ -169,7 +169,7 @@ CodeBlock.Content = CodeBlockContent;
|
|
|
169
169
|
* Modern, accessible Tooltip component built with React Aria Components.
|
|
170
170
|
* Featuring glassmorphism, animations, and smart positioning.
|
|
171
171
|
*/
|
|
172
|
-
|
|
172
|
+
function TooltipContent({ className, children, ...props }) {
|
|
173
173
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Tooltip, {
|
|
174
174
|
...props,
|
|
175
175
|
offset: 8,
|
|
@@ -182,8 +182,8 @@ const TooltipContent = ({ className, children, ...props }) => {
|
|
|
182
182
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("title", { children: "Arrow" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M0 0 L4 4 L8 0" })]
|
|
183
183
|
}) }), typeof children === "function" ? children(values) : children] })
|
|
184
184
|
});
|
|
185
|
-
}
|
|
186
|
-
|
|
185
|
+
}
|
|
186
|
+
function Tooltip({ content, children, delay = 500, closeDelay = 0, ...props }) {
|
|
187
187
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_aria_components.TooltipTrigger, {
|
|
188
188
|
delay,
|
|
189
189
|
closeDelay,
|
|
@@ -192,7 +192,7 @@ const Tooltip = ({ content, children, delay = 500, closeDelay = 0, ...props }) =
|
|
|
192
192
|
children: content
|
|
193
193
|
})]
|
|
194
194
|
});
|
|
195
|
-
}
|
|
195
|
+
}
|
|
196
196
|
Tooltip.Root = Tooltip;
|
|
197
197
|
Tooltip.Content = TooltipContent;
|
|
198
198
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2026 Jesus Alcala
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { _ as Link$1, y as cn
|
|
6
|
+
import { H as Link, _ as Link$1, y as cn } from "./icons-dev-Oju24Wjp.js";
|
|
7
7
|
import * as React$1 from "react";
|
|
8
8
|
import { createContext, use, useEffect, useState } from "react";
|
|
9
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -119,45 +119,45 @@ Heading.displayName = "Heading";
|
|
|
119
119
|
* Root component for code blocks.
|
|
120
120
|
* Handles background, borders, and general layout.
|
|
121
121
|
*/
|
|
122
|
-
|
|
122
|
+
function CodeBlock({ children, className, plain = false, ...props }) {
|
|
123
123
|
return /* @__PURE__ */ jsx("div", {
|
|
124
124
|
className: cn("not-prose boltdocs-code-block", "group relative overflow-hidden bg-(--color-code-bg)", "contain-layout contain-paint", { "my-6 rounded-xl border border-subtle": !plain }, className),
|
|
125
125
|
...props,
|
|
126
126
|
children
|
|
127
127
|
});
|
|
128
|
-
}
|
|
128
|
+
}
|
|
129
129
|
/**
|
|
130
130
|
* Header section of the code block.
|
|
131
131
|
* Usually contains the title, language label, and action buttons.
|
|
132
132
|
*/
|
|
133
|
-
|
|
133
|
+
function CodeBlockHeader({ children, className, ...props }) {
|
|
134
134
|
return /* @__PURE__ */ jsx("div", {
|
|
135
135
|
className: cn("flex h-9 items-center justify-between px-4 py-1.5", "text-[13px] font-medium text-muted", className),
|
|
136
136
|
...props,
|
|
137
137
|
children
|
|
138
138
|
});
|
|
139
|
-
}
|
|
139
|
+
}
|
|
140
140
|
/**
|
|
141
141
|
* Horizontal group for organizing items within the header (e.g., logo + label).
|
|
142
142
|
*/
|
|
143
|
-
|
|
143
|
+
function CodeBlockGroup({ children, className, ...props }) {
|
|
144
144
|
return /* @__PURE__ */ jsx("div", {
|
|
145
145
|
className: cn("flex items-center space-x-2", className),
|
|
146
146
|
...props,
|
|
147
147
|
children
|
|
148
148
|
});
|
|
149
|
-
}
|
|
149
|
+
}
|
|
150
150
|
/**
|
|
151
151
|
* Content area of the code block.
|
|
152
152
|
* Wraps the `<pre>` or `<div>` containing the code.
|
|
153
153
|
*/
|
|
154
|
-
|
|
154
|
+
function CodeBlockContent({ className, children, shouldTruncate = false, ...props }) {
|
|
155
155
|
return /* @__PURE__ */ jsx("div", {
|
|
156
156
|
className: cn("relative", { "[&>pre]:max-h-[300px] [&>pre]:overflow-hidden [&>div>pre]:max-h-[300px] [&>div>pre]:overflow-hidden": shouldTruncate }, className),
|
|
157
157
|
...props,
|
|
158
158
|
children
|
|
159
159
|
});
|
|
160
|
-
}
|
|
160
|
+
}
|
|
161
161
|
CodeBlock.Header = CodeBlockHeader;
|
|
162
162
|
CodeBlock.Group = CodeBlockGroup;
|
|
163
163
|
CodeBlock.Content = CodeBlockContent;
|
|
@@ -168,7 +168,7 @@ CodeBlock.Content = CodeBlockContent;
|
|
|
168
168
|
* Modern, accessible Tooltip component built with React Aria Components.
|
|
169
169
|
* Featuring glassmorphism, animations, and smart positioning.
|
|
170
170
|
*/
|
|
171
|
-
|
|
171
|
+
function TooltipContent({ className, children, ...props }) {
|
|
172
172
|
return /* @__PURE__ */ jsx(RAC.Tooltip, {
|
|
173
173
|
...props,
|
|
174
174
|
offset: 8,
|
|
@@ -181,8 +181,8 @@ const TooltipContent = ({ className, children, ...props }) => {
|
|
|
181
181
|
children: [/* @__PURE__ */ jsx("title", { children: "Arrow" }), /* @__PURE__ */ jsx("path", { d: "M0 0 L4 4 L8 0" })]
|
|
182
182
|
}) }), typeof children === "function" ? children(values) : children] })
|
|
183
183
|
});
|
|
184
|
-
}
|
|
185
|
-
|
|
184
|
+
}
|
|
185
|
+
function Tooltip({ content, children, delay = 500, closeDelay = 0, ...props }) {
|
|
186
186
|
return /* @__PURE__ */ jsxs(RAC.TooltipTrigger, {
|
|
187
187
|
delay,
|
|
188
188
|
closeDelay,
|
|
@@ -191,7 +191,7 @@ const Tooltip = ({ content, children, delay = 500, closeDelay = 0, ...props }) =
|
|
|
191
191
|
children: content
|
|
192
192
|
})]
|
|
193
193
|
});
|
|
194
|
-
}
|
|
194
|
+
}
|
|
195
195
|
Tooltip.Root = Tooltip;
|
|
196
196
|
Tooltip.Content = TooltipContent;
|
|
197
197
|
|