paymentGatewayWebmain.tsx4 matches
3import React, { useState } from "https://esm.sh/react@18.2.0";
45function PaymentButton({ method, icon, onClick }) {
6return (
7<button
23}
2425function App() {
26const [status, setStatus] = useState("Ready to pay");
27100}
101102function client() {
103createRoot(document.getElementById("root")).render(<App />);
104}
105if (typeof document !== "undefined") { client(); }
106107export default async function server(request: Request): Promise<Response> {
108if (request.method === "POST" && new URL(request.url).pathname === "/process-payment") {
109try {
Goldcalculatormain.tsx4 matches
45// Custom Logo Component
6function GoldLogo() {
7return (
8<svg
50}
5152function GoldSellCalculator() {
53const [goldWeight, setGoldWeight] = useState('');
54const [goldPurity, setGoldPurity] = useState('24');
216}
217218function client() {
219const rootElement = document.getElementById("root");
220if (rootElement) {
227}
228229export default async function server(request: Request): Promise<Response> {
230return new Response(`
231<html>
postHogAPICapturemain.tsx1 match
1import { fetch } from "https://esm.town/v/std/fetch";
23export async function postHogAPICapture({ key, event, properties, distinct_id }: {
4key: string;
5event: string;
FetchBasicmain.tsx1 match
1export default async function(req: Request): Promise<Response> {
2// Setup CORS Headers
3const headers = new Headers();
browserbaseUtilsmain.tsx2 matches
5}
67export async function loadPageContent(url: string, options: LoadPageOptions = { textContent: false }) {
8const browser = await puppeteer.connect({
9browserWSEndpoint: `wss://connect.browserbase.com?apiKey=${Deno.env.get("BROWSERBASE_API_KEY")}`,
35}
3637export async function screenshotPage(url: string, options: ScreenshotOptions = { fullPage: true }) {
38const browser = await puppeteer.connect({
39browserWSEndpoint: `wss://connect.browserbase.com?apiKey=${Deno.env.get("BROWSERBASE_API_KEY")}`,
vividBeigeFalconmain.tsx1 match
1function add(a: number, b: number) {
2return a + b;
3}
pngMakerAppmain.tsx3 matches
6import { Hono } from 'npm:hono';
78function html() {
9/*
10<!DOCTYPE html>
35}
3637function css() {
38/*
39body {
86}
8788function js() {
89/*
90import { createPolygotPng } from '/polypng.mjs';
oceanThememain.tsx1 match
167border-radius: 50%;
168animation: rise infinite;
169animation-timing-function: linear;
170}
171
7console.log("V2 Activated!");
89// Define a global function to add a frame
10window.addFrame = async () => {
11try {
17};
1819// Define a global function to close a frame
20window.closeFrame = async () => {
21try {
terrificIndigoAlbatrossmain.tsx11 matches
26const PoweredByInfo = "";
2728function Hero({
29prompt,
30setPrompt,
4748<p className="text-[#bababa] text-center max-w-[25ch] mx-auto my-4 font-dm-sans">
49Turn your ideas into fully functional apps in{" "}
50<span className="relative w-fit text-fuchsia-400 z-10 italic font-semibold rounded-full">
51less than a second
121}
122123function App() {
124const previewRef = React.useRef<HTMLDivElement>(null);
125const [prompt, setPrompt] = useState("");
175});
176177function handleStarterPromptClick(promptItem: typeof prompts[number]) {
178setLoading(true);
179setTimeout(() => handleSubmit(promptItem.prompt), 0);
180}
181182async function handleSubmit(e: React.FormEvent | string) {
183if (typeof e !== "string") {
184e.preventDefault();
231}
232233function handleVersionChange(direction: "back" | "forward") {
234const { currentVersionIndex, versions } = versionHistory;
235if (direction === "back" && currentVersionIndex > 0) {
920);
921922function client() {
923const path = window.location.pathname;
924const root = createRoot(document.getElementById("root")!);
956}
957958function extractCodeFromFence(text: string): string {
959const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
960return htmlMatch ? htmlMatch[1].trim() : text;
961}
962963async function generateCode(prompt: string, currentCode: string) {
964const starterPrompt = STARTER_PROMPTS.find(p => p.prompt === prompt);
965if (starterPrompt) {
1006}
10071008export default async function cerebras_coder(req: Request): Promise<Response> {
1009// Dynamic import for SQLite to avoid client-side import
1010const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
1109<meta property="og:site_name" content="Cerebras Coder">
1110<meta property="og:url" content="https://cerebrascoder.com"/>
1111<meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1112<meta property="og:type" content="website">
1113<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">