diff --git a/.changeset/renamed-to-variablelab.md b/.changeset/renamed-to-variablelab.md deleted file mode 100644 index d92e67d..0000000 --- a/.changeset/renamed-to-variablelab.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"@variablelab/theme-toggle": major ---- - -Renamed from `@vlandoss/theme-toggle`. The package now lives at [withvariablelab/theme-toggle](https://github.com/withvariablelab/theme-toggle); `@vlandoss/theme-toggle` will not receive further releases. - -**Breaking changes** - -- Install and import `@variablelab/theme-toggle` instead of `@vlandoss/theme-toggle` (the inline script moves to `https://unpkg.com/@variablelab/theme-toggle/dist/initial.js`). -- The `localStorage` key is now `@variablelab/theme-toggle.colorMode` (was `@vlandoss/theme-toggle.colorMode`). -- The change event is now `@variablelab/theme-toggle.colorModeChange` (was `@vlandoss/theme-toggle.colorModeChange`). Update any `document.addEventListener(...)` listeners, or read the name from `window.__COLOR_MODE__.CUSTOM_EVENT`. - -**Automatic migration** - -Users keep their saved color mode. On init, both the inline script and `useColorMode` check for the 1.x key: if `@variablelab/theme-toggle.colorMode` is absent and `@vlandoss/theme-toggle.colorMode` exists, its value is copied to the new key. A value already stored under the new key always wins. Either way, the old key is removed. diff --git a/CHANGELOG.md b/CHANGELOG.md index b4ea43a..c33fa18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # @variablelab/theme-toggle +## 2.0.0 + +### Major Changes + +- [#8](https://github.com/withvariablelab/theme-toggle/pull/8) [`48299ee`](https://github.com/withvariablelab/theme-toggle/commit/48299ee6e6036b70ee27d3cd3b96a6886b134f24) Thanks [@rqbazan](https://github.com/rqbazan)! - Renamed from `@vlandoss/theme-toggle`. The package now lives at [withvariablelab/theme-toggle](https://github.com/withvariablelab/theme-toggle); `@vlandoss/theme-toggle` will not receive further releases. + + **Breaking changes** + + - Install and import `@variablelab/theme-toggle` instead of `@vlandoss/theme-toggle` (the inline script moves to `https://unpkg.com/@variablelab/theme-toggle/dist/initial.js`). + - The `localStorage` key is now `@variablelab/theme-toggle.colorMode` (was `@vlandoss/theme-toggle.colorMode`). + - The change event is now `@variablelab/theme-toggle.colorModeChange` (was `@vlandoss/theme-toggle.colorModeChange`). Update any `document.addEventListener(...)` listeners, or read the name from `window.__COLOR_MODE__.CUSTOM_EVENT`. + + **Automatic migration** + + Users keep their saved color mode. On init, both the inline script and `useColorMode` check for the 1.x key: if `@variablelab/theme-toggle.colorMode` is absent and `@vlandoss/theme-toggle.colorMode` exists, its value is copied to the new key. A value already stored under the new key always wins. Either way, the old key is removed. + ## 1.0.0 ### Major Changes diff --git a/package.json b/package.json index c0b50c3..f3ff055 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@variablelab/theme-toggle", - "version": "1.0.0", + "version": "2.0.0", "description": "Light/dark/system color-mode toggle for React with a no-flash inline script", "homepage": "https://github.com/withvariablelab/theme-toggle#readme", "bugs": {