mol_wire_lib 1.0.1057 → 1.0.1059
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/node.d.ts +12 -22
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +23 -47
- package/node.js.map +1 -1
- package/node.mjs +23 -47
- package/node.test.js +33 -66
- package/node.test.js.map +1 -1
- package/package.json +3 -4
- package/web.d.ts +5 -15
- package/web.d.ts.map +1 -1
- package/web.deps.json +1 -1
- package/web.js +22 -46
- package/web.js.map +1 -1
- package/web.mjs +22 -46
- package/web.test.js +1 -10
- package/web.test.js.map +1 -1
package/web.mjs
CHANGED
|
@@ -575,14 +575,31 @@ var $;
|
|
|
575
575
|
"use strict";
|
|
576
576
|
var $;
|
|
577
577
|
(function ($) {
|
|
578
|
-
class $
|
|
578
|
+
class $mol_after_frame extends $mol_object2 {
|
|
579
579
|
task;
|
|
580
|
-
|
|
580
|
+
static _promise = null;
|
|
581
|
+
static get promise() {
|
|
582
|
+
if (this._promise)
|
|
583
|
+
return this._promise;
|
|
584
|
+
return this._promise = new Promise(done => {
|
|
585
|
+
const complete = () => {
|
|
586
|
+
this._promise = null;
|
|
587
|
+
done();
|
|
588
|
+
};
|
|
589
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
590
|
+
requestAnimationFrame(complete);
|
|
591
|
+
}
|
|
592
|
+
else {
|
|
593
|
+
setTimeout(complete, 16);
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
}
|
|
581
597
|
cancelled = false;
|
|
598
|
+
promise;
|
|
582
599
|
constructor(task) {
|
|
583
600
|
super();
|
|
584
601
|
this.task = task;
|
|
585
|
-
this.promise =
|
|
602
|
+
this.promise = $mol_after_frame.promise.then(() => {
|
|
586
603
|
if (this.cancelled)
|
|
587
604
|
return;
|
|
588
605
|
task();
|
|
@@ -592,7 +609,7 @@ var $;
|
|
|
592
609
|
this.cancelled = true;
|
|
593
610
|
}
|
|
594
611
|
}
|
|
595
|
-
$.$
|
|
612
|
+
$.$mol_after_frame = $mol_after_frame;
|
|
596
613
|
})($ || ($ = {}));
|
|
597
614
|
|
|
598
615
|
;
|
|
@@ -620,7 +637,7 @@ var $;
|
|
|
620
637
|
static plan() {
|
|
621
638
|
if (this.plan_task)
|
|
622
639
|
return;
|
|
623
|
-
this.plan_task = new $
|
|
640
|
+
this.plan_task = new $mol_after_frame(() => {
|
|
624
641
|
try {
|
|
625
642
|
this.sync();
|
|
626
643
|
}
|
|
@@ -1150,47 +1167,6 @@ var $;
|
|
|
1150
1167
|
$.$mol_key = $mol_key;
|
|
1151
1168
|
})($ || ($ = {}));
|
|
1152
1169
|
|
|
1153
|
-
;
|
|
1154
|
-
"use strict";
|
|
1155
|
-
var $;
|
|
1156
|
-
(function ($) {
|
|
1157
|
-
class $mol_after_frame extends $mol_object2 {
|
|
1158
|
-
task;
|
|
1159
|
-
static _promise = null;
|
|
1160
|
-
static get promise() {
|
|
1161
|
-
if (this._promise)
|
|
1162
|
-
return this._promise;
|
|
1163
|
-
return this._promise = new Promise(done => {
|
|
1164
|
-
const complete = () => {
|
|
1165
|
-
this._promise = null;
|
|
1166
|
-
done();
|
|
1167
|
-
};
|
|
1168
|
-
if (typeof requestAnimationFrame === 'function') {
|
|
1169
|
-
requestAnimationFrame(complete);
|
|
1170
|
-
}
|
|
1171
|
-
else {
|
|
1172
|
-
setTimeout(complete, 16);
|
|
1173
|
-
}
|
|
1174
|
-
});
|
|
1175
|
-
}
|
|
1176
|
-
cancelled = false;
|
|
1177
|
-
promise;
|
|
1178
|
-
constructor(task) {
|
|
1179
|
-
super();
|
|
1180
|
-
this.task = task;
|
|
1181
|
-
this.promise = $mol_after_frame.promise.then(() => {
|
|
1182
|
-
if (this.cancelled)
|
|
1183
|
-
return;
|
|
1184
|
-
task();
|
|
1185
|
-
});
|
|
1186
|
-
}
|
|
1187
|
-
destructor() {
|
|
1188
|
-
this.cancelled = true;
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
$.$mol_after_frame = $mol_after_frame;
|
|
1192
|
-
})($ || ($ = {}));
|
|
1193
|
-
|
|
1194
1170
|
;
|
|
1195
1171
|
"use strict";
|
|
1196
1172
|
var $;
|
package/web.test.js
CHANGED
|
@@ -1115,7 +1115,7 @@ var $;
|
|
|
1115
1115
|
var $;
|
|
1116
1116
|
(function ($_1) {
|
|
1117
1117
|
$mol_test_mocks.push($ => {
|
|
1118
|
-
$.$
|
|
1118
|
+
$.$mol_after_frame = $mol_after_mock_commmon;
|
|
1119
1119
|
});
|
|
1120
1120
|
})($ || ($ = {}));
|
|
1121
1121
|
|
|
@@ -1262,15 +1262,6 @@ var $;
|
|
|
1262
1262
|
});
|
|
1263
1263
|
})($ || ($ = {}));
|
|
1264
1264
|
|
|
1265
|
-
;
|
|
1266
|
-
"use strict";
|
|
1267
|
-
var $;
|
|
1268
|
-
(function ($_1) {
|
|
1269
|
-
$mol_test_mocks.push($ => {
|
|
1270
|
-
$.$mol_after_frame = $mol_after_mock_commmon;
|
|
1271
|
-
});
|
|
1272
|
-
})($ || ($ = {}));
|
|
1273
|
-
|
|
1274
1265
|
;
|
|
1275
1266
|
"use strict";
|
|
1276
1267
|
|