@microsoft/webui-framework 0.0.26 → 0.0.27
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/element/link-styles.js +34 -22
- package/package.json +2 -2
|
@@ -875,36 +875,48 @@ function installGuard(host, root) {
|
|
|
875
875
|
catch {
|
|
876
876
|
effective = false;
|
|
877
877
|
}
|
|
878
|
+
const releaseInlineGuard = effective
|
|
879
|
+
? undefined
|
|
880
|
+
: installInlineGuard(host);
|
|
881
|
+
return {
|
|
882
|
+
effective,
|
|
883
|
+
release: () => {
|
|
884
|
+
style.remove();
|
|
885
|
+
releaseInlineGuard?.();
|
|
886
|
+
},
|
|
887
|
+
style,
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
function installInlineGuard(host) {
|
|
891
|
+
const hadStyleAttribute = host.hasAttribute('style');
|
|
878
892
|
const previousTransitionValue = host.style.getPropertyValue('transition-property');
|
|
879
893
|
const previousTransitionPriority = host.style.getPropertyPriority('transition-property');
|
|
880
894
|
const previousValue = host.style.getPropertyValue('visibility');
|
|
881
895
|
const previousPriority = host.style.getPropertyPriority('visibility');
|
|
882
896
|
host.style.setProperty('transition-property', 'none', 'important');
|
|
883
897
|
host.style.setProperty('visibility', 'hidden', 'important');
|
|
884
|
-
return {
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
host.style.getPropertyPriority('visibility') === 'important') {
|
|
890
|
-
if (previousValue) {
|
|
891
|
-
host.style.setProperty('visibility', previousValue, previousPriority);
|
|
892
|
-
}
|
|
893
|
-
else {
|
|
894
|
-
host.style.removeProperty('visibility');
|
|
895
|
-
}
|
|
898
|
+
return () => {
|
|
899
|
+
if (host.style.getPropertyValue('visibility') === 'hidden' &&
|
|
900
|
+
host.style.getPropertyPriority('visibility') === 'important') {
|
|
901
|
+
if (previousValue) {
|
|
902
|
+
host.style.setProperty('visibility', previousValue, previousPriority);
|
|
896
903
|
}
|
|
897
|
-
|
|
898
|
-
host.style.
|
|
899
|
-
if (previousTransitionValue) {
|
|
900
|
-
host.style.setProperty('transition-property', previousTransitionValue, previousTransitionPriority);
|
|
901
|
-
}
|
|
902
|
-
else {
|
|
903
|
-
host.style.removeProperty('transition-property');
|
|
904
|
-
}
|
|
904
|
+
else {
|
|
905
|
+
host.style.removeProperty('visibility');
|
|
905
906
|
}
|
|
906
|
-
}
|
|
907
|
-
style
|
|
907
|
+
}
|
|
908
|
+
if (host.style.getPropertyValue('transition-property') === 'none' &&
|
|
909
|
+
host.style.getPropertyPriority('transition-property') === 'important') {
|
|
910
|
+
if (previousTransitionValue) {
|
|
911
|
+
host.style.setProperty('transition-property', previousTransitionValue, previousTransitionPriority);
|
|
912
|
+
}
|
|
913
|
+
else {
|
|
914
|
+
host.style.removeProperty('transition-property');
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
if (!hadStyleAttribute && host.getAttribute('style') === '') {
|
|
918
|
+
host.removeAttribute('style');
|
|
919
|
+
}
|
|
908
920
|
};
|
|
909
921
|
}
|
|
910
922
|
function skipComment(cssText, start) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/webui-framework",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.27",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "WebUI Framework Next — Preact-inspired lightweight Web Component runtime with SSR hydration and compiled-template path mapping.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@playwright/test": "^1.61.1",
|
|
44
44
|
"@types/node": "^26.1.0",
|
|
45
45
|
"typescript": "7.0.2",
|
|
46
|
-
"@microsoft/webui-test-support": "0.0.
|
|
46
|
+
"@microsoft/webui-test-support": "0.0.27"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "tsc",
|