2import { sqlite } from "https://esm.town/v/std/sqlite";
3
4export default async function(req: Request): Promise<Response> {
5 const TABLE_NAME = "todepond_lab_login_users_with_times";
6 const body = await req.json();
3import { sqlite } from "https://esm.town/v/std/sqlite";
4
5export default async function(req: Request): Promise<Response> {
6 const body = await req.json();
7 let { username, password } = body;
2// It supports generating square images with a single dimension parameter or rectangular images with two dimension parameters.
3
4export default async function server(request: Request): Promise<Response> {
5 const url = new URL(request.url);
6 const parts = url.pathname.split('/').filter(Boolean);
95 <p>Start generating your own kitten images by using the form above or modifying the URL!</p>
96 <script>
97 document.getElementById('kittenForm').addEventListener('submit', function(e) {
98 e.preventDefault();
99 const width = document.getElementById('width').value;
6import { createRoot } from "https://esm.sh/react-dom/client";
7
8function App() {
9 const [imageUrl, setImageUrl] = useState("");
10 const [size, setSize] = useState("");
66}
67
68function client() {
69 createRoot(document.getElementById("root")).render(<App />);
70}
72if (typeof document !== "undefined") { client(); }
73
74async function testEndpoint() {
75 const testImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/280px-PNG_transparency_demonstration_1.png";
76 const testSize = "100x100";
91}
92
93export default async function server(req: Request): Promise<Response> {
94 const url = new URL(req.url);
95 if (url.pathname === "/test") {
2// It supports generating square images with a single dimension parameter or rectangular images with two dimension parameters.
3
4export default async function server(request: Request): Promise<Response> {
5 const url = new URL(request.url);
6 const parts = url.pathname.split('/').filter(Boolean);
8import { motion, AnimatePresence } from "https://esm.sh/framer-motion";
9
10function App() {
11 const [profiles, setProfiles] = useState([]);
12 const [currentIndex, setCurrentIndex] = useState(0);
146}
147
148function client() {
149 createRoot(document.getElementById("root")).render(<App />);
150}
152if (typeof document !== "undefined") { client(); }
153
154export default async function server(request: Request): Promise<Response> {
155 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
156 const SCHEMA_VERSION = 1;
1export function extractValInfo(url: string | URL) {
2 const { pathname, search } = new URL(url);
3 const [author, filename] = pathname.split("/").slice(-2);
19// console.log(ret.url);
20
21export default function({ iframeSrc }) {
22 return async (req) => {
23 const { extractValInfo } = await import("https://esm.town/v/pomdtr/extractValInfo");
52
53if (typeof document !== "undefined") {
54 (window as any).makeValleDrawClient = async function({ iframeSrc, model }) {
55 const ret = { url: "https://esm.sh/~ae19cbe7d55c481140f1002355f248f335382639" };
56
81 } = tldraw;
82
83 function MakeRealButton() {
84 const editor = useEditor();
85 const { addToast } = useToasts();
91 const { maxX, midY } = editor.getSelectionPageBounds();
92
93 const text = `export default async function main(req: Request): Promise<Response> {
94 return new Response("Hello, World!", {
95 headers: { "Content-Type": "text/plain" },
154 }
155
156 function App() {
157 return (
158 <>
298 ];
299
300 function getRotatedBoxShadow(rotation: number) {
301 const cssStrings = ROTATING_BOX_SHADOWS.map((shadow) => {
302 const { offsetX, offsetY, blur, spread, color } = shadow;
4import { OpenAI } from "https://esm.town/v/std/openai";
5
6export default async function server(req: Request): Promise<Response> {
7 console.log("Request method:", req.method);
8
91}
92
93async function extractTextFromPDF(file: File): Promise<string | null> {
94 try {
95 const { default: pdfjs } = await import("https://esm.sh/pdfjs-dist@3.4.120/build/pdf.min.js");
109}
110
111async function generateCoverLetter(resume: string, jobDescription: string): Promise<string> {
112 console.log("Entering generateCoverLetter function");
113 const openai = new OpenAI();
114 console.log("OpenAI instance created");
4import cheerio from "https://esm.sh/cheerio@1.0.0-rc.12";
5
6export default async function server(req: Request): Promise<Response> {
7 const url = new URL(req.url);
8 const formData = await req.formData().catch(() => null);
139}
140
141function parseFollowerCount(followerText: string): number {
142 const cleanText = followerText.replace(/,/g, '').toLowerCase();
143 const num = parseFloat(cleanText);
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.