@vaadin/vaadin-themable-mixin 25.0.0-beta7 → 25.0.0-rc1
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/package.json +5 -5
- package/src/lumo-injector.js +17 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/vaadin-themable-mixin",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-rc1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
36
|
-
"@vaadin/component-base": "25.0.0-
|
|
36
|
+
"@vaadin/component-base": "25.0.0-rc1",
|
|
37
37
|
"lit": "^3.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@polymer/polymer": "^3.0.0",
|
|
41
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
42
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
41
|
+
"@vaadin/chai-plugins": "25.0.0-rc1",
|
|
42
|
+
"@vaadin/test-runner-commands": "25.0.0-rc1",
|
|
43
43
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
44
44
|
"sinon": "^21.0.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "cea5e86ad18824e5631b63c11150b4d7701869c5"
|
|
47
47
|
}
|
package/src/lumo-injector.js
CHANGED
|
@@ -97,6 +97,23 @@ export class LumoInjector {
|
|
|
97
97
|
this.#componentsByTag.values().forEach((components) => components.forEach(removeLumoStyleSheet));
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Forces all monitored components to re-evaluate and update their
|
|
102
|
+
* injected styles.
|
|
103
|
+
*
|
|
104
|
+
* This method can be used to force LumoInjector to clean up component
|
|
105
|
+
* styles synchonously after the Lumo stylesheet has been removed from
|
|
106
|
+
* the root element. Without this, there may be a short FOUC, when the
|
|
107
|
+
* Lumo styles are already removed from the root but still present in
|
|
108
|
+
* the component Shadow DOMs, since those are removed asynchronously on
|
|
109
|
+
* `transitionstart` (CSSPropertyObserver).
|
|
110
|
+
*/
|
|
111
|
+
forceUpdate() {
|
|
112
|
+
for (const tagName of this.#styleSheetsByTag.keys()) {
|
|
113
|
+
this.#updateStyleSheet(tagName);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
100
117
|
/**
|
|
101
118
|
* Adds a component to the list of elements monitored for style injection.
|
|
102
119
|
* If the styles have already been detected, they are injected into the
|