{"id":13800943,"url":"https://github.com/probablykasper/svelte-tauri-filedrop","last_synced_at":"2025-10-17T18:32:19.245Z","repository":{"id":37815838,"uuid":"433673027","full_name":"probablykasper/svelte-tauri-filedrop","owner":"probablykasper","description":"Tauri file drop handling component for Svelte","archived":false,"fork":false,"pushed_at":"2023-05-18T22:38:01.000Z","size":383,"stargazers_count":30,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-23T11:16:18.688Z","etag":null,"topics":["dropzone","filedrop","package","svelte","tauri"],"latest_commit_sha":null,"homepage":"","language":"Svelte","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/probablykasper.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-12-01T03:44:40.000Z","updated_at":"2024-04-09T13:09:11.000Z","dependencies_parsed_at":"2024-01-08T08:03:56.077Z","dependency_job_id":null,"html_url":"https://github.com/probablykasper/svelte-tauri-filedrop","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"0064355be1b16ee9f06a16539b727eb2cd639375"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probablykasper%2Fsvelte-tauri-filedrop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probablykasper%2Fsvelte-tauri-filedrop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probablykasper%2Fsvelte-tauri-filedrop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probablykasper%2Fsvelte-tauri-filedrop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/probablykasper","download_url":"https://codeload.github.com/probablykasper/svelte-tauri-filedrop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248519172,"owners_count":21117756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dropzone","filedrop","package","svelte","tauri"],"created_at":"2024-08-04T00:01:17.850Z","updated_at":"2025-10-17T18:32:14.205Z","avatar_url":"https://github.com/probablykasper.png","language":"Svelte","funding_links":[],"categories":["Development"],"sub_categories":["Integrations"],"readme":"# Svelte Tauri FileDrop\n\n[![License](https://img.shields.io/npm/l/svelte-tauri-filedrop.svg)](LICENSE)\n[![NPM Version](https://img.shields.io/npm/v/svelte-tauri-filedrop.svg)](https://npmjs.com/package/svelte-tauri-filedrop)\n[![NPM Downloads](https://img.shields.io/npm/dm/svelte-tauri-filedrop.svg)](https://npmjs.com/package/svelte-tauri-filedrop)\n\nTauri file drop handling component for Svelte.\n\n## Install\n```\nnpm install svelte-tauri-filedrop\n```\n\n## Usage\n```svelte\n\u003cscript lang=\"ts\"\u003e\n\timport FileDrop from 'svelte-tauri-filedrop'\n\n\tfunction open(paths: string[]) {\n\t\t// ...\n\t}\n\u003c/script\u003e\n\n\u003cFileDrop extensions={['json']} handleFiles={open} let:files\u003e\n\t\u003cdiv class=\"dropzone\" class:droppable={files.length \u003e 0}\u003e\n\t\t\u003ch2\u003eDrop JSON files\u003c/h2\u003e\n\t\u003c/div\u003e\n\u003c/FileDrop\u003e\n\n\u003cstyle\u003e\n\t.dropzone {\n\t\tmargin: 20px;\n\t\tpadding: 20px;\n\t\tbackground: #eee;\n\t}\n\t.droppable {\n\t\tbackground: #d6dff0;\n\t}\n\u003c/style\u003e\n```\n\n## API\n\n### `extensions` property: `string[] | null`\nList of allowed file extensions. Disallowed files are filtered out.\nIf it's null (default), all file extensions are allowed.\n\n### `handleFiles` property: `(string[]) =\u003e {}`\nHandle a file drop of one or more files\n\n### `handleOneFile` property: `(string[]) =\u003e {}`\nHandle a file drop of a single file.\nNote that `handleFile()` is also called.\nThis is not called if any disallowed files were filtered out.\n\n### `files` slot property: `string[]`\nAn array of the currently droppable files, excluding disallowed files.\nYou can use this variable through a let binding: `let:files`.\n\n## Dev Instructions\n\n### Get started\n1. Install Node.js (v14 works)\n2. Install Rust (v1.50 works)\n3. Follow the [Tauri setup guide](https://tauri.studio/en/docs/getting-started/intro)\n4. Run `npm install`\n\n### Commands\n- `npm run dev`: Start in dev mode\n- `npm run package`: Build and package the component\n- `npm run lint`: Lint\n- `npm run format`: Format\n\n### Publish new version\n1. Update `CHANGELOG.md`\n2. Check for errors\n\t\t```\n\t\tnpm run lint\n\t\t```\n3. Bump the version number\n\t\t```\n\t\tnpm version --no-git-tag \u003cversion\u003e\n\t\t```\n4. Generate the package\n\t\t```\n\t\tnpm run package\n\t\t```\n5. Publish the package\n\t\t```\n\t\tnpm publish\n\t\t```\n6. Commit with a tag in format \"v#.#.#\"\n7. Create GitHub release with release notes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobablykasper%2Fsvelte-tauri-filedrop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprobablykasper%2Fsvelte-tauri-filedrop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobablykasper%2Fsvelte-tauri-filedrop/lists"}