iobroker.mywebui 1.37.77 → 1.37.78
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/io-package.json
CHANGED
package/package.json
CHANGED
|
@@ -107,7 +107,7 @@ export class IobrokerWebuiScreenEditor extends BaseCustomWebComponentConstructor
|
|
|
107
107
|
// Visibility configs are stored as HTML attributes (data-visibility-*)
|
|
108
108
|
// They are automatically loaded with HTML
|
|
109
109
|
|
|
110
|
-
this.documentContainer.designerView.designerCanvas.onContentChanged
|
|
110
|
+
this.documentContainer.designerView.designerCanvas.onContentChanged?.on(() => {
|
|
111
111
|
this.applyBindings();
|
|
112
112
|
});
|
|
113
113
|
}, 50);
|
|
@@ -16,15 +16,22 @@ async function ensureGSAP() {
|
|
|
16
16
|
s.onerror = rej;
|
|
17
17
|
document.head.appendChild(s);
|
|
18
18
|
});
|
|
19
|
+
// Monaco Editor's AMD loader sets window.define which causes GSAP plugins
|
|
20
|
+
// to register as anonymous AMD modules — Monaco rejects multiple anonymous
|
|
21
|
+
// defines. Temporarily remove define so GSAP loads as plain UMD globals.
|
|
22
|
+
const _savedDefine = window.define;
|
|
23
|
+
window.define = undefined;
|
|
19
24
|
loadScript(_gsapBase + 'gsap.min.js')
|
|
20
25
|
.then(() => loadScript(_gsapBase + 'MotionPathPlugin.min.js'))
|
|
21
26
|
.then(() => loadScript(_gsapBase + 'MorphSVGPlugin.min.js'))
|
|
22
27
|
.then(() => {
|
|
28
|
+
window.define = _savedDefine;
|
|
23
29
|
if (window.MotionPathPlugin) window.gsap.registerPlugin(window.MotionPathPlugin);
|
|
24
30
|
if (window.MorphSVGPlugin) window.gsap.registerPlugin(window.MorphSVGPlugin);
|
|
25
31
|
resolve(window.gsap);
|
|
26
32
|
})
|
|
27
33
|
.catch(() => {
|
|
34
|
+
window.define = _savedDefine;
|
|
28
35
|
console.warn('[AnimationService] Failed to load GSAP from local path:', _gsapBase);
|
|
29
36
|
resolve(window.gsap || null);
|
|
30
37
|
});
|
package/www/index.html
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8">
|
|
6
|
-
<link rel="manifest" href="./manifest.json">
|
|
7
6
|
|
|
8
7
|
<script src="./node_modules/blockly/blockly_compressed.js"></script>
|
|
9
8
|
<script src="./node_modules/blockly/blocks_compressed.js"></script>
|
|
@@ -51,10 +50,13 @@
|
|
|
51
50
|
|
|
52
51
|
<script type="module">
|
|
53
52
|
try {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
await new Promise((resolve) => {
|
|
54
|
+
const scp = document.createElement('script');
|
|
55
|
+
scp.src = iobrokerWebRootUrl + "mywebui.0.widgets/importmap.js";
|
|
56
|
+
scp.onload = resolve;
|
|
57
|
+
scp.onerror = resolve; // file may not exist (no widgets installed)
|
|
58
|
+
document.head.appendChild(scp);
|
|
59
|
+
});
|
|
58
60
|
await importShim(iobrokerWebRootUrl + 'mywebui.0.widgets/importWidgetFiles.js');
|
|
59
61
|
} catch (err) {
|
|
60
62
|
console.warn(err);
|
package/www/runtime.html
CHANGED
|
@@ -54,9 +54,13 @@
|
|
|
54
54
|
</body>
|
|
55
55
|
|
|
56
56
|
<script type="module">
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
await new Promise((resolve) => {
|
|
58
|
+
const scp = document.createElement('script');
|
|
59
|
+
scp.src = iobrokerWebRootUrl + "mywebui.0.widgets/importmap.js";
|
|
60
|
+
scp.onload = resolve;
|
|
61
|
+
scp.onerror = resolve; // file may not exist (no widgets installed)
|
|
62
|
+
document.head.appendChild(scp);
|
|
63
|
+
});
|
|
60
64
|
|
|
61
65
|
await importShim('./dist/frontend/runtime/init.js');
|
|
62
66
|
importShim('./dist/frontend/runtime/controls.js');
|