4import type loader from "./about.loader.js";
5
6export default function About() {
7 let data = useLoaderData<typeof loader>();
8 return <h1>{data.message}</h1>;
1import { data } from "https://esm.sh/react-router@7.1.3?deps=react@18.2.0,react-dom@18.2.0";
2
3export default async function load() {
4 await new Promise(resolve => setTimeout(resolve, 200));
5
3import { createRoot } from "https://esm.sh/react-dom/client";
4
5function App() {
6 return (
7 <div className="">
126}
127
128function Section({ title, children }) {
129 return (
130 <div className="mb-10">
135}
136
137function FeatureItem({ href, title, description }) {
138 return (
139 <div className="bg-white border border-gray-200 rounded-lg p-4 hover:bg-blue-50 hover:border-blue-300 transition-all duration-200 transform hover:-translate-y-1 hover:shadow-md">
146}
147
148function PlannedItem({ title, description }) {
149 return (
150 <div className="bg-gray-100 border border-gray-200 rounded-lg p-4">
160}
161
162function client() {
163 createRoot(document.getElementById("root")).render(<App />);
164}
168}
169
170export default async function server(request: Request): Promise<Response> {
171 return new Response(
172 `
3import { renderToString } from "npm:react-dom/server";
4
5export default async function(req: Request): Promise<Response> {
6 return new Response(
7 renderToString(
13 {`let hasAnError: string = 10;
14
15function increment(num: number) {
16 return num + 1;
17}
2import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=5";
3
4export async function aqi(interval: Interval) {
5 const location = "12494"; // <-- change to place, city, or zip code
6 const data = await easyAQI({ location });
2import { Eval } from "npm:braintrust@0.01";
3
4export default async function handler() {
5 const result = {
6 apiKeyStatus: null,
12 * @param {number} [opts.timeout=10 minutes] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
13 * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
14 * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
15 * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
16 * @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
3import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
4
5// Utility function for password hashing
6async function hashPassword(password: string) {
7 const encoder = new TextEncoder();
8 const data = encoder.encode(password);
13}
14
15function App() {
16 const [searchQuery, setSearchQuery] = useState("");
17 const [videos, setVideos] = useState([]);
111}
112
113function client() {
114 createRoot(document.getElementById("root")).render(<App />);
115}
116if (typeof document !== "undefined") { client(); }
117
118export default async function server(request: Request): Promise<Response> {
119 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
120 const KEY = "YoutubeSearchApp";
1import { capturePostHogEvent } from "https://esm.town/v/ianvph/capturePostHogEvent";
2
3export default async function(req: Request): Promise<Response> {
4 if (req.method !== "POST") {
5 return Response.json({ ok: "only post request" });
1import { capturePostHogEvent } from "https://esm.town/v/ianvph/capturePostHogEvent";
2
3export default async function(req: Request): Promise<Response> {
4 if (req.method !== "POST") {
5 return Response.json({ ok: "only post request" });
A helper function to build a file's email
Simple functional CSS library for Val Town
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",