mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-02 19:57:25 +02:00
1 line
No EOL
7.9 KiB
JavaScript
1 line
No EOL
7.9 KiB
JavaScript
(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["7143"],{91062:function(e,s,t){"use strict";t.r(s),t.d(s,{metadata:()=>n,contentTitle:()=>m,default:()=>f,assets:()=>b,toc:()=>A,frontMatter:()=>h});var n=JSON.parse('{"id":"playground","title":"Playground","description":"Playgrounds allow you to run Docusaurus in your browser, without installing anything!","source":"@site/docs/playground.mdx","sourceDirName":".","slug":"/playground","permalink":"/docs/playground","draft":false,"unlisted":false,"editUrl":"https://github.com/facebook/docusaurus/edit/main/website/docs/playground.mdx","tags":[],"version":"current","lastUpdatedBy":"S\xe9bastien Lorber","lastUpdatedAt":1729847735000,"frontMatter":{},"sidebar":"docs","previous":{"title":"Configuration","permalink":"/docs/configuration"},"next":{"title":"TypeScript Support","permalink":"/docs/typescript-support"}}'),r=t("24246"),i=t("80980");t("27378");var o=t("90496"),a=t("77827"),d=t("35363"),l=t("21811"),c=t("57922");let u=[{name:"\uD83D\uDCE6 CodeSandbox",image:t(43867),url:"https://docusaurus.new/codesandbox",urlTS:"https://docusaurus.new/codesandbox-ts",description:(0,r.jsx)(a.Z,{id:"playground.codesandbox.description",children:"CodeSandbox is an online code editor and development environment that allows developers to create, share and collaborate on web development projects in a browser-based environment"})},{name:"\u26A1 StackBlitz \uD83C\uDD95",image:t(6951),url:"https://docusaurus.new/stackblitz",urlTS:"https://docusaurus.new/stackblitz-ts",description:(0,r.jsx)(a.Z,{id:"playground.stackblitz.description",values:{webContainersLink:(0,r.jsx)(d.Z,{href:"https://blog.stackblitz.com/posts/introducing-webcontainers/",children:"WebContainers"})},children:"StackBlitz uses a novel {webContainersLink} technology to run Docusaurus directly in your browser."})}];function p(e){let{name:s,image:t,url:n,urlTS:i,description:u}=e;return(0,r.jsx)("div",{className:"col col--6 margin-bottom--lg",children:(0,r.jsxs)("div",{className:(0,o.Z)("card"),children:[(0,r.jsx)("div",{className:(0,o.Z)("card__image"),children:(0,r.jsx)(d.Z,{to:n,children:(0,r.jsx)(l.Z,{img:t,alt:`${s}'s image`})})}),(0,r.jsxs)("div",{className:"card__body",children:[(0,r.jsx)(c.Z,{as:"h3",children:s}),(0,r.jsx)("p",{children:u})]}),(0,r.jsxs)("div",{className:"card__footer",children:[(0,r.jsx)("div",{style:{textAlign:"center"},children:(0,r.jsx)("b",{children:(0,r.jsx)(a.Z,{id:"playground.tryItButton",children:"Try it now!"})})}),(0,r.jsxs)("div",{className:"button-group button-group--block",children:[(0,r.jsx)(d.Z,{className:"button button--secondary",to:n,children:"JavaScript"}),(0,r.jsx)(d.Z,{className:"button button--secondary",to:i,children:"TypeScript"})]})]})]})})}function g(){return(0,r.jsx)("div",{className:"row",children:u.map(e=>(0,r.jsx)(p,{...e},e.name))})}let h={},m="Playground",b={},A=[];function x(e){let s={a:"a",admonition:"admonition",h1:"h1",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"playground",children:"Playground"})}),"\n",(0,r.jsxs)(s.p,{children:["Playgrounds allow you to run Docusaurus ",(0,r.jsx)(s.strong,{children:"in your browser, without installing anything"}),"!"]}),"\n",(0,r.jsx)(s.p,{children:"They are mostly useful for:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Testing Docusaurus"}),"\n",(0,r.jsx)(s.li,{children:"Reporting bugs"}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Use ",(0,r.jsx)(s.a,{href:"https://docusaurus.new",children:"docusaurus.new"})," as an easy-to-remember shortcut."]}),"\n",(0,r.jsx)(s.p,{children:"Choose one of the available options below."}),"\n","\n",(0,r.jsx)(g,{}),"\n",(0,r.jsx)(s.admonition,{type:"tip",children:(0,r.jsxs)(s.p,{children:["For convenience, we'll remember your choice next time you visit ",(0,r.jsx)(s.a,{href:"https://docusaurus.new",children:"docusaurus.new"}),"."]})})]})}function f(e={}){let{wrapper:s}={...(0,i.a)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(x,{...e})}):x(e)}},43867:function(e,s,t){e.exports={src:{srcSet:t.p+"assets/ideal-img/codesandbox.7906bc4.640.png 640w,"+t.p+"assets/ideal-img/codesandbox.36984ff.1030.png 1030w",images:[{path:t.p+"assets/ideal-img/codesandbox.7906bc4.640.png",width:640,height:355},{path:t.p+"assets/ideal-img/codesandbox.36984ff.1030.png",width:1030,height:571}],src:t.p+"assets/ideal-img/codesandbox.7906bc4.640.png",toString:function(){return t.p+"assets/ideal-img/codesandbox.7906bc4.640.png"},placeholder:void 0,width:640,height:355},preSrc:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAGCAYAAAD68A/GAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA7ElEQVR4nB3Ov0rDQACA8ZszxVrvLpfYu0goUWtQwT+IOtRasrg6WQdbhL5BHZwEoaVIaXHpC6irxc3JxUVfw01wcHD7pB1+07d8orKasb1zQLmcUrIxcZwQmEUK85IFrVGBQQcRwtolppIkIQxDlFJsrm+QHx1Tq1bJa3UO9/YRWqtZTNMVXOwozhXI26dcTYbcPo+5ntzTGnQQURQhpaRkLYExSL+IPMnY6p9zNu5QH7WRzV2Ec47QGNJ0mcpahlYBN4MuP/zx9vnB1+83L++vCN/3mVJKzxY8z+Oy2eLp4ZFG44Lh3Yh+t8c/jL9rZrM0xfsAAAAASUVORK5CYII="}},6951:function(e,s,t){e.exports={src:{srcSet:t.p+"assets/ideal-img/stackblitz.4ee9b70.640.png 640w,"+t.p+"assets/ideal-img/stackblitz.8ebfdbb.1030.png 1030w",images:[{path:t.p+"assets/ideal-img/stackblitz.4ee9b70.640.png",width:640,height:356},{path:t.p+"assets/ideal-img/stackblitz.8ebfdbb.1030.png",width:1030,height:572}],src:t.p+"assets/ideal-img/stackblitz.4ee9b70.640.png",toString:function(){return t.p+"assets/ideal-img/stackblitz.4ee9b70.640.png"},placeholder:void 0,width:640,height:356},preSrc:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAGCAYAAAD68A/GAAAACXBIWXMAABYlAAAWJQFJUiTwAAAA2UlEQVR4nB3LvUrDUABA4fsAovbPNs29yb25adKEWlJB8C0rqFOx+BD+ILjbvTiYDiWpUx2zWAIeMcPHmY5I05SLyysm0wxjR+ggbLiej/INvrZ42iKkjvBsgiMDXC+k5/hE4ykvb6+8r1as1x88Pj0jBjJABhP6KmbgWlpdySjJ2G4Ldl876rqmLArEUIV44TnSjFE6pusYonRGvtlQliU/hwOfeY5QJsbYFOlHOCqk3ZNEScZ+/01VVfxCM4jTdp9/J62zpkfHHYZSc3N7x2Jxz3L5wHx+zR8O9nujOJsFvAAAAABJRU5ErkJggg=="}},21811:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});var n=t(24246);t(27378);var r=t(66222),i=t(77827);function o(e,s){switch(e){case"noicon":case"loaded":return null;case"loading":return(0,i.I)({id:"theme.IdealImageMessage.loading",message:"Loading...",description:"When the full-scale image is loading"});case"load":{let{pickedSrc:e}=s,{size:t}=e,n=t?` (${function(e){let s=["B","KB","MB","GB","TB"];if(0===e)return"n/a";let t=Math.floor(Math.log(e)/Math.log(1024));return 0===t?`${e} ${s[t]}`:`${(e/1024**t).toFixed(1)} ${s[t]}`}(t)})`:"";return(0,i.I)({id:"theme.IdealImageMessage.load",message:"Click to load{sizeMessage}",description:"To prompt users to load the full image. sizeMessage is a parenthesized size figure."},{sizeMessage:n})}case"offline":return(0,i.I)({id:"theme.IdealImageMessage.offline",message:"Your browser is offline. Image not loaded",description:"When the user is viewing an offline document"});case"error":{let{loadInfo:e}=s;if(404===e)return(0,i.I)({id:"theme.IdealImageMessage.404error",message:"404. Image not found",description:"When the image is not found"});return(0,i.I)({id:"theme.IdealImageMessage.error",message:"Error. Click to reload",description:"When the image fails to load for unknown error"})}default:throw Error(`Wrong icon: ${e}`)}}function a(e){let{img:s,...t}=e;return"string"==typeof s||"default"in s?(0,n.jsx)("img",{src:"string"==typeof s?s:s.default,...t}):(0,n.jsx)(r.default,{...t,height:s.src.height??100,width:s.src.width??100,placeholder:{lqip:s.preSrc},src:s.src.src,srcSet:s.src.images.map(e=>({...e,src:e.path})),getMessage:o})}},80980:function(e,s,t){"use strict";t.d(s,{Z:function(){return a},a:function(){return o}});var n=t(27378);let r={},i=n.createContext(r);function o(e){let s=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); |