{"_id":"@banulakwin/inertia-seo-engine","_rev":"2-d589eb48a68efa736b0b0cd5407c7a53","name":"@banulakwin/inertia-seo-engine","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@banulakwin/inertia-seo-engine","version":"1.0.0","keywords":["laravel","inertia","seo","react","head","meta-tags","open-graph","twitter-cards","json-ld","typescript"],"author":{"name":"banulakwin"},"license":"MIT","_id":"@banulakwin/inertia-seo-engine@1.0.0","maintainers":[{"name":"banulalakwindu","email":"banulalakwindu10@gmail.com"}],"homepage":"https://github.com/banulakwin/inertia-seo-engine#readme","bugs":{"url":"https://github.com/banulakwin/inertia-seo-engine/issues"},"dist":{"shasum":"3dfb8fe5c2d512b7af24675b3cdc97fbeae5284d","tarball":"https://registry.npmjs.org/@banulakwin/inertia-seo-engine/-/inertia-seo-engine-1.0.0.tgz","fileCount":7,"integrity":"sha512-nK4kPV1Vn22szbSQ/x7ltNISa+P7F+YVVS0rtL/HxG3PmPahV7vNrls9oqSK/L1LaVS6GQQMLguhYoanzDc/lA==","signatures":[{"sig":"MEUCIQDfmfii7ay0/wHZcdwEO1eq0TQADCLWRmZLMLWh18uaawIgX2Ia1LGfz/Cq/jEBpL6v3zfoahe5JVgkLgAk/gDf2Yk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22139},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsup src/index.tsx --format esm --dts --clean --external react --external @inertiajs/react","prepublishOnly":"npm run build"},"_npmUser":{"name":"banulalakwindu","email":"banulalakwindu10@gmail.com"},"repository":{"url":"git+https://github.com/banulakwin/inertia-seo-engine.git","type":"git"},"_npmVersion":"11.5.1","description":"Inertia + React `<Head>` helpers for banulakwin/laravel-seo-engine payloads.","directories":{},"sideEffects":false,"_nodeVersion":"24.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.7.2","@types/react":"^19.2.0"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","@inertiajs/react":"^1.0.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/inertia-seo-engine_1.0.0_1779048096748_0.3086354647459959","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@banulakwin/inertia-seo-engine","version":"1.1.0","description":"Inertia + React `<Head>` helpers for banulakwin/laravel-seo-engine payloads.","type":"module","license":"MIT","sideEffects":false,"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsup src/index.tsx --format esm --dts --clean --external react --external @inertiajs/react","prepublishOnly":"npm run build"},"peerDependencies":{"@inertiajs/react":"^2.0.0 || ^3.0.0","react":"^18.0.0 || ^19.0.0"},"devDependencies":{"@types/react":"^19.2.0","tsup":"^8.5.0","typescript":"^5.7.2"},"repository":{"type":"git","url":"git+https://github.com/banulalakwindu/inertia-seo-engine.git"},"keywords":["laravel","inertia","seo","react","head","meta-tags","open-graph","twitter-cards","json-ld","typescript"],"author":{"name":"banulakwin"},"publishConfig":{"access":"public"},"_id":"@banulakwin/inertia-seo-engine@1.1.0","gitHead":"97fb190e37eb514bcaf94b75dbea8dc4a3bf5df8","bugs":{"url":"https://github.com/banulalakwindu/inertia-seo-engine/issues"},"homepage":"https://github.com/banulalakwindu/inertia-seo-engine#readme","_nodeVersion":"24.5.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-bmnTMGta5R0XgMI6k8yWz8o6WE/iex5+C6Rcl8lTbTtF3LMFHg/eafs4p0MyJBTyhZIQEqLRjiff1Y7XsYVLrw==","shasum":"706bdeb71c30c2a04e4e30b728c8c4809cba8db6","tarball":"https://registry.npmjs.org/@banulakwin/inertia-seo-engine/-/inertia-seo-engine-1.1.0.tgz","fileCount":7,"unpackedSize":22288,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGCLy+IjF8k2CXEAGGpGwkvv5ciSTFFlxYWasgwEV8RgAiAd99Jq/5B8aNJkX6c5RG5TMu2OZLjLRvgxqSnUnYcumA=="}]},"_npmUser":{"name":"banulalakwindu","email":"banulalakwindu10@gmail.com"},"directories":{},"maintainers":[{"name":"banulalakwindu","email":"banulalakwindu10@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/inertia-seo-engine_1.1.0_1779096174979_0.13232830624949932"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-17T20:01:36.618Z","modified":"2026-05-18T09:22:55.269Z","1.0.0":"2026-05-17T20:01:36.890Z","1.1.0":"2026-05-18T09:22:55.122Z"},"bugs":{"url":"https://github.com/banulalakwindu/inertia-seo-engine/issues"},"author":{"name":"banulakwin"},"license":"MIT","homepage":"https://github.com/banulalakwindu/inertia-seo-engine#readme","keywords":["laravel","inertia","seo","react","head","meta-tags","open-graph","twitter-cards","json-ld","typescript"],"repository":{"type":"git","url":"git+https://github.com/banulalakwindu/inertia-seo-engine.git"},"description":"Inertia + React `<Head>` helpers for banulakwin/laravel-seo-engine payloads.","maintainers":[{"name":"banulalakwindu","email":"banulalakwindu10@gmail.com"}],"readme":"# @banulakwin/inertia-seo-engine\n\n**`InertiaSeoHead`** component + **`InertiaSeoPayload`** type for **banulakwin/laravel-seo-engine** + Inertia.js `<Head>`.\n\n## Installation\n\n```bash\nnpm install @banulakwin/inertia-seo-engine\n```\n\n```bash\npnpm add @banulakwin/inertia-seo-engine\n```\n\n```bash\nyarn add @banulakwin/inertia-seo-engine\n```\n\n## Peer Dependencies\n\n- `react` ^18.0.0 || ^19.0.0\n- `@inertiajs/react` ^2.0.0 || ^3.0.0\n\n## Quick Start\n\nPlace `InertiaSeoHead` in your root layout component. It reads SEO data automatically from Inertia's page context via `usePage()`.\n\n```tsx\nimport { InertiaSeoHead } from '@banulakwin/inertia-seo-engine';\n\nexport default function AppLayout({ children }) {\n    return (\n        <>\n            <InertiaSeoHead />\n            {children}\n        </>\n    );\n}\n```\n\n## Laravel Backend\n\nYour Laravel app should pass an `seo` prop matching `InertiaSeoPayload`, typically from:\n\n- `inertia_seo($model)`\n- `inertia_seo_page('slug')`\n- `inertia_head_from_seo_engine_array()`\n\nAlso pass `appUrl` (string base URL) and optionally `name` (site name for `og:site_name`) via Inertia shared props.\n\n```php\n// In your controller\nreturn inertia('Page', [\n    // ...your data\n], [\n    'appUrl' => config('app.url'),\n    'name' => config('app.name'),\n]);\n```\n\n## API Reference\n\n### Components\n\n#### `InertiaSeoHead`\n\nZero-prop React component that renders `<Head>` meta tags from Inertia shared/page `seo` props.\n\n```tsx\nimport { InertiaSeoHead } from '@banulakwin/inertia-seo-engine';\n\n<InertiaSeoHead />;\n```\n\n### Types\n\n#### `InertiaSeoPayload`\n\nThe SEO data payload from Laravel `banulakwin/laravel-seo-engine`.\n\n```ts\ntype InertiaSeoPayload = {\n    title?: string | null;\n    description?: string | null;\n    keywords?: string | string[] | null;\n    image_path?: string | null;\n    canonical_url?: string | null;\n    is_index?: boolean;\n    is_follow?: boolean;\n    og_type?: string | null;\n    og_title?: string | null;\n    og_description?: string | null;\n    og_image_path?: string | null;\n    author?: string | null;\n    twitter_card?: string | null;\n    twitter_site?: string | null;\n    twitter_creator?: string | null;\n    twitter_title?: string | null;\n    twitter_description?: string | null;\n    twitter_image_path?: string | null;\n    global_head_html?: string | null;\n    page_head_html?: string | null;\n    json_ld?: unknown | unknown[] | null;\n};\n```\n\n#### `InertiaSeoHeadPageProps`\n\nExpected Inertia page props shape.\n\n```ts\ntype InertiaSeoHeadPageProps = {\n    name?: string;\n    appUrl?: string;\n    seo?: InertiaSeoPayload | null;\n};\n```\n\n## Features\n\n- **Title & Meta**: `<title>`, description, keywords, robots, author, abstract\n- **Canonical URL**: Auto-derived from `appUrl` + current path, or explicit `canonical_url`\n- **Open Graph**: og:type, og:title, og:description, og:image, og:url, og:site_name\n- **Twitter Cards**: twitter:card, twitter:title, twitter:description, twitter:image, twitter:site, twitter:creator\n- **JSON-LD**: Structured data via `<script type=\"application/ld+json\">`\n- **Custom HTML**: Site-wide and per-page HTML snippets parsed via DOMParser (with regex fallback for SSR)\n- **URL Resolution**: Relative image paths resolved against `appUrl`\n\n## Build\n\n```bash\nnpm run build\n```\n\n## License\n\nMIT\n\n## See Also\n\n- [AGENTS.md](./AGENTS.md) - Expected Inertia props and AI agent guide\n- [CHANGELOG.md](./CHANGELOG.md) - Release history\n","readmeFilename":"README.md"}