{"_id":"@anoyomoose/q2-fresh-paint-core","_rev":"8-cd4e23678d52500edef5659fd5ef6234","name":"@anoyomoose/q2-fresh-paint-core","dist-tags":{"latest":"0.1.7"},"versions":{"0.1.0":{"name":"@anoyomoose/q2-fresh-paint-core","version":"0.1.0","license":"MIT","_id":"@anoyomoose/q2-fresh-paint-core@0.1.0","maintainers":[{"name":"anoyomoose","email":"anoyomoose@proton.me"}],"dist":{"shasum":"dad368dea60171a85253823bf1d77a5dae23f168","tarball":"https://registry.npmjs.org/@anoyomoose/q2-fresh-paint-core/-/q2-fresh-paint-core-0.1.0.tgz","fileCount":9,"integrity":"sha512-wWpqm0piRnjRnL66R3ZjkTFB1EQVDJlwJ4/PeDN8gB8xzeNZC8YDVgNXLqu1SqFmZqnSfSnba0txYSyv83+f9A==","signatures":[{"sig":"MEYCIQDXFqsZDmiJVhOs5vuprtUYWxsFmDva9YZiqQLIysr1HAIhAI2+dFydFFtJ4sSA2+qeDC21ae9FL5YsjUiZi31TxhRf","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":62283},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"aef95ecfb1092e032fc146c6d416667e041acef4","scripts":{"dev":"tsup --watch","build":"tsup"},"_npmUser":{"name":"anoyomoose","email":"anoyomoose@proton.me"},"_npmVersion":"11.3.0","description":"Quasar theming engine — Vite plugin for Sass-based theme overrides","directories":{},"_nodeVersion":"25.6.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vite":"^6.0.0","typescript":"^5.0.0","@types/node":"^22.0.0"},"peerDependencies":{"vite":"^5.0.0 || ^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/q2-fresh-paint-core_0.1.0_1774436786310_0.052372813394139905","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@anoyomoose/q2-fresh-paint-core","version":"0.1.1","license":"MIT","_id":"@anoyomoose/q2-fresh-paint-core@0.1.1","maintainers":[{"name":"anoyomoose","email":"anoyomoose@proton.me"}],"dist":{"shasum":"ba3fe1f8a558ae46a73b24d0770ce3ece6be61c8","tarball":"https://registry.npmjs.org/@anoyomoose/q2-fresh-paint-core/-/q2-fresh-paint-core-0.1.1.tgz","fileCount":9,"integrity":"sha512-C7Q3ndf+b3IjNbcJM0Nf80hKcDgMYb1JZx05dj/1Z4gC61XMcNBaZ/EsYB+nEv3ldYGHccE8dqRjxjd47Tbing==","signatures":[{"sig":"MEYCIQDSR3n5+++sY9+msbe1y0XGWMO4p56DfxCRkZd+L2tcJQIhAKzAB3SPBanT6YsawLl8unOZkRdXxTujVBQtP0sKL4VE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63121},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"498f0f281c12871be58c3254eddc3c587f39c0e2","scripts":{"dev":"tsup --watch","build":"tsup"},"_npmUser":{"name":"anoyomoose","email":"anoyomoose@proton.me"},"_npmVersion":"11.3.0","description":"Quasar theming engine — Vite plugin for Sass-based theme overrides","directories":{},"_nodeVersion":"25.6.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vite":"^6.0.0","typescript":"^5.0.0","@types/node":"^22.0.0"},"peerDependencies":{"vite":"^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/q2-fresh-paint-core_0.1.1_1774470347749_0.7509339566620961","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@anoyomoose/q2-fresh-paint-core","version":"0.1.2","license":"MIT","_id":"@anoyomoose/q2-fresh-paint-core@0.1.2","maintainers":[{"name":"anoyomoose","email":"anoyomoose@proton.me"}],"dist":{"shasum":"323399594a5c22bd0fc5cd8729bebc31a236d6df","tarball":"https://registry.npmjs.org/@anoyomoose/q2-fresh-paint-core/-/q2-fresh-paint-core-0.1.2.tgz","fileCount":9,"integrity":"sha512-MRl7wpuG+4cVLTOHN8Jxc8iFtl8xWlxKHa3UXi9Vv8dt1NSqoCKr1lHRVUjtk+Z2h2F3co9jr8Oll+HK/nuvqQ==","signatures":[{"sig":"MEUCICYnbRtedwaj+dBseq1WI3x5CxmQ3yRDSczPTMtMFjqRAiEAtBwPAt2J+aCRCEhXLvCqeMNaKOgeNNXrA0XVxi/OeBs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":71230},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"923d171cc49c933d716707fd5d74833eda909da2","scripts":{"dev":"tsup --watch","build":"tsup"},"_npmUser":{"name":"anoyomoose","email":"anoyomoose@proton.me"},"_npmVersion":"11.3.0","description":"Quasar theming engine — Vite plugin for Sass-based theme overrides","directories":{},"_nodeVersion":"25.6.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vite":"^6.0.0","typescript":"^5.0.0","@types/node":"^22.0.0"},"peerDependencies":{"vite":"^5.4.3 || ^6.0.0 || ^7.0.0 || ^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/q2-fresh-paint-core_0.1.2_1774477738978_0.8628196811884168","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@anoyomoose/q2-fresh-paint-core","version":"0.1.3","license":"MIT","_id":"@anoyomoose/q2-fresh-paint-core@0.1.3","maintainers":[{"name":"anoyomoose","email":"anoyomoose@proton.me"}],"dist":{"shasum":"dedf13eebc02d9a5b06dd7a30bd86487eee2c001","tarball":"https://registry.npmjs.org/@anoyomoose/q2-fresh-paint-core/-/q2-fresh-paint-core-0.1.3.tgz","fileCount":9,"integrity":"sha512-TlNrdFx5tE3kbTIpDU9D1dUCEuJPmmKENQiqt9MDRE1Rg83+q4blNFb4L2q2kJKDxVNqWO07IY8DQ/yvLentOA==","signatures":[{"sig":"MEQCIFDDHN2p/6ZAq6OZoZtPgKA85/VsJclEXuQQNEHmHNy3AiAy+0+lhfNXixWRipcxkQxVr/jMn3C5dh3O/nXpHsBXCw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72334},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"a88b8c15645e36226cd4a7dacb441a34a2e88777","scripts":{"dev":"tsup --watch","build":"tsup"},"_npmUser":{"name":"anoyomoose","email":"anoyomoose@proton.me"},"_npmVersion":"11.3.0","description":"Quasar theming engine — Vite plugin for Sass-based theme overrides","directories":{},"_nodeVersion":"25.6.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vite":"^6.0.0","typescript":"^5.0.0","@types/node":"^22.0.0"},"peerDependencies":{"vite":"^5.4.3 || ^6.0.0 || ^7.0.0 || ^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/q2-fresh-paint-core_0.1.3_1774811669966_0.4428870089472947","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@anoyomoose/q2-fresh-paint-core","version":"0.1.4","license":"MIT","_id":"@anoyomoose/q2-fresh-paint-core@0.1.4","maintainers":[{"name":"anoyomoose","email":"anoyomoose@proton.me"}],"dist":{"shasum":"1449de9cb4425ae94e6d18476ae2e343bdad8bc0","tarball":"https://registry.npmjs.org/@anoyomoose/q2-fresh-paint-core/-/q2-fresh-paint-core-0.1.4.tgz","fileCount":9,"integrity":"sha512-tnYANh0xl/TCXNrf95xWp9tq/lF+I8H+B6Q6pNtLenp6cSyC2+mUH3nNjiMuzBZ0l1HhMSjXXIg4tqKa5VvcRg==","signatures":[{"sig":"MEUCIAn1F/MB9OoVKV5HvCDMuC1yID4J4j+iEvJpwzwTgtv2AiEAr5EIRC0QFxaGDvEV0TuRhVf+z1ldsQ+YvO9UTXMbq7A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72287},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"565c0621054f3157e220af6bc9ec8d700e913e3a","scripts":{"dev":"tsup --watch","build":"tsup"},"_npmUser":{"name":"anoyomoose","email":"anoyomoose@proton.me"},"_npmVersion":"11.3.0","description":"Quasar theming engine — Vite plugin for Sass-based theme overrides","directories":{},"_nodeVersion":"25.6.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vite":"^6.0.0","typescript":"^5.0.0","@types/node":"^22.0.0"},"peerDependencies":{"vite":"^5.4.3 || ^6.0.0 || ^7.0.0 || ^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/q2-fresh-paint-core_0.1.4_1774950405333_0.6169122604252444","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@anoyomoose/q2-fresh-paint-core","version":"0.1.5","license":"MIT","_id":"@anoyomoose/q2-fresh-paint-core@0.1.5","maintainers":[{"name":"anoyomoose","email":"anoyomoose@proton.me"}],"dist":{"shasum":"da5b289c83991946bc7d9b705208cf3dfecd7c3e","tarball":"https://registry.npmjs.org/@anoyomoose/q2-fresh-paint-core/-/q2-fresh-paint-core-0.1.5.tgz","fileCount":9,"integrity":"sha512-1/1rH2K9lrVKFBVzSLsNeJHCTI8eBl1GJN3Nf/0WSEhcPCiGdmMwegDlQq6P2oSpp6OXHCmbSk8KSZDoxk4zbA==","signatures":[{"sig":"MEQCIAdBmsWdYtpL68++F+m3ysGHANNPQ+PuIBWRXxRuJmhXAiBPdeGFe7UKuSVy5Ddgy0PZT2coa94yv6cl6YJEKZP5fQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72701},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"9a09a2a072d97be3a03a9267192f23b9718723f2","scripts":{"dev":"tsup --watch","build":"tsup"},"_npmUser":{"name":"anoyomoose","email":"anoyomoose@proton.me"},"_npmVersion":"11.3.0","description":"Quasar theming engine — Vite plugin for Sass-based theme overrides","directories":{},"_nodeVersion":"25.6.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vite":"^6.0.0","typescript":"^5.0.0","@types/node":"^22.0.0"},"peerDependencies":{"vite":"^5.4.3 || ^6.0.0 || ^7.0.0 || ^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/q2-fresh-paint-core_0.1.5_1774950984610_0.36189940370927776","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@anoyomoose/q2-fresh-paint-core","version":"0.1.6","license":"MIT","_id":"@anoyomoose/q2-fresh-paint-core@0.1.6","maintainers":[{"name":"anoyomoose","email":"anoyomoose@proton.me"}],"dist":{"shasum":"28bc52cd59a366bcb5104b0d0dbbd6ad7a3c920f","tarball":"https://registry.npmjs.org/@anoyomoose/q2-fresh-paint-core/-/q2-fresh-paint-core-0.1.6.tgz","fileCount":9,"integrity":"sha512-sOBXigyoEvLzkddNuLLbHbFSzCL26+SsBHZBqPvyhNkLmLAGjhNYHEwURrN/x5W6rl8XR0VPeBMCFClBr1x+3A==","signatures":[{"sig":"MEUCIC0v32xTP1DC8grUDPp/bEY37wArF7dxK4hf1dScmSfCAiEA1rzuvQSC22Avq3b0D5KtaAhFCZS1amU9NRYmS/bOks0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73547},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"3d82cc04e3e16b5fba4fca25497f3e2d507650ad","scripts":{"dev":"tsup --watch","build":"tsup"},"_npmUser":{"name":"anoyomoose","email":"anoyomoose@proton.me"},"_npmVersion":"11.3.0","description":"Quasar theming engine — Vite plugin for Sass-based theme overrides","directories":{},"_nodeVersion":"25.6.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vite":"^6.0.0","typescript":"^5.0.0","@types/node":"^22.0.0"},"peerDependencies":{"vite":"^5.4.3 || ^6.0.0 || ^7.0.0 || ^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/q2-fresh-paint-core_0.1.6_1775207467957_0.4275360815633329","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@anoyomoose/q2-fresh-paint-core","version":"0.1.7","description":"Quasar theming engine — Vite plugin for Sass-based theme overrides","license":"MIT","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup","dev":"tsup --watch"},"peerDependencies":{"vite":"^5.4.3 || ^6.0.0 || ^7.0.0 || ^8.0.0"},"devDependencies":{"@types/node":"^22.0.0","tsup":"^8.0.0","typescript":"^5.0.0","vite":"^6.0.0"},"_id":"@anoyomoose/q2-fresh-paint-core@0.1.7","gitHead":"70e0077749d05e98699b8de800f4b5686c8a7202","_nodeVersion":"25.6.1","_npmVersion":"11.3.0","dist":{"integrity":"sha512-Xhryq+0YCdASVT6zSpGKg467XwGRoXn0595lJg2F++OBdIcUvdzmJ7+ainNiDZUPFwSEw2ZkeoknXAAxmdjF6w==","shasum":"7f1f850fe822bb1a25b970bf473272ee52bd0975","tarball":"https://registry.npmjs.org/@anoyomoose/q2-fresh-paint-core/-/q2-fresh-paint-core-0.1.7.tgz","fileCount":9,"unpackedSize":77738,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDdtllkw3mZ1p69/QiTGCR1yqIjus04z8fLYia4qTbHAQIge9Xd0i1fV6OmhVUYiZJqBEI05g+s6DbILzGFXl6piCE="}]},"_npmUser":{"name":"anoyomoose","email":"anoyomoose@proton.me"},"directories":{},"maintainers":[{"name":"anoyomoose","email":"anoyomoose@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/q2-fresh-paint-core_0.1.7_1775312239658_0.9084487058345481"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-25T11:06:26.206Z","modified":"2026-04-04T14:17:19.974Z","0.1.0":"2026-03-25T11:06:26.471Z","0.1.1":"2026-03-25T20:25:47.889Z","0.1.2":"2026-03-25T22:28:59.153Z","0.1.3":"2026-03-29T19:14:30.104Z","0.1.4":"2026-03-31T09:46:45.515Z","0.1.5":"2026-03-31T09:56:24.764Z","0.1.6":"2026-04-03T09:11:08.098Z","0.1.7":"2026-04-04T14:17:19.823Z"},"license":"MIT","description":"Quasar theming engine — Vite plugin for Sass-based theme overrides","maintainers":[{"name":"anoyomoose","email":"anoyomoose@proton.me"}],"readme":"# @anoyomoose/q2-fresh-paint-core\n\nQuasar theming engine — a Vite plugin that applies Sass-based theme overrides to Quasar components. Supports multiple themes stacked in sequence.\n\nThis is a pure build-time package. It has no runtime browser code and no dependency on `quasar` or `vue`.\n\n## Installation & Quick Start\n\nInstall the core engine alongside a theme package:\n\n```bash\n# or equivalent for your package manager\npnpm add @anoyomoose/q2-fresh-paint-core @anoyomoose/q2-fresh-paint-md3e\n```\n\nAdd `freshPaint()` to your `quasar.config.js`. In a Quasar project, Vite plugins are registered inside `build.vitePlugins`, and boot files (runtime JS that runs at app startup) go in the `boot` array. The `~` prefix tells Quasar to resolve from `node_modules`:\n\n```js\nimport { freshPaint } from '@anoyomoose/q2-fresh-paint-core'\nimport { md3eTheme } from '@anoyomoose/q2-fresh-paint-md3e'\n\nexport default defineConfig({\n  boot: [\n    // Theme boot file — patches component prop defaults at runtime\n    '~@anoyomoose/q2-fresh-paint-md3e/boot'\n  ],\n\n  build: {\n    vitePlugins: [\n      // Theme engine — intercepts Sass compilation to inject theme overrides\n      freshPaint({\n        themes: [ md3eTheme({ sourceColor: '#6750a4' }) ],\n      })\n    ]\n  }\n})\n```\n\n`freshPaint()` must appear in `build.vitePlugins` **after** Quasar's own Vite plugin (which Quasar registers automatically, so just adding it to the array is sufficient). Boot files are separate because they're a Quasar runtime concept — the Vite plugin only handles build-time Sass injection.\n\n## API Reference\n\n### `freshPaint(options: FreshPaintOptions): Plugin`\n\nReturns a Vite plugin that intercepts Quasar's Sass compilation to inject theme overrides.\n\n#### `FreshPaintOptions`\n\n| Property | Type | Default | Description |\n|---|---|---|---|\n| `themes` | `ThemeDescriptor[]` | *(required)* | Ordered array of themes to apply. |\n| `userThemeDir` | `string` | `'src/theme'` | Base directory for user overrides, relative to app root. |\n\n### `ThemeDescriptor`\n\nDescribes a single theme. Theme packages export a factory function that returns this object.\n\n```ts\ninterface ThemeDescriptor {\n  /** Unique name — used for generated vars filename and user override dir resolution */\n  name: string\n  /** Absolute path to theme's SCSS directory (variables.scss, base.scss, components/) */\n  dir: string\n  /** Optional: returns Sass variable content, written to .quasar/theme.<name>.scss */\n  generateVariables?: () => string\n}\n```\n\n| Field | Description |\n|---|---|\n| `name` | Unique identifier. Determines the user override subdirectory (`src/theme/<name>/`) and the generated variables filename (`.quasar/theme.<name>.scss`). |\n| `dir` | Absolute path to the directory containing the theme's SCSS files. Must contain some combination of `variables.scss`, `base.scss`, and a `components/` subdirectory. |\n| `generateVariables` | Optional function called at build time. Its return value (a string of Sass content) is written to `.quasar/theme.<name>.scss` and included in the variable import chain. |\n\n## Building Themes\n\nThis section explains how to author a theme package for Fresh Paint.\n\n### Directory Structure\n\nA theme package provides a directory with these files:\n\n```\ntheme/\n  variables.scss        — Sass variable overrides (using !default)\n  base.scss             — global styles, CSS custom properties, utility classes\n  components/\n    QBtn.scss           — override for QBtn\n    QCard.scss          — override for QCard\n    ...\n```\n\nAll files are optional. Include only what the theme needs to override.\n\nThe theme package exports a factory function that returns a `ThemeDescriptor` pointing to this directory:\n\n```ts\nimport { dirname, resolve } from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport type { ThemeDescriptor } from '@anoyomoose/q2-fresh-paint-core'\n\nexport function myTheme(): ThemeDescriptor {\n  const pkgDir = dirname(fileURLToPath(import.meta.url))\n  return {\n    name: 'my-theme',\n    dir: resolve(pkgDir, 'theme'),\n  }\n}\n```\n\n### Component Override Resolution\n\nUsing the `QBtn` component as example:\n\nOverride files are placed in `theme/components/QBtn.scss`. The filename must match the Quasar component name exactly, with either `.scss` or `.sass` extension.\n\nThe engine inserts all component override imports into Quasar's main CSS entry point (either `src/css/index.sass` in source mode or `dist/quasar.sass` in dist mode), after Quasar's components but before Quasar's core utility classes (colors, spacing, flex, etc.). This means component overrides take precedence over Quasar's component CSS by source order, while Quasar's utility classes (`.q-pa-*`, `.bg-primary`, `.text-white`, etc.) still take precedence over the overrides — so utility classes work as expected on themed components. This works identically in both source and dist modes.\n\n### Development mode\n\nOne way to develop themes is to have the full Quasar source available, and install your theme package in link mode with (p)npm. You can then run Quasar source's built-in UI playground to systematically check your work. You will still have to constantly rebuild your package and restart the dev server for various changes to take effect, but it is still an easy way to work. The theming engine works identically in source and dist modes.\n\nOf course, if you're developing inside your own web project, you can create a very basic package and then use \"user overrides\" (see below) to style any component directly from your tree, before copying the final version into your actual package. You'll likely still have to restart the dev server regularly.\n\n### Variable Priority\n\nQuasar's built-in Sass variables all use the `!default` flag, which means the **first definition wins**. The engine exploits this by prepending theme variable imports *before* Quasar's own variable file.\n\nThe engine provides three user override points for variables, each at a different position in the import chain. For a single theme, the full import order in each Sass file is:\n\n1. **`quasar.variables.scss`** — the project's own Quasar variable file (prepended by Quasar's Vite plugin)\n2. **User `variables.pre.scss`** — before generated variables\n3. **Generated variables** from `generateVariables()` (if provided)\n4. **User `variables.scss`** — after generated, before package\n5. **Theme package `variables.scss`**\n6. **User `variables.post.scss`** — after package variables\n7. **Quasar's `variables.sass`** with `!default` (lowest priority)\n\nSince `!default` means \"only set if not yet defined,\" earlier definitions win for `!default` variables. Hard assignments (no `!default`) always take effect regardless of position.\n\nThe three user variable files serve different purposes:\n\n- **`variables.pre.scss`** — imported before the generated tokens. Use this to override individual generated tokens (e.g., force a token to a specific value while letting the rest of the tokens generate normally). Use `!default` so `quasar.variables.scss` can still win.\n\n- **`variables.scss`** — imported after generated variables but before the package's own variables. Can reference generated tokens (e.g., `$md3-primary`). Use `!default` to override the package's default mappings while preserving the fallback chain.\n\n- **`variables.post.scss`** — imported after everything. Can reference all tokens from all sources — generated tokens, package variables, shape tokens, motion tokens, everything. Use hard assignments (no `!default`) here, since all variables are already defined by this point.\n\nAll three files are optional. Most users will only need `variables.post.scss` (to tweak fully-resolved values) or `variables.scss` (to remap how generated tokens are applied).\n\n**Important for theme users:** Quasar's `quasar.variables.scss` is loaded *before* any theme variables, and typically uses hard assignments (no `!default`). Any variable defined there — such as `$primary: #1976D2` — will override the theme's value for that variable. Theme packages should document which Quasar variables they manage, so users know what to remove from `quasar.variables.scss`.\n\n**For theme authors:** always use `!default` in your package's `variables.scss` so that user overrides at every level can take priority:\n\n```scss\n// In a theme's variables.scss\n$primary: $my-generated-primary !default;\n$button-border-radius: 20px !default;\n```\n\n### Base File Injection\n\n`base.scss` is appended to the **end** of Quasar's main CSS entry point, after both Quasar's core utilities and the theme's component overrides. This gives it the highest source-order priority. Use base.scss for:\n\n- CSS custom properties (e.g., `--md3-primary: #{$md3-primary}`)\n- Global styles, resets, and brand color fixes\n- Utility classes that need to override everything\n- Any rule that should have maximum priority\n\n```scss\n// In a theme's base.scss\n:root {\n  --my-theme-primary: #{$primary};\n  --my-theme-radius: 12px;\n}\n\n.body--dark {\n  --my-theme-primary: #{$primary-dark};\n}\n```\n\n### `generateVariables()`\n\nAn optional function on `ThemeDescriptor` that returns a string of Sass variable content. Called at build time; output is written to `.quasar/theme.<name>.scss`.\n\nThis is useful when variable values need to be computed — for example, generating an entire color palette from a single source color:\n\n```ts\nexport function myTheme(options: { color: string }): ThemeDescriptor {\n  return {\n    name: 'my-theme',\n    dir: resolve(__dirname, 'theme'),\n    generateVariables() {\n      const palette = generatePalette(options.color)\n      return `$my-primary: ${palette.primary} !default;\\n`\n        + `$my-secondary: ${palette.secondary} !default;\\n`\n    },\n  }\n}\n```\n\nGenerated variables sit between user overrides and package variables in priority order, so users can still override them.\n\n### Boot Files\n\nSome theme behavior cannot be expressed in CSS alone — for example, setting default component props (`noCaps`, `unelevated`) or attaching DOM observers. These are handled by boot files: runtime JavaScript that runs when the app starts.\n\nBoot files are exported separately from the theme package (e.g., `@anoyomoose/q2-fresh-paint-md3e/boot`) and registered by the user in the `quasar.config.js` boot array. The core engine does not manage boot files — they are a convention between the theme package and the user.\n\n```js\n// quasar.config.js\nboot: [\n  '~@anoyomoose/q2-fresh-paint-md3e/boot'\n]\n```\n\n### Multi-Theme Stacking\n\nMultiple themes can be applied simultaneously by passing them in the `themes` array. The order matters.\n\nGiven `themes: [themeA, themeB]`:\n\n**Variables** (first `!default` definition wins; hard assignments always take effect):\n\n1. themeA `variables.pre.scss`\n2. themeA generated variables\n3. themeA `variables.scss`\n4. themeA package variables\n5. themeA `variables.post.scss`\n6. themeB `variables.pre.scss`\n7. themeB generated variables\n8. themeB `variables.scss`\n9. themeB package variables\n10. themeB `variables.post.scss`\n11. Quasar defaults (lowest priority)\n\nEarlier themes have higher `!default` priority. Hard assignments in `variables.post.scss` override everything above them.\n\n**Component overrides** (inserted before Quasar core utilities):\n\n1. Original Quasar component content\n2. themeA override (user file replaces package file within this theme)\n3. themeB override (user file replaces package file within this theme)\n4. Quasar core utilities (colors, spacing, flex, dark, etc.)\n\n**Base files** (appended to end — highest source-order priority):\n\n1. themeA base (user file replaces package file within this theme)\n2. themeB base (user file replaces package file within this theme)\n\nLater themes' CSS rules override earlier themes' rules. Quasar's core utility classes (`.q-pa-*`, `.bg-primary`, etc.) load after component overrides, so utilities work correctly on themed components without needing `!important`. Base files load after everything and have the highest priority.\n\nThis means variables and CSS rules have opposite priority directions: for variables, earlier themes win; for CSS rules, later themes win.\n\n## User Overrides\n\nUsers can override any theme file without forking the theme package.\n\n### Configuration\n\nThe base directory defaults to `src/theme` (relative to app root). Override it with:\n\n```js\nfreshPaint({\n  themes: [md3eTheme()],\n  userThemeDir: 'src/my-overrides',\n})\n```\n\n### Directory Layout\n\nFor each theme, place overrides in a subdirectory matching the theme's `name`:\n\n```\nsrc/theme/<themeName>/\n  variables.pre.scss      — before generated tokens (optional)\n  variables.scss          — after generated, before package (optional)\n  variables.post.scss     — after package variables (optional)\n  base.scss               — replaces the theme's base stylesheet\n  components/\n    QBtn.scss             — replaces the theme's QBtn override\n    QCard.scss\n```\n\nAll files are optional. Only include the files you need.\n\n### Override Behavior\n\nUser overrides are designed primarily to ease theme development and debugging — they let you iterate on a single component's styling or tweak variables without forking and rebuilding the theme package. They're also useful for project-specific adjustments, but their primary purpose is the development workflow.\n\nThe file types have different override semantics:\n\n- **Variable files (`variables.pre.scss`, `variables.scss`, `variables.post.scss`) — extend.** All user variable files, generated variables, and the package's variables are imported together. Each user file is inserted at a specific point in the chain (see [Variable Priority](#variable-priority)). You only need to define the variables you want to change — the package's variables remain as fallbacks.\n\n- **`base.scss` — replaces.** If the user provides `base.scss`, the package's `base.scss` is not used at all. This gives you a clean slate for CSS custom properties and global styles. If you want to extend rather than replace, import the package file from within your override:\n\n  ```scss\n  // src/theme/md3e/base.scss\n  @import '@anoyomoose/q2-fresh-paint-md3e/dist/theme/base.scss';\n\n  // Additional global styles\n  .my-custom-class { ... }\n  ```\n\n- **`components/<Name>.scss` — replaces.** If the user provides `QBtn.scss`, the package's `QBtn.scss` is not used for that component. Same clean-slate approach — import the package file explicitly if you want to extend:\n\n  ```scss\n  // src/theme/md3e/components/QBtn.scss\n  @import '@anoyomoose/q2-fresh-paint-md3e/dist/theme/components/QBtn.scss';\n\n  // Additional overrides\n  .q-btn { letter-spacing: 0.05em; }\n  ```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}