{"_id":"@aristaio/booking","name":"@aristaio/booking","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@aristaio/booking","version":"0.1.0","description":"Booking widget for AristaIO — animal care appointment platform","license":"MIT","author":{"name":"AristaIO"},"homepage":"https://aristaio.com","repository":{"type":"git","url":"git+https://github.com/AristaIO/core.git","directory":"packages/booking-widget"},"keywords":["aristaio","booking","appointment-scheduling","react","widget","animal-care"],"publishConfig":{"access":"public"},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs","types":"./dist/index.d.ts"}},"type":"module","scripts":{"dev":"vite","build":"tsc -b && vite build","lint":"eslint .","preview":"vite preview"},"peerDependencies":{"react":"^19.2.0","react-dom":"^19.2.0"},"dependencies":{"@tanstack/react-query":"^5.101.0","axios":"^1.19.0","brace-expansion":"5.0.9","date-fns":"^4.4.0","date-fns-tz":"^3.2.0","i18next":"^26.3.6","react-i18next":"^17.0.11"},"devDependencies":{"@eslint/js":"^10.0.1","@types/node":"^26.1.2","@types/react":"^19.2.18","@types/react-dom":"^19.2.4","@vitejs/plugin-react":"^6.0.5","eslint":"^10.8.0","eslint-plugin-react-hooks":"^7.1.1","eslint-plugin-react-refresh":"^0.5.2","globals":"^17.8.0","react":"^19.2.7","react-dom":"^19.2.6","typescript":"~6.0.3","typescript-eslint":"^8.59.2","vite":"^8.2.0","vite-plugin-dts":"^5.0.2"},"gitHead":"23e41b656d32ae34d4e0718f51f272add36d87f4","_id":"@aristaio/booking@0.1.0","bugs":{"url":"https://github.com/AristaIO/core/issues"},"_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-3ATdT+QbHMKEoV5eNInwEgsqLdy7AzW+Tc/exSYYPJM1oDVJbfT6aq/cv4buwEt/ApJCFGOzMaTMuAl9opbQNA==","shasum":"dbb437ddc7a2544c55b65ee35e0671aafe2bcb42","tarball":"https://registry.npmjs.org/@aristaio/booking/-/booking-0.1.0.tgz","fileCount":33,"unpackedSize":452425,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDf5oqbjTa/ReSCQswUdG1Nfdzw03OsFaU6zyBDEhtbGQIgb+bnfXH1r1ieQmhma8L+xUriYOUtPEScPaNAoXmMaWY="}]},"_npmUser":{"name":"jentherm","email":"jentherm@gmail.com"},"directories":{},"maintainers":[{"name":"jentherm","email":"jentherm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/booking_0.1.0_1786675426159_0.15258425874734094"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-14T02:43:45.962Z","0.1.0":"2026-08-14T02:43:46.296Z","modified":"2026-08-14T02:43:46.529Z"},"maintainers":[{"name":"jentherm","email":"jentherm@gmail.com"}],"description":"Booking widget for AristaIO — animal care appointment platform","homepage":"https://aristaio.com","keywords":["aristaio","booking","appointment-scheduling","react","widget","animal-care"],"repository":{"type":"git","url":"git+https://github.com/AristaIO/core.git","directory":"packages/booking-widget"},"author":{"name":"AristaIO"},"bugs":{"url":"https://github.com/AristaIO/core/issues"},"license":"MIT","readme":"# @aristaio/booking\r\n\r\nEmbeddable booking widget for the [AristaIO](https://aristaio.com) animal-care\r\nscheduling platform. Salon customers use this widget to view available time\r\nslots and request an appointment — no AristaIO admin login required.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @aristaio/booking\r\n```\r\n\r\nPeer dependencies: `react` and `react-dom` (`^19.2.0`).\r\n\r\n## Quick start\r\n\r\n```tsx\r\nimport { AristaioWidget } from '@aristaio/booking';\r\n\r\nexport default function BookingPage() {\r\n  return (\r\n    <AristaioWidget\r\n      layout=\"page\"\r\n      tenantSlug=\"trippeltrap\"\r\n      apiUrl=\"https://api.aristaio.com\"\r\n    />\r\n  );\r\n}\r\n```\r\n\r\n### Next.js (App Router)\r\n\r\nThe widget renders on the client (it fetches data and manages form state), so\r\nmark the page or a wrapper component `'use client'`:\r\n\r\n```tsx\r\n'use client';\r\n\r\nimport { AristaioWidget } from '@aristaio/booking';\r\n\r\nexport default function BookingPage() {\r\n  return (\r\n    <AristaioWidget\r\n      layout=\"page\"\r\n      tenantSlug=\"trippeltrap\"\r\n      apiUrl={process.env.NEXT_PUBLIC_ARISTAIO_API_URL!}\r\n    />\r\n  );\r\n}\r\n```\r\n\r\n## Components\r\n\r\n| Component | Use case |\r\n|---|---|\r\n| `AristaioWidget` | Wrapper — picks the layout via the `layout` prop (recommended) |\r\n| `AristaioWidgetCard` | Compact card — sidebar, embed, mobile (max 480px wide) |\r\n| `AristaioWidgetPage` | Wide, Calendly-style view — for a dedicated full-page route |\r\n\r\n## Props\r\n\r\n| Prop | Type | Required | Default | Description |\r\n|---|---|---|---|---|\r\n| `tenantSlug` | `string` | ✅ | — | Unique slug of the salon (visible in the AristaIO admin) |\r\n| `apiUrl` | `string` | ✅ | — | Base URL of the AristaIO API. Pass `\"\"` if the widget shares an origin with the API. |\r\n| `layout` | `'card' \\| 'page'` | ❌ | `'card'` | Layout variant (`AristaioWidget` only) |\r\n| `primaryColor` | `string` | ❌ | salon's configured color | Override the brand color, e.g. `\"#e91e8c\"` |\r\n| `secondaryColor` | `string` | ❌ | — | Accent color for badges/hover — `layout=\"page\"` only |\r\n| `locale` | `'nl' \\| 'en'` | ❌ | `'nl'` | UI language and date formatting |\r\n\r\nIf `primaryColor` is omitted, the widget uses the salon's configured brand\r\ncolor; if that is unset, it falls back to `#4f46e5`.\r\n\r\n## CORS\r\n\r\nThe salon owner must add the website's origin to the allowed-origins list in\r\nthe AristaIO admin (Settings → Booking). Without this, the widget's API\r\nrequests will be blocked by CORS.\r\n\r\n## Full API/AI-integration reference\r\n\r\nSee [`llms.txt`](./llms.txt) for the complete endpoint list, booking flow, and\r\ntimezone handling — written for both AI coding assistants and developers who\r\nwant the full picture in one file.\r\n","readmeFilename":"README.md","_rev":"1-b768d11aaef9ed9baeee52a920ae247d"}