sqliteExplorerAppREADME.md1 match
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable
35- [x] add export to CSV, and JSON (CSV and JSON helper functions written in [this val](https://www.val.town/v/nbbaier/sqliteExportHelpers). Thanks to @pomdtr for merging the initial version!)
36- [x] add listener for cmd+enter to submit query
blob_adminmain.tsx1 match
18const PASSWORD_KEY = `${"blob_admin"}_admin_password`;
1920async function getOrSetPassword() {
21try {
22const storedPassword = await blob.get(PASSWORD_KEY);
tidyRedWhalemain.tsx3 matches
3import { createRoot } from "https://esm.sh/react-dom/client";
45function AssistantChat() {
6const [messages, setMessages] = useState<{role: string, content: string}[]>([
7{ role: 'system', content: 'You are a helpful AI assistant named ValAI, capable of understanding and assisting with various tasks.' }
77}
7879function client() {
80createRoot(document.getElementById("root")).render(<AssistantChat />);
81}
82if (typeof document !== "undefined") { client(); }
8384export default async function server(request: Request): Promise<Response> {
85if (request.method === 'POST' && new URL(request.url).pathname === '/chat') {
86const { OpenAI } = await import("https://esm.town/v/std/openai");
ImageSummaryEmailmain.tsx3 matches
2import { email } from "https://esm.town/v/std/email";
34export default async function(e: Email) {
5console.log("Email received!", e.from, e.subject);
632}
3334function formatEmailContent(observations: string[]): string {
35const listItems = observations
36.map(obs => `<li style="margin-bottom: 8px;">${obs}</li>`)
46}
4748async function sendReply(to: string, subject: string, body: string) {
49await email({
50subject,
generateImageSummarymain.tsx1 match
2import { fileToDataURL } from "https://esm.town/v/stevekrouse/fileToDataURL";
34export async function generateImageSummary(image: File): Promise<string[]> {
5const openai = new OpenAI();
6const dataURL = await fileToDataURL(image);
modernSalesCRMmain.tsx15 matches
3import { createRoot } from "https://esm.sh/react-dom/client";
45function Button({ children, onClick, className = '' }) {
6return (
7<button
14}
1516function Input({ placeholder, value, onChange, type = 'text', className = '' }) {
17return (
18<input
26}
2728function Card({ children, className = '' }) {
29return (
30<div className={`bg-white shadow-md rounded-lg p-6 ${className}`}>
34}
3536function CardHeader({ children }) {
37return <div className="border-b pb-3 mb-4">{children}</div>;
38}
3940function CardTitle({ children }) {
41return <h2 className="text-xl font-semibold">{children}</h2>;
42}
4344function CardContent({ children }) {
45return <div>{children}</div>;
46}
4748function Table({ children }) {
49return <table className="w-full border-collapse">{children}</table>;
50}
5152function TableHeader({ children }) {
53return <thead className="bg-gray-100">{children}</thead>;
54}
5556function TableBody({ children }) {
57return <tbody>{children}</tbody>;
58}
5960function TableRow({ children, className = '' }) {
61return <tr className={`border-b ${className}`}>{children}</tr>;
62}
6364function TableHead({ children }) {
65return <th className="px-4 py-2 text-left font-semibold">{children}</th>;
66}
6768function TableCell({ children }) {
69return <td className="px-4 py-2">{children}</td>;
70}
7172function App() {
73const [leads, setLeads] = useState([]);
74const [newLead, setNewLead] = useState({ name: '', email: '', phone: '', status: 'New' });
199}
200201function client() {
202createRoot(document.getElementById("root")).render(<App />);
203}
204if (typeof document !== "undefined") { client(); }
205206export default async function server(request: Request): Promise<Response> {
207try {
208const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
solarsystemmain.tsx3 matches
5import { OrbitControls } from "https://esm.sh/three/examples/jsm/controls/OrbitControls";
67function App() {
8const mountRef = useRef(null);
9264}
265266function client() {
267createRoot(document.getElementById("root")).render(<App />);
268}
270if (typeof document !== "undefined") { client(); }
271272export default async function server(request: Request): Promise<Response> {
273return new Response(`
274<html>
cerebras_codermain.tsx5 matches
6import { tomorrow } from "https://esm.sh/react-syntax-highlighter/dist/esm/styles/prism";
78function App() {
9const [prompt, setPrompt] = useState("hello llamapalooza");
10const [code, setCode] = useState("");
18>(null);
1920async function handleSubmit(e: React.FormEvent) {
21e.preventDefault();
22setLoading(true);
97}
9899function client() {
100createRoot(document.getElementById("root")!).render(<App />);
101}
105}
106107function extractCodeFromFence(text: string): string {
108const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
109return htmlMatch ? htmlMatch[1].trim() : text;
110}
111112export default async function server(req: Request): Promise<Response> {
113if (req.method === "POST") {
114const client = new Cerebras();
loginredux_loginmain.tsx1 match
2import { sqlite } from "https://esm.town/v/std/sqlite";
34export default async function(req: Request): Promise<Response> {
5const body = await req.json();
6let { username, password } = body;
ampleIndigoJunglefowlmain.tsx8 matches
4import anime from "https://esm.sh/animejs@3.2.1";
56function App() {
7return (
8<div className="app">
16}
1718function BackgroundAnimation() {
19const svgRef = useRef(null);
2048}
4950function Header() {
51const headerRef = useRef(null);
5276}
7778function Hero() {
79const heroRef = useRef(null);
80const [text, setText] = useState("Discover the Future of Search");
130}
131132function Features() {
133const featuresRef = useRef(null);
134const [activeFeature, setActiveFeature] = useState(null);
176}
177178function Footer() {
179return (
180<footer className="glassmorphism">
185}
186187function client() {
188createRoot(document.getElementById("root")).render(<App />);
189}
193}
194195export default async function server(request: Request): Promise<Response> {
196return new Response(`
197<!DOCTYPE html>