{"_id":"@dellamora/scratch-to-reveal-svelte","_rev":"4-29fcb3bb4dc8337da15fa0f9e0af576d","name":"@dellamora/scratch-to-reveal-svelte","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.2":{"name":"@dellamora/scratch-to-reveal-svelte","version":"1.0.2","keywords":["svelte","scratch","reveal","canvas","interactive","component"],"author":{"name":"Francielle Dellamora"},"license":"MIT","_id":"@dellamora/scratch-to-reveal-svelte@1.0.2","maintainers":[{"name":"dellamora","email":"francielle@dellamora.dev"}],"homepage":"https://github.com/dellamora/scratch-to-reveal-svelte#readme","bugs":{"url":"https://github.com/dellamora/scratch-to-reveal-svelte/issues"},"dist":{"shasum":"7f9faad6c55e46cf03a67b712d575dbcdfb03df9","tarball":"https://registry.npmjs.org/@dellamora/scratch-to-reveal-svelte/-/scratch-to-reveal-svelte-1.0.2.tgz","fileCount":6,"integrity":"sha512-11nwkUoaIcmcyLl4+gYpCagrEo6Xs0VmNtGqfbREyJLG0yv0P3HfPrF2AUIod7uS6yIX0Y/M8IFum1PGhmWxtA==","signatures":[{"sig":"MEQCIB8P0C9GuMn3sMPqcaE1uJ3CAMMK+BuDlniQszt4DFSvAiAm5p+2GpqdQAt3dNcQpZYJHERzlrLHtBh2XOvb4I4oVg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13016},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js"}},"gitHead":"4494b87a543f244fca9212bbefa6fede9c02e96b","scripts":{"dev":"vite dev","test":"vitest run","build":"vite build && npm run package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","package":"svelte-kit sync && svelte-package && publint","preview":"vite preview","test:watch":"vitest","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","prepublishOnly":"npm run package"},"_npmUser":{"name":"dellamora","email":"francielle@dellamora.dev"},"repository":{"url":"git+https://github.com/dellamora/scratch-to-reveal-svelte.git","type":"git"},"_npmVersion":"10.9.2","description":"A simple and customizable scratch-to-reveal component for Svelte","directories":{},"_nodeVersion":"22.14.0","dependencies":{"prismjs":"^1.30.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.3","jsdom":"^27.0.0","tslib":"^2.4.1","svelte":"^5.38.10","vitest":"^3.2.4","publint":"^0.1.9","typescript":"^5.0.0","svelte-check":"^4.3.1","@sveltejs/kit":"^2.42.1","@types/prismjs":"^1.26.5","@sveltejs/package":"^2.0.0","@sveltejs/adapter-auto":"^3.0.0","@testing-library/svelte":"^5.2.8","@testing-library/jest-dom":"^6.8.0","@sveltejs/vite-plugin-svelte":"^4.0.0-next.6"},"peerDependencies":{"svelte":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/scratch-to-reveal-svelte_1.0.2_1758093602812_0.4563146324389751","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@dellamora/scratch-to-reveal-svelte","version":"1.0.3","keywords":["svelte","scratch","reveal","canvas","interactive","component"],"author":{"name":"Francielle Dellamora"},"license":"MIT","_id":"@dellamora/scratch-to-reveal-svelte@1.0.3","maintainers":[{"name":"dellamora","email":"francielle@dellamora.dev"}],"homepage":"https://github.com/dellamora/scratch-to-reveal-svelte#readme","bugs":{"url":"https://github.com/dellamora/scratch-to-reveal-svelte/issues"},"dist":{"shasum":"9b650b9527349842f2f0da64c0b78ab60c9fd59e","tarball":"https://registry.npmjs.org/@dellamora/scratch-to-reveal-svelte/-/scratch-to-reveal-svelte-1.0.3.tgz","fileCount":6,"integrity":"sha512-+EjlnkwB7rQGgBcWsWs/RtKcOOqiOiASb3oC9N6ffHg1yEGEorYg+8JX2xegHYqfIw2BqW7rBqpsfdxkPcGKXQ==","signatures":[{"sig":"MEYCIQDVwAP9bunwKhqspa8HWQ993Im14eraF9TiQi8s10lNzgIhAOSVtD/D1yrHSeSXk7foPDAO+5t6D0qbrElWCe7x7Lf7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13016},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js"}},"gitHead":"eb2d5d1152b3ae127e4b9bed69a3305f872ebf28","scripts":{"dev":"vite dev","test":"vitest run","build":"vite build && npm run package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","package":"svelte-kit sync && svelte-package && publint","preview":"vite preview","test:watch":"vitest","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","prepublishOnly":"npm run package"},"_npmUser":{"name":"dellamora","email":"francielle@dellamora.dev"},"repository":{"url":"git+https://github.com/dellamora/scratch-to-reveal-svelte.git","type":"git"},"_npmVersion":"10.9.2","description":"A simple and customizable scratch-to-reveal component for Svelte","directories":{},"_nodeVersion":"22.14.0","dependencies":{"prismjs":"^1.30.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.3","jsdom":"^27.0.0","tslib":"^2.4.1","svelte":"^5.38.10","vitest":"^3.2.4","publint":"^0.1.9","typescript":"^5.0.0","svelte-check":"^4.3.1","@sveltejs/kit":"^2.42.1","@types/prismjs":"^1.26.5","@sveltejs/package":"^2.0.0","@sveltejs/adapter-auto":"^3.0.0","@testing-library/svelte":"^5.2.8","@testing-library/jest-dom":"^6.8.0","@sveltejs/vite-plugin-svelte":"^4.0.0-next.6"},"peerDependencies":{"svelte":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/scratch-to-reveal-svelte_1.0.3_1758094192072_0.3136885248350134","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@dellamora/scratch-to-reveal-svelte","version":"1.0.4","keywords":["svelte","scratch","reveal","canvas","interactive","component"],"author":{"name":"Francielle Dellamora"},"license":"MIT","_id":"@dellamora/scratch-to-reveal-svelte@1.0.4","maintainers":[{"name":"dellamora","email":"francielle@dellamora.dev"}],"homepage":"https://github.com/dellamora/scratch-to-reveal-svelte#readme","bugs":{"url":"https://github.com/dellamora/scratch-to-reveal-svelte/issues"},"dist":{"shasum":"7bb545a94e784128fe313667948c3864ca1e1ecf","tarball":"https://registry.npmjs.org/@dellamora/scratch-to-reveal-svelte/-/scratch-to-reveal-svelte-1.0.4.tgz","fileCount":6,"integrity":"sha512-ko0n7xuV7mcOPJp4P+IUDvAaCDtfaGH2EsZ5ab2qNMiF5NxFAv4pz/FyXMonoHgKfmTQ/z6aiU1mgbmH9VGHLw==","signatures":[{"sig":"MEUCIDMns0ktfJCRgCsY5RcHOHisE/aDq9MHtBYmighpdaffAiEA+YJWk9WZaLz+xcxkTOWhHakzLaX4/VMz/EDVoUL7b/I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13016},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js"}},"gitHead":"6579ceebe8857c4e5ddda1463bbbf71945f610a1","scripts":{"dev":"vite dev","test":"vitest run","build":"vite build && npm run package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","package":"svelte-kit sync && svelte-package && publint","preview":"vite preview","test:watch":"vitest","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","prepublishOnly":"npm run package"},"_npmUser":{"name":"dellamora","email":"francielle@dellamora.dev"},"repository":{"url":"git+https://github.com/dellamora/scratch-to-reveal-svelte.git","type":"git"},"_npmVersion":"10.9.2","description":"A simple and customizable scratch-to-reveal component for Svelte","directories":{},"_nodeVersion":"22.14.0","dependencies":{"prismjs":"^1.30.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.3","jsdom":"^27.0.0","tslib":"^2.4.1","svelte":"^5.38.10","vitest":"^3.2.4","publint":"^0.1.9","typescript":"^5.0.0","svelte-check":"^4.3.1","@sveltejs/kit":"^2.42.1","@types/prismjs":"^1.26.5","@sveltejs/package":"^2.0.0","@sveltejs/adapter-auto":"^3.0.0","@testing-library/svelte":"^5.2.8","@testing-library/jest-dom":"^6.8.0","@sveltejs/vite-plugin-svelte":"^4.0.0-next.6"},"peerDependencies":{"svelte":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/scratch-to-reveal-svelte_1.0.4_1758094997757_0.7298220729817402","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@dellamora/scratch-to-reveal-svelte","version":"1.0.5","description":"A simple and customizable scratch-to-reveal component for Svelte","main":"dist/index.js","module":"dist/index.js","types":"dist/index.d.ts","scripts":{"dev":"vite dev","build":"vite build && npm run package","preview":"vite preview","package":"svelte-kit sync && svelte-package && publint","prepublishOnly":"npm run package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","test":"vitest run","test:watch":"vitest"},"exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js"}},"keywords":["svelte","scratch","reveal","canvas","interactive","component"],"author":{"name":"Francielle Dellamora"},"repository":{"type":"git","url":"git+https://github.com/dellamora/scratch-to-reveal-svelte.git"},"homepage":"https://github.com/dellamora/scratch-to-reveal-svelte#readme","license":"MIT","devDependencies":{"@sveltejs/adapter-auto":"^3.0.0","@sveltejs/kit":"^2.42.1","@sveltejs/package":"^2.0.0","@sveltejs/vite-plugin-svelte":"^4.0.0-next.6","@testing-library/jest-dom":"^6.8.0","@testing-library/svelte":"^5.2.8","@types/prismjs":"^1.26.5","jsdom":"^27.0.0","publint":"^0.1.9","svelte":"^5.38.10","svelte-check":"^4.3.1","tslib":"^2.4.1","typescript":"^5.0.0","vite":"^5.0.3","vitest":"^3.2.4"},"peerDependencies":{"svelte":"^5.0.0"},"type":"module","dependencies":{"prismjs":"^1.30.0"},"_id":"@dellamora/scratch-to-reveal-svelte@1.0.5","gitHead":"6b8b16607743472e516fb4c70292c925740fcd84","bugs":{"url":"https://github.com/dellamora/scratch-to-reveal-svelte/issues"},"_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-WLzd88Blpr8srUxuSB7QJ5KikSfFMTGqfrydhrsH+6lE7igToQmSF36O2TuHlxgBL3PZtJl3weXGSvvR59WpZw==","shasum":"cfc3758701cdb5386c2945d649bb7cd6d101d8de","tarball":"https://registry.npmjs.org/@dellamora/scratch-to-reveal-svelte/-/scratch-to-reveal-svelte-1.0.5.tgz","fileCount":6,"unpackedSize":13016,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDSTlEWURS1TfyZLWMR1bPLOI8mQ/b2cdgw0bEZ2D9XHwIgYXmUjO+CqBYKcvkNCGry7Q/pdoE7GcAnE0Jzu0KqH78="}]},"_npmUser":{"name":"dellamora","email":"francielle@dellamora.dev"},"directories":{},"maintainers":[{"name":"dellamora","email":"francielle@dellamora.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/scratch-to-reveal-svelte_1.0.5_1758095127220_0.4385446473892496"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-17T07:20:02.720Z","modified":"2025-09-17T07:45:27.645Z","1.0.2":"2025-09-17T07:20:02.975Z","1.0.3":"2025-09-17T07:29:52.256Z","1.0.4":"2025-09-17T07:43:17.942Z","1.0.5":"2025-09-17T07:45:27.447Z"},"bugs":{"url":"https://github.com/dellamora/scratch-to-reveal-svelte/issues"},"author":{"name":"Francielle Dellamora"},"license":"MIT","homepage":"https://github.com/dellamora/scratch-to-reveal-svelte#readme","keywords":["svelte","scratch","reveal","canvas","interactive","component"],"repository":{"type":"git","url":"git+https://github.com/dellamora/scratch-to-reveal-svelte.git"},"description":"A simple and customizable scratch-to-reveal component for Svelte","maintainers":[{"name":"dellamora","email":"francielle@dellamora.dev"}],"readme":"# Scratch to Reveal Svelte\n\n<img src=\"/gif.gif\">\n\n## Installation\n\n```bash\nnpm i scratch-to-reveal-svelte\n```\n\n## Minimal Example\n\n```svelte\n<ScratchToReveal \n  width={250}\n  height={250}\n  minScratchPercentage={70}\n  gradientColors={[\"#A97CF8\", \"#F38CB8\", \"#FDCC92\"]}\n  onComplete={() => console.log('done!')}\n>\n  <p style=\"font-size: 6rem;\">Hiii</p>\n</ScratchToReveal>\n```\n\n## Props\n\n- **`width` / `height`** → Canvas size\n- **`minScratchPercentage`** → When to trigger complete event\n- **`gradientColors`** → Overlay colors \n- **`imageUrl`** → Optional image to use instead of gradient\n- **`onComplete`** → Completion callback\n- **`className`** → Custom CSS classes\n\n## Events\n\n- **`on:complete`** → Fired when reveal threshold is hit\n- **`on:scratchProgress`** → Live percentage updates\n\n## Methods\n\n- **`.reveal()`** → Reveal all content programmatically\n- **`.reset()`** → Reset to initial scratch state\n\n\n## License\n\nMIT. Build fun stuff.\n\n## Contributing\n\nPRs welcome!\n","readmeFilename":"README.md"}