{"_id":"@aero-cms/react-sdk","_rev":"6-917b4d70e5b290223ded1cfc200b5d69","name":"@aero-cms/react-sdk","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"@aero-cms/react-sdk","version":"1.0.0","keywords":["cms","headless-cms","react","aero","aero"],"license":"MIT","_id":"@aero-cms/react-sdk@1.0.0","maintainers":[{"name":"keremzytn","email":"mustafakeremzeytun1@gmail.com"}],"dist":{"shasum":"8f223004bd0282b1cad3191b0aad082aa07f44c0","tarball":"https://registry.npmjs.org/@aero-cms/react-sdk/-/react-sdk-1.0.0.tgz","fileCount":26,"integrity":"sha512-l5PzplmTczf+h5bAsrIzEYlRVo/2+zMd62W9xFxQcInSgw8A4zo2e4Ns/jMoTLmtCJmnqIu0jx+snv0PlZuh8g==","signatures":[{"sig":"MEYCIQD3BgYQDq447YCJf8+iFeI34977GN0YXVsUxy3CusPu7wIhAJAyx7gv9Y4BeVanA6jEL1F64E98iEdEDYYsMp7d7LAX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73622},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"5e9e6cf43cc1349fc7b009318dcf190517527f77","scripts":{"dev":"tsup src/index.ts --format cjs,esm --watch","build":"tsup src/index.ts --format cjs,esm && tsc --emitDeclarationOnly --declaration --outDir dist","cms:sync":"npx tsx scripts/sync-schemas.ts"},"_npmUser":{"name":"keremzytn","email":"mustafakeremzeytun1@gmail.com"},"_npmVersion":"10.9.2","description":"React SDK for AeroCMS Headless API","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","typescript":"^6.0.2","@types/react":"^19.2.14"},"peerDependencies":{"react":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/react-sdk_1.0.0_1775934988557_0.4930787678869746","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@aero-cms/react-sdk","version":"1.0.1","keywords":["cms","headless-cms","react","aero","aero"],"license":"MIT","_id":"@aero-cms/react-sdk@1.0.1","maintainers":[{"name":"keremzytn","email":"mustafakeremzeytun1@gmail.com"}],"dist":{"shasum":"d6c01e8aebb101642bfde939eccf4944f711d646","tarball":"https://registry.npmjs.org/@aero-cms/react-sdk/-/react-sdk-1.0.1.tgz","fileCount":35,"integrity":"sha512-0PIw4LlV2LmPKfsGDREcIcN4/IUhLjIuVecx98AJUU5MTaIdLpYyH/WEXug0S9ygh3rB6mSEQyNI16QxCMJ7DQ==","signatures":[{"sig":"MEQCIHWP0/bMyys2BWy8rpqHIYrGNK68R26S44iDCGXqFD+VAiBpS0V9t/KksUtAbrdMbokeKh6tNKpiSxyXEoGUZ8ogng==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":103356},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./react":{"types":"./dist/react.d.ts","import":"./dist/react.mjs","require":"./dist/react.js"}},"gitHead":"5e9e6cf43cc1349fc7b009318dcf190517527f77","scripts":{"dev":"tsup src/index.ts src/react.ts --format cjs,esm --watch","build":"tsup src/index.ts src/react.ts --format cjs,esm --dts && tsc --emitDeclarationOnly --declaration --outDir dist","cms:sync":"npx tsx scripts/sync-schemas.ts"},"_npmUser":{"name":"keremzytn","email":"mustafakeremzeytun1@gmail.com"},"_npmVersion":"10.9.2","description":"React SDK for AeroCMS Headless API","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","typescript":"^6.0.2","@types/react":"^19.2.14"},"peerDependencies":{"react":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/react-sdk_1.0.1_1775935499856_0.8016004846779339","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@aero-cms/react-sdk","version":"1.0.2","keywords":["cms","headless-cms","react","aero-cms","sdk","cli"],"license":"MIT","_id":"@aero-cms/react-sdk@1.0.2","maintainers":[{"name":"keremzytn","email":"mustafakeremzeytun1@gmail.com"}],"homepage":"https://github.com/aero-cms/aero-cms-packages#readme","bugs":{"url":"https://github.com/aero-cms/aero-cms-packages/issues"},"bin":{"aero-cms":"dist/cli.js"},"dist":{"shasum":"83029295c4bdab2be7ea6a3cea0d8d9572c15d6d","tarball":"https://registry.npmjs.org/@aero-cms/react-sdk/-/react-sdk-1.0.2.tgz","fileCount":54,"integrity":"sha512-Mw9+EY0Jat2IJbNd+EULrLCLT9oMhO2dmk9uxWI7jvfhHxzJNliCn9o7cza7iGFTuQjqiQe4xz3XhkQsosvFSw==","signatures":[{"sig":"MEUCIE41g5SkQTEM/Pr/ODrhBC1ixqnIz9v9MWkmIxD4x3DZAiEAyBbV5+9XdGsnxPwIMaGVFF0NJMcHyVnnAG+fFLvs1g4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":138102},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./react":{"types":"./dist/react.d.ts","import":"./dist/react.mjs","require":"./dist/react.js"},"./client":{"types":"./dist/client.d.ts","import":"./dist/client.mjs","require":"./dist/client.js"},"./schema":{"types":"./dist/schema.d.ts","import":"./dist/schema.mjs","require":"./dist/schema.js"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.mjs","require":"./dist/server.js"}},"gitHead":"d4f3e90320c09e9ea226bb6ffcbc0e3975bc43ff","scripts":{"dev":"tsup src/index.ts src/react.ts src/server.ts src/schema.ts src/client.ts src/cli.ts --format cjs,esm --watch","build":"tsup src/index.ts src/react.ts src/server.ts src/schema.ts src/client.ts src/cli.ts --format cjs,esm --dts && tsc --emitDeclarationOnly --declaration --outDir dist","prepack":"npm run build","cms:sync":"npx tsx scripts/sync-schemas.ts","pack:check":"npm pack --dry-run","prepublishOnly":"npm run build && npm run pack:check"},"_npmUser":{"name":"keremzytn","email":"mustafakeremzeytun1@gmail.com"},"repository":{"url":"git+https://github.com/aero-cms/aero-cms-packages.git","type":"git"},"_npmVersion":"10.9.2","description":"Official Aero CMS SDK, React helpers, schema sync, and CLI tooling","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","typescript":"^6.0.2","@types/node":"^22.0.0","@types/react":"^19.2.14"},"peerDependencies":{"react":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/react-sdk_1.0.2_1781647066780_0.6408548117284838","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@aero-cms/react-sdk","version":"1.0.3","keywords":["cms","headless-cms","react","aero-cms","sdk","cli"],"license":"MIT","_id":"@aero-cms/react-sdk@1.0.3","maintainers":[{"name":"keremzytn","email":"mustafakeremzeytun1@gmail.com"}],"homepage":"https://github.com/aero-cms/aero-cms-packages#readme","bugs":{"url":"https://github.com/aero-cms/aero-cms-packages/issues"},"bin":{"aero-cms":"dist/cli.js"},"dist":{"shasum":"f0679c75cddaab446a3c93e0579c0a3c408c9047","tarball":"https://registry.npmjs.org/@aero-cms/react-sdk/-/react-sdk-1.0.3.tgz","fileCount":57,"integrity":"sha512-e2STZmcclu7yfmQav+BGcqFys6FUzkpSYvImJea4oqtM8Z19oOaHfazYEJgjuoGOtB4FtIko6TdQ85P4UlgzZw==","signatures":[{"sig":"MEUCIE+Ym8QmGvUzkbJKhVGyaKG9HJlh7ayVXHGqZymEZLgcAiEApxHFmxhsouJ270PiE/payaxRyB99TeXs9hio8oHNdVY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":156929},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./react":{"types":"./dist/react.d.ts","import":"./dist/react.mjs","require":"./dist/react.js"},"./client":{"types":"./dist/client.d.ts","import":"./dist/client.mjs","require":"./dist/client.js"},"./schema":{"types":"./dist/schema.d.ts","import":"./dist/schema.mjs","require":"./dist/schema.js"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.mjs","require":"./dist/server.js"}},"gitHead":"7e4418678bc4041f26a0d8bb0b1efe4b56606877","scripts":{"dev":"tsup src/index.ts src/react.ts src/server.ts src/schema.ts src/client.ts src/cli.ts --format cjs,esm --watch","build":"tsup src/index.ts src/react.ts src/server.ts src/schema.ts src/client.ts src/cli.ts --format cjs,esm --dts && tsc --emitDeclarationOnly --declaration --outDir dist","prepack":"npm run build","cms:sync":"npx tsx scripts/sync-schemas.ts","pack:check":"npm pack --dry-run","prepublishOnly":"npm run build && npm run pack:check"},"_npmUser":{"name":"keremzytn","email":"mustafakeremzeytun1@gmail.com"},"repository":{"url":"git+https://github.com/aero-cms/aero-cms-packages.git","type":"git"},"_npmVersion":"10.9.2","description":"Official Aero CMS SDK, React helpers, schema sync, and CLI tooling","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","typescript":"^6.0.2","@types/node":"^22.0.0","@types/react":"^19.2.14"},"peerDependencies":{"react":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/react-sdk_1.0.3_1781648365065_0.1338230935788398","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@aero-cms/react-sdk","version":"1.1.0","keywords":["cms","headless-cms","react","aero-cms","sdk","cli"],"license":"MIT","_id":"@aero-cms/react-sdk@1.1.0","maintainers":[{"name":"keremzytn","email":"mustafakeremzeytun1@gmail.com"}],"homepage":"https://github.com/aero-cms/aero-cms-packages#readme","bugs":{"url":"https://github.com/aero-cms/aero-cms-packages/issues"},"bin":{"aero-cms":"dist/cli.js"},"dist":{"shasum":"6a0a35af937c694b7ea976e4905b1930e8800777","tarball":"https://registry.npmjs.org/@aero-cms/react-sdk/-/react-sdk-1.1.0.tgz","fileCount":54,"integrity":"sha512-2cGnYOtWFAq50Uuhnzh8l1GYU5w8/EmICRzmak8qQdlsO6jfFAejIf7pM5Nal9uQUtQkywD6DyUO7GgwGMU9jQ==","signatures":[{"sig":"MEYCIQC308gAIozf9q74qQQ70i7PQoddX6sode6RYytFyRhrqwIhAKmXn8ZKP+c8QzKo+foKW/oezy1DNufSFR1S58tIQyCq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":120680},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./react":{"types":"./dist/react.d.ts","import":"./dist/react.mjs","require":"./dist/react.js"},"./client":{"types":"./dist/client.d.ts","import":"./dist/client.mjs","require":"./dist/client.js"},"./schema":{"types":"./dist/schema.d.ts","import":"./dist/schema.mjs","require":"./dist/schema.js"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.mjs","require":"./dist/server.js"}},"gitHead":"01ea872455427455e6b6f3af5736fec017198249","scripts":{"dev":"tsup src/index.ts src/react.ts src/server.ts src/schema.ts src/client.ts src/cli.ts --format cjs,esm --watch","build":"tsup src/index.ts src/react.ts src/server.ts src/schema.ts src/client.ts src/cli.ts --format cjs,esm --dts && tsc --emitDeclarationOnly --declaration --outDir dist","prepack":"npm run build","cms:sync":"npx tsx scripts/sync-schemas.ts","pack:check":"npm pack --dry-run","prepublishOnly":"npm run build && npm run pack:check"},"_npmUser":{"name":"keremzytn","email":"mustafakeremzeytun1@gmail.com"},"repository":{"url":"git+https://github.com/aero-cms/aero-cms-packages.git","type":"git"},"_npmVersion":"10.9.8","description":"Official Aero CMS SDK, React helpers, schema sync, and CLI tooling","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"@aero-cms/core":"^1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","typescript":"^6.0.2","@types/node":"^22.0.0","@types/react":"^19.2.14"},"peerDependencies":{"react":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/react-sdk_1.1.0_1781655063739_0.6746489425431683","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@aero-cms/react-sdk","version":"1.2.0","description":"Official Aero CMS SDK, React helpers, schema sync, and CLI tooling","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","bin":{"aero-cms":"dist/cli.js"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./react":{"types":"./dist/react.d.ts","import":"./dist/react.mjs","require":"./dist/react.js"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.mjs","require":"./dist/server.js"},"./schema":{"types":"./dist/schema.d.ts","import":"./dist/schema.mjs","require":"./dist/schema.js"},"./client":{"types":"./dist/client.d.ts","import":"./dist/client.mjs","require":"./dist/client.js"},"./admin":{"types":"./dist/admin.d.ts","import":"./dist/admin.mjs","require":"./dist/admin.js"}},"scripts":{"build":"tsup src/index.ts src/react.ts src/server.ts src/schema.ts src/client.ts src/cli.ts src/admin.ts --format cjs,esm --dts && tsc --emitDeclarationOnly --declaration --outDir dist","dev":"tsup src/index.ts src/react.ts src/server.ts src/schema.ts src/client.ts src/cli.ts src/admin.ts --format cjs,esm --watch","cms:sync":"npx tsx scripts/sync-schemas.ts","pack:check":"npm pack --dry-run","prepack":"npm run build","prepublishOnly":"npm run build && npm run pack:check"},"repository":{"type":"git","url":"git+https://github.com/aero-cms/aero-cms-packages.git"},"homepage":"https://github.com/aero-cms/aero-cms-packages#readme","bugs":{"url":"https://github.com/aero-cms/aero-cms-packages/issues"},"publishConfig":{"access":"public"},"engines":{"node":">=20"},"sideEffects":false,"peerDependencies":{"react":">=18.0.0"},"dependencies":{"@aero-cms/core":"^1.2.0"},"keywords":["cms","headless-cms","react","aero-cms","sdk","cli"],"license":"MIT","devDependencies":{"@types/node":"^22.0.0","@types/react":"^19.2.14","tsup":"^8.5.1","typescript":"^6.0.2"},"_id":"@aero-cms/react-sdk@1.2.0","gitHead":"56fdc482ef28141d15147176bae2c4189a63d99f","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-yXX1Rydhv5FJg90scwn6R9PDQmxykMSVQoqKAKE1ZdCpbrAiF1ugbNZAYUDrLK1wT6epSB83YhCKbv+2StDxaA==","shasum":"8a8f7db1d4fdf5739290eeec7bc9be408fd19d81","tarball":"https://registry.npmjs.org/@aero-cms/react-sdk/-/react-sdk-1.2.0.tgz","fileCount":59,"unpackedSize":124275,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD7o6csJnKaj5cP/yhD7w1kcg9cXtSG3eb/pZht9XTBnAIhAOzfZ74OLs0KxrWxarkbUhphmVuqkObCexPLGBBgpskK"}]},"_npmUser":{"name":"keremzytn","email":"mustafakeremzeytun1@gmail.com"},"directories":{},"maintainers":[{"name":"keremzytn","email":"mustafakeremzeytun1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-sdk_1.2.0_1781723522016_0.42528532129336494"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-11T19:16:28.407Z","modified":"2026-06-17T19:12:02.357Z","1.0.0":"2026-04-11T19:16:28.714Z","1.0.1":"2026-04-11T19:24:59.994Z","1.0.2":"2026-06-16T21:57:46.919Z","1.0.3":"2026-06-16T22:19:25.200Z","1.1.0":"2026-06-17T00:11:03.875Z","1.2.0":"2026-06-17T19:12:02.220Z"},"bugs":{"url":"https://github.com/aero-cms/aero-cms-packages/issues"},"license":"MIT","homepage":"https://github.com/aero-cms/aero-cms-packages#readme","keywords":["cms","headless-cms","react","aero-cms","sdk","cli"],"repository":{"type":"git","url":"git+https://github.com/aero-cms/aero-cms-packages.git"},"description":"Official Aero CMS SDK, React helpers, schema sync, and CLI tooling","maintainers":[{"name":"keremzytn","email":"mustafakeremzeytun1@gmail.com"}],"readme":"# @aero-cms/react-sdk\n\n> **Türkçe:** Paket eşlemesi ve starter tablosu →\n> [aero-cms-setup/docs/PACKAGES.md](https://github.com/aero-cms/aero-cms-setup/blob/main/docs/PACKAGES.md)\n\nOfficial Aero CMS SDK, React helpers, schema sync, and CLI tooling.\n\n## Kurulum\n\n```bash\nnpm install @aero-cms/react-sdk\n```\n\n## Kullanım\n\n```tsx\nimport { CmsProvider, usePage, useMenu, BlockRenderer } from '@aero-cms/react-sdk/react';\n\nfunction App() {\n  return (\n    <CmsProvider config={{ baseUrl: 'http://localhost:5047' }}>\n      <HomePage />\n    </CmsProvider>\n  );\n}\n\nfunction HomePage() {\n  const { data: page, loading } = usePage('anasayfa');\n  const { data: menu } = useMenu('header');\n\n  if (loading) return <div>Yükleniyor...</div>;\n  if (!page) return <div>Sayfa bulunamadı</div>;\n\n  return (\n    <div>\n      <h1>{page.title}</h1>\n      <BlockRenderer blocks={page.blocks} />\n    </div>\n  );\n}\n```\n\n## Hook'lar\n\n| Hook | Açıklama |\n|------|----------|\n| `usePage(slug)` | Sayfa verisi |\n| `usePages(params?)` | Sayfa listesi |\n| `useMenu(location)` | Menü ağacı |\n| `useSiteSettings(prefix)` | Site ayarları |\n| `useSearch(query, params?)` | Arama |\n| `useSuggest(query, limit?)` | Arama önerileri |\n| `useForm(slug)` | Form yapısı |\n| `useLanguages()` | Dil listesi |\n\n## BlockRenderer\n\n```tsx\nimport { BlockRenderer } from '@aero-cms/react-sdk/react';\n\n// Varsayılan block bileşenleri ile\n<BlockRenderer blocks={page.blocks} />\n\n// Özel block bileşenleri ile\n<BlockRenderer\n  blocks={page.blocks}\n  components={{\n    text: MyCustomTextBlock,\n    image: MyCustomImageBlock,\n  }}\n/>\n```\n\n`BlockRenderer` renders CMS-managed HTML as trusted content. Sanitize content at the API/admin boundary before exposing it to public websites.\n\n## Server Components\n\n```tsx\nimport { CmsClient } from '@aero-cms/react-sdk/client';\nimport { getComponentContent } from '@aero-cms/react-sdk/server';\nimport { heroSchema } from './schemas';\n\nconst cms = new CmsClient({ baseUrl: process.env.AERO_CMS_API_URL! });\n\nexport default async function Page() {\n  const hero = await getComponentContent(cms, heroSchema);\n  return <h1>{hero.title}</h1>;\n}\n```\n\n## Schema Sync CLI\n\nUse `CMS_TOKEN` instead of `--token` to avoid leaking tokens through shell history or process lists.\n\n```bash\nCMS_TOKEN=your_admin_token npx aero-cms sync \\\n  --schemas ./src/lib/cms-schemas.ts \\\n  --api-url http://localhost:5047\n```\n\nPreview the payload without calling the API:\n\n```bash\nnpx aero-cms sync --schemas ./src/lib/cms-schemas.ts --dry-run\n```\n\n## Exports\n\n- `@aero-cms/react-sdk`: core client, schema helpers, server helper re-exports, and shared types.\n- `@aero-cms/react-sdk/react`: React provider, hooks, preview helpers, and components.\n- `@aero-cms/react-sdk/server`: server-side component content helpers.\n- `@aero-cms/react-sdk/client`: `CmsClient`.\n- `@aero-cms/react-sdk/schema`: schema and template definition helpers.\n\n---\n\n**English summary:** This document is in English. Next.js starter uses this package; schemas can\nalso import from `@aero-cms/core`. See\n[PACKAGES.md#english-summary](https://github.com/aero-cms/aero-cms-setup/blob/main/docs/PACKAGES.md#english-summary).\n","readmeFilename":"README.md"}