{"_id":"@404love/next","_rev":"3-208eaf2df0d77cc4f6fa1cea28afe8ff","name":"@404love/next","dist-tags":{"latest":"0.2.3"},"versions":{"0.1.0":{"name":"@404love/next","version":"0.1.0","keywords":["nextjs","react","framework","router","app-router","server-components","ssr","static-site-generation","edge-runtime","middleware","typescript"],"author":{"name":"Dario Rapisardi"},"license":"MIT","_id":"@404love/next@0.1.0","maintainers":[{"name":"dariorapisardi","email":"dario@rapisardi.org"}],"dist":{"shasum":"dd10126b9b23cac0d215773fcbcc93f1261d2dee","tarball":"https://registry.npmjs.org/@404love/next/-/next-0.1.0.tgz","fileCount":23,"integrity":"sha512-KAcDdnKA6iMuypMQ2/7KSaLJJRDTKloCRq1/3G0/5hsnyslqepByha86fvPWKB817Y6WOjqrUj8zBlotEi+mFQ==","signatures":[{"sig":"MEYCIQD9vPpQjSqcT5OKvOc79i8vkY9PpMD7tfcoTBW1uhxEogIhAKGjAPOzKlikk88s8VTt8M80/kvK1z+qni+hwJ41IEMs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17727},"main":"index.js","type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"448acc88906347b3e71c04aabc8c2c119085eb8b","scripts":{"test":"npm run test:integration","build":"tsup","test:integration":"npm run build && npm --prefix ../../examples/basic run build"},"_npmUser":{"name":"dariorapisardi","email":"dario@rapisardi.org"},"repository":{"url":"/dariorapisardi/404love","type":"git"},"_npmVersion":"10.9.2","description":"Next.js helpers for 404found.love","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","typescript":"^5.3.3","@types/react":"^18.2.0"},"peerDependencies":{"next":">=13.4.0","react":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next_0.1.0_1769648380888_0.2719105439986751","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@404love/next","version":"0.2.2","keywords":["nextjs","react","framework","router","app-router","server-components","ssr","static-site-generation","edge-runtime","middleware","typescript"],"author":{"name":"Dario Rapisardi"},"license":"MIT","_id":"@404love/next@0.2.2","maintainers":[{"name":"dariorapisardi","email":"dario@rapisardi.org"}],"homepage":"https://github.com/dariorapisardi/404love#readme","bugs":{"url":"https://github.com/dariorapisardi/404love/issues"},"dist":{"shasum":"583de3c55997436f437a77c885c1f0126b8c1799","tarball":"https://registry.npmjs.org/@404love/next/-/next-0.2.2.tgz","fileCount":20,"integrity":"sha512-RgyF7i3ma/+b4Ls6NnZPkK0oEd4SJTPDlcHISmuuGJrosHCtaw93pGrfcrMrlYiFIwQXlj6NCBEJIA9YVb65nw==","signatures":[{"sig":"MEUCIF/mf6C+yzpOaXYeD6ajv7zj6VX+oWO02SL6VsYK3cnUAiEAx9dfMd82vSRVt6ADMXkXjDYDIIgEvkDGdKxx4wvUCdI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@404love%2fnext@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17703},"main":"index.js","type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"94769ee608d8d6e92e6bc5650a4a4e14aa31e3bd","scripts":{"test":"npm run test:integration","build":"tsup","test:integration":"npm run build && npm --prefix ../../examples/basic run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b477d5ab-0532-493d-a04d-dfb996078434"}},"repository":{"url":"git+https://github.com/dariorapisardi/404love.git","type":"git"},"_npmVersion":"11.6.2","description":"Next.js helpers for 404found.love","directories":{},"sideEffects":false,"_nodeVersion":"24.13.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","typescript":"^5.3.3","@types/react":"^18.2.0"},"peerDependencies":{"next":">=13.4.0","react":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next_0.2.2_1769708699738_0.4229331342725726","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@404love/next","version":"0.2.3","description":"Next.js helpers for 404found.love","license":"MIT","type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"publishConfig":{"access":"public"},"sideEffects":false,"scripts":{"build":"tsup","test":"npm run test:integration","test:integration":"npm run build && npm --prefix ../../examples/basic run build"},"peerDependencies":{"next":">=13.4.0","react":">=18.0.0"},"devDependencies":{"@types/react":"^18.2.0","tsup":"^8.0.1","typescript":"^5.3.3"},"main":"index.js","repository":{"type":"git","url":"git+https://github.com/dariorapisardi/404love.git"},"keywords":["nextjs","react","framework","router","app-router","server-components","ssr","static-site-generation","edge-runtime","middleware","typescript"],"author":{"name":"Dario Rapisardi"},"gitHead":"4a4cea00a1fd162e193bd4b18ede942ff87ae523","_id":"@404love/next@0.2.3","bugs":{"url":"https://github.com/dariorapisardi/404love/issues"},"homepage":"https://github.com/dariorapisardi/404love#readme","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-/R+ZuMj/kgnydRU9uDG3J0j+jmmxeyVWVW4Dgw70dE8fWE4h0NVWNzRWhnKEc5BivX7xRzpozaWGKyl938b/Hg==","shasum":"d42336ec0517d824b59d58aa16468d049887772e","tarball":"https://registry.npmjs.org/@404love/next/-/next-0.2.3.tgz","fileCount":20,"unpackedSize":27715,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@404love%2fnext@0.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFLdSyjikCM17jPt5/XZOR1SyqpYAfVoXR/st/sEGUo2AiA2+E2yK0vYdlaztVyLi4SBHprp64sX+coKMgzrTeGJGw=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b477d5ab-0532-493d-a04d-dfb996078434"}},"directories":{},"maintainers":[{"name":"dariorapisardi","email":"dario@rapisardi.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/next_0.2.3_1769812482253_0.7220550855073349"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-29T00:59:40.822Z","modified":"2026-01-30T22:34:42.696Z","0.1.0":"2026-01-29T00:59:41.036Z","0.2.2":"2026-01-29T17:44:59.912Z","0.2.3":"2026-01-30T22:34:42.394Z"},"bugs":{"url":"https://github.com/dariorapisardi/404love/issues"},"author":{"name":"Dario Rapisardi"},"license":"MIT","homepage":"https://github.com/dariorapisardi/404love#readme","keywords":["nextjs","react","framework","router","app-router","server-components","ssr","static-site-generation","edge-runtime","middleware","typescript"],"repository":{"type":"git","url":"git+https://github.com/dariorapisardi/404love.git"},"description":"Next.js helpers for 404found.love","maintainers":[{"name":"dariorapisardi","email":"dario@rapisardi.org"}],"readme":"# @404love/next\n\nNext.js helpers for integrating [404found.love](https://404found.love) in App Router projects.\n\n## Install\n\n```bash\nnpm install @404love/next\n```\n\n## Requirements\n\n- Next.js 13.4+ App Router\n- React 18+\n\n## Quick start\n\nCreate `app/not-found.tsx`:\n\n```tsx\nimport { createNotFoundPage } from \"@404love/next\"\n\nexport default createNotFoundPage()\n```\n\nThis renders a full-page iframe pointing to `https://404found.love/frame`, plus an optional\ntop-level back link outside the iframe.\n\n## Options\n\n```tsx\nimport { createNotFoundPage } from \"@404love/next\"\n\nexport default createNotFoundPage({\n  includeBackLink: true,\n  backLinkLabel: \"Back to site\",\n  query: { source: \"app-router\" },\n  iframeTitle: \"404 Love Found\",\n  syncFrameBackground: true,\n})\n```\n\n### Option reference\n\n- `baseUrl`: override the default `https://404found.love/frame`.\n- `referer`: override the detected referrer.\n- `syncFrameBackground`: post the host background color to the iframe (default: true).\n- `frameBackgroundTargetOrigin`: override the `postMessage` target origin for background sync (defaults to `https://404found.love`, disabled for other origins).\n- `includeBackLink`: show or hide the top-level back link.\n- `backLinkLabel`: custom label for the back link.\n- `backLinkClassName`, `backLinkStyle`: customize the back link.\n- `containerClassName`, `containerStyle`: customize the wrapper.\n- `iframeClassName`, `iframeStyle`, `iframeTitle`, `iframeProps`: customize the iframe.\n- `query`: extra query parameters (e.g. `{ source: \"app-router\" }`).\n\n### Full options example\n\n```tsx\nimport { createNotFoundPage } from \"@404love/next\"\n\nexport default createNotFoundPage({\n  baseUrl: \"https://404found.love/frame\",\n  referer: \"https://example.com/marketing\",\n  syncFrameBackground: true,\n  frameBackgroundTargetOrigin: \"https://404found.love\",\n  includeBackLink: true,\n  backLinkLabel: \"Return to site\",\n  backLinkClassName: \"notfound-back-link\",\n  backLinkStyle: {\n    color: \"#0b3b2e\",\n    background: \"rgba(255, 255, 255, 0.92)\",\n    border: \"1px solid rgba(11, 59, 46, 0.2)\",\n  },\n  containerClassName: \"notfound-container\",\n  containerStyle: {\n    background: \"linear-gradient(180deg, #fef6ef, #fff)\",\n  },\n  iframeClassName: \"notfound-frame\",\n  iframeStyle: {\n    borderRadius: \"16px\",\n    boxShadow: \"0 18px 44px rgba(0, 0, 0, 0.12)\",\n  },\n  iframeTitle: \"404 Love Found\",\n  iframeProps: {\n    loading: \"lazy\",\n    allow: \"fullscreen\",\n    referrerPolicy: \"no-referrer\",\n  },\n  query: { source: \"app-router\", campaign: \"spring-2026\" },\n})\n```\n\n## Back navigation\n\nThe package passes a `referer` query param using server headers and the client\n`document.referrer`, then renders a top-level back link outside the iframe. That link\nnavigates the host history (or the detected referrer) so the user exits the iframe.\n\n## Example app\n\nSee the repository for a minimal Next.js example in `examples/basic`.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}