1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import { App } from "./components/App.tsx";
4
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3export function IframeContent({ data, content }) {
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { Hono } from "npm:hono";
3import { renderToString } from "https://esm.sh/react-dom@18.2.0/server?deps=react@18.2.0";
4
5const app = new Hono();
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3export function GettingStartedContent({ data, title }) {
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useState } from "https://esm.sh/react@18.2.0";
3
4export function FormContent({ data, content }) {
3 "lock": false,
4 "compilerOptions": {
5 "jsx": "react-jsx",
6 "jsxImportSource": "https://esm.sh/react@18.2.0",
7 "jsxImportSourceTypes": "https://esm.sh/react@18.2.0",
8
9 "noImplicitAny": false,
189- **Imports:** Use `https://esm.sh` for npm and Deno dependencies to ensure compatibility on server and browser
190- **Storage Strategy:** Only use backend storage if explicitly required; prefer simple static client-side sites
191- **React Configuration:** When using React libraries, pin versions with `?deps=react@18.2.0,react-dom@18.2.0` and start the file with `/** @jsxImportSource https://esm.sh/react@18.2.0 */`
192- Ensure all React dependencies and sub-dependencies are pinned to the same version
193- **Styling:** Default to using TailwindCSS via `<script src="https://cdn.twind.style" crossorigin></script>` unless otherwise specified
194
275 - Always run table creation before querying
276
2773. **React Configuration:**
278 - All React dependencies must be pinned to 18.2.0
279 - Always include `@jsxImportSource https://esm.sh/react@18.2.0` at the top of React files
280 - Rendering issues often come from mismatched React versions
281
2824. **File Handling:**
1/** @jsxImportSource https://esm.sh/react */
2import { analyticsHandlerWrapper } from "https://esm.town/v/maxm/valTownAnalytics";
3import { Chess, Move, Square } from "npm:chess.js";
4import minify from "npm:css-simple-minifier";
5import { renderToString } from "npm:react-dom/server";
6
7class StaticChess {
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3export function ChessEmbedIframe({ config }) {
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useState } from "https://esm.sh/react@18.2.0";
3
4export function CheckoutContent({ data, content }) {