{"_id":"webhookwidget","_rev":"4-603ce082592d4c31b64b4a7047f4706f","name":"webhookwidget","dist-tags":{"latest":"0.1.2"},"versions":{"0.0.0-stage":{"name":"webhookwidget","version":"0.0.0-stage","_id":"webhookwidget@0.0.0-stage","stub":true,"maintainers":[{"name":"owenoclee","email":"owen@smoothfrog.com"}],"dist":{"shasum":"2ade52c719cb36106448967f16afb5998d693a09","tarball":"https://registry.npmjs.org/webhookwidget/-/webhookwidget-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-5/Iut5tZRSjM8jvcTYRID2Grvcp1VVzpy1z81Uvx5VJ0YaXZqsQrcjPYGjKnsagGSheEolYLFAMZ99XP+xN/Jg==","signatures":[{"sig":"MEQCICd1d6C0G4/fO9nXV3vVMWYPvY3W+z3nWBYGxBqUDj4nAiAd5g65a6h0FRTjq/EwaO/0Y/nsm504xO8MPbjLoObihA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":335},"_npmUser":{"name":"owenoclee","email":"owen@smoothfrog.com"},"description":"Temporary package placeholder for staged publishing","directories":{}},"0.1.0":{"name":"webhookwidget","version":"0.1.0","keywords":["webhook widget","ios widget","widgetkit","home screen","qr code","cloudflare workers"],"author":{"name":"Smooth Frog Ltd","email":"support@webhookwidget.com"},"license":"MIT","_id":"webhookwidget@0.1.0","maintainers":[{"name":"owenoclee","email":"owen@smoothfrog.com"}],"homepage":"https://webhookwidget.com/docs/","bugs":{"url":"https://github.com/smoothfrog/webhookwidget/issues"},"bin":{"webhookwidget":"dist/cli.js"},"dist":{"shasum":"c08176740787b38bdb7912bfce1d6fc47a043a6b","tarball":"https://registry.npmjs.org/webhookwidget/-/webhookwidget-0.1.0.tgz","fileCount":15,"integrity":"sha512-uNEqpPepkp3gRSRFZ9+TXXODYTgqlHABwXTzXvhjFz/I9ZocskVZPExHf7+u3Bvf5um0MBBj7gCa+vMLFVwEDQ==","signatures":[{"sig":"MEUCIEAhFfbLlsUTML7v7n97SX5WA6RXEJu8zRMWm92es+/1AiEAjfbEDlDqNHDZZMwLyios+Quw3aXLwI98nMl0XjQDDeA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDil5BV1IVg8v9AZ7ZZgbB6UURKQEB+Fg5jQlT7l7PhbgIhAO9KkOlRasQPymhCcMfVmVSQluhfSHDLUeSC5Fnwh9Q0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40828},"type":"module","engines":{"node":">=18.3"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"b0cc66b101dfa4be751ea912935930d881e4c7f1","scripts":{"test":"npm run build && tsc -p test/tsconfig.json && node --test test/*.test.mjs","build":"rm -rf dist && tsc -p tsconfig.json && chmod +x dist/cli.js","prepublishOnly":"npm test"},"_npmUser":{"name":"owenoclee","email":"owen@smoothfrog.com"},"repository":{"url":"git+https://github.com/smoothfrog/webhookwidget.git","type":"git","directory":"packages/webhookwidget"},"_npmVersion":"11.4.2","description":"Types and links for Webhook Widget, which turns any JSON endpoint into an iPhone widget, plus a CLI for setup QR codes and previews","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"uqr":"0.1.3"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.9.3","@types/node":"22.20.5"},"_npmOperationalInternal":{"tmp":"tmp/webhookwidget_0.1.0_1793138303131_0.8242038842312699","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"webhookwidget","version":"0.1.1","keywords":["webhook widget","widget","iphone","ios","ios widget","widgetkit","home screen","lock screen","json","webhook","dashboard","qr code","cloudflare workers","typescript"],"author":{"name":"Smooth Frog Ltd","email":"support@webhookwidget.com"},"license":"MIT","_id":"webhookwidget@0.1.1","maintainers":[{"name":"owenoclee","email":"owen@smoothfrog.com"}],"homepage":"https://webhookwidget.com/docs/quickstart/","bugs":{"url":"https://github.com/smoothfrog/webhookwidget/issues"},"bin":{"webhookwidget":"dist/cli.js"},"dist":{"shasum":"4f6705ea5fa6ad068c10bae92aa1de6db8b29ed7","tarball":"https://registry.npmjs.org/webhookwidget/-/webhookwidget-0.1.1.tgz","fileCount":15,"integrity":"sha512-t2aa4M/Q08+4cYkzKwSxK1+zpXPi1l+O84wGlFSd4IInOkVvQblxJp4aCw5QkLz5AP1ELaubC8U13trnWNi8Pg==","signatures":[{"sig":"MEUCIQCtiPMOeAIezP/J5cB2pD87e6RZF9miCN0nZ9G5JkiPGgIgSs1VM+nsq/Gm2DzohqDL9LGiDj3B98CZYyT+KwGG6ec=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIHJNmnbtG1y13GLWcbtQZHGHrbYJjNnYoxIAo2APpmFtAiBDQzxzLP12u7WGqmUfZdWwtd1Vf7ih+CVbs3k9qgyBlg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42537},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.3"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"823b176bf2285672e2f1162afb0a675844b6bc86","scripts":{"test":"npm run build && tsc -p test/tsconfig.json && node --test test/*.test.mjs","build":"rm -rf dist && tsc -p tsconfig.json && chmod +x dist/cli.js","prepublishOnly":"npm test"},"_npmUser":{"name":"owenoclee","email":"owen@smoothfrog.com"},"repository":{"url":"git+https://github.com/smoothfrog/webhookwidget.git","type":"git","directory":"packages/webhookwidget"},"_npmVersion":"11.4.2","description":"Types and links for Webhook Widget, which turns any JSON endpoint into an iPhone widget, plus a CLI for setup QR codes and previews","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"uqr":"0.1.3"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.9.3","@types/node":"22.20.5"},"_npmOperationalInternal":{"tmp":"tmp/webhookwidget_0.1.1_1794142881001_0.900381168119631","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"_id":"webhookwidget@0.1.2","bin":{"webhookwidget":"dist/cli.js"},"bugs":{"url":"https://github.com/smoothfrog/webhookwidget/issues"},"dist":{"shasum":"a88c35d81bf14aef293ad48ae07b113d782f1a5d","tarball":"https://registry.npmjs.org/webhookwidget/-/webhookwidget-0.1.2.tgz","fileCount":15,"integrity":"sha512-etvIxIRrNsE2q/m6Gf/xuJ+6abVgzUBhcaUBzetVsL9rPxbCjd65qDplBmNA6hPjXmNeww2BmZ4S//HyM/h09g==","signatures":[{"sig":"MEUCIQCp+TiQXYcIlyDrzJWQtJ9AEWue3n/gXoZNywXSYCLVlwIgeu+wHRpGrM5B3dCjEpF/q8bEMRjA5RxPpbzu4etZ2B8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDalO9QZnjr819tSCv40AgX1ECsP4jH5R2zpnpbrFYplQIgN8kpozhFKyeVKcVSZe9tG1fvNBV7vovb4NrNEG/g8CI="}],"unpackedSize":42902},"main":"./dist/index.js","name":"webhookwidget","type":"module","types":"./dist/index.d.ts","author":{"name":"Smooth Frog Ltd","email":"support@webhookwidget.com"},"engines":{"node":">=18.3"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"c1d4a1b56f44b6f1a13c0a3c6f88fd0db9b02147","license":"MIT","scripts":{"test":"npm run build && tsc -p test/tsconfig.json && node --test test/*.test.mjs","build":"rm -rf dist && tsc -p tsconfig.json && chmod +x dist/cli.js","prepublishOnly":"npm test"},"version":"0.1.2","_npmUser":{"name":"owenoclee","email":"owen@smoothfrog.com"},"homepage":"https://webhookwidget.com/docs/quickstart/","keywords":["webhook widget","widget","iphone","ios","ios widget","widgetkit","home screen","lock screen","json","webhook","dashboard","qr code","cloudflare workers","typescript"],"repository":{"url":"git+https://github.com/smoothfrog/webhookwidget.git","type":"git","directory":"packages/webhookwidget"},"_npmVersion":"11.4.2","description":"Types and links for Webhook Widget, which turns any JSON endpoint into an iPhone widget, plus a CLI for setup QR codes and previews","directories":{},"maintainers":[{"name":"owenoclee","email":"owen@smoothfrog.com"}],"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"uqr":"0.1.3"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.9.3","@types/node":"22.20.5"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/webhookwidget_0.1.2_1794173443320_0.005748006924949145"}}},"time":{"created":"2026-10-27T21:56:15.525Z","modified":"2026-11-08T21:30:43.580Z","0.0.0-stage":"2026-10-27T21:56:15.525Z","0.1.0":"2026-10-27T21:58:23.308Z","0.1.1":"2026-11-08T13:01:21.090Z","0.1.2":"2026-11-08T21:30:43.448Z"},"bugs":{"url":"https://github.com/smoothfrog/webhookwidget/issues"},"author":{"name":"Smooth Frog Ltd","email":"support@webhookwidget.com"},"license":"MIT","homepage":"https://webhookwidget.com/docs/quickstart/","keywords":["webhook widget","widget","iphone","ios","ios widget","widgetkit","home screen","lock screen","json","webhook","dashboard","qr code","cloudflare workers","typescript"],"repository":{"url":"git+https://github.com/smoothfrog/webhookwidget.git","type":"git","directory":"packages/webhookwidget"},"description":"Types and links for Webhook Widget, which turns any JSON endpoint into an iPhone widget, plus a CLI for setup QR codes and previews","maintainers":[{"name":"owenoclee","email":"owen@smoothfrog.com"}],"readme":"# webhookwidget\n\n[Webhook Widget](https://webhookwidget.com) turns any JSON endpoint into an iPhone widget. Your\nserver returns the whole layout (stacks, grids, text, live timers, gauges, symbols and images),\nand the app draws it on the Home Screen and Lock Screen.\n\nYou need the app, on an iPhone or iPad with iOS 26.2 or later: [webhookwidget.com](https://webhookwidget.com).\nYour own widgets are free for 7 days, then a one-time purchase, with no subscription. Widgets\nsomeone shares with you are always free.\n\nThis package has two parts:\n\n- **Types** for the payload, so a widget that type-checks is one the app accepts, and helpers\n  for the request the app sends.\n- **A CLI**, `npx webhookwidget`, that turns an endpoint into a QR code to scan with the iPhone\n  camera, and turns a payload into a playground link that draws it with the app's own engine.\n\nWant a working endpoint first? The [Cloudflare Workers starter](https://github.com/smoothfrog/webhookwidget/tree/main/templates/starter)\ndeploys one in a click.\n\n## The CLI\n\n```sh\n# A QR code to add the hook: scan it with the iPhone camera.\nnpx webhookwidget qr --name \"Status\" --url https://example.com/widget\n\n# With a token. The secret comes from an environment variable, never the command line.\nread -rs WIDGET_TOKEN && export WIDGET_TOKEN\nnpx webhookwidget qr --name \"Status\" --url https://example.com/widget \\\n  --auth bearer --secret-env WIDGET_TOKEN --png status.png\n\n# The setup link itself, webhookwidget://register?...\nnpx webhookwidget link --name \"Status\" --url https://example.com/widget\n\n# A playground link that draws a payload: from a file, stdin, or a live endpoint.\nnpx webhookwidget preview payload.json --family small --open\nnpx webhookwidget preview https://example.com/widget --auth bearer --secret-env WIDGET_TOKEN\n```\n\n`preview --headless` gives the screenshot version: the widget alone on a wallpaper. The page's\ntitle becomes `preview-ready` once it has drawn. That is the link for an agent checking its own\nwork. `npx webhookwidget --help` lists every option.\n\nA setup link opens the app's hook editor with everything filled in, and nothing is saved until\nthe person taps Save. **The link and the QR code carry the secret**, so keep them out of chats,\nissues, commits and logs.\n\n## The types\n\n```ts\nimport { readRequest, type Payload } from \"webhookwidget\";\n\nexport default {\n  async fetch(request: Request): Promise<Response> {\n    const { family } = readRequest(request);\n    const payload = {\n      v: 1,\n      refresh: 900,\n      view: {\n        type: \"vstack\",\n        align: \"leading\",\n        padding: 16,\n        children: [\n          { type: \"text\", text: \"Deploys today\", style: \"caption\", color: \"secondary\" },\n          { type: \"text\", text: \"12\", style: family === \"systemSmall\" ? \"title\" : \"largeTitle\", weight: \"bold\" },\n          { type: \"timer\", from: new Date(), style: \"relative\", font: \"caption2\" },\n        ],\n      },\n    } satisfies Payload;\n    return Response.json(payload);\n  },\n};\n```\n\n`satisfies Payload` checks the payload and keeps its literal types; a misspelled node type,\ncolour or field fails to compile instead of failing on the phone. Dates can be `Date` objects:\n`JSON.stringify` writes them in the ISO 8601 form the app reads.\n\n| Export | What it is |\n| --- | --- |\n| `Payload`, `Node`, `Entry` and every node type | The response format. Reference: [webhookwidget.com/docs/schema](https://webhookwidget.com/docs/schema/) |\n| `readRequest(request)` | The widget's `family`, slot size, `scheme`, `locale`, `timeZone` and protocol version from the query string the app sends. Every field is absent when the request didn't come from the app. |\n| `registerLink(hook)` | The `webhookwidget://register?…` setup link for a hook: name, `https` URL and optional bearer, basic or header auth. |\n| `previewLink(payload, options)` | A playground link. Everything is in the fragment, which browsers never send to a server. |\n\nThe library itself has no dependencies and runs anywhere: Workers, Node, Deno, Bun or a\nbrowser. The CLI needs Node 18.3 or later.\n\n## For agents\n\n[webhookwidget.com/llms.txt](https://webhookwidget.com/llms.txt) is the format, the good\npractice, and the build loop in one page: write the endpoint, check it with\n`preview --headless`, then hand the person `qr` output to scan.\n\n## Licence\n\nMIT. Webhook Widget is made by [Smooth Frog Ltd](https://smoothfrog.com).\n","readmeFilename":"README.md"}