{"_id":"@bob-obringer/nextjs-sanity-io-image","_rev":"5-4cbf914ccbf488ea59188d86279f1ec0","name":"@bob-obringer/nextjs-sanity-io-image","description":"NextJS Sanity.io Image Component","dist-tags":{"latest":"0.3.1"},"versions":{"0.1.2":{"name":"@bob-obringer/nextjs-sanity-io-image","version":"0.1.2","keywords":["sanity.io","nextjs","images","bob-obringer"],"author":{"name":"Bob Obringer","email":"bob@obringer.net"},"license":"MIT","_id":"@bob-obringer/nextjs-sanity-io-image@0.1.2","maintainers":[{"name":"bob-obringer","email":"bob@obringer.net"}],"homepage":"https://github.com/bob-obringer/monorepo/tree/develop/public-packages/nextjs-sanity-image","bugs":{"url":"https://github.com/bob-obringer/monorepo/issues"},"dist":{"shasum":"af15700316c808a103ed9ca7fe301771f1cc5bcb","tarball":"https://registry.npmjs.org/@bob-obringer/nextjs-sanity-io-image/-/nextjs-sanity-io-image-0.1.2.tgz","fileCount":10,"integrity":"sha512-Ehy5+wfCGRrbojfFvK/XGXg4e+TBPjlHvln29NCt/2ENy9sY5g8+SWE9HkkyeJXtE0ZKY/lEgc5AU6uintDONw==","signatures":[{"sig":"MEQCIDu5okMEM5i+BagVF8W4YWrAeZp/6WSSmdyqA4Y6Smn2AiAfi8Xpv4R8iiRfZjO/tgdjGs8k4dEeN2RKSoaBttO7AQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8819},"main":"dist/index.js","type":"module","_from":"file:bob-obringer-nextjs-sanity-io-image-0.1.2.tgz","types":"dist/index.d.ts","private":false,"scripts":{"dev":"tsc -w -p tsconfig.dev.json","lint":"eslint --fix 'src/**/*.{ts,tsx}'","build":"tsc","clean":"rimraf dist node_modules"},"_npmUser":{"name":"bob-obringer","email":"bob@obringer.net"},"_resolved":"/tmp/a64fcda81f2ccaa98bad7e8a0b205b8f/bob-obringer-nextjs-sanity-io-image-0.1.2.tgz","_integrity":"sha512-Ehy5+wfCGRrbojfFvK/XGXg4e+TBPjlHvln29NCt/2ENy9sY5g8+SWE9HkkyeJXtE0ZKY/lEgc5AU6uintDONw==","repository":{"url":"git+https://github.com/bob-obringer/monorepo.git","type":"git"},"_npmVersion":"10.5.2","description":"NextJS Sanity.io Image Component","directories":{},"_nodeVersion":"20.13.1","dependencies":{"zod":"3.23.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"next":"14.2.3","react":"18.3.1","react-dom":"18.3.1"},"peerDependencies":{"next":">=14.2","react":">=18.2","react-dom":">=18.2"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-sanity-io-image_0.1.2_1717092051127_0.711388158687019","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@bob-obringer/nextjs-sanity-io-image","version":"0.2.0","keywords":["sanity.io","nextjs","images","bob-obringer"],"author":{"name":"Bob Obringer","email":"bob@obringer.net"},"license":"MIT","_id":"@bob-obringer/nextjs-sanity-io-image@0.2.0","maintainers":[{"name":"bob-obringer","email":"bob@obringer.net"}],"homepage":"https://github.com/bob-obringer/monorepo/tree/develop/public-packages/nextjs-sanity-image","bugs":{"url":"https://github.com/bob-obringer/monorepo/issues"},"dist":{"shasum":"84b87f4d23b66d9cf31f12f760f80fc09a65eaa2","tarball":"https://registry.npmjs.org/@bob-obringer/nextjs-sanity-io-image/-/nextjs-sanity-io-image-0.2.0.tgz","fileCount":10,"integrity":"sha512-A5tQONEjqg6jPb0M95yybK4lrMDeHuk+nS/2SGwHZJxgdoJcvkUYMa46U9R5O8UqtTCnTITIuhdkcyCWfLjQhg==","signatures":[{"sig":"MEUCIDcP+qFk0nZZfRdtb14D9C/J/bY+v/z7R7XYoxYkBm0GAiEA1s0WljQxMIvb2zwOVbXehvxdF4vVd4u2HKJtIjmsptM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8894},"main":"dist/index.js","type":"module","_from":"file:bob-obringer-nextjs-sanity-io-image-0.2.0.tgz","types":"dist/index.d.ts","private":false,"scripts":{"dev":"tsc -w -p tsconfig.dev.json","lint":"eslint --fix 'src/**/*.{ts,tsx}'","build":"tsc","clean":"rimraf dist node_modules"},"_npmUser":{"name":"bob-obringer","email":"bob@obringer.net"},"_resolved":"/tmp/62d288db49844ff2daa0d9e19e7ae690/bob-obringer-nextjs-sanity-io-image-0.2.0.tgz","_integrity":"sha512-A5tQONEjqg6jPb0M95yybK4lrMDeHuk+nS/2SGwHZJxgdoJcvkUYMa46U9R5O8UqtTCnTITIuhdkcyCWfLjQhg==","repository":{"url":"git+https://github.com/bob-obringer/monorepo.git","type":"git"},"_npmVersion":"10.5.2","description":"NextJS Sanity.io Image Component","directories":{},"_nodeVersion":"20.13.1","dependencies":{"zod":"3.23.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"next":"14.2.3","react":"18.3.1","react-dom":"18.3.1"},"peerDependencies":{"next":">=14.2","react":">=18.2","react-dom":">=18.2"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-sanity-io-image_0.2.0_1717194710954_0.4110434111562371","host":"s3://npm-registry-packages"}},"0.2.1":{"name":"@bob-obringer/nextjs-sanity-io-image","version":"0.2.1","keywords":["sanity.io","nextjs","images","bob-obringer"],"author":{"name":"Bob Obringer","email":"bob@obringer.net"},"license":"MIT","_id":"@bob-obringer/nextjs-sanity-io-image@0.2.1","maintainers":[{"name":"bob-obringer","email":"bob@obringer.net"}],"homepage":"https://github.com/bob-obringer/monorepo/tree/develop/public-packages/nextjs-sanity-image","bugs":{"url":"https://github.com/bob-obringer/monorepo/issues"},"dist":{"shasum":"7f8d23e7abc0f79c7066fcc817012bee4749c28e","tarball":"https://registry.npmjs.org/@bob-obringer/nextjs-sanity-io-image/-/nextjs-sanity-io-image-0.2.1.tgz","fileCount":3,"integrity":"sha512-eCF7EE/TzCXoKiGX+9dWBhMgsQEKSH44z4zruNpF/TTyizGZoVVGbNB8KrTPpF2n7wkmoHP978Cq7l0w9mIE5A==","signatures":[{"sig":"MEYCIQDMJ0SRFm/SwoCiMZiHWlLXUIkd4aVwDPqhsmSY8q64yAIhAPGtLgD0wOvl8bB7DhFu87gHd7nACHQurVnCFYdJnAaV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4254},"main":"dist/index.js","type":"module","_from":"file:bob-obringer-nextjs-sanity-io-image-0.2.1.tgz","types":"dist/index.d.ts","private":false,"scripts":{"dev":"tsc -w -p tsconfig.dev.json","lint":"eslint --fix 'src/**/*.{ts,tsx}'","build":"tsc","clean":"rimraf dist node_modules"},"_npmUser":{"name":"bob-obringer","email":"bob@obringer.net"},"_resolved":"/tmp/eb19ac0fef28e7308f4794c2036cfcba/bob-obringer-nextjs-sanity-io-image-0.2.1.tgz","_integrity":"sha512-eCF7EE/TzCXoKiGX+9dWBhMgsQEKSH44z4zruNpF/TTyizGZoVVGbNB8KrTPpF2n7wkmoHP978Cq7l0w9mIE5A==","repository":{"url":"git+https://github.com/bob-obringer/monorepo.git","type":"git"},"_npmVersion":"10.7.0","description":"NextJS Sanity.io Image Component","directories":{},"_nodeVersion":"20.14.0","dependencies":{"zod":"3.23.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"next":"14.2.3","react":"18.3.1","react-dom":"18.3.1"},"peerDependencies":{"next":">=14.2","react":">=18.2","react-dom":">=18.2"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-sanity-io-image_0.2.1_1718646357990_0.8610754210124578","host":"s3://npm-registry-packages"}},"0.2.2":{"name":"@bob-obringer/nextjs-sanity-io-image","version":"0.2.2","keywords":["sanity.io","nextjs","images","bob-obringer"],"author":{"name":"Bob Obringer","email":"bob@obringer.net"},"license":"MIT","_id":"@bob-obringer/nextjs-sanity-io-image@0.2.2","maintainers":[{"name":"bob-obringer","email":"bob@obringer.net"}],"homepage":"https://github.com/bob-obringer/monorepo/tree/develop/public-packages/nextjs-sanity-image","bugs":{"url":"https://github.com/bob-obringer/monorepo/issues"},"dist":{"shasum":"ea27dcdfc7100fbca4a2afd66d2c4eadc4bfe9e1","tarball":"https://registry.npmjs.org/@bob-obringer/nextjs-sanity-io-image/-/nextjs-sanity-io-image-0.2.2.tgz","fileCount":13,"integrity":"sha512-9pIAoaVqWe8b8+negC9vvIgpgfmwfWbvd6f8nV6T3JOM6HmWgokVwR14R7N4NV+1gylMCLr4jiMCHNvXKVVmCw==","signatures":[{"sig":"MEUCIQDx3gkSiuZzmYQDm4ixqYqbinPtr9Jj0OFjALVfbC0PiwIgZZbWYoFOCYB3LtVItJL0sUeJ4JGTzcXKHtK912iYYqo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":43927},"main":"dist/index.js","type":"module","_from":"file:bob-obringer-nextjs-sanity-io-image-0.2.2.tgz","types":"dist/index.d.ts","private":false,"scripts":{"dev":"tsc -w -p tsconfig.dev.json","lint":"eslint --fix 'src/**/*.{ts,tsx}'","build":"tsc","clean":"rimraf dist node_modules"},"_npmUser":{"name":"bob-obringer","email":"bob@obringer.net"},"_resolved":"/tmp/497808b06f2b45a54f7359bce42319d2/bob-obringer-nextjs-sanity-io-image-0.2.2.tgz","_integrity":"sha512-9pIAoaVqWe8b8+negC9vvIgpgfmwfWbvd6f8nV6T3JOM6HmWgokVwR14R7N4NV+1gylMCLr4jiMCHNvXKVVmCw==","repository":{"url":"git+https://github.com/bob-obringer/monorepo.git","type":"git"},"_npmVersion":"10.7.0","description":"NextJS Sanity.io Image Component","directories":{},"_nodeVersion":"20.14.0","dependencies":{"zod":"3.23.8"},"_hasShrinkwrap":false,"devDependencies":{"next":"14.2.3","react":"18.3.1","react-dom":"18.3.1"},"peerDependencies":{"next":">=14.2","react":">=18.2","react-dom":">=18.2"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-sanity-io-image_0.2.2_1718738608548_0.4005810830933225","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"@bob-obringer/nextjs-sanity-io-image","version":"0.3.0","keywords":["sanity.io","nextjs","images","bob-obringer"],"author":{"name":"Bob Obringer","email":"bob@obringer.net"},"license":"MIT","_id":"@bob-obringer/nextjs-sanity-io-image@0.3.0","homepage":"https://github.com/bob-obringer/monorepo/tree/develop/public-packages/nextjs-sanity-image","bugs":{"url":"https://github.com/bob-obringer/monorepo/issues"},"dist":{"shasum":"dee075f4055912ddd739b7a858c5d9a5401bede2","tarball":"https://registry.npmjs.org/@bob-obringer/nextjs-sanity-io-image/-/nextjs-sanity-io-image-0.3.0.tgz","fileCount":13,"integrity":"sha512-diVKVt/0bEm53XXcvk8YPrUmiPgVBInXqX3lQ9rqfmCdhh25kfsYiwKm4J2dRHDFfN5pmh7pAhGxcupzFnyLDQ==","signatures":[{"sig":"MEQCID3L3oyVQoV0m+Sjwp8nzYsL0EJek/tju1S9SL5wKsLIAiAjP2jLcCaCudAlm3lqNblSsmpKj+tjEeTmbz/+DuXUhw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42716},"main":"dist/index.js","type":"module","_from":"file:bob-obringer-nextjs-sanity-io-image-0.3.0.tgz","types":"dist/index.d.ts","private":false,"scripts":{"dev":"tsc -w -p tsconfig.dev.json","lint":"eslint --fix 'src/**/*.{ts,tsx}'","build":"tsc","clean":"rimraf dist node_modules"},"_npmUser":{"name":"bob-obringer","email":"bob@obringer.net"},"_resolved":"/tmp/1aa81de8ea4ef933b59993c9d427e422/bob-obringer-nextjs-sanity-io-image-0.3.0.tgz","_integrity":"sha512-diVKVt/0bEm53XXcvk8YPrUmiPgVBInXqX3lQ9rqfmCdhh25kfsYiwKm4J2dRHDFfN5pmh7pAhGxcupzFnyLDQ==","repository":{"url":"git+https://github.com/bob-obringer/monorepo.git","type":"git"},"_npmVersion":"10.7.0","description":"NextJS Sanity.io Image Component","directories":{},"_nodeVersion":"20.14.0","dependencies":{"zod":"3.23.8"},"_hasShrinkwrap":false,"devDependencies":{"next":"14.2.3","react":"18.3.1","react-dom":"18.3.1"},"peerDependencies":{"next":">=14.2","react":">=18.2","react-dom":">=18.2"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-sanity-io-image_0.3.0_1719412723233_0.317808374960431","host":"s3://npm-registry-packages"}},"0.3.1":{"name":"@bob-obringer/nextjs-sanity-io-image","version":"0.3.1","private":false,"description":"NextJS Sanity.io Image Component","keywords":["sanity.io","nextjs","images","bob-obringer"],"homepage":"https://github.com/bob-obringer/monorepo/tree/develop/public-packages/nextjs-sanity-image","bugs":{"url":"https://github.com/bob-obringer/monorepo/issues"},"repository":{"type":"git","url":"git+https://github.com/bob-obringer/monorepo.git"},"license":"MIT","author":{"name":"Bob Obringer","email":"bob@obringer.net"},"type":"module","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"zod":"3.23.8"},"devDependencies":{"next":"14.2.3","react":"18.3.1","react-dom":"18.3.1"},"peerDependencies":{"next":">=14.2","react":">=18.2","react-dom":">=18.2"},"scripts":{"build":"tsc","clean":"rimraf dist node_modules","dev":"tsc -w -p tsconfig.dev.json","lint":"eslint --fix 'src/**/*.{ts,tsx}'"},"_id":"@bob-obringer/nextjs-sanity-io-image@0.3.1","_integrity":"sha512-dQnkipI8VrHLTx0aVbp6dXNZ6tzaDfc4Gf9eJp6gRmri5Ttve6AJlDhnDx4o5SqqHdVfMvEpmHLGaCErrZnzOQ==","_resolved":"/tmp/12038928155ea290f72b6d4f69e43f7b/bob-obringer-nextjs-sanity-io-image-0.3.1.tgz","_from":"file:bob-obringer-nextjs-sanity-io-image-0.3.1.tgz","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-dQnkipI8VrHLTx0aVbp6dXNZ6tzaDfc4Gf9eJp6gRmri5Ttve6AJlDhnDx4o5SqqHdVfMvEpmHLGaCErrZnzOQ==","shasum":"b9ef9ce2b692b2adb5b81f3f44a06c2e5f157d26","tarball":"https://registry.npmjs.org/@bob-obringer/nextjs-sanity-io-image/-/nextjs-sanity-io-image-0.3.1.tgz","fileCount":13,"unpackedSize":42716,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCu0j8hGBo4eRahb/W7p1CvzCysO+mnX/xFBv9qT3bdIwIgS76ZnbPLpLZxdr97G/0lRz4I090JUWv/OLHEipwIjiU="}]},"_npmUser":{"name":"bob-obringer","email":"bob@obringer.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nextjs-sanity-io-image_0.3.1_1719420651074_0.7626526786350367"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-30T18:00:51.032Z","modified":"2024-06-26T16:50:51.475Z","0.1.2":"2024-05-30T18:00:51.264Z","0.2.0":"2024-05-31T22:31:51.150Z","0.2.1":"2024-06-17T17:45:58.117Z","0.2.2":"2024-06-18T19:23:28.699Z","0.3.0":"2024-06-26T14:38:43.378Z","0.3.1":"2024-06-26T16:50:51.294Z"},"maintainers":[{"name":"bob-obringer","email":"bob@obringer.net"}],"author":{"name":"Bob Obringer","email":"bob@obringer.net"},"repository":{"type":"git","url":"git+https://github.com/bob-obringer/monorepo.git"},"keywords":["sanity.io","nextjs","images","bob-obringer"],"license":"MIT","homepage":"https://github.com/bob-obringer/monorepo/tree/develop/public-packages/nextjs-sanity-image","bugs":{"url":"https://github.com/bob-obringer/monorepo/issues"},"readme":"# NextJs Sanity.io Image\n\nThis package provides a wrapper around the [Next.js Image](https://nextjs.org/docs/api-reference/next/image) component to display images directly from Sanity.io, including all Next.js props and optimizations, and Sanity.io transforms.\n\n## Installation\n\n```bash\npnpm install @bob-obringer/nextjs-sanity-io-image\n```\n\n```bash\nnpm install @bob-obringer/nextjs-sanity-io-image\n```\n\n```bash\nyarn add @bob-obringer/nextjs-sanity-io-image\n```\n\n## Usage\n\nHere's a basic example of how to use the `NextJsSanityImage` component in a React component:\n\n```jsx\nimport { NextJsSanityImage } from \"@bob-obringer/nextjs-sanity-io-image\";\n\nfunction MyComponent({ sanityImageData }) {\n  return (\n    <NextJsSanityImage\n      sanityImage={sanityImageData}\n      width={500}\n      height={300}\n      transform={{\n        invert: true,\n        or: 90,\n        bg: \"FF0000\",\n      }}\n    />\n  );\n}\n```\n\nIn this example, `sanityImageData` is the image field data from a Sanity.io response.\n\n## Props\n\nThe `NextJsSanityImage` component accepts all the standard [Next.js Image props](https://nextjs.org/docs/app/api-reference/components/image), plus the following:\n\n- `sanityImage`: The image field data from a Sanity.io response. This is an object that includes an `asset` field.\n\n- `transform`: An object that contains several optional transformation parameters. These parameters are applied to the image using [Sanity.io's image transformations](https://www.sanity.io/docs/image-urls). The `transform` object can include the following fields:\n\n  - `bg`: The background color of the image.\n  - `blur`: The blur amount of the image.\n  - `flip`: The flip direction of the image. Can be \"h\", \"v\", or \"hv\".\n  - `invert`: A boolean that indicates whether the colors of the image should be inverted.\n  - `or`: The orientation of the image. Can be 0, 90, 180, or 270.\n  - `sat`: The saturation of the image.\n  - `sharp`: The sharpness of the image.\n\n## TODO\n\nThis is in good shape but needs additional transforms especially around cropping and hotspots\n","readmeFilename":"readme.md"}