1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React, { useCallback, useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
4
5// --- Constants ---
558 createRoot(rootElement).render(<CardGraderApp />);
559 } else {
560 console.error("Root element not found for React app");
561 }
562}
766 }
767
768 // --- Serve HTML for GET requests (loads the React app) ---
769 if (request.method === "GET" && new URL(request.url).pathname === "/") {
770 // Use htmlContent defined below, ensuring it includes the current URL for the script src
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React, { useCallback, useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
4
5// --- Constants ---
558 createRoot(rootElement).render(<CardGraderApp />);
559 } else {
560 console.error("Root element not found for React app");
561 }
562}
781 }
782
783 // --- Serve HTML for GET requests (loads the React app) ---
784 if (request.method === "GET" && new URL(request.url).pathname === "/") {
785 // Use htmlContent defined below, ensuring it includes the current URL for the script src
1/** @jsxImportSource npm:react */
2import { renderToStaticMarkup } from "npm:react-dom/server";
3
4import Mark from "./val-town-logomark";
1/** @jsxImportSource https://esm.sh/react */
2import React, { useEffect, useState } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
4import { letterVariations } from "https://esm.town/v/karkowg/domainSantaLetterVariations";
5
1/** @jsxImportSource npm:react */
2import { renderToStaticMarkup } from "npm:react-dom/server";
3
4import CodeIcon from "./code-icon";
1/** @jsxImportSource npm:react */
2import React from "npm:react";
3
4export default function CodeIcon(props: React.SVGProps<SVGSVGElement>) {
5 return (
6 <svg
1/** @jsxImportSource npm:react */
2import React from "npm:react";
3
4export default function ValTownLogomark(props: React.SVGProps<SVGSVGElement>) {
5 return (
6 <svg
1/** @jsxImportSource npm:react */
2import React from "npm:react";
3
4export default function ValTownLogo(props: React.SVGProps<SVGSVGElement>) {
5 return (
6 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 442 79" {...props}>
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import * as Chakra from "https://esm.sh/@chakra-ui/react@2.8.0";
3import { ChakraProvider, extendTheme, useToast } from "https://esm.sh/@chakra-ui/react@2.8.0";
4import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
5import React, { useCallback, useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
6
7// --- Constants ---
347 }
348 }
349 // eslint-disable-next-line react-hooks/exhaustive-deps
350 }, [gradingResult, isRevealingGrade, pendingReportData, toast]); // Dependencies for saving logic
351
1327
1328// --- Icons (Simple Placeholder Icons) ---
1329// In a real app, you'd likely use an icon library like react-icons
1330const Icon = (props) => <Chakra.Box as="span" {...props} />; // Basic icon wrapper
1331const UploadIcon = (props) => <Icon {...props}>⬆️</Icon>; // Placeholder
1342 const root = createRoot(container);
1343 root.render(
1344 <React.StrictMode>
1345 <ChakraProvider theme={theme}>
1346 <ProfessionalCardGrader />
1347 </ChakraProvider>
1348 </React.StrictMode>,
1349 );
1350} else {
1/** @jsxImportSource https://esm.sh/react */
2import mermaid from "https://esm.sh/mermaid@10.6.1";
3import React, { useEffect, useRef, useState } from "https://esm.sh/react";
4import { createRoot } from "https://esm.sh/react-dom/client";
5
6// Initial diagram example