mol_plot_all 1.2.1488 → 1.2.1490
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 +291 -245
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +1255 -1095
- package/node.js.map +1 -1
- package/node.mjs +1255 -1095
- package/node.test.js +2610 -2574
- package/node.test.js.map +1 -1
- package/package.json +42 -38
- package/web.d.ts +419 -373
- package/web.d.ts.map +1 -1
- package/web.deps.json +1 -1
- package/web.js +2211 -2051
- package/web.js.map +1 -1
- package/web.mjs +2211 -2051
- package/web.test.js +734 -858
- package/web.test.js.map +1 -1
package/node.d.ts
CHANGED
|
@@ -14,6 +14,56 @@ declare namespace $ {
|
|
|
14
14
|
export {};
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
declare namespace $ {
|
|
18
|
+
var $mol_dom_context: typeof globalThis;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare namespace $ {
|
|
22
|
+
function $mol_fail(error: any): never;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare namespace $ {
|
|
26
|
+
function $mol_promise_like(val: any): val is Promise<any>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare namespace $ {
|
|
30
|
+
function $mol_fail_hidden(error: any): never;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare namespace $ {
|
|
34
|
+
function $mol_fail_catch(error: unknown): boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare namespace $ {
|
|
38
|
+
function $mol_try<Result>(handler: () => Result): Result | Error;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare namespace $ {
|
|
42
|
+
function $mol_fail_log(error: unknown): boolean;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface $node {
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}
|
|
48
|
+
declare var $node: $node;
|
|
49
|
+
declare const cache: Map<string, any>;
|
|
50
|
+
|
|
51
|
+
declare namespace $ {
|
|
52
|
+
function $mol_func_name(this: $, func: Function): string;
|
|
53
|
+
function $mol_func_name_from<Target extends Function>(target: Target, source: Function): Target;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare namespace $ {
|
|
57
|
+
class $mol_error_mix<Cause extends {} = {}> extends AggregateError {
|
|
58
|
+
readonly cause: Cause;
|
|
59
|
+
name: string;
|
|
60
|
+
constructor(message: string, cause?: Cause, ...errors: readonly Error[]);
|
|
61
|
+
static [Symbol.toPrimitive](): string;
|
|
62
|
+
static toString(): string;
|
|
63
|
+
static make(...params: ConstructorParameters<typeof $mol_error_mix>): $mol_error_mix<{}>;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
17
67
|
declare namespace $ {
|
|
18
68
|
const $mol_ambient_ref: unique symbol;
|
|
19
69
|
type $mol_ambient_context = $;
|
|
@@ -38,25 +88,12 @@ declare namespace $ {
|
|
|
38
88
|
function $mol_owning_catch<Owner, Having>(owner: Owner, having: Having): boolean;
|
|
39
89
|
}
|
|
40
90
|
|
|
41
|
-
declare namespace $ {
|
|
42
|
-
function $mol_fail(error: any): never;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
declare namespace $ {
|
|
46
|
-
function $mol_fail_hidden(error: any): never;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
91
|
declare namespace $ {
|
|
50
92
|
type $mol_type_writable<T> = {
|
|
51
93
|
-readonly [P in keyof T]: T[P];
|
|
52
94
|
};
|
|
53
95
|
}
|
|
54
96
|
|
|
55
|
-
declare namespace $ {
|
|
56
|
-
function $mol_func_name(this: $, func: Function): string;
|
|
57
|
-
function $mol_func_name_from<Target extends Function>(target: Target, source: Function): Target;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
97
|
declare namespace $ {
|
|
61
98
|
class $mol_object2 {
|
|
62
99
|
static $: $;
|
|
@@ -83,12 +120,10 @@ declare namespace $ {
|
|
|
83
120
|
}
|
|
84
121
|
|
|
85
122
|
declare namespace $ {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
};
|
|
91
|
-
}
|
|
123
|
+
function $mol_env(): Record<string, string | undefined>;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
declare namespace $ {
|
|
92
127
|
}
|
|
93
128
|
|
|
94
129
|
declare namespace $ {
|
|
@@ -205,10 +240,6 @@ declare namespace $ {
|
|
|
205
240
|
}
|
|
206
241
|
}
|
|
207
242
|
|
|
208
|
-
declare namespace $ {
|
|
209
|
-
function $mol_promise_like(val: any): val is Promise<any>;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
243
|
declare namespace $ {
|
|
213
244
|
abstract class $mol_wire_fiber<Host, Args extends readonly unknown[], Result> extends $mol_wire_pub_sub {
|
|
214
245
|
readonly task: (this: Host, ...args: Args) => Result;
|
|
@@ -245,28 +276,6 @@ declare namespace $ {
|
|
|
245
276
|
}
|
|
246
277
|
}
|
|
247
278
|
|
|
248
|
-
declare namespace $ {
|
|
249
|
-
const $mol_key_store: WeakMap<object, string>;
|
|
250
|
-
function $mol_key<Value>(value: Value): string;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
declare namespace $ {
|
|
254
|
-
class $mol_after_timeout extends $mol_object2 {
|
|
255
|
-
delay: number;
|
|
256
|
-
task: () => void;
|
|
257
|
-
id: any;
|
|
258
|
-
constructor(delay: number, task: () => void);
|
|
259
|
-
destructor(): void;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
declare namespace $ {
|
|
264
|
-
class $mol_after_frame extends $mol_after_timeout {
|
|
265
|
-
task: () => void;
|
|
266
|
-
constructor(task: () => void);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
279
|
declare namespace $ {
|
|
271
280
|
let $mol_compare_deep_cache: WeakMap<any, WeakMap<any, boolean>>;
|
|
272
281
|
function $mol_compare_deep<Value>(left: Value, right: Value): boolean;
|
|
@@ -423,105 +432,6 @@ declare namespace $ {
|
|
|
423
432
|
}
|
|
424
433
|
}
|
|
425
434
|
|
|
426
|
-
declare namespace $ {
|
|
427
|
-
function $mol_wire_method<Host extends object, Args extends readonly any[]>(host: Host, field: PropertyKey, descr?: TypedPropertyDescriptor<(...args: Args) => any>): {
|
|
428
|
-
value: (this: Host, ...args: Args) => any;
|
|
429
|
-
enumerable?: boolean;
|
|
430
|
-
configurable?: boolean;
|
|
431
|
-
writable?: boolean;
|
|
432
|
-
get?: (() => (...args: Args) => any) | undefined;
|
|
433
|
-
set?: ((value: (...args: Args) => any) => void) | undefined;
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
declare namespace $ {
|
|
438
|
-
type $mol_type_tail<Tuple extends readonly any[]> = ((...tail: Tuple) => any) extends ((head: any, ...tail: infer Tail) => any) ? Tail : never;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
declare namespace $ {
|
|
442
|
-
type $mol_type_foot<Tuple extends readonly any[]> = Tuple['length'] extends 0 ? never : Tuple[$mol_type_tail<Tuple>['length']];
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
declare namespace $ {
|
|
446
|
-
function $mol_fail_catch(error: unknown): boolean;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
declare namespace $ {
|
|
450
|
-
function $mol_try<Result>(handler: () => Result): Result | Error;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
declare namespace $ {
|
|
454
|
-
function $mol_fail_log(error: unknown): boolean;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
declare namespace $ {
|
|
458
|
-
class $mol_wire_atom<Host, Args extends readonly unknown[], Result> extends $mol_wire_fiber<Host, Args, Result> {
|
|
459
|
-
static solo<Host, Args extends readonly unknown[], Result>(host: Host, task: (this: Host, ...args: Args) => Result): $mol_wire_atom<Host, Args, Result>;
|
|
460
|
-
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>;
|
|
461
|
-
static watching: Set<$mol_wire_atom<any, any, any>>;
|
|
462
|
-
static watcher: $mol_after_frame | null;
|
|
463
|
-
static watch(): void;
|
|
464
|
-
watch(): void;
|
|
465
|
-
resync(args: Args): Error | Result | Promise<Error | Result>;
|
|
466
|
-
once(): Awaited<Result>;
|
|
467
|
-
channel(): ((next?: $mol_type_foot<Args>) => Awaited<Result>) & {
|
|
468
|
-
atom: $mol_wire_atom<Host, Args, Result>;
|
|
469
|
-
};
|
|
470
|
-
destructor(): void;
|
|
471
|
-
put(next: Result | Error | Promise<Result | Error>): Error | Result | Promise<Error | Result>;
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
declare namespace $ {
|
|
476
|
-
export function $mol_wire_solo<Args extends any[]>(host: object, field: string, descr?: TypedPropertyDescriptor<(...args: Args) => any>): TypedPropertyDescriptor<(...args: First_optional<Args>) => any>;
|
|
477
|
-
type First_optional<Args extends any[]> = Args extends [] ? [] : [Args[0] | undefined, ...$mol_type_tail<Args>];
|
|
478
|
-
export {};
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
declare namespace $ {
|
|
482
|
-
function $mol_wire_plex<Args extends [any, ...any[]]>(host: object, field: string, descr?: TypedPropertyDescriptor<(...args: Args) => any>): {
|
|
483
|
-
value: (this: typeof host, ...args: Args) => any;
|
|
484
|
-
enumerable?: boolean;
|
|
485
|
-
configurable?: boolean;
|
|
486
|
-
writable?: boolean;
|
|
487
|
-
get?: (() => (...args: Args) => any) | undefined;
|
|
488
|
-
set?: ((value: (...args: Args) => any) => void) | undefined;
|
|
489
|
-
};
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
declare namespace $ {
|
|
493
|
-
let $mol_mem: typeof $mol_wire_solo;
|
|
494
|
-
let $mol_mem_key: typeof $mol_wire_plex;
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
declare namespace $ {
|
|
498
|
-
var $mol_dom_context: typeof globalThis;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
interface $node {
|
|
502
|
-
[key: string]: any;
|
|
503
|
-
}
|
|
504
|
-
declare var $node: $node;
|
|
505
|
-
declare const cache: Map<string, any>;
|
|
506
|
-
|
|
507
|
-
declare namespace $ {
|
|
508
|
-
class $mol_error_mix<Cause extends {} = {}> extends AggregateError {
|
|
509
|
-
readonly cause: Cause;
|
|
510
|
-
name: string;
|
|
511
|
-
constructor(message: string, cause?: Cause, ...errors: readonly Error[]);
|
|
512
|
-
static [Symbol.toPrimitive](): string;
|
|
513
|
-
static toString(): string;
|
|
514
|
-
static make(...params: ConstructorParameters<typeof $mol_error_mix>): $mol_error_mix<{}>;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
declare namespace $ {
|
|
519
|
-
function $mol_env(): Record<string, string | undefined>;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
declare namespace $ {
|
|
523
|
-
}
|
|
524
|
-
|
|
525
435
|
declare namespace $ {
|
|
526
436
|
export function $mol_wire_sync<Host extends object>(obj: Host): ObjectOrFunctionResultAwaited<Host>;
|
|
527
437
|
type FunctionResultAwaited<Some> = Some extends (...args: infer Args) => infer Res ? (...args: Args) => Awaited<Res> : Some;
|
|
@@ -575,106 +485,10 @@ declare namespace $ {
|
|
|
575
485
|
declare namespace $ {
|
|
576
486
|
}
|
|
577
487
|
|
|
578
|
-
declare namespace $ {
|
|
579
|
-
class $mol_view_selection extends $mol_object {
|
|
580
|
-
static focused(next?: Element[], notify?: 'notify'): Element[];
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
declare namespace $ {
|
|
585
|
-
class $mol_wrapper extends $mol_object2 {
|
|
586
|
-
static wrap: (task: (...ags: any[]) => any) => (...ags: any[]) => any;
|
|
587
|
-
static run<Result>(task: () => Result): Result;
|
|
588
|
-
static func<Args extends any[], Result, Host = void>(func: (this: Host, ...args: Args) => Result): (this: Host, ...args: Args) => Result;
|
|
589
|
-
static get class(): <Class extends new (...args: any[]) => any>(Class: Class) => Class;
|
|
590
|
-
static get method(): (obj: object, name: PropertyKey, descr: PropertyDescriptor) => PropertyDescriptor;
|
|
591
|
-
static get field(): <Host, Field extends keyof Host, Args extends any[], Result>(obj: Host, name: Field, descr: TypedPropertyDescriptor<Result>) => TypedPropertyDescriptor<Result>;
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
declare namespace $ {
|
|
596
|
-
class $mol_memo extends $mol_wrapper {
|
|
597
|
-
static wrap<This extends object, Value>(task: (this: This, next?: Value) => Value): (this: This, next?: Value) => Value | undefined;
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
|
|
601
488
|
declare namespace $ {
|
|
602
489
|
var $mol_dom: typeof globalThis;
|
|
603
490
|
}
|
|
604
491
|
|
|
605
|
-
declare namespace $ {
|
|
606
|
-
function $mol_dom_qname(name: string): string;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
declare namespace $ {
|
|
610
|
-
function $mol_wire_probe<Value>(task: () => Value, def?: Value): Value | undefined;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
declare namespace $ {
|
|
614
|
-
function $mol_wire_watch(): void;
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
declare namespace $ {
|
|
618
|
-
function $mol_const<Value>(value: Value): {
|
|
619
|
-
(): Value;
|
|
620
|
-
'()': Value;
|
|
621
|
-
};
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
declare namespace $ {
|
|
625
|
-
function $mol_wire_solid(): void;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
declare namespace $ {
|
|
629
|
-
function $mol_dom_render_attributes(el: Element, attrs: {
|
|
630
|
-
[key: string]: string | number | boolean | null;
|
|
631
|
-
}): void;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
declare namespace $ {
|
|
635
|
-
function $mol_dom_render_events(el: Element, events: {
|
|
636
|
-
[key: string]: (event: Event) => any;
|
|
637
|
-
}, passive?: boolean): void;
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
declare namespace $ {
|
|
641
|
-
function $mol_dom_render_styles(el: Element, styles: {
|
|
642
|
-
[key: string]: string | number;
|
|
643
|
-
}): void;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
declare namespace $ {
|
|
647
|
-
function $mol_dom_render_children(el: Element | DocumentFragment, childNodes: NodeList | Array<Node | string | null>): void;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
declare namespace $ {
|
|
651
|
-
function $mol_dom_render_fields(el: Element, fields: {
|
|
652
|
-
[key: string]: any;
|
|
653
|
-
}): void;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
declare namespace $ {
|
|
657
|
-
export function $mol_wire_async<Host extends object>(obj: Host): ObjectOrFunctionResultPromisify<Host>;
|
|
658
|
-
type FunctionResultPromisify<Some> = Some extends (...args: infer Args) => infer Res ? Res extends PromiseLike<unknown> ? Some : (...args: Args) => Promise<Res> : Some;
|
|
659
|
-
type MethodsResultPromisify<Host extends Object> = {
|
|
660
|
-
[K in keyof Host]: FunctionResultPromisify<Host[K]>;
|
|
661
|
-
};
|
|
662
|
-
type ObjectOrFunctionResultPromisify<Some> = (Some extends (...args: any) => unknown ? FunctionResultPromisify<Some> : {}) & (Some extends Object ? MethodsResultPromisify<Some> : Some);
|
|
663
|
-
export {};
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
declare namespace $ {
|
|
667
|
-
type $mol_type_keys_extract<Input, Upper, Lower = never> = {
|
|
668
|
-
[Field in keyof Input]: unknown extends Input[Field] ? never : Input[Field] extends never ? never : Input[Field] extends Upper ? [
|
|
669
|
-
Lower
|
|
670
|
-
] extends [Input[Field]] ? Field : never : never;
|
|
671
|
-
}[keyof Input];
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
declare namespace $ {
|
|
675
|
-
type $mol_type_pick<Input, Upper> = Pick<Input, $mol_type_keys_extract<Input, Upper>>;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
492
|
declare namespace $ {
|
|
679
493
|
function $mol_style_attach(id: string, text: string): HTMLStyleElement | null;
|
|
680
494
|
}
|
|
@@ -955,6 +769,240 @@ declare namespace $ {
|
|
|
955
769
|
declare namespace $ {
|
|
956
770
|
}
|
|
957
771
|
|
|
772
|
+
declare namespace $ {
|
|
773
|
+
function $mol_dom_render_children(el: Element | DocumentFragment, childNodes: NodeList | Array<Node | string | null>): void;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
declare namespace $ {
|
|
777
|
+
type $mol_type_partial_deep<Val> = Val extends object ? Val extends Function ? Val : {
|
|
778
|
+
[field in keyof Val]?: $mol_type_partial_deep<Val[field]> | undefined;
|
|
779
|
+
} : Val;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
declare namespace $ {
|
|
783
|
+
let $mol_jsx_prefix: string;
|
|
784
|
+
let $mol_jsx_crumbs: string;
|
|
785
|
+
let $mol_jsx_booked: null | Set<string>;
|
|
786
|
+
let $mol_jsx_document: $mol_jsx.JSX.ElementClass['ownerDocument'];
|
|
787
|
+
const $mol_jsx_frag = "";
|
|
788
|
+
function $mol_jsx<Props extends $mol_jsx.JSX.IntrinsicAttributes, Children extends Array<Node | string>>(Elem: string | ((props: Props, ...children: Children) => Element), props: Props, ...childNodes: Children): Element | DocumentFragment;
|
|
789
|
+
namespace $mol_jsx.JSX {
|
|
790
|
+
interface Element extends HTMLElement {
|
|
791
|
+
class?: string;
|
|
792
|
+
}
|
|
793
|
+
interface ElementClass {
|
|
794
|
+
attributes: {};
|
|
795
|
+
ownerDocument: Pick<Document, 'getElementById' | 'createElementNS' | 'createDocumentFragment'>;
|
|
796
|
+
childNodes: Array<Node | string>;
|
|
797
|
+
valueOf(): Element;
|
|
798
|
+
}
|
|
799
|
+
type OrString<Dict> = {
|
|
800
|
+
[key in keyof Dict]: Dict[key] | string;
|
|
801
|
+
};
|
|
802
|
+
type IntrinsicElements = {
|
|
803
|
+
[key in keyof ElementTagNameMap]?: $.$mol_type_partial_deep<OrString<Element & IntrinsicAttributes & ElementTagNameMap[key]>>;
|
|
804
|
+
};
|
|
805
|
+
interface IntrinsicAttributes {
|
|
806
|
+
id?: string;
|
|
807
|
+
xmlns?: string;
|
|
808
|
+
}
|
|
809
|
+
interface ElementAttributesProperty {
|
|
810
|
+
attributes: {};
|
|
811
|
+
}
|
|
812
|
+
interface ElementChildrenAttribute {
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
declare namespace $ {
|
|
818
|
+
class $mol_window extends $mol_object {
|
|
819
|
+
static size(): {
|
|
820
|
+
width: number;
|
|
821
|
+
height: number;
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
declare namespace $ {
|
|
827
|
+
const $mol_key_store: WeakMap<object, string>;
|
|
828
|
+
function $mol_key<Value>(value: Value): string;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
declare namespace $ {
|
|
832
|
+
class $mol_after_timeout extends $mol_object2 {
|
|
833
|
+
delay: number;
|
|
834
|
+
task: () => void;
|
|
835
|
+
id: any;
|
|
836
|
+
constructor(delay: number, task: () => void);
|
|
837
|
+
destructor(): void;
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
declare namespace $ {
|
|
842
|
+
class $mol_after_frame extends $mol_after_timeout {
|
|
843
|
+
task: () => void;
|
|
844
|
+
constructor(task: () => void);
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
declare namespace $ {
|
|
849
|
+
function $mol_wire_method<Host extends object, Args extends readonly any[]>(host: Host, field: PropertyKey, descr?: TypedPropertyDescriptor<(...args: Args) => any>): {
|
|
850
|
+
value: (this: Host, ...args: Args) => any;
|
|
851
|
+
enumerable?: boolean;
|
|
852
|
+
configurable?: boolean;
|
|
853
|
+
writable?: boolean;
|
|
854
|
+
get?: (() => (...args: Args) => any) | undefined;
|
|
855
|
+
set?: ((value: (...args: Args) => any) => void) | undefined;
|
|
856
|
+
};
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
declare namespace $ {
|
|
860
|
+
type $mol_type_tail<Tuple extends readonly any[]> = ((...tail: Tuple) => any) extends ((head: any, ...tail: infer Tail) => any) ? Tail : never;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
declare namespace $ {
|
|
864
|
+
type $mol_type_foot<Tuple extends readonly any[]> = Tuple['length'] extends 0 ? never : Tuple[$mol_type_tail<Tuple>['length']];
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
declare namespace $ {
|
|
868
|
+
class $mol_wire_atom<Host, Args extends readonly unknown[], Result> extends $mol_wire_fiber<Host, Args, Result> {
|
|
869
|
+
static solo<Host, Args extends readonly unknown[], Result>(host: Host, task: (this: Host, ...args: Args) => Result): $mol_wire_atom<Host, Args, Result>;
|
|
870
|
+
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>;
|
|
871
|
+
static watching: Set<$mol_wire_atom<any, any, any>>;
|
|
872
|
+
static watcher: $mol_after_frame | null;
|
|
873
|
+
static watch(): void;
|
|
874
|
+
watch(): void;
|
|
875
|
+
resync(args: Args): Error | Result | Promise<Error | Result>;
|
|
876
|
+
once(): Awaited<Result>;
|
|
877
|
+
channel(): ((next?: $mol_type_foot<Args>) => Awaited<Result>) & {
|
|
878
|
+
atom: $mol_wire_atom<Host, Args, Result>;
|
|
879
|
+
};
|
|
880
|
+
destructor(): void;
|
|
881
|
+
put(next: Result | Error | Promise<Result | Error>): Error | Result | Promise<Error | Result>;
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
declare namespace $ {
|
|
886
|
+
export function $mol_wire_solo<Args extends any[]>(host: object, field: string, descr?: TypedPropertyDescriptor<(...args: Args) => any>): TypedPropertyDescriptor<(...args: First_optional<Args>) => any>;
|
|
887
|
+
type First_optional<Args extends any[]> = Args extends [] ? [] : [Args[0] | undefined, ...$mol_type_tail<Args>];
|
|
888
|
+
export {};
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
declare namespace $ {
|
|
892
|
+
function $mol_wire_plex<Args extends [any, ...any[]]>(host: object, field: string, descr?: TypedPropertyDescriptor<(...args: Args) => any>): {
|
|
893
|
+
value: (this: typeof host, ...args: Args) => any;
|
|
894
|
+
enumerable?: boolean;
|
|
895
|
+
configurable?: boolean;
|
|
896
|
+
writable?: boolean;
|
|
897
|
+
get?: (() => (...args: Args) => any) | undefined;
|
|
898
|
+
set?: ((value: (...args: Args) => any) => void) | undefined;
|
|
899
|
+
};
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
declare namespace $ {
|
|
903
|
+
let $mol_mem: typeof $mol_wire_solo;
|
|
904
|
+
let $mol_mem_key: typeof $mol_wire_plex;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
declare namespace $ {
|
|
908
|
+
function $mol_guard_defined<T>(value: T): value is NonNullable<T>;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
declare namespace $ {
|
|
912
|
+
class $mol_view_selection extends $mol_object {
|
|
913
|
+
static focused(next?: Element[], notify?: 'notify'): Element[];
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
declare namespace $ {
|
|
918
|
+
class $mol_wrapper extends $mol_object2 {
|
|
919
|
+
static wrap: (task: (...ags: any[]) => any) => (...ags: any[]) => any;
|
|
920
|
+
static run<Result>(task: () => Result): Result;
|
|
921
|
+
static func<Args extends any[], Result, Host = void>(func: (this: Host, ...args: Args) => Result): (this: Host, ...args: Args) => Result;
|
|
922
|
+
static get class(): <Class extends new (...args: any[]) => any>(Class: Class) => Class;
|
|
923
|
+
static get method(): (obj: object, name: PropertyKey, descr: PropertyDescriptor) => PropertyDescriptor;
|
|
924
|
+
static get field(): <Host, Field extends keyof Host, Args extends any[], Result>(obj: Host, name: Field, descr: TypedPropertyDescriptor<Result>) => TypedPropertyDescriptor<Result>;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
declare namespace $ {
|
|
929
|
+
class $mol_memo extends $mol_wrapper {
|
|
930
|
+
static wrap<This extends object, Value>(task: (this: This, next?: Value) => Value): (this: This, next?: Value) => Value | undefined;
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
declare namespace $ {
|
|
935
|
+
function $mol_dom_qname(name: string): string;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
declare namespace $ {
|
|
939
|
+
function $mol_wire_probe<Value>(task: () => Value, def?: Value): Value | undefined;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
declare namespace $ {
|
|
943
|
+
function $mol_wire_watch(): void;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
declare namespace $ {
|
|
947
|
+
function $mol_const<Value>(value: Value): {
|
|
948
|
+
(): Value;
|
|
949
|
+
'()': Value;
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
declare namespace $ {
|
|
954
|
+
function $mol_wire_solid(): void;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
declare namespace $ {
|
|
958
|
+
function $mol_dom_render_attributes(el: Element, attrs: {
|
|
959
|
+
[key: string]: string | number | boolean | null;
|
|
960
|
+
}): void;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
declare namespace $ {
|
|
964
|
+
function $mol_dom_render_events(el: Element, events: {
|
|
965
|
+
[key: string]: (event: Event) => any;
|
|
966
|
+
}, passive?: boolean): void;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
declare namespace $ {
|
|
970
|
+
function $mol_dom_render_styles(el: Element, styles: {
|
|
971
|
+
[key: string]: string | number;
|
|
972
|
+
}): void;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
declare namespace $ {
|
|
976
|
+
function $mol_dom_render_fields(el: Element, fields: {
|
|
977
|
+
[key: string]: any;
|
|
978
|
+
}): void;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
declare namespace $ {
|
|
982
|
+
export function $mol_wire_async<Host extends object>(obj: Host): ObjectOrFunctionResultPromisify<Host>;
|
|
983
|
+
type FunctionResultPromisify<Some> = Some extends (...args: infer Args) => infer Res ? Res extends PromiseLike<unknown> ? Some : (...args: Args) => Promise<Res> : Some;
|
|
984
|
+
type MethodsResultPromisify<Host extends Object> = {
|
|
985
|
+
[K in keyof Host]: FunctionResultPromisify<Host[K]>;
|
|
986
|
+
};
|
|
987
|
+
type ObjectOrFunctionResultPromisify<Some> = (Some extends (...args: any) => unknown ? FunctionResultPromisify<Some> : {}) & (Some extends Object ? MethodsResultPromisify<Some> : Some);
|
|
988
|
+
export {};
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
declare namespace $ {
|
|
992
|
+
type $mol_type_keys_extract<Input, Upper, Lower = never> = {
|
|
993
|
+
[Field in keyof Input]: unknown extends Input[Field] ? never : Input[Field] extends never ? never : Input[Field] extends Upper ? [
|
|
994
|
+
Lower
|
|
995
|
+
] extends [Input[Field]] ? Field : never : never;
|
|
996
|
+
}[keyof Input];
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
declare namespace $ {
|
|
1000
|
+
type $mol_type_pick<Input, Upper> = Pick<Input, $mol_type_keys_extract<Input, Upper>>;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
declare namespace $ {
|
|
1004
|
+
}
|
|
1005
|
+
|
|
958
1006
|
declare namespace $ {
|
|
959
1007
|
type $mol_view_content = $mol_view | Node | string | number | boolean | null;
|
|
960
1008
|
function $mol_view_visible_width(): number;
|
|
@@ -962,9 +1010,10 @@ declare namespace $ {
|
|
|
962
1010
|
function $mol_view_state_key(suffix: string): string;
|
|
963
1011
|
class $mol_view extends $mol_object {
|
|
964
1012
|
static Root<This extends typeof $mol_view>(this: This, id: number): InstanceType<This>;
|
|
965
|
-
|
|
966
|
-
static
|
|
1013
|
+
static roots(): $mol_view[];
|
|
1014
|
+
static auto(): void;
|
|
967
1015
|
title(): string;
|
|
1016
|
+
hint(): string;
|
|
968
1017
|
focused(next?: boolean): boolean;
|
|
969
1018
|
state_key(suffix?: string): string;
|
|
970
1019
|
dom_name(): string;
|
|
@@ -1027,9 +1076,6 @@ declare namespace $ {
|
|
|
1027
1076
|
type $mol_view_all = $mol_type_pick<$, typeof $mol_view>;
|
|
1028
1077
|
}
|
|
1029
1078
|
|
|
1030
|
-
declare namespace $ {
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
1079
|
declare namespace $ {
|
|
1034
1080
|
class $mol_plugin extends $mol_view {
|
|
1035
1081
|
dom_node_external(next?: Element): Element;
|