{"_id":"@anil-labs/file-picker-core","_rev":"3-88b1cc3c3ad4c0a89615d95803dbf473","name":"@anil-labs/file-picker-core","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@anil-labs/file-picker-core","version":"0.1.0","keywords":["file-picker","media-library","media-manager","file-upload","image-picker","framework-agnostic","typescript"],"author":"Er. Anil Kumar Thakur <anilkumarthakur60@gmail.com>","license":"MIT","_id":"@anil-labs/file-picker-core@0.1.0","maintainers":[{"name":"anilkumarthakur","email":"anilkumarthakur60@gmail.com"}],"homepage":"https://github.com/anilkumarthakur60/file-picker/tree/main/packages/core#readme","bugs":"https://github.com/anilkumarthakur60/file-picker/issues","dist":{"shasum":"f9df9e36b433d987d14804692c987bc7408caed9","tarball":"https://registry.npmjs.org/@anil-labs/file-picker-core/-/file-picker-core-0.1.0.tgz","fileCount":13,"integrity":"sha512-L1abAcbdOSCJbMO8qVmCcLJ9iu32jmQCwyB1BEMEZ2Nifv4sq/malCv7jooifZU11qPVE+UyWunJlVh1WsJl4g==","signatures":[{"sig":"MEQCICW/n5Sa1VHfBJ4xDEifUyXLB/jwBniEYhRbe/kWvvbiAiA3jBBQhEbhHZilh0YKqOVBKSNAVvCEdTNhH0FYZl1eGQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":938738},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","unpkg":"./dist/index.global.js","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./styles.css":"./dist/styles.css"},"scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"anilkumarthakur","email":"anilkumarthakur60@gmail.com"},"jsdelivr":"./dist/index.global.js","repository":{"url":"git+https://github.com/anilkumarthakur60/file-picker.git","type":"git","directory":"packages/core"},"description":"Framework-agnostic media-library file picker — folders, upload, search/type filters, metadata editing and single/multi selection. Renders its own UI; pluggable backend adapter. Zero dependencies.","directories":{},"sideEffects":["**/*.css"],"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.10","happy-dom":"^15.11.6","typescript":"^5.7.2","@vitest/coverage-v8":"^4.1.10"},"_npmOperationalInternal":{"tmp":"tmp/file-picker-core_0.1.0_1785433484716_0.6393137307699268","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@anil-labs/file-picker-core","version":"0.1.1","keywords":["file-picker","media-library","media-manager","file-upload","image-picker","framework-agnostic","typescript"],"author":"Er. Anil Kumar Thakur <anilkumarthakur60@gmail.com>","license":"MIT","_id":"@anil-labs/file-picker-core@0.1.1","maintainers":[{"name":"anilkumarthakur","email":"anilkumarthakur60@gmail.com"}],"homepage":"https://github.com/anilkumarthakur60/file-picker/tree/main/packages/core#readme","bugs":"https://github.com/anilkumarthakur60/file-picker/issues","dist":{"shasum":"eae25cb33c178312d9a24cb8d963aa9823166287","tarball":"https://registry.npmjs.org/@anil-labs/file-picker-core/-/file-picker-core-0.1.1.tgz","fileCount":13,"integrity":"sha512-9Sg+LoOz8bzXCnMJKi9x96+mrKO4WgB2hxMTmLm9/yHOKvjW9vYEyfPVRIUTd2f5XKqWZX4FlMfUdIuxlG07xw==","signatures":[{"sig":"MEUCICy/7pNxftJLPFl3cVmFLIe/0Y6aJvtUZg/KsLBxeX5qAiEA2NkR9/gB1gXcjoOAmhsDETZ3T5pVJ8l8YOONUjtVL7o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":939214},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","unpkg":"./dist/index.global.js","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./styles.css":"./dist/styles.css"},"scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"anilkumarthakur","email":"anilkumarthakur60@gmail.com"},"jsdelivr":"./dist/index.global.js","repository":{"url":"git+https://github.com/anilkumarthakur60/file-picker.git","type":"git","directory":"packages/core"},"description":"Framework-agnostic media-library file picker — folders, upload, search/type filters, metadata editing and single/multi selection. Renders its own UI; pluggable backend adapter. Zero dependencies.","directories":{},"sideEffects":["**/*.css"],"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.10","happy-dom":"^15.11.6","typescript":"^5.7.2","@vitest/coverage-v8":"^4.1.10"},"_npmOperationalInternal":{"tmp":"tmp/file-picker-core_0.1.1_1785434877848_0.26029776832774165","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"_id":"@anil-labs/file-picker-core@0.1.2","bugs":"https://github.com/anilkumarthakur60/file-picker/issues","dist":{"shasum":"ce46dcddabe44b6a036e301709dd38c8b2130014","tarball":"https://registry.npmjs.org/@anil-labs/file-picker-core/-/file-picker-core-0.1.2.tgz","fileCount":13,"integrity":"sha512-mYyrE/0qFF2I2rMwpQ02bKf9pVaIxMTSvKBz6XcSUThzk+vBLhYuSxSu9l00V6vmx6dbd7HiaHHItTFwAiWt7A==","signatures":[{"sig":"MEUCIDAtzQddAAwG4RxxxNfabulBOd3G4FdL4H0O3kZ0UWHRAiEAnkn7KDvgp0DH3z4i3JMVCCQNc1HkW9aH3Bo7OzY4taU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIB7L0nF+/9K9M3I8+B0l6V1rX8jReA8c4Ibxuaz4Rk2cAiBJK6lGBy53zNIzhKgIGUabPDpSeF5ExSK3hPagD+ZaaQ=="}],"unpackedSize":939964},"main":"./dist/index.cjs","name":"@anil-labs/file-picker-core","type":"module","types":"./dist/index.d.ts","unpkg":"./dist/index.global.js","author":"Er. Anil Kumar Thakur <anilkumarthakur60@gmail.com>","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./styles.css":"./dist/styles.css"},"license":"MIT","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:coverage":"vitest run --coverage"},"version":"0.1.2","_npmUser":{"name":"anilkumarthakur","email":"anilkumarthakur60@gmail.com"},"homepage":"https://github.com/anilkumarthakur60/file-picker/tree/main/packages/core#readme","jsdelivr":"./dist/index.global.js","keywords":["file-picker","media-library","media-manager","file-upload","image-picker","framework-agnostic","typescript"],"repository":{"url":"git+https://github.com/anilkumarthakur60/file-picker.git","type":"git","directory":"packages/core"},"description":"Framework-agnostic media-library file picker  folders, upload, search/type filters, metadata editing and single/multi selection. Renders its own UI; pluggable backend adapter. Zero dependencies.","directories":{},"maintainers":[{"name":"anilkumarthakur","email":"anilkumarthakur60@gmail.com"}],"sideEffects":["**/*.css"],"_nodeVersion":"24.21.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.10","happy-dom":"^15.11.6","typescript":"^5.7.2","@vitest/coverage-v8":"^4.1.10"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/file-picker-core_0.1.2_1791020301350_0.2720396789252031"}}},"time":{"created":"2026-07-30T17:44:44.471Z","modified":"2026-10-03T09:38:21.660Z","0.1.0":"2026-07-30T17:44:44.865Z","0.1.1":"2026-07-30T18:07:58.100Z","0.1.2":"2026-10-03T09:38:21.485Z"},"bugs":"https://github.com/anilkumarthakur60/file-picker/issues","author":"Er. Anil Kumar Thakur <anilkumarthakur60@gmail.com>","license":"MIT","homepage":"https://github.com/anilkumarthakur60/file-picker/tree/main/packages/core#readme","keywords":["file-picker","media-library","media-manager","file-upload","image-picker","framework-agnostic","typescript"],"repository":{"url":"git+https://github.com/anilkumarthakur60/file-picker.git","type":"git","directory":"packages/core"},"description":"Framework-agnostic media-library file picker  folders, upload, search/type filters, metadata editing and single/multi selection. Renders its own UI; pluggable backend adapter. Zero dependencies.","maintainers":[{"name":"anilkumarthakur","email":"anilkumarthakur60@gmail.com"}],"readme":"# @anil-labs/file-picker-core\n\n**The framework-agnostic engine behind [`@anil-labs/file-picker`](https://github.com/anilkumarthakur60/file-picker)**  a media-library file picker (folders, upload, filters, metadata editing, single/multi selection) that renders its own themeable UI and talks to any backend through a pluggable adapter. Zero runtime dependencies.\n\n[![npm](https://img.shields.io/npm/v/@anil-labs/file-picker-core?color=3b82f6&label=npm)](https://www.npmjs.com/package/@anil-labs/file-picker-core)\n\nUsing a framework? Prefer the binding  it wires selection into your reactivity and cleans up\nautomatically: [React](https://www.npmjs.com/package/@anil-labs/file-picker-react) ·\n[Vue](https://www.npmjs.com/package/@anil-labs/file-picker-vue) ·\n[Svelte](https://www.npmjs.com/package/@anil-labs/file-picker-svelte) ·\n[Solid](https://www.npmjs.com/package/@anil-labs/file-picker-solid) ·\n[Web Component](https://www.npmjs.com/package/@anil-labs/file-picker-element)\n\n## Install\n\n```bash\nnpm i @anil-labs/file-picker-core\n```\n\n## Usage\n\n```ts\nimport { FilePicker, createMemoryAdapter } from '@anil-labs/file-picker-core'\nimport '@anil-labs/file-picker-core/styles.css' // required for the UI\n\nconst picker = new FilePicker({\n  adapter: createMemoryAdapter({ media: [], folders: [] }),\n  multiple: true,\n  title: 'Media Library',\n})\n\npicker.mountTrigger(document.querySelector('#pick'), { label: 'Choose media' })\npicker.mountSelected(document.querySelector('#selected'))\npicker.on('select', (items) => console.log('picked', items))\n```\n\n## Adapters\n\nThe engine is backend-agnostic. Provide one of:\n\n- **`createRestAdapter(config)`**  a configurable REST client (defaults suit a Laravel-style API); override `mapMedia` / `parseList` / `toListParams` etc. for other shapes.\n- **`createMemoryAdapter(seed)`**  in-memory, for demos, prototypes and tests.\n- **your own `FilePickerAdapter`**  eight async methods: `listMedia`, `deleteMedia`, `updateMedia`, `uploadMedia`, `listFolders`, `createFolder`, `renameFolder`, `deleteFolder`.\n\n## Instance API\n\n- `open()` / `close()` / `isOpen`\n- `getSelected()` / `setSelected(items)`\n- `on(event, handler)` → unsubscribe. Events: `open`, `close`, `change`, `select`, `upload`, `delete`, `error`\n- `mountTrigger(el, { label })` / `mountSelected(el)` → dispose functions\n- `destroy()`\n\n## Theming\n\nImport `@anil-labs/file-picker-core/styles.css`, then set the `theme` option (`'light' | 'dark' | 'auto'`) or override the `--fp-*` CSS custom properties (or add `.fp--dark` / `.fp--light`).\n\n## Documentation\n\nFull guides + the adapter contract + the complete API: **<https://anilkumarthakur60.github.io/file-picker/>**\n\n## License\n\nMIT © Er. Anil Kumar Thakur\n","readmeFilename":""}