mol_jsx_lib 0.0.925 → 0.0.927
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 +8 -8
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +15 -15
- package/node.js.map +1 -1
- package/node.mjs +15 -15
- package/node.test.js +24 -24
- package/node.test.js.map +1 -1
- package/package.json +3 -3
- package/web.d.ts +17 -17
- package/web.d.ts.map +1 -1
- package/web.deps.json +1 -1
- package/web.js +50 -50
- package/web.js.map +1 -1
- package/web.mjs +50 -50
- package/web.test.js +10 -10
- package/web.test.js.map +1 -1
package/web.mjs
CHANGED
|
@@ -798,41 +798,21 @@ var $;
|
|
|
798
798
|
"use strict";
|
|
799
799
|
var $;
|
|
800
800
|
(function ($) {
|
|
801
|
-
class $
|
|
801
|
+
class $mol_after_timeout extends $mol_object2 {
|
|
802
|
+
delay;
|
|
802
803
|
task;
|
|
803
|
-
|
|
804
|
-
|
|
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
|
-
}
|
|
820
|
-
cancelled = false;
|
|
821
|
-
promise;
|
|
822
|
-
constructor(task) {
|
|
804
|
+
id;
|
|
805
|
+
constructor(delay, task) {
|
|
823
806
|
super();
|
|
807
|
+
this.delay = delay;
|
|
824
808
|
this.task = task;
|
|
825
|
-
this.
|
|
826
|
-
if (this.cancelled)
|
|
827
|
-
return;
|
|
828
|
-
task();
|
|
829
|
-
});
|
|
809
|
+
this.id = setTimeout(task, delay);
|
|
830
810
|
}
|
|
831
811
|
destructor() {
|
|
832
|
-
this.
|
|
812
|
+
clearTimeout(this.id);
|
|
833
813
|
}
|
|
834
814
|
}
|
|
835
|
-
$.$
|
|
815
|
+
$.$mol_after_timeout = $mol_after_timeout;
|
|
836
816
|
})($ || ($ = {}));
|
|
837
817
|
|
|
838
818
|
;
|
|
@@ -860,7 +840,7 @@ var $;
|
|
|
860
840
|
static plan() {
|
|
861
841
|
if (this.plan_task)
|
|
862
842
|
return;
|
|
863
|
-
this.plan_task = new $
|
|
843
|
+
this.plan_task = new $mol_after_timeout(0, () => {
|
|
864
844
|
try {
|
|
865
845
|
this.sync();
|
|
866
846
|
}
|
|
@@ -1134,6 +1114,47 @@ var $;
|
|
|
1134
1114
|
$.$mol_key = $mol_key;
|
|
1135
1115
|
})($ || ($ = {}));
|
|
1136
1116
|
|
|
1117
|
+
;
|
|
1118
|
+
"use strict";
|
|
1119
|
+
var $;
|
|
1120
|
+
(function ($) {
|
|
1121
|
+
class $mol_after_frame extends $mol_object2 {
|
|
1122
|
+
task;
|
|
1123
|
+
static _promise = null;
|
|
1124
|
+
static get promise() {
|
|
1125
|
+
if (this._promise)
|
|
1126
|
+
return this._promise;
|
|
1127
|
+
return this._promise = new Promise(done => {
|
|
1128
|
+
const complete = () => {
|
|
1129
|
+
this._promise = null;
|
|
1130
|
+
done();
|
|
1131
|
+
};
|
|
1132
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
1133
|
+
requestAnimationFrame(complete);
|
|
1134
|
+
}
|
|
1135
|
+
else {
|
|
1136
|
+
setTimeout(complete, 16);
|
|
1137
|
+
}
|
|
1138
|
+
});
|
|
1139
|
+
}
|
|
1140
|
+
cancelled = false;
|
|
1141
|
+
promise;
|
|
1142
|
+
constructor(task) {
|
|
1143
|
+
super();
|
|
1144
|
+
this.task = task;
|
|
1145
|
+
this.promise = $mol_after_frame.promise.then(() => {
|
|
1146
|
+
if (this.cancelled)
|
|
1147
|
+
return;
|
|
1148
|
+
task();
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
destructor() {
|
|
1152
|
+
this.cancelled = true;
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
$.$mol_after_frame = $mol_after_frame;
|
|
1156
|
+
})($ || ($ = {}));
|
|
1157
|
+
|
|
1137
1158
|
;
|
|
1138
1159
|
"use strict";
|
|
1139
1160
|
var $;
|
|
@@ -1899,27 +1920,6 @@ var $;
|
|
|
1899
1920
|
$_1.$mol_object = $mol_object;
|
|
1900
1921
|
})($ || ($ = {}));
|
|
1901
1922
|
|
|
1902
|
-
;
|
|
1903
|
-
"use strict";
|
|
1904
|
-
var $;
|
|
1905
|
-
(function ($) {
|
|
1906
|
-
class $mol_after_timeout extends $mol_object2 {
|
|
1907
|
-
delay;
|
|
1908
|
-
task;
|
|
1909
|
-
id;
|
|
1910
|
-
constructor(delay, task) {
|
|
1911
|
-
super();
|
|
1912
|
-
this.delay = delay;
|
|
1913
|
-
this.task = task;
|
|
1914
|
-
this.id = setTimeout(task, delay);
|
|
1915
|
-
}
|
|
1916
|
-
destructor() {
|
|
1917
|
-
clearTimeout(this.id);
|
|
1918
|
-
}
|
|
1919
|
-
}
|
|
1920
|
-
$.$mol_after_timeout = $mol_after_timeout;
|
|
1921
|
-
})($ || ($ = {}));
|
|
1922
|
-
|
|
1923
1923
|
;
|
|
1924
1924
|
"use strict";
|
|
1925
1925
|
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_timeout = $mol_after_mock_timeout;
|
|
569
569
|
});
|
|
570
570
|
})($ || ($ = {}));
|
|
571
571
|
|
|
@@ -712,6 +712,15 @@ 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
|
+
|
|
715
724
|
;
|
|
716
725
|
"use strict";
|
|
717
726
|
var $;
|
|
@@ -1124,15 +1133,6 @@ var $;
|
|
|
1124
1133
|
$mol_test_mocks.push($ => $.$mol_fail_log = () => false);
|
|
1125
1134
|
})($ || ($ = {}));
|
|
1126
1135
|
|
|
1127
|
-
;
|
|
1128
|
-
"use strict";
|
|
1129
|
-
var $;
|
|
1130
|
-
(function ($_1) {
|
|
1131
|
-
$mol_test_mocks.push($ => {
|
|
1132
|
-
$.$mol_after_timeout = $mol_after_mock_timeout;
|
|
1133
|
-
});
|
|
1134
|
-
})($ || ($ = {}));
|
|
1135
|
-
|
|
1136
1136
|
;
|
|
1137
1137
|
"use strict";
|
|
1138
1138
|
var $;
|