{"_id":"@dswistowski/destiny-manifest-react","_rev":"2-1d359759472a53d65e413fa7ced7e538","name":"@dswistowski/destiny-manifest-react","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@dswistowski/destiny-manifest-react","version":"0.0.1","private":false,"access":"public","main":"./index.tsx","types":"./index.tsx","license":"MIT","dependencies":{"@dswistowski/destiny-manifest":"0.0.1","react":">=17.2.0 <19.0.0"},"devDependencies":{"@types/react":"^18.0.21","eslint":"^7.32.0","eslint-config-custom":"0.0.0","tailwind":"^4.0.0","tsconfig":"0.0.0","typescript":"^4.5.2"},"scripts":{"lint":"eslint *.ts*"},"description":"This package contains helper to use destiny manifest in frontend typescript react application.","_id":"@dswistowski/destiny-manifest-react@0.0.1","_integrity":"sha512-q9M+GZO36loQmUDFe9cZZDU45z+Wu1wp7Y86wCn1wmuwp/WynEBVV6U26stfrUZOHNfe11zo3NS4otD4+n7usw==","_resolved":"/private/var/folders/vr/r63kj6rj75x4vr85clx26v2h0000gn/T/730a8d60b78759f36650a8c7608f95df/dswistowski-destiny-manifest-react-0.0.1.tgz","_from":"file:dswistowski-destiny-manifest-react-0.0.1.tgz","_nodeVersion":"16.14.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-q9M+GZO36loQmUDFe9cZZDU45z+Wu1wp7Y86wCn1wmuwp/WynEBVV6U26stfrUZOHNfe11zo3NS4otD4+n7usw==","shasum":"bdc6d4f2fd91096e55baddb544c0fd025cec7884","tarball":"https://registry.npmjs.org/@dswistowski/destiny-manifest-react/-/destiny-manifest-react-0.0.1.tgz","fileCount":6,"unpackedSize":6784,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+gfvKE0k1hkqtxtnUJaY/UJ3eh6badqgYEVsj31LwRQIhAM1ON3BJ/Pybd0FFnQAL0dtGc1W1/x7n3aejeAX2HAr/"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSiCKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFjQ//Tk5E4myiTaP3zWhuR/tw6EQi0GsFk6fNQNjO+uxcCZGW/jQO\r\nR6o8xoMxFA6gCvF4WwFXAy1MJ17boIAEiFN+MM2VR1hbEGmia+Vu23vN59Gw\r\n6Jg2hsq4WIr+XUXk920K5vLRiIeIfzyvszMryiPoJ2znSzk4N4lD/Bn5o4Br\r\nuAHRJIYQUXEDsPwuSULYV8G+Oq8bKw2BZ+sDeRwTaAY9zhATOMhzTT1GlXRL\r\nb4RVNSQmVAslBteuzlIpxYmkjNgKLNdhzHM+FGyulNRkjLdwywiT3KwRv7Y5\r\nQxvk6y3yrIvNogkfv2GPFRGJur1KuETbQfDa4EdL4y9t6t77B3TmgZ3gerAy\r\nZf+5dFYWJMfSpb0lpRQ1HeoKk8FCci653fN93uFXYSw1Kl+vyVggPCY9CuJL\r\naZ6V0IJhSaoTPbnzznOo9XaRBCdeKZfgFZpHGxNYXpJmfA+bII001hetG80j\r\nNXSq+mLL3QVbBGVvixqsSQIOjPF6JPZ2SJFUQwvyLGKbHow/fWHVX3NJlI6k\r\nRzWXBSi1hurg7AhV+Qe94hvQ8jiKC6qPZGQfo9DiV7fMVkF+RXvNVr8aSS4G\r\nfAL68h4NdkzBM2vTGeLeaooG9P2+BUqcPc75fS6TKkoPX0nKqLwuMtDkqNC4\r\nlyQLADS48zt2bhB59ZAqqJK1zsZ3KurFWeY=\r\n=1e9N\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dswistowski","email":"damian@swistowski.org"},"directories":{},"maintainers":[{"name":"dswistowski","email":"damian@swistowski.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/destiny-manifest-react_0.0.1_1665802378565_0.42448943781229187"},"_hasShrinkwrap":false},"0.0.2":{"name":"@dswistowski/destiny-manifest-react","version":"0.0.2","private":false,"access":"public","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","license":"MIT","dependencies":{"@dswistowski/destiny-manifest":"0.0.2","react":">=17.2.0 <19.0.0"},"devDependencies":{"@types/react":"^18.0.21","eslint":"^7.32.0","eslint-config-custom":"0.0.0","tailwind":"^4.0.0","tsconfig":"0.0.0","tsup":"^6.2.3","typescript":"^4.5.2"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup src/index.tsx --format esm,cjs --dts --external react","dev":"tsup src/index.tsx --format esm,cjs --watch --dts --external react","lint":"eslint src/*.ts*"},"description":"This package contains helper to use destiny manifest in frontend typescript react application.","_id":"@dswistowski/destiny-manifest-react@0.0.2","_integrity":"sha512-+hKhKx7e9TITMhiBNvEO6lhYVGJnUUCU4B+AN/s6CZpqN1HtMqSAsQ32h7izq53UK+qOKhe9t11KzM5ViHQG3g==","_resolved":"/private/var/folders/vr/r63kj6rj75x4vr85clx26v2h0000gn/T/fab8fcb2611d137cf5ce0b79058cfd17/dswistowski-destiny-manifest-react-0.0.2.tgz","_from":"file:dswistowski-destiny-manifest-react-0.0.2.tgz","_nodeVersion":"16.14.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-+hKhKx7e9TITMhiBNvEO6lhYVGJnUUCU4B+AN/s6CZpqN1HtMqSAsQ32h7izq53UK+qOKhe9t11KzM5ViHQG3g==","shasum":"141a5a4f5e094e50c9295a9eb37356cbb7972ac8","tarball":"https://registry.npmjs.org/@dswistowski/destiny-manifest-react/-/destiny-manifest-react-0.0.2.tgz","fileCount":5,"unpackedSize":2858595,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyyK1V7HvvdclJ6tCl73YIjjnIoHW1n2V7Seh0GJm0uwIgfI6Dgon08sEyhub37QAaloBQ2QXnThmrueKnZvSZ4C4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjS2/MACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo2Ng/9H5EjmgUErCD/067MSUcAfZhJc9nqS9RJN44kRNGMzBsThNh1\r\n3itQXnEPBFOPo/NGyjarEiiD+fUicjRokWc0ueYSejzm4KXNsmCVD8RMcHJD\r\nbZ9/23o3sQZgGr/UkMHOnukUNgwiM0VVWHuECuqKZ7VWT6eEi1dHO+2Kj/Mx\r\nF4gO5XdKFqiIC48B5UPWWHc9l7YATwOqoszZ0QeyuQiawzfR2NBkms6iiCBQ\r\nzdjk6sRyE+q9oaZTjohFmvFUu1Tfvc0ZQz9TatpFBOJfoHhGDoje83HHzO1g\r\nYMJ+eOWXy0F1sp8PtCyflbkRhVVj+QN0DRD+6CAPt4rD4suETRjVlH90kN4C\r\ny3ctmnWUfhuQNtiSc+VCXJM0A63lfp3Wh2AnDcpKaSP8O6kGzuuSx/iUDafD\r\nPqilzGaGd9hj/vRkiyindW/c/sh51tf1m3c1wW8EB0xP7I/Xn2WOATkuNLoc\r\nbVuN+t9A2gXxtEnDglV/GHllI7k9NWM4AX0AB/Us94BOMkB+HzZa3E3LkMbX\r\nRaIFla7f2J7ercHL4D63C/sNHS+5cH9ytCgPVgB8k5kJJ92zt25cXXdspdHO\r\nIVqHCATuWMqncDfYbHHWdrGgYI+A5QkfXrpXcKtWOVOWdUntDsi0fRmob2+c\r\nzHwFE7AQAR3HhFIythQ4uF/a8zdrnMzuFDI=\r\n=15un\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dswistowski","email":"damian@swistowski.org"},"directories":{},"maintainers":[{"name":"dswistowski","email":"damian@swistowski.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/destiny-manifest-react_0.0.2_1665888204523_0.35519994711478353"},"_hasShrinkwrap":false},"0.0.3":{"name":"@dswistowski/destiny-manifest-react","version":"0.0.3","private":false,"access":"public","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","license":"MIT","dependencies":{"@dswistowski/destiny-manifest":"0.0.3","react":">=17.2.0 <19.0.0"},"devDependencies":{"@types/react":"^18.0.21","eslint":"^7.32.0","eslint-config-custom":"0.0.0","tailwind":"^4.0.0","tsconfig":"0.0.0","tsup":"^6.2.3","typescript":"^4.5.2"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup src/index.tsx --format esm,cjs --dts --external react","dev":"tsup src/index.tsx --format esm,cjs --watch --dts --external react","lint":"eslint src/*.ts*"},"description":"This package contains helper to use destiny manifest in frontend typescript react application.","_id":"@dswistowski/destiny-manifest-react@0.0.3","_integrity":"sha512-UNkZz14J8Elvk9vfLgrsNCckrAj96XvkCkw/zwMDn1UvamUqofbDtAFvEeiadSdnkiK6QWBM8iE2ZT6GoN0Uyw==","_resolved":"/private/var/folders/vr/r63kj6rj75x4vr85clx26v2h0000gn/T/30f0620bcaf38e5c6c64247b814e79a0/dswistowski-destiny-manifest-react-0.0.3.tgz","_from":"file:dswistowski-destiny-manifest-react-0.0.3.tgz","_nodeVersion":"16.14.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-UNkZz14J8Elvk9vfLgrsNCckrAj96XvkCkw/zwMDn1UvamUqofbDtAFvEeiadSdnkiK6QWBM8iE2ZT6GoN0Uyw==","shasum":"a29f4c3e55aeffdfbfc14268503b524afa78fc40","tarball":"https://registry.npmjs.org/@dswistowski/destiny-manifest-react/-/destiny-manifest-react-0.0.3.tgz","fileCount":5,"unpackedSize":2672705,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDassOKvXmw8p+r1gak9ZPn0vubjKahKmxjzRF1iuzxlgIgIm6AahpxJ1ajZdVgbTBRIMJ3umqTpbZm6dzLtfVRVXw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjT0vbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqo6w//RgQ8WMge3KLAa4DEwX9Q2e89S3l8DUJ1wbOgKPJLnxed3dWU\r\njZYxVM6M3zAgYzlxfztLeByFGcBCx+d83gVPd00RnOjgrAQpWgi5wKohWuaY\r\nRP910PN2PlIuUTe6IIBMhPBuuBAawGsqtpqDpR6XSCwPRgUPpSyUvRwHkdic\r\nu2JG01b9Aoq+lLXojSN/D1TVJkrq1mz77ztxM9p31l6Xf4FHP1yQ5es7FqjQ\r\neHX+fg1HI/q7Fvy6OgqttkK7J/cm/TX3DMbpx2vbCI9tSLwpZfWaPx9Cwrfd\r\n6cd5+RgGYql5BBnA1ejCjuhQPB0/nZWBwEuMxrPsQyWhK2vyjzFhCHmspa8u\r\nsw2SIJ7CuF2PPnFQFVSZYotoieDgn7HkXFCvjcTAbsLx7nZZo0jdf6OilPT9\r\nFQgtuyRgjS6X+jGLMtlJTqQGLMbbRSQKByOnQEOb2O0J79XBnM/wEZTr2xzk\r\n6agIreVIVLPOvWY4/q6lt57UyCHHUJt0Lj8tiNp/EzfEuCMHIMpllgWlLvN1\r\nlbr2y0SLU5LpiCEkPjtXzD1BL3Kvh+omydnkzF+5GdgDdIPZjBHTK0gNIle5\r\n3W8ZZ8v/4M0VK8Oa/yPrhgZOPd8lPnNJomVLjD9Xxh1yFgxBV+5FEOJa40jZ\r\naAn6dUlOJA2qL+NNd7C75jM7ZM+uW+MiZkw=\r\n=fLwg\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dswistowski","email":"damian@swistowski.org"},"directories":{},"maintainers":[{"name":"dswistowski","email":"damian@swistowski.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/destiny-manifest-react_0.0.3_1666141147278_0.2920693929448328"},"_hasShrinkwrap":false}},"time":{"created":"2022-10-15T02:52:58.504Z","0.0.1":"2022-10-15T02:52:58.734Z","modified":"2022-10-19T00:59:07.556Z","0.0.2":"2022-10-16T02:43:24.769Z","0.0.3":"2022-10-19T00:59:07.481Z"},"maintainers":[{"name":"dswistowski","email":"damian@swistowski.org"}],"description":"This package contains helper to use destiny manifest in frontend typescript react application.","license":"MIT","readme":"# Destiny manifest react\n\nThis package contains helper to use destiny manifest in frontend typescript react application.\n\n## Installation\n\n```bash\nnpm add @dswistowski/destiny-manifest-react\n```\n\n## Usage\n\n1. Create manifest module with loader:\n\n```typescript\nimport {\n  createDefaultManifest,\n  createLoader,\n  inferDomains,\n} from \"@dswistowski/destiny-manifest-react\";\n\nconst loader = createLoader()\n  .add(\"DestinyLoreDefinition\", ({ hash, displayProperties, index }) => ({\n    hash,\n    displayProperties,\n    index,\n  }))\n  .add(\n    \"DestinyInventoryItemDefinition\",\n    ({ hash, displayProperties, loreHash }) => ({\n      hash,\n      displayProperties,\n    })\n  );\n\nexport const manifest = createDefaultManifest({\n  loader,\n  apiKey: process.env.REACT_APP_BUNGIE_API_KEY,\n  language: \"en\",\n});\n\nexport type Domains = inferDomains<typeof loader>;\n```\n\nAnd then use it in your application:\n\n```tsx\nimport { manifest, Domains } from \"./manifest\";\n\nconst LoreDefinition: React.FC<{ lore: Domains[\"DestinyLoreDefinition\"] }> = ({\n  lore,\n}) => {\n  return (\n    <div>\n      <h1>{lore.displayProperties.name}</h1>\n      <p>{lore.displayProperties.description}</p>\n    </div>\n  );\n};\n\nconst ItemDefinition: React.FC<{\n  item: Domains[\"DestinyInventoryItemDefinition\"];\n}> = ({ item }) => {\n  const lore = manifest.useDestinyLoreDefinition(item.loreHash);\n  return (\n    <div>\n      <h1>{item.displayProperties.name}</h1>\n      <p>{item.displayProperties.description}</p>\n      {lore && <LoreDefinition lore={lore} />}\n    </div>\n  );\n};\n\nconst Items: React.FC = () => {\n  const items = manifest.useDestinyInventoryItemDefinitions(() => true);\n  return (\n    <div>\n      {items.map((item) => (\n        <ItemDefinition key={item.hash} item={item} />\n      ))}\n    </div>\n  );\n};\n```\n","readmeFilename":"README.md"}