mam 1.11.21 → 1.11.25

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
@@ -1,1409 +1,2 @@
1
- declare namespace $ { }
2
- export = $;
3
1
 
4
- declare namespace $ {
5
- namespace $$ {
6
- let $$: typeof $;
7
- }
8
- const $mol_ambient_ref: unique symbol;
9
- type $mol_ambient_context = (typeof globalThis) & (typeof $.$$) & (typeof $);
10
- function $mol_ambient(this: $mol_ambient_context | void, overrides: Partial<$mol_ambient_context>): $mol_ambient_context;
11
- }
12
-
13
- declare namespace $ {
14
- type $mol_log3_event<Fields> = {
15
- [key in string]: unknown;
16
- } & {
17
- time?: string;
18
- place: unknown;
19
- message: string;
20
- } & Fields;
21
- type $mol_log3_logger<Fields, Res = void> = (this: $mol_ambient_context, event: $mol_log3_event<Fields>) => Res;
22
- let $mol_log3_come: $mol_log3_logger<{}>;
23
- let $mol_log3_done: $mol_log3_logger<{}>;
24
- let $mol_log3_fail: $mol_log3_logger<{}>;
25
- let $mol_log3_warn: $mol_log3_logger<{
26
- hint: string;
27
- }>;
28
- let $mol_log3_rise: $mol_log3_logger<{}>;
29
- let $mol_log3_area: $mol_log3_logger<{}, () => void>;
30
- function $mol_log3_area_lazy(this: $mol_ambient_context, event: $mol_log3_event<{}>): () => void;
31
- let $mol_log3_stack: (() => void)[];
32
- }
33
-
34
- /// <reference types="node" />
35
- interface $node {
36
- [key: string]: any;
37
- }
38
- declare var $node: $node;
39
- declare const $node_require: NodeRequire;
40
-
41
- declare namespace $ {
42
- function $mol_delegate<Value extends object>(proto: Value, target: () => Value): Value;
43
- }
44
-
45
- declare namespace $ {
46
- const $mol_owning_map: WeakMap<any, any>;
47
- function $mol_owning_allow<Having>(having: Having): having is Having & {
48
- destructor(): void;
49
- };
50
- function $mol_owning_get<Having, Owner extends object>(having: Having, Owner?: {
51
- new (): Owner;
52
- }): Owner | null;
53
- function $mol_owning_check<Owner, Having>(owner: Owner, having: Having): having is Having & {
54
- destructor(): void;
55
- };
56
- function $mol_owning_catch<Owner, Having>(owner: Owner, having: Having): boolean;
57
- }
58
-
59
- declare namespace $ {
60
- function $mol_fail(error: any): never;
61
- }
62
-
63
- declare namespace $ {
64
- function $mol_fail_hidden(error: any): never;
65
- }
66
-
67
- declare namespace $ {
68
- type $mol_type_writable<T> = {
69
- -readonly [P in keyof T]: T[P];
70
- };
71
- }
72
-
73
- declare namespace $ {
74
- class $mol_object2 {
75
- static $: $mol_ambient_context;
76
- [$mol_ambient_ref]: $mol_ambient_context;
77
- get $(): $mol_ambient_context;
78
- set $(next: $mol_ambient_context);
79
- constructor(init?: (obj: any) => void);
80
- static create<Instance>(this: new (init?: (instance: any) => void) => Instance, init?: (instance: $mol_type_writable<Instance>) => void): Instance;
81
- static toString(): any;
82
- destructor(): void;
83
- toString(): any;
84
- toJSON(): any;
85
- }
86
- }
87
-
88
- declare namespace $ {
89
- function $mol_deprecated(message: string): <Method extends (this: Host, ...args: readonly any[]) => any, Host extends { [key in Field]: Method; } & {
90
- $: $mol_ambient_context;
91
- }, Field extends keyof Host>(host: Host, field: Field, descr: TypedPropertyDescriptor<Method>) => void;
92
- }
93
-
94
- declare namespace $ {
95
- const $mol_tree_convert: unique symbol;
96
- type $mol_tree_path = Array<string | number | null>;
97
- type $mol_tree_hack = (input: $mol_tree, context: $mol_tree_context) => readonly $mol_tree[];
98
- type $mol_tree_context = Record<string, $mol_tree_hack>;
99
- type $mol_tree_library = Record<string, $mol_tree_context>;
100
- class $mol_tree extends $mol_object2 {
101
- readonly type: string;
102
- readonly data: string;
103
- readonly sub: readonly $mol_tree[];
104
- readonly baseUri: string;
105
- readonly row: number;
106
- readonly col: number;
107
- readonly length: number;
108
- constructor(config?: Partial<$mol_tree>);
109
- static values(str: string, baseUri?: string): $mol_tree[];
110
- clone(config?: Partial<$mol_tree>): $mol_tree;
111
- make(config: Partial<$mol_tree>): $mol_tree;
112
- make_data(value: string, sub?: readonly $mol_tree[]): $mol_tree;
113
- make_struct(type: string, sub?: readonly $mol_tree[]): $mol_tree;
114
- static fromString(str: string, baseUri?: string): $mol_tree;
115
- static fromJSON(json: any, baseUri?: string): $mol_tree;
116
- get uri(): string;
117
- toString(prefix?: string): string;
118
- toJSON(): any;
119
- get value(): string;
120
- insert(value: $mol_tree, ...path: $mol_tree_path): $mol_tree;
121
- select(...path: $mol_tree_path): $mol_tree;
122
- filter(path: string[], value?: string): $mol_tree;
123
- transform(visit: (stack: $mol_tree[], sub: () => $mol_tree[]) => $mol_tree | null, stack?: $mol_tree[]): $mol_tree | null;
124
- hack(context: $mol_tree_context): $mol_tree;
125
- error(message: string): Error;
126
- }
127
- }
128
-
129
- declare namespace $ {
130
- function $mol_log3_node_make(level: keyof Console, output: 'stdout' | 'stderr', type: string, color: keyof typeof $node.colorette): (this: $mol_ambient_context, event: $mol_log3_event<{}>) => () => void;
131
- }
132
-
133
- declare namespace $ {
134
- class $mol_wrapper extends $mol_object2 {
135
- static wrap: (task: (...ags: any[]) => any) => (...ags: any[]) => any;
136
- static run<Result>(task: () => Result): Result;
137
- static func<Args extends any[], Result, Host = void>(func: (this: Host, ...args: Args) => Result): (this: Host, ...args: Args) => Result;
138
- static get class(): <Class extends new (...args: any[]) => any>(Class: Class) => Class;
139
- static get method(): <Host, Field extends keyof Host, Args extends any[], Result>(obj: Host, name: Field, descr: TypedPropertyDescriptor<(this: Host, ...args: Args) => Result>) => TypedPropertyDescriptor<(this: Host, ...args: Args) => Result>;
140
- static get field(): <Host, Field extends keyof Host, Args extends any[], Result>(obj: Host, name: Field, descr: TypedPropertyDescriptor<Result>) => TypedPropertyDescriptor<Result>;
141
- }
142
- }
143
-
144
- declare namespace $ {
145
- class $mol_after_timeout extends $mol_object2 {
146
- delay: number;
147
- task: () => void;
148
- id: any;
149
- constructor(delay: number, task: () => void);
150
- destructor(): void;
151
- }
152
- }
153
-
154
- declare namespace $ {
155
- class $mol_after_frame extends $mol_after_timeout {
156
- task: () => void;
157
- constructor(task: () => void);
158
- }
159
- }
160
-
161
- declare namespace $ {
162
- function $mol_compare_any(a: any, b: any): boolean;
163
- }
164
-
165
- declare namespace $ {
166
- const $mol_conform_stack: any[];
167
- function $mol_conform<Target, Source>(target: Target, source: Source): Target;
168
- const $mol_conform_handlers: WeakMap<Object, (target: any, source: any) => any>;
169
- function $mol_conform_handler<Class>(cl: {
170
- new (...args: any[]): Class;
171
- }, handler: (target: Class, source: Class) => Class): void;
172
- function $mol_conform_array<Value, List extends {
173
- [index: number]: Value;
174
- length: number;
175
- }>(target: List, source: List): List;
176
- }
177
-
178
- declare namespace $ {
179
- function $mol_array_trim<Item>(array: Item[]): Item[];
180
- }
181
-
182
- declare namespace $ {
183
- function $mol_dev_format_register(config: {
184
- header: (val: any, config: any) => any;
185
- hasBody: (val: any, config: any) => false;
186
- } | {
187
- header: (val: any, config: any) => any;
188
- hasBody: (val: any, config: any) => boolean;
189
- body: (val: any, config: any) => any;
190
- }): void;
191
- let $mol_dev_format_head: symbol;
192
- let $mol_dev_format_body: symbol;
193
- function $mol_dev_format_native(obj: any): any;
194
- function $mol_dev_format_auto(obj: any): any;
195
- function $mol_dev_format_element(element: string, style: object, ...content: any[]): any[];
196
- function $mol_dev_format_span(style: object, ...content: any[]): any[];
197
- let $mol_dev_format_div: (style: object, ...content: any[]) => any[];
198
- let $mol_dev_format_ol: (style: object, ...content: any[]) => any[];
199
- let $mol_dev_format_li: (style: object, ...content: any[]) => any[];
200
- let $mol_dev_format_table: (style: object, ...content: any[]) => any[];
201
- let $mol_dev_format_tr: (style: object, ...content: any[]) => any[];
202
- let $mol_dev_format_td: (style: object, ...content: any[]) => any[];
203
- let $mol_dev_format_accent: (...args: any[]) => any[];
204
- let $mol_dev_format_strong: (...args: any[]) => any[];
205
- let $mol_dev_format_string: (...args: any[]) => any[];
206
- let $mol_dev_format_shade: (...args: any[]) => any[];
207
- let $mol_dev_format_indent: (...args: any[]) => any[];
208
- }
209
-
210
- declare namespace $ {
211
- const enum $mol_fiber_status {
212
- persist = -3,
213
- actual = -2,
214
- doubt = -1,
215
- obsolete = 0
216
- }
217
- function $mol_fiber_defer<Value = void>(calculate: () => Value): $mol_fiber<any>;
218
- function $mol_fiber_func<This, Args extends any[], Result>(calculate: (this: This, ...args: Args) => Result): (this: This, ...args: Args) => Result;
219
- function $mol_fiber_root<Calculate extends (this: This, ...args: any[]) => Result, Result = void, This = void>(calculate: Calculate): Calculate;
220
- function $mol_fiber_method<Host, Value>(obj: Host, name: keyof Host, descr: TypedPropertyDescriptor<(this: Host, ...args: any[]) => Value>): TypedPropertyDescriptor<(this: Host, ...args: any[]) => Value>;
221
- function $mol_fiber_async<Args extends any[], Value>(task: (...args: Args) => Value): (...args: Args) => Promise<Value>;
222
- function $mol_fiber_sync<Args extends any[], Value = void, This = void>(request: (this: This, ...args: Args) => PromiseLike<Value>): (...args: Args) => Value;
223
- function $mol_fiber_warp(): Promise<void>;
224
- function $mol_fiber_fence(func: () => any): any;
225
- function $mol_fiber_unlimit<Result>(task: () => Result): Result;
226
- class $mol_fiber_solid extends $mol_wrapper {
227
- static func<This, Args extends any[], Result>(task: (this: This, ...args: Args) => Result): (this: This, ...args: Args) => Result;
228
- }
229
- class $mol_fiber<Value = any> extends $mol_wrapper {
230
- static logs: boolean;
231
- static wrap<Func extends (...args: any[]) => any>(task: Func): (this: ThisParameterType<Func>, ...args: Parameters<Func>) => any;
232
- static quant: number;
233
- static deadline: number;
234
- static liveline: number;
235
- static current: $mol_fiber<any> | null;
236
- static scheduled: $mol_after_frame | null;
237
- static queue: (() => PromiseLike<any>)[];
238
- static tick(): Promise<void>;
239
- static schedule(): Promise<any>;
240
- cursor: $mol_fiber_status;
241
- masters: (number | $mol_fiber<any> | undefined)[];
242
- calculate: () => Value;
243
- _value: Value;
244
- get value(): Value;
245
- set value(next: Value);
246
- _error: Error | PromiseLike<Value> | null;
247
- get error(): null | Error | PromiseLike<Value>;
248
- set error(next: null | Error | PromiseLike<Value>);
249
- schedule(): void;
250
- wake(): Value | undefined;
251
- push(value: Value): Value;
252
- fail(error: Error): Error;
253
- wait(promise: PromiseLike<Value>): PromiseLike<Value>;
254
- complete(): void;
255
- complete_master(master_index: number): void;
256
- pull(): void;
257
- update(): void;
258
- get(): Value;
259
- limit(): void;
260
- get master(): $mol_fiber;
261
- set master(next: $mol_fiber);
262
- rescue(master: $mol_fiber, master_index: number): void;
263
- obey(master: $mol_fiber, master_index: number): number;
264
- lead(slave: $mol_fiber, master_index: number): number;
265
- dislead(slave_index: number): void;
266
- disobey(master_index: number): void;
267
- obsolete_slaves(): void;
268
- obsolete(master_index: number): void;
269
- forget(): void;
270
- abort(): boolean;
271
- destructor(): void;
272
- }
273
- }
274
-
275
- declare namespace $ {
276
- namespace $$ { }
277
- const $mol_object_field: unique symbol;
278
- class $mol_object extends $mol_object2 {
279
- static make<Instance>(this: {
280
- new (): Instance;
281
- }, config: Partial<Instance>): Instance;
282
- }
283
- }
284
-
285
- declare namespace $ {
286
- function $mol_atom2_value<Value>(task: () => Value, next?: Value): Value | undefined;
287
- class $mol_atom2<Value = any> extends $mol_fiber<Value> {
288
- static logs: boolean;
289
- static get current(): $mol_atom2<any> | null;
290
- static cached: boolean;
291
- static cached_next: any;
292
- static reap_task: $mol_fiber<any> | null;
293
- static reap_queue: $mol_atom2<any>[];
294
- static reap(atom: $mol_atom2): void;
295
- slaves: (number | $mol_fiber<any> | undefined)[];
296
- rescue(master: $mol_atom2, cursor: number): void;
297
- subscribe(promise: Promise<unknown>): Promise<void>;
298
- get(): Value;
299
- pull(): void;
300
- get value(): Value;
301
- set value(next: Value);
302
- get error(): null | Error | PromiseLike<Value>;
303
- set error(next: null | Error | PromiseLike<Value>);
304
- put(next: Value): Value;
305
- complete_master(master_index: number): void;
306
- obey(master: $mol_fiber, master_index: number): number;
307
- lead(slave: $mol_fiber, master_index: number): number;
308
- dislead(slave_index: number): void;
309
- obsolete(master_index?: number): void;
310
- doubt(master_index?: number): void;
311
- obsolete_slaves(): void;
312
- doubt_slaves(): void;
313
- get fresh(): () => void;
314
- get alone(): boolean;
315
- get derived(): boolean;
316
- destructor(): void;
317
- }
318
- }
319
-
320
- declare namespace $ {
321
- function $mol_atom2_autorun(calculate: () => any): $mol_atom2<unknown>;
322
- }
323
-
324
- declare namespace $ {
325
- type $mol_type_param<Func, Index extends number> = Func extends (...params: infer Params) => any ? Params[Index] : Func extends new (...params: infer Params2) => any ? Params2[Index] : never;
326
- }
327
-
328
- declare namespace $ {
329
- type $mol_type_result<Func> = Func extends (...params: any) => infer Result ? Result : Func extends new (...params: any) => infer Result ? Result : never;
330
- }
331
-
332
- declare namespace $ {
333
- class $mol_mem_force extends Object {
334
- constructor();
335
- $mol_mem_force: boolean;
336
- static $mol_mem_force: boolean;
337
- static toString(): string;
338
- }
339
- class $mol_mem_force_cache extends $mol_mem_force {
340
- }
341
- class $mol_mem_force_update extends $mol_mem_force {
342
- }
343
- class $mol_mem_force_fail extends $mol_mem_force_cache {
344
- }
345
- }
346
-
347
- declare namespace $ {
348
- let $mol_mem_cached: typeof $mol_atom2_value;
349
- function $mol_mem_persist(): void;
350
- function $mol_mem<Host extends object, Field extends keyof Host, Prop extends Extract<Host[Field], (next?: any) => any>>(proto: Host, name: Field, descr?: TypedPropertyDescriptor<Prop>): {
351
- value: ((this: Host, next?: $mol_type_param<Prop, 0> | undefined, force?: $mol_mem_force | undefined) => any) & {
352
- orig: Function;
353
- };
354
- enumerable?: boolean | undefined;
355
- configurable?: boolean | undefined;
356
- writable?: boolean | undefined;
357
- get?: (() => Prop) | undefined;
358
- set?: ((value: Prop) => void) | undefined;
359
- };
360
- }
361
-
362
- declare namespace $ {
363
- function $mol_dict_key(value: any): any;
364
- class $mol_dict<Key, Value> extends Map<Key, Value> {
365
- get(key: Key): Value | undefined;
366
- has(key: Key): boolean;
367
- set(key: Key, value: Value): this;
368
- delete(key: Key): boolean;
369
- forEach(back: (value: Value, key: Key, dict: Map<Key, Value>) => void, context?: any): void;
370
- [Symbol.iterator](): {
371
- [Symbol.iterator](): any;
372
- next(): IteratorResult<[Key, Value], any>;
373
- };
374
- }
375
- }
376
-
377
- declare namespace $ {
378
- function $mol_mem_key<Host extends object, Field extends keyof Host, Prop extends Extract<Host[Field], (id: any, next?: any) => any>>(proto: Host, name: Field, descr?: TypedPropertyDescriptor<Prop>): any;
379
- }
380
-
381
- declare namespace $ {
382
- function $mol_const<Value>(value: Value): {
383
- (): Value;
384
- '()': Value;
385
- };
386
- }
387
-
388
- declare namespace $ {
389
- function $mol_charset_encode(value: string): Uint8Array;
390
- }
391
-
392
- declare namespace $ {
393
- type $mol_charset_encoding = 'utf8' | 'ibm866' | 'iso-8859-2' | 'iso-8859-3' | 'iso-8859-4' | 'iso-8859-5' | 'iso-8859-6' | 'iso-8859-7' | 'iso-8859-8' | 'iso-8859-8i' | 'iso-8859-10' | 'iso-8859-13' | 'iso-8859-14' | 'iso-8859-15' | 'iso-8859-16' | 'koi8-r' | 'koi8-u' | 'koi8-r' | 'macintosh' | 'windows-874' | 'windows-1250' | 'windows-1251' | 'windows-1252' | 'windows-1253' | 'windows-1254' | 'windows-1255' | 'windows-1256' | 'windows-1257' | 'windows-1258' | 'x-mac-cyrillic' | 'gbk' | 'gb18030' | 'hz-gb-2312' | 'big5' | 'euc-jp' | 'iso-2022-jp' | 'shift-jis' | 'euc-kr' | 'iso-2022-kr';
394
- function $mol_charset_decode(value: Uint8Array, code?: $mol_charset_encoding): string;
395
- }
396
-
397
- declare namespace $ {
398
- type $mol_file_type = 'file' | 'dir' | 'link';
399
- interface $mol_file_stat {
400
- type: $mol_file_type;
401
- size: number;
402
- atime: Date;
403
- mtime: Date;
404
- ctime: Date;
405
- }
406
- class $mol_file_not_found extends Error {
407
- }
408
- abstract class $mol_file extends $mol_object {
409
- static absolute(path: string): $mol_file;
410
- static relative(path: string): $mol_file;
411
- path(): string;
412
- parent(): $mol_file;
413
- abstract stat(next?: $mol_file_stat, force?: $mol_mem_force): $mol_file_stat;
414
- reset(): void;
415
- version(): string;
416
- abstract ensure(next?: boolean): boolean;
417
- watcher(): {
418
- destructor(): void;
419
- };
420
- exists(next?: boolean, force?: $mol_mem_force): boolean;
421
- type(): $mol_file_type;
422
- name(): string;
423
- ext(): string;
424
- abstract buffer(next?: Uint8Array, force?: $mol_mem_force): Uint8Array;
425
- text(next?: string, force?: $mol_mem_force): string;
426
- fail(error: Error): void;
427
- buffer_cached(buffer: Uint8Array): void;
428
- text_cached(content: string): void;
429
- abstract sub(): $mol_file[];
430
- abstract resolve(path: string): $mol_file;
431
- abstract relate(base?: $mol_file): string;
432
- abstract append(next: Uint8Array | string): void;
433
- find(include?: RegExp, exclude?: RegExp): $mol_file[];
434
- size(): number;
435
- }
436
- }
437
-
438
- declare namespace $ {
439
- function $mol_compare_array<Value extends ArrayLike<unknown>>(a: Value, b: Value): boolean;
440
- }
441
-
442
- declare namespace $ {
443
- class $mol_file_node extends $mol_file {
444
- static absolute(path: string): $mol_file_node;
445
- static relative(path: string): $mol_file_node;
446
- watcher(): {
447
- destructor(): void;
448
- };
449
- stat(next?: $mol_file_stat, force?: $mol_mem_force): $mol_file_stat;
450
- ensure(next?: boolean): boolean;
451
- buffer(next?: Uint8Array, force?: $mol_mem_force): Uint8Array;
452
- sub(): $mol_file[];
453
- resolve(path: string): $mol_file;
454
- relate(base?: $mol_file): any;
455
- append(next: Uint8Array | string): undefined;
456
- }
457
- }
458
-
459
- declare namespace $ {
460
- class $mol_server extends $mol_object {
461
- express(): any;
462
- http(): any;
463
- socket(): any;
464
- expressHandlers(): any[];
465
- expressCompressor(): unknown;
466
- expressBodier(): any;
467
- expressFiler(): any;
468
- expressDirector(): unknown;
469
- expressIndex(): (req: typeof $node.express.request, res: typeof $node.express.response, next: () => void) => void;
470
- expressGenerator(): (req: any, res: any, next: () => void) => void;
471
- bodyLimit(): string;
472
- cacheTime(): number;
473
- port(): number;
474
- rootPublic(): string;
475
- }
476
- }
477
-
478
- declare namespace $ {
479
- function $mol_fail_catch(error: object): boolean;
480
- }
481
-
482
- declare namespace $ {
483
- function $mol_diff_path<Item>(...paths: Item[][]): {
484
- prefix: Item[];
485
- suffix: Item[][];
486
- };
487
- }
488
-
489
- declare namespace $ {
490
- class $mol_error_mix extends Error {
491
- errors: Error[];
492
- constructor(message: string, ...errors: Error[]);
493
- toJSON(): string;
494
- }
495
- }
496
-
497
- declare namespace $ {
498
- function $mol_compare_deep<Value>(a: Value, b: Value): boolean;
499
- }
500
-
501
- declare namespace $ {
502
- class $mol_build_server extends $mol_server {
503
- static trace: boolean;
504
- expressGenerator(): (req: typeof $node.express.request, res: typeof $node.express.response, next: () => any) => Promise<any> | undefined;
505
- build(): $mol_build;
506
- generate(url: string): $mol_file[];
507
- expressIndex(): (req: typeof $node.express.request, res: typeof $node.express.response, next: () => void) => void;
508
- port(): number;
509
- start(): any;
510
- }
511
- }
512
-
513
- declare namespace $ {
514
- function $mol_exec(this: $mol_ambient_context, dir: string, command: string, ...args: string[]): any;
515
- }
516
-
517
- declare namespace $ {
518
- class $mol_span extends $mol_object2 {
519
- readonly uri: string;
520
- readonly row: number;
521
- readonly col: number;
522
- readonly length: number;
523
- constructor(uri: string, row: number, col: number, length: number);
524
- static unknown: $mol_span;
525
- static begin(uri: string): $mol_span;
526
- static entire(uri: string, length: number): $mol_span;
527
- toString(): string;
528
- toJSON(): {
529
- uri: string;
530
- row: number;
531
- col: number;
532
- length: number;
533
- };
534
- error(message: string, Class?: ErrorConstructor): Error;
535
- span(row: number, col: number, length: number): $mol_span;
536
- after(length: number): $mol_span;
537
- slice(begin: number, end: number): $mol_span;
538
- }
539
- }
540
-
541
- declare namespace $ {
542
- type $mol_tree2_path = Array<string | number | null>;
543
- type $mol_tree2_hack<Context> = (input: $mol_tree2, belt: $mol_tree2_belt<Context>, context: Context) => readonly $mol_tree2[];
544
- type $mol_tree2_belt<Context> = Record<string, $mol_tree2_hack<Context>>;
545
- class $mol_tree2 extends $mol_object2 {
546
- readonly type: string;
547
- readonly value: string;
548
- readonly kids: readonly $mol_tree2[];
549
- readonly span: $mol_span;
550
- constructor(type: string, value: string, kids: readonly $mol_tree2[], span: $mol_span);
551
- static list(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
552
- list(kids: readonly $mol_tree2[]): $mol_tree2;
553
- static data(value: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
554
- data(value: string, kids?: readonly $mol_tree2[]): $mol_tree2;
555
- static struct(type: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
556
- struct(type: string, kids?: readonly $mol_tree2[]): $mol_tree2;
557
- clone(kids: readonly $mol_tree2[]): $mol_tree2;
558
- text(): string;
559
- static fromString(str: string, span?: $mol_span): $mol_tree2;
560
- toString(prefix?: string): string;
561
- insert(value: $mol_tree2, ...path: $mol_tree2_path): $mol_tree2;
562
- select(...path: $mol_tree2_path): $mol_tree2;
563
- filter(path: string[], value?: string): $mol_tree2;
564
- hack<Context = never>(belt: $mol_tree2_belt<Context>, context?: Context): $mol_tree2[];
565
- error(message: string, Class?: ErrorConstructor): Error;
566
- }
567
- class $mol_tree2_empty extends $mol_tree2 {
568
- constructor();
569
- }
570
- }
571
-
572
- declare namespace $ {
573
- function $mol_view_tree2_child(this: $mol_ambient_context, tree: $mol_tree2): $mol_tree2;
574
- }
575
-
576
- declare namespace $ {
577
- function $mol_view_tree2_classes(defs: $mol_tree2): $mol_tree2;
578
- }
579
-
580
- declare namespace $ {
581
- type $mol_view_tree2_locales = Record<string, string>;
582
- class $mol_view_tree2_context extends $mol_object2 {
583
- protected parents: readonly $mol_view_tree2_prop[];
584
- protected locales: $mol_view_tree2_locales;
585
- protected methods: $mol_tree2[];
586
- readonly types: boolean;
587
- protected added_nodes: Map<string, {
588
- src: $mol_tree2;
589
- name: $mol_tree2;
590
- key: $mol_tree2 | undefined;
591
- next: $mol_tree2 | undefined;
592
- }>;
593
- protected array?: $mol_tree2 | undefined;
594
- constructor($: $mol_ambient_context, parents: readonly $mol_view_tree2_prop[], locales: $mol_view_tree2_locales, methods: $mol_tree2[], types?: boolean, added_nodes?: Map<string, {
595
- src: $mol_tree2;
596
- name: $mol_tree2;
597
- key: $mol_tree2 | undefined;
598
- next: $mol_tree2 | undefined;
599
- }>, array?: $mol_tree2 | undefined);
600
- protected clone(prefixes: readonly $mol_view_tree2_prop[], array?: $mol_tree2): $mol_view_tree2_context;
601
- parent(prefix: $mol_view_tree2_prop): $mol_view_tree2_context;
602
- root(): $mol_view_tree2_context;
603
- locale_disable(array: $mol_tree2): $mol_view_tree2_context;
604
- get_method({ name, src, key, next }: $mol_view_tree2_prop): {
605
- src: $mol_tree2;
606
- name: $mol_tree2;
607
- key: $mol_tree2 | undefined;
608
- next: $mol_tree2 | undefined;
609
- } | undefined;
610
- check_scope_vars({ name, key, next }: $mol_view_tree2_prop): undefined;
611
- index(owner: $mol_view_tree2_prop): number;
612
- method(index: number, method: $mol_tree2): void;
613
- protected locale_nodes: Map<string, $mol_tree2>;
614
- locale(operator: $mol_tree2): $mol_tree2;
615
- }
616
- }
617
-
618
- declare namespace $ {
619
- class $mol_view_tree2_error extends Error {
620
- readonly spans: readonly $mol_span[];
621
- constructor(message: string, spans: readonly $mol_span[]);
622
- toJSON(): {
623
- message: string;
624
- spans: readonly $mol_span[];
625
- };
626
- }
627
- class $mol_view_tree2_error_suggestions {
628
- readonly suggestions: readonly string[];
629
- constructor(suggestions: readonly string[]);
630
- toString(): string;
631
- toJSON(): readonly string[];
632
- }
633
- function $mol_view_tree2_error_str(strings: readonly string[], ...parts: readonly ($mol_span | readonly $mol_span[] | string | number | $mol_view_tree2_error_suggestions)[]): $mol_view_tree2_error;
634
- }
635
-
636
- declare namespace $ {
637
- function $mol_view_tree2_serialize(this: $mol_ambient_context, node: $mol_tree2, prefix?: string, parent_is_inline?: boolean): string;
638
- }
639
-
640
- declare namespace $ {
641
- function $mol_view_tree2_class_props(this: $mol_ambient_context, klass: $mol_tree2): $mol_tree2;
642
- }
643
-
644
- declare namespace $ {
645
- function $mol_view_tree2_class_super(this: $mol_ambient_context, klass: $mol_tree2): $mol_tree2;
646
- }
647
-
648
- declare namespace $ {
649
- type $mol_view_tree2_prop = ReturnType<typeof $mol_view_tree2_prop_split>;
650
- function $mol_view_tree2_prop_name(this: $mol_ambient_context, prop: $mol_tree2): string;
651
- function $mol_view_tree2_prop_key(this: $mol_ambient_context, prop: $mol_tree2): string | undefined;
652
- function $mol_view_tree2_prop_next(this: $mol_ambient_context, prop: $mol_tree2): string | undefined;
653
- }
654
-
655
- declare namespace $ {
656
- function $mol_view_tree2_prop_quote(name: $mol_tree2): $mol_tree2;
657
- }
658
-
659
- declare namespace $ {
660
- function $mol_view_tree2_prop_split(this: $mol_ambient_context, src: $mol_tree2): {
661
- src: $mol_tree2;
662
- name: $mol_tree2;
663
- key: $mol_tree2 | undefined;
664
- next: $mol_tree2 | undefined;
665
- };
666
- }
667
-
668
- declare namespace $ {
669
- function $mol_view_tree2_bind_both_parts(this: $mol_ambient_context, operator: $mol_tree2): {
670
- owner_parts: {
671
- src: $mol_tree2;
672
- name: $mol_tree2;
673
- key: $mol_tree2 | undefined;
674
- next: $mol_tree2 | undefined;
675
- };
676
- default_value: $mol_tree2 | undefined;
677
- };
678
- }
679
-
680
- declare namespace $ {
681
- function $mol_view_tree2_bind_left_parts(this: $mol_ambient_context, operator: $mol_tree2, having_parts?: $mol_view_tree2_prop): {
682
- default_value: $mol_tree2 | undefined;
683
- owner_call_parts: {
684
- src: $mol_tree2;
685
- name: $mol_tree2;
686
- key: $mol_tree2 | undefined;
687
- next: $mol_tree2 | undefined;
688
- };
689
- owner_parts: {
690
- src: $mol_tree2;
691
- name: $mol_tree2;
692
- key: $mol_tree2 | undefined;
693
- next: $mol_tree2 | undefined;
694
- };
695
- };
696
- }
697
-
698
- declare namespace $ {
699
- function $mol_view_tree2_bind_right_parts(this: $mol_ambient_context, operator: $mol_tree2, having_parts: $mol_view_tree2_prop, factory: $mol_view_tree2_prop): {
700
- owner_parts: {
701
- src: $mol_tree2;
702
- name: $mol_tree2;
703
- key: $mol_tree2 | undefined;
704
- next: $mol_tree2 | undefined;
705
- };
706
- };
707
- }
708
-
709
- declare namespace $ {
710
- function $mol_view_tree2_ts_bind_both(this: $mol_ambient_context, operator: $mol_tree2, context: $mol_view_tree2_context): $mol_tree2;
711
- }
712
-
713
- declare namespace $ {
714
- function $mol_view_tree2_ts_bind_left(this: $mol_ambient_context, operator: $mol_tree2, context: $mol_view_tree2_context, having_parts?: $mol_view_tree2_prop): $mol_tree2;
715
- }
716
-
717
- declare namespace $ {
718
- function $mol_view_tree2_ts_bind_right(this: $mol_ambient_context, operator: $mol_tree2, having_parts: $mol_view_tree2_prop, factory: $mol_view_tree2_prop, context: $mol_view_tree2_context): undefined;
719
- }
720
-
721
- declare namespace $ {
722
- function $mol_view_tree2_ts_array(this: $mol_ambient_context, operator: $mol_tree2, context: $mol_view_tree2_context, super_method?: $mol_view_tree2_prop | undefined): $mol_tree2;
723
- }
724
-
725
- declare namespace $ {
726
- function $mol_view_tree2_ts_array_body(this: $mol_ambient_context, operator: $mol_tree2, parent_context: $mol_view_tree2_context, super_method?: $mol_view_tree2_prop): $mol_tree2;
727
- }
728
-
729
- declare namespace $ {
730
- function $mol_view_tree2_ts_method_body(this: $mol_ambient_context, having_parts: $mol_view_tree2_prop, parent_context: $mol_view_tree2_context): undefined;
731
- }
732
-
733
- declare namespace $ {
734
- function $mol_view_tree2_ts_method(this: $mol_ambient_context, owner_parts: $mol_view_tree2_prop, body: $mol_tree2, types?: boolean): $mol_tree2;
735
- }
736
-
737
- declare namespace $ {
738
- var $mol_dom_context: typeof globalThis;
739
- }
740
-
741
- declare namespace $ {
742
- }
743
-
744
- declare namespace $ {
745
- class $mol_state_local<Value> extends $mol_object {
746
- static 'native()': Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>;
747
- static native(): Storage | {
748
- getItem(key: string): any;
749
- setItem(key: string, value: string): void;
750
- removeItem(key: string): void;
751
- };
752
- static value<Value>(key: string, next?: Value, force?: $mol_mem_force): Value | null;
753
- prefix(): string;
754
- value(key: string, next?: Value): Value | null;
755
- }
756
- }
757
-
758
- declare namespace $ {
759
- interface $mol_locale_dict {
760
- [key: string]: string;
761
- }
762
- class $mol_locale extends $mol_object {
763
- static lang_default(): string;
764
- static lang(next?: string): string;
765
- static source(lang: string): any;
766
- static texts(lang: string, next?: $mol_locale_dict): $mol_locale_dict;
767
- static text(key: string): string;
768
- static warn(key: string): null;
769
- }
770
- }
771
-
772
- declare namespace $ {
773
- function $mol_view_tree2_value_type(this: $mol_ambient_context, val: $mol_tree2): "string" | "object" | "number" | "null" | "locale" | "bool" | "dict" | "get" | "bind" | "put" | "list";
774
- }
775
-
776
- declare namespace $ {
777
- function $mol_view_tree2_value(this: $mol_ambient_context, value: $mol_tree2): $mol_tree2;
778
- }
779
-
780
- declare namespace $ {
781
- function $mol_view_tree2_ts_class(this: $mol_ambient_context, klass: $mol_tree2, locales: $mol_view_tree2_locales): $mol_tree2;
782
- }
783
-
784
- declare namespace $ {
785
- function $mol_view_tree2_ts_comment(this: $mol_ambient_context, item: $mol_tree2): $mol_tree2;
786
- function $mol_view_tree2_ts_comment_doc(this: $mol_ambient_context, item: $mol_tree2): $mol_tree2;
787
- }
788
-
789
- declare namespace $ {
790
- function $mol_view_tree2_ts_compile(this: $mol_ambient_context, tree2_module: $mol_tree2): {
791
- script: string;
792
- locales: Record<string, string>;
793
- };
794
- }
795
-
796
- declare namespace $ {
797
- function $mol_view_tree2_ts_dictionary(this: $mol_ambient_context, dictionary: $mol_tree2, dictionary_context: $mol_view_tree2_context, super_method?: $mol_view_tree2_prop): $mol_tree2;
798
- }
799
-
800
- declare namespace $ {
801
- function $mol_view_tree2_ts_factory(this: $mol_ambient_context, klass: $mol_tree2, factory: $mol_view_tree2_prop, factory_context: $mol_view_tree2_context): $mol_tree2;
802
- }
803
-
804
- declare namespace $ {
805
- function $mol_view_tree2_ts_function_declaration({ name, key, next }: Pick<$mol_view_tree2_prop, 'name' | 'key' | 'next'>, types?: boolean): $mol_tree2;
806
- function $mol_view_tree2_ts_function_call({ name, key, next }: Pick<$mol_view_tree2_prop, 'name' | 'key' | 'next'>): $mol_tree2;
807
- }
808
-
809
- declare namespace $ {
810
- function $mol_view_tree2_ts_locale(operator: $mol_tree2, context: $mol_view_tree2_context): $mol_tree2;
811
- }
812
-
813
- declare namespace $ {
814
- function $mol_view_tree2_ts_module(this: $mol_ambient_context, tree2_module: $mol_tree2, locales: $mol_view_tree2_locales): $mol_tree2;
815
- }
816
-
817
- declare namespace $ {
818
- function $mol_view_tree2_ts_spread(this: $mol_ambient_context, spread_prop: $mol_tree2): $mol_tree2;
819
- class $mol_view_tree2_ts_spread_factory extends $mol_object2 {
820
- protected prop_parts?: {
821
- src: $mol_tree2;
822
- name: $mol_tree2;
823
- key: $mol_tree2 | undefined;
824
- next: $mol_tree2 | undefined;
825
- } | undefined;
826
- protected super_spread: $mol_tree2 | undefined;
827
- constructor($: $mol_ambient_context, prop_parts?: {
828
- src: $mol_tree2;
829
- name: $mol_tree2;
830
- key: $mol_tree2 | undefined;
831
- next: $mol_tree2 | undefined;
832
- } | undefined);
833
- create(prop: $mol_tree2): $mol_tree2;
834
- }
835
- }
836
-
837
- declare namespace $ {
838
- function $mol_view_tree2_ts_value(this: $mol_ambient_context, src: $mol_tree2): $mol_tree2;
839
- }
840
-
841
- declare namespace $ {
842
- class $mol_graph<Node, Edge> {
843
- nodes: Set<Node>;
844
- edges_out: Map<Node, Map<Node, Edge>>;
845
- edges_in: Map<Node, Map<Node, Edge>>;
846
- link_out(from: Node, to: Node, edge: Edge): void;
847
- link_in(to: Node, from: Node, edge: Edge): void;
848
- edge_out(from: Node, to: Node): NonNullable<Edge> | null;
849
- edge_in(to: Node, from: Node): NonNullable<Edge> | null;
850
- link(from: Node, to: Node, edge: Edge): void;
851
- unlink(from: Node, to: Node): void;
852
- acyclic(get_weight: (edge: Edge) => number): void;
853
- get sorted(): Set<Node>;
854
- }
855
- }
856
-
857
- declare namespace $ {
858
- const sourcemap_codec: any;
859
- type SourceMapLine = ReturnType<typeof sourcemap_codec.decode>[0];
860
- export interface $mol_sourcemap_raw {
861
- version: number;
862
- sources: string[];
863
- names: string[];
864
- sourceRoot?: string;
865
- sourcesContent?: (string | null)[];
866
- mappings: string | SourceMapLine[];
867
- file: string;
868
- }
869
- export class $mol_sourcemap_builder {
870
- readonly file: string;
871
- readonly separator: string;
872
- version: number;
873
- protected sourceRoot: string;
874
- protected separator_count: number;
875
- constructor(file: string, separator?: string);
876
- protected chunks: string[];
877
- protected segment_lines: SourceMapLine[];
878
- protected sources: string[];
879
- protected source_indexes: Map<string, number>;
880
- protected names: string[];
881
- protected name_indexes: Map<string, number>;
882
- protected sourceContent: (null | string)[];
883
- get content(): string;
884
- get sourcemap(): $mol_sourcemap_raw;
885
- toJSON(): $mol_sourcemap_raw;
886
- toString(): string;
887
- protected add_chunk(content: string): void;
888
- protected add_content(content: string, file?: string): void;
889
- add(content: string, file?: string, raw?: $mol_sourcemap_raw | string): void;
890
- }
891
- export {};
892
- }
893
-
894
- declare namespace $ {
895
- function $mol_base64_encode(src: string | Uint8Array): string;
896
- }
897
-
898
- declare namespace $ {
899
- function $mol_base64_encode_node(str: string | Uint8Array): string;
900
- }
901
-
902
- declare namespace $ {
903
- function $mol_build_start(this: $mol_ambient_context, paths: string[]): void;
904
- class $mol_build extends $mol_object {
905
- static root(path: string): $mol_build;
906
- static relative(path: string): $mol_build;
907
- server(): $mol_build_server;
908
- root(): $mol_file;
909
- metaTreeTranspile(path: string): $mol_file[];
910
- viewTreeTranspile(path: string): $mol_file[];
911
- cssTranspile(path: string): $mol_file[];
912
- mods({ path, exclude }: {
913
- path: string;
914
- exclude?: string[];
915
- }): $mol_file[];
916
- sources({ path, exclude }: {
917
- path: string;
918
- exclude?: string[];
919
- }): $mol_file[];
920
- sourcesSorted({ path, exclude }: {
921
- path: string;
922
- exclude?: string[];
923
- }): $mol_file[];
924
- sourcesAll({ path, exclude }: {
925
- path: string;
926
- exclude?: string[];
927
- }): $mol_file[];
928
- tsOptions(): any;
929
- tsSource({ path, target }: {
930
- path: string;
931
- target: number;
932
- }): any;
933
- tsPaths({ path, exclude, bundle }: {
934
- path: string;
935
- bundle: string;
936
- exclude: string[];
937
- }): string[];
938
- tsHost({ path, exclude, bundle }: {
939
- path: string;
940
- bundle: string;
941
- exclude: string[];
942
- }): any;
943
- tsTranspiler({ path, exclude, bundle }: {
944
- path: string;
945
- bundle: string;
946
- exclude: string[];
947
- }): any;
948
- tsTranspile({ path, exclude, bundle }: {
949
- path: string;
950
- bundle: string;
951
- exclude: string[];
952
- }): any;
953
- tsService({ path, exclude, bundle }: {
954
- path: string;
955
- bundle: string;
956
- exclude: string[];
957
- }): {
958
- recheck: () => void;
959
- destructor: () => any;
960
- } | null;
961
- js_error(path: string, next?: Error | null): Error | null;
962
- js_content(path: string): {
963
- text: string;
964
- map: $mol_sourcemap_raw | undefined;
965
- };
966
- sourcesJS({ path, exclude }: {
967
- path: string;
968
- exclude: string[];
969
- }): $mol_file[];
970
- sourcesDTS({ path, exclude }: {
971
- path: string;
972
- exclude?: string[];
973
- }): $mol_file[];
974
- sourcesCSS({ path, exclude }: {
975
- path: string;
976
- exclude?: string[];
977
- }): $mol_file[];
978
- static dependors: {
979
- [index: string]: undefined | ((source: $mol_file) => {
980
- [index: string]: number;
981
- });
982
- };
983
- srcDeps(path: string): {
984
- [index: string]: number;
985
- };
986
- modDeps({ path, exclude }: {
987
- path: string;
988
- exclude?: string[];
989
- }): {
990
- [index: string]: number;
991
- };
992
- dependencies({ path, exclude }: {
993
- path: string;
994
- exclude?: string[];
995
- }): {
996
- [index: string]: number;
997
- };
998
- modEnsure(path: string): boolean;
999
- modMeta(path: string): $mol_tree;
1000
- graph({ path, exclude }: {
1001
- path: string;
1002
- exclude?: string[];
1003
- }): $mol_graph<string, {
1004
- priority: number;
1005
- }>;
1006
- bundleAll({ path }: {
1007
- path: string;
1008
- }): void;
1009
- bundle({ path, bundle }: {
1010
- path: string;
1011
- bundle?: string;
1012
- }): $mol_file[];
1013
- logBundle(target: $mol_file, duration: number): void;
1014
- bundleJS({ path, exclude, bundle, moduleTarget }: {
1015
- path: string;
1016
- exclude: string[];
1017
- bundle: string;
1018
- moduleTarget?: string;
1019
- }): $mol_file[];
1020
- bundleAuditJS({ path, exclude, bundle }: {
1021
- path: string;
1022
- exclude: string[];
1023
- bundle: string;
1024
- }): $mol_file[];
1025
- bundleTestJS({ path, exclude, bundle }: {
1026
- path: string;
1027
- exclude: string[];
1028
- bundle: string;
1029
- }): $mol_file[];
1030
- bundleTestHtml({ path }: {
1031
- path: string;
1032
- }): $mol_file[];
1033
- bundleDTS({ path, exclude, bundle }: {
1034
- path: string;
1035
- exclude?: string[];
1036
- bundle: string;
1037
- }): $mol_file[];
1038
- bundleViewTree({ path, exclude, bundle }: {
1039
- path: string;
1040
- exclude?: string[];
1041
- bundle: string;
1042
- }): $mol_file[];
1043
- nodeDeps({ path, exclude }: {
1044
- path: string;
1045
- exclude: string[];
1046
- }): string[];
1047
- bundlePackageJSON({ path, exclude }: {
1048
- path: string;
1049
- exclude: string[];
1050
- }): $mol_file[];
1051
- bundleIndexHtml({ path, exclude }: {
1052
- path: string;
1053
- exclude?: string[];
1054
- }): $mol_file[];
1055
- bundleFiles({ path, exclude }: {
1056
- path: string;
1057
- exclude?: string[];
1058
- }): $mol_file[];
1059
- bundleCordova({ path, exclude }: {
1060
- path: string;
1061
- exclude?: string[];
1062
- }): $mol_file[];
1063
- bundleCSS({ path, exclude, bundle }: {
1064
- path: string;
1065
- exclude?: string[];
1066
- bundle: string;
1067
- }): $mol_file[];
1068
- bundleLocale({ path, exclude, bundle }: {
1069
- path: string;
1070
- exclude?: string[];
1071
- bundle: string;
1072
- }): $mol_file[];
1073
- bundleDepsJSON({ path, exclude, bundle }: {
1074
- path: string;
1075
- exclude?: string[];
1076
- bundle: string;
1077
- }): $mol_file[];
1078
- }
1079
- }
1080
-
1081
- declare namespace $ {
1082
- class $mol_after_tick extends $mol_object2 {
1083
- task: () => void;
1084
- promise: any;
1085
- cancelled: boolean;
1086
- constructor(task: () => void);
1087
- destructor(): void;
1088
- }
1089
- }
1090
-
1091
- declare namespace $ {
1092
- function $mol_style_attach(id: string, text: string): HTMLStyleElement | null;
1093
- }
1094
-
1095
- declare namespace $ {
1096
- class $mol_decor<Value> {
1097
- readonly value: Value;
1098
- constructor(value: Value);
1099
- prefix(): string;
1100
- valueOf(): Value;
1101
- postfix(): string;
1102
- toString(): string;
1103
- }
1104
- }
1105
-
1106
- declare namespace $ {
1107
- type $mol_style_unit_length = '%' | 'px' | 'cm' | 'mm' | 'Q' | 'in' | 'pc' | 'pt' | 'cap' | 'ch' | 'em' | 'rem' | 'ex' | 'ic' | 'lh' | 'rlh' | 'vh' | 'vw' | 'vi' | 'vb' | 'vmin' | 'vmax';
1108
- type $mol_style_unit_angle = 'deg' | 'rad' | 'grad' | 'turn';
1109
- type $mol_style_unit_time = 's' | 'ms';
1110
- type $mol_style_unit_any = $mol_style_unit_length | $mol_style_unit_angle | $mol_style_unit_time;
1111
- class $mol_style_unit<Literal extends $mol_style_unit_any> extends $mol_decor<number> {
1112
- readonly literal: Literal;
1113
- constructor(value: number, literal: Literal);
1114
- postfix(): Literal;
1115
- static per(value: number): $mol_style_unit<"%">;
1116
- static px(value: number): $mol_style_unit<"px">;
1117
- static mm(value: number): $mol_style_unit<"mm">;
1118
- static cm(value: number): $mol_style_unit<"cm">;
1119
- static Q(value: number): $mol_style_unit<"Q">;
1120
- static in(value: number): $mol_style_unit<"in">;
1121
- static pc(value: number): $mol_style_unit<"pc">;
1122
- static pt(value: number): $mol_style_unit<"pt">;
1123
- static cap(value: number): $mol_style_unit<"cap">;
1124
- static ch(value: number): $mol_style_unit<"ch">;
1125
- static em(value: number): $mol_style_unit<"em">;
1126
- static rem(value: number): $mol_style_unit<"rem">;
1127
- static ex(value: number): $mol_style_unit<"ex">;
1128
- static ic(value: number): $mol_style_unit<"ic">;
1129
- static lh(value: number): $mol_style_unit<"lh">;
1130
- static rlh(value: number): $mol_style_unit<"rlh">;
1131
- static vh(value: number): $mol_style_unit<"vh">;
1132
- static vw(value: number): $mol_style_unit<"vw">;
1133
- static vi(value: number): $mol_style_unit<"vi">;
1134
- static vb(value: number): $mol_style_unit<"vb">;
1135
- static vmin(value: number): $mol_style_unit<"vmin">;
1136
- static vmax(value: number): $mol_style_unit<"vmax">;
1137
- static deg(value: number): $mol_style_unit<"deg">;
1138
- static rad(value: number): $mol_style_unit<"rad">;
1139
- static grad(value: number): $mol_style_unit<"grad">;
1140
- static turn(value: number): $mol_style_unit<"turn">;
1141
- static s(value: number): $mol_style_unit<"s">;
1142
- static ms(value: number): $mol_style_unit<"ms">;
1143
- }
1144
- }
1145
-
1146
- declare namespace $ {
1147
- type $mol_style_func_name = 'calc' | 'hsla' | 'rgba' | 'var' | 'url';
1148
- class $mol_style_func<Name extends $mol_style_func_name, Value = unknown> extends $mol_decor<Value> {
1149
- readonly name: Name;
1150
- constructor(name: Name, value: Value);
1151
- prefix(): string;
1152
- postfix(): string;
1153
- static calc<Value>(value: Value): $mol_style_func<"calc", Value>;
1154
- static vary<Name extends string>(name: Name): $mol_style_func<"var", Name>;
1155
- static url<Href extends string>(href: Href): $mol_style_func<"url", string>;
1156
- static hsla(hue: number, saturation: number, lightness: number, alpha: number): $mol_style_func<"hsla", (number | $mol_style_unit<"%">)[]>;
1157
- static rgba(red: number, green: number, blue: number, alpha: number): $mol_style_func<"rgba", number[]>;
1158
- }
1159
- }
1160
-
1161
- declare namespace $ {
1162
- }
1163
-
1164
- declare namespace $ {
1165
- const $mol_theme: {
1166
- back: $mol_style_func<"var", "--mol_theme_back">;
1167
- hover: $mol_style_func<"var", "--mol_theme_hover">;
1168
- current: $mol_style_func<"var", "--mol_theme_current">;
1169
- text: $mol_style_func<"var", "--mol_theme_text">;
1170
- control: $mol_style_func<"var", "--mol_theme_control">;
1171
- shade: $mol_style_func<"var", "--mol_theme_shade">;
1172
- line: $mol_style_func<"var", "--mol_theme_line">;
1173
- focus: $mol_style_func<"var", "--mol_theme_focus">;
1174
- field: $mol_style_func<"var", "--mol_theme_field">;
1175
- image: $mol_style_func<"var", "--mol_theme_image">;
1176
- };
1177
- }
1178
-
1179
- declare namespace $ {
1180
- }
1181
-
1182
- declare namespace $ {
1183
- class $mol_window extends $mol_object {
1184
- static size(next?: {
1185
- width: number;
1186
- height: number;
1187
- }): {
1188
- width: number;
1189
- height: number;
1190
- };
1191
- }
1192
- }
1193
-
1194
- declare namespace $ {
1195
- class $mol_defer extends $mol_object {
1196
- run: () => void;
1197
- constructor(run: () => void);
1198
- destructor(): void;
1199
- static all: $mol_defer[];
1200
- static timer: any;
1201
- static scheduleNative: (handler: () => void) => any;
1202
- static schedule(): void;
1203
- static unschedule(): void;
1204
- static add(defer: $mol_defer): void;
1205
- static drop(defer: $mol_defer): void;
1206
- static run(): void;
1207
- }
1208
- }
1209
-
1210
- declare namespace $ {
1211
- class $mol_view_selection extends $mol_object {
1212
- static focused(next?: Element[]): Element[];
1213
- static focus(event: FocusEvent): void;
1214
- static blur(event: FocusEvent): void;
1215
- }
1216
- }
1217
-
1218
- declare namespace $ {
1219
- function $mol_dom_qname(name: string): string;
1220
- }
1221
-
1222
- declare namespace $ {
1223
- function $mol_dom_render_attributes(el: Element, attrs: {
1224
- [key: string]: string | number | boolean | null;
1225
- }): void;
1226
- }
1227
-
1228
- declare namespace $ {
1229
- function $mol_dom_render_styles(el: Element, styles: {
1230
- [key: string]: string | number;
1231
- }): void;
1232
- }
1233
-
1234
- declare namespace $ {
1235
- function $mol_dom_render_fields(el: Element, fields: {
1236
- [key: string]: any;
1237
- }): void;
1238
- }
1239
-
1240
- declare namespace $ {
1241
- function $mol_dom_render_children(el: Element, childNodes: NodeList | Array<Node | string | null>): void;
1242
- }
1243
-
1244
- declare namespace $ {
1245
- class $mol_memo extends $mol_wrapper {
1246
- static wrap<This extends object, Value>(task: (this: This, next?: Value) => Value): (this: This, next?: Value | undefined) => Value | undefined;
1247
- }
1248
- }
1249
-
1250
- declare namespace $ {
1251
- function $mol_func_name(this: $mol_ambient_context, func: Function): string;
1252
- function $mol_func_name_from<Target extends Function>(target: Target, source: Function): Target;
1253
- }
1254
-
1255
- declare namespace $ {
1256
- type $mol_type_keys_extract<Input, Upper> = {
1257
- [Field in keyof Input]: unknown extends Input[Field] ? never : Input[Field] extends never ? never : Input[Field] extends Upper ? Field : never;
1258
- }[keyof Input];
1259
- }
1260
-
1261
- declare namespace $ {
1262
- type $mol_type_pick<Input, Upper> = Pick<Input, $mol_type_keys_extract<Input, Upper>>;
1263
- }
1264
-
1265
- declare namespace $ {
1266
- }
1267
-
1268
- declare namespace $ {
1269
- type $mol_view_content = $mol_view | Node | string | number | boolean;
1270
- function $mol_view_visible_width(): number;
1271
- function $mol_view_visible_height(): number;
1272
- function $mol_view_state_key(suffix: string): string;
1273
- class $mol_view extends $mol_object {
1274
- static Root<This extends typeof $mol_view>(this: This, id: number): InstanceType<This>;
1275
- autorun(): $mol_atom2<unknown>;
1276
- static autobind(): void;
1277
- title(): string;
1278
- focused(next?: boolean): boolean;
1279
- state_key(suffix?: string): string;
1280
- dom_name(): string;
1281
- dom_name_space(): string;
1282
- sub(): readonly (string | number | boolean | Node | $mol_view)[];
1283
- sub_visible(): readonly (string | number | boolean | Node | $mol_view)[];
1284
- minimal_width(): number;
1285
- maximal_width(): number;
1286
- minimal_height(): number;
1287
- static watchers: Set<$mol_view>;
1288
- view_rect(): ClientRect | null;
1289
- view_rect_cache(next?: ClientRect | null): ClientRect | null;
1290
- view_rect_watcher(): {
1291
- destructor: () => boolean;
1292
- };
1293
- dom_id(): any;
1294
- dom_node(next?: Element): Element;
1295
- dom_tree(next?: Element): Element;
1296
- dom_node_actual(): Element;
1297
- render(): void;
1298
- static view_classes(): (typeof $mol_view)[];
1299
- view_names_owned(): string[];
1300
- view_names(): string[];
1301
- attr_static(): {
1302
- [key: string]: string | number | boolean | null;
1303
- };
1304
- attr(): {};
1305
- style(): {
1306
- [key: string]: string | number;
1307
- };
1308
- field(): {
1309
- [key: string]: any;
1310
- };
1311
- event(): {
1312
- [key: string]: (event: Event) => void;
1313
- };
1314
- event_async(): {
1315
- [key: string]: (event: Event) => void;
1316
- };
1317
- plugins(): readonly $mol_view[];
1318
- view_find(check: (path: $mol_view, text?: string) => boolean, path?: $mol_view[]): Generator<$mol_view[]>;
1319
- force_render(path: Set<$mol_view>): void;
1320
- ensure_visible(view: $mol_view): Promise<void>;
1321
- }
1322
- type $mol_view_all = $mol_type_pick<$mol_ambient_context, typeof $mol_view>;
1323
- }
1324
-
1325
- declare namespace $ {
1326
- class $mol_view_tree_test_attributes_super extends $mol_view {
1327
- some(): {
1328
- a: number;
1329
- b: number;
1330
- };
1331
- }
1332
- class $mol_view_tree_test_attributes extends $mol_view_tree_test_attributes_super {
1333
- some(): {
1334
- a: number;
1335
- b: number;
1336
- };
1337
- }
1338
- }
1339
-
1340
- declare namespace $ {
1341
- class $mol_view_tree_test_binding extends $mol_view {
1342
- value(val?: any): any;
1343
- enabled(): boolean;
1344
- task_title_new(val?: any): any;
1345
- head_complete_enabled(): boolean;
1346
- }
1347
- }
1348
-
1349
- declare namespace $ {
1350
- class $mol_view_tree_test_binding_right extends $mol_view {
1351
- Test(): $mol_view_tree_test_binding_right_test;
1352
- outer_width(v?: any): any;
1353
- }
1354
- class $mol_view_tree_test_binding_right_test extends $mol_view {
1355
- width(val?: any): any;
1356
- }
1357
- }
1358
-
1359
- declare namespace $ {
1360
- class $mol_view_tree_test_simple extends $mol_view {
1361
- some(): number;
1362
- bool(): boolean;
1363
- str(): string;
1364
- arr(): readonly any[];
1365
- arr_string(): readonly string[];
1366
- }
1367
- }
1368
-
1369
- declare namespace $ {
1370
- class $mol_view_tree_test_attributes_subcomponent extends $mol_view {
1371
- Page(index: any): $mol_view_tree_test_attributes_subcomponent_page;
1372
- page(index: any): any;
1373
- }
1374
- class $mol_view_tree_test_attributes_subcomponent_page extends $mol_view {
1375
- Sub(): any;
1376
- }
1377
- }
1378
-
1379
- declare namespace $ {
1380
- function $mol_view_tree_trim_remarks(def: $mol_tree): $mol_tree;
1381
- function $mol_view_tree_classes(defs: $mol_tree): $mol_tree;
1382
- function $mol_view_tree_class_name(val: $mol_tree): string;
1383
- function $mol_view_tree_super_name(val: $mol_tree): string;
1384
- function $mol_view_tree_class_props(def: $mol_tree): $mol_tree;
1385
- function $mol_view_tree_prop_name(prop: $mol_tree): string;
1386
- function $mol_view_tree_prop_key(prop: $mol_tree): string;
1387
- function $mol_view_tree_prop_next(prop: $mol_tree): string;
1388
- function $mol_view_tree_prop_value(prop: $mol_tree): $mol_tree;
1389
- function $mol_view_tree_value_type(val: $mol_tree): "string" | "object" | "number" | "null" | "locale" | "bool" | "dict" | "get" | "bind" | "put" | "list";
1390
- function $mol_view_tree_compile(tree: $mol_tree): {
1391
- script: string;
1392
- locales: {
1393
- [key: string]: string;
1394
- };
1395
- };
1396
- }
1397
-
1398
- declare namespace $ {
1399
- class $mol_plugin extends $mol_view {
1400
- dom_node(next?: Element): Element;
1401
- attr_static(): {
1402
- [key: string]: string | number | boolean;
1403
- };
1404
- event(): {
1405
- [key: string]: (event: Event) => void;
1406
- };
1407
- render(): void;
1408
- }
1409
- }
2
+ export = $;