@epic-web/workshop-app 5.6.0 → 5.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/{_-hAKYb2AG.js → _-CjjFMNGC.js} +2 -2
- package/build/client/assets/{_-hAKYb2AG.js.map → _-CjjFMNGC.js.map} +1 -1
- package/build/client/assets/_exerciseNumber-CqkGzsgV.js +2 -0
- package/build/client/assets/{_exerciseNumber-PTdG9GGB.js.map → _exerciseNumber-CqkGzsgV.js.map} +1 -1
- package/build/client/assets/{_exerciseNumber_._stepNumber-03erOIGo.js → _exerciseNumber_._stepNumber-BNWGPi9m.js} +2 -2
- package/build/client/assets/{_exerciseNumber_._stepNumber-03erOIGo.js.map → _exerciseNumber_._stepNumber-BNWGPi9m.js.map} +1 -1
- package/build/client/assets/_exerciseNumber_.finished-CdNhLhKg.js +2 -0
- package/build/client/assets/{_exerciseNumber_.finished-DQg4F1NL.js.map → _exerciseNumber_.finished-CdNhLhKg.js.map} +1 -1
- package/build/client/assets/_layout-BMa5nZcJ.js +2 -0
- package/build/client/assets/{_layout-DHoH74NH.js.map → _layout-BMa5nZcJ.js.map} +1 -1
- package/build/client/assets/{_layout-B4JGpA3A.js → _layout-CwTidn3v.js} +2 -2
- package/build/client/assets/{_layout-B4JGpA3A.js.map → _layout-CwTidn3v.js.map} +1 -1
- package/build/client/assets/{_layout-BJbMl6SJ.js → _layout-DV29dlKr.js} +2 -2
- package/build/client/assets/{_layout-BJbMl6SJ.js.map → _layout-DV29dlKr.js.map} +1 -1
- package/build/client/assets/{_layout-Bu0lel3p.js → _layout-Muw3ERYT.js} +3 -3
- package/build/client/assets/{_layout-Bu0lel3p.js.map → _layout-Muw3ERYT.js.map} +1 -1
- package/build/client/assets/{accordion-DLg7gJkp.js → accordion-C-sW--in.js} +2 -2
- package/build/client/assets/{accordion-DLg7gJkp.js.map → accordion-C-sW--in.js.map} +1 -1
- package/build/client/assets/account-Cc968svU.js +2 -0
- package/build/client/assets/account-Cc968svU.js.map +1 -0
- package/build/client/assets/app-BOqXK9hi.js +2 -0
- package/build/client/assets/{app-DJDjmdlu.js.map → app-BOqXK9hi.js.map} +1 -1
- package/build/client/assets/{app-b7uXHF5m.css → app-C3e6tFRf.css} +1 -1
- package/build/client/assets/{button-39zQyNX6.js → button-BS845Tjo.js} +2 -2
- package/build/client/assets/{button-39zQyNX6.js.map → button-BS845Tjo.js.map} +1 -1
- package/build/client/assets/{components-DUNtf72c.js → components-DrvY4pal.js} +4 -4
- package/build/client/assets/{components-DUNtf72c.js.map → components-DrvY4pal.js.map} +1 -1
- package/build/client/assets/diff-D0e_PrB7.js +2 -0
- package/build/client/assets/{diff-B3oaU_KB.js.map → diff-D0e_PrB7.js.map} +1 -1
- package/build/client/assets/{diff-BNCREJvf.js → diff-DtvfyjPI.js} +2 -2
- package/build/client/assets/{diff-BNCREJvf.js.map → diff-DtvfyjPI.js.map} +1 -1
- package/build/client/assets/{discord-CEOqKs_c.js → discord-BfP_Rny5.js} +2 -2
- package/build/client/assets/{discord-CEOqKs_c.js.map → discord-BfP_Rny5.js.map} +1 -1
- package/build/client/assets/discord-DILzAZN8.js +2 -0
- package/build/client/assets/discord-DILzAZN8.js.map +1 -0
- package/build/client/assets/{entry.client-CrlHhRMR.js → entry.client-CQusg5Iz.js} +2 -2
- package/build/client/assets/{entry.client-CrlHhRMR.js.map → entry.client-CQusg5Iz.js.map} +1 -1
- package/build/client/assets/epic-video-qHKPWPt1.js +3053 -0
- package/build/client/assets/epic-video-qHKPWPt1.js.map +1 -0
- package/build/client/assets/error-boundary-Beul7lrT.js +2 -0
- package/build/client/assets/{error-boundary-3zItlMUO.js.map → error-boundary-Beul7lrT.js.map} +1 -1
- package/build/client/assets/finished-DUKfL220.js +2 -0
- package/build/client/assets/{finished-rUzUjnEm.js.map → finished-DUKfL220.js.map} +1 -1
- package/build/client/assets/{index-CV3nxGFp.js → index-BHwOR8R1.js} +2 -2
- package/build/client/assets/{index-CV3nxGFp.js.map → index-BHwOR8R1.js.map} +1 -1
- package/build/client/assets/index-BOQWfIQC.js +36 -0
- package/build/client/assets/index-BOQWfIQC.js.map +1 -0
- package/build/client/assets/{index-DFqQCjCw.js → index-BPegC-d3.js} +2 -2
- package/build/client/assets/{index-DFqQCjCw.js.map → index-BPegC-d3.js.map} +1 -1
- package/build/client/assets/{index-LjRZeU7x.js → index-CB8bjE90.js} +2 -2
- package/build/client/assets/{index-LjRZeU7x.js.map → index-CB8bjE90.js.map} +1 -1
- package/build/client/assets/{index-C_B1-9rF.js → index-CGzylDPY.js} +2 -2
- package/build/client/assets/{index-C_B1-9rF.js.map → index-CGzylDPY.js.map} +1 -1
- package/build/client/assets/index-DbCT6N5p.js +2 -0
- package/build/client/assets/{index-DE-jwnOP.js.map → index-DbCT6N5p.js.map} +1 -1
- package/build/client/assets/{index-DDqzbGM2.js → index-cZQeGrqL.js} +2 -2
- package/build/client/assets/{index-DDqzbGM2.js.map → index-cZQeGrqL.js.map} +1 -1
- package/build/client/assets/{index-CLNXC84j.js → index-egcHQOpF.js} +2 -2
- package/build/client/assets/{index-CLNXC84j.js.map → index-egcHQOpF.js.map} +1 -1
- package/build/client/assets/index-oED4uZLa.js +2 -0
- package/build/client/assets/{index-mivnjq36.js.map → index-oED4uZLa.js.map} +1 -1
- package/build/client/assets/{loading-DW_I206H.js → loading-C2wPVvQw.js} +2 -2
- package/build/client/assets/{loading-DW_I206H.js.map → loading-C2wPVvQw.js.map} +1 -1
- package/build/client/assets/login-DoU7gifi.js +2 -0
- package/build/client/assets/{login-CdNej0Z7.js.map → login-DoU7gifi.js.map} +1 -1
- package/build/client/assets/manifest-3096dc61.js +1 -0
- package/build/client/assets/mdx-CsS30JUo.js +2 -0
- package/build/client/assets/{mdx-C9dqA6IZ.js.map → mdx-CsS30JUo.js.map} +1 -1
- package/build/client/assets/{misc-DIdEn_jt.js → misc-BtjCSy-T.js} +2 -2
- package/build/client/assets/{misc-DIdEn_jt.js.map → misc-BtjCSy-T.js.map} +1 -1
- package/build/client/assets/{nav-chevrons-B3SvZV8B.js → nav-chevrons-2hLTwAZb.js} +2 -2
- package/build/client/assets/{nav-chevrons-B3SvZV8B.js.map → nav-chevrons-2hLTwAZb.js.map} +1 -1
- package/build/client/assets/onboarding-Cu6eD7KS.js +2 -0
- package/build/client/assets/{onboarding-CC9zz4rl.js.map → onboarding-Cu6eD7KS.js.map} +1 -1
- package/build/client/assets/{pe-D5h19vSo.js → pe-DXT2FOp1.js} +2 -2
- package/build/client/assets/{pe-D5h19vSo.js.map → pe-DXT2FOp1.js.map} +1 -1
- package/build/client/assets/preferences-br0VSK51.js +2 -0
- package/build/client/assets/preferences-br0VSK51.js.map +1 -0
- package/build/client/assets/{presence-D1DPz__2.js → presence-CrYBA3ta.js} +3 -3
- package/build/client/assets/{presence-D1DPz__2.js.map → presence-CrYBA3ta.js.map} +1 -1
- package/build/client/assets/preview-C2y4Z0qO.js +2 -0
- package/build/client/assets/{preview-BEtmdi0E.js.map → preview-C2y4Z0qO.js.map} +1 -1
- package/build/client/assets/{product-CYOFfeJM.js → product-gqq_YQBW.js} +2 -2
- package/build/client/assets/{product-CYOFfeJM.js.map → product-gqq_YQBW.js.map} +1 -1
- package/build/client/assets/{progress-D6SP0Gec.js → progress-D-HsH4j3.js} +2 -2
- package/build/client/assets/{progress-D6SP0Gec.js.map → progress-D-HsH4j3.js.map} +1 -1
- package/build/client/assets/{progress-bar-CBDBzRQ2.js → progress-bar-CTPCfvDi.js} +2 -2
- package/build/client/assets/{progress-bar-CBDBzRQ2.js.map → progress-bar-CTPCfvDi.js.map} +1 -1
- package/build/client/assets/revalidation-ws-DYaJNyw1.js +2 -0
- package/build/client/assets/{revalidation-ws-DK5QOPlL.js.map → revalidation-ws-DYaJNyw1.js.map} +1 -1
- package/build/client/assets/{root-Bg-hxaOK.js → root-C1pLsthM.js} +3 -3
- package/build/client/assets/{root-Bg-hxaOK.js.map → root-C1pLsthM.js.map} +1 -1
- package/build/client/assets/{set-playground-CMoUFgkO.js → set-playground-DQzAhC0t.js} +2 -2
- package/build/client/assets/{set-playground-CMoUFgkO.js.map → set-playground-DQzAhC0t.js.map} +1 -1
- package/build/client/assets/{support-CPzYlWkd.js → support-lgEG2piy.js} +2 -2
- package/build/client/assets/{support-CPzYlWkd.js.map → support-lgEG2piy.js.map} +1 -1
- package/build/client/assets/tailwind-CRGTilRc.css +1 -0
- package/build/client/assets/test-CDWRwwO-.js +2 -0
- package/build/client/assets/{test-C8wkLh9a.js.map → test-CDWRwwO-.js.map} +1 -1
- package/build/client/assets/{tests-CiM4RPOf.js → tests-LWW8wCYZ.js} +3 -3
- package/build/client/assets/{tests-CiM4RPOf.js.map → tests-LWW8wCYZ.js.map} +1 -1
- package/build/client/assets/{tooltip-BoVikCa-.js → tooltip-Bp9KHnLy.js} +2 -2
- package/build/client/assets/{tooltip-BoVikCa-.js.map → tooltip-Bp9KHnLy.js.map} +1 -1
- package/build/client/assets/{use-event-source-M87p8Tme.js → use-event-source-AZJtQsFX.js} +2 -2
- package/build/client/assets/{use-event-source-M87p8Tme.js.map → use-event-source-AZJtQsFX.js.map} +1 -1
- package/build/client/assets/{user-CbbIYEs8.js → user-C0j04V55.js} +2 -2
- package/build/client/assets/{user-CbbIYEs8.js.map → user-C0j04V55.js.map} +1 -1
- package/build/client/assets/{version-CIF3cX3N.js → version-D61Qvt0X.js} +2 -2
- package/build/client/assets/{version-CIF3cX3N.js.map → version-D61Qvt0X.js.map} +1 -1
- package/build/client/assets/{workshop-config-C5sYl312.js → workshop-config-oL_FWDKq.js} +2 -2
- package/build/client/assets/{workshop-config-C5sYl312.js.map → workshop-config-oL_FWDKq.js.map} +1 -1
- package/build/server/index.js +517 -445
- package/build/server/index.js.map +1 -1
- package/package.json +3 -3
- package/build/client/assets/_exerciseNumber-PTdG9GGB.js +0 -2
- package/build/client/assets/_exerciseNumber_.finished-DQg4F1NL.js +0 -2
- package/build/client/assets/_layout-DHoH74NH.js +0 -2
- package/build/client/assets/account-DLDPrc9J.js +0 -2
- package/build/client/assets/account-DLDPrc9J.js.map +0 -1
- package/build/client/assets/app-DJDjmdlu.js +0 -2
- package/build/client/assets/diff-B3oaU_KB.js +0 -2
- package/build/client/assets/discord-CpIgvYus.js +0 -2
- package/build/client/assets/discord-CpIgvYus.js.map +0 -1
- package/build/client/assets/epic-video-D8ex9vao.js +0 -2
- package/build/client/assets/epic-video-D8ex9vao.js.map +0 -1
- package/build/client/assets/error-boundary-3zItlMUO.js +0 -2
- package/build/client/assets/finished-rUzUjnEm.js +0 -2
- package/build/client/assets/index-BajUQsFT.js +0 -3053
- package/build/client/assets/index-BajUQsFT.js.map +0 -1
- package/build/client/assets/index-DE-jwnOP.js +0 -2
- package/build/client/assets/index-DH1w3QmP.js +0 -36
- package/build/client/assets/index-DH1w3QmP.js.map +0 -1
- package/build/client/assets/index-mivnjq36.js +0 -2
- package/build/client/assets/login-CdNej0Z7.js +0 -2
- package/build/client/assets/manifest-62ea49c4.js +0 -1
- package/build/client/assets/mdx-C9dqA6IZ.js +0 -2
- package/build/client/assets/onboarding-CC9zz4rl.js +0 -2
- package/build/client/assets/preview-BEtmdi0E.js +0 -2
- package/build/client/assets/request-info-vBkaf3Rk.js +0 -2
- package/build/client/assets/request-info-vBkaf3Rk.js.map +0 -1
- package/build/client/assets/revalidation-ws-DK5QOPlL.js +0 -2
- package/build/client/assets/tailwind-B5AAMtGC.css +0 -1
- package/build/client/assets/test-C8wkLh9a.js +0 -2
- /package/build/client/assets/{index-DUnRvy1A.css → epic-video-DUnRvy1A.css} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,O as a}from"./index-
|
|
2
|
-
//# sourceMappingURL=_layout-
|
|
1
|
+
import{j as e,O as a}from"./index-CGzylDPY.js";import{L as s}from"./components-DrvY4pal.js";const c={getSitemapEntries:()=>null},o=({matches:l})=>{var i;const n=(i=l.find(r=>r.id==="root"))==null?void 0:i.data;return[{title:`👷 | ${n==null?void 0:n.workshopTitle}`}]};function m(){return e.jsxs("main",{className:"container mx-auto mt-8",children:[e.jsx("h1",{className:"text-4xl font-bold",children:"Admin"}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("nav",{children:e.jsxs("ul",{className:"flex gap-3",children:[e.jsx("li",{children:e.jsx(s,{className:"underline",to:"/",children:"Home"})}),e.jsx("li",{children:e.jsx(s,{className:"underline",to:"/admin",children:"Admin"})}),e.jsx("li",{children:e.jsx(s,{className:"underline",to:"/diff",children:"Diff Viewer"})}),e.jsx("li",{children:e.jsx(s,{className:"underline",to:"version",children:"Version"})})]})}),e.jsx(a,{})]})]})}export{m as default,c as handle,o as meta};
|
|
2
|
+
//# sourceMappingURL=_layout-DV29dlKr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_layout-
|
|
1
|
+
{"version":3,"file":"_layout-DV29dlKr.js","sources":["../../../app/routes/admin+/_layout.tsx"],"sourcesContent":["import { type SEOHandle } from '@nasa-gcn/remix-seo'\nimport { type LoaderFunction, type MetaFunction } from '@remix-run/node'\nimport { Link, Outlet } from '@remix-run/react'\nimport { type loader as rootLoader } from '#app/root.tsx'\n\nexport const handle: SEOHandle = {\n\tgetSitemapEntries: () => null,\n}\n\nexport const meta: MetaFunction<\n\tLoaderFunction,\n\t{ root: typeof rootLoader }\n> = ({ matches }) => {\n\tconst rootData = matches.find((m) => m.id === 'root')?.data\n\treturn [{ title: `👷 | ${rootData?.workshopTitle}` }]\n}\n\nexport default function AdminLayout() {\n\treturn (\n\t\t<main className=\"container mx-auto mt-8\">\n\t\t\t<h1 className=\"text-4xl font-bold\">Admin</h1>\n\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t<nav>\n\t\t\t\t\t<ul className=\"flex gap-3\">\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Link className=\"underline\" to=\"/\">\n\t\t\t\t\t\t\t\tHome\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Link className=\"underline\" to=\"/admin\">\n\t\t\t\t\t\t\t\tAdmin\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Link className=\"underline\" to=\"/diff\">\n\t\t\t\t\t\t\t\tDiff Viewer\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Link className=\"underline\" to=\"version\">\n\t\t\t\t\t\t\t\tVersion\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</nav>\n\t\t\t\t<Outlet />\n\t\t\t</div>\n\t\t</main>\n\t)\n}\n"],"names":["handle","getSitemapEntries","meta","matches","rootData","find","m","id","data","title","workshopTitle","AdminLayout","jsxs","className","children","jsx","Link","to","Outlet"],"mappings":"4FAKO,MAAMA,EAAoB,CAChCC,kBAAmBA,IAAM,IAC1B,EAEaC,EAGTA,CAAC,CAAEC,QAAAA,CAAQ,IAAM,OACd,MAAAC,GAAWD,EAAAA,EAAQE,KAAMC,GAAMA,EAAEC,KAAO,MAAM,IAAnCJ,YAAAA,EAAsCK,KACvD,MAAO,CAAC,CAAEC,MAAO,QAAQL,GAAAA,YAAAA,EAAUM,aAAa,EAAG,CAAC,CACrD,EAEA,SAAwBC,GAAc,CAEpC,OAAAC,EAAAA,KAAC,OAAK,CAAAC,UAAU,yBACfC,SAAA,CAACC,EAAA,IAAA,KAAA,CAAGF,UAAU,qBAAqBC,SAAK,OAAA,CAAA,EACxCF,EAAA,KAAC,MAAI,CAAAC,UAAU,sBACdC,SAAA,CAAAC,EAAA,IAAC,MACA,CAAAD,SAAAF,EAAA,KAAC,KAAG,CAAAC,UAAU,aACbC,SAAA,CAACC,EAAA,IAAA,KAAA,CACAD,eAACE,EAAK,CAAAH,UAAU,YAAYI,GAAG,IAAIH,gBAEnC,CACD,CAAA,EACAC,EAAA,IAAC,MACAD,SAACC,EAAA,IAAAC,EAAA,CAAKH,UAAU,YAAYI,GAAG,SAASH,SAAA,QAExC,CACD,CAAA,EACAC,EAAA,IAAC,MACAD,SAACC,EAAA,IAAAC,EAAA,CAAKH,UAAU,YAAYI,GAAG,QAAQH,SAAA,cAEvC,CACD,CAAA,EACAC,EAAA,IAAC,MACAD,SAACC,EAAA,IAAAC,EAAA,CAAKH,UAAU,YAAYI,GAAG,UAAUH,SAAA,UAEzC,CACD,CAAA,CAAA,EACD,CACD,CAAA,QACCI,EAAO,CAAA,CAAA,CAAA,CACT,CAAA,CAAA,CACD,CAAA,CAEF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{r as f,j as e,O as We,
|
|
1
|
+
import{r as f,j as e,O as We,b as ae}from"./index-CGzylDPY.js";import{a as m,I as D,c as b}from"./misc-BtjCSy-T.js";import{a as He}from"./pe-DXT2FOp1.js";import{L as O}from"./product-gqq_YQBW.js";import{u as Ve}from"./revalidation-ws-DYaJNyw1.js";import{d as Ue,h as z,P as $,f as R,g as Y,k as ze,D as Ye,m as Be,u as Ge,e as W,S as T,T as Me,a as Z,b as X,c as ee}from"./tooltip-Bp9KHnLy.js";import{R as Qe,h as Je,u as Ke,F as qe,P as Ze}from"./index-BHwOR8R1.js";import{c as L,b as Xe}from"./user-C0j04V55.js";import{u as re}from"./workshop-config-oL_FWDKq.js";import{u as B}from"./presence-CrYBA3ta.js";import{b as et,s as oe,c as tt,d as nt,e as ie,m as x,u as st,f as at}from"./progress-D-HsH4j3.js";import{T as le}from"./index-BOQWfIQC.js";import{u as G,L as h,N as _}from"./components-DrvY4pal.js";function rt(t){t.values.forEach(n=>n.stop())}function V(t,n){[...n].reverse().forEach(a=>{const o=t.getVariant(a);o&&oe(t,o),t.variantChildren&&t.variantChildren.forEach(r=>{V(r,n)})})}function ot(t,n){if(Array.isArray(n))return V(t,n);if(typeof n=="string")return V(t,[n]);oe(t,n)}function it(){const t=new Set,n={subscribe(s){return t.add(s),()=>void t.delete(s)},start(s,a){const o=[];return t.forEach(r=>{o.push(et(r,s,{transitionOverride:a}))}),Promise.all(o)},set(s){return t.forEach(a=>{ot(a,s)})},stop(){t.forEach(s=>{rt(s)})},mount(){return()=>{n.stop()}}};return n}function U(){const t=tt(it);return nt(t.mount,[]),t}function lt(t,n){function s(){return window.matchMedia(t).matches}function a(o){const r=window.matchMedia(t);return r.addEventListener("change",o),()=>{r.removeEventListener("change",o)}}return function(){return f.useSyncExternalStore(a,s,()=>n)}}var M="Dialog",[ce,Ut]=Ue(M),[ct,w]=ce(M),de=t=>{const{__scopeDialog:n,children:s,open:a,defaultOpen:o,onOpenChange:r,modal:c=!0}=t,i=f.useRef(null),l=f.useRef(null),[u=!1,v]=Ge({prop:a,defaultProp:o,onChange:r});return e.jsx(ct,{scope:n,triggerRef:i,contentRef:l,contentId:W(),titleId:W(),descriptionId:W(),open:u,onOpenChange:v,onOpenToggle:f.useCallback(()=>v(g=>!g),[v]),modal:c,children:s})};de.displayName=M;var ue="DialogTrigger",fe=f.forwardRef((t,n)=>{const{__scopeDialog:s,...a}=t,o=w(ue,s),r=z(n,o.triggerRef);return e.jsx($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":K(o.open),...a,ref:r,onClick:R(t.onClick,o.onOpenToggle)})});fe.displayName=ue;var Q="DialogPortal",[dt,he]=ce(Q,{forceMount:void 0}),me=t=>{const{__scopeDialog:n,forceMount:s,children:a,container:o}=t,r=w(Q,n);return e.jsx(dt,{scope:n,forceMount:s,children:f.Children.map(a,c=>e.jsx(Y,{present:s||r.open,children:e.jsx(Ze,{asChild:!0,container:o,children:c})}))})};me.displayName=Q;var A="DialogOverlay",pe=f.forwardRef((t,n)=>{const s=he(A,t.__scopeDialog),{forceMount:a=s.forceMount,...o}=t,r=w(A,t.__scopeDialog);return r.modal?e.jsx(Y,{present:a||r.open,children:e.jsx(ut,{...o,ref:n})}):null});pe.displayName=A;var ut=f.forwardRef((t,n)=>{const{__scopeDialog:s,...a}=t,o=w(A,s);return e.jsx(Qe,{as:ze,allowPinchZoom:!0,shards:[o.contentRef],children:e.jsx($.div,{"data-state":K(o.open),...a,ref:n,style:{pointerEvents:"auto",...a.style}})})}),C="DialogContent",xe=f.forwardRef((t,n)=>{const s=he(C,t.__scopeDialog),{forceMount:a=s.forceMount,...o}=t,r=w(C,t.__scopeDialog);return e.jsx(Y,{present:a||r.open,children:r.modal?e.jsx(ft,{...o,ref:n}):e.jsx(ht,{...o,ref:n})})});xe.displayName=C;var ft=f.forwardRef((t,n)=>{const s=w(C,t.__scopeDialog),a=f.useRef(null),o=z(n,s.contentRef,a);return f.useEffect(()=>{const r=a.current;if(r)return Je(r)},[]),e.jsx(ge,{...t,ref:o,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(t.onCloseAutoFocus,r=>{var c;r.preventDefault(),(c=s.triggerRef.current)==null||c.focus()}),onPointerDownOutside:R(t.onPointerDownOutside,r=>{const c=r.detail.originalEvent,i=c.button===0&&c.ctrlKey===!0;(c.button===2||i)&&r.preventDefault()}),onFocusOutside:R(t.onFocusOutside,r=>r.preventDefault())})}),ht=f.forwardRef((t,n)=>{const s=w(C,t.__scopeDialog),a=f.useRef(!1),o=f.useRef(!1);return e.jsx(ge,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var c,i;(c=t.onCloseAutoFocus)==null||c.call(t,r),r.defaultPrevented||(a.current||(i=s.triggerRef.current)==null||i.focus(),r.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:r=>{var l,u;(l=t.onInteractOutside)==null||l.call(t,r),r.defaultPrevented||(a.current=!0,r.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=r.target;((u=s.triggerRef.current)==null?void 0:u.contains(c))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&o.current&&r.preventDefault()}})}),ge=f.forwardRef((t,n)=>{const{__scopeDialog:s,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:r,...c}=t,i=w(C,s),l=f.useRef(null),u=z(n,l);return Ke(),e.jsxs(e.Fragment,{children:[e.jsx(qe,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:r,children:e.jsx(Ye,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":K(i.open),...c,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),e.jsxs(e.Fragment,{children:[e.jsx(mt,{titleId:i.titleId}),e.jsx(xt,{contentRef:l,descriptionId:i.descriptionId})]})]})}),J="DialogTitle",be=f.forwardRef((t,n)=>{const{__scopeDialog:s,...a}=t,o=w(J,s);return e.jsx($.h2,{id:o.titleId,...a,ref:n})});be.displayName=J;var ve="DialogDescription",je=f.forwardRef((t,n)=>{const{__scopeDialog:s,...a}=t,o=w(ve,s);return e.jsx($.p,{id:o.descriptionId,...a,ref:n})});je.displayName=ve;var we="DialogClose",Ne=f.forwardRef((t,n)=>{const{__scopeDialog:s,...a}=t,o=w(we,s);return e.jsx($.button,{type:"button",...a,ref:n,onClick:R(t.onClick,()=>o.onOpenChange(!1))})});Ne.displayName=we;function K(t){return t?"open":"closed"}var ye="DialogTitleWarning",[zt,De]=Be(ye,{contentName:C,titleName:J,docsSlug:"dialog"}),mt=({titleId:t})=>{const n=De(ye),s=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
4
|
|
|
5
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return f.useEffect(()=>{t&&(document.getElementById(t)||console.error(a))},[a,t]),null},pt="DialogDescriptionWarning",xt=({contentRef:t,descriptionId:n})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${De(pt).contentName}}.`;return f.useEffect(()=>{var r;const o=(r=t.current)==null?void 0:r.getAttribute("aria-describedby");n&&o&&(document.getElementById(n)||console.warn(s))},[s,t,n]),null},gt=de,bt=fe,vt=he,Ee=pe,Ce=xe,jt=be,ke=je,wt=Ne;const Nt=gt,yt=bt,Dt=vt;function _e({className:t,ref:n,...a}){return e.jsx(Ee,{ref:n,className:h("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...a})}_e.displayName=Ee.displayName;function Pe({className:t,children:n,ref:a,...s}){return e.jsxs(Dt,{children:[e.jsx(_e,{}),e.jsxs(Ce,{ref:a,className:h("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",t),...s,children:[n,e.jsxs(wt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[e.jsx(D,{name:"Close"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}Pe.displayName=Ce.displayName;function Se({className:t,...n}){return e.jsx("div",{className:h("flex flex-col space-y-1.5 text-center sm:text-left",t),...n})}Se.displayName="DialogHeader";jt.displayName;function Re({className:t,ref:n,...a}){return e.jsx(ke,{ref:n,className:h("text-sm text-muted-foreground",t),...a})}Re.displayName=ke.displayName;const te=["opacity-70","opacity-80","opacity-90","opacity-100"],ne=["shadow-[0_0_2px_0_rgba(0,0,0,0.3)]","shadow-[0_0_4px_0_rgba(0,0,0,0.3)]","shadow-[0_0_7px_0_rgba(0,0,0,0.3)]","shadow-[0_0_10px_0_rgba(0,0,0,0.3)]"];function ae(t){const n=Math.round(t*te.length-1),a=Math.round(t*ne.length-1);return h("shadow-purple-700 hover:opacity-100 focus:opacity-100 dark:shadow-purple-200",te[n]??"opacity-60",ne[a]??"shadow-none",t===1?"animate-pulse hover:animate-none focus:animate-none":null)}function $e({isMenuOpened:t}){const n=L(),{users:a}=B(),{product:{displayNameShort:s}}=re(),o=t?17:0,r=a.length-o,c=r>(t?1:0);if(!a.length)return null;const i=t&&a.length===1?e.jsx(m,{target:"_blank",rel:"noopener noreferrer",to:"https://www.youtube.com/watch?v=w6Q3mHyzn78",children:e.jsx("img",{alt:"Tiffany Tunes",className:h("h-8 w-8 rounded-full border object-cover",ae(1)),src:"/img/tiffany.png"})}):null,l=`${r}${t?" more ":" "}${s} Dev${r===1?"":"s"} working now`;return e.jsx("div",{className:"flex flex-wrap items-center gap-2",children:e.jsxs(Me,{children:[(c?a.slice(0,o):a).map(({user:u,score:v})=>{var k,j;const g=ae(v),p=Et(u.location),d=u.imageUrlSmall||u.avatarUrl,E=u.hasAccess,y=(j=(k=u.location)==null?void 0:k.origin)==null?void 0:j.includes("localhost");let N;return E?N=y?"working":"referencing":N=y?"previewing":"reviewing",e.jsxs(Z,{children:[e.jsx(X,{asChild:!0,children:d?e.jsx("img",{tabIndex:0,alt:u.name||s,className:h("h-8 w-8 rounded-full border object-cover",g),src:d}):e.jsx("div",{tabIndex:0,"aria-label":u.name||`${s} Dev`,className:h("flex h-8 w-8 items-center justify-center rounded-full border",g),children:e.jsx(D,{name:"User"})})}),e.jsx(ee,{children:e.jsxs("span",{className:"flex flex-col items-center justify-center gap-1",children:[e.jsxs("span",{children:[u.name||`${s} Dev`," ",p?` is ${N} ${v===1&&(n==null?void 0:n.id)!==u.id?"with you":""} on`:null]}),p!=null&&p.line1?e.jsx("span",{children:p.line1}):null,p!=null&&p.line2?e.jsx("span",{children:p.line2}):null]})})]},u.id)}),i,c?e.jsxs(Z,{children:[e.jsx(X,{asChild:!0,children:e.jsx("div",{tabIndex:0,"aria-label":l,className:h("flex items-center justify-center rounded-full border bg-accent text-xs text-accent-foreground",t?"h-8 w-8":"h-6 w-6"),children:e.jsx("span",{className:h("pointer-events-none overflow-hidden text-ellipsis whitespace-nowrap text-center",t?"w-8":"w-6"),children:t?`+${r}`:r})})}),e.jsx(ee,{children:l})]}):null]})})}const Ie=lt("(min-width: 640px)",!0);function Bt(){const t=G(),n=L(),a=Ie(),s=He(),[o,r]=f.useState(t.isMenuOpened);Ve({watchPaths:["./exercises/README.mdx"]});function c(i){r(i),document.cookie=`es_menu_open=${i.toString()}; path=/; SameSite=Lax;`}return e.jsxs("div",{className:"flex flex-col",children:[n?null:e.jsx(Ct,{}),s&&a?null:e.jsx(kt,{isMenuOpened:o,onMenuOpenChange:c}),e.jsxs("div",{className:h("flex flex-grow flex-col sm:flex-row",{"h-[calc(100vh-128px-env(safe-area-inset-top)-env(safe-area-inset-bottom))] sm:h-[calc(100vh-64px-env(safe-area-inset-top)-env(safe-area-inset-bottom))]":!n,"h-[calc(100vh-64px-env(safe-area-inset-top)-env(safe-area-inset-bottom))] sm:h-[calc(100vh-env(safe-area-inset-top)-env(safe-area-inset-bottom))]":n,"h-[unset]":!a&&o}),children:[a?e.jsx(_t,{isMenuOpened:o,onMenuOpenChange:c}):null,e.jsx("div",{className:h("h-full w-full max-w-full sm:max-w-[calc(100%-56px)]",o?"hidden md:block":""),children:e.jsx(We,{})})]})]})}function Et(t){if(!t)return null;const{exercise:n}=t,a=[n?[n.exerciseNumber,n.stepNumber].filter(Boolean).map(s=>s.toString().padStart(2,"0")).join("/"):null,n==null?void 0:n.type].filter(Boolean).join(" - ");return{line1:t.workshopTitle,line2:a}}function Ct(){const t=Ie(),{product:{host:n,displayName:a}}=re(),s=Xe(),o=e.jsx("div",{children:ENV.EPICSHOP_DEPLOYED?e.jsxs("div",{children:["This is the deployed version. ",e.jsxs(e.Fragment,{children:[e.jsx(m,{className:"underline",target:"_blank",rel:"noopener noreferrer",to:ENV.EPICSHOP_GITHUB_REPO,children:"Run locally"})," for full experience."]})," "]}):e.jsxs("div",{children:[e.jsx(m,{to:"/login",className:"underline",children:"Login"})," ","or"," ",e.jsx("a",{href:`https://${n}/login`,className:"underline",children:"join for free"})," ","for the full experience."]})});return e.jsx("div",{className:"z-10 flex h-16 items-center justify-between border-b bg-gradient-to-tr from-blue-500 to-indigo-500 pl-4 text-white",children:t?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hidden flex-1 flex-wrap items-center gap-4 sm:flex",children:[e.jsx(O,{size:"lg",style:"monochrome"}),e.jsxs("div",{className:"flex flex-1 flex-wrap items-center",children:[e.jsxs("p",{className:"mr-2",children:["Welcome to the"," ",e.jsx(m,{to:`https://${n}`,className:"underline",target:"_blank",children:a})," ","Workshop app!"]}),o]})]}),s?null:e.jsxs("div",{className:"hidden h-full flex-col items-center sm:flex md:flex-row",children:[e.jsxs(m,{to:`https://${n}`,target:"_blank",className:"flex h-full items-center justify-center space-x-1.5 px-5 text-sm font-semibold",children:[e.jsxs("span",{className:"drop-shadow-sm",children:["Join ",a]}),e.jsx("span",{children:"↗︎"})]}),e.jsxs(m,{to:ENV.EPICSHOP_DEPLOYED?`https://${n}/login`:"/login",className:"flex h-full items-center justify-center space-x-1.5 bg-white/20 px-5 text-sm font-semibold shadow-md transition hover:bg-white/30",children:[e.jsx(D,{name:"User",size:"lg"}),e.jsx("span",{className:"drop-shadow-sm",children:"Login"})]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-4 sm:hidden",children:[e.jsx("a",{href:`https://${n}`,children:e.jsx(O,{size:"lg",style:"monochrome"})}),e.jsxs(Nt,{children:[e.jsx(yt,{children:e.jsx(D,{name:"Question",size:"lg",className:"animate-pulse"})}),e.jsxs(Pe,{children:[e.jsxs(Se,{children:[e.jsx(O,{size:"lg",style:"monochrome"}),e.jsx("span",{className:"text-lg font-semibold",children:a})]}),e.jsxs(Re,{children:["Welcome to the"," ",e.jsx(m,{to:`https://${n}`,className:"underline",children:a})," ","Workshop app!"]}),o]})]})]}),e.jsxs("div",{className:"flex h-full items-center",children:[e.jsxs(m,{to:`https://${n}`,target:"_blank",className:"flex h-full items-center justify-center space-x-1.5 px-5 text-sm font-semibold",children:[e.jsx("span",{className:"drop-shadow-sm",children:"Join"}),e.jsx("span",{children:"↗︎"})]}),e.jsxs(m,{to:ENV.EPICSHOP_DEPLOYED?`https://${n}/login`:"/login",className:"flex h-full items-center justify-center space-x-1.5 bg-white/20 px-5 text-sm font-semibold shadow-md transition hover:bg-white/30",children:[e.jsx(D,{name:"User",size:"lg"}),e.jsx("span",{className:"drop-shadow-sm",children:"Login"})]})]})]})})}const Te={hidden:{opacity:0,x:-20},visible:{opacity:1,x:0}};function Ae({exerciseNumber:t,children:n}){const a=at(t);return e.jsx(x.li,{variants:Te,className:h("py-[6px] first:pt-3 last:pb-3",a?`${a} before:border-t`:null),children:e.jsx("span",{className:"ml-2",children:n})})}function P({children:t,...n}){const a=st(n);return e.jsx(x.li,{variants:Te,className:h("py-[6px] first:pt-3 last:pb-3",a?`${a} before:border-t`:null),children:e.jsx("span",{className:"ml-2",children:t})})}function kt({isMenuOpened:t,onMenuOpenChange:n}){const a=G(),s=L(),o=ie(),r=se(),{users:c}=B(),i={visible:{opacity:1,transition:{duration:.05,when:"beforeChildren",staggerChildren:.03}},hidden:{opacity:0}};return e.jsx("nav",{className:"flex w-full border-b sm:hidden",children:e.jsx("div",{className:"w-full",children:e.jsxs("div",{className:h("flex items-center",{"flex-col":t,"h-14":!t}),children:[e.jsx(Le,{title:a.workshopTitle,isMenuOpened:t,setMenuOpened:n}),t&&e.jsxs(x.div,{className:"flex w-full flex-grow flex-col justify-between overflow-x-auto p-6 scrollbar-thin scrollbar-thumb-scrollbar",initial:{opacity:0},animate:{opacity:1},children:[e.jsxs(x.ul,{variants:i,initial:"hidden",animate:"visible",className:"flex flex-col",children:[e.jsx("span",{children:e.jsx(_,{prefetch:"intent",to:"/",className:({isActive:l})=>b("relative whitespace-nowrap px-2 py-0.5 pr-3 text-2xl font-bold outline-none hover:underline focus:underline",'after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":l}),children:"Home"})}),a.exercises.map(({exerciseNumber:l,title:u,steps:v})=>{const g=Number(r.exerciseNumber)===l,p=!g&&a.playground.exerciseNumber===l,d=l.toString().padStart(2,"0");return e.jsxs(Ae,{exerciseNumber:l,children:[e.jsxs(m,{prefetch:"intent",to:`/${d}`,className:b("relative whitespace-nowrap px-2 py-0.5 pr-3 text-2xl font-bold outline-none hover:underline focus:underline",'after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":g}),children:[u,p?" 🛝":null]}),g?e.jsxs(x.ul,{variants:i,initial:"hidden",animate:"visible",className:"ml-4 mt-4 flex flex-col",children:[e.jsx(P,{type:"instructions",exerciseNumber:l,children:e.jsx(m,{to:`/${d}`,prefetch:"intent",className:b('relative whitespace-nowrap px-2 py-0.5 pr-3 text-xl font-medium outline-none after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":!r.stepNumber}),children:"Intro"})},l),v.filter(Boolean).map(({name:E,stepNumber:y,title:N})=>{const k=Number(r.stepNumber)===y,j=y.toString().padStart(2,"0"),S=E===a.playground.appName;return e.jsx(P,{type:"step",stepNumber:y,exerciseNumber:l,children:e.jsx(m,{to:`/${d}/${j}`,prefetch:"intent",className:b('relative whitespace-nowrap px-2 py-0.5 pr-3 text-xl font-medium outline-none after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":k}),children:S?`${j}. ${N} 🛝`:`${j}. ${N}`})},y)}),e.jsx(P,{type:"finished",exerciseNumber:l,children:e.jsx(_,{to:`/${d}/finished`,prefetch:"intent",className:({isActive:E})=>b('relative whitespace-nowrap px-2 py-0.5 pr-3 text-base font-medium outline-none after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":E}),children:"📝 Elaboration"})})]}):null]},l)})]}),e.jsx("div",{className:"mt-6",children:e.jsx(_,{to:"/finished",className:({isActive:l})=>b("relative whitespace-nowrap text-lg font-bold outline-none hover:underline focus:underline",{'bg-black text-white after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""]':l}),children:"📝 Workshop Feedback"})})]}),e.jsx("div",{className:"flex-grow"}),e.jsx("div",{className:h("flex items-center justify-start p-4",t&&c.length>4?"min-h-14":"h-14",{"w-full border-t":t}),children:e.jsx($e,{isMenuOpened:t})}),ENV.EPICSHOP_DEPLOYED?null:s?e.jsx(T,{content:t?null:"Your account",children:e.jsxs(m,{className:h("flex h-14 flex-shrink-0 items-center justify-start space-x-3 px-4 py-4 text-center no-underline hover:underline",{"border-l":!t,"w-full border-t":t}),to:"/account",children:[s.imageUrlSmall?e.jsx("img",{alt:s.name??s.email,src:s.imageUrlSmall,className:"h-full rounded-full"}):e.jsx(D,{name:"User",className:"flex-shrink-0",size:"lg"}),t?e.jsx(x.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Your Account"}):e.jsx("span",{className:"sr-only",children:"Your account"})]})}):null,ENV.EPICSHOP_DEPLOYED?null:s&&o?e.jsx(T,{content:t?null:"Continue to next lesson",children:e.jsxs(m,{to:o,prefetch:"intent",className:b("flex h-14 w-full items-center space-x-3 border-l px-4 py-4 pl-[18px] no-underline hover:underline"),state:{from:"continue next lesson button"},children:[e.jsx(D,{name:"FastForward",className:"flex-shrink-0",size:"md"}),t?e.jsx(x.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Continue to next lesson"}):e.jsx("span",{className:"sr-only",children:"Continue to next lesson"})]})}):null,e.jsx("div",{className:h("flex h-14 w-14 items-center justify-center self-start p-4 sm:mb-4 sm:w-full",{"w-full border-t":t,"border-l":!t}),children:e.jsx(le,{})})]})})})}const H=400;function _t({isMenuOpened:t,onMenuOpenChange:n}){const a=G(),s=L(),o=ie(),r=se(),{users:c}=B(),i=a.exercises.find(d=>d.exerciseNumber===Number(r.exerciseNumber)),l=r.type==="solution"?i==null?void 0:i.solutions.find(d=>d.stepNumber===Number(r.stepNumber)):r.type==="problem"?i==null?void 0:i.problems.find(d=>d.stepNumber===Number(r.stepNumber)):null,u=U(),v={close:{width:56},open:{width:H}},g={visible:{opacity:1,transition:{duration:.05,when:"beforeChildren",staggerChildren:.03}},hidden:{opacity:0}},p=Number(r.exerciseNumber).toString().padStart(2,"0");return e.jsx("nav",{className:"hidden border-r sm:flex",children:e.jsx(x.div,{initial:t?"open":"close",variants:v,animate:u,children:e.jsxs("div",{className:"flex h-full flex-col items-center justify-between",children:[e.jsx(Le,{title:a.workshopTitle,menuControls:u,isMenuOpened:t,setMenuOpened:n}),t&&e.jsxs(x.div,{style:{width:H},className:"flex flex-grow flex-col justify-between overflow-y-auto p-6 scrollbar-thin scrollbar-thumb-scrollbar",initial:{opacity:0},animate:{opacity:1},children:[e.jsxs(x.ul,{variants:g,initial:"hidden",animate:"visible",className:"flex flex-col",children:[e.jsx("span",{children:e.jsx(_,{prefetch:"intent",to:"/",className:({isActive:d})=>b("relative whitespace-nowrap px-2 py-0.5 pr-3 text-2xl font-bold outline-none hover:underline focus:underline",'after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":d}),children:"Home"})}),a.exercises.map(({exerciseNumber:d,title:E,steps:y})=>{const N=Number(r.exerciseNumber)===d,k=!N&&a.playground.exerciseNumber===d,j=d.toString().padStart(2,"0");return e.jsxs(Ae,{exerciseNumber:d,children:[e.jsxs(m,{prefetch:"intent",to:`/${j}`,className:b("relative whitespace-nowrap px-2 py-0.5 pr-3 text-2xl font-bold outline-none hover:underline focus:underline",'after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":N}),children:[E,k?" 🛝":null]}),N?e.jsxs(x.ul,{variants:g,initial:"hidden",animate:"visible",className:"ml-4 mt-4 flex flex-col",children:[e.jsx(P,{type:"instructions",exerciseNumber:d,children:e.jsx(m,{to:`/${j}`,prefetch:"intent",className:b('relative whitespace-nowrap px-2 py-0.5 pr-3 text-xl font-medium outline-none after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":!r.stepNumber}),children:"Intro"})},d),y.filter(Boolean).map(({name:S,stepNumber:I,title:q})=>{const Fe=Number(r.stepNumber)===I,F=I.toString().padStart(2,"0"),Oe=S===a.playground.appName;return e.jsx(P,{type:"step",stepNumber:I,exerciseNumber:d,children:e.jsx(m,{to:`/${j}/${F}`,prefetch:"intent",className:b('relative whitespace-nowrap px-2 py-0.5 pr-3 text-xl font-medium outline-none after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":Fe}),children:Oe?`${F}. ${q} 🛝`:`${F}. ${q}`})},I)}),e.jsx(P,{type:"finished",exerciseNumber:d,children:e.jsx(_,{to:`/${j}/finished`,prefetch:"intent",className:({isActive:S})=>b('relative whitespace-nowrap px-2 py-0.5 pr-3 text-base font-medium outline-none after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":S}),children:"📝 Elaboration"})})]}):null]},d)})]}),e.jsx("div",{className:"mt-6",children:e.jsx(_,{to:"/finished",className:({isActive:d})=>b("relative whitespace-nowrap text-lg font-bold outline-none hover:underline focus:underline",{'bg-black text-white after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""]':d}),children:"📝 Workshop Feedback"})})]}),!t&&e.jsx("div",{className:"flex flex-grow flex-col justify-center",children:e.jsxs("div",{className:"orientation-sideways w-full font-mono text-sm font-medium uppercase leading-none",children:[i!=null&&i.title?e.jsx(m,{to:`/${p}`,children:i.title}):null,i!=null&&i.title&&(l!=null&&l.title)?" — ":null,l!=null&&l.title?e.jsx(m,{to:`/${p}/${l.stepNumber.toString().padStart(2,"0")}`,children:l.title}):null]})}),e.jsx("div",{className:h("flex w-full items-center justify-start border-t p-4 transition-[height]",t&&c.length>4?"h-28":"h-14"),style:t?{width:H}:{},children:e.jsx($e,{isMenuOpened:t})}),ENV.EPICSHOP_DEPLOYED?null:s?e.jsx(T,{content:t?null:"Your account",children:e.jsxs(m,{className:"flex h-14 w-full flex-shrink-0 items-center justify-start space-x-3 border-t px-4 py-4 text-center no-underline hover:underline",to:"/account",children:[s.imageUrlSmall?e.jsx("img",{alt:s.name??s.email,src:s.imageUrlSmall,className:"h-full rounded-full"}):e.jsx(D,{name:"User",className:"flex-shrink-0",size:"lg"}),t?e.jsx(x.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Your Account"}):e.jsx("span",{className:"sr-only",children:"Your account"})]})}):null,ENV.EPICSHOP_DEPLOYED?null:s&&o?e.jsx(T,{content:t?null:"Continue to next lesson",children:e.jsxs(m,{to:o,prefetch:"intent",className:b("flex h-14 w-full items-center space-x-3 border-t px-4 py-4 pl-[18px] no-underline hover:underline"),state:{from:"continue next lesson button"},children:[e.jsx(D,{name:"FastForward",className:"flex-shrink-0",size:"md"}),t?e.jsx(x.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Continue to next lesson"}):e.jsx("span",{className:"sr-only",children:"Continue to next lesson"})]})}):null,e.jsx("div",{className:"mb-4 w-full self-start border-t pl-3 pt-[15px]",children:e.jsx(le,{})})]})})})}function Le({title:t,isMenuOpened:n,setMenuOpened:a,menuControls:s}){const o=f.useRef(n),r=f.useRef(null),c={open:{d:"M3.06061 2.99999L21.0606 21"},closed:{d:"M0 9.5L24 9.5"}},i={open:{d:"M3.00006 21.0607L21 3.06064"},moving:{d:"M0 14.5L24 14.5"},closed:{d:"M0 14.5L15 14.5"}},l=U(),u=U();async function v(){s==null||s.start(n?"close":"open"),a(!n),n?(l.start(c.closed),await u.start(i.moving),u.start(i.closed)):(await u.start(i.moving),l.start(c.open),u.start(i.open))}return f.useEffect(()=>{if(!n)return;function g(p){var d;p.key==="Escape"&&((d=r.current)==null||d.click())}return document.addEventListener("keyup",g),()=>document.removeEventListener("keyup",g)},[n]),e.jsxs("div",{className:h("relative inline-flex h-14 flex-shrink-0 items-center justify-between overflow-hidden border-r sm:w-full sm:border-b sm:border-r-0",{"w-full":n}),children:[e.jsx("button",{ref:r,className:"flex h-14 w-14 items-center justify-center","aria-label":"Open Navigation menu",onClick:v,children:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",children:[e.jsx(x.path,{...c[o.current?"open":"closed"],animate:l,transition:{duration:.2},stroke:"currentColor",strokeWidth:1.5}),e.jsx(x.path,{...i[o.current?"open":"closed"],animate:u,transition:{duration:.2},stroke:"currentColor",strokeWidth:1.5})]})}),n&&e.jsx(x.p,{transition:{delay:.2},initial:{opacity:0,y:5},animate:{opacity:1,y:0},className:"absolute right-5 whitespace-nowrap font-mono text-sm uppercase",children:e.jsx(m,{to:"/",children:t})})]})}export{Bt as default};
|
|
6
|
-
//# sourceMappingURL=_layout-
|
|
5
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return f.useEffect(()=>{t&&(document.getElementById(t)||console.error(s))},[s,t]),null},pt="DialogDescriptionWarning",xt=({contentRef:t,descriptionId:n})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${De(pt).contentName}}.`;return f.useEffect(()=>{var r;const o=(r=t.current)==null?void 0:r.getAttribute("aria-describedby");n&&o&&(document.getElementById(n)||console.warn(a))},[a,t,n]),null},gt=de,bt=fe,vt=me,Ee=pe,Ce=xe,jt=be,ke=je,wt=Ne;const Nt=gt,yt=bt,Dt=vt;function _e({className:t,ref:n,...s}){return e.jsx(Ee,{ref:n,className:m("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...s})}_e.displayName=Ee.displayName;function Pe({className:t,children:n,ref:s,...a}){return e.jsxs(Dt,{children:[e.jsx(_e,{}),e.jsxs(Ce,{ref:s,className:m("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",t),...a,children:[n,e.jsxs(wt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[e.jsx(D,{name:"Close"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}Pe.displayName=Ce.displayName;function Se({className:t,...n}){return e.jsx("div",{className:m("flex flex-col space-y-1.5 text-center sm:text-left",t),...n})}Se.displayName="DialogHeader";jt.displayName;function Re({className:t,ref:n,...s}){return e.jsx(ke,{ref:n,className:m("text-sm text-muted-foreground",t),...s})}Re.displayName=ke.displayName;const te=["opacity-70","opacity-80","opacity-90","opacity-100"],ne=["shadow-[0_0_2px_0_rgba(0,0,0,0.3)]","shadow-[0_0_4px_0_rgba(0,0,0,0.3)]","shadow-[0_0_7px_0_rgba(0,0,0,0.3)]","shadow-[0_0_10px_0_rgba(0,0,0,0.3)]"];function se(t){const n=Math.round(t*te.length-1),s=Math.round(t*ne.length-1);return m("shadow-purple-700 hover:opacity-100 focus:opacity-100 dark:shadow-purple-200",te[n]??"opacity-60",ne[s]??"shadow-none",t===1?"animate-pulse hover:animate-none focus:animate-none":null)}function $e({isMenuOpened:t}){const n=L(),{users:s}=B(),{product:{displayNameShort:a}}=re(),o=t?17:0,r=s.length-o,c=r>(t?1:0);if(!s.length)return null;const i=t&&s.length===1?e.jsx(h,{target:"_blank",rel:"noopener noreferrer",to:"https://www.youtube.com/watch?v=w6Q3mHyzn78",children:e.jsx("img",{alt:"Tiffany Tunes",className:m("h-8 w-8 rounded-full border object-cover",se(1)),src:"/img/tiffany.png"})}):null,l=`${r}${t?" more ":" "}${a} Dev${r===1?"":"s"} working now`;return e.jsx("div",{className:"flex flex-wrap items-center gap-2",children:e.jsxs(Me,{children:[(c?s.slice(0,o):s).map(({user:u,score:v})=>{var k,j;const g=se(v),p=Et(u.location),d=u.imageUrlSmall||u.avatarUrl,E=u.hasAccess,y=(j=(k=u.location)==null?void 0:k.origin)==null?void 0:j.includes("localhost");let N;return E?N=y?"working":"referencing":N=y?"previewing":"reviewing",e.jsxs(Z,{children:[e.jsx(X,{asChild:!0,children:d?e.jsx("img",{tabIndex:0,alt:u.name||a,className:m("h-8 w-8 rounded-full border object-cover",g),src:d}):e.jsx("div",{tabIndex:0,"aria-label":u.name||`${a} Dev`,className:m("flex h-8 w-8 items-center justify-center rounded-full border",g),children:e.jsx(D,{name:"User"})})}),e.jsx(ee,{children:e.jsxs("span",{className:"flex flex-col items-center justify-center gap-1",children:[e.jsxs("span",{children:[u.name||`${a} Dev`," ",p?` is ${N} ${v===1&&(n==null?void 0:n.id)!==u.id?"with you":""} on`:null]}),p!=null&&p.line1?e.jsx("span",{children:p.line1}):null,p!=null&&p.line2?e.jsx("span",{children:p.line2}):null]})})]},u.id)}),i,c?e.jsxs(Z,{children:[e.jsx(X,{asChild:!0,children:e.jsx("div",{tabIndex:0,"aria-label":l,className:m("flex items-center justify-center rounded-full border bg-accent text-xs text-accent-foreground",t?"h-8 w-8":"h-6 w-6"),children:e.jsx("span",{className:m("pointer-events-none overflow-hidden text-ellipsis whitespace-nowrap text-center",t?"w-8":"w-6"),children:t?`+${r}`:r})})}),e.jsx(ee,{children:l})]}):null]})})}const Ie=lt("(min-width: 640px)",!0);function Yt(){const t=G(),n=L(),s=Ie(),a=He(),[o,r]=f.useState(t.isMenuOpened);Ve({watchPaths:["./exercises/README.mdx"]});function c(i){r(i),document.cookie=`es_menu_open=${i.toString()}; path=/; SameSite=Lax;`}return e.jsxs("div",{className:"flex flex-col",children:[n?null:e.jsx(Ct,{}),a&&s?null:e.jsx(kt,{isMenuOpened:o,onMenuOpenChange:c}),e.jsxs("div",{className:m("flex flex-grow flex-col sm:flex-row",{"h-[calc(100vh-128px-env(safe-area-inset-top)-env(safe-area-inset-bottom))] sm:h-[calc(100vh-64px-env(safe-area-inset-top)-env(safe-area-inset-bottom))]":!n,"h-[calc(100vh-64px-env(safe-area-inset-top)-env(safe-area-inset-bottom))] sm:h-[calc(100vh-env(safe-area-inset-top)-env(safe-area-inset-bottom))]":n,"h-[unset]":!s&&o}),children:[s?e.jsx(_t,{isMenuOpened:o,onMenuOpenChange:c}):null,e.jsx("div",{className:m("h-full w-full max-w-full sm:max-w-[calc(100%-56px)]",o?"hidden md:block":""),children:e.jsx(We,{})})]})]})}function Et(t){if(!t)return null;const{exercise:n}=t,s=[n?[n.exerciseNumber,n.stepNumber].filter(Boolean).map(a=>a.toString().padStart(2,"0")).join("/"):null,n==null?void 0:n.type].filter(Boolean).join(" - ");return{line1:t.workshopTitle,line2:s}}function Ct(){const t=Ie(),{product:{host:n,displayName:s}}=re(),a=Xe(),o=e.jsx("div",{children:ENV.EPICSHOP_DEPLOYED?e.jsxs("div",{children:["This is the deployed version. ",e.jsxs(e.Fragment,{children:[e.jsx(h,{className:"underline",target:"_blank",rel:"noopener noreferrer",to:ENV.EPICSHOP_GITHUB_REPO,children:"Run locally"})," for full experience."]})," "]}):e.jsxs("div",{children:[e.jsx(h,{to:"/login",className:"underline",children:"Login"})," ","or"," ",e.jsx("a",{href:`https://${n}/login`,className:"underline",children:"join for free"})," ","for the full experience."]})});return e.jsx("div",{className:"z-10 flex h-16 items-center justify-between border-b bg-gradient-to-tr from-blue-500 to-indigo-500 pl-4 text-white",children:t?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hidden flex-1 flex-wrap items-center gap-4 sm:flex",children:[e.jsx(O,{size:"lg",style:"monochrome"}),e.jsxs("div",{className:"flex flex-1 flex-wrap items-center",children:[e.jsxs("p",{className:"mr-2",children:["Welcome to the"," ",e.jsx(h,{to:`https://${n}`,className:"underline",target:"_blank",children:s})," ","Workshop app!"]}),o]})]}),a?null:e.jsxs("div",{className:"hidden h-full flex-col items-center sm:flex md:flex-row",children:[e.jsxs(h,{to:`https://${n}`,target:"_blank",className:"flex h-full items-center justify-center space-x-1.5 px-5 text-sm font-semibold",children:[e.jsxs("span",{className:"drop-shadow-sm",children:["Join ",s]}),e.jsx("span",{children:"↗︎"})]}),e.jsxs(h,{to:ENV.EPICSHOP_DEPLOYED?`https://${n}/login`:"/login",className:"flex h-full items-center justify-center space-x-1.5 bg-white/20 px-5 text-sm font-semibold shadow-md transition hover:bg-white/30",children:[e.jsx(D,{name:"User",size:"lg"}),e.jsx("span",{className:"drop-shadow-sm",children:"Login"})]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-4 sm:hidden",children:[e.jsx("a",{href:`https://${n}`,children:e.jsx(O,{size:"lg",style:"monochrome"})}),e.jsxs(Nt,{children:[e.jsx(yt,{children:e.jsx(D,{name:"Question",size:"lg",className:"animate-pulse"})}),e.jsxs(Pe,{children:[e.jsxs(Se,{children:[e.jsx(O,{size:"lg",style:"monochrome"}),e.jsx("span",{className:"text-lg font-semibold",children:s})]}),e.jsxs(Re,{children:["Welcome to the"," ",e.jsx(h,{to:`https://${n}`,className:"underline",children:s})," ","Workshop app!"]}),o]})]})]}),e.jsxs("div",{className:"flex h-full items-center",children:[e.jsxs(h,{to:`https://${n}`,target:"_blank",className:"flex h-full items-center justify-center space-x-1.5 px-5 text-sm font-semibold",children:[e.jsx("span",{className:"drop-shadow-sm",children:"Join"}),e.jsx("span",{children:"↗︎"})]}),e.jsxs(h,{to:ENV.EPICSHOP_DEPLOYED?`https://${n}/login`:"/login",className:"flex h-full items-center justify-center space-x-1.5 bg-white/20 px-5 text-sm font-semibold shadow-md transition hover:bg-white/30",children:[e.jsx(D,{name:"User",size:"lg"}),e.jsx("span",{className:"drop-shadow-sm",children:"Login"})]})]})]})})}const Te={hidden:{opacity:0,x:-20},visible:{opacity:1,x:0}};function Ae({exerciseNumber:t,children:n}){const s=st(t);return e.jsx(x.li,{variants:Te,className:m("py-[6px] first:pt-3 last:pb-3",s?`${s} before:border-t`:null),children:e.jsx("span",{className:"ml-2",children:n})})}function P({children:t,...n}){const s=at(n);return e.jsx(x.li,{variants:Te,className:m("py-[6px] first:pt-3 last:pb-3",s?`${s} before:border-t`:null),children:e.jsx("span",{className:"ml-2",children:t})})}function kt({isMenuOpened:t,onMenuOpenChange:n}){const s=G(),a=L(),o=ie(),r=ae(),{users:c}=B(),i={visible:{opacity:1,transition:{duration:.05,when:"beforeChildren",staggerChildren:.03}},hidden:{opacity:0}};return e.jsx("nav",{className:"flex w-full border-b sm:hidden",children:e.jsx("div",{className:"w-full",children:e.jsxs("div",{className:m("flex items-center",{"flex-col":t,"h-14":!t}),children:[e.jsx(Le,{title:s.workshopTitle,isMenuOpened:t,setMenuOpened:n}),t&&e.jsxs(x.div,{className:"flex w-full flex-grow flex-col justify-between overflow-x-auto p-6 scrollbar-thin scrollbar-thumb-scrollbar",initial:{opacity:0},animate:{opacity:1},children:[e.jsxs(x.ul,{variants:i,initial:"hidden",animate:"visible",className:"flex flex-col",children:[e.jsx("span",{children:e.jsx(_,{prefetch:"intent",to:"/",className:({isActive:l})=>b("relative whitespace-nowrap px-2 py-0.5 pr-3 text-2xl font-bold outline-none hover:underline focus:underline",'after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":l}),children:"Home"})}),s.exercises.map(({exerciseNumber:l,title:u,steps:v})=>{const g=Number(r.exerciseNumber)===l,p=!g&&s.playground.exerciseNumber===l,d=l.toString().padStart(2,"0");return e.jsxs(Ae,{exerciseNumber:l,children:[e.jsxs(h,{prefetch:"intent",to:`/${d}`,className:b("relative whitespace-nowrap px-2 py-0.5 pr-3 text-2xl font-bold outline-none hover:underline focus:underline",'after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":g}),children:[u,p?" 🛝":null]}),g?e.jsxs(x.ul,{variants:i,initial:"hidden",animate:"visible",className:"ml-4 mt-4 flex flex-col",children:[e.jsx(P,{type:"instructions",exerciseNumber:l,children:e.jsx(h,{to:`/${d}`,prefetch:"intent",className:b('relative whitespace-nowrap px-2 py-0.5 pr-3 text-xl font-medium outline-none after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":!r.stepNumber}),children:"Intro"})},l),v.filter(Boolean).map(({name:E,stepNumber:y,title:N})=>{const k=Number(r.stepNumber)===y,j=y.toString().padStart(2,"0"),S=E===s.playground.appName;return e.jsx(P,{type:"step",stepNumber:y,exerciseNumber:l,children:e.jsx(h,{to:`/${d}/${j}`,prefetch:"intent",className:b('relative whitespace-nowrap px-2 py-0.5 pr-3 text-xl font-medium outline-none after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":k}),children:S?`${j}. ${N} 🛝`:`${j}. ${N}`})},y)}),e.jsx(P,{type:"finished",exerciseNumber:l,children:e.jsx(_,{to:`/${d}/finished`,prefetch:"intent",className:({isActive:E})=>b('relative whitespace-nowrap px-2 py-0.5 pr-3 text-base font-medium outline-none after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":E}),children:"📝 Elaboration"})})]}):null]},l)})]}),e.jsx("div",{className:"mt-6",children:e.jsx(_,{to:"/finished",className:({isActive:l})=>b("relative whitespace-nowrap text-lg font-bold outline-none hover:underline focus:underline",{'bg-black text-white after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""]':l}),children:"📝 Workshop Feedback"})})]}),e.jsx("div",{className:"flex-grow"}),e.jsx("div",{className:m("flex items-center justify-start p-4",t&&c.length>4?"min-h-14":"h-14",{"w-full border-t":t}),children:e.jsx($e,{isMenuOpened:t})}),ENV.EPICSHOP_DEPLOYED?null:a?e.jsx(T,{content:t?null:"Your account",children:e.jsxs(h,{className:m("flex h-14 flex-shrink-0 items-center justify-start space-x-3 px-4 py-4 text-center no-underline hover:underline",{"border-l":!t,"w-full border-t":t}),to:"/account",children:[a.imageUrlSmall?e.jsx("img",{alt:a.name??a.email,src:a.imageUrlSmall,className:"h-full rounded-full"}):e.jsx(D,{name:"User",className:"flex-shrink-0",size:"lg"}),t?e.jsx(x.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Your Account"}):e.jsx("span",{className:"sr-only",children:"Your account"})]})}):null,ENV.EPICSHOP_DEPLOYED?null:a&&o?e.jsx(T,{content:t?null:"Continue to next lesson",children:e.jsxs(h,{to:o,prefetch:"intent",className:b("flex h-14 w-full items-center space-x-3 border-l px-4 py-4 pl-[18px] no-underline hover:underline"),state:{from:"continue next lesson button"},children:[e.jsx(D,{name:"FastForward",className:"flex-shrink-0",size:"md"}),t?e.jsx(x.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Continue to next lesson"}):e.jsx("span",{className:"sr-only",children:"Continue to next lesson"})]})}):null,e.jsx("div",{className:m("flex h-14 w-14 items-center justify-center self-start p-4 sm:mb-4 sm:w-full",{"w-full border-t":t,"border-l":!t}),children:e.jsx(le,{})})]})})})}const H=400;function _t({isMenuOpened:t,onMenuOpenChange:n}){const s=G(),a=L(),o=ie(),r=ae(),{users:c}=B(),i=s.exercises.find(d=>d.exerciseNumber===Number(r.exerciseNumber)),l=r.type==="solution"?i==null?void 0:i.solutions.find(d=>d.stepNumber===Number(r.stepNumber)):r.type==="problem"?i==null?void 0:i.problems.find(d=>d.stepNumber===Number(r.stepNumber)):null,u=U(),v={close:{width:56},open:{width:H}},g={visible:{opacity:1,transition:{duration:.05,when:"beforeChildren",staggerChildren:.03}},hidden:{opacity:0}},p=Number(r.exerciseNumber).toString().padStart(2,"0");return e.jsx("nav",{className:"hidden border-r sm:flex",children:e.jsx(x.div,{initial:t?"open":"close",variants:v,animate:u,children:e.jsxs("div",{className:"flex h-full flex-col items-center justify-between",children:[e.jsx(Le,{title:s.workshopTitle,menuControls:u,isMenuOpened:t,setMenuOpened:n}),t&&e.jsxs(x.div,{style:{width:H},className:"flex flex-grow flex-col justify-between overflow-y-auto p-6 scrollbar-thin scrollbar-thumb-scrollbar",initial:{opacity:0},animate:{opacity:1},children:[e.jsxs(x.ul,{variants:g,initial:"hidden",animate:"visible",className:"flex flex-col",children:[e.jsx("span",{children:e.jsx(_,{prefetch:"intent",to:"/",className:({isActive:d})=>b("relative whitespace-nowrap px-2 py-0.5 pr-3 text-2xl font-bold outline-none hover:underline focus:underline",'after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":d}),children:"Home"})}),s.exercises.map(({exerciseNumber:d,title:E,steps:y})=>{const N=Number(r.exerciseNumber)===d,k=!N&&s.playground.exerciseNumber===d,j=d.toString().padStart(2,"0");return e.jsxs(Ae,{exerciseNumber:d,children:[e.jsxs(h,{prefetch:"intent",to:`/${j}`,className:b("relative whitespace-nowrap px-2 py-0.5 pr-3 text-2xl font-bold outline-none hover:underline focus:underline",'after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":N}),children:[E,k?" 🛝":null]}),N?e.jsxs(x.ul,{variants:g,initial:"hidden",animate:"visible",className:"ml-4 mt-4 flex flex-col",children:[e.jsx(P,{type:"instructions",exerciseNumber:d,children:e.jsx(h,{to:`/${j}`,prefetch:"intent",className:b('relative whitespace-nowrap px-2 py-0.5 pr-3 text-xl font-medium outline-none after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":!r.stepNumber}),children:"Intro"})},d),y.filter(Boolean).map(({name:S,stepNumber:I,title:q})=>{const Fe=Number(r.stepNumber)===I,F=I.toString().padStart(2,"0"),Oe=S===s.playground.appName;return e.jsx(P,{type:"step",stepNumber:I,exerciseNumber:d,children:e.jsx(h,{to:`/${j}/${F}`,prefetch:"intent",className:b('relative whitespace-nowrap px-2 py-0.5 pr-3 text-xl font-medium outline-none after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":Fe}),children:Oe?`${F}. ${q} 🛝`:`${F}. ${q}`})},I)}),e.jsx(P,{type:"finished",exerciseNumber:d,children:e.jsx(_,{to:`/${j}/finished`,prefetch:"intent",className:({isActive:S})=>b('relative whitespace-nowrap px-2 py-0.5 pr-3 text-base font-medium outline-none after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":S}),children:"📝 Elaboration"})})]}):null]},d)})]}),e.jsx("div",{className:"mt-6",children:e.jsx(_,{to:"/finished",className:({isActive:d})=>b("relative whitespace-nowrap text-lg font-bold outline-none hover:underline focus:underline",{'bg-black text-white after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""]':d}),children:"📝 Workshop Feedback"})})]}),!t&&e.jsx("div",{className:"flex flex-grow flex-col justify-center",children:e.jsxs("div",{className:"orientation-sideways w-full font-mono text-sm font-medium uppercase leading-none",children:[i!=null&&i.title?e.jsx(h,{to:`/${p}`,children:i.title}):null,i!=null&&i.title&&(l!=null&&l.title)?" — ":null,l!=null&&l.title?e.jsx(h,{to:`/${p}/${l.stepNumber.toString().padStart(2,"0")}`,children:l.title}):null]})}),e.jsx("div",{className:m("flex w-full items-center justify-start border-t p-4 transition-[height]",t&&c.length>4?"h-28":"h-14"),style:t?{width:H}:{},children:e.jsx($e,{isMenuOpened:t})}),ENV.EPICSHOP_DEPLOYED?null:a?e.jsx(T,{content:t?null:"Your account",children:e.jsxs(h,{className:"flex h-14 w-full flex-shrink-0 items-center justify-start space-x-3 border-t px-4 py-4 text-center no-underline hover:underline",to:"/account",children:[a.imageUrlSmall?e.jsx("img",{alt:a.name??a.email,src:a.imageUrlSmall,className:"h-full rounded-full"}):e.jsx(D,{name:"User",className:"flex-shrink-0",size:"lg"}),t?e.jsx(x.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Your Account"}):e.jsx("span",{className:"sr-only",children:"Your account"})]})}):null,ENV.EPICSHOP_DEPLOYED?null:a&&o?e.jsx(T,{content:t?null:"Continue to next lesson",children:e.jsxs(h,{to:o,prefetch:"intent",className:b("flex h-14 w-full items-center space-x-3 border-t px-4 py-4 pl-[18px] no-underline hover:underline"),state:{from:"continue next lesson button"},children:[e.jsx(D,{name:"FastForward",className:"flex-shrink-0",size:"md"}),t?e.jsx(x.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Continue to next lesson"}):e.jsx("span",{className:"sr-only",children:"Continue to next lesson"})]})}):null,e.jsx("div",{className:"mb-4 w-full self-start border-t pl-3 pt-[15px]",children:e.jsx(le,{})})]})})})}function Le({title:t,isMenuOpened:n,setMenuOpened:s,menuControls:a}){const o=f.useRef(n),r=f.useRef(null),c={open:{d:"M3.06061 2.99999L21.0606 21"},closed:{d:"M0 9.5L24 9.5"}},i={open:{d:"M3.00006 21.0607L21 3.06064"},moving:{d:"M0 14.5L24 14.5"},closed:{d:"M0 14.5L15 14.5"}},l=U(),u=U();async function v(){a==null||a.start(n?"close":"open"),s(!n),n?(l.start(c.closed),await u.start(i.moving),u.start(i.closed)):(await u.start(i.moving),l.start(c.open),u.start(i.open))}return f.useEffect(()=>{if(!n)return;function g(p){var d;p.key==="Escape"&&((d=r.current)==null||d.click())}return document.addEventListener("keyup",g),()=>document.removeEventListener("keyup",g)},[n]),e.jsxs("div",{className:m("relative inline-flex h-14 flex-shrink-0 items-center justify-between overflow-hidden border-r sm:w-full sm:border-b sm:border-r-0",{"w-full":n}),children:[e.jsx("button",{ref:r,className:"flex h-14 w-14 items-center justify-center","aria-label":"Open Navigation menu",onClick:v,children:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",children:[e.jsx(x.path,{...c[o.current?"open":"closed"],animate:l,transition:{duration:.2},stroke:"currentColor",strokeWidth:1.5}),e.jsx(x.path,{...i[o.current?"open":"closed"],animate:u,transition:{duration:.2},stroke:"currentColor",strokeWidth:1.5})]})}),n&&e.jsx(x.p,{transition:{delay:.2},initial:{opacity:0,y:5},animate:{opacity:1,y:0},className:"absolute right-5 whitespace-nowrap font-mono text-sm uppercase",children:e.jsx(h,{to:"/",children:t})})]})}export{Yt as default};
|
|
6
|
+
//# sourceMappingURL=_layout-Muw3ERYT.js.map
|