@vanduo-oss/framework 1.2.7 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Vanduo Framework v1.2.7
1
+ # Vanduo Framework v1.2.8
2
2
 
3
3
  <p align="center">
4
4
  <img src="vanduo-banner.svg" alt="Vanduo Framework Banner" width="100%">
@@ -32,14 +32,21 @@ A lightweight, pure HTML/CSS/JS framework with **45+ components** for designing
32
32
  - 🧩 **Modular** - Import only what you need
33
33
  - ♿ **Accessible** - Built with accessibility in mind (WCAG 2.1 AA)
34
34
  - 🌙 **Dark Mode** - Automatic OS preference detection + manual toggle
35
+ - 🌗 **Theme Switcher** - Lightweight light/dark/system toggle with shared preference storage
35
36
  - 🎛️ **Theme Customizer** - Real-time color, radius, font, and mode customization
36
37
  - 🔍 **SEO-Ready** - Comprehensive meta tags, structured data, and sitemap
37
38
 
38
39
  ---
39
40
 
40
- ## What's New in v1.2.7
41
+ ## What's New in v1.2.8
41
42
 
42
- v1.2.7 adds **17 new components**, bringing the total to **45+**. Each component ships with dedicated CSS, JavaScript (where applicable), full Playwright test coverage, and comprehensive documentation.
43
+ v1.2.8 focuses on theme-system clarity and release-surface alignment:
44
+
45
+ - **Theme Switcher and Theme Customizer are now treated as distinct tooling components.** Use Theme Switcher for lightweight system/light/dark toggles and Theme Customizer for full palette, neutral, radius, font, and mode control.
46
+ - **Shared theme coordination is more predictable.** When both components are present, they keep the shared theme preference synchronized and only swap between default per-theme primary colors when the user is still on the default primary.
47
+ - **Release-facing docs were refreshed for v1.2.8.** The docs site now has dedicated Theme Switcher documentation, expanded Theme Customizer coordination guidance, and aligned versioned release copy.
48
+
49
+ The framework still ships **45+ components**, including the v1.2.7 additions below.
43
50
 
44
51
  | Component | Vanduo Name | Type |
45
52
  |---|---|---|
@@ -80,8 +87,8 @@ The quickest way to get started — no install, no build step. Add two lines to
80
87
 
81
88
  **Pin to a specific version** for production:
82
89
  ```html
83
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/vanduo-oss/framework@v1.2.7/dist/vanduo.min.css">
84
- <script src="https://cdn.jsdelivr.net/gh/vanduo-oss/framework@v1.2.7/dist/vanduo.min.js"></script>
90
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/vanduo-oss/framework@v1.2.8/dist/vanduo.min.css">
91
+ <script src="https://cdn.jsdelivr.net/gh/vanduo-oss/framework@v1.2.8/dist/vanduo.min.js"></script>
85
92
  <script>Vanduo.init();</script>
86
93
  ```
87
94
 
@@ -144,7 +151,7 @@ This project includes an [`llms.txt`](llms.txt) file — a structured markdown s
144
151
  Use the hardened upload script to attach only approved bundle artifacts from `dist/`:
145
152
 
146
153
  ```bash
147
- pnpm run release:assets -- v1.2.7
154
+ pnpm run release:assets -- v1.2.8
148
155
  ```
149
156
 
150
157
  Notes:
@@ -162,6 +169,7 @@ Comprehensive documentation for all components, utilities, and customization opt
162
169
  ### Key Capabilities
163
170
 
164
171
  * **Dark Mode**: Works automatically with system preferences. Can be forced via `data-theme="dark"` on `<html>`.
172
+ * **Theme Switcher**: Lightweight light/dark/system toggle that can coexist with Theme Customizer.
165
173
  * **Theme Customizer**: Built-in runtime tool to change colors, fonts, and radius.
166
174
  * **Modular Imports**: Import only specific components (e.g., `css/components/buttons.css`) to keep your site lean.
167
175
  * **Icons**: Includes [Phosphor Icons](https://phosphoricons.com) (Regular + Fill weights bundled).
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "1.2.7",
3
- "builtAt": "2026-03-12T16:17:38.253Z",
4
- "commit": "2c1277a",
2
+ "version": "1.2.8",
3
+ "builtAt": "2026-03-14T13:35:54.636Z",
4
+ "commit": "f306379",
5
5
  "mode": "development+production"
6
6
  }
@@ -1,4 +1,4 @@
1
- /*! Vanduo v1.2.7 | Built: 2026-03-12T16:17:38.253Z | git:2c1277a | development */
1
+ /*! Vanduo v1.2.8 | Built: 2026-03-14T13:35:54.636Z | git:f306379 | development */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -132,7 +132,7 @@ module.exports = __toCommonJS(index_exports);
132
132
  // js/vanduo.js
133
133
  (function() {
134
134
  "use strict";
135
- const VANDUO_VERSION = true ? "1.2.7" : "0.0.0-dev";
135
+ const VANDUO_VERSION = true ? "1.2.8" : "0.0.0-dev";
136
136
  const Vanduo2 = {
137
137
  version: VANDUO_VERSION,
138
138
  components: {},
@@ -3902,7 +3902,9 @@ module.exports = __toCommonJS(index_exports);
3902
3902
  if (!this.THEME_MODES.includes(mode)) {
3903
3903
  mode = this.DEFAULTS.THEME;
3904
3904
  }
3905
- const oldDefault = this.getDefaultPrimary(this.state.theme);
3905
+ this._isApplying = true;
3906
+ const currentMode = this.state.theme;
3907
+ const oldDefault = this.getDefaultPrimary(currentMode);
3906
3908
  if (this.state.primary === oldDefault) {
3907
3909
  const newDefault = this.getDefaultPrimary(mode);
3908
3910
  if (newDefault !== this.state.primary) {
@@ -3918,10 +3920,12 @@ module.exports = __toCommonJS(index_exports);
3918
3920
  this.savePreference(this.STORAGE_KEYS.THEME, mode);
3919
3921
  if (window.Vanduo && window.Vanduo.components.themeSwitcher) {
3920
3922
  const themeSwitcher = window.Vanduo.components.themeSwitcher;
3921
- if (themeSwitcher.state) {
3923
+ if (themeSwitcher.state && themeSwitcher.state.preference !== mode) {
3922
3924
  themeSwitcher.state.preference = mode;
3925
+ themeSwitcher.savePreference(themeSwitcher.STORAGE_KEY, mode);
3923
3926
  }
3924
3927
  }
3928
+ this._isApplying = false;
3925
3929
  this.dispatchEvent("mode-change", { mode });
3926
3930
  },
3927
3931
  /**
@@ -4337,6 +4341,9 @@ module.exports = __toCommonJS(index_exports);
4337
4341
  this.state.preference = pref;
4338
4342
  this.setStorageValue(this.STORAGE_KEY, pref);
4339
4343
  this.applyTheme();
4344
+ if (window.ThemeCustomizer && window.ThemeCustomizer.applyTheme && !window.ThemeCustomizer._isApplying) {
4345
+ window.ThemeCustomizer.applyTheme(pref);
4346
+ }
4340
4347
  this.updateUI();
4341
4348
  },
4342
4349
  getStorageValue: function(key, fallback) {