{"_id":"@bruneckel/theme-transitions-core","_rev":"8-4956750f339d6aceb5bf9d522b807b51","name":"@bruneckel/theme-transitions-core","dist-tags":{"latest":"0.2.3"},"versions":{"0.1.0":{"name":"@bruneckel/theme-transitions-core","version":"0.1.0","keywords":["theme","dark-mode","view-transitions","spread","fade","transition","animation"],"author":{"name":"Bruno Neckel"},"license":"MIT","_id":"@bruneckel/theme-transitions-core@0.1.0","maintainers":[{"name":"bncodes","email":"neckel.bw@gmail.com"}],"homepage":"https://github.com/bruneckel/theme-transitions#readme","bugs":{"url":"https://github.com/bruneckel/theme-transitions/issues"},"dist":{"shasum":"786d3496a36fbcd6616c3c1dc82d378574b24c5b","tarball":"https://registry.npmjs.org/@bruneckel/theme-transitions-core/-/theme-transitions-core-0.1.0.tgz","fileCount":6,"integrity":"sha512-WcdGQk/k7sVzYlJjcSBg/Ctm6ti893lqR5CJ+lD2LTMzADRtB3FmnMfRgVoHgKOkz3t89SYacUKqj1F/DqzaQg==","signatures":[{"sig":"MEQCIB39HqyZCaf5KSVCvkzrGwfIlFdyyMne6xJ4ef7PwGjIAiAIzZfhAZLGIzIsSkQnHbdYOZRKtnvzdm+7VqvNYlh/yQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21529},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"gitHead":"125ee68665fe0d6e9c1bc14e8023368e0dd62f85","scripts":{"build":"unbuild","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"bncodes","email":"neckel.bw@gmail.com"},"repository":{"url":"git+https://github.com/bruneckel/theme-transitions.git","type":"git","directory":"packages/core"},"_npmVersion":"11.16.0","description":"Framework-agnostic core for animated dark/light theme transitions using the View Transitions API","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/theme-transitions-core_0.1.0_1785781442949_0.9581147069027589","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.1":{"name":"@bruneckel/theme-transitions-core","version":"0.1.1","keywords":["theme","dark-mode","view-transitions","spread","fade","transition","animation"],"author":{"name":"Bruno Neckel"},"license":"MIT","_id":"@bruneckel/theme-transitions-core@0.1.1","maintainers":[{"name":"bncodes","email":"neckel.bw@gmail.com"}],"homepage":"https://github.com/bruneckel/theme-transitions#readme","bugs":{"url":"https://github.com/bruneckel/theme-transitions/issues"},"dist":{"shasum":"1503169893ae70b6ca19e20a3dce46b868f6714f","tarball":"https://registry.npmjs.org/@bruneckel/theme-transitions-core/-/theme-transitions-core-0.1.1.tgz","fileCount":6,"integrity":"sha512-BwOyOjR//v/K3QvcRNDuV27Lx7QEvDYCYf4J8cYen77iaEcOFHfbLpa6zKmhymjxWPU9/arkjzCMaN4vYQPzIQ==","signatures":[{"sig":"MEQCIENLaij1gmG4TM0TkX35Dui8RK9Bs59fA5fMyxkjLeC0AiBhmDnFtREZrEIcArGtk82peBiw60gi8A9SE+CAv7Mo8Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22140},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"gitHead":"2ebe275038c056b7cf4a6f5dfaa1675ebdc0411f","scripts":{"build":"unbuild","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"bncodes","email":"neckel.bw@gmail.com"},"repository":{"url":"git+https://github.com/bruneckel/theme-transitions.git","type":"git","directory":"packages/core"},"_npmVersion":"11.16.0","description":"Framework-agnostic core for animated dark/light theme transitions using the View Transitions API","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/theme-transitions-core_0.1.1_1785863218295_0.3959856471577188","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.2":{"name":"@bruneckel/theme-transitions-core","version":"0.1.2","keywords":["theme","dark-mode","view-transitions","spread","fade","transition","animation"],"author":{"name":"Bruno Neckel"},"license":"MIT","_id":"@bruneckel/theme-transitions-core@0.1.2","maintainers":[{"name":"bncodes","email":"neckel.bw@gmail.com"}],"homepage":"https://github.com/bruneckel/theme-transitions#readme","bugs":{"url":"https://github.com/bruneckel/theme-transitions/issues"},"dist":{"shasum":"de38c721afa1f40fec59ffe13f8003365121d1b4","tarball":"https://registry.npmjs.org/@bruneckel/theme-transitions-core/-/theme-transitions-core-0.1.2.tgz","fileCount":6,"integrity":"sha512-uLzTSI31ij6aIWKz5WaDCKrmrAKlz+PpRkn2DOhTiVa2vuGO2O3raoA3izu+5DBC1RzGHikK60D0gpNIMEJj5A==","signatures":[{"sig":"MEQCID4c9F60OCjnjqAeeAhny8HZcG5iOq6UZlnfugjRg7ymAiBAoj2s1tLO5LpCOS5A1scL70y/CNg2hRnpWdQiVCiaXg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22152},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"gitHead":"e65052ce6da22b7eeeb3a13bb23c1cfc36a1f87d","scripts":{"build":"unbuild","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"bncodes","email":"neckel.bw@gmail.com"},"repository":{"url":"git+https://github.com/bruneckel/theme-transitions.git","type":"git","directory":"packages/core"},"_npmVersion":"11.16.0","description":"Framework-agnostic core for animated dark/light theme transitions using the View Transitions API","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/theme-transitions-core_0.1.2_1785863690874_0.15784862198695238","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.0":{"name":"@bruneckel/theme-transitions-core","version":"0.2.0","keywords":["theme","theme-toggle","theme-switcher","dark-mode","dark-theme","framework-agnostic","view-transitions","view-transitions-api","spread","fade","transition","animation"],"author":{"name":"Bruno Neckel"},"license":"MIT","_id":"@bruneckel/theme-transitions-core@0.2.0","maintainers":[{"name":"bncodes","email":"neckel.bw@gmail.com"}],"homepage":"https://github.com/bruneckel/theme-transitions#readme","bugs":{"url":"https://github.com/bruneckel/theme-transitions/issues"},"dist":{"shasum":"7142dca282087ffa0ca6118a0c91010a3486197b","tarball":"https://registry.npmjs.org/@bruneckel/theme-transitions-core/-/theme-transitions-core-0.2.0.tgz","fileCount":13,"integrity":"sha512-pZxWNDYdKboOe23MCCM39GWLRhuLYJsTdLU/ej/SWW9Zuta+Yk0ob9lCBE5YNPpy1WFSjEbY1TNOtk9UPPANZQ==","signatures":[{"sig":"MEYCIQDtKrpMIaAwqYcRtf1gQYaLjYriCBuVRnDCrUxhsQoPTAIhANL5hfxC5IuKIOYPJDNa5fwh69NIbZ+0PjOWEAeJD9x9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31169},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./vite":{"types":"./dist/vite-plugin.d.mts","import":"./dist/vite-plugin.mjs"},"./style.css":"./dist/style.css"},"gitHead":"1264d5e09667007c586e8f5fb6638bd94b0cc0de","scripts":{"build":"unbuild && node scripts/build-css.mjs","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"bncodes","email":"neckel.bw@gmail.com"},"repository":{"url":"git+https://github.com/bruneckel/theme-transitions.git","type":"git","directory":"packages/core"},"_npmVersion":"11.16.0","description":"Framework-agnostic core for animated dark/light theme transitions using the View Transitions API","directories":{},"sideEffects":["**/*.css"],"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.2.0"},"peerDependencies":{"vite":"^8.0.0"},"peerDependenciesMeta":{"vite":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/theme-transitions-core_0.2.0_1785920299129_0.8029119795663728","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.1":{"name":"@bruneckel/theme-transitions-core","version":"0.2.1","keywords":["theme","theme-toggle","theme-switcher","dark-mode","dark-theme","framework-agnostic","view-transitions","view-transitions-api","spread","fade","transition","animation"],"author":{"name":"Bruno Neckel"},"license":"MIT","_id":"@bruneckel/theme-transitions-core@0.2.1","maintainers":[{"name":"bncodes","email":"neckel.bw@gmail.com"}],"homepage":"https://github.com/bruneckel/theme-transitions#readme","bugs":{"url":"https://github.com/bruneckel/theme-transitions/issues"},"dist":{"shasum":"ac6968a8fad32b34747af5d8b1552131d42806be","tarball":"https://registry.npmjs.org/@bruneckel/theme-transitions-core/-/theme-transitions-core-0.2.1.tgz","fileCount":13,"integrity":"sha512-Si/aLvXBIQ2U3yERm8KI8xruxX8ApZwvPFRImDNezcwJ6tXG//EnKBhPkXN3bVRvrecAFmyOiFRMgkoAAsMMZQ==","signatures":[{"sig":"MEQCIDwzyGfK2z8Pc6aMXOKDXLwdome/GXzC/NpBoSLoHipbAiArhFGtgFtWMwRRPH88PjTJlRDMUxWVYA7xLRfA9gfkFA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31412},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./vite":{"types":"./dist/vite-plugin.d.mts","import":"./dist/vite-plugin.mjs"},"./style.css":"./dist/style.css"},"gitHead":"e8c57a623ff01fda281ba23ea0f713b01025196f","scripts":{"build":"unbuild && node scripts/build-css.mjs","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"bncodes","email":"neckel.bw@gmail.com"},"repository":{"url":"git+https://github.com/bruneckel/theme-transitions.git","type":"git","directory":"packages/core"},"_npmVersion":"11.16.0","description":"Framework-agnostic core for animated dark/light theme transitions using the View Transitions API","directories":{},"sideEffects":["**/*.css"],"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.2.0"},"peerDependencies":{"vite":"^8.0.0"},"peerDependenciesMeta":{"vite":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/theme-transitions-core_0.2.1_1785948689652_0.7697277429104916","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.2":{"name":"@bruneckel/theme-transitions-core","version":"0.2.2","keywords":["theme","theme-toggle","theme-switcher","dark-mode","dark-theme","framework-agnostic","view-transitions","view-transitions-api","spread","fade","transition","animation"],"author":{"name":"Bruno Neckel"},"license":"MIT","_id":"@bruneckel/theme-transitions-core@0.2.2","maintainers":[{"name":"bncodes","email":"neckel.bw@gmail.com"}],"homepage":"https://github.com/bruneckel/theme-transitions#readme","bugs":{"url":"https://github.com/bruneckel/theme-transitions/issues"},"dist":{"shasum":"ee5f1b0f458d3de9e49de9520528fedada064d1e","tarball":"https://registry.npmjs.org/@bruneckel/theme-transitions-core/-/theme-transitions-core-0.2.2.tgz","fileCount":13,"integrity":"sha512-OId8JxfMaFyl9HUAVxhjGTQQp88/irrZII6mxog0hTDRgQp4+wi5x5DjbVyGAj7oQBHg1pfI9BK5R4UvKPPNTg==","signatures":[{"sig":"MEUCICpfVvPS8g+AuvrrvfR4EBrH/00moAhMdqNCD5CA+vRzAiEAo8FSRqseHfngvh8jfWyPrkOmMPiziAeDDv0HNjbMSeI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33754},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./vite":{"types":"./dist/vite-plugin.d.mts","import":"./dist/vite-plugin.mjs"},"./style.css":"./style.css"},"gitHead":"b0ebd7632ab3d4aab84e20e139cd7e8d810f7d30","scripts":{"build":"unbuild && node scripts/build-css.mjs","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"bncodes","email":"neckel.bw@gmail.com"},"repository":{"url":"git+https://github.com/bruneckel/theme-transitions.git","type":"git","directory":"packages/core"},"_npmVersion":"11.16.0","description":"Framework-agnostic core for animated dark/light theme transitions using the View Transitions API","directories":{},"sideEffects":["**/*.css"],"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.2.0"},"peerDependencies":{"vite":"^8.0.0"},"peerDependenciesMeta":{"vite":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/theme-transitions-core_0.2.2_1785951853390_0.6296929977531727","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.3":{"name":"@bruneckel/theme-transitions-core","version":"0.2.3","keywords":["theme","theme-toggle","theme-switcher","dark-mode","dark-theme","framework-agnostic","view-transitions","view-transitions-api","spread","fade","transition","animation"],"author":{"name":"Bruno Neckel"},"license":"MIT","_id":"@bruneckel/theme-transitions-core@0.2.3","maintainers":[{"name":"bncodes","email":"neckel.bw@gmail.com"}],"homepage":"https://github.com/bruneckel/theme-transitions#readme","bugs":{"url":"https://github.com/bruneckel/theme-transitions/issues"},"dist":{"shasum":"63a6c4538b8771c9cb437078d09eec0c85d0eebc","tarball":"https://registry.npmjs.org/@bruneckel/theme-transitions-core/-/theme-transitions-core-0.2.3.tgz","fileCount":13,"integrity":"sha512-vUPloNuWq9xfC5yWX/boQAf/N09Loyd0DkfDNJFBuwiFYMbSjJHwT4k38tURpm/hQ7auvclj+/lrg1lFHcCJdQ==","signatures":[{"sig":"MEYCIQCTkwwleX8sjXuGoTW/AWQi4+Zw1a1/Q444szZj0Ppa9gIhAON/3ZSvqbaazuqy28pXpAWqvkwk50ZVgEOAJIPJnCpB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bruneckel%2ftheme-transitions-core@0.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":33675},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./vite":{"types":"./dist/vite-plugin.d.mts","import":"./dist/vite-plugin.mjs"},"./style.css":"./style.css"},"gitHead":"c61dd59dbc3fe7f89851314662bc7861c9c944a2","scripts":{"build":"unbuild && node scripts/build-css.mjs","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:df12cc58-371a-400d-bb86-4eafd043550b"}},"repository":{"url":"git+https://github.com/bruneckel/theme-transitions.git","type":"git","directory":"packages/core"},"_npmVersion":"11.16.0","description":"Framework-agnostic core for animated dark/light theme transitions using the View Transitions API","directories":{},"sideEffects":["**/*.css"],"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.2.0"},"peerDependencies":{"vite":"^8.0.0"},"peerDependenciesMeta":{"vite":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/theme-transitions-core_0.2.3_1785956933362_0.9037597494582517","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2026-08-03T18:24:02.770Z","modified":"2026-08-08T04:22:22.064Z","0.1.0":"2026-08-03T18:24:03.087Z","0.1.1":"2026-08-04T17:06:58.442Z","0.1.2":"2026-08-04T17:14:51.001Z","0.2.0":"2026-08-05T08:58:19.313Z","0.2.1":"2026-08-05T16:51:29.811Z","0.2.2":"2026-08-05T17:44:13.529Z","0.2.3":"2026-08-05T19:08:53.495Z"},"bugs":{"url":"https://github.com/bruneckel/theme-transitions/issues"},"author":{"name":"Bruno Neckel"},"license":"MIT","homepage":"https://github.com/bruneckel/theme-transitions#readme","keywords":["theme","theme-toggle","theme-switcher","dark-mode","dark-theme","framework-agnostic","view-transitions","view-transitions-api","spread","fade","transition","animation"],"repository":{"url":"git+https://github.com/bruneckel/theme-transitions.git","type":"git","directory":"packages/core"},"description":"Framework-agnostic core for animated dark/light theme transitions using the View Transitions API","maintainers":[{"name":"bncodes","email":"neckel.bw@gmail.com"}],"readme":"# @bruneckel/theme-transitions-core\n\n[![npm version](https://img.shields.io/npm/v/@bruneckel/theme-transitions-core.svg)](https://www.npmjs.com/package/@bruneckel/theme-transitions-core)\n[![license](https://img.shields.io/npm/l/@bruneckel/theme-transitions-core.svg)](https://github.com/bruneckel/theme-transitions/blob/main/packages/core/LICENSE)\n\nFramework-agnostic core for animated dark/light theme transitions using the View Transitions API.\n\n## Install\n\n```sh\nnpm install @bruneckel/theme-transitions-core\n# or\npnpm add @bruneckel/theme-transitions-core\n# or\nyarn add @bruneckel/theme-transitions-core\n```\n\n> [!IMPORTANT]\n> Using Tailwind? Set `darkMode: 'class'` in your Tailwind config. Tailwind's default (`'media'`) ignores the `dark`/`light` class this package applies to `<html>`, so the toggle will silently have no visual effect without it.\n\n## Usage\n\n```ts\nimport { getController } from '@bruneckel/theme-transitions-core';\n\nconst controller = getController();\n\nawait controller.toggleTheme();\n\nconst { theme, isAnimating } = controller.getState();\n\nconst unsubscribe = controller.subscribe(() => {\n\tconsole.log(controller.getState());\n});\n```\n\n## Options\n\n```ts\ngetController(options?: {\n\tvariant?: 'spread' | 'fade' | 'none'; // default 'fade'\n\tduration?: string;                    // default '400ms' (fade) or '1.5s' (spread)\n\teasing?: string;                      // fade only, any CSS easing function, default 'ease'\n})\n```\n\n`createController(options)` accepts the same shape. `'none'` skips the animation and ignores `duration`/`easing`. `spread` only accepts `duration`; its easing and clip-path radius are fixed and not configurable.\n\n`toggleTheme(options?)` and `setTheme(mode, options?)` accept a `TransitionOptions` object: the same shape as above, plus `origin` (required for `spread`, derive it with `originFromEvent(event)` or `originFromElement(el)`). This overrides the controller's own options for that one call only.\n\n`options` passed to `getController` only takes effect on the very first call in a process, since it wraps a shared singleton (see Notes below). Per-call overrides on `toggleTheme`/`setTheme` are not affected by this and always apply.\n\n## Vite plugin\n\nRegister the anti-flash init script in `vite.config.ts`:\n\n```ts\nimport { defineConfig } from 'vite';\nimport { themeTransitions } from '@bruneckel/theme-transitions-core/vite';\n\nexport default defineConfig({\n\tplugins: [themeTransitions()],\n});\n```\n\nOptionally, pass default effect options so every `getController()` call in the app picks them up without repeating them:\n\n```ts\nplugins: [themeTransitions({ variant: 'spread', duration: '1.5s' })],\n```\n\nThis only sets defaults; an explicit `getController(options)` call, or a per-call `toggleTheme(options)`/`setTheme(mode, options)` override, still takes precedence.\n\n## Stylesheet\n\nImport the static default stylesheet once, wherever your app initializes:\n\n```ts\nimport '@bruneckel/theme-transitions-core/style.css';\n```\n\n## Other bundlers\n\nNot using Vite? The plugin above is a thin wrapper around two functions this package already exports, so you can get the same anti-flash behavior with any bundler by calling them directly.\n\nWith webpack and `html-webpack-plugin`:\n\n```js\nconst { buildColorModeInitScript } = require('@bruneckel/theme-transitions-core');\n\nnew HtmlWebpackPlugin({\n\ttemplateParameters: { themeInitScript: buildColorModeInitScript() },\n});\n```\n\n```html\n<!-- in the HTML template, inside <head> -->\n<script><%= htmlWebpackPlugin.options.templateParameters.themeInitScript %></script>\n```\n\nThe script must run in `<head>`, before the page paints, regardless of where your bundle's own `<script>` tags are injected. To also set app-wide default effect options (the same thing the Vite plugin's argument does), prepend `buildConfigInitScript(options)` (which sets `window.__themeConfig`) to the same string.\n\nWebpack also needs a CSS rule that reaches into `node_modules` for this package's stylesheet. If your existing `.css` rule excludes `node_modules` (common when scoping CSS Modules to your own source), add this package's path to that rule's `include`:\n\n```js\n{\n\ttest: /\\.css$/,\n\tinclude: [path.resolve(__dirname, 'node_modules/@bruneckel/theme-transitions-core')],\n\tuse: ['style-loader', 'css-loader'],\n}\n```\n\n## Notes\n\n- `getController(options)` only applies `options` on the very first call in a process. Subsequent calls with different options are ignored, since it returns the same shared singleton. Call `createController(options)` instead if you need an independently configured instance.\n- This package exposes no framework bindings (no Vue/React). Pair it with a framework adapter package.\n- Theme automatically stays in sync with OS-level `prefers-color-scheme` changes while the active preference is `'system'`. No extra code is needed.\n- Server-side code (SSR) must use `createController()` for a request-scoped instance. `getController()`'s shared singleton is safe only for client-side usage, where one browser tab is already its own isolated process. A Node server handles many requests in the same process, so sharing the singleton there risks one user's theme leaking into another's response.\n\n## Known issues\n\n- Chrome 150 has a regression where the `spread` effect's clip-path animation can render from the wrong position after the browser window moves between displays with different DPI/scaling. This is a Chrome bug, not something this package can work around. It's already fixed upstream and verified in Chrome Canary; the fix should reach the Stable channel in a future release. See [Chromium issue #535696703](https://issues.chromium.org/issues/535696703).\n","readmeFilename":"README.md"}