@ai-ecoverse/slicc-spectrum 1.32.0 → 1.32.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/dist/slicc-ui.js +14 -0
- package/dist/slicc-ui.js.map +3 -3
- package/dist/types/app/app.d.ts +1 -0
- package/package.json +1 -1
package/dist/slicc-ui.js
CHANGED
|
@@ -14813,6 +14813,12 @@ function lockOverscroll(document2) {
|
|
|
14813
14813
|
if (lock.count === 0) lock.restore();
|
|
14814
14814
|
};
|
|
14815
14815
|
}
|
|
14816
|
+
function finishTransitions(root2) {
|
|
14817
|
+
for (const animation of root2.getAnimations())
|
|
14818
|
+
if ("transitionProperty" in animation) animation.finish();
|
|
14819
|
+
for (const element2 of root2.querySelectorAll("*"))
|
|
14820
|
+
if (element2.shadowRoot) finishTransitions(element2.shadowRoot);
|
|
14821
|
+
}
|
|
14816
14822
|
var SliccApp = class extends ThemedElement {
|
|
14817
14823
|
static properties = {
|
|
14818
14824
|
...ThemedElement.properties,
|
|
@@ -14828,6 +14834,7 @@ var SliccApp = class extends ThemedElement {
|
|
|
14828
14834
|
#resize = null;
|
|
14829
14835
|
#width = 0;
|
|
14830
14836
|
#started = null;
|
|
14837
|
+
#painted = "";
|
|
14831
14838
|
#saving = false;
|
|
14832
14839
|
#updatesPort;
|
|
14833
14840
|
#unlock;
|
|
@@ -15082,6 +15089,13 @@ var SliccApp = class extends ThemedElement {
|
|
|
15082
15089
|
}
|
|
15083
15090
|
}
|
|
15084
15091
|
updated(changed) {
|
|
15092
|
+
const color = this.color;
|
|
15093
|
+
if (this.#painted && this.#painted !== color) {
|
|
15094
|
+
const root2 = this.renderRoot;
|
|
15095
|
+
finishTransitions(root2);
|
|
15096
|
+
requestAnimationFrame(() => finishTransitions(root2));
|
|
15097
|
+
}
|
|
15098
|
+
this.#painted = color;
|
|
15085
15099
|
if (!this.model) return;
|
|
15086
15100
|
const layout = this.#started !== this.screen;
|
|
15087
15101
|
if (layout) this.#start(this.model);
|