element-vir 6.3.0 → 6.3.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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mapObjectValues } from 'augment-vir';
|
|
2
2
|
import { unsafeCSS } from 'lit';
|
|
3
3
|
import { toHtmlSafeWithTagName } from './tag-name';
|
|
4
4
|
export function createCssVarNamesMap(tagName, cssVarsInit) {
|
|
5
5
|
if (cssVarsInit) {
|
|
6
|
-
return
|
|
6
|
+
return mapObjectValues(cssVarsInit, (key) => {
|
|
7
7
|
return unsafeCSS(`--${toHtmlSafeWithTagName(tagName, String(key))}`);
|
|
8
8
|
});
|
|
9
9
|
}
|
|
@@ -15,7 +15,7 @@ export function createCssVarValuesMap(cssVarInitMap, cssVarNamesMap) {
|
|
|
15
15
|
if (!cssVarInitMap) {
|
|
16
16
|
return {};
|
|
17
17
|
}
|
|
18
|
-
return
|
|
18
|
+
return mapObjectValues(cssVarInitMap, (key, fallbackValue) => {
|
|
19
19
|
const name = cssVarNamesMap[key];
|
|
20
20
|
return unsafeCSS(`var(${name}, ${fallbackValue})`);
|
|
21
21
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mapObjectValues } from 'augment-vir';
|
|
2
2
|
import { toHtmlSafeWithTagName } from './tag-name';
|
|
3
3
|
export function createHostClassNamesMap(tagName, hostClassesInit) {
|
|
4
4
|
if (hostClassesInit) {
|
|
5
|
-
return
|
|
5
|
+
return mapObjectValues(hostClassesInit, (key) => {
|
|
6
6
|
return toHtmlSafeWithTagName(tagName, String(key));
|
|
7
7
|
});
|
|
8
8
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { getObjectTypedKeys,
|
|
1
|
+
import { getObjectTypedKeys, mapObjectValues } from 'augment-vir';
|
|
2
2
|
import { unsafeCSS } from 'lit';
|
|
3
3
|
export function hostClassNamesToStylesInput({ hostClassNames, cssVarNames, cssVarValues, }) {
|
|
4
4
|
return {
|
|
5
|
-
hostClassSelectors:
|
|
5
|
+
hostClassSelectors: mapObjectValues(hostClassNames, (key, name) => {
|
|
6
6
|
return unsafeCSS(`:host(.${name})`);
|
|
7
7
|
}),
|
|
8
|
-
hostClassNames:
|
|
8
|
+
hostClassNames: mapObjectValues(hostClassNames, (key, name) => {
|
|
9
9
|
return unsafeCSS(name);
|
|
10
10
|
}),
|
|
11
11
|
cssVarNames: cssVarNames,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "element-vir",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.1",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"custom",
|
|
6
6
|
"web",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"test:web": "virmator test-web"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"augment-vir": "^3.0
|
|
45
|
-
"lit": "2.4.
|
|
44
|
+
"augment-vir": "^3.1.0",
|
|
45
|
+
"lit": "2.4.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@web/test-runner-playwright": "^0.9.0",
|
|
56
56
|
"ansi-colors": "^4.1.3",
|
|
57
57
|
"chai": "^4.3.6",
|
|
58
|
-
"cspell": "^6.
|
|
58
|
+
"cspell": "^6.14.0",
|
|
59
59
|
"istanbul-smart-text-reporter": "^0.0.1",
|
|
60
60
|
"markdown-code-example-inserter": "^0.1.11",
|
|
61
61
|
"mocha": "^10.1.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"prettier-plugin-sort-json": "^0.0.3",
|
|
70
70
|
"prettier-plugin-toml": "^0.3.1",
|
|
71
71
|
"ts-node": "^10.9.1",
|
|
72
|
-
"virmator": "^4.2.
|
|
72
|
+
"virmator": "^4.2.15",
|
|
73
73
|
"vite": "^3.2.2"
|
|
74
74
|
}
|
|
75
75
|
}
|