1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { type Context, Hono } from "https://esm.sh/hono";
3import { debounce } from "https://esm.sh/lodash-es";
4import React, { ReactNode, useCallback, useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
5import { parseProject } from "https://esm.town/v/std/parseImportMeta/project";
6import { lastlogin } from "https://esm.town/v/stevekrouse/lastlogin_safe";
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import { useDropzone } from "https://esm.sh/react-dropzone?deps=react@18.2.0,react-dom@18.2.0";
4import React, { ReactNode, useCallback, useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
5import { LoginWithGoogleButton } from "https://esm.town/v/stevekrouse/LoginWithGoogleButton";
6
7interface TooltipProps {
8 children: ReactNode;
9 content: string;
10}
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0";
3import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter?deps=react@18.2.0,react-dom@18.2.0";
4import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
5import STARTER_PROMPTS from "./starter-prompts.js";
6
30}: {
31 prompt: string;
32 setPrompt: React.Dispatch<React.SetStateAction<string>>;
33 handleSubmit: (e: React.FormEvent) => void;
34 handleStarterPromptClick: (promptItem: PromptItem) => void;
35}) {
116
117function App() {
118 const previewRef = React.useRef<HTMLDivElement>(null);
119 const [prompt, setPrompt] = useState("");
120 const [projectId, setProjectId] = useState<number | null>(null);
174 }
175
176 async function handleSubmit(e: React.FormEvent | string) {
177 if (typeof e !== "string") {
178 e.preventDefault();
673 </div>
674 <div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
675 <React.Fragment key={iframeKey}>
676 <iframe
677 srcDoc={code}
679 className="w-full grow"
680 />
681 </React.Fragment>
682 </div>
683 </div>
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useCallback, useRef } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function App() {
17 const fileInputRef = useRef<HTMLInputElement>(null);
18
19 const handleFileUpload = useCallback((event: React.DragEvent<HTMLDivElement> | React.ChangeEvent<HTMLInputElement>) => {
20 event.preventDefault();
21 const files = 'dataTransfer' in event
34 }, []);
35
36 const handleDragOver = (event: React.DragEvent<HTMLDivElement>) => {
37 event.preventDefault();
38 };
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
4
5function Logo() {
49 const [showWelcome, setShowWelcome] = useState(true);
50
51 const handleSubmit = async (e: React.FormEvent) => {
52 e.preventDefault();
53 if (!inputValue.trim()) return;
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useRef } from "https://esm.sh/react@18.2.0";
3import ReactDOM from "https://esm.sh/react-dom@18.2.0";
4import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
5import {
6 BrowserRouter as Router,
8 Route,
9 Link
10} from "https://esm.sh/react-router-dom@6.22.3?deps=react@18.2.0,react-dom@18.2.0";
11
12// Material UI imports with version pinning
14 ThemeProvider,
15 createTheme
16} from "https://esm.sh/@mui/material@5.15.14/styles?deps=react@18.2.0";
17import {
18 Container,
25 CardMedia,
26 SvgIcon
27} from "https://esm.sh/@mui/material@5.15.14?deps=react@18.2.0";
28
29const theme = createTheme({
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import { WebhookForm } from "./WebhookForm.tsx";
4
5export function App({ thisProjectURL }: { thisProjectURL?: string }) {
6 const [webhooks, setWebhooks] = React.useState([]);
7 const [loading, setLoading] = React.useState(true);
8 const [notification, setNotification] = React.useState({ show: false, message: "", type: "" });
9
10 const fetchWebhooks = async () => {
42 };
43
44 React.useEffect(() => {
45 fetchWebhooks();
46 }, []);
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3
4export function WebhookForm({ onSubmit }: { onSubmit: () => void }) {
5 const [projectId, setProjectId] = React.useState("");
6 const [webhookUrl, setWebhookUrl] = React.useState("");
7 const [event, setEvent] = React.useState("FilesCreated");
8 const [isSubmitting, setIsSubmitting] = React.useState(false);
9 const [error, setError] = React.useState("");
10
11 const handleSubmit = async (e: React.FormEvent) => {
12 e.preventDefault();
13 setError("");
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import ReactDOM from "https://esm.sh/react-dom@18.2.0";
3import React, { useState } from "https://esm.sh/react@18.2.0";
4
5const GridGame = () => {
144};
145
146ReactDOM.createRoot(document.getElementById("root")).render(
147 <React.StrictMode>
148 <GridGame />
149 </React.StrictMode>,
150);
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import { renderToString } from "npm:react-dom@18.2.0/server";
4
5const MusicPlayer = () => {
6 return (
7 React.createElement(
8 "html",
9 { lang: "en" },
10 React.createElement(
11 "head",
12 null,
13 React.createElement("meta", { charSet: "UTF-8" }),
14 React.createElement("meta", { name: "viewport", content: "width=device-width, initial-scale=1.0" }),
15 React.createElement("title", null, "Music Player"),
16 React.createElement(
17 "style",
18 null,
59 ),
60 ),
61 React.createElement(
62 "body",
63 null,
64 React.createElement("h1", null, "Music Player"),
65 React.createElement(
66 "div",
67 { className: "upload-container" },
68 React.createElement("input", { type: "file", id: "music-upload", accept: "audio/*" }),
69 ),
70 React.createElement(
71 "audio",
72 { id: "audio-player", controls: true, hidden: true },
73 "Your browser does not support the audio element.",
74 ),
75 React.createElement(
76 "script",
77 null,
97};
98
99const htmlString = renderToString(React.createElement(MusicPlayer));
100
101console.log(htmlString);