mol_plot_all 1.2.263 → 1.2.264
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 +35 -41
- package/node.deps.json +1 -1
- package/node.esm.js +106 -61
- package/node.esm.js.map +1 -1
- package/node.js +106 -61
- package/node.js.map +1 -1
- package/node.test.js +202 -169
- package/node.test.js.map +1 -1
- package/package.json +6 -2
- package/web.d.ts +35 -41
- package/web.deps.json +1 -1
- package/web.esm.js +106 -61
- package/web.esm.js.map +1 -1
- package/web.js +106 -61
- package/web.js.map +1 -1
- package/web.test.js +97 -109
- package/web.test.js.map +1 -1
package/node.test.js
CHANGED
|
@@ -903,6 +903,27 @@ var $;
|
|
|
903
903
|
;
|
|
904
904
|
"use strict";
|
|
905
905
|
var $;
|
|
906
|
+
(function ($) {
|
|
907
|
+
$mol_style_attach("mol/gap/gap.css", ":root {\n\t--mol_gap_block: .75rem;\n\t--mol_gap_text: .5rem .75rem;\n\t--mol_gap_round: .25rem;\n\t--mol_gap_space: .25rem;\n\t--mol_gap_blur: .5rem;\n}\n");
|
|
908
|
+
})($ || ($ = {}));
|
|
909
|
+
//mol/gap/-css/gap.css.ts
|
|
910
|
+
;
|
|
911
|
+
"use strict";
|
|
912
|
+
var $;
|
|
913
|
+
(function ($) {
|
|
914
|
+
const { vary } = $mol_style_func;
|
|
915
|
+
$.$mol_gap = {
|
|
916
|
+
block: vary('--mol_gap_block'),
|
|
917
|
+
text: vary('--mol_gap_text'),
|
|
918
|
+
round: vary('--mol_gap_round'),
|
|
919
|
+
space: vary('--mol_gap_space'),
|
|
920
|
+
blur: vary('--mol_gap_blur'),
|
|
921
|
+
};
|
|
922
|
+
})($ || ($ = {}));
|
|
923
|
+
//mol/gap/gap.ts
|
|
924
|
+
;
|
|
925
|
+
"use strict";
|
|
926
|
+
var $;
|
|
906
927
|
(function ($_1) {
|
|
907
928
|
let $$;
|
|
908
929
|
(function ($$) {
|
|
@@ -1750,37 +1771,31 @@ var $;
|
|
|
1750
1771
|
var $;
|
|
1751
1772
|
(function ($) {
|
|
1752
1773
|
class $mol_wire_atom extends $mol_wire_fiber {
|
|
1753
|
-
static
|
|
1774
|
+
static solo(host, task) {
|
|
1754
1775
|
const field = task.name + '()';
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
return
|
|
1771
|
-
};
|
|
1776
|
+
const existen = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
|
|
1777
|
+
if (existen)
|
|
1778
|
+
return existen;
|
|
1779
|
+
const key = `${host?.[Symbol.toStringTag] ?? host}.${field}`;
|
|
1780
|
+
const fiber = new $mol_wire_atom(key, task, host, []);
|
|
1781
|
+
(host ?? task)[field] = fiber;
|
|
1782
|
+
return fiber;
|
|
1783
|
+
}
|
|
1784
|
+
static plex(host, task, key) {
|
|
1785
|
+
const field = task.name + '()';
|
|
1786
|
+
let dict = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
|
|
1787
|
+
const id = `${host?.[Symbol.toStringTag] ?? host}.${task.name}(${$mol_key(key)})`;
|
|
1788
|
+
if (dict) {
|
|
1789
|
+
const existen = dict.get(id);
|
|
1790
|
+
if (existen)
|
|
1791
|
+
return existen;
|
|
1772
1792
|
}
|
|
1773
1793
|
else {
|
|
1774
|
-
|
|
1775
|
-
const existen = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
|
|
1776
|
-
if (existen)
|
|
1777
|
-
return existen;
|
|
1778
|
-
const key = `${host?.[Symbol.toStringTag] ?? host}.${field}`;
|
|
1779
|
-
const fiber = new $mol_wire_atom(key, task, host, args);
|
|
1780
|
-
(host ?? task)[field] = fiber;
|
|
1781
|
-
return fiber;
|
|
1782
|
-
};
|
|
1794
|
+
dict = (host ?? task)[field] = new Map();
|
|
1783
1795
|
}
|
|
1796
|
+
const fiber = new $mol_wire_atom(id, task, host, [key]);
|
|
1797
|
+
dict.set(id, fiber);
|
|
1798
|
+
return fiber;
|
|
1784
1799
|
}
|
|
1785
1800
|
static watching = new Set();
|
|
1786
1801
|
static watch() {
|
|
@@ -1857,33 +1872,64 @@ var $;
|
|
|
1857
1872
|
//mol/wire/atom/atom.ts
|
|
1858
1873
|
;
|
|
1859
1874
|
"use strict";
|
|
1875
|
+
//mol/type/tail/tail.ts
|
|
1876
|
+
;
|
|
1877
|
+
"use strict";
|
|
1860
1878
|
var $;
|
|
1861
1879
|
(function ($) {
|
|
1862
|
-
function $
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1880
|
+
function $mol_wire_solo(host, field, descr) {
|
|
1881
|
+
if (!descr)
|
|
1882
|
+
descr = Reflect.getOwnPropertyDescriptor(host, field);
|
|
1883
|
+
const orig = descr?.value ?? host[field];
|
|
1884
|
+
const sup = Reflect.getPrototypeOf(host);
|
|
1885
|
+
if (typeof sup[field] === 'function') {
|
|
1886
|
+
Object.defineProperty(orig, 'name', { value: sup[field].name });
|
|
1887
|
+
}
|
|
1888
|
+
const descr2 = {
|
|
1889
|
+
...descr,
|
|
1890
|
+
value: function (...args) {
|
|
1891
|
+
let atom = $mol_wire_atom.solo(this, orig);
|
|
1892
|
+
if ((args.length === 0) || (args[0] === undefined)) {
|
|
1893
|
+
if (!$mol_wire_fiber.warm)
|
|
1894
|
+
return atom.result();
|
|
1895
|
+
if ($mol_wire_auto() instanceof $mol_wire_task) {
|
|
1896
|
+
return atom.once();
|
|
1897
|
+
}
|
|
1898
|
+
else {
|
|
1899
|
+
return atom.sync();
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
return atom.resync(args);
|
|
1871
1903
|
}
|
|
1872
|
-
const descr2 = {
|
|
1873
|
-
...descr,
|
|
1874
|
-
value: wrap(orig)
|
|
1875
|
-
};
|
|
1876
|
-
Reflect.defineProperty(host, field, descr2);
|
|
1877
|
-
return descr2;
|
|
1878
1904
|
};
|
|
1905
|
+
Reflect.defineProperty(descr2.value, 'name', { value: orig.name + ' ' });
|
|
1906
|
+
Object.assign(descr2.value, { orig });
|
|
1907
|
+
Reflect.defineProperty(host, field, descr2);
|
|
1908
|
+
return descr2;
|
|
1879
1909
|
}
|
|
1880
|
-
$.$
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1910
|
+
$.$mol_wire_solo = $mol_wire_solo;
|
|
1911
|
+
})($ || ($ = {}));
|
|
1912
|
+
//mol/wire/solo/solo.ts
|
|
1913
|
+
;
|
|
1914
|
+
"use strict";
|
|
1915
|
+
//mol/type/error/error.ts
|
|
1916
|
+
;
|
|
1917
|
+
"use strict";
|
|
1918
|
+
var $;
|
|
1919
|
+
(function ($) {
|
|
1920
|
+
function $mol_wire_plex(host, field, descr) {
|
|
1921
|
+
if (!descr)
|
|
1922
|
+
descr = Reflect.getOwnPropertyDescriptor(host, field);
|
|
1923
|
+
const orig = descr?.value ?? host[field];
|
|
1924
|
+
const sup = Reflect.getPrototypeOf(host);
|
|
1925
|
+
if (typeof sup[field] === 'function') {
|
|
1926
|
+
Object.defineProperty(orig, 'name', { value: sup[field].name });
|
|
1927
|
+
}
|
|
1928
|
+
const descr2 = {
|
|
1929
|
+
...descr,
|
|
1930
|
+
value: function (...args) {
|
|
1931
|
+
let atom = $mol_wire_atom.plex(this, orig, args[0]);
|
|
1932
|
+
if ((args.length === 1) || (args[1] === undefined)) {
|
|
1887
1933
|
if (!$mol_wire_fiber.warm)
|
|
1888
1934
|
return atom.result();
|
|
1889
1935
|
if ($mol_wire_auto() instanceof $mol_wire_task) {
|
|
@@ -1894,23 +1940,22 @@ var $;
|
|
|
1894
1940
|
}
|
|
1895
1941
|
}
|
|
1896
1942
|
return atom.resync(args);
|
|
1897
|
-
}
|
|
1898
|
-
Object.defineProperty(wrapper, 'name', { value: func.name + ' ' });
|
|
1899
|
-
Object.assign(wrapper, { orig: func });
|
|
1900
|
-
return wrapper;
|
|
1943
|
+
}
|
|
1901
1944
|
};
|
|
1945
|
+
Reflect.defineProperty(descr2.value, 'name', { value: orig.name + ' ' });
|
|
1946
|
+
Object.assign(descr2.value, { orig });
|
|
1947
|
+
Reflect.defineProperty(host, field, descr2);
|
|
1948
|
+
return descr2;
|
|
1902
1949
|
}
|
|
1903
|
-
$.$
|
|
1950
|
+
$.$mol_wire_plex = $mol_wire_plex;
|
|
1904
1951
|
})($ || ($ = {}));
|
|
1905
|
-
//mol/wire/
|
|
1952
|
+
//mol/wire/plex/plex.ts
|
|
1906
1953
|
;
|
|
1907
1954
|
"use strict";
|
|
1908
1955
|
var $;
|
|
1909
1956
|
(function ($) {
|
|
1910
|
-
$.$mol_mem = $
|
|
1911
|
-
$.$mol_mem_key = $
|
|
1912
|
-
$.$mol_mem_key2 = $mol_wire_mem(2);
|
|
1913
|
-
$.$mol_mem_key3 = $mol_wire_mem(3);
|
|
1957
|
+
$.$mol_mem = $mol_wire_solo;
|
|
1958
|
+
$.$mol_mem_key = $mol_wire_plex;
|
|
1914
1959
|
})($ || ($ = {}));
|
|
1915
1960
|
//mol/mem/mem.ts
|
|
1916
1961
|
;
|
|
@@ -2265,7 +2310,7 @@ var $;
|
|
|
2265
2310
|
"use strict";
|
|
2266
2311
|
var $;
|
|
2267
2312
|
(function ($) {
|
|
2268
|
-
$mol_style_attach("mol/view/view/view.css", "[mol_view] {\n\ttransition-property: height, width, min-height, min-width, max-width, max-height, transform;\n\ttransition-duration: .2s;\n\ttransition-timing-function: ease-out;\n\t-webkit-appearance: none;\n\tword-break: break-word;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcontain: style;\n}\n\n[mol_view]::selection {\n\tbackground: var(--mol_theme_line);\n}\n\n[mol_view] > * {\n\tword-break: inherit;\n}\n\n[mol_view_root] {\n\tmargin: 0;\n\tpadding: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbox-sizing: border-box;\n\tfont-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n\tfont-size: 1rem;\n\tline-height: 1.5rem;\n\tbackground: var(--mol_theme_back);\n\tcolor: var(--mol_theme_text);\n\tcontain: unset; /** Fixes bg ignoring when applied to body on Chrome */\n\ttab-size: 4;\n}\n\n[mol_view][mol_view_error]:not([mol_view_error=\"Promise\"]) {\n\tbackground-image: repeating-linear-gradient(\n\t\t-45deg,\n\t\t#f92323,\n\t\t#f92323 .5rem,\n\t\t#ff3d3d .5rem,\n\t\t#ff3d3d 1.5rem\n\t);\n\tcolor: black;\n\talign-items: center;\n justify-content: center;\n}\n\n@keyframes mol_view_wait_move {\n\tfrom {\n\t\tbackground-position: 0 0;\n\t}\n\tto {\n\t\tbackground-position: 200vmax 0;\n\t}\n}\n\n@keyframes mol_view_wait_show {\n\tto {\n\t\tbackground-image: repeating-linear-gradient(\n\t\t\t45deg,\n\t\t\thsla( 0 , 0% , 50% , .5 ) 0% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 5% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 45% ,\n\t\t\thsla( 0 , 0% , 50% , .5 ) 50% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 55% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 95% ,\n\t\t\thsla( 0 , 0% , 50% , .5 ) 100%\n\t\t);\n\t\tbackground-size: 200vmax 200vmax;\n\t}\n}\n\n[mol_view][mol_view_error=\"Promise\"] {\n\tanimation: mol_view_wait_show .5s .5s linear forwards , mol_view_wait_move 1s linear infinite;\n\topacity: .75;\n}\n");
|
|
2313
|
+
$mol_style_attach("mol/view/view/view.css", "[mol_view] {\n\ttransition-property: height, width, min-height, min-width, max-width, max-height, transform;\n\ttransition-duration: .2s;\n\ttransition-timing-function: ease-out;\n\t-webkit-appearance: none;\n\tword-break: break-word;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcontain: style;\n\tscrollbar-color: var(--mol_theme_line) transparent;\n\tscrollbar-width: thin;\n}\t\n\n[mol_view]::selection {\n\tbackground: var(--mol_theme_line);\n}\t\n\n[mol_view]::-webkit-scrollbar {\n\twidth: .25rem;\n\theight: .25rem;\n}\n\n[mol_view]::-webkit-scrollbar-corner {\n\tbackground-color: var(--mol_theme_line);\n}\n\n[mol_view]::-webkit-scrollbar-track {\n\tbackground-color: transparent;\n}\n\n[mol_view]::-webkit-scrollbar-thumb {\n\tbackground-color: var(--mol_theme_line);\n\tborder-radius: var(--mol_gap_round);\n}\n\n[mol_view] > * {\n\tword-break: inherit;\n}\n\n[mol_view_root] {\n\tmargin: 0;\n\tpadding: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbox-sizing: border-box;\n\tfont-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n\tfont-size: 1rem;\n\tline-height: 1.5rem;\n\tbackground: var(--mol_theme_back);\n\tcolor: var(--mol_theme_text);\n\tcontain: unset; /** Fixes bg ignoring when applied to body on Chrome */\n\ttab-size: 4;\n}\n\n[mol_view][mol_view_error]:not([mol_view_error=\"Promise\"]) {\n\tbackground-image: repeating-linear-gradient(\n\t\t-45deg,\n\t\t#f92323,\n\t\t#f92323 .5rem,\n\t\t#ff3d3d .5rem,\n\t\t#ff3d3d 1.5rem\n\t);\n\tcolor: black;\n\talign-items: center;\n justify-content: center;\n}\n\n@keyframes mol_view_wait_move {\n\tfrom {\n\t\tbackground-position: 0 0;\n\t}\n\tto {\n\t\tbackground-position: 200vmax 0;\n\t}\n}\n\n@keyframes mol_view_wait_show {\n\tto {\n\t\tbackground-image: repeating-linear-gradient(\n\t\t\t45deg,\n\t\t\thsla( 0 , 0% , 50% , .5 ) 0% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 5% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 45% ,\n\t\t\thsla( 0 , 0% , 50% , .5 ) 50% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 55% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 95% ,\n\t\t\thsla( 0 , 0% , 50% , .5 ) 100%\n\t\t);\n\t\tbackground-size: 200vmax 200vmax;\n\t}\n}\n\n[mol_view][mol_view_error=\"Promise\"] {\n\tanimation: mol_view_wait_show .5s .5s linear forwards , mol_view_wait_move 1s linear infinite;\n\topacity: .75;\n}\n");
|
|
2269
2314
|
})($ || ($ = {}));
|
|
2270
2315
|
//mol/view/view/-css/view.css.ts
|
|
2271
2316
|
;
|
|
@@ -6026,9 +6071,6 @@ var $;
|
|
|
6026
6071
|
//mol/log3/log3.test.ts
|
|
6027
6072
|
;
|
|
6028
6073
|
"use strict";
|
|
6029
|
-
//mol/type/error/error.ts
|
|
6030
|
-
;
|
|
6031
|
-
"use strict";
|
|
6032
6074
|
//mol/type/assert/assert.test.ts
|
|
6033
6075
|
;
|
|
6034
6076
|
"use strict";
|
|
@@ -6940,6 +6982,9 @@ var $;
|
|
|
6940
6982
|
//mol/wire/async/async.test.ts
|
|
6941
6983
|
;
|
|
6942
6984
|
"use strict";
|
|
6985
|
+
//mol/type/tail/tail.test.ts
|
|
6986
|
+
;
|
|
6987
|
+
"use strict";
|
|
6943
6988
|
var $;
|
|
6944
6989
|
(function ($_1) {
|
|
6945
6990
|
$mol_test({
|
|
@@ -6951,7 +6996,7 @@ var $;
|
|
|
6951
6996
|
}
|
|
6952
6997
|
}
|
|
6953
6998
|
__decorate([
|
|
6954
|
-
$
|
|
6999
|
+
$mol_wire_solo
|
|
6955
7000
|
], App, "value", null);
|
|
6956
7001
|
$mol_assert_equal(App.value(), 2);
|
|
6957
7002
|
App.value(2);
|
|
@@ -6965,7 +7010,7 @@ var $;
|
|
|
6965
7010
|
}
|
|
6966
7011
|
}
|
|
6967
7012
|
__decorate([
|
|
6968
|
-
$
|
|
7013
|
+
$mol_wire_solo
|
|
6969
7014
|
], App, "value", null);
|
|
6970
7015
|
$mol_assert_equal(App.value(1), 1);
|
|
6971
7016
|
$mol_assert_equal(App.value(), 1);
|
|
@@ -6978,7 +7023,7 @@ var $;
|
|
|
6978
7023
|
}
|
|
6979
7024
|
}
|
|
6980
7025
|
__decorate([
|
|
6981
|
-
$
|
|
7026
|
+
$mol_wire_solo
|
|
6982
7027
|
], Base, "value", null);
|
|
6983
7028
|
class Middle extends Base {
|
|
6984
7029
|
static value(next) {
|
|
@@ -6986,7 +7031,7 @@ var $;
|
|
|
6986
7031
|
}
|
|
6987
7032
|
}
|
|
6988
7033
|
__decorate([
|
|
6989
|
-
$
|
|
7034
|
+
$mol_wire_solo
|
|
6990
7035
|
], Middle, "value", null);
|
|
6991
7036
|
class App extends Middle {
|
|
6992
7037
|
static value(next) {
|
|
@@ -6994,7 +7039,7 @@ var $;
|
|
|
6994
7039
|
}
|
|
6995
7040
|
}
|
|
6996
7041
|
__decorate([
|
|
6997
|
-
$
|
|
7042
|
+
$mol_wire_solo
|
|
6998
7043
|
], App, "value", null);
|
|
6999
7044
|
$mol_assert_equal(App.value(), 9);
|
|
7000
7045
|
$mol_assert_equal(App.value(5), 21);
|
|
@@ -7014,13 +7059,13 @@ var $;
|
|
|
7014
7059
|
}
|
|
7015
7060
|
}
|
|
7016
7061
|
__decorate([
|
|
7017
|
-
$
|
|
7062
|
+
$mol_wire_solo
|
|
7018
7063
|
], App, "xxx", null);
|
|
7019
7064
|
__decorate([
|
|
7020
|
-
$
|
|
7065
|
+
$mol_wire_solo
|
|
7021
7066
|
], App, "yyy", null);
|
|
7022
7067
|
__decorate([
|
|
7023
|
-
$
|
|
7068
|
+
$mol_wire_solo
|
|
7024
7069
|
], App, "zzz", null);
|
|
7025
7070
|
$mol_assert_equal(App.yyy(), 2);
|
|
7026
7071
|
$mol_assert_equal(App.zzz(), 3);
|
|
@@ -7045,13 +7090,13 @@ var $;
|
|
|
7045
7090
|
}
|
|
7046
7091
|
}
|
|
7047
7092
|
__decorate([
|
|
7048
|
-
$
|
|
7093
|
+
$mol_wire_solo
|
|
7049
7094
|
], App, "xxx", null);
|
|
7050
7095
|
__decorate([
|
|
7051
|
-
$
|
|
7096
|
+
$mol_wire_solo
|
|
7052
7097
|
], App, "yyy", null);
|
|
7053
7098
|
__decorate([
|
|
7054
|
-
$
|
|
7099
|
+
$mol_wire_solo
|
|
7055
7100
|
], App, "zzz", null);
|
|
7056
7101
|
App.zzz();
|
|
7057
7102
|
$mol_assert_like(log, ['zzz', 'yyy', 'xxx']);
|
|
@@ -7073,16 +7118,16 @@ var $;
|
|
|
7073
7118
|
}
|
|
7074
7119
|
}
|
|
7075
7120
|
__decorate([
|
|
7076
|
-
$
|
|
7121
|
+
$mol_wire_solo
|
|
7077
7122
|
], App, "first", null);
|
|
7078
7123
|
__decorate([
|
|
7079
|
-
$
|
|
7124
|
+
$mol_wire_solo
|
|
7080
7125
|
], App, "second", null);
|
|
7081
7126
|
__decorate([
|
|
7082
|
-
$
|
|
7127
|
+
$mol_wire_solo
|
|
7083
7128
|
], App, "condition", null);
|
|
7084
7129
|
__decorate([
|
|
7085
|
-
$
|
|
7130
|
+
$mol_wire_solo
|
|
7086
7131
|
], App, "result", null);
|
|
7087
7132
|
$mol_assert_equal(App.result(), 1);
|
|
7088
7133
|
$mol_assert_equal(App.counter, 1);
|
|
@@ -7105,10 +7150,10 @@ var $;
|
|
|
7105
7150
|
}
|
|
7106
7151
|
}
|
|
7107
7152
|
__decorate([
|
|
7108
|
-
$
|
|
7153
|
+
$mol_wire_solo
|
|
7109
7154
|
], App, "foo", null);
|
|
7110
7155
|
__decorate([
|
|
7111
|
-
$
|
|
7156
|
+
$mol_wire_solo
|
|
7112
7157
|
], App, "bar", null);
|
|
7113
7158
|
$mol_assert_like(App.bar(), { numbs: [1], count: 1 });
|
|
7114
7159
|
App.foo({ numbs: [1] });
|
|
@@ -7130,10 +7175,10 @@ var $;
|
|
|
7130
7175
|
}
|
|
7131
7176
|
}
|
|
7132
7177
|
__decorate([
|
|
7133
|
-
$
|
|
7178
|
+
$mol_wire_solo
|
|
7134
7179
|
], App, "foo", null);
|
|
7135
7180
|
__decorate([
|
|
7136
|
-
$
|
|
7181
|
+
$mol_wire_solo
|
|
7137
7182
|
], App, "bar", null);
|
|
7138
7183
|
__decorate([
|
|
7139
7184
|
$mol_wire_method
|
|
@@ -7156,13 +7201,13 @@ var $;
|
|
|
7156
7201
|
}
|
|
7157
7202
|
}
|
|
7158
7203
|
__decorate([
|
|
7159
|
-
$
|
|
7204
|
+
$mol_wire_solo
|
|
7160
7205
|
], App, "store", null);
|
|
7161
7206
|
__decorate([
|
|
7162
|
-
$
|
|
7207
|
+
$mol_wire_solo
|
|
7163
7208
|
], App, "fast", null);
|
|
7164
7209
|
__decorate([
|
|
7165
|
-
$
|
|
7210
|
+
$mol_wire_solo
|
|
7166
7211
|
], App, "slow", null);
|
|
7167
7212
|
App.fast();
|
|
7168
7213
|
$mol_assert_equal(App.slow(666), 666);
|
|
@@ -7187,13 +7232,13 @@ var $;
|
|
|
7187
7232
|
}
|
|
7188
7233
|
}
|
|
7189
7234
|
__decorate([
|
|
7190
|
-
$
|
|
7235
|
+
$mol_wire_solo
|
|
7191
7236
|
], App, "count", null);
|
|
7192
7237
|
__decorate([
|
|
7193
|
-
$
|
|
7238
|
+
$mol_wire_solo
|
|
7194
7239
|
], App, "count2", null);
|
|
7195
7240
|
__decorate([
|
|
7196
|
-
$
|
|
7241
|
+
$mol_wire_solo
|
|
7197
7242
|
], App, "res", null);
|
|
7198
7243
|
$mol_assert_like(App.res(), 1);
|
|
7199
7244
|
App.count(5);
|
|
@@ -7220,13 +7265,13 @@ var $;
|
|
|
7220
7265
|
}
|
|
7221
7266
|
}
|
|
7222
7267
|
__decorate([
|
|
7223
|
-
$
|
|
7268
|
+
$mol_wire_solo
|
|
7224
7269
|
], App, "checked", null);
|
|
7225
7270
|
__decorate([
|
|
7226
7271
|
$mol_wire_method
|
|
7227
7272
|
], App, "toggle", null);
|
|
7228
7273
|
__decorate([
|
|
7229
|
-
$
|
|
7274
|
+
$mol_wire_solo
|
|
7230
7275
|
], App, "res", null);
|
|
7231
7276
|
__decorate([
|
|
7232
7277
|
$mol_wire_method
|
|
@@ -7248,13 +7293,13 @@ var $;
|
|
|
7248
7293
|
}
|
|
7249
7294
|
}
|
|
7250
7295
|
__decorate([
|
|
7251
|
-
$
|
|
7296
|
+
$mol_wire_solo
|
|
7252
7297
|
], App, "condition", null);
|
|
7253
7298
|
__decorate([
|
|
7254
|
-
$
|
|
7299
|
+
$mol_wire_solo
|
|
7255
7300
|
], App, "broken", null);
|
|
7256
7301
|
__decorate([
|
|
7257
|
-
$
|
|
7302
|
+
$mol_wire_solo
|
|
7258
7303
|
], App, "result", null);
|
|
7259
7304
|
$mol_assert_equal(App.result(), 1);
|
|
7260
7305
|
App.condition(true);
|
|
@@ -7279,10 +7324,10 @@ var $;
|
|
|
7279
7324
|
}
|
|
7280
7325
|
}
|
|
7281
7326
|
__decorate([
|
|
7282
|
-
$
|
|
7327
|
+
$mol_wire_solo
|
|
7283
7328
|
], App, "middle", null);
|
|
7284
7329
|
__decorate([
|
|
7285
|
-
$
|
|
7330
|
+
$mol_wire_solo
|
|
7286
7331
|
], App, "target", null);
|
|
7287
7332
|
__decorate([
|
|
7288
7333
|
$mol_wire_method
|
|
@@ -7308,13 +7353,13 @@ var $;
|
|
|
7308
7353
|
}
|
|
7309
7354
|
}
|
|
7310
7355
|
__decorate([
|
|
7311
|
-
$
|
|
7356
|
+
$mol_wire_solo
|
|
7312
7357
|
], App, "showing", null);
|
|
7313
7358
|
__decorate([
|
|
7314
|
-
$
|
|
7359
|
+
$mol_wire_solo
|
|
7315
7360
|
], App, "details", null);
|
|
7316
7361
|
__decorate([
|
|
7317
|
-
$
|
|
7362
|
+
$mol_wire_solo
|
|
7318
7363
|
], App, "render", null);
|
|
7319
7364
|
const details = App.render();
|
|
7320
7365
|
$mol_assert_ok(details);
|
|
@@ -7350,13 +7395,13 @@ var $;
|
|
|
7350
7395
|
}
|
|
7351
7396
|
}
|
|
7352
7397
|
__decorate([
|
|
7353
|
-
$
|
|
7398
|
+
$mol_wire_solo
|
|
7354
7399
|
], App, "resets", null);
|
|
7355
7400
|
__decorate([
|
|
7356
|
-
$
|
|
7401
|
+
$mol_wire_solo
|
|
7357
7402
|
], App, "value", null);
|
|
7358
7403
|
__decorate([
|
|
7359
|
-
$
|
|
7404
|
+
$mol_wire_solo
|
|
7360
7405
|
], App, "result", null);
|
|
7361
7406
|
__decorate([
|
|
7362
7407
|
$mol_wire_method
|
|
@@ -7366,6 +7411,52 @@ var $;
|
|
|
7366
7411
|
$mol_wire_fiber.sync();
|
|
7367
7412
|
$mol_assert_equal(await $mol_wire_async(App).result(), 1);
|
|
7368
7413
|
},
|
|
7414
|
+
'Owned value has js-path name'() {
|
|
7415
|
+
class App extends $mol_object2 {
|
|
7416
|
+
static title() {
|
|
7417
|
+
return new $mol_object2;
|
|
7418
|
+
}
|
|
7419
|
+
}
|
|
7420
|
+
__decorate([
|
|
7421
|
+
$mol_wire_solo
|
|
7422
|
+
], App, "title", null);
|
|
7423
|
+
$mol_assert_equal(`${App.title()}`, 'App.title()');
|
|
7424
|
+
},
|
|
7425
|
+
'Unsubscribe from temp pubs on complete'($) {
|
|
7426
|
+
class Random extends $mol_object2 {
|
|
7427
|
+
static $ = $;
|
|
7428
|
+
static seed() {
|
|
7429
|
+
return Math.random();
|
|
7430
|
+
}
|
|
7431
|
+
static resets(next) {
|
|
7432
|
+
return Math.random();
|
|
7433
|
+
}
|
|
7434
|
+
static value() {
|
|
7435
|
+
this.resets();
|
|
7436
|
+
return this.seed();
|
|
7437
|
+
}
|
|
7438
|
+
}
|
|
7439
|
+
__decorate([
|
|
7440
|
+
$mol_wire_method
|
|
7441
|
+
], Random, "seed", null);
|
|
7442
|
+
__decorate([
|
|
7443
|
+
$mol_wire_solo
|
|
7444
|
+
], Random, "resets", null);
|
|
7445
|
+
__decorate([
|
|
7446
|
+
$mol_wire_solo
|
|
7447
|
+
], Random, "value", null);
|
|
7448
|
+
const first = Random.value();
|
|
7449
|
+
Random.resets(null);
|
|
7450
|
+
$mol_assert_unique(Random.value(), first);
|
|
7451
|
+
},
|
|
7452
|
+
});
|
|
7453
|
+
})($ || ($ = {}));
|
|
7454
|
+
//mol/wire/solo/solo.test.ts
|
|
7455
|
+
;
|
|
7456
|
+
"use strict";
|
|
7457
|
+
var $;
|
|
7458
|
+
(function ($_1) {
|
|
7459
|
+
$mol_test({
|
|
7369
7460
|
'Memoize by single simple key'($) {
|
|
7370
7461
|
class Team extends $mol_object2 {
|
|
7371
7462
|
static $ = $;
|
|
@@ -7378,18 +7469,13 @@ var $;
|
|
|
7378
7469
|
this.user_name('john'),
|
|
7379
7470
|
];
|
|
7380
7471
|
}
|
|
7381
|
-
static test() {
|
|
7382
|
-
}
|
|
7383
7472
|
}
|
|
7384
7473
|
__decorate([
|
|
7385
|
-
$
|
|
7474
|
+
$mol_wire_plex
|
|
7386
7475
|
], Team, "user_name", null);
|
|
7387
7476
|
__decorate([
|
|
7388
|
-
$
|
|
7477
|
+
$mol_wire_solo
|
|
7389
7478
|
], Team, "user_names", null);
|
|
7390
|
-
__decorate([
|
|
7391
|
-
$mol_wire_method
|
|
7392
|
-
], Team, "test", null);
|
|
7393
7479
|
$mol_assert_like(Team.user_names(), ['jin', 'john']);
|
|
7394
7480
|
Team.user_name('jin', 'JIN');
|
|
7395
7481
|
$mol_assert_like(Team.user_names(), ['JIN', 'john']);
|
|
@@ -7406,26 +7492,7 @@ var $;
|
|
|
7406
7492
|
}
|
|
7407
7493
|
}
|
|
7408
7494
|
__decorate([
|
|
7409
|
-
$
|
|
7410
|
-
], Map, "tile", null);
|
|
7411
|
-
__decorate([
|
|
7412
|
-
$mol_wire_method
|
|
7413
|
-
], Map, "test", null);
|
|
7414
|
-
Map.test();
|
|
7415
|
-
},
|
|
7416
|
-
'Memoize by multiple keys'($) {
|
|
7417
|
-
class Map extends $mol_object2 {
|
|
7418
|
-
static $ = $;
|
|
7419
|
-
static tile(x, y) {
|
|
7420
|
-
return new String(`/tile=${x},${y}`);
|
|
7421
|
-
}
|
|
7422
|
-
static test() {
|
|
7423
|
-
$mol_assert_like(this.tile(0, 1), new String('/tile=0,1'));
|
|
7424
|
-
$mol_assert_equal(this.tile(0, 1), this.tile(0, 1));
|
|
7425
|
-
}
|
|
7426
|
-
}
|
|
7427
|
-
__decorate([
|
|
7428
|
-
$mol_wire_mem(2)
|
|
7495
|
+
$mol_wire_plex
|
|
7429
7496
|
], Map, "tile", null);
|
|
7430
7497
|
__decorate([
|
|
7431
7498
|
$mol_wire_method
|
|
@@ -7434,28 +7501,21 @@ var $;
|
|
|
7434
7501
|
},
|
|
7435
7502
|
'Owned value has js-path name'() {
|
|
7436
7503
|
class App extends $mol_object2 {
|
|
7437
|
-
static title() {
|
|
7438
|
-
return new $mol_object2;
|
|
7439
|
-
}
|
|
7440
7504
|
static like(friend) {
|
|
7441
7505
|
return new $mol_object2;
|
|
7442
7506
|
}
|
|
7443
|
-
static relation(friend, props) {
|
|
7507
|
+
static relation([friend, props]) {
|
|
7444
7508
|
return new $mol_object2;
|
|
7445
7509
|
}
|
|
7446
7510
|
}
|
|
7447
7511
|
__decorate([
|
|
7448
|
-
$
|
|
7449
|
-
], App, "title", null);
|
|
7450
|
-
__decorate([
|
|
7451
|
-
$mol_wire_mem(1)
|
|
7512
|
+
$mol_wire_plex
|
|
7452
7513
|
], App, "like", null);
|
|
7453
7514
|
__decorate([
|
|
7454
|
-
$
|
|
7515
|
+
$mol_wire_plex
|
|
7455
7516
|
], App, "relation", null);
|
|
7456
|
-
$mol_assert_equal(`${App.title()}`, 'App.title()');
|
|
7457
7517
|
$mol_assert_equal(`${App.like(123)}`, 'App.like(123)');
|
|
7458
|
-
$mol_assert_equal(`${App.relation(123, [456])}`, 'App.relation(123,[456])');
|
|
7518
|
+
$mol_assert_equal(`${App.relation([123, [456]])}`, 'App.relation([123,[456]])');
|
|
7459
7519
|
},
|
|
7460
7520
|
'Deep deps'($) {
|
|
7461
7521
|
class Fib extends $mol_object2 {
|
|
@@ -7471,7 +7531,7 @@ var $;
|
|
|
7471
7531
|
}
|
|
7472
7532
|
}
|
|
7473
7533
|
__decorate([
|
|
7474
|
-
$
|
|
7534
|
+
$mol_wire_plex
|
|
7475
7535
|
], Fib, "value", null);
|
|
7476
7536
|
$mol_assert_equal(Fib.value(4), 5);
|
|
7477
7537
|
$mol_assert_equal(Fib.sums, 3);
|
|
@@ -7479,36 +7539,9 @@ var $;
|
|
|
7479
7539
|
$mol_assert_equal(Fib.value(4), 8);
|
|
7480
7540
|
$mol_assert_equal(Fib.sums, 6);
|
|
7481
7541
|
},
|
|
7482
|
-
'Unsubscribe from temp pubs on complete'($) {
|
|
7483
|
-
class Random extends $mol_object2 {
|
|
7484
|
-
static $ = $;
|
|
7485
|
-
static seed() {
|
|
7486
|
-
return Math.random();
|
|
7487
|
-
}
|
|
7488
|
-
static resets(next) {
|
|
7489
|
-
return Math.random();
|
|
7490
|
-
}
|
|
7491
|
-
static value() {
|
|
7492
|
-
this.resets();
|
|
7493
|
-
return this.seed();
|
|
7494
|
-
}
|
|
7495
|
-
}
|
|
7496
|
-
__decorate([
|
|
7497
|
-
$mol_wire_method
|
|
7498
|
-
], Random, "seed", null);
|
|
7499
|
-
__decorate([
|
|
7500
|
-
$mol_wire_mem(0)
|
|
7501
|
-
], Random, "resets", null);
|
|
7502
|
-
__decorate([
|
|
7503
|
-
$mol_wire_mem(0)
|
|
7504
|
-
], Random, "value", null);
|
|
7505
|
-
const first = Random.value();
|
|
7506
|
-
Random.resets(null);
|
|
7507
|
-
$mol_assert_unique(Random.value(), first);
|
|
7508
|
-
},
|
|
7509
7542
|
});
|
|
7510
7543
|
})($ || ($ = {}));
|
|
7511
|
-
//mol/wire/
|
|
7544
|
+
//mol/wire/plex/plex.test.ts
|
|
7512
7545
|
;
|
|
7513
7546
|
"use strict";
|
|
7514
7547
|
var $;
|
|
@@ -7526,7 +7559,7 @@ var $;
|
|
|
7526
7559
|
}
|
|
7527
7560
|
}
|
|
7528
7561
|
__decorate([
|
|
7529
|
-
$
|
|
7562
|
+
$mol_wire_solo
|
|
7530
7563
|
], Cache, "store", null);
|
|
7531
7564
|
$mol_assert_like(Cache.store(), {});
|
|
7532
7565
|
$mol_assert_like(Cache.store({ foo: 666 }), { foo: 666 });
|