{"name":"@react-native/assets-registry","version":"0.87.0-rc.2","keywords":["react-native"],"license":"MIT","_id":"@react-native/assets-registry@0.87.0-rc.2","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":"7963a07d83d426ba118399e45ba105cff9451e40","tarball":"http://registry-npm.ywwl.com/@react-native/assets-registry/download/@react-native/assets-registry-0.87.0-rc.2.tgz","fileCount":6,"integrity":"sha512-Bm+1kPrhRAj5jtqyM1sK6Qr5WZT+452d2dbUS2DcGEUMXoRMHyRdXIKL6BsTlc8DGFoMuvs4F6gRLiFqsaXD2w==","signatures":[{"sig":"MEYCIQCHXGlqexN1dJGvXJ1PYPGAVWvm/B/ZHnpvhXfk76NI3wIhAKMvaGwbMGAlbSc2BpB8V3WbU+Ibz6Tqx1evzzQrg1Gn","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@react-native%2fassets-registry@0.87.0-rc.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":7950,"size":2848,"noattachment":false,"key":"/@react-native/assets-registry/-/@react-native/assets-registry-0.87.0-rc.2.tgz"},"engines":{"node":"^22.13.0 || ^24.3.0 || >= 26.0.0"},"gitHead":"95185009096b11a132e4c7a5dc80e5a00fdb7691","_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.16.0","description":"Asset support code for React Native.","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/assets-registry_0.87.0-rc.2_1784578761288_0.9786937446937685","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":1784578761429,"_cnpm_publish_time":1784578761429,"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"}}