boltdocs 2.6.0 → 2.6.2

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 (36) hide show
  1. package/dist/client/index.cjs +1 -1
  2. package/dist/client/index.d.cts +41 -37
  3. package/dist/client/index.d.ts +41 -37
  4. package/dist/client/index.js +1 -1
  5. package/dist/node/cli-entry.cjs +1 -1
  6. package/dist/node/cli-entry.mjs +1 -1
  7. package/dist/node/index.cjs +1 -1
  8. package/dist/node/index.d.cts +30 -3
  9. package/dist/node/index.d.mts +30 -3
  10. package/dist/node/index.mjs +1 -1
  11. package/dist/node-Bogvkxao.mjs +101 -0
  12. package/dist/node-CXaog6St.cjs +101 -0
  13. package/dist/{package-CR0HF9x3.mjs → package-Bqbn1AYK.mjs} +1 -1
  14. package/dist/{package-Dgmsc_l5.cjs → package-CFP44vfn.cjs} +1 -1
  15. package/dist/{search-dialog-DMK5OpgH.cjs → search-dialog-CV3eJzMm.cjs} +1 -1
  16. package/dist/{search-dialog-3lvKsbVG.js → search-dialog-DNTomKgu.js} +1 -1
  17. package/dist/use-search-CS3gH19M.js +6 -0
  18. package/dist/use-search-DBpJZQuw.cjs +6 -0
  19. package/package.json +3 -2
  20. package/src/client/components/ui-base/head.tsx +10 -3
  21. package/src/client/hooks/use-i18n.ts +4 -3
  22. package/src/client/hooks/use-localized-to.ts +1 -4
  23. package/src/client/hooks/use-routes.ts +4 -4
  24. package/src/client/hooks/use-sidebar.ts +3 -0
  25. package/src/client/hooks/use-version.ts +19 -6
  26. package/src/client/index.ts +2 -3
  27. package/src/client/ssg/boltdocs-shell.tsx +46 -14
  28. package/src/client/ssg/create-routes.tsx +56 -12
  29. package/src/client/store/boltdocs-context.tsx +24 -5
  30. package/src/shared/config-utils.ts +12 -0
  31. package/src/shared/types.ts +187 -0
  32. package/dist/node-BgvNl2Ay.mjs +0 -89
  33. package/dist/node-vkbb0MK7.cjs +0 -89
  34. package/dist/use-search-C9bxCqfF.js +0 -6
  35. package/dist/use-search-DcfZSunO.cjs +0 -6
  36. package/src/client/components/default-layout.tsx +0 -89
@@ -1,6 +0,0 @@
1
- /**
2
- * Boltdocs - https://boltdocs.vercel.app
3
- * Copyright (c) 2026 Jesus Alcala
4
- * Licensed under the MIT License.
5
- */
6
- import{useLocation as e}from"react-router-dom";import{Children as t,createContext as n,forwardRef as r,use as i,useContext as a,useEffect as o,useImperativeHandle as s,useMemo as c,useRef as l,useState as u}from"react";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";import*as m from"react-aria-components";import{Breadcrumb as h,Breadcrumbs as g,Button as _,Link as v,Separator as ee,ToggleButton as te}from"react-aria-components";import{Check as ne,ChevronDown as re,ChevronLeft as ie,ChevronRight as y,CornerDownLeft as ae,Dot as oe,ExternalLink as se,FileText as ce,Hash as le,Moon as ue,Search as b,Sun as de}from"lucide-react";import{clsx as fe}from"clsx";import{twMerge as pe}from"tailwind-merge";import{cva as me}from"class-variance-authority";import he from"scroll-into-view-if-needed";import{Index as ge}from"flexsearch";import _e from"virtual:boltdocs-search";const x=Symbol.for(`__BDOCS_BOLTDOCS_CONTEXT__`),S=Symbol.for(`__BDOCS_BOLTDOCS_INSTANCE__`),ve=globalThis[x]||(globalThis[x]=n(void 0));function ye({children:e}){let[t,n]=u(``),[r,i]=u(``),[a,o]=u(!1),s=c(()=>({currentLocale:t,currentVersion:r,setLocale:n,setVersion:i,hasHydrated:a,setHasHydrated:o}),[t,r,a]);return typeof globalThis<`u`&&(globalThis[S]=s),f(ve.Provider,{value:s,children:e})}function C(){let e=i(ve);if(!e&&typeof globalThis<`u`&&globalThis[S])return globalThis[S];if(!e)throw Error(`useBoltdocsContext must be used within a BoltdocsProvider`);return e}const w=Symbol.for(`__BDOCS_CONFIG_CONTEXT__`),T=Symbol.for(`__BDOCS_CONFIG_INSTANCE__`),E=globalThis[w]||(globalThis[w]=n(null));function D(){let e=i(E);if(!e&&typeof globalThis<`u`&&globalThis[T])return globalThis[T];if(!e)throw Error(`useConfig must be used within a ConfigProvider`);return e}function O(...e){return pe(fe(e))}const k=me(`flex flex-row items-center justify-center w-auto font-semibold tracking-tight no-underline whitespace-nowrap select-none outline-none transition-all duration-200 cursor-pointer pressed:scale-[0.97] hover:-translate-y-px leading-none`,{variants:{variant:{primary:`bg-primary-500 text-white shadow-md hover:brightness-110 hover:shadow-lg`,secondary:`bg-bg-surface text-text-main border border-border-subtle hover:bg-bg-muted hover:border-border-strong`,outline:`bg-transparent text-text-main border border-border-strong hover:bg-bg-surface hover:border-primary-500`,ghost:`bg-transparent text-text-muted hover:bg-bg-surface hover:text-text-main`,danger:`bg-[var(--color-danger-500)]/10 text-[var(--color-danger-500)] border border-[var(--color-danger-500)]/20 hover:bg-[var(--color-danger-500)]/15`,success:`bg-[var(--color-success-500)]/10 text-[var(--color-success-500)] border border-[var(--color-success-500)]/20 hover:bg-[var(--color-success-500)]/15`,warning:`bg-[var(--color-warning-500)]/10 text-[var(--color-warning-500)] border border-[var(--color-warning-500)]/20 hover:bg-[var(--color-warning-500)]/15`,info:`bg-[var(--color-info-500)]/10 text-[var(--color-info-500)] border border-[var(--color-info-500)]/20 hover:bg-[var(--color-info-500)]/15`,subtle:`bg-primary-500/10 text-primary-500 hover:bg-primary-500/20`,link:`bg-transparent text-primary-500 !p-0 !min-h-0 hover:underline`},size:{sm:`min-h-8 px-3.5 text-[0.8125rem] gap-1.5`,md:`min-h-10 px-5 text-[0.9375rem] gap-2`,lg:`min-h-12 px-7 text-[1.05rem] gap-2.5`},rounded:{none:`rounded-none`,sm:`rounded-sm`,md:`rounded-md`,lg:`rounded-lg`,full:`rounded-full`},iconSize:{sm:`w-8 h-8 p-0`,md:`w-10 h-10 p-0`,lg:`w-12 h-12 p-0`},disabled:{true:`opacity-50 cursor-not-allowed pointer-events-none`,false:null}},defaultVariants:{variant:`primary`,size:`md`,rounded:`md`}}),be=({href:e,icon:t,iconPosition:n=`left`,isIconOnly:r,children:i,className:a,variant:o,size:s,rounded:c,iconSize:l,disabled:u,...h})=>{let g=r||!i&&!!t,_=g?f(`span`,{className:`inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]`,children:t}):p(d,{children:[t&&n===`left`&&f(`span`,{className:`inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]`,children:t}),f(`span`,{className:`flex items-center`,children:i}),t&&n===`right`&&f(`span`,{className:`inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]`,children:t})]});return e?f(m.Link,{href:e,className:O(k({variant:o,size:s,rounded:c,iconSize:g?l:void 0,disabled:u}),a),...h,children:_}):f(m.Button,{className:O(k({variant:o,size:s,rounded:c,iconSize:g?l:void 0,disabled:u}),a),...h,children:_})};function A(e){let{size:t=20,...n}=e;return{...n,width:t,height:t}}const j=e=>p(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...A(e),children:[f(`title`,{children:`GitHub`}),f(`path`,{d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`})]}),xe=e=>p(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...A(e),children:[f(`title`,{children:`Discord`}),f(`path`,{d:`M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z`})]}),Se=e=>p(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...A(e),children:[f(`title`,{children:`X`}),f(`path`,{d:`M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z`})]}),Ce=e=>p(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...A(e),children:[f(`title`,{children:`Bluesky`}),f(`path`,{d:`M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037-.856 3.061-3.978 3.842-6.755 3.37 4.854.826 6.089 3.562 3.422 6.299-5.065 5.196-7.28-1.304-7.847-2.97-.104-.305-.152-.448-.153-.327 0-.121-.05.022-.153.327-.568 1.666-2.782 8.166-7.847 2.97-2.667-2.737-1.432-5.473 3.422-6.3-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026`})]}),we=e=>p(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[f(`title`,{children:`TypeScript`}),f(`path`,{fill:`#2563EB`,d:`M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z`})]}),Te=e=>p(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[f(`title`,{children:`JavaScript`}),f(`path`,{fill:`#F59E0B`,d:`M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z`})]}),Ee=e=>p(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[f(`title`,{children:`JSON`}),f(`path`,{fill:`#F59E0B`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),De=e=>p(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[f(`title`,{children:`CSS`}),f(`path`,{fill:`#0EA5E9`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),Oe=e=>p(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[f(`title`,{children:`HTML`}),f(`path`,{fill:`#EA580C`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),ke=e=>p(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[f(`title`,{children:`React`}),f(`path`,{fill:`#0E8ADC`,d:`M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z`}),f(`path`,{stroke:`#0E8ADC`,d:`M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z`}),f(`path`,{stroke:`#0E8ADC`,d:`M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z`}),f(`path`,{stroke:`#0E8ADC`,d:`M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z`})]}),Ae=e=>p(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[f(`title`,{children:`Markdown`}),f(`path`,{fill:`#60A5FA`,d:`M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z`})]}),je=e=>p(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 25 24`,...A(e),children:[f(`title`,{children:`Shell`}),f(`path`,{stroke:`#14B8A6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M4.336 17l6-6-6-6M12.336 19h8`})]}),Me=e=>p(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[f(`title`,{children:`YAML`}),f(`path`,{fill:`#A78BFA`,d:`M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z`})]}),Ne=e=>p(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 25 24`,...A(e),children:[f(`title`,{children:`Rust`}),f(`path`,{fill:`#EA580C`,fillRule:`evenodd`,d:`M12.58 2.136a.287.287 0 00-.488 0l-.526.85a8.974 8.974 0 00-.232.022l-.683-.73a.287.287 0 00-.478.096l-.35.935c-.075.021-.15.044-.224.067l-.812-.583a.287.287 0 00-.45.187l-.162.989a9.088 9.088 0 00-.204.11l-.913-.417a.287.287 0 00-.406.272l.036 1.005a9.099 9.099 0 00-.175.144l-.98-.231a.287.287 0 00-.345.345l.231.98a9.125 9.125 0 00-.144.175L4.27 6.316a.287.287 0 00-.271.406l.416.913a9.036 9.036 0 00-.11.203L3.317 8a.287.287 0 00-.187.45l.584.813a8.953 8.953 0 00-.068.223l-.935.35a.287.287 0 00-.095.479l.73.682a8.966 8.966 0 00-.023.233l-.85.526a.287.287 0 000 .488l.85.526c.007.078.014.156.023.233l-.73.682a.287.287 0 00.095.479l.935.35.068.223-.584.812a.287.287 0 00.187.451l.99.162c.035.068.072.135.109.203l-.416.913a.287.287 0 00.271.406l1.006-.036c.047.059.095.117.143.174l-.23.981a.287.287 0 00.344.345l.981-.23c.057.048.115.095.174.142l-.036 1.006a.287.287 0 00.406.272l.914-.417c.067.038.135.074.203.11l.161.99a.287.287 0 00.451.186l.813-.584c.074.024.148.046.223.068l.35.935a.287.287 0 00.478.095l.683-.73c.077.01.154.017.232.023l.526.85a.287.287 0 00.489 0l.526-.85c.078-.006.155-.014.232-.023l.682.73a.287.287 0 00.479-.095l.35-.935c.075-.022.15-.044.223-.068l.813.584a.287.287 0 00.45-.187l.162-.99a8.77 8.77 0 00.203-.109l.913.417a.287.287 0 00.406-.272l-.035-1.006c.058-.047.116-.094.174-.143l.98.231a.287.287 0 00.346-.345l-.231-.98.143-.175 1.006.036a.287.287 0 00.271-.406l-.416-.913a9.4 9.4 0 00.109-.203l.99-.162a.287.287 0 00.187-.45l-.584-.813a8.43 8.43 0 00.067-.223l.935-.35a.287.287 0 00.096-.479l-.73-.682c.009-.077.016-.155.023-.233l.85-.526a.287.287 0 000-.488l-.85-.526a8.844 8.844 0 00-.023-.233l.73-.682a.287.287 0 00-.096-.479l-.934-.35a9.246 9.246 0 00-.068-.223l.584-.812A.287.287 0 0021.357 8l-.99-.162a8.92 8.92 0 00-.11-.203l.417-.913a.287.287 0 00-.271-.406l-1.006.036a9.178 9.178 0 00-.143-.174l.23-.981a.287.287 0 00-.345-.345l-.98.23a9.43 9.43 0 00-.174-.142l.035-1.006a.287.287 0 00-.405-.272l-.914.417a9.11 9.11 0 00-.203-.11l-.162-.99a.287.287 0 00-.45-.186l-.813.584a9.088 9.088 0 00-.223-.068l-.35-.935a.287.287 0 00-.479-.095l-.682.73a9.062 9.062 0 00-.232-.023l-.526-.85zm-.257 1.62a.592.592 0 01.578.596.595.595 0 11-.578-.595zm1.363.98A7.324 7.324 0 0118.7 8.309l-.702 1.585a.547.547 0 00.275.717l1.352.6c.041.422.047.847.015 1.27h-.752c-.075 0-.106.05-.106.123v.344c0 .812-.457.99-.859 1.034-.383.044-.806-.161-.86-.394-.22-1.24-.583-1.526-1.152-1.975l-.041-.033c.736-.467 1.502-1.158 1.502-2.08 0-.998-.683-1.625-1.148-1.934-.655-.43-1.379-.516-1.574-.516H6.88a7.324 7.324 0 014.098-2.312l.916.96a.54.54 0 00.766.018l1.026-.978zm-8.46 4.407a.595.595 0 11-.034 1.19.595.595 0 01.034-1.19zm14.192.026a.595.595 0 11-.035 1.19.595.595 0 01.035-1.19zm-13.07.096h1.037v4.678H5.291a7.324 7.324 0 01-.237-2.797l1.282-.57a.542.542 0 00.276-.716l-.264-.595zm4.33.05h2.47c.128 0 .901.147.901.727 0 .48-.593.653-1.081.653h-2.293l.002-1.38zm0 3.36h1.892c.172 0 .924.05 1.164 1.011.026.104.064.291.107.503.078.389.174.861.247 1.06.113.345.57 1.034 1.058 1.034h3.089c-.207.277-.433.54-.677.785l-1.258-.27a.544.544 0 00-.645.417l-.298 1.394a7.323 7.323 0 01-6.108-.03l-.298-1.392a.542.542 0 00-.643-.418l-1.23.264a7.32 7.32 0 01-.636-.75h5.984c.067 0 .113-.011.113-.074v-2.117c0-.061-.046-.075-.113-.075h-1.75l.001-1.341zm-2.763 4.848a.595.595 0 11-.034 1.19.595.595 0 01.034-1.19zm8.814.027a.596.596 0 11-.035 1.19.596.596 0 01.035-1.19z`,clipRule:`evenodd`})]}),Pe=e=>p(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[f(`title`,{children:`Rust`}),f(`path`,{fill:`#F87171`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),M=({className:e,children:t,...n})=>f(m.Tooltip,{...n,offset:8,className:t=>O(`group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none`,`data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100`,`data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75`,`data-[placement=top]:slide-in-from-bottom-1`,`data-[placement=bottom]:slide-in-from-top-1`,`data-[placement=left]:slide-in-from-right-1`,`data-[placement=right]:slide-in-from-left-1`,typeof e==`function`?e(t):e),children:e=>p(d,{children:[f(m.OverlayArrow,{children:p(`svg`,{width:8,height:8,viewBox:`0 0 8 8`,className:`fill-bg-surface/90 stroke-border-subtle group-data-[placement=bottom]:rotate-180 group-data-[placement=left]:-rotate-90 group-data-[placement=right]:rotate-90`,children:[f(`title`,{children:`Arrow`}),f(`path`,{d:`M0 0 L4 4 L8 0`})]})}),typeof t==`function`?t(e):t]})}),N=({content:e,children:t,delay:n=500,closeDelay:r=0,...i})=>p(m.TooltipTrigger,{delay:n,closeDelay:r,children:[t,f(M,{...i,children:e})]});N.Root=N,N.Content=M;const P=n({routes:[]});function Fe(){return a(P)}function Ie({routes:e,children:t}){return f(P.Provider,{value:{routes:e},children:t})}function F(){let{routes:t}=Fe(),n=D(),r=e(),{hasHydrated:i,currentLocale:a,currentVersion:o}=C(),s=e=>e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e,c=s(r.pathname),l=t?.find?.(e=>s(e.path)===c),u=n.i18n?l?.locale||(i?a:void 0)||n.i18n.defaultLocale:void 0,d=n.versions?l?.version||(i?o:void 0)||n.versions.defaultVersion:void 0,f=t?.filter?.(e=>{let r=n.i18n?(e.locale||n.i18n.defaultLocale)===u:!0,i=n.versions?(e.version||n.versions.defaultVersion)===d:!0;if(!(r&&i))return!1;let a=n.i18n;if(a){let n=!!l?.locale,r=!!e.locale;if(t?.some?.(t=>t!==e&&t.filePath===e.filePath&&t.version===e.version&&(t.locale||a.defaultLocale)===(e.locale||a.defaultLocale))&&n!==r)return!1}return!0}),p=n.i18n?.localeConfigs?.[u]?.label||n.i18n?.locales[u]||u,m=n.versions?.versions?.find?.(e=>e.path===d)?.label||d;return{routes:f,allRoutes:t,currentRoute:l,currentLocale:u,currentLocaleLabel:p,availableLocales:n.i18n?Object.entries(n.i18n.locales).map(([e,t])=>({key:e,label:n.i18n?.localeConfigs?.[e]?.label||t,isCurrent:e===u})):[],currentVersion:d,currentVersionLabel:m,availableVersions:n.versions?n.versions.versions.map(e=>({key:e.path,label:e.label,isCurrent:e.path===d})):[],config:n}}function I(e){let t=D(),{currentLocale:n,currentVersion:r}=F();if(!t||typeof e!=`string`||e.startsWith(`http`)||e.startsWith(`//`))return e;let i=t.i18n,a=t.versions;if(!i&&!a)return e;let o=e.startsWith(`/docs`),s=e.split(`/`).filter(Boolean),c=0;s[c]===`docs`&&c++,a&&s.length>c&&a.versions.find(e=>e.path===s[c])&&c++,i&&s.length>c&&i.locales[s[c]]&&c++;let l=s.slice(c),u=[];o&&(u.push(`docs`),a&&r&&u.push(r)),i&&n&&n!==i.defaultLocale&&u.push(n),u.push(...l);let d=`/${u.join(`/`)}`;return d.length>1&&d.endsWith(`/`)?d.slice(0,-1):d||`/`}const L=r((e,t)=>{let{href:n,prefetch:r=`hover`,onMouseEnter:i,onFocus:a,...o}=e,s=I(n??``),c=e=>{i?.(e)},l=e=>{a?.(e)};return f(v,{...o,ref:t,href:s,onMouseEnter:c,onFocus:l})});L.displayName=`Link`;const R=r((t,n)=>{let{href:r,end:i=!1,className:a,children:o,...s}=t,c=e(),l=I(r??``),u=i?c.pathname===l:c.pathname.startsWith(l),d=typeof a==`function`?a({isActive:u}):O(a,u&&`active`),p=typeof o==`function`?o({isActive:u}):o;return f(L,{...s,ref:n,href:r,className:d,children:p})});R.displayName=`NavLink`;const z=({children:e,className:t,...n})=>f(`header`,{className:O(`boltdocs-navbar sticky top-0 z-50 w-full border-b border-border-subtle bg-bg-main/80 backdrop-blur-md`,t),...n,children:e}),Le=({children:e,className:t})=>f(`div`,{className:O(`mx-auto flex lg:h-navbar max-w-(--breakpoint-3xl) items-center justify-between px-4 md:px-6`,t),children:e}),Re=({children:e,className:t})=>f(`div`,{className:O(`flex flex-1 items-center justify-start gap-4 min-w-0`,t),children:e}),ze=({children:e,className:t})=>f(`div`,{className:O(`flex flex-1 items-center justify-end gap-2 md:gap-4 min-w-0`,t),children:e}),Be=({children:e,className:t})=>f(`div`,{className:O(`hidden lg:flex flex-1 justify-center items-center gap-4 px-4 min-w-0 w-full`,t),children:e}),Ve=({src:e,alt:t,width:n=24,height:r=24,className:i})=>f(L,{href:`/`,className:O(`flex items-center gap-2 shrink-0 outline-none`,i),children:e?f(`img`,{src:e,alt:t,width:n,height:r,className:`h-6 w-6 object-contain`}):null}),He=({children:e,className:t})=>f(L,{href:`/`,children:f(`span`,{className:O(`text-lg font-bold tracking-tight hidden sm:inline-block`,t),children:e})}),Ue=({children:e,className:t})=>f(`nav`,{className:O(`hidden md:flex items-center gap-6 text-sm font-medium`,t),children:e}),We=({label:e,href:t,active:n,to:r,className:i})=>p(L,{href:t,target:r===`external`?`_blank`:void 0,className:O(`transition-colors outline-none font-medium focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm`,{"text-primary-500":n,"text-text-muted hover:text-text-main":!n},i),children:[e,r===`external`&&f(`span`,{className:`ml-1 inline-block`,children:f(se,{size:12})})]}),Ge=({className:e,onPress:t})=>{let[n,r]=u(!1),i=n&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);return o(()=>{r(!0)},[]),p(_,{onPress:t,className:O(`flex items-center gap-2 rounded-full border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-muted outline-none cursor-pointer`,`transition-all duration-200 hover:border-border-strong hover:text-text-main hover:bg-bg-muted hover:shadow-sm active:scale-[0.98]`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,`w-full max-w-[720px] justify-between`,e),children:[p(`div`,{className:`flex items-center gap-2`,children:[f(b,{size:16}),f(`span`,{className:`hidden sm:inline-block`,children:`Search docs...`})]}),p(`div`,{className:`hidden sm:flex items-center gap-1 pointer-events-none select-none`,children:[f(`kbd`,{className:`flex h-5 items-center justify-center rounded border border-border-subtle bg-bg-main px-1.5 font-mono text-[10px] font-medium`,children:i?`⌘`:`Ctrl`}),f(`kbd`,{className:`flex h-5 w-5 items-center justify-center rounded border border-border-subtle bg-bg-main font-mono text-[10px] font-medium`,children:`K`})]})]})},Ke=({className:e,theme:t,onThemeChange:n})=>f(te,{isSelected:t===`dark`,onChange:n,className:O(`rounded-md p-2 text-text-muted outline-none cursor-pointer`,`transition-all duration-300 hover:bg-bg-surface hover:text-text-main hover:rotate-12 active:scale-90`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,e),"aria-label":`Toggle theme`,children:f(t===`dark`?de:ue,{size:20})}),qe=({name:e})=>{if(e===`github`)return f(j,{});if(e===`discord`)return f(xe,{});if(e===`x`)return f(Se,{});if(e===`bluesky`)return f(Ce,{})};z.Root=z,z.Left=Re,z.Right=ze,z.Center=Be,z.Logo=Ve,z.Title=He,z.Links=Ue,z.Link=We,z.SearchTrigger=Ge,z.Theme=Ke,z.Socials=({icon:e,link:t,className:n})=>f(L,{href:t,target:`_blank`,rel:`noopener noreferrer`,className:O(`rounded-md p-2 text-text-muted outline-none transition-colors`,`hover:bg-bg-surface hover:text-text-main`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,n),children:f(qe,{name:e})}),z.Split=({className:e})=>f(ee,{orientation:`vertical`,className:O(`h-6 w-px bg-border-subtle mx-1`,e)}),z.Content=Le;const B=({children:e,className:t,...n})=>f(`nav`,{className:O(`relative flex items-center`,t),...n,children:e});B.Root=B,B.List=({children:e,className:t})=>f(`div`,{className:O(`flex list-none items-center gap-1`,t),children:e}),B.Item=({children:e,label:t,className:n})=>p(m.MenuTrigger,{children:[p(m.Button,{className:O(`flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium outline-none transition-colors cursor-pointer`,`text-text-muted hover:bg-bg-surface hover:text-text-main`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,n),children:[t,f(re,{size:14,className:`transition-transform`})]}),f(m.Popover,{placement:`bottom start`,className:`entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95 fill-mode-forwards`,children:f(m.Menu,{className:`w-56 outline-none rounded-xl border border-border-subtle bg-bg-surface p-2 shadow-xl ring-1 ring-border-strong/5`,children:e})})]}),B.Link=({label:e,href:t,description:n,className:r,children:i,...a})=>f(m.MenuItem,{href:t,className:O(`block rounded-lg px-3 py-2 text-sm outline-none cursor-pointer transition-colors`,`hover:bg-bg-muted focus:bg-bg-muted`,r),...a,children:i||p(d,{children:[f(`div`,{className:`font-semibold text-text-main`,children:e}),n&&f(`div`,{className:`text-xs text-text-muted line-clamp-1 mt-0.5`,children:n})]})});const V=({children:e,isOpen:t,onOpenChange:n,className:r})=>f(m.ModalOverlay,{isOpen:t,onOpenChange:n,isDismissable:!0,className:O(`fixed inset-0 z-100 bg-black/40 backdrop-blur-sm px-4 py-4 sm:py-20`,`entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out`),children:f(m.Modal,{className:O(`mx-auto w-full max-w-2xl overflow-hidden rounded-xl border border-border-subtle bg-bg-surface shadow-2xl ring-1 ring-black/5 outline-none`,`entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95`,r),children:f(m.Dialog,{className:`flex flex-col max-h-[70vh] focus:outline-none`,children:e})})});V.Root=V,V.Autocomplete=({children:e,className:t,onSelectionChange:n,...r})=>{let i=m.Autocomplete;return f(`div`,{className:t,children:f(i,{...r,onSelectionChange:n,className:`flex flex-col min-h-0`,children:e})})},V.Input=({className:e,...t})=>p(m.SearchField,{className:`flex items-center gap-3 border-b border-border-subtle px-4 py-4`,autoFocus:!0,children:[f(b,{className:`h-5 w-5 text-text-muted`}),f(m.Input,{...t,className:O(`w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none`,e),placeholder:`Search documentation...`}),f(`div`,{className:`flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-main px-1.5 py-1 text-[10px] font-medium text-text-muted`,children:f(`kbd`,{className:`font-sans`,children:`ESC`})})]}),V.List=({children:e,className:t,...n})=>f(m.ListBox,{...n,className:O(`flex-1 overflow-y-auto p-2 outline-none`,t),children:e}),V.Item=Object.assign(({children:e,className:t,...n})=>f(m.ListBoxItem,{...n,className:O(`group flex items-center gap-3 rounded-lg p-3 text-left outline-none cursor-pointer transition-colors`,`text-text-muted hover:bg-bg-main hover:text-text-main focus:bg-primary-500 focus:text-white selected:bg-primary-500 selected:text-white`,t),children:t=>p(d,{children:[e,(t.isFocused||t.isSelected)&&p(`div`,{className:`ml-auto opacity-50 flex items-center gap-1`,children:[f(`span`,{className:`text-[10px]`,children:`Select`}),f(ae,{size:10})]})]})}),{Icon:({isHeading:e,className:t})=>f(`div`,{className:O(`shrink-0`,t),children:f(e?le:ce,{size:18})}),Title:({children:e,className:t})=>f(`span`,{className:O(`block font-medium truncate flex-1 text-sm`,t),children:e}),Bio:({children:e,className:t})=>f(`span`,{className:O(`ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100`,t),children:e})});function Je(e,t){let n=l(e);o(()=>{n.current!==e&&(t(e),n.current=e)},[e,t])}function H(e){return e.startsWith(`#`)?e.slice(1):null}var Ye=class{items=[];single=!1;observer=null;onChange;callback(e){if(e.length===0)return;for(let t of e){let e=this.items.find(e=>e.id===t.target.id);e&&(e.active=t.isIntersecting,e.fallback=!t.isIntersecting&&t.boundingClientRect.top<100)}let t=-1;for(let e=this.items.length-1;e>=0;e--)if(this.items[e].fallback){t=e;break}t===-1&&this.items.length>0&&(t=0),this.items=this.items.map((e,n)=>({...e,active:n===t,t:n===t?Date.now():e.t})),this.onChange?.()}setItems(e){let t=this.observer;if(t)for(let e of this.items){let n=document.getElementById(e.id);n&&t.unobserve(n)}this.items=[];for(let t of e){let e=H(t.url);e&&this.items.push({id:e,active:!1,fallback:!1,t:0,original:t})}this.watchItems(),typeof window<`u`&&(setTimeout(()=>this.watchItems(),100),setTimeout(()=>this.watchItems(),500),setTimeout(()=>this.watchItems(),1e3)),this.onChange?.()}watch(e){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),e),this.watchItems())}watchItems(){if(this.observer)for(let e of this.items){let t=document.getElementById(e.id);t&&this.observer.observe(t)}}unwatch(){this.observer?.disconnect(),this.observer=null}};const U=n(null),W=n(null);function G(){let e=i(U);if(!e)throw Error(`Component must be used under the <AnchorProvider /> component.`);return e}function Xe(){let e=G();return c(()=>{let t;for(let n of e)n.active&&(!t||n.t>t.t)&&(t=n);return t?.id},[e])}function Ze(){let e=G();return c(()=>{let t=[];for(let n of e)n.active&&t.push(n.id);return t},[e])}function Qe({containerRef:e,children:t}){return f(W.Provider,{value:e,children:t})}function $e({toc:e,single:t=!1,children:n}){let r=c(()=>new Ye,[]),[i,a]=u(r.items);return r.single=t,o(()=>{r.setItems(e)},[r,e]),o(()=>(r.watch({rootMargin:`-100px 0% 0% 0%`,threshold:0}),r.onChange=()=>a([...r.items]),()=>{r.unwatch()}),[r]),f(U.Provider,{value:i,children:n})}const K=({children:e,className:t})=>f(`nav`,{className:O(`sticky top-navbar hidden xl:flex flex-col shrink-0`,`w-toc`,`py-8 pl-6 pr-4`,t),children:e}),et=({children:e,className:t,...n})=>f(`div`,{className:O(`mb-4 text-xs font-bold text-text-main`,t),...n,children:e}),q=({children:e,className:t,ref:n,...r})=>{let i=l(null);return s(n,()=>i.current),f(`div`,{ref:i,className:O(`relative overflow-y-auto boltdocs-otp-content`,t),...r,children:e})};q.displayName=`OnThisPageContent`,K.Root=K,K.Header=et,K.Content=q,K.List=({children:e,className:t})=>f(`ul`,{className:O(`relative space-y-1 text-sm border-l border-border-subtle`,t),children:e}),K.Item=({level:e,children:t,className:n})=>f(`li`,{className:O(e===3&&`pl-3`,n),children:t}),K.Link=({children:e,href:t,active:n,onClick:r,className:a})=>{let s=i(U),c=i(W),d=t?H(t):null,p=l(null),[m,h]=u(n);return Je(d&&s?s.find(e=>e.id===d)?.active:null,e=>{e!==null&&e!==m&&(h(!!e),e&&p.current&&c?.current&&he(p.current,{behavior:`smooth`,block:`center`,inline:`center`,scrollMode:`if-needed`,boundary:c.current}))}),o(()=>{n!==void 0&&h(n)},[n]),f(`a`,{ref:p,href:t,onClick:r,"data-active":m,className:O(`block py-1 pl-4 text-[13px] outline-none transition-colors hover:text-text-main`,m?`text-primary-500 font-medium`:`text-text-muted`,a),children:e})},K.Indicator=({style:e,className:t})=>f(`div`,{className:O(`absolute -left-px w-0.5 rounded-full bg-primary-500 transition-all duration-300`,t),style:e});const J=({children:e,className:t})=>f(`nav`,{className:O(`grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle`,t),children:e});J.Root=J,J.Link=({children:e,to:t,direction:n,className:r})=>{let i=n===`next`;return p(m.Link,{href:t,className:O(`flex group items-center p-4 rounded-xl border border-border-subtle bg-bg-surface outline-none`,`transition-all hover:bg-bg-main hover:border-primary-500 hover:shadow-lg`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,i?`text-right justify-end`:`text-left justify-start`,r),children:[!i&&f(ie,{className:`mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1`}),f(`div`,{className:`flex flex-col gap-1 flex-1`,children:e}),i&&f(y,{className:`ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1`})]})},J.Title=({children:e,className:t})=>f(`span`,{className:O(`text-xs font-medium uppercase text-text-muted`,t),children:e}),J.Description=({children:e,className:t})=>f(`span`,{className:O(`text-base font-bold text-text-main truncate`,t),children:e}),J.Icon=({children:e})=>f(d,{children:e});const Y=({children:e,className:t=``,...n})=>f(`div`,{className:O(`w-full`,t),...n,children:e});Y.Root=Y,Y.List=({children:e,className:t=``})=>f(`div`,{role:`tablist`,className:O(`relative flex flex-row items-center border-b border-border-subtle`,t),children:e}),Y.Item=({children:e,id:t,selected:n,className:r=``,...i})=>f(`button`,{role:`tab`,"aria-selected":n,className:O(`flex items-center gap-2 px-4 py-2 text-sm font-medium transition-colors outline-none cursor-pointer bg-transparent border-none`,n?`text-primary-500`:`text-text-muted hover:text-text-main`,r),...i,children:e}),Y.Content=({children:e,className:t=``})=>f(`div`,{className:O(`p-4 outline-none`,t),children:e}),Y.Indicator=({className:e=``,style:t})=>f(`div`,{className:O(`absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300`,e),style:t});const tt=({badge:e})=>{let t={new:`bg-primary-500/20 text-primary-500`,updated:`bg-gray-500/20 text-gray-500`,deprecated:`bg-red-500/20 text-red-500`};if(typeof e==`object`&&e?.expires){let t=new Date(e.expires),n=new Date,r=t.getTime()-n.getTime();if(Math.ceil(r/(1e3*60*60*24))===0)return null}let n=typeof e==`string`?e:e?.text;return f(`span`,{className:O(`ml-auto flex h-4.5 items-center rounded-full text-[9px] font-medium px-1.5 py-0.5 text-center whitespace-nowrap`,t[n]||t.new),children:n})},X=({children:e,className:t})=>f(`aside`,{className:O(`boltdocs-sidebar sticky top-navbar hidden lg:flex flex-col shrink-0`,`w-sidebar h-full`,`overflow-y-auto border-r border-border-subtle bg-bg-main`,`py-6 px-4`,t),children:f(`nav`,{className:`flex-1 space-y-6`,children:e})});X.Root=X,X.Group=({children:e,title:t,icon:n,className:r})=>p(`div`,{className:O(`space-y-1`,r),children:[t&&f(`div`,{className:O(`flex w-full items-center justify-between px-2 py-1.5 text-sm font-semibold`,`text-text-main`),children:p(`div`,{className:`flex items-center gap-2`,children:[n&&f(n,{size:14}),t]})}),e&&f(`div`,{className:`space-y-0.5`,children:e})]}),X.SubGroup=({label:e,href:t,active:n,icon:r,badge:i,className:a,isOpen:o=!1,onToggle:s,children:c})=>p(`div`,{className:`space-y-0.5`,children:[p(`div`,{className:`flex items-center w-full`,children:[p(L,{href:t,className:O(`group flex flex-1 items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm outline-none`,`transition-all duration-200 ease-in-out`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,n?`bg-primary-500/10 text-primary-500 font-medium`:`text-text-muted hover:bg-bg-surface hover:text-text-main hover:translate-x-1`,a),children:[r&&f(r,{size:16,className:O(n?`text-primary-500`:`text-text-muted group-hover:text-text-main`)}),f(`span`,{className:`truncate`,children:e}),i&&f(tt,{badge:i})]}),c&&f(m.Button,{onPress:s,className:`flex items-center justify-center p-1.5 ml-1 rounded-md text-text-muted hover:bg-bg-surface hover:text-text-main transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary-500/30 cursor-pointer`,children:f(y,{size:16,className:O(`transition-transform duration-200`,o&&`rotate-90`)})})]}),o&&c&&f(`div`,{className:`pl-4 ml-[7px] border-l border-border-subtle/50 space-y-0.5 mt-0.5`,children:c})]}),X.GroupItem=({children:e,className:t})=>f(`div`,{className:O(t),children:e}),X.Link=({label:e,href:t,active:n,icon:r,badge:i,className:a})=>p(L,{href:t,className:O(`group flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm outline-none`,`transition-all duration-200 ease-in-out`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,{"bg-primary-500/10 text-primary-500 font-medium":n,"text-text-muted hover:bg-bg-muted hover:text-text-main":!n},a),children:[r&&f(r,{size:16,className:O(n?`text-primary-500`:`text-text-muted group-hover:text-text-main`)}),f(`span`,{className:`truncate`,children:e}),i&&f(tt,{badge:i})]});const Z=({children:e,className:t,...n})=>f(g,{className:O(`flex items-center gap-1.5 pl-0! mb-0 text-sm text-text-muted`,t),...n,children:e});Z.Root=Z,Z.Item=({children:e,className:t,...n})=>f(h,{className:O(`flex items-center mb-0 gap-1.5`,t),...n,children:e}),Z.Link=({children:e,href:t,className:n,...r})=>f(v,{href:t,className:O(`transition-colors outline-none hover:text-text-main focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm`,`current:font-medium current:text-text-main current:pointer-events-none cursor-pointer`,n),...r,children:e}),Z.Separator=({className:e})=>f(y,{size:14,className:O(`shrink-0 text-text-dim`,e)});const nt=({children:e,className:t,vertical:n=!1})=>f(`div`,{className:O(`inline-flex`,n?`flex-col`:`flex-row`,!n&&[`[&>*:not(:first-child)]:-ml-px`,`[&>*:first-child]:rounded-r-none`,`[&>*:last-child]:rounded-l-none`,`[&>*:not(:first-child):not(:last-child)]:rounded-none`,t?.includes(`rounded-full`)&&[`[&>*:first-child]:rounded-l-full`,`[&>*:last-child]:rounded-r-full`],t?.includes(`rounded-xl`)&&[`[&>*:first-child]:rounded-l-xl`,`[&>*:last-child]:rounded-r-xl`],t?.includes(`rounded-lg`)&&[`[&>*:first-child]:rounded-l-lg`,`[&>*:last-child]:rounded-r-lg`]],n&&[`[&>*:not(:first-child)]:-mt-px`,`[&>*:first-child]:rounded-b-none`,`[&>*:last-child]:rounded-t-none`,`[&>*:not(:first-child):not(:last-child)]:rounded-none`,t?.includes(`rounded-full`)&&[`[&>*:first-child]:rounded-t-full`,`[&>*:last-child]:rounded-b-full`]],t),children:e}),Q=({children:e,className:t,showArrow:n,...r})=>p(m.Popover,{offset:8,...r,className:m.composeRenderProps(t,e=>O(`z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none transition-none`,e)),children:[n&&f(m.OverlayArrow,{className:`group`,children:f(`svg`,{viewBox:`0 0 12 12`,className:`block h-3 w-3 fill-bg-surface/80 stroke-border-subtle group-placement-bottom:rotate-180 group-placement-left:-rotate-90 group-placement-right:rotate-90`,"aria-hidden":`true`,children:f(`path`,{d:`M0 0 L6 6 L12 0`})})}),e]});function rt(e){let[n,r]=t.toArray(e.children).slice(0,2);return p(m.MenuTrigger,{...e,children:[n,f(Q,{placement:e.placement,className:`min-w-35`,children:r})]})}function it(e){let[n,r]=t.toArray(e.children).slice(0,2);return p(m.SubmenuTrigger,{...e,children:[n,f(Q,{offset:-4,crossOffset:-4,children:r})]})}function $(e){return f(m.Menu,{...e,className:m.composeRenderProps(e.className,e=>O(`p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75`,e))})}function at(e){let t=e.textValue||(typeof e.children==`string`?e.children:void 0);return f(m.MenuItem,{...e,textValue:t,className:m.composeRenderProps(e.className,(e,{isFocused:t,isPressed:n,isDisabled:r})=>O(`group relative flex flex-row items-center gap-2 px-2 py-1 rounded-lg outline-none cursor-default hover:cursor-pointer transition-none`,`text-text-main text-[12px]`,{"bg-bg-surface-elevated text-primary-600 ring-1 ring-border-strong/5":t,"bg-bg-surface-elevanted":n,"opacity-40 grayscale pointer-events-none":r},e)),children:m.composeRenderProps(e.children,(e,{selectionMode:t,isSelected:n,hasSubmenu:r})=>p(d,{children:[t!==`none`&&p(`span`,{className:`flex items-center size-4 shrink-0 justify-center`,children:[n&&t===`multiple`&&f(ne,{className:`size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200`}),n&&t===`single`&&f(oe,{className:`size-5 text-primary-500 animate-in zoom-in-50 duration-200`})]}),f(`div`,{className:`flex flex-row w-full transition-colors items-center gap-2 py-1 px-1`,children:e}),r&&f(y,{className:`size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors`})]}))})}function ot({title:e,...t}){return p(m.MenuSection,{...t,className:O(`flex flex-col gap-0.5`,t.className),children:[e&&f(m.Header,{className:`px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none`,children:e}),f(m.Collection,{items:t.items,children:t.children})]})}function st(e){return f(m.Separator,{...e,className:`mx-2 my-1.5 border-t border-border-subtle/50`})}$.Root=$,$.Item=at,$.Trigger=rt,$.SubTrigger=it,$.Section=ot,$.Separator=st;function ct({className:e,variant:t=`rect`,...n}){return f(`div`,{className:O(`animate-pulse bg-bg-muted`,t===`circle`?`rounded-full`:`rounded-md`,e),...n})}function lt(e){let{currentLocale:t,currentVersion:n}=F(),[r,i]=u(!1),[a,s]=u(``),[l,d]=u(null);return o(()=>{if(!r||l)return;let e=new ge({preset:`match`,tokenize:`full`,resolution:9,cache:!0});for(let t of _e)e.add(t.id,`${t.title} ${t.content}`);d(e)},[r,l]),{isOpen:r,setIsOpen:i,query:a,setQuery:s,list:c(()=>{if(!a)return e.filter(e=>{let r=!t||e.locale===t,i=!n||e.version===n;return r&&i}).slice(0,10).map(e=>({id:e.path,title:e.title,path:e.path,bio:e.description||``,groupTitle:e.groupTitle}));if(!l)return[];let r=l.search(a,{limit:20,suggest:!0}),i=[],o=new Set;for(let e of r){let r=_e.find(t=>t.id===e);if(!r)continue;let a=!t||r.locale===t,s=!n||r.version===n;!a||!s||o.has(r.url)||(o.add(r.url),i.push({id:r.url,title:r.title,path:r.url,bio:r.display,groupTitle:r.display.split(` > `)[0],isHeading:r.url.includes(`#`)}))}return i.slice(0,10)},[a,l,t,n,e]),input:{value:a,onChange:e=>s(e.target.value)}}}export{Ee as A,E as B,Ie as C,De as D,Pe as E,we as F,ye as H,Me as I,be as L,ke as M,Ne as N,j as O,je as P,k as R,F as S,Oe as T,C as U,D as V,B as _,nt as a,R as b,Y as c,K as d,Qe as f,V as g,G as h,Q as i,Ae as j,Te as k,J as l,Ze as m,ct as n,Z as o,Xe as p,$ as r,X as s,lt as t,$e as u,z as v,N as w,I as x,L as y,O as z};
@@ -1,6 +0,0 @@
1
- /**
2
- * Boltdocs - https://boltdocs.vercel.app
3
- * Copyright (c) 2026 Jesus Alcala
4
- * Licensed under the MIT License.
5
- */
6
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`react-router-dom`),u=require(`react`),d=require(`react/jsx-runtime`),f=require(`react-aria-components`);f=c(f);let p=require(`lucide-react`),m=require(`clsx`),h=require(`tailwind-merge`),g=require(`flexsearch`),_=require(`virtual:boltdocs-search`);_=c(_);const v=Symbol.for(`__BDOCS_BOLTDOCS_CONTEXT__`),y=Symbol.for(`__BDOCS_BOLTDOCS_INSTANCE__`),b=globalThis[v]||(globalThis[v]=(0,u.createContext)(void 0));function x({children:e}){let[t,n]=(0,u.useState)(``),[r,i]=(0,u.useState)(``),[a,o]=(0,u.useState)(!1),s=(0,u.useMemo)(()=>({currentLocale:t,currentVersion:r,setLocale:n,setVersion:i,hasHydrated:a,setHasHydrated:o}),[t,r,a]);return typeof globalThis<`u`&&(globalThis[y]=s),(0,d.jsx)(b.Provider,{value:s,children:e})}function S(){let e=(0,u.use)(b);if(!e&&typeof globalThis<`u`&&globalThis[y])return globalThis[y];if(!e)throw Error(`useBoltdocsContext must be used within a BoltdocsProvider`);return e}const C=Symbol.for(`__BDOCS_CONFIG_CONTEXT__`),w=Symbol.for(`__BDOCS_CONFIG_INSTANCE__`),T=globalThis[C]||(globalThis[C]=(0,u.createContext)(null));function E(){let e=(0,u.use)(T);if(!e&&typeof globalThis<`u`&&globalThis[w])return globalThis[w];if(!e)throw Error(`useConfig must be used within a ConfigProvider`);return e}function D(...e){return(0,h.twMerge)((0,m.clsx)(e))}function O(e){let{size:t=20,...n}=e;return{...n,width:t,height:t}}const k=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...O(e),children:[(0,d.jsx)(`title`,{children:`GitHub`}),(0,d.jsx)(`path`,{d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`})]}),A=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...O(e),children:[(0,d.jsx)(`title`,{children:`Discord`}),(0,d.jsx)(`path`,{d:`M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z`})]}),j=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...O(e),children:[(0,d.jsx)(`title`,{children:`X`}),(0,d.jsx)(`path`,{d:`M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z`})]}),M=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...O(e),children:[(0,d.jsx)(`title`,{children:`Bluesky`}),(0,d.jsx)(`path`,{d:`M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037-.856 3.061-3.978 3.842-6.755 3.37 4.854.826 6.089 3.562 3.422 6.299-5.065 5.196-7.28-1.304-7.847-2.97-.104-.305-.152-.448-.153-.327 0-.121-.05.022-.153.327-.568 1.666-2.782 8.166-7.847 2.97-2.667-2.737-1.432-5.473 3.422-6.3-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026`})]}),ee=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...O(e),children:[(0,d.jsx)(`title`,{children:`TypeScript`}),(0,d.jsx)(`path`,{fill:`#2563EB`,d:`M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z`})]}),te=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...O(e),children:[(0,d.jsx)(`title`,{children:`JavaScript`}),(0,d.jsx)(`path`,{fill:`#F59E0B`,d:`M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z`})]}),N=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...O(e),children:[(0,d.jsx)(`title`,{children:`JSON`}),(0,d.jsx)(`path`,{fill:`#F59E0B`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),P=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...O(e),children:[(0,d.jsx)(`title`,{children:`CSS`}),(0,d.jsx)(`path`,{fill:`#0EA5E9`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),F=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...O(e),children:[(0,d.jsx)(`title`,{children:`HTML`}),(0,d.jsx)(`path`,{fill:`#EA580C`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),I=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...O(e),children:[(0,d.jsx)(`title`,{children:`React`}),(0,d.jsx)(`path`,{fill:`#0E8ADC`,d:`M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z`}),(0,d.jsx)(`path`,{stroke:`#0E8ADC`,d:`M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z`}),(0,d.jsx)(`path`,{stroke:`#0E8ADC`,d:`M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z`}),(0,d.jsx)(`path`,{stroke:`#0E8ADC`,d:`M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z`})]}),L=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...O(e),children:[(0,d.jsx)(`title`,{children:`Markdown`}),(0,d.jsx)(`path`,{fill:`#60A5FA`,d:`M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z`})]}),R=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 25 24`,...O(e),children:[(0,d.jsx)(`title`,{children:`Shell`}),(0,d.jsx)(`path`,{stroke:`#14B8A6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M4.336 17l6-6-6-6M12.336 19h8`})]}),z=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...O(e),children:[(0,d.jsx)(`title`,{children:`YAML`}),(0,d.jsx)(`path`,{fill:`#A78BFA`,d:`M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z`})]}),B=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 25 24`,...O(e),children:[(0,d.jsx)(`title`,{children:`Rust`}),(0,d.jsx)(`path`,{fill:`#EA580C`,fillRule:`evenodd`,d:`M12.58 2.136a.287.287 0 00-.488 0l-.526.85a8.974 8.974 0 00-.232.022l-.683-.73a.287.287 0 00-.478.096l-.35.935c-.075.021-.15.044-.224.067l-.812-.583a.287.287 0 00-.45.187l-.162.989a9.088 9.088 0 00-.204.11l-.913-.417a.287.287 0 00-.406.272l.036 1.005a9.099 9.099 0 00-.175.144l-.98-.231a.287.287 0 00-.345.345l.231.98a9.125 9.125 0 00-.144.175L4.27 6.316a.287.287 0 00-.271.406l.416.913a9.036 9.036 0 00-.11.203L3.317 8a.287.287 0 00-.187.45l.584.813a8.953 8.953 0 00-.068.223l-.935.35a.287.287 0 00-.095.479l.73.682a8.966 8.966 0 00-.023.233l-.85.526a.287.287 0 000 .488l.85.526c.007.078.014.156.023.233l-.73.682a.287.287 0 00.095.479l.935.35.068.223-.584.812a.287.287 0 00.187.451l.99.162c.035.068.072.135.109.203l-.416.913a.287.287 0 00.271.406l1.006-.036c.047.059.095.117.143.174l-.23.981a.287.287 0 00.344.345l.981-.23c.057.048.115.095.174.142l-.036 1.006a.287.287 0 00.406.272l.914-.417c.067.038.135.074.203.11l.161.99a.287.287 0 00.451.186l.813-.584c.074.024.148.046.223.068l.35.935a.287.287 0 00.478.095l.683-.73c.077.01.154.017.232.023l.526.85a.287.287 0 00.489 0l.526-.85c.078-.006.155-.014.232-.023l.682.73a.287.287 0 00.479-.095l.35-.935c.075-.022.15-.044.223-.068l.813.584a.287.287 0 00.45-.187l.162-.99a8.77 8.77 0 00.203-.109l.913.417a.287.287 0 00.406-.272l-.035-1.006c.058-.047.116-.094.174-.143l.98.231a.287.287 0 00.346-.345l-.231-.98.143-.175 1.006.036a.287.287 0 00.271-.406l-.416-.913a9.4 9.4 0 00.109-.203l.99-.162a.287.287 0 00.187-.45l-.584-.813a8.43 8.43 0 00.067-.223l.935-.35a.287.287 0 00.096-.479l-.73-.682c.009-.077.016-.155.023-.233l.85-.526a.287.287 0 000-.488l-.85-.526a8.844 8.844 0 00-.023-.233l.73-.682a.287.287 0 00-.096-.479l-.934-.35a9.246 9.246 0 00-.068-.223l.584-.812A.287.287 0 0021.357 8l-.99-.162a8.92 8.92 0 00-.11-.203l.417-.913a.287.287 0 00-.271-.406l-1.006.036a9.178 9.178 0 00-.143-.174l.23-.981a.287.287 0 00-.345-.345l-.98.23a9.43 9.43 0 00-.174-.142l.035-1.006a.287.287 0 00-.405-.272l-.914.417a9.11 9.11 0 00-.203-.11l-.162-.99a.287.287 0 00-.45-.186l-.813.584a9.088 9.088 0 00-.223-.068l-.35-.935a.287.287 0 00-.479-.095l-.682.73a9.062 9.062 0 00-.232-.023l-.526-.85zm-.257 1.62a.592.592 0 01.578.596.595.595 0 11-.578-.595zm1.363.98A7.324 7.324 0 0118.7 8.309l-.702 1.585a.547.547 0 00.275.717l1.352.6c.041.422.047.847.015 1.27h-.752c-.075 0-.106.05-.106.123v.344c0 .812-.457.99-.859 1.034-.383.044-.806-.161-.86-.394-.22-1.24-.583-1.526-1.152-1.975l-.041-.033c.736-.467 1.502-1.158 1.502-2.08 0-.998-.683-1.625-1.148-1.934-.655-.43-1.379-.516-1.574-.516H6.88a7.324 7.324 0 014.098-2.312l.916.96a.54.54 0 00.766.018l1.026-.978zm-8.46 4.407a.595.595 0 11-.034 1.19.595.595 0 01.034-1.19zm14.192.026a.595.595 0 11-.035 1.19.595.595 0 01.035-1.19zm-13.07.096h1.037v4.678H5.291a7.324 7.324 0 01-.237-2.797l1.282-.57a.542.542 0 00.276-.716l-.264-.595zm4.33.05h2.47c.128 0 .901.147.901.727 0 .48-.593.653-1.081.653h-2.293l.002-1.38zm0 3.36h1.892c.172 0 .924.05 1.164 1.011.026.104.064.291.107.503.078.389.174.861.247 1.06.113.345.57 1.034 1.058 1.034h3.089c-.207.277-.433.54-.677.785l-1.258-.27a.544.544 0 00-.645.417l-.298 1.394a7.323 7.323 0 01-6.108-.03l-.298-1.392a.542.542 0 00-.643-.418l-1.23.264a7.32 7.32 0 01-.636-.75h5.984c.067 0 .113-.011.113-.074v-2.117c0-.061-.046-.075-.113-.075h-1.75l.001-1.341zm-2.763 4.848a.595.595 0 11-.034 1.19.595.595 0 01.034-1.19zm8.814.027a.596.596 0 11-.035 1.19.596.596 0 01.035-1.19z`,clipRule:`evenodd`})]}),V=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...O(e),children:[(0,d.jsx)(`title`,{children:`Rust`}),(0,d.jsx)(`path`,{fill:`#F87171`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),H=(0,u.createContext)({routes:[]});function U(){return(0,u.useContext)(H)}function W({routes:e,children:t}){return(0,d.jsx)(H.Provider,{value:{routes:e},children:t})}function G(){let{routes:e}=U(),t=E(),n=(0,l.useLocation)(),{hasHydrated:r,currentLocale:i,currentVersion:a}=S(),o=e=>e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e,s=o(n.pathname),c=e?.find?.(e=>o(e.path)===s),u=t.i18n?c?.locale||(r?i:void 0)||t.i18n.defaultLocale:void 0,d=t.versions?c?.version||(r?a:void 0)||t.versions.defaultVersion:void 0,f=e?.filter?.(n=>{let r=t.i18n?(n.locale||t.i18n.defaultLocale)===u:!0,i=t.versions?(n.version||t.versions.defaultVersion)===d:!0;if(!(r&&i))return!1;let a=t.i18n;if(a){let t=!!c?.locale,r=!!n.locale;if(e?.some?.(e=>e!==n&&e.filePath===n.filePath&&e.version===n.version&&(e.locale||a.defaultLocale)===(n.locale||a.defaultLocale))&&t!==r)return!1}return!0}),p=t.i18n?.localeConfigs?.[u]?.label||t.i18n?.locales[u]||u,m=t.versions?.versions?.find?.(e=>e.path===d)?.label||d;return{routes:f,allRoutes:e,currentRoute:c,currentLocale:u,currentLocaleLabel:p,availableLocales:t.i18n?Object.entries(t.i18n.locales).map(([e,n])=>({key:e,label:t.i18n?.localeConfigs?.[e]?.label||n,isCurrent:e===u})):[],currentVersion:d,currentVersionLabel:m,availableVersions:t.versions?t.versions.versions.map(e=>({key:e.path,label:e.label,isCurrent:e.path===d})):[],config:t}}function K(e){let t=E(),{currentLocale:n,currentVersion:r}=G();if(!t||typeof e!=`string`||e.startsWith(`http`)||e.startsWith(`//`))return e;let i=t.i18n,a=t.versions;if(!i&&!a)return e;let o=e.startsWith(`/docs`),s=e.split(`/`).filter(Boolean),c=0;s[c]===`docs`&&c++,a&&s.length>c&&a.versions.find(e=>e.path===s[c])&&c++,i&&s.length>c&&i.locales[s[c]]&&c++;let l=s.slice(c),u=[];o&&(u.push(`docs`),a&&r&&u.push(r)),i&&n&&n!==i.defaultLocale&&u.push(n),u.push(...l);let d=`/${u.join(`/`)}`;return d.length>1&&d.endsWith(`/`)?d.slice(0,-1):d||`/`}const q=(0,u.forwardRef)((e,t)=>{let{href:n,prefetch:r=`hover`,onMouseEnter:i,onFocus:a,...o}=e,s=K(n??``),c=e=>{i?.(e)},l=e=>{a?.(e)};return(0,d.jsx)(f.Link,{...o,ref:t,href:s,onMouseEnter:c,onFocus:l})});q.displayName=`Link`;const J=(0,u.forwardRef)((e,t)=>{let{href:n,end:r=!1,className:i,children:a,...o}=e,s=(0,l.useLocation)(),c=K(n??``),u=r?s.pathname===c:s.pathname.startsWith(c),f=typeof i==`function`?i({isActive:u}):D(i,u&&`active`),p=typeof a==`function`?a({isActive:u}):a;return(0,d.jsx)(q,{...o,ref:t,href:n,className:f,children:p})});J.displayName=`NavLink`;const Y=({children:e,className:t,...n})=>(0,d.jsx)(`header`,{className:D(`boltdocs-navbar sticky top-0 z-50 w-full border-b border-border-subtle bg-bg-main/80 backdrop-blur-md`,t),...n,children:e}),X=({children:e,className:t})=>(0,d.jsx)(`div`,{className:D(`mx-auto flex lg:h-navbar max-w-(--breakpoint-3xl) items-center justify-between px-4 md:px-6`,t),children:e}),Z=({children:e,className:t})=>(0,d.jsx)(`div`,{className:D(`flex flex-1 items-center justify-start gap-4 min-w-0`,t),children:e}),ne=({children:e,className:t})=>(0,d.jsx)(`div`,{className:D(`flex flex-1 items-center justify-end gap-2 md:gap-4 min-w-0`,t),children:e}),re=({children:e,className:t})=>(0,d.jsx)(`div`,{className:D(`hidden lg:flex flex-1 justify-center items-center gap-4 px-4 min-w-0 w-full`,t),children:e}),ie=({src:e,alt:t,width:n=24,height:r=24,className:i})=>(0,d.jsx)(q,{href:`/`,className:D(`flex items-center gap-2 shrink-0 outline-none`,i),children:e?(0,d.jsx)(`img`,{src:e,alt:t,width:n,height:r,className:`h-6 w-6 object-contain`}):null}),ae=({children:e,className:t})=>(0,d.jsx)(q,{href:`/`,children:(0,d.jsx)(`span`,{className:D(`text-lg font-bold tracking-tight hidden sm:inline-block`,t),children:e})}),oe=({children:e,className:t})=>(0,d.jsx)(`nav`,{className:D(`hidden md:flex items-center gap-6 text-sm font-medium`,t),children:e}),se=({label:e,href:t,active:n,to:r,className:i})=>(0,d.jsxs)(q,{href:t,target:r===`external`?`_blank`:void 0,className:D(`transition-colors outline-none font-medium focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm`,{"text-primary-500":n,"text-text-muted hover:text-text-main":!n},i),children:[e,r===`external`&&(0,d.jsx)(`span`,{className:`ml-1 inline-block`,children:(0,d.jsx)(p.ExternalLink,{size:12})})]}),Q=({className:e,onPress:t})=>{let[n,r]=(0,u.useState)(!1),i=n&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);return(0,u.useEffect)(()=>{r(!0)},[]),(0,d.jsxs)(f.Button,{onPress:t,className:D(`flex items-center gap-2 rounded-full border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-muted outline-none cursor-pointer`,`transition-all duration-200 hover:border-border-strong hover:text-text-main hover:bg-bg-muted hover:shadow-sm active:scale-[0.98]`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,`w-full max-w-[720px] justify-between`,e),children:[(0,d.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,d.jsx)(p.Search,{size:16}),(0,d.jsx)(`span`,{className:`hidden sm:inline-block`,children:`Search docs...`})]}),(0,d.jsxs)(`div`,{className:`hidden sm:flex items-center gap-1 pointer-events-none select-none`,children:[(0,d.jsx)(`kbd`,{className:`flex h-5 items-center justify-center rounded border border-border-subtle bg-bg-main px-1.5 font-mono text-[10px] font-medium`,children:i?`⌘`:`Ctrl`}),(0,d.jsx)(`kbd`,{className:`flex h-5 w-5 items-center justify-center rounded border border-border-subtle bg-bg-main font-mono text-[10px] font-medium`,children:`K`})]})]})},ce=({className:e,theme:t,onThemeChange:n})=>(0,d.jsx)(f.ToggleButton,{isSelected:t===`dark`,onChange:n,className:D(`rounded-md p-2 text-text-muted outline-none cursor-pointer`,`transition-all duration-300 hover:bg-bg-surface hover:text-text-main hover:rotate-12 active:scale-90`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,e),"aria-label":`Toggle theme`,children:t===`dark`?(0,d.jsx)(p.Sun,{size:20}):(0,d.jsx)(p.Moon,{size:20})}),le=({name:e})=>{if(e===`github`)return(0,d.jsx)(k,{});if(e===`discord`)return(0,d.jsx)(A,{});if(e===`x`)return(0,d.jsx)(j,{});if(e===`bluesky`)return(0,d.jsx)(M,{})};Y.Root=Y,Y.Left=Z,Y.Right=ne,Y.Center=re,Y.Logo=ie,Y.Title=ae,Y.Links=oe,Y.Link=se,Y.SearchTrigger=Q,Y.Theme=ce,Y.Socials=({icon:e,link:t,className:n})=>(0,d.jsx)(q,{href:t,target:`_blank`,rel:`noopener noreferrer`,className:D(`rounded-md p-2 text-text-muted outline-none transition-colors`,`hover:bg-bg-surface hover:text-text-main`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,n),children:(0,d.jsx)(le,{name:e})}),Y.Split=({className:e})=>(0,d.jsx)(f.Separator,{orientation:`vertical`,className:D(`h-6 w-px bg-border-subtle mx-1`,e)}),Y.Content=X;const $=({children:e,isOpen:t,onOpenChange:n,className:r})=>(0,d.jsx)(f.ModalOverlay,{isOpen:t,onOpenChange:n,isDismissable:!0,className:D(`fixed inset-0 z-100 bg-black/40 backdrop-blur-sm px-4 py-4 sm:py-20`,`entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out`),children:(0,d.jsx)(f.Modal,{className:D(`mx-auto w-full max-w-2xl overflow-hidden rounded-xl border border-border-subtle bg-bg-surface shadow-2xl ring-1 ring-black/5 outline-none`,`entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95`,r),children:(0,d.jsx)(f.Dialog,{className:`flex flex-col max-h-[70vh] focus:outline-none`,children:e})})});$.Root=$,$.Autocomplete=({children:e,className:t,onSelectionChange:n,...r})=>{let i=f.Autocomplete;return(0,d.jsx)(`div`,{className:t,children:(0,d.jsx)(i,{...r,onSelectionChange:n,className:`flex flex-col min-h-0`,children:e})})},$.Input=({className:e,...t})=>(0,d.jsxs)(f.SearchField,{className:`flex items-center gap-3 border-b border-border-subtle px-4 py-4`,autoFocus:!0,children:[(0,d.jsx)(p.Search,{className:`h-5 w-5 text-text-muted`}),(0,d.jsx)(f.Input,{...t,className:D(`w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none`,e),placeholder:`Search documentation...`}),(0,d.jsx)(`div`,{className:`flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-main px-1.5 py-1 text-[10px] font-medium text-text-muted`,children:(0,d.jsx)(`kbd`,{className:`font-sans`,children:`ESC`})})]}),$.List=({children:e,className:t,...n})=>(0,d.jsx)(f.ListBox,{...n,className:D(`flex-1 overflow-y-auto p-2 outline-none`,t),children:e}),$.Item=Object.assign(({children:e,className:t,...n})=>(0,d.jsx)(f.ListBoxItem,{...n,className:D(`group flex items-center gap-3 rounded-lg p-3 text-left outline-none cursor-pointer transition-colors`,`text-text-muted hover:bg-bg-main hover:text-text-main focus:bg-primary-500 focus:text-white selected:bg-primary-500 selected:text-white`,t),children:t=>(0,d.jsxs)(d.Fragment,{children:[e,(t.isFocused||t.isSelected)&&(0,d.jsxs)(`div`,{className:`ml-auto opacity-50 flex items-center gap-1`,children:[(0,d.jsx)(`span`,{className:`text-[10px]`,children:`Select`}),(0,d.jsx)(p.CornerDownLeft,{size:10})]})]})}),{Icon:({isHeading:e,className:t})=>(0,d.jsx)(`div`,{className:D(`shrink-0`,t),children:e?(0,d.jsx)(p.Hash,{size:18}):(0,d.jsx)(p.FileText,{size:18})}),Title:({children:e,className:t})=>(0,d.jsx)(`span`,{className:D(`block font-medium truncate flex-1 text-sm`,t),children:e}),Bio:({children:e,className:t})=>(0,d.jsx)(`span`,{className:D(`ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100`,t),children:e})});function ue(e){let{currentLocale:t,currentVersion:n}=G(),[r,i]=(0,u.useState)(!1),[a,o]=(0,u.useState)(``),[s,c]=(0,u.useState)(null);return(0,u.useEffect)(()=>{if(!r||s)return;let e=new g.Index({preset:`match`,tokenize:`full`,resolution:9,cache:!0});for(let t of _.default)e.add(t.id,`${t.title} ${t.content}`);c(e)},[r,s]),{isOpen:r,setIsOpen:i,query:a,setQuery:o,list:(0,u.useMemo)(()=>{if(!a)return e.filter(e=>{let r=!t||e.locale===t,i=!n||e.version===n;return r&&i}).slice(0,10).map(e=>({id:e.path,title:e.title,path:e.path,bio:e.description||``,groupTitle:e.groupTitle}));if(!s)return[];let r=s.search(a,{limit:20,suggest:!0}),i=[],o=new Set;for(let e of r){let r=_.default.find(t=>t.id===e);if(!r)continue;let a=!t||r.locale===t,s=!n||r.version===n;!a||!s||o.has(r.url)||(o.add(r.url),i.push({id:r.url,title:r.title,path:r.url,bio:r.display,groupTitle:r.display.split(` > `)[0],isHeading:r.url.includes(`#`)}))}return i.slice(0,10)},[a,s,t,n,e]),input:{value:a,onChange:e=>o(e.target.value)}}}Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return ee}});
@@ -1,89 +0,0 @@
1
- import { DocsLayout } from './docs-layout'
2
- import { Navbar } from './ui-base/navbar'
3
- import { Sidebar } from './ui-base/sidebar'
4
- import { OnThisPage } from './ui-base/on-this-page'
5
- import { Head } from './ui-base/head'
6
- import { Breadcrumbs } from './ui-base/breadcrumbs'
7
- import { PageNav } from './ui-base/page-nav'
8
- import { ErrorBoundary } from './ui-base/error-boundary'
9
- import { CopyMarkdown } from './ui-base/copy-markdown'
10
- import { useRoutes } from '../hooks/use-routes'
11
- import { useConfig } from '../app/config-context'
12
- import { useMdxComponents } from '../app/mdx-components-context'
13
- import { useLocation } from 'react-router-dom'
14
- import { getTranslated } from '../utils/i18n'
15
-
16
- export interface LayoutProps {
17
- children: React.ReactNode
18
- }
19
-
20
- /**
21
- * The built-in default layout for Boltdocs.
22
- * Users who create their own `layout.tsx` can import the same building blocks
23
- * and rearrange, wrap, or replace any section.
24
- */
25
- export function DefaultLayout({ children }: LayoutProps) {
26
- const {
27
- routes: filteredRoutes,
28
- allRoutes,
29
- currentRoute,
30
- currentLocale,
31
- } = useRoutes()
32
- const { pathname } = useLocation()
33
- const config = useConfig()
34
- const mdxComponents = useMdxComponents()
35
- const CopyMarkdownComp = (mdxComponents.CopyMarkdown as any) || CopyMarkdown
36
-
37
- const isDocs = pathname.startsWith('/docs')
38
-
39
- return (
40
- <DocsLayout>
41
- <Head
42
- siteTitle={
43
- getTranslated(config.theme?.title, currentLocale) || 'Boltdocs'
44
- }
45
- siteDescription={
46
- getTranslated(config.theme?.description, currentLocale) || ''
47
- }
48
- routes={allRoutes}
49
- />
50
- <Navbar />
51
-
52
- <DocsLayout.Body>
53
- {isDocs && <Sidebar routes={filteredRoutes} config={config} />}
54
-
55
- <DocsLayout.Content>
56
- <DocsLayout.ContentMdx>
57
- {isDocs && (
58
- <DocsLayout.ContentHeader>
59
- <Breadcrumbs />
60
- <CopyMarkdownComp
61
- mdxRaw={currentRoute?._rawContent}
62
- route={currentRoute}
63
- config={config.theme?.copyMarkdown}
64
- />
65
- </DocsLayout.ContentHeader>
66
- )}
67
-
68
- <ErrorBoundary>{children}</ErrorBoundary>
69
-
70
- {isDocs && (
71
- <DocsLayout.ContentFooter>
72
- <PageNav />
73
- </DocsLayout.ContentFooter>
74
- )}
75
- </DocsLayout.ContentMdx>
76
- </DocsLayout.Content>
77
-
78
- {isDocs && (
79
- <OnThisPage
80
- headings={currentRoute?.headings}
81
- editLink={config.theme?.editLink}
82
- communityHelp={config.theme?.communityHelp}
83
- filePath={currentRoute?.filePath}
84
- />
85
- )}
86
- </DocsLayout.Body>
87
- </DocsLayout>
88
- )
89
- }