mol_jsx_lib 0.0.63 → 0.0.64

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.js CHANGED
@@ -1044,6 +1044,19 @@ var $;
1044
1044
  ;
1045
1045
  "use strict";
1046
1046
  var $;
1047
+ (function ($) {
1048
+ function $mol_const(value) {
1049
+ var getter = (() => value);
1050
+ getter['()'] = value;
1051
+ getter[Symbol.toStringTag] = value;
1052
+ return getter;
1053
+ }
1054
+ $.$mol_const = $mol_const;
1055
+ })($ || ($ = {}));
1056
+ //mol/const/const.ts
1057
+ ;
1058
+ "use strict";
1059
+ var $;
1047
1060
  (function ($) {
1048
1061
  $['devtoolsFormatters'] = $['devtoolsFormatters'] || [];
1049
1062
  function $mol_dev_format_register(config) {
@@ -1872,6 +1885,40 @@ var $;
1872
1885
  ;
1873
1886
  "use strict";
1874
1887
  var $;
1888
+ (function ($) {
1889
+ function $mol_wire_field(host, field, descr) {
1890
+ if (!descr)
1891
+ descr = Reflect.getOwnPropertyDescriptor(host, field);
1892
+ const _get = descr?.get || $mol_const(descr?.value);
1893
+ const persist = $mol_wire_atom.getter(_get, 0);
1894
+ const _set = descr?.set || function (next) {
1895
+ persist(this, []).put(next);
1896
+ };
1897
+ const sup = Reflect.getPrototypeOf(host);
1898
+ const sup_descr = Reflect.getOwnPropertyDescriptor(sup, field);
1899
+ Object.defineProperty(_get, 'name', { value: sup_descr?.get?.name ?? field });
1900
+ Object.defineProperty(_set, 'name', { value: sup_descr?.set?.name ?? field });
1901
+ function get() {
1902
+ return persist(this, []).sync();
1903
+ }
1904
+ const temp = $mol_wire_task.getter(_set);
1905
+ function set(next) {
1906
+ temp(this, [next]).sync();
1907
+ }
1908
+ Object.defineProperty(get, 'name', { value: _get.name + '$' });
1909
+ Object.defineProperty(set, 'name', { value: _set.name + '@' });
1910
+ Object.assign(get, { orig: _get });
1911
+ Object.assign(set, { orig: _set });
1912
+ const { value, writable, ...descr2 } = { ...descr, get, set };
1913
+ Reflect.defineProperty(host, field, descr2);
1914
+ return descr2;
1915
+ }
1916
+ $.$mol_wire_field = $mol_wire_field;
1917
+ })($ || ($ = {}));
1918
+ //mol/wire/field/field.ts
1919
+ ;
1920
+ "use strict";
1921
+ var $;
1875
1922
  (function ($) {
1876
1923
  function $mol_wire_mem(keys) {
1877
1924
  const wrap = $mol_wire_mem_func(keys);
@@ -1939,12 +1986,8 @@ var $;
1939
1986
  ownerDocument;
1940
1987
  className;
1941
1988
  get childNodes() {
1942
- return this._kids();
1943
- }
1944
- set childNodes(next) {
1945
- this._kids(next);
1989
+ return [];
1946
1990
  }
1947
- _kids(next = []) { return next; }
1948
1991
  valueOf() {
1949
1992
  const prefix = $mol_jsx_prefix;
1950
1993
  const booked = $mol_jsx_booked;
@@ -1964,13 +2007,10 @@ var $;
1964
2007
  $mol_jsx_document = document;
1965
2008
  }
1966
2009
  }
1967
- render() {
1968
- return $mol_fail(new Error(`render() isn't implemented`));
1969
- }
1970
2010
  }
1971
2011
  __decorate([
1972
- $mol_mem
1973
- ], $mol_jsx_view.prototype, "_kids", null);
2012
+ $mol_wire_field
2013
+ ], $mol_jsx_view.prototype, "childNodes", null);
1974
2014
  __decorate([
1975
2015
  $mol_mem
1976
2016
  ], $mol_jsx_view.prototype, "valueOf", null);
@@ -2080,53 +2120,6 @@ var $;
2080
2120
  ;
2081
2121
  "use strict";
2082
2122
  var $;
2083
- (function ($) {
2084
- function $mol_const(value) {
2085
- var getter = (() => value);
2086
- getter['()'] = value;
2087
- getter[Symbol.toStringTag] = value;
2088
- return getter;
2089
- }
2090
- $.$mol_const = $mol_const;
2091
- })($ || ($ = {}));
2092
- //mol/const/const.ts
2093
- ;
2094
- "use strict";
2095
- var $;
2096
- (function ($) {
2097
- function $mol_wire_field(host, field, descr) {
2098
- if (!descr)
2099
- descr = Reflect.getOwnPropertyDescriptor(host, field);
2100
- const _get = descr?.get || $mol_const(descr?.value);
2101
- const persist = $mol_wire_atom.getter(_get, 0);
2102
- const _set = descr?.set || function (next) {
2103
- persist(this, []).put(next);
2104
- };
2105
- const sup = Reflect.getPrototypeOf(host);
2106
- const sup_descr = Reflect.getOwnPropertyDescriptor(sup, field);
2107
- Object.defineProperty(_get, 'name', { value: sup_descr?.get?.name ?? field });
2108
- Object.defineProperty(_set, 'name', { value: sup_descr?.set?.name ?? field });
2109
- function get() {
2110
- return persist(this, []).sync();
2111
- }
2112
- const temp = $mol_wire_task.getter(_set);
2113
- function set(next) {
2114
- temp(this, [next]).sync();
2115
- }
2116
- Object.defineProperty(get, 'name', { value: _get.name + '$' });
2117
- Object.defineProperty(set, 'name', { value: _set.name + '@' });
2118
- Object.assign(get, { orig: _get });
2119
- Object.assign(set, { orig: _set });
2120
- const { value, writable, ...descr2 } = { ...descr, get, set };
2121
- Reflect.defineProperty(host, field, descr2);
2122
- return descr2;
2123
- }
2124
- $.$mol_wire_field = $mol_wire_field;
2125
- })($ || ($ = {}));
2126
- //mol/wire/field/field.ts
2127
- ;
2128
- "use strict";
2129
- var $;
2130
2123
  (function ($) {
2131
2124
  function $mol_wire_patch(obj) {
2132
2125
  for (const field of Reflect.ownKeys(obj)) {