Back to packages list

Vals using hono

Description from the NPM package:
Web framework built on Web Standards
pomdtr avatar
blob_admin_edit
@pomdtr
Script
@jsxImportSource https://esm.sh/hono@4.0.8/jsx
pomdtr avatar
blob_admin_create
@pomdtr
Script
@jsxImportSource https://esm.sh/hono@4.0.8/jsx
pomdtr avatar
blob_admin_blob
@pomdtr
Script
@jsxImportSource https://esm.sh/hono@4.0.8/jsx
pomdtr avatar
blob_admin
@pomdtr
Script
Blob Admin This is a lightweight Blob Admin interface to view and debug your Blob data. Use this button to install the val: It uses basic authentication with your Val Town API Token as the password (leave the username field blank). TODO [x] /new - render a page to write a new blob key and value [x] /edit/:blob - render a page to edit a blob (prefilled with the existing content) [x] /delete/:blob - delete a blob and render success [x] add upload/download buttons [ ] Use modals for create/upload/edit/view/delete page (htmx ?) [ ] handle non-textual blobs properly [ ] use codemirror instead of a textarea for editing text blobs
pomdtr avatar
ssr_router
@pomdtr
HTTP
SSR Framework for val.town Usage The router map url paths to component vals. Component vals must export a React Component as their default export: export default function() { <h1>Hello World!</h1> } Optionally, you can define an handler next to your component, allowing you to handle query params or form inputs. Use the ctx.render function to pass props to your component. export const handler: Handler = (ctx) => { const url = new URL(ctx.req.url); const params = new URLSearchParams(url.search); return ctx.render({ name: params.get("name") }); }; export default function(props: {name?: string}) { <h1>Hello { name || "World }!</h1> }
nbbaier avatar
tealEarthworm
@nbbaier
HTTP
@jsxImportSource npm:hono/jsx
thu avatar
sendEmail
@thu
HTTP
An interactive, runnable TypeScript val by thu
greatcode avatar
tanHedgehog
@greatcode
HTTP
An interactive, runnable TypeScript val by greatcode
nbbaier avatar
sqliteExplorerApp
@nbbaier
HTTP
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 (v86) by forking this val: Authentication Login to your SQLite Explorer with password authentication with your Val Town API Token as the password. Todos / Plans [ ] improve error handling [ ] improve table formatting [ ] sticky table headers [x] 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 [ ] add refresh to table list sidebar after CREATE/DROP/ALTER statements [ ] add automatic execution of initial select query on double click [x] 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 [x] fix wonky sidebar separator height problem (thanks to @stevekrouse) [x] make result tables scrollable [x] add export to CSV, and JSON (CSV and JSON helper functions written in this val . Thanks to @pomdtr for merging the initial version!) [x] add listener for cmd+enter to submit query
jdan avatar
atlas
@jdan
HTTP
An interactive, runnable TypeScript val by jdan
pomdtr avatar
ninja_keys
@pomdtr
HTTP
GET https://pomdtr-ninja_keys.web.val.run
vlad avatar
tempsimplegptexample
@vlad
HTTP
// Example of action that doesn't accept any input, but returns something
vlad avatar
gptApiFramework
@vlad
Script
Allows for automatic generation of Hono API comatible with GPTs. Endpoints' inputs and outputs need to be specified via types from which the Open API spec is generated automatically and available via /gpt/schema endpoint. Usage example: import { GptApi } from "https://esm.town/v/xkonti/gptApiFramework"; import { z } from "npm:zod"; /** * COMMON TYPES */ const ResponseCommandSchema = z.object({ feedback: z.string().describe("Feedback regarding submitted action"), command: z.string().describe("The command for the Mediator AI to follow strictly"), data: z.string().optional().describe("Additional data related to the given command"), }).describe("Contains feedback and further instructions to follow"); export type ResponseCommand = z.infer<typeof ResponseCommandSchema>; /** * INITIALIZE API */ const api = new GptApi({ url: "https://xkonti-planoverseerai.web.val.run", title: "Overseer AI API", description: "The API for interacting with the Overseer AI", version: "1.0.0", }); /** * REQUIREMENTS GATHERING ENDPOINTS */ api.nothingToJson<ResponseCommand>({ verb: "POST", path: "/newproblem", operationId: "new-problem", desc: "Endpoint for informing Overseer AI about a new problem presented by the User", requestSchema: null, requestDesc: null, responseSchema: ResponseCommandSchema, responseDesc: "Instruction on how to proceed with the new problem", }, async (ctx) => { return { feedback: "User input downloaded. Problem analysis is required.", command: await getPrompt("analyze-problem"), data: "", }; }); export default api.serve();
vladimyr avatar
feps
@vladimyr
HTTP
An interactive, runnable TypeScript val by vladimyr
saolsen avatar
htmx_hono_layout
@saolsen
HTTP
See what a minimal example of a hono + canvas game could look like.
nbbaier avatar
mirroredSearchAPI
@nbbaier
HTTP
Expanded search endpoint This is a mirrored version of the Val Town API /search/vals endpoint, meant mostly for use with pomdtr's vscode extension . It allows for more sophisticated filtering of the results of a search.