legalAssistantmain.tsx4 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function LegalDisclaimer() {
6return (
7<div style={{
20}
2122function App() {
23const [query, setQuery] = useState("");
24const [response, setResponse] = useState("");
181}
182183function client() {
184createRoot(document.getElementById("root")).render(<App />);
185}
186if (typeof document !== "undefined") { client(); }
187188export default async function server(request: Request): Promise<Response> {
189if (request.method === "POST") {
190const { OpenAI } = await import("https://esm.town/v/std/openai");
seoKeywordResearchToolmain.tsx5 matches
19];
2021function App() {
22const [topic, setTopic] = useState("");
23const [format, setFormat] = useState("blog");
273}
274275function client() {
276createRoot(document.getElementById("root")).render(<App />);
277}
278if (typeof document !== "undefined") { client(); }
279280export default async function server(request: Request): Promise<Response> {
281const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
282const { OpenAI } = await import("https://esm.town/v/std/openai");
298`);
299300// Helper function to get or create user
301async function getOrCreateUser() {
302let user = (await sqlite.execute(`SELECT * FROM ${KEY}_users_${SCHEMA_VERSION} LIMIT 1`)).rows[0];
303if (!user) {
neatBlackSwiftmain.tsx10 matches
24);
2526function Hero({
27prompt,
28setPrompt,
4546<p className="text-[#bababa] text-center max-w-[25ch] mx-auto my-4 font-dm-sans">
47Turn your ideas into fully functional apps in{" "}
48<span className="relative w-fit text-fuchsia-400 z-10 italic font-semibold rounded-full">
49less than a second
116}
117118function App() {
119const previewRef = React.useRef<HTMLDivElement>(null);
120const [prompt, setPrompt] = useState("");
171});
172173function handleStarterPromptClick(promptItem: typeof prompts[number]) {
174setLoading(true);
175setTimeout(() => handleSubmit(promptItem.prompt), 0);
176}
177178async function handleSubmit(e: React.FormEvent | string) {
179if (typeof e !== "string") {
180e.preventDefault();
227}
228229function handleVersionChange(direction: "back" | "forward") {
230const { currentVersionIndex, versions } = versionHistory;
231if (direction === "back" && currentVersionIndex > 0) {
975);
976977function client() {
978const path = window.location.pathname;
979const root = createRoot(document.getElementById("root")!);
1011}
10121013function extractCodeFromFence(text: string): string {
1014const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
1015return htmlMatch ? htmlMatch[1].trim() : text;
1016}
10171018async function generateCode(prompt: string, currentCode: string) {
1019const starterPrompt = STARTER_PROMPTS.find(p => p.prompt === prompt);
1020if (starterPrompt) {
1081}
10821083export default async function server(req: Request): Promise<Response> {
1084// Dynamic import for SQLite to avoid client-side import
1085const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
spaceTradersStatusTablemain.tsx5 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function StatusTable() {
6const [status, setStatus] = useState(null);
7const [error, setError] = useState(null);
89useEffect(() => {
10async function fetchStatus() {
11try {
12const response = await fetch('https://api.spacetraders.io/v2/');
117};
118119function App() {
120return <StatusTable />;
121}
122123function client() {
124createRoot(document.getElementById("root")).render(<App />);
125}
126if (typeof document !== "undefined") { client(); }
127128export default async function server(request: Request): Promise<Response> {
129return new Response(`
130<html>
hallmarkMoviePlotGeneratormain.tsx5 matches
44};
4546function getRandomFromList(list: string[]) {
47return list[Math.floor(Math.random() * list.length)];
48}
4950function generatePlot(template: string, variables: Record<string, string[]>): string {
51let plot = template;
52const variableRegex = /<([^>]+)>/g;
65}
6667function App() {
68const [plot, setPlot] = useState("Click \"Generate Plot\" to create a Hallmark movie storyline");
69121}
122123function client() {
124createRoot(document.getElementById("root")).render(<App />);
125}
126if (typeof document !== "undefined") { client(); }
127128export default async function server(request: Request): Promise<Response> {
129return new Response(
130`
cerebras_codermain.tsx11 matches
24);
2526function Hero({
27prompt,
28setPrompt,
4546<p className="text-[#bababa] text-center max-w-[25ch] mx-auto my-4 font-dm-sans">
47Turn your ideas into fully functional apps in{" "}
48<span className="relative w-fit text-fuchsia-400 z-10 italic font-semibold rounded-full">
49less than a second
116}
117118function App() {
119const previewRef = React.useRef<HTMLDivElement>(null);
120const [prompt, setPrompt] = useState("");
170});
171172function handleStarterPromptClick(promptItem: typeof prompts[number]) {
173setLoading(true);
174setTimeout(() => handleSubmit(promptItem.prompt), 0);
175}
176177async function handleSubmit(e: React.FormEvent | string) {
178if (typeof e !== "string") {
179e.preventDefault();
226}
227228function handleVersionChange(direction: "back" | "forward") {
229const { currentVersionIndex, versions } = versionHistory;
230if (direction === "back" && currentVersionIndex > 0) {
974);
975976function client() {
977const path = window.location.pathname;
978const root = createRoot(document.getElementById("root")!);
1010}
10111012function extractCodeFromFence(text: string): string {
1013const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
1014return htmlMatch ? htmlMatch[1].trim() : text;
1015}
10161017async function generateCode(prompt: string, currentCode: string) {
1018const starterPrompt = STARTER_PROMPTS.find(p => p.prompt === prompt);
1019if (starterPrompt) {
1060}
10611062export default async function cerebras_coder(req: Request): Promise<Response> {
1063// Dynamic import for SQLite to avoid client-side import
1064const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
1163<meta property="og:site_name" content="Cerebras Coder">
1164<meta property="og:url" content="https://cerebrascoder.com"/>
1165<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."">
1166<meta property="og:type" content="website">
1167<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
cerebras_codermain.tsx11 matches
24);
2526function Hero({
27prompt,
28setPrompt,
4546<p className="text-[#bababa] text-center max-w-[25ch] mx-auto my-4 font-dm-sans">
47Turn your ideas into fully functional apps in{" "}
48<span className="relative w-fit text-fuchsia-400 z-10 italic font-semibold rounded-full">
49less than a second
116}
117118function App() {
119const previewRef = React.useRef<HTMLDivElement>(null);
120const [prompt, setPrompt] = useState("");
170});
171172function handleStarterPromptClick(promptItem: typeof prompts[number]) {
173setLoading(true);
174setTimeout(() => handleSubmit(promptItem.prompt), 0);
175}
176177async function handleSubmit(e: React.FormEvent | string) {
178if (typeof e !== "string") {
179e.preventDefault();
226}
227228function handleVersionChange(direction: "back" | "forward") {
229const { currentVersionIndex, versions } = versionHistory;
230if (direction === "back" && currentVersionIndex > 0) {
974);
975976function client() {
977const path = window.location.pathname;
978const root = createRoot(document.getElementById("root")!);
1010}
10111012function extractCodeFromFence(text: string): string {
1013const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
1014return htmlMatch ? htmlMatch[1].trim() : text;
1015}
10161017async function generateCode(prompt: string, currentCode: string) {
1018const starterPrompt = STARTER_PROMPTS.find(p => p.prompt === prompt);
1019if (starterPrompt) {
1060}
10611062export default async function cerebras_coder(req: Request): Promise<Response> {
1063// Dynamic import for SQLite to avoid client-side import
1064const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
1163<meta property="og:site_name" content="Cerebras Coder">
1164<meta property="og:url" content="https://cerebrascoder.com"/>
1165<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."">
1166<meta property="og:type" content="website">
1167<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
cerebras_codermain.tsx11 matches
24);
2526function Hero({
27prompt,
28setPrompt,
4546<p className="text-[#bababa] text-center max-w-[25ch] mx-auto my-4 font-dm-sans">
47Turn your ideas into fully functional apps in{" "}
48<span className="relative w-fit text-fuchsia-400 z-10 italic font-semibold rounded-full">
49less than a second
116}
117118function App() {
119const previewRef = React.useRef<HTMLDivElement>(null);
120const [prompt, setPrompt] = useState("");
170});
171172function handleStarterPromptClick(promptItem: typeof prompts[number]) {
173setLoading(true);
174setTimeout(() => handleSubmit(promptItem.prompt), 0);
175}
176177async function handleSubmit(e: React.FormEvent | string) {
178if (typeof e !== "string") {
179e.preventDefault();
226}
227228function handleVersionChange(direction: "back" | "forward") {
229const { currentVersionIndex, versions } = versionHistory;
230if (direction === "back" && currentVersionIndex > 0) {
974);
975976function client() {
977const path = window.location.pathname;
978const root = createRoot(document.getElementById("root")!);
1010}
10111012function extractCodeFromFence(text: string): string {
1013const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
1014return htmlMatch ? htmlMatch[1].trim() : text;
1015}
10161017async function generateCode(prompt: string, currentCode: string) {
1018const starterPrompt = STARTER_PROMPTS.find(p => p.prompt === prompt);
1019if (starterPrompt) {
1060}
10611062export default async function cerebras_coder(req: Request): Promise<Response> {
1063// Dynamic import for SQLite to avoid client-side import
1064const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
1163<meta property="og:site_name" content="Cerebras Coder">
1164<meta property="og:url" content="https://cerebrascoder.com"/>
1165<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."">
1166<meta property="og:type" content="website">
1167<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
isMyWebsiteDownmain.tsx1 match
6);
78export async function uptimeCheck(url: string) {
9let ok = true;
10let reason: string;
weatherDashboardmain.tsx4 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function WeatherDashboard() {
6const [location, setLocation] = useState({ latitude: 40.7128, longitude: -74.0060 }); // Default to New York
7const [weather, setWeather] = useState(null);
1011useEffect(() => {
12async function fetchWeather() {
13try {
14setLoading(true);
84}
8586function client() {
87createRoot(document.getElementById("root")).render(<WeatherDashboard />);
88}
89if (typeof document !== "undefined") { client(); }
9091export default async function server(request: Request): Promise<Response> {
92return new Response(`
93<html>