mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-08 22:03:01 +02:00
5 lines
No EOL
31 KiB
JavaScript
5 lines
No EOL
31 KiB
JavaScript
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["80220"],{16688:function(e,n,t){t.d(n,{Z:()=>r});let r={copyButtonCopied:"copyButtonCopied_wDuR",copyButtonIcons:"copyButtonIcons_gMWc",copyButtonIcon:"copyButtonIcon_GXfb",copyButtonSuccessIcon:"copyButtonSuccessIcon_ktUX"}},61475:function(e,n,t){t.d(n,{Z:()=>r});let r={wordWrapButtonIcon:"wordWrapButtonIcon___5r",wordWrapButtonEnabled:"wordWrapButtonEnabled_nam_"}},62081:function(e,n,t){t.d(n,{Z:()=>r});let r={buttonGroup:"buttonGroup_KXnS"}},58683:function(e,n,t){t.d(n,{Z:()=>r});let r={codeBlockContainer:"codeBlockContainer_jDV4"}},18314:function(e,n,t){t.d(n,{Z:()=>r});let r={codeBlock:"codeBlock_Gebt",codeBlockStandalone:"codeBlockStandalone_i_cY",codeBlockLines:"codeBlockLines_FJaf",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_FU9Q"}},13112:function(e,n,t){t.d(n,{Z:()=>r});let r={codeBlockContent:"codeBlockContent_cKMj",codeBlockTitle:"codeBlockTitle_U6Q0",codeBlock:"codeBlock_QST6"}},61562:function(e,n,t){t.d(n,{Z:()=>r});let r={codeLine:"codeLine_qRmp",codeLineNumber:"codeLineNumber_dS_J",codeLineContent:"codeLineContent_XF5l"}},55701:function(e,n,t){t.d(n,{Z:()=>r});let r={tabItem:"tabItem_pnkT"}},93195:function(e,n,t){t.d(n,{Z:()=>r});let r={tabList:"tabList_Qoir",tabItem:"tabItem_AQgk"}},43335:function(e,n,t){t.d(n,{Z:()=>r});let r={playgroundContainer:"playgroundContainer_TDLX"}},7512:function(e,n,t){t.d(n,{Z:()=>r});let r={playgroundEditor:"playgroundEditor_uqZ4"}},926:function(e,n,t){t.d(n,{Z:()=>r});let r={playgroundHeader:"playgroundHeader_h_Hu"}},25562:function(e,n,t){t.d(n,{Z:()=>r});let r={playgroundPreview:"playgroundPreview_u2xE"}},70059:function(e,n,t){t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>u,default:()=>p,frontMatter:()=>i,metadata:()=>r,toc:()=>h});var r=t(51482),a=t(85893),s=t(80980),c=t(4575),l=t(54636),o=t(21143);let i={},u="Canary releases",d={},h=[{value:"Canary npm dist tag",id:"canary-npm-dist-tag",level:2},{value:"Using a canary release",id:"using-a-canary-release",level:2}];function m(e){let n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"canary-releases",children:"Canary releases"})}),"\n","\n",(0,a.jsxs)(o.mC,{children:[(0,a.jsx)(n.p,{children:"Docusaurus has a canary releases system."}),(0,a.jsxs)(n.p,{children:["It permits you to ",(0,a.jsx)(n.strong,{children:"test new unreleased features"})," as soon as the pull requests are merged."]}),(0,a.jsxs)(n.p,{children:["It is a good way to ",(0,a.jsx)(n.strong,{children:"give feedback to maintainers"}),", ensuring the newly implemented feature works as intended."]}),(0,a.jsxs)(n.admonition,{type:"note",children:[(0,a.jsx)(n.p,{children:"Using a canary release in production might seem risky, but in practice, it's not."}),(0,a.jsx)(n.p,{children:"A canary release passes all automated tests and is used in production by the Docusaurus site itself."})]}),(0,a.jsx)(o.UM,{children:(0,a.jsx)(n.admonition,{type:"warning",children:(0,a.jsxs)(n.p,{children:["The canary version shown below ",(0,a.jsx)(n.strong,{children:"may not be up-to-date"}),". Please go to the ",(0,a.jsx)(n.a,{href:"https://www.npmjs.com/package/@docusaurus/core?activeTab=versions",children:"npm page"})," to find the actual version name."]})})}),(0,a.jsx)(o.FS,{children:(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["The canary version shown below is directly fetched from npm and ",(0,a.jsx)(n.strong,{children:"is up-to-date"}),". You can directly use these numbers in your package.json."]})})}),(0,a.jsx)(n.h2,{id:"canary-npm-dist-tag",children:"Canary npm dist tag"}),(0,a.jsxs)(n.p,{children:["For any code-related commit on ",(0,a.jsx)(n.code,{children:"main"}),", the continuous integration will publish a canary release under the ",(0,a.jsx)(n.code,{children:"@canary"})," npm dist tag. It generally takes up to 10 minutes."]}),(0,a.jsxs)(n.p,{children:["You can see on ",(0,a.jsx)(n.a,{href:"https://www.npmjs.com/package/@docusaurus/core?activeTab=versions",children:"npm"})," the current dist tags:"]}),(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"latest"}),": stable releases (Current: ",(0,a.jsx)(o.SR,{}),")"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"canary"}),": canary releases (",(0,a.jsx)(o.I1,{}),")"]}),"\n"]}),(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["Make sure to use the latest canary release and check the publication date (sometimes the publish process fails). ",(0,a.jsx)(o.rv,{})]})}),(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["Canary versions follow the naming convention ",(0,a.jsx)(n.code,{children:"0.0.0-commitNumber"}),"."]})}),(0,a.jsx)(n.h2,{id:"using-a-canary-release",children:"Using a canary release"}),(0,a.jsxs)(n.p,{children:["Take the latest version published under the ",(0,a.jsx)(n.a,{href:"https://www.npmjs.com/package/@docusaurus/core?activeTab=versions",children:"canary npm dist tag"})," (",(0,a.jsx)(o.I1,{}),")."]}),(0,a.jsxs)(n.p,{children:["Use it for all the ",(0,a.jsx)(n.code,{children:"@docusaurus/*"})," dependencies in your ",(0,a.jsx)(n.code,{children:"package.json"}),":"]}),(0,a.jsx)(o.Hc,{}),(0,a.jsx)(n.p,{children:"Then, install the dependencies again and start your site:"}),(0,a.jsxs)(c.Z,{children:[(0,a.jsx)(l.Z,{value:"npm",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"npm install\nnpm start\n"})})}),(0,a.jsx)(l.Z,{value:"yarn",label:"Yarn",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"yarn install\nyarn start\n"})})}),(0,a.jsx)(l.Z,{value:"pnpm",label:"pnpm",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"pnpm install\npnpm start\n"})})}),(0,a.jsx)(l.Z,{value:"bun",label:"Bun",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"bun install\nbun start\n"})})})]}),(0,a.jsxs)(n.p,{children:["You can also upgrade the ",(0,a.jsx)(n.code,{children:"@docusaurus/*"})," packages with command line:"]}),(0,a.jsxs)(c.Z,{children:[(0,a.jsx)(l.Z,{value:"npm",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"npm install --save-exact @docusaurus/core@canary @docusaurus/preset-classic@canary\n"})})}),(0,a.jsx)(l.Z,{value:"yarn",label:"Yarn",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"yarn add --exact @docusaurus/core@canary @docusaurus/preset-classic@canary\n"})})}),(0,a.jsx)(l.Z,{value:"pnpm",label:"pnpm",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"pnpm add --save-exact @docusaurus/core@canary @docusaurus/preset-classic@canary\n"})})}),(0,a.jsx)(l.Z,{value:"bun",label:"Bun",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"bun add --exact @docusaurus/core@canary @docusaurus/preset-classic@canary\n"})})})]}),(0,a.jsxs)(n.admonition,{type:"warning",children:[(0,a.jsxs)(n.p,{children:["Make sure to include all the ",(0,a.jsx)(n.code,{children:"@docusaurus/*"})," packages."]}),(0,a.jsxs)(n.p,{children:["For canary releases, prefer using an exact version instead of a semver range (avoid the ",(0,a.jsx)(n.code,{children:"^"})," prefix)."]})]})]})]})}function p(e={}){let{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(m,{...e})}):m(e)}},5343:function(e,n,t){t.d(n,{Z:()=>s});var r=t(85893);t(67294);var a=t(90496);function s(e){let{className:n,...t}=e;return(0,r.jsx)("button",{type:"button",...t,className:(0,a.Z)("clean-btn",n)})}},2556:function(e,n,t){t.d(n,{Z:()=>m});var r=t(85893),a=t(67294),s=t(90496),c=t(44771),l=t(77827),o=t(88568),i=t(5343),u=t(31660),d=t(87545),h=t(16688);function m(e){let{className:n}=e,{copyCode:t,isCopied:m}=function(){let{metadata:{code:e}}=(0,o.LS)(),[n,t]=(0,a.useState)(!1),r=(0,a.useRef)(void 0),s=(0,a.useCallback)(()=>{(0,c.Z)(e),t(!0),r.current=window.setTimeout(()=>{t(!1)},1e3)},[e]);return(0,a.useEffect)(()=>()=>window.clearTimeout(r.current),[]),{copyCode:s,isCopied:n}}();return(0,r.jsx)(i.Z,{"aria-label":m?(0,l.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,l.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,l.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,s.Z)(n,h.Z.copyButton,m&&h.Z.copyButtonCopied),onClick:t,children:(0,r.jsxs)("span",{className:h.Z.copyButtonIcons,"aria-hidden":"true",children:[(0,r.jsx)(u.Z,{className:h.Z.copyButtonIcon}),(0,r.jsx)(d.Z,{className:h.Z.copyButtonSuccessIcon})]})})}},93757:function(e,n,t){t.d(n,{Z:()=>u});var r=t(85893);t(67294);var a=t(90496),s=t(77827),c=t(88568),l=t(5343),o=t(67379),i=t(61475);function u(e){let{className:n}=e,{wordWrap:t}=(0,c.LS)();if(!(t.isEnabled||t.isCodeScrollable))return!1;let u=(0,s.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,r.jsx)(l.Z,{onClick:()=>t.toggle(),className:(0,a.Z)(n,t.isEnabled&&i.Z.wordWrapButtonEnabled),"aria-label":u,title:u,children:(0,r.jsx)(o.Z,{className:i.Z.wordWrapButtonIcon,"aria-hidden":"true"})})}},37457:function(e,n,t){t.d(n,{Z:()=>i});var r=t(85893);t(67294);var a=t(90496),s=t(56497),c=t(2556),l=t(93757),o=t(62081);function i(e){let{className:n}=e;return(0,r.jsx)(s.Z,{children:()=>(0,r.jsxs)("div",{className:(0,a.Z)(n,o.Z.buttonGroup),children:[(0,r.jsx)(l.Z,{}),(0,r.jsx)(c.Z,{})]})})}},62302:function(e,n,t){t.d(n,{Z:()=>i});var r=t(85893);t(67294);var a=t(90496),s=t(10099),c=t(55951),l=t(88568),o=t(58683);function i(e){let{as:n,...t}=e,i=(0,s.p)(),u=(0,l.QC)(i);return(0,r.jsx)(n,{...t,style:u,className:(0,a.Z)(t.className,o.Z.codeBlockContainer,c.k.common.codeBlock)})}},93002:function(e,n,t){t.d(n,{Z:()=>l});var r=t(85893);t(67294);var a=t(90496),s=t(62302),c=t(18314);function l(e){let{children:n,className:t}=e;return(0,r.jsx)(s.Z,{as:"pre",tabIndex:0,className:(0,a.Z)(c.Z.codeBlockStandalone,"thin-scrollbar",t),children:(0,r.jsx)("code",{className:c.Z.codeBlockLines,children:n})})}},97061:function(e,n,t){t.d(n,{Z:()=>o});var r=t(85893);t(67294);var a=t(26378),s=t(88568),c=t(63461),l=t(65802);function o(e){let n=function(e){let{prism:n}=(0,a.L)();return(0,s.MA)({code:e.children,className:e.className,metastring:e.metastring,magicComments:n.magicComments,defaultLanguage:n.defaultLanguage,language:e.language,title:e.title,showLineNumbers:e.showLineNumbers})}(e),t=(0,c.F)();return(0,r.jsx)(s.EF,{metadata:n,wordWrap:t,children:(0,r.jsx)(l.Z,{})})}},26965:function(e,n,t){t.d(n,{Z:()=>m});var r=t(85893),a=t(67294),s=t(90496),c=t(88568),l=t(10099),o=t(7316),i=t(32028),u=t(18314);let d=a.forwardRef((e,n)=>(0,r.jsx)("pre",{ref:n,tabIndex:0,...e,className:(0,s.Z)(e.className,u.Z.codeBlock,"thin-scrollbar")}));function h(e){let{metadata:n}=(0,c.LS)();return(0,r.jsx)("code",{...e,className:(0,s.Z)(e.className,u.Z.codeBlockLines,void 0!==n.lineNumbersStart&&u.Z.codeBlockLinesWithNumbering),style:{...e.style,counterReset:void 0===n.lineNumbersStart?void 0:`line-count ${n.lineNumbersStart-1}`}})}function m(e){let{className:n}=e,{metadata:t,wordWrap:a}=(0,c.LS)(),u=(0,l.p)(),{code:m,language:p,lineNumbersStart:f,lineClassNames:x}=t;return(0,r.jsx)(o.y$,{theme:u,code:m,language:p,children:e=>{let{className:t,style:c,tokens:l,getLineProps:o,getTokenProps:u}=e;return(0,r.jsx)(d,{ref:a.codeBlockRef,className:(0,s.Z)(n,t),style:c,children:(0,r.jsx)(h,{children:l.map((e,n)=>(0,r.jsx)(i.Z,{line:e,getLineProps:o,getTokenProps:u,classNames:x[n],showLineNumbers:void 0!==f},n))})})}})}},65802:function(e,n,t){t.d(n,{Z:()=>d});var r=t(85893);t(67294);var a=t(90496),s=t(88568),c=t(62302),l=t(923),o=t(26965),i=t(37457),u=t(13112);function d(e){let{className:n}=e,{metadata:t}=(0,s.LS)();return(0,r.jsxs)(c.Z,{as:"div",className:(0,a.Z)(n,t.className),children:[t.title&&(0,r.jsx)("div",{className:u.Z.codeBlockTitle,children:(0,r.jsx)(l.Z,{children:t.title})}),(0,r.jsxs)("div",{className:u.Z.codeBlockContent,children:[(0,r.jsx)(o.Z,{}),(0,r.jsx)(i.Z,{})]})]})}},76458:function(e,n,t){t.d(n,{Z:()=>a});var r=t(85893);function a(e){let{line:n,token:t,...a}=e;return(0,r.jsx)("span",{...a})}t(67294)},32028:function(e,n,t){t.d(n,{Z:()=>l});var r=t(85893);t(67294);var a=t(90496),s=t(76458),c=t(61562);function l(e){let{line:n,classNames:t,showLineNumbers:l,getLineProps:o,getTokenProps:i}=e,u=function(e){let n=1===e.length&&"\n"===e[0].content?e[0]:void 0;return n?[{...n,content:""}]:e}(n),d=o({line:u,className:(0,a.Z)(t,l&&c.Z.codeLine)}),h=u.map((e,n)=>{let t=i({token:e});return(0,r.jsx)(s.Z,{...t,line:u,token:e,children:t.children},n)});return(0,r.jsxs)("span",{...d,children:[l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:c.Z.codeLineNumber}),(0,r.jsx)("span",{className:c.Z.codeLineContent,children:h})]}):h,(0,r.jsx)("br",{})]})}},923:function(e,n,t){t.d(n,{Z:()=>r});function r(e){let{children:n}=e;return n}},8110:function(e,n,t){t.d(n,{Z:()=>o});var r=t(85893),a=t(67294),s=t(71607),c=t(93002),l=t(97061);function o(e){let{children:n,...t}=e,o=(0,s.Z)(),i=a.Children.toArray(n).some(e=>(0,a.isValidElement)(e))?n:Array.isArray(n)?n.join(""):n,u="string"==typeof i?l.Z:c.Z;return(0,r.jsx)(u,{...t,children:i},String(o))}},31660:function(e,n,t){t.d(n,{Z:()=>a});var r=t(85893);function a(e){return(0,r.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,r.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}t(67294)},87545:function(e,n,t){t.d(n,{Z:()=>a});var r=t(85893);function a(e){return(0,r.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,r.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}t(67294)},67379:function(e,n,t){t.d(n,{Z:()=>a});var r=t(85893);function a(e){return(0,r.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,r.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}t(67294)},54636:function(e,n,t){t.d(n,{Z:()=>c});var r=t(85893);t(67294);var a=t(90496),s=t(55701);function c(e){let{children:n,hidden:t,className:c}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,a.Z)(s.Z.tabItem,c),hidden:t,children:n})}},4575:function(e,n,t){t.d(n,{Z:()=>m});var r=t(85893),a=t(67294),s=t(90496),c=t(54947),l=t(30623),o=t(71607),i=t(93195);function u(e){let{className:n,block:t,selectedValue:a,selectValue:l,tabValues:o}=e,u=[],{blockElementScrollPositionUntilNextRender:d}=(0,c.o5)(),h=e=>{let n=e.currentTarget,t=o[u.indexOf(n)].value;t!==a&&(d(n),l(t))},m=e=>{let n=null;switch(e.key){case"Enter":h(e);break;case"ArrowRight":{let t=u.indexOf(e.currentTarget)+1;n=u[t]??u[0];break}case"ArrowLeft":{let t=u.indexOf(e.currentTarget)-1;n=u[t]??u[u.length-1]}}n?.focus()};return(0,r.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.Z)("tabs",{"tabs--block":t},n),children:o.map(e=>{let{value:n,label:t,attributes:c}=e;return(0,r.jsx)("li",{role:"tab",tabIndex:a===n?0:-1,"aria-selected":a===n,ref:e=>{u.push(e)},onKeyDown:m,onClick:h,...c,className:(0,s.Z)("tabs__item",i.Z.tabItem,c?.className,{"tabs__item--active":a===n}),children:t??n},n)})})}function d(e){let{lazy:n,children:t,selectedValue:c}=e,l=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){let e=l.find(e=>e.props.value===c);return e?(0,a.cloneElement)(e,{className:(0,s.Z)("margin-top--md",e.props.className)}):null}return(0,r.jsx)("div",{className:"margin-top--md",children:l.map((e,n)=>(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==c}))})}function h(e){let n=(0,l.Y)(e);return(0,r.jsxs)("div",{className:(0,s.Z)("tabs-container",i.Z.tabList),children:[(0,r.jsx)(u,{...n,...e}),(0,r.jsx)(d,{...n,...e})]})}function m(e){let n=(0,o.Z)();return(0,r.jsx)(h,{...e,children:(0,l.h)(e.children)},String(n))}},63461:function(e,n,t){t.d(n,{F:()=>s});var r=t(67294),a=t(9219);function s(){let[e,n]=(0,r.useState)(!1),[t,s]=(0,r.useState)(!1),c=(0,r.useRef)(null),l=(0,r.useCallback)(()=>{let t=c.current.querySelector("code");e?t.removeAttribute("style"):(t.style.whiteSpace="pre-wrap",t.style.overflowWrap="anywhere"),n(e=>!e)},[c,e]),o=(0,r.useCallback)(()=>{let{scrollWidth:e,clientWidth:n}=c.current;s(e>n||c.current.querySelector("code").hasAttribute("style"))},[c]),[i,u]=(0,r.useState)(),d=(0,r.useCallback)(()=>{u(c.current?.closest("[role=tabpanel][hidden]"))},[c,u]);return(0,r.useEffect)(()=>{d()},[d]),(0,a.I)(i,e=>{e.forEach(e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(o(),d())})},{attributes:!0,characterData:!1,childList:!1,subtree:!1}),(0,r.useEffect)(()=>{o()},[e,o]),(0,r.useEffect)(()=>(window.addEventListener("resize",o,{passive:!0}),()=>{window.removeEventListener("resize",o)}),[o]),{codeBlockRef:c,isEnabled:e,isCodeScrollable:t,toggle:l}}},9219:function(e,n,t){t.d(n,{I:()=>c});var r=t(67294),a=t(50923);let s={attributes:!0,characterData:!0,childList:!0,subtree:!0};function c(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s,c=(0,a.zX)(n),l=(0,a.Ql)(t);(0,r.useEffect)(()=>{let n=new MutationObserver(c);return e&&n.observe(e,l),()=>n.disconnect()},[e,c,l])}},10099:function(e,n,t){t.d(n,{p:()=>s});var r=t(45245),a=t(26378);function s(){let{prism:e}=(0,a.L)(),{colorMode:n}=(0,r.I)(),t=e.theme,s=e.darkTheme||t;return"dark"===n?s:t}},88568:function(e,n,t){t.d(n,{EF:()=>b,LS:()=>g,MA:()=>f,QC:()=>x});var r=t(85893),a=t(67294),s=t(90496),c=t(6324),l=t.n(c),o=t(50923);let i=/title=(?<quote>["'])(?<title>.*?)\1/,u=/\{(?<range>[\d,-]+)\}/,d={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},h={...d,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},m=Object.keys(d);function p(e,n){let t=e.map(e=>{let{start:t,end:r}=h[e];return`(?:${t}\\s*(${n.flatMap(e=>[e.line,e.block?.start,e.block?.end].filter(Boolean)).join("|")})\\s*${r})`}).join("|");return RegExp(`^\\s*(?:${t})\\s*$`)}function f(e){var n,t,r;let a=(t=(n={language:e.language,defaultLanguage:e.defaultLanguage,className:e.className}).language??function(e){if(!e)return;let n=e.split(" ").find(e=>e.startsWith("language-"));return n?.replace(/language-/,"")}(n.className)??n.defaultLanguage,t?.toLowerCase()??"text"),{lineClassNames:c,code:o}=function(e,n){let t=e.replace(/\r?\n$/,"");return function(e,n){let{metastring:t,magicComments:r}=n;if(t&&u.test(t)){let n=t.match(u).groups.range;if(0===r.length)throw Error(`A highlight range has been given in code block's metastring (\`\`\` ${t}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);let a=r[0].className;return{lineClassNames:Object.fromEntries(l()(n).filter(e=>e>0).map(e=>[e-1,[a]])),code:e}}return null}(t,{...n})??function(e,n){let{language:t,magicComments:r}=n;if(void 0===t)return{lineClassNames:{},code:e};let a=function(e,n){switch(e){case"js":case"javascript":case"ts":case"typescript":return p(["js","jsBlock"],n);case"jsx":case"tsx":return p(["js","jsBlock","jsx"],n);case"html":return p(["js","jsBlock","html"],n);case"python":case"py":case"bash":return p(["bash"],n);case"markdown":case"md":return p(["html","jsx","bash"],n);case"tex":case"latex":case"matlab":return p(["tex"],n);case"lua":case"haskell":return p(["lua"],n);case"sql":return p(["lua","jsBlock"],n);case"wasm":return p(["wasm"],n);case"vb":case"vba":case"visual-basic":return p(["vb","rem"],n);case"vbnet":return p(["vbnet","rem"],n);case"batch":return p(["rem"],n);case"basic":return p(["rem","f90"],n);case"fsharp":return p(["js","ml"],n);case"ocaml":case"sml":return p(["ml"],n);case"fortran":return p(["f90"],n);case"cobol":return p(["cobol"],n);default:return p(m,n)}}(t,r),s=e.split(/\r?\n/),c=Object.fromEntries(r.map(e=>[e.className,{start:0,range:""}])),o=Object.fromEntries(r.filter(e=>e.line).map(e=>{let{className:n,line:t}=e;return[t,n]})),i=Object.fromEntries(r.filter(e=>e.block).map(e=>{let{className:n,block:t}=e;return[t.start,n]})),u=Object.fromEntries(r.filter(e=>e.block).map(e=>{let{className:n,block:t}=e;return[t.end,n]}));for(let e=0;e<s.length;){let n=s[e].match(a);if(!n){e+=1;continue}let t=n.slice(1).find(e=>void 0!==e);o[t]?c[o[t]].range+=`${e},`:i[t]?c[i[t]].start=e:u[t]&&(c[u[t]].range+=`${c[u[t]].start}-${e-1},`),s.splice(e,1)}let d={};return Object.entries(c).forEach(e=>{let[n,{range:t}]=e;l()(t).forEach(e=>{d[e]??=[],d[e].push(n)})}),{code:s.join("\n"),lineClassNames:d}}(t,{...n})}(e.code,{metastring:e.metastring,magicComments:e.magicComments,language:a}),d=function(e){let{className:n,language:t}=e;return(0,s.Z)(n,t&&!n?.includes(`language-${t}`)&&`language-${t}`)}({className:e.className,language:a}),h=(r=e.metastring,(r?.match(i)?.groups.title??"")||e.title),f=function(e){let{showLineNumbers:n,metastring:t}=e;if("boolean"==typeof n)return n?1:void 0;if("number"==typeof n)return n;let r=t?.split(" ").find(e=>e.startsWith("showLineNumbers"));if(r)return r.startsWith("showLineNumbers=")?parseInt(r.replace("showLineNumbers=",""),10):1}({showLineNumbers:e.showLineNumbers,metastring:e.metastring});return{codeInput:e.code,code:o,className:d,language:a,title:h,lineNumbersStart:f,lineClassNames:c}}function x(e){let n={color:"--prism-color",backgroundColor:"--prism-background-color"},t={};return Object.entries(e.plain).forEach(e=>{let[r,a]=e,s=n[r];s&&"string"==typeof a&&(t[s]=a)}),t}let j=(0,a.createContext)(null);function b(e){let{metadata:n,wordWrap:t,children:s}=e,c=(0,a.useMemo)(()=>({metadata:n,wordWrap:t}),[n,t]);return(0,r.jsx)(j.Provider,{value:c,children:s})}function g(){let e=(0,a.useContext)(j);if(null===e)throw new o.i6("CodeBlockContextProvider");return e}},30623:function(e,n,t){t.d(n,{Y:()=>d,h:()=>i});var r=t(67294),a=t(3620),s=t(844),c=t(97486),l=t(32263),o=t(16971);function i(e){return r.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){let{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)})?.filter(Boolean)??[]}function u(e){let{value:n,tabValues:t}=e;return t.some(e=>e.value===n)}function d(e){let{defaultValue:n,queryString:t=!1,groupId:d}=e,h=function(e){let{values:n,children:t}=e;return(0,r.useMemo)(()=>{let e=n??i(t).map(e=>{let{props:{value:n,label:t,attributes:r,default:a}}=e;return{value:n,label:t,attributes:r,default:a}}),r=(0,l.lx)(e,(e,n)=>e.value===n.value);if(r.length>0)throw Error(`Docusaurus error: Duplicate values "${r.map(e=>e.value).join(", ")}" found in <Tabs>. Every value needs to be unique.`);return e},[n,t])}(e),[m,p]=(0,r.useState)(()=>(function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(n){if(!u({value:n,tabValues:t}))throw Error(`Docusaurus error: The <Tabs> has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}let r=t.find(e=>e.default)??t[0];if(!r)throw Error("Unexpected error: 0 tabValues");return r.value})({defaultValue:n,tabValues:h})),[f,x]=function(e){let{queryString:n=!1,groupId:t}=e,s=(0,a.k6)(),l=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,c._X)(l),(0,r.useCallback)(e=>{if(!l)return;let n=new URLSearchParams(s.location.search);n.set(l,e),s.replace({...s.location,search:n.toString()})},[l,s])]}({queryString:t,groupId:d}),[j,b]=function(e){let{groupId:n}=e,t=n?`docusaurus.tab.${n}`:null,[a,s]=(0,o.Nk)(t);return[a,(0,r.useCallback)(e=>{t&&s.set(e)},[t,s])]}({groupId:d}),g=(()=>{let e=f??j;return u({value:e,tabValues:h})?e:null})();return(0,s.Z)(()=>{g&&p(g)},[g]),{selectedValue:m,selectValue:(0,r.useCallback)(e=>{if(!u({value:e,tabValues:h}))throw Error(`Can't select invalid tab value=${e}`);p(e),x(e),b(e)},[x,b,h]),tabValues:h}}},5626:function(e,n,t){t.d(n,{Z:()=>c});var r=t(85893);t(67294);var a=t(8110),s=t(80483);function c(e){return e.live?(0,r.jsx)(s.Z,{...e}):(0,r.jsx)(a.Z,{...e})}},80483:function(e,n,t){t.d(n,{Z:()=>c});var r=t(85893);t(67294);var a=t(35010),s=t(62529);function c(e){return(0,r.jsx)(a.Z,{scope:s.Z,...e})}},57829:function(e,n,t){t.d(n,{Z:()=>s});var r=t(85893);t(67294);var a=t(43335);function s(e){let{children:n}=e;return(0,r.jsx)("div",{className:a.Z.playgroundContainer,children:n})}},49522:function(e,n,t){t.d(n,{Z:()=>i});var r=t(85893);t(67294);var a=t(62905),s=t(71607),c=t(77827),l=t(83372),o=t(7512);function i(){let e=(0,s.Z)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Z,{children:(0,r.jsx)(c.Z,{id:"theme.Playground.liveEditor",description:"The live editor label of the live codeblocks",children:"Live Editor"})}),(0,r.jsx)(a.uz,{className:o.Z.playgroundEditor},String(e))]})}},83372:function(e,n,t){t.d(n,{Z:()=>c});var r=t(85893);t(67294);var a=t(90496),s=t(926);function c(e){let{children:n}=e;return(0,r.jsx)("div",{className:(0,a.Z)(s.Z.playgroundHeader),children:n})}},45188:function(e,n,t){t.d(n,{Z:()=>l});var r=t(85893);t(67294);var a=t(26378),s=t(67191),c=t(49522);function l(){let{playgroundPosition:e}=(0,a.L)().liveCodeBlock;return(0,r.jsx)(r.Fragment,{children:"top"===e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Z,{}),(0,r.jsx)(c.Z,{})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.Z,{}),(0,r.jsx)(s.Z,{})]})})}},67191:function(e,n,t){t.d(n,{Z:()=>m});var r=t(85893);t(67294);var a=t(62905),s=t(56497),c=t(12565),l=t(83176),o=t(77827),i=t(83372),u=t(25562);function d(){return(0,r.jsx)("div",{children:"Loading..."})}function h(){return(0,r.jsx)(s.Z,{fallback:(0,r.jsx)(d,{}),children:()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Z,{fallback:e=>(0,r.jsx)(c.Ac,{...e}),children:(0,r.jsx)(a.i5,{})}),(0,r.jsx)(a.IF,{})]})})}function m(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Z,{children:(0,r.jsx)(o.Z,{id:"theme.Playground.result",description:"The result label of the live codeblocks",children:"Result"})}),(0,r.jsx)("div",{className:u.Z.playgroundPreview,children:(0,r.jsx)(h,{})})]})}},9002:function(e,n,t){t.d(n,{Z:()=>l});var r=t(85893);t(67294);var a=t(62905),s=t(10099);let c=e=>`${e};`;function l(e){let{code:n,children:t,...l}=e,o=(0,s.p)(),i=l.metastring?.includes("noInline")??!1;return(0,r.jsx)(a.nu,{noInline:i,theme:o,...l,code:n?.replace(/\n$/,""),transformCode:l.transformCode??c,children:t})}},35010:function(e,n,t){t.d(n,{Z:()=>l});var r=t(85893);t(67294);var a=t(9002),s=t(57829),c=t(45188);function l(e){let{children:n,transformCode:t,...l}=e;return(0,r.jsx)(s.Z,{children:(0,r.jsx)(a.Z,{code:n,...l,children:(0,r.jsx)(c.Z,{})})})}},56497:function(e,n,t){t.d(n,{Z:()=>s});var r=t(85893);t(67294);var a=t(71607);function s(e){let{children:n,fallback:t}=e;return(0,a.Z)()?(0,r.jsx)(r.Fragment,{children:n?.()}):t??null}},21143:function(e,n,t){t.d(n,{FI:()=>b,FS:()=>v,Hc:()=>y,I1:()=>p,SR:()=>f,UM:()=>g,Zl:()=>j,_q:()=>u,mC:()=>h,rv:()=>Z});var r=t(85893),a=t(67294),s=t(99887),c=t(38514),l=t(77827),o=t(35363),i=t(14547);let u=parseInt(t(6646)["0"].split(".")[0],10),d=a.createContext(null);function h(e){let{children:n}=e,[t,s]=(0,a.useState)(null),c=(0,a.useRef)(!0);return(0,a.useEffect)(()=>(c.current=!0,()=>{c.current=!1}),[]),(0,a.useEffect)(()=>{fetch("https://registry.npmjs.org/@docusaurus/core").then(e=>e.json()).then(e=>{if(!c.current)return;let n=Object.keys(e.versions).at(-1),t=e.time[n];s({name:n,time:t})})},[]),(0,r.jsx)(d.Provider,{value:t,children:n})}function m(){let e=(0,s.J)("default").preferredVersion?.name,n=(0,c.gB)("default"),t=(n.find(e=>"current"!==e.name)??n[0]).name;return e&&"current"!==e?e:t}function p(){let e=(0,a.useContext)(d);return e?(0,r.jsx)("span",{children:(0,r.jsx)(l.Z,{description:"The hint text for the current canary version tag.",values:{canaryVersionName:(0,r.jsx)("b",{children:e.name})},children:"Current: {canaryVersionName}"})}):(0,r.jsx)("span",{children:(0,r.jsx)(l.Z,{description:"An example canary version tag when the actual version can't be fetched.",children:"Example: 0.0.0-4922"})})}function f(){let e=m();return(0,r.jsx)("span",{children:e})}function x(e){let{branch:n}=e;return(0,r.jsx)(o.Z,{to:`https://github.com/facebook/docusaurus/tree/${n}`,children:(0,r.jsx)("code",{children:n})})}function j(){return(0,r.jsx)("code",{children:`docusaurus-v${u}`})}function b(){return(0,r.jsx)(x,{branch:"main"})}function g(e){let{children:n}=e;return(0,a.useContext)(d)?null:n}function v(e){let{children:n}=e;return(0,a.useContext)(d)?n:null}function y(){let e=(0,a.useContext)(d)?.name??"0.0.0-4922",n=m();return(0,r.jsx)(i.Z,{language:"diff",children:`- "@docusaurus/core": "^${n}",
|
|
- "@docusaurus/preset-classic": "^${n}",
|
|
+ "@docusaurus/core": "${e}",
|
|
+ "@docusaurus/preset-classic": "${e}",
|
|
`})}function Z(){let e=(0,a.useContext)(d)?.time;return e?(0,r.jsx)(l.Z,{values:{time:(0,r.jsx)("b",{children:new Date(e).toLocaleString()})},children:"The latest canary version that's available on npm is published at {time}."}):null}},14547:function(e,n,t){t.d(n,{Z:()=>s});var r=t(85893);t(67294);var a=t(5626);function s(e){return(0,r.jsx)(a.Z,{...e})}},63627:function(e,n,t){t.r(n),t.d(n,{ButtonExample:()=>a});var r=t(85893);function a(e){return(0,r.jsx)("button",{type:"button",...e,style:{backgroundColor:"white",color:"black",border:"solid red",borderRadius:20,padding:10,cursor:"pointer",...e.style}})}t(67294)},62529:function(e,n,t){t.d(n,{Z:()=>s});var r=t(67294),a=t(63627);let s={React:r,...r,...a}},51482:function(e){e.exports=JSON.parse('{"id":"canary","title":"Canary releases","description":"Docusaurus has a canary releases system.","source":"@site/community/4-canary.mdx","sourceDirName":".","slug":"/canary","permalink":"/community/canary","draft":false,"unlisted":false,"editUrl":"https://github.com/facebook/docusaurus/edit/main/website/community/4-canary.mdx","tags":[],"version":"current","lastUpdatedBy":"S\xe9bastien Lorber","lastUpdatedAt":1748625776000,"sidebarPosition":4,"frontMatter":{},"sidebar":"community","previous":{"title":"Contributing","permalink":"/community/contributing"},"next":{"title":"Release process","permalink":"/community/release-process"}}')},6646:function(e){e.exports=["3.8.0"]}}]); |