mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 16:59:06 +02:00
1 line
No EOL
25 KiB
JavaScript
1 line
No EOL
25 KiB
JavaScript
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["27591"],{72581:function(e,r,n){n.d(r,{Z:function(){return t}});let t=n.p+"assets/images/social-card-3239a62bb56c9529ff255bc2c72e94f6.png"},20788:function(e,r,n){n.d(r,{Z:function(){return t}});let t=n.p+"assets/images/navbar-error-15eefab8e8d77aa4d605939956987164.jpg"},92539:function(e,r,n){n.d(r,{Z:function(){return t}});let t=n.p+"assets/images/sidebar-item-description-f38981b17f486bc09fb811c6992ef668.jpg"},17414:function(e,r,n){n.d(r,{Z:function(){return t}});let t=n.p+"assets/images/social-card-3239a62bb56c9529ff255bc2c72e94f6.png"},77543:function(e,r,n){n.r(r),n.d(r,{assets:function(){return p},contentTitle:function(){return h},default:function(){return m},frontMatter:function(){return d},metadata:function(){return t},toc:function(){return f}});var t=n(68707),a=n(24246),s=n(80980),i=n(15398),o=n(58636),l=n(14522),u=n(51118),c=n(39468);let d={title:"Docusaurus 2.4",authors:["slorber"],tags:["release"],image:"./img/social-card.png",date:new Date("2023-03-23T00:00:00.000Z")},h=void 0,p={image:n(72581).Z,authorsImageUrls:[void 0]},f=[{value:"Highlights",id:"highlights",level:2},{value:"Sidebar item description",id:"sidebar-item-description",level:3},{value:"Theme Query String",id:"theme-query-string",level:3},{value:"Remark plugin npm2yarn upgrade",id:"remark-plugin-npm2yarn-upgrade",level:3},{value:"gtag support for multiple tracking IDs",id:"gtag-support-for-multiple-tracking-ids",level:3},{value:"Developer Experience",id:"developer-experience",level:3},{value:"Translations",id:"translations",level:3},{value:"Other changes",id:"other-changes",level:2}];function g(e){let r={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(r.p,{children:["We are happy to announce ",(0,a.jsx)(r.strong,{children:"Docusaurus 2.4"}),"."]}),"\n",(0,a.jsxs)(r.p,{children:["The upgrade should be easy: as explained in our ",(0,a.jsx)(r.a,{href:"/community/release-process",children:"release process documentation"}),", minor versions respect ",(0,a.jsx)(r.a,{href:"https://semver.org/",children:"Semantic Versioning"}),"."]}),"\n",(0,a.jsx)(r.p,{children:(0,a.jsx)(r.img,{alt:"Docusaurus blog post social card",src:n(17414).Z+"",width:"1200",height:"600"})}),"\n","\n",(0,a.jsx)(r.h2,{id:"highlights",children:"Highlights"}),"\n",(0,a.jsx)(r.h3,{id:"sidebar-item-description",children:"Sidebar item description"}),"\n",(0,a.jsxs)(r.p,{children:["In ",(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8236",children:"#8236"}),", we made it possible to provide a new ",(0,a.jsx)(r.code,{children:"description"})," attribute for docs sidebar items of type ",(0,a.jsx)(r.code,{children:"link"})," and ",(0,a.jsx)(r.code,{children:"category"}),"."]}),"\n",(0,a.jsx)(r.pre,{children:(0,a.jsx)(r.code,{className:"language-tsx",metastring:'title="sidebars.js"',children:"[\n {\n type: 'link',\n label: 'Link with description',\n href: 'https://docusaurus.io',\n // highlight-next-line\n description: 'Some link description',\n },\n {\n type: 'category',\n label: 'Category with description',\n // highlight-next-line\n description: 'Some category description',\n items: [],\n },\n];\n"})}),"\n",(0,a.jsx)(r.p,{children:"These descriptions will be used in category generated index pages."}),"\n",(0,a.jsx)(r.p,{children:(0,a.jsx)(r.img,{alt:"Show sidebar category generated index with custom descriptions",src:n(92539).Z+"",width:"1400",height:"691"})}),"\n",(0,a.jsx)(r.h3,{id:"theme-query-string",children:"Theme Query String"}),"\n",(0,a.jsxs)(r.p,{children:["In ",(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8708",children:"#8708"}),", we added the possibility to force Docusaurus to initialize itself in ",(0,a.jsx)(r.code,{children:"light"})," or ",(0,a.jsx)(r.code,{children:"dark"})," mode through a new ",(0,a.jsx)(r.code,{children:"docusaurus-theme"})," query-string parameter."]}),"\n",(0,a.jsx)(r.p,{children:"This is useful to ensure a consistent theme when embedding an existing Docusaurus page into an iframe or WebView."}),"\n",(0,a.jsx)(u.Z,{url:"/docs/?docusaurus-theme=light"}),"\n",(0,a.jsx)(u.Z,{url:"/docs/?docusaurus-theme=dark"}),"\n",(0,a.jsx)(r.h3,{id:"remark-plugin-npm2yarn-upgrade",children:"Remark plugin npm2yarn upgrade"}),"\n",(0,a.jsxs)(r.p,{children:["In ",(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8690",children:"#8690"}),", we upgraded our Remark plugin ",(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-remark-plugin-npm2yarn",children:"@docusaurus/remark-plugin-npm2yarn"})," with many conversion bug fixes, first-class support for pnpm, and the ability to register custom converters producing new tabs."]}),"\n",(0,a.jsx)(r.pre,{children:(0,a.jsx)(r.code,{className:"language-markdown",children:"Run these commands!\n\n```bash npm2yarn\nnpm install\nnpm run build\nnpm run myCustomScript -- --some-arg\n```\n"})}),"\n",(0,a.jsx)(l.Z,{children:(0,a.jsxs)(i.Z,{children:[(0,a.jsx)(o.Z,{value:"npm",children:(0,a.jsx)(r.pre,{children:(0,a.jsx)(r.code,{className:"language-bash",children:"npm install\nnpm run build\nnpm run myCustomScript -- --some-arg\n"})})}),(0,a.jsx)(o.Z,{value:"yarn",label:"Yarn",children:(0,a.jsx)(r.pre,{children:(0,a.jsx)(r.code,{className:"language-bash",children:"yarn install\nyarn build\nyarn myCustomScript --some-arg\n"})})}),(0,a.jsx)(o.Z,{value:"pnpm",label:"pnpm",children:(0,a.jsx)(r.pre,{children:(0,a.jsx)(r.code,{className:"language-bash",children:"pnpm install\npnpm run build\npnpm run myCustomScript --some-arg\n"})})})]})}),"\n",(0,a.jsx)(r.h3,{id:"gtag-support-for-multiple-tracking-ids",children:"gtag support for multiple tracking IDs"}),"\n",(0,a.jsxs)(r.p,{children:["In ",(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8620",children:"#8620"})," we added support for the ",(0,a.jsx)(r.a,{href:"/docs/api/plugins/@docusaurus/plugin-google-gtag",children:"@docusaurus/plugin-google-gtag"})," plugin to declare multiple tracking IDs."]}),"\n",(0,a.jsx)(r.pre,{children:(0,a.jsx)(r.code,{className:"language-js",metastring:'title="docusaurus.config.js"',children:"module.exports = {\n presets: [\n [\n '@docusaurus/preset-classic',\n {\n gtag: {\n trackingID: [\n // highlight-next-line\n 'G-<YOUR-NEW-GA4-ID>',\n // highlight-next-line\n 'UA-<YOUR-OLD-UA-ID>',\n ],\n },\n },\n ],\n ],\n};\n"})}),"\n",(0,a.jsxs)(r.admonition,{title:"Google is sunsetting Universal Analytics",type:"warning",children:[(0,a.jsxs)(r.p,{children:[(0,a.jsx)(r.strong,{children:(0,a.jsx)(r.a,{href:"https://blog.google/products/marketingplatform/analytics/prepare-for-future-with-google-analytics-4/",children:"Google will sunset its Universal Analytics"})})," on ",(0,a.jsx)(r.strong,{children:"July 1, 2023"}),"."]}),(0,a.jsxs)(r.p,{children:["Docusaurus users should migrate to Google Analytics 4. Google ",(0,a.jsx)(r.strong,{children:"does not permit to migrate your existing Universal Analytics data"})," to your new Google Analytics 4 property."]}),(0,a.jsxs)(r.p,{children:["To preserve the continuity of your analytics, we temporarily recommend that you report events to 2 tracking IDs at the same time: the old one (",(0,a.jsx)(r.code,{children:"UA-*"}),") and new one (",(0,a.jsx)(r.code,{children:"G-*"}),"). Refer to the ",(0,a.jsx)(r.strong,{children:(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/issues/7221",children:"dedicated issue"})})," for details."]})]}),"\n",(0,a.jsx)(r.h3,{id:"developer-experience",children:"Developer Experience"}),"\n",(0,a.jsxs)(r.p,{children:["In ",(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8736",children:"#8736"}),", we improved how we render error messages and added initial support to render the full causal chain of an error (see ",(0,a.jsx)(r.a,{href:"https://h3manth.com/ES2022/#error-cause",children:"ES2022 Error Cause"}),")."]}),"\n",(0,a.jsx)(r.admonition,{type:"tip",children:(0,a.jsxs)(r.p,{children:["To see it in action, click here: ",(0,a.jsx)(c.Z,{cause:"Probably undefined is not a function \uD83D\uDE04"})]})}),"\n",(0,a.jsxs)(r.p,{children:["In ",(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8735",children:"#8735"})," we also made navbar-related error messages clearer to help users understand what they did wrong."]}),"\n",(0,a.jsx)(r.p,{children:(0,a.jsx)(r.img,{alt:"Docusaurus navbar error message screenshot",src:n(20788).Z+"",width:"1676",height:"1614"})}),"\n",(0,a.jsx)(r.h3,{id:"translations",children:"Translations"}),"\n",(0,a.jsx)(r.p,{children:"We made it possible to translate some new elements:"}),"\n",(0,a.jsxs)(r.ul,{children:["\n",(0,a.jsxs)(r.li,{children:[(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8677",children:"#8677"})," introduces a new ",(0,a.jsx)(r.code,{children:"process.env.DOCUSAURUS_CURRENT_LOCALE"})," (experimental) allowing you to localize your config file, including site title, tagline, announcement bar, baseUrl..."]}),"\n",(0,a.jsxs)(r.li,{children:[(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8616",children:"#8616"})," allows to translate the navbar and footer logo alt text"]}),"\n"]}),"\n",(0,a.jsx)(r.p,{children:"We added default theme translation support for multiple languages:"}),"\n",(0,a.jsxs)(r.ul,{children:["\n",(0,a.jsxs)(r.li,{children:["\uD83C\uDDED\uD83C\uDDFA ",(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8668",children:"#8668"}),": Hungarian"]}),"\n",(0,a.jsxs)(r.li,{children:["\uD83C\uDDF3\uD83C\uDDF4 ",(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8631",children:"#8631"}),": Norwegian (Bokm\xe5l)"]}),"\n"]}),"\n",(0,a.jsx)(r.admonition,{type:"tip",children:(0,a.jsxs)(r.p,{children:["Completing theme translations is an ",(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/issues/3526",children:"ongoing effort"})," and an easy way to contribute to Docusaurus. We add new theme features regularly, for which we often ",(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/issues/3526",children:"need new translations"}),"."]})}),"\n",(0,a.jsx)(r.h2,{id:"other-changes",children:"Other changes"}),"\n",(0,a.jsx)(r.p,{children:"Other notable changes include:"}),"\n",(0,a.jsxs)(r.ul,{children:["\n",(0,a.jsxs)(r.li,{children:[(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8674",children:"#8674"}),": respect ",(0,a.jsx)(r.code,{children:"prefers-reduced-motion: reduce"})," media query"]}),"\n",(0,a.jsxs)(r.li,{children:[(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8712",children:"#8712"}),": use a navbar item of type ",(0,a.jsx)(r.code,{children:"docSidebar"})," in template"]}),"\n",(0,a.jsxs)(r.li,{children:[(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8801",children:"#8801"}),": allow tabs children to be falsy"]}),"\n",(0,a.jsxs)(r.li,{children:[(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8757",children:"#8757"}),": make search page react to external query-string changes"]}),"\n",(0,a.jsxs)(r.li,{children:[(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8803",children:"#8803"}),": fix code block buttons position in RTL"]}),"\n",(0,a.jsxs)(r.li,{children:[(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8615",children:"#8615"}),": fix color mode toggle when using dark navbar"]}),"\n",(0,a.jsxs)(r.li,{children:[(0,a.jsx)(r.a,{href:"https://github.com/facebook/docusaurus/pull/8699",children:"#8699"}),": fix navbar dropdown tab focus bug"]}),"\n"]}),"\n",(0,a.jsxs)(r.p,{children:["Check the ",(0,a.jsx)(r.strong,{children:(0,a.jsx)(r.a,{href:"/changelog/2.4.0",children:"2.4.0 changelog entry"})})," for an exhaustive list of changes."]})]})}function m(e={}){let{wrapper:r}={...(0,s.a)(),...e.components};return r?(0,a.jsx)(r,{...e,children:(0,a.jsx)(g,{...e})}):g(e)}},58636:function(e,r,n){n.d(r,{Z:()=>i});var t=n("24246");n("27378");var a=n("90496");let s="tabItem_pnkT";function i(e){var r=e.children,n=e.hidden,i=e.className;return(0,t.jsx)("div",{role:"tabpanel",className:(0,a.Z)(s,i),hidden:n,children:r})}},15398:function(e,r,n){n.d(r,{Z:()=>O});var t=n("24246"),a=n("27378"),s=n("90496"),i=n("54947"),o=n("3620"),l=n("844"),u=n("97486"),c=n("32263"),d=n("16971");function h(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=Array(r);n<r;n++)t[n]=e[n];return t}function p(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var n,t,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var s=[],i=!0,o=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(s.push(n.value),!r||s.length!==r);i=!0);}catch(e){o=!0,t=e}finally{try{!i&&null!=a.return&&a.return()}finally{if(o)throw t}}return s}}(e,r)||function(e,r){if(e){if("string"==typeof e)return h(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,r)}}(e,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){var r,n;return null!==(n=null===(r=a.Children.toArray(e).filter(function(e){return"\n"!==e}).map(function(e){var r,n;if(!e||(0,a.isValidElement)(e)&&(r=e.props)&&(void 0===r?"undefined":(n=r)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)=="object"&&"value"in r)return e;throw Error("Docusaurus error: Bad <Tabs> child <".concat("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.'))}))||void 0===r?void 0:r.filter(Boolean))&&void 0!==n?n:[]}function g(e){var r=e.value;return e.tabValues.some(function(e){return e.value===r})}var m=n("71607");let b="tabList_Qoir",y="tabItem_AQgk";function j(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{},t=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.forEach(function(r){var t,a,s;t=e,a=r,s=n[r],a in t?Object.defineProperty(t,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[a]=s})}return e}function x(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):(function(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n})(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}),e}function v(e){var r=e.className,n=e.block,a=e.selectedValue,o=e.selectValue,l=e.tabValues,u=[],c=(0,i.o5)().blockElementScrollPositionUntilNextRender,d=function(e){var r=e.currentTarget,n=l[u.indexOf(r)].value;n!==a&&(c(r),o(n))},h=function(e){var r=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var n,t=u.indexOf(e.currentTarget)+1;r=null!==(n=u[t])&&void 0!==n?n:u[0];break;case"ArrowLeft":var a,s=u.indexOf(e.currentTarget)-1;r=null!==(a=u[s])&&void 0!==a?a:u[u.length-1]}null==r||r.focus()};return(0,t.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.Z)("tabs",{"tabs--block":n},r),children:l.map(function(e){var r=e.value,n=e.label,i=e.attributes;return(0,t.jsx)("li",x(j({role:"tab",tabIndex:a===r?0:-1,"aria-selected":a===r,ref:function(e){return u.push(e)},onKeyDown:h,onClick:d},i),{className:(0,s.Z)("tabs__item",y,null==i?void 0:i.className,{"tabs__item--active":a===r}),children:null!=n?n:r}),r)})})}function w(e){var r=e.lazy,n=e.children,i=e.selectedValue,o=(Array.isArray(n)?n:[n]).filter(Boolean);if(r){var l=o.find(function(e){return e.props.value===i});return l?(0,a.cloneElement)(l,{className:(0,s.Z)("margin-top--md",l.props.className)}):null}return(0,t.jsx)("div",{className:"margin-top--md",children:o.map(function(e,r){return(0,a.cloneElement)(e,{key:r,hidden:e.props.value!==i})})})}function k(e){var r=function(e){var r,n,t,s,i,h,m,b,y,j,x,v,w,k,O=e.defaultValue,S=e.queryString,D=e.groupId;var I=(n=(r=e).values,t=r.children,(0,a.useMemo)(function(){var e=null!=n?n:f(t).map(function(e){var r=e.props;return{value:r.value,label:r.label,attributes:r.attributes,default:r.default}});return!function(e){var r=(0,c.lx)(e,function(e,r){return e.value===r.value});if(r.length>0)throw Error('Docusaurus error: Duplicate values "'.concat(r.map(function(e){return e.value}).join(", "),'" found in <Tabs>. Every value needs to be unique.'))}(e),e},[n,t])),P=p((0,a.useState)(function(){return function(e){var r,n=e.defaultValue,t=e.tabValues;if(0===t.length)throw Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(n){if(!g({value:n,tabValues:t}))throw Error('Docusaurus error: The <Tabs> has a defaultValue "'.concat(n,'" but none of its children has the corresponding value. Available values are: ').concat(t.map(function(e){return e.value}).join(", "),". If you intend to show no default tab, use defaultValue={null} instead."));return n}var a=null!==(r=t.find(function(e){return e.default}))&&void 0!==r?r:t[0];if(!a)throw Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:O,tabValues:I})}),2),N=P[0],T=P[1];var A=p((i=(s={queryString:void 0!==S&&S,groupId:D}).queryString,h=s.groupId,m=(0,o.k6)(),b=function(e){var r=e.queryString,n=void 0!==r&&r,t=e.groupId;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 null!=t?t:null}({queryString:void 0!==i&&i,groupId:h}),[(0,u._X)(b),(0,a.useCallback)(function(e){if(!!b){var r,n,t=new URLSearchParams(m.location.search);t.set(b,e),m.replace((r=function(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{},t=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.forEach(function(r){var t,a,s;t=e,a=r,s=n[r],a in t?Object.defineProperty(t,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[a]=s})}return e}({},m.location),n=(n={search:t.toString()},n),Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r))}},[b,m])]),2),Z=A[0],E=A[1];var C=p((j=(y=({groupId:D}).groupId)?"docusaurus.tab.".concat(y):null,v=(x=p((0,d.Nk)(j),2))[0],w=x[1],[v,(0,a.useCallback)(function(e){if(!!j)w.set(e)},[j,w])]),2),U=C[0],R=C[1];var V=g({value:k=null!=Z?Z:U,tabValues:I})?k:null;return(0,l.Z)(function(){V&&T(V)},[V]),{selectedValue:N,selectValue:(0,a.useCallback)(function(e){if(!g({value:e,tabValues:I}))throw Error("Can't select invalid tab value=".concat(e));T(e),E(e),R(e)},[E,R,I]),tabValues:I}}(e);return(0,t.jsxs)("div",{className:(0,s.Z)("tabs-container",b),children:[(0,t.jsx)(v,j({},r,e)),(0,t.jsx)(w,j({},r,e))]})}function O(e){var r=(0,m.Z)();return(0,t.jsx)(k,x(j({},e),{children:f(e.children)}),String(r))}},51118:function(e,r,n){n.d(r,{Z:function(){return s}});var t=n(24246);n(27378);var a=n(14522);function s(e){var r=e.url;return(0,t.jsx)("div",{style:{padding:10},children:(0,t.jsx)(a.Z,{url:r,style:{minWidth:"min(100%,45vw)",width:800,maxWidth:"100%",overflow:"hidden"},bodyStyle:{padding:0},children:(0,t.jsx)("iframe",{src:r,title:r,style:{display:"block",width:"100%",height:300}})})})}},14522:function(e,r,n){n.d(r,{Z:()=>p});var t=n("24246");n("27378");var a=n("90496");let s="browserWindow_my1Q",i="browserWindowHeader_jXSR",o="buttons_uHc7",l="browserWindowAddressBar_Pd8y",u="dot_giz1",c="browserWindowMenuIcon_Vhuh",d="bar_rrRL",h="browserWindowBody_Idgs";function p(e){var r,n,p=e.children,f=e.minHeight,g=e.url,m=e.style,b=e.bodyStyle;return(0,t.jsxs)("div",{className:s,style:(r=function(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{},t=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.forEach(function(r){var t,a,s;t=e,a=r,s=n[r],a in t?Object.defineProperty(t,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[a]=s})}return e}({},m),n=(n={minHeight:f},n),Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r),children:[(0,t.jsxs)("div",{className:i,children:[(0,t.jsxs)("div",{className:o,children:[(0,t.jsx)("span",{className:u,style:{background:"#f25f58"}}),(0,t.jsx)("span",{className:u,style:{background:"#fbbe3c"}}),(0,t.jsx)("span",{className:u,style:{background:"#58cb42"}})]}),(0,t.jsx)("div",{className:(0,a.Z)(l,"text--truncate"),children:void 0===g?"http://localhost:3000":g}),(0,t.jsx)("div",{className:c,children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:d}),(0,t.jsx)("span",{className:d}),(0,t.jsx)("span",{className:d})]})})]}),(0,t.jsx)("div",{className:h,style:b,children:p})]})}},39468:function(e,r,n){n.d(r,{Z:function(){return i}});var t=n(24246),a=n(27378);function s(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=Array(r);n<r;n++)t[n]=e[n];return t}function i(e){var r,n,i=e.children,o=e.message,l=e.cause;var u=(r=(0,a.useState)(!1),n=2,function(e){if(Array.isArray(e))return e}(r)||function(e,r){var n,t,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var s=[],i=!0,o=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(s.push(n.value),!r||s.length!==r);i=!0);}catch(e){o=!0,t=e}finally{try{!i&&null!=a.return&&a.return()}finally{if(o)throw t}}return s}}(r,2)||function(e,r){if(e){if("string"==typeof e)return s(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,r)}}(r,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=u[0],d=u[1];if(c)throw Error(void 0===o?"Boom!\nSomething bad happened, but you can try again!":o,{cause:l?Error(l):void 0});return(0,t.jsx)("button",{className:"button button--danger",type:"button",onClick:function(){return d(!0)},children:void 0===i?"Boom!":i})}},80980:function(e,r,n){n.d(r,{Z:function(){return o},a:function(){return i}});var t=n(27378);let a={},s=t.createContext(a);function i(e){let r=t.useContext(s);return t.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),t.createElement(s.Provider,{value:r},e.children)}},68707:function(e){e.exports=JSON.parse('{"permalink":"/blog/releases/2.4","editUrl":"https://github.com/facebook/docusaurus/edit/main/website/blog/releases/2.4/index.mdx","source":"@site/blog/releases/2.4/index.mdx","title":"Docusaurus 2.4","description":"We are happy to announce Docusaurus 2.4.","date":"2023-03-23T00:00:00.000Z","tags":[{"inline":false,"label":"Release","permalink":"/blog/tags/release","description":"Blog posts about Docusaurus\' new releases"}],"readingTime":3.05,"hasTruncateMarker":true,"authors":[{"name":"S\xe9bastien Lorber","title":"Docusaurus maintainer, This Week In React editor","url":"https://thisweekinreact.com","page":{"permalink":"/blog/authors/slorber"},"description":"A freelance React and React-Native developer near Paris and Docusaurus maintainer. Also runs ThisWeekInReact.com, a newsletter to stay updated with the React ecosystem.\\n","socials":{"x":"https://x.com/sebastienlorber","linkedin":"https://www.linkedin.com/in/sebastienlorber/","github":"https://github.com/slorber","newsletter":"https://thisweekinreact.com"},"imageURL":"https://github.com/slorber.png","key":"slorber"}],"frontMatter":{"title":"Docusaurus 2.4","authors":["slorber"],"tags":["release"],"image":"./img/social-card.png","date":"2023-03-23T00:00:00.000Z"},"unlisted":false,"lastUpdatedAt":1728806279000,"lastUpdatedBy":"S\xe9bastien Lorber","prevItem":{"title":"Upgrading frontend dependencies with confidence","permalink":"/blog/upgrading-frontend-dependencies-with-confidence-using-visual-regression-testing"},"nextItem":{"title":"Docusaurus 2.3","permalink":"/blog/releases/2.3"}}')}}]); |