@editframe/elements 0.15.0-beta.12 → 0.15.0-beta.13
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/gui/TWMixin.js +7 -3
- package/package.json +2 -2
- package/src/gui/TWMixin.ts +8 -4
package/dist/gui/TWMixin.js
CHANGED
|
@@ -20,10 +20,14 @@ function TWMixin(Base) {
|
|
|
20
20
|
}
|
|
21
21
|
const constructorStylesheets = [];
|
|
22
22
|
const constructorStyles = "styles" in this.constructor && this.constructor.styles || [];
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
if (Array.isArray(constructorStyles)) {
|
|
24
|
+
for (const item of constructorStyles) {
|
|
25
|
+
if (item.styleSheet) {
|
|
26
|
+
constructorStylesheets.push(item.styleSheet);
|
|
27
|
+
}
|
|
26
28
|
}
|
|
29
|
+
} else if (constructorStyles.styleSheet) {
|
|
30
|
+
constructorStylesheets.push(constructorStyles.styleSheet);
|
|
27
31
|
}
|
|
28
32
|
if (renderRoot?.adoptedStyleSheets) {
|
|
29
33
|
renderRoot.adoptedStyleSheets = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editframe/elements",
|
|
3
|
-
"version": "0.15.0-beta.
|
|
3
|
+
"version": "0.15.0-beta.13",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"license": "UNLICENSED",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@bramus/style-observer": "^1.3.0",
|
|
30
|
-
"@editframe/assets": "0.15.0-beta.
|
|
30
|
+
"@editframe/assets": "0.15.0-beta.13",
|
|
31
31
|
"@lit/context": "^1.1.2",
|
|
32
32
|
"@lit/task": "^1.0.1",
|
|
33
33
|
"d3": "^7.9.0",
|
package/src/gui/TWMixin.ts
CHANGED
|
@@ -25,12 +25,16 @@ export function TWMixin<T extends new (...args: any[]) => LitElement>(Base: T) {
|
|
|
25
25
|
const constructorStylesheets: CSSStyleSheet[] = [];
|
|
26
26
|
const constructorStyles = (("styles" in this.constructor &&
|
|
27
27
|
this.constructor.styles) ||
|
|
28
|
-
[]) as CSSResult[];
|
|
28
|
+
[]) as CSSResult | CSSResult[];
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
if (Array.isArray(constructorStyles)) {
|
|
31
|
+
for (const item of constructorStyles) {
|
|
32
|
+
if (item.styleSheet) {
|
|
33
|
+
constructorStylesheets.push(item.styleSheet);
|
|
34
|
+
}
|
|
33
35
|
}
|
|
36
|
+
} else if (constructorStyles.styleSheet) {
|
|
37
|
+
constructorStylesheets.push(constructorStyles.styleSheet);
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
if (renderRoot?.adoptedStyleSheets) {
|