Windsurfprojectcontext13 matches
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";
45// API Documentation
43/**
44* Main App component
45* @returns {React.ReactElement}
46*/
47function App() {
113* CurrentPhase component
114* @param {{phase: string, onUpdate: Function}} props
115* @returns {React.ReactElement}
116*/
117function CurrentPhase({ phase, onUpdate }) {
121/**
122* Handles form submission
123* @param {React.FormEvent} e - The form event
124*/
125const handleSubmit = (e) => {
153* ActiveBlocks component
154* @param {{blocks: string[], onUpdate: Function}} props
155* @returns {React.ReactElement}
156*/
157function ActiveBlocks({ blocks, onUpdate }) {
161/**
162* Handles form submission
163* @param {React.FormEvent} e - The form event
164*/
165const handleSubmit = (e) => {
211* TaskList component
212* @param {{tasks: Task[], onUpdate: Function}} props
213* @returns {React.ReactElement}
214*/
215function TaskList({ tasks, onUpdate }) {
221/**
222* Handles form submission
223* @param {React.FormEvent} e - The form event
224*/
225const handleSubmit = (e) => {
339* StepList component
340* @param {{steps: Step[], onUpdate: Function}} props
341* @returns {React.ReactElement}
342*/
343function StepList({ steps, onUpdate }) {
349/**
350* Handles form submission
351* @param {React.FormEvent} e - The form event
352*/
353const handleSubmit = (e) => {
453* ChangeList component
454* @param {{changes: Change[]}} props
455* @returns {React.ReactElement}
456*/
457function ChangeList({ changes }) {
trackESMContentmain.tsx2 matches
34const URLS = [
5"https://esm.sh/react-dom@18.2.0/client",
6"https://esm.sh/react-dom@18.2.0/es2022/react-dom.mjs",
7];
8const KEY = (new URL(import.meta.url)).pathname.split("/").at(-1);
blob_admin_migratedREADME.md1 match
67Versions 0-17 of this val were done with Hono and server-rendering.
8Versions 18+ were generated with Townie and use client-side React.
910To use this val, fork it to your account.
blob_admin_migratedmain.tsx5 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { Hono } from "https://esm.sh/hono";
3import { debounce } from "https://esm.sh/lodash-es";
4import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
5import { useDropzone } from "https://esm.sh/react-dropzone?deps=react@18.2.0,react-dom@18.2.0";
6import React, { ReactNode, useCallback, useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
7import { lastlogin } from "https://esm.town/v/stevekrouse/lastlogin_safe";
8import { LoginWithGoogleButton } from "https://esm.town/v/stevekrouse/LoginWithGoogleButton";
910interface TooltipProps {
11children: ReactNode;
12content: string;
13}
OpenTowniesystem_prompt.txt4 matches
46If needed and if the user asks for something that requires persistence, use Val Town SQLite or Blob storage. Use the val's `import.meta.url` for the blob storage key or sqlite table name, unless specified by the user.
4748* If you use any React library, use esm.sh and pin its React version to 18.2.0 and its ReactDOM version to 18.2.0 by adding `?deps=react@18.2.0,react-dom@18.2.0` to the end of the URL. If the user is facing a client-side error where nothing is being rendered, check if all React dependencies and sub-dependencies are pinned to the same version, including the @jsxImportSource pragma.
49</requirements>
50148```val type=http
149/** Use this template when you create http vals only */
150/** @jsxImportSource https://esm.sh/react@18.2.0 */
151import React from "https://esm.sh/react@18.2.0";
152import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
153154/**
OpenTownieindex3 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { ValTown } from "https://esm.sh/@valtown/sdk";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
5import { generateCodeAnthropic, makeFullPrompt } from "./backend/generateCode";
6
userEnrichmentserver.ts3 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
3import {
4createStaticHandler,
5createStaticRouter,
6StaticRouterProvider,
7} from "https://esm.sh/react-router@7.1.3?deps=react@18.2.0,react-dom@18.2.0";
89import routes from "./routes/_index.ts";
userEnrichmenthome.tsx1 match
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
23export default function Home() {
userEnrichmentclient.tsx5 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
23import { hydrateRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import { RouterProvider } from "https://esm.sh/react-router@7.1.3/dom?deps=react@18.2.0,react-dom@18.2.0";
5import { createBrowserRouter } from "https://esm.sh/react-router@7.1.3?deps=react@18.2.0,react-dom@18.2.0";
6import { StrictMode } from "https://esm.sh/react@18.2.0";
7import routes from "./routes/_index.ts";
8
valtowntownmain.tsx3 matches
1/** @jsxImportSource npm:react */
2import { serveRequest } from "https://esm.town/v/maxm/reqEvaltown";
3import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
4import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
5import { Hono } from "npm:hono";
6import React from "npm:react";
7import { renderToString } from "npm:react-dom/server";
89const { httpEndpoint } = extractValInfo(import.meta.url);