{"_id":"@chahindb7/pinia-root","name":"@chahindb7/pinia-root","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@chahindb7/pinia-root","version":"1.0.0","packageManager":"pnpm@9.4.0","workspaces":["packages/*"],"scripts":{"dev":"vitest --coverage --ui","release":"node scripts/release.mjs","size":"pnpm run -r size","build":"pnpm run -C packages/pinia build && pnpm run -C packages/nuxt build && pnpm run -C packages/testing build","docs":"pnpm run --filter ./packages/docs -r docs","docs:api":"pnpm run --filter ./packages/docs -r docs:api","docs:translation:compare":"pnpm run --filter ./packages/docs -r docs:translation:compare","docs:translation:update":"pnpm run --filter ./packages/docs -r docs:translation:update","docs:translation:status":"pnpm run --filter ./packages/docs -r docs:translation:status","docs:build":"pnpm run docs:api && pnpm run --filter ./packages/docs -r docs:build","docs:preview":"pnpm run --filter ./packages/docs -r docs:preview","play":"pnpm run -r play","build:dts":"pnpm run -r --parallel build:dts","lint":"prettier -c --parser typescript \"packages/*/{src,__tests__,e2e}/**/*.[jt]s?(x)\" \"packages/docs/**/*.[jt]s\"","lint:fix":"pnpm run lint --write","test":"pnpm run -r dev:prepare && pnpm run test:types && pnpm run test:vitest run && pnpm run -r test && pnpm run build && pnpm run build:dts && pnpm test:dts","test:vitest":"vitest --coverage","test:types":"tsc --build ./tsconfig.json","test:dts":"pnpm run -r test:dts","postinstall":"simple-git-hooks"},"devDependencies":{"@rollup/plugin-alias":"^5.1.0","@rollup/plugin-commonjs":"^26.0.1","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-replace":"^5.0.7","@rollup/plugin-terser":"^0.4.4","@types/lodash.kebabcase":"^4.1.9","@types/node":"^20.14.12","@vitest/coverage-v8":"^2.1.1","@vitest/ui":"^2.1.1","@vue/compiler-sfc":"~3.5.10","@vue/server-renderer":"~3.5.10","chalk":"^5.3.0","conventional-changelog-cli":"^2.2.2","enquirer":"^2.4.1","execa":"^9.3.0","globby":"^14.0.1","happy-dom":"^15.7.4","lint-staged":"^15.2.7","lodash.kebabcase":"^4.1.1","minimist":"^1.2.8","p-series":"^3.0.0","pascalcase":"^2.0.0","prettier":"^3.3.3","rimraf":"^6.0.1","rollup":"^4.22.5","rollup-plugin-typescript2":"^0.36.0","semver":"^7.6.3","simple-git-hooks":"^2.11.1","typedoc":"^0.26.7","typedoc-plugin-markdown":"^4.2.8","typescript":"~5.6.2","vitest":"^2.1.1","vue":"~3.5.10"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged","commit-msg":"node scripts/verifyCommit.mjs"},"lint-staged":{"*.{js,mjs,json,cjs}":["prettier --write"],"*.ts?(x)":["prettier --parser=typescript --write"]},"resolutions":{"@nuxt/kit":"^3.9.0","@nuxt/schema":"^3.9.0"},"_id":"@chahindb7/pinia-root@1.0.0","gitHead":"98270aa3ef2db4423b010f7f5151a5327e09c11c","description":"<p align=\"center\">   <a href=\"https://pinia.vuejs.org\" target=\"_blank\" rel=\"noopener noreferrer\">     <img width=\"180\" src=\"https://pinia.vuejs.org/logo.svg\" alt=\"Pinia logo\">   </a> </p> <br/> <p align=\"center\">   <a href=\"https://npmjs.com/package/pinia","_nodeVersion":"20.18.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Z8Wdw9zT5FWNd39ue5cAPJotGCqiiLfqY0QW/ndAZG85xrotCglQfUXUUkgFaEMc5N0+q/TQtrC6J/6xtnlQIw==","shasum":"5506b6fa41d1dd183b8af31f7c5da7806535bbef","tarball":"https://registry.npmjs.org/@chahindb7/pinia-root/-/pinia-root-1.0.0.tgz","fileCount":150,"unpackedSize":570847,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCs/lKKn1DsBB1mqnJP0QCI8UaqMv8mKo6NWmNC+/IgmwIgKIZMpSDuogoWhIVxs2xBWcaOmhc2V/urpVcQMZn8Bdg="}]},"_npmUser":{"name":"chahindb7","email":"chahin2002@outlook.com"},"directories":{},"maintainers":[{"name":"chahindb7","email":"chahin2002@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pinia-root_1.0.0_1737988598475_0.7839294397999383"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-27T14:36:38.358Z","1.0.0":"2025-01-27T14:36:38.729Z","modified":"2025-01-27T14:36:38.988Z"},"maintainers":[{"name":"chahindb7","email":"chahin2002@outlook.com"}],"description":"<p align=\"center\">   <a href=\"https://pinia.vuejs.org\" target=\"_blank\" rel=\"noopener noreferrer\">     <img width=\"180\" src=\"https://pinia.vuejs.org/logo.svg\" alt=\"Pinia logo\">   </a> </p> <br/> <p align=\"center\">   <a href=\"https://npmjs.com/package/pinia","readme":"<p align=\"center\">\n  <a href=\"https://pinia.vuejs.org\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img width=\"180\" src=\"https://pinia.vuejs.org/logo.svg\" alt=\"Pinia logo\">\n  </a>\n</p>\n<br/>\n<p align=\"center\">\n  <a href=\"https://npmjs.com/package/pinia\"><img src=\"https://badgen.net/npm/v/pinia\" alt=\"npm package\"></a>\n  <a href=\"https://github.com/ChahinDB7/pinia/actions/workflows/ci.yml\"><img src=\"https://github.com/ChahinDB7/pinia/actions/workflows/ci.yml/badge.svg\" alt=\"build status\"></a>\n  <a href=\"https://codecov.io/gh/vuejs/pinia\"><img src=\"https://codecov.io/gh/vuejs/pinia/graph/badge.svg?token=rU2xxQ6BGH\"/></a>\n</p>\n<br/>\n\n# Pinia\n\n> Intuitive, type safe and flexible Store for Vue\n\n- 💡 Intuitive\n- 🔑 Type Safe\n- ⚙️ Devtools support\n- 🔌 Extensible\n- 🏗 Modular by design\n- 📦 Extremely light\n- ⛰️ Nuxt Module\n\nPinia works with both Vue 2 and Vue 3.\n\nPinia is the most similar English pronunciation of the word _pineapple_ in Spanish: _piña_. A pineapple is in reality a group of individual flowers that join together to create a multiple fruit. Similar to stores, each one is born individually, but they are all connected at the end. It's also a delicious tropical fruit indigenous to South America.\n\n## 👉 [Demo with Vue 3 on StackBlitz](https://stackblitz.com/github/piniajs/example-vue-3-vite)\n\n## 👉 [Demo with Nuxt 3 on StackBlitz](https://stackblitz.com/github/piniajs/example-nuxt-3)\n\n## Help me keep working on this project 💚\n\n- [Become a Sponsor on GitHub](https://github.com/sponsors/posva)\n- [One-time donation via PayPal](https://paypal.me/posva)\n\n<!--sponsors start-->\n\n<h4 align=\"center\">Silver Sponsors</h4>\n<p align=\"center\">\n    <a href=\"https://route4me.com\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <source srcset=\"https://posva-sponsors.pages.dev/logos/route4me.png\" media=\"(prefers-color-scheme: dark)\" height=\"42px\" alt=\"Route Optimizer and Route Planner Software\" />\n      <img src=\"https://posva-sponsors.pages.dev/logos/route4me.png\" height=\"42px\" alt=\"Route Optimizer and Route Planner Software\" />\n    </picture>\n  </a>\n    <a href=\"https://www.prefect.io/\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <source srcset=\"https://posva-sponsors.pages.dev/logos/prefectlogo-dark.svg\" media=\"(prefers-color-scheme: dark)\" height=\"42px\" alt=\"Prefect\" />\n      <img src=\"https://posva-sponsors.pages.dev/logos/prefectlogo-light.svg\" height=\"42px\" alt=\"Prefect\" />\n    </picture>\n  </a>\n    <a href=\"https://www.vuemastery.com/\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <source srcset=\"https://posva-sponsors.pages.dev/logos/vuemastery-dark.png\" media=\"(prefers-color-scheme: dark)\" height=\"42px\" alt=\"VueMastery\" />\n      <img src=\"https://posva-sponsors.pages.dev/logos/vuemastery-light.svg\" height=\"42px\" alt=\"VueMastery\" />\n    </picture>\n  </a>\n</p>\n\n<h4 align=\"center\">Bronze Sponsors</h4>\n<p align=\"center\">\n    <a href=\"https://storyblok.com\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <source srcset=\"https://posva-sponsors.pages.dev/logos/storyblok.png\" media=\"(prefers-color-scheme: dark)\" height=\"26px\" alt=\"Storyblok\" />\n      <img src=\"https://posva-sponsors.pages.dev/logos/storyblok.png\" height=\"26px\" alt=\"Storyblok\" />\n    </picture>\n  </a>\n    <a href=\"https://ui.nuxt.com/pro\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <source srcset=\"https://posva-sponsors.pages.dev/logos/nuxt-dark.svg\" media=\"(prefers-color-scheme: dark)\" height=\"26px\" alt=\"Nuxt UI Pro Templates\" />\n      <img src=\"https://posva-sponsors.pages.dev/logos/nuxt-light.svg\" height=\"26px\" alt=\"Nuxt UI Pro Templates\" />\n    </picture>\n  </a>\n    <a href=\"https://www.vuejs.de\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <source srcset=\"https://avatars.githubusercontent.com/u/4183726?u=6b50a8ea16de29d2982f43c5640b1db9299ebcd1&v=4\" media=\"(prefers-color-scheme: dark)\" height=\"26px\" alt=\"Antony Konstantinidis\" />\n      <img src=\"https://avatars.githubusercontent.com/u/4183726?u=6b50a8ea16de29d2982f43c5640b1db9299ebcd1&v=4\" height=\"26px\" alt=\"Antony Konstantinidis\" />\n    </picture>\n  </a>\n    <a href=\"https://stormier.ninja\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <source srcset=\"https://avatars.githubusercontent.com/u/2486424?u=7b0c73ae5d090ce53bf59473094e9606fe082c59&v=4\" media=\"(prefers-color-scheme: dark)\" height=\"26px\" alt=\"Stanislas Ormières\" />\n      <img src=\"https://avatars.githubusercontent.com/u/2486424?u=7b0c73ae5d090ce53bf59473094e9606fe082c59&v=4\" height=\"26px\" alt=\"Stanislas Ormières\" />\n    </picture>\n  </a>\n</p>\n\n<!--sponsors end-->\n\n---\n\n## FAQ\n\nA few notes about the project and possible questions:\n\n**Q**: _Is Pinia the successor of Vuex?_\n\n**A**: [Yes](https://vuejs.org/guide/scaling-up/state-management.html#pinia)\n\n**Q**: _What about dynamic modules?_\n\n**A**: Dynamic modules are not type safe, so instead [we allow creating different stores](https://pinia.vuejs.org/cookbook/composing-stores.html) that can be imported anywhere\n\n## Installation\n\n```bash\n# or pnpm or yarn\nnpm install pinia\n```\n\nIf you are using Vue <2.7, make sure to install latest `@vue/composition-api`:\n\n```bash\nnpm install pinia @vue/composition-api\n```\n\n## Usage\n\n### Install the plugin\n\nCreate a pinia (the root store) and pass it to app:\n\n```js\n// Vue 3\nimport { createApp } from 'vue'\nimport { createPinia } from 'pinia'\nimport App from './App.vue'\n\nconst pinia = createPinia()\nconst app = createApp(App)\n\napp.use(pinia)\napp.mount('#app')\n```\n\n```js\n// Vue 2\nimport { createPinia, PiniaVuePlugin } from 'pinia'\n\nVue.use(PiniaVuePlugin)\nconst pinia = createPinia()\n\nnew Vue({\n  el: '#app',\n  // other options...\n  // ...\n  // note the same `pinia` instance can be used across multiple Vue apps on\n  // the same page\n  pinia,\n})\n```\n\nFor more detailed instructions, including [Nuxt configuration](https://pinia.vuejs.org/ssr/nuxt.html#nuxt-js), check the [Documentation](https://pinia.vuejs.org).\n\n### Create a Store\n\nYou can create as many stores as you want, and they should each exist in different files:\n\n```ts\nimport { defineStore } from 'pinia'\n\n// main is the name of the store. It is unique across your application\n// and will appear in devtools\nexport const useMainStore = defineStore('main', {\n  // a function that returns a fresh state\n  state: () => ({\n    counter: 0,\n    name: 'Eduardo',\n  }),\n  // optional getters\n  getters: {\n    // getters receive the state as first parameter\n    doubleCounter: (state) => state.counter * 2,\n    // use getters in other getters\n    doubleCounterPlusOne(): number {\n      return this.doubleCounter + 1\n    },\n  },\n  // optional actions\n  actions: {\n    reset() {\n      // `this` is the store instance\n      this.counter = 0\n    },\n  },\n})\n```\n\n`defineStore` returns a function that has to be called to get access to the store:\n\n```ts\nimport { useMainStore } from '@/stores/main'\nimport { storeToRefs } from 'pinia'\n\nexport default defineComponent({\n  setup() {\n    const main = useMainStore()\n\n    // extract specific store properties\n    const { counter, doubleCounter } = storeToRefs(main)\n\n    return {\n      // gives access to the whole store in the template\n      main,\n      // gives access only to specific state or getter\n      counter,\n      doubleCounter,\n    }\n  },\n})\n```\n\n## Documentation\n\nTo learn more about Pinia, check [its documentation](https://pinia.vuejs.org).\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n","readmeFilename":"README.md"}