[
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\nindent_size = 2\nindent_style = space\nend_of_line = lf\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n[*.md]\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "github: [danielroe]\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug-report.yml",
    "content": "name: \"\\U0001F41B Bug report\"\ndescription: Something's not working\nlabels: [\"bug\"]\nbody:\n  - type: textarea\n    validations:\n      required: true\n    attributes:\n      label: 🐛 The bug\n      description: What isn't working? Describe what the bug is.\n  - type: input\n    validations:\n      required: true\n    attributes:\n      label: 🛠️ To reproduce\n      description: A reproduction of the bug via https://stackblitz.com/github/nuxt-modules/ionic/tree/main/playground\n      placeholder: https://stackblitz.com/[...]\n  - type: textarea\n    validations:\n      required: true\n    attributes:\n      label: 🌈 Expected behaviour\n      description: What did you expect to happen? Is there a section in the docs about this?\n  - type: textarea\n    attributes:\n      label: ℹ️ Additional context\n      description: Add any other context about the problem here.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "contact_links:\n  - name: Nuxt Community Discord\n    url: https://discord.nuxtjs.org/\n    about: Consider asking questions about the module here.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/documentation.yml",
    "content": "name: \"\\U0001F4DA Documentation\"\ndescription: How do I ... ?\nlabels: [\"documentation\"]\nbody:\n  - type: textarea\n    validations:\n      required: true\n    attributes:\n      label: 📚 Is your documentation request related to a problem?\n      description: A clear and concise description of what the problem is.\n      placeholder: I feel I should be able to [...] but I can't see how to do it from the docs.\n  - type: textarea\n    attributes:\n      label: 🔍 Where should you find it?\n      description: What page of the docs do you expect this information to be found on?\n  - type: textarea\n    attributes:\n      label: ℹ️ Additional context\n      description: Add any other context or information.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature-suggestion.yml",
    "content": "name: \"\\U0001F195 Feature suggestion\"\ndescription: Suggest an idea\nlabels: [\"enhancement\"]\nbody:\n  - type: textarea\n    validations:\n      required: true\n    attributes:\n      label: 🆒 Your use case\n      description: Add a description of your use case, and how this feature would help you.\n      placeholder: When I do [...] I would expect to be able to do [...]\n  - type: textarea\n    validations:\n      required: true\n    attributes:\n      label: 🆕 The solution you'd like\n      description: Describe what you want to happen.\n  - type: textarea\n    attributes:\n      label: 🔍 Alternatives you've considered\n      description: Have you considered any alternative solutions or features?\n  - type: textarea\n    attributes:\n      label: ℹ️ Additional info\n      description: Is there any other context you think would be helpful to know?\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/help-wanted.yml",
    "content": "name: \"\\U0001F198 Help\"\ndescription: I need help with ...\nlabels: [\"help\"]\nbody:\n  - type: textarea\n    validations:\n      required: true\n    attributes:\n      label: 📚 What are you trying to do?\n      description: A clear and concise description of your objective.\n      placeholder: I'm not sure how to [...].\n  - type: textarea\n    attributes:\n      label: 🔍 What have you tried?\n      description: Have you looked through the docs? Tried different approaches? The more detail the better.\n  - type: textarea\n    attributes:\n      label: ℹ️ Additional context\n      description: Add any other context or information.\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "name: ci\n\non:\n  pull_request:\n    branches:\n      - main\n      - renovate/*\n  push:\n    branches:\n      - main\n\njobs:\n  lint:\n    if: github.event_name == 'pull_request' || github.event_name == 'push' && github.ref != 'refs/heads/renovate/*' || github.event_name == 'push' && github.ref == 'refs/heads/renovate/*' && github.event.pull_request == null\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6\n      - run: corepack enable\n      - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6\n        with:\n          node-version: lts/*\n          cache: 'pnpm'\n\n      - name: 📦 Install dependencies\n        run: pnpm install --frozen-lockfile\n\n      - name: 🚧 Set up project\n        run: pnpm dev:prepare\n\n      - name: 🔠 Lint project\n        run: pnpm run lint\n\n  test:\n    if: github.event_name == 'pull_request' || github.event_name == 'push' && github.ref != 'refs/heads/renovate/*' || github.event_name == 'push' && github.ref == 'refs/heads/renovate/*' && github.event.pull_request == null\n    strategy:\n      matrix:\n        os: [ubuntu-latest, windows-latest]\n    runs-on: ${{ matrix.os }}\n\n    steps:\n      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6\n      - run: corepack enable\n      - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6\n        with:\n          node-version: lts/-1\n          cache: 'pnpm'\n\n      - name: 📦 Install dependencies\n        run: pnpm install --frozen-lockfile\n\n      - name: 🚧 Set up project\n        run: pnpm dev:prepare\n\n      - name: 🎭 Set up playwright\n        run: pnpm playwright-core install\n\n      - name: 🧪 Test project\n        run: pnpm test\n\n      - name: 💪 Test types\n        run: pnpm test:types\n\n      - name: 🛠 Build project\n        run: pnpm build\n\n      - name: 🟩 Coverage\n        if: matrix.os != 'windows-latest'\n        uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6\n        env:\n          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/provenance.yml",
    "content": "name: ci\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\npermissions:\n  contents: read\njobs:\n  check-provenance:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6\n        with:\n          fetch-depth: 0\n      - name: Check provenance downgrades\n        uses: danielroe/provenance-action@41bcc969e579d9e29af08ba44fcbfdf95cee6e6c # v0.1.1\n        with:\n          fail-on-provenance-change: true\n"
  },
  {
    "path": ".github/workflows/release.yml",
    "content": "name: Release\n\npermissions:\n  contents: write\n\non:\n  push:\n    tags:\n      - 'v*'\n  workflow_dispatch:\n\njobs:\n  release:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6\n      - run: corepack enable\n      - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6\n        with:\n          node-version: lts/*\n          cache: 'pnpm'\n\n      - run: npx changelogithub\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n"
  },
  {
    "path": ".gitignore",
    "content": "# Dependencies\nnode_modules\n\n# Capacitor projects\nplayground/android\nplayground/ios\n\n# Logs\n*.log*\n\n# Temp directories\n.temp\n.tmp\n.cache\n\n# Yarn\n**/.yarn/cache\n**/.yarn/*state*\n\n# Generated dirs\ndist\n\n# Nuxt\n.nuxt\n.output\n.vercel_build_output\n.build-*\n.env\n.netlify\n\n# Env\n.env\n\n# Testing\nreports\ncoverage\n*.lcov\n.nyc_output\n\n# VSCode\n.vscode\n\n# Intellij idea\n*.iml\n.idea\n\n# Zed\n.zed\n\n# OSX\n.DS_Store\n.AppleDouble\n.LSOverride\n.AppleDB\n.AppleDesktop\nNetwork Trash Folder\nTemporary Items\n.apdisk\n\nionic.config.json\n"
  },
  {
    "path": "CODEOWNERS",
    "content": "* @danielroe\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n- Using welcoming and inclusive language\n- Being respectful of differing viewpoints and experiences\n- Gracefully accepting constructive criticism\n- Focusing on what is best for the community\n- Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n- The use of sexualized language or imagery and unwelcome sexual attention or advances\n- Trolling, insulting/derogatory comments, and personal or political attacks\n- Public or private harassment\n- Publishing others' private information, such as a physical or electronic address, without explicit permission\n- Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [daniel@roe.dev](mailto:daniel@roe.dev). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq\n"
  },
  {
    "path": "LICENCE",
    "content": "MIT License\n\nCopyright (c) 2022 Daniel Roe\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "[![@nuxtjs/ionic](./docs/public/cover.jpg)](https://ionic.nuxtjs.org)\n\n# Nuxt Ionic\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Github Actions][github-actions-src]][github-actions-href]\n[![Codecov][codecov-src]][codecov-href]\n[![nuxt.care health](https://img.shields.io/endpoint?url=https://nuxt.care/api/badge/ionic)](https://nuxt.care/?search=ionic)\n\n> [Ionic](https://ionicframework.com/docs/) integration for [Nuxt](https://nuxtjs.org)\n\n- [✨ &nbsp;Changelog](https://github.com/nuxt-modules/ionic/blob/main/CHANGELOG.md)\n- [📖 &nbsp;Read the documentation](https://ionic.nuxtjs.org)\n- [▶️ &nbsp;Online playground](https://stackblitz.com/github/nuxt-modules/ionic/tree/main/playground)\n\n## Features\n\n- Zero-config required\n- Auto-import Ionic components, composables and icons\n- Ionic Router integration\n- Pre-render routes\n- Mobile meta tags\n- Works out-of-the-box with [Capacitor](https://capacitorjs.com/) to build mobile apps\n\n**In progress**\n\n- [ ] PWA Elements [#14](https://github.com/nuxt-modules/ionic/issues/14)\n\n## Usage\n\n👉 Check out https://ionic.nuxtjs.org.\n\n## 💻 Development\n\n- Clone this repository\n- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`\n- Install dependencies using `pnpm install`\n- Stub module with `pnpm dev:prepare`\n- Run `pnpm dev` to start [playground](./playground) in development mode\n\n## License\n\nMade with ❤️\n\nPublished under the [MIT License](./LICENCE).\n\n<!-- Badges -->\n\n[npm-version-src]: https://npmx.dev/api/registry/badge/version/@nuxtjs/ionic\n[npm-version-href]: https://npmx.dev/package/@nuxtjs/ionic\n[npm-downloads-src]: https://npmx.dev/api/registry/badge/downloads/@nuxtjs/ionic\n[npm-downloads-href]: https://npm.chart.dev/@nuxtjs/ionic\n[github-actions-src]: https://img.shields.io/github/actions/workflow/status/nuxt-modules/ionic/ci.yml?style=flat-square&branch=main\n[github-actions-href]: https://github.com/nuxt-modules/ionic/actions?query=workflow%3Aci\n[codecov-src]: https://img.shields.io/codecov/c/gh/nuxt-modules/ionic/main?style=flat-square\n[codecov-href]: https://codecov.io/gh/nuxt-modules/ionic\n"
  },
  {
    "path": "build.config.ts",
    "content": "import { defineBuildConfig } from 'unbuild'\n\nexport default defineBuildConfig({\n  // TODO: fix in unbuild\n  externals: ['node:fs'],\n})\n"
  },
  {
    "path": "docs/.gitignore",
    "content": "node_modules\n*.iml\n.idea\n*.log*\n.nuxt\n.vscode\n.DS_Store\ncoverage\ndist\nsw.*\n.env\n.output\n.data"
  },
  {
    "path": "docs/app.config.ts",
    "content": "export default defineAppConfig({\n  ui: {\n    colors: {\n      primary: 'blue',\n      neutral: 'zinc',\n    },\n  },\n  docus: {\n    title: 'nuxt/ionic',\n    url: 'https://ionic.nuxtjs.org/',\n    description: 'Batteries-included Ionic integration for Nuxt.',\n    socials: {\n      twitter: 'danielcroe',\n      github: 'nuxt-modules/ionic',\n    },\n    cover: {\n      src: '/cover.jpg',\n      alt: 'Nuxt Ionic module.',\n    },\n    github: {\n      owner: 'nuxt-modules',\n      repo: 'ionic',\n      branch: 'main',\n      root: 'docs/content',\n      edit: true,\n    },\n    header: {\n      logo: true,\n    },\n    footer: {\n      credits: {\n        icon: 'IconDocus',\n        text: 'Powered by Docus',\n        href: 'https://docus.com',\n      },\n      iconLinks: [\n        {\n          label: 'NuxtJS',\n          href: 'https://nuxtjs.org',\n          icon: 'IconNuxt',\n        },\n      ],\n    },\n  },\n})\n"
  },
  {
    "path": "docs/assets/css/main.css",
    "content": "@import \"tailwindcss\";\n@import \"@nuxt/ui\";\n\n\n:root {\n--color-blue: oklch(66.85% 0.17582 260.7);\n--color-blue-50: oklch(100% 0 none);\n--color-blue-100: oklch(98.081% 0.00906 258.34);\n--color-blue-200: oklch(89.967% 0.0486 260.89);\n--color-blue-300: oklch(82.018% 0.08975 261.51);\n--color-blue-400: oklch(74.222% 0.13277 261.06);\n--color-blue-500: oklch(66.85% 0.17582 260.7);\n--color-blue-600: oklch(57.957% 0.23039 261.17);\n--color-blue-700: oklch(49.935% 0.22723 261.78);\n--color-blue-800: oklch(40.624% 0.18173 261.53);\n--color-blue-900: oklch(30.965% 0.13179 260.75);\n--color-blue-950: oklch(25.869% 0.105 259.91);\n\n}"
  },
  {
    "path": "docs/components/AppHeaderLogo.vue",
    "content": "<template>\n  <div class=\"logo\">\n    <svg\n      width=\"32\"\n      height=\"32\"\n      viewBox=\"0 0 32 32\"\n      fill=\"none\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n    >\n      <path\n        fill-rule=\"evenodd\"\n        clip-rule=\"evenodd\"\n        d=\"M30.4327 9.05578L30.5633 9.36054C31.5211 11.4721 32 13.6925 32 16C32 24.8163 24.8163 32 16 32C7.18367 32 0 24.8163 0 16C0 7.18367 7.18367 0 16 0C18.5905 0 21.0503 0.609524 23.3143 1.7415L23.619 1.89388L23.3578 2.11156C22.7048 2.63401 22.2041 3.28707 21.8776 4.04898L21.7905 4.26667L21.5946 4.17959C19.8313 3.35238 17.9592 2.91701 16 2.91701C8.77279 2.91701 2.91701 8.77279 2.91701 16C2.91701 23.2272 8.77279 29.083 16 29.083C23.2272 29.083 29.083 23.2054 29.083 16C29.083 14.2803 28.7565 12.5823 28.0816 10.9932L27.9946 10.7755L28.2122 10.6884C28.9741 10.4054 29.6707 9.92653 30.215 9.31701L30.4327 9.05578ZM26.4707 9.36057C28.3102 9.36057 29.8014 7.8694 29.8014 6.02996C29.8014 4.19051 28.3102 2.69934 26.4707 2.69934C24.6313 2.69934 23.1401 4.19051 23.1401 6.02996C23.1401 7.8694 24.6313 9.36057 26.4707 9.36057ZM15.9999 8.70754C11.9727 8.70754 8.7074 11.9728 8.7074 16.0001C8.7074 20.0273 11.9727 23.2926 15.9999 23.2926C20.0271 23.2926 23.2924 20.0273 23.2924 16.0001C23.2924 11.9728 20.0271 8.70754 15.9999 8.70754Z\"\n        fill=\"var(--color-blue-500)\"\n      />\n    </svg>\n    <span>\n      Nuxt <span style=\"color: var(--color-blue-500)\">Ionic</span>\n    </span>\n  </div>\n</template>\n\n<style scoped>\n  .logo {\n    display: flex;\n    flex-direction: row;\n    align-items: center;\n    gap: 0.5rem;\n    font-weight: 800;\n  }\n</style>\n"
  },
  {
    "path": "docs/content/1.get-started/.navigation.yml",
    "content": "icon: heroicons-outline:star\nnavigation.redirect: /get-started/introduction\n"
  },
  {
    "path": "docs/content/1.get-started/1.introduction.md",
    "content": "---\nnavigation.icon: uil:info-circle\ndescription: 'Batteries-included, zero-config needed, Ionic integration for Nuxt'\n---\n\n`@nuxtjs/ionic` provides a batteries-included, zero-config needed, Ionic integration for Nuxt.\n\nSupercharge your Ionic apps with the power of Nuxt, giving you the tremendous development experience you're used to\nwhen using Nuxt for web.\n\nFollow the installation guide to get going immediately, or continue reading to find out more about what this module provides.\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nGet started with our [Installation guide](/get-started/installation).\n::\n\n## What is Ionic?\n\n[The Ionic SDK](https://ionicframework.com/) is an open-source UI toolkit for building modern, cross-platform mobile apps from a single codebase. It deeply integrates with Vue for a delightful mobile dev experience.\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead the [Ionic documentation for Vue](https://ionicframework.com/docs/vue/overview) to learn more about Vue development with Ionic.\n::\n\n## Features\n\nThis module attempts to get you going with Nuxt + Ionic quickly, providing sane defaults for ionic and helpful components and utilities. The configuration file can still customize and override its default behaviors and provide full customisation of ionic.\n\n::list{type=success}\n- **Ionic router integration:** continue defining routes based on the structure of your `~/pages` directory and using page-level utilities such as `definePageMeta()`.\n- **Auto-imports**: Ionic components, composables and icons are all [auto-imported](https://nuxt.com/docs/guide/concepts/auto-imports) for ease of use.\n- **Helpful components and utilities**: This module provides components and utilities to accomplish common tasks more easily.\n- **Pre-render routes**\n- **Mobile meta tags**\n- **Capacitor integration**: works out-of-the-box with [Capacitor](https://capacitorjs.com/) for shipping to native platforms like iOS and Android.\n::\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead more about [our features](/overview).\n::\n\n## Cookbook\n\nOur cookbook documentation provides common use-cases with code examples to get you going as fast as possible. And if you create something useful, come back and submit a PR to have it added to our cookbook.\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nDiscover common recipes in [our cookbook](/cookbook).\n::\n"
  },
  {
    "path": "docs/content/1.get-started/2.installation.md",
    "content": "---\nnavigation.icon: uil:play-circle\ndescription: 'Get started quickly by installing and setting up this module with the following instructions.'\n---\n\n## Prerequisites\n\n- A fresh or existing Nuxt project\n- [Nuxt's prerequisites](https://nuxt.com/docs/getting-started/installation#prerequisites)\n- [Ionic's environment setup](https://ionicframework.com/docs/intro/environment)\n- [Capacitor's enviroment setup](https://capacitorjs.com/docs/getting-started/environment-setup) if using iOS or Android\n\n## Installation\n\n::steps{level=3}\n\n### Add module\n\nAdd `@nuxtjs/ionic` to your project's dev dependencies:\n```bash [Terminal]\nnpx nuxi@latest module add ionic\n```\n\n### Nuxt Module\n\nNext, add the module to your Nuxt configuration in `nuxt.config.ts`.\n\n```js{}[nuxt.config.ts]\nexport default defineNuxtConfig({\n  modules: ['@nuxtjs/ionic'],\n  ssr: false,\n})\n```\n\n::callout{color=\"warning\" icon=\"i-lucide-alert-triangle\"}\nIf deploying to iOS or Android, be aware the app must be able to run completely client-side. We recommend setting `ssr: false` in your nuxt config. Find out more in [deploying to both web and device](/cookbook/web-and-device).\n::\n\nFinally, either remove your `app.vue` file or [replace it with a custom one](/cookbook/customising-app-vue).\n\n### Development Server\n\nNow you'll be able to start your Nuxt app in development mode as usual:\n\n::code-group\n\n```bash [yarn]\nyarn dev -o\n```\n\n```bash [npm]\nnpm run dev -- -o\n```\n\n```bash [pnpm]\npnpm dev -o\n```\n\n::\n::callout{color=\"success\" icon=\"i-lucide-check-circle\" .font-bold}\nWell done! A browser window should automatically open for <http://localhost:3000>.\n::\n\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nThe first time you start a Nuxt project with `@nuxtjs/ionic` enabled, a `ionic.config.json` file will be created if it doesn't already exist.\n::\n\n::\n"
  },
  {
    "path": "docs/content/1.get-started/3.configuration.md",
    "content": "---\ntitle: Configuration\ndescription: >\n  This module provides configuration options for itself, as well as passing through configuration for ionic.\n  Configuration for capacitor is set in the usual way, via capacitor.config.ts.\nnavigation.icon: uil:wrench\n---\n\n\n\n### Module Config\n\nThis module exposes three keys for configuration: `integrations`, `css` and `config`:\n\n```js [nuxt.config.ts]\nexport default defineNuxtConfig({\n  modules: ['@nuxtjs/ionic'],\n  ionic: {\n    integrations: {\n      //\n    },\n    css: {\n      //\n    },\n    config: {\n      //\n    }\n  },\n})\n```\n\n#### `integrations`\n\nIntegrations control which other modules this module should enable and setup from the list below. Disabling them allows you to remove them, or gives you the option to set them up yourself.\n\n- **meta**\n\n  Default: `true`  \n  Disable to take full control of meta tags.\n\n- **router**\n\n  Default: `true`  \n  Disable to configure Ionic Router yourself.\n\n- **icons**\n\n  Default: `true`  \n  Disable to stop icons from being auto-imported.\n\n#### `css`\n\nConfigure which Ionic stylesheets are automatically added to your application. For more information about\nthese stylesheets, [see the Ionic Documentation for Stylesheets](https://ionicframework.com/docs/layout/global-stylesheets).\n\n- **core**\n\n  Default: `true`  \n  Disable to import these CSS files manually:\n\n  - `@ionic/vue/css/core.css`\n\n- **basic**\n\n  Default: `true`  \n  Disable to import these CSS files manually:\n\n  - `@ionic/vue/css/normalize.css`\n  - `@ionic/vue/css/structure.css`\n  - `@ionic/vue/css/typography.css`\n\n- **utilities**\n\n  Default: `false`  \n  Enable to add extra Ionic CSS utilities:\n\n  - `@ionic/vue/css/padding.css`\n  - `@ionic/vue/css/float-elements.css`\n  - `@ionic/vue/css/text-alignment.css`\n  - `@ionic/vue/css/text-transformation.css`\n  - `@ionic/vue/css/flex-utils.css`\n  - `@ionic/vue/css/display.css`\n\n#### `config`\n\nConfigure Ionic components globally across your app, such as app mode, tab button layout, etc. For example:\n\n```js [nuxt.config.ts]\nexport default defineNuxtConfig({\n  ionic: {\n    config: {\n      rippleEffect: false,\n      mode: 'md',\n      // ...\n    },\n  },\n})\n```\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nPlease see the [Ionic Config Options](https://ionicframework.com/docs/vue/config#config-options) for available keys, values\nand examples of how they work.\n::\n\n### Capacitor Config\n\nCapacitor is configured via the `capacitor.config.ts` file - this is only required if you are targeting native devices such as iOS or Android.\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nPlease see the [Capacitor Config docs](https://capacitorjs.com/docs/config) for more information.\n::\n"
  },
  {
    "path": "docs/content/1.get-started/4.enabling-capacitor.md",
    "content": "---\ntitle: Enabling Capacitor\ndescription: \"\"\nnavigation.icon: nonicons:capacitor-16\n---\n\n[Capacitor](https://capacitorjs.com/) is a powerful tool for shipping to native platforms like iOS and Android, separate from or alongside your web app.\n\nThe good news is that it's installed by default with `@nuxtjs/ionic`. You just need to enable it in your ionic app, and choose what platforms you want to support.\n\n> The Ionic CLI is available via `npx` or can be installed globally with `npm install -g @ionic/cli` or `yarn global add @ionic/cli` or `pnpm add -g @ionic/cli`.\n\n::code-group\n\n```bash [npx]\nnpx @ionic/cli integrations enable capacitor\nnpx @ionic/cli capacitor add ios\nnpx @ionic/cli capacitor add android\n```\n\n```bash [npm]\n# ionic config set -g npmClient npm\n\nionic integrations enable capacitor\nionic capacitor add ios\nionic capacitor add android\n```\n\n```bash [yarn]\nionic config set -g npmClient yarn\n\nionic integrations enable capacitor\nionic capacitor add ios\nionic capacitor add android\n```\n\n```bash [pnpm]\nionic config set -g npmClient pnpm\n\nionic integrations enable capacitor\nionic capacitor add ios\nionic capacitor add android\n```\n\n::\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead more about [creating for iOS and Android here](/cookbook/creating-ios-android-apps).\n::\n\n#### Run on iOS or Android\n\nOnce an Android or iOS project is added with Capacitor, you can run your app on an iOS or Android emulator.\n\n::callout\nAndroid Studio and SDK (for Android projects) or XCode (for iOS projects) are required to use the `npx cap open` or `npx cap run` command. See the [Capacitor Environment Setup docs](https://capacitorjs.com/docs/getting-started/environment-setup) for details.\n::\n\nTo build, sync, and run your app:\n\n1. Create a web build with `npx nuxt generate` or `npx nuxt build`.\n2. Run `npx cap sync` to update your Capacitor project directories with your latest app build.\n3. Run `npx cap run android` or `npx cap run ios` to run the app from the command line using an installed device **OR**\n4. _(Optional)_ Run `npx cap open android` or `npx cap open ios` to open the project in Android Studio or XCode, respectively.\n\n> Remember to run `npx cap sync` after every new build to ensure your Android and/or iOS project is up-to-date.\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead more about [local development for iOS and Android here](/cookbook/local-development).\n::\n"
  },
  {
    "path": "docs/content/1.get-started/5.watch-outs.md",
    "content": "---\ntitle: Watchouts\ndescription: \"\"\nnavigation.icon: uil:exclamation-triangle\n---\n\nThis page aims to succinctly mention things to watch out for when building your Nuxt-powered Ionic application, particularly for those familiar with regular Nuxt and Vue applications.\n\n## Pages and Navigation\n\n::list{type=\"warning\"}\n- Avoid using `<NuxtPage>`, `<NuxtLayout>` or `<NuxtLink>`. These are currently not integrated with this module.\n::\n\nInstead, Ionic expects `<ion-router-outlet>` to show the route component, and `useIonRouter()` or the `router-link` property on any `ion-` component to change page.\n\n```vue [app.vue]\n<template>\n  <ion-app>\n    <ion-router-outlet />\n  </ion-app>\n</template>\n```\n\n::list{type=\"warning\"}\n- The root element of every page must always be `<ion-page>`. \n::\n\nThis is required by Ionic to set up page transitions and stack navigation. Each view that is navigated to using the router must include an `<ion-page>` component.\n\n::list{type=\"warning\"}\n- When navigating from a tabbed route to a non-tabbed route, `route.params` from the auto-imported `useRoute()` will always be an empty object.\n::\n\nA current workaround is to `import { useRoute } from 'vue-router';`.\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead more [about routing here](/overview/routing).\n::\n\n## Lifecycle Hooks\n\nIonic handles lifecycle events slightly differently to Vue, as it persists some components in the DOM when Vue would usually unmount them.\n\nThis means the various mounted hooks, e.g. `onBeforeMount`, may not be called when you would expect them to.\n\nTo help with this, Ionic has added extra lifecycle hooks which behave how you may have expected the mounted hooks to behave.\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead about the [Ionic Vue lifecycle hooks here](https://ionicframework.com/docs/vue/lifecycle).\n::\n\nBecause of this, some expected functionality from Nuxt or other modules may not work or may require changes to get functioning:\n\n::list{type=\"warning\"}\n- **The composable `useHead()` will not work out of the box**.  \n  See [our cookbook page](/cookbook/page-metadata) for how to continue using `useHead()`\n- **Certain Vue Router components should not be used**.  \n  This includes `<keep-alive>`, `<transition>`, and `<router-view>` - [read more here](https://ionicframework.com/docs/vue/lifecycle#how-ionic-framework-handles-the-life-of-a-page).\n::\n\n## No serverside rendering\n\n::list{type=\"warning\"}\n- The application code cannot contain any serverside rendering.\n::\n\nWhen targeting iOS or Android devices, the build must be able to run completely on the clientside. We discuss [solutions for if you're targeting both web and device here](/cookbook/web-and-device).\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nLearn more about [building for native devices here](/cookbook/creating-ios-android-apps).\n::\n"
  },
  {
    "path": "docs/content/2.overview/.navigation.yml",
    "content": "icon: heroicons-outline:sparkles\nnavigation.redirect: /overview/routing\n"
  },
  {
    "path": "docs/content/2.overview/1.routing.md",
    "content": "---\ntitle: Routing\ndescription: Routing within your Nuxt Ionic application will feel very similar, but with a couple of differences.\nnavigation.icon: uil:sign-alt\n---\n\nBy default, this module sets up the Ionic Router, or `IonRouter`. This router is built on top of `vue-router`, but with some changed functionality specifically for making it work better for mobile applications.\n\n::list{type=\"success\"}\n- Enables [non-linear routing](https://ionicframework.com/docs/vue/navigation#non-linear-routing), e.g. for application tabs\n- Separate navigation stacks for each tab of your application\n- Rich page transitions out-of-the-box, appropriate for mobile\n- Simple API for custom animations and direction control when navigating via links \n::\n\n## Pages\n\nJust like regular Nuxt, you can start building your Ionic application by creating routes within the `~/pages` directory. Every Vue file inside this directory will generate a route that displays the contents of the file. Read more about [Nuxt file-based routing](https://nuxt.com/docs/getting-started/routing) here.\n\n::list{type=\"warning\"}\n- The root component of every page must always be the `<ion-page>` component.\n::\n\nThis is required by Ionic to set up page transitions and stack navigation. Each view that is navigated to using the router must include an `<ion-page>` component.\n\n```vue [~/pages/home.vue]\n<template>\n  <ion-page>\n    <ion-header>\n      <ion-toolbar>\n        <ion-title>Home</ion-title>\n      </ion-toolbar>\n    </ion-header>\n    <ion-content class=\"ion-padding\">Hello World</ion-content>\n  </ion-page>\n</template>\n```\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead more about [`<ion-page>` here](https://ionicframework.com/docs/vue/navigation#ionpage).\n::\n\n### Defining page meta\n\nNuxt utilities like `definePageMeta` are fully functional. However, you should avoid using `<NuxtPage>` or `<NuxtLayout>` as these will not function correctly, due to Ionic requiring an `<ion-router-outlet>` instead.\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead more about [`definePageMeta` here](https://nuxt.com/docs/api/utils/define-page-meta).\n::\n\n### Define a root alias if there's no index.vue page\n\nUsually applications with tab bars will not have a `~/pages/index.vue` file, as it's not needed. However, this will mean opening the app will return a 404, e.g. on localhost:3000.\n\nTo solve this, if you do not have a `~/pages/index.vue` file in your project, you should add the following code to the page that you want to be displayed on your app's root page:\n\n```ts [pages/tabs.vue]\ndefinePageMeta({\n  alias: ['/'],\n})\n```\n\nIt will now be used as the root path, and will be routed to by default when visiting e.g. localhost:3000.\n\n\n## Navigation\n\nNavigation can be done in several ways, using the `IonRouter` or certain `ion-` components.\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead about navigation in [Ionic's Vue Navigation docs](https://ionicframework.com/docs/vue/navigation).\n::\n\n### IonRouter\n\nTo access the router, use the composable `useIonRouter()`. This should always be used instead of the regular `useRouter()` (which is auto-imported from `vue-router` by Nuxt). This ensures the benefits of the Ion Router are always provided.\n\nThis module auto-imports `useIonRouter()` so it should be available automatically. If this is disabled, you can import it from `@ionic/vue`.\n\nIt is best used when you wish to control navigation programmatically and have full control over the page transitions.\n\n```vue\n<script setup lang=\"ts\">\nimport { customAnimation } from '~/animations/customAnimation';\n\nconst router = useIonRouter();\n\nconst goHome = () => router.push('/home');\nconst goBack = () => router.back();\nconst replaceRoute = () => router.replace({ name: 'newRoute' })\nconst customAnimatedNavigation = () => router.navigate('/page2', 'forward', 'replace', customAnimation);\n</script>\n```\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead more about [`useIonRouter() here`](https://ionicframework.com/docs/vue/navigation#navigating-using-useionrouter).\n::\n\n### Navigating with Components\n\nAll Ionic components expose a `router-link` attribute. When set, the router will navigate to the specified route when the component is clicked. It accepts strings as well as named routes.\n\n`router-direction` and `router-animation` are also available for further control.\n\nIt's best used when simple routing is required, without any programmatic logic before or after.\n\n```vue\n<template>\n  <ion-button router-link=\"{ name: 'myPage' }\">Click Me</ion-button>\n  <ion-button \n    router-link=\"/page2\" \n    router-direction=\"back\" \n    :router-animation=\"myAnimation\"\n  >\n    Click Me\n  </ion-button>\n</template>\n```\n\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead about [using the `router-link` attribute here](https://ionicframework.com/docs/vue/navigation#navigating-using-router-link).\n::\n\n::callout{color=\"warning\" icon=\"i-lucide-alert-triangle\"}\nAvoid using `<NuxtLink>` for now as it currently is not integrated with the Ionic Router.\n::\n\n## Route Parameters\n\nWhen accessing route parameters, `useRoute()` should continue to be used, just like regular Nuxt.\n\n```vue [pages/posts/[id}.vue]\n<script setup lang=\"ts\">\nconst route = useRoute()\n\n// When accessing /posts/1, route.params.id will be 1\nconsole.log(route.params.id)\n</script>\n```\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead more about [Nuxt route parmeters here](https://nuxt.com/docs/getting-started/routing#route-parameters). \n::\n\n## Route Middleware\n\nNuxt's Route Middleware is also integrated and available, just like regular Nuxt.\n\n::code-group\n\n```ts [middleware/auth.ts]\nexport default defineNuxtRouteMiddleware((to, from) => {\n  // isAuthenticated() is an example method verifying if a user is authenticated\n  if (isAuthenticated() === false) {\n    return showLoginModal(); // showLoginModal() is an example of opening a modal flow for authentication\n  }\n})\n```\n\n```html [pages/tabs/feed.vue]\n<script setup lang=\"ts\">\ndefinePageMeta({\n  middleware: 'auth'\n})\n</script>\n\n<template>\n  <h1>Welcome to your feed</h1>\n</template>\n```\n\n::\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead more about [Nuxt route middleware here](https://nuxt.com/docs/getting-started/routing#route-middleware).\n::\n"
  },
  {
    "path": "docs/content/2.overview/2.theming.md",
    "content": "---\ntitle: Theming\ndescription: \"\"\nnavigation.icon: uil:palette\n---\n\nIonic provides many css variables with which their components derive css styles. These variables can be overridden to customise the theme of your app. \n\nIn its most simple form, you can create a `~/assets/css/ionic.css` file and add it to the `css` property in your `nuxt.config.ts` file. You can then add css variables that you'd like to override within this file, under the `:root` selector:\n\n::code-group\n\n```css [assets/css/ionic.css]\n:root {\n  --ion-color-primary: #57e389;\n  --ion-color-primary-rgb: 87, 227, 137;\n  --ion-color-primary-contrast: #000000;\n  --ion-color-primary-contrast-rgb: 0, 0, 0;\n  --ion-color-primary-shade: #4dc879;\n  --ion-color-primary-tint: #68e695;\n\n  /* And so on... */\n}\n```\n\n```ts [nuxt.config.ts]\nexport default defineNuxtConfig({\n  css: ['~/assets/css/ionic.css'],\n})\n```\n\n::\n\nTo learn more about theming and which variables to override, check out Ionic's [official theming documentation](https://ionicframework.com/docs/theming/basics).\n"
  },
  {
    "path": "docs/content/2.overview/3.ionic-auto-imports.md",
    "content": "---\ntitle: Ionic Auto-Imports\nnavigation.icon: uil:channel\ndescription:\n---\n\nIonic provides various components and helper functions for use in your application.\n\nThis module automatically auto-imports them throughout your app, so you do not need to import them manually.\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead more about [how component auto-imports work](https://v3.nuxtjs.org/guide/directory-structure/components#components-directory).\n::\n\n## Ionic Components\n\nAll Ionic Vue components should be auto-imported throughout your app. Although your IDE should be aware of these components everywhere, they are not globally registered and are only imported within the components that use them.\n\nFor a list of all Ionic Vue components, please refer to the ionic component documentation: https://ionicframework.com/docs/components\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nIf you find a component that isn't being auto-imported, please [open an issue](https://github.com/nuxt-modules/ionic/issues/new/choose) or [a pull request](https://github.com/nuxt-modules/ionic/compare).\n::\n\n## Ionic Helper Functions\n\nA number of Ionic hooks/composables are also imported by Nuxt via auto-imports within your app:\n\n- [`getPlatforms`](https://ionicframework.com/docs/vue/platform#getplatforms)\n- [`isPlatform`](https://ionicframework.com/docs/vue/platform#isplatform)\n- [`menuController`](https://ionicframework.com/docs/api/menu)\n- [`onIonViewWillEnter`](https://ionicframework.com/docs/vue/lifecycle#ionic-framework-lifecycle-methods)\n- [`onIonViewDidEnter`](https://ionicframework.com/docs/vue/lifecycle#ionic-framework-lifecycle-methods)\n- [`onIonViewWillLeave`](https://ionicframework.com/docs/vue/lifecycle#ionic-framework-lifecycle-methods)\n- [`onIonViewDidLeave`](https://ionicframework.com/docs/vue/lifecycle#ionic-framework-lifecycle-methods)\n- [`useBackButton`](https://ionicframework.com/docs/vue/utility-functions#hardware-back-button)\n- [`useKeyboard`](https://ionicframework.com/docs/vue/utility-functions#keyboard)\n- [`useIonRouter`](https://ionicframework.com/docs/vue/utility-functions#router)\n- [`createAnimation`](https://ionicframework.com/docs/utilities/animations)\n- [`createGesture`](https://ionicframework.com/docs/utilities/gestures)\n- [`getTimeGivenProgression`](https://github.com/ionic-team/ionic-framework/blob/main/core/src/utils/animation/cubic-bezier.ts#L20)\n- [`iosTransitionAnimation`](https://github.com/ionic-team/ionic-framework/blob/main/core/src/utils/transition/ios.transition.ts#L267)\n- [`mdTransitionAnimation`](https://github.com/ionic-team/ionic-framework/blob/main/core/src/utils/transition/md.transition.ts#L6)\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead more about these [helper functions in Ionic's docs](https://ionicframework.com/docs/).\n::\n\n"
  },
  {
    "path": "docs/content/2.overview/4.module-utilities.md",
    "content": "---\ntitle: Module Utilities\nnavigation.icon: uil:layer-group\ndescription:\n---\n\nThis modules aims to provide a few components and helpers for an easier and more seamless integration of Ionic's composables or functions in your app. We currently have the one `IonAnimation` component.\n\n## Components\n\n### `IonAnimation` component\n\nThis component makes using Ionic's `createAnimation` easier. It matches the majority of props directly to the usual Ionic animation object, to make adoption easier.\n\nFor more information, see [official Ionic docs](https://ionicframework.com/docs/utilities/animations) or check out the [playground examples](https://github.com/nuxt-modules/ionic/blob/main/playground/pages/tabs/tab4.vue)\n\nYou can see how it replaces usage of the regular [`createAnimation`](https://ionicframework.com/docs/utilities/animations#installation) function in the code example below:\n\n::code-group\n\n```vue [IonAnimation]\n<template>\n  <IonAnimation\n    :duration=\"3000\"\n    :iterations=\"Infinity\"\n    :keyframes=\"[\n      { offset: 0, background: 'red' },\n      { offset: 0.72, background: 'var(--background)' },\n      { offset: 1, background: 'green' },\n    ]\"\n    playOnMount\n  >\n    <!-- Content to animate -->\n  </IonAnimation>\n</template>\n```\n\n```vue [Manual usage]\n<script setup lang=\"ts\">\n// Template ref of your element\nconst squareRef = ref()\n\n// Your animation object\nconst animation = createAnimation()\n  .addElement(squareRef.value)\n  .duration(3000)\n  .iterations(Infinity)\n  .keyframes([\n    { offset: 0, background: 'red' },\n    { offset: 0.72, background: 'var(--background)' },\n    { offset: 1, background: 'green' },\n  ])\n\nonMounted(() => {\n  animation.play()\n})\n</script>\n```\n\n::\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nCurrently component doesn't support grouped and chained animations. For that usage we still recommend using `createAnimation` by itself\n::\n"
  },
  {
    "path": "docs/content/2.overview/5.icons.md",
    "content": "---\nnavigation.icon: uil:illustration\ndescription: \"\"\n---\n\nIcons are auto-imported from [`ionicons/icons`](https://github.com/ionic-team/ionicons) by default, following the pattern of camel case naming with `ionicons` in front of the original icon name, that you can find on the [official ionicons website](https://ionic.io/ionicons).\n\n::code-group\n\n```vue [Auto-imported icons]\n<template>\n  <ion-icon :icon=\"ioniconsImage\"></ion-icon>\n  <ion-icon :md=\"ioniconsSquareSharp\" :ios=\"ioniconsTriangleOutline\"></ion-icon>\n</template>\n```\n\n```vue [Manual imports]\n<script setup lang=\"ts\">\nimport { image, squareSharp, triangleOutline } from 'ionicons/icons'\n</script>\n\n<template>\n  <ion-icon :icon=\"image\"></ion-icon>\n  <ion-icon :md=\"squareSharp\" :ios=\"triangleOutline\"></ion-icon>\n</template>\n```\n\n::\n\nYou can opt-out of auto-importing icons by setting the `integrations.icons` module options in your `nuxt.config.ts` to `false`.\n\n```js\nexport default defineNuxtConfig({\n  ionic: {\n    integrations: {\n      icons: false,\n    },\n  },\n})\n```\n"
  },
  {
    "path": "docs/content/2.overview/6.deployment.md",
    "content": "---\nnavigation.icon: uil:rocket\n---\n\n## Web\n\nDeployment on the web is the same as any Nuxt project. You can find more information for this in Nuxt's deployment documentation.\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead more about [deploying to the web](https://nuxt.com/docs/getting-started/deployment).\n::\n\n\n## iOS and Android\n\nFor iOS and Android, it's a little more involved. We recommend looking at the deployment documentation from Ionic for these platforms: \n\n### iOS\n\nhttps://ionicframework.com/docs/deployment/app-store\n\n### Android\n\nhttps://ionicframework.com/docs/deployment/play-store\n"
  },
  {
    "path": "docs/content/3.cookbook/.navigation.yml",
    "content": "icon: heroicons-outline:bookmark-alt\nnavigation.redirect: /cookbook/customising-app-vue\n"
  },
  {
    "path": "docs/content/3.cookbook/1.customising-app-vue.md",
    "content": "---\ntitle: Customising app.vue\ndescription: \"\"\n---\n\nThis module provides a default `app.vue` file for when one is not otherwise provided by your app.\n\nIf you need to customize this `app.vue` file, you can create a new one in your project's source directory, based off the default:\n\n```vue [app.vue]\n<template>\n  <ion-app>\n    <ion-router-outlet />\n  </ion-app>\n</template>\n```\n\nThis module will then stop providing one, so that your project's `app.vue` is used instead.\n\n## Necessary ion tags\n\nIt's necessary that `<ion-app>` and `<ion-router-outlet>` are provided in your `app.vue` for Ionic to function.\n\n`<ion-app>` is the container element of Ionic - there should be only one per project - and is required for certain behaviours to work. Please see the [Ionic ion-app documentation](https://ionicframework.com/docs/api/app) for more info.\n\nEqually, `<ion-router-outlet>` provides a mounting point for the route component. In regular Nuxt applications,\nthis would be `<NuxtPage />`, but as Ionic Router is handling our routing we must use the `<ion-router-outlet>`.\n\n::callout{color=\"warning\" icon=\"i-lucide-alert-triangle\"}\nRemember that app.vue acts as the main component of your Nuxt application. Anything you add to it (JS and CSS) will be global and included in every page. Read more about app.vue [in the Nuxt app.vue docs](https://nuxt.com/docs/guide/directory-structure/app).\n::\n"
  },
  {
    "path": "docs/content/3.cookbook/2.local-development.md",
    "content": "---\ndescription: \"\"\n---\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nYou may find the Ionic docs on developing [for iOS](https://ionicframework.com/docs/developing/ios) and [for Android](https://ionicframework.com/docs/developing/android) helpful before continuing.\n::\n\nWhen using Ionic just for the web, local development is as easy as running the `dev` script provided by Nuxt:\n\n::code-group\n\n```bash [yarn]\nyarn dev -o\n```\n\n```bash [npm]\nnpm run dev -- -o\n```\n\n```bash [pnpm]\npnpm dev -o\n```\n\n::\n\n\nBut when working with iOS and Android, we're required to sync our built project to XCode and Android Studio, [using `npx cap sync`](https://capacitorjs.com/docs/cli/commands/sync). \n\nThis manual process can be tedious, but capacitor provides a way to livereload in development mode. This allows you to test on a native device or a device simulator and maintain the hot module replacement or livereload functionality that you enjoy already with Nuxt on the web.\n\n## Native device or simulator\n\nFirst, ensure your Nuxt development build is created and the development server is running:\n\n::code-group\n\n```bash [yarn]\nyarn dev -o\n```\n\n```bash [npm]\nnpm run dev -- -o\n```\n\n```bash [pnpm]\npnpm dev -o\n```\n\n::\n\nThen, in a separate tab, [sync the build](https://ionicframework.com/docs/cli/commands/capacitor-sync) to ios or android, based on the device you wish to run it on (or both). This copies the web build and capacitor configuration file into the native platform project, then updates the native plugins referenced in `package.json`, and installs any discovered capacitor or cordova plugins.\n\n::code-group\n\n```bash [ios]\nnpx @ionic/cli capacitor sync ios --no-build\n```\n\n```bash [android]\nnpx @ionic/cli capacitor sync android --no-build\n```\n\n::\n\nThen to deploy this to a native device or device simulator with livereload, you can [ask Capacitor to run the build](https://ionicframework.com/docs/cli/commands/capacitor-run). Ensure your native device is plugged in so that it displays in your list.\n\n::code-group\n\n```bash [ios]\nnpx @ionic/cli capacitor run ios --livereload-url=http://${LIP}:3000  --external --mode development\n```\n\n```bash [android]\nnpx @ionic/cli capacitor run android --livereload-url=http://${LIP}:3000  --external --mode development\n```\n\n::\n\nThe app will then open on the chosen native device or device simulator. \n\n## Automating on-device dev\n\nWe recommend putting this into a script in `scripts/` that you can run more easily via `yarn run` or `pnpm run`. For example:\n\n::code-group\n\n```bash [scripts/android.sh]\n#!/bin/bash\nLIP=$(ipconfig getifaddr en0)\n\necho \"🍦 Starting local development to android device - ensure local dev server is running already\"\necho \"🏗️ Type checking and building for development...\"\npnpm run build:dev\necho \"🔃 Capacitor installation, podfile installation, sync and copy to app distribution folders...\"\nnpx @ionic/cli capacitor sync android --no-build\necho \"🏃 Select an Android device to run the build at local ip address ${LIP} on...\"\neval \"npx @ionic/cli capacitor run android --livereload-url=http://${LIP}:3000  --external --mode development\"\n```\n\n```bash [scripts/ios.sh]\n#!/bin/bash\nLIP=$(ipconfig getifaddr en0)\n\necho \"🍦 Starting local development to ios device - ensure local dev server is running already\"\necho \"🏗️ Type checking and building for development...\"\npnpm run build:dev\necho \"🔃 Capacitor installation, podfile installation, sync and copy to app distribution folders...\"\nnpx @ionic/cli capacitor sync ios --no-build\necho \"🏃 Select an iOS device to run the build at local ip address ${LIP} on...\"\neval \"npx @ionic/cli capacitor run ios --livereload-url=http://${LIP}:3000  --external --mode development\"\n```\n\n::\n\n```json [package.json]\n{\n  \"scripts\": {\n    \"android\": \"bash ./scripts/android.sh\",\n    \"ios\": \"bash ./scripts/ios.sh\"\n  }\n}\n```\n\n::code-group\n\n```bash [yarn]\nyarn ios\nyarn android\n```\n\n```bash [npm]\nnpm run ios\nnpm run android\n```\n\n```bash [pnpm]\npnpm run ios\npnpm run android\n```\n\n::\n\n\n::callout{color=\"warning\" icon=\"i-lucide-alert-triangle\"}\nIf you're having trouble with this step, please check the Ionic guides for [deploying to iOS](https://ionicframework.com/docs/developing/ios) and [deploying to android](https://ionicframework.com/docs/developing/android) for more information.\n::\n"
  },
  {
    "path": "docs/content/3.cookbook/3.app-tabs.md",
    "content": "---\ntitle: App Tabs\ndescription: \"\"\n---\n\nIt's common for mobile apps to come with tabs at the bottom of the screen. These tabs act as separate routing stacks, so should remember where they were when a user navigates away and back to a tab.\n\nIonic provides several components to provide App Tabs out of the box, with a deep integration with the Ionic Router for them.\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead more about [Ionic's `ion-tabs` here](https://ionicframework.com/docs/api/tabs).\n::\n\n## Setup an application with tabs\n\n> See the example in [the playground](https://github.com/nuxt-modules/ionic/blob/main/playground) for a working demo of an app with tabs.\n\nTabs require a main tab component, and then child components to be rendered in the tab view.\n\nYour file structure should look like this:\n\n```text [pages/ directory]\npages/\n--| tabs.vue\n--| tabs/\n----| tab1.vue\n----| tab2.vue\n----| tab3.vue\n----| tab4.vue\n```\n\nThese tabs should then have a similar code structure as shown below. Remember, all pages must start with an `ion-page` component.\n\n::code-group\n\n```vue [pages/tabs.vue]\n<template>\n  <ion-page>\n    <ion-content>\n      <ion-tabs>\n        <ion-router-outlet />\n        \n        <ion-tab-bar slot=\"bottom\">\n          <ion-tab-button tab=\"tab1\" href=\"/tabs/tab1\">\n            <ion-icon :icon=\"ioniconsHomeOutline\" />\n            <ion-label>Tab 1</ion-label>\n          </ion-tab-button>\n\n          <ion-tab-button tab=\"tab2\" href=\"/tabs/tab2\">\n            <ion-icon :icon=\"ioniconsImagesOutline\" />\n            <ion-label>Photos</ion-label>\n          </ion-tab-button>\n\n          <ion-tab-button tab=\"tab3\" href=\"/tabs/tab3\">\n            <ion-icon :icon=\"ioniconsBulbOutline\" />\n            <ion-label>Tab 3</ion-label>\n          </ion-tab-button>\n\n          <ion-tab-button tab=\"tab4\" href=\"/tabs/tab4\">\n            <ion-icon :icon=\"ioniconsAccessibilityOutline\" />\n            <ion-label>Animation examples</ion-label>\n          </ion-tab-button>\n        </ion-tab-bar>\n      </ion-tabs>\n    </ion-content>\n  </ion-page>\n</template>\n```\n\n```vue [pages/tabs/tab1.vue]\n<template>\n  <ion-page>\n    <ion-header>\n      <ion-toolbar>\n        <ion-title>Tab 1</ion-title>\n      </ion-toolbar>\n    </ion-header>\n    <ion-content>\n      Tab 1 content\n    </ion-content>\n  </ion-page>\n</template>\n```\n\n```vue [pages/tabs/tab2.vue]\n<template>\n  <ion-page>\n    <ion-header>\n      <ion-toolbar>\n        <ion-title>Tab 2</ion-title>\n      </ion-toolbar>\n    </ion-header>\n    <ion-content>\n      Tab 2 content\n    </ion-content>\n  </ion-page>\n</template>\n```\n\n::\n\n\nAll pages that should show inside these tabs must be **sibling routes** of these initial tab views, but with the name of the tab in its prefix.\n\nThe simplest way to manage this is for all pages being within this `pages/tabs/` directory, with a directory per tab, like so:\n\n```text [pages/ directory]\npages/\n--| tabs.vue\n--| tabs/\n----| tab1/\n------| index.vue\n------| a-page.vue\n----| tab2/\n------| index.vue\n----| tab3/\n------| index.vue\n----| tab4.vue\n------| index.vue\n------| another-page.vue\n```\n\nIf a particular tab only has one route component, you don't explicitly need the directory for it with the index.vue inside\nof it, but we find it's a neater approach this way.\n\nUsing these directories avoids the routes becoming children routes of the tab by accident. The following folder structure is incorrect and would result in children routes, which IonRouter will not serve correctly:\n\n::list{type=\"danger\"}\n- An example of incorrect routing (do not copy):\n::\n\n```text [pages/ directory]\npages/\n--| tabs.vue\n--| tabs/\n----| tab1.vue\n----| tab1/\n------| a-page.vue\n----| tab2.vue\n----| tab3.vue\n----| tab4.vue\n----| tab4/\n------| another-page.vue\n```\n\n::callout{color=\"success\" icon=\"i-lucide-check-circle\"}\nIonic provides an article on [best practices for using tabs in your application](https://ionicframework.com/docs/vue/navigation#working-with-tabs).\n::\n\n## Routing to pages that shouldn't be displayed in the tabs\n\nIf you'd like to surface a page on-top of the tabs, rather than inside one of them, you can include the page component outside\nof the tabs directory.\n\n```text [pages/ directory]\npages/\n--| tabs.vue\n--| tabs/\n----| tab1/\n------| index.vue\n------| a-page.vue\n----| tab2/\n------| index.vue\n--| settings.vue\n```\n\n::list{type=\"danger\"}\n- When navigating from a tabbed route to a non-tabbed route, `route.params` from the auto-imported `useRoute()` will always be an empty object. A current workaround is to `import { useRoute } from 'vue-router';`.\n::\n\n## Reusing views across tabs\n\nSome apps may require showing the same component in different tabs. For instance, Spotify will allow you to view an album from both the Home and the Search tab.\n\nTo best accomplish this with Nuxt's file-based routing, create the routes using vue components in `pages/tabs`, and have them include the same component.\n\n::code-group\n```text [pages/ directory]\npages/\n--| tabs.vue\n--| tabs/\n----| home/\n------| index.vue\n------| album-[id].vue\n----| search/\n------| index.vue\n------| album.vue\n----| library/\n------| index.vue\n```\n\n```vue [pages/home/album-{id}.vue]\n<template>\n  <SingleAlbumView />\n</template>\n```\n\n```vue [pages/search/album-{id}.vue]\n<template>\n  <SingleAlbumView />\n</template>\n```\n::\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nRead more about [reusing views across tabs in the Ionic docs](https://ionicframework.com/docs/vue/navigation#switching-between-tabs).\n::\n"
  },
  {
    "path": "docs/content/3.cookbook/4.page-metadata.md",
    "content": "---\ntitle: useHead / Page Meta\ndescription: \"\"\n---\n\n::callout{color=\"warning\" icon=\"i-lucide-alert-triangle\"}\n⚠️ This page is a stub and needs further information.\n::\n\nThe composable `useHead()` will not work out of the box.\n\nPlease see this issue for reference: https://github.com/nuxt-modules/ionic/issues/6\n\nAlso see the documentation for use-head: https://nuxt.com/docs/api/composables/use-head\n"
  },
  {
    "path": "docs/content/3.cookbook/5.creating-ios-android-apps.md",
    "content": "---\ntitle: iOS and Android Apps\n---\n\n\n::callout{color=\"warning\" icon=\"i-lucide-alert-triangle\"}\n⚠️ This page is a stub and needs further information.\n::\n\nWhen building for iOS and Android, we recommend setting `ssr: false` in your nuxt config\n\n```js [nuxt.config.ts]\nexport default defineNuxtConfig({\n  modules: ['@nuxtjs/ionic'],\n  ssr: false,\n})\n```\n\nAlso see:\n\n- https://ionicframework.com/docs/developing/ios\n- https://ionicframework.com/docs/developing/android\n- https://ionicframework.com/docs/deployment/app-store\n- https://ionicframework.com/docs/deployment/play-store\n\nPlease also see our page on (building for both Web and Device together)(/cookbook/web-and-device)\n"
  },
  {
    "path": "docs/content/3.cookbook/6.web-and-device.md",
    "content": "---\ndescription: \"\"\n---\nHere we talk a little about some differences in deploying to native devices over the web, and what is required from the codebase to do so. We then explore some potential solutions to solve these issues. \n\n## Building for native devices\n\nOne main caveat of building for native devices is that the final build needs to be able to run completely\nclientside. Another is that deploying a new build requires submitting to the app stores and being manually reviewed and approved.\n\nThis makes building for devices more cumbersome than deploying to the web, and means the following must be followed when deploying:\n\n::list{type=danger}\n- **No serverside rendering in the codebase**  \n  As the build must be able to run completely clientside, we cannot have serverside rendering in the codebase.\n\n- **Generating new builds are not quickly deployed**  \n  A common paradigm on the web is to use serverside generation to build an app from stable data, then push the bundle to the web. This is then re-generated based on CMS changes or other triggers to ensure a static site that can stay up-to-date.\n\n  As deploying to the app stores is much slower than to the web, this approach likely will not work anymore.\n::\n\nThis means, in the codebase that will be deployed to the devices, we recommend using `ssr: false`, and not using serverside rendering at all.\n\nIf serverside rendering is required on the web, the simplest solution is to create two Nuxt projects: one targeting the web with SSR/SSG, and one targeting devices.\n\n## Further Solutions\n\nHaving two completely separate codebases to target web and device is a little cumbersome, so there are some potential solutions you could explore.\n\nThese solutions are outside of the scope of this module, but are provided as guidance on improving your own DX in these cases. We'd love to hear about if you implement these successfully.\n\n### A single codebase\n\nIt may be possible to have a single codebase with both SSR and a fully static application in-tandem, with code-switching based on configuration. E.G. when building for the web, setting `ssr: true`, and when building for devices, setting `ssr: false`.\n\nYou may need further wrapping around other SSR-aware code and utilities, such as `useAsyncData()`.\n\n### A monorepo\n\nYou would likely be able to reduce the burden of two separate Nuxt apps by utilising a monorepo. The majority of your shared code could exist within a core package, while having two Nuxt apps, one to target Web with `ssr: true` and one to target devices with `ssr: false`.\n\nA possible directory structure for this may look like:\n\n```\n- apps\n  - nuxt-web\n    - ...\n    - nuxt.config.ts\n  - nuxt-device\n    - ...\n    - nuxt.config.ts\n- packages\n  - core\n    - components\n    - composables\n    - ...\n```\n\n\n"
  },
  {
    "path": "docs/content/3.cookbook/7.live-updates.md",
    "content": "---\ntitle: Live Updates\ndescription: \"\"\n---\n\nLive Updates, also known as Over-the-Air (OTA) or hot code updates, are a way to push updates to your Android or iOS app without going through the app store review process. This is particularly useful for bug fixes or minor updates that don't require a full app release. \n\nThere are several providers that offer live update services, including:\n- [Capawesome Cloud](https://cloud.capawesome.io/)\n- [CodePush (standalone)](https://github.com/microsoft/code-push-server)\n\n## Capawesome Cloud\n\nThis guide demonstrates how to implement live updates using Capawesome Cloud.\n\n### Installation\n\nTo enable Live Updates with Capawesome Cloud, you need to install the `@capawesome/capacitor-live-update` plugin:\n\n```bash\nnpm install --save @capawesome/capacitor-live-update\n```\n\nAfter that, you need to sync the changes with your native projects:\n\n```bash\nnpx cap sync\n```\n\n### Configuration\n\nNext, you need to configure the plugin to work with [Capawesome Cloud](https://cloud.capawesome.io/).\n\n#### App ID\n\nIn order for your app to identify itself to Capawesome Cloud, you need to set the `appId` in your `capacitor.config` file. For this, you need to create an app on the [Capawesome Cloud Console](https://console.cloud.capawesome.io/) and get the App ID.\n\n```json\n{\n  \"plugins\": {\n    \"LiveUpdate\": {\n      \"appId\": \"00000000-0000-0000-0000-000000000000\"\n    }\n  }\n}\n```\n\nReplace `00000000-0000-0000-0000-000000000000` with your actual App ID from the Capawesome Cloud Console.\n\nAfter configuring the App ID, sync your Capacitor project again:\n\n```bash\nnpx cap sync\n```\n\n### Usage\n\nThe most basic usage of the Live Update plugin is to call the [`sync(...)`](https://capawesome.io/plugins/live-update/#sync) method when the app starts. This method checks for updates, downloads them if available, and sets them as the next bundle to be applied. You can then call the [`reload()`](https://capawesome.io/plugins/live-update/#reload) method to apply the update immediately. If the [`reload()`](https://capawesome.io/plugins/live-update/#reload) method is not called, the new bundle will be used on the next app start.\n\n```js\nimport { LiveUpdate } from \"@capawesome/capacitor-live-update\"\n\nconst sync = async () => {\n  const result = await LiveUpdate.sync()\n  if (result.nextBundleId) {\n    await LiveUpdate.reload()\n  }\n}\n```\n\n### Publishing updates\n\nTo publish your first update, you need to [create a bundle](https://capawesome.io/cloud/live-updates/bundles/#create-a-bundle) on Capawesome Cloud. For this, you need a bundle artifact. A bundle artifact is the build output of your web app. In Nuxt, this is the `dist` folder. You can create a bundle artifact by running the following command:\n\n#### Building your app\n\nGenerate the production build of your Nuxt app:\n\n```bash\nnpx nuxt generate\n```\n\nThis creates a `dist` folder with the build output of your web app.\n\n#### Publishing with Capawesome CLI\n\nTo install the Capawesome CLI,run the following command:\n\n```bash\nnpm i -g @capawesome/cli\n```\n\nAfter installing the Capawesome CLI, you need to log in to your Capawesome Cloud account. Run the following command and follow the instructions:\n\n```bash\nnpx capawesome login\n```\n\nOnce you are logged in, you can create a bundle by running the following command:\n\n```bash\nnpx capawesome apps:bundles:create --path dist\n```\n\nCongratulations! You have successfully published your first live update. You can now test it by running your app on a device or emulator. The app will check for updates and apply them if available.\nFeel free to check out the [documentation](https://capawesome.io/plugins/live-update/) of the Live Update plugin to see what else you can do with it.\n\n## Other providers\n\nFor other live update providers, consult their respective documentation for the specific upload process and tooling requirements.\n\n::callout{color=\"info\" icon=\"i-lucide-info\"}\nWe'd welcome PRs to add examples for other providers.\n::\n\n"
  },
  {
    "path": "docs/content/index.md",
    "content": "---\ntitle: 'Get Started'\nnavigation: false\nlayout: page\n---\n\n::u-page-hero{orientation=\"horizontal\"}\n#title\nNuxt [Ionic]{style=\"color:var(--color-primary-500);\"}\n\n#description\nBatteries-included [Ionic](https://ionicframework.com/) integration for Nuxt.\n\n- Zero-config required\n- Auto-import Ionic components, composables and icons\n- Ionic Router integration\n- Pre-render routes\n- Mobile meta tags\n- Works out of the box with [Capacitor](https://capacitorjs.com/) to build mobile apps\n\n#links\n  :::u-button\n  ---\n  size: xl\n  to: /get-started/introduction\n  trailing-icon: i-lucide-arrow-right\n  ---\n  Get started\n  :::\n\n  :::u-button\n  ---\n  color: neutral\n  icon: simple-icons-github\n  size: xl\n  to: https://github.com/nuxt-modules/ionic\n  variant: outline\n  ---\n  Star on GitHub\n  :::\n\n#default\n```bash [Terminal]\nnpx nuxi@latest module add ionic\n```\n\n::\n\n"
  },
  {
    "path": "docs/nuxt.config.ts",
    "content": "export default defineNuxtConfig({\n  extends: ['docus'],\n  modules: ['@nuxtjs/plausible'],\n  css: ['~/assets/css/main.css'],\n  site: {\n    name: 'Nuxt Ionic',\n  },\n  colorMode: {\n    preference: 'dark',\n  },\n  routeRules: {\n    '/overview': { redirect: '/overview/routing' },\n    '/cookbook': { redirect: '/cookbook/customising-app-vue' },\n  },\n  plausible: {\n    domain: 'ionic.nuxtjs.org',\n    apiHost: 'https://v.roe.dev',\n  },\n})\n"
  },
  {
    "path": "docs/package.json",
    "content": "{\n  \"name\": \"nuxt-ionic-docs\",\n  \"description\": \"Batteries-included Ionic integration for Nuxt.\",\n  \"homepage\": \"https://github.com/nuxt-modules/ionic/\",\n  \"scripts\": {\n    \"dev\": \"nuxt dev\",\n    \"build\": \"nuxt build\",\n    \"generate\": \"nuxt generate\",\n    \"preview\": \"nuxt preview\"\n  },\n  \"dependencies\": {\n    \"@nuxt/content\": \"3.12.0\",\n    \"@nuxt/ui\": \"4.6.0\",\n    \"@nuxtjs/plausible\": \"3.0.2\",\n    \"better-sqlite3\": \"12.8.0\",\n    \"docus\": \"5.8.1\",\n    \"nuxt\": \"4.3.1\",\n    \"tailwindcss\": \"4.2.2\"\n  }\n}\n"
  },
  {
    "path": "docs/tokens.config.ts",
    "content": "import { defineTheme } from 'pinceau'\n\nexport default defineTheme({\n  color: {\n    primary: {\n      50: '#84c3ff',\n      100: '#7ab9ff',\n      200: '#70afff',\n      300: '#66a5ff',\n      400: '#5c9bff',\n      500: '#5291ff',\n      600: '#4887f5',\n      700: '#3e7deb',\n      800: '#3473e1',\n      900: '#2a69d7',\n    },\n  },\n})\n"
  },
  {
    "path": "docs/tsconfig.json",
    "content": "{\n  \"extends\": \"./.nuxt/tsconfig.json\"\n}\n"
  },
  {
    "path": "eslint.config.js",
    "content": "// @ts-check\nimport { createConfigForNuxt } from '@nuxt/eslint-config/flat'\n\nexport default createConfigForNuxt({\n  features: {\n    tooling: true,\n    stylistic: true,\n  },\n  dirs: {\n    src: [\n      './playground',\n      './docs',\n    ],\n  },\n}).append(\n  {\n    files: ['test/**'],\n    rules: {\n      '@typescript-eslint/no-explicit-any': 'off',\n    },\n  },\n  {\n    files: ['docs/**'],\n    rules: {\n      'vue/multi-word-component-names': 'off',\n    },\n  },\n  {\n    files: ['playground/**'],\n    rules: {\n      'vue/no-deprecated-slot-attribute': 'off',\n    },\n  },\n)\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"@nuxtjs/ionic\",\n  \"version\": \"1.0.2\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/nuxt-modules/ionic.git\"\n  },\n  \"description\": \"Ionic integration for Nuxt\",\n  \"keywords\": [\n    \"nuxt\",\n    \"module\",\n    \"nuxt-module\",\n    \"ionic\",\n    \"ionic-framework\",\n    \"web-components\",\n    \"native\",\n    \"android\",\n    \"ios\"\n  ],\n  \"author\": {\n    \"name\": \"Daniel Roe\",\n    \"email\": \"daniel@roe.dev\",\n    \"url\": \"https://github.com/danielroe\"\n  },\n  \"type\": \"module\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/types.d.mts\",\n      \"import\": \"./dist/module.mjs\"\n    }\n  },\n  \"main\": \"./dist/module.mjs\",\n  \"typesVersions\": {\n    \"*\": {\n      \".\": [\n        \"./dist/types.d.mts\"\n      ]\n    }\n  },\n  \"files\": [\n    \"dist\"\n  ],\n  \"scripts\": {\n    \"build\": \"pnpm dev:prepare && nuxt-module-build build\",\n    \"dev\": \"nuxt dev playground\",\n    \"dev:build\": \"nuxt build playground\",\n    \"dev:prepare\": \"pnpm nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground\",\n    \"docs:dev\": \"pnpm --filter 'nuxt-ionic-docs' dev\",\n    \"docs:build\": \"pnpm --filter 'nuxt-ionic-docs' generate\",\n    \"lint\": \"eslint\",\n    \"prepack\": \"pnpm build\",\n    \"prepare\": \"simple-git-hooks\",\n    \"prepublishOnly\": \"pnpm lint && pnpm test\",\n    \"release\": \"bumpp && npm publish && git push --follow-tags\",\n    \"test\": \"vitest run --coverage\",\n    \"test:types\": \"tsc --noEmit\"\n  },\n  \"dependencies\": {\n    \"@capacitor/cli\": \"^8.0.0\",\n    \"@capacitor/core\": \"^8.0.0\",\n    \"@ionic/cli\": \"^7.2.1\",\n    \"@ionic/vue\": \"^8.7.3\",\n    \"@ionic/vue-router\": \"^8.7.3\",\n    \"@nuxt/kit\": \"^4.1.2\",\n    \"@unhead/vue\": \"^2.0.14\",\n    \"ionicons\": \"^8.0.13\",\n    \"jiti\": \"^2.6.0\",\n    \"pathe\": \"^2.0.3\",\n    \"pkg-types\": \"^2.3.0\",\n    \"std-env\": \"^4.0.0\",\n    \"ufo\": \"^1.6.1\",\n    \"unimport\": \"^6.0.0\"\n  },\n  \"devDependencies\": {\n    \"@ionic/core\": \"8.8.2\",\n    \"@nuxt/eslint-config\": \"1.15.2\",\n    \"@nuxt/module-builder\": \"1.0.2\",\n    \"@nuxt/schema\": \"4.3.1\",\n    \"@nuxt/test-utils\": \"4.0.0\",\n    \"@types/node\": \"24.12.0\",\n    \"@vitest/coverage-v8\": \"4.1.5\",\n    \"@vue/test-utils\": \"2.4.6\",\n    \"bumpp\": \"11.0.1\",\n    \"eslint\": \"10.2.1\",\n    \"expect-type\": \"1.3.0\",\n    \"happy-dom\": \"20.9.0\",\n    \"husky\": \"9.1.7\",\n    \"lint-staged\": \"16.4.0\",\n    \"nuxt\": \"4.3.1\",\n    \"playwright-core\": \"1.58.2\",\n    \"simple-git-hooks\": \"2.13.1\",\n    \"typescript\": \"6.0.2\",\n    \"unbuild\": \"3.6.1\",\n    \"unhead\": \"2.1.13\",\n    \"vitest\": \"4.1.5\",\n    \"vue\": \"3.5.30\",\n    \"vue-tsc\": \"3.2.6\"\n  },\n  \"lint-staged\": {\n    \"*.{md,js,ts,mjs,cjs,json,.*rc}\": [\n      \"npx eslint --fix\"\n    ]\n  },\n  \"simple-git-hooks\": {\n    \"pre-commit\": \"npx lint-staged\"\n  },\n  \"resolutions\": {\n    \"@nuxt/kit\": \"^4.1.2\",\n    \"@nuxt/schema\": \"4.3.1\",\n    \"@nuxtjs/ionic\": \"link:.\",\n    \"consola\": \"^3.4.2\",\n    \"nuxt-component-meta\": \">=0.14.0\"\n  },\n  \"packageManager\": \"pnpm@10.33.0\"\n}\n"
  },
  {
    "path": "playground/assets/css/ionic.css",
    "content": ":root {\n  --ion-color-primary: #6030ff;\n  --ion-color-primary-rgb: 96, 48, 255;\n  --ion-color-primary-contrast: #ffffff;\n  --ion-color-primary-contrast-rgb: 255, 255, 255;\n  --ion-color-primary-shade: #542ae0;\n  --ion-color-primary-tint: #7045ff;\n}\n"
  },
  {
    "path": "playground/capacitor.config.ts",
    "content": "import type { CapacitorConfig } from '@capacitor/cli'\n\nconst config: CapacitorConfig = {\n  appId: 'io.ionic.starter',\n  appName: 'nuxt-ionic-playground',\n  webDir: 'dist',\n}\n\nexport default config\n"
  },
  {
    "path": "playground/components/ExploreContainer.vue",
    "content": "<script setup lang=\"ts\">\nconst props = defineProps({ name: String })\nuseHead({\n  title: `Explore Container - ${props.name}`,\n})\n</script>\n\n<template>\n  <div id=\"container\">\n    <strong>{{ name }}</strong>\n    <p>\n      Explore <a\n        target=\"_blank\"\n        rel=\"noopener noreferrer\"\n        href=\"https://ionicframework.com/docs/components\"\n      >UI Components</a>\n    </p>\n  </div>\n</template>\n\n<style scoped>\n#container {\n  text-align: center;\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n}\n\n#container strong {\n  font-size: 20px;\n  line-height: 26px;\n}\n\n#container p {\n  font-size: 16px;\n  line-height: 22px;\n  color: #8c8c8c;\n  margin: 0;\n}\n\n#container a {\n  text-decoration: none;\n}\n</style>\n"
  },
  {
    "path": "playground/composables/usePhotoGallery.ts",
    "content": "import { Capacitor } from '@capacitor/core'\nimport type { Photo } from '@capacitor/camera'\nimport { Camera, CameraSource, CameraResultType } from '@capacitor/camera'\nimport { Filesystem, Directory } from '@capacitor/filesystem'\nimport { Preferences } from '@capacitor/preferences'\n\nexport function usePhotoGallery() {\n  const photos = ref<UserPhoto[]>([])\n  const PHOTO_STORAGE = 'photos'\n\n  const loadSaved = async () => {\n    const photoList = await Preferences.get({ key: PHOTO_STORAGE })\n    const photosInStorage = photoList.value ? JSON.parse(photoList.value) : []\n\n    // If running on the web...\n    if (!isPlatform('hybrid')) {\n      for (const photo of photosInStorage) {\n        const file = await Filesystem.readFile({\n          path: photo.filepath,\n          directory: Directory.Data,\n        })\n        // Web platform only: Load the photo as base64 data\n        photo.webviewPath = `data:image/jpeg;base64,${file.data}`\n      }\n    }\n\n    photos.value = photosInStorage\n  }\n\n  const convertBlobToBase64 = (blob: Blob) =>\n    new Promise((resolve, reject) => {\n      const reader = new FileReader()\n      reader.onerror = reject\n      reader.onload = () => {\n        resolve(reader.result)\n      }\n      reader.readAsDataURL(blob)\n    })\n\n  const savePicture = async (photo: Photo, fileName: string): Promise<UserPhoto> => {\n    let base64Data: string | Blob\n    // \"hybrid\" will detect Cordova or Capacitor;\n    if (isPlatform('hybrid')) {\n      const file = await Filesystem.readFile({\n\n        path: photo.path!,\n      })\n      base64Data = file.data\n    }\n    else {\n      // Fetch the photo, read as a blob, then convert to base64 format\n\n      const response = await fetch(photo.webPath!)\n      const blob = await response.blob()\n      base64Data = (await convertBlobToBase64(blob)) as string\n    }\n    const savedFile = await Filesystem.writeFile({\n      path: fileName,\n      data: base64Data,\n      directory: Directory.Data,\n    })\n\n    if (isPlatform('hybrid')) {\n      // Display the new image by rewriting the 'file://' path to HTTP\n      // Details: https://ionicframework.com/docs/building/webview#file-protocol\n      return {\n        filepath: savedFile.uri,\n        webviewPath: Capacitor.convertFileSrc(savedFile.uri),\n      }\n    }\n    else {\n      // Use webPath to display the new image instead of base64 since it's\n      // already loaded into memory\n      return {\n        filepath: fileName,\n        webviewPath: photo.webPath,\n      }\n    }\n  }\n\n  const takePhoto = async () => {\n    const photo = await Camera.getPhoto({\n      resultType: CameraResultType.Uri,\n      source: CameraSource.Camera,\n      quality: 100,\n    })\n    const fileName = new Date().getTime() + '.jpeg'\n    const savedFileImage = await savePicture(photo, fileName)\n\n    photos.value = [savedFileImage, ...photos.value]\n  }\n\n  const deletePhoto = async (photo: UserPhoto) => {\n    // Remove this photo from the Photos reference data array\n    photos.value = photos.value.filter(p => p.filepath !== photo.filepath)\n\n    // delete photo file from filesystem\n    const filename = photo.filepath.substr(photo.filepath.lastIndexOf('/') + 1)\n    await Filesystem.deleteFile({\n      path: filename,\n      directory: Directory.Data,\n    })\n  }\n\n  const cachePhotos = () => {\n    Preferences.set({\n      key: PHOTO_STORAGE,\n      value: JSON.stringify(photos.value),\n    })\n  }\n\n  onMounted(loadSaved)\n\n  watch(photos, cachePhotos)\n\n  return {\n    photos,\n    takePhoto,\n    deletePhoto,\n  }\n}\n\nexport interface UserPhoto {\n  filepath: string\n  webviewPath?: string\n}\n"
  },
  {
    "path": "playground/middleware/auth.global.ts",
    "content": "// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport default defineNuxtRouteMiddleware((to) => {\n  console.log('ran middleware')\n})\n"
  },
  {
    "path": "playground/nuxt.config.ts",
    "content": "export default defineNuxtConfig({\n  modules: ['@nuxtjs/ionic'],\n  css: ['~/assets/css/ionic.css'],\n  compatibilityDate: '2024-08-19',\n  ionic: {\n    // integrations: {\n    //   icons: true,\n    //   meta: true,\n    //   pwa: true,\n    //   router: true,\n    // },\n    // css: {\n    //   core: true,\n    //   basic: true,\n    //   utilities: false,\n    // },\n  },\n})\n"
  },
  {
    "path": "playground/package.json",
    "content": "{\n  \"private\": true,\n  \"name\": \"nuxt-ionic-playground\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"nuxi dev\",\n    \"build\": \"nuxi generate\",\n    \"ionic:build\": \"pnpm build\"\n  },\n  \"devDependencies\": {\n    \"@capacitor/camera\": \"8.0.2\",\n    \"@capacitor/filesystem\": \"8.1.2\",\n    \"@capacitor/preferences\": \"8.0.1\",\n    \"@nuxtjs/ionic\": \"latest\",\n    \"nuxt\": \"4.3.1\"\n  }\n}\n"
  },
  {
    "path": "playground/pages/overlap.vue",
    "content": "<script setup lang=\"ts\">\nuseHead({\n  title: 'Overlapping - no tabs',\n})\nconst isExploreEnabled = ref(true)\n</script>\n\n<template>\n  <ion-page>\n    <ion-header>\n      <ion-toolbar>\n        <ion-buttons slot=\"start\">\n          <ion-back-button default-href=\"/tabs/tab3\" />\n        </ion-buttons>\n        <ion-title>Overlapping - no tabs</ion-title>\n      </ion-toolbar>\n    </ion-header>\n    <ion-content :fullscreen=\"true\">\n      <ExploreContainer\n        v-if=\"isExploreEnabled\"\n        name=\"Overlap Page\"\n      />\n      <p style=\"text-align: center;\">\n        <ion-button\n          class=\"explorer-toggle-op\"\n          fill=\"solid\"\n          color=\"primary\"\n          strong\n          @click=\"isExploreEnabled = !isExploreEnabled\"\n        >\n          Toggle Overlap Explore Container\n        </ion-button>\n      </p>\n    </ion-content>\n  </ion-page>\n</template>\n"
  },
  {
    "path": "playground/pages/tabs/tab1/index.vue",
    "content": "<script setup lang=\"ts\">\ndefinePageMeta({\n  alias: ['/', '/tabs'],\n})\nuseHead({\n  title: 'Tab 1',\n})\nconst isExploreEnabled = ref(true)\n</script>\n\n<template>\n  <ion-page>\n    <ion-header translucent>\n      <ion-toolbar>\n        <ion-thumbnail slot=\"start\">\n          <ion-img src=\"/icon.png\" />\n        </ion-thumbnail>\n        <ion-title> Nuxt Ionic </ion-title>\n      </ion-toolbar>\n    </ion-header>\n    <ion-content :fullscreen=\"true\">\n      <ExploreContainer\n        v-if=\"isExploreEnabled\"\n        name=\"Tab 1\"\n      />\n      <ion-header collapse=\"condense\">\n        <ion-toolbar>\n          <ion-title size=\"large\">\n            Tab 1\n          </ion-title>\n        </ion-toolbar>\n      </ion-header>\n\n      <ion-list>\n        <ion-item>\n          <ion-checkbox\n            slot=\"start\"\n            aria-label=\"Mark idea complete\"\n          />\n          <ion-label>\n            <h1>Create Idea</h1>\n            <ion-note>Run Idea By Brandy</ion-note>\n          </ion-label>\n          <ion-badge\n            slot=\"end\"\n            color=\"success\"\n          >\n            5 Days\n          </ion-badge>\n        </ion-item>\n      </ion-list>\n\n      <p style=\"text-align: center;\">\n        <ion-button\n          class=\"explorer-toggle-1\"\n          fill=\"solid\"\n          color=\"primary\"\n          strong\n          @click=\"isExploreEnabled = !isExploreEnabled\"\n        >\n          Toggle Explore Container - Tab 1\n        </ion-button>\n      </p>\n    </ion-content>\n  </ion-page>\n</template>\n"
  },
  {
    "path": "playground/pages/tabs/tab2/index.vue",
    "content": "<script setup lang=\"ts\">\nimport { actionSheetController } from '@ionic/vue'\nimport type { UserPhoto } from '~/composables/usePhotoGallery'\n\nuseHead({\n  title: 'Tab 2 - Photos',\n})\n\nconst { photos, takePhoto, deletePhoto } = usePhotoGallery()\n\nconst showActionSheet = async (photo: UserPhoto) => {\n  const actionSheet = await actionSheetController.create({\n    header: 'Photos',\n    buttons: [\n      {\n        text: 'Delete',\n        role: 'destructive',\n        icon: ioniconsTrash,\n        handler: () => {\n          deletePhoto(photo)\n        },\n      },\n      {\n        text: 'Cancel',\n        icon: ioniconsClose,\n        role: 'cancel',\n        handler: () => {\n          // Nothing to do, action sheet is automatically closed\n        },\n      },\n    ],\n  })\n  await actionSheet.present()\n}\n</script>\n\n<template>\n  <ion-page>\n    <ion-header>\n      <ion-toolbar>\n        <ion-title>Photo Gallery</ion-title>\n      </ion-toolbar>\n    </ion-header>\n    <ion-content :fullscreen=\"true\">\n      <ion-header collapse=\"condense\">\n        <ion-toolbar>\n          <ion-title size=\"large\">\n            Photo Gallery\n          </ion-title>\n        </ion-toolbar>\n      </ion-header>\n      <ion-grid>\n        <ion-row>\n          <ion-col\n            v-for=\"photo in photos\"\n            :key=\"photo.filepath\"\n            size=\"6\"\n          >\n            <ion-img\n              :src=\"photo.webviewPath\"\n              @click=\"showActionSheet(photo)\"\n            />\n          </ion-col>\n        </ion-row>\n      </ion-grid>\n\n      <ion-fab\n        slot=\"fixed\"\n        vertical=\"bottom\"\n        horizontal=\"center\"\n      >\n        <ion-fab-button @click=\"takePhoto()\">\n          <ion-icon :icon=\"ioniconsCamera\" />\n        </ion-fab-button>\n      </ion-fab>\n    </ion-content>\n  </ion-page>\n</template>\n"
  },
  {
    "path": "playground/pages/tabs/tab3/index.vue",
    "content": "<script setup lang=\"ts\">\nuseHead({\n  title: 'Tab 3',\n})\nconst isExploreEnabled = ref(true)\n</script>\n\n<template>\n  <ion-page>\n    <ion-header>\n      <ion-toolbar>\n        <ion-title>Tab 3</ion-title>\n      </ion-toolbar>\n    </ion-header>\n    <ion-content :fullscreen=\"true\">\n      <ion-header collapse=\"condense\">\n        <ion-toolbar>\n          <ion-title size=\"large\">\n            Tab 3\n          </ion-title>\n        </ion-toolbar>\n      </ion-header>\n      <ion-button router-link=\"/tabs/tab3/page-two\">\n        Go to page two\n      </ion-button>\n      <ion-button router-link=\"/overlap\">\n        Go to overlapping page\n      </ion-button>\n      <ExploreContainer\n        v-if=\"isExploreEnabled\"\n        name=\"Tab 3\"\n      />\n      <p style=\"text-align: center;\">\n        <ion-button\n          class=\"explorer-toggle-3\"\n          fill=\"solid\"\n          color=\"primary\"\n          strong\n          @click=\"isExploreEnabled = !isExploreEnabled\"\n        >\n          Toggle Explore Container - Tab 3\n        </ion-button>\n      </p>\n    </ion-content>\n  </ion-page>\n</template>\n"
  },
  {
    "path": "playground/pages/tabs/tab3/page-two.vue",
    "content": "<script setup lang=\"ts\">\nuseHead({\n  title: 'Page Two - Tab 3',\n})\nconst isExploreEnabled = ref(true)\n</script>\n\n<template>\n  <ion-page>\n    <ion-header>\n      <ion-toolbar>\n        <ion-buttons slot=\"start\">\n          <ion-back-button default-href=\"/tabs/tab3\" />\n        </ion-buttons>\n        <ion-title>Tab 3 - Page 2</ion-title>\n      </ion-toolbar>\n    </ion-header>\n    <ion-content>\n      <ExploreContainer\n        v-if=\"isExploreEnabled\"\n        name=\"Tab 3 - Page Two\"\n      />\n      <p style=\"text-align: center;\">\n        <ion-button\n          class=\"explorer-toggle-p2\"\n          fill=\"solid\"\n          color=\"primary\"\n          strong\n          @click=\"isExploreEnabled = !isExploreEnabled\"\n        >\n          Toggle Explore Container - Tab 3 / Page Two\n        </ion-button>\n      </p>\n    </ion-content>\n  </ion-page>\n</template>\n"
  },
  {
    "path": "playground/pages/tabs/tab4/index.vue",
    "content": "<script setup lang=\"ts\">\nuseHead({\n  title: 'Tab 4',\n})\n</script>\n\n<template>\n  <ion-page>\n    <ion-header>\n      <ion-toolbar>\n        <ion-title>Animation examples</ion-title>\n      </ion-toolbar>\n    </ion-header>\n    <ion-content :fullscreen=\"true\">\n      <ion-header collapse=\"condense\">\n        <ion-toolbar>\n          <ion-title size=\"large\">\n            Animation examples\n          </ion-title>\n        </ion-toolbar>\n      </ion-header>\n\n      <div class=\"animations-grid\">\n        <section>\n          <IonLabel color=\"primary\">\n            <strong>Basic animation</strong>\n          </IonLabel>\n          <IonAnimation\n            id=\"animation1\"\n            v-slot=\"{ animation }\"\n            :duration=\"2000\"\n            :from-to=\"[\n              { property: 'opacity', fromValue: '1', toValue: '0.2' },\n              { property: 'transform', fromValue: 'translateX(0px)', toValue: 'translateX(-50px)' },\n            ]\"\n            fill=\"forwards\"\n          >\n            <div class=\"red-square\" />\n\n            <div class=\"buttons\">\n              <IonButton @click=\"animation?.play()\">\n                Play\n              </IonButton>\n              <IonButton @click=\"animation?.pause()\">\n                Pause\n              </IonButton>\n              <IonButton @click=\"animation?.stop()\">\n                Stop\n              </IonButton>\n            </div>\n          </IonAnimation>\n        </section>\n\n        <section>\n          <IonLabel color=\"primary\">\n            <strong>Keyframes animation</strong>\n          </IonLabel>\n          <IonAnimation\n            id=\"animation2\"\n            v-slot=\"{ animation }\"\n            :duration=\"3000\"\n            :keyframes=\"[\n              { offset: 0, transform: 'scale(1) translate(0, 0)' },\n              { offset: 0.4, transform: 'scale(1.05) translate(15px, 15px)' },\n              { offset: 0.6, transform: 'scale(1.05) translate(-30px, 15px)' },\n              { offset: 1, transform: 'scale(1) translate(0, 0)' },\n            ]\"\n            fill=\"none\"\n          >\n            <div class=\"blue-square\" />\n\n            <div class=\"buttons\">\n              <IonButton @click=\"animation?.play()\">\n                Play\n              </IonButton>\n              <IonButton @click=\"animation?.pause()\">\n                Pause\n              </IonButton>\n              <IonButton @click=\"animation?.stop()\">\n                Stop\n              </IonButton>\n            </div>\n          </IonAnimation>\n        </section>\n\n        <section>\n          <IonLabel color=\"primary\">\n            <strong>Animation that repeats forever</strong>\n          </IonLabel>\n          <IonAnimation\n            id=\"animation3\"\n            v-slot=\"{ animation }\"\n            :duration=\"1000\"\n            :keyframes=\"[\n              { offset: 0, transform: 'scale(1)' },\n              { offset: 0.75, transform: 'scale(1.05)' },\n              { offset: 1, transform: 'scale(1)' },\n            ]\"\n            :iterations=\"Infinity\"\n          >\n            <div class=\"green-square\" />\n\n            <div class=\"buttons\">\n              <IonButton @click=\"animation?.play()\">\n                Play\n              </IonButton>\n              <IonButton @click=\"animation?.pause()\">\n                Pause\n              </IonButton>\n              <IonButton @click=\"animation?.stop()\">\n                Stop\n              </IonButton>\n            </div>\n          </IonAnimation>\n        </section>\n\n        <section>\n          <IonLabel color=\"primary\">\n            <strong>Animation with style hooks</strong>\n          </IonLabel>\n          <IonAnimation\n            id=\"animation4\"\n            v-slot=\"{ animation }\"\n            :duration=\"2000\"\n            :keyframes=\"[\n              { offset: 0, transform: 'scale(1)' },\n              { offset: 0.75, transform: 'scale(1.1)' },\n              { offset: 1, transform: 'scale(1)' },\n            ]\"\n            :before-styles=\"{\n              opacity: 0.5,\n            }\"\n            :after-clear-styles=\"['opacity']\"\n            :after-styles=\"{\n              transform: 'scale(0.9)',\n            }\"\n            :before-clear-styles=\"['transform']\"\n            fill=\"none\"\n          >\n            <div class=\"red-square\" />\n\n            <div class=\"buttons\">\n              <IonButton @click=\"animation?.play()\">\n                Play\n              </IonButton>\n              <IonButton @click=\"animation?.pause()\">\n                Pause\n              </IonButton>\n              <IonButton @click=\"animation?.stop()\">\n                Stop\n              </IonButton>\n            </div>\n          </IonAnimation>\n        </section>\n\n        <section>\n          <IonLabel color=\"primary\">\n            <strong>Animation with specific easing</strong>\n          </IonLabel>\n          <IonAnimation\n            id=\"animation5\"\n            v-slot=\"{ animation }\"\n            :duration=\"2000\"\n            :keyframes=\"[\n              {\n                offset: 0,\n                transform: 'rotate(0)',\n              },\n              {\n                offset: 0.5,\n                transform: 'rotate(60deg)',\n              },\n              {\n                offset: 1,\n                transform: 'rotate(0)',\n              },\n            ]\"\n            easing=\"cubic-bezier(.7,.55,0,1.15)\"\n          >\n            <div class=\"blue-square\" />\n\n            <div class=\"buttons\">\n              <IonButton @click=\"animation?.play()\">\n                Play\n              </IonButton>\n              <IonButton @click=\"animation?.pause()\">\n                Pause\n              </IonButton>\n              <IonButton @click=\"animation?.stop()\">\n                Stop\n              </IonButton>\n            </div>\n          </IonAnimation>\n        </section>\n\n        <section>\n          <IonLabel color=\"primary\">\n            <strong>Reversed animation direction</strong>\n          </IonLabel>\n          <IonAnimation\n            id=\"animation6\"\n            v-slot=\"{ animation }\"\n            :duration=\"3000\"\n            :keyframes=\"[\n              { offset: 0, transform: 'scale(1)' },\n              { offset: 0.3, transform: 'scale(1.2)' },\n              { offset: 0.6, transform: 'scale(1.05)' },\n              { offset: 0.9, transform: 'scale(0.8)' },\n              { offset: 1, transform: 'scale(1)' },\n            ]\"\n            direction=\"reverse\"\n            easing=\"ease-in\"\n          >\n            <div class=\"green-square\" />\n\n            <div class=\"buttons\">\n              <IonButton @click=\"animation?.play()\">\n                Play\n              </IonButton>\n              <IonButton @click=\"animation?.pause()\">\n                Pause\n              </IonButton>\n              <IonButton @click=\"animation?.stop()\">\n                Stop\n              </IonButton>\n            </div>\n          </IonAnimation>\n        </section>\n      </div>\n    </ion-content>\n  </ion-page>\n</template>\n\n<style scoped>\n.animations-grid {\n  padding: 3em;\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));\n  grid-auto-flow: row;\n  row-gap: 4em;\n  align-items: center;\n  justify-items: center;\n  text-align: center;\n}\n\n.animations-grid > *:nth-child(2) {\n  margin-left: auto;\n  margin-right: auto;\n}\n\n.buttons {\n  width: 100%;\n  display: flex;\n  justify-content: space-around;\n  align-items: center;\n}\n\n.red-square {\n  width: 250px;\n  height: 250px;\n  background-color: red;\n  border-radius: 1em;\n}\n\n.blue-square {\n  width: 250px;\n  height: 250px;\n  background-color: blue;\n  border-radius: 1em;\n}\n\n.green-square {\n  width: 250px;\n  height: 250px;\n  background-color: green;\n  border-radius: 1em;\n}\n</style>\n"
  },
  {
    "path": "playground/pages/tabs.vue",
    "content": "<script setup lang=\"ts\">\nuseHead({\n  title: 'House Tabs',\n})\n</script>\n\n<template>\n  <ion-page>\n    <ion-content>\n      <ion-tabs>\n        <ion-router-outlet />\n        <ion-tab-bar slot=\"bottom\">\n          <ion-tab-button\n            tab=\"tab1\"\n            href=\"/tabs/tab1\"\n          >\n            <ion-icon :icon=\"ioniconsHomeOutline\" />\n            <ion-label>Tab 1</ion-label>\n          </ion-tab-button>\n\n          <ion-tab-button\n            tab=\"tab2\"\n            href=\"/tabs/tab2\"\n          >\n            <ion-icon :icon=\"ioniconsImagesOutline\" />\n            <ion-label>Photos</ion-label>\n          </ion-tab-button>\n\n          <ion-tab-button\n            tab=\"tab3\"\n            href=\"/tabs/tab3\"\n          >\n            <ion-icon :icon=\"ioniconsBulbOutline\" />\n            <ion-label>Tab 3</ion-label>\n          </ion-tab-button>\n\n          <ion-tab-button\n            tab=\"tab4\"\n            href=\"/tabs/tab4\"\n          >\n            <ion-icon :icon=\"ioniconsAccessibilityOutline\" />\n            <ion-label>Animation examples</ion-label>\n          </ion-tab-button>\n        </ion-tab-bar>\n      </ion-tabs>\n    </ion-content>\n  </ion-page>\n</template>\n"
  },
  {
    "path": "playground/tsconfig.json",
    "content": "{\n  \"extends\": \"./.nuxt/tsconfig.json\",\n}\n"
  },
  {
    "path": "pnpm-workspace.yaml",
    "content": "packages:\n  - playground\n  - docs\n\nonlyBuiltDependencies:\n  - '@parcel/watcher'\n  - '@tailwindcss/oxide'\n  - better-sqlite3\n  - esbuild\n  - sharp\n  - simple-git-hooks\n  - unrs-resolver\n  - vue-demi\n\n"
  },
  {
    "path": "renovate.json",
    "content": "{\n  \"$schema\": \"https://docs.renovatebot.com/renovate-schema.json\",\n  \"extends\": [\n    \"github>danielroe/renovate\"\n  ]\n}\n"
  },
  {
    "path": "src/imports.ts",
    "content": "/* Ionic Hooks and components */\n\n// If you are about to add a hook or component to one of the array below, please do so\n// in alphabetical order. This makes it easier to find and check if certain hooks & components are there\n\nexport const IonicHooks = [\n  'createAnimation',\n  'createGesture',\n  'getIonPageElement',\n  'getPlatforms',\n  'getTimeGivenProgression',\n  'iosTransitionAnimation',\n  'isPlatform',\n  'mdTransitionAnimation',\n  'menuController',\n  'modalController',\n  'popoverController',\n  'alertController',\n  'actionSheetController',\n  'loadingController',\n  'pickerController',\n  'toastController',\n  'onIonViewDidEnter',\n  'onIonViewDidLeave',\n  'onIonViewWillEnter',\n  'onIonViewWillLeave',\n  'openURL',\n  'useBackButton',\n  'useIonRouter',\n  'useKeyboard',\n]\n\nexport const IonicBuiltInComponents = [\n  'IonAccordion',\n  'IonAccordionGroup',\n  'IonActionSheet',\n  'IonAlert',\n  'IonApp',\n  'IonAvatar',\n  'IonBackButton',\n  'IonBackdrop',\n  'IonBadge',\n  'IonBreadcrumb',\n  'IonBreadcrumbs',\n  'IonButton',\n  'IonButtons',\n  'IonCard',\n  'IonCardContent',\n  'IonCardHeader',\n  'IonCardSubtitle',\n  'IonCardTitle',\n  'IonCheckbox',\n  'IonChip',\n  'IonCol',\n  'IonContent',\n  'IonDatetime',\n  'IonDatetimeButton',\n  'IonFab',\n  'IonFabButton',\n  'IonFabList',\n  'IonFooter',\n  'IonGrid',\n  'IonHeader',\n  'IonIcon',\n  'IonImg',\n  'IonInfiniteScroll',\n  'IonInfiniteScrollContent',\n  'IonInput',\n  'IonInputOtp',\n  'IonInputPasswordToggle',\n  'IonItem',\n  'IonItemDivider',\n  'IonItemGroup',\n  'IonItemOption',\n  'IonItemOptions',\n  'IonItemSliding',\n  'IonLabel',\n  'IonList',\n  'IonListHeader',\n  'IonLoading',\n  'IonMenu',\n  'IonMenuButton',\n  'IonMenuToggle',\n  'IonModal',\n  'IonNav',\n  'IonNavLink',\n  'IonNote',\n  'IonPage',\n  'IonPicker',\n  'IonPickerColumn',\n  'IonPickerColumnOption',\n  'IonPickerLegacy',\n  'IonPopover',\n  'IonProgressBar',\n  'IonRadio',\n  'IonRadioGroup',\n  'IonRange',\n  'IonRefresher',\n  'IonRefresherContent',\n  'IonReorder',\n  'IonReorderGroup',\n  'IonRippleEffect',\n  'IonRouterOutlet',\n  'IonRow',\n  'IonSearchbar',\n  'IonSegment',\n  'IonSegmentButton',\n  'IonSegmentContent',\n  'IonSegmentView',\n  'IonSelect',\n  'IonSelectModal',\n  'IonSelectOption',\n  'IonSkeletonText',\n  'IonSpinner',\n  'IonSplitPane',\n  'IonTab',\n  'IonTabs',\n  'IonTabBar',\n  'IonTabButton',\n  'IonText',\n  'IonTextarea',\n  'IonThumbnail',\n  'IonTitle',\n  'IonToast',\n  'IonToggle',\n  'IonToolbar',\n]\n"
  },
  {
    "path": "src/module.ts",
    "content": "import { existsSync, promises as fsp } from 'node:fs'\n\nimport {\n  defineNuxtModule,\n  addComponent,\n  addPlugin,\n  addTemplate,\n  addImportsSources,\n} from '@nuxt/kit'\nimport { join, resolve } from 'pathe'\nimport { readPackageJSON } from 'pkg-types'\nimport { defineUnimportPreset } from 'unimport'\n\nimport type { AnimationBuilder, SpinnerTypes, PlatformConfig } from '@ionic/vue'\nimport { runtimeDir } from './utils'\nimport { IonicBuiltInComponents, IonicHooks } from './imports'\n\nimport { setupUtilityComponents } from './parts/components'\nimport { useCSSSetup } from './parts/css'\nimport { setupIcons } from './parts/icons'\nimport { setupMeta } from './parts/meta'\nimport { setupRouter } from './parts/router'\nimport { setupCapacitor } from './parts/capacitor'\n\nexport interface ModuleOptions {\n  integrations?: {\n    router?: boolean\n    meta?: boolean\n    icons?: boolean\n  }\n  css?: {\n    core?: boolean\n    basic?: boolean\n    utilities?: boolean\n  }\n  config?: {\n    actionSheetEnter?: AnimationBuilder\n    actionSheetLeave?: AnimationBuilder\n    alertEnter?: AnimationBuilder\n    alertLeave?: AnimationBuilder\n    animated?: boolean\n    backButtonDefaultHref?: string\n    backButtonIcon?: string\n    backButtonText?: string\n    innerHTMLTemplatesEnabled?: boolean\n    hardwareBackButton?: boolean\n    infiniteLoadingSpinner?: SpinnerTypes\n    loadingEnter?: AnimationBuilder\n    loadingLeave?: AnimationBuilder\n    loadingSpinner?: SpinnerTypes\n    menuIcon?: string\n    menuType?: string\n    modalEnter?: AnimationBuilder\n    modalLeave?: AnimationBuilder\n    mode?: 'ios' | 'md'\n    navAnimation?: AnimationBuilder\n    pickerEnter?: AnimationBuilder\n    pickerLeave?: AnimationBuilder\n    platform?: PlatformConfig\n    popoverEnter?: AnimationBuilder\n    popoverLeave?: AnimationBuilder\n    refreshingIcon?: string\n    refreshingSpinner?: SpinnerTypes\n    sanitizerEnabled?: boolean\n    spinner?: SpinnerTypes\n    statusTap?: boolean\n    swipeBackEnabled?: boolean\n    tabButtonLayout?:\n      | 'icon-top'\n      | 'icon-start'\n      | 'icon-end'\n      | 'icon-bottom'\n      | 'icon-hide'\n      | 'label-hide'\n    toastDuration?: number\n    toastEnter?: AnimationBuilder\n    toastLeave?: AnimationBuilder\n    toggleOnOffLabels?: boolean\n  }\n}\n\nexport default defineNuxtModule<ModuleOptions>({\n  meta: {\n    name: '@nuxtjs/ionic',\n    configKey: 'ionic',\n    compatibility: {\n      nuxt: '>=3.0.0-rc.12',\n    },\n  },\n  defaults: {\n    integrations: {\n      meta: true,\n      router: true,\n      icons: true,\n    },\n    css: {\n      core: true,\n      basic: true,\n      utilities: false,\n    },\n    config: {},\n  },\n  async setup(options, nuxt) {\n    nuxt.options.build.transpile.push(runtimeDir)\n    nuxt.options.build.transpile.push(/@ionic/, /@stencil/)\n\n    // Inject options for the Ionic Vue plugin as a virtual module\n    addTemplate({\n      filename: 'ionic/vue-config.mjs',\n      getContents: () => `export default ${JSON.stringify(options.config)}`,\n    })\n\n    // Create an Ionic config file if it doesn't exist yet\n    const ionicConfigPath = join(nuxt.options.rootDir, 'ionic.config.json')\n    if (!existsSync(ionicConfigPath)) {\n      await fsp.writeFile(\n        ionicConfigPath,\n        JSON.stringify(\n          {\n            name: await readPackageJSON(nuxt.options.rootDir).then(\n              ({ name }) => name || 'nuxt-ionic-project',\n            ),\n            integrations: {},\n            type: 'vue',\n          },\n          null,\n          2,\n        ),\n      )\n    }\n\n    // Set up Ionic Core\n    addPlugin(resolve(runtimeDir, 'plugins/ionic'))\n\n    // Add Nuxt Vue custom utility components\n    setupUtilityComponents()\n\n    // Ensure `@ionic/vue` types flow through\n    nuxt.options.typescript.hoist ||= []\n    nuxt.options.typescript.hoist.push('@ionic/vue')\n\n    // add capacitor integration\n    const { excludeNativeFolders, findCapacitorConfig, parseCapacitorConfig } = setupCapacitor()\n\n    // add the `android` and `ios` folders to the TypeScript config exclude list if capacitor is enabled\n    // this is to prevent TypeScript from trying to resolve the Capacitor native code\n    const capacitorConfigPath = await findCapacitorConfig()\n    if (capacitorConfigPath) {\n      const { androidPath, iosPath } = await parseCapacitorConfig(capacitorConfigPath)\n      excludeNativeFolders(androidPath, iosPath)\n    }\n\n    // Add auto-imported components\n    IonicBuiltInComponents.map(name =>\n      addComponent({\n        name,\n        export: name,\n        filePath: '@ionic/vue',\n      }),\n    )\n\n    // Add auto-imported composables\n    addImportsSources([\n      defineUnimportPreset({\n        from: '@ionic/vue',\n        imports: [...IonicHooks],\n      }),\n      defineUnimportPreset({\n        from: resolve(runtimeDir, 'composables/head'),\n        imports: ['useHead'],\n        priority: 2,\n      }),\n    ])\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    if (nuxt.options.nitro.static || (nuxt.options as any)._generate /* TODO: remove in future */) {\n      nuxt.hook('nitro:config', async (config) => {\n        config.prerender ||= {}\n        config.prerender.routes ||= []\n        config.prerender.routes.push('/200.html')\n\n        config.output ||= {}\n        if (!config.output.publicDir) {\n          const distDir = resolve(nuxt.options.rootDir, 'dist')\n          const stats = await fsp.lstat(distDir).catch(() => null)\n          if (!stats || !stats.isSymbolicLink()) {\n            config.output.publicDir = distDir\n            if (!existsSync(distDir)) {\n              await fsp.mkdir(distDir, { recursive: true })\n            }\n          }\n        }\n      })\n\n      // Ensure there is an index.html file present when doing static file generation\n      let publicFolder: string\n      nuxt.hook('nitro:init', (nitro) => {\n        publicFolder = nitro.options.output.publicDir\n      })\n\n      nuxt.hook('close', async () => {\n        const indexFile = join(publicFolder, 'index.html')\n        const fallbackFile = join(publicFolder, '200.html')\n\n        if (!existsSync(indexFile) && existsSync(fallbackFile)) {\n          await fsp.copyFile(fallbackFile, indexFile)\n        }\n      })\n    }\n\n    const { setupBasic, setupCore, setupUtilities } = useCSSSetup()\n\n    // Add Ionic Core CSS\n    if (options.css?.core) {\n      await setupCore()\n    }\n\n    if (options.css?.basic) {\n      await setupBasic()\n    }\n\n    if (options.css?.utilities) {\n      await setupUtilities()\n    }\n\n    // Add auto-imported icons\n    if (options.integrations?.icons) {\n      await setupIcons()\n    }\n\n    if (options.integrations?.meta) {\n      await setupMeta()\n    }\n\n    // @ts-expect-error removed module option\n    if (options.integrations?.pwa) {\n      console.log('PWA integration is has been removed from @nuxtjs/ionic. It is recommended to install and configure @vite-pwa/nuxt instead following the instructions in https://vite-pwa-org.netlify.app/frameworks/nuxt.html.')\n    }\n\n    // Set up Ionic Router integration\n    if (options.integrations?.router) {\n      await setupRouter()\n    }\n  },\n})\n"
  },
  {
    "path": "src/parts/capacitor.ts",
    "content": "import type { CapacitorConfig } from '@capacitor/cli'\nimport { findPath, useNuxt } from '@nuxt/kit'\nimport { join } from 'pathe'\nimport { pathToFileURL } from 'node:url'\nimport { isWindows } from 'std-env'\nimport { createJiti, type Jiti } from 'jiti'\n\nexport const setupCapacitor = () => {\n  const nuxt = useNuxt()\n  let jiti: Jiti\n\n  /** Find the path to capacitor configuration file (if it exists) */\n  const findCapacitorConfig = async () => {\n    const path = await findPath(\n      'capacitor.config',\n      {\n        extensions: ['ts', 'json'],\n        virtual: false,\n      },\n      'file',\n    )\n\n    return path\n  }\n\n  const parseCapacitorConfig = async (path: string | null): Promise<{\n    androidPath: string | null\n    iosPath: string | null\n  }> => {\n    if (!path) {\n      return {\n        androidPath: null,\n        iosPath: null,\n      }\n    }\n\n    jiti ||= createJiti(import.meta.url)\n\n    const capacitorConfig = await jiti.import<CapacitorConfig>(isWindows ? pathToFileURL(path).href : path)\n\n    return {\n      androidPath: capacitorConfig.android?.path || null,\n      iosPath: capacitorConfig.ios?.path || null,\n    }\n  }\n\n  /** Exclude native folder paths from type checking by excluding them in tsconfig */\n  const excludeNativeFolders = (androidPath: string | null, iosPath: string | null) => {\n    nuxt.hook('prepare:types', (ctx) => {\n      const paths = [\n        join('..', androidPath ?? 'android'),\n        join('..', iosPath ?? 'ios'),\n      ]\n\n      for (const key of ['tsConfig', 'nodeTsConfig', 'sharedTsConfig'] as const) {\n        if (ctx[key]) {\n          ctx[key].exclude ||= []\n          ctx[key].exclude.push(...paths)\n        }\n      }\n    })\n\n    nuxt.options.ignore.push(\n      join(androidPath ?? 'android'),\n      join(iosPath ?? 'ios'),\n    )\n  }\n\n  return {\n    excludeNativeFolders,\n    findCapacitorConfig,\n    parseCapacitorConfig,\n  }\n}\n"
  },
  {
    "path": "src/parts/components.ts",
    "content": "import { resolve } from 'node:path'\nimport { addComponent } from '@nuxt/kit'\nimport { runtimeDir } from '../utils'\n\nexport const setupUtilityComponents = () => {\n  addComponent({\n    name: 'IonAnimation',\n    filePath: resolve(runtimeDir, 'components', 'IonAnimation.vue'),\n  })\n}\n"
  },
  {
    "path": "src/parts/css.ts",
    "content": "import { useNuxt } from '@nuxt/kit'\n\nexport const useCSSSetup = () => {\n  const nuxt = useNuxt()\n\n  const setupCore = () => {\n    // Core CSS required for Ionic components to work properly\n    nuxt.options.css.unshift('@ionic/vue/css/core.css')\n  }\n\n  const setupBasic = () => {\n    // Basic CSS for apps built with Ionic\n    nuxt.options.css.unshift(\n      '@ionic/vue/css/normalize.css',\n      '@ionic/vue/css/structure.css',\n      '@ionic/vue/css/typography.css',\n    )\n  }\n\n  const setupUtilities = () => {\n    // Optional CSS utils that can be commented out\n    nuxt.options.css.unshift(\n      '@ionic/vue/css/padding.css',\n      '@ionic/vue/css/float-elements.css',\n      '@ionic/vue/css/text-alignment.css',\n      '@ionic/vue/css/text-transformation.css',\n      '@ionic/vue/css/flex-utils.css',\n      '@ionic/vue/css/display.css',\n    )\n  }\n\n  return { setupCore, setupBasic, setupUtilities }\n}\n"
  },
  {
    "path": "src/parts/icons.ts",
    "content": "import { useNuxt, addImportsSources } from '@nuxt/kit'\nimport { defineUnimportPreset } from 'unimport'\nimport * as _icons from 'ionicons/icons'\n\nconst icons = _icons as typeof import('ionicons/icons')\n\nconst iconsPreset = defineUnimportPreset({\n  from: 'ionicons/icons',\n  imports: Object.keys(icons).map(name => ({\n    name,\n    as: 'ionicons' + name[0]!.toUpperCase() + name.slice(1),\n  })),\n})\n\nexport const setupIcons = () => {\n  const nuxt = useNuxt()\n\n  nuxt.options.build.transpile.push(/ionicons/)\n\n  addImportsSources(iconsPreset)\n}\n"
  },
  {
    "path": "src/parts/meta.ts",
    "content": "import { useNuxt } from '@nuxt/kit'\n\nexport const setupMeta = () => {\n  const nuxt = useNuxt()\n\n  const metaDefaults = [\n    { name: 'color-scheme', content: 'light dark' },\n    { name: 'format-detection', content: 'telephone: no' },\n    { name: 'msapplication-tap-highlight', content: 'no' },\n  ]\n\n  nuxt.options.app.head.meta = nuxt.options.app.head.meta || []\n  for (const meta of metaDefaults) {\n    if (!nuxt.options.app.head.meta.some(i => i.name === meta.name)) {\n      nuxt.options.app.head.meta.unshift(meta)\n    }\n  }\n  const viewport = nuxt.options.app.head.meta.find(i => i.name === 'viewport')\n  if (viewport?.content === 'width=device-width, initial-scale=1') {\n    viewport.content\n      = 'viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no'\n  }\n}\n"
  },
  {
    "path": "src/parts/router.ts",
    "content": "import { existsSync } from 'node:fs'\nimport { useNuxt, useLogger } from '@nuxt/kit'\nimport { join, resolve } from 'pathe'\nimport { runtimeDir } from '../utils'\n\nexport const setupRouter = () => {\n  const nuxt = useNuxt()\n  const logger = useLogger()\n\n  const pagesDirs = nuxt.options._layers.map(layer =>\n    resolve(layer.config?.srcDir || layer.cwd!, layer.config?.dir?.pages || 'pages'),\n  )\n\n  // Disable module (and use universal router) if pages dir do not exists or user has disabled it\n  if (\n    nuxt.options.pages === false\n    || (nuxt.options.pages !== true && !pagesDirs.some(dir => existsSync(dir)))\n  ) {\n    logger.info('Disabling Ionic Router integration as pages dir does not exist.')\n    return\n  }\n\n  const ROUTER_PLUGIN_RE = /nuxt(?:3|-nightly)?\\/dist\\/(?:app\\/plugins|pages\\/runtime)\\/(?:plugins\\/)?router/\n  const PAGE_USAGE_PLUGIN_RE = /nuxt(?:3|-nightly)?\\/dist\\/(?:app\\/plugins|pages\\/runtime)\\/(?:plugins\\/)?check-if-page-unused/\n  const ionicRouterPlugin = {\n    src: resolve(runtimeDir, 'plugins/router'),\n    mode: 'all',\n  } as const\n\n  nuxt.hook('modules:done', () => {\n    nuxt.hook('app:resolve', (app) => {\n      app.plugins = app.plugins.filter(p => !PAGE_USAGE_PLUGIN_RE.test(p.src))\n      const routerPlugin = app.plugins.findIndex(p => ROUTER_PLUGIN_RE.test(p.src))\n      if (routerPlugin !== -1) {\n        app.plugins.splice(routerPlugin, 1, ionicRouterPlugin)\n      }\n      else {\n        app.plugins.unshift(ionicRouterPlugin)\n      }\n    })\n  })\n\n  // Add default ionic root layout\n  nuxt.hook('app:resolve', (app) => {\n    if (\n      !app.mainComponent\n      || app.mainComponent.includes('@nuxt/ui-templates')\n      || app.mainComponent.match(/nuxt3?\\/dist/)\n    ) {\n      app.mainComponent = join(runtimeDir, 'app.vue')\n    }\n  })\n}\n"
  },
  {
    "path": "src/runtime/app.vue",
    "content": "<template>\n  <ion-app>\n    <ion-router-outlet />\n  </ion-app>\n</template>\n\n<script setup>\nimport { IonApp, IonRouterOutlet } from '@ionic/vue'\n</script>\n"
  },
  {
    "path": "src/runtime/components/IonAnimation.vue",
    "content": "<script setup lang=\"ts\">\nimport { onMounted, onBeforeUnmount, ref } from 'vue'\n\nimport type {} from '@ionic/core'\nimport { createAnimation } from '@ionic/vue'\nimport type {\n  Animation,\n  AnimationDirection,\n  AnimationFill,\n  AnimationKeyFrames,\n} from '@ionic/vue'\n\ninterface AnimationFromObject {\n  property: string\n  fromValue: string\n}\n\ninterface AnimationFromToObject {\n  property: string\n  fromValue: string\n  toValue: string\n}\n\ntype AnimationStyles = {\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  [key: string]: any\n}\n\ninterface AnimationOptions {\n  id?: string\n  duration?: number\n  iterations?: number\n  easing?: string\n  fill?: AnimationFill\n  direction?: AnimationDirection\n  from?: AnimationFromObject | AnimationFromObject[] | null\n  fromTo?: AnimationFromToObject | AnimationFromToObject[] | null\n  keyframes?: AnimationKeyFrames | null\n  playOnMount?: boolean\n  playOnVisible?: boolean\n  beforeStyles?: AnimationStyles | null\n  beforeAddClass?: string | string[] | null\n  beforeClearStyles?: string[] | null\n  afterStyles?: AnimationStyles | null\n  afterAddClass?: string | string[] | null\n  afterClearStyles?: string[] | null\n}\n\nconst props = withDefaults(defineProps<AnimationOptions>(), {\n  id: '',\n  duration: 1000,\n  iterations: 1,\n  easing: 'linear',\n  fill: 'auto',\n  direction: 'normal',\n  from: null,\n  fromTo: null,\n  keyframes: null,\n  playOnMount: false,\n  playOnVisible: false,\n  beforeStyles: null,\n  beforeAddClass: null,\n  beforeClearStyles: null,\n  afterStyles: null,\n  afterAddClass: null,\n  afterClearStyles: null,\n})\n\nconst element = ref<HTMLDivElement | null>(null)\n\nconst animation = ref<Animation | null>(null)\n\nlet observer: IntersectionObserver\n\nonMounted(() => {\n  animation.value = createAnimation(props.id)\n    .addElement(element.value!)\n    .duration(props.duration)\n    .iterations(props.iterations)\n    .easing(props.easing)\n    .fill(props.fill)\n    .direction(props.direction)\n    // Animation Hooks\n    .beforeStyles(props.beforeStyles ?? {})\n    .beforeAddClass(props.beforeAddClass ?? [])\n    .beforeClearStyles(props.beforeClearStyles ?? [])\n    .afterStyles(props.afterStyles ?? {})\n    .afterAddClass(props.afterAddClass ?? [])\n    .afterClearStyles(props.afterClearStyles ?? [])\n\n  const hasKeyframes = Array.isArray(props.keyframes) && props.keyframes.length > 0\n\n  if (hasKeyframes) {\n    animation.value.keyframes(props.keyframes!)\n  }\n\n  // From\n  if (props.from !== null && !hasKeyframes) {\n    if (Array.isArray(props.from)) {\n      props.from.forEach(({ property, fromValue }) => {\n        animation.value!.from(property, fromValue)\n      })\n    }\n    else {\n      animation.value.from(props.from.property, props.from.fromValue)\n    }\n  }\n\n  // From-to\n  if (props.fromTo !== null && !hasKeyframes) {\n    if (Array.isArray(props.fromTo)) {\n      props.fromTo.forEach(({ property, fromValue, toValue }) => {\n        animation.value!.fromTo(property, fromValue, toValue)\n      })\n    }\n    else {\n      animation.value.fromTo(props.fromTo.property, props.fromTo.fromValue, props.fromTo.toValue)\n    }\n  }\n\n  if (props.playOnVisible && !props.playOnMount) {\n    observer = new IntersectionObserver(\n      () => {\n        // Play animation\n        animation.value!.play()\n        // Disconnect observer - making animation always trigger ONLY ONCE\n        observer.disconnect()\n      },\n      {\n        // Use viewport as root element\n        root: null,\n        rootMargin: '0px',\n        threshold: 0.5,\n      },\n    )\n    // Start observing for animation element\n    observer.observe(element.value!)\n  }\n  else if (props.playOnMount) animation.value.play()\n})\nonBeforeUnmount(() => {\n  // Destroy animation and disconnect observer when component is about to be unmounted if it is defined\n  animation.value?.destroy()\n  if (observer) observer.disconnect()\n})\n</script>\n\n<template>\n  <div ref=\"element\">\n    <slot :animation=\"animation\" />\n  </div>\n</template>\n"
  },
  {
    "path": "src/runtime/composables/head.ts",
    "content": "import { onIonViewDidEnter, onIonViewDidLeave } from '@ionic/vue'\nimport type { ActiveHeadEntry, UseHeadInput, UseHeadOptions } from '@unhead/vue/types'\nimport type { useHead as _useHead } from '@unhead/vue'\nimport { getCurrentInstance, onBeforeUnmount } from 'vue'\nimport { useRoute, useRouter } from 'vue-router'\nimport { injectHead } from '#imports'\n\n// This is used to store the active head for each path as long as the path's page is still in the DOM\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst headMap = new Map<string, Array<[UseHeadInput<any>, ActiveHeadEntry<UseHeadInput<any>>]>>()\n\nlet beforeHook: (() => void) | undefined\nlet afterHook: (() => void) | undefined\nlet currPath: string\nlet prevPath: string\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function useHead<T extends Record<string, any>>(obj: UseHeadInput<T>, _?: UseHeadOptions) {\n  const instance = getCurrentInstance()\n  const activeHead = injectHead()\n\n  // vue-router composables require being called in setup\n  const currentPath = (instance && useRoute().path) || ''\n\n  let innerObj = obj\n  const __returned: Omit<ActiveHeadEntry<UseHeadInput<T>>, '_poll'> = {\n    dispose() {\n      // Can just easily mutate the array instead of wasting little CPU to slice/spread it :P\n      const headArr = [...headMap.get(currentPath)!]\n      const headArrIndex = headArr.findIndex(headVal => headVal[0] === innerObj)\n      if (headArrIndex === -1) return\n      const headToDispose = headArr[headArrIndex]![1]\n      headToDispose?.dispose()\n      headArr.splice(headArrIndex, 1)\n      headMap.set(currentPath, headArr)\n    },\n    patch(newObj) {\n      // Can just easily mutate the array instead of wasting little CPU to slice/spread it :P\n      const headArr = [...headMap.get(currentPath)!]\n      const headArrIndex = headArr.findIndex(headVal => headVal[0] === innerObj)\n      if (headArrIndex === -1) return\n      const [, headToPatch] = headArr[headArrIndex]!\n      innerObj = newObj\n      headToPatch?.patch(innerObj)\n      headArr.splice(headArrIndex, 1, [innerObj, headToPatch])\n      headMap.set(currentPath, headArr)\n    },\n  }\n\n  /* Initially assign the head to the respected slots in the map\n     because Ionic components don't unmount the way we expect them to */\n  if (!headMap.has(currentPath)) {\n    const headObj = activeHead?.push(obj)\n    headMap.set(currentPath, [[obj, headObj]])\n  }\n  else {\n    const headObj = activeHead?.push(obj)\n    const metaArr = headMap.get(currentPath) || []\n    headMap.set(currentPath, [...metaArr, [obj, headObj]])\n  }\n\n  // Only use lifecycle hooks if called inside component setup\n  if (instance) {\n    const router = useRouter()\n    const currentRoute = router!.currentRoute\n\n    /* Clear any reference to the input Object and the bound head object before unmounting the component */\n    onBeforeUnmount(__returned.dispose)\n\n    if (!beforeHook) {\n      beforeHook = router?.beforeEach(() => {\n        prevPath = currentRoute.value.path\n      })\n    }\n    if (!afterHook) {\n      afterHook = router?.afterEach(() => {\n        currPath = currentRoute.value.path\n      })\n    }\n\n    let hasReallyLeft = false\n    onIonViewDidLeave(() => {\n      let headArr = headMap.get(prevPath)\n      if (headArr) {\n        headArr = headArr.map(([obj, head]) => {\n          head?.dispose()\n          return [obj, head]\n        })\n        headMap.set(prevPath, headArr)\n      }\n      hasReallyLeft = true\n    })\n\n    onIonViewDidEnter(() => {\n      if (hasReallyLeft) {\n        let headArr = headMap.get(currPath)\n        if (headArr) {\n          headArr = headArr.map(([obj, head]) => {\n            head?.dispose()\n            const newHead = activeHead?.push(obj)\n            return [obj, newHead]\n          })\n          headMap.set(currPath, headArr)\n        }\n      }\n    })\n  }\n\n  return __returned\n}\n"
  },
  {
    "path": "src/runtime/plugins/ionic.ts",
    "content": "import { IonicVue } from '@ionic/vue'\nimport { defineNuxtPlugin } from '#imports'\nimport ionicVueConfig from '#build/ionic/vue-config.mjs'\nimport type {} from 'nuxt/app'\n\nexport default defineNuxtPlugin((nuxtApp) => {\n  nuxtApp.vueApp.use(IonicVue, ionicVueConfig)\n})\n"
  },
  {
    "path": "src/runtime/plugins/router.ts",
    "content": "import {\n  createMemoryHistory,\n  createRouter,\n  createWebHashHistory,\n  createWebHistory,\n} from '@ionic/vue-router'\n\nimport { isReadonly, reactive, shallowReactive, shallowRef } from 'vue'\nimport type { Ref } from 'vue'\nimport type { RouteLocationNormalizedLoaded, Router } from 'vue-router'\nimport { createError } from 'h3'\nimport { isEqual, withoutBase } from 'ufo'\n\nimport type { PageMeta, Plugin, RouteMiddleware } from '#app'\nimport { getRouteRules } from '#app/composables/manifest'\nimport { defineNuxtPlugin, useRuntimeConfig } from '#app/nuxt'\nimport { clearError, showError, useError } from '#app/composables/error'\nimport { onNuxtReady } from '#app/composables/ready'\nimport { navigateTo } from '#app/composables/router'\n\n// @ts-expect-error virtual file\nimport { globalMiddleware, namedMiddleware } from '#build/middleware'\nimport { appManifest as isAppManifestEnabled } from '#build/nuxt.config.mjs'\n// @ts-expect-error virtual file\nimport routerOptions from '#build/router.options'\n// @ts-expect-error virtual file\nimport _routes from '#build/routes'\n\nconst plugin: Plugin<{ router: Router }> = defineNuxtPlugin({\n  name: 'nuxt-ionic:router',\n  enforce: 'pre',\n  async setup(nuxtApp) {\n    let routerBase = useRuntimeConfig().app.baseURL\n    if (routerOptions.hashMode && !routerBase.includes('#')) {\n      // allow the user to provide a `#` in the middle: `/base/#/app`\n      routerBase += '#'\n    }\n\n    const history\n      = routerOptions.history?.(routerBase)\n        ?? (import.meta.client\n          ? routerOptions.hashMode\n            ? createWebHashHistory(routerBase)\n            : createWebHistory(routerBase)\n          : createMemoryHistory(routerBase))\n\n    const routes = routerOptions.routes?.(_routes) ?? _routes\n\n    const router = createRouter({\n      ...routerOptions,\n      history,\n      routes,\n    })\n\n    if (import.meta.client && 'scrollRestoration' in window.history) {\n      window.history.scrollRestoration = 'auto'\n    }\n    nuxtApp.vueApp.use(router)\n\n    const previousRoute = shallowRef(router.currentRoute.value)\n    router.afterEach((_to, from) => {\n      previousRoute.value = from\n    })\n\n    Object.defineProperty(nuxtApp.vueApp.config.globalProperties, 'previousRoute', {\n      get: () => previousRoute.value,\n    })\n\n    const initialURL = import.meta.server\n      ? nuxtApp.ssrContext!.url\n      : createCurrentLocation(routerBase, window.location, nuxtApp.payload.path)\n\n    // Allows suspending the route object until page navigation completes\n    const _route = shallowRef(router.currentRoute.value)\n    const syncCurrentRoute = () => {\n      _route.value = router.currentRoute.value\n    }\n    nuxtApp.hook('page:finish', syncCurrentRoute)\n    router.afterEach((to, from) => {\n      // We won't trigger suspense if the component is reused between routes\n      // so we need to update the route manually\n      if (to.matched[0]?.components?.default === from.matched[0]?.components?.default) {\n        syncCurrentRoute()\n      }\n    })\n\n    // https://github.com/vuejs/router/blob/main/packages/router/src/router.ts#L1225-L1233\n    const route = {} as RouteLocationNormalizedLoaded\n    for (const key in _route.value) {\n      Object.defineProperty(route, key, {\n        get: () => _route.value[key as keyof RouteLocationNormalizedLoaded],\n      })\n    }\n\n    nuxtApp._route = shallowReactive(route)\n\n    nuxtApp._middleware = nuxtApp._middleware || {\n      global: [],\n      named: {},\n    }\n\n    const error = useError()\n    if (import.meta.client || !nuxtApp.ssrContext?.islandContext) {\n      router.afterEach(async (to, _from, failure) => {\n        delete nuxtApp._processingMiddleware\n\n        if (import.meta.client && !nuxtApp.isHydrating && error.value) {\n          // Clear any existing errors\n          await nuxtApp.runWithContext(clearError)\n        }\n        if (failure) {\n          await nuxtApp.callHook('page:loading:end')\n        }\n        if (import.meta.server && failure?.type === 4 /* ErrorTypes.NAVIGATION_ABORTED */) {\n          return\n        }\n        if (to.matched.length === 0) {\n          await nuxtApp.runWithContext(() => showError(createError({\n            statusCode: 404,\n            fatal: false,\n            statusMessage: `Page not found: ${to.fullPath}`,\n            data: {\n              path: to.fullPath,\n            },\n          })))\n        }\n        else if (import.meta.server && to.redirectedFrom && to.fullPath !== initialURL) {\n          await nuxtApp.runWithContext(() => navigateTo(to.fullPath || '/'))\n        }\n      })\n    }\n\n    const resolvedInitialRoute = import.meta.client && initialURL !== router.currentRoute.value.fullPath\n      ? router.resolve(initialURL)\n      : router.currentRoute.value\n    syncCurrentRoute()\n\n    if (import.meta.server && nuxtApp.ssrContext?.islandContext) {\n      // We're in an island context, and don't need to handle middleware or redirections\n      return { provide: { router } }\n    }\n\n    const initialLayout = nuxtApp.payload.state._layout\n    router.beforeEach(async (to, from) => {\n      await nuxtApp.callHook('page:loading:start')\n      to.meta = reactive(to.meta)\n      if (nuxtApp.isHydrating && initialLayout && !isReadonly(to.meta.layout)) {\n        to.meta.layout = initialLayout as Exclude<PageMeta['layout'], Ref | false>\n      }\n      nuxtApp._processingMiddleware = true\n\n      if (import.meta.client || !nuxtApp.ssrContext?.islandContext) {\n        type MiddlewareDef = string | RouteMiddleware\n        const middlewareEntries = new Set<MiddlewareDef>([...globalMiddleware, ...nuxtApp._middleware.global])\n        for (const component of to.matched) {\n          const componentMiddleware = component.meta.middleware as MiddlewareDef | MiddlewareDef[]\n          if (!componentMiddleware) {\n            continue\n          }\n          for (const entry of toArray(componentMiddleware)) {\n            middlewareEntries.add(entry)\n          }\n        }\n\n        if (isAppManifestEnabled) {\n          const routeRules = await nuxtApp.runWithContext(() => getRouteRules(to.path))\n\n          if (routeRules.appMiddleware) {\n            for (const key in routeRules.appMiddleware) {\n              if (routeRules.appMiddleware[key]) {\n                middlewareEntries.add(key)\n              }\n              else {\n                middlewareEntries.delete(key)\n              }\n            }\n          }\n        }\n\n        for (const entry of middlewareEntries) {\n          const middleware\n            = typeof entry === 'string'\n              ? nuxtApp._middleware.named[entry]\n              // eslint-disable-next-line @typescript-eslint/no-explicit-any\n              || await namedMiddleware[entry]?.().then((r: any) => r.default || r)\n              : entry\n\n          if (!middleware) {\n            if (import.meta.dev) {\n              throw new Error(`Unknown route middleware: '${entry}'. Valid middleware: ${Object.keys(namedMiddleware).map(mw => `'${mw}'`).join(', ')}.`)\n            }\n            throw new Error(`Unknown route middleware: '${entry}'.`)\n          }\n\n          const result = await nuxtApp.runWithContext(() => middleware(to, from))\n          if (import.meta.server || (!nuxtApp.payload.serverRendered && nuxtApp.isHydrating)) {\n            if (result === false || result instanceof Error) {\n              const error = result || createError({\n                statusCode: 404,\n                statusMessage: `Page Not Found: ${initialURL}`,\n              })\n              await nuxtApp.runWithContext(() => showError(error))\n              return false\n            }\n          }\n\n          if (result === true) {\n            continue\n          }\n          if (result || result === false) {\n            return result\n          }\n        }\n      }\n    })\n\n    router.onError(async () => {\n      delete nuxtApp._processingMiddleware\n      await nuxtApp.callHook('page:loading:end')\n    })\n\n    nuxtApp.hooks.hookOnce('app:created', async () => {\n      delete nuxtApp._processingMiddleware\n    })\n\n    onNuxtReady(async () => {\n      try {\n        if (import.meta.client) {\n          // #4920, #4982\n          if ('name' in resolvedInitialRoute) {\n            resolvedInitialRoute.name = undefined\n          }\n          await router.replace({\n            ...resolvedInitialRoute,\n            force: true,\n          })\n        }\n      }\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      catch (error: any) {\n        // We'll catch middleware errors or deliberate exceptions here\n        await nuxtApp.runWithContext(() => showError(error))\n      }\n    })\n\n    return { provide: { router } }\n  },\n})\n\n// https://github.com/vuejs/router/blob/4a0cc8b9c1e642cdf47cc007fa5bbebde70afc66/packages/router/src/history/html5.ts#L37\nfunction createCurrentLocation(base: string, location: Location, renderedPath?: string): string {\n  const { pathname, search, hash } = location\n  // allows hash bases like #, /#, #/, #!, #!/, /#!/, or even /folder#end\n  const hashPos = base.indexOf('#')\n  if (hashPos > -1) {\n    const slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1\n    let pathFromHash = hash.slice(slicePos)\n    // prepend the starting slash to hash so the url starts with /#\n    if (pathFromHash[0] !== '/') {\n      pathFromHash = '/' + pathFromHash\n    }\n    return withoutBase(pathFromHash, '')\n  }\n  const displayedPath = withoutBase(pathname, base)\n  const path = !renderedPath || isEqual(displayedPath, renderedPath, { trailingSlash: true }) ? displayedPath : renderedPath\n  return path + (path.includes('?') ? '' : search) + hash\n}\n\nfunction toArray<T>(value: T | T[]): T[] {\n  return Array.isArray(value) ? value : [value]\n}\n\nexport default plugin\n"
  },
  {
    "path": "src/utils.ts",
    "content": "import { fileURLToPath } from 'node:url'\n\nexport const runtimeDir = fileURLToPath(new URL('./runtime', import.meta.url))\n"
  },
  {
    "path": "test/e2e/ion-head.spec.ts",
    "content": "import { fileURLToPath } from 'node:url'\nimport { setup, createPage, url } from '@nuxt/test-utils/e2e'\nimport { describe, it } from 'vitest'\nimport type { Page } from 'playwright-core'\n\nfunction expectTitleToBe(page: Page, title: string) {\n  return page.waitForFunction(title => (document.querySelector('title') as HTMLTitleElement)?.textContent?.trim() === title, title)\n}\n\ndescribe('Nuxt Ionic useHead', async () => {\n  await setup({\n    server: true,\n    browser: true,\n    rootDir: fileURLToPath(new URL('../../playground', import.meta.url)),\n  })\n\n  it('useHead should work with navigation', { timeout: 120_000 }, async () => {\n    const page = await createPage()\n\n    await page.goto(url('/'), { waitUntil: 'hydration' })\n    await expectTitleToBe(page, 'Explore Container - Tab 1')\n\n    await page.click('.explorer-toggle-1')\n    await expectTitleToBe(page, 'Tab 1')\n\n    await page.click('.explorer-toggle-1')\n    await expectTitleToBe(page, 'Explore Container - Tab 1')\n\n    // Navigate to /tabs/tab2\n    await page.click('#tab-button-tab2')\n    await expectTitleToBe(page, 'Tab 2 - Photos')\n\n    // Navigate to /tabs/tab3\n    await page.click('#tab-button-tab3')\n    await expectTitleToBe(page, 'Explore Container - Tab 3')\n\n    await page.click('.explorer-toggle-3')\n    await expectTitleToBe(page, 'Tab 3')\n\n    await page.click('.explorer-toggle-3')\n    await expectTitleToBe(page, 'Explore Container - Tab 3')\n\n    // Navigate to /tabs/tab4\n    await page.click('#tab-button-tab4')\n    await expectTitleToBe(page, 'Tab 4')\n\n    // Navigate back to /tabs/tab3\n    await page.goBack()\n    await expectTitleToBe(page, 'Explore Container - Tab 3')\n\n    // Navigate to tabs/tab3/page-two\n    await page.click('[routerlink=\"/tabs/tab3/page-two\"]')\n    await expectTitleToBe(page, 'Explore Container - Tab 3 - Page Two')\n\n    await page.click('.explorer-toggle-p2')\n    await expectTitleToBe(page, 'Page Two - Tab 3')\n\n    await page.click('.explorer-toggle-p2')\n    await expectTitleToBe(page, 'Explore Container - Tab 3 - Page Two')\n\n    // Navigate to tabs/tab3/overlap\n    await page.goBack()\n    await page.click('[routerlink=\"/overlap\"]')\n    await expectTitleToBe(page, 'Explore Container - Overlap Page')\n\n    await page.click('.explorer-toggle-op')\n    await expectTitleToBe(page, 'Overlapping - no tabs')\n\n    await page.click('.explorer-toggle-op')\n    await expectTitleToBe(page, 'Explore Container - Overlap Page')\n    await page.goBack()\n\n    // Navigate to tabs/tab1\n    await page.click('#tab-button-tab1')\n    await expectTitleToBe(page, 'Explore Container - Tab 1')\n\n    await page.close()\n  })\n})\n"
  },
  {
    "path": "test/e2e/ssr.spec.ts",
    "content": "/* @vitest-environment node */\nimport { fileURLToPath } from 'node:url'\nimport { setup, $fetch, createPage, url } from '@nuxt/test-utils'\nimport { describe, expect, it } from 'vitest'\n\ndescribe('nuxt ionic', async () => {\n  await setup({\n    server: true,\n    browser: true,\n    rootDir: fileURLToPath(new URL('../../playground', import.meta.url)),\n  })\n\n  it('renders web components', async () => {\n    const html = await $fetch('/')\n    expect(html).toContain(\n      '<ion-app name=\"IonApp\"><!--[--><ion-router-outlet></ion-router-outlet><!--]--></ion-app>',\n    )\n  })\n\n  it('renders correct viewport tags', async () => {\n    const html = await $fetch('/')\n    expect(html).toContain(\n      '<meta name=\"viewport\" content=\"viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\">',\n    )\n  })\n\n  it('runs middleware on client-side', async () => {\n    const logs: string[] = []\n    const page = await createPage()\n    page.on('console', (msg) => {\n      logs.push(msg.text())\n    })\n    await page.goto(url('/tabs/tab1'))\n    await page.waitForLoadState('networkidle')\n    expect(logs).toContain('ran middleware')\n\n    await page.close()\n  })\n})\n"
  },
  {
    "path": "test/unit/capacitor.spec.ts",
    "content": "import { describe, it, expect, vi, beforeEach } from 'vitest'\nimport { useNuxt, findPath } from '@nuxt/kit'\nimport { setupCapacitor } from '../../src/parts/capacitor'\nimport { pathToFileURL } from 'node:url'\nimport { isWindows } from 'std-env'\n\n// Mock @nuxt/kit\nvi.mock('@nuxt/kit', () => ({\n  findPath: vi.fn(),\n  useNuxt: vi.fn(),\n}))\n\n// Mock jiti\nconst mockJitiImport = vi.fn()\nvi.mock('jiti', () => ({\n  createJiti: vi.fn(() => ({\n    import: mockJitiImport,\n  })),\n}))\n\ndescribe('useCapacitor', () => {\n  const mockNuxt = {\n    hook: vi.fn(),\n    options: {\n      ignore: [],\n    },\n  }\n\n  beforeEach(() => {\n    vi.clearAllMocks()\n    vi.mocked(useNuxt).mockReturnValue(mockNuxt as any)\n    mockNuxt.options.ignore = []\n    mockJitiImport.mockClear()\n  })\n\n  describe('findCapacitorConfig', () => {\n    it('should find capacitor.config.ts', async () => {\n      const mockPath = '/project/capacitor.config.ts'\n      vi.mocked(findPath).mockResolvedValue(mockPath)\n\n      const { findCapacitorConfig } = setupCapacitor()\n      const result = await findCapacitorConfig()\n\n      expect(result).toBe(mockPath)\n    })\n\n    it('should return null when no config found', async () => {\n      vi.mocked(findPath).mockResolvedValue(null)\n\n      const { findCapacitorConfig } = setupCapacitor()\n      const result = await findCapacitorConfig()\n\n      expect(result).toBeNull()\n    })\n  })\n\n  describe('parseCapacitorConfig', () => {\n    it('should return null paths when no config path provided', async () => {\n      const { parseCapacitorConfig } = setupCapacitor()\n      const result = await parseCapacitorConfig(null)\n\n      expect(result).toEqual({\n        androidPath: null,\n        iosPath: null,\n      })\n    })\n\n    it('should parse capacitor config with custom paths', async () => {\n      const configPath = './capacitor.config.ts'\n      const mockConfig = {\n        android: { path: 'custom-android' },\n        ios: { path: 'custom-ios' },\n      }\n\n      mockJitiImport.mockResolvedValue(mockConfig)\n\n      const { parseCapacitorConfig } = setupCapacitor()\n      const result = await parseCapacitorConfig(configPath)\n\n      const expectedPath = isWindows ? pathToFileURL(configPath).href : configPath\n      expect(mockJitiImport).toHaveBeenCalledWith(expectedPath)\n      expect(result).toEqual({\n        androidPath: 'custom-android',\n        iosPath: 'custom-ios',\n      })\n    })\n\n    it('should handle config without android/ios paths', async () => {\n      const configPath = './capacitor.config.ts'\n      const mockConfig = {\n        android: undefined,\n        ios: undefined,\n      }\n\n      mockJitiImport.mockResolvedValue(mockConfig)\n\n      const { parseCapacitorConfig } = setupCapacitor()\n      const result = await parseCapacitorConfig(configPath)\n\n      const expectedPath = isWindows ? pathToFileURL(configPath).href : configPath\n      expect(mockJitiImport).toHaveBeenCalledWith(expectedPath)\n      expect(result).toEqual({\n        androidPath: null,\n        iosPath: null,\n      })\n    })\n  })\n\n  describe('excludeNativeFolders', () => {\n    it('should register prepare:types hook and add native folders to ignore', () => {\n      const { excludeNativeFolders } = setupCapacitor()\n      excludeNativeFolders('android', 'ios')\n\n      expect(mockNuxt.hook).toHaveBeenCalledWith('prepare:types', expect.any(Function))\n      expect(mockNuxt.options.ignore).toContain('android')\n      expect(mockNuxt.options.ignore).toContain('ios')\n    })\n\n    it('should handle null paths with defaults', () => {\n      const { excludeNativeFolders } = setupCapacitor()\n      excludeNativeFolders(null, null)\n\n      expect(mockNuxt.hook).toHaveBeenCalledWith('prepare:types', expect.any(Function))\n      expect(mockNuxt.options.ignore).toContain('android')\n      expect(mockNuxt.options.ignore).toContain('ios')\n    })\n\n    it('should modify typescript configs in prepare:types hook', () => {\n      const { excludeNativeFolders } = setupCapacitor()\n      excludeNativeFolders('custom-android', 'custom-ios')\n\n      // Get the hook callback that was registered\n      const hookCallback = mockNuxt.hook.mock.calls.find(call => call[0] === 'prepare:types')?.[1]\n      expect(hookCallback).toBeDefined()\n\n      // Mock typescript context\n      const mockCtx = {\n        tsConfig: { exclude: [] },\n        nodeTsConfig: { exclude: [] },\n        sharedTsConfig: { exclude: [] },\n      }\n\n      // Call the hook callback\n      hookCallback(mockCtx)\n\n      // Verify all configs were updated\n      expect(mockCtx.tsConfig.exclude).toContain('../custom-android')\n      expect(mockCtx.tsConfig.exclude).toContain('../custom-ios')\n      expect(mockCtx.nodeTsConfig.exclude).toContain('../custom-android')\n      expect(mockCtx.nodeTsConfig.exclude).toContain('../custom-ios')\n      expect(mockCtx.sharedTsConfig.exclude).toContain('../custom-android')\n      expect(mockCtx.sharedTsConfig.exclude).toContain('../custom-ios')\n    })\n\n    it('should initialize exclude arrays if not present in typescript configs', () => {\n      const { excludeNativeFolders } = setupCapacitor()\n      excludeNativeFolders('android', 'ios')\n\n      const hookCallback = mockNuxt.hook.mock.calls.find(call => call[0] === 'prepare:types')?.[1]\n\n      // Mock context without exclude arrays\n      const mockCtx = {\n        tsConfig: {} as any,\n        nodeTsConfig: {} as any,\n        sharedTsConfig: {} as any,\n      }\n\n      hookCallback(mockCtx)\n\n      expect(mockCtx.tsConfig.exclude).toEqual(['../android', '../ios'])\n      expect(mockCtx.nodeTsConfig.exclude).toEqual(['../android', '../ios'])\n      expect(mockCtx.sharedTsConfig.exclude).toEqual(['../android', '../ios'])\n    })\n\n    it('should handle missing typescript configs gracefully', () => {\n      const { excludeNativeFolders } = setupCapacitor()\n      excludeNativeFolders('android', 'ios')\n\n      const hookCallback = mockNuxt.hook.mock.calls.find(call => call[0] === 'prepare:types')?.[1]\n\n      // Mock context with only some configs present\n      const mockCtx = {\n        tsConfig: { exclude: [] },\n        // nodeTsConfig and sharedTsConfig are undefined\n      }\n\n      expect(() => hookCallback(mockCtx)).not.toThrow()\n      expect(mockCtx.tsConfig.exclude).toContain('../android')\n      expect(mockCtx.tsConfig.exclude).toContain('../ios')\n    })\n  })\n})\n"
  },
  {
    "path": "test/unit/imports.spec.ts",
    "content": "import { expect, describe, it } from 'vitest'\nimport * as ionicVue from '@ionic/vue'\nimport { IonicBuiltInComponents, IonicHooks } from '../../src/imports'\n\nconst ExportedHelpers = Object.keys(ionicVue) as Array<keyof typeof ionicVue>\nconst RegisteredHelpers = [...IonicBuiltInComponents, ...IonicHooks]\n\nconst ExcludedHelpers: Array<keyof typeof ionicVue> = [\n  'IonicSafeString',\n  'IonicSlides',\n  'IonicVue',\n  'actionSheetController',\n  'alertController',\n  'loadingController',\n  'modalController',\n  'pickerController',\n  'popoverController',\n  'toastController',\n]\n\ndescribe('imports:ionic', () => {\n  it('should not register anything that is not exported', () => {\n    for (const helper of RegisteredHelpers) {\n      expect(ExportedHelpers).toContain(helper)\n    }\n  })\n  it('should register everything that is exported', () => {\n    for (const helper of ExportedHelpers) {\n      if (ExcludedHelpers.includes(helper)) continue\n      expect(RegisteredHelpers).toContain(helper)\n    }\n  })\n})\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"extends\": \"./.nuxt/tsconfig.json\",\n  \"exclude\": [\n    \"node_modules\",\n    \"docs\",\n    \"playground\"\n  ]\n}\n"
  },
  {
    "path": "vitest.config.ts",
    "content": "import { defineConfig } from 'vitest/config'\n\nexport default defineConfig({\n  test: {\n    coverage: {\n      include: ['src/**/*.ts'],\n      reporter: ['text', 'json', 'html'],\n    },\n  },\n})\n"
  }
]