{"_id":"svelte-dropzone-runes","_rev":"9-a3747997addf746601393c7ba60e29d6","name":"svelte-dropzone-runes","dist-tags":{"latest":"1.0.7"},"versions":{"1.0.1":{"name":"svelte-dropzone-runes","version":"1.0.1","keywords":["svelte","svelte-components","upload","dropzone","file","fileupload","svelte-dropzone-runes","svelte-dropzone","sveltejs","svelte-runes","runes","svelte5","sveltekit","svelte-kit"],"author":{"name":"Truirer"},"license":"MIT","_id":"svelte-dropzone-runes@1.0.1","maintainers":[{"name":"truirer","email":"berkemreuzun97@gmail.com"}],"homepage":"https://github.com/truirer/svelte-dropzone-runes#readme","bugs":{"url":"https://github.com/truirer/svelte-dropzone-runes/issues"},"dist":{"shasum":"94a02285e5f8995ab79bccdebc077432c21e60b3","tarball":"https://registry.npmjs.org/svelte-dropzone-runes/-/svelte-dropzone-runes-1.0.1.tgz","fileCount":21,"integrity":"sha512-guGhavp95+FIW5TGTXJPAoy/pZsUpokcdjb5H8TXiLnwL7zySAGoDeLhV+aCw7RYEW9exx4wb6HVyINjTTDC4w==","signatures":[{"sig":"MEUCIQD+pYAzxjevYyeJ1q2/XyaWqlT1+aNYHWYbzObZwG270AIgNXaUKXm2qfnBowCLXWbMRbM58mS4JW4WN0sZYYGIupk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36068},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","svelte":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js"}},"gitHead":"bd4305809c2f755f1d960016763468092be46444","scripts":{"dev":"vite dev","lint":"prettier --check .","pack":"svelte-kit sync && svelte-package && publint","build":"vite build","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","format":"prettier --write .","prepare":"svelte-kit sync || echo ''","preview":"vite preview","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"},"_npmUser":{"name":"truirer","email":"berkemreuzun97@gmail.com"},"repository":{"url":"git+https://github.com/Truirer/svelte-dropzone-runes.git"},"_npmVersion":"10.8.2","description":"Svelte component for fileupload and file dropzone. Compatible with Svelte 5 Runes","directories":{},"_nodeVersion":"20.19.0","dependencies":{"publint":"^0.3.11","file-selector":"^2.1.2","@sveltejs/package":"^2.0.0","@rollup/plugin-typescript":"^12.1.2"},"typesVersions":{">4.0":{"Dropzone.svelte":["./dist/components/Dropzone.svelte.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.2.5","svelte":"^5.0.0","vitest":"^3.1.1","publint":"^0.3.2","prettier":"^3.4.2","playwright":"^1.51.1","typescript":"^5.0.0","svelte-check":"^4.0.0","@sveltejs/kit":"^2.16.0","@vitest/browser":"^3.1.1","@vitest/coverage-v8":"^3.1.1","@sveltejs/adapter-auto":"^4.0.0","prettier-plugin-svelte":"^3.3.3","@sveltejs/vite-plugin-svelte":"^5.0.0"},"peerDependencies":{"svelte":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/svelte-dropzone-runes_1.0.1_1744788742356_0.6733770968841042","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"svelte-dropzone-runes","version":"1.0.3","keywords":["svelte","svelte-components","upload","dropzone","file","fileupload","svelte-dropzone-runes","svelte-dropzone","sveltejs","svelte-runes","runes","svelte5","sveltekit","svelte-kit"],"author":{"name":"Truirer"},"license":"MIT","_id":"svelte-dropzone-runes@1.0.3","maintainers":[{"name":"truirer","email":"berkemreuzun97@gmail.com"}],"homepage":"https://github.com/truirer/svelte-dropzone-runes#readme","bugs":{"url":"https://github.com/truirer/svelte-dropzone-runes/issues"},"dist":{"shasum":"8ce0dd027bb14db3aee7da235e8daec72a6c94d5","tarball":"https://registry.npmjs.org/svelte-dropzone-runes/-/svelte-dropzone-runes-1.0.3.tgz","fileCount":21,"integrity":"sha512-Pdtvqs+7/K5h3oQE8xDf+EEpxtxeJqEx3YbEmiK8y3Yay9+p+A66plLwbbaZQcd6GUIoZG+2WYgLhFj5RjdDuw==","signatures":[{"sig":"MEQCIA/Pgk27cFBZCoO5VAGzN7Vmptn91EPiz4tIbqTWINT3AiBJHN7juv65rtHyVG+vteIkkgaVXuOgKZ+s1N1/PHyKGw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36068},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","svelte":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js"}},"gitHead":"6f14289764b8d6264e93bc053784b9f9d8837c80","scripts":{"dev":"vite dev","lint":"prettier --check .","pack":"svelte-kit sync && svelte-package && publint","build":"vite build","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","format":"prettier --write .","prepare":"svelte-kit sync || echo ''","preview":"vite preview","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"},"_npmUser":{"name":"truirer","email":"berkemreuzun97@gmail.com"},"repository":{"url":"git+https://github.com/Truirer/svelte-dropzone-runes.git"},"_npmVersion":"10.8.2","description":"Svelte component for fileupload and file dropzone. Compatible with Svelte 5 Runes","directories":{},"_nodeVersion":"20.19.0","dependencies":{"publint":"^0.3.11","file-selector":"^2.1.2","@sveltejs/package":"^2.0.0","@rollup/plugin-typescript":"^12.1.2"},"typesVersions":{">4.0":{"Dropzone.svelte":["./dist/components/Dropzone.svelte.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.2.5","svelte":"^5.0.0","vitest":"^3.1.1","publint":"^0.3.2","prettier":"^3.4.2","playwright":"^1.51.1","typescript":"^5.0.0","svelte-check":"^4.0.0","@sveltejs/kit":"^2.16.0","@vitest/browser":"^3.1.1","@vitest/coverage-v8":"^3.1.1","@sveltejs/adapter-auto":"^4.0.0","prettier-plugin-svelte":"^3.3.3","@sveltejs/vite-plugin-svelte":"^5.0.0"},"peerDependencies":{"svelte":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/svelte-dropzone-runes_1.0.3_1745247421392_0.5642539609610422","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"svelte-dropzone-runes","version":"1.0.4","keywords":["svelte","svelte-components","upload","dropzone","file","fileupload","svelte-dropzone-runes","svelte-dropzone","sveltejs","svelte-runes","runes","svelte5","sveltekit","svelte-kit"],"author":{"name":"Truirer"},"license":"MIT","_id":"svelte-dropzone-runes@1.0.4","maintainers":[{"name":"truirer","email":"berkemreuzun97@gmail.com"}],"homepage":"https://github.com/truirer/svelte-dropzone-runes#readme","bugs":{"url":"https://github.com/truirer/svelte-dropzone-runes/issues"},"dist":{"shasum":"65c022c094620b48d1fe0f65c265f4bca8d14b1e","tarball":"https://registry.npmjs.org/svelte-dropzone-runes/-/svelte-dropzone-runes-1.0.4.tgz","fileCount":21,"integrity":"sha512-9ALw7s8lRoODzmzVyCdj8+rJwDNcZwhpeomg8AEL8umpdzSGqD3ZyF1KXyVbEb9u9WsNag1xgNRktLOIiiyx7Q==","signatures":[{"sig":"MEUCIQCbVliUDCZ8ci1k8bC4UigIylYsiPyQ1AinXo3qZrxWQQIgYjm52IYTUxCks5trCHoscmiJDTGwOiB/4sQtffqOrU0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35935},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","svelte":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js"}},"gitHead":"7d06b698f671ecd6e139ef183a2f4d9331d801fc","scripts":{"dev":"vite dev","lint":"prettier --check .","pack":"svelte-kit sync && svelte-package && publint","build":"vite build","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","format":"prettier --write .","prepare":"svelte-kit sync || echo ''","preview":"vite preview","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"},"_npmUser":{"name":"truirer","email":"berkemreuzun97@gmail.com"},"repository":{"url":"git+https://github.com/Truirer/svelte-dropzone-runes.git"},"_npmVersion":"10.8.2","description":"Svelte component for fileupload and file dropzone. Compatible with Svelte 5 Runes","directories":{},"_nodeVersion":"20.19.6","dependencies":{"publint":"^0.3.11","file-selector":"^2.1.2","@sveltejs/package":"^2.0.0","@rollup/plugin-typescript":"^12.1.2"},"typesVersions":{">4.0":{"Dropzone.svelte":["./dist/components/Dropzone.svelte.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.2.5","svelte":"^5.0.0","vitest":"^3.1.1","publint":"^0.3.2","prettier":"^3.4.2","playwright":"^1.51.1","typescript":"^5.0.0","svelte-check":"^4.0.0","@sveltejs/kit":"^2.16.0","@vitest/browser":"^3.1.1","@vitest/coverage-v8":"^3.1.1","@sveltejs/adapter-auto":"^4.0.0","prettier-plugin-svelte":"^3.3.3","@sveltejs/vite-plugin-svelte":"^5.0.0"},"peerDependencies":{"svelte":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/svelte-dropzone-runes_1.0.4_1768400708491_0.1530269884804627","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"svelte-dropzone-runes","version":"1.0.5","keywords":["svelte","svelte-components","upload","dropzone","file","fileupload","svelte-dropzone-runes","svelte-dropzone","sveltejs","svelte-runes","runes","svelte5","sveltekit","svelte-kit"],"author":{"name":"Truirer"},"license":"MIT","_id":"svelte-dropzone-runes@1.0.5","maintainers":[{"name":"truirer","email":"berkemreuzun97@gmail.com"}],"homepage":"https://github.com/truirer/svelte-dropzone-runes#readme","bugs":{"url":"https://github.com/truirer/svelte-dropzone-runes/issues"},"dist":{"shasum":"d029a449205d9e552ddc753f2a6a6a0bc6b78f10","tarball":"https://registry.npmjs.org/svelte-dropzone-runes/-/svelte-dropzone-runes-1.0.5.tgz","fileCount":21,"integrity":"sha512-S4dUKKO9ulYFr7JDc9K9xoDBe85dpw9+VhOX2XyWGELbBkf/2SFXpBYzoMb53TBGNdiAFkr3qab+6u+RjYLH5Q==","signatures":[{"sig":"MEYCIQD8+v/yB9bfprsJmzFyj5oLv0cJ9lHx5f4cP03hhsxjmgIhAIp7zmaDsgKK+w7wEO093/1rzMWy4soov5A5lVlQYSHY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35935},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","svelte":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js"}},"gitHead":"8cb152565770f4c889c7884ae78bbebfc229740c","scripts":{"dev":"vite dev","lint":"prettier --check .","pack":"svelte-kit sync && svelte-package && publint","build":"vite build","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","format":"prettier --write .","prepare":"svelte-kit sync || echo ''","preview":"vite preview","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"},"_npmUser":{"name":"truirer","email":"berkemreuzun97@gmail.com"},"repository":{"url":"git+https://github.com/Truirer/svelte-dropzone-runes.git"},"_npmVersion":"10.8.2","description":"Svelte component for fileupload and file dropzone. Compatible with Svelte 5 Runes","directories":{},"_nodeVersion":"20.19.6","dependencies":{"publint":"^0.3.11","file-selector":"^2.1.2","@sveltejs/package":"^2.0.0","@rollup/plugin-typescript":"^12.1.2"},"typesVersions":{">4.0":{"Dropzone.svelte":["./dist/components/Dropzone.svelte.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.2.5","svelte":"^5.0.0","vitest":"^3.1.1","publint":"^0.3.2","prettier":"^3.4.2","playwright":"^1.51.1","typescript":"^5.0.0","svelte-check":"^4.0.0","@sveltejs/kit":"^2.16.0","@vitest/browser":"^3.1.1","@vitest/coverage-v8":"^3.1.1","@sveltejs/adapter-auto":"^4.0.0","prettier-plugin-svelte":"^3.3.3","@sveltejs/vite-plugin-svelte":"^5.0.0"},"peerDependencies":{"svelte":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/svelte-dropzone-runes_1.0.5_1768590247569_0.42930050794924","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"svelte-dropzone-runes","version":"1.0.6","keywords":["svelte","svelte-components","upload","dropzone","file","fileupload","svelte-dropzone-runes","svelte-dropzone","sveltejs","svelte-runes","runes","svelte5","sveltekit","svelte-kit"],"author":{"name":"Truirer"},"license":"MIT","_id":"svelte-dropzone-runes@1.0.6","maintainers":[{"name":"truirer","email":"berkemreuzun97@gmail.com"}],"homepage":"https://github.com/truirer/svelte-dropzone-runes#readme","bugs":{"url":"https://github.com/truirer/svelte-dropzone-runes/issues"},"dist":{"shasum":"2dd925d8023233f874926fbc9ea99c0a0aaeb0b3","tarball":"https://registry.npmjs.org/svelte-dropzone-runes/-/svelte-dropzone-runes-1.0.6.tgz","fileCount":21,"integrity":"sha512-luNI4gXhB6GwThUiI5LfHr36TZz2Anj+8Y67S7b+6OorOTDONk1QRNTOwTHpQbz0eR2aaN9O1XJEJn+KWGbAZA==","signatures":[{"sig":"MEQCICduB6AflpazVPAQVjfOWH5aSCdmNZ7hI3krrv8QS9j6AiAYG9dGwuyYm+5H7An7Oi+eKSf3sJBYc/hEpPuEMSMGZg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35902},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","svelte":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js"}},"gitHead":"e255cc36b4f6d256c42a80a524b707ac66999476","scripts":{"dev":"vite dev","lint":"prettier --check .","pack":"svelte-kit sync && svelte-package && publint","build":"vite build","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","format":"prettier --write .","prepare":"svelte-kit sync || echo ''","preview":"vite preview","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"},"_npmUser":{"name":"truirer","email":"berkemreuzun97@gmail.com"},"repository":{"url":"git+https://github.com/Truirer/svelte-dropzone-runes.git"},"_npmVersion":"10.8.2","description":"Svelte component for fileupload and file dropzone. Compatible with Svelte 5 Runes","directories":{},"_nodeVersion":"20.20.0","dependencies":{"publint":"^0.3.11","file-selector":"^2.1.2","@sveltejs/package":"^2.0.0","@rollup/plugin-typescript":"^12.1.2"},"typesVersions":{">4.0":{"Dropzone.svelte":["./dist/components/Dropzone.svelte.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.2.5","svelte":"^5.0.0","vitest":"^3.1.1","publint":"^0.3.2","prettier":"^3.4.2","playwright":"^1.51.1","typescript":"^5.0.0","svelte-check":"^4.0.0","@sveltejs/kit":"^2.16.0","@vitest/browser":"^3.1.1","@vitest/coverage-v8":"^3.1.1","@sveltejs/adapter-auto":"^4.0.0","prettier-plugin-svelte":"^3.3.3","@sveltejs/vite-plugin-svelte":"^5.0.0"},"peerDependencies":{"svelte":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/svelte-dropzone-runes_1.0.6_1770031986559_0.8553542221622707","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"svelte-dropzone-runes","version":"1.0.7","description":"Svelte component for fileupload and file dropzone. Compatible with Svelte 5 Runes","scripts":{"dev":"vite dev","build":"vite build","preview":"vite preview","prepare":"svelte-kit sync || echo ''","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","format":"prettier --write .","lint":"prettier --check .","pack":"svelte-kit sync && svelte-package && publint"},"exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js"}},"typesVersions":{">4.0":{"Dropzone.svelte":["./dist/components/Dropzone.svelte.d.ts"]}},"repository":{"url":"git+https://github.com/Truirer/svelte-dropzone-runes.git"},"author":{"name":"Truirer"},"license":"MIT","peerDependencies":{"svelte":"^5.0.0"},"devDependencies":{"@sveltejs/adapter-auto":"^4.0.0","@sveltejs/kit":"^2.16.0","@sveltejs/vite-plugin-svelte":"^5.0.0","@vitest/browser":"^3.1.1","@vitest/coverage-v8":"^3.1.1","playwright":"^1.51.1","prettier":"^3.4.2","prettier-plugin-svelte":"^3.3.3","publint":"^0.3.2","svelte":"^5.0.0","svelte-check":"^4.0.0","typescript":"^5.0.0","vite":"^6.2.5","vitest":"^3.1.1"},"dependencies":{"@rollup/plugin-typescript":"^12.1.2","@sveltejs/package":"^2.0.0","file-selector":"^2.1.2","publint":"^0.3.11"},"keywords":["svelte","svelte-components","upload","dropzone","file","fileupload","svelte-dropzone-runes","svelte-dropzone","sveltejs","svelte-runes","runes","svelte5","sveltekit","svelte-kit"],"svelte":"./dist/index.js","types":"./dist/index.d.ts","type":"module","main":"./dist/index.js","bugs":{"url":"https://github.com/truirer/svelte-dropzone-runes/issues"},"homepage":"https://github.com/truirer/svelte-dropzone-runes#readme","_id":"svelte-dropzone-runes@1.0.7","gitHead":"ff1746305bf19966716ecfbc5e92dd5515e2c360","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-l2Ptc4iHYlo+aYvTVPd1qJilC/Oh3BI8KX4K22C7HQTbiXS0UkWL9Oks5Vl0A4V83QEYJBDZCD+VnlVyBbMJrQ==","shasum":"f2fd0a8ed108bb801ce6252cdbf97fd88136a2f3","tarball":"https://registry.npmjs.org/svelte-dropzone-runes/-/svelte-dropzone-runes-1.0.7.tgz","fileCount":21,"unpackedSize":35902,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC8em+Zc+J5XMCa/kfBFZnmz6HqXkYRyHsrWjny4oua9QIgNkSQCXuL9a6EvGxTY5ja0cLNYsZsXlAbodj++vzVPjE="}]},"_npmUser":{"name":"truirer","email":"berkemreuzun97@gmail.com"},"directories":{},"maintainers":[{"name":"truirer","email":"berkemreuzun97@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/svelte-dropzone-runes_1.0.7_1778587465838_0.3479675368021016"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-16T07:32:22.234Z","modified":"2026-05-12T12:04:26.124Z","1.0.0":"2025-04-14T10:13:11.496Z","1.0.1":"2025-04-16T07:32:22.551Z","1.0.3":"2025-04-21T14:57:01.625Z","1.0.4":"2026-01-14T14:25:08.641Z","1.0.5":"2026-01-16T19:04:07.712Z","1.0.6":"2026-02-02T11:33:06.728Z","1.0.7":"2026-05-12T12:04:26.014Z"},"bugs":{"url":"https://github.com/truirer/svelte-dropzone-runes/issues"},"author":{"name":"Truirer"},"license":"MIT","homepage":"https://github.com/truirer/svelte-dropzone-runes#readme","keywords":["svelte","svelte-components","upload","dropzone","file","fileupload","svelte-dropzone-runes","svelte-dropzone","sveltejs","svelte-runes","runes","svelte5","sveltekit","svelte-kit"],"repository":{"url":"git+https://github.com/Truirer/svelte-dropzone-runes.git"},"description":"Svelte component for fileupload and file dropzone. Compatible with Svelte 5 Runes","maintainers":[{"name":"truirer","email":"berkemreuzun97@gmail.com"}],"readme":"# 📦 svelte-dropzone-runes\nA lightweight, flexible, and fully-typed file dropzone component for Svelte 5, built with performance and customization in mind. Easily handle drag-and-drop or manual file selection with support for validation, custom rendering, and accessibility.\n\n## ✨ Features\n✅ Svelte 5-compatible (uses $props() and $state)\n\n📁 Drag & drop or click to select files\n\n🔎 File validation:\n\nAccepts specific types\n\nMin/max file size\n\nSupports single/multiple files\n\n🎨 Full custom UI rendering\n\n🧩 Integration-friendly via rich event callbacks\n\n🚫 Automatically prevents document-level drops (optional)\n\n## 📦 Installation\n```\nnpm install svelte-dropzone-runes\n```\n## 🛠 Props\n\n| Prop                        | Type                                        | Default         | Description                                                                                                                            |\n|-----------------------------|---------------------------------------------|-----------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| `accept`                    | `string[]`                                  | `undefined`     | Accepted MIME types or file extensions (e.g., `['image/jpeg']`).                                                                       |\n| `disabled`                  | `boolean`                                   | `false`         | Disables all interactions with the dropzone.                                                                                           |\n| `maxSize`                   | `number`                                    | `Infinity`      | Maximum file size (in bytes).                                                                                                          |\n| `minSize`                   | `number`                                    | `0`             | Minimum file size (in bytes).                                                                                                          |\n| `multiple`                  | `boolean`                                   | `false`         | Allows multiple files to be selected at once. If set false only the first file will be accepted.                                       |\n| `maxFileCountPerUpload`     | `number`                                    | `Infinity`      | Maximum number of files that can be uploaded at once. Requires `multiple` to be `true`.                                                |\n| `preventDropOnDocument`     | `boolean`                                   | `true`          | Prevents default drag-and-drop behavior on the entire document.                                                                        |\n| `disableDropzoneClick`      | `boolean`                                   | `false`         | Disables the ability to open the file dialog by clicking on the dropzone.                                                              |\n| `disableDropzoneKeydown`    | `boolean`                                   | `false`         | Disables the ability to open the file dialog by pressing keys.                                                                         |\n| `disableDropzoneDrag`       | `boolean`                                   | `false`         | Disables drag-and-drop functionality.                                                                                                  |\n| `name`                      | `string`                                    | `''`            | The name of the input, required when used inside a form.                                                                               |\n| `id`                        | `string`                                    | `undefined`     | The id of the input.                                                                                                                   |\n| `required`                  | `boolean`                                   | `false`         | Marks the input as required.                                                                                                           |\n| `dropzoneElement`           | `HTMLElement`                               | `undefined`     | A custom dropzone HTML element. You can bind dropzone events to any element by passing it here.                                        |\n| `inputElement`              | `HTMLInputElement`                          | `undefined`     | Used to access input element used inside `svelte-dropzone-runes`.                                                                      |\n| `CustomDropzone`            | `Snippet<[CustomDropzoneProps]>`            | `undefined`     | Function that renders a custom dropzone element. Use with `dropzoneElement` to bind dropzone events to the custom element.             |\n| `children`                  | `Snippet<[]>`                               | `undefined`     | Custom inner content (overrides the default message).                                                                                  |\n\n\n## 🎯  Events\n\n| Event                       | Types                                         | Payload                                          | Description                                                                                                                            |\n|-----------------------------|-----------------------------------------------|--------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| `onDragenter`               | `DropzoneEventHandler<DataTransferItem>`      | {acceptedFiles,fileRejections,event}             | Callback when a drag event enters the dropzone area.                                                                                   |\n| `onDragover`                | `DropzoneEventHandler<DataTransferItem>`      | {acceptedFiles,fileRejections,event}             | Callback when a file is dragged over the dropzone.                                                                                     |\n| `onDragleave`               | `DropzoneEventHandler<DataTransferItem>`      | {acceptedFiles,fileRejections,event}             | Callback when a file leaves the dropzone area.                                                                                         |\n| `onDrop`                    | `DropzoneEventHandler<File>`                  | {acceptedFiles,fileRejections,event}             | Callback when files are dropped onto the dropzone.                                                                                     |\n| `onFileDialogCancel`        | `() => void`                                  |                                                  | Callback when the file dialog is canceled.                                                                                             |\n\n## 🚀 Usage\nBasic Example\n```svelte\n\n<script lang=\"ts\">\n\timport Dropzone, { type DropzoneEvent, type RejectedFile } from 'svelte-dropzone-runes';\n\n\tlet files = $state({\n\t\tacceptedFiles: [] as File[],\n\t\trejectedFiles: [] as RejectedFile<File>[]\n\t});\n\n\tfunction handleFilesSelect(e: DropzoneEvent<File>) {\n\t\tfiles = e;\n\t}\n</script>\n\n<Dropzone onDrop={handleFilesSelect} />\n\n```\n\nCustom UI\n\n```svelte\n<script lang=\"ts\">\n\timport type { CustomDropzoneProps, DropzoneEvent,RejectedFile } from 'svelte-dropzone-runes';\n\timport Dropzone from 'svelte-dropzone-runes';\n\tlet dropzoneElement: HTMLElement | undefined = $state();\n\tlet files = $state({\n\t\tacceptedFiles: [] as File[],\n\t\trejectedFiles: [] as RejectedFile<File>[]\n\t});\n\n\tfunction handleFilesSelect(e: DropzoneEvent<File>) {\n\t\tfiles = e;\n\t\tisDraggingOver = false;\n\t}\n</script>\n\n{#snippet CustomDropzone(props: CustomDropzoneProps)}\n\t<div bind:this={dropzoneElement} {...props}>Custom Dropzone</div>\n{/snippet}\n\n<Dropzone {dropzoneElement} onDrop={handleFilesSelect} {CustomDropzone}></Dropzone>\n\n```\n\nFull Page\n\n```svelte\n<script lang=\"ts\">\n\timport { browser } from '$app/environment';\n\timport type { DropzoneEvent } from 'svelte-dropzone-runes';\n\timport Dropzone from 'svelte-dropzone-runes';\n\tlet dropzoneElement: HTMLElement | undefined = $state(\n\t\tbrowser ? document.documentElement : undefined\n\t);\n\tlet files = $state({\n\t\tacceptedFiles: [] as File[],\n\t\trejectedFiles: [] as RejectedFile<File>[]\n\t});\n\tlet isDraggingOver = $state(false);\n\n\tfunction handleFilesSelect(e: DropzoneEvent<File>) {\n\t\tfiles = e;\n\t\tisDraggingOver = false;\n\t}\n</script>\n\n{#if isDraggingOver}\n\t<div style=\"width: 100dvw;height:100dvh;position:fixed;left:0%;top:0%;background:white;display:flex;justify-content:center;align-items:center\" >\n\t\t<div\n\t\t\tstyle=\"width:calc(100% - 100px);height:calc(100% - 100px);display:flex;justify-content:center;align-items:center;margin:50px;\"\n\t\t>\n\t\t\tDrop Here\n\t\t</div>\n\t</div>\n{/if}\n\n<Dropzone\n\tonDragenter={(e) => {\n\t\tisDraggingOver = true;\n\t}}\n\tonDragleave={(e) => {\n\t\tisDraggingOver = false;\n\t}}\n\t{dropzoneElement}\n\tonDrop={handleFilesSelect}\n></Dropzone>\n\n```\n\nExample\n\n```svelte\n<script lang=\"ts\">\n\timport type { CustomDropzoneProps, DropzoneEvent, RejectedFile } from 'svelte-dropzone-runes';\n\timport Dropzone from 'svelte-dropzone-runes';\n\tlet dropzoneElement: HTMLElement | undefined = $state();\n\tlet isDraggingOver = $state(false);\n\n\tlet files = $state({\n\t\tacceptedFiles: [] as File[],\n\t\trejectedFiles: [] as RejectedFile<File>[]\n\t});\n\n\tfunction handleFilesSelect(e: DropzoneEvent<File>) {\n\t\tconst { acceptedFiles, rejectedFiles } = e;\n\t\tfiles.acceptedFiles = [...files.acceptedFiles, ...acceptedFiles];\n\t\tfiles.rejectedFiles = [...files.rejectedFiles, ...rejectedFiles];\n\t\tisDraggingOver = false;\n\t}\n\t$effect(() => {\n\t\tif (isDraggingOver) {\n\t\t\tdropzoneElement?.classList.add('hover');\n\t\t} else {\n\t\t\tdropzoneElement?.classList.remove('hover');\n\t\t}\n\t});\n</script>\n\n{#snippet CustomDropzone(props: CustomDropzoneProps)}\n\t<div bind:this={dropzoneElement} class=\"dropzone custom-dropzone\" {...props}>Custom Dropzone</div>\n{/snippet}\n\n<Dropzone\n\taccept={[\"image/*\"]}\n\tmultiple\n\tonDragenter={(e) => {\n\t\tisDraggingOver = true;\n\t}}\n\tonDragleave={(e) => {\n\t\tisDraggingOver = false;\n\t}}\n\t{dropzoneElement}\n\tonDrop={handleFilesSelect}\n\t{CustomDropzone}\n></Dropzone>\n\n<style>\n\t.dropzone {\n\t\tflex: 1;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tpadding: 20px;\n\t\tborder-width: 2px;\n\t\tborder-radius: 2px;\n\t\tborder-color: #eeeeee;\n\t\tborder-style: dashed;\n\t\tbackground-color: #fafafa;\n\t\tcolor: #bdbdbd;\n\t\toutline: none;\n\t\ttransition: border 0.24s ease-in-out;\n\t}\n\n\t.dropzone:hover {\n\t\tborder-color: #2196f3;\n\t}\n\n\t.dropzone:focus {\n\t\tborder-color: #2196f3;\n\t}\n\n\t.custom-dropzone {\n\t\tbackground-color: wheat;\n\t\tcolor: black;\n\t\ttransition: all 0.3s;\n\t}\n\n\t.custom-dropzone:focus {\n\t\tpadding: 40px;\n\n\t}\n\n\t.custom-dropzone:hover {\n\t\tpadding: 40px;\n\t}\n\n\t.custom-dropzone.hover {\n\t\tpadding: 40px;\n\t}\n</style>\n```\n\n## 📚 Important Notes\nThe underlying logic is inspired by react-dropzone and svelte-file-dropzone but tailored for idiomatic Svelte 5 use.\n\nIf using Custom UI bind dropzoneElement to the drop target inside the CustomUI.\nIf using form, set name and required on the dropzone to tie into form validation.\nIf not using multiple drag items after the first one will be rejected.\nYou can't validate file size during drag events because DataTransferItem doesn't expose file size.\n\n## 📄 License\nMIT © Truirer\n","readmeFilename":"README.md"}