mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-05 12:22:45 +02:00
1 line
No EOL
9.6 KiB
JavaScript
1 line
No EOL
9.6 KiB
JavaScript
(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["7143"],{91062:function(e,t,n){"use strict";n.r(t),n.d(t,{metadata:()=>r,contentTitle:()=>b,default:()=>y,assets:()=>m,toc:()=>f,frontMatter:()=>h});var r=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":1728636624000,"frontMatter":{},"sidebar":"docs","previous":{"title":"Configuration","permalink":"/docs/configuration"},"next":{"title":"TypeScript Support","permalink":"/docs/typescript-support"}}'),s=n("24246"),o=n("80980");n("27378");var i=n("90496"),a=n("77827"),c=n("35363"),l=n("21811"),d=n("57922"),u=[{name:"\uD83D\uDCE6 CodeSandbox",image:n(43867),url:"https://docusaurus.new/codesandbox",urlTS:"https://docusaurus.new/codesandbox-ts",description:(0,s.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:n(6951),url:"https://docusaurus.new/stackblitz",urlTS:"https://docusaurus.new/stackblitz-ts",description:(0,s.jsx)(a.Z,{id:"playground.stackblitz.description",values:{webContainersLink:(0,s.jsx)(c.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){var t=e.name,n=e.image,r=e.url,o=e.urlTS,u=e.description;return(0,s.jsx)("div",{className:"col col--6 margin-bottom--lg",children:(0,s.jsxs)("div",{className:(0,i.Z)("card"),children:[(0,s.jsx)("div",{className:(0,i.Z)("card__image"),children:(0,s.jsx)(c.Z,{to:r,children:(0,s.jsx)(l.Z,{img:n,alt:"".concat(t,"'s image")})})}),(0,s.jsxs)("div",{className:"card__body",children:[(0,s.jsx)(d.Z,{as:"h3",children:t}),(0,s.jsx)("p",{children:u})]}),(0,s.jsxs)("div",{className:"card__footer",children:[(0,s.jsx)("div",{style:{textAlign:"center"},children:(0,s.jsx)("b",{children:(0,s.jsx)(a.Z,{id:"playground.tryItButton",children:"Try it now!"})})}),(0,s.jsxs)("div",{className:"button-group button-group--block",children:[(0,s.jsx)(c.Z,{className:"button button--secondary",to:r,children:"JavaScript"}),(0,s.jsx)(c.Z,{className:"button button--secondary",to:o,children:"TypeScript"})]})]})]})})}function g(){return(0,s.jsx)("div",{className:"row",children:u.map(function(e){return(0,s.jsx)(p,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r,s,o;r=e,s=t,o=n[t],s in r?Object.defineProperty(r,s,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[s]=o})}return e}({},e),e.name)})})}let h={},b="Playground",m={},f=[];function x(e){let t={a:"a",admonition:"admonition",h1:"h1",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"playground",children:"Playground"})}),"\n",(0,s.jsxs)(t.p,{children:["Playgrounds allow you to run Docusaurus ",(0,s.jsx)(t.strong,{children:"in your browser, without installing anything"}),"!"]}),"\n",(0,s.jsx)(t.p,{children:"They are mostly useful for:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Testing Docusaurus"}),"\n",(0,s.jsx)(t.li,{children:"Reporting bugs"}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["Use ",(0,s.jsx)(t.a,{href:"https://docusaurus.new",children:"docusaurus.new"})," as an easy-to-remember shortcut."]}),"\n",(0,s.jsx)(t.p,{children:"Choose one of the available options below."}),"\n","\n",(0,s.jsx)(g,{}),"\n",(0,s.jsx)(t.admonition,{type:"tip",children:(0,s.jsxs)(t.p,{children:["For convenience, we'll remember your choice next time you visit ",(0,s.jsx)(t.a,{href:"https://docusaurus.new",children:"docusaurus.new"}),"."]})})]})}function y(e={}){let{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(x,{...e})}):x(e)}},43867:function(e,t,n){e.exports={src:{srcSet:n.p+"assets/ideal-img/codesandbox.7906bc4.640.png 640w,"+n.p+"assets/ideal-img/codesandbox.36984ff.1030.png 1030w",images:[{path:n.p+"assets/ideal-img/codesandbox.7906bc4.640.png",width:640,height:355},{path:n.p+"assets/ideal-img/codesandbox.36984ff.1030.png",width:1030,height:571}],src:n.p+"assets/ideal-img/codesandbox.7906bc4.640.png",toString:function(){return n.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,t,n){e.exports={src:{srcSet:n.p+"assets/ideal-img/stackblitz.4ee9b70.640.png 640w,"+n.p+"assets/ideal-img/stackblitz.8ebfdbb.1030.png 1030w",images:[{path:n.p+"assets/ideal-img/stackblitz.4ee9b70.640.png",width:640,height:356},{path:n.p+"assets/ideal-img/stackblitz.8ebfdbb.1030.png",width:1030,height:572}],src:n.p+"assets/ideal-img/stackblitz.4ee9b70.640.png",toString:function(){return n.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,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(24246);n(27378);var s=n(66222),o=n(77827);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r,s,o;r=e,s=t,o=n[t],s in r?Object.defineProperty(r,s,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[s]=o})}return e}function a(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function c(e,t){switch(e){case"noicon":case"loaded":return null;case"loading":return(0,o.I)({id:"theme.IdealImageMessage.loading",message:"Loading...",description:"When the full-scale image is loading"});case"load":var n=t.pickedSrc.size,r=n?" (".concat(function(e){var t=["B","KB","MB","GB","TB"];if(0===e)return"n/a";var n=Math.floor(Math.log(e)/Math.log(1024));return 0===n?"".concat(e," ").concat(t[n]):"".concat((e/Math.pow(1024,n)).toFixed(1)," ").concat(t[n])}(n),")"):"";return(0,o.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:r});case"offline":return(0,o.I)({id:"theme.IdealImageMessage.offline",message:"Your browser is offline. Image not loaded",description:"When the user is viewing an offline document"});case"error":if(404===t.loadInfo)return(0,o.I)({id:"theme.IdealImageMessage.404error",message:"404. Image not found",description:"When the image is not found"});return(0,o.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: ".concat(e))}}function l(e){var t,n,o=e.img,l=function(e,t){if(null==e)return{};var n,r,s=function(e,t){if(null==e)return{};var n,r,s={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&(s[n]=e[n]);return s}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++){if(n=o[r],!(t.indexOf(n)>=0))Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}}return s}(e,["img"]);return"string"==typeof o||"default"in o?(0,r.jsx)("img",i({src:"string"==typeof o?o:o.default},l)):(0,r.jsx)(s.default,a(i({},l),{height:null!==(t=o.src.height)&&void 0!==t?t:100,width:null!==(n=o.src.width)&&void 0!==n?n:100,placeholder:{lqip:o.preSrc},src:o.src.src,srcSet:o.src.images.map(function(e){return a(i({},e),{src:e.path})}),getMessage:c}))}},80980:function(e,t,n){"use strict";n.d(t,{Z:function(){return a},a:function(){return i}});var r=n(27378);let s={},o=r.createContext(s);function i(e){let t=r.useContext(o);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]); |