@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 +14 -6
- package/dist/build-info.json +3 -3
- package/dist/vanduo.cjs.js +11 -4
- package/dist/vanduo.cjs.js.map +2 -2
- package/dist/vanduo.cjs.min.js +4 -4
- package/dist/vanduo.cjs.min.js.map +3 -3
- package/dist/vanduo.css +7 -7
- package/dist/vanduo.esm.js +11 -4
- package/dist/vanduo.esm.js.map +2 -2
- package/dist/vanduo.esm.min.js +4 -4
- package/dist/vanduo.esm.min.js.map +3 -3
- package/dist/vanduo.js +11 -4
- package/dist/vanduo.js.map +2 -2
- package/dist/vanduo.min.css +1 -1
- package/dist/vanduo.min.js +4 -4
- package/dist/vanduo.min.js.map +3 -3
- package/js/components/theme-customizer.js +11 -2
- package/js/components/theme-switcher.js +7 -0
- package/package.json +4 -4
package/dist/vanduo.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Vanduo v1.2.
|
|
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.
|
|
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
|
-
|
|
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) {
|