mol_wire_dom 0.0.1716 → 0.0.1717

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 CHANGED
@@ -240,6 +240,23 @@ declare namespace $ {
240
240
  function $mol_key<Value>(value: Value): string;
241
241
  }
242
242
 
243
+ declare namespace $ {
244
+ class $mol_after_timeout extends $mol_object2 {
245
+ delay: number;
246
+ task: () => void;
247
+ id: any;
248
+ constructor(delay: number, task: () => void);
249
+ destructor(): void;
250
+ }
251
+ }
252
+
253
+ declare namespace $ {
254
+ class $mol_after_frame extends $mol_after_timeout {
255
+ task: () => void;
256
+ constructor(task: () => void);
257
+ }
258
+ }
259
+
243
260
  declare namespace $ {
244
261
  let $mol_compare_deep_cache: WeakMap<any, WeakMap<any, boolean>>;
245
262
  function $mol_compare_deep<Value>(left: Value, right: Value): boolean;
@@ -266,6 +283,131 @@ declare namespace $ {
266
283
  let $mol_log3_stack: (() => void)[];
267
284
  }
268
285
 
286
+ declare namespace $ {
287
+ class $mol_span extends $mol_object2 {
288
+ readonly uri: string;
289
+ readonly source: string;
290
+ readonly row: number;
291
+ readonly col: number;
292
+ readonly length: number;
293
+ constructor(uri: string, source: string, row: number, col: number, length: number);
294
+ static unknown: $mol_span;
295
+ static begin(uri: string, source?: string): $mol_span;
296
+ static end(uri: string, source: string): $mol_span;
297
+ static entire(uri: string, source: string): $mol_span;
298
+ toString(): string;
299
+ toJSON(): {
300
+ uri: string;
301
+ row: number;
302
+ col: number;
303
+ length: number;
304
+ };
305
+ error(message: string, Class?: ErrorConstructor): Error;
306
+ span(row: number, col: number, length: number): $mol_span;
307
+ after(length?: number): $mol_span;
308
+ slice(begin: number, end?: number): $mol_span;
309
+ }
310
+ }
311
+
312
+ declare namespace $ {
313
+ function $mol_tree2_to_string(this: $, tree: $mol_tree2): string;
314
+ }
315
+
316
+ declare namespace $ {
317
+ function $mol_maybe<Value>(value: Value | null | undefined): Value[];
318
+ }
319
+
320
+ declare namespace $ {
321
+ type $mol_tree2_path = Array<string | number | null>;
322
+ type $mol_tree2_hack<Context> = (input: $mol_tree2, belt: $mol_tree2_belt<Context>, context: Context) => readonly $mol_tree2[];
323
+ type $mol_tree2_belt<Context> = Record<string, $mol_tree2_hack<Context>>;
324
+ class $mol_tree2 extends Object {
325
+ readonly type: string;
326
+ readonly value: string;
327
+ readonly kids: readonly $mol_tree2[];
328
+ readonly span: $mol_span;
329
+ constructor(type: string, value: string, kids: readonly $mol_tree2[], span: $mol_span);
330
+ static list(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
331
+ list(kids: readonly $mol_tree2[]): $mol_tree2;
332
+ static data(value: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
333
+ data(value: string, kids?: readonly $mol_tree2[]): $mol_tree2;
334
+ static struct(type: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
335
+ struct(type: string, kids?: readonly $mol_tree2[]): $mol_tree2;
336
+ clone(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
337
+ text(): string;
338
+ static fromString(str: string, uri?: string): $mol_tree2;
339
+ toString(): string;
340
+ insert(value: $mol_tree2 | null, ...path: $mol_tree2_path): $mol_tree2;
341
+ update(value: readonly $mol_tree2[], ...path: $mol_tree2_path): readonly $mol_tree2[];
342
+ select(...path: $mol_tree2_path): $mol_tree2;
343
+ filter(path: string[], value?: string): $mol_tree2;
344
+ hack_self<Context extends {
345
+ span?: $mol_span;
346
+ [key: string]: unknown;
347
+ } = {}>(belt: $mol_tree2_belt<Context>, context?: Context): readonly $mol_tree2[];
348
+ hack<Context extends {
349
+ span?: $mol_span;
350
+ [key: string]: unknown;
351
+ } = {}>(belt: $mol_tree2_belt<Context>, context?: Context): $mol_tree2[];
352
+ error(message: string, Class?: ErrorConstructor): Error;
353
+ }
354
+ class $mol_tree2_empty extends $mol_tree2 {
355
+ constructor();
356
+ }
357
+ }
358
+
359
+ declare namespace $ {
360
+ class $mol_error_syntax extends SyntaxError {
361
+ reason: string;
362
+ line: string;
363
+ span: $mol_span;
364
+ constructor(reason: string, line: string, span: $mol_span);
365
+ }
366
+ }
367
+
368
+ declare namespace $ {
369
+ function $mol_tree2_from_string(this: $, str: string, uri?: string): $mol_tree2;
370
+ }
371
+
372
+ declare namespace $ {
373
+ function $mol_array_chunks<Item>(array: readonly Item[], rule: number | ((item: Item, index: number) => boolean)): Item[][];
374
+ }
375
+
376
+ declare namespace $ {
377
+ function $mol_tree2_from_json(json: any, span?: $mol_span): $mol_tree2;
378
+ }
379
+
380
+ declare namespace $ {
381
+ class $mol_term_color {
382
+ static reset: (str: string) => string;
383
+ static bold: (str: string) => string;
384
+ static italic: (str: string) => string;
385
+ static underline: (str: string) => string;
386
+ static inverse: (str: string) => string;
387
+ static hidden: (str: string) => string;
388
+ static strike: (str: string) => string;
389
+ static gray: (str: string) => string;
390
+ static red: (str: string) => string;
391
+ static green: (str: string) => string;
392
+ static yellow: (str: string) => string;
393
+ static blue: (str: string) => string;
394
+ static magenta: (str: string) => string;
395
+ static cyan: (str: string) => string;
396
+ static Gray: (str: string) => string;
397
+ static Red: (str: string) => string;
398
+ static Green: (str: string) => string;
399
+ static Yellow: (str: string) => string;
400
+ static Blue: (str: string) => string;
401
+ static Magenta: (str: string) => string;
402
+ static Cyan: (str: string) => string;
403
+ static ansi(open: number, close: number): (str: string) => string;
404
+ }
405
+ }
406
+
407
+ declare namespace $ {
408
+ function $mol_log3_node_make(level: keyof Console, output: 'stdout' | 'stderr', type: string, color: (str: string) => string): (this: $, event: $mol_log3_event<{}>) => () => void;
409
+ }
410
+
269
411
  declare namespace $ {
270
412
  class $mol_wire_task<Host, Args extends readonly unknown[], Result> extends $mol_wire_fiber<Host, Args, Result> {
271
413
  static getter<Host, Args extends readonly unknown[], Result>(task: (this: Host, ...args: Args) => Result): (host: Host, args: Args) => $mol_wire_task<Host, Args, Result>;
@@ -329,6 +471,94 @@ declare namespace $ {
329
471
  var $mol_dom_context: typeof globalThis;
330
472
  }
331
473
 
474
+ declare namespace $ {
475
+ function $node_internal_check(name: string): boolean;
476
+ }
477
+
478
+ declare namespace $ {
479
+ function $node_autoinstall(this: typeof $, name: string): void;
480
+ }
481
+
482
+ interface $node {
483
+ [key: string]: any;
484
+ }
485
+ declare var $node: $node;
486
+
487
+ declare namespace $ {
488
+ class $mol_error_mix<Cause extends {} = {}> extends AggregateError {
489
+ readonly cause: Cause;
490
+ name: string;
491
+ constructor(message: string, cause?: Cause, ...errors: readonly Error[]);
492
+ static [Symbol.toPrimitive](): string;
493
+ static toString(): string;
494
+ static make(...params: ConstructorParameters<typeof $mol_error_mix>): $mol_error_mix<{}>;
495
+ }
496
+ }
497
+
498
+ declare namespace $ {
499
+ namespace $$ { }
500
+ const $mol_object_field: unique symbol;
501
+ class $mol_object extends $mol_object2 {
502
+ static make<This extends typeof $mol_object>(this: This, config: Partial<InstanceType<This>>): InstanceType<This>;
503
+ }
504
+ }
505
+
506
+ declare namespace $ {
507
+ function $mol_env(): Record<string, string | undefined>;
508
+ }
509
+
510
+ declare namespace $ {
511
+ }
512
+
513
+ declare namespace $ {
514
+ export function $mol_wire_sync<Host extends object>(obj: Host): ObjectOrFunctionResultAwaited<Host>;
515
+ type FunctionResultAwaited<Some> = Some extends (...args: infer Args) => infer Res ? (...args: Args) => Awaited<Res> : Some;
516
+ type ConstructorResultAwaited<Some> = Some extends new (...args: infer Args) => infer Res ? new (...args: Args) => Res : {};
517
+ type MethodsResultAwaited<Host extends Object> = {
518
+ [K in keyof Host]: FunctionResultAwaited<Host[K]>;
519
+ };
520
+ type ObjectOrFunctionResultAwaited<Some> = (Some extends (...args: any) => unknown ? FunctionResultAwaited<Some> : {}) & (Some extends Object ? MethodsResultAwaited<Some> & ConstructorResultAwaited<Some> : Some);
521
+ export {};
522
+ }
523
+
524
+ declare namespace $ {
525
+ type $mol_run_error_context = {
526
+ pid?: number;
527
+ stdout: Buffer | string;
528
+ stderr: Buffer | string;
529
+ };
530
+ class $mol_run_error extends $mol_error_mix<{
531
+ timeout_kill?: boolean;
532
+ pid?: number;
533
+ signal?: NodeJS.Signals | null;
534
+ status?: number | null;
535
+ command: string;
536
+ dir: string;
537
+ }> {
538
+ }
539
+ const $mol_run_spawn: (...args: Parameters<(typeof $node)["child_process"]["spawn"]>) => import("node:child_process").ChildProcess;
540
+ const $mol_run_spawn_sync: (...args: Parameters<(typeof $node)["child_process"]["spawnSync"]>) => import("node:child_process").SpawnSyncReturns<string | NonSharedBuffer>;
541
+ type $mol_run_options = {
542
+ command: readonly string[] | string;
543
+ dir: string;
544
+ timeout?: number;
545
+ env?: Record<string, string | undefined>;
546
+ };
547
+ class $mol_run extends $mol_object {
548
+ static async_enabled(): boolean;
549
+ static spawn(options: $mol_run_options): import("node:child_process").SpawnSyncReturns<string | NonSharedBuffer> | $mol_run_error_context;
550
+ static spawn_async({ dir, sync, timeout, command, env }: $mol_run_options & {
551
+ sync?: boolean;
552
+ }): import("node:child_process").SpawnSyncReturns<string | NonSharedBuffer> | (Promise<$mol_run_error_context> & {
553
+ destructor: () => void;
554
+ });
555
+ static error_message(res?: $mol_run_error_context): string;
556
+ }
557
+ }
558
+
559
+ declare namespace $ {
560
+ }
561
+
332
562
  declare namespace $ {
333
563
  var $mol_dom: typeof globalThis;
334
564
  }
package/node.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../mam.d.ts","../../../guid/guid.d.ts","../../../fail/fail.d.ts","../../cursor/cursor.d.ts","../../pub/pub.d.ts","../../sub/sub.d.ts","../../wire.d.ts","../../../fail/hidden/hidden.d.ts","../../../dev/format/format.d.ts","../../pub/sub/sub.d.ts","../../../ambient/ambient.d.ts","../../../delegate/delegate.d.ts","../../../owning/owning.d.ts","../../../type/writable/writable.d.ts","../../../func/name/name.d.ts","../../../key/key.d.ts","../../../object2/object2.d.ts","../../../after/tick/tick.d.ts","../../../promise/like/like.d.ts","../../fiber/fiber.d.ts","../../../key/key/key.d.ts","../../../compare/deep/deep.d.ts","../../../log3/log3.d.ts","../../task/task.d.ts","../../method/method.d.ts","../../../type/tail/tail.d.ts","../../../type/foot/foot.d.ts","../../../fail/catch/catch.d.ts","../../../try/try.d.ts","../../../fail/log/log.d.ts","../../atom/atom.d.ts","../../../dom/context/context.d.ts","../../../dom/dom.d.ts","../../../dom/render/children/children.d.ts","../../patch/patch.d.ts","../dom.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACbA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpBA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACbA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACTA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpCA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjBA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]}
1
+ {"version":3,"sources":["../../../../mam.d.ts","../../../guid/guid.d.ts","../../../fail/fail.d.ts","../../cursor/cursor.d.ts","../../pub/pub.d.ts","../../sub/sub.d.ts","../../wire.d.ts","../../../fail/hidden/hidden.d.ts","../../../dev/format/format.d.ts","../../pub/sub/sub.d.ts","../../../ambient/ambient.d.ts","../../../delegate/delegate.d.ts","../../../owning/owning.d.ts","../../../type/writable/writable.d.ts","../../../func/name/name.d.ts","../../../key/key.d.ts","../../../object2/object2.d.ts","../../../after/tick/tick.d.ts","../../../promise/like/like.d.ts","../../fiber/fiber.d.ts","../../../key/key/key.d.ts","../../../after/timeout/timeout.d.ts","../../../after/frame/frame.node.d.ts","../../../compare/deep/deep.d.ts","../../../log3/log3.d.ts","../../../span/span.d.ts","../../../tree2/to/string/string.d.ts","../../../maybe/maybe.d.ts","../../../tree2/tree2.d.ts","../../../error/syntax/syntax.d.ts","../../../tree2/from/string/string.d.ts","../../../array/chunks/chunks.d.ts","../../../tree2/from/json/json.d.ts","../../../term/color/color.d.ts","../../../log3/log3.node.d.ts","../../task/task.d.ts","../../method/method.d.ts","../../../type/tail/tail.d.ts","../../../type/foot/foot.d.ts","../../../fail/catch/catch.d.ts","../../../try/try.d.ts","../../../fail/log/log.d.ts","../../atom/atom.d.ts","../../../dom/context/context.d.ts","../../../../node/internal/check/check.node.d.ts","../../../../node/autoinstall/autoinstall.node.d.ts","../../../../node/node.node.d.ts","../../../error/mix/mix.d.ts","../../../object/object.d.ts","../../../env/env.d.ts","../../../env/env.node.d.ts","../../sync/sync.d.ts","../../../run/run.node.d.ts","../../../dom/context/context.node.d.ts","../../../dom/dom.d.ts","../../../dom/render/children/children.d.ts","../../patch/patch.d.ts","../dom.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACbA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpBA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACbA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACTA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpCA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;ACNA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzBA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACRA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1BA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjBA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;ACHA;AACA;AACA;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClCA;AACA;AACA;ACFA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mol_wire_dom",
3
- "version": "0.0.1716",
3
+ "version": "0.0.1717",
4
4
  "exports": {
5
5
  "node": {
6
6
  "import": "./node.mjs",
package/web.d.ts CHANGED
@@ -1,3 +1,386 @@
1
+ declare let _$_: {
2
+ new (): {};
3
+ } & typeof globalThis;
4
+ declare class $ extends _$_ {
5
+ }
6
+ declare namespace $ {
7
+ export type $ = typeof $$;
8
+ export class $$ extends $ {
9
+ static $: $;
10
+ }
11
+ namespace $$ {
12
+ type $$ = $;
13
+ }
14
+ export {};
15
+ }
16
+
17
+ declare namespace $ {
18
+ function $mol_guid(length?: number, exists?: (id: string) => boolean): string;
19
+ }
20
+
21
+ declare namespace $ {
22
+ function $mol_fail(error: any): never;
23
+ }
24
+
25
+ declare namespace $ {
26
+ enum $mol_wire_cursor {
27
+ stale = -1,
28
+ doubt = -2,
29
+ fresh = -3,
30
+ final = -4
31
+ }
32
+ }
33
+
34
+ declare namespace $ {
35
+ class $mol_wire_pub extends Object {
36
+ constructor(id?: string);
37
+ [Symbol.toStringTag]: string;
38
+ data: unknown[];
39
+ static get [Symbol.species](): ArrayConstructor;
40
+ protected sub_from: number;
41
+ get sub_list(): readonly $mol_wire_sub[];
42
+ get sub_empty(): boolean;
43
+ sub_on(sub: $mol_wire_pub, pub_pos: number): number;
44
+ sub_off(sub_pos: number): void;
45
+ reap(): void;
46
+ promote(): void;
47
+ fresh(): void;
48
+ complete(): void;
49
+ get incompleted(): boolean;
50
+ emit(quant?: $mol_wire_cursor): void;
51
+ peer_move(from_pos: number, to_pos: number): void;
52
+ peer_repos(peer_pos: number, self_pos: number): void;
53
+ }
54
+ }
55
+
56
+ declare namespace $ {
57
+ interface $mol_wire_sub extends $mol_wire_pub {
58
+ temp: boolean;
59
+ pub_list: $mol_wire_pub[];
60
+ track_on(): $mol_wire_sub | null;
61
+ track_next(pub?: $mol_wire_pub): $mol_wire_pub | null;
62
+ pub_off(pub_pos: number): void;
63
+ track_cut(sub: $mol_wire_pub | null): void;
64
+ track_off(sub: $mol_wire_pub | null): void;
65
+ absorb(quant: $mol_wire_cursor, pos: number): void;
66
+ destructor(): void;
67
+ }
68
+ }
69
+
70
+ declare namespace $ {
71
+ let $mol_wire_auto_sub: $mol_wire_sub | null;
72
+ function $mol_wire_auto(next?: $mol_wire_sub | null): $mol_wire_sub | null;
73
+ const $mol_wire_affected: ($mol_wire_sub | number)[];
74
+ }
75
+
76
+ declare namespace $ {
77
+ function $mol_fail_hidden(error: any): never;
78
+ }
79
+
80
+ declare namespace $ {
81
+ function $mol_dev_format_register(config: {
82
+ header: (val: any, config: any) => any;
83
+ hasBody: (val: any, config: any) => false;
84
+ } | {
85
+ header: (val: any, config: any) => any;
86
+ hasBody: (val: any, config: any) => boolean;
87
+ body: (val: any, config: any) => any;
88
+ }): void;
89
+ const $mol_dev_format_head: unique symbol;
90
+ const $mol_dev_format_body: unique symbol;
91
+ function $mol_dev_format_native(obj: any): any[];
92
+ function $mol_dev_format_auto(obj: any): any[];
93
+ function $mol_dev_format_element(element: string, style: object, ...content: any[]): any[];
94
+ let $mol_dev_format_span: (style: object, ...content: any[]) => any[];
95
+ let $mol_dev_format_div: (style: object, ...content: any[]) => any[];
96
+ let $mol_dev_format_ol: (style: object, ...content: any[]) => any[];
97
+ let $mol_dev_format_li: (style: object, ...content: any[]) => any[];
98
+ let $mol_dev_format_table: (style: object, ...content: any[]) => any[];
99
+ let $mol_dev_format_tr: (style: object, ...content: any[]) => any[];
100
+ let $mol_dev_format_td: (style: object, ...content: any[]) => any[];
101
+ let $mol_dev_format_accent: (...args: any[]) => any[];
102
+ let $mol_dev_format_strong: (...args: any[]) => any[];
103
+ let $mol_dev_format_string: (...args: any[]) => any[];
104
+ let $mol_dev_format_shade: (...args: any[]) => any[];
105
+ let $mol_dev_format_indent: (...args: any[]) => any[];
106
+ }
107
+
108
+ declare namespace $ {
109
+ class $mol_wire_pub_sub extends $mol_wire_pub implements $mol_wire_sub {
110
+ protected pub_from: number;
111
+ protected cursor: $mol_wire_cursor;
112
+ get temp(): boolean;
113
+ get pub_list(): $mol_wire_pub[];
114
+ track_on(): $mol_wire_sub | null;
115
+ promote(): void;
116
+ track_next(pub?: $mol_wire_pub): $mol_wire_pub | null;
117
+ track_off(sub: $mol_wire_sub | null): void;
118
+ pub_off(sub_pos: number): void;
119
+ destructor(): void;
120
+ track_cut(): void;
121
+ complete(): void;
122
+ complete_pubs(): void;
123
+ absorb(quant?: $mol_wire_cursor, pos?: number): void;
124
+ [$mol_dev_format_head](): any[];
125
+ get pub_empty(): boolean;
126
+ }
127
+ }
128
+
129
+ declare namespace $ {
130
+ const $mol_ambient_ref: unique symbol;
131
+ type $mol_ambient_context = $;
132
+ function $mol_ambient(this: $ | void, overrides: Partial<$>): $;
133
+ }
134
+
135
+ declare namespace $ {
136
+ function $mol_delegate<Value extends object>(proto: Value, target: () => Value): Value;
137
+ }
138
+
139
+ declare namespace $ {
140
+ const $mol_owning_map: WeakMap<any, any>;
141
+ function $mol_owning_allow<Having>(having: Having): having is Having & {
142
+ destructor(): void;
143
+ };
144
+ function $mol_owning_get<Having, Owner extends object>(having: Having, Owner?: {
145
+ new (): Owner;
146
+ }): Owner | null;
147
+ function $mol_owning_check<Owner, Having>(owner: Owner, having: Having): having is Having & {
148
+ destructor(): void;
149
+ };
150
+ function $mol_owning_catch<Owner, Having>(owner: Owner, having: Having): boolean;
151
+ }
152
+
153
+ declare namespace $ {
154
+ type $mol_type_writable<T> = {
155
+ -readonly [P in keyof T]: T[P];
156
+ };
157
+ }
158
+
159
+ declare namespace $ {
160
+ function $mol_func_name(this: $, func: Function): string;
161
+ function $mol_func_name_from<Target extends Function>(target: Target, source: Function): Target;
162
+ }
163
+
164
+ declare namespace $ {
165
+ const $mol_key_handle: unique symbol;
166
+ const $mol_key_store: WeakMap<object, string>;
167
+ }
168
+
169
+ declare namespace $ {
170
+ class $mol_object2 {
171
+ static $: $;
172
+ [Symbol.toStringTag]: string;
173
+ [$mol_ambient_ref]: $;
174
+ get $(): $;
175
+ set $(next: $);
176
+ static create<Instance>(this: new (init?: (instance: any) => void) => Instance, init?: (instance: $mol_type_writable<Instance>) => void): Instance;
177
+ static [Symbol.toPrimitive](): any;
178
+ static toString(): any;
179
+ static toJSON(): any;
180
+ static [$mol_key_handle](): any;
181
+ destructor(): void;
182
+ static destructor(): void;
183
+ [Symbol.dispose](): void;
184
+ toString(): string;
185
+ }
186
+ }
187
+
188
+ declare namespace $ {
189
+ class $mol_after_tick extends $mol_object2 {
190
+ task: () => void;
191
+ static promise: Promise<void> | null;
192
+ cancelled: boolean;
193
+ constructor(task: () => void);
194
+ destructor(): void;
195
+ }
196
+ }
197
+
198
+ declare namespace $ {
199
+ function $mol_promise_like(val: any): val is Promise<any>;
200
+ }
201
+
202
+ declare namespace $ {
203
+ abstract class $mol_wire_fiber<Host, Args extends readonly unknown[], Result> extends $mol_wire_pub_sub {
204
+ readonly task: (this: Host, ...args: Args) => Result;
205
+ readonly host?: Host | undefined;
206
+ static warm: boolean;
207
+ static planning: Set<$mol_wire_fiber<any, any, any>>;
208
+ static reaping: Set<$mol_wire_fiber<any, any, any>>;
209
+ static plan_task: $mol_after_tick | null;
210
+ static plan(): void;
211
+ static sync(): void;
212
+ cache: Result | Error | Promise<Result | Error>;
213
+ get args(): Args;
214
+ result(): Result | undefined;
215
+ get incompleted(): boolean;
216
+ field(): string;
217
+ constructor(id: string, task: (this: Host, ...args: Args) => Result, host?: Host | undefined, args?: Args);
218
+ plan(): this;
219
+ reap(): void;
220
+ toString(): string;
221
+ toJSON(): string;
222
+ [$mol_dev_format_head](): any[];
223
+ [$mol_dev_format_body](): null;
224
+ get $(): any;
225
+ emit(quant?: $mol_wire_cursor): void;
226
+ fresh(): this | undefined;
227
+ refresh(): void;
228
+ abstract put(next: Result | Error | Promise<Result | Error>): Result | Error | Promise<Result | Error>;
229
+ sync(): Awaited<Result>;
230
+ async_raw(): Promise<Result>;
231
+ async(): Promise<Result> & {
232
+ destructor(): void;
233
+ };
234
+ step(): Promise<null>;
235
+ destructor(): void;
236
+ }
237
+ }
238
+
239
+ declare namespace $ {
240
+ function $mol_key<Value>(value: Value): string;
241
+ }
242
+
243
+ declare namespace $ {
244
+ class $mol_after_frame extends $mol_object2 {
245
+ task: () => void;
246
+ static _promise: Promise<void> | null;
247
+ static get promise(): Promise<void>;
248
+ cancelled: boolean;
249
+ promise: Promise<void>;
250
+ constructor(task: () => void);
251
+ destructor(): void;
252
+ }
253
+ }
254
+
255
+ declare namespace $ {
256
+ let $mol_compare_deep_cache: WeakMap<any, WeakMap<any, boolean>>;
257
+ function $mol_compare_deep<Value>(left: Value, right: Value): boolean;
258
+ }
259
+
260
+ declare namespace $ {
261
+ type $mol_log3_event<Fields> = {
262
+ [key in string]: unknown;
263
+ } & {
264
+ time?: string;
265
+ place: unknown;
266
+ message: string;
267
+ } & Fields;
268
+ type $mol_log3_logger<Fields, Res = void> = (this: $, event: $mol_log3_event<Fields>) => Res;
269
+ let $mol_log3_come: $mol_log3_logger<{}>;
270
+ let $mol_log3_done: $mol_log3_logger<{}>;
271
+ let $mol_log3_fail: $mol_log3_logger<{}>;
272
+ let $mol_log3_warn: $mol_log3_logger<{
273
+ hint: string;
274
+ }>;
275
+ let $mol_log3_rise: $mol_log3_logger<{}>;
276
+ let $mol_log3_area: $mol_log3_logger<{}, () => void>;
277
+ function $mol_log3_area_lazy(this: $, event: $mol_log3_event<{}>): () => void;
278
+ let $mol_log3_stack: (() => void)[];
279
+ }
280
+
281
+ declare namespace $ {
282
+ type $mol_type_keys_extract<Input, Upper, Lower = never> = {
283
+ [Field in keyof Input]: unknown extends Input[Field] ? never : Input[Field] extends never ? never : Input[Field] extends Upper ? [
284
+ Lower
285
+ ] extends [Input[Field]] ? Field : never : never;
286
+ }[keyof Input];
287
+ }
288
+
289
+ declare namespace $ {
290
+ function $mol_log3_web_make(level: $mol_type_keys_extract<Console, Function>, color: string): (this: $, event: $mol_log3_event<{}>) => () => void;
291
+ }
292
+
293
+ declare namespace $ {
294
+ class $mol_wire_task<Host, Args extends readonly unknown[], Result> extends $mol_wire_fiber<Host, Args, Result> {
295
+ static getter<Host, Args extends readonly unknown[], Result>(task: (this: Host, ...args: Args) => Result): (host: Host, args: Args) => $mol_wire_task<Host, Args, Result>;
296
+ get temp(): boolean;
297
+ complete(): void;
298
+ put(next: Result | Error | Promise<Result | Error>): Error | Result | Promise<Error | Result>;
299
+ destructor(): void;
300
+ }
301
+ }
302
+
303
+ declare namespace $ {
304
+ function $mol_wire_method<Host extends object, Args extends readonly any[]>(host: Host, field: PropertyKey, descr?: TypedPropertyDescriptor<(...args: Args) => any>): {
305
+ value: (this: Host, ...args: Args) => any;
306
+ enumerable?: boolean;
307
+ configurable?: boolean;
308
+ writable?: boolean;
309
+ get?: (() => (...args: Args) => any) | undefined;
310
+ set?: ((value: (...args: Args) => any) => void) | undefined;
311
+ };
312
+ }
313
+
314
+ declare namespace $ {
315
+ type $mol_type_tail<Tuple extends readonly any[]> = ((...tail: Tuple) => any) extends ((head: any, ...tail: infer Tail) => any) ? Tail : never;
316
+ }
317
+
318
+ declare namespace $ {
319
+ type $mol_type_foot<Tuple extends readonly any[]> = Tuple['length'] extends 0 ? never : Tuple[$mol_type_tail<Tuple>['length']];
320
+ }
321
+
322
+ declare namespace $ {
323
+ function $mol_fail_catch(error: unknown): boolean;
324
+ }
325
+
326
+ declare namespace $ {
327
+ function $mol_try<Result>(handler: () => Result): Result | Error;
328
+ }
329
+
330
+ declare namespace $ {
331
+ function $mol_try_web<Result>(handler2: () => Result): Result | Error;
332
+ }
333
+
334
+ declare namespace $ {
335
+ function $mol_fail_log(error: unknown): boolean;
336
+ }
337
+
338
+ declare namespace $ {
339
+ class $mol_wire_atom<Host, Args extends readonly unknown[], Result> extends $mol_wire_fiber<Host, Args, Result> {
340
+ static solo<Host, Args extends readonly unknown[], Result>(host: Host, task: (this: Host, ...args: Args) => Result): $mol_wire_atom<Host, Args, Result>;
341
+ static plex<Host, Args extends readonly unknown[], Result>(host: Host, task: (this: Host, ...args: Args) => Result, key: Args[0]): $mol_wire_atom<Host, Args, Result>;
342
+ static watching: Set<$mol_wire_atom<any, any, any>>;
343
+ static watcher: $mol_after_frame | null;
344
+ static watch(): void;
345
+ watch(): void;
346
+ resync(args: Args): Error | Result | Promise<Error | Result>;
347
+ once(): Awaited<Result>;
348
+ channel(): ((next?: $mol_type_foot<Args>) => Awaited<Result>) & {
349
+ atom: $mol_wire_atom<Host, Args, Result>;
350
+ };
351
+ destructor(): void;
352
+ put(next: Result | Error | Promise<Result | Error>): Error | Result | Promise<Error | Result>;
353
+ }
354
+ }
355
+
356
+ declare namespace $ {
357
+ var $mol_dom_context: typeof globalThis;
358
+ }
359
+
360
+ declare namespace $ {
361
+ }
362
+
363
+ declare namespace $ {
364
+ var $mol_dom: typeof globalThis;
365
+ }
366
+
367
+ declare namespace $ {
368
+ function $mol_dom_render_children(el: Element | DocumentFragment, childNodes: NodeList | Array<Node | string | null>): void;
369
+ }
370
+
371
+ declare namespace $ {
372
+ function $mol_wire_patch(obj: object): void;
373
+ }
374
+
375
+ interface Node {
376
+ __defineGetter__: (field: string, getter: () => any) => void;
377
+ }
378
+ declare namespace $ {
379
+ function lookup_descr<Obj extends {
380
+ [field in Field]: any;
381
+ }, Field extends PropertyKey>(obj: Obj, field: Field): PropertyDescriptor | null;
382
+ function $mol_wire_dom<El extends Element>(el: El): El;
383
+ }
1
384
 
2
385
  export = $;
3
386
  //# sourceMappingURL=web.d.ts.map
package/web.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"sources":["../../../../mam.d.ts","../../../guid/guid.d.ts","../../../fail/fail.d.ts","../../cursor/cursor.d.ts","../../pub/pub.d.ts","../../sub/sub.d.ts","../../wire.d.ts","../../../fail/hidden/hidden.d.ts","../../../dev/format/format.d.ts","../../pub/sub/sub.d.ts","../../../ambient/ambient.d.ts","../../../delegate/delegate.d.ts","../../../owning/owning.d.ts","../../../type/writable/writable.d.ts","../../../func/name/name.d.ts","../../../key/key.d.ts","../../../object2/object2.d.ts","../../../after/tick/tick.d.ts","../../../promise/like/like.d.ts","../../fiber/fiber.d.ts","../../../key/key/key.d.ts","../../../after/frame/frame.web.d.ts","../../../compare/deep/deep.d.ts","../../../log3/log3.d.ts","../../../type/keys/extract/extract.d.ts","../../../log3/log3.web.d.ts","../../task/task.d.ts","../../method/method.d.ts","../../../type/tail/tail.d.ts","../../../type/foot/foot.d.ts","../../../fail/catch/catch.d.ts","../../../try/try.d.ts","../../../try/try.web.d.ts","../../../fail/log/log.d.ts","../../atom/atom.d.ts","../../../dom/context/context.d.ts","../../../dom/context/context.web.d.ts","../../../dom/dom.d.ts","../../../dom/render/children/children.d.ts","../../patch/patch.d.ts","../dom.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACbA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpBA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACbA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACTA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpCA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACXA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjBA;AACA;AACA;AACA;ACHA;AACA;AACA;ACFA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]}