mol_view_tree2_lib 1.0.1
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/.nojekyll +0 -0
- package/README.md +608 -0
- package/node.audit.js +2 -0
- package/node.d.ts +1093 -0
- package/node.d.ts.map +1 -0
- package/node.deps.json +1 -0
- package/node.js +5346 -0
- package/node.js.map +1 -0
- package/node.meta.tree +44 -0
- package/node.mjs +5347 -0
- package/node.test.js +13456 -0
- package/node.test.js.map +1 -0
- package/package.json +152 -0
- package/test.html +11 -0
- package/web.audit.js +2 -0
- package/web.css +1 -0
- package/web.css.map +1 -0
- package/web.d.ts +1055 -0
- package/web.d.ts.map +1 -0
- package/web.deps.json +1 -0
- package/web.js +5181 -0
- package/web.js.map +1 -0
- package/web.meta.tree +44 -0
- package/web.mjs +5182 -0
- package/web.test.js +8193 -0
- package/web.test.js.map +1 -0
package/node.d.ts
ADDED
|
@@ -0,0 +1,1093 @@
|
|
|
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
|
+
const $mol_ambient_ref: unique symbol;
|
|
19
|
+
type $mol_ambient_context = $;
|
|
20
|
+
function $mol_ambient(this: $ | void, overrides: Partial<$>): $;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare namespace $ {
|
|
24
|
+
function $mol_delegate<Value extends object>(proto: Value, target: () => Value): Value;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare namespace $ {
|
|
28
|
+
const $mol_owning_map: WeakMap<any, any>;
|
|
29
|
+
function $mol_owning_allow<Having>(having: Having): having is Having & {
|
|
30
|
+
destructor(): void;
|
|
31
|
+
};
|
|
32
|
+
function $mol_owning_get<Having, Owner extends object>(having: Having, Owner?: {
|
|
33
|
+
new (): Owner;
|
|
34
|
+
}): Owner | null;
|
|
35
|
+
function $mol_owning_check<Owner, Having>(owner: Owner, having: Having): having is Having & {
|
|
36
|
+
destructor(): void;
|
|
37
|
+
};
|
|
38
|
+
function $mol_owning_catch<Owner, Having>(owner: Owner, having: Having): boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
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
|
+
declare namespace $ {
|
|
50
|
+
type $mol_type_writable<T> = {
|
|
51
|
+
-readonly [P in keyof T]: T[P];
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
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
|
+
declare namespace $ {
|
|
61
|
+
class $mol_object2 {
|
|
62
|
+
static $: $;
|
|
63
|
+
[Symbol.toStringTag]: string;
|
|
64
|
+
[$mol_ambient_ref]: $;
|
|
65
|
+
get $(): $;
|
|
66
|
+
set $(next: $);
|
|
67
|
+
static create<Instance>(this: new (init?: (instance: any) => void) => Instance, init?: (instance: $mol_type_writable<Instance>) => void): Instance;
|
|
68
|
+
static [Symbol.toPrimitive](): any;
|
|
69
|
+
static toString(): any;
|
|
70
|
+
static toJSON(): any;
|
|
71
|
+
destructor(): void;
|
|
72
|
+
static destructor(): void;
|
|
73
|
+
toString(): string;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
declare namespace $ {
|
|
78
|
+
class $mol_span extends $mol_object2 {
|
|
79
|
+
readonly uri: string;
|
|
80
|
+
readonly source: string;
|
|
81
|
+
readonly row: number;
|
|
82
|
+
readonly col: number;
|
|
83
|
+
readonly length: number;
|
|
84
|
+
constructor(uri: string, source: string, row: number, col: number, length: number);
|
|
85
|
+
static unknown: $mol_span;
|
|
86
|
+
static begin(uri: string, source?: string): $mol_span;
|
|
87
|
+
static end(uri: string, source: string): $mol_span;
|
|
88
|
+
static entire(uri: string, source: string): $mol_span;
|
|
89
|
+
toString(): string;
|
|
90
|
+
toJSON(): {
|
|
91
|
+
uri: string;
|
|
92
|
+
row: number;
|
|
93
|
+
col: number;
|
|
94
|
+
length: number;
|
|
95
|
+
};
|
|
96
|
+
error(message: string, Class?: ErrorConstructor): Error;
|
|
97
|
+
span(row: number, col: number, length: number): $mol_span;
|
|
98
|
+
after(length?: number): $mol_span;
|
|
99
|
+
slice(begin: number, end?: number): $mol_span;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
declare namespace $ {
|
|
104
|
+
class $mol_error_syntax extends SyntaxError {
|
|
105
|
+
reason: string;
|
|
106
|
+
line: string;
|
|
107
|
+
span: $mol_span;
|
|
108
|
+
constructor(reason: string, line: string, span: $mol_span);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
declare namespace $ {
|
|
113
|
+
function $mol_tree2_from_string(this: $, str: string, uri?: string): $mol_tree2;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
declare namespace $ {
|
|
117
|
+
function $mol_tree2_to_string(this: $, tree: $mol_tree2): string;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
declare namespace $ {
|
|
121
|
+
function $mol_maybe<Value>(value: Value | null | undefined): Value[];
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
declare namespace $ {
|
|
125
|
+
type $mol_tree2_path = Array<string | number | null>;
|
|
126
|
+
type $mol_tree2_hack<Context> = (input: $mol_tree2, belt: $mol_tree2_belt<Context>, context: Context) => readonly $mol_tree2[];
|
|
127
|
+
type $mol_tree2_belt<Context> = Record<string, $mol_tree2_hack<Context>>;
|
|
128
|
+
class $mol_tree2 extends Object {
|
|
129
|
+
readonly type: string;
|
|
130
|
+
readonly value: string;
|
|
131
|
+
readonly kids: readonly $mol_tree2[];
|
|
132
|
+
readonly span: $mol_span;
|
|
133
|
+
constructor(type: string, value: string, kids: readonly $mol_tree2[], span: $mol_span);
|
|
134
|
+
static list(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
|
|
135
|
+
list(kids: readonly $mol_tree2[]): $mol_tree2;
|
|
136
|
+
static data(value: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
|
|
137
|
+
data(value: string, kids?: readonly $mol_tree2[]): $mol_tree2;
|
|
138
|
+
static struct(type: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
|
|
139
|
+
struct(type: string, kids?: readonly $mol_tree2[]): $mol_tree2;
|
|
140
|
+
clone(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
|
|
141
|
+
text(): string;
|
|
142
|
+
static fromString(str: string, uri?: string): $mol_tree2;
|
|
143
|
+
toString(): string;
|
|
144
|
+
insert(value: $mol_tree2 | null, ...path: $mol_tree2_path): $mol_tree2;
|
|
145
|
+
update(value: readonly $mol_tree2[], ...path: $mol_tree2_path): readonly $mol_tree2[];
|
|
146
|
+
select(...path: $mol_tree2_path): $mol_tree2;
|
|
147
|
+
filter(path: string[], value?: string): $mol_tree2;
|
|
148
|
+
hack_self<Context extends {
|
|
149
|
+
span?: $mol_span;
|
|
150
|
+
[key: string]: unknown;
|
|
151
|
+
} = {}>(belt: $mol_tree2_belt<Context>, context?: Context): readonly $mol_tree2[];
|
|
152
|
+
hack<Context extends {
|
|
153
|
+
span?: $mol_span;
|
|
154
|
+
[key: string]: unknown;
|
|
155
|
+
} = {}>(belt: $mol_tree2_belt<Context>, context?: Context): $mol_tree2[];
|
|
156
|
+
error(message: string, Class?: ErrorConstructor): Error;
|
|
157
|
+
}
|
|
158
|
+
class $mol_tree2_empty extends $mol_tree2 {
|
|
159
|
+
constructor();
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
declare namespace $ {
|
|
164
|
+
class $mol_view_tree2_error extends Error {
|
|
165
|
+
readonly spans: readonly $mol_span[];
|
|
166
|
+
constructor(message: string, spans: readonly $mol_span[]);
|
|
167
|
+
toJSON(): {
|
|
168
|
+
message: string;
|
|
169
|
+
spans: readonly $mol_span[];
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
class $mol_view_tree2_error_suggestions {
|
|
173
|
+
readonly suggestions: readonly string[];
|
|
174
|
+
constructor(suggestions: readonly string[]);
|
|
175
|
+
toString(): string;
|
|
176
|
+
toJSON(): readonly string[];
|
|
177
|
+
}
|
|
178
|
+
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;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
declare namespace $ {
|
|
182
|
+
function $mol_view_tree2_child(this: $, tree: $mol_tree2): $mol_tree2;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
declare namespace $ {
|
|
186
|
+
function $mol_view_tree2_classes(defs: $mol_tree2): $mol_tree2;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
declare namespace $ {
|
|
190
|
+
function $mol_view_tree2_normalize(this: $, defs: $mol_tree2): $mol_tree2;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
declare namespace $ {
|
|
194
|
+
function $mol_tree2_from_json(json: any, span?: $mol_span): $mol_tree2;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
declare namespace $ {
|
|
198
|
+
function $mol_tree2_js_is_number(type: string): boolean | RegExpMatchArray;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
declare namespace $ {
|
|
202
|
+
function $mol_tree2_js_to_text(this: $, js: $mol_tree2): $mol_tree2;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
declare namespace $ {
|
|
206
|
+
function $mol_tree2_span_imprint(tree: $mol_tree2): $mol_tree2;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
declare namespace $ {
|
|
210
|
+
function $mol_tree2_span_reuse(tree: $mol_tree2): $mol_tree2;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
declare namespace $ {
|
|
214
|
+
function $mol_tree2_text_to_string(this: $, text: $mol_tree2): string;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
declare namespace $ {
|
|
218
|
+
function $mol_vlq_encode(val: number): string;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
declare namespace $ {
|
|
222
|
+
type $mol_sourcemap_segment = [number] | [number, number, number, number] | [number, number, number, number, number];
|
|
223
|
+
type $mol_sourcemap_line = $mol_sourcemap_segment[];
|
|
224
|
+
type $mol_sourcemap_mappings = $mol_sourcemap_line[];
|
|
225
|
+
interface $mol_sourcemap_raw {
|
|
226
|
+
version: number;
|
|
227
|
+
sources: string[];
|
|
228
|
+
names?: string[];
|
|
229
|
+
sourceRoot?: string;
|
|
230
|
+
sourcesContent?: (string | null)[];
|
|
231
|
+
mappings: string | $mol_sourcemap_line[];
|
|
232
|
+
file?: string;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
declare namespace $ {
|
|
237
|
+
function $mol_tree2_text_to_sourcemap(this: $, tree: $mol_tree2): $mol_sourcemap_raw;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
declare namespace $ {
|
|
241
|
+
function $mol_sourcemap_url(this: $, uri: string, type?: "js" | "css"): string;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
declare namespace $ {
|
|
245
|
+
function $mol_sourcemap_dataurl_decode(this: $, data: string): $mol_sourcemap_raw | undefined;
|
|
246
|
+
function $mol_sourcemap_dataurl_encode(this: $, map: $mol_sourcemap_raw, type?: "js" | "css"): string;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
declare namespace $ {
|
|
250
|
+
function $mol_tree2_text_to_string_mapped(this: $, text: $mol_tree2, type: 'js' | 'css'): string;
|
|
251
|
+
function $mol_tree2_text_to_string_mapped_js(this: $, text: $mol_tree2): string;
|
|
252
|
+
function $mol_tree2_text_to_string_mapped_css(this: $, text: $mol_tree2): string;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
declare namespace $ {
|
|
256
|
+
function $mol_guard_defined<T>(value: T): value is NonNullable<T>;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
declare namespace $ {
|
|
260
|
+
function $mol_tree2_text_to_sourcemap_vis(this: $, text: $mol_tree2): string;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
declare namespace $ {
|
|
264
|
+
function $mol_tree2_to_json(this: $, tree: $mol_tree2): unknown;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
declare namespace $ {
|
|
268
|
+
function $mol_tree2_to_stream(tree: $mol_tree2, output: {
|
|
269
|
+
write(chunk: string): boolean;
|
|
270
|
+
once?(event: 'drain', cb: () => void): void;
|
|
271
|
+
}, prefix?: string): Promise<void>;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
declare namespace $ {
|
|
275
|
+
function $mol_tree2_xml_from_dom(dom: Node): $mol_tree2;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
declare namespace $ {
|
|
279
|
+
function $mol_html_encode(text: string): string;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
declare namespace $ {
|
|
283
|
+
function $mol_tree2_xml_to_text(xml: $mol_tree2): $mol_tree2;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
declare namespace $ {
|
|
287
|
+
type $mol_type_equals<A, B> = (<X>() => X extends A ? 1 : 2) extends (<X>() => X extends B ? 1 : 2) ? unknown : never;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
declare namespace $ {
|
|
291
|
+
type $mol_type_merge<Intersection> = Intersection extends (...a: any[]) => any ? Intersection : Intersection extends new (...a: any[]) => any ? Intersection : Intersection extends object ? $mol_type_merge_object<Intersection> extends Intersection ? unknown extends $mol_type_equals<{
|
|
292
|
+
[Key in keyof Intersection]: Intersection[Key];
|
|
293
|
+
}, Intersection> ? Intersection : {
|
|
294
|
+
[Key in keyof Intersection]: $mol_type_merge<Intersection[Key]>;
|
|
295
|
+
} : Intersection : Intersection;
|
|
296
|
+
type $mol_type_merge_object<Intersection> = {
|
|
297
|
+
[Key in keyof Intersection]: Intersection[Key];
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
declare namespace $ {
|
|
302
|
+
type $mol_type_intersect<Union> = (Union extends any ? (_: Union) => void : never) extends ((_: infer Intersection) => void) ? Intersection : never;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
declare namespace $ {
|
|
306
|
+
type $mol_type_override<Base, Over> = Omit<Base, keyof Over> & Over;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
declare namespace $ {
|
|
310
|
+
type $mol_unicode_category = [$mol_unicode_category_binary] | ['General_Category', $mol_char_category_general] | ['Script', $mol_unicode_category_script] | ['Script_Extensions', $mol_unicode_category_script];
|
|
311
|
+
type $mol_unicode_category_binary = 'ASCII' | 'ASCII_Hex_Digit' | 'Alphabetic' | 'Any' | 'Assigned' | 'Bidi_Control' | 'Bidi_Mirrored' | 'Case_Ignorable' | 'Cased' | 'Changes_When_Casefolded' | 'Changes_When_Casemapped' | 'Changes_When_Lowercased' | 'Changes_When_NFKC_Casefolded' | 'Changes_When_Titlecased' | 'Changes_When_Uppercased' | 'Dash' | 'Default_Ignorable_Code_Point' | 'Deprecated' | 'Diacritic' | 'Emoji' | 'Emoji_Component' | 'Emoji_Modifier' | 'Emoji_Modifier_Base' | 'Emoji_Presentation' | 'Extended_Pictographic' | 'Extender' | 'Grapheme_Base' | 'Grapheme_Extend' | 'Hex_Digit' | 'IDS_Binary_Operator' | 'IDS_Trinary_Operator' | 'ID_Continue' | 'ID_Start' | 'Ideographic' | 'Join_Control' | 'Logical_Order_Exception' | 'Lowercase' | 'Math' | 'Noncharacter_Code_Point' | 'Pattern_Syntax' | 'Pattern_White_Space' | 'Quotation_Mark' | 'Radical' | 'Regional_Indicator' | 'Sentence_Terminal' | 'Soft_Dotted' | 'Terminal_Punctuation' | 'Unified_Ideograph' | 'Uppercase' | 'Variation_Selector' | 'White_Space' | 'XID_Continue' | 'XID_Start';
|
|
312
|
+
type $mol_char_category_general = 'Cased_Letter' | 'Close_Punctuation' | 'Connector_Punctuation' | 'Control' | 'Currency_Symbol' | 'Dash_Punctuation' | 'Decimal_Number' | 'Enclosing_Mark' | 'Final_Punctuation' | 'Format' | 'Initial_Punctuation' | 'Letter' | 'Letter_Number' | 'Line_Separator' | 'Lowercase_Letter' | 'Mark' | 'Math_Symbol' | 'Modifier_Letter' | 'Modifier_Symbol' | 'Nonspacing_Mark' | 'Number' | 'Open_Punctuation' | 'Other' | 'Other_Letter' | 'Other_Number' | 'Other_Punctuation' | 'Other_Symbol' | 'Paragraph_Separator' | 'Private_Use' | 'Punctuation' | 'Separator' | 'Space_Separator' | 'Spacing_Mark' | 'Surrogate' | 'Symbol' | 'Titlecase_Letter' | 'Unassigned' | 'Uppercase_Letter';
|
|
313
|
+
type $mol_unicode_category_script = 'Adlam' | 'Ahom' | 'Anatolian_Hieroglyphs' | 'Arabic' | 'Armenian' | 'Avestan' | 'Balinese' | 'Bamum' | 'Bassa_Vah' | 'Batak' | 'Bengali' | 'Bhaiksuki' | 'Bopomofo' | 'Brahmi' | 'Braille' | 'Buginese' | 'Buhid' | 'Canadian_Aboriginal' | 'Carian' | 'Caucasian_Albanian' | 'Chakma' | 'Cham' | 'Chorasmian' | 'Cherokee' | 'Common' | 'Coptic' | 'Cuneiform' | 'Cypriot' | 'Cyrillic' | 'Deseret' | 'Devanagari' | 'Dives_Akuru' | 'Dogra' | 'Duployan' | 'Egyptian_Hieroglyphs' | 'Elbasan' | 'Elymaic' | 'Ethiopic' | 'Georgian' | 'Glagolitic' | 'Gothic' | 'Grantha' | 'Greek' | 'Gujarati' | 'Gunjala_Gondi' | 'Gurmukhi' | 'Han' | 'Hangul' | 'Hanifi_Rohingya' | 'Hanunoo' | 'Hatran' | 'Hebrew' | 'Hiragana' | 'Imperial_Aramaic' | 'Inherited' | 'Inscriptional_Pahlavi' | 'Inscriptional_Parthian' | 'Javanese' | 'Kaithi' | 'Kannada' | 'Katakana' | 'Kayah_Li' | 'Kharoshthi' | 'Khitan_Small_Script' | 'Khmer' | 'Khojki' | 'Khudawadi' | 'Lao' | 'Latin' | 'Lepcha' | 'Limbu' | 'Linear_A' | 'Linear_B' | 'Lisu' | 'Lycian' | 'Lydian' | 'Mahajani' | 'Makasar' | 'Malayalam' | 'Mandaic' | 'Manichaean' | 'Marchen' | 'Medefaidrin' | 'Masaram_Gondi' | 'Meetei_Mayek' | 'Mende_Kikakui' | 'Meroitic_Cursive' | 'Meroitic_Hieroglyphs' | 'Miao' | 'Modi' | 'Mongolian' | 'Mro' | 'Multani' | 'Myanmar' | 'Nabataean' | 'Nandinagari' | 'New_Tai_Lue' | 'Newa' | 'Nko' | 'Nushu' | 'Nyiakeng_Puachue_Hmong' | 'Ogham' | 'Ol_Chiki' | 'Old_Hungarian' | 'Old_Italic' | 'Old_North_Arabian' | 'Old_Permic' | 'Old_Persian' | 'Old_Sogdian' | 'Old_South_Arabian' | 'Old_Turkic' | 'Oriya' | 'Osage' | 'Osmanya' | 'Pahawh_Hmong' | 'Palmyrene' | 'Pau_Cin_Hau' | 'Phags_Pa' | 'Phoenician' | 'Psalter_Pahlavi' | 'Rejang' | 'Runic' | 'Samaritan' | 'Saurashtra' | 'Sharada' | 'Shavian' | 'Siddham' | 'SignWriting' | 'Sinhala' | 'Sogdian' | 'Sora_Sompeng' | 'Soyombo' | 'Sundanese' | 'Syloti_Nagri' | 'Syriac' | 'Tagalog' | 'Tagbanwa' | 'Tai_Le' | 'Tai_Tham' | 'Tai_Viet' | 'Takri' | 'Tamil' | 'Tangut' | 'Telugu' | 'Thaana' | 'Thai' | 'Tibetan' | 'Tifinagh' | 'Tirhuta' | 'Ugaritic' | 'Vai' | 'Wancho' | 'Warang_Citi' | 'Yezidi' | 'Yi' | 'Zanabazar_Square';
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
interface String {
|
|
317
|
+
match<RE extends RegExp>(regexp: RE): ReturnType<RE[typeof Symbol.match]>;
|
|
318
|
+
matchAll<RE extends RegExp>(regexp: RE): ReturnType<RE[typeof Symbol.matchAll]>;
|
|
319
|
+
}
|
|
320
|
+
declare namespace $ {
|
|
321
|
+
type Groups_to_params<T> = {
|
|
322
|
+
[P in keyof T]?: T[P] | boolean | undefined;
|
|
323
|
+
};
|
|
324
|
+
export type $mol_regexp_source = number | string | RegExp | {
|
|
325
|
+
[key in string]: $mol_regexp_source;
|
|
326
|
+
} | readonly [$mol_regexp_source, ...$mol_regexp_source[]];
|
|
327
|
+
export type $mol_regexp_groups<Source extends $mol_regexp_source> = Source extends number ? {} : Source extends string ? {} : Source extends $mol_regexp_source[] ? $mol_type_merge<$mol_type_intersect<{
|
|
328
|
+
[key in Extract<keyof Source, number>]: $mol_regexp_groups<Source[key]>;
|
|
329
|
+
}[Extract<keyof Source, number>]>> : Source extends RegExp ? Record<string, string> extends NonNullable<NonNullable<ReturnType<Source['exec']>>['groups']> ? {} : NonNullable<NonNullable<ReturnType<Source['exec']>>['groups']> : Source extends {
|
|
330
|
+
readonly [key in string]: $mol_regexp_source;
|
|
331
|
+
} ? $mol_type_merge<$mol_type_intersect<{
|
|
332
|
+
[key in keyof Source]: $mol_type_merge<$mol_type_override<{
|
|
333
|
+
readonly [k in Extract<keyof Source, string>]: string;
|
|
334
|
+
}, {
|
|
335
|
+
readonly [k in key]: Source[key] extends string ? Source[key] : string;
|
|
336
|
+
}> & $mol_regexp_groups<Source[key]>>;
|
|
337
|
+
}[keyof Source]>> : never;
|
|
338
|
+
export class $mol_regexp<Groups extends Record<string, string>> extends RegExp {
|
|
339
|
+
readonly groups: (Extract<keyof Groups, string>)[];
|
|
340
|
+
constructor(source: string, flags?: string, groups?: (Extract<keyof Groups, string>)[]);
|
|
341
|
+
[Symbol.matchAll](str: string): RegExpStringIterator<RegExpMatchArray & $mol_type_override<RegExpMatchArray, {
|
|
342
|
+
groups?: {
|
|
343
|
+
[key in keyof Groups]: string;
|
|
344
|
+
};
|
|
345
|
+
}>>;
|
|
346
|
+
[Symbol.match](str: string): null | RegExpMatchArray;
|
|
347
|
+
[Symbol.split](str: string): string[];
|
|
348
|
+
test(str: string): boolean;
|
|
349
|
+
exec(str: string): RegExpExecArray & $mol_type_override<RegExpExecArray, {
|
|
350
|
+
groups?: {
|
|
351
|
+
[key in keyof Groups]: string;
|
|
352
|
+
};
|
|
353
|
+
}> | null;
|
|
354
|
+
generate(params: Groups_to_params<Groups>): string | null;
|
|
355
|
+
get native(): RegExp;
|
|
356
|
+
static repeat<Source extends $mol_regexp_source>(source: Source, min?: number, max?: number): $mol_regexp<$mol_regexp_groups<Source>>;
|
|
357
|
+
static repeat_greedy<Source extends $mol_regexp_source>(source: Source, min?: number, max?: number): $mol_regexp<$mol_regexp_groups<Source>>;
|
|
358
|
+
static vary<Sources extends readonly $mol_regexp_source[]>(sources: Sources): $mol_regexp<$mol_regexp_groups<Sources[number]>>;
|
|
359
|
+
static optional<Source extends $mol_regexp_source>(source: Source): $mol_regexp<$mol_regexp_groups<Source>>;
|
|
360
|
+
static force_after(source: $mol_regexp_source): $mol_regexp<Record<string, string>>;
|
|
361
|
+
static forbid_after(source: $mol_regexp_source): $mol_regexp<Record<string, string>>;
|
|
362
|
+
static from<Source extends $mol_regexp_source>(source: Source, { ignoreCase, multiline }?: Partial<Pick<RegExp, 'ignoreCase' | 'multiline'>>): $mol_regexp<$mol_regexp_groups<Source>>;
|
|
363
|
+
static unicode_only(...category: $mol_unicode_category): $mol_regexp<Record<string, string>>;
|
|
364
|
+
static unicode_except(...category: $mol_unicode_category): $mol_regexp<Record<string, string>>;
|
|
365
|
+
static char_range(from: number, to: number): $mol_regexp<{}>;
|
|
366
|
+
static char_only(...allowed: readonly [$mol_regexp_source, ...$mol_regexp_source[]]): $mol_regexp<{}>;
|
|
367
|
+
static char_except(...forbidden: readonly [$mol_regexp_source, ...$mol_regexp_source[]]): $mol_regexp<{}>;
|
|
368
|
+
static decimal_only: $mol_regexp<{}>;
|
|
369
|
+
static decimal_except: $mol_regexp<{}>;
|
|
370
|
+
static latin_only: $mol_regexp<{}>;
|
|
371
|
+
static latin_except: $mol_regexp<{}>;
|
|
372
|
+
static space_only: $mol_regexp<{}>;
|
|
373
|
+
static space_except: $mol_regexp<{}>;
|
|
374
|
+
static word_break_only: $mol_regexp<{}>;
|
|
375
|
+
static word_break_except: $mol_regexp<{}>;
|
|
376
|
+
static tab: $mol_regexp<{}>;
|
|
377
|
+
static slash_back: $mol_regexp<{}>;
|
|
378
|
+
static nul: $mol_regexp<{}>;
|
|
379
|
+
static char_any: $mol_regexp<{}>;
|
|
380
|
+
static begin: $mol_regexp<{}>;
|
|
381
|
+
static end: $mol_regexp<{}>;
|
|
382
|
+
static or: $mol_regexp<{}>;
|
|
383
|
+
static line_end: $mol_regexp<{
|
|
384
|
+
readonly win_end: string;
|
|
385
|
+
readonly mac_end: string;
|
|
386
|
+
}>;
|
|
387
|
+
}
|
|
388
|
+
export {};
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
declare namespace $ {
|
|
392
|
+
let $mol_view_tree2_prop_signature: $mol_regexp<{
|
|
393
|
+
readonly name: string;
|
|
394
|
+
readonly key: string;
|
|
395
|
+
readonly next: string;
|
|
396
|
+
}>;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
declare namespace $ {
|
|
400
|
+
function $mol_view_tree2_prop_parts(this: $, prop: $mol_tree2): {
|
|
401
|
+
name: string;
|
|
402
|
+
key: string;
|
|
403
|
+
next: string;
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
declare namespace $ {
|
|
408
|
+
function $mol_view_tree2_prop_quote(name: $mol_tree2): $mol_tree2;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
declare namespace $ {
|
|
412
|
+
type $mol_type_enforce<Actual extends Expected, Expected> = Actual;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
declare namespace $ {
|
|
416
|
+
function $mol_view_tree2_class_match(klass?: $mol_tree2): boolean;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
declare namespace $ {
|
|
420
|
+
function $mol_view_tree2_class_super(this: $, klass: $mol_tree2): $mol_tree2;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
declare namespace $ {
|
|
424
|
+
function $mol_view_tree2_class_props(this: $, klass: $mol_tree2): $mol_tree2[];
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
declare namespace $ {
|
|
428
|
+
function $mol_view_tree2_to_dts(this: $, tree: $mol_tree2): $mol_tree2;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
declare namespace $ {
|
|
432
|
+
namespace $$ { }
|
|
433
|
+
const $mol_object_field: unique symbol;
|
|
434
|
+
class $mol_object extends $mol_object2 {
|
|
435
|
+
static make<This extends typeof $mol_object>(this: This, config: Partial<InstanceType<This>>): InstanceType<This>;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
declare namespace $ {
|
|
440
|
+
function $mol_guid(length?: number, exists?: (id: string) => boolean): string;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
declare namespace $ {
|
|
444
|
+
enum $mol_wire_cursor {
|
|
445
|
+
stale = -1,
|
|
446
|
+
doubt = -2,
|
|
447
|
+
fresh = -3,
|
|
448
|
+
final = -4
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
declare namespace $ {
|
|
453
|
+
class $mol_wire_pub extends Object {
|
|
454
|
+
constructor(id?: string);
|
|
455
|
+
[Symbol.toStringTag]: string;
|
|
456
|
+
data: unknown[];
|
|
457
|
+
static get [Symbol.species](): ArrayConstructor;
|
|
458
|
+
protected sub_from: number;
|
|
459
|
+
get sub_list(): readonly $mol_wire_sub[];
|
|
460
|
+
get sub_empty(): boolean;
|
|
461
|
+
sub_on(sub: $mol_wire_pub, pub_pos: number): number;
|
|
462
|
+
sub_off(sub_pos: number): void;
|
|
463
|
+
reap(): void;
|
|
464
|
+
promote(): void;
|
|
465
|
+
fresh(): void;
|
|
466
|
+
complete(): void;
|
|
467
|
+
get incompleted(): boolean;
|
|
468
|
+
emit(quant?: $mol_wire_cursor): void;
|
|
469
|
+
peer_move(from_pos: number, to_pos: number): void;
|
|
470
|
+
peer_repos(peer_pos: number, self_pos: number): void;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
declare namespace $ {
|
|
475
|
+
interface $mol_wire_sub extends $mol_wire_pub {
|
|
476
|
+
temp: boolean;
|
|
477
|
+
pub_list: $mol_wire_pub[];
|
|
478
|
+
track_on(): $mol_wire_sub | null;
|
|
479
|
+
track_next(pub?: $mol_wire_pub): $mol_wire_pub | null;
|
|
480
|
+
pub_off(pub_pos: number): void;
|
|
481
|
+
track_cut(sub: $mol_wire_pub | null): void;
|
|
482
|
+
track_off(sub: $mol_wire_pub | null): void;
|
|
483
|
+
absorb(quant: $mol_wire_cursor, pos: number): void;
|
|
484
|
+
destructor(): void;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
declare namespace $ {
|
|
489
|
+
let $mol_wire_auto_sub: $mol_wire_sub | null;
|
|
490
|
+
function $mol_wire_auto(next?: $mol_wire_sub | null): $mol_wire_sub | null;
|
|
491
|
+
const $mol_wire_affected: ($mol_wire_sub | number)[];
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
declare namespace $ {
|
|
495
|
+
function $mol_dev_format_register(config: {
|
|
496
|
+
header: (val: any, config: any) => any;
|
|
497
|
+
hasBody: (val: any, config: any) => false;
|
|
498
|
+
} | {
|
|
499
|
+
header: (val: any, config: any) => any;
|
|
500
|
+
hasBody: (val: any, config: any) => boolean;
|
|
501
|
+
body: (val: any, config: any) => any;
|
|
502
|
+
}): void;
|
|
503
|
+
const $mol_dev_format_head: unique symbol;
|
|
504
|
+
const $mol_dev_format_body: unique symbol;
|
|
505
|
+
function $mol_dev_format_native(obj: any): any[];
|
|
506
|
+
function $mol_dev_format_auto(obj: any): any[];
|
|
507
|
+
function $mol_dev_format_element(element: string, style: object, ...content: any[]): any[];
|
|
508
|
+
let $mol_dev_format_span: (style: object, ...content: any[]) => any[];
|
|
509
|
+
let $mol_dev_format_div: (style: object, ...content: any[]) => any[];
|
|
510
|
+
let $mol_dev_format_ol: (style: object, ...content: any[]) => any[];
|
|
511
|
+
let $mol_dev_format_li: (style: object, ...content: any[]) => any[];
|
|
512
|
+
let $mol_dev_format_table: (style: object, ...content: any[]) => any[];
|
|
513
|
+
let $mol_dev_format_tr: (style: object, ...content: any[]) => any[];
|
|
514
|
+
let $mol_dev_format_td: (style: object, ...content: any[]) => any[];
|
|
515
|
+
let $mol_dev_format_accent: (...args: any[]) => any[];
|
|
516
|
+
let $mol_dev_format_strong: (...args: any[]) => any[];
|
|
517
|
+
let $mol_dev_format_string: (...args: any[]) => any[];
|
|
518
|
+
let $mol_dev_format_shade: (...args: any[]) => any[];
|
|
519
|
+
let $mol_dev_format_indent: (...args: any[]) => any[];
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
declare namespace $ {
|
|
523
|
+
class $mol_wire_pub_sub extends $mol_wire_pub implements $mol_wire_sub {
|
|
524
|
+
protected pub_from: number;
|
|
525
|
+
protected cursor: $mol_wire_cursor;
|
|
526
|
+
get temp(): boolean;
|
|
527
|
+
get pub_list(): $mol_wire_pub[];
|
|
528
|
+
track_on(): $mol_wire_sub | null;
|
|
529
|
+
promote(): void;
|
|
530
|
+
track_next(pub?: $mol_wire_pub): $mol_wire_pub | null;
|
|
531
|
+
track_off(sub: $mol_wire_sub | null): void;
|
|
532
|
+
pub_off(sub_pos: number): void;
|
|
533
|
+
destructor(): void;
|
|
534
|
+
track_cut(): void;
|
|
535
|
+
complete(): void;
|
|
536
|
+
complete_pubs(): void;
|
|
537
|
+
absorb(quant?: $mol_wire_cursor, pos?: number): void;
|
|
538
|
+
[$mol_dev_format_head](): any[];
|
|
539
|
+
get pub_empty(): boolean;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
declare namespace $ {
|
|
544
|
+
class $mol_after_tick extends $mol_object2 {
|
|
545
|
+
task: () => void;
|
|
546
|
+
static promise: Promise<void> | null;
|
|
547
|
+
cancelled: boolean;
|
|
548
|
+
constructor(task: () => void);
|
|
549
|
+
destructor(): void;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
declare namespace $ {
|
|
554
|
+
function $mol_promise_like(val: any): val is Promise<any>;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
declare namespace $ {
|
|
558
|
+
abstract class $mol_wire_fiber<Host, Args extends readonly unknown[], Result> extends $mol_wire_pub_sub {
|
|
559
|
+
readonly task: (this: Host, ...args: Args) => Result;
|
|
560
|
+
readonly host?: Host | undefined;
|
|
561
|
+
static warm: boolean;
|
|
562
|
+
static planning: Set<$mol_wire_fiber<any, any, any>>;
|
|
563
|
+
static reaping: Set<$mol_wire_fiber<any, any, any>>;
|
|
564
|
+
static plan_task: $mol_after_tick | null;
|
|
565
|
+
static plan(): void;
|
|
566
|
+
static sync(): void;
|
|
567
|
+
cache: Result | Error | Promise<Result | Error>;
|
|
568
|
+
get args(): Args;
|
|
569
|
+
result(): Result | undefined;
|
|
570
|
+
get incompleted(): boolean;
|
|
571
|
+
field(): string;
|
|
572
|
+
constructor(id: string, task: (this: Host, ...args: Args) => Result, host?: Host | undefined, args?: Args);
|
|
573
|
+
plan(): this;
|
|
574
|
+
reap(): void;
|
|
575
|
+
toString(): string;
|
|
576
|
+
toJSON(): string;
|
|
577
|
+
[$mol_dev_format_head](): any[];
|
|
578
|
+
get $(): any;
|
|
579
|
+
emit(quant?: $mol_wire_cursor): void;
|
|
580
|
+
fresh(): this | undefined;
|
|
581
|
+
refresh(): void;
|
|
582
|
+
abstract put(next: Result | Error | Promise<Result | Error>): Result | Error | Promise<Result | Error>;
|
|
583
|
+
sync(): Awaited<Result>;
|
|
584
|
+
async_raw(): Promise<Result>;
|
|
585
|
+
async(): Promise<Result> & {
|
|
586
|
+
destructor(): void;
|
|
587
|
+
};
|
|
588
|
+
step(): Promise<null>;
|
|
589
|
+
destructor(): void;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
declare namespace $ {
|
|
594
|
+
const $mol_key_store: WeakMap<object, string>;
|
|
595
|
+
function $mol_key<Value>(value: Value): string;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
declare namespace $ {
|
|
599
|
+
class $mol_after_timeout extends $mol_object2 {
|
|
600
|
+
delay: number;
|
|
601
|
+
task: () => void;
|
|
602
|
+
id: any;
|
|
603
|
+
constructor(delay: number, task: () => void);
|
|
604
|
+
destructor(): void;
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
declare namespace $ {
|
|
609
|
+
class $mol_after_frame extends $mol_after_timeout {
|
|
610
|
+
task: () => void;
|
|
611
|
+
constructor(task: () => void);
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
declare namespace $ {
|
|
616
|
+
let $mol_compare_deep_cache: WeakMap<any, WeakMap<any, boolean>>;
|
|
617
|
+
function $mol_compare_deep<Value>(left: Value, right: Value): boolean;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
declare namespace $ {
|
|
621
|
+
type $mol_log3_event<Fields> = {
|
|
622
|
+
[key in string]: unknown;
|
|
623
|
+
} & {
|
|
624
|
+
time?: string;
|
|
625
|
+
place: unknown;
|
|
626
|
+
message: string;
|
|
627
|
+
} & Fields;
|
|
628
|
+
type $mol_log3_logger<Fields, Res = void> = (this: $, event: $mol_log3_event<Fields>) => Res;
|
|
629
|
+
let $mol_log3_come: $mol_log3_logger<{}>;
|
|
630
|
+
let $mol_log3_done: $mol_log3_logger<{}>;
|
|
631
|
+
let $mol_log3_fail: $mol_log3_logger<{}>;
|
|
632
|
+
let $mol_log3_warn: $mol_log3_logger<{
|
|
633
|
+
hint: string;
|
|
634
|
+
}>;
|
|
635
|
+
let $mol_log3_rise: $mol_log3_logger<{}>;
|
|
636
|
+
let $mol_log3_area: $mol_log3_logger<{}, () => void>;
|
|
637
|
+
function $mol_log3_area_lazy(this: $, event: $mol_log3_event<{}>): () => void;
|
|
638
|
+
let $mol_log3_stack: (() => void)[];
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
declare namespace $ {
|
|
642
|
+
class $mol_term_color {
|
|
643
|
+
static reset: (str: string) => string;
|
|
644
|
+
static bold: (str: string) => string;
|
|
645
|
+
static italic: (str: string) => string;
|
|
646
|
+
static underline: (str: string) => string;
|
|
647
|
+
static inverse: (str: string) => string;
|
|
648
|
+
static hidden: (str: string) => string;
|
|
649
|
+
static strike: (str: string) => string;
|
|
650
|
+
static gray: (str: string) => string;
|
|
651
|
+
static red: (str: string) => string;
|
|
652
|
+
static green: (str: string) => string;
|
|
653
|
+
static yellow: (str: string) => string;
|
|
654
|
+
static blue: (str: string) => string;
|
|
655
|
+
static magenta: (str: string) => string;
|
|
656
|
+
static cyan: (str: string) => string;
|
|
657
|
+
static Gray: (str: string) => string;
|
|
658
|
+
static Red: (str: string) => string;
|
|
659
|
+
static Green: (str: string) => string;
|
|
660
|
+
static Yellow: (str: string) => string;
|
|
661
|
+
static Blue: (str: string) => string;
|
|
662
|
+
static Magenta: (str: string) => string;
|
|
663
|
+
static Cyan: (str: string) => string;
|
|
664
|
+
static ansi(open: number, close: number): (str: string) => string;
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
declare namespace $ {
|
|
669
|
+
function $mol_log3_node_make(level: keyof Console, output: 'stdout' | 'stderr', type: string, color: (str: string) => string): (this: $, event: $mol_log3_event<{}>) => () => void;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
declare namespace $ {
|
|
673
|
+
class $mol_wire_task<Host, Args extends readonly unknown[], Result> extends $mol_wire_fiber<Host, Args, Result> {
|
|
674
|
+
static getter<Host, Args extends readonly unknown[], Result>(task: (this: Host, ...args: Args) => Result): (host: Host, args: Args) => $mol_wire_task<Host, Args, Result>;
|
|
675
|
+
get temp(): boolean;
|
|
676
|
+
complete(): void;
|
|
677
|
+
put(next: Result | Error | Promise<Result | Error>): Error | Result | Promise<Error | Result>;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
declare namespace $ {
|
|
682
|
+
function $mol_wire_method<Host extends object, Args extends readonly any[]>(host: Host, field: PropertyKey, descr?: TypedPropertyDescriptor<(...args: Args) => any>): {
|
|
683
|
+
value: (this: Host, ...args: Args) => any;
|
|
684
|
+
enumerable?: boolean;
|
|
685
|
+
configurable?: boolean;
|
|
686
|
+
writable?: boolean;
|
|
687
|
+
get?: (() => (...args: Args) => any) | undefined;
|
|
688
|
+
set?: ((value: (...args: Args) => any) => void) | undefined;
|
|
689
|
+
};
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
declare namespace $ {
|
|
693
|
+
type $mol_type_tail<Tuple extends readonly any[]> = ((...tail: Tuple) => any) extends ((head: any, ...tail: infer Tail) => any) ? Tail : never;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
declare namespace $ {
|
|
697
|
+
type $mol_type_foot<Tuple extends readonly any[]> = Tuple['length'] extends 0 ? never : Tuple[$mol_type_tail<Tuple>['length']];
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
declare namespace $ {
|
|
701
|
+
function $mol_fail_catch(error: unknown): boolean;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
declare namespace $ {
|
|
705
|
+
function $mol_try<Result>(handler: () => Result): Result | Error;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
declare namespace $ {
|
|
709
|
+
function $mol_fail_log(error: unknown): boolean;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
declare namespace $ {
|
|
713
|
+
class $mol_wire_atom<Host, Args extends readonly unknown[], Result> extends $mol_wire_fiber<Host, Args, Result> {
|
|
714
|
+
static solo<Host, Args extends readonly unknown[], Result>(host: Host, task: (this: Host, ...args: Args) => Result): $mol_wire_atom<Host, Args, Result>;
|
|
715
|
+
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>;
|
|
716
|
+
static watching: Set<$mol_wire_atom<any, any, any>>;
|
|
717
|
+
static watcher: $mol_after_frame | null;
|
|
718
|
+
static watch(): void;
|
|
719
|
+
watch(): void;
|
|
720
|
+
resync(args: Args): Error | Result | Promise<Error | Result>;
|
|
721
|
+
once(): Awaited<Result>;
|
|
722
|
+
channel(): ((next?: $mol_type_foot<Args>) => Awaited<Result>) & {
|
|
723
|
+
atom: $mol_wire_atom<Host, Args, Result>;
|
|
724
|
+
};
|
|
725
|
+
destructor(): void;
|
|
726
|
+
put(next: Result | Error | Promise<Result | Error>): Error | Result | Promise<Error | Result>;
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
declare namespace $ {
|
|
731
|
+
export function $mol_wire_solo<Args extends any[]>(host: object, field: string, descr?: TypedPropertyDescriptor<(...args: Args) => any>): TypedPropertyDescriptor<(...args: First_optional<Args>) => any>;
|
|
732
|
+
type First_optional<Args extends any[]> = Args extends [] ? [] : [Args[0] | undefined, ...$mol_type_tail<Args>];
|
|
733
|
+
export {};
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
declare namespace $ {
|
|
737
|
+
function $mol_wire_plex<Args extends [any, ...any[]]>(host: object, field: string, descr?: TypedPropertyDescriptor<(...args: Args) => any>): {
|
|
738
|
+
value: (this: typeof host, ...args: Args) => any;
|
|
739
|
+
enumerable?: boolean;
|
|
740
|
+
configurable?: boolean;
|
|
741
|
+
writable?: boolean;
|
|
742
|
+
get?: (() => (...args: Args) => any) | undefined;
|
|
743
|
+
set?: ((value: (...args: Args) => any) => void) | undefined;
|
|
744
|
+
};
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
declare namespace $ {
|
|
748
|
+
let $mol_mem: typeof $mol_wire_solo;
|
|
749
|
+
let $mol_mem_key: typeof $mol_wire_plex;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
declare namespace $ {
|
|
753
|
+
var $mol_dom_context: typeof globalThis;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
interface $node {
|
|
757
|
+
[key: string]: any;
|
|
758
|
+
}
|
|
759
|
+
declare var $node: $node;
|
|
760
|
+
declare const cache: Map<string, any>;
|
|
761
|
+
|
|
762
|
+
declare namespace $ {
|
|
763
|
+
class $mol_error_mix<Cause extends {} = {}> extends AggregateError {
|
|
764
|
+
readonly cause: Cause;
|
|
765
|
+
name: string;
|
|
766
|
+
constructor(message: string, cause?: Cause, ...errors: readonly Error[]);
|
|
767
|
+
static [Symbol.toPrimitive](): string;
|
|
768
|
+
static toString(): string;
|
|
769
|
+
static make(...params: ConstructorParameters<typeof $mol_error_mix>): $mol_error_mix<{}>;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
declare namespace $ {
|
|
774
|
+
function $mol_env(): Record<string, string | undefined>;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
declare namespace $ {
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
declare namespace $ {
|
|
781
|
+
export function $mol_wire_sync<Host extends object>(obj: Host): ObjectOrFunctionResultAwaited<Host>;
|
|
782
|
+
type FunctionResultAwaited<Some> = Some extends (...args: infer Args) => infer Res ? (...args: Args) => Awaited<Res> : Some;
|
|
783
|
+
type ConstructorResultAwaited<Some> = Some extends new (...args: infer Args) => infer Res ? new (...args: Args) => Res : {};
|
|
784
|
+
type MethodsResultAwaited<Host extends Object> = {
|
|
785
|
+
[K in keyof Host]: FunctionResultAwaited<Host[K]>;
|
|
786
|
+
};
|
|
787
|
+
type ObjectOrFunctionResultAwaited<Some> = (Some extends (...args: any) => unknown ? FunctionResultAwaited<Some> : {}) & (Some extends Object ? MethodsResultAwaited<Some> & ConstructorResultAwaited<Some> : Some);
|
|
788
|
+
export {};
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
declare namespace $ {
|
|
792
|
+
type $mol_run_error_context = {
|
|
793
|
+
pid?: number;
|
|
794
|
+
stdout: Buffer | string;
|
|
795
|
+
stderr: Buffer | string;
|
|
796
|
+
};
|
|
797
|
+
class $mol_run_error extends $mol_error_mix<{
|
|
798
|
+
timeout_kill?: boolean;
|
|
799
|
+
pid?: number;
|
|
800
|
+
signal?: NodeJS.Signals | null;
|
|
801
|
+
status?: number | null;
|
|
802
|
+
command: string;
|
|
803
|
+
dir: string;
|
|
804
|
+
}> {
|
|
805
|
+
}
|
|
806
|
+
const $mol_run_spawn: (...args: Parameters<(typeof $node)["child_process"]["spawn"]>) => import("child_process").ChildProcess;
|
|
807
|
+
const $mol_run_spawn_sync: (...args: Parameters<(typeof $node)["child_process"]["spawnSync"]>) => import("child_process").SpawnSyncReturns<string | Buffer<ArrayBufferLike>>;
|
|
808
|
+
type $mol_run_options = {
|
|
809
|
+
command: readonly string[] | string;
|
|
810
|
+
dir: string;
|
|
811
|
+
timeout?: number;
|
|
812
|
+
env?: Record<string, string | undefined>;
|
|
813
|
+
};
|
|
814
|
+
class $mol_run extends $mol_object {
|
|
815
|
+
static async_enabled(): boolean;
|
|
816
|
+
static spawn(options: $mol_run_options): $mol_run_error_context | import("child_process").SpawnSyncReturns<string | Buffer<ArrayBufferLike>>;
|
|
817
|
+
static spawn_async({ dir, sync, timeout, command, env }: $mol_run_options & {
|
|
818
|
+
sync?: boolean;
|
|
819
|
+
}): import("child_process").SpawnSyncReturns<string | Buffer<ArrayBufferLike>> | (Promise<$mol_run_error_context> & {
|
|
820
|
+
destructor: () => void;
|
|
821
|
+
});
|
|
822
|
+
static error_message(res?: $mol_run_error_context): string;
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
declare namespace $ {
|
|
827
|
+
function $mol_exec(this: $, dir: string, command: string, ...args: readonly string[]): $mol_run_error_context | import("child_process").SpawnSyncReturns<string | Buffer<ArrayBufferLike>>;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
declare namespace $ {
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
declare namespace $ {
|
|
834
|
+
function $mol_wire_solid(): void;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
declare namespace $ {
|
|
838
|
+
let $mol_mem_persist: typeof $mol_wire_solid;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
declare namespace $ {
|
|
842
|
+
function $mol_wire_probe<Value>(task: () => Value, def?: Value): Value | undefined;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
declare namespace $ {
|
|
846
|
+
let $mol_mem_cached: typeof $mol_wire_probe;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
declare namespace $ {
|
|
850
|
+
class $mol_storage extends $mol_object2 {
|
|
851
|
+
static native(): StorageManager;
|
|
852
|
+
static persisted(next?: boolean, cache?: 'cache'): boolean;
|
|
853
|
+
static estimate(): StorageEstimate;
|
|
854
|
+
static dir(): FileSystemDirectoryHandle;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
declare namespace $ {
|
|
859
|
+
class $mol_state_local<Value> extends $mol_object {
|
|
860
|
+
static 'native()': Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>;
|
|
861
|
+
static native(): Storage | {
|
|
862
|
+
getItem(key: string): any;
|
|
863
|
+
setItem(key: string, value: string): void;
|
|
864
|
+
removeItem(key: string): void;
|
|
865
|
+
};
|
|
866
|
+
static changes(next?: StorageEvent): StorageEvent | undefined;
|
|
867
|
+
static value<Value>(key: string, next?: Value | null): Value | null;
|
|
868
|
+
prefix(): string;
|
|
869
|
+
value(key: string, next?: Value): Value | null;
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
declare namespace $ {
|
|
874
|
+
function $mol_const<Value>(value: Value): {
|
|
875
|
+
(): Value;
|
|
876
|
+
'()': Value;
|
|
877
|
+
};
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
declare namespace $ {
|
|
881
|
+
let $mol_action: typeof $mol_wire_method;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
declare namespace $ {
|
|
885
|
+
export function $mol_wire_async<Host extends object>(obj: Host): ObjectOrFunctionResultPromisify<Host>;
|
|
886
|
+
type FunctionResultPromisify<Some> = Some extends (...args: infer Args) => infer Res ? Res extends PromiseLike<unknown> ? Some : (...args: Args) => Promise<Res> : Some;
|
|
887
|
+
type MethodsResultPromisify<Host extends Object> = {
|
|
888
|
+
[K in keyof Host]: FunctionResultPromisify<Host[K]>;
|
|
889
|
+
};
|
|
890
|
+
type ObjectOrFunctionResultPromisify<Some> = (Some extends (...args: any) => unknown ? FunctionResultPromisify<Some> : {}) & (Some extends Object ? MethodsResultPromisify<Some> : Some);
|
|
891
|
+
export {};
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
declare namespace $ {
|
|
895
|
+
class $mol_lock extends $mol_object {
|
|
896
|
+
protected promise: null | Promise<void>;
|
|
897
|
+
wait(): Promise<() => void>;
|
|
898
|
+
grab(): () => void;
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
declare namespace $ {
|
|
903
|
+
function $mol_compare_array<Value extends ArrayLike<unknown>>(a: Value, b: Value): boolean;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
declare namespace $ {
|
|
907
|
+
type $mol_charset_encoding = 'utf8' | 'utf-16le' | 'utf-16be' | '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';
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
declare namespace $ {
|
|
911
|
+
function $mol_charset_decode(buffer: BufferSource, encoding?: $mol_charset_encoding): string;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
declare namespace $ {
|
|
915
|
+
function $mol_charset_encode(value: string): Uint8Array<ArrayBuffer>;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
declare namespace $ {
|
|
919
|
+
type $mol_file_transaction_mode = 'create' | 'exists_truncate' | 'exists_fail' | 'read_only' | 'write_only' | 'read_write' | 'append';
|
|
920
|
+
type $mol_file_transaction_buffer = ArrayBufferView;
|
|
921
|
+
class $mol_file_transaction extends $mol_object {
|
|
922
|
+
path(): string;
|
|
923
|
+
modes(): readonly $mol_file_transaction_mode[];
|
|
924
|
+
write(options: {
|
|
925
|
+
buffer: ArrayBufferView | string | readonly ArrayBufferView[];
|
|
926
|
+
offset?: number | null;
|
|
927
|
+
length?: number | null;
|
|
928
|
+
position?: number | null;
|
|
929
|
+
}): number;
|
|
930
|
+
read(): Uint8Array<ArrayBuffer>;
|
|
931
|
+
truncate(size: number): void;
|
|
932
|
+
close(): void;
|
|
933
|
+
destructor(): void;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
declare namespace $ {
|
|
938
|
+
class $mol_file_transaction_node extends $mol_file_transaction {
|
|
939
|
+
protected descr(): number;
|
|
940
|
+
write({ buffer, offset, length, position }: {
|
|
941
|
+
buffer: ArrayBufferView | string | readonly ArrayBufferView[];
|
|
942
|
+
offset?: number | null;
|
|
943
|
+
length?: number | null;
|
|
944
|
+
position?: number | null;
|
|
945
|
+
}): number;
|
|
946
|
+
truncate(size: number): void;
|
|
947
|
+
read(): Uint8Array<ArrayBuffer>;
|
|
948
|
+
close(): void;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
declare namespace $ {
|
|
953
|
+
class $mol_file_base extends $mol_object {
|
|
954
|
+
static absolute<This extends typeof $mol_file_base>(this: This, path: string): InstanceType<This>;
|
|
955
|
+
static relative<This extends typeof $mol_file_base>(this: This, path: string): InstanceType<This>;
|
|
956
|
+
static base: string;
|
|
957
|
+
path(): string;
|
|
958
|
+
parent(): this;
|
|
959
|
+
exists_cut(): boolean;
|
|
960
|
+
protected root(): boolean;
|
|
961
|
+
protected stat(next?: $mol_file_stat | null, virt?: 'virt'): $mol_file_stat | null;
|
|
962
|
+
protected static changed: Set<$mol_file_base>;
|
|
963
|
+
protected static frame: null | $mol_after_timeout;
|
|
964
|
+
protected static changed_add(type: 'change' | 'rename', path: string): void;
|
|
965
|
+
static watch_debounce(): number;
|
|
966
|
+
static flush(): void;
|
|
967
|
+
protected static watching: boolean;
|
|
968
|
+
protected static lock: $mol_lock;
|
|
969
|
+
protected static watch_off(path: string): void;
|
|
970
|
+
static unwatched<Result>(side_effect: () => Result, affected_dir: string): Result;
|
|
971
|
+
reset(): void;
|
|
972
|
+
modified(): Date | null;
|
|
973
|
+
version(): string;
|
|
974
|
+
protected info(path: string): null | $mol_file_stat;
|
|
975
|
+
protected ensure(): void;
|
|
976
|
+
protected drop(): void;
|
|
977
|
+
protected copy(to: string): void;
|
|
978
|
+
protected read(): Uint8Array<ArrayBuffer>;
|
|
979
|
+
protected write(buffer: Uint8Array<ArrayBuffer>): void;
|
|
980
|
+
protected kids(): readonly this[];
|
|
981
|
+
readable(opts: {
|
|
982
|
+
start?: number;
|
|
983
|
+
end?: number;
|
|
984
|
+
}): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
985
|
+
writable(opts: {
|
|
986
|
+
start?: number;
|
|
987
|
+
}): WritableStream<Uint8Array<ArrayBuffer>>;
|
|
988
|
+
buffer(next?: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
|
|
989
|
+
stat_make(size: number): {
|
|
990
|
+
readonly type: "file";
|
|
991
|
+
readonly size: number;
|
|
992
|
+
readonly atime: Date;
|
|
993
|
+
readonly mtime: Date;
|
|
994
|
+
readonly ctime: Date;
|
|
995
|
+
};
|
|
996
|
+
clone(to: string): this | null;
|
|
997
|
+
watcher(): {
|
|
998
|
+
destructor(): void;
|
|
999
|
+
};
|
|
1000
|
+
exists(next?: boolean): boolean;
|
|
1001
|
+
type(): "" | $mol_file_type;
|
|
1002
|
+
name(): string;
|
|
1003
|
+
ext(): string;
|
|
1004
|
+
text(next?: string, virt?: 'virt'): string;
|
|
1005
|
+
text_int(next?: string, virt?: 'virt'): string;
|
|
1006
|
+
sub(reset?: null): this[];
|
|
1007
|
+
resolve(path: string): this;
|
|
1008
|
+
relate(base?: $mol_file_base): string;
|
|
1009
|
+
find(include?: RegExp, exclude?: RegExp): this[];
|
|
1010
|
+
size(): number;
|
|
1011
|
+
toJSON(): string;
|
|
1012
|
+
open(...modes: readonly $mol_file_transaction_mode[]): $mol_file_transaction;
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
declare namespace $ {
|
|
1017
|
+
type $mol_file_type = 'file' | 'dir' | 'link';
|
|
1018
|
+
interface $mol_file_stat {
|
|
1019
|
+
type: $mol_file_type;
|
|
1020
|
+
size: number;
|
|
1021
|
+
atime: Date;
|
|
1022
|
+
mtime: Date;
|
|
1023
|
+
ctime: Date;
|
|
1024
|
+
}
|
|
1025
|
+
class $mol_file extends $mol_file_base {
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
declare namespace $ {
|
|
1030
|
+
function $mol_file_node_buffer_normalize(buf: Buffer<ArrayBuffer>): Uint8Array<ArrayBuffer>;
|
|
1031
|
+
class $mol_file_node extends $mol_file {
|
|
1032
|
+
static relative<This extends typeof $mol_file>(this: This, path: string): InstanceType<This>;
|
|
1033
|
+
watcher(reset?: null): {
|
|
1034
|
+
destructor(): void;
|
|
1035
|
+
};
|
|
1036
|
+
protected info(path: string): $mol_file_stat | null;
|
|
1037
|
+
protected ensure(): null | undefined;
|
|
1038
|
+
protected copy(to: string): void;
|
|
1039
|
+
protected drop(): void;
|
|
1040
|
+
protected read(): Uint8Array<ArrayBuffer>;
|
|
1041
|
+
protected write(buffer: Uint8Array<ArrayBuffer>): undefined;
|
|
1042
|
+
protected kids(): this[];
|
|
1043
|
+
resolve(path: string): this;
|
|
1044
|
+
relate(base?: $mol_file): string;
|
|
1045
|
+
readable(opts: {
|
|
1046
|
+
start?: number;
|
|
1047
|
+
end?: number;
|
|
1048
|
+
}): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
1049
|
+
writable(opts?: {
|
|
1050
|
+
start?: number;
|
|
1051
|
+
}): WritableStream<Uint8Array<ArrayBuffer>>;
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
declare namespace $ {
|
|
1056
|
+
var $mol_dom: typeof globalThis;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
declare namespace $ {
|
|
1060
|
+
class $mol_state_local_node<Value> extends $mol_state_local<Value> {
|
|
1061
|
+
static dir(): $mol_file;
|
|
1062
|
+
static value<Value>(key: string, next?: Value | null): Value | null;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
declare namespace $ {
|
|
1067
|
+
interface $mol_locale_dict {
|
|
1068
|
+
[key: string]: string;
|
|
1069
|
+
}
|
|
1070
|
+
class $mol_locale extends $mol_object {
|
|
1071
|
+
static lang_default(): string;
|
|
1072
|
+
static lang(next?: string): string;
|
|
1073
|
+
static source(lang: string): any;
|
|
1074
|
+
static texts(lang: string, next?: $mol_locale_dict): $mol_locale_dict;
|
|
1075
|
+
static text(key: string): string;
|
|
1076
|
+
static warn(key: string): null;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
declare namespace $ {
|
|
1081
|
+
function $mol_view_tree2_to_js(this: $, descr: $mol_tree2): $mol_tree2;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
declare namespace $ {
|
|
1085
|
+
function $mol_view_tree2_to_locale(this: $, module: $mol_tree2): Record<string, string>;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
declare namespace $ {
|
|
1089
|
+
function $mol_view_tree2_to_text(this: $, tree: $mol_tree2): $mol_tree2;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
export = $;
|
|
1093
|
+
//# sourceMappingURL=node.d.ts.map
|