mol_jsx_lib 0.0.923 → 0.0.925
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
|
@@ -798,14 +798,31 @@ var $;
|
|
|
798
798
|
"use strict";
|
|
799
799
|
var $;
|
|
800
800
|
(function ($) {
|
|
801
|
-
class $
|
|
801
|
+
class $mol_after_frame extends $mol_object2 {
|
|
802
802
|
task;
|
|
803
|
-
|
|
803
|
+
static _promise = null;
|
|
804
|
+
static get promise() {
|
|
805
|
+
if (this._promise)
|
|
806
|
+
return this._promise;
|
|
807
|
+
return this._promise = new Promise(done => {
|
|
808
|
+
const complete = () => {
|
|
809
|
+
this._promise = null;
|
|
810
|
+
done();
|
|
811
|
+
};
|
|
812
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
813
|
+
requestAnimationFrame(complete);
|
|
814
|
+
}
|
|
815
|
+
else {
|
|
816
|
+
setTimeout(complete, 16);
|
|
817
|
+
}
|
|
818
|
+
});
|
|
819
|
+
}
|
|
804
820
|
cancelled = false;
|
|
821
|
+
promise;
|
|
805
822
|
constructor(task) {
|
|
806
823
|
super();
|
|
807
824
|
this.task = task;
|
|
808
|
-
this.promise =
|
|
825
|
+
this.promise = $mol_after_frame.promise.then(() => {
|
|
809
826
|
if (this.cancelled)
|
|
810
827
|
return;
|
|
811
828
|
task();
|
|
@@ -815,7 +832,7 @@ var $;
|
|
|
815
832
|
this.cancelled = true;
|
|
816
833
|
}
|
|
817
834
|
}
|
|
818
|
-
$.$
|
|
835
|
+
$.$mol_after_frame = $mol_after_frame;
|
|
819
836
|
})($ || ($ = {}));
|
|
820
837
|
|
|
821
838
|
;
|
|
@@ -843,7 +860,7 @@ var $;
|
|
|
843
860
|
static plan() {
|
|
844
861
|
if (this.plan_task)
|
|
845
862
|
return;
|
|
846
|
-
this.plan_task = new $
|
|
863
|
+
this.plan_task = new $mol_after_frame(() => {
|
|
847
864
|
try {
|
|
848
865
|
this.sync();
|
|
849
866
|
}
|
|
@@ -1117,47 +1134,6 @@ var $;
|
|
|
1117
1134
|
$.$mol_key = $mol_key;
|
|
1118
1135
|
})($ || ($ = {}));
|
|
1119
1136
|
|
|
1120
|
-
;
|
|
1121
|
-
"use strict";
|
|
1122
|
-
var $;
|
|
1123
|
-
(function ($) {
|
|
1124
|
-
class $mol_after_frame extends $mol_object2 {
|
|
1125
|
-
task;
|
|
1126
|
-
static _promise = null;
|
|
1127
|
-
static get promise() {
|
|
1128
|
-
if (this._promise)
|
|
1129
|
-
return this._promise;
|
|
1130
|
-
return this._promise = new Promise(done => {
|
|
1131
|
-
const complete = () => {
|
|
1132
|
-
this._promise = null;
|
|
1133
|
-
done();
|
|
1134
|
-
};
|
|
1135
|
-
if (typeof requestAnimationFrame === 'function') {
|
|
1136
|
-
requestAnimationFrame(complete);
|
|
1137
|
-
}
|
|
1138
|
-
else {
|
|
1139
|
-
setTimeout(complete, 16);
|
|
1140
|
-
}
|
|
1141
|
-
});
|
|
1142
|
-
}
|
|
1143
|
-
cancelled = false;
|
|
1144
|
-
promise;
|
|
1145
|
-
constructor(task) {
|
|
1146
|
-
super();
|
|
1147
|
-
this.task = task;
|
|
1148
|
-
this.promise = $mol_after_frame.promise.then(() => {
|
|
1149
|
-
if (this.cancelled)
|
|
1150
|
-
return;
|
|
1151
|
-
task();
|
|
1152
|
-
});
|
|
1153
|
-
}
|
|
1154
|
-
destructor() {
|
|
1155
|
-
this.cancelled = true;
|
|
1156
|
-
}
|
|
1157
|
-
}
|
|
1158
|
-
$.$mol_after_frame = $mol_after_frame;
|
|
1159
|
-
})($ || ($ = {}));
|
|
1160
|
-
|
|
1161
1137
|
;
|
|
1162
1138
|
"use strict";
|
|
1163
1139
|
var $;
|
package/web.test.js
CHANGED
|
@@ -565,7 +565,7 @@ var $;
|
|
|
565
565
|
var $;
|
|
566
566
|
(function ($_1) {
|
|
567
567
|
$mol_test_mocks.push($ => {
|
|
568
|
-
$.$
|
|
568
|
+
$.$mol_after_frame = $mol_after_mock_commmon;
|
|
569
569
|
});
|
|
570
570
|
})($ || ($ = {}));
|
|
571
571
|
|
|
@@ -712,15 +712,6 @@ var $;
|
|
|
712
712
|
});
|
|
713
713
|
})($ || ($ = {}));
|
|
714
714
|
|
|
715
|
-
;
|
|
716
|
-
"use strict";
|
|
717
|
-
var $;
|
|
718
|
-
(function ($_1) {
|
|
719
|
-
$mol_test_mocks.push($ => {
|
|
720
|
-
$.$mol_after_frame = $mol_after_mock_commmon;
|
|
721
|
-
});
|
|
722
|
-
})($ || ($ = {}));
|
|
723
|
-
|
|
724
715
|
;
|
|
725
716
|
"use strict";
|
|
726
717
|
var $;
|