mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 07:07:25 +02:00
1 line
No EOL
40 KiB
JavaScript
1 line
No EOL
40 KiB
JavaScript
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[42931],{94544:(e,n,r)=>{r.d(n,{Z:()=>o});var t=r(24246),s=(r(27378),r(29088));function o({children:e,fallback:n}){return(0,s.Z)()?(0,t.jsx)(t.Fragment,{children:null==e?void 0:e()}):null!=n?n:null}},87048:(e,n,r)=>{r.d(n,{CW:()=>j,FS:()=>v,Fr:()=>f,Hc:()=>O,I1:()=>p,SR:()=>b,UM:()=>x,Zl:()=>g,mC:()=>d,mq:()=>y,rv:()=>w});var t=r(24246),s=r(27378),o=r(56953),i=r(92053),c=r(36712),l=r(41428),a=r(38112);const u=s.createContext(null);function d({children:e}){const[n,r]=(0,s.useState)(null),o=(0,s.useRef)(!0);return(0,s.useEffect)((()=>(o.current=!0,()=>{o.current=!1})),[]),(0,s.useEffect)((()=>{fetch("https://registry.npmjs.org/@docusaurus/core").then((e=>e.json())).then((e=>{if(!o.current)return;const n=Object.keys(e.versions).at(-1),t=e.time[n];r({name:n,time:t})}))}),[]),(0,t.jsx)(u.Provider,{value:n,children:e})}function h(){var e;const n=null===(e=(0,o.J)("default").preferredVersion)||void 0===e?void 0:e.name,r=(0,i.gB)("default");var t;const s=(null!==(t=r.find((e=>"current"!==e.name)))&&void 0!==t?t:r[0]).name;return n&&"current"!==n?n:s}function p(){const e=(0,s.useContext)(u);return e?(0,t.jsx)("span",{children:(0,t.jsx)(c.Z,{description:"The hint text for the current canary version tag.",values:{canaryVersionName:(0,t.jsx)("b",{children:e.name})},children:"Current: {canaryVersionName}"})}):(0,t.jsx)("span",{children:(0,t.jsx)(c.Z,{description:"An example canary version tag when the actual version can't be fetched.",children:"Example: 0.0.0-4922"})})}function b(){const e=h();return(0,t.jsx)("span",{children:e})}function j(){return(0,t.jsx)("span",{children:3})}function f(){return(0,t.jsx)("span",{children:2})}function m({branch:e}){return(0,t.jsx)(l.Z,{to:`https://github.com/facebook/docusaurus/tree/${e}`,children:(0,t.jsx)("code",{children:e})})}function g(){return(0,t.jsx)(m,{branch:"docusaurus-v2"})}function y(){return(0,t.jsx)(m,{branch:"main"})}function x({children:e}){return(0,s.useContext)(u)?null:e}function v({children:e}){return(0,s.useContext)(u)?e:null}function O(){var e,n;const r=null!==(n=null===(e=(0,s.useContext)(u))||void 0===e?void 0:e.name)&&void 0!==n?n:"0.0.0-4922",o=h();return(0,t.jsx)(a.Z,{language:"diff",children:`- "@docusaurus/core": "^${o}",\n- "@docusaurus/preset-classic": "^${o}",\n+ "@docusaurus/core": "${r}",\n+ "@docusaurus/preset-classic": "${r}",\n`})}function w(){var e;const n=null===(e=(0,s.useContext)(u))||void 0===e?void 0:e.time;return n?(0,t.jsx)(c.Z,{values:{time:(0,t.jsx)("b",{children:new Date(n).toLocaleString()})},children:"The latest canary version that's available on npm is published at {time}."}):null}},38112:(e,n,r)=>{r.d(n,{Z:()=>Ze});var t={};r.r(t),r.d(t,{ButtonExample:()=>A});var s=r(24246),o=r(27378),i=r(40624),c=r(29088),l=r(32711),a=r(36712),u=r(4423),d=r(94544),h=r(30691),p=r(78844),b=r(73919);function j(){const{prism:e}=(0,b.L)(),{colorMode:n}=(0,p.I)(),r=e.theme,t=e.darkTheme||r;return"dark"===n?t:r}var f=r(88941);const m={playgroundContainer:"playgroundContainer_6Ior",playgroundHeader:"playgroundHeader_Tvsk",playgroundEditor:"playgroundEditor_TySg",playgroundPreview:"playgroundPreview_mApW"};function g(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function y(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){g(e,n,r[n])}))}return e}function x(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})),e}function v(e,n){if(null==e)return{};var r,t,s=function(e,n){if(null==e)return{};var r,t,s={},o=Object.keys(e);for(t=0;t<o.length;t++)r=o[t],n.indexOf(r)>=0||(s[r]=e[r]);return s}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)r=o[t],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}function O({children:e}){return(0,s.jsx)("div",{className:(0,i.Z)(m.playgroundHeader),children:e})}function w(){return(0,s.jsx)("div",{children:"Loading..."})}function P(){return(0,s.jsx)(d.Z,{fallback:(0,s.jsx)(w,{}),children:()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.Z,{fallback:e=>(0,s.jsx)(h.Ac,y({},e)),children:(0,s.jsx)(l.i5,{})}),(0,s.jsx)(l.IF,{})]})})}function k(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(O,{children:(0,s.jsx)(a.Z,{id:"theme.Playground.result",description:"The result label of the live codeblocks",children:"Result"})}),(0,s.jsx)("div",{className:m.playgroundPreview,children:(0,s.jsx)(P,{})})]})}function S(){const e=(0,c.Z)();return(0,s.jsx)(l.uz,{className:m.playgroundEditor},String(e))}function D(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(O,{children:(0,s.jsx)(a.Z,{id:"theme.Playground.liveEditor",description:"The live editor label of the live codeblocks",children:"Live Editor"})}),(0,s.jsx)(S,{})]})}const C=e=>`${e};`;function B(e){var n,{children:r,transformCode:t}=e,o=v(e,["children","transformCode"]);const{siteConfig:{themeConfig:i}}=(0,u.Z)(),{liveCodeBlock:{playgroundPosition:c}}=i,a=j();var d;const h=null!==(d=null===(n=o.metastring)||void 0===n?void 0:n.includes("noInline"))&&void 0!==d&&d;return(0,s.jsx)("div",{className:m.playgroundContainer,children:(0,s.jsx)(l.nu,x(y({code:null==r?void 0:r.replace(/\n$/,""),noInline:h,transformCode:null!=t?t:C,theme:a},o),{children:"top"===c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(k,{}),(0,s.jsx)(D,{})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(D,{}),(0,s.jsx)(k,{})]})}))})}function I(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function E(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){I(e,n,r[n])}))}return e}function N(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})),e}function A(e){return(0,s.jsx)("button",N(E({type:"button"},e),{style:E({backgroundColor:"white",color:"black",border:"solid red",borderRadius:20,padding:10,cursor:"pointer"},e.style)}))}function T(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}const L=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){T(e,n,r[n])}))}return e}({React:o},o,t);var Z,z,_=r(89583),W=r(6324),R=r.n(W);function M(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}const $=RegExp("title=(?<quote>[\"'])(?<title>.*?)\\1"),F=RegExp("\\{(?<range>[\\d,-]+)\\}"),V={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},H=(q=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){M(e,n,r[n])}))}return e}({},V),U=null!=(U={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:""}})?U:{},Object.getOwnPropertyDescriptors?Object.defineProperties(q,Object.getOwnPropertyDescriptors(U)):function(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}(Object(U)).forEach((function(e){Object.defineProperty(q,e,Object.getOwnPropertyDescriptor(U,e))})),q);var q,U;const G=Object.keys(V);function J(e,n){const r=e.map((e=>{const{start:r,end:t}=H[e];return`(?:${r}\\s*(${n.flatMap((e=>{var n,r;return[e.line,null===(n=e.block)||void 0===n?void 0:n.start,null===(r=e.block)||void 0===r?void 0:r.end].filter(Boolean)})).join("|")})\\s*${t})`})).join("|");return new RegExp(`^\\s*(?:${r})\\s*$`)}function Q(e,n){let r=e.replace(/\n$/,"");const{language:t,magicComments:s,metastring:o}=n;if(o&&F.test(o)){const e=o.match(F).groups.range;if(0===s.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${o}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const n=s[0].className,t=R()(e).filter((e=>e>0)).map((e=>[e-1,[n]]));return{lineClassNames:Object.fromEntries(t),code:r}}if(void 0===t)return{lineClassNames:{},code:r};const i=function(e,n){switch(e){case"js":case"javascript":case"ts":case"typescript":return J(["js","jsBlock"],n);case"jsx":case"tsx":return J(["js","jsBlock","jsx"],n);case"html":return J(["js","jsBlock","html"],n);case"python":case"py":case"bash":return J(["bash"],n);case"markdown":case"md":return J(["html","jsx","bash"],n);case"tex":case"latex":case"matlab":return J(["tex"],n);case"lua":case"haskell":case"sql":return J(["lua"],n);case"wasm":return J(["wasm"],n);case"vb":case"vba":case"visual-basic":return J(["vb","rem"],n);case"vbnet":return J(["vbnet","rem"],n);case"batch":return J(["rem"],n);case"basic":return J(["rem","f90"],n);case"fsharp":return J(["js","ml"],n);case"ocaml":case"sml":return J(["ml"],n);case"fortran":return J(["f90"],n);case"cobol":return J(["cobol"],n);default:return J(G,n)}}(t,s),c=r.split("\n"),l=Object.fromEntries(s.map((e=>[e.className,{start:0,range:""}]))),a=Object.fromEntries(s.filter((e=>e.line)).map((({className:e,line:n})=>[n,e]))),u=Object.fromEntries(s.filter((e=>e.block)).map((({className:e,block:n})=>[n.start,e]))),d=Object.fromEntries(s.filter((e=>e.block)).map((({className:e,block:n})=>[n.end,e])));for(let p=0;p<c.length;){const e=c[p].match(i);if(!e){p+=1;continue}const n=e.slice(1).find((e=>void 0!==e));a[n]?l[a[n]].range+=`${p},`:u[n]?l[u[n]].start=p:d[n]&&(l[d[n]].range+=`${l[d[n]].start}-${p-1},`),c.splice(p,1)}r=c.join("\n");const h={};return Object.entries(l).forEach((([e,{range:n}])=>{R()(n).forEach((n=>{var r;null!==(r=(Z=h)[z=n])&&void 0!==r||(Z[z]=[]),h[n].push(e)}))})),{lineClassNames:h,code:r}}const Y={codeBlockContainer:"codeBlockContainer_jDV4"};function X(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function K(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})),e}function ee(e,n){if(null==e)return{};var r,t,s=function(e,n){if(null==e)return{};var r,t,s={},o=Object.keys(e);for(t=0;t<o.length;t++)r=o[t],n.indexOf(r)>=0||(s[r]=e[r]);return s}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)r=o[t],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}function ne(e){var{as:n}=e,r=ee(e,["as"]);const t=function(e){const n={color:"--prism-color",backgroundColor:"--prism-background-color"},r={};return Object.entries(e.plain).forEach((([e,t])=>{const s=n[e];s&&"string"==typeof t&&(r[s]=t)})),r}(j());return(0,s.jsx)(n,K(function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){X(e,n,r[n])}))}return e}({},r),{style:t,className:(0,i.Z)(r.className,Y.codeBlockContainer,_.k.common.codeBlock)}))}const re={codeBlockContent:"codeBlockContent_vx7S",codeBlockTitle:"codeBlockTitle_bdru",codeBlock:"codeBlock_Gebt",codeBlockStandalone:"codeBlockStandalone_i_cY",codeBlockLines:"codeBlockLines_FJaf",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_FU9Q",buttonGroup:"buttonGroup_cUGO"};function te({children:e,className:n}){return(0,s.jsx)(ne,{as:"pre",tabIndex:0,className:(0,i.Z)(re.codeBlockStandalone,"thin-scrollbar",n),children:(0,s.jsx)("code",{className:re.codeBlockLines,children:e})})}var se=r(51114);const oe={attributes:!0,characterData:!0,childList:!0,subtree:!0};function ie(e,n){const[r,t]=(0,o.useState)(),s=(0,o.useCallback)((()=>{var n;t(null===(n=e.current)||void 0===n?void 0:n.closest("[role=tabpanel][hidden]"))}),[e,t]);(0,o.useEffect)((()=>{s()}),[s]),function(e,n,r=oe){const t=(0,se.zX)(n),s=(0,se.Ql)(r);(0,o.useEffect)((()=>{const n=new MutationObserver(t);return e&&n.observe(e,s),()=>n.disconnect()}),[e,t,s])}(r,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(n(),s())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}var ce=r(26101);const le={codeLine:"codeLine_qRmp",codeLineNumber:"codeLineNumber_dS_J",codeLineContent:"codeLineContent_XF5l"};function ae(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function ue(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){ae(e,n,r[n])}))}return e}function de(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})),e}function he({line:e,classNames:n,showLineNumbers:r,getLineProps:t,getTokenProps:o}){1===e.length&&"\n"===e[0].content&&(e[0].content="");const c=t({line:e,className:(0,i.Z)(n,r&&le.codeLine)}),l=e.map(((e,n)=>(0,s.jsx)("span",ue({},o({token:e})),n)));return(0,s.jsxs)("span",de(ue({},c),{children:[r?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:le.codeLineNumber}),(0,s.jsx)("span",{className:le.codeLineContent,children:l})]}):l,(0,s.jsx)("br",{})]}))}var pe=r(34370);function be(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function je(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})),e}function fe(e){return(0,s.jsx)("svg",je(function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){be(e,n,r[n])}))}return e}({viewBox:"0 0 24 24"},e),{children:(0,s.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"})}))}function me(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function ge(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})),e}function ye(e){return(0,s.jsx)("svg",ge(function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){me(e,n,r[n])}))}return e}({viewBox:"0 0 24 24"},e),{children:(0,s.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}))}const xe={copyButtonCopied:"copyButtonCopied_OkN_",copyButtonIcons:"copyButtonIcons_OqsO",copyButtonIcon:"copyButtonIcon_PgCn",copyButtonSuccessIcon:"copyButtonSuccessIcon_bsQG"};function ve({code:e,className:n}){const[r,t]=(0,o.useState)(!1),c=(0,o.useRef)(void 0),l=(0,o.useCallback)((()=>{(0,pe.Z)(e),t(!0),c.current=window.setTimeout((()=>{t(!1)}),1e3)}),[e]);return(0,o.useEffect)((()=>()=>window.clearTimeout(c.current)),[]),(0,s.jsx)("button",{type:"button","aria-label":r?(0,a.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,a.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,a.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,i.Z)("clean-btn",n,xe.copyButton,r&&xe.copyButtonCopied),onClick:l,children:(0,s.jsxs)("span",{className:xe.copyButtonIcons,"aria-hidden":"true",children:[(0,s.jsx)(fe,{className:xe.copyButtonIcon}),(0,s.jsx)(ye,{className:xe.copyButtonSuccessIcon})]})})}function Oe(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function we(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})),e}function Pe(e){return(0,s.jsx)("svg",we(function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){Oe(e,n,r[n])}))}return e}({viewBox:"0 0 24 24"},e),{children:(0,s.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"})}))}const ke={wordWrapButtonIcon:"wordWrapButtonIcon_MQXS",wordWrapButtonEnabled:"wordWrapButtonEnabled_TBIH"};function Se({className:e,onClick:n,isEnabled:r}){const t=(0,a.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,s.jsx)("button",{type:"button",onClick:n,className:(0,i.Z)("clean-btn",e,r&&ke.wordWrapButtonEnabled),"aria-label":t,title:t,children:(0,s.jsx)(Pe,{className:ke.wordWrapButtonIcon,"aria-hidden":"true"})})}function De({children:e,className:n="",metastring:r,title:t,showLineNumbers:c,language:l}){const{prism:{defaultLanguage:a,magicComments:u}}=(0,b.L)();var d;const h=function(e){return null==e?void 0:e.toLowerCase()}(null!==(d=null!=l?l:function(e){const n=e.split(" ").find((e=>e.startsWith("language-")));return null==n?void 0:n.replace(/language-/,"")}(n))&&void 0!==d?d:a),p=j(),f=function(){const[e,n]=(0,o.useState)(!1),[r,t]=(0,o.useState)(!1),s=(0,o.useRef)(null),i=(0,o.useCallback)((()=>{const r=s.current.querySelector("code");e?r.removeAttribute("style"):(r.style.whiteSpace="pre-wrap",r.style.overflowWrap="anywhere"),n((e=>!e))}),[s,e]),c=(0,o.useCallback)((()=>{const{scrollWidth:e,clientWidth:n}=s.current,r=e>n||s.current.querySelector("code").hasAttribute("style");t(r)}),[s]);return ie(s,c),(0,o.useEffect)((()=>{c()}),[e,c]),(0,o.useEffect)((()=>(window.addEventListener("resize",c,{passive:!0}),()=>{window.removeEventListener("resize",c)})),[c]),{codeBlockRef:s,isEnabled:e,isCodeScrollable:r,toggle:i}}(),m=function(e){var n,r;return null!==(r=null===(n=null==e?void 0:e.match($))||void 0===n?void 0:n.groups.title)&&void 0!==r?r:""}(r)||t,{lineClassNames:g,code:y}=Q(e,{metastring:r,language:h,magicComments:u}),x=null!=c?c:function(e){return Boolean(null==e?void 0:e.includes("showLineNumbers"))}(r);return(0,s.jsxs)(ne,{as:"div",className:(0,i.Z)(n,h&&!n.includes(`language-${h}`)&&`language-${h}`),children:[m&&(0,s.jsx)("div",{className:re.codeBlockTitle,children:m}),(0,s.jsxs)("div",{className:re.codeBlockContent,children:[(0,s.jsx)(ce.y$,{theme:p,code:y,language:null!=h?h:"text",children:({className:e,style:n,tokens:r,getLineProps:t,getTokenProps:o})=>(0,s.jsx)("pre",{tabIndex:0,ref:f.codeBlockRef,className:(0,i.Z)(e,re.codeBlock,"thin-scrollbar"),style:n,children:(0,s.jsx)("code",{className:(0,i.Z)(re.codeBlockLines,x&&re.codeBlockLinesWithNumbering),children:r.map(((e,n)=>(0,s.jsx)(he,{line:e,getLineProps:t,getTokenProps:o,classNames:g[n],showLineNumbers:x},n)))})})}),(0,s.jsxs)("div",{className:re.buttonGroup,children:[(f.isEnabled||f.isCodeScrollable)&&(0,s.jsx)(Se,{className:re.codeButton,onClick:()=>f.toggle(),isEnabled:f.isEnabled}),(0,s.jsx)(ve,{className:re.codeButton,code:y})]})]})]})}function Ce(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Be(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})),e}function Ie(e,n){if(null==e)return{};var r,t,s=function(e,n){if(null==e)return{};var r,t,s={},o=Object.keys(e);for(t=0;t<o.length;t++)r=o[t],n.indexOf(r)>=0||(s[r]=e[r]);return s}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)r=o[t],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}function Ee(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Ne(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){Ee(e,n,r[n])}))}return e}const Ae=(Te=function(e){var{children:n}=e,r=Ie(e,["children"]);const t=(0,c.Z)(),i=function(e){return o.Children.toArray(e).some((e=>(0,o.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(n),l="string"==typeof i?De:te;return(0,s.jsx)(l,Be(function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){Ce(e,n,r[n])}))}return e}({},r),{children:i}),String(t))},function(e){return e.live?(0,s.jsx)(B,Ne({scope:L},e)):(0,s.jsx)(Te,Ne({},e))});var Te;function Le(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Ze(e){return(0,s.jsx)(Ae,function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){Le(e,n,r[n])}))}return e}({},e))}},82430:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>u});var t=r(24246),s=r(71670),o=r(87048);const i={},c="Release process",l={id:"release-process",title:"Release process",description:"Let's see how Docusaurus handles versioning, releases and breaking changes.",source:"@site/community/5-release-process.mdx",sourceDirName:".",slug:"/release-process",permalink:"/community/release-process",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/edit/main/website/community/5-release-process.mdx",tags:[],version:"current",lastUpdatedBy:"\uc815\ubcf4\ud604 Bohyun Jung",lastUpdatedAt:1721898761e3,sidebarPosition:5,frontMatter:{},sidebar:"community",previous:{title:"Canary releases",permalink:"/community/canary"}},a={},u=[{value:"Semantic versioning",id:"semantic-versioning",level:2},{value:"Major versions",id:"major-versions",level:3},{value:"Minor versions",id:"minor-versions",level:3},{value:"Patch versions",id:"patch-versions",level:3},{value:"Versions",id:"versions",level:2},{value:"Stable version",id:"stable-version",level:3},{value:"Next version",id:"next-version",level:3},{value:"Public API surface",id:"public-api-surface",level:2},{value:"Core public API",id:"core-public-api",level:3},{value:"Theming public API",id:"theming-public-api",level:3}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"release-process",children:"Release process"}),"\n",(0,t.jsxs)(n.p,{children:["Let's see how Docusaurus handles ",(0,t.jsx)(n.strong,{children:"versioning, releases and breaking changes"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsx)(n.p,{children:"This topic is particularly important for highly customized sites that may have difficulties to upgrade."})}),"\n",(0,t.jsx)(n.h2,{id:"semantic-versioning",children:"Semantic versioning"}),"\n",(0,t.jsxs)(n.p,{children:["Docusaurus versioning is based on the ",(0,t.jsx)(n.code,{children:"major.minor.patch"})," scheme and respects ",(0,t.jsx)(n.a,{href:"https://semver.org/",children:"Semantic Versioning"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Respecting Semantic Versioning is important for multiple reasons:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["It ",(0,t.jsx)(n.strong,{children:"guarantees simple minor version upgrades"}),", as long as you only use the ",(0,t.jsx)(n.a,{href:"/community/release-process#public-api-surface",children:"public API"})]}),"\n",(0,t.jsx)(n.li,{children:"It follows front-end ecosystem conventions"}),"\n",(0,t.jsx)(n.li,{children:"A new major version is an opportunity to thoroughly document breaking changes"}),"\n",(0,t.jsx)(n.li,{children:"A new major/minor version is an opportunity to communicate new features through a blog post"}),"\n"]}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsxs)(n.p,{children:["Releasing Docusaurus 2.0 took a very long time. From now on, Docusaurus will ",(0,t.jsx)(n.strong,{children:"release new major versions more regularly"}),". In practice, you can expect a new major version every 2\u20134 months."]}),(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html",children:"Major version numbers are not sacred"}),", but we still group breaking changes together and avoid releasing major versions too often."]})]}),"\n",(0,t.jsx)(n.h3,{id:"major-versions",children:"Major versions"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"major"})," version number is incremented on ",(0,t.jsx)(n.strong,{children:"every breaking change"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Whenever a new major version is released, we publish:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["a blog post with feature highlights, major bug fixes, ",(0,t.jsx)(n.strong,{children:"breaking changes, and upgrade instructions"}),"."]}),"\n",(0,t.jsx)(n.li,{children:"an exhaustive changelog entry"}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["Read our ",(0,t.jsx)(n.a,{href:"#public-api-surface",children:"public API surface"})," section to clearly understand what we consider as a breaking change."]})}),"\n",(0,t.jsx)(n.h3,{id:"minor-versions",children:"Minor versions"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"minor"})," version number is incremented on every significant retro-compatible change."]}),"\n",(0,t.jsx)(n.p,{children:"Whenever a new minor version is released, we publish:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"a blog post with a list of feature highlights and major bug fixes"}),"\n",(0,t.jsx)(n.li,{children:"an exhaustive changelog entry"}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["If you only use our ",(0,t.jsx)(n.a,{href:"#public-api-surface",children:"public API surface"}),", you should be able to upgrade in no time!"]})}),"\n",(0,t.jsx)(n.h3,{id:"patch-versions",children:"Patch versions"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"patch"})," version number is incremented on bugfixes releases."]}),"\n",(0,t.jsx)(n.p,{children:"Whenever a new patch version is released, we publish:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"an exhaustive changelog entry"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"versions",children:"Versions"}),"\n","\n",(0,t.jsx)(n.p,{children:"The Docusaurus team is usually working on 2 major versions at the same time:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsxs)(n.strong,{children:["Docusaurus ",(0,t.jsx)(o.Fr,{})]}),": the ",(0,t.jsx)(n.strong,{children:"stable"})," version, on the ",(0,t.jsx)(o.Zl,{})," branch"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsxs)(n.strong,{children:["Docusaurus ",(0,t.jsx)(o.CW,{})]}),": the ",(0,t.jsx)(n.strong,{children:"next"})," version, on the ",(0,t.jsx)(o.mq,{})," branch"]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(o.Zl,{})," branch is created just before releasing the first v",(0,t.jsx)(o.Fr,{})," release candidate."]})}),"\n",(0,t.jsx)(n.h3,{id:"stable-version",children:"Stable version"}),"\n",(0,t.jsxs)(n.p,{children:["The stable version (v",(0,t.jsx)(o.Fr,{}),", on ",(0,t.jsx)(o.Zl,{}),") is recommended for most Docusaurus users."]}),"\n",(0,t.jsxs)(n.p,{children:["We regularly backport retro-compatible features, bug and security fixes from ",(0,t.jsx)(o.mq,{})," to ",(0,t.jsx)(o.Zl,{})," with ",(0,t.jsx)(n.code,{children:"git cherry-pick"})," to make them available to those not ready for the next version."]}),"\n",(0,t.jsxs)(n.admonition,{type:"info",children:[(0,t.jsxs)(n.p,{children:["After a new stable version has been released, the former stable version will continue to receive support only for ",(0,t.jsx)(n.strong,{children:"major security issues"})," for ",(0,t.jsx)(n.strong,{children:"3 months"}),". Otherwise, all features will be frozen and non-critical bugs will not be fixed."]}),(0,t.jsx)(n.p,{children:"It is recommended to upgrade within that time frame to the new stable version."})]}),"\n",(0,t.jsx)(n.h3,{id:"next-version",children:"Next version"}),"\n",(0,t.jsxs)(n.p,{children:["The next version (v",(0,t.jsx)(o.CW,{}),", on ",(0,t.jsx)(o.mq,{}),") is the version the Docusaurus team is currently working on."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(o.mq,{})," branch is the ",(0,t.jsx)(n.strong,{children:"default target branch"})," for all pull requests, including core team and external contributions."]}),"\n",(0,t.jsxs)(n.p,{children:["This version is recommended for ",(0,t.jsx)(n.strong,{children:"early adopters"})," that want to use the latest Docusaurus features as soon as possible. It is also a good way to help us by reporting bugs and giving some feedback."]}),"\n",(0,t.jsx)(n.p,{children:"There are 3 ways to use the next version:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["with an ",(0,t.jsx)(n.code,{children:"alpha"}),", ",(0,t.jsx)(n.code,{children:"beta"})," or ",(0,t.jsx)(n.code,{children:"rc"})," pre-release"]}),"\n",(0,t.jsxs)(n.li,{children:["with the ",(0,t.jsx)(n.code,{children:"@next"})," npm dist tag for the latest pre-release"]}),"\n",(0,t.jsxs)(n.li,{children:["with a ",(0,t.jsx)(n.a,{href:"/community/canary",children:"canary release"})," for the very latest features"]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsx)(n.p,{children:"The next version passes all our automated tests and is used by the Docusaurus site itself. It is relatively safe: don't be afraid to give it a try."})}),"\n",(0,t.jsxs)(n.admonition,{type:"warning",children:[(0,t.jsx)(n.p,{children:"Breaking changes can happen on the next version: detailed upgrade instructions are available in the changelog and pull requests."}),(0,t.jsxs)(n.p,{children:["At the ",(0,t.jsx)(n.code,{children:"beta"})," and ",(0,t.jsx)(n.code,{children:"rc"})," (release candidate) phases, we avoid introducing major breaking changes."]})]}),"\n",(0,t.jsx)(n.h2,{id:"public-api-surface",children:"Public API surface"}),"\n",(0,t.jsxs)(n.p,{children:["Docusaurus commits to respecting Semantic Versioning. This means that whenever changes occur in Docusaurus public APIs and break backward compatibility, we will increment the ",(0,t.jsx)(n.code,{children:"major"})," version number."]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["Docusaurus guarantees public API retro-compatibility across ",(0,t.jsx)(n.code,{children:"minor"})," versions. Unless you use internal APIs, ",(0,t.jsx)(n.code,{children:"minor"})," version upgrades should be easy."]})}),"\n",(0,t.jsx)(n.p,{children:"We will outline what accounts as the public API surface."}),"\n",(0,t.jsx)(n.h3,{id:"core-public-api",children:"Core public API"}),"\n",(0,t.jsx)(n.p,{children:"\u2705 Our public API includes:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Docusaurus config"}),"\n",(0,t.jsx)(n.li,{children:"Docusaurus client APIs"}),"\n",(0,t.jsx)(n.li,{children:"Docusaurus CLI"}),"\n",(0,t.jsx)(n.li,{children:"Preset options"}),"\n",(0,t.jsx)(n.li,{children:"Plugin options"}),"\n",(0,t.jsx)(n.li,{children:"Plugin lifecycle APIs"}),"\n",(0,t.jsx)(n.li,{children:"Theme config"}),"\n",(0,t.jsx)(n.li,{children:"Core plugins route component props"}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"@docusaurus/types"})," TypeScript types","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"We still retain the freedom to make types stricter (which may break type-checking)."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["\u274c Our public API ",(0,t.jsx)(n.strong,{children:"excludes"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Docusaurus config ",(0,t.jsx)(n.code,{children:"future"})]}),"\n",(0,t.jsxs)(n.li,{children:["All features prefixed by ",(0,t.jsx)(n.code,{children:"experimental_"})," or ",(0,t.jsx)(n.code,{children:"unstable_"})]}),"\n",(0,t.jsxs)(n.li,{children:["All features prefixed by ",(0,t.jsx)(n.code,{children:"v<MajorVersion>_"})," (",(0,t.jsx)(n.code,{children:"v6_"})," ",(0,t.jsx)(n.code,{children:"v7_"}),", etc.)"]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsx)(n.p,{children:"For non-theme APIs, any documented API is considered public (and will be stable); any undocumented API is considered internal."})}),"\n",(0,t.jsxs)(n.p,{children:['An API being "stable" means if you increment the patch or minor version of your Docusaurus installation without any other change, running ',(0,t.jsx)(n.code,{children:"docusaurus start"})," or ",(0,t.jsx)(n.code,{children:"docusaurus build"})," should not throw an error."]}),"\n",(0,t.jsx)(n.h3,{id:"theming-public-api",children:"Theming public API"}),"\n",(0,t.jsx)(n.p,{children:"Docusaurus has a very flexible theming system:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"You can use custom CSS"}),"\n",(0,t.jsxs)(n.li,{children:["You can ",(0,t.jsx)(n.a,{href:"/docs/swizzling",children:"swizzle"})," any React theme component"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"This system also implicitly creates a very large API surface. To be able to move fast and improve Docusaurus, we can't guarantee retro-compatibility."}),"\n",(0,t.jsx)(n.p,{children:"\u2705 Our public theming API includes:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/styling-layout#theme-class-names",children:"Theme class names"})}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/docs/styling-layout#styling-your-site-with-infima",children:"Infima"})," class names and CSS variables"]}),"\n",(0,t.jsxs)(n.li,{children:["React components that are ",(0,t.jsx)(n.a,{href:"/docs/swizzling#what-is-safe-to-swizzle",children:"safe to swizzle"})]}),"\n",(0,t.jsx)(n.li,{children:"The theme user experience"}),"\n",(0,t.jsx)(n.li,{children:"Browser support"}),"\n"]}),"\n",(0,t.jsxs)(n.admonition,{type:"tip",children:[(0,t.jsx)(n.p,{children:"You may not be able to achieve your site customization through this public API."}),(0,t.jsxs)(n.p,{children:["In this case, please ",(0,t.jsx)(n.a,{href:"https://github.com/facebook/docusaurus/discussions/5468",children:"report your customization use case"})," and we will figure out how to expand our public API."]})]}),"\n",(0,t.jsxs)(n.p,{children:["\u274c Our public theming API ",(0,t.jsx)(n.strong,{children:"excludes"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The DOM structure"}),"\n",(0,t.jsxs)(n.li,{children:["CSS module class names with a hash suffix (usually targeted with ",(0,t.jsx)(n.code,{children:"[class*='myClassName']"})," selectors)"]}),"\n",(0,t.jsxs)(n.li,{children:["React components that are ",(0,t.jsx)(n.a,{href:"/docs/swizzling#what-is-safe-to-swizzle",children:"unsafe or forbidden to swizzle"})]}),"\n",(0,t.jsxs)(n.li,{children:["React components that import from ",(0,t.jsx)(n.code,{children:"@docusaurus/theme-common/internal"})]}),"\n",(0,t.jsx)(n.li,{children:"The exact visual appearance of the theme"}),"\n"]}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsxs)(n.p,{children:["When ",(0,t.jsx)(n.a,{href:"/docs/swizzling",children:"swizzling"})," safe components, you might encounter components that import undocumented APIs from ",(0,t.jsx)(n.code,{children:"@docusaurus/theme-common"})," (without the ",(0,t.jsx)(n.code,{children:"/internal"})," subpath)."]}),(0,t.jsx)(n.p,{children:'We still maintain retro-compatibility on those APIs (hence they are marked as "safe"), but we don\'t encourage a direct usage.'})]})]})}function h(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}}}]); |