{"_id":"@eldrex/continuejs-svelte","name":"@eldrex/continuejs-svelte","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@eldrex/continuejs-svelte","version":"1.0.0","description":"Svelte action & store adapter for ContinueJS draft state persistence","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"publishConfig":{"access":"public"},"peerDependencies":{"svelte":"^4.0.0 || ^5.0.0"},"dependencies":{"@eldrex/continuejs":"^1.0.0"},"scripts":{"build":"tsc"},"sideEffects":false,"keywords":["continuejs","svelte","draftAction","useDraft","svelte-store","autosave"],"homepage":"https://continuejs.vercel.app","bugs":{"url":"https://github.com/EldrexDelosReyesBula/ContinueJS/issues"},"license":"MIT","author":{"name":"Eldrex Delos Reyes Bula","email":"eldrexdelosreyesbula@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/EldrexDelosReyesBula/ContinueJS.git"},"gitHead":"ee0bc1201ba59e11fb61a0bd82d7ba150b75da50","_id":"@eldrex/continuejs-svelte@1.0.0","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-HaGlow32vlUDPW4mPn8hZT9IeB3u1cALFmg6/qbHbJdm0X62/flLztwvNT3zpSA8Ef1CquvQPJdXL61UXnGVQA==","shasum":"923daca1116bd87157bc3d9e9e5c9de472f4bbda","tarball":"https://registry.npmjs.org/@eldrex/continuejs-svelte/-/continuejs-svelte-1.0.0.tgz","fileCount":8,"unpackedSize":10332,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC5YUGyduLV0fn6KRnL7SQnAKldRKhZHNtOHMi+FwY14QIgG1ie5C1IHjaDdnVXQNqPJdTS1Qr1qtoMPDxhaoICq6s="}]},"_npmUser":{"name":"eldrex","email":"eldrexdelosreyesbula@gmail.com"},"directories":{},"maintainers":[{"name":"eldrex","email":"eldrexdelosreyesbula@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/continuejs-svelte_1.0.0_1786806323674_0.04347260374869055"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-15T15:05:23.484Z","1.0.0":"2026-08-15T15:05:23.845Z","modified":"2026-08-15T15:05:23.999Z"},"maintainers":[{"name":"eldrex","email":"eldrexdelosreyesbula@gmail.com"}],"description":"Svelte action & store adapter for ContinueJS draft state persistence","homepage":"https://continuejs.vercel.app","keywords":["continuejs","svelte","draftAction","useDraft","svelte-store","autosave"],"repository":{"type":"git","url":"git+https://github.com/EldrexDelosReyesBula/ContinueJS.git"},"author":{"name":"Eldrex Delos Reyes Bula","email":"eldrexdelosreyesbula@gmail.com"},"bugs":{"url":"https://github.com/EldrexDelosReyesBula/ContinueJS/issues"},"license":"MIT","readme":"<p align=\"center\">\r\n  <img src=\"docs/assets/continuejs.png\" alt=\"ContinueJS Logo\" width=\"160\" />\r\n</p>\r\n\r\n<h1 align=\"center\">ContinueJS</h1>\r\n\r\n<p align=\"center\">\r\n  <strong>A continuity engine for the web.</strong><br>\r\n  Local-first. Privacy-first. Dependency-free draft persistence for forms, editors, and wizards.\r\n</p>\r\n\r\n<p align=\"center\">\r\n  <a href=\"https://github.com/EldrexDelosReyesBula/ContinueJS/blob/main/LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"License\"></a>\r\n  <a href=\"https://www.typescriptlang.org/\"><img src=\"https://img.shields.io/badge/language-TypeScript-blue.svg\" alt=\"TypeScript\"></a>\r\n  <a href=\"https://continuejs.vercel.app\"><img src=\"https://img.shields.io/badge/docs-continuejs.vercel.app-indigo.svg\" alt=\"Documentation\"></a>\r\n</p>\r\n\r\n---\r\n\r\n## ⚡ What is ContinueJS?\r\n\r\n**ContinueJS** makes losing user progress on the web extremely difficult. \r\n\r\nEvery day, users lose progress due to accidental tab closures, browser crashes, lost Wi-Fi connections, or misclicked navigation links. ContinueJS acts as an automated, local-first persistence layer between user input and browser storage (IndexedDB), preserving state until it is explicitly submitted or discarded.\r\n\r\n- 🔒 **Local-First & Privacy-Preserving**: Zero network calls, zero tracking, zero telemetry.\r\n- ⚡ **Framework Agnostic**: Pure Vanilla JS under 10 KB gzipped with first-class adapters for React, Vue, and Svelte.\r\n- 🛡️ **Smart Security**: Password fields and sensitive inputs are automatically excluded. Optional Web Crypto AES-GCM 256-bit client-side encryption.\r\n- 🤖 **Agentic Ready**: Designed for AI browser agents and automated form filling workflows.\r\n\r\n---\r\n\r\n## 📦 Installation\r\n\r\n```bash\r\n# Core library\r\nnpm install @continuejs/core\r\n\r\n# UI Web Components (Optional)\r\nnpm install @continuejs/ui\r\n\r\n# Framework Adapters (Optional)\r\nnpm install @continuejs/react    # React 18 & 19\r\nnpm install @continuejs/vue      # Vue 3\r\nnpm install @continuejs/svelte   # Svelte 4 & 5\r\n```\r\n\r\n---\r\n\r\n## 🚀 Quick Start (Vanilla JS)\r\n\r\n```typescript\r\nimport { attach } from '@continuejs/core';\r\nimport '@continuejs/ui'; // Registers <continuejs-banner> Web Component\r\n\r\n// 1. Attach ContinueJS to any form with one line\r\nconst { draft } = attach({\r\n  target: document.querySelector('#job-application'),\r\n  id: 'applicant-draft-v1',\r\n  options: {\r\n    retention: '7d', // Auto-expires after 7 days\r\n    debounceMs: 300,\r\n  },\r\n});\r\n\r\n// 2. Check if an unsaved draft exists from a previous session\r\nif (await draft.hasDraft()) {\r\n  const lastSaved = await draft.lastSaved();\r\n  \r\n  const banner = document.createElement('continuejs-banner');\r\n  banner.setAttribute('last-saved', String(lastSaved));\r\n  \r\n  banner.addEventListener('continuejs-restore', async () => {\r\n    await draft.restore(); // Automatically fills out all form fields!\r\n  });\r\n  \r\n  banner.addEventListener('continuejs-discard', async () => {\r\n    await draft.delete();\r\n  });\r\n  \r\n  document.body.prepend(banner);\r\n}\r\n```\r\n\r\n---\r\n\r\n## 🌐 CDN Usage (No Build Step)\r\n\r\n```html\r\n<script type=\"module\">\r\n  import { createDraft, attach } from 'https://esm.sh/@continuejs/core';\r\n  import 'https://esm.sh/@continuejs/ui';\r\n\r\n  attach({\r\n    target: document.querySelector('#feedback-form'),\r\n    id: 'feedback-draft',\r\n  });\r\n</script>\r\n```\r\n\r\n---\r\n\r\n## 🎨 White-Labeling via CSS Shadow Parts\r\n\r\nContinueJS Web Components (`<continuejs-banner>` and `<continuejs-modal>`) feature full white-labeling capability:\r\n\r\n```css\r\n/* Customizing <continuejs-banner> */\r\ncontinuejs-banner::part(banner) {\r\n  background: #0f172a;\r\n  border-radius: 16px;\r\n  border: 1px solid #6366f1;\r\n}\r\n\r\ncontinuejs-banner::part(restore-button) {\r\n  background: #6366f1;\r\n  color: white;\r\n  border-radius: 9999px;\r\n}\r\n```\r\n\r\n---\r\n\r\n## 🤖 AI / IDE Agent Support\r\n\r\nTo prevent AI coding assistants (Cursor, GitHub Copilot, Gemini CLI, Windsurf, Claude Code) from hallucinating function signatures, ContinueJS includes:\r\n\r\n- **[`llms.txt`](llms.txt)**: Standard machine-readable specification.\r\n- **[`AGENTS.md`](AGENTS.md)**: Explicit code generation context and anti-hallucination rules.\r\n\r\n---\r\n\r\n## 📖 Documentation & Contact\r\n\r\n- 📚 **Official Documentation**: [continuejs.vercel.app](https://continuejs.vercel.app)\r\n- 🐙 **GitHub Repository**: [https://github.com/EldrexDelosReyesBula/ContinueJS](https://github.com/EldrexDelosReyesBula/ContinueJS)\r\n- 📧 **Author & Contact**: Eldrex Delos Reyes Bula (`eldrexdelosreyesbula@gmail.com`)\r\n- 📝 **License**: MIT License\r\n","readmeFilename":"README.md","_rev":"1-0512ced14ce03d1f83a12d0e282fba0a"}