{"name":"@react-native/assets-registry","version":"0.76.0-rc.2","keywords":["assets","registry","react-native","support"],"license":"MIT","_id":"@react-native/assets-registry@0.76.0-rc.2","homepage":"https://github.com/facebook/react-native/tree/HEAD/packages/assets#readme","bugs":{"url":"https://github.com/facebook/react-native/issues"},"dist":{"shasum":"ff2b85620073d412c8641e8fb48d78de34e0ec8e","tarball":"http://registry-npm.ywwl.com/@react-native/assets-registry/download/@react-native/assets-registry-0.76.0-rc.2.tgz","fileCount":4,"integrity":"sha512-9Sg1mzDG1v840E/BVv/Nh4Rb/hphOHkmJ9nE4t+LEKG6GsAw6YC7P6a1gXB3mh3yofJFKlrFGxJn9kC9fh5c5g==","signatures":[{"sig":"MEUCIQDIyJxEsMjPHEZvdaYCdFcjfi39LbrcClC2Vb7h0xupKAIgYM8Cb/JuTRvadbu6w2/eVQG2PLA6oUgcDM0qilgSJzA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4595,"size":2107,"noattachment":false,"key":"/@react-native/assets-registry/-/@react-native/assets-registry-0.76.0-rc.2.tgz"},"engines":{"node":">=18"},"gitHead":"23f62acd839d38d7ea4ba9d7d2e99bb2a1aa0bb9","_npmUser":{"name":"react-native-bot","email":"opensource+react-native-bot@fb.com"},"repository":{"url":"git+https://github.com/facebook/react-native.git","type":"git","directory":"packages/assets"},"_npmVersion":"10.7.0","description":"Asset support code for React Native.","directories":{},"_nodeVersion":"18.20.4","_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/assets-registry_0.76.0-rc.2_1727166393593_0.5203228253588299","host":"s3://npm-registry-packages"},"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":1727166393742,"maintainers":[{"name":"react-native-bot","email":"opensource+react-native-bot@fb.com"},{"name":"fb","email":"opensource+npm@fb.com"}],"_cnpm_publish_time":1727166393742,"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"}}