@temple-wallet/extension-ads 11.0.1 → 11.0.2
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temple-wallet/extension-ads",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"packageManager": "yarn@4.1.1",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"axios": "^1.
|
|
41
|
+
"axios": "^1.8.4",
|
|
42
42
|
"crypto-js": "^4.2.0",
|
|
43
43
|
"lodash": "^4.17.21",
|
|
44
44
|
"memoizee": "^0.4.17",
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export const stripDimentionsLimits = (wrapperElement: HTMLDivElement, width: number, height: number) => {
|
|
2
|
-
const predefinedStyles = wrapperElement.style;
|
|
3
|
-
// If needed in future, try `getComputedStyle(wrapperElement)` - though would have to not remove but override
|
|
4
|
-
|
|
5
|
-
stripOneDimensionLimit(predefinedStyles, width, ['width']);
|
|
6
|
-
stripOneDimensionLimit(predefinedStyles, height, ['height', 'maxHeight']);
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const stripOneDimensionLimit = (
|
|
10
|
-
predefinedStyles: CSSStyleDeclaration,
|
|
11
|
-
value: number,
|
|
12
|
-
dimensionNames: ('width' | 'height' | 'maxWidth' | 'maxHeight')[]
|
|
13
|
-
) => {
|
|
14
|
-
for (const dimensionName of dimensionNames) {
|
|
15
|
-
const predefinedStyleValue = predefinedStyles[dimensionName] ?? '';
|
|
16
|
-
|
|
17
|
-
if (/^\d+(px)?$/.test(predefinedStyleValue)) {
|
|
18
|
-
const predefinedSize = parseInt(predefinedStyleValue, 10);
|
|
19
|
-
if (predefinedSize < value) {
|
|
20
|
-
predefinedStyles.removeProperty(dimensionName);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
};
|