{"_id":"@bunny.net/datocms-plugin","_rev":"3-567905bf3c0f2a6216f55069e430819d","name":"@bunny.net/datocms-plugin","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.1":{"name":"@bunny.net/datocms-plugin","version":"0.0.1","keywords":["datocms-plugin"],"author":{"name":"Jamie Barton","email":"jamie@bunny.net"},"_id":"@bunny.net/datocms-plugin@0.0.1","maintainers":[{"name":"kevin_at_bunny","email":"kevin@bunny.net"},{"name":"antho-bunny","email":"anthony@bunny.net"},{"name":"notrab","email":"jamie@notrab.dev"},{"name":"bogdan-at-bunny","email":"bogdan@bunny.net"}],"homepage":"https://github.com/jamie-at-bunny/datocms-bunny-picker","dist":{"shasum":"11dd1686b16f6289420f3ab93f653b978ff17d4e","tarball":"https://registry.npmjs.org/@bunny.net/datocms-plugin/-/datocms-plugin-0.0.1.tgz","fileCount":8,"integrity":"sha512-YyyA7CozHKNqCfDg9Gg7ryApLC+VueI3ZdAdDeJtyuTDJcFpvbaSl+aIQ4v4RnCKASXYiAIU08M1n7BcMT3INg==","signatures":[{"sig":"MEQCIARYxsONAeNaCeRQtnkz2uq+NZT+Pa6YbNZy8WOjuX7+AiBM3rgf2X3eb6vSBuGqIs43VgIzBPKeoW0FxnW+z9fLSA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18209409},"type":"module","gitHead":"c511a708d8a660861e13efb404cf262499cc69e7","scripts":{"dev":"vite","lint":"biome lint","build":"tsc -b && vite build","check":"biome check","format":"biome format --write","preview":"vite preview","release":"changeset publish","version":"changeset version","changeset":"changeset","check:fix":"biome check --write","prepublishOnly":"npm run build"},"_npmUser":{"name":"notrab","email":"jamie@notrab.dev"},"overrides":{"uuid":"14.0.0"},"_npmVersion":"10.8.2","description":"Integrate bunny.net storage in your datocms","directories":{},"_nodeVersion":"20.20.2","dependencies":{"react":"^18.3.1","lodash-es":"^4.18.1","react-dom":"^18.3.1","datocms-react-ui":"*","datocms-plugin-sdk":"*","@tanstack/react-virtual":"^3.13.24"},"datoCmsPlugin":{"title":"DatoCMS bunny.net Picker","coverImage":"docs/cover.png","entryPoint":"dist/index.html","permissions":["currentUserAccessToken"],"previewImage":"docs/preview.mp4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.0.10","globals":"^15.9.0","typescript":"^5.5.3","@types/react":"^18.3.3","@biomejs/biome":"2.4.13","@changesets/cli":"^2.31.0","@types/lodash-es":"^4.17.12","@types/react-dom":"^18.3.0","@vitejs/plugin-react":"^6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/datocms-plugin_0.0.1_1777633871202_0.723724309026347","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@bunny.net/datocms-plugin","version":"0.1.0","keywords":["datocms-plugin"],"author":{"name":"Jamie Barton","email":"jamie@bunny.net"},"_id":"@bunny.net/datocms-plugin@0.1.0","maintainers":[{"name":"kevin_at_bunny","email":"kevin@bunny.net"},{"name":"antho-bunny","email":"anthony@bunny.net"},{"name":"notrab","email":"jamie@notrab.dev"},{"name":"bogdan-at-bunny","email":"bogdan@bunny.net"}],"homepage":"https://github.com/jamie-at-bunny/datocms-bunny-picker","dist":{"shasum":"a70a30946c4d52b78989e954f7dfd24be033d3a2","tarball":"https://registry.npmjs.org/@bunny.net/datocms-plugin/-/datocms-plugin-0.1.0.tgz","fileCount":8,"integrity":"sha512-J/KCOExLR+4RrrUmalohT0TezOM9LPohQqfggJzW5N6oFBguUsN9GNItUL5vcqaf2w2j93n1NY69wviEMsHe4g==","signatures":[{"sig":"MEUCIE74kQhwXtH971e/WEabM8sORwTfBB+oywNsBa4C6FOOAiEAhOaDUKBsByh883dUsVz/VO1gZ6LHrfFY/lQ4i1YP44Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18213303},"type":"module","gitHead":"436692f47d45c75763ec6637da8ddd21dce12136","scripts":{"dev":"vite","lint":"biome lint","build":"tsc -b && vite build","check":"biome check","format":"biome format --write","preview":"vite preview","release":"changeset publish","version":"changeset version","changeset":"changeset","check:fix":"biome check --write","prepublishOnly":"npm run build"},"_npmUser":{"name":"notrab","email":"jamie@notrab.dev"},"overrides":{"uuid":"14.0.0"},"_npmVersion":"10.8.2","description":"Integrate bunny.net storage in your datocms","directories":{},"_nodeVersion":"20.20.2","dependencies":{"react":"^18.3.1","lodash-es":"^4.18.1","react-dom":"^18.3.1","datocms-react-ui":"*","datocms-plugin-sdk":"*","@tanstack/react-virtual":"^3.13.24"},"datoCmsPlugin":{"title":"DatoCMS bunny.net Picker","coverImage":"docs/cover.png","entryPoint":"dist/index.html","permissions":["currentUserAccessToken"],"previewImage":"docs/preview.mp4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.0.10","globals":"^15.9.0","typescript":"^5.5.3","@types/react":"^18.3.3","@biomejs/biome":"2.4.13","@changesets/cli":"^2.31.0","@types/lodash-es":"^4.17.12","@types/react-dom":"^18.3.0","@vitejs/plugin-react":"^6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/datocms-plugin_0.1.0_1778782768841_0.958768737926363","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@bunny.net/datocms-plugin","description":"Integrate bunny.net storage in your datocms","homepage":"https://github.com/jamie-at-bunny/datocms-bunny-picker","version":"0.2.0","author":{"name":"Jamie Barton","email":"jamie@bunny.net"},"type":"module","keywords":["datocms-plugin"],"datoCmsPlugin":{"title":"DatoCMS bunny.net Picker","coverImage":"docs/cover.png","previewImage":"docs/preview.mp4","entryPoint":"dist/index.html","permissions":["currentUserAccessToken"]},"scripts":{"dev":"vite","build":"tsc -b && vite build","preview":"vite preview","prepublishOnly":"npm run build","changeset":"changeset","version":"changeset version","release":"changeset publish","format":"biome format --write","lint":"biome lint","check":"biome check","check:fix":"biome check --write"},"dependencies":{"@tanstack/react-virtual":"^3.13.24","datocms-plugin-sdk":"*","datocms-react-ui":"*","lodash-es":"^4.18.1","react":"^18.3.1","react-dom":"^18.3.1"},"devDependencies":{"@biomejs/biome":"2.4.13","@changesets/cli":"^2.31.0","@types/lodash-es":"^4.17.12","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react":"^6.0.1","globals":"^15.9.0","typescript":"^5.5.3","vite":"^8.0.10"},"overrides":{"uuid":"14.0.0"},"publishConfig":{"access":"public"},"_id":"@bunny.net/datocms-plugin@0.2.0","gitHead":"fea80f55afa95a82150a259f7c18c353c875ae50","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-dD9mFmO+1oSiLEF4IbiIh4zlTW4qEBbhO9tO7z/lWmDL+8vl0ySP61iGrWYqRjqaFMCVguhuFFjUsA6A3JHlSA==","shasum":"6c072233e559e1d20acd277455006ade5aa3a942","tarball":"https://registry.npmjs.org/@bunny.net/datocms-plugin/-/datocms-plugin-0.2.0.tgz","fileCount":8,"unpackedSize":18213303,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA7IggJxhLqEQ/4+ctwxvUe5EhgzKgL1acblErzFj+k3AiEAlpplcRSW39s94idxnJLpaSX+i+FfB4fzcxsfjfBRdak="}]},"_npmUser":{"name":"notrab","email":"jamie@notrab.dev"},"directories":{},"maintainers":[{"name":"kevin_at_bunny","email":"kevin@bunny.net"},{"name":"antho-bunny","email":"anthony@bunny.net"},{"name":"notrab","email":"jamie@notrab.dev"},{"name":"bogdan-at-bunny","email":"bogdan@bunny.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/datocms-plugin_0.2.0_1779437477118_0.34832647274624673"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-01T11:11:11.043Z","modified":"2026-05-22T08:11:18.040Z","0.0.1":"2026-05-01T11:11:11.821Z","0.1.0":"2026-05-14T18:19:29.446Z","0.2.0":"2026-05-22T08:11:17.856Z"},"author":{"name":"Jamie Barton","email":"jamie@bunny.net"},"homepage":"https://github.com/jamie-at-bunny/datocms-bunny-picker","keywords":["datocms-plugin"],"description":"Integrate bunny.net storage in your datocms","maintainers":[{"name":"kevin_at_bunny","email":"kevin@bunny.net"},{"name":"antho-bunny","email":"anthony@bunny.net"},{"name":"notrab","email":"jamie@notrab.dev"},{"name":"bogdan-at-bunny","email":"bogdan@bunny.net"}],"readme":"# DatoCMS bunny.net Picker\n\nSelect files from a bunny.net Storage Zone inside DatoCMS and save the selected asset data in JSON fields.\n\n## Features\n\n- Browse bunny.net Storage folders from a DatoCMS field\n- Search files in the current folder\n- Upload files from the picker, including drag and drop\n- Select a single asset or multiple assets\n- Preview images and media files in the picker\n- Open selected assets in a new tab from the field\n- Supports localized JSON fields\n\n## Requirements\n\n- A bunny.net Storage Zone\n- A bunny.net Storage API key\n- A bunny.net Pull Zone hostname for serving selected files\n- A DatoCMS JSON field\n\n## Plugin settings\n\nAfter installing the plugin, configure:\n\n| Setting           | Description                                                 |\n| ----------------- | ----------------------------------------------------------- |\n| Storage Zone Name | The name of your bunny.net Storage Zone                     |\n| Storage API Key   | The API key from the Storage Zone FTP & API Access settings |\n| CDN Hostname      | Your Pull Zone hostname, for example `my-zone.b-cdn.net`    |\n| Storage Region    | The region where your Storage Zone is hosted                |\n\nSupported regions:\n\n- Frankfurt, DE\n- London, UK\n- New York, US\n- Los Angeles, US\n- Singapore, SG\n- Stockholm, SE\n- São Paulo, BR\n- Johannesburg, ZA\n- Sydney, AU\n\n## Field setup\n\nCreate or edit a JSON field in DatoCMS, then choose one of these manual field editors:\n\n- **bunny.net Asset** — select one asset\n- **bunny.net Assets** — select multiple assets\n\n## Stored value\n\nThe plugin stores a stringified JSON value in the JSON field.\n\nSingle asset, after parsing:\n\n```json\n{\n  \"path\": \"folder/image.jpg\",\n  \"filename\": \"image.jpg\",\n  \"size\": 153240,\n  \"contentType\": \"image/jpeg\",\n  \"url\": \"https://my-zone.b-cdn.net/folder/image.jpg\",\n  \"guid\": \"8e3b3b4e-1f6a-4b2a-9b8a-2f1e6d7c8a9b\",\n  \"lastChanged\": \"2025-04-30T10:21:00.000\"\n}\n```\n\nMultiple assets, after parsing:\n\n```json\n[\n  {\n    \"path\": \"folder/image.jpg\",\n    \"filename\": \"image.jpg\",\n    \"size\": 153240,\n    \"contentType\": \"image/jpeg\",\n    \"url\": \"https://my-zone.b-cdn.net/folder/image.jpg\",\n    \"guid\": \"8e3b3b4e-1f6a-4b2a-9b8a-2f1e6d7c8a9b\",\n    \"lastChanged\": \"2025-04-30T10:21:00.000\"\n  }\n]\n```\n\nExample frontend usage:\n\n```js\nconst asset = JSON.parse(record.bunnyAsset);\nconst url = asset.url;\n```\n\nFor the multiple-asset editor, parse the field as an array.\n\n## Image transformations with bunny.net Optimizer\n\nIf your Pull Zone has [bunny Optimizer](https://docs.bunny.net/optimizer/quickstart) enabled, you can transform images on the fly by appending query parameters to the stored `url`.\n\n```js\nconst asset = JSON.parse(record.bunnyAsset);\n\nconst thumbnail = `${asset.url}?width=400&height=300&aspect_ratio=4:3`;\nconst webp = `${asset.url}?format=webp&quality=80`;\n```\n\nCommon parameters:\n\n- `width`, `height` for resizing the image\n- `aspect_ratio` to crop to a ratio, for example `16:9`\n- `format` to convert to `webp`, `avif`, `jpg`, or `png`\n- `quality` for compression quality from `0` to `100`\n\nSee the [bunny Optimizer docs](https://docs.bunny.net/optimizer/quickstart) for the full list of options. Optimizer must be enabled on your Pull Zone for these parameters to take effect.\n\n## Notes\n\n- The Storage API key is used by the plugin inside DatoCMS to list and upload files.\n- Editors with access to fields using this plugin can browse and upload to the configured Storage Zone.\n- Image thumbnails use bunny.net image query parameters for smaller previews when supported by the Pull Zone.\n\n## Development\n\n```bash\nnpm install\nnpm run dev\nnpm run build\n```\n","readmeFilename":"README.md"}