@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/dist/vanduo.js CHANGED
@@ -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
  (() => {
3
3
  // js/utils/lifecycle.js
4
4
  (function() {
@@ -107,7 +107,7 @@
107
107
  // js/vanduo.js
108
108
  (function() {
109
109
  "use strict";
110
- const VANDUO_VERSION = true ? "1.2.7" : "0.0.0-dev";
110
+ const VANDUO_VERSION = true ? "1.2.8" : "0.0.0-dev";
111
111
  const Vanduo2 = {
112
112
  version: VANDUO_VERSION,
113
113
  components: {},
@@ -3877,7 +3877,9 @@
3877
3877
  if (!this.THEME_MODES.includes(mode)) {
3878
3878
  mode = this.DEFAULTS.THEME;
3879
3879
  }
3880
- const oldDefault = this.getDefaultPrimary(this.state.theme);
3880
+ this._isApplying = true;
3881
+ const currentMode = this.state.theme;
3882
+ const oldDefault = this.getDefaultPrimary(currentMode);
3881
3883
  if (this.state.primary === oldDefault) {
3882
3884
  const newDefault = this.getDefaultPrimary(mode);
3883
3885
  if (newDefault !== this.state.primary) {
@@ -3893,10 +3895,12 @@
3893
3895
  this.savePreference(this.STORAGE_KEYS.THEME, mode);
3894
3896
  if (window.Vanduo && window.Vanduo.components.themeSwitcher) {
3895
3897
  const themeSwitcher = window.Vanduo.components.themeSwitcher;
3896
- if (themeSwitcher.state) {
3898
+ if (themeSwitcher.state && themeSwitcher.state.preference !== mode) {
3897
3899
  themeSwitcher.state.preference = mode;
3900
+ themeSwitcher.savePreference(themeSwitcher.STORAGE_KEY, mode);
3898
3901
  }
3899
3902
  }
3903
+ this._isApplying = false;
3900
3904
  this.dispatchEvent("mode-change", { mode });
3901
3905
  },
3902
3906
  /**
@@ -4312,6 +4316,9 @@
4312
4316
  this.state.preference = pref;
4313
4317
  this.setStorageValue(this.STORAGE_KEY, pref);
4314
4318
  this.applyTheme();
4319
+ if (window.ThemeCustomizer && window.ThemeCustomizer.applyTheme && !window.ThemeCustomizer._isApplying) {
4320
+ window.ThemeCustomizer.applyTheme(pref);
4321
+ }
4315
4322
  this.updateUI();
4316
4323
  },
4317
4324
  getStorageValue: function(key, fallback) {