5import { OrbitControls } from "https://esm.sh/three/examples/jsm/controls/OrbitControls";
6
7function App() {
8 const mountRef = useRef(null);
9
264}
265
266function client() {
267 createRoot(document.getElementById("root")).render(<App />);
268}
270if (typeof document !== "undefined") { client(); }
271
272export default async function server(request: Request): Promise<Response> {
273 return new Response(`
274 <html>
6import { tomorrow } from "https://esm.sh/react-syntax-highlighter/dist/esm/styles/prism";
7
8function App() {
9 const [prompt, setPrompt] = useState("hello llamapalooza");
10 const [code, setCode] = useState("");
18 >(null);
19
20 async function handleSubmit(e: React.FormEvent) {
21 e.preventDefault();
22 setLoading(true);
97}
98
99function client() {
100 createRoot(document.getElementById("root")!).render(<App />);
101}
105}
106
107function extractCodeFromFence(text: string): string {
108 const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
109 return htmlMatch ? htmlMatch[1].trim() : text;
110}
111
112export default async function server(req: Request): Promise<Response> {
113 if (req.method === "POST") {
114 const client = new Cerebras();
2import { sqlite } from "https://esm.town/v/std/sqlite";
3
4export default async function(req: Request): Promise<Response> {
5 const body = await req.json();
6 let { username, password } = body;
4import anime from "https://esm.sh/animejs@3.2.1";
5
6function App() {
7 return (
8 <div className="app">
16}
17
18function BackgroundAnimation() {
19 const svgRef = useRef(null);
20
48}
49
50function Header() {
51 const headerRef = useRef(null);
52
76}
77
78function Hero() {
79 const heroRef = useRef(null);
80 const [text, setText] = useState("Discover the Future of Search");
130}
131
132function Features() {
133 const featuresRef = useRef(null);
134 const [activeFeature, setActiveFeature] = useState(null);
176}
177
178function Footer() {
179 return (
180 <footer className="glassmorphism">
185}
186
187function client() {
188 createRoot(document.getElementById("root")).render(<App />);
189}
193}
194
195export default async function server(request: Request): Promise<Response> {
196 return new Response(`
197 <!DOCTYPE html>
3import { hnLatestPosts } from "https://esm.town/v/stevekrouse/hnLatestPosts?v=18";
4
5export const hnFollowApp = function(authors: string[]) {
6 return async function({ lastRunAt }) {
7 let posts = await hnLatestPosts({
8 authors,
6import { tomorrow } from "https://esm.sh/react-syntax-highlighter/dist/esm/styles/prism";
7
8function App() {
9 const [prompt, setPrompt] = useState("hello llamapalooza");
10 const [code, setCode] = useState("");
18 >(null);
19
20 async function handleSubmit(e: React.FormEvent) {
21 e.preventDefault();
22 setLoading(true);
97}
98
99function client() {
100 createRoot(document.getElementById("root")!).render(<App />);
101}
105}
106
107function extractCodeFromFence(text: string): string {
108 const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
109 return htmlMatch ? htmlMatch[1].trim() : text;
110}
111
112export default async function server(req: Request): Promise<Response> {
113 if (req.method === "POST") {
114 const client = new Cerebras();
5import { renderToString } from "npm:react-dom/server";
6
7function StatusRow({ rows }) {
8 return (
9 <div className="w-full flex flex-col space-y-2">
28}
29
30function StatusSection({ url, rows }) {
31 const sectionRows = rows.filter(row => row[0] === url);
32 const percentUp = Math.round((sectionRows.filter(row => row[1]).length / sectionRows.length) * 100);
44}
45
46export default async function(req: Request): Promise<Response> {
47 const { rows } = await sqlite.execute(
48 "select url, ok, duration, timestamp from uptime order by timestamp desc limit 200",
6);
7
8export async function uptimeCheck(url: string) {
9 let reason: string, status: number, end: number;
10 let ok = true;
31console.log(text);
32
33export async function weatherGPT() {
34 await email({ subject: "Weather Today", text });
35}
43}
44
45function ProductCard({ product, addToCart }) {
46 return (
47 <div
79}
80
81function ParallaxSlider() {
82 const [offsetY, setOffsetY] = useState(0);
83 const handleScroll = () => setOffsetY(window.pageYOffset);
112}
113
114function Footer() {
115 return (
116 <footer className="modern-footer">
153}
154
155function Sidebar() {
156 return (
157 <div className="sidebar">
174}
175
176function App() {
177 const [cart, setCart] = useState([]);
178 const [isClient, setIsClient] = useState(false);
290}
291
292function client() {
293 const root = document.getElementById("root");
294 if (root) {
309}
310
311export default async function server(req: Request): Promise<Response> {
312 return new Response(`
313 <!DOCTYPE html>
A helper function to build a file's email
Simple functional CSS library for Val Town
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": "*",
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.