{"name":"@react-native/assets-registry","version":"0.87.1","keywords":["react-native"],"license":"MIT","_id":"@react-native/assets-registry@0.87.1","maintainers":[{"name":"react-native-bot","email":"opensource+react-native-bot@fb.com"},{"name":"fb","email":"opensource+npm@fb.com"}],"homepage":"https://github.com/react/react-native/tree/HEAD/packages/assets-registry#readme","bugs":{"url":"https://github.com/react/react-native/issues"},"dist":{"shasum":"1cc5c9588a1a9df98871d57dc3a09d9a86b1a6d0","tarball":"http://registry-npm.ywwl.com/@react-native/assets-registry/download/@react-native/assets-registry-0.87.1.tgz","fileCount":6,"integrity":"sha512-XmE1I4YM61ariwFMm9gAd5FnqztP89qDx1WVKJMQTxI/g+V8riuwJts33hsFkR0lC0Mj8oc+V4L/AXk3F9XseA==","signatures":[{"sig":"MEUCIQCMnT4UCrxgF9spobmCWn34/QAkx/WtrqcD3DSymOguHwIgTosNXvkPi6VwtqHiq5eqhRjG8fjm7UumGF2D42FtIbc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCICDGvkRRxgfYVUU6T0p4rRwYRcfb8pqR0l7Yl1nWXRaOAiEA0axHm9Unhn/E8LSrSYojJQ3/mj07MaiVaBPVgNb7U1I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@react-native%2fassets-registry@0.87.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":7945,"size":2851,"noattachment":false,"key":"/@react-native/assets-registry/-/@react-native/assets-registry-0.87.1.tgz"},"engines":{"node":"^22.13.0 || ^24.3.0 || >= 26.0.0"},"gitHead":"a59eff64fa907ed6e919fafe6cbd26d1d54c2de3","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:92cd7a3a-a1b8-4c6f-8b6d-e5b51e8446d4"}},"repository":{"url":"git+https://github.com/react/react-native.git","type":"git","directory":"packages/assets-registry"},"_npmVersion":"11.17.0","description":"Asset support code for React Native.","directories":{},"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"peerDependencies":{"react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/assets-registry_0.87.1_1787748970619_0.4643592876689382","host":"s3://npm-registry-packages-npm-production"},"readme":"# @react-native/assets-registry\n\n![npm package](https://img.shields.io/npm/v/@react-native/assets-registry?color=brightgreen&label=npm%20package)\n\n> [!Warning]\n> **This package is deprecated (since 0.87)** and will be removed in a future release. Use [`AssetRegistry`](https://reactnative.dev/docs/assetregistry) from `react-native` (or the `react-native/asset-registry` build entry point) instead of `@react-native/assets-registry/registry`, and [`@react-native/asset-utils`](https://www.npmjs.com/package/@react-native/asset-utils) instead of `@react-native/assets-registry/path-support`.\n\nRuntime registry that maps asset IDs generated in a Metro bundle to asset metadata. It backs `<Image>`, `Image.resolveAssetSource()`, and any code that resolves `require('./img.png')` on native.\n\nMost apps never import this directly — assets are handled through `<Image>`.\n\n## API\n\n### `@react-native/assets-registry/registry` (DEPRECATED)\n\n> [!Warning]\n> **Deprecated**: Aliases to [`AssetRegistry`](https://reactnative.dev/docs/assetregistry) (since 0.87).\n>\n> Please use:\n> - `import { AssetRegistry } from 'react-native';` (apps/library code)\n> - `'react-native/asset-registry'` (entrypoint for Metro/build configs)\n\n| Export | Signature | Notes |\n|---|---|---|\n| `registerAsset` | `(asset: PackagerAsset) => number` | Stores the asset; returns a numeric ID |\n| `getAssetByID` | `(assetId: number) => PackagerAsset` | Looks an asset back up by ID |\n\n### `@react-native/assets-registry/path-support` (DEPRECATED)\n\n> [!Warning]\n> **Deprecated**: Use [`@react-native/asset-utils`](https://www.npmjs.com/package/@react-native/asset-utils) (since 0.87).\n\nAndroid resource-path helpers, used when copying assets into `drawable-*` folders.\n\n| Export | Signature | Notes |\n|---|---|---|\n| `getAndroidResourceFolderName` | `(asset: PackagerAsset, scale: number) => string` | e.g. `drawable-xhdpi`; non-drawable types resolve to `raw` |\n| `getAndroidResourceIdentifier` | `(asset: PackagerAsset) => string` | Sanitised resource name |\n| `getBasePath` | `(asset: PackagerAsset) => string` | `httpServerLocation` without the leading slash |\n","publish_time":1787748970719,"_cnpm_publish_time":1787748970719,"dist-tags":{"0.74-stable":"0.74.89","0.75-stable":"0.75.5","0.76-stable":"0.76.9","0.77-stable":"0.77.3","0.78-stable":"0.78.3","0.79-stable":"0.79.7","0.80-stable":"0.80.3","0.81-stable":"0.81.6","0.83-stable":"0.83.10","0.86-stable":"0.86.3","false":"0.74.82","latest":"0.88.1","next":"0.88.0-rc.6","nightly":"0.89.0-nightly-20261001-53237c7d3"}}