mol_plot_all 1.2.249 → 1.2.252

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/web.test.js CHANGED
@@ -686,114 +686,6 @@ var $;
686
686
  ;
687
687
  "use strict";
688
688
  var $;
689
- (function ($) {
690
- function $mol_promise() {
691
- let done;
692
- let fail;
693
- const promise = new Promise((d, f) => {
694
- done = d;
695
- fail = f;
696
- });
697
- return Object.assign(promise, {
698
- done,
699
- fail,
700
- });
701
- }
702
- $.$mol_promise = $mol_promise;
703
- })($ || ($ = {}));
704
- //mol/promise/promise.ts
705
- ;
706
- "use strict";
707
- var $;
708
- (function ($_1) {
709
- $mol_test_mocks.push($ => {
710
- $.$mol_after_timeout = $mol_after_mock_timeout;
711
- });
712
- })($ || ($ = {}));
713
- //mol/after/timeout/timeout.test.ts
714
- ;
715
- "use strict";
716
- var $;
717
- (function ($) {
718
- function $mol_wire_sync(obj) {
719
- return new Proxy(obj, {
720
- get(obj, field) {
721
- const val = obj[field];
722
- if (typeof val !== 'function')
723
- return val;
724
- const temp = $mol_wire_task.getter(val);
725
- return function $mol_wire_sync(...args) {
726
- const fiber = temp(obj, args);
727
- return fiber.sync();
728
- };
729
- },
730
- apply(obj, self, args) {
731
- const temp = $mol_wire_task.getter(obj);
732
- const fiber = temp(self, args);
733
- return fiber.sync();
734
- },
735
- });
736
- }
737
- $.$mol_wire_sync = $mol_wire_sync;
738
- })($ || ($ = {}));
739
- //mol/wire/sync/sync.ts
740
- ;
741
- "use strict";
742
- var $;
743
- (function ($) {
744
- function $mol_wait_timeout_async(timeout) {
745
- const promise = $mol_promise();
746
- const task = new this.$mol_after_timeout(timeout, () => promise.done());
747
- return Object.assign(promise, {
748
- destructor: () => task.destructor()
749
- });
750
- }
751
- $.$mol_wait_timeout_async = $mol_wait_timeout_async;
752
- function $mol_wait_timeout(timeout) {
753
- return this.$mol_wire_sync(this).$mol_wait_timeout_async(timeout);
754
- }
755
- $.$mol_wait_timeout = $mol_wait_timeout;
756
- })($ || ($ = {}));
757
- //mol/wait/timeout/timeout.ts
758
- ;
759
- "use strict";
760
- var $;
761
- (function ($_1) {
762
- $mol_test({
763
- async 'Latest Calls Wins on Concurrency'($) {
764
- class NameLogger extends $mol_object2 {
765
- static $ = $;
766
- static first = [];
767
- static last = [];
768
- static send(next) {
769
- $mol_wire_sync(this.first).push(next);
770
- this.$.$mol_wait_timeout(0);
771
- this.last.push(next);
772
- }
773
- }
774
- const name = $mol_wire_async(NameLogger).send;
775
- name('john');
776
- const promise = name('jin');
777
- $.$mol_after_mock_warp();
778
- await promise;
779
- $mol_assert_like(NameLogger.first, ['john', 'jin']);
780
- $mol_assert_like(NameLogger.last, ['jin']);
781
- },
782
- async 'Wrap function'($) {
783
- const name = $mol_wire_async(function (name) {
784
- $.$mol_wait_timeout(0);
785
- return name;
786
- });
787
- const promise = name('jin');
788
- $.$mol_after_mock_warp();
789
- $mol_assert_like(await promise, 'jin');
790
- },
791
- });
792
- })($ || ($ = {}));
793
- //mol/wire/async/async.test.ts
794
- ;
795
- "use strict";
796
- var $;
797
689
  (function ($_1) {
798
690
  $mol_test({
799
691
  'Collect deps'() {
@@ -943,6 +835,121 @@ var $;
943
835
  ;
944
836
  "use strict";
945
837
  var $;
838
+ (function ($) {
839
+ function $mol_wire_sync(obj) {
840
+ return new Proxy(obj, {
841
+ get(obj, field) {
842
+ const val = obj[field];
843
+ if (typeof val !== 'function')
844
+ return val;
845
+ const temp = $mol_wire_task.getter(val);
846
+ return function $mol_wire_sync(...args) {
847
+ const fiber = temp(obj, args);
848
+ return fiber.sync();
849
+ };
850
+ },
851
+ apply(obj, self, args) {
852
+ const temp = $mol_wire_task.getter(obj);
853
+ const fiber = temp(self, args);
854
+ return fiber.sync();
855
+ },
856
+ });
857
+ }
858
+ $.$mol_wire_sync = $mol_wire_sync;
859
+ })($ || ($ = {}));
860
+ //mol/wire/sync/sync.ts
861
+ ;
862
+ "use strict";
863
+ var $;
864
+ (function ($) {
865
+ function $mol_promise() {
866
+ let done;
867
+ let fail;
868
+ const promise = new Promise((d, f) => {
869
+ done = d;
870
+ fail = f;
871
+ });
872
+ return Object.assign(promise, {
873
+ done,
874
+ fail,
875
+ });
876
+ }
877
+ $.$mol_promise = $mol_promise;
878
+ })($ || ($ = {}));
879
+ //mol/promise/promise.ts
880
+ ;
881
+ "use strict";
882
+ var $;
883
+ (function ($_1) {
884
+ $mol_test_mocks.push($ => {
885
+ $.$mol_after_timeout = $mol_after_mock_timeout;
886
+ });
887
+ })($ || ($ = {}));
888
+ //mol/after/timeout/timeout.test.ts
889
+ ;
890
+ "use strict";
891
+ var $;
892
+ (function ($) {
893
+ function $mol_wait_timeout_async(timeout) {
894
+ const promise = $mol_promise();
895
+ const task = new this.$mol_after_timeout(timeout, () => promise.done());
896
+ return Object.assign(promise, {
897
+ destructor: () => task.destructor()
898
+ });
899
+ }
900
+ $.$mol_wait_timeout_async = $mol_wait_timeout_async;
901
+ function $mol_wait_timeout(timeout) {
902
+ return this.$mol_wire_sync(this).$mol_wait_timeout_async(timeout);
903
+ }
904
+ $.$mol_wait_timeout = $mol_wait_timeout;
905
+ })($ || ($ = {}));
906
+ //mol/wait/timeout/timeout.ts
907
+ ;
908
+ "use strict";
909
+ var $;
910
+ (function ($_1) {
911
+ $mol_test({
912
+ async 'Latest method calls wins'($) {
913
+ class NameLogger extends $mol_object2 {
914
+ static $ = $;
915
+ static first = [];
916
+ static last = [];
917
+ static send(next) {
918
+ $mol_wire_sync(this.first).push(next);
919
+ this.$.$mol_wait_timeout(0);
920
+ this.last.push(next);
921
+ }
922
+ }
923
+ const name = $mol_wire_async(NameLogger).send;
924
+ name('john');
925
+ const promise = name('jin');
926
+ $.$mol_after_mock_warp();
927
+ await promise;
928
+ $mol_assert_like(NameLogger.first, ['john', 'jin']);
929
+ $mol_assert_like(NameLogger.last, ['jin']);
930
+ },
931
+ async 'Latest function calls wins'($) {
932
+ const first = [];
933
+ const last = [];
934
+ function send_name(next) {
935
+ $mol_wire_sync(first).push(next);
936
+ $.$mol_wait_timeout(0);
937
+ last.push(next);
938
+ }
939
+ const name = $mol_wire_async(send_name);
940
+ name('john');
941
+ const promise = name('jin');
942
+ $.$mol_after_mock_warp();
943
+ await promise;
944
+ $mol_assert_like(first, ['john', 'jin']);
945
+ $mol_assert_like(last, ['jin']);
946
+ },
947
+ });
948
+ })($ || ($ = {}));
949
+ //mol/wire/async/async.test.ts
950
+ ;
951
+ "use strict";
952
+ var $;
946
953
  (function ($_1) {
947
954
  $mol_test({
948
955
  'Cached channel'($) {