mol_plot_all 1.2.524 → 1.2.526

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
@@ -97,9 +97,6 @@ var $;
97
97
  //mol/test/test.web.test.ts
98
98
  ;
99
99
  "use strict";
100
- //mol/type/partial/deep/deep.ts
101
- ;
102
- "use strict";
103
100
  //mol/type/error/error.ts
104
101
  ;
105
102
  "use strict";
@@ -109,106 +106,13 @@ var $;
109
106
  //mol/type/assert/assert.test.ts
110
107
  ;
111
108
  "use strict";
112
- //mol/type/equals/equals.ts
113
- ;
114
- "use strict";
115
- //mol/type/equals/equals.test.ts
109
+ //mol/type/partial/deep/deep.ts
116
110
  ;
117
111
  "use strict";
118
112
  //mol/type/partial/deep/deep.test.ts
119
113
  ;
120
114
  "use strict";
121
115
  var $;
122
- (function ($) {
123
- $mol_test({
124
- 'Make empty div'() {
125
- $mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
126
- },
127
- 'Define native field'() {
128
- const dom = $mol_jsx("input", { value: '123' });
129
- $mol_assert_equal(dom.outerHTML, '<input value="123">');
130
- $mol_assert_equal(dom.value, '123');
131
- },
132
- 'Define classes'() {
133
- const dom = $mol_jsx("div", { class: 'foo bar' });
134
- $mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
135
- },
136
- 'Define styles'() {
137
- const dom = $mol_jsx("div", { style: { color: 'red' } });
138
- $mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
139
- },
140
- 'Define dataset'() {
141
- const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
142
- $mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
143
- },
144
- 'Define attributes'() {
145
- const dom = $mol_jsx("div", { lang: "ru", hidden: true });
146
- $mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
147
- },
148
- 'Define child nodes'() {
149
- const dom = $mol_jsx("div", null,
150
- "hello",
151
- $mol_jsx("strong", null, "world"),
152
- "!");
153
- $mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
154
- },
155
- 'Function as component'() {
156
- const Button = (props, target) => {
157
- return $mol_jsx("button", { title: props.hint }, target());
158
- };
159
- const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
160
- $mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
161
- },
162
- 'Nested guid generation'() {
163
- const Foo = () => {
164
- return $mol_jsx("div", null,
165
- $mol_jsx(Bar, { id: "bar" },
166
- $mol_jsx("img", { id: "icon" })));
167
- };
168
- const Bar = (props, icon) => {
169
- return $mol_jsx("span", null,
170
- icon,
171
- $mol_jsx("i", { id: "label" }));
172
- };
173
- const dom = $mol_jsx(Foo, { id: "foo" });
174
- $mol_assert_equal(dom.outerHTML, '<div id="foo" class="Foo"><span id="foo/bar" class="Foo_bar Bar"><img id="foo/icon" class="Foo_icon"><i id="foo/bar/label" class="Foo_bar_label Bar_label"></i></span></div>');
175
- },
176
- 'Fail on non unique ids'() {
177
- const App = () => {
178
- return $mol_jsx("div", null,
179
- $mol_jsx("span", { id: "bar" }),
180
- $mol_jsx("span", { id: "bar" }));
181
- };
182
- $mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
183
- },
184
- 'Owner based guid generationn'() {
185
- const Foo = () => {
186
- return $mol_jsx("div", null,
187
- $mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
188
- };
189
- const Bar = (props) => {
190
- return $mol_jsx("span", null, props.icon());
191
- };
192
- const dom = $mol_jsx(Foo, { id: "app" });
193
- $mol_assert_equal(dom.outerHTML, '<div id="app" class="Foo"><span id="app/middle" class="Foo_middle Bar"><img id="app/icon" class="Foo_icon"></span></div>');
194
- },
195
- 'Fail on same ids from different caller'() {
196
- const Foo = () => {
197
- return $mol_jsx("div", null,
198
- $mol_jsx("img", { id: "icon" }),
199
- $mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
200
- };
201
- const Bar = (props) => {
202
- return $mol_jsx("span", null, props.icon());
203
- };
204
- $mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
205
- },
206
- });
207
- })($ || ($ = {}));
208
- //mol/jsx/jsx.test.tsx
209
- ;
210
- "use strict";
211
- var $;
212
116
  (function ($) {
213
117
  $.$mol_jsx_prefix = '';
214
118
  $.$mol_jsx_crumbs = '';
@@ -330,6 +234,96 @@ var $;
330
234
  ;
331
235
  "use strict";
332
236
  var $;
237
+ (function ($) {
238
+ $mol_test({
239
+ 'Make empty div'() {
240
+ $mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
241
+ },
242
+ 'Define native field'() {
243
+ const dom = $mol_jsx("input", { value: '123' });
244
+ $mol_assert_equal(dom.outerHTML, '<input value="123">');
245
+ $mol_assert_equal(dom.value, '123');
246
+ },
247
+ 'Define classes'() {
248
+ const dom = $mol_jsx("div", { class: 'foo bar' });
249
+ $mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
250
+ },
251
+ 'Define styles'() {
252
+ const dom = $mol_jsx("div", { style: { color: 'red' } });
253
+ $mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
254
+ },
255
+ 'Define dataset'() {
256
+ const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
257
+ $mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
258
+ },
259
+ 'Define attributes'() {
260
+ const dom = $mol_jsx("div", { lang: "ru", hidden: true });
261
+ $mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
262
+ },
263
+ 'Define child nodes'() {
264
+ const dom = $mol_jsx("div", null,
265
+ "hello",
266
+ $mol_jsx("strong", null, "world"),
267
+ "!");
268
+ $mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
269
+ },
270
+ 'Function as component'() {
271
+ const Button = (props, target) => {
272
+ return $mol_jsx("button", { title: props.hint }, target());
273
+ };
274
+ const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
275
+ $mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
276
+ },
277
+ 'Nested guid generation'() {
278
+ const Foo = () => {
279
+ return $mol_jsx("div", null,
280
+ $mol_jsx(Bar, { id: "bar" },
281
+ $mol_jsx("img", { id: "icon" })));
282
+ };
283
+ const Bar = (props, icon) => {
284
+ return $mol_jsx("span", null,
285
+ icon,
286
+ $mol_jsx("i", { id: "label" }));
287
+ };
288
+ const dom = $mol_jsx(Foo, { id: "foo" });
289
+ $mol_assert_equal(dom.outerHTML, '<div id="foo" class="Foo"><span id="foo/bar" class="Foo_bar Bar"><img id="foo/icon" class="Foo_icon"><i id="foo/bar/label" class="Foo_bar_label Bar_label"></i></span></div>');
290
+ },
291
+ 'Fail on non unique ids'() {
292
+ const App = () => {
293
+ return $mol_jsx("div", null,
294
+ $mol_jsx("span", { id: "bar" }),
295
+ $mol_jsx("span", { id: "bar" }));
296
+ };
297
+ $mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
298
+ },
299
+ 'Owner based guid generationn'() {
300
+ const Foo = () => {
301
+ return $mol_jsx("div", null,
302
+ $mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
303
+ };
304
+ const Bar = (props) => {
305
+ return $mol_jsx("span", null, props.icon());
306
+ };
307
+ const dom = $mol_jsx(Foo, { id: "app" });
308
+ $mol_assert_equal(dom.outerHTML, '<div id="app" class="Foo"><span id="app/middle" class="Foo_middle Bar"><img id="app/icon" class="Foo_icon"></span></div>');
309
+ },
310
+ 'Fail on same ids from different caller'() {
311
+ const Foo = () => {
312
+ return $mol_jsx("div", null,
313
+ $mol_jsx("img", { id: "icon" }),
314
+ $mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
315
+ };
316
+ const Bar = (props) => {
317
+ return $mol_jsx("span", null, props.icon());
318
+ };
319
+ $mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
320
+ },
321
+ });
322
+ })($ || ($ = {}));
323
+ //mol/jsx/jsx.test.tsx
324
+ ;
325
+ "use strict";
326
+ var $;
333
327
  (function ($) {
334
328
  $mol_test({
335
329
  'nulls & undefineds'() {
@@ -586,21 +580,13 @@ var $;
586
580
  //mol/log3/log3.ts
587
581
  ;
588
582
  "use strict";
589
- //mol/type/keys/extract/extract.test.ts
583
+ //mol/type/equals/equals.ts
590
584
  ;
591
585
  "use strict";
592
- var $;
593
- (function ($_1) {
594
- $mol_test_mocks.push($ => {
595
- $.$mol_log3_come = () => { };
596
- $.$mol_log3_done = () => { };
597
- $.$mol_log3_fail = () => { };
598
- $.$mol_log3_warn = () => { };
599
- $.$mol_log3_rise = () => { };
600
- $.$mol_log3_area = () => () => { };
601
- });
602
- })($ || ($ = {}));
603
- //mol/log3/log3.test.ts
586
+ //mol/type/equals/equals.test.ts
587
+ ;
588
+ "use strict";
589
+ //mol/type/keys/extract/extract.test.ts
604
590
  ;
605
591
  "use strict";
606
592
  var $;
@@ -633,6 +619,20 @@ var $;
633
619
  ;
634
620
  "use strict";
635
621
  var $;
622
+ (function ($_1) {
623
+ $mol_test_mocks.push($ => {
624
+ $.$mol_log3_come = () => { };
625
+ $.$mol_log3_done = () => { };
626
+ $.$mol_log3_fail = () => { };
627
+ $.$mol_log3_warn = () => { };
628
+ $.$mol_log3_rise = () => { };
629
+ $.$mol_log3_area = () => () => { };
630
+ });
631
+ })($ || ($ = {}));
632
+ //mol/log3/log3.test.ts
633
+ ;
634
+ "use strict";
635
+ var $;
636
636
  (function ($_1) {
637
637
  $mol_test({
638
638
  'FQN of anon function'($) {
@@ -702,61 +702,14 @@ var $;
702
702
  }
703
703
  const proxy = $mol_delegate({}, () => new Foo);
704
704
  $mol_assert_ok(proxy instanceof Foo);
705
- $mol_assert_ok(proxy instanceof $mol_delegate);
706
- },
707
- });
708
- })($ || ($ = {}));
709
- //mol/delegate/delegate.test.ts
710
- ;
711
- "use strict";
712
- //mol/type/writable/writable.test.ts
713
- ;
714
- "use strict";
715
- var $;
716
- (function ($) {
717
- $.$mol_after_mock_queue = [];
718
- function $mol_after_mock_warp() {
719
- const queue = $.$mol_after_mock_queue.splice(0);
720
- for (const task of queue)
721
- task();
722
- }
723
- $.$mol_after_mock_warp = $mol_after_mock_warp;
724
- class $mol_after_mock_commmon extends $mol_object2 {
725
- task;
726
- promise = Promise.resolve();
727
- cancelled = false;
728
- id;
729
- constructor(task) {
730
- super();
731
- this.task = task;
732
- $.$mol_after_mock_queue.push(task);
733
- }
734
- destructor() {
735
- const index = $.$mol_after_mock_queue.indexOf(this.task);
736
- if (index >= 0)
737
- $.$mol_after_mock_queue.splice(index, 1);
738
- }
739
- }
740
- $.$mol_after_mock_commmon = $mol_after_mock_commmon;
741
- class $mol_after_mock_timeout extends $mol_after_mock_commmon {
742
- delay;
743
- constructor(delay, task) {
744
- super(task);
745
- this.delay = delay;
746
- }
747
- }
748
- $.$mol_after_mock_timeout = $mol_after_mock_timeout;
749
- })($ || ($ = {}));
750
- //mol/after/mock/mock.test.ts
751
- ;
752
- "use strict";
753
- var $;
754
- (function ($_1) {
755
- $mol_test_mocks.push($ => {
756
- $.$mol_after_tick = $mol_after_mock_commmon;
705
+ $mol_assert_ok(proxy instanceof $mol_delegate);
706
+ },
757
707
  });
758
708
  })($ || ($ = {}));
759
- //mol/after/tick/tick.test.ts
709
+ //mol/delegate/delegate.test.ts
710
+ ;
711
+ "use strict";
712
+ //mol/type/writable/writable.test.ts
760
713
  ;
761
714
  "use strict";
762
715
  var $;
@@ -837,6 +790,44 @@ var $;
837
790
  ;
838
791
  "use strict";
839
792
  var $;
793
+ (function ($) {
794
+ $.$mol_after_mock_queue = [];
795
+ function $mol_after_mock_warp() {
796
+ const queue = $.$mol_after_mock_queue.splice(0);
797
+ for (const task of queue)
798
+ task();
799
+ }
800
+ $.$mol_after_mock_warp = $mol_after_mock_warp;
801
+ class $mol_after_mock_commmon extends $mol_object2 {
802
+ task;
803
+ promise = Promise.resolve();
804
+ cancelled = false;
805
+ id;
806
+ constructor(task) {
807
+ super();
808
+ this.task = task;
809
+ $.$mol_after_mock_queue.push(task);
810
+ }
811
+ destructor() {
812
+ const index = $.$mol_after_mock_queue.indexOf(this.task);
813
+ if (index >= 0)
814
+ $.$mol_after_mock_queue.splice(index, 1);
815
+ }
816
+ }
817
+ $.$mol_after_mock_commmon = $mol_after_mock_commmon;
818
+ class $mol_after_mock_timeout extends $mol_after_mock_commmon {
819
+ delay;
820
+ constructor(delay, task) {
821
+ super(task);
822
+ this.delay = delay;
823
+ }
824
+ }
825
+ $.$mol_after_mock_timeout = $mol_after_mock_timeout;
826
+ })($ || ($ = {}));
827
+ //mol/after/mock/mock.test.ts
828
+ ;
829
+ "use strict";
830
+ var $;
840
831
  (function ($_1) {
841
832
  $mol_test_mocks.push($ => {
842
833
  $.$mol_after_frame = $mol_after_mock_commmon;
@@ -1635,134 +1626,12 @@ var $;
1635
1626
  ;
1636
1627
  "use strict";
1637
1628
  var $;
1638
- (function ($) {
1639
- $mol_test({
1640
- 'Primitives'() {
1641
- $mol_assert_equal($mol_key(null), 'null');
1642
- $mol_assert_equal($mol_key(false), 'false');
1643
- $mol_assert_equal($mol_key(true), 'true');
1644
- $mol_assert_equal($mol_key(0), '0');
1645
- $mol_assert_equal($mol_key(''), '""');
1646
- },
1647
- 'Array & POJO'() {
1648
- $mol_assert_equal($mol_key([null]), '[null]');
1649
- $mol_assert_equal($mol_key({ foo: 0 }), '{"foo":0}');
1650
- $mol_assert_equal($mol_key({ foo: [false] }), '{"foo":[false]}');
1651
- },
1652
- 'Function'() {
1653
- const func = () => { };
1654
- $mol_assert_equal($mol_key(func), $mol_key(func));
1655
- $mol_assert_unique($mol_key(func), $mol_key(() => { }));
1656
- },
1657
- 'Objects'() {
1658
- class User {
1659
- }
1660
- const jin = new User();
1661
- $mol_assert_equal($mol_key(jin), $mol_key(jin));
1662
- $mol_assert_unique($mol_key(jin), $mol_key(new User()));
1663
- },
1664
- 'Elements'() {
1665
- const foo = $mol_jsx("div", null, "bar");
1666
- $mol_assert_equal($mol_key(foo), $mol_key(foo));
1667
- $mol_assert_unique($mol_key(foo), $mol_key($mol_jsx("div", null, "bar")));
1668
- },
1669
- 'Custom JSON representation'() {
1670
- class User {
1671
- name;
1672
- age;
1673
- constructor(name, age) {
1674
- this.name = name;
1675
- this.age = age;
1676
- }
1677
- toJSON() { return { name: this.name }; }
1678
- }
1679
- $mol_assert_equal($mol_key(new User('jin', 18)), '{"name":"jin"}');
1680
- },
1681
- 'Special native classes'() {
1682
- $mol_assert_equal($mol_key(new Date('xyz')), 'null');
1683
- $mol_assert_equal($mol_key(new Date('2001-01-02T03:04:05.678Z')), '"2001-01-02T03:04:05.678Z"');
1684
- $mol_assert_equal($mol_key(/./), '"/./"');
1685
- $mol_assert_equal($mol_key(/\./gimsu), '"/\\\\./gimsu"');
1686
- },
1629
+ (function ($_1) {
1630
+ $mol_test_mocks.push($ => {
1631
+ $.$mol_after_tick = $mol_after_mock_commmon;
1687
1632
  });
1688
1633
  })($ || ($ = {}));
1689
- //mol/key/key.test.tsx
1690
- ;
1691
- "use strict";
1692
- //mol/type/foot/foot.test.ts
1693
- ;
1694
- "use strict";
1695
- var $;
1696
- (function ($) {
1697
- class $mol_wire_log extends $mol_object2 {
1698
- static watch(task) {
1699
- return task;
1700
- }
1701
- static track(fiber) {
1702
- const prev = $mol_wire_probe(() => this.track(fiber));
1703
- let next;
1704
- try {
1705
- next = fiber.sync();
1706
- }
1707
- finally {
1708
- for (const pub of fiber.pub_list) {
1709
- if (pub instanceof $mol_wire_fiber) {
1710
- this.track(pub);
1711
- }
1712
- }
1713
- }
1714
- if (fiber.host === this)
1715
- return next;
1716
- if ($mol_compare_deep(prev, next)) {
1717
- this.$.$mol_log3_rise({
1718
- message: '💧 Same',
1719
- place: fiber,
1720
- });
1721
- }
1722
- else if (prev !== undefined) {
1723
- this.$.$mol_log3_rise({
1724
- message: '🔥 Next',
1725
- place: fiber,
1726
- prev,
1727
- });
1728
- }
1729
- return next;
1730
- }
1731
- static active() {
1732
- try {
1733
- this.watch()?.();
1734
- }
1735
- catch (error) {
1736
- $mol_fail_log(error);
1737
- }
1738
- finally {
1739
- for (const pub of $mol_wire_auto().pub_list) {
1740
- if (pub instanceof $mol_wire_fiber) {
1741
- this.track(pub);
1742
- }
1743
- }
1744
- }
1745
- }
1746
- }
1747
- __decorate([
1748
- $mol_mem
1749
- ], $mol_wire_log, "watch", null);
1750
- __decorate([
1751
- $mol_mem_key
1752
- ], $mol_wire_log, "track", null);
1753
- __decorate([
1754
- $mol_mem
1755
- ], $mol_wire_log, "active", null);
1756
- $.$mol_wire_log = $mol_wire_log;
1757
- })($ || ($ = {}));
1758
- //mol/wire/log/log.ts
1759
- ;
1760
- "use strict";
1761
- var $;
1762
- (function ($) {
1763
- $mol_wire_log.active();
1764
- })($ || ($ = {}));
1765
- //mol/wire/atom/atom.test.ts
1634
+ //mol/after/tick/tick.test.ts
1766
1635
  ;
1767
1636
  "use strict";
1768
1637
  var $;
@@ -1883,45 +1752,176 @@ var $;
1883
1752
  };
1884
1753
  }
1885
1754
  }
1886
- let Foo = class Foo {
1887
- bar;
1888
- constructor(bar) {
1889
- this.bar = bar;
1890
- }
1891
- };
1892
- Foo = __decorate([
1893
- BarInc.class
1894
- ], Foo);
1895
- $mol_assert_equal(new Foo(2).bar, 3);
1755
+ let Foo = class Foo {
1756
+ bar;
1757
+ constructor(bar) {
1758
+ this.bar = bar;
1759
+ }
1760
+ };
1761
+ Foo = __decorate([
1762
+ BarInc.class
1763
+ ], Foo);
1764
+ $mol_assert_equal(new Foo(2).bar, 3);
1765
+ },
1766
+ });
1767
+ })($ || ($ = {}));
1768
+ //mol/wrapper/wrapper.test.ts
1769
+ ;
1770
+ "use strict";
1771
+ var $;
1772
+ (function ($) {
1773
+ $mol_test({
1774
+ 'memoize field'() {
1775
+ class Foo {
1776
+ static one = 1;
1777
+ static get two() {
1778
+ return ++this.one;
1779
+ }
1780
+ static set two(next) { }
1781
+ }
1782
+ __decorate([
1783
+ $mol_memo.field
1784
+ ], Foo, "two", null);
1785
+ $mol_assert_equal(Foo.two, 2);
1786
+ $mol_assert_equal(Foo.two, 2);
1787
+ Foo.two = 3;
1788
+ $mol_assert_equal(Foo.two, 3);
1789
+ $mol_assert_equal(Foo.two, 3);
1790
+ },
1791
+ });
1792
+ })($ || ($ = {}));
1793
+ //mol/memo/memo.test.ts
1794
+ ;
1795
+ "use strict";
1796
+ var $;
1797
+ (function ($) {
1798
+ $mol_test({
1799
+ 'Primitives'() {
1800
+ $mol_assert_equal($mol_key(null), 'null');
1801
+ $mol_assert_equal($mol_key(false), 'false');
1802
+ $mol_assert_equal($mol_key(true), 'true');
1803
+ $mol_assert_equal($mol_key(0), '0');
1804
+ $mol_assert_equal($mol_key(''), '""');
1805
+ },
1806
+ 'Array & POJO'() {
1807
+ $mol_assert_equal($mol_key([null]), '[null]');
1808
+ $mol_assert_equal($mol_key({ foo: 0 }), '{"foo":0}');
1809
+ $mol_assert_equal($mol_key({ foo: [false] }), '{"foo":[false]}');
1810
+ },
1811
+ 'Function'() {
1812
+ const func = () => { };
1813
+ $mol_assert_equal($mol_key(func), $mol_key(func));
1814
+ $mol_assert_unique($mol_key(func), $mol_key(() => { }));
1815
+ },
1816
+ 'Objects'() {
1817
+ class User {
1818
+ }
1819
+ const jin = new User();
1820
+ $mol_assert_equal($mol_key(jin), $mol_key(jin));
1821
+ $mol_assert_unique($mol_key(jin), $mol_key(new User()));
1822
+ },
1823
+ 'Elements'() {
1824
+ const foo = $mol_jsx("div", null, "bar");
1825
+ $mol_assert_equal($mol_key(foo), $mol_key(foo));
1826
+ $mol_assert_unique($mol_key(foo), $mol_key($mol_jsx("div", null, "bar")));
1827
+ },
1828
+ 'Custom JSON representation'() {
1829
+ class User {
1830
+ name;
1831
+ age;
1832
+ constructor(name, age) {
1833
+ this.name = name;
1834
+ this.age = age;
1835
+ }
1836
+ toJSON() { return { name: this.name }; }
1837
+ }
1838
+ $mol_assert_equal($mol_key(new User('jin', 18)), '{"name":"jin"}');
1839
+ },
1840
+ 'Special native classes'() {
1841
+ $mol_assert_equal($mol_key(new Date('xyz')), 'null');
1842
+ $mol_assert_equal($mol_key(new Date('2001-01-02T03:04:05.678Z')), '"2001-01-02T03:04:05.678Z"');
1843
+ $mol_assert_equal($mol_key(/./), '"/./"');
1844
+ $mol_assert_equal($mol_key(/\./gimsu), '"/\\\\./gimsu"');
1896
1845
  },
1897
1846
  });
1898
1847
  })($ || ($ = {}));
1899
- //mol/wrapper/wrapper.test.ts
1848
+ //mol/key/key.test.tsx
1849
+ ;
1850
+ "use strict";
1851
+ //mol/type/foot/foot.test.ts
1900
1852
  ;
1901
1853
  "use strict";
1902
1854
  var $;
1903
1855
  (function ($) {
1904
- $mol_test({
1905
- 'memoize field'() {
1906
- class Foo {
1907
- static one = 1;
1908
- static get two() {
1909
- return ++this.one;
1856
+ class $mol_wire_log extends $mol_object2 {
1857
+ static watch(task) {
1858
+ return task;
1859
+ }
1860
+ static track(fiber) {
1861
+ const prev = $mol_wire_probe(() => this.track(fiber));
1862
+ let next;
1863
+ try {
1864
+ next = fiber.sync();
1865
+ }
1866
+ finally {
1867
+ for (const pub of fiber.pub_list) {
1868
+ if (pub instanceof $mol_wire_fiber) {
1869
+ this.track(pub);
1870
+ }
1910
1871
  }
1911
- static set two(next) { }
1912
1872
  }
1913
- __decorate([
1914
- $mol_memo.field
1915
- ], Foo, "two", null);
1916
- $mol_assert_equal(Foo.two, 2);
1917
- $mol_assert_equal(Foo.two, 2);
1918
- Foo.two = 3;
1919
- $mol_assert_equal(Foo.two, 3);
1920
- $mol_assert_equal(Foo.two, 3);
1921
- },
1922
- });
1873
+ if (fiber.host === this)
1874
+ return next;
1875
+ if ($mol_compare_deep(prev, next)) {
1876
+ this.$.$mol_log3_rise({
1877
+ message: '💧 Same',
1878
+ place: fiber,
1879
+ });
1880
+ }
1881
+ else if (prev !== undefined) {
1882
+ this.$.$mol_log3_rise({
1883
+ message: '🔥 Next',
1884
+ place: fiber,
1885
+ prev,
1886
+ });
1887
+ }
1888
+ return next;
1889
+ }
1890
+ static active() {
1891
+ try {
1892
+ this.watch()?.();
1893
+ }
1894
+ catch (error) {
1895
+ $mol_fail_log(error);
1896
+ }
1897
+ finally {
1898
+ for (const pub of $mol_wire_auto().pub_list) {
1899
+ if (pub instanceof $mol_wire_fiber) {
1900
+ this.track(pub);
1901
+ }
1902
+ }
1903
+ }
1904
+ }
1905
+ }
1906
+ __decorate([
1907
+ $mol_mem
1908
+ ], $mol_wire_log, "watch", null);
1909
+ __decorate([
1910
+ $mol_mem_key
1911
+ ], $mol_wire_log, "track", null);
1912
+ __decorate([
1913
+ $mol_mem
1914
+ ], $mol_wire_log, "active", null);
1915
+ $.$mol_wire_log = $mol_wire_log;
1923
1916
  })($ || ($ = {}));
1924
- //mol/memo/memo.test.ts
1917
+ //mol/wire/log/log.ts
1918
+ ;
1919
+ "use strict";
1920
+ var $;
1921
+ (function ($) {
1922
+ $mol_wire_log.active();
1923
+ })($ || ($ = {}));
1924
+ //mol/wire/atom/atom.test.ts
1925
1925
  ;
1926
1926
  "use strict";
1927
1927
  var $;
@@ -2047,26 +2047,26 @@ var $;
2047
2047
  "use strict";
2048
2048
  var $;
2049
2049
  (function ($) {
2050
- class $mol_view_tree_test_attributes_super extends $mol_view {
2050
+ class $mol_view_tree_test_simple extends $mol_view {
2051
2051
  some() {
2052
- return {
2053
- a: 0,
2054
- b: 2
2055
- };
2052
+ return 1;
2056
2053
  }
2057
- }
2058
- $.$mol_view_tree_test_attributes_super = $mol_view_tree_test_attributes_super;
2059
- class $mol_view_tree_test_attributes extends $mol_view_tree_test_attributes_super {
2060
- some() {
2061
- return {
2062
- ...super.some(),
2063
- a: 1
2064
- };
2054
+ bool() {
2055
+ return true;
2056
+ }
2057
+ str() {
2058
+ return "test";
2059
+ }
2060
+ arr() {
2061
+ return [];
2062
+ }
2063
+ arr_string() {
2064
+ return [];
2065
2065
  }
2066
2066
  }
2067
- $.$mol_view_tree_test_attributes = $mol_view_tree_test_attributes;
2067
+ $.$mol_view_tree_test_simple = $mol_view_tree_test_simple;
2068
2068
  })($ || ($ = {}));
2069
- //mol/view/tree/test/-view.tree/attributes.test.view.tree.ts
2069
+ //mol/view/tree/test/-view.tree/simple.test.view.tree.ts
2070
2070
  ;
2071
2071
  "use strict";
2072
2072
  var $;
@@ -2097,56 +2097,26 @@ var $;
2097
2097
  "use strict";
2098
2098
  var $;
2099
2099
  (function ($) {
2100
- class $mol_view_tree_test_binding_right extends $mol_view {
2101
- outer_width(v) {
2102
- return this.Test().width(v);
2103
- }
2104
- Test() {
2105
- const obj = new this.$.$mol_view_tree_test_binding_right_test();
2106
- return obj;
2107
- }
2108
- }
2109
- __decorate([
2110
- $mol_mem
2111
- ], $mol_view_tree_test_binding_right.prototype, "Test", null);
2112
- $.$mol_view_tree_test_binding_right = $mol_view_tree_test_binding_right;
2113
- class $mol_view_tree_test_binding_right_test extends $mol_view {
2114
- width(val) {
2115
- if (val !== undefined)
2116
- return val;
2117
- return 0;
2100
+ class $mol_view_tree_test_attributes_super extends $mol_view {
2101
+ some() {
2102
+ return {
2103
+ a: 0,
2104
+ b: 2
2105
+ };
2118
2106
  }
2119
2107
  }
2120
- __decorate([
2121
- $mol_mem
2122
- ], $mol_view_tree_test_binding_right_test.prototype, "width", null);
2123
- $.$mol_view_tree_test_binding_right_test = $mol_view_tree_test_binding_right_test;
2124
- })($ || ($ = {}));
2125
- //mol/view/tree/test/-view.tree/binding_right.test.view.tree.ts
2126
- ;
2127
- "use strict";
2128
- var $;
2129
- (function ($) {
2130
- class $mol_view_tree_test_simple extends $mol_view {
2108
+ $.$mol_view_tree_test_attributes_super = $mol_view_tree_test_attributes_super;
2109
+ class $mol_view_tree_test_attributes extends $mol_view_tree_test_attributes_super {
2131
2110
  some() {
2132
- return 1;
2133
- }
2134
- bool() {
2135
- return true;
2136
- }
2137
- str() {
2138
- return "test";
2139
- }
2140
- arr() {
2141
- return [];
2142
- }
2143
- arr_string() {
2144
- return [];
2111
+ return {
2112
+ ...super.some(),
2113
+ a: 1
2114
+ };
2145
2115
  }
2146
2116
  }
2147
- $.$mol_view_tree_test_simple = $mol_view_tree_test_simple;
2117
+ $.$mol_view_tree_test_attributes = $mol_view_tree_test_attributes;
2148
2118
  })($ || ($ = {}));
2149
- //mol/view/tree/test/-view.tree/simple.test.view.tree.ts
2119
+ //mol/view/tree/test/-view.tree/attributes.test.view.tree.ts
2150
2120
  ;
2151
2121
  "use strict";
2152
2122
  var $;
@@ -2176,6 +2146,36 @@ var $;
2176
2146
  ;
2177
2147
  "use strict";
2178
2148
  var $;
2149
+ (function ($) {
2150
+ class $mol_view_tree_test_binding_right extends $mol_view {
2151
+ outer_width(v) {
2152
+ return this.Test().width(v);
2153
+ }
2154
+ Test() {
2155
+ const obj = new this.$.$mol_view_tree_test_binding_right_test();
2156
+ return obj;
2157
+ }
2158
+ }
2159
+ __decorate([
2160
+ $mol_mem
2161
+ ], $mol_view_tree_test_binding_right.prototype, "Test", null);
2162
+ $.$mol_view_tree_test_binding_right = $mol_view_tree_test_binding_right;
2163
+ class $mol_view_tree_test_binding_right_test extends $mol_view {
2164
+ width(val) {
2165
+ if (val !== undefined)
2166
+ return val;
2167
+ return 0;
2168
+ }
2169
+ }
2170
+ __decorate([
2171
+ $mol_mem
2172
+ ], $mol_view_tree_test_binding_right_test.prototype, "width", null);
2173
+ $.$mol_view_tree_test_binding_right_test = $mol_view_tree_test_binding_right_test;
2174
+ })($ || ($ = {}));
2175
+ //mol/view/tree/test/-view.tree/binding_right.test.view.tree.ts
2176
+ ;
2177
+ "use strict";
2178
+ var $;
2179
2179
  (function ($_1) {
2180
2180
  var $$;
2181
2181
  (function ($$) {
@@ -2690,20 +2690,9 @@ var $;
2690
2690
  "use strict";
2691
2691
  var $;
2692
2692
  (function ($) {
2693
- $mol_test_mocks.push(context => {
2694
- class $mol_state_local_mock extends $mol_state_local {
2695
- static state = {};
2696
- static value(key, next = this.state[key]) {
2697
- return this.state[key] = (next || null);
2698
- }
2699
- }
2700
- __decorate([
2701
- $mol_mem_key
2702
- ], $mol_state_local_mock, "value", null);
2703
- context.$mol_state_local = $mol_state_local_mock;
2704
- });
2693
+ self.addEventListener('storage', event => $.$mol_state_local.changes(event));
2705
2694
  })($ || ($ = {}));
2706
- //mol/state/local/local.mock.test.ts
2695
+ //mol/state/local/local.web.ts
2707
2696
  ;
2708
2697
  "use strict";
2709
2698
  var $;
@@ -2724,9 +2713,20 @@ var $;
2724
2713
  "use strict";
2725
2714
  var $;
2726
2715
  (function ($) {
2727
- self.addEventListener('storage', event => $.$mol_state_local.changes(event));
2716
+ $mol_test_mocks.push(context => {
2717
+ class $mol_state_local_mock extends $mol_state_local {
2718
+ static state = {};
2719
+ static value(key, next = this.state[key]) {
2720
+ return this.state[key] = (next || null);
2721
+ }
2722
+ }
2723
+ __decorate([
2724
+ $mol_mem_key
2725
+ ], $mol_state_local_mock, "value", null);
2726
+ context.$mol_state_local = $mol_state_local_mock;
2727
+ });
2728
2728
  })($ || ($ = {}));
2729
- //mol/state/local/local.web.ts
2729
+ //mol/state/local/local.mock.test.ts
2730
2730
  ;
2731
2731
  "use strict";
2732
2732
  //mol/charset/encoding/encoding.ts