boltdocs 2.9.3 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/boltdocs.js +2 -1
- package/dist/{adapters-uGz-UKQa.cjs → adapters-C5AWWGfb.cjs} +1 -1
- package/dist/{adapters-HVuXENAe.mjs → adapters-DEXNIv3x.mjs} +1 -1
- package/dist/{banner-D2NddBfF.d.ts → banner-CfdalYLL.d.ts} +1 -1
- package/dist/{banner-C_xkGxzI.d.cts → banner-DNSkgUsO.d.cts} +1 -1
- package/dist/{cache-B19MLTpN.cjs → cache-DETwlACe.cjs} +1 -1
- package/dist/{cache-CfhOTR3Q.mjs → cache-SF59enb3.mjs} +1 -1
- package/dist/client/index.cjs +126 -24
- package/dist/client/index.d.cts +4 -3
- package/dist/client/index.d.ts +4 -3
- package/dist/client/index.js +125 -24
- package/dist/client/mdx.cjs +1 -1
- package/dist/client/mdx.js +1 -1
- package/dist/client/primitives.cjs +2 -2
- package/dist/client/primitives.d.cts +10 -8
- package/dist/client/primitives.d.ts +10 -8
- package/dist/client/primitives.js +2 -2
- package/dist/config-B5uVv5q4.cjs +7 -0
- package/dist/config-D3_zDkHh.mjs +7 -0
- package/dist/{config-CnmfjOE4.cjs → config-JGkMJoJQ.cjs} +1 -1
- package/dist/csp-gaZ51xzq.mjs +6 -0
- package/dist/doctor-3MheVMwd.mjs +7 -0
- package/dist/{parser-CHsNUEhU.cjs → doctor-BR1B2Mkz.cjs} +1 -1
- package/dist/doctor-DQxLM202.cjs +7 -0
- package/dist/handler-Btd4t_67.mjs +28 -0
- package/dist/{headers-DuCAOgYX.cjs → headers-BXKxiPUv.cjs} +1 -1
- package/dist/headers-CXyf0auY.mjs +6 -0
- package/dist/{image-BCDyLHyD.js → image-C9md50h2.js} +14 -6
- package/dist/{image-DWdmichO.cjs → image-CR6UlaI5.cjs} +14 -6
- package/dist/{mdx-9QJoSITt.cjs → mdx-DJBg5DuL.cjs} +10 -23
- package/dist/{mdx-DFbspTP9.js → mdx-DhyMkc35.js} +10 -23
- package/dist/node/cli-entry.cjs +3 -3
- package/dist/node/cli-entry.mjs +3 -3
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +40 -19
- package/dist/node/index.d.mts +41 -20
- package/dist/node/index.mjs +1 -1
- package/dist/node-BUAMwxuS.cjs +105 -0
- package/dist/node-Clh72alT.mjs +105 -0
- package/dist/{package-Di7alQGe.mjs → package-1GvyLw7z.mjs} +1 -1
- package/dist/{package-BlYktJR3.cjs → package-3jQEMIvy.cjs} +1 -1
- package/dist/pages-external-BYa4JSda.mjs +6 -0
- package/dist/pages-external-CX2uyW95.cjs +6 -0
- package/dist/parser-CNIPHx4s.cjs +8 -0
- package/dist/parser-D0QHIQsi.mjs +8 -0
- package/dist/plugin-D9gURy-9.mjs +68 -0
- package/dist/plugin-N3zGyZXw.cjs +68 -0
- package/dist/rolldown-runtime-fkIsjY3S.mjs +6 -0
- package/dist/routes-BajCwrvX.cjs +6 -0
- package/dist/routes-CyrnmVuG.mjs +6 -0
- package/dist/routes-D6Tuu7Fs.cjs +6 -0
- package/dist/{search-dialog-DRNJsxOv.js → search-dialog-CQneRo8T.js} +1 -1
- package/dist/{search-dialog-BsAiQgnx.cjs → search-dialog-CwNh8lIN.cjs} +27 -30
- package/dist/{search-dialog-BhXg05Ri.cjs → search-dialog-D4rplZMv.cjs} +1 -0
- package/dist/{search-dialog-DaR66wl0.js → search-dialog-DaeSPvEo.js} +1 -0
- package/dist/{search-dialog-CaOO1Q4i.js → search-dialog-DoGobmuG.js} +28 -31
- package/dist/{search-dialog-CzwvKoLW.cjs → search-dialog-cHJoKjts.cjs} +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.mts +1 -1
- package/dist/server/index.mjs +1 -1
- package/dist/{shiki-adapter-BB71nVsG.cjs → shiki-adapter-CGTmrR6S.cjs} +1 -1
- package/dist/shiki-adapter-CXEGRnjr.mjs +6 -0
- package/dist/{doctor-BL6c8x2Q.cjs → shiki-adapter-Mr8_oT_9.cjs} +1 -1
- package/dist/{sidebar-BtJyWHy4.d.cts → sidebar-7gIifpBX.d.cts} +21 -4
- package/dist/{sidebar-C4fuRYYS.d.ts → sidebar-BAKgJ-Er.d.ts} +21 -4
- package/dist/types-generator-DVOnRVKU.mjs +26 -0
- package/dist/{utils-DexBrwiP.mjs → utils-B3xYMrpK.mjs} +1 -1
- package/dist/{utils-BWy_8ASj.cjs → utils-Bz1tG9Dg.cjs} +1 -1
- package/package.json +2 -1
- package/src/shared/types.ts +22 -3
- package/dist/config-BCqkPkjC.mjs +0 -7
- package/dist/config-BPWGa2W3.mjs +0 -6
- package/dist/config-D7ERJhqe.cjs +0 -7
- package/dist/csp-DtM6q2gZ.mjs +0 -6
- package/dist/doctor-A17UhTRn.cjs +0 -7
- package/dist/doctor-Bc-Tx_md.mjs +0 -7
- package/dist/handler-CyIBbZdb.mjs +0 -28
- package/dist/handler-eNNcucnf.mjs +0 -6
- package/dist/headers-DK0Hw7iB.mjs +0 -6
- package/dist/node/routes/worker.cjs +0 -6
- package/dist/node/routes/worker.d.cts +0 -2
- package/dist/node/routes/worker.d.mts +0 -2
- package/dist/node/routes/worker.mjs +0 -6
- package/dist/node-JQ6C-CBi.mjs +0 -105
- package/dist/node-cZgna618.cjs +0 -105
- package/dist/parser-CLtGv_XH.cjs +0 -6
- package/dist/parser-Ww0eOqs7.mjs +0 -6
- package/dist/plugin-BCCYSeId.cjs +0 -61
- package/dist/plugin-Bu75gPjx.mjs +0 -61
- package/dist/routes-B2joDAlC.cjs +0 -6
- package/dist/routes-CyKj3dzf.cjs +0 -6
- package/dist/routes-DMBny9t9.mjs +0 -6
- package/dist/routes-DZjS8QSV.mjs +0 -6
- package/dist/shiki-adapter-CL-IQwKI.cjs +0 -6
- package/dist/shiki-adapter-CxTLkjew.mjs +0 -6
- package/dist/shiki-adapter-rQ087Lx3.mjs +0 -6
- package/dist/types-generator-BRyf4o9F.mjs +0 -26
- package/dist/types-generator-Cu2jQP-V.mjs +0 -6
- package/dist/worker-pool-CgOMozUz.cjs +0 -6
- package/dist/worker-pool-v6tW2MDQ.mjs +0 -6
- /package/dist/{csp-DbbF3R9Q.cjs → csp-CBysWlAf.cjs} +0 -0
- /package/dist/{generator-BaSvGlxR.mjs → generator-CcOBN5vI.mjs} +0 -0
- /package/dist/{generator-DsajVrDx.cjs → generator-DtUU3Cfk.cjs} +0 -0
- /package/dist/{handler-1LRMYeI4.cjs → handler-Dzf4dSnV.cjs} +0 -0
- /package/dist/{index-ZqgZUvwp.d.mts → index-CdJv4ocW.d.mts} +0 -0
- /package/dist/{meta-loader-CD3Yptr5.mjs → meta-loader-C4Hu9RN9.mjs} +0 -0
- /package/dist/{meta-loader-CjphwtS7.cjs → meta-loader-C9MKjAs0.cjs} +0 -0
- /package/dist/{types-generator-BqNKCbrx.cjs → types-generator-CYcHkDzZ.cjs} +0 -0
package/bin/boltdocs.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
// Suppress DEP0205 deprecation warning for module.register() in Node 26+
|
|
4
4
|
const { emitWarning: _emitWarn } = process
|
|
5
5
|
process.emitWarning = function (warning, ...args) {
|
|
6
|
-
if (warning && typeof warning === 'object' && warning.code === 'DEP0205')
|
|
6
|
+
if (warning && typeof warning === 'object' && warning.code === 'DEP0205')
|
|
7
|
+
return
|
|
7
8
|
if (typeof warning === 'string' && args.includes('DEP0205')) return
|
|
8
9
|
return Reflect.apply(_emitWarn, process, [warning, ...args])
|
|
9
10
|
}
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* Copyright (c) 2026 Jesus Alcala
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
const e=require(`./handler-
|
|
6
|
+
const e=require(`./handler-Dzf4dSnV.cjs`),t={"Access-Control-Allow-Origin":`*`,"Access-Control-Allow-Methods":`POST, OPTIONS`,"Access-Control-Allow-Headers":`Content-Type`,"Content-Type":`application/json`};async function n(n,r){if(Object.entries(t).forEach(([e,t])=>{r.setHeader(e,t)}),n.method===`OPTIONS`){r.status(200).end();return}if(n.method!==`POST`){r.status(405).json({error:`Method Not Allowed`});return}try{let t=await e.t(n.body,process.env);r.status(200).json(t)}catch(e){let t=e instanceof Error?e.message:`Failed to submit feedback`;return r.status(500).json({error:t})}}async function r(n,r=process.env){let i=(e,n=200)=>({statusCode:n,headers:t,body:e?JSON.stringify(e):``});if(n.httpMethod===`OPTIONS`)return i(null,200);if(n.httpMethod!==`POST`)return i({error:`Method Not Allowed`},405);try{return i(await e.t(n.body?JSON.parse(n.body):{},r))}catch(e){return i({error:e instanceof Error?e.message:`Failed to submit feedback`},500)}}async function i(n,r={}){let i=(e,n=200)=>new Response(e?JSON.stringify(e):null,{status:n,headers:t});if(n.method===`OPTIONS`)return i(null);if(n.method!==`POST`)return i({error:`Method Not Allowed`},405);try{return i(await e.t(await n.json(),{...process.env,...r}))}catch(e){return i({error:e instanceof Error?e.message:`Failed to submit feedback`},500)}}async function a(n,r=process.env){let i=(e,n=200)=>({statusCode:n,headers:t,body:e?JSON.stringify(e):``});if(n.httpMethod===`OPTIONS`)return i(null,200);if(n.httpMethod!==`POST`)return i({error:`Method Not Allowed`},405);try{return i(await e.t(n.body?JSON.parse(n.body):{},r))}catch(e){return i({error:e instanceof Error?e.message:`Failed to submit feedback`},500)}}Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* Copyright (c) 2026 Jesus Alcala
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import{t as e}from"./handler-
|
|
6
|
+
import{t as e}from"./handler-Btd4t_67.mjs";const t={"Access-Control-Allow-Origin":`*`,"Access-Control-Allow-Methods":`POST, OPTIONS`,"Access-Control-Allow-Headers":`Content-Type`,"Content-Type":`application/json`};async function n(n,r){if(Object.entries(t).forEach(([e,t])=>{r.setHeader(e,t)}),n.method===`OPTIONS`){r.status(200).end();return}if(n.method!==`POST`){r.status(405).json({error:`Method Not Allowed`});return}try{let t=await e(n.body,process.env);r.status(200).json(t)}catch(e){let t=e instanceof Error?e.message:`Failed to submit feedback`;return r.status(500).json({error:t})}}async function r(n,r=process.env){let i=(e,n=200)=>({statusCode:n,headers:t,body:e?JSON.stringify(e):``});if(n.httpMethod===`OPTIONS`)return i(null,200);if(n.httpMethod!==`POST`)return i({error:`Method Not Allowed`},405);try{return i(await e(n.body?JSON.parse(n.body):{},r))}catch(e){return i({error:e instanceof Error?e.message:`Failed to submit feedback`},500)}}async function i(n,r={}){let i=(e,n=200)=>new Response(e?JSON.stringify(e):null,{status:n,headers:t});if(n.method===`OPTIONS`)return i(null);if(n.method!==`POST`)return i({error:`Method Not Allowed`},405);try{return i(await e(await n.json(),{...process.env,...r}))}catch(e){return i({error:e instanceof Error?e.message:`Failed to submit feedback`},500)}}async function a(n,r=process.env){let i=(e,n=200)=>({statusCode:n,headers:t,body:e?JSON.stringify(e):``});if(n.httpMethod===`OPTIONS`)return i(null,200);if(n.httpMethod!==`POST`)return i({error:`Method Not Allowed`},405);try{return i(await e(n.body?JSON.parse(n.body):{},r))}catch(e){return i({error:e instanceof Error?e.message:`Failed to submit feedback`},500)}}export{n as i,i as n,r,a as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { T as BoltdocsConfig, a as SidebarItem, d as SidebarMobile, f as SidebarRoot, i as SidebarHeader, l as SidebarLink, n as SidebarContent, p as SidebarSubGroup, r as SidebarGroup, s as SidebarItems, v as ComponentRoute, x as OnThisPageProps } from "./sidebar-
|
|
2
|
+
import { T as BoltdocsConfig, a as SidebarItem, d as SidebarMobile, f as SidebarRoot, i as SidebarHeader, l as SidebarLink, n as SidebarContent, p as SidebarSubGroup, r as SidebarGroup, s as SidebarItems, v as ComponentRoute, x as OnThisPageProps } from "./sidebar-BAKgJ-Er.js";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { T as BoltdocsConfig, a as SidebarItem, d as SidebarMobile, f as SidebarRoot, i as SidebarHeader, l as SidebarLink, n as SidebarContent, p as SidebarSubGroup, r as SidebarGroup, s as SidebarItems, v as ComponentRoute, x as OnThisPageProps } from "./sidebar-
|
|
2
|
+
import { T as BoltdocsConfig, a as SidebarItem, d as SidebarMobile, f as SidebarRoot, i as SidebarHeader, l as SidebarLink, n as SidebarContent, p as SidebarSubGroup, r as SidebarGroup, s as SidebarItems, v as ComponentRoute, x as OnThisPageProps } from "./sidebar-7gIifpBX.cjs";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* Copyright (c) 2026 Jesus Alcala
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
const e=require(`./chunk-Ds5LZdWN.cjs`),t=require(`./utils-
|
|
6
|
+
const e=require(`./chunk-Ds5LZdWN.cjs`),t=require(`./utils-Bz1tG9Dg.cjs`);let n=require(`node:path`);n=e.n(n);let r=require(`node:fs`);r=e.n(r);let i=require(`node:fs/promises`);i=e.n(i);let a=require(`node:crypto`);a=e.n(a);let o=require(`node:zlib`);o=e.n(o);let s=require(`node:util`),c=require(`lru-cache`);const l=i.default.writeFile,u=i.default.readFile,d=i.default.mkdir,f=i.default.rename,p=(0,s.promisify)(o.default.gzip),m=(0,s.promisify)(o.default.gunzip),h=new class{activeTasks=new Set;add(e){let t=Promise.resolve().then(e).catch(()=>{}).finally(()=>{this.activeTasks.delete(t)});this.activeTasks.add(t)}async flush(){await Promise.all(Array.from(this.activeTasks))}get pending(){return this.activeTasks.size}};var g=class{entries=new Map;cachePath=null;compress;constructor(e={}){let r=t.o();if(this.compress=e.compress===void 0?r.compress:e.compress,e.name){let t=e.root||process.cwd(),i=this.compress?`json.gz`:`json`;this.cachePath=n.default.resolve(t,r.dir,`${e.name}.${i}`)}}async load(){if(!t.o().noCache&&this.cachePath)try{let e=await u(this.cachePath);this.cachePath.endsWith(`.gz`)&&(e=await m(e));let t=JSON.parse(e.toString(`utf-8`));this.entries=new Map(Object.entries(t))}catch(e){if(e.code===`ENOENT`)return}}save(){if(t.o().noCache||!this.cachePath)return;let e=Object.fromEntries(this.entries),r=JSON.stringify(e),i=this.cachePath,o=this.compress;h.add(async()=>{try{await d(n.default.dirname(i),{recursive:!0});let e=Buffer.from(r);o&&(e=await p(e));let t=`${i}.${a.default.randomBytes(4).toString(`hex`)}.tmp`;await l(t,e),await f(t,i)}catch{}})}get(e){let n=this.entries.get(e);return!n||t.s(e)!==n.mtime?null:n.data}getStale(e){let t=this.entries.get(e);return t?t.data:null}set(e,n){this.entries.set(e,{data:n,mtime:t.s(e)})}isValid(e){let n=this.entries.get(e);return n?t.s(e)===n.mtime:!1}invalidate(e){this.entries.delete(e)}invalidateAll(){this.entries.clear()}pruneStale(e){for(let t of this.entries.keys())e.has(t)||this.entries.delete(t)}get size(){return this.entries.size}async flush(){await h.flush()}},_=class{index=new Map;memoryCache;baseDir;shardsDir;indexPath;saveTimeout=null;constructor(e,r=process.cwd()){let i=t.o();this.baseDir=n.default.resolve(r,i.dir,`transform-${e}`),this.shardsDir=n.default.resolve(this.baseDir,`shards`),this.indexPath=n.default.resolve(this.baseDir,`index.json`),this.memoryCache=new c.LRUCache({max:i.lruLimit,ttl:i.lruTTL,updateAgeOnGet:!0})}async load(){if(!t.o().noCache)try{let e=await u(this.indexPath,`utf-8`);this.index=new Map(Object.entries(JSON.parse(e)))}catch(e){if(e.code===`ENOENT`)return}}save(){if(t.o().noCache)return;let e=JSON.stringify(Object.fromEntries(this.index)),r=this.indexPath;h.add(async()=>{try{await d(n.default.dirname(r),{recursive:!0}),await l(r,e)}catch{}})}async getMany(e){let t=new Map,r=[];for(let n of e){let e=this.memoryCache.get(n);e?t.set(n,e):this.index.has(n)&&r.push(n)}if(r.length>0){let e=await Promise.all(r.map(async e=>{let t=this.index.get(e),r=n.default.resolve(this.shardsDir,`${t}.gz`);try{let t=(await m(await u(r))).toString(`utf-8`);return this.memoryCache.set(e,t),{key:e,val:t}}catch{return null}}));for(let n of e)n&&t.set(n.key,n.val)}return t}async getAsync(e){let t=this.memoryCache.get(e);if(t)return t;let r=this.index.get(e);if(!r)return null;let i=n.default.resolve(this.shardsDir,`${r}.gz`);try{let t=(await m(await u(i))).toString(`utf-8`);return this.memoryCache.set(e,t),t}catch(e){return e.code,null}}set(e,t){let r=a.default.createHash(`md5`).update(t).digest(`hex`);this.index.set(e,r),this.memoryCache.set(e,t);let o=n.default.resolve(this.shardsDir,`${r}.gz`);h.add(async()=>{try{try{await i.default.access(o);return}catch{}await d(this.shardsDir,{recursive:!0});let e=await p(Buffer.from(t)),n=`${o}.${a.default.randomBytes(4).toString(`hex`)}.tmp`;await l(n,e),await f(n,o)}catch{}}),this.saveTimeout&&clearTimeout(this.saveTimeout),this.saveTimeout=setTimeout(()=>{this.save()},500),typeof this.saveTimeout.unref==`function`&&this.saveTimeout.unref()}get size(){return this.index.size}async flush(){await h.flush()}};async function v(){await h.flush()}const y=new Map,b=()=>{let e=t.o();return n.default.resolve(process.cwd(),e.dir,`parser`)},x=`v2.5`;var S=class{static async get(e){if(t.o().noCache)return null;try{let t=await r.default.promises.stat(e),i=y.get(e);if(i&&i.mtime===t.mtimeMs)return i.data;let o=b(),s=a.default.createHash(`md5`).update(e).digest(`hex`),c=n.default.join(o,`${s}.json`);try{let n=await r.default.promises.readFile(c,`utf-8`),i=JSON.parse(n);return i._mtime!==t.mtimeMs||i._v!==x?null:(y.set(e,{data:i.data,mtime:i._mtime}),i.data)}catch{return null}}catch{return null}}static async set(e,i){if(!t.o().noCache)try{let t=await r.default.promises.stat(e);y.set(e,{data:i,mtime:t.mtimeMs});let o=b(),s=a.default.createHash(`md5`).update(e).digest(`hex`),c=n.default.join(o,`${s}.json`),l={_v:x,_mtime:t.mtimeMs,data:i};h.add(async()=>{try{await r.default.promises.mkdir(o,{recursive:!0}),await r.default.promises.writeFile(c,JSON.stringify(l))}catch{}})}catch{}}static invalidate(e){y.delete(e)}static clear(){y.clear();let e=b();if(r.default.existsSync(e))try{r.default.rmSync(e,{recursive:!0,force:!0})}catch{}}};Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return S}});
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* Copyright (c) 2026 Jesus Alcala
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import{o as e,s as t}from"./utils-
|
|
6
|
+
import{o as e,s as t}from"./utils-B3xYMrpK.mjs";import n from"node:path";import r from"node:fs";import i from"node:fs/promises";import a from"node:crypto";import o from"node:zlib";import{promisify as s}from"node:util";import{LRUCache as c}from"lru-cache";const l=i.writeFile,u=i.readFile,d=i.mkdir,f=i.rename,p=s(o.gzip),m=s(o.gunzip),h=new class{activeTasks=new Set;add(e){let t=Promise.resolve().then(e).catch(()=>{}).finally(()=>{this.activeTasks.delete(t)});this.activeTasks.add(t)}async flush(){await Promise.all(Array.from(this.activeTasks))}get pending(){return this.activeTasks.size}};var g=class{entries=new Map;cachePath=null;compress;constructor(t={}){let r=e();if(this.compress=t.compress===void 0?r.compress:t.compress,t.name){let e=t.root||process.cwd(),i=this.compress?`json.gz`:`json`;this.cachePath=n.resolve(e,r.dir,`${t.name}.${i}`)}}async load(){if(!e().noCache&&this.cachePath)try{let e=await u(this.cachePath);this.cachePath.endsWith(`.gz`)&&(e=await m(e));let t=JSON.parse(e.toString(`utf-8`));this.entries=new Map(Object.entries(t))}catch(e){if(e.code===`ENOENT`)return}}save(){if(e().noCache||!this.cachePath)return;let t=Object.fromEntries(this.entries),r=JSON.stringify(t),i=this.cachePath,o=this.compress;h.add(async()=>{try{await d(n.dirname(i),{recursive:!0});let e=Buffer.from(r);o&&(e=await p(e));let t=`${i}.${a.randomBytes(4).toString(`hex`)}.tmp`;await l(t,e),await f(t,i)}catch{}})}get(e){let n=this.entries.get(e);return!n||t(e)!==n.mtime?null:n.data}getStale(e){let t=this.entries.get(e);return t?t.data:null}set(e,n){this.entries.set(e,{data:n,mtime:t(e)})}isValid(e){let n=this.entries.get(e);return n?t(e)===n.mtime:!1}invalidate(e){this.entries.delete(e)}invalidateAll(){this.entries.clear()}pruneStale(e){for(let t of this.entries.keys())e.has(t)||this.entries.delete(t)}get size(){return this.entries.size}async flush(){await h.flush()}},_=class{index=new Map;memoryCache;baseDir;shardsDir;indexPath;saveTimeout=null;constructor(t,r=process.cwd()){let i=e();this.baseDir=n.resolve(r,i.dir,`transform-${t}`),this.shardsDir=n.resolve(this.baseDir,`shards`),this.indexPath=n.resolve(this.baseDir,`index.json`),this.memoryCache=new c({max:i.lruLimit,ttl:i.lruTTL,updateAgeOnGet:!0})}async load(){if(!e().noCache)try{let e=await u(this.indexPath,`utf-8`);this.index=new Map(Object.entries(JSON.parse(e)))}catch(e){if(e.code===`ENOENT`)return}}save(){if(e().noCache)return;let t=JSON.stringify(Object.fromEntries(this.index)),r=this.indexPath;h.add(async()=>{try{await d(n.dirname(r),{recursive:!0}),await l(r,t)}catch{}})}async getMany(e){let t=new Map,r=[];for(let n of e){let e=this.memoryCache.get(n);e?t.set(n,e):this.index.has(n)&&r.push(n)}if(r.length>0){let e=await Promise.all(r.map(async e=>{let t=this.index.get(e),r=n.resolve(this.shardsDir,`${t}.gz`);try{let t=(await m(await u(r))).toString(`utf-8`);return this.memoryCache.set(e,t),{key:e,val:t}}catch{return null}}));for(let n of e)n&&t.set(n.key,n.val)}return t}async getAsync(e){let t=this.memoryCache.get(e);if(t)return t;let r=this.index.get(e);if(!r)return null;let i=n.resolve(this.shardsDir,`${r}.gz`);try{let t=(await m(await u(i))).toString(`utf-8`);return this.memoryCache.set(e,t),t}catch(e){return e.code,null}}set(e,t){let r=a.createHash(`md5`).update(t).digest(`hex`);this.index.set(e,r),this.memoryCache.set(e,t);let o=n.resolve(this.shardsDir,`${r}.gz`);h.add(async()=>{try{try{await i.access(o);return}catch{}await d(this.shardsDir,{recursive:!0});let e=await p(Buffer.from(t)),n=`${o}.${a.randomBytes(4).toString(`hex`)}.tmp`;await l(n,e),await f(n,o)}catch{}}),this.saveTimeout&&clearTimeout(this.saveTimeout),this.saveTimeout=setTimeout(()=>{this.save()},500),typeof this.saveTimeout.unref==`function`&&this.saveTimeout.unref()}get size(){return this.index.size}async flush(){await h.flush()}};async function v(){await h.flush()}const y=new Map,b=()=>{let t=e();return n.resolve(process.cwd(),t.dir,`parser`)},x=`v2.5`;var S=class{static async get(t){if(e().noCache)return null;try{let e=await r.promises.stat(t),i=y.get(t);if(i&&i.mtime===e.mtimeMs)return i.data;let o=b(),s=a.createHash(`md5`).update(t).digest(`hex`),c=n.join(o,`${s}.json`);try{let n=await r.promises.readFile(c,`utf-8`),i=JSON.parse(n);return i._mtime!==e.mtimeMs||i._v!==x?null:(y.set(t,{data:i.data,mtime:i._mtime}),i.data)}catch{return null}}catch{return null}}static async set(t,i){if(!e().noCache)try{let e=await r.promises.stat(t);y.set(t,{data:i,mtime:e.mtimeMs});let o=b(),s=a.createHash(`md5`).update(t).digest(`hex`),c=n.join(o,`${s}.json`),l={_v:x,_mtime:e.mtimeMs,data:i};h.add(async()=>{try{await r.promises.mkdir(o,{recursive:!0}),await r.promises.writeFile(c,JSON.stringify(l))}catch{}})}catch{}}static invalidate(e){y.delete(e)}static clear(){y.clear();let e=b();if(r.existsSync(e))try{r.rmSync(e,{recursive:!0,force:!0})}catch{}}};export{v as i,g as n,_ as r,S as t};
|
package/dist/client/index.cjs
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
7
7
|
const require_icons_dev = require('../icons-dev-BryEFkJu.cjs');
|
|
8
|
-
const require_image = require('../image-
|
|
9
|
-
const require_mdx = require('../mdx-
|
|
8
|
+
const require_image = require('../image-CR6UlaI5.cjs');
|
|
9
|
+
const require_mdx = require('../mdx-DJBg5DuL.cjs');
|
|
10
10
|
const require_docs_layout = require('../docs-layout-3TpAt6MB.cjs');
|
|
11
|
-
const require_search_dialog = require('../search-dialog-
|
|
12
|
-
const require_search_dialog$1 = require('../search-dialog-
|
|
11
|
+
const require_search_dialog = require('../search-dialog-D4rplZMv.cjs');
|
|
12
|
+
const require_search_dialog$1 = require('../search-dialog-CwNh8lIN.cjs');
|
|
13
13
|
let react = require("react");
|
|
14
14
|
let react_router_dom = require("react-router-dom");
|
|
15
15
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -20,6 +20,8 @@ let virtual_boltdocs_mdx_components = require("virtual:boltdocs-mdx-components")
|
|
|
20
20
|
virtual_boltdocs_mdx_components = require_icons_dev.__toESM(virtual_boltdocs_mdx_components);
|
|
21
21
|
let virtual_boltdocs_icons = require("virtual:boltdocs-icons");
|
|
22
22
|
virtual_boltdocs_icons = require_icons_dev.__toESM(virtual_boltdocs_icons);
|
|
23
|
+
let isomorphic_dompurify = require("isomorphic-dompurify");
|
|
24
|
+
isomorphic_dompurify = require_icons_dev.__toESM(isomorphic_dompurify);
|
|
23
25
|
let virtual_boltdocs_layout = require("virtual:boltdocs-layout");
|
|
24
26
|
virtual_boltdocs_layout = require_icons_dev.__toESM(virtual_boltdocs_layout);
|
|
25
27
|
let _bdocs_ssg = require("@bdocs/ssg");
|
|
@@ -255,6 +257,26 @@ function Head({ siteTitle, siteDescription, routes }) {
|
|
|
255
257
|
name: "generator",
|
|
256
258
|
content: "Boltdocs"
|
|
257
259
|
}),
|
|
260
|
+
config?.seo?.verification?.google && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("meta", {
|
|
261
|
+
name: "google-site-verification",
|
|
262
|
+
content: config.seo.verification.google
|
|
263
|
+
}),
|
|
264
|
+
config?.seo?.verification?.bing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("meta", {
|
|
265
|
+
name: "msvalidate.01",
|
|
266
|
+
content: config.seo.verification.bing
|
|
267
|
+
}),
|
|
268
|
+
config?.seo?.verification?.yandex && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("meta", {
|
|
269
|
+
name: "yandex-verification",
|
|
270
|
+
content: config.seo.verification.yandex
|
|
271
|
+
}),
|
|
272
|
+
config?.seo?.verification?.pinterest && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("meta", {
|
|
273
|
+
name: "p:domain_verify",
|
|
274
|
+
content: config.seo.verification.pinterest
|
|
275
|
+
}),
|
|
276
|
+
config?.seo?.verification?.facebook && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("meta", {
|
|
277
|
+
name: "facebook-domain-verification",
|
|
278
|
+
content: config.seo.verification.facebook
|
|
279
|
+
}),
|
|
258
280
|
Object.entries(globalMetatags).map(([key, value]) => {
|
|
259
281
|
return key.startsWith("og:") || key.startsWith("music:") || key.startsWith("video:") || key.startsWith("article:") || key.startsWith("book:") || key.startsWith("profile:") ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("meta", {
|
|
260
282
|
property: key,
|
|
@@ -877,7 +899,7 @@ function Tabs({ tabs, routes }) {
|
|
|
877
899
|
if (!iconName) return null;
|
|
878
900
|
if (iconName.trim().startsWith("<svg")) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
879
901
|
className: "h-4 w-4",
|
|
880
|
-
dangerouslySetInnerHTML: { __html: iconName }
|
|
902
|
+
dangerouslySetInnerHTML: { __html: isomorphic_dompurify.default.sanitize(iconName, { USE_PROFILES: { svg: true } }) }
|
|
881
903
|
});
|
|
882
904
|
const icons = {
|
|
883
905
|
...require_icons_dev.icons_exports,
|
|
@@ -1140,7 +1162,7 @@ function createGtagAnalytics(config) {
|
|
|
1140
1162
|
window.gtag?.("event", "page_view", {
|
|
1141
1163
|
page_path: path,
|
|
1142
1164
|
page_title: title || document.title,
|
|
1143
|
-
send_to: config?.ga4?.measurementId
|
|
1165
|
+
send_to: config?.analytics?.ga4?.measurementId
|
|
1144
1166
|
});
|
|
1145
1167
|
},
|
|
1146
1168
|
trackEvent: ({ action, category, label, value, params }) => {
|
|
@@ -1148,7 +1170,7 @@ function createGtagAnalytics(config) {
|
|
|
1148
1170
|
event_category: category,
|
|
1149
1171
|
event_label: label,
|
|
1150
1172
|
value,
|
|
1151
|
-
send_to: config?.ga4?.measurementId,
|
|
1173
|
+
send_to: config?.analytics?.ga4?.measurementId,
|
|
1152
1174
|
...params
|
|
1153
1175
|
});
|
|
1154
1176
|
},
|
|
@@ -1156,20 +1178,20 @@ function createGtagAnalytics(config) {
|
|
|
1156
1178
|
window.gtag?.("event", "search", {
|
|
1157
1179
|
search_term: query,
|
|
1158
1180
|
results_count: resultsCount,
|
|
1159
|
-
send_to: config?.ga4?.measurementId
|
|
1181
|
+
send_to: config?.analytics?.ga4?.measurementId
|
|
1160
1182
|
});
|
|
1161
1183
|
},
|
|
1162
1184
|
trackDownload: (file, type) => {
|
|
1163
1185
|
window.gtag?.("event", "file_download", {
|
|
1164
1186
|
file_name: file,
|
|
1165
1187
|
file_type: type || file.split(".").pop(),
|
|
1166
|
-
send_to: config?.ga4?.measurementId
|
|
1188
|
+
send_to: config?.analytics?.ga4?.measurementId
|
|
1167
1189
|
});
|
|
1168
1190
|
},
|
|
1169
1191
|
trackExternalLink: (url) => {
|
|
1170
1192
|
window.gtag?.("event", "external_link", {
|
|
1171
1193
|
link_url: url,
|
|
1172
|
-
send_to: config?.ga4?.measurementId
|
|
1194
|
+
send_to: config?.analytics?.ga4?.measurementId
|
|
1173
1195
|
});
|
|
1174
1196
|
},
|
|
1175
1197
|
isEnabled: true
|
|
@@ -1182,7 +1204,7 @@ function createDataLayerAnalytics(config) {
|
|
|
1182
1204
|
event: "page_view",
|
|
1183
1205
|
page_path: path,
|
|
1184
1206
|
page_title: title || document.title,
|
|
1185
|
-
send_to: config?.gtm?.tagId
|
|
1207
|
+
send_to: config?.analytics?.gtm?.tagId
|
|
1186
1208
|
});
|
|
1187
1209
|
},
|
|
1188
1210
|
trackEvent: ({ action, category, label, value, params }) => {
|
|
@@ -1191,7 +1213,7 @@ function createDataLayerAnalytics(config) {
|
|
|
1191
1213
|
event_category: category,
|
|
1192
1214
|
event_label: label,
|
|
1193
1215
|
value,
|
|
1194
|
-
send_to: config?.gtm?.tagId,
|
|
1216
|
+
send_to: config?.analytics?.gtm?.tagId,
|
|
1195
1217
|
...params
|
|
1196
1218
|
});
|
|
1197
1219
|
},
|
|
@@ -1200,7 +1222,7 @@ function createDataLayerAnalytics(config) {
|
|
|
1200
1222
|
event: "search",
|
|
1201
1223
|
search_term: query,
|
|
1202
1224
|
results_count: resultsCount,
|
|
1203
|
-
send_to: config?.gtm?.tagId
|
|
1225
|
+
send_to: config?.analytics?.gtm?.tagId
|
|
1204
1226
|
});
|
|
1205
1227
|
},
|
|
1206
1228
|
trackDownload: (file, type) => {
|
|
@@ -1208,14 +1230,14 @@ function createDataLayerAnalytics(config) {
|
|
|
1208
1230
|
event: "file_download",
|
|
1209
1231
|
file_name: file,
|
|
1210
1232
|
file_type: type || file.split(".").pop(),
|
|
1211
|
-
send_to: config?.gtm?.tagId
|
|
1233
|
+
send_to: config?.analytics?.gtm?.tagId
|
|
1212
1234
|
});
|
|
1213
1235
|
},
|
|
1214
1236
|
trackExternalLink: (url) => {
|
|
1215
1237
|
window.dataLayer?.push({
|
|
1216
1238
|
event: "external_link",
|
|
1217
1239
|
link_url: url,
|
|
1218
|
-
send_to: config?.gtm?.tagId
|
|
1240
|
+
send_to: config?.analytics?.gtm?.tagId
|
|
1219
1241
|
});
|
|
1220
1242
|
},
|
|
1221
1243
|
isEnabled: true
|
|
@@ -1417,13 +1439,13 @@ function I18nSelector({ className }) {
|
|
|
1417
1439
|
|
|
1418
1440
|
//#endregion
|
|
1419
1441
|
//#region src/client/components/ui-base/navbar.tsx
|
|
1420
|
-
const SearchDialog$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("../search-dialog-
|
|
1442
|
+
const SearchDialog$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("../search-dialog-cHJoKjts.cjs")).then((m) => ({ default: m.SearchDialog })));
|
|
1421
1443
|
function Navbar() {
|
|
1422
1444
|
const { links, title, logo, logoProps, github, social, config } = useNavbar();
|
|
1423
1445
|
const { routes, currentRoute, isCollectionPage, currentVersion, currentLocale } = require_icons_dev.useRoutes();
|
|
1424
1446
|
const { isSidebarOpen, toggleSidebar } = require_docs_layout.useUI();
|
|
1425
1447
|
const [isMobileMenuOpen, setIsMobileMenuOpen] = (0, react.useState)(false);
|
|
1426
|
-
const themeConfig = config.theme
|
|
1448
|
+
const themeConfig = config.theme;
|
|
1427
1449
|
const isDocs = !!currentRoute?.filePath && !isCollectionPage;
|
|
1428
1450
|
const hasTabs = themeConfig?.tabs && themeConfig.tabs.length > 0;
|
|
1429
1451
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_search_dialog.Navbar.Root, {
|
|
@@ -1453,15 +1475,18 @@ function Navbar() {
|
|
|
1453
1475
|
children: config.versions && currentVersion && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VersionSelector, {})
|
|
1454
1476
|
})
|
|
1455
1477
|
] }),
|
|
1456
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_search_dialog.Navbar.Center, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1457
|
-
|
|
1458
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1478
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_search_dialog.Navbar.Center, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1479
|
+
className: "flex items-center gap-2",
|
|
1480
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Suspense, {
|
|
1481
|
+
fallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "h-9 w-32 animate-pulse rounded-md bg-surface" }),
|
|
1482
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchDialog$1, { routes: routes || [] })
|
|
1483
|
+
})
|
|
1459
1484
|
}) }),
|
|
1460
1485
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_search_dialog.Navbar.Right, { children: [
|
|
1461
1486
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Suspense, {
|
|
1462
1487
|
fallback: null,
|
|
1463
1488
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1464
|
-
className: "lg:hidden",
|
|
1489
|
+
className: "lg:hidden flex items-center gap-1",
|
|
1465
1490
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchDialog$1, { routes: routes || [] })
|
|
1466
1491
|
})
|
|
1467
1492
|
}),
|
|
@@ -1812,6 +1837,69 @@ function Feedback({ className }) {
|
|
|
1812
1837
|
});
|
|
1813
1838
|
}
|
|
1814
1839
|
|
|
1840
|
+
//#endregion
|
|
1841
|
+
//#region src/client/components/ui-base/giscus.tsx
|
|
1842
|
+
function Giscus({ className }) {
|
|
1843
|
+
const config = require_icons_dev.useConfig();
|
|
1844
|
+
const { resolvedTheme } = require_image.useTheme();
|
|
1845
|
+
const ref = (0, react.useRef)(null);
|
|
1846
|
+
const initializedRef = (0, react.useRef)(false);
|
|
1847
|
+
const giscusConfig = config.integrations?.feedback?.giscus;
|
|
1848
|
+
(0, react.useEffect)(() => {
|
|
1849
|
+
if (!giscusConfig) return;
|
|
1850
|
+
const theme = giscusConfig.theme || (resolvedTheme === "dark" ? "dark" : "light");
|
|
1851
|
+
const session = {
|
|
1852
|
+
repo: giscusConfig.repo,
|
|
1853
|
+
"repo-id": giscusConfig.repoId,
|
|
1854
|
+
category: giscusConfig.category,
|
|
1855
|
+
"category-id": giscusConfig.categoryId,
|
|
1856
|
+
mapping: giscusConfig.mapping || "pathname",
|
|
1857
|
+
strict: String(giscusConfig.strict ?? "0"),
|
|
1858
|
+
"reactions-enabled": String(giscusConfig.reactionsEnabled ?? "1"),
|
|
1859
|
+
"emit-metadata": String(giscusConfig.emitMetadata ?? "0"),
|
|
1860
|
+
"input-position": giscusConfig.inputPosition || "bottom",
|
|
1861
|
+
lang: giscusConfig.lang || "en",
|
|
1862
|
+
loading: giscusConfig.loading || "lazy"
|
|
1863
|
+
};
|
|
1864
|
+
if (!initializedRef.current) {
|
|
1865
|
+
initializedRef.current = true;
|
|
1866
|
+
const script = document.createElement("script");
|
|
1867
|
+
script.src = "https://giscus.app/client.js";
|
|
1868
|
+
script.setAttribute("data-repo", session.repo);
|
|
1869
|
+
script.setAttribute("data-repo-id", session["repo-id"]);
|
|
1870
|
+
if (session.category) script.setAttribute("data-category", session.category);
|
|
1871
|
+
if (session["category-id"]) script.setAttribute("data-category-id", session["category-id"]);
|
|
1872
|
+
script.setAttribute("data-mapping", session.mapping);
|
|
1873
|
+
script.setAttribute("data-strict", session.strict);
|
|
1874
|
+
script.setAttribute("data-reactions-enabled", session["reactions-enabled"]);
|
|
1875
|
+
script.setAttribute("data-emit-metadata", session["emit-metadata"]);
|
|
1876
|
+
script.setAttribute("data-input-position", session["input-position"]);
|
|
1877
|
+
script.setAttribute("data-lang", session.lang);
|
|
1878
|
+
script.setAttribute("data-loading", session.loading);
|
|
1879
|
+
script.setAttribute("data-theme", theme);
|
|
1880
|
+
script.setAttribute("crossorigin", "anonymous");
|
|
1881
|
+
script.async = true;
|
|
1882
|
+
if (ref.current) ref.current.appendChild(script);
|
|
1883
|
+
return () => {
|
|
1884
|
+
initializedRef.current = false;
|
|
1885
|
+
if (script.parentNode) script.parentNode.removeChild(script);
|
|
1886
|
+
(ref.current?.querySelectorAll("iframe"))?.forEach((iframe) => iframe.remove());
|
|
1887
|
+
};
|
|
1888
|
+
}
|
|
1889
|
+
}, [giscusConfig]);
|
|
1890
|
+
(0, react.useEffect)(() => {
|
|
1891
|
+
if (!giscusConfig || !initializedRef.current) return;
|
|
1892
|
+
const theme = giscusConfig.theme || (resolvedTheme === "dark" ? "dark" : "light");
|
|
1893
|
+
const iframe = ref.current?.querySelector("iframe.giscus-frame");
|
|
1894
|
+
if (iframe) iframe.contentWindow?.postMessage({ giscus: { setConfig: { theme } } }, "https://giscus.app");
|
|
1895
|
+
}, [resolvedTheme, giscusConfig]);
|
|
1896
|
+
if (!giscusConfig) return null;
|
|
1897
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1898
|
+
ref,
|
|
1899
|
+
className: require_icons_dev.cn("w-full max-w-2xl mt-12 mb-6", className)
|
|
1900
|
+
});
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1815
1903
|
//#endregion
|
|
1816
1904
|
//#region src/client/ssg/mdx-elements.tsx
|
|
1817
1905
|
const Loading = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -2334,6 +2422,18 @@ function createRoutes(options) {
|
|
|
2334
2422
|
function DocsLayoutComponent({ children }) {
|
|
2335
2423
|
const { routes: filteredRoutes, currentRoute, isCollectionPage } = require_icons_dev.useRoutes();
|
|
2336
2424
|
const config = require_icons_dev.useConfig();
|
|
2425
|
+
const AskAiDialog = useMergedComponents().AskAiDialog;
|
|
2426
|
+
const [isAskAiOpen, setIsAskAiOpen] = (0, react.useState)(false);
|
|
2427
|
+
(0, react.useEffect)(() => {
|
|
2428
|
+
const handleOpen = () => setIsAskAiOpen(true);
|
|
2429
|
+
const handleClose = () => setIsAskAiOpen(false);
|
|
2430
|
+
window.addEventListener("boltdocs:ask-ai:open", handleOpen);
|
|
2431
|
+
window.addEventListener("boltdocs:ask-ai:close", handleClose);
|
|
2432
|
+
return () => {
|
|
2433
|
+
window.removeEventListener("boltdocs:ask-ai:open", handleOpen);
|
|
2434
|
+
window.removeEventListener("boltdocs:ask-ai:close", handleClose);
|
|
2435
|
+
};
|
|
2436
|
+
}, []);
|
|
2337
2437
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_docs_layout.DocsLayout, {
|
|
2338
2438
|
className: "selection:bg-primary-500/10 selection:text-primary-500",
|
|
2339
2439
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Navbar, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_docs_layout.DocsLayout.Body, {
|
|
@@ -2370,15 +2470,17 @@ function DocsLayoutComponent({ children }) {
|
|
|
2370
2470
|
children
|
|
2371
2471
|
}) }),
|
|
2372
2472
|
!isCollectionPage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Feedback, {}),
|
|
2473
|
+
!isCollectionPage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Giscus, {}),
|
|
2373
2474
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_docs_layout.DocsLayout.Footer, { children: !isCollectionPage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageNav, {}) })
|
|
2374
2475
|
]
|
|
2375
2476
|
})
|
|
2376
2477
|
}),
|
|
2377
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2478
|
+
AskAiDialog && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AskAiDialog, {}),
|
|
2479
|
+
!isCollectionPage && !isAskAiOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OnThisPage, {
|
|
2378
2480
|
headings: currentRoute?.headings,
|
|
2379
|
-
|
|
2481
|
+
filePath: currentRoute?.filePath,
|
|
2380
2482
|
communityHelp: config.theme?.communityHelp,
|
|
2381
|
-
|
|
2483
|
+
editLink: config.theme?.editLink
|
|
2382
2484
|
})
|
|
2383
2485
|
]
|
|
2384
2486
|
})]
|
package/dist/client/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { A as BoltdocsRoutePathWithFallback, C as SiteConfig, D as BoltdocsLocale, E as BoltdocsIntegrationsConfig, M as BoltdocsTypes, N as BoltdocsVersion, O as BoltdocsMdxComponents, S as SidebarProps, T as BoltdocsConfig, _ as CollectionPostLoaderData, b as NavbarLink, g as CollectionListLoaderData, h as BoltdocsTab, j as BoltdocsSocialLink, k as BoltdocsRoutePath, v as ComponentRoute, w as TabsProps, x as OnThisPageProps, y as LayoutProps } from "../sidebar-
|
|
3
|
-
import { a as ErrorBoundary, c as OnThisPage, i as CopyMarkdown, l as Sidebar, n as NotFound, o as PageNav, r as SearchDialog, s as Breadcrumbs, t as Banner, u as Navbar } from "../banner-
|
|
2
|
+
import { A as BoltdocsRoutePathWithFallback, C as SiteConfig, D as BoltdocsLocale, E as BoltdocsIntegrationsConfig, M as BoltdocsTypes, N as BoltdocsVersion, O as BoltdocsMdxComponents, S as SidebarProps, T as BoltdocsConfig, _ as CollectionPostLoaderData, b as NavbarLink, g as CollectionListLoaderData, h as BoltdocsTab, j as BoltdocsSocialLink, k as BoltdocsRoutePath, v as ComponentRoute, w as TabsProps, x as OnThisPageProps, y as LayoutProps } from "../sidebar-7gIifpBX.cjs";
|
|
3
|
+
import { a as ErrorBoundary, c as OnThisPage, i as CopyMarkdown, l as Sidebar, n as NotFound, o as PageNav, r as SearchDialog, s as Breadcrumbs, t as Banner, u as Navbar } from "../banner-DNSkgUsO.cjs";
|
|
4
4
|
import * as _$react from "react";
|
|
5
5
|
import React$1, { ComponentType, JSXElementConstructor, ReactNode } from "react";
|
|
6
6
|
import { RouteRecord, ViteReactSSG } from "@bdocs/ssg";
|
|
@@ -140,6 +140,7 @@ declare function useSearch(routes: ComponentRoute[]): {
|
|
|
140
140
|
query: string;
|
|
141
141
|
setQuery: _$react.Dispatch<_$react.SetStateAction<string>>;
|
|
142
142
|
list: any[];
|
|
143
|
+
handleSelect: (key: React.Key) => void;
|
|
143
144
|
input: {
|
|
144
145
|
value: string;
|
|
145
146
|
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -234,7 +235,7 @@ declare function useRoutes(): {
|
|
|
234
235
|
* Hook to automatically localize a path based on the current version and locale context.
|
|
235
236
|
* It ensures that navigation preserves the active version and language across the entire site.
|
|
236
237
|
*/
|
|
237
|
-
declare function useLocalizedTo(to:
|
|
238
|
+
declare function useLocalizedTo(to: BoltdocsRoutePathWithFallback): string;
|
|
238
239
|
declare function useLocalizedTo(to: LinkProps['to']): LinkProps['to'];
|
|
239
240
|
//#endregion
|
|
240
241
|
//#region src/client/hooks/use-location.d.ts
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { A as BoltdocsRoutePathWithFallback, C as SiteConfig, D as BoltdocsLocale, E as BoltdocsIntegrationsConfig, M as BoltdocsTypes, N as BoltdocsVersion, O as BoltdocsMdxComponents, S as SidebarProps, T as BoltdocsConfig, _ as CollectionPostLoaderData, b as NavbarLink, g as CollectionListLoaderData, h as BoltdocsTab, j as BoltdocsSocialLink, k as BoltdocsRoutePath, v as ComponentRoute, w as TabsProps, x as OnThisPageProps, y as LayoutProps } from "../sidebar-
|
|
3
|
-
import { a as ErrorBoundary, c as OnThisPage, i as CopyMarkdown, l as Sidebar, n as NotFound, o as PageNav, r as SearchDialog, s as Breadcrumbs, t as Banner, u as Navbar } from "../banner-
|
|
2
|
+
import { A as BoltdocsRoutePathWithFallback, C as SiteConfig, D as BoltdocsLocale, E as BoltdocsIntegrationsConfig, M as BoltdocsTypes, N as BoltdocsVersion, O as BoltdocsMdxComponents, S as SidebarProps, T as BoltdocsConfig, _ as CollectionPostLoaderData, b as NavbarLink, g as CollectionListLoaderData, h as BoltdocsTab, j as BoltdocsSocialLink, k as BoltdocsRoutePath, v as ComponentRoute, w as TabsProps, x as OnThisPageProps, y as LayoutProps } from "../sidebar-BAKgJ-Er.js";
|
|
3
|
+
import { a as ErrorBoundary, c as OnThisPage, i as CopyMarkdown, l as Sidebar, n as NotFound, o as PageNav, r as SearchDialog, s as Breadcrumbs, t as Banner, u as Navbar } from "../banner-CfdalYLL.js";
|
|
4
4
|
import { RouteRecord, ViteReactSSG } from "@bdocs/ssg";
|
|
5
5
|
import * as _$react from "react";
|
|
6
6
|
import React$1, { ComponentType, JSXElementConstructor, ReactNode } from "react";
|
|
@@ -140,6 +140,7 @@ declare function useSearch(routes: ComponentRoute[]): {
|
|
|
140
140
|
query: string;
|
|
141
141
|
setQuery: _$react.Dispatch<_$react.SetStateAction<string>>;
|
|
142
142
|
list: any[];
|
|
143
|
+
handleSelect: (key: React.Key) => void;
|
|
143
144
|
input: {
|
|
144
145
|
value: string;
|
|
145
146
|
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -234,7 +235,7 @@ declare function useRoutes(): {
|
|
|
234
235
|
* Hook to automatically localize a path based on the current version and locale context.
|
|
235
236
|
* It ensures that navigation preserves the active version and language across the entire site.
|
|
236
237
|
*/
|
|
237
|
-
declare function useLocalizedTo(to:
|
|
238
|
+
declare function useLocalizedTo(to: BoltdocsRoutePathWithFallback): string;
|
|
238
239
|
declare function useLocalizedTo(to: LinkProps['to']): LinkProps['to'];
|
|
239
240
|
//#endregion
|
|
240
241
|
//#region src/client/hooks/use-location.d.ts
|