mol_jsx_lib 0.0.166 → 0.0.167

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
@@ -2172,6 +2172,74 @@ var $;
2172
2172
  ;
2173
2173
  "use strict";
2174
2174
  var $;
2175
+ (function ($_1) {
2176
+ let $$;
2177
+ (function ($$) {
2178
+ let $;
2179
+ })($$ = $_1.$$ || ($_1.$$ = {}));
2180
+ $_1.$mol_object_field = Symbol('$mol_object_field');
2181
+ class $mol_object extends $mol_object2 {
2182
+ static make(config) {
2183
+ return super.create(obj => {
2184
+ for (let key in config)
2185
+ obj[key] = config[key];
2186
+ });
2187
+ }
2188
+ }
2189
+ $_1.$mol_object = $mol_object;
2190
+ })($ || ($ = {}));
2191
+ //mol/object/object.ts
2192
+ ;
2193
+ "use strict";
2194
+ var $;
2195
+ (function ($) {
2196
+ class $mol_state_time extends $mol_object {
2197
+ static task(precision, reset) {
2198
+ if (precision) {
2199
+ return new $mol_after_timeout(precision, () => this.task(precision, null));
2200
+ }
2201
+ else {
2202
+ return new $mol_after_frame(() => this.task(precision, null));
2203
+ }
2204
+ }
2205
+ static now(precision) {
2206
+ this.task(precision);
2207
+ return Date.now();
2208
+ }
2209
+ }
2210
+ __decorate([
2211
+ $mol_mem_key
2212
+ ], $mol_state_time, "task", null);
2213
+ __decorate([
2214
+ $mol_mem_key
2215
+ ], $mol_state_time, "now", null);
2216
+ $.$mol_state_time = $mol_state_time;
2217
+ })($ || ($ = {}));
2218
+ //mol/state/time/time.ts
2219
+ ;
2220
+ "use strict";
2221
+ var $;
2222
+ (function ($) {
2223
+ function $mol_wire_easing(next) {
2224
+ const atom = $mol_wire_auto();
2225
+ if (!(atom instanceof $mol_wire_atom))
2226
+ $mol_fail(new Error('Allowed only inside atom'));
2227
+ const prev = atom.result() ?? next;
2228
+ if (typeof prev !== 'number')
2229
+ return next;
2230
+ const current = (prev * 2 + next) / 3;
2231
+ const diff = Math.abs(current - next);
2232
+ if (diff < 1)
2233
+ return next;
2234
+ $mol_state_time.now(0);
2235
+ return current;
2236
+ }
2237
+ $.$mol_wire_easing = $mol_wire_easing;
2238
+ })($ || ($ = {}));
2239
+ //mol/wire/easing/easing.ts
2240
+ ;
2241
+ "use strict";
2242
+ var $;
2175
2243
  (function ($) {
2176
2244
  function $mol_wire_patch(obj) {
2177
2245
  for (const field of Reflect.ownKeys(obj)) {