Search
aiImageGenerator
@jumptoai
@jsxImportSource https://esm.sh/react
Script
/** @jsxImportSource https://esm.sh/react */
import React, { useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
function ImageGenerator() {
const [error, setError] = useState<string | null>(null);
const generateImage = async (e: React.FormEvent) => {
e.preventDefault();
<script type="module">
import React from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
function ImageGenerator() {
if (rootElement) {
createRoot(rootElement).render(React.createElement(ImageGenerator));
renderApp();
avidAmaranthHare
@stevekrouse
stevekrouse.com - my personal website This val hosts my personal website. The view data is stored in Val Town SQLite - @std/sqlite. It used to live on Github Pages, which is why I proxy over requests to certain blog posts over to the Github Pages site still. Todos [ ] Speed up page load by loading sqlite data later like in @healeycodes/steve_web [ ] Store more (legally storable) analytics data, and maybe make a sparkline! [ ] Add some sort of way to contact me [ ] Move over all my blog posts from Github Pages (maybe into @std/blob as a CMS?)
HTTP
/** @jsxImportSource https://esm.sh/react */
import { email } from "https://esm.town/v/std/email?v=11";
import tailwindURL from "https://esm.town/v/stevekrouse/tailwindURL";
import { renderToString } from "npm:react-dom/server";
const linkClass = "text-blue-500 hover:underline";
{ children, href }: {
children?: React.ReactNode;
href: string;
supir
@turbo1912
@jsxImportSource https://esm.sh/react
Cron
/** @jsxImportSource https://esm.sh/react */
import fal from "npm:@fal-ai/serverless-client";
import { renderToString } from "npm:react-dom/server";
export default async function(interval: Interval) {
whiteThrush
@stevekrouse
SQLite Explorer View and interact with your Val Town SQLite data. It's based off Steve's excellent SQLite Admin val, adding the ability to run SQLite queries directly in the interface. This new version has a revised UI and that's heavily inspired by LibSQL Studio by invisal . This is now more an SPA, with tables, queries and results showing up on the same page. Install Install the latest stable version (v64) by forking this val that imports & exports it in your account: Authentication Login to your SQLite Explorer with password authentication with your Val Town API Token as the password. Todos / Plans [x] fix wonky sidebar separator height problem (thanks to @stevekrouse) [ ] improve error handling [ ] improve table formatting [x] make result tables scrollable [ ] sticky table headers [ ] add codemirror [ ] add loading indication to the run button (initial version shipped) [ ] add ability to favorite queries [ ] add saving of last query run for a table (started) [ ] add visible output for non-query statements [ ] add schema viewing [x] add export to CSV, and JSON (CSV and JSON helper functions written in this val . Thanks to @pomdtr for merging the initial version!) [ ] add refresh to table list sidebar after CREATE/DROP/ALTER statements [ ] add automatic execution of initial select query on double click [x] add listener for cmd+enter to submit query [ ] add views to the sidebar [ ] add triggers to sidebar [ ] add upload from SQL, CSV and JSON [ ] add ability to connect to a non-val town Turso database
HTTP
## Todos / Plans
- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
- [ ] improve error handling
- [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!)
- [ ] add refresh to table list sidebar after `CREATE/DROP/ALTER` statements
- [ ] add automatic execution of initial select query on double click
- [x] add listener for cmd+enter to submit query
- [ ] add views to the sidebar
- [ ] add triggers to sidebar
- [ ] add upload from SQL, CSV and JSON
return c.render(
<main class="sidebar-layout">
<div class="sidebar">
<TablesList tables={tables}></TablesList>
<Separator direction="horizontal"></Separator>
<div class="not-sidebar">
<EditorSection />
preactExample
@stevekrouse
@jsxImportSource https://esm.sh/preact
HTTP
/** @jsxImportSource https://esm.sh/preact */
import { render } from "npm:preact-render-to-string";
export const preactExample = () =>
new Response(render(<div>Test {1 + 1}</div>), {
caniuse_notifier
@gunnnnii
@jsxImportSource npm:react
Cron
/** @jsxImportSource npm:react **/
import { blob } from "https://esm.town/v/std/blob";
import { email } from "https://esm.town/v/std/email";
import { renderToString } from "npm:react-dom@18/server";
const updatedKey = "caniuse-updated-at";
const dataKey = "caniuse-data";
linkInBioTemplate
@saezheneia
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import { renderToString } from "npm:react-dom/server";
export default async function(req: Request) {
return new Response(
assertiveJadeHorse
@trakflip
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 **/
import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
export default (req: Request) => {
return new Response(
testWebsite
@stevekrouse
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import { renderToString } from 'npm:react-dom/server';
export const testWebsite = (request: Request) => {
// convert to Response
niceTodoList
@maxm
* This is a minimalist to-do list app using server-side rendering without any client-side JavaScript.
* It uses Val Town's SQLite for data persistence, Deno's standard library for HTML escaping,
* and custom SVG icons for a cohesive design.
HTTP
* This is a minimalist to-do list app using server-side rendering without any client-side JavaScript.
* It uses Val Town's SQLite for data persistence, Deno's standard library for HTML escaping,
* and custom SVG icons for a cohesive design.
import { escapeHtml } from "https://deno.land/x/escape_html/mod.ts";
// Server-side only code
export default async function server(request: Request): Promise<Response> {
const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
animatedReadmeSVG
@maxm
Fancy animated SVGs in readmes, along with centering and image sizing. <div align="center"><img width=200 src="https://gpanders.com/img/DEC_VT100_terminal.jpg"></div> <p align="center">
<img src="https://maxm-animatedreadmesvg.web.val.run/comet.svg" />
</p> <p align="center">
<img src="https://maxm-animatedreadmesvg.web.val.run/custom text!" />
</p>
HTTP
/** @jsxImportSource https://esm.sh/react */
import { renderToString } from "npm:react-dom/server";
const genSVG = (request: Request): string => {
</svg>,
export const reactExample = (request: Request) =>
new Response(
protectiveAmberApe
@lxz07
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react **/
import { renderToString } from "https://esm.sh/react-dom@18/server";
export default (req: Request) => {
return new Response(
trpcClient
@andreterron2
An interactive, runnable TypeScript val by andreterron2
Script
export const trpcClient = await import("npm:@trpc/client");
myReactApp
@liamdanielduffy
An interactive, runnable TypeScript val by liamdanielduffy
Script
import { initializeReactApp as initializeReactApp2 } from "https://esm.town/v/liamdanielduffy/initializeReactApp";
import { myReactComponent as myReactComponent2 } from "https://esm.town/v/liamdanielduffy/myReactComponent";
import { addReactFromCDN } from "https://esm.town/v/liamdanielduffy/addReactFromCDN";
export function myReactApp() {
const loadReact = addReactFromCDN();
const myReactComponent = myReactComponent2();
const initializeReactApp = initializeReactApp2();
return [loadReact, myReactComponent, initializeReactApp].join(" ");