@epic-web/workshop-app 6.70.0 → 6.71.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/{_exerciseNumber-DNg1F_Vn.js → _exerciseNumber-DOydVFcz.js} +2 -2
- package/build/client/assets/{_exerciseNumber-DNg1F_Vn.js.map → _exerciseNumber-DOydVFcz.js.map} +1 -1
- package/build/client/assets/{_exerciseNumber_.finished-BmUlhiS8.js → _exerciseNumber_.finished-OYmKydkm.js} +2 -2
- package/build/client/assets/{_exerciseNumber_.finished-BmUlhiS8.js.map → _exerciseNumber_.finished-OYmKydkm.js.map} +1 -1
- package/build/client/assets/{_extra-fwsy2qkP.js → _extra-DAAdPX1Q.js} +2 -2
- package/build/client/assets/{_extra-fwsy2qkP.js.map → _extra-DAAdPX1Q.js.map} +1 -1
- package/build/client/assets/_layout-BQ8VYaze.js +2 -0
- package/build/client/assets/_layout-BQ8VYaze.js.map +1 -0
- package/build/client/assets/{_layout-C-j5TKNx.js → _layout-CeuWC4em.js} +2 -2
- package/build/client/assets/{_layout-C-j5TKNx.js.map → _layout-CeuWC4em.js.map} +1 -1
- package/build/client/assets/{diff-DC-wn6-x.js → diff-CLewaNfR.js} +2 -2
- package/build/client/assets/{diff-DC-wn6-x.js.map → diff-CLewaNfR.js.map} +1 -1
- package/build/client/assets/{diff-BhWzqoVN.js → diff-DrdM1MAZ.js} +2 -2
- package/build/client/assets/{diff-BhWzqoVN.js.map → diff-DrdM1MAZ.js.map} +1 -1
- package/build/client/assets/{epic-video-8Hv_HMMr.js → epic-video-BO6oqwle.js} +2 -2
- package/build/client/assets/{epic-video-8Hv_HMMr.js.map → epic-video-BO6oqwle.js.map} +1 -1
- package/build/client/assets/{epic-video-D0drHmgC.js → epic-video-Ca_s42j5.js} +2 -2
- package/build/client/assets/{epic-video-D0drHmgC.js.map → epic-video-Ca_s42j5.js.map} +1 -1
- package/build/client/assets/{finished-Cr3pXmrH.js → finished-CqdoWQ9b.js} +2 -2
- package/build/client/assets/{finished-Cr3pXmrH.js.map → finished-CqdoWQ9b.js.map} +1 -1
- package/build/client/assets/guide-Cinib8Ji.js +9 -0
- package/build/client/assets/guide-Cinib8Ji.js.map +1 -0
- package/build/client/assets/{index-wDjETrF-.js → index-BHfJ4hna.js} +2 -2
- package/build/client/assets/{index-wDjETrF-.js.map → index-BHfJ4hna.js.map} +1 -1
- package/build/client/assets/{index-hhQHCvb9.js → index-BRVfMMSd.js} +2 -2
- package/build/client/assets/{index-hhQHCvb9.js.map → index-BRVfMMSd.js.map} +1 -1
- package/build/client/assets/index-CdzVFL-Z.js.map +1 -1
- package/build/client/assets/index-DuFMeXSm.js +2 -0
- package/build/client/assets/index-DuFMeXSm.js.map +1 -0
- package/build/client/assets/{index-BKAVQvm5.js → index-o922xZRF.js} +2 -2
- package/build/client/assets/{index-BKAVQvm5.js.map → index-o922xZRF.js.map} +1 -1
- package/build/client/assets/{manifest-e2f9a54b.js → manifest-cb3787c7.js} +1 -1
- package/build/client/assets/{mdx-BzyhMqFg.js → mdx-BGwe7vvs.js} +2 -2
- package/build/client/assets/{mdx-BzyhMqFg.js.map → mdx-BGwe7vvs.js.map} +1 -1
- package/build/client/assets/{progress-By6-_9Ii.js → progress-ILaVQtOO.js} +2 -2
- package/build/client/assets/{progress-By6-_9Ii.js.map → progress-ILaVQtOO.js.map} +1 -1
- package/build/client/assets/{root-BkPGxm0k.js → root-BwuJUAM7.js} +2 -2
- package/build/client/assets/{root-BkPGxm0k.js.map → root-BwuJUAM7.js.map} +1 -1
- package/build/client/assets/tailwind-C1_1LEqo.css +1 -0
- package/build/client/assets/{test-DtQCjBBX.js → test-CvHPFyBI.js} +2 -2
- package/build/client/assets/{test-DtQCjBBX.js.map → test-CvHPFyBI.js.map} +1 -1
- package/build/client/assets/{tests-fDISNsE-.js → tests-DlDV-wXQ.js} +2 -2
- package/build/client/assets/{tests-fDISNsE-.js.map → tests-DlDV-wXQ.js.map} +1 -1
- package/build/server/index.js +280 -36
- package/build/server/index.js.map +1 -1
- package/package.json +3 -3
- package/build/client/assets/_layout-BLOYb3Iq.js +0 -2
- package/build/client/assets/_layout-BLOYb3Iq.js.map +0 -1
- package/build/client/assets/guide-B4wAqzq_.js +0 -9
- package/build/client/assets/guide-B4wAqzq_.js.map +0 -1
- package/build/client/assets/index-AMZhCeTP.js +0 -2
- package/build/client/assets/index-AMZhCeTP.js.map +0 -1
- package/build/client/assets/tailwind-D_K12wB7.css +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{w as n,L as l}from"./chunk-EPOLDU6W-BCLmut3y.js";import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{E as a}from"./index-CEVyDj51.js";import{r as c}from"./index-CqIc3cxq.js";import{E as m}from"./epic-video-
|
|
2
|
-
//# sourceMappingURL=finished-
|
|
1
|
+
import{w as n,L as l}from"./chunk-EPOLDU6W-BCLmut3y.js";import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{E as a}from"./index-CEVyDj51.js";import{r as c}from"./index-CqIc3cxq.js";import{E as m}from"./epic-video-Ca_s42j5.js";import{I as d,c as p}from"./misc-W4055b-0.js";import{L as f}from"./loading-CDNzW5oO.js";import{N as h}from"./nav-chevrons-Dk4GtZwQ.js";import{u as x}from"./revalidation-ws-BJWJviUX.js";import{M as u}from"./mdx-BGwe7vvs.js";import{u as j}from"./online-DiNLkgTC.js";import{g as b}from"./root-loader-BOzEMapJ.js";import{g}from"./seo-t5J-DRxw.js";import{E as v}from"./launch-editor-D2exGfVu.js";import{P as w}from"./progress-ILaVQtOO.js";import{u as N}from"./index-CdzVFL-Z.js";import"./use-event-source-BuD4_2SF.js";import"./index-DzdDahau.js";import"./index-vDCSPjrM.js";import"./schemas-Uj5SZtvt.js";import"./tooltip-Tlsyx2YO.js";import"./user-BsPobzjB.js";import"./workshop-config-Zfc8zU0x.js";import"./preload-helper-BXl3LOEh.js";import"./progress-bar-DpWhcyhC.js";import"./pe-CIZUOJMr.js";const Z={getSitemapEntries:()=>[{route:"/finished"}]},_=({matches:r})=>{const s=b(r);return s?g({title:`🎉 ${s?.workshopTitle}`,description:`Elaboration for ${s?.workshopTitle}`,ogTitle:`Finished ${s?.workshopTitle}`,ogDescription:"You finished! Time to submit feedback.",instructor:s.instructor,requestInfo:s.requestInfo}):[]},k={h1:()=>null},ee=n(function({loaderData:s}){return x({watchPaths:["./exercises/FINISHED.mdx"]}),e.jsx("div",{className:"flex h-full grow flex-col",children:e.jsxs("main",{className:"grid h-full grow grid-cols-1 grid-rows-2 lg:grid-cols-2 lg:grid-rows-1",children:[e.jsxs("div",{className:"relative col-span-1 row-span-1 flex h-full flex-col lg:border-r",children:[e.jsx("h1",{className:"h-14 border-b pr-5 pl-10 text-sm leading-none font-medium uppercase",children:e.jsx("div",{className:"flex h-14 flex-wrap items-center justify-between gap-x-2 py-2",children:e.jsxs("div",{className:"flex items-center justify-start gap-x-2",children:[e.jsx(l,{to:"/",className:"hover:underline",children:s.workshopTitle}),e.jsx("span",{children:"/"}),e.jsx("span",{children:"Elaboration"})]})})}),e.jsx("article",{className:"shadow-on-scrollbox scrollbar-thin scrollbar-thumb-scrollbar h-full w-full max-w-none flex-1 scroll-pt-6 space-y-6 overflow-y-auto p-2 sm:p-10 sm:pt-8",id:s.articleId,children:s.finishedCode?e.jsx(m,{epicVideoInfosPromise:s.epicVideoInfosPromise,children:e.jsx("div",{className:"prose dark:prose-invert sm:prose-lg",children:e.jsx(u,{code:s.finishedCode,components:k})})}):"No finished instructions yet..."}),e.jsx(a,{elementQuery:`#${s.articleId}`}),e.jsx(w,{type:"workshop-finished",className:"h-14 border-t px-6"}),e.jsxs("div",{className:"@container flex h-16 justify-between border-t border-b-4 lg:border-b-0",children:[e.jsx("div",{}),s.workshopFinished.status==="success"?e.jsx(v,{file:s.workshopFinished.file,relativePath:s.workshopFinished.relativePath}):null,e.jsx(h,{prev:s.prevStepLink,next:{to:"/"}})]})]}),e.jsx(E,{workshopTitle:s.workshopTitle,workshopFormEmbedUrl:s.workshopFormEmbedUrl})]})})});function E({workshopTitle:r,workshopFormEmbedUrl:s}){const t=N(),[o,i]=c.useState(!1);return j()?e.jsxs("div",{className:"relative shrink-0",children:[o?null:e.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:e.jsx(f,{children:e.jsxs("span",{children:["Loading ",r," Elaboration form"]})})}),e.jsx("iframe",{onLoad:()=>i(!0),onError:()=>i(!0),title:"Elaboration",src:s,className:p("absolute inset-0 flex h-full w-full transition-opacity duration-300",o?"opacity-100":"opacity-0"),style:{colorScheme:t}})]}):e.jsx("div",{className:"relative shrink-0",children:e.jsx("div",{className:"text-foreground-destructive absolute inset-0 z-10 flex items-center justify-center",children:e.jsx(d,{name:"WifiNoConnection",size:"xl",children:e.jsxs("span",{children:["Unable to load the ",e.jsx("a",{href:s,className:"underline",children:`${r} feedback form`})," when offline"]})})})})}export{ee as default,Z as handle,_ as meta};
|
|
2
|
+
//# sourceMappingURL=finished-CqdoWQ9b.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"finished-Cr3pXmrH.js","sources":["../../../app/routes/_app+/finished.tsx"],"sourcesContent":["import { ElementScrollRestoration } from '@epic-web/restore-scroll'\nimport {\n\tgetExercises,\n\tgetWorkshopFinished,\n} from '@epic-web/workshop-utils/apps.server'\nimport { getWorkshopConfig } from '@epic-web/workshop-utils/config.server'\nimport { getEpicVideoInfos } from '@epic-web/workshop-utils/epic-api.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n\ttime,\n} from '@epic-web/workshop-utils/timing.server'\nimport { type SEOHandle } from '@nasa-gcn/remix-seo'\nimport slugify from '@sindresorhus/slugify'\nimport * as React from 'react'\nimport { data, type HeadersFunction, Link } from 'react-router'\nimport { EpicVideoInfoProvider } from '#app/components/epic-video.tsx'\nimport { Icon } from '#app/components/icons.tsx'\nimport { Loading } from '#app/components/loading.tsx'\nimport { NavChevrons } from '#app/components/nav-chevrons.tsx'\nimport { useRevalidationWS } from '#app/components/revalidation-ws.tsx'\nimport { Mdx } from '#app/utils/mdx.tsx'\nimport { cn } from '#app/utils/misc.tsx'\nimport { useIsOnline } from '#app/utils/online.ts'\nimport { getRootMatchLoaderData } from '#app/utils/root-loader.ts'\nimport { getSeoMetaTags } from '#app/utils/seo.ts'\nimport { EditFileOnGitHub } from '../launch-editor.tsx'\nimport { ProgressToggle } from '../progress.tsx'\nimport { useTheme } from '../theme/index.tsx'\nimport { type Route } from './+types/finished.tsx'\n\nexport const handle: SEOHandle = {\n\tgetSitemapEntries: () => [{ route: '/finished' }],\n}\n\nexport const meta: Route.MetaFunction = ({ matches }) => {\n\tconst rootData = getRootMatchLoaderData(matches)\n\tif (!rootData) return []\n\n\treturn getSeoMetaTags({\n\t\ttitle: `🎉 ${rootData?.workshopTitle}`,\n\t\tdescription: `Elaboration for ${rootData?.workshopTitle}`,\n\t\togTitle: `Finished ${rootData?.workshopTitle}`,\n\t\togDescription: `You finished! Time to submit feedback.`,\n\t\tinstructor: rootData.instructor,\n\t\trequestInfo: rootData.requestInfo,\n\t})\n}\n\nexport async function loader({ request }: Route.LoaderArgs) {\n\tconst timings = makeTimings('finishedLoader')\n\tconst exercises = await getExercises({ request, timings })\n\tconst compiledFinished = await time(() => getWorkshopFinished({ request }), {\n\t\ttimings,\n\t\ttype: 'compileMdx',\n\t\tdesc: 'compileMdx in finished',\n\t})\n\n\tconst lastExercises = exercises[exercises.length - 1]\n\tconst workshopConfig = getWorkshopConfig()\n\tconst workshopTitle = workshopConfig.title\n\tconst workshopFormTemplate = workshopConfig.forms.workshop\n\tconst workshopFormEmbedUrl = workshopFormTemplate.replace(\n\t\t'{workshopTitle}',\n\t\tencodeURIComponent(workshopTitle),\n\t)\n\treturn data(\n\t\t{\n\t\t\tarticleId: `workshop-${slugify(workshopTitle)}-finished`,\n\t\t\tworkshopTitle,\n\t\t\tworkshopFormEmbedUrl,\n\t\t\tfinishedCode:\n\t\t\t\tcompiledFinished.compiled.status === 'success'\n\t\t\t\t\t? compiledFinished.compiled.code\n\t\t\t\t\t: null,\n\t\t\tepicVideoInfosPromise:\n\t\t\t\tcompiledFinished.compiled.status === 'success'\n\t\t\t\t\t? getEpicVideoInfos(compiledFinished.compiled.epicVideoEmbeds, {\n\t\t\t\t\t\t\trequest,\n\t\t\t\t\t\t})\n\t\t\t\t\t: null,\n\t\t\tworkshopFinished: {\n\t\t\t\tstatus: compiledFinished.compiled.status,\n\t\t\t\tfile: compiledFinished.file,\n\t\t\t\trelativePath: compiledFinished.relativePath,\n\t\t\t},\n\t\t\tprevStepLink: lastExercises\n\t\t\t\t? {\n\t\t\t\t\t\tto: `/${lastExercises.exerciseNumber}/finished`,\n\t\t\t\t\t}\n\t\t\t\t: null,\n\t\t},\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'Server-Timing': getServerTimeHeader(timings),\n\t\t\t},\n\t\t},\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {\n\tconst headers = {\n\t\t'Cache-Control': loaderHeaders.get('Cache-Control') ?? '',\n\t\t'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nconst mdxComponents = { h1: () => null }\n\nexport default function ExerciseFinished({\n\tloaderData: data,\n}: Route.ComponentProps) {\n\tuseRevalidationWS({ watchPaths: ['./exercises/FINISHED.mdx'] })\n\treturn (\n\t\t<div className=\"flex h-full grow flex-col\">\n\t\t\t<main className=\"grid h-full grow grid-cols-1 grid-rows-2 lg:grid-cols-2 lg:grid-rows-1\">\n\t\t\t\t<div className=\"relative col-span-1 row-span-1 flex h-full flex-col lg:border-r\">\n\t\t\t\t\t<h1 className=\"h-14 border-b pr-5 pl-10 text-sm leading-none font-medium uppercase\">\n\t\t\t\t\t\t<div className=\"flex h-14 flex-wrap items-center justify-between gap-x-2 py-2\">\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-start gap-x-2\">\n\t\t\t\t\t\t\t\t<Link to=\"/\" className=\"hover:underline\">\n\t\t\t\t\t\t\t\t\t{data.workshopTitle}\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t<span>/</span>\n\t\t\t\t\t\t\t\t<span>Elaboration</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</h1>\n\t\t\t\t\t<article\n\t\t\t\t\t\tclassName=\"shadow-on-scrollbox scrollbar-thin scrollbar-thumb-scrollbar h-full w-full max-w-none flex-1 scroll-pt-6 space-y-6 overflow-y-auto p-2 sm:p-10 sm:pt-8\"\n\t\t\t\t\t\tid={data.articleId}\n\t\t\t\t\t>\n\t\t\t\t\t\t{data.finishedCode ? (\n\t\t\t\t\t\t\t<EpicVideoInfoProvider\n\t\t\t\t\t\t\t\tepicVideoInfosPromise={data.epicVideoInfosPromise}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"prose dark:prose-invert sm:prose-lg\">\n\t\t\t\t\t\t\t\t\t<Mdx code={data.finishedCode} components={mdxComponents} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</EpicVideoInfoProvider>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t// TODO: render a random dad joke...\n\t\t\t\t\t\t\t'No finished instructions yet...'\n\t\t\t\t\t\t)}\n\t\t\t\t\t</article>\n\t\t\t\t\t<ElementScrollRestoration elementQuery={`#${data.articleId}`} />\n\t\t\t\t\t<ProgressToggle\n\t\t\t\t\t\ttype=\"workshop-finished\"\n\t\t\t\t\t\tclassName=\"h-14 border-t px-6\"\n\t\t\t\t\t/>\n\t\t\t\t\t<div className=\"@container flex h-16 justify-between border-t border-b-4 lg:border-b-0\">\n\t\t\t\t\t\t<div />\n\t\t\t\t\t\t{data.workshopFinished.status === 'success' ? (\n\t\t\t\t\t\t\t<EditFileOnGitHub\n\t\t\t\t\t\t\t\tfile={data.workshopFinished.file}\n\t\t\t\t\t\t\t\trelativePath={data.workshopFinished.relativePath}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t<NavChevrons prev={data.prevStepLink} next={{ to: '/' }} />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<Survey\n\t\t\t\t\tworkshopTitle={data.workshopTitle}\n\t\t\t\t\tworkshopFormEmbedUrl={data.workshopFormEmbedUrl}\n\t\t\t\t/>\n\t\t\t</main>\n\t\t</div>\n\t)\n}\n\nfunction Survey({\n\tworkshopTitle,\n\tworkshopFormEmbedUrl,\n}: {\n\tworkshopTitle: string\n\tworkshopFormEmbedUrl: string\n}) {\n\tconst theme = useTheme()\n\tconst [iframeLoaded, setIframeLoaded] = React.useState(false)\n\tconst isOnline = useIsOnline()\n\tif (!isOnline) {\n\t\treturn (\n\t\t\t<div className=\"relative shrink-0\">\n\t\t\t\t<div className=\"text-foreground-destructive absolute inset-0 z-10 flex items-center justify-center\">\n\t\t\t\t\t<Icon name=\"WifiNoConnection\" size=\"xl\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{'Unable to load the '}\n\t\t\t\t\t\t\t<a href={workshopFormEmbedUrl} className=\"underline\">\n\t\t\t\t\t\t\t\t{`${workshopTitle} feedback form`}\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t{' when offline'}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Icon>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t)\n\t}\n\treturn (\n\t\t<div className=\"relative shrink-0\">\n\t\t\t{!iframeLoaded ? (\n\t\t\t\t<div className=\"absolute inset-0 z-10 flex items-center justify-center\">\n\t\t\t\t\t<Loading>\n\t\t\t\t\t\t<span>Loading {workshopTitle} Elaboration form</span>\n\t\t\t\t\t</Loading>\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t\t<iframe\n\t\t\t\tonLoad={() => setIframeLoaded(true)}\n\t\t\t\t// show what would have shown if there is an error\n\t\t\t\tonError={() => setIframeLoaded(true)}\n\t\t\t\ttitle=\"Elaboration\"\n\t\t\t\tsrc={workshopFormEmbedUrl}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'absolute inset-0 flex h-full w-full transition-opacity duration-300',\n\t\t\t\t\tiframeLoaded ? 'opacity-100' : 'opacity-0',\n\t\t\t\t)}\n\t\t\t\tstyle={{ colorScheme: theme }}\n\t\t\t/>\n\t\t</div>\n\t)\n}\n"],"names":["handle","getSitemapEntries","route","meta","matches","rootData","getRootMatchLoaderData","getSeoMetaTags","title","workshopTitle","description","ogTitle","ogDescription","instructor","requestInfo","mdxComponents","h1","finished","_UNSAFE_withComponentProps","loaderData","data","useRevalidationWS","watchPaths","className","children","jsxs","jsx","Link","to","id","articleId","finishedCode","EpicVideoInfoProvider","epicVideoInfosPromise","Mdx","code","components","ElementScrollRestoration","elementQuery","ProgressToggle","type","workshopFinished","status","EditFileOnGitHub","file","relativePath","NavChevrons","prev","prevStepLink","next","Survey","workshopFormEmbedUrl","theme","useTheme","iframeLoaded","setIframeLoaded","React","useIsOnline","Loading","onLoad","onError","src","cn","style","colorScheme","Icon","name","size","href"],"mappings":"0/BAgCO,MAAMA,EAAoB,CAChCC,kBAAmBA,IAAM,CAAC,CAAEC,MAAO,YAAa,CACjD,EAEaC,EAA2BA,CAAC,CAAEC,QAAAA,CAAQ,IAAM,CACxD,MAAMC,EAAWC,EAAuBF,CAAO,EAC/C,OAAKC,EAEEE,EAAe,CACrBC,MAAO,MAAMH,GAAUI,aAAa,GACpCC,YAAa,mBAAmBL,GAAUI,aAAa,GACvDE,QAAS,YAAYN,GAAUI,aAAa,GAC5CG,cAAe,yCACfC,WAAYR,EAASQ,WACrBC,YAAaT,EAASS,WACvB,CAAC,EATqB,CAAA,CAUvB,EA6DMC,EAAgB,CAAEC,GAAIA,IAAM,IAAK,EAEvCC,GAAAC,EAAA,SAAyC,CACxCC,WAAYC,CACb,EAAyB,CACxBC,OAAAA,EAAkB,CAAEC,WAAY,CAAC,0BAA0B,CAAE,CAAC,QAE5D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AAA,CAAA,CACD,EACAF,EAAAA,IAACwB,EAAA,CACAzC,cAAeW,EAAKX,cACpB0C,qBAAsB/B,EAAK+B,oBAAA,CAC5B,CAAA,EACD,CAAA,CACD,CAEF,CAAA,EAEA,SAASD,EAAO,CACfzC,cAAAA,EACA0C,qBAAAA,CACD,EAGG,CACF,MAAMC,EAAQC,EAAA,EACR,CAACC,EAAcC,CAAe,EAAIC,EAAAA,SAAe,EAAK,EAE5D,OADiBC,EAAA,EAmBhBhC,EAAAA,KAAC,MAAA,CAAIF,UAAU,oBACbC,SAAA,CAAC8B,EAME,WALF,MAAA,CAAI/B,UAAU,yDACdC,SAAAE,EAAAA,IAACgC,EAAA,CACAlC,gBAAC,OAAA,CAAKA,SAAA,CAAA,WAASf,EAAc,mBAAA,EAAiB,EAC/C,EACD,EAEDiB,EAAAA,IAAC,SAAA,CACAiC,OAAQA,IAAMJ,EAAgB,EAAI,EAElCK,QAASA,IAAML,EAAgB,EAAI,EACnC/C,MAAM,cACNqD,IAAKV,EACL5B,UAAWuC,EACV,sEACAR,EAAe,cAAgB,WAChC,EACAS,MAAO,CAAEC,YAAaZ,CAAM,CAAA,CAC7B,CAAA,CAAA,CACD,EApCC1B,EAAAA,IAAC,MAAA,CAAIH,UAAU,oBACdC,eAAC,MAAA,CAAID,UAAU,qFACdC,SAAAE,EAAAA,IAACuC,GAAKC,KAAK,mBAAmBC,KAAK,KAClC3C,gBAAC,OAAA,CACCA,SAAA,CAAA,sBACDE,EAAAA,IAAC,KAAE0C,KAAMjB,EAAsB5B,UAAU,YACvCC,SAAA,GAAGf,CAAa,iBAClB,EACC,eAAA,EACF,EACD,EACD,CAAA,CACD,CA0BH"}
|
|
1
|
+
{"version":3,"file":"finished-CqdoWQ9b.js","sources":["../../../app/routes/_app+/finished.tsx"],"sourcesContent":["import { ElementScrollRestoration } from '@epic-web/restore-scroll'\nimport {\n\tgetExercises,\n\tgetWorkshopFinished,\n} from '@epic-web/workshop-utils/apps.server'\nimport { getWorkshopConfig } from '@epic-web/workshop-utils/config.server'\nimport { getEpicVideoInfos } from '@epic-web/workshop-utils/epic-api.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n\ttime,\n} from '@epic-web/workshop-utils/timing.server'\nimport { type SEOHandle } from '@nasa-gcn/remix-seo'\nimport slugify from '@sindresorhus/slugify'\nimport * as React from 'react'\nimport { data, type HeadersFunction, Link } from 'react-router'\nimport { EpicVideoInfoProvider } from '#app/components/epic-video.tsx'\nimport { Icon } from '#app/components/icons.tsx'\nimport { Loading } from '#app/components/loading.tsx'\nimport { NavChevrons } from '#app/components/nav-chevrons.tsx'\nimport { useRevalidationWS } from '#app/components/revalidation-ws.tsx'\nimport { Mdx } from '#app/utils/mdx.tsx'\nimport { cn } from '#app/utils/misc.tsx'\nimport { useIsOnline } from '#app/utils/online.ts'\nimport { getRootMatchLoaderData } from '#app/utils/root-loader.ts'\nimport { getSeoMetaTags } from '#app/utils/seo.ts'\nimport { EditFileOnGitHub } from '../launch-editor.tsx'\nimport { ProgressToggle } from '../progress.tsx'\nimport { useTheme } from '../theme/index.tsx'\nimport { type Route } from './+types/finished.tsx'\n\nexport const handle: SEOHandle = {\n\tgetSitemapEntries: () => [{ route: '/finished' }],\n}\n\nexport const meta: Route.MetaFunction = ({ matches }) => {\n\tconst rootData = getRootMatchLoaderData(matches)\n\tif (!rootData) return []\n\n\treturn getSeoMetaTags({\n\t\ttitle: `🎉 ${rootData?.workshopTitle}`,\n\t\tdescription: `Elaboration for ${rootData?.workshopTitle}`,\n\t\togTitle: `Finished ${rootData?.workshopTitle}`,\n\t\togDescription: `You finished! Time to submit feedback.`,\n\t\tinstructor: rootData.instructor,\n\t\trequestInfo: rootData.requestInfo,\n\t})\n}\n\nexport async function loader({ request }: Route.LoaderArgs) {\n\tconst timings = makeTimings('finishedLoader')\n\tconst exercises = await getExercises({ request, timings })\n\tconst compiledFinished = await time(() => getWorkshopFinished({ request }), {\n\t\ttimings,\n\t\ttype: 'compileMdx',\n\t\tdesc: 'compileMdx in finished',\n\t})\n\n\tconst lastExercises = exercises[exercises.length - 1]\n\tconst workshopConfig = getWorkshopConfig()\n\tconst workshopTitle = workshopConfig.title\n\tconst workshopFormTemplate = workshopConfig.forms.workshop\n\tconst workshopFormEmbedUrl = workshopFormTemplate.replace(\n\t\t'{workshopTitle}',\n\t\tencodeURIComponent(workshopTitle),\n\t)\n\treturn data(\n\t\t{\n\t\t\tarticleId: `workshop-${slugify(workshopTitle)}-finished`,\n\t\t\tworkshopTitle,\n\t\t\tworkshopFormEmbedUrl,\n\t\t\tfinishedCode:\n\t\t\t\tcompiledFinished.compiled.status === 'success'\n\t\t\t\t\t? compiledFinished.compiled.code\n\t\t\t\t\t: null,\n\t\t\tepicVideoInfosPromise:\n\t\t\t\tcompiledFinished.compiled.status === 'success'\n\t\t\t\t\t? getEpicVideoInfos(compiledFinished.compiled.epicVideoEmbeds, {\n\t\t\t\t\t\t\trequest,\n\t\t\t\t\t\t})\n\t\t\t\t\t: null,\n\t\t\tworkshopFinished: {\n\t\t\t\tstatus: compiledFinished.compiled.status,\n\t\t\t\tfile: compiledFinished.file,\n\t\t\t\trelativePath: compiledFinished.relativePath,\n\t\t\t},\n\t\t\tprevStepLink: lastExercises\n\t\t\t\t? {\n\t\t\t\t\t\tto: `/${lastExercises.exerciseNumber}/finished`,\n\t\t\t\t\t}\n\t\t\t\t: null,\n\t\t},\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'Server-Timing': getServerTimeHeader(timings),\n\t\t\t},\n\t\t},\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {\n\tconst headers = {\n\t\t'Cache-Control': loaderHeaders.get('Cache-Control') ?? '',\n\t\t'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nconst mdxComponents = { h1: () => null }\n\nexport default function ExerciseFinished({\n\tloaderData: data,\n}: Route.ComponentProps) {\n\tuseRevalidationWS({ watchPaths: ['./exercises/FINISHED.mdx'] })\n\treturn (\n\t\t<div className=\"flex h-full grow flex-col\">\n\t\t\t<main className=\"grid h-full grow grid-cols-1 grid-rows-2 lg:grid-cols-2 lg:grid-rows-1\">\n\t\t\t\t<div className=\"relative col-span-1 row-span-1 flex h-full flex-col lg:border-r\">\n\t\t\t\t\t<h1 className=\"h-14 border-b pr-5 pl-10 text-sm leading-none font-medium uppercase\">\n\t\t\t\t\t\t<div className=\"flex h-14 flex-wrap items-center justify-between gap-x-2 py-2\">\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-start gap-x-2\">\n\t\t\t\t\t\t\t\t<Link to=\"/\" className=\"hover:underline\">\n\t\t\t\t\t\t\t\t\t{data.workshopTitle}\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t<span>/</span>\n\t\t\t\t\t\t\t\t<span>Elaboration</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</h1>\n\t\t\t\t\t<article\n\t\t\t\t\t\tclassName=\"shadow-on-scrollbox scrollbar-thin scrollbar-thumb-scrollbar h-full w-full max-w-none flex-1 scroll-pt-6 space-y-6 overflow-y-auto p-2 sm:p-10 sm:pt-8\"\n\t\t\t\t\t\tid={data.articleId}\n\t\t\t\t\t>\n\t\t\t\t\t\t{data.finishedCode ? (\n\t\t\t\t\t\t\t<EpicVideoInfoProvider\n\t\t\t\t\t\t\t\tepicVideoInfosPromise={data.epicVideoInfosPromise}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"prose dark:prose-invert sm:prose-lg\">\n\t\t\t\t\t\t\t\t\t<Mdx code={data.finishedCode} components={mdxComponents} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</EpicVideoInfoProvider>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t// TODO: render a random dad joke...\n\t\t\t\t\t\t\t'No finished instructions yet...'\n\t\t\t\t\t\t)}\n\t\t\t\t\t</article>\n\t\t\t\t\t<ElementScrollRestoration elementQuery={`#${data.articleId}`} />\n\t\t\t\t\t<ProgressToggle\n\t\t\t\t\t\ttype=\"workshop-finished\"\n\t\t\t\t\t\tclassName=\"h-14 border-t px-6\"\n\t\t\t\t\t/>\n\t\t\t\t\t<div className=\"@container flex h-16 justify-between border-t border-b-4 lg:border-b-0\">\n\t\t\t\t\t\t<div />\n\t\t\t\t\t\t{data.workshopFinished.status === 'success' ? (\n\t\t\t\t\t\t\t<EditFileOnGitHub\n\t\t\t\t\t\t\t\tfile={data.workshopFinished.file}\n\t\t\t\t\t\t\t\trelativePath={data.workshopFinished.relativePath}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t<NavChevrons prev={data.prevStepLink} next={{ to: '/' }} />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<Survey\n\t\t\t\t\tworkshopTitle={data.workshopTitle}\n\t\t\t\t\tworkshopFormEmbedUrl={data.workshopFormEmbedUrl}\n\t\t\t\t/>\n\t\t\t</main>\n\t\t</div>\n\t)\n}\n\nfunction Survey({\n\tworkshopTitle,\n\tworkshopFormEmbedUrl,\n}: {\n\tworkshopTitle: string\n\tworkshopFormEmbedUrl: string\n}) {\n\tconst theme = useTheme()\n\tconst [iframeLoaded, setIframeLoaded] = React.useState(false)\n\tconst isOnline = useIsOnline()\n\tif (!isOnline) {\n\t\treturn (\n\t\t\t<div className=\"relative shrink-0\">\n\t\t\t\t<div className=\"text-foreground-destructive absolute inset-0 z-10 flex items-center justify-center\">\n\t\t\t\t\t<Icon name=\"WifiNoConnection\" size=\"xl\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{'Unable to load the '}\n\t\t\t\t\t\t\t<a href={workshopFormEmbedUrl} className=\"underline\">\n\t\t\t\t\t\t\t\t{`${workshopTitle} feedback form`}\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t{' when offline'}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Icon>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t)\n\t}\n\treturn (\n\t\t<div className=\"relative shrink-0\">\n\t\t\t{!iframeLoaded ? (\n\t\t\t\t<div className=\"absolute inset-0 z-10 flex items-center justify-center\">\n\t\t\t\t\t<Loading>\n\t\t\t\t\t\t<span>Loading {workshopTitle} Elaboration form</span>\n\t\t\t\t\t</Loading>\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t\t<iframe\n\t\t\t\tonLoad={() => setIframeLoaded(true)}\n\t\t\t\t// show what would have shown if there is an error\n\t\t\t\tonError={() => setIframeLoaded(true)}\n\t\t\t\ttitle=\"Elaboration\"\n\t\t\t\tsrc={workshopFormEmbedUrl}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'absolute inset-0 flex h-full w-full transition-opacity duration-300',\n\t\t\t\t\tiframeLoaded ? 'opacity-100' : 'opacity-0',\n\t\t\t\t)}\n\t\t\t\tstyle={{ colorScheme: theme }}\n\t\t\t/>\n\t\t</div>\n\t)\n}\n"],"names":["handle","getSitemapEntries","route","meta","matches","rootData","getRootMatchLoaderData","getSeoMetaTags","title","workshopTitle","description","ogTitle","ogDescription","instructor","requestInfo","mdxComponents","h1","finished","_UNSAFE_withComponentProps","loaderData","data","useRevalidationWS","watchPaths","className","children","jsxs","jsx","Link","to","id","articleId","finishedCode","EpicVideoInfoProvider","epicVideoInfosPromise","Mdx","code","components","ElementScrollRestoration","elementQuery","ProgressToggle","type","workshopFinished","status","EditFileOnGitHub","file","relativePath","NavChevrons","prev","prevStepLink","next","Survey","workshopFormEmbedUrl","theme","useTheme","iframeLoaded","setIframeLoaded","React","useIsOnline","Loading","onLoad","onError","src","cn","style","colorScheme","Icon","name","size","href"],"mappings":"0/BAgCO,MAAMA,EAAoB,CAChCC,kBAAmBA,IAAM,CAAC,CAAEC,MAAO,YAAa,CACjD,EAEaC,EAA2BA,CAAC,CAAEC,QAAAA,CAAQ,IAAM,CACxD,MAAMC,EAAWC,EAA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C,GAAKC,KAAK,mBAAmBC,KAAK,KAClC3C,gBAAC,OAAA,CACCA,SAAA,CAAA,sBACDE,EAAAA,IAAC,KAAE0C,KAAMjB,EAAsB5B,UAAU,YACvCC,SAAA,GAAGf,CAAa,iBAClB,EACC,eAAA,EACF,EACD,EACD,CAAA,CACD,CA0BH"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{w as c,L as d}from"./chunk-EPOLDU6W-BCLmut3y.js";import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{r}from"./index-CqIc3cxq.js";const x={getSitemapEntries:()=>[{route:"/guide"}]},l=[{id:"tutorial",label:"Tutorial"},{id:"logging-in",label:"Logging In"},{id:"interleaved-practice",label:"Interleaved Practice"},{id:"workshop-structure",label:"Workshop Structure"},{id:"lesson-page",label:"The Lesson Page"},{id:"file-links",label:"File Links"},{id:"setting-playground",label:"Setting the Playground"},{id:"diff-tab",label:"The Diff Tab"},{id:"tests",label:"Tests"},{id:"keyboard-shortcuts",label:"Keyboard Shortcuts"},{id:"cli-commands",label:"CLI Commands"},{id:"ai-assistant",label:"AI Assistant (MCP)"},{id:"emoji-key",label:"Emoji Key"},{id:"need-help",label:"Need More Help?"}];function h({activeSection:i}){return e.jsxs("nav",{className:"sticky top-4 hidden lg:block",children:[e.jsx("h2",{className:"text-muted-foreground mb-3 text-sm font-semibold tracking-wide uppercase",children:"On this page"}),e.jsx("ul",{className:"space-y-2 text-sm",children:l.map(s=>e.jsx("li",{children:e.jsx("a",{href:`#${s.id}`,className:`block transition-colors ${i===s.id?"text-highlight font-medium":"text-muted-foreground hover:text-foreground"}`,children:s.label})},s.id))})]})}const g=c(function(){const[s,a]=r.useState(null);return r.useEffect(()=>{const n=new IntersectionObserver(o=>{for(const t of o)t.isIntersecting&&a(t.target.id)},{rootMargin:"-20% 0px -60% 0px",threshold:0});for(const o of l){const t=document.getElementById(o.id);t&&n.observe(t)}return()=>n.disconnect()},[]),e.jsx("div",{className:"h-full w-full overflow-y-auto",children:e.jsxs("div",{className:"container mt-12 flex max-w-5xl gap-12 pb-24",children:[e.jsxs("main",{className:"flex w-full max-w-3xl grow flex-col gap-8",children:[e.jsx("h1",{className:"text-h1 mb-4",children:"Workshop App Guide"}),e.jsx("p",{className:"text-lg",children:"This guide will help you get the most out of the Epic Workshop App. Whether you're just getting started or need help troubleshooting, you'll find useful information here."}),e.jsxs("div",{id:"tutorial",className:"bg-accent scroll-mt-8 rounded-lg p-6",children:[e.jsx("h2",{className:"text-h4 mb-2",children:"🎓 New to the Workshop App?"}),e.jsx("p",{className:"mb-4",children:"We highly recommend going through the official tutorial to learn all the features the workshop app has to offer:"}),e.jsx("code",{className:"bg-background block rounded p-3 font-mono text-sm",children:"npx epicshop add epicshop-tutorial"}),e.jsx("p",{className:"text-muted-foreground mt-2 text-sm",children:"This will add the tutorial workshop to your setup so you can learn at your own pace."})]}),e.jsxs("section",{id:"logging-in",className:"scroll-mt-8",children:[e.jsx("h2",{className:"text-h3 mb-4",children:"Logging In"}),e.jsx("p",{className:"mb-4",children:"Logging in unlocks important features that enhance your learning experience:"}),e.jsxs("ul",{className:"list-disc space-y-2 pl-6",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Progress tracking"})," – Your progress syncs across devices and persists between sessions"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Video access"})," – Watch premium workshop videos (requires a valid license)"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Discord integration"})," – Connect with the community and instructors"]})]}),e.jsx("h3",{className:"text-h5 mt-6 mb-3",children:"How to Log In"}),e.jsxs("p",{className:"mb-4",children:["Click the ",e.jsx("strong",{children:"Account"})," link in the navigation (top right) and follow the login prompts. You can also log in via the CLI:"]}),e.jsx("code",{className:"bg-muted mb-4 block rounded p-3 font-mono text-sm",children:"epicshop auth login"}),e.jsx("p",{className:"mb-4",children:"This opens a browser window where you can authenticate with your EpicWeb.dev, EpicReact.dev, or EpicAI.pro account."}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Tip: Log in early to start tracking your progress from the beginning!"})]}),e.jsxs("section",{id:"interleaved-practice",className:"scroll-mt-8",children:[e.jsx("h2",{className:"text-h3 mb-4",children:"Interleaved Practice"}),e.jsx("p",{className:"mb-4",children:"Interleaved practice mixes previously learned material with new content so your brain has to recall concepts instead of relying on short-term memory. This spacing effect improves long-term retention and makes it easier to apply skills in new contexts."}),e.jsxs("p",{className:"mb-4",children:["Once you're logged in and have completed at least two exercise steps, you'll see a ",e.jsx("strong",{children:"Practice a past lesson"})," button next to ",e.jsx("strong",{children:"Continue to next lesson"})," in the navigation. Click it any time to jump to a random completed step and refresh what you've learned."]}),e.jsxs("ul",{className:"list-disc space-y-2 pl-6",children:[e.jsx("li",{children:"You must be logged in."}),e.jsx("li",{children:"You need two or more completed steps."})]})]}),e.jsxs("section",{id:"workshop-structure",className:"scroll-mt-8",children:[e.jsx("h2",{className:"text-h3 mb-4",children:"Workshop Structure"}),e.jsx("p",{className:"mb-4",children:"Each workshop is a standalone project with a consistent structure:"}),e.jsxs("ul",{className:"list-disc space-y-2 pl-6",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"exercises/"}),' – Contains the "problem" and "solution" versions of each step. Treat this as a reference for after the workshop.']}),e.jsxs("li",{children:[e.jsx("strong",{children:"playground/"})," – This is where your work takes place. We recommend opening this directory as its own editor instance for efficient file searching."]})]})]}),e.jsxs("section",{id:"lesson-page",className:"scroll-mt-8",children:[e.jsx("h2",{className:"text-h3 mb-4",children:"The Lesson Page"}),e.jsx("p",{className:"mb-4",children:"When you click into a lesson, the app displays the video along with written content, code snippets, and other useful information. To the right is a pane with tabs:"}),e.jsxs("ul",{className:"list-disc space-y-2 pl-6",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Playground"})," – Where you'll spend most of your time. You can interact with the app here or open it in a dedicated tab."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Problem"})," – The starting point of the exercise."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Solution"})," – The completed exercise state."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Diff"})," – Compare your current version against the finished state. Use this if you get stuck, but try to avoid it if possible."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Tests"})," – If the exercise includes tests, they'll appear here to verify your work."]})]})]}),e.jsxs("section",{id:"file-links",className:"scroll-mt-8",children:[e.jsx("h2",{className:"text-h3 mb-4",children:"File Links"}),e.jsxs("p",{className:"mb-4",children:["At the bottom of a lesson page, the ",e.jsx("strong",{children:'"Files"'})," ","button opens a list of relevant files for the current exercise. Clicking a file opens it directly in your editor at the right location."]}),e.jsx("p",{className:"mb-4",children:"Key things to know:"}),e.jsxs("ul",{className:"list-disc space-y-2 pl-6",children:[e.jsx("li",{children:"Files are tied to your current Playground – make sure it's set to the lesson you're working on."}),e.jsxs("li",{children:["A ",e.jsx("strong",{children:'"+"'})," icon next to a filename means you need to create that file. Clicking it will create and open the file."]}),e.jsx("li",{children:'If you see a red "Set to Playground" link, click it to sync the playground for the current exercise.'})]}),e.jsx("h3",{id:"file-links-troubleshooting",className:"text-h4 mt-8 mb-4 scroll-mt-8",children:"Troubleshooting"}),e.jsxs("p",{className:"mb-4",children:["If you're unable to open file links from the workshop app, create a ",e.jsx("code",{className:"bg-muted rounded px-1",children:".env"})," file in the root of the workshop project and add:"]}),e.jsx("code",{className:"bg-muted mb-4 block rounded p-3 font-mono text-sm",children:'EPICSHOP_EDITOR="path/to/your/editor"'}),e.jsx("p",{className:"mb-4",children:"Examples:"}),e.jsxs("ul",{className:"list-disc space-y-2 pl-6",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"VS Code:"})," ",e.jsx("code",{className:"bg-muted rounded px-1",children:"EPICSHOP_EDITOR=code"})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"VS Code on Windows:"})," ",e.jsx("code",{className:"bg-muted rounded px-1",children:`EPICSHOP_EDITOR='"C:\\Program Files\\Microsoft VS Code\\bin\\code.cmd"'`})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Cursor:"})," ",e.jsx("code",{className:"bg-muted rounded px-1",children:"EPICSHOP_EDITOR=cursor"})]})]}),e.jsx("p",{className:"text-muted-foreground mt-4 text-sm",children:"Note: If the path includes spaces, wrap it in quotes as shown in the Windows example."}),e.jsx("p",{className:"mt-4",children:`For Cursor/VS Code users, you can also install the 'code' command in your PATH by opening the Command Palette (⌘⇧P on Mac, Ctrl+Shift+P on Windows) and searching for "Install 'code' command in PATH".`})]}),e.jsxs("section",{id:"setting-playground",className:"scroll-mt-8",children:[e.jsx("h2",{className:"text-h3 mb-4",children:"Setting the Playground"}),e.jsxs("p",{className:"mb-4",children:["If you navigate to a different exercise than what's currently loaded, a red ",e.jsx("strong",{children:'"Set to Playground"'})," link will appear. Clicking this syncs the playground for the appropriate exercise."]}),e.jsxs("p",{className:"bg-warning text-warning-foreground rounded-lg p-4",children:[e.jsx("strong",{children:"Important:"})," Always have your Playground set to the lesson you're working on! This is not automated because you might want to refer back to previous exercises without losing your current work."]})]}),e.jsxs("section",{id:"diff-tab",className:"scroll-mt-8",children:[e.jsx("h2",{className:"text-h3 mb-4",children:"The Diff Tab"}),e.jsx("p",{className:"mb-4",children:"The diff tab helps you get unstuck when you're totally stuck. It shows the difference between your playground and the solution. This is especially useful for catching typos or small mistakes."}),e.jsxs("ul",{className:"list-disc space-y-2 pl-6",children:[e.jsxs("li",{children:[e.jsx("span",{className:"text-success font-mono",children:"+"})," lines (green) show code that needs to be added"]}),e.jsxs("li",{children:[e.jsx("span",{className:"text-foreground-destructive font-mono",children:"-"})," ","lines (red) show code that needs to be removed"]}),e.jsx("li",{children:"Unchanged lines provide context around the changes"})]}),e.jsx("p",{className:"text-muted-foreground mt-4 text-sm",children:"Tip: Try to avoid using the diff tab until you've made a solid attempt at the exercise. The learning happens in the struggle!"})]}),e.jsxs("section",{id:"tests",className:"scroll-mt-8",children:[e.jsx("h2",{className:"text-h3 mb-4",children:"Tests"}),e.jsx("p",{className:"mb-4",children:"Some exercises include tests to verify your work. If available, they appear in the Tests tab. Tests can run in two ways:"}),e.jsxs("ul",{className:"list-disc space-y-2 pl-6",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Script-based:"})," A button runs the test script and streams the output"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Browser-based:"})," Test files are compiled and run directly in the browser"]})]}),e.jsxs("p",{className:"mt-4",children:["Look for 🚨 ",e.jsx("strong",{children:"Alfred the Alert"})," in test failures for helpful explanations about what went wrong."]})]}),e.jsxs("section",{id:"keyboard-shortcuts",className:"scroll-mt-8",children:[e.jsx("h2",{className:"text-h3 mb-4",children:"Keyboard Shortcuts"}),e.jsx("p",{className:"mb-4",children:"When the workshop server is running in your terminal, you can use these keyboard shortcuts:"}),e.jsxs("ul",{className:"list-disc space-y-2 pl-6",children:[e.jsxs("li",{children:[e.jsx("kbd",{className:"bg-muted rounded px-2 py-1 font-mono text-sm",children:"u"})," ","– Check for and apply updates to the workshop"]}),e.jsxs("li",{children:[e.jsx("kbd",{className:"bg-muted rounded px-2 py-1 font-mono text-sm",children:"d"})," ","– Dismiss update notifications"]})]}),e.jsx("p",{className:"text-muted-foreground mt-4 text-sm",children:"The server automatically restarts after updates are applied."})]}),e.jsxs("section",{id:"cli-commands",className:"scroll-mt-8",children:[e.jsx("h2",{className:"text-h3 mb-4",children:"CLI Commands"}),e.jsxs("p",{className:"mb-4",children:["The ",e.jsx("code",{className:"bg-muted rounded px-1",children:"epicshop"})," CLI provides useful commands for managing your workshop:"]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("code",{className:"bg-muted block rounded p-3 font-mono text-sm",children:"epicshop start"}),e.jsxs("p",{className:"text-muted-foreground mt-1 text-sm",children:["Start the workshop (or just run"," ",e.jsx("code",{className:"bg-muted rounded px-1",children:"npm start"}),")"]})]}),e.jsxs("div",{children:[e.jsx("code",{className:"bg-muted block rounded p-3 font-mono text-sm",children:"epicshop playground set"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:"Set the playground to the next incomplete step"})]}),e.jsxs("div",{children:[e.jsx("code",{className:"bg-muted block rounded p-3 font-mono text-sm",children:"epicshop diff"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:"Show the diff between your playground and the solution in the terminal"})]}),e.jsxs("div",{children:[e.jsx("code",{className:"bg-muted block rounded p-3 font-mono text-sm",children:"epicshop progress"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:"View your progress through the workshop"})]}),e.jsxs("div",{children:[e.jsx("code",{className:"bg-muted block rounded p-3 font-mono text-sm",children:"epicshop exercises"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:"List all exercises with completion status"})]})]}),e.jsxs("p",{className:"mt-4",children:["Run ",e.jsx("code",{className:"bg-muted rounded px-1",children:"epicshop --help"})," ","to see all available commands."]})]}),e.jsxs("section",{id:"ai-assistant",className:"scroll-mt-8",children:[e.jsx("h2",{className:"text-h3 mb-4",children:"AI Assistant (MCP)"}),e.jsxs("p",{className:"mb-4",children:["If you use an AI assistant that supports"," ",e.jsx("a",{href:"https://modelcontextprotocol.io/",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"MCP (Model Context Protocol)"}),", you can install the Epic Workshop MCP server to enhance your learning experience."]}),e.jsx("h3",{className:"text-h5 mt-6 mb-3",children:"What it provides"}),e.jsxs("ul",{className:"list-disc space-y-2 pl-6",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Exercise context:"})," Your AI can understand what you're working on and provide relevant help"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Progress tracking:"})," Mark lessons complete directly through your AI"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Diff viewing:"})," Ask your AI to show you what changes are needed"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"File opening:"})," Have your AI open the relevant files in your editor"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Quiz mode:"})," Ask your AI to quiz you on workshop topics"]})]}),e.jsx("h3",{className:"text-h5 mt-6 mb-3",children:"Installation"}),e.jsx("p",{className:"mb-4",children:"Add the following to your AI assistant's MCP configuration (e.g., Claude Desktop):"}),e.jsx("pre",{className:"bg-muted overflow-x-auto rounded p-4 font-mono text-sm",children:`{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"epicshop": {
|
|
4
|
+
"command": "npx",
|
|
5
|
+
"args": ["-y", "@epic-web/workshop-mcp"]
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}`}),e.jsx("p",{className:"text-muted-foreground mt-4 text-sm",children:"Make sure to run your AI assistant from within the workshop directory so the MCP server can find the right files."})]}),e.jsxs("section",{id:"emoji-key",className:"scroll-mt-8",children:[e.jsx("h2",{className:"text-h3 mb-4",children:"Emoji Key"}),e.jsx("p",{className:"mb-4",children:"Each exercise has comments with helpful emoji characters:"}),e.jsxs("ul",{className:"space-y-2 pl-6",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"👨💼 Peter the Product Manager"})," – Helps you know what users want"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"🧝♀️ Kellie the Co-worker"})," – Your co-worker who sometimes does work ahead of your exercises"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"🐨 Kody the Koala"})," – Tells you when there's something specific to do"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"🦺 Lily the Life Jacket"})," – Helps with TypeScript-specific parts"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"💰 Marty the Money Bag"})," – Gives specific tips and sometimes code"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"📝 Nancy the Notepad"})," – Encourages you to take notes"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"🦉 Olivia the Owl"})," – Gives useful tidbits and best practices"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"📜 Dominic the Document"})," – Links to useful documentation"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"💣 Barry the Bomb"})," – Indicates code to delete"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"💪 Matthew the Muscle"})," – Indicates you're working with an exercise"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"🏁 Chuck the Checkered Flag"})," – Indicates a final step"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"🚨 Alfred the Alert"})," – Shows up in test failures with explanations"]})]})]}),e.jsxs("section",{id:"need-help",className:"scroll-mt-8",children:[e.jsx("h2",{className:"text-h3 mb-4",children:"Need More Help?"}),e.jsxs("p",{children:["Visit our"," ",e.jsx(d,{to:"/support",className:"underline",children:"Support page"})," ","for additional help options, including Discord access and how to report issues."]})]})]}),e.jsx("aside",{className:"hidden w-48 shrink-0 lg:block",children:e.jsx(h,{activeSection:s})})]})})});export{g as default,x as handle};
|
|
9
|
+
//# sourceMappingURL=guide-Cinib8Ji.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide-Cinib8Ji.js","sources":["../../../app/routes/_app+/guide.tsx"],"sourcesContent":["import { type SEOHandle } from '@nasa-gcn/remix-seo'\nimport * as React from 'react'\nimport { Link } from 'react-router'\n\nexport const handle: SEOHandle = {\n\tgetSitemapEntries: () => [{ route: '/guide' }],\n}\n\nconst sections = [\n\t{ id: 'tutorial', label: 'Tutorial' },\n\t{ id: 'logging-in', label: 'Logging In' },\n\t{ id: 'interleaved-practice', label: 'Interleaved Practice' },\n\t{ id: 'workshop-structure', label: 'Workshop Structure' },\n\t{ id: 'lesson-page', label: 'The Lesson Page' },\n\t{ id: 'file-links', label: 'File Links' },\n\t{ id: 'setting-playground', label: 'Setting the Playground' },\n\t{ id: 'diff-tab', label: 'The Diff Tab' },\n\t{ id: 'tests', label: 'Tests' },\n\t{ id: 'keyboard-shortcuts', label: 'Keyboard Shortcuts' },\n\t{ id: 'cli-commands', label: 'CLI Commands' },\n\t{ id: 'ai-assistant', label: 'AI Assistant (MCP)' },\n\t{ id: 'emoji-key', label: 'Emoji Key' },\n\t{ id: 'need-help', label: 'Need More Help?' },\n] as const\n\nfunction TableOfContents({ activeSection }: { activeSection: string | null }) {\n\treturn (\n\t\t<nav className=\"sticky top-4 hidden lg:block\">\n\t\t\t<h2 className=\"text-muted-foreground mb-3 text-sm font-semibold tracking-wide uppercase\">\n\t\t\t\tOn this page\n\t\t\t</h2>\n\t\t\t<ul className=\"space-y-2 text-sm\">\n\t\t\t\t{sections.map((section) => (\n\t\t\t\t\t<li key={section.id}>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\thref={`#${section.id}`}\n\t\t\t\t\t\t\tclassName={`block transition-colors ${\n\t\t\t\t\t\t\t\tactiveSection === section.id\n\t\t\t\t\t\t\t\t\t? 'text-highlight font-medium'\n\t\t\t\t\t\t\t\t\t: 'text-muted-foreground hover:text-foreground'\n\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{section.label}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</li>\n\t\t\t\t))}\n\t\t\t</ul>\n\t\t</nav>\n\t)\n}\n\nexport default function Guide() {\n\tconst [activeSection, setActiveSection] = React.useState<string | null>(null)\n\n\tReact.useEffect(() => {\n\t\tconst observer = new IntersectionObserver(\n\t\t\t(entries) => {\n\t\t\t\tfor (const entry of entries) {\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tsetActiveSection(entry.target.id)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\trootMargin: '-20% 0px -60% 0px',\n\t\t\t\tthreshold: 0,\n\t\t\t},\n\t\t)\n\n\t\tfor (const section of sections) {\n\t\t\tconst element = document.getElementById(section.id)\n\t\t\tif (element) {\n\t\t\t\tobserver.observe(element)\n\t\t\t}\n\t\t}\n\n\t\treturn () => observer.disconnect()\n\t}, [])\n\n\treturn (\n\t\t<div className=\"h-full w-full overflow-y-auto\">\n\t\t\t<div className=\"container mt-12 flex max-w-5xl gap-12 pb-24\">\n\t\t\t\t<main className=\"flex w-full max-w-3xl grow flex-col gap-8\">\n\t\t\t\t\t<h1 className=\"text-h1 mb-4\">Workshop App Guide</h1>\n\n\t\t\t\t\t<p className=\"text-lg\">\n\t\t\t\t\t\tThis guide will help you get the most out of the Epic Workshop App.\n\t\t\t\t\t\tWhether you're just getting started or need help troubleshooting,\n\t\t\t\t\t\tyou'll find useful information here.\n\t\t\t\t\t</p>\n\n\t\t\t\t\t<div id=\"tutorial\" className=\"bg-accent scroll-mt-8 rounded-lg p-6\">\n\t\t\t\t\t\t<h2 className=\"text-h4 mb-2\">🎓 New to the Workshop App?</h2>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tWe highly recommend going through the official tutorial to learn\n\t\t\t\t\t\t\tall the features the workshop app has to offer:\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<code className=\"bg-background block rounded p-3 font-mono text-sm\">\n\t\t\t\t\t\t\tnpx epicshop add epicshop-tutorial\n\t\t\t\t\t\t</code>\n\t\t\t\t\t\t<p className=\"text-muted-foreground mt-2 text-sm\">\n\t\t\t\t\t\t\tThis will add the tutorial workshop to your setup so you can learn\n\t\t\t\t\t\t\tat your own pace.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<section id=\"logging-in\" className=\"scroll-mt-8\">\n\t\t\t\t\t\t<h2 className=\"text-h3 mb-4\">Logging In</h2>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tLogging in unlocks important features that enhance your learning\n\t\t\t\t\t\t\texperience:\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<ul className=\"list-disc space-y-2 pl-6\">\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>Progress tracking</strong> – Your progress syncs across\n\t\t\t\t\t\t\t\tdevices and persists between sessions\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>Video access</strong> – Watch premium workshop videos\n\t\t\t\t\t\t\t\t(requires a valid license)\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>Discord integration</strong> – Connect with the\n\t\t\t\t\t\t\t\tcommunity and instructors\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\n\t\t\t\t\t\t<h3 className=\"text-h5 mt-6 mb-3\">How to Log In</h3>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tClick the <strong>Account</strong> link in the navigation (top\n\t\t\t\t\t\t\tright) and follow the login prompts. You can also log in via the\n\t\t\t\t\t\t\tCLI:\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<code className=\"bg-muted mb-4 block rounded p-3 font-mono text-sm\">\n\t\t\t\t\t\t\tepicshop auth login\n\t\t\t\t\t\t</code>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tThis opens a browser window where you can authenticate with your\n\t\t\t\t\t\t\tEpicWeb.dev, EpicReact.dev, or EpicAI.pro account.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p className=\"text-muted-foreground text-sm\">\n\t\t\t\t\t\t\tTip: Log in early to start tracking your progress from the\n\t\t\t\t\t\t\tbeginning!\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</section>\n\n\t\t\t\t\t<section id=\"interleaved-practice\" className=\"scroll-mt-8\">\n\t\t\t\t\t\t<h2 className=\"text-h3 mb-4\">Interleaved Practice</h2>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tInterleaved practice mixes previously learned material with new\n\t\t\t\t\t\t\tcontent so your brain has to recall concepts instead of relying on\n\t\t\t\t\t\t\tshort-term memory. This spacing effect improves long-term\n\t\t\t\t\t\t\tretention and makes it easier to apply skills in new contexts.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tOnce you're logged in and have completed at least two exercise\n\t\t\t\t\t\t\tsteps, you'll see a <strong>Practice a past lesson</strong> button\n\t\t\t\t\t\t\tnext to <strong>Continue to next lesson</strong> in the\n\t\t\t\t\t\t\tnavigation. Click it any time to jump to a random completed step\n\t\t\t\t\t\t\tand refresh what you've learned.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<ul className=\"list-disc space-y-2 pl-6\">\n\t\t\t\t\t\t\t<li>You must be logged in.</li>\n\t\t\t\t\t\t\t<li>You need two or more completed steps.</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</section>\n\n\t\t\t\t\t<section id=\"workshop-structure\" className=\"scroll-mt-8\">\n\t\t\t\t\t\t<h2 className=\"text-h3 mb-4\">Workshop Structure</h2>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tEach workshop is a standalone project with a consistent structure:\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<ul className=\"list-disc space-y-2 pl-6\">\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>exercises/</strong> – Contains the \"problem\" and\n\t\t\t\t\t\t\t\t\"solution\" versions of each step. Treat this as a reference for\n\t\t\t\t\t\t\t\tafter the workshop.\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>playground/</strong> – This is where your work takes\n\t\t\t\t\t\t\t\tplace. We recommend opening this directory as its own editor\n\t\t\t\t\t\t\t\tinstance for efficient file searching.\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</section>\n\n\t\t\t\t\t<section id=\"lesson-page\" className=\"scroll-mt-8\">\n\t\t\t\t\t\t<h2 className=\"text-h3 mb-4\">The Lesson Page</h2>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tWhen you click into a lesson, the app displays the video along\n\t\t\t\t\t\t\twith written content, code snippets, and other useful information.\n\t\t\t\t\t\t\tTo the right is a pane with tabs:\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<ul className=\"list-disc space-y-2 pl-6\">\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>Playground</strong> – Where you'll spend most of your\n\t\t\t\t\t\t\t\ttime. You can interact with the app here or open it in a\n\t\t\t\t\t\t\t\tdedicated tab.\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>Problem</strong> – The starting point of the exercise.\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>Solution</strong> – The completed exercise state.\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>Diff</strong> – Compare your current version against the\n\t\t\t\t\t\t\t\tfinished state. Use this if you get stuck, but try to avoid it\n\t\t\t\t\t\t\t\tif possible.\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>Tests</strong> – If the exercise includes tests, they'll\n\t\t\t\t\t\t\t\tappear here to verify your work.\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</section>\n\n\t\t\t\t\t<section id=\"file-links\" className=\"scroll-mt-8\">\n\t\t\t\t\t\t<h2 className=\"text-h3 mb-4\">File Links</h2>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tAt the bottom of a lesson page, the <strong>\"Files\"</strong>{' '}\n\t\t\t\t\t\t\tbutton opens a list of relevant files for the current exercise.\n\t\t\t\t\t\t\tClicking a file opens it directly in your editor at the right\n\t\t\t\t\t\t\tlocation.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p className=\"mb-4\">Key things to know:</p>\n\t\t\t\t\t\t<ul className=\"list-disc space-y-2 pl-6\">\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\tFiles are tied to your current Playground – make sure it's set\n\t\t\t\t\t\t\t\tto the lesson you're working on.\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\tA <strong>\"+\"</strong> icon next to a filename means you need to\n\t\t\t\t\t\t\t\tcreate that file. Clicking it will create and open the file.\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\tIf you see a red \"Set to Playground\" link, click it to sync the\n\t\t\t\t\t\t\t\tplayground for the current exercise.\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\n\t\t\t\t\t\t<h3\n\t\t\t\t\t\t\tid=\"file-links-troubleshooting\"\n\t\t\t\t\t\t\tclassName=\"text-h4 mt-8 mb-4 scroll-mt-8\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tTroubleshooting\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tIf you're unable to open file links from the workshop app, create\n\t\t\t\t\t\t\ta <code className=\"bg-muted rounded px-1\">.env</code> file in the\n\t\t\t\t\t\t\troot of the workshop project and add:\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<code className=\"bg-muted mb-4 block rounded p-3 font-mono text-sm\">\n\t\t\t\t\t\t\tEPICSHOP_EDITOR=\"path/to/your/editor\"\n\t\t\t\t\t\t</code>\n\t\t\t\t\t\t<p className=\"mb-4\">Examples:</p>\n\t\t\t\t\t\t<ul className=\"list-disc space-y-2 pl-6\">\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>VS Code:</strong>{' '}\n\t\t\t\t\t\t\t\t<code className=\"bg-muted rounded px-1\">\n\t\t\t\t\t\t\t\t\tEPICSHOP_EDITOR=code\n\t\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>VS Code on Windows:</strong>{' '}\n\t\t\t\t\t\t\t\t<code className=\"bg-muted rounded px-1\">\n\t\t\t\t\t\t\t\t\tEPICSHOP_EDITOR='\"C:\\Program Files\\Microsoft VS\n\t\t\t\t\t\t\t\t\tCode\\bin\\code.cmd\"'\n\t\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>Cursor:</strong>{' '}\n\t\t\t\t\t\t\t\t<code className=\"bg-muted rounded px-1\">\n\t\t\t\t\t\t\t\t\tEPICSHOP_EDITOR=cursor\n\t\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<p className=\"text-muted-foreground mt-4 text-sm\">\n\t\t\t\t\t\t\tNote: If the path includes spaces, wrap it in quotes as shown in\n\t\t\t\t\t\t\tthe Windows example.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p className=\"mt-4\">\n\t\t\t\t\t\t\tFor Cursor/VS Code users, you can also install the 'code' command\n\t\t\t\t\t\t\tin your PATH by opening the Command Palette (⌘⇧P on Mac,\n\t\t\t\t\t\t\tCtrl+Shift+P on Windows) and searching for \"Install 'code' command\n\t\t\t\t\t\t\tin PATH\".\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</section>\n\n\t\t\t\t\t<section id=\"setting-playground\" className=\"scroll-mt-8\">\n\t\t\t\t\t\t<h2 className=\"text-h3 mb-4\">Setting the Playground</h2>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tIf you navigate to a different exercise than what's currently\n\t\t\t\t\t\t\tloaded, a red <strong>\"Set to Playground\"</strong> link will\n\t\t\t\t\t\t\tappear. Clicking this syncs the playground for the appropriate\n\t\t\t\t\t\t\texercise.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p className=\"bg-warning text-warning-foreground rounded-lg p-4\">\n\t\t\t\t\t\t\t<strong>Important:</strong> Always have your Playground set to the\n\t\t\t\t\t\t\tlesson you're working on! This is not automated because you might\n\t\t\t\t\t\t\twant to refer back to previous exercises without losing your\n\t\t\t\t\t\t\tcurrent work.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</section>\n\n\t\t\t\t\t<section id=\"diff-tab\" className=\"scroll-mt-8\">\n\t\t\t\t\t\t<h2 className=\"text-h3 mb-4\">The Diff Tab</h2>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tThe diff tab helps you get unstuck when you're totally stuck. It\n\t\t\t\t\t\t\tshows the difference between your playground and the solution.\n\t\t\t\t\t\t\tThis is especially useful for catching typos or small mistakes.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<ul className=\"list-disc space-y-2 pl-6\">\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<span className=\"text-success font-mono\">+</span> lines (green)\n\t\t\t\t\t\t\t\tshow code that needs to be added\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<span className=\"text-foreground-destructive font-mono\">-</span>{' '}\n\t\t\t\t\t\t\t\tlines (red) show code that needs to be removed\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>Unchanged lines provide context around the changes</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<p className=\"text-muted-foreground mt-4 text-sm\">\n\t\t\t\t\t\t\tTip: Try to avoid using the diff tab until you've made a solid\n\t\t\t\t\t\t\tattempt at the exercise. The learning happens in the struggle!\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</section>\n\n\t\t\t\t\t<section id=\"tests\" className=\"scroll-mt-8\">\n\t\t\t\t\t\t<h2 className=\"text-h3 mb-4\">Tests</h2>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tSome exercises include tests to verify your work. If available,\n\t\t\t\t\t\t\tthey appear in the Tests tab. Tests can run in two ways:\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<ul className=\"list-disc space-y-2 pl-6\">\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>Script-based:</strong> A button runs the test script and\n\t\t\t\t\t\t\t\tstreams the output\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>Browser-based:</strong> Test files are compiled and run\n\t\t\t\t\t\t\t\tdirectly in the browser\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<p className=\"mt-4\">\n\t\t\t\t\t\t\tLook for 🚨 <strong>Alfred the Alert</strong> in test failures for\n\t\t\t\t\t\t\thelpful explanations about what went wrong.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</section>\n\n\t\t\t\t\t<section id=\"keyboard-shortcuts\" className=\"scroll-mt-8\">\n\t\t\t\t\t\t<h2 className=\"text-h3 mb-4\">Keyboard Shortcuts</h2>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tWhen the workshop server is running in your terminal, you can use\n\t\t\t\t\t\t\tthese keyboard shortcuts:\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<ul className=\"list-disc space-y-2 pl-6\">\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<kbd className=\"bg-muted rounded px-2 py-1 font-mono text-sm\">\n\t\t\t\t\t\t\t\t\tu\n\t\t\t\t\t\t\t\t</kbd>{' '}\n\t\t\t\t\t\t\t\t– Check for and apply updates to the workshop\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<kbd className=\"bg-muted rounded px-2 py-1 font-mono text-sm\">\n\t\t\t\t\t\t\t\t\td\n\t\t\t\t\t\t\t\t</kbd>{' '}\n\t\t\t\t\t\t\t\t– Dismiss update notifications\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<p className=\"text-muted-foreground mt-4 text-sm\">\n\t\t\t\t\t\t\tThe server automatically restarts after updates are applied.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</section>\n\n\t\t\t\t\t<section id=\"cli-commands\" className=\"scroll-mt-8\">\n\t\t\t\t\t\t<h2 className=\"text-h3 mb-4\">CLI Commands</h2>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tThe <code className=\"bg-muted rounded px-1\">epicshop</code> CLI\n\t\t\t\t\t\t\tprovides useful commands for managing your workshop:\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<code className=\"bg-muted block rounded p-3 font-mono text-sm\">\n\t\t\t\t\t\t\t\t\tepicshop start\n\t\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t\t<p className=\"text-muted-foreground mt-1 text-sm\">\n\t\t\t\t\t\t\t\t\tStart the workshop (or just run{' '}\n\t\t\t\t\t\t\t\t\t<code className=\"bg-muted rounded px-1\">npm start</code>)\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<code className=\"bg-muted block rounded p-3 font-mono text-sm\">\n\t\t\t\t\t\t\t\t\tepicshop playground set\n\t\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t\t<p className=\"text-muted-foreground mt-1 text-sm\">\n\t\t\t\t\t\t\t\t\tSet the playground to the next incomplete step\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<code className=\"bg-muted block rounded p-3 font-mono text-sm\">\n\t\t\t\t\t\t\t\t\tepicshop diff\n\t\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t\t<p className=\"text-muted-foreground mt-1 text-sm\">\n\t\t\t\t\t\t\t\t\tShow the diff between your playground and the solution in the\n\t\t\t\t\t\t\t\t\tterminal\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<code className=\"bg-muted block rounded p-3 font-mono text-sm\">\n\t\t\t\t\t\t\t\t\tepicshop progress\n\t\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t\t<p className=\"text-muted-foreground mt-1 text-sm\">\n\t\t\t\t\t\t\t\t\tView your progress through the workshop\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<code className=\"bg-muted block rounded p-3 font-mono text-sm\">\n\t\t\t\t\t\t\t\t\tepicshop exercises\n\t\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t\t<p className=\"text-muted-foreground mt-1 text-sm\">\n\t\t\t\t\t\t\t\t\tList all exercises with completion status\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<p className=\"mt-4\">\n\t\t\t\t\t\t\tRun <code className=\"bg-muted rounded px-1\">epicshop --help</code>{' '}\n\t\t\t\t\t\t\tto see all available commands.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</section>\n\n\t\t\t\t\t<section id=\"ai-assistant\" className=\"scroll-mt-8\">\n\t\t\t\t\t\t<h2 className=\"text-h3 mb-4\">AI Assistant (MCP)</h2>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tIf you use an AI assistant that supports{' '}\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref=\"https://modelcontextprotocol.io/\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\tclassName=\"underline\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tMCP (Model Context Protocol)\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t, you can install the Epic Workshop MCP server to enhance your\n\t\t\t\t\t\t\tlearning experience.\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<h3 className=\"text-h5 mt-6 mb-3\">What it provides</h3>\n\t\t\t\t\t\t<ul className=\"list-disc space-y-2 pl-6\">\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>Exercise context:</strong> Your AI can understand what\n\t\t\t\t\t\t\t\tyou're working on and provide relevant help\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>Progress tracking:</strong> Mark lessons complete\n\t\t\t\t\t\t\t\tdirectly through your AI\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>Diff viewing:</strong> Ask your AI to show you what\n\t\t\t\t\t\t\t\tchanges are needed\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>File opening:</strong> Have your AI open the relevant\n\t\t\t\t\t\t\t\tfiles in your editor\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>Quiz mode:</strong> Ask your AI to quiz you on workshop\n\t\t\t\t\t\t\t\ttopics\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\n\t\t\t\t\t\t<h3 className=\"text-h5 mt-6 mb-3\">Installation</h3>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tAdd the following to your AI assistant's MCP configuration (e.g.,\n\t\t\t\t\t\t\tClaude Desktop):\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<pre className=\"bg-muted overflow-x-auto rounded p-4 font-mono text-sm\">\n\t\t\t\t\t\t\t{`{\n \"mcpServers\": {\n \"epicshop\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@epic-web/workshop-mcp\"]\n }\n }\n}`}\n\t\t\t\t\t\t</pre>\n\t\t\t\t\t\t<p className=\"text-muted-foreground mt-4 text-sm\">\n\t\t\t\t\t\t\tMake sure to run your AI assistant from within the workshop\n\t\t\t\t\t\t\tdirectory so the MCP server can find the right files.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</section>\n\n\t\t\t\t\t<section id=\"emoji-key\" className=\"scroll-mt-8\">\n\t\t\t\t\t\t<h2 className=\"text-h3 mb-4\">Emoji Key</h2>\n\t\t\t\t\t\t<p className=\"mb-4\">\n\t\t\t\t\t\t\tEach exercise has comments with helpful emoji characters:\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<ul className=\"space-y-2 pl-6\">\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>👨💼 Peter the Product Manager</strong> – Helps you know\n\t\t\t\t\t\t\t\twhat users want\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>🧝♀️ Kellie the Co-worker</strong> – Your co-worker who\n\t\t\t\t\t\t\t\tsometimes does work ahead of your exercises\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>🐨 Kody the Koala</strong> – Tells you when there's\n\t\t\t\t\t\t\t\tsomething specific to do\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>🦺 Lily the Life Jacket</strong> – Helps with\n\t\t\t\t\t\t\t\tTypeScript-specific parts\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>💰 Marty the Money Bag</strong> – Gives specific tips\n\t\t\t\t\t\t\t\tand sometimes code\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>📝 Nancy the Notepad</strong> – Encourages you to take\n\t\t\t\t\t\t\t\tnotes\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>🦉 Olivia the Owl</strong> – Gives useful tidbits and\n\t\t\t\t\t\t\t\tbest practices\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>📜 Dominic the Document</strong> – Links to useful\n\t\t\t\t\t\t\t\tdocumentation\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>💣 Barry the Bomb</strong> – Indicates code to delete\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>💪 Matthew the Muscle</strong> – Indicates you're\n\t\t\t\t\t\t\t\tworking with an exercise\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>🏁 Chuck the Checkered Flag</strong> – Indicates a final\n\t\t\t\t\t\t\t\tstep\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<strong>🚨 Alfred the Alert</strong> – Shows up in test failures\n\t\t\t\t\t\t\t\twith explanations\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</section>\n\n\t\t\t\t\t<section id=\"need-help\" className=\"scroll-mt-8\">\n\t\t\t\t\t\t<h2 className=\"text-h3 mb-4\">Need More Help?</h2>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\tVisit our{' '}\n\t\t\t\t\t\t\t<Link to=\"/support\" className=\"underline\">\n\t\t\t\t\t\t\t\tSupport page\n\t\t\t\t\t\t\t</Link>{' '}\n\t\t\t\t\t\t\tfor additional help options, including Discord access and how to\n\t\t\t\t\t\t\treport issues.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</section>\n\t\t\t\t</main>\n\t\t\t\t<aside className=\"hidden w-48 shrink-0 lg:block\">\n\t\t\t\t\t<TableOfContents activeSection={activeSection} />\n\t\t\t\t</aside>\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n"],"names":["handle","getSitemapEntries","route","sections","id","label","TableOfContents","activeSection","jsxs","className","children","jsx","map","section","href","guide","_UNSAFE_withComponentProps","setActiveSection","React","observer","IntersectionObserver","entries","entry","isIntersecting","target","rootMargin","threshold","element","document","getElementById","observe","disconnect","rel","Link","to"],"mappings":"yIAIO,MAAMA,EAAoB,CAChCC,kBAAmBA,IAAM,CAAC,CAAEC,MAAO,SAAU,CAC9C,EAEMC,EAAW,CAChB,CAAEC,GAAI,WAAYC,M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{E as c}from"./epic-video-
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{w as l,a as m,L as n}from"./chunk-EPOLDU6W-BCLmut3y.js";import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{E as a}from"./index-CEVyDj51.js";import{E as c}from"./epic-video-Ca_s42j5.js";import{G as p}from"./error-boundary-DVp6wKiz.js";import{E as d}from"./launch-editor-D2exGfVu.js";import{M as x}from"./mdx-BGwe7vvs.js";import{c as f}from"./misc-W4055b-0.js";import{P as h,u}from"./progress-ILaVQtOO.js";import"./index-CqIc3cxq.js";import"./use-event-source-BuD4_2SF.js";import"./index-DzdDahau.js";import"./index-vDCSPjrM.js";import"./index-CdzVFL-Z.js";import"./tooltip-Tlsyx2YO.js";import"./root-loader-BOzEMapJ.js";import"./pe-CIZUOJMr.js";import"./schemas-Uj5SZtvt.js";import"./online-DiNLkgTC.js";import"./loading-CDNzW5oO.js";import"./user-BsPobzjB.js";import"./workshop-config-Zfc8zU0x.js";import"./preload-helper-BXl3LOEh.js";import"./progress-bar-DpWhcyhC.js";function b({index:o,exercise:r}){const s=u(r.exerciseNumber);return e.jsx("li",{children:e.jsxs(n,{className:f("hover:bg-muted/60 relative flex items-center gap-4 px-4 py-3 text-lg font-semibold transition after:absolute after:right-10 after:-translate-x-2 after:opacity-0 after:transition after:content-['→'] hover:after:translate-x-0 hover:after:opacity-100",s),to:`${r.exerciseNumber.toString().padStart(2,"0")}`,"data-keyboard-action":o===0?"g+n":void 0,children:[e.jsx("span",{className:"text-xs font-normal tabular-nums opacity-50",children:r.exerciseNumber}),e.jsx("span",{children:r.title})]})},r.exerciseNumber)}const j={h1:()=>null},q=l(function({loaderData:r}){const s=e.jsxs("ul",{className:"divide-border dark:divide-border/50 flex flex-col divide-y",children:[e.jsx("strong",{className:"px-10 pb-3 font-mono text-xs uppercase",children:"Exercises"}),r.exercises.map((t,i)=>e.jsx(b,{index:i,exercise:t},t.exerciseNumber))]});return e.jsxs("main",{className:"relative flex h-full w-full max-w-5xl flex-col justify-between border-r md:w-3/4 xl:w-2/3",children:[e.jsxs("article",{id:r.articleId,className:"shadow-on-scrollbox scrollbar-thin scrollbar-thumb-scrollbar flex w-full flex-1 flex-col gap-12 overflow-y-scroll px-3 py-4 pt-6 md:px-10 md:py-12 md:pt-16",children:[e.jsx("div",{children:e.jsx("h1",{className:"px-10 text-[clamp(3rem,6vw,7.5rem)] leading-none font-extrabold",children:r.title})}),e.jsxs("div",{className:"w-full max-w-none scroll-pt-6 border-t px-3 pt-3 md:px-10 md:pt-8",children:[e.jsx("h2",{className:"pb-5 font-mono text-xs font-semibold uppercase",children:"Intro"}),r.workshopReadme.compiled.status==="success"&&r.workshopReadme.compiled.code?e.jsx(c,{epicVideoInfosPromise:r.epicVideoInfosPromise,children:e.jsx("div",{className:"prose dark:prose-invert sm:prose-lg",children:e.jsx(x,{code:r.workshopReadme.compiled.code,components:j})})}):r.workshopReadme.compiled.status==="error"?e.jsxs("div",{className:"text-foreground-destructive",children:["There was an error:",e.jsx("pre",{children:r.workshopReadme.compiled.error})]}):"No instructions yet..."]}),e.jsx("div",{className:"pt-10 pb-5",children:r.workshopReadme.compiled.status==="success"&&r.workshopReadme.compiled.code&&r.workshopReadme.compiled.code.length>500?s:null})]}),e.jsx(a,{elementQuery:`#${r.articleId}`}),e.jsx(h,{type:"workshop-instructions",className:"h-14 border-t px-6"}),e.jsx("div",{className:"@container flex h-16 justify-center border-t",children:e.jsx(d,{file:r.workshopReadme.file,relativePath:r.workshopReadme.relativePath})})]})}),z=m(function(){return e.jsx(p,{})});export{z as ErrorBoundary,q as default};
|
|
2
|
+
//# sourceMappingURL=index-BHfJ4hna.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-BHfJ4hna.js","sources":["../../../app/routes/_app+/index.tsx"],"sourcesContent":["import { ElementScrollRestoration } from '@epic-web/restore-scroll'\nimport {\n\tgetExercises,\n\tgetWorkshopInstructions,\n} from '@epic-web/workshop-utils/apps.server'\nimport { getWorkshopConfig } from '@epic-web/workshop-utils/config.server'\nimport { getEpicVideoInfos } from '@epic-web/workshop-utils/epic-api.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n\ttime,\n} from '@epic-web/workshop-utils/timing.server'\nimport slugify from '@sindresorhus/slugify'\nimport { data, type HeadersFunction, Link } from 'react-router'\nimport { EpicVideoInfoProvider } from '#app/components/epic-video.tsx'\nimport { GeneralErrorBoundary } from '#app/components/error-boundary.tsx'\nimport { EditFileOnGitHub } from '#app/routes/launch-editor.tsx'\nimport { Mdx } from '#app/utils/mdx.tsx'\nimport { cn } from '#app/utils/misc.tsx'\nimport { ProgressToggle, useExerciseProgressClassName } from '../progress.tsx'\nimport { type Route } from './+types/index.tsx'\n\nexport async function loader({ request }: Route.LoaderArgs) {\n\tconst timings = makeTimings('indexLoader')\n\tconst { title } = getWorkshopConfig()\n\tconst [exercises, workshopReadme] = await Promise.all([\n\t\ttime(() => getExercises({ request, timings }), {\n\t\t\ttimings,\n\t\t\ttype: 'getExercises',\n\t\t\tdesc: 'getExercises in index',\n\t\t}),\n\t\ttime(() => getWorkshopInstructions({ request }), {\n\t\t\ttimings,\n\t\t\ttype: 'compileMdx',\n\t\t\tdesc: 'compileMdx in index',\n\t\t}),\n\t])\n\n\treturn data(\n\t\t{\n\t\t\tarticleId: `workshop-${slugify(title)}-instructions`,\n\t\t\ttitle:\n\t\t\t\tworkshopReadme.compiled.status === 'success'\n\t\t\t\t\t? workshopReadme.compiled.title\n\t\t\t\t\t: title,\n\t\t\texercises: exercises.map((e) => ({\n\t\t\t\texerciseNumber: e.exerciseNumber,\n\t\t\t\ttitle: e.title,\n\t\t\t})),\n\t\t\tworkshopReadme,\n\t\t\tepicVideoInfosPromise:\n\t\t\t\tworkshopReadme.compiled.status === 'success'\n\t\t\t\t\t? getEpicVideoInfos(workshopReadme.compiled.epicVideoEmbeds, {\n\t\t\t\t\t\t\trequest,\n\t\t\t\t\t\t})\n\t\t\t\t\t: null,\n\t\t},\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'Server-Timing': getServerTimeHeader(timings),\n\t\t\t},\n\t\t},\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {\n\tconst headers = {\n\t\t'Cache-Control': loaderHeaders.get('Cache-Control') ?? '',\n\t\t'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nfunction ExerciseListItem({\n\tindex,\n\texercise,\n}: {\n\tindex: number\n\texercise: Awaited<Route.ComponentProps['loaderData']>['exercises'][number]\n}) {\n\tconst progressClassName = useExerciseProgressClassName(\n\t\texercise.exerciseNumber,\n\t)\n\treturn (\n\t\t<li key={exercise.exerciseNumber}>\n\t\t\t<Link\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"hover:bg-muted/60 relative flex items-center gap-4 px-4 py-3 text-lg font-semibold transition after:absolute after:right-10 after:-translate-x-2 after:opacity-0 after:transition after:content-['→'] hover:after:translate-x-0 hover:after:opacity-100\",\n\t\t\t\t\tprogressClassName,\n\t\t\t\t)}\n\t\t\t\tto={`${exercise.exerciseNumber.toString().padStart(2, '0')}`}\n\t\t\t\tdata-keyboard-action={index === 0 ? 'g+n' : undefined}\n\t\t\t>\n\t\t\t\t<span className=\"text-xs font-normal tabular-nums opacity-50\">\n\t\t\t\t\t{exercise.exerciseNumber}\n\t\t\t\t</span>\n\t\t\t\t<span>{exercise.title}</span>\n\t\t\t</Link>\n\t\t</li>\n\t)\n}\n\nconst mdxComponents = { h1: () => null }\n\nexport default function Index({ loaderData: data }: Route.ComponentProps) {\n\tconst exerciseLinks = (\n\t\t<ul className=\"divide-border dark:divide-border/50 flex flex-col divide-y\">\n\t\t\t<strong className=\"px-10 pb-3 font-mono text-xs uppercase\">\n\t\t\t\tExercises\n\t\t\t</strong>\n\t\t\t{data.exercises.map((exercise, index) => (\n\t\t\t\t<ExerciseListItem\n\t\t\t\t\tkey={exercise.exerciseNumber}\n\t\t\t\t\tindex={index}\n\t\t\t\t\texercise={exercise}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</ul>\n\t)\n\treturn (\n\t\t<main className=\"relative flex h-full w-full max-w-5xl flex-col justify-between border-r md:w-3/4 xl:w-2/3\">\n\t\t\t<article\n\t\t\t\tid={data.articleId}\n\t\t\t\tclassName=\"shadow-on-scrollbox scrollbar-thin scrollbar-thumb-scrollbar flex w-full flex-1 flex-col gap-12 overflow-y-scroll px-3 py-4 pt-6 md:px-10 md:py-12 md:pt-16\"\n\t\t\t>\n\t\t\t\t<div>\n\t\t\t\t\t<h1 className=\"px-10 text-[clamp(3rem,6vw,7.5rem)] leading-none font-extrabold\">\n\t\t\t\t\t\t{data.title}\n\t\t\t\t\t</h1>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"w-full max-w-none scroll-pt-6 border-t px-3 pt-3 md:px-10 md:pt-8\">\n\t\t\t\t\t<h2 className=\"pb-5 font-mono text-xs font-semibold uppercase\">\n\t\t\t\t\t\tIntro\n\t\t\t\t\t</h2>\n\t\t\t\t\t{data.workshopReadme.compiled.status === 'success' &&\n\t\t\t\t\tdata.workshopReadme.compiled.code ? (\n\t\t\t\t\t\t<EpicVideoInfoProvider\n\t\t\t\t\t\t\tepicVideoInfosPromise={data.epicVideoInfosPromise}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"prose dark:prose-invert sm:prose-lg\">\n\t\t\t\t\t\t\t\t<Mdx\n\t\t\t\t\t\t\t\t\tcode={data.workshopReadme.compiled.code}\n\t\t\t\t\t\t\t\t\tcomponents={mdxComponents}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</EpicVideoInfoProvider>\n\t\t\t\t\t) : data.workshopReadme.compiled.status === 'error' ? (\n\t\t\t\t\t\t<div className=\"text-foreground-destructive\">\n\t\t\t\t\t\t\tThere was an error:\n\t\t\t\t\t\t\t<pre>{data.workshopReadme.compiled.error}</pre>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t'No instructions yet...'\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"pt-10 pb-5\">\n\t\t\t\t\t{data.workshopReadme.compiled.status === 'success' &&\n\t\t\t\t\tdata.workshopReadme.compiled.code &&\n\t\t\t\t\tdata.workshopReadme.compiled.code.length > 500\n\t\t\t\t\t\t? exerciseLinks\n\t\t\t\t\t\t: null}\n\t\t\t\t</div>\n\t\t\t</article>\n\t\t\t<ElementScrollRestoration elementQuery={`#${data.articleId}`} />\n\t\t\t<ProgressToggle\n\t\t\t\ttype=\"workshop-instructions\"\n\t\t\t\tclassName=\"h-14 border-t px-6\"\n\t\t\t/>\n\t\t\t<div className=\"@container flex h-16 justify-center border-t\">\n\t\t\t\t<EditFileOnGitHub\n\t\t\t\t\tfile={data.workshopReadme.file}\n\t\t\t\t\trelativePath={data.workshopReadme.relativePath}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</main>\n\t)\n}\n\nexport function ErrorBoundary() {\n\treturn <GeneralErrorBoundary />\n}\n"],"names":["ExerciseListItem","index","exercise","progressClassName","useExerciseProgressClassName","exerciseNumber","children","jsxs","Link","className","cn","to","toString","padStart","jsx","title","mdxComponents","h1","_UNSAFE_withComponentProps","loaderData","data","exerciseLinks","exercises","map","id","articleId","workshopReadme","compiled","status","code","EpicVideoInfoProvider","epicVideoInfosPromise","Mdx","components","error","length","ElementScrollRestoration","elementQuery","ProgressToggle","type","EditFileOnGitHub","file","relativePath","ErrorBoundary","_UNSAFE_withErrorBoundaryProps","GeneralErrorBoundary"],"mappings":"+2BA0EA,SAASA,EAAiB,CACzBC,MAAAA,EACAC,SAAAA,CACD,EAGG,CACF,MAAMC,EAAoBC,EACzBF,EAASG,cACV,EACA,aACE,KAAA,CACAC,SAAAC,EAAAA,KAACC,EAAA,CACAC,UAAWC,EACV,0PACAP,CACD,EACAQ,GAAI,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eC,SAASE,KACnCI,WAAYjB,EACb,EACD,CAAA,CACD,EACGI,EAAKM,eAAeC,SAASC,SAAW,QAC3CrB,EAAAA,KAAC,MAAA,CAAIE,UAAU,8BAA8BH,SAAA,CAAA,4BAE3C,MAAA,CAAKA,SAAAc,EAAKM,eAAeC,SAASO,KAAA,CAAM,CAAA,EAC1C,EAEA,wBAAA,CAAA,CAEF,EACApB,EAAAA,IAAC,OAAIL,UAAU,aACbH,SAAAc,EAAKM,eAAeC,SAASC,SAAW,WACzCR,EAAKM,eAAeC,SAASE,MAC7BT,EAAKM,eAAeC,SAASE,KAAKM,OAAS,IACxCd,EACA,IAAA,CACJ,CAAA,CAAA,CACD,QACCe,EAAA,CAAyBC,aAAc,IAAIjB,EAAKK,SAAS,EAAA,CAAI,EAC9DX,EAAAA,IAACwB,EAAA,CACAC,KAAK,wBACL9B,UAAU,oBAAA,CACX,EACAK,EAAAA,IAAC,MAAA,CAAIL,UAAU,+CACdH,SAAAQ,EAAAA,IAAC0B,EAAA,CACAC,KAAMrB,EAAKM,eAAee,KAC1BC,aAActB,EAAKM,eAAegB,aACnC,CAAA,CACD,CAAA,CAAA,CACD,CAEF,CAAA,EAEOC,EAAAC,EAAA,UAAyB,CAC/B,aAAQC,EAAA,EAAqB,CAC9B,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{w as j,a as E,c as A,d as C,e as N}from"./chunk-EPOLDU6W-BCLmut3y.js";import{j as r}from"./jsx-runtime-C5WNSv3b.js";import{g as T,R as H,P as U,C as t,a as b,D as B}from"./playground-DmEAkxG1.js";import{U as I}from"./diff-
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{w as j,a as E,c as A,d as C,e as N}from"./chunk-EPOLDU6W-BCLmut3y.js";import{j as r}from"./jsx-runtime-C5WNSv3b.js";import{g as T,R as H,P as U,C as t,a as b,D as B}from"./playground-DmEAkxG1.js";import{U as I}from"./diff-DrdM1MAZ.js";import{G as R}from"./error-boundary-DVp6wKiz.js";import{u as S}from"./workshop-config-Zfc8zU0x.js";import{u as O}from"./misc-W4055b-0.js";import{P as a}from"./preview-fhmjENlm.js";import{T as k}from"./tests-DlDV-wXQ.js";import"./index-CqIc3cxq.js";import"./loading-CDNzW5oO.js";import"./index-CdzVFL-Z.js";import"./tooltip-Tlsyx2YO.js";import"./index-vDCSPjrM.js";import"./root-loader-BOzEMapJ.js";import"./pe-CIZUOJMr.js";import"./schemas-Uj5SZtvt.js";import"./discord-BJkw0IrB.js";import"./user-BsPobzjB.js";import"./online-DiNLkgTC.js";import"./index-CJDOQ1bl.js";import"./index-ynYvVAOK.js";import"./status-indicator-C6DiLYL5.js";import"./index-DzdDahau.js";import"./set-playground-BSGwH9dH.js";import"./button-Cd-ekki5.js";import"./onboarding-indicator-B-XR90_G.js";import"./progress-bar-DpWhcyhC.js";import"./dialog-CzO65Z5w.js";import"./playground-window-x2mQ5o1O.js";import"./accordion-CQ7oujC6.js";import"./mdx-BGwe7vvs.js";import"./epic-video-Ca_s42j5.js";import"./use-event-source-BuD4_2SF.js";import"./preload-helper-BXl3LOEh.js";import"./launch-editor-D2exGfVu.js";import"./revalidation-ws-BJWJviUX.js";const l=["playground","problem","solution","tests","diff","chat"],L=n=>!!(n&&l.includes(n)),Ps=j(function({loaderData:e}){const{inBrowserBrowserRef:p}=A(),d=S(),[u]=C(),f=u.get("preview"),h=O(),x=N();function m(s){if(s==="tests")return ENV.EPICSHOP_DEPLOYED||!e.playground||e.playground.test.type==="none";if(s==="problem"||s==="solution"){if(e[s]?.dev.type==="none")return!0;if(ENV.EPICSHOP_DEPLOYED){const i=e[s]?.dev.type;return i!=="browser"&&i!=="export"&&!e[s]?.stackBlitzUrl}}return s==="playground"&&ENV.EPICSHOP_DEPLOYED?!0:s==="chat"?!d.product.discordChannelId:!1}function w(s){if(s==="tests"){if(!e.playground)return null;const{isTestRunning:i,testExitCode:o}=e.playground;return i?"running":o===0?"passed":o!==null&&o!==0?"failed":null}return(s==="problem"||s==="solution"||s==="playground")&&(s==="playground"?e.playground:e[s])?.isRunning?"running":null}const y=L(f)?f:l.find(s=>!m(s)),c=`/diff?${new URLSearchParams({app1:e.problem?.name??"",app2:e.solution?.name??""})}`;function g(s){s.altKey&&!s.ctrlKey&&!s.shiftKey&&!s.metaKey&&(s.preventDefault(),x(c))}const v=l.map(s=>{const i=m(s),o=w(s),P=s==="diff"&&h?c:`?${T(u,s,"playground")}`;return{id:s,label:s,hidden:i,status:o,to:P,onClick:s==="diff"?g:void 0}});return r.jsxs(H,{className:"relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden sm:col-span-1 sm:row-span-1",value:y,children:[r.jsx(U,{tabs:v}),r.jsxs("div",{className:"relative z-10 flex min-h-0 flex-1 flex-col overflow-hidden",children:[r.jsx(t,{value:"playground",className:"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start",forceMount:!0,children:r.jsx(b,{appInfo:e.playground,problemAppName:e.problem?.name,inBrowserBrowserRef:p,allApps:e.allApps,isUpToDate:e.playground?.isUpToDate??!1})}),r.jsx(t,{value:"problem",className:"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start",forceMount:!0,children:r.jsx(a,{appInfo:e.problem,inBrowserBrowserRef:p})}),r.jsx(t,{value:"solution",className:"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start",forceMount:!0,children:r.jsx(a,{appInfo:e.solution,inBrowserBrowserRef:p})}),r.jsx(t,{value:"tests",className:"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start overflow-hidden",children:r.jsx(k,{appInfo:e.playground,problemAppName:e.problem?.name,allApps:e.allApps,isUpToDate:e.playground?.isUpToDate??!1,userHasAccessPromise:e.userHasAccessPromise})}),r.jsx(t,{value:"diff",className:"radix-state-inactive:hidden flex h-full min-h-0 w-full grow basis-0 items-stretch justify-center self-start",children:r.jsx(I,{diff:e.diff,allApps:e.allApps,userHasAccessPromise:e.userHasAccessPromise})}),r.jsx(t,{value:"chat",className:"radix-state-inactive:hidden flex h-full min-h-0 w-full grow basis-0 items-stretch justify-center self-start",children:r.jsx(B,{discordPostsPromise:e.discordPostsPromise})})]})]})}),js=E(function(){return r.jsx(R,{statusHandlers:{404:()=>r.jsx("p",{children:"Sorry, we couldn't find an app here."})}})});export{js as ErrorBoundary,Ps as default};
|
|
2
|
+
//# sourceMappingURL=index-BRVfMMSd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-hhQHCvb9.js","sources":["../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/index.tsx"],"sourcesContent":["import {\n\tgetAppByName,\n\tgetAppDisplayName,\n\tgetApps,\n\tgetExerciseApp,\n\tisExerciseStepApp,\n\tisPlaygroundApp,\n\trequireExerciseApp,\n\ttype App,\n\ttype ExerciseStepApp,\n} from '@epic-web/workshop-utils/apps.server'\nimport { getDiffCode } from '@epic-web/workshop-utils/diff.server'\nimport { userHasAccessToExerciseStep } from '@epic-web/workshop-utils/epic-api.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n} from '@epic-web/workshop-utils/timing.server'\nimport * as Tabs from '@radix-ui/react-tabs'\nimport * as React from 'react'\nimport {\n\tuseNavigate,\n\tuseSearchParams,\n\tdata,\n\tredirect,\n\ttype HeadersFunction,\n\ttype LoaderFunctionArgs,\n\tuseOutletContext,\n} from 'react-router'\nimport { Diff } from '#app/components/diff.tsx'\nimport { DiscordChat } from '#app/components/discord-chat.tsx'\nimport { GeneralErrorBoundary } from '#app/components/error-boundary.tsx'\nimport { type InBrowserBrowserRef } from '#app/components/in-browser-browser.tsx'\nimport {\n\tgetPreviewSearchParams,\n\tPreviewTabsList,\n} from '#app/components/preview-tabs.tsx'\nimport { useWorkshopConfig } from '#app/components/workshop-config.tsx'\nimport { fetchDiscordPosts } from '#app/utils/discord.server.ts'\nimport { useAltDown } from '#app/utils/misc.tsx'\nimport { type Route } from './+types/index.ts'\nimport { Playground } from './__shared/playground.tsx'\nimport { Preview } from './__shared/preview.tsx'\nimport { Tests } from './__shared/tests.tsx'\nimport { getAppRunningState, getTestState } from './__shared/utils.tsx'\n\nexport async function loader({ request, params }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('exerciseStepTypeIndexLoader')\n\tconst searchParams = new URL(request.url).searchParams\n\tconst cacheOptions = { request, timings }\n\n\tconst [exerciseStepApp, allAppsFull, problemApp, solutionApp] =\n\t\tawait Promise.all([\n\t\t\trequireExerciseApp(params, cacheOptions),\n\t\t\tgetApps(cacheOptions),\n\t\t\tgetExerciseApp({ ...params, type: 'problem' }, cacheOptions),\n\t\t\tgetExerciseApp({ ...params, type: 'solution' }, cacheOptions),\n\t\t])\n\n\tconst playgroundApp = allAppsFull.find(isPlaygroundApp)\n\tconst reqUrl = new URL(request.url)\n\n\tconst pathnameParam = reqUrl.searchParams.get('pathname')\n\tif (pathnameParam === '' || pathnameParam === '/') {\n\t\treqUrl.searchParams.delete('pathname')\n\t\tthrow redirect(reqUrl.toString())\n\t}\n\n\tconst app1Name = reqUrl.searchParams.get('app1')\n\tconst app2Name = reqUrl.searchParams.get('app2')\n\tconst app1 = app1Name\n\t\t? await getAppByName(app1Name)\n\t\t: playgroundApp || problemApp\n\tconst app2 = app2Name ? await getAppByName(app2Name) : solutionApp\n\n\tfunction getStepId(a: ExerciseStepApp) {\n\t\treturn (\n\t\t\ta.exerciseNumber * 1000 +\n\t\t\ta.stepNumber * 10 +\n\t\t\t(a.type === 'problem' ? 0 : 1)\n\t\t)\n\t}\n\n\tfunction getStepNameAndId(a: App) {\n\t\tif (isExerciseStepApp(a)) {\n\t\t\tconst exerciseNumberStr = String(a.exerciseNumber).padStart(2, '0')\n\t\t\tconst stepNumberStr = String(a.stepNumber).padStart(2, '0')\n\n\t\t\treturn {\n\t\t\t\tstepName: `${exerciseNumberStr}/${stepNumberStr}.${a.type}`,\n\t\t\t\tstepId: getStepId(a),\n\t\t\t}\n\t\t}\n\t\treturn { stepName: '', stepId: -1 }\n\t}\n\n\tconst allApps = allAppsFull\n\t\t.filter((a, i, ar) => ar.findIndex((b) => a.name === b.name) === i)\n\t\t.map((a) => ({\n\t\t\tdisplayName: getAppDisplayName(a, allAppsFull),\n\t\t\tname: a.name,\n\t\t\ttitle: a.title,\n\t\t\ttype: a.type,\n\t\t\t...getStepNameAndId(a),\n\t\t}))\n\n\tallApps.sort((a, b) => {\n\t\t// order them by their stepId\n\t\tif (a.stepId > 0 && b.stepId > 0) return a.stepId - b.stepId\n\n\t\t// non-step apps should come after step apps\n\t\tif (a.stepId > 0) return -1\n\t\tif (b.stepId > 0) return 1\n\n\t\treturn 0\n\t})\n\n\tasync function getDiffProp() {\n\t\tif (!app1 || !app2) {\n\t\t\treturn {\n\t\t\t\tapp1: app1?.name,\n\t\t\t\tapp2: app2?.name,\n\t\t\t\tdiffCode: null,\n\t\t\t}\n\t\t}\n\t\tconst diffCode = await getDiffCode(app1, app2, {\n\t\t\t...cacheOptions,\n\t\t\tforceFresh: searchParams.get('forceFresh') === 'diff',\n\t\t}).catch((e) => {\n\t\t\tconsole.error(e)\n\t\t\treturn null\n\t\t})\n\t\treturn {\n\t\t\tapp1: app1.name,\n\t\t\tapp2: app2.name,\n\t\t\tdiffCode,\n\t\t}\n\t}\n\n\treturn data(\n\t\t{\n\t\t\ttype: params.type as 'problem' | 'solution',\n\t\t\texerciseStepApp,\n\t\t\tallApps,\n\t\t\t// defer this promise so that we don't block the response from being sent\n\t\t\tdiscordPostsPromise: fetchDiscordPosts({ request }),\n\t\t\tuserHasAccessPromise: userHasAccessToExerciseStep({\n\t\t\t\texerciseNumber: Number(params.exerciseNumber),\n\t\t\t\tstepNumber: Number(params.stepNumber),\n\t\t\t\trequest,\n\t\t\t\ttimings,\n\t\t\t}),\n\t\t\tplayground: playgroundApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'playground',\n\t\t\t\t\t\tfullPath: playgroundApp.fullPath,\n\t\t\t\t\t\tdev: playgroundApp.dev,\n\t\t\t\t\t\ttest: playgroundApp.test,\n\t\t\t\t\t\ttitle: playgroundApp.title,\n\t\t\t\t\t\tname: playgroundApp.name,\n\t\t\t\t\t\tappName: playgroundApp.appName,\n\t\t\t\t\t\tisUpToDate: playgroundApp.isUpToDate,\n\t\t\t\t\t\tstackBlitzUrl: playgroundApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(playgroundApp)),\n\t\t\t\t\t\t...getTestState(playgroundApp),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tproblem: problemApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'problem',\n\t\t\t\t\t\tfullPath: problemApp.fullPath,\n\t\t\t\t\t\tdev: problemApp.dev,\n\t\t\t\t\t\ttest: problemApp.test,\n\t\t\t\t\t\ttitle: problemApp.title,\n\t\t\t\t\t\tname: problemApp.name,\n\t\t\t\t\t\tstackBlitzUrl: problemApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(problemApp)),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tsolution: solutionApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'solution',\n\t\t\t\t\t\tfullPath: solutionApp.fullPath,\n\t\t\t\t\t\tdev: solutionApp.dev,\n\t\t\t\t\t\ttest: solutionApp.test,\n\t\t\t\t\t\ttitle: solutionApp.title,\n\t\t\t\t\t\tname: solutionApp.name,\n\t\t\t\t\t\tstackBlitzUrl: solutionApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(solutionApp)),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tdiff: getDiffProp(),\n\t\t} as const,\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'Server-Timing': getServerTimeHeader(timings),\n\t\t\t},\n\t\t},\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {\n\tconst headers = {\n\t\t'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nconst tabs = [\n\t'playground',\n\t'problem',\n\t'solution',\n\t'tests',\n\t'diff',\n\t'chat',\n] as const\nconst isValidPreview = (s: string | null): s is (typeof tabs)[number] =>\n\tBoolean(s && tabs.includes(s as (typeof tabs)[number]))\n\nexport default function ExercisePartRoute({\n\tloaderData,\n}: Route.ComponentProps) {\n\tconst { inBrowserBrowserRef } = useOutletContext<{\n\t\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n\t}>()\n\tconst workshopConfig = useWorkshopConfig()\n\tconst [searchParams] = useSearchParams()\n\n\tconst preview = searchParams.get('preview')\n\n\tconst altDown = useAltDown()\n\tconst navigate = useNavigate()\n\n\tfunction shouldHideTab(tab: (typeof tabs)[number]) {\n\t\tif (tab === 'tests') {\n\t\t\treturn (\n\t\t\t\tENV.EPICSHOP_DEPLOYED ||\n\t\t\t\t!loaderData.playground ||\n\t\t\t\tloaderData.playground.test.type === 'none'\n\t\t\t)\n\t\t}\n\t\tif (tab === 'problem' || tab === 'solution') {\n\t\t\tif (loaderData[tab]?.dev.type === 'none') return true\n\t\t\tif (ENV.EPICSHOP_DEPLOYED) {\n\t\t\t\tconst devType = loaderData[tab]?.dev.type\n\t\t\t\treturn (\n\t\t\t\t\tdevType !== 'browser' &&\n\t\t\t\t\tdevType !== 'export' &&\n\t\t\t\t\t!loaderData[tab]?.stackBlitzUrl\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t\tif (tab === 'playground' && ENV.EPICSHOP_DEPLOYED) return true\n\n\t\tif (tab === 'chat') {\n\t\t\treturn !workshopConfig.product.discordChannelId\n\t\t}\n\t\treturn false\n\t}\n\n\tfunction getTabStatus(\n\t\ttab: (typeof tabs)[number],\n\t): 'running' | 'passed' | 'failed' | null {\n\t\tif (tab === 'tests') {\n\t\t\tif (!loaderData.playground) return null\n\t\t\tconst { isTestRunning, testExitCode } = loaderData.playground\n\t\t\tif (isTestRunning) return 'running'\n\t\t\tif (testExitCode === 0) return 'passed'\n\t\t\tif (testExitCode !== null && testExitCode !== 0) return 'failed'\n\t\t\treturn null\n\t\t}\n\t\tif (tab === 'problem' || tab === 'solution' || tab === 'playground') {\n\t\t\tconst appData =\n\t\t\t\ttab === 'playground' ? loaderData.playground : loaderData[tab]\n\t\t\tif (appData?.isRunning) return 'running'\n\t\t}\n\t\treturn null\n\t}\n\n\tconst activeTab = isValidPreview(preview)\n\t\t? preview\n\t\t: tabs.find((t) => !shouldHideTab(t))\n\n\t// when alt is held down, the diff tab should open to the full-page diff view\n\t// between the problem and solution (this is more for the instructor than the student)\n\tconst altDiffUrl = `/diff?${new URLSearchParams({\n\t\tapp1: loaderData.problem?.name ?? '',\n\t\tapp2: loaderData.solution?.name ?? '',\n\t})}`\n\n\tfunction handleDiffTabClick(event: React.MouseEvent<HTMLAnchorElement>) {\n\t\tif (event.altKey && !event.ctrlKey && !event.shiftKey && !event.metaKey) {\n\t\t\tevent.preventDefault()\n\t\t\tvoid navigate(altDiffUrl)\n\t\t}\n\t}\n\n\tconst previewTabs = tabs.map((tab) => {\n\t\tconst hidden = shouldHideTab(tab)\n\t\tconst status = getTabStatus(tab)\n\t\tconst to =\n\t\t\ttab === 'diff' && altDown\n\t\t\t\t? altDiffUrl\n\t\t\t\t: `?${getPreviewSearchParams(searchParams, tab, 'playground')}`\n\t\treturn {\n\t\t\tid: tab,\n\t\t\tlabel: tab,\n\t\t\thidden,\n\t\t\tstatus,\n\t\t\tto,\n\t\t\tonClick: tab === 'diff' ? handleDiffTabClick : undefined,\n\t\t}\n\t})\n\n\treturn (\n\t\t<Tabs.Root\n\t\t\tclassName=\"relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden sm:col-span-1 sm:row-span-1\"\n\t\t\tvalue={activeTab}\n\t\t\t// intentionally no onValueChange here because the Link will trigger the\n\t\t\t// change.\n\t\t>\n\t\t\t<PreviewTabsList tabs={previewTabs} />\n\t\t\t<div className=\"relative z-10 flex min-h-0 flex-1 flex-col overflow-hidden\">\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"playground\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Playground\n\t\t\t\t\t\tappInfo={loaderData.playground}\n\t\t\t\t\t\tproblemAppName={loaderData.problem?.name}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t\tallApps={loaderData.allApps}\n\t\t\t\t\t\tisUpToDate={loaderData.playground?.isUpToDate ?? false}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"problem\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Preview\n\t\t\t\t\t\tappInfo={loaderData.problem}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"solution\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Preview\n\t\t\t\t\t\tappInfo={loaderData.solution}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"tests\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start overflow-hidden\"\n\t\t\t\t>\n\t\t\t\t\t<Tests\n\t\t\t\t\t\tappInfo={loaderData.playground}\n\t\t\t\t\t\tproblemAppName={loaderData.problem?.name}\n\t\t\t\t\t\tallApps={loaderData.allApps}\n\t\t\t\t\t\tisUpToDate={loaderData.playground?.isUpToDate ?? false}\n\t\t\t\t\t\tuserHasAccessPromise={loaderData.userHasAccessPromise}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"diff\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex h-full min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t>\n\t\t\t\t\t<Diff\n\t\t\t\t\t\tdiff={loaderData.diff}\n\t\t\t\t\t\tallApps={loaderData.allApps}\n\t\t\t\t\t\tuserHasAccessPromise={loaderData.userHasAccessPromise}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"chat\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex h-full min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t>\n\t\t\t\t\t<DiscordChat discordPostsPromise={loaderData.discordPostsPromise} />\n\t\t\t\t</Tabs.Content>\n\t\t\t</div>\n\t\t</Tabs.Root>\n\t)\n}\n\nexport function ErrorBoundary() {\n\treturn (\n\t\t<GeneralErrorBoundary\n\t\t\tstatusHandlers={{\n\t\t\t\t404: () => <p>Sorry, we couldn't find an app here.</p>,\n\t\t\t}}\n\t\t/>\n\t)\n}\n"],"names":["tabs","isValidPreview","s","Boolean","includes","index","_UNSAFE_withComponentProps","loaderData","inBrowserBrowserRef","useOutletContext","workshopConfig","useWorkshopConfig","searchParams","useSearchParams","preview","get","altDown","useAltDown","navigate","useNavigate","shouldHideTab","tab","ENV","EPICSHOP_DEPLOYED","playground","test","type","dev","devType","stackBlitzUrl","product","discordChannelId","getTabStatus","isTestRunning","testExitCode","isRunning","activeTab","find","t","altDiffUrl","URLSearchParams","app1","problem","name","app2","solution","handleDiffTabClick","event","altKey","ctrlKey","shiftKey","metaKey","preventDefault","previewTabs","map","hidden","status","to","getPreviewSearchParams","id","label","onClick","jsxs","Tabs","className","value","children","jsx","PreviewTabsList","forceMount","Playground","appInfo","problemAppName","allApps","isUpToDate","Preview","Tests","userHasAccessPromise","Diff","diff","DiscordChat","discordPostsPromise","ErrorBoundary","_UNSAFE_withErrorBoundaryProps","GeneralErrorBoundary","statusHandlers"],"mappings":"80CAgNA,MAAMA,EAAO,CACZ,aACA,UACA,WACA,QACA,OACA,MAAA,EAEKC,EAAkBC,GACvBC,GAAQD,GAAKF,EAAKI,SAASF,CAA0B,GAEtDG,GAAAC,EAAA,SAA0C,CACzCC,WAAAA,CACD,EAAyB,CACxB,KAAM,CAAEC,oBAAAA,GAAwBC,EAAA,EAG1BC,EAAiBC,EAAA,EACjB,CAACC,CAAY,EAAIC,EAAA,EAEjBC,EAAUF,EAAaG,IAAI,SAAS,EAEpCC,EAAUC,EAAA,EACVC,EAAWC,EAAA,EAEjB,SAASC,EAAcC,EAA4B,CAClD,GAAIA,IAAQ,QACX,OACCC,IAAIC,mBACJ,CAAChB,EAAWiB,YACZjB,EAAWiB,WAAWC,KAAKC,OAAS,OAGtC,GAAIL,IAAQ,WAAaA,IAAQ,WAAY,CAC5C,GAAId,EAAWc,CAAG,GAAGM,IAAID,OAAS,OAAQ,MAAO,GACjD,GAAIJ,IAAIC,kBAAmB,CAC1B,MAAMK,EAAUrB,EAAWc,CAAG,GAAGM,IAAID,KACrC,OACCE,IAAY,WACZA,IAAY,UACZ,CAACrB,EAAWc,CAAG,GAAGQ,aAEpB,CACD,CACA,OAAIR,IAAQ,cAAgBC,IAAIC,kBAA0B,GAEtDF,IAAQ,OACJ,CAACX,EAAeoB,QAAQC,iBAEzB,EACR,CAEA,SAASC,EACRX,EACyC,CACzC,GAAIA,IAAQ,QAAS,CACpB,GAAI,CAACd,EAAWiB,WAAY,OAAO,KACnC,KAAM,CAAES,cAAAA,EAAeC,aAAAA,GAAiB3B,EAAWiB,WACn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EAAWmC,SAASC,KACpCnC,oBAAAA,EACAiE,QAASlE,EAAWkE,QACpBC,WAAYnE,EAAWiB,YAAYkD,YAAc,GAClD,EACD,EACAP,EAAAA,IAACJ,EAAA,CACAE,MAAM,UACND,UAAU,uGACVK,WAAU,GAEVH,SAAAC,EAAAA,IAACQ,EAAA,CACAJ,QAAShE,EAAWmC,QACpBlC,oBAAAA,EACD,EACD,EACA2D,EAAAA,IAACJ,EAAA,CACAE,MAAM,WACND,UAAU,uGACVK,WAAU,GAEVH,SAAAC,EAAAA,IAACQ,EAAA,CACAJ,QAAShE,EAAWsC,SACpBrC,oBAAAA,EACD,EACD,EACA2D,EAAAA,IAACJ,EAAA,CACAE,MAAM,QACND,UAAU,uHAEVE,SAAAC,EAAAA,IAACS,EAAA,CACAL,QAAShE,EAAWiB,WACpBgD,eAAgBjE,EAAWmC,SAASC,KACpC8B,QAASlE,EAAWkE,QACpBC,WAAYnE,EAAWiB,YAAYkD,YAAc,GACjDG,qBAAsBtE,EAAWsE,qBAClC,EACD,EACAV,EAAAA,IAACJ,EAAA,CACAE,MAAM,OACND,UAAU,8GAEVE,SAAAC,EAAAA,IAACW,EAAA,CACAC,KAAMxE,EAAWwE,KACjBN,QAASlE,EAAWkE,QACpBI,qBAAsBtE,EAAWsE,qBAClC,EACD,EACAV,EAAAA,IAACJ,EAAA,CACAE,MAAM,OACND,UAAU,8GAEVE,SAAAC,EAAAA,IAACa,EAAA,CAAYC,oBAAqB1E,EAAW0E,oBAAqB,CAAA,CACnE,CAAA,CAAA,CACD,CAAA,CAAA,CACD,CAEF,CAAA,EAEOC,GAAAC,EAAA,UAAyB,CAC/B,OACChB,EAAAA,IAACiB,EAAA,CACAC,eAAgB,CACf,IAAK,IAAMlB,EAAAA,IAAC,IAAA,CAAED,SAAA,uCAAoC,CACnD,CAAA,CACD,CAEF,CAAA"}
|
|
1
|
+
{"version":3,"file":"index-BRVfMMSd.js","sources":["../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/index.tsx"],"sourcesContent":["import {\n\tgetAppByName,\n\tgetAppDisplayName,\n\tgetApps,\n\tgetExerciseApp,\n\tisExerciseStepApp,\n\tisPlaygroundApp,\n\trequireExerciseApp,\n\ttype App,\n\ttype ExerciseStepApp,\n} from '@epic-web/workshop-utils/apps.server'\nimport { getDiffCode } from '@epic-web/workshop-utils/diff.server'\nimport { userHasAccessToExerciseStep } from '@epic-web/workshop-utils/epic-api.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n} from '@epic-web/workshop-utils/timing.server'\nimport * as Tabs from '@radix-ui/react-tabs'\nimport * as React from 'react'\nimport {\n\tuseNavigate,\n\tuseSearchParams,\n\tdata,\n\tredirect,\n\ttype HeadersFunction,\n\ttype LoaderFunctionArgs,\n\tuseOutletContext,\n} from 'react-router'\nimport { Diff } from '#app/components/diff.tsx'\nimport { DiscordChat } from '#app/components/discord-chat.tsx'\nimport { GeneralErrorBoundary } from '#app/components/error-boundary.tsx'\nimport { type InBrowserBrowserRef } from '#app/components/in-browser-browser.tsx'\nimport {\n\tgetPreviewSearchParams,\n\tPreviewTabsList,\n} from '#app/components/preview-tabs.tsx'\nimport { useWorkshopConfig } from '#app/components/workshop-config.tsx'\nimport { fetchDiscordPosts } from '#app/utils/discord.server.ts'\nimport { useAltDown } from '#app/utils/misc.tsx'\nimport { type Route } from './+types/index.ts'\nimport { Playground } from './__shared/playground.tsx'\nimport { Preview } from './__shared/preview.tsx'\nimport { Tests } from './__shared/tests.tsx'\nimport { getAppRunningState, getTestState } from './__shared/utils.tsx'\n\nexport async function loader({ request, params }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('exerciseStepTypeIndexLoader')\n\tconst searchParams = new URL(request.url).searchParams\n\tconst cacheOptions = { request, timings }\n\n\tconst [exerciseStepApp, allAppsFull, problemApp, solutionApp] =\n\t\tawait Promise.all([\n\t\t\trequireExerciseApp(params, cacheOptions),\n\t\t\tgetApps(cacheOptions),\n\t\t\tgetExerciseApp({ ...params, type: 'problem' }, cacheOptions),\n\t\t\tgetExerciseApp({ ...params, type: 'solution' }, cacheOptions),\n\t\t])\n\n\tconst playgroundApp = allAppsFull.find(isPlaygroundApp)\n\tconst reqUrl = new URL(request.url)\n\n\tconst pathnameParam = reqUrl.searchParams.get('pathname')\n\tif (pathnameParam === '' || pathnameParam === '/') {\n\t\treqUrl.searchParams.delete('pathname')\n\t\tthrow redirect(reqUrl.toString())\n\t}\n\n\tconst app1Name = reqUrl.searchParams.get('app1')\n\tconst app2Name = reqUrl.searchParams.get('app2')\n\tconst app1 = app1Name\n\t\t? await getAppByName(app1Name)\n\t\t: playgroundApp || problemApp\n\tconst app2 = app2Name ? await getAppByName(app2Name) : solutionApp\n\n\tfunction getStepId(a: ExerciseStepApp) {\n\t\treturn (\n\t\t\ta.exerciseNumber * 1000 +\n\t\t\ta.stepNumber * 10 +\n\t\t\t(a.type === 'problem' ? 0 : 1)\n\t\t)\n\t}\n\n\tfunction getStepNameAndId(a: App) {\n\t\tif (isExerciseStepApp(a)) {\n\t\t\tconst exerciseNumberStr = String(a.exerciseNumber).padStart(2, '0')\n\t\t\tconst stepNumberStr = String(a.stepNumber).padStart(2, '0')\n\n\t\t\treturn {\n\t\t\t\tstepName: `${exerciseNumberStr}/${stepNumberStr}.${a.type}`,\n\t\t\t\tstepId: getStepId(a),\n\t\t\t}\n\t\t}\n\t\treturn { stepName: '', stepId: -1 }\n\t}\n\n\tconst allApps = allAppsFull\n\t\t.filter((a, i, ar) => ar.findIndex((b) => a.name === b.name) === i)\n\t\t.map((a) => ({\n\t\t\tdisplayName: getAppDisplayName(a, allAppsFull),\n\t\t\tname: a.name,\n\t\t\ttitle: a.title,\n\t\t\ttype: a.type,\n\t\t\t...getStepNameAndId(a),\n\t\t}))\n\n\tallApps.sort((a, b) => {\n\t\t// order them by their stepId\n\t\tif (a.stepId > 0 && b.stepId > 0) return a.stepId - b.stepId\n\n\t\t// non-step apps should come after step apps\n\t\tif (a.stepId > 0) return -1\n\t\tif (b.stepId > 0) return 1\n\n\t\treturn 0\n\t})\n\n\tasync function getDiffProp() {\n\t\tif (!app1 || !app2) {\n\t\t\treturn {\n\t\t\t\tapp1: app1?.name,\n\t\t\t\tapp2: app2?.name,\n\t\t\t\tdiffCode: null,\n\t\t\t}\n\t\t}\n\t\tconst diffCode = await getDiffCode(app1, app2, {\n\t\t\t...cacheOptions,\n\t\t\tforceFresh: searchParams.get('forceFresh') === 'diff',\n\t\t}).catch((e) => {\n\t\t\tconsole.error(e)\n\t\t\treturn null\n\t\t})\n\t\treturn {\n\t\t\tapp1: app1.name,\n\t\t\tapp2: app2.name,\n\t\t\tdiffCode,\n\t\t}\n\t}\n\n\treturn data(\n\t\t{\n\t\t\ttype: params.type as 'problem' | 'solution',\n\t\t\texerciseStepApp,\n\t\t\tallApps,\n\t\t\t// defer this promise so that we don't block the response from being sent\n\t\t\tdiscordPostsPromise: fetchDiscordPosts({ request }),\n\t\t\tuserHasAccessPromise: userHasAccessToExerciseStep({\n\t\t\t\texerciseNumber: Number(params.exerciseNumber),\n\t\t\t\tstepNumber: Number(params.stepNumber),\n\t\t\t\trequest,\n\t\t\t\ttimings,\n\t\t\t}),\n\t\t\tplayground: playgroundApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'playground',\n\t\t\t\t\t\tfullPath: playgroundApp.fullPath,\n\t\t\t\t\t\tdev: playgroundApp.dev,\n\t\t\t\t\t\ttest: playgroundApp.test,\n\t\t\t\t\t\ttitle: playgroundApp.title,\n\t\t\t\t\t\tname: playgroundApp.name,\n\t\t\t\t\t\tappName: playgroundApp.appName,\n\t\t\t\t\t\tisUpToDate: playgroundApp.isUpToDate,\n\t\t\t\t\t\tstackBlitzUrl: playgroundApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(playgroundApp)),\n\t\t\t\t\t\t...getTestState(playgroundApp),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tproblem: problemApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'problem',\n\t\t\t\t\t\tfullPath: problemApp.fullPath,\n\t\t\t\t\t\tdev: problemApp.dev,\n\t\t\t\t\t\ttest: problemApp.test,\n\t\t\t\t\t\ttitle: problemApp.title,\n\t\t\t\t\t\tname: problemApp.name,\n\t\t\t\t\t\tstackBlitzUrl: problemApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(problemApp)),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tsolution: solutionApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'solution',\n\t\t\t\t\t\tfullPath: solutionApp.fullPath,\n\t\t\t\t\t\tdev: solutionApp.dev,\n\t\t\t\t\t\ttest: solutionApp.test,\n\t\t\t\t\t\ttitle: solutionApp.title,\n\t\t\t\t\t\tname: solutionApp.name,\n\t\t\t\t\t\tstackBlitzUrl: solutionApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(solutionApp)),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tdiff: getDiffProp(),\n\t\t} as const,\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'Server-Timing': getServerTimeHeader(timings),\n\t\t\t},\n\t\t},\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {\n\tconst headers = {\n\t\t'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nconst tabs = [\n\t'playground',\n\t'problem',\n\t'solution',\n\t'tests',\n\t'diff',\n\t'chat',\n] as const\nconst isValidPreview = (s: string | null): s is (typeof tabs)[number] =>\n\tBoolean(s && tabs.includes(s as (typeof tabs)[number]))\n\nexport default function ExercisePartRoute({\n\tloaderData,\n}: Route.ComponentProps) {\n\tconst { inBrowserBrowserRef } = useOutletContext<{\n\t\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n\t}>()\n\tconst workshopConfig = useWorkshopConfig()\n\tconst [searchParams] = useSearchParams()\n\n\tconst preview = searchParams.get('preview')\n\n\tconst altDown = useAltDown()\n\tconst navigate = useNavigate()\n\n\tfunction shouldHideTab(tab: (typeof tabs)[number]) {\n\t\tif (tab === 'tests') {\n\t\t\treturn (\n\t\t\t\tENV.EPICSHOP_DEPLOYED ||\n\t\t\t\t!loaderData.playground ||\n\t\t\t\tloaderData.playground.test.type === 'none'\n\t\t\t)\n\t\t}\n\t\tif (tab === 'problem' || tab === 'solution') {\n\t\t\tif (loaderData[tab]?.dev.type === 'none') return true\n\t\t\tif (ENV.EPICSHOP_DEPLOYED) {\n\t\t\t\tconst devType = loaderData[tab]?.dev.type\n\t\t\t\treturn (\n\t\t\t\t\tdevType !== 'browser' &&\n\t\t\t\t\tdevType !== 'export' &&\n\t\t\t\t\t!loaderData[tab]?.stackBlitzUrl\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t\tif (tab === 'playground' && ENV.EPICSHOP_DEPLOYED) return true\n\n\t\tif (tab === 'chat') {\n\t\t\treturn !workshopConfig.product.discordChannelId\n\t\t}\n\t\treturn false\n\t}\n\n\tfunction getTabStatus(\n\t\ttab: (typeof tabs)[number],\n\t): 'running' | 'passed' | 'failed' | null {\n\t\tif (tab === 'tests') {\n\t\t\tif (!loaderData.playground) return null\n\t\t\tconst { isTestRunning, testExitCode } = loaderData.playground\n\t\t\tif (isTestRunning) return 'running'\n\t\t\tif (testExitCode === 0) return 'passed'\n\t\t\tif (testExitCode !== null && testExitCode !== 0) return 'failed'\n\t\t\treturn null\n\t\t}\n\t\tif (tab === 'problem' || tab === 'solution' || tab === 'playground') {\n\t\t\tconst appData =\n\t\t\t\ttab === 'playground' ? loaderData.playground : loaderData[tab]\n\t\t\tif (appData?.isRunning) return 'running'\n\t\t}\n\t\treturn null\n\t}\n\n\tconst activeTab = isValidPreview(preview)\n\t\t? preview\n\t\t: tabs.find((t) => !shouldHideTab(t))\n\n\t// when alt is held down, the diff tab should open to the full-page diff view\n\t// between the problem and solution (this is more for the instructor than the student)\n\tconst altDiffUrl = `/diff?${new URLSearchParams({\n\t\tapp1: loaderData.problem?.name ?? '',\n\t\tapp2: loaderData.solution?.name ?? '',\n\t})}`\n\n\tfunction handleDiffTabClick(event: React.MouseEvent<HTMLAnchorElement>) {\n\t\tif (event.altKey && !event.ctrlKey && !event.shiftKey && !event.metaKey) {\n\t\t\tevent.preventDefault()\n\t\t\tvoid navigate(altDiffUrl)\n\t\t}\n\t}\n\n\tconst previewTabs = tabs.map((tab) => {\n\t\tconst hidden = shouldHideTab(tab)\n\t\tconst status = getTabStatus(tab)\n\t\tconst to =\n\t\t\ttab === 'diff' && altDown\n\t\t\t\t? altDiffUrl\n\t\t\t\t: `?${getPreviewSearchParams(searchParams, tab, 'playground')}`\n\t\treturn {\n\t\t\tid: tab,\n\t\t\tlabel: tab,\n\t\t\thidden,\n\t\t\tstatus,\n\t\t\tto,\n\t\t\tonClick: tab === 'diff' ? handleDiffTabClick : undefined,\n\t\t}\n\t})\n\n\treturn (\n\t\t<Tabs.Root\n\t\t\tclassName=\"relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden sm:col-span-1 sm:row-span-1\"\n\t\t\tvalue={activeTab}\n\t\t\t// intentionally no onValueChange here because the Link will trigger the\n\t\t\t// change.\n\t\t>\n\t\t\t<PreviewTabsList tabs={previewTabs} />\n\t\t\t<div className=\"relative z-10 flex min-h-0 flex-1 flex-col overflow-hidden\">\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"playground\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Playground\n\t\t\t\t\t\tappInfo={loaderData.playground}\n\t\t\t\t\t\tproblemAppName={loaderData.problem?.name}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t\tallApps={loaderData.allApps}\n\t\t\t\t\t\tisUpToDate={loaderData.playground?.isUpToDate ?? false}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"problem\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Preview\n\t\t\t\t\t\tappInfo={loaderData.problem}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"solution\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Preview\n\t\t\t\t\t\tappInfo={loaderData.solution}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"tests\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex min-h-0 w-full grow basis-0 items-stretch justify-center self-start overflow-hidden\"\n\t\t\t\t>\n\t\t\t\t\t<Tests\n\t\t\t\t\t\tappInfo={loaderData.playground}\n\t\t\t\t\t\tproblemAppName={loaderData.problem?.name}\n\t\t\t\t\t\tallApps={loaderData.allApps}\n\t\t\t\t\t\tisUpToDate={loaderData.playground?.isUpToDate ?? false}\n\t\t\t\t\t\tuserHasAccessPromise={loaderData.userHasAccessPromise}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"diff\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex h-full min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t>\n\t\t\t\t\t<Diff\n\t\t\t\t\t\tdiff={loaderData.diff}\n\t\t\t\t\t\tallApps={loaderData.allApps}\n\t\t\t\t\t\tuserHasAccessPromise={loaderData.userHasAccessPromise}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"chat\"\n\t\t\t\t\tclassName=\"radix-state-inactive:hidden flex h-full min-h-0 w-full grow basis-0 items-stretch justify-center self-start\"\n\t\t\t\t>\n\t\t\t\t\t<DiscordChat discordPostsPromise={loaderData.discordPostsPromise} />\n\t\t\t\t</Tabs.Content>\n\t\t\t</div>\n\t\t</Tabs.Root>\n\t)\n}\n\nexport function ErrorBoundary() {\n\treturn (\n\t\t<GeneralErrorBoundary\n\t\t\tstatusHandlers={{\n\t\t\t\t404: () => <p>Sorry, we couldn't find an app here.</p>,\n\t\t\t}}\n\t\t/>\n\t)\n}\n"],"names":["tabs","isValidPreview","s","Boolean","includes","index","_UNSAFE_withComponentProps","loaderData","inBrowserBrowserRef","useOutletContext","workshopConfig","useWorkshopConfig","searchParams","useSearchParams","preview","get","altDown","useAltDown","navigate","useNavigate","shouldHideTab","tab","ENV","EPICSHOP_DEPLOYED","playground","test","type","dev","devType","stackBlitzUrl","product","discordChannelId","getTabStatus","isTestRunning","testExitCode","isRunning","activeTab","find","t","altDiffUrl","URLSearchParams","app1","problem","name","app2","solution","handleDiffTabClick","event","altKey","ctrlKey","shiftKey","metaKey","preventDefault","previewTabs","map","hidden","status","to","getPreviewSearchParams","id","label","onClick","jsxs","Tabs","className","value","children","jsx","PreviewTabsList","forceMount","Playground","appInfo","problemAppName","allApps","isUpToDate","Preview","Tests","userHasAccessPromise","Diff","diff","DiscordChat","discordPostsPromise","ErrorBoundary","_UNSAFE_withErrorBoundaryProps","GeneralErrorBoundary","statusHandlers"],"mappings":"80CAgNA,MAAMA,EAAO,CACZ,aACA,UACA,WACA,QACA,OACA,MAAA,EAEKC,EAAkBC,GACvBC,GAAQD,GAAKF,EAAKI,SAASF,CAA0B,GAEtDG,GAAAC,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