zois-core 2.0.3 → 2.0.4
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.
|
@@ -108,6 +108,8 @@ class ButtonShard extends Shard {
|
|
|
108
108
|
textElement = document.createElement("span");
|
|
109
109
|
textElement.textContent = text;
|
|
110
110
|
textElement.style.height = "100%";
|
|
111
|
+
textElement.style.display = "grid";
|
|
112
|
+
textElement.style.placeContent = "center";
|
|
111
113
|
textElement.style.overflow = "scroll";
|
|
112
114
|
btn.append(textElement);
|
|
113
115
|
}
|
package/dist/shards/shard.js
CHANGED
|
@@ -33,10 +33,12 @@ class Shard {
|
|
|
33
33
|
for (const key of Object.keys(modules)) {
|
|
34
34
|
for (const module of modules[key] ?? []) {
|
|
35
35
|
if (module instanceof ShardModule) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
if (this.body?.[key]) {
|
|
37
|
+
try {
|
|
38
|
+
this.context = module.overrideContext(this.context, this.body[key]);
|
|
39
|
+
} catch (e) {
|
|
40
|
+
logger.error("OverrideContext call failed in", module, e);
|
|
41
|
+
}
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
}
|
|
@@ -46,10 +48,12 @@ class Shard {
|
|
|
46
48
|
for (const key of Object.keys(modules)) {
|
|
47
49
|
for (const module of modules[key] ?? []) {
|
|
48
50
|
if (module instanceof ShardModule) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
if (this.body?.[key]) {
|
|
52
|
+
try {
|
|
53
|
+
module.layoutEffect(this.context, this.body[key]);
|
|
54
|
+
} catch (e) {
|
|
55
|
+
logger.error("LayoutEffect call failed in", module, e);
|
|
56
|
+
}
|
|
53
57
|
}
|
|
54
58
|
}
|
|
55
59
|
}
|
|
@@ -59,10 +63,12 @@ class Shard {
|
|
|
59
63
|
for (const key of Object.keys(modules)) {
|
|
60
64
|
for (const module of modules[key] ?? []) {
|
|
61
65
|
if (module instanceof ShardModule) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
if (this.body?.[key]) {
|
|
67
|
+
try {
|
|
68
|
+
module.effect(this.context, this.body[key]);
|
|
69
|
+
} catch (e) {
|
|
70
|
+
logger.error("Effect call failed in", module, e);
|
|
71
|
+
}
|
|
66
72
|
}
|
|
67
73
|
}
|
|
68
74
|
}
|