{"_id":"@antify/legal-holiday-module","_rev":"3-ed8027bd40699b10faf1c36b10cb5cae","name":"@antify/legal-holiday-module","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.1":{"name":"@antify/legal-holiday-module","version":"1.0.1","license":"MIT","_id":"@antify/legal-holiday-module@1.0.1","maintainers":[{"name":"beyer-johannes","email":"johannes@blue-panda.de"},{"name":"thomas-blue-panda","email":"thomas@blue-panda.de"}],"dist":{"shasum":"bdbaacf417ee7e31851e9fdd46b9decebda93e8e","tarball":"https://registry.npmjs.org/@antify/legal-holiday-module/-/legal-holiday-module-1.0.1.tgz","fileCount":20,"integrity":"sha512-coIexblVlRCnEr+5Lb658gWL9IzAsDbQgJjBw8fPjkrWYlWKuf1FxhdWRXaJLRK9UDVSW1mXnCaz115HwoPpJg==","signatures":[{"sig":"MEUCICXZeECiaQ9ffOLi4kpsat96enhzh87MUm48ncSQcZHCAiEAmQzIIb/IsGEeXtb9relyU401MY4PgQoHl1RVQPhpJgU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14829},"type":"module","_from":"file:antify-legal-holiday-module-1.0.1.tgz","types":"./dist/types.d.ts","exports":{".":{"types":"./dist/types.d.ts","import":"./dist/module.mjs"},"./dist/package":{"types":"./dist/package.d.ts","import":"./dist/package.mjs"}},"scripts":{"dev":"nuxi dev playground","lint":"eslint .","test":"vitest run","build":"nuxt-module-build build","release":"pnpm test && standard-version && pnpm publish --access public && git push --follow-tags","dev:build":"nuxi build playground","dev:prepare":"nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground"},"_npmUser":{"name":"beyer-johannes","email":"johannes@blue-panda.de"},"_resolved":"/tmp/ce49ce767209c321ed74a916adee782f/antify-legal-holiday-module-1.0.1.tgz","_integrity":"sha512-coIexblVlRCnEr+5Lb658gWL9IzAsDbQgJjBw8fPjkrWYlWKuf1FxhdWRXaJLRK9UDVSW1mXnCaz115HwoPpJg==","_npmVersion":"10.8.2","description":"A **Nuxt 3 module** for fetching German public holidays.   It provides a composable that lets you retrieve holidays for all federal states or filter them by state — including Augsburg-specific rules — for a given year.","directories":{},"_nodeVersion":"20.18.2","dependencies":{"yup":"1.7.1","date-fns":"^3.6.0","@nuxt/kit":"^3.15.4"},"_hasShrinkwrap":false,"devDependencies":{"h3":"^1.15.0","vue":"^3.5.13","nuxt":"^3.15.4","jsdom":"^24.1.3","pathe":"^1.1.2","vitest":"^3.0.5","globals":"^16.0.0","happy-dom":"^19.0.1","@eslint/js":"^9.26.0","@nuxt/schema":"^3.15.4","@faker-js/faker":"^8.4.1","@vue/test-utils":"^2.4.6","playwright-core":"^1.55.1","@nuxt/test-utils":"^3.19.2","standard-version":"^9.5.0","eslint-plugin-vue":"^10.1.0","typescript-eslint":"^8.32.0","@nuxt/eslint-plugin":"^1.3.0","@nuxt/module-builder":"^0.8.4","eslint-plugin-storybook":"^0.12.0","@stylistic/eslint-plugin":"^4.2.0"},"peerDependencies":{"@antify/ui-module":"2.13.17","@antify/default-template":"0.0.16"},"_npmOperationalInternal":{"tmp":"tmp/legal-holiday-module_1.0.1_1759225757773_0.6832563432500229","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@antify/legal-holiday-module","version":"1.0.2","license":"MIT","_id":"@antify/legal-holiday-module@1.0.2","maintainers":[{"name":"beyer-johannes","email":"johannes@blue-panda.de"},{"name":"thomas-blue-panda","email":"thomas@blue-panda.de"}],"dist":{"shasum":"4d6f852d56a3c5706dca46b44acf0cf721703c34","tarball":"https://registry.npmjs.org/@antify/legal-holiday-module/-/legal-holiday-module-1.0.2.tgz","fileCount":20,"integrity":"sha512-UNBAd5RZIn/F9RJgR57kpMpSoXgubOVZPUsI0rJ8LtK9PA/ppvkD1j2GLkct70MKhese8jfolibXk+2FkL+PSA==","signatures":[{"sig":"MEQCIE4qykOr95qo4Kgel6oAc8KvPFM1F+ikl2zjn60WCNOwAiBDsvuX9iknGYcKtgjTNKHgKZkAsWVT/t5ArVWteMNzGQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14690},"type":"module","_from":"file:antify-legal-holiday-module-1.0.2.tgz","types":"./dist/types.d.ts","exports":{".":{"types":"./dist/types.d.ts","import":"./dist/module.mjs"},"./dist/package":{"types":"./dist/package.d.ts","import":"./dist/package.mjs"}},"scripts":{"dev":"nuxi dev playground","lint":"eslint .","test":"vitest run","build":"nuxt-module-build build","release":"pnpm test && standard-version && pnpm publish --access public && git push --follow-tags","dev:build":"nuxi build playground","dev:prepare":"nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground"},"_npmUser":{"name":"beyer-johannes","email":"johannes@blue-panda.de"},"_resolved":"/tmp/5d5cb2f9ca08ef325f269db5a135098d/antify-legal-holiday-module-1.0.2.tgz","_integrity":"sha512-UNBAd5RZIn/F9RJgR57kpMpSoXgubOVZPUsI0rJ8LtK9PA/ppvkD1j2GLkct70MKhese8jfolibXk+2FkL+PSA==","_npmVersion":"10.8.2","description":"A **Nuxt 3 module** for fetching German public holidays.   It provides a composable that lets you retrieve holidays for all federal states or filter them by state — including Augsburg-specific rules — for a given year.","directories":{},"_nodeVersion":"20.18.2","dependencies":{"yup":"1.7.1","date-fns":"^3.6.0","@nuxt/kit":"^3.15.4"},"_hasShrinkwrap":false,"devDependencies":{"h3":"^1.15.0","vue":"^3.5.13","nuxt":"^3.15.4","jsdom":"^24.1.3","pathe":"^1.1.2","vitest":"^3.0.5","globals":"^16.0.0","happy-dom":"^19.0.1","@eslint/js":"^9.26.0","@nuxt/schema":"^3.15.4","@faker-js/faker":"^8.4.1","@vue/test-utils":"^2.4.6","playwright-core":"^1.55.1","@nuxt/test-utils":"^3.19.2","standard-version":"^9.5.0","eslint-plugin-vue":"^10.1.0","typescript-eslint":"^8.32.0","@nuxt/eslint-plugin":"^1.3.0","@nuxt/module-builder":"^0.8.4","eslint-plugin-storybook":"^0.12.0","@stylistic/eslint-plugin":"^4.2.0"},"peerDependencies":{"@antify/ui-module":"2.13.17","@antify/default-template":"0.0.16"},"_npmOperationalInternal":{"tmp":"tmp/legal-holiday-module_1.0.2_1760010517622_0.1241884013846688","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@antify/legal-holiday-module","version":"1.0.3","license":"MIT","type":"module","exports":{".":{"import":"./dist/module.mjs","types":"./dist/types.d.ts"},"./dist/package":{"import":"./dist/package.mjs","types":"./dist/package.d.ts"}},"types":"./dist/types.d.ts","dependencies":{"@nuxt/kit":"^3.15.4","date-fns":"^3.6.0","yup":"1.7.1"},"devDependencies":{"@antify/template-module":"0.0.2","@eslint/js":"^9.26.0","@faker-js/faker":"^8.4.1","@nuxt/eslint-plugin":"^1.3.0","@nuxt/module-builder":"^0.8.4","@nuxt/schema":"^3.15.4","@nuxt/test-utils":"^3.19.2","@stylistic/eslint-plugin":"^4.2.0","@vue/test-utils":"^2.4.6","eslint-plugin-storybook":"^0.12.0","eslint-plugin-vue":"^10.1.0","globals":"^16.0.0","h3":"^1.15.0","happy-dom":"^19.0.1","jsdom":"^24.1.3","nuxt":"^3.15.4","pathe":"^1.1.2","playwright-core":"^1.55.1","standard-version":"^9.5.0","typescript-eslint":"^8.32.0","vitest":"^3.0.5","vue":"^3.5.13"},"scripts":{"build":"nuxt-module-build build","dev":"nuxi dev playground","dev:build":"nuxi build playground","dev:prepare":"nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground","release":"pnpm test && standard-version && pnpm publish --access public && git push --follow-tags","lint":"eslint .","test":"vitest run"},"_id":"@antify/legal-holiday-module@1.0.3","description":"A **Nuxt 3 module** for fetching German public holidays.   It provides a composable that lets you retrieve holidays for all federal states or filter them by state — including Augsburg-specific rules — for a given year.","_integrity":"sha512-H8/mA3e/32Oc4vTFxWKf7FXnvJ7emNDjV9ry4vSG+mKzO/ej1Usg1p2MVyeTT6xDLrEh0geW+T8xJ0k3ic3sdQ==","_resolved":"/tmp/3fa9b3a152e60646fd1a148fb4275521/antify-legal-holiday-module-1.0.3.tgz","_from":"file:antify-legal-holiday-module-1.0.3.tgz","_nodeVersion":"20.18.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-H8/mA3e/32Oc4vTFxWKf7FXnvJ7emNDjV9ry4vSG+mKzO/ej1Usg1p2MVyeTT6xDLrEh0geW+T8xJ0k3ic3sdQ==","shasum":"51230bf5e4f50bb37826df02c5e5122fc4d0d360","tarball":"https://registry.npmjs.org/@antify/legal-holiday-module/-/legal-holiday-module-1.0.3.tgz","fileCount":20,"unpackedSize":14624,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCZMeOox18GoGMP2l9AQeacDFqVS+XDzVK0NcbZBLLfugIhAOlX+sv5De50zllIrop5GmaDE4abaJPbirO3bh50AlJN"}]},"_npmUser":{"name":"beyer-johannes","email":"johannes@blue-panda.de"},"directories":{},"maintainers":[{"name":"beyer-johannes","email":"johannes@blue-panda.de"},{"name":"thomas-blue-panda","email":"thomas@blue-panda.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/legal-holiday-module_1.0.3_1770191186827_0.8700600667948604"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-30T09:49:17.718Z","modified":"2026-02-04T07:46:27.098Z","1.0.1":"2025-09-30T09:49:17.950Z","1.0.2":"2025-10-09T11:48:37.815Z","1.0.3":"2026-02-04T07:46:26.950Z"},"license":"MIT","description":"A **Nuxt 3 module** for fetching German public holidays.   It provides a composable that lets you retrieve holidays for all federal states or filter them by state — including Augsburg-specific rules — for a given year.","maintainers":[{"name":"beyer-johannes","email":"johannes@blue-panda.de"},{"name":"thomas-blue-panda","email":"thomas@blue-panda.de"}],"readme":"# Legal Holiday Module\n\nA **Nuxt 3 module** for fetching German public holidays.  \nIt provides a composable that lets you retrieve holidays for all federal states or filter them by state — including Augsburg-specific rules — for a given year.\n\n---\n\n## ✨ Features\n\n- Fetch all legal holidays in Germany\n- Filter by federal state (*Bundesland*)\n- Support for Augsburg-only holidays\n- Built-in caching layer to reduce API calls\n- Written in TypeScript, ready to use\n\n---\n\n## 📦 Installation\n\nInstall via your preferred package manager:\n\n```bash\npnpm add @antify/legal-holiday-module\n# or\nnpm install @antify/legal-holiday-module\n# or\nyarn add @antify/legal-holiday-module\n````\n\nAdd the module to your `nuxt.config.ts` and configure the data handler:\n\n```ts\nexport default defineNuxtConfig({\n  modules: [\n    '@antify/legal-holiday-module'\n  ],\n  legalHolidayModule: {\n    dataHandler: 'path/to/dataHandler',\n  },\n})\n```\n\n---\n\n## 🗄 Data Handler\n\nThe **data handler** is used for caching.\nIt must export a function created via `defineDataHandler`.\nPlace the file at the path configured in `nuxt.config.ts`.\n\n```ts\nexport default defineDataHandler({\n  async findData(year: number): Promise<CachedLegalHolidays | null> {\n    // Load cached data (e.g. from DB or filesystem)\n  },\n  async saveData(data: CachedLegalHolidays): Promise<CachedLegalHolidays | null> {\n    // Persist new data\n  },\n});\n```\n\n---\n\n## 🔧 Usage\n\nThe module exposes the `useLegalHolidays` composable.\n\n### Get all holidays for a year\n\n```ts\nconst { getHolidays } = useLegalHolidays()\n\nconst holidays = await getHolidays(2024)\nconsole.log(holidays)\n/*\n[\n  { date: '2024-01-01', name: 'Neujahrstag' },\n  { date: '2024-03-29', name: 'Karfreitag' },\n  ...\n]\n*/\n```\n\n### Get holidays for a specific state\n\n```ts\nconst { getHolidays } = useLegalHolidays()\n\nconst holidays = await getHolidays(2024, { state: 'bw' }) // Baden-Württemberg\nconsole.log(holidays)\n/*\n[\n  { date: '2024-01-01', name: 'Neujahrstag' },\n  { date: '2024-01-06', name: 'Heilige Drei Könige' },\n  ...\n]\n*/\n```\n\n### Augsburg-specific holidays\n\n```ts\nconst { getHolidays } = useLegalHolidays()\n\nconst holidays = await getHolidays(2024, { augsburg: true })\n```\n\n---\n\n## 📖 Notes\n\n* `state` uses the official 2-letter abbreviations (`bw`, `by`, `be`, etc.).\n* If no cached data is found, the module fetches fresh data from the API and persists it via your `dataHandler`.\n","readmeFilename":"README.md"}