{"name":"@react-native/assets-registry","version":"0.75.0-rc.2","description":"Asset support code for React Native.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/facebook/react-native.git","directory":"packages/assets"},"homepage":"https://github.com/facebook/react-native/tree/HEAD/packages/assets#readme","keywords":["assets","registry","react-native","support"],"bugs":{"url":"https://github.com/facebook/react-native/issues"},"engines":{"node":">=18"},"_id":"@react-native/assets-registry@0.75.0-rc.2","readmeFilename":"README.md","gitHead":"668358c47ad9cbe699bc3e497f8cae84dcdd1459","_nodeVersion":"18.20.3","_npmVersion":"10.7.0","dist":{"integrity":"sha512-EaNced6TJiPD3xfRXDzfjh9jdFMmAaiAnXecEb622jueBWKATx9Rdo5KxgkKOqSotTF09G6LC3QMKz/bNWKLnQ==","shasum":"dbb4723362a3ad8c7cf1845343cd1443a7bfd451","tarball":"http://registry-npm.ywwl.com/@react-native/assets-registry/download/@react-native/assets-registry-0.75.0-rc.2.tgz","fileCount":4,"unpackedSize":4498,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDu/AMETDrqhz0Ahd3zebeYvMGeLQNgoxSKkgoqGc3ZBgIhAKyyH7s3BVwv7nSEQE2E10wGcpMCicH1SVgLskJ3pE6c"}],"size":2067,"noattachment":false,"key":"/@react-native/assets-registry/-/@react-native/assets-registry-0.75.0-rc.2.tgz"},"_npmUser":{"name":"react-native-bot","email":"opensource+react-native-bot@fb.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/assets-registry_0.75.0-rc.2_1719399671053_0.12220377923926584"},"_hasShrinkwrap":false,"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":1719399671199,"maintainers":[{"name":"react-native-bot","email":"opensource+react-native-bot@fb.com"},{"name":"fb","email":"opensource+npm@fb.com"}],"_cnpm_publish_time":1719399671199,"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"}}