{"_id":"@aimarket/widget","_rev":"2-9de15a16ee227657a428c39e01aa1132","name":"@aimarket/widget","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@aimarket/widget","version":"0.1.0","keywords":["aimarket","ai-market","embeddable-widget","ai-capabilities","marketplace","affiliate"],"license":"MIT","_id":"@aimarket/widget@0.1.0","maintainers":[{"name":"alexar76","email":"alexar76@rambler.ru"}],"homepage":"https://alexar76.github.io/aimarket-widget/","bugs":{"url":"https://github.com/alexar76/aimarket-widget/issues"},"dist":{"shasum":"6029250ece6df11c0d6d8538368e6d78de9bcd03","tarball":"https://registry.npmjs.org/@aimarket/widget/-/widget-0.1.0.tgz","fileCount":5,"integrity":"sha512-m+KHR6HwD9v7yYDw9INBAJeqlqIrVnyJEeC9xlZJJn8ohD50xEK+Qcnp35BL54dpdl6wabsreu5oj5XwzD8e5A==","signatures":[{"sig":"MEQCIA/+ZHixQ70vgUxkh1Hn5pClUgsj2bkdDsxtIaZtMJH8AiBTZ9f1XMt0UezbowP2rtqt2LDUrRJTlvNSXEF4jfJX8w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48958},"main":"widget.js","style":"themes.css","gitHead":"d42f93e6262861b0f4fc66b146b0f335c1337b97","scripts":{"test":"node -e \"const fs=require('fs'); for (const f of ['widget.js','themes.css']) { fs.accessSync(f); if (fs.statSync(f).size < 100) process.exit(1); }\"","prepublishOnly":"npm test"},"_npmUser":{"name":"alexar76","email":"alexar76@rambler.ru"},"repository":{"url":"git+https://github.com/alexar76/aimarket-widget.git","type":"git"},"_npmVersion":"10.9.4","description":"Embeddable AI capability search + invoke widget — one script tag, MIT, AIMarket Protocol v2","directories":{},"_nodeVersion":"22.22.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/widget_0.1.0_1782902820491_0.7764314689000666","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@aimarket/widget","version":"0.1.1","description":"Embeddable AI capability search + invoke widget — one script tag, MIT, AIMarket Protocol v2","license":"MIT","main":"widget.js","style":"themes.css","scripts":{"test":"node -e \"const fs=require('fs'); for (const f of ['widget.js','themes.css']) { fs.accessSync(f); if (fs.statSync(f).size < 100) process.exit(1); }\"","prepublishOnly":"npm test"},"publishConfig":{"access":"public"},"keywords":["aimarket","ai-market","embeddable-widget","ai-capabilities","marketplace","affiliate"],"homepage":"https://alexar76.github.io/aimarket-widget/","repository":{"type":"git","url":"git+https://github.com/alexar76/aimarket-widget.git"},"bugs":{"url":"https://github.com/alexar76/aimarket-widget/issues"},"_id":"@aimarket/widget@0.1.1","gitHead":"020977bf822e47855a656abd20e295c00fc33fde","_nodeVersion":"22.22.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-zWvRyRmOCKrYKxMOS3jv3aZbDa256ARKpNo0Efu5/rXHDyAcz0fqWCzEwJIjXW2FEU4WtsIN88w+ZGun9TFY5w==","shasum":"87ca18cbd0f7f0700b6726871aeed7ed09dccb76","tarball":"https://registry.npmjs.org/@aimarket/widget/-/widget-0.1.1.tgz","fileCount":5,"unpackedSize":48958,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCcTVo6RiLFIueDBGG5jw5b4ad5EKC3578DxGyNTWPkeAIhAMOeM4atKfCbALTt0wH7IwFjTY/TU/SwXsiCeA8vqJ35"}]},"_npmUser":{"name":"alexar76","email":"alexar76@rambler.ru"},"directories":{},"maintainers":[{"name":"alexar76","email":"alexar76@rambler.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/widget_0.1.1_1782903009145_0.8794874071677696"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-01T10:47:00.351Z","modified":"2026-07-01T10:50:09.430Z","0.1.0":"2026-07-01T10:47:00.649Z","0.1.1":"2026-07-01T10:50:09.283Z"},"bugs":{"url":"https://github.com/alexar76/aimarket-widget/issues"},"license":"MIT","homepage":"https://alexar76.github.io/aimarket-widget/","keywords":["aimarket","ai-market","embeddable-widget","ai-capabilities","marketplace","affiliate"],"repository":{"type":"git","url":"git+https://github.com/alexar76/aimarket-widget.git"},"description":"Embeddable AI capability search + invoke widget — one script tag, MIT, AIMarket Protocol v2","maintainers":[{"name":"alexar76","email":"alexar76@rambler.ru"}],"readme":"# AIMarket Widget v2.0.0\n\n<!-- aicom-readme-badges -->\n<p align=\"center\">\n  <a href=\"https://github.com/alexar76/aimarket-widget/actions/workflows/ci.yml\"><img src=\"https://img.shields.io/github/actions/workflow/status/alexar76/aimarket-widget/ci.yml?branch=main&label=CI\" alt=\"CI\" /></a>\n  <a href=\"#testing--coverage\"><img src=\"docs/badges/coverage.svg\" alt=\"Test coverage\" /></a>\n  <a href=\"https://www.npmjs.com/package/@aimarket/widget\"><img src=\"https://img.shields.io/npm/v/@aimarket/widget?label=npm\" alt=\"npm\" /></a>\n  <a href=\"LICENSE\"><img src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"License: MIT\" /></a>\n</p>\n<!-- /aicom-readme-badges -->\n\n\n\n\n\n\n\n> **Ecosystem:** [AICOM overview & live demos](https://modeldev.modelmarket.dev) · **Oracles:** [oracles.modelmarket.dev](https://oracles.modelmarket.dev) · [GitHub](https://github.com/alexar76/oracles) (verifiable randomness, VDF, consensus, …)\n\n**Embeddable AI capability search + invoke widget. One `<script>` tag.**\n\n## 1-Click Agent Embed\n\n**~60 seconds to production.** One `<script>` tag gives your site **discover + wallet channel + invoke UI** with theme auto-detect and affiliate economics.\n\n| | |\n|---|---|\n| **What** | `data-intent`, `data-budget`, `data-affiliate-id` → full agent surface |\n| **Why** | Stripe-Checkout simplicity for AI capabilities — no weeks of API glue |\n| **Deep dive** | [docs/killer-feature-one-click-embed.md](docs/killer-feature-one-click-embed.md) · [Ecosystem capabilities](../docs/killer-features.md) |\n\n## Live Demo\n\n**[GitHub Pages demo](https://alexar76.github.io/aimarket-widget/)** — static embed demo (enable Pages → GitHub Actions in repo settings)\n\n**[modelmarket.dev/widget/demo](https://modelmarket.dev/widget/demo)** — interactive demo with all 6 themes\n\n**[modelmarket.dev/live](https://modelmarket.dev/live)** — AI Economy live ticker (Bloomberg Terminal)\n\n## Quick Start\n\n### npm (bundler / static hosting)\n\n```bash\nnpm install @aimarket/widget\n```\n\n```html\n<link rel=\"stylesheet\" href=\"/node_modules/@aimarket/widget/themes.css\">\n<script src=\"/node_modules/@aimarket/widget/widget.js\"\n        data-theme=\"auto\"\n        data-intent=\"translate to 5 languages\"\n        data-budget=\"3.00\"\n        data-hub-url=\"https://modelmarket.dev\"\n        data-affiliate-id=\"my_blog\"></script>\n```\n\n### CDN (no build step)\n\n```html\n<script src=\"https://modelmarket.dev/widget/widget.js\"\n        data-theme=\"auto\"\n        data-intent=\"translate to 5 languages\"\n        data-budget=\"3.00\"\n        data-hub-url=\"https://modelmarket.dev\"\n        data-affiliate-id=\"my_blog\"></script>\n```\n\n## Themes\n\n| Theme | `data-theme` | Preview |\n|-------|-------------|---------|\n| Cyber (dark) | `cyber` | GitHub-style dark |\n| Neon | `neon` | High-contrast cyberpunk |\n| Light | `light` | Clean white |\n| Paper | `paper` | Warm minimalist |\n| Midnight | `midnight` | Dark blue enterprise |\n| Ocean | `ocean` | Teal & coral |\n| **Auto** | `auto` | **Detects parent page theme** |\n\n`data-theme=\"auto\"` detects the parent page's `data-theme-bg`, `<html>` class, background luminance, and `prefers-color-scheme` media query. Switches live when system theme changes.\n\n## Affiliate Program\n\nSet `data-affiliate-id=\"my_site\"` — earn 30% of every widget invocation spend from your visitors.\n\n## Security\n\n- **No inline event handlers** — all events via `addEventListener`. XSS-safe.\n- **Safe DOM** — user data rendered via `textContent`, never `innerHTML`\n- **Content escaping** — `<`, `>`, `&` escaped before any HTML insertion\n- **Safety gate** — injection attempts return HTTP 403 with signed rejection receipt\n\n## Try-before-buy (sandbox)\n\nThe **Try free (N)** button calls Hub with `X-AIMarket-Sandbox-Visitor` (stored in `localStorage`). No payment channel is opened until the visitor exhausts free trials (default 3 per visitor, hub-configurable).\n\nPaid flow (programmatic): `window.__aimwTryPaid(productId, capabilityId, sourceHub)` — opens v2 channel, invokes, settles.\n\nSee [docs/ecosystem-integration.md](../docs/ecosystem-integration.md).\n\n## API\n\nThe widget calls the hub's v2 API:\n\n| Call | Endpoint |\n|------|----------|\n| Search | `GET /ai-market/v2/search?intent=...&limit=6` |\n| Channel open | `POST /ai-market/v2/channel/open` |\n| Invoke | `POST /ai-market/v2/invoke` (with `X-Payment-Channel` header) |\n| Channel close | `POST /ai-market/v2/channel/close` |\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n\n## Governance\n\n| Doc | Purpose |\n|-----|---------|\n| [LICENSE](LICENSE) | MIT terms |\n| [SECURITY.md](SECURITY.md) | Vulnerability reporting |\n| [CONTRIBUTING.md](CONTRIBUTING.md) | How to contribute |\n| [CONTRIBUTORS.md](CONTRIBUTORS.md) | Maintainers & recognition |\n\nMaintained by AI-Factory · [Demo](https://modelmarket.dev/widget/demo) · [Live Stream](https://modelmarket.dev/live) · [Hub](https://modelmarket.dev)\n","readmeFilename":"README.md"}