@skbkontur/icons 1.12.0 → 1.12.1
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/CHANGELOG.md +11 -0
- package/esm/internal/injectCss.js +8 -1
- package/internal/injectCss.js +8 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.12.1](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/icons@1.12.0...@skbkontur/icons@1.12.1) (2024-09-09)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **icons:** compatibility with chrome 63+ ([37b9808](https://git.skbkontur.ru/ui/ui-parking/commits/37b98081b4ba516fee848d698ef6964fb1173d3c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [1.12.0](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/icons@1.11.2...@skbkontur/icons@1.12.0) (2024-08-29)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __spreadArrays } from "tslib";
|
|
1
2
|
import { CSSRules } from './cssRules';
|
|
2
3
|
function checkRuleExists(rootNodeStyles, cssText) {
|
|
3
4
|
return rootNodeStyles.some(function (cssRules) { return Array.from(cssRules).some(function (r) { return r.cssText === cssText; }); });
|
|
@@ -41,7 +42,13 @@ export function injectCss(element) {
|
|
|
41
42
|
}
|
|
42
43
|
});
|
|
43
44
|
if (filteredStyleSheet_1.cssRules.length > 0) {
|
|
44
|
-
|
|
45
|
+
try {
|
|
46
|
+
typedRootNode.adoptedStyleSheets.push(filteredStyleSheet_1);
|
|
47
|
+
}
|
|
48
|
+
catch (e) {
|
|
49
|
+
// fix for old chrome https://chromestatus.com/feature/5638996492288000 , but slow performance
|
|
50
|
+
typedRootNode.adoptedStyleSheets = __spreadArrays(typedRootNode.adoptedStyleSheets, [filteredStyleSheet_1]);
|
|
51
|
+
}
|
|
45
52
|
}
|
|
46
53
|
}
|
|
47
54
|
else {
|
package/internal/injectCss.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.injectCss = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
4
5
|
var cssRules_1 = require("./cssRules");
|
|
5
6
|
function checkRuleExists(rootNodeStyles, cssText) {
|
|
6
7
|
return rootNodeStyles.some(function (cssRules) { return Array.from(cssRules).some(function (r) { return r.cssText === cssText; }); });
|
|
@@ -44,7 +45,13 @@ function injectCss(element) {
|
|
|
44
45
|
}
|
|
45
46
|
});
|
|
46
47
|
if (filteredStyleSheet_1.cssRules.length > 0) {
|
|
47
|
-
|
|
48
|
+
try {
|
|
49
|
+
typedRootNode.adoptedStyleSheets.push(filteredStyleSheet_1);
|
|
50
|
+
}
|
|
51
|
+
catch (e) {
|
|
52
|
+
// fix for old chrome https://chromestatus.com/feature/5638996492288000 , but slow performance
|
|
53
|
+
typedRootNode.adoptedStyleSheets = tslib_1.__spreadArrays(typedRootNode.adoptedStyleSheets, [filteredStyleSheet_1]);
|
|
54
|
+
}
|
|
48
55
|
}
|
|
49
56
|
}
|
|
50
57
|
else {
|