mol_plot_all 1.2.244 → 1.2.247

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,6 +686,78 @@ 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 $;
689
761
  (function ($_1) {
690
762
  $mol_test({
691
763
  async 'Latest Calls Wins on Concurrency'($) {
@@ -707,6 +779,15 @@ var $;
707
779
  $mol_assert_like(NameLogger.first, ['john', 'jin']);
708
780
  $mol_assert_like(NameLogger.last, ['jin']);
709
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
+ },
710
791
  });
711
792
  })($ || ($ = {}));
712
793
  //mol/wire/async/async.test.ts
@@ -862,73 +943,6 @@ var $;
862
943
  ;
863
944
  "use strict";
864
945
  var $;
865
- (function ($) {
866
- function $mol_wire_sync(obj) {
867
- return new Proxy(obj, {
868
- get(obj, field) {
869
- const val = obj[field];
870
- if (typeof val !== 'function')
871
- return val;
872
- const temp = $mol_wire_task.getter(val);
873
- return function $mol_wire_sync(...args) {
874
- const fiber = temp(obj, args);
875
- return fiber.sync();
876
- };
877
- }
878
- });
879
- }
880
- $.$mol_wire_sync = $mol_wire_sync;
881
- })($ || ($ = {}));
882
- //mol/wire/sync/sync.ts
883
- ;
884
- "use strict";
885
- var $;
886
- (function ($) {
887
- function $mol_promise() {
888
- let done;
889
- let fail;
890
- const promise = new Promise((d, f) => {
891
- done = d;
892
- fail = f;
893
- });
894
- return Object.assign(promise, {
895
- done,
896
- fail,
897
- });
898
- }
899
- $.$mol_promise = $mol_promise;
900
- })($ || ($ = {}));
901
- //mol/promise/promise.ts
902
- ;
903
- "use strict";
904
- var $;
905
- (function ($_1) {
906
- $mol_test_mocks.push($ => {
907
- $.$mol_after_timeout = $mol_after_mock_timeout;
908
- });
909
- })($ || ($ = {}));
910
- //mol/after/timeout/timeout.test.ts
911
- ;
912
- "use strict";
913
- var $;
914
- (function ($) {
915
- function $mol_wait_timeout_async(timeout) {
916
- const promise = $mol_promise();
917
- const task = new this.$mol_after_timeout(timeout, () => promise.done());
918
- return Object.assign(promise, {
919
- destructor: () => task.destructor()
920
- });
921
- }
922
- $.$mol_wait_timeout_async = $mol_wait_timeout_async;
923
- function $mol_wait_timeout(timeout) {
924
- return this.$mol_wire_sync(this).$mol_wait_timeout_async(timeout);
925
- }
926
- $.$mol_wait_timeout = $mol_wait_timeout;
927
- })($ || ($ = {}));
928
- //mol/wait/timeout/timeout.ts
929
- ;
930
- "use strict";
931
- var $;
932
946
  (function ($_1) {
933
947
  $mol_test({
934
948
  'Cached channel'($) {
@@ -1677,33 +1691,6 @@ var $;
1677
1691
  ;
1678
1692
  "use strict";
1679
1693
  var $;
1680
- (function ($) {
1681
- $mol_test({
1682
- 'const returns stored value'() {
1683
- const foo = { bar: $mol_const(Math.random()) };
1684
- $mol_assert_equal(foo.bar(), foo.bar());
1685
- $mol_assert_equal(foo.bar(), foo.bar['()']);
1686
- },
1687
- });
1688
- })($ || ($ = {}));
1689
- //mol/const/const.test.ts
1690
- ;
1691
- "use strict";
1692
- var $;
1693
- (function ($_1) {
1694
- $mol_test({
1695
- 'FQN of anon function'($) {
1696
- const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
1697
- $mol_assert_equal($$.$mol_func_name_test.name, '');
1698
- $mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
1699
- $mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
1700
- },
1701
- });
1702
- })($ || ($ = {}));
1703
- //mol/func/name/name.test.ts
1704
- ;
1705
- "use strict";
1706
- var $;
1707
1694
  (function ($) {
1708
1695
  class $mol_wire_log extends $mol_object2 {
1709
1696
  static watch(task) {
@@ -1820,6 +1807,33 @@ var $;
1820
1807
  ;
1821
1808
  "use strict";
1822
1809
  var $;
1810
+ (function ($) {
1811
+ $mol_test({
1812
+ 'const returns stored value'() {
1813
+ const foo = { bar: $mol_const(Math.random()) };
1814
+ $mol_assert_equal(foo.bar(), foo.bar());
1815
+ $mol_assert_equal(foo.bar(), foo.bar['()']);
1816
+ },
1817
+ });
1818
+ })($ || ($ = {}));
1819
+ //mol/const/const.test.ts
1820
+ ;
1821
+ "use strict";
1822
+ var $;
1823
+ (function ($_1) {
1824
+ $mol_test({
1825
+ 'FQN of anon function'($) {
1826
+ const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
1827
+ $mol_assert_equal($$.$mol_func_name_test.name, '');
1828
+ $mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
1829
+ $mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
1830
+ },
1831
+ });
1832
+ })($ || ($ = {}));
1833
+ //mol/func/name/name.test.ts
1834
+ ;
1835
+ "use strict";
1836
+ var $;
1823
1837
  (function ($_1) {
1824
1838
  $mol_test({
1825
1839
  'id auto generation'($) {
@@ -2611,13 +2625,6 @@ var $;
2611
2625
  //mol/state/local/local.web.ts
2612
2626
  ;
2613
2627
  "use strict";
2614
- //node/node.ts
2615
- ;
2616
- "use strict";
2617
- var $node = $node || {};
2618
- //node/node.web.ts
2619
- ;
2620
- "use strict";
2621
2628
  var $;
2622
2629
  (function ($) {
2623
2630
  $mol_test({
@@ -2638,7 +2645,6 @@ var $;
2638
2645
  "use strict";
2639
2646
  var $;
2640
2647
  (function ($) {
2641
- const TextDecoder = globalThis.TextDecoder ?? $node.util.TextDecoder;
2642
2648
  function $mol_charset_decode(value, code = 'utf8') {
2643
2649
  return new TextDecoder(code).decode(value);
2644
2650
  }
@@ -2647,6 +2653,13 @@ var $;
2647
2653
  //mol/charset/decode/decode.ts
2648
2654
  ;
2649
2655
  "use strict";
2656
+ //node/node.ts
2657
+ ;
2658
+ "use strict";
2659
+ var $node = $node || {};
2660
+ //node/node.web.ts
2661
+ ;
2662
+ "use strict";
2650
2663
  var $;
2651
2664
  (function ($) {
2652
2665
  $mol_test({