mol_tree2 1.0.1388 → 1.0.1390

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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/web.d.ts +265 -0
  3. package/web.d.ts.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mol_tree2",
3
- "version": "1.0.1388",
3
+ "version": "1.0.1390",
4
4
  "exports": {
5
5
  "node": {
6
6
  "import": "./node.mjs",
package/web.d.ts CHANGED
@@ -1,3 +1,268 @@
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
+ const $mol_key_handle: unique symbol;
62
+ const $mol_key_store: WeakMap<object, string>;
63
+ }
64
+
65
+ declare namespace $ {
66
+ class $mol_object2 {
67
+ static $: $;
68
+ [Symbol.toStringTag]: string;
69
+ [$mol_ambient_ref]: $;
70
+ get $(): $;
71
+ set $(next: $);
72
+ static create<Instance>(this: new (init?: (instance: any) => void) => Instance, init?: (instance: $mol_type_writable<Instance>) => void): Instance;
73
+ static [Symbol.toPrimitive](): any;
74
+ static toString(): any;
75
+ static toJSON(): any;
76
+ static [$mol_key_handle](): any;
77
+ destructor(): void;
78
+ static destructor(): void;
79
+ [Symbol.dispose](): void;
80
+ toString(): string;
81
+ }
82
+ }
83
+
84
+ declare namespace $ {
85
+ class $mol_span extends $mol_object2 {
86
+ readonly uri: string;
87
+ readonly source: string;
88
+ readonly row: number;
89
+ readonly col: number;
90
+ readonly length: number;
91
+ constructor(uri: string, source: string, row: number, col: number, length: number);
92
+ static unknown: $mol_span;
93
+ static begin(uri: string, source?: string): $mol_span;
94
+ static end(uri: string, source: string): $mol_span;
95
+ static entire(uri: string, source: string): $mol_span;
96
+ toString(): string;
97
+ toJSON(): {
98
+ uri: string;
99
+ row: number;
100
+ col: number;
101
+ length: number;
102
+ };
103
+ error(message: string, Class?: ErrorConstructor): Error;
104
+ span(row: number, col: number, length: number): $mol_span;
105
+ after(length?: number): $mol_span;
106
+ slice(begin: number, end?: number): $mol_span;
107
+ }
108
+ }
109
+
110
+ declare namespace $ {
111
+ class $mol_error_syntax extends SyntaxError {
112
+ reason: string;
113
+ line: string;
114
+ span: $mol_span;
115
+ constructor(reason: string, line: string, span: $mol_span);
116
+ }
117
+ }
118
+
119
+ declare namespace $ {
120
+ function $mol_tree2_from_string(this: $, str: string, uri?: string): $mol_tree2;
121
+ }
122
+
123
+ declare namespace $ {
124
+ function $mol_tree2_to_string(this: $, tree: $mol_tree2): string;
125
+ }
126
+
127
+ declare namespace $ {
128
+ function $mol_maybe<Value>(value: Value | null | undefined): Value[];
129
+ }
130
+
131
+ declare namespace $ {
132
+ type $mol_tree2_path = Array<string | number | null>;
133
+ type $mol_tree2_hack<Context> = (input: $mol_tree2, belt: $mol_tree2_belt<Context>, context: Context) => readonly $mol_tree2[];
134
+ type $mol_tree2_belt<Context> = Record<string, $mol_tree2_hack<Context>>;
135
+ class $mol_tree2 extends Object {
136
+ readonly type: string;
137
+ readonly value: string;
138
+ readonly kids: readonly $mol_tree2[];
139
+ readonly span: $mol_span;
140
+ constructor(type: string, value: string, kids: readonly $mol_tree2[], span: $mol_span);
141
+ static list(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
142
+ list(kids: readonly $mol_tree2[]): $mol_tree2;
143
+ static data(value: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
144
+ data(value: string, kids?: readonly $mol_tree2[]): $mol_tree2;
145
+ static struct(type: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
146
+ struct(type: string, kids?: readonly $mol_tree2[]): $mol_tree2;
147
+ clone(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
148
+ text(): string;
149
+ static fromString(str: string, uri?: string): $mol_tree2;
150
+ toString(): string;
151
+ insert(value: $mol_tree2 | null, ...path: $mol_tree2_path): $mol_tree2;
152
+ update(value: readonly $mol_tree2[], ...path: $mol_tree2_path): readonly $mol_tree2[];
153
+ select(...path: $mol_tree2_path): $mol_tree2;
154
+ filter(path: string[], value?: string): $mol_tree2;
155
+ hack_self<Context extends {
156
+ span?: $mol_span;
157
+ [key: string]: unknown;
158
+ } = {}>(belt: $mol_tree2_belt<Context>, context?: Context): readonly $mol_tree2[];
159
+ hack<Context extends {
160
+ span?: $mol_span;
161
+ [key: string]: unknown;
162
+ } = {}>(belt: $mol_tree2_belt<Context>, context?: Context): $mol_tree2[];
163
+ error(message: string, Class?: ErrorConstructor): Error;
164
+ }
165
+ class $mol_tree2_empty extends $mol_tree2 {
166
+ constructor();
167
+ }
168
+ }
169
+
170
+ declare namespace $ {
171
+ function $mol_array_chunks<Item>(array: readonly Item[], rule: number | ((item: Item, index: number) => boolean)): Item[][];
172
+ }
173
+
174
+ declare namespace $ {
175
+ function $mol_tree2_from_json(json: any, span?: $mol_span): $mol_tree2;
176
+ }
177
+
178
+ declare namespace $ {
179
+ function $mol_tree2_js_is_number(type: string): boolean | RegExpMatchArray;
180
+ }
181
+
182
+ declare namespace $ {
183
+ function $mol_tree2_js_to_text(this: $, js: $mol_tree2): $mol_tree2;
184
+ }
185
+
186
+ declare namespace $ {
187
+ function $mol_tree2_span_imprint(tree: $mol_tree2): $mol_tree2;
188
+ }
189
+
190
+ declare namespace $ {
191
+ function $mol_tree2_span_reuse(tree: $mol_tree2): $mol_tree2;
192
+ }
193
+
194
+ declare namespace $ {
195
+ function $mol_tree2_text_to_string(this: $, text: $mol_tree2): string;
196
+ }
197
+
198
+ declare namespace $ {
199
+ function $mol_vlq_encode(val: number): string;
200
+ }
201
+
202
+ declare namespace $ {
203
+ type $mol_sourcemap_segment = [number] | [number, number, number, number] | [number, number, number, number, number];
204
+ type $mol_sourcemap_line = $mol_sourcemap_segment[];
205
+ type $mol_sourcemap_mappings = $mol_sourcemap_line[];
206
+ interface $mol_sourcemap_raw {
207
+ version: number;
208
+ sources: string[];
209
+ names?: string[];
210
+ sourceRoot?: string;
211
+ sourcesContent?: (string | null)[];
212
+ mappings: string | $mol_sourcemap_line[];
213
+ file?: string;
214
+ }
215
+ }
216
+
217
+ declare namespace $ {
218
+ function $mol_tree2_text_to_sourcemap(this: $, tree: $mol_tree2): $mol_sourcemap_raw;
219
+ }
220
+
221
+ declare namespace $ {
222
+ function $mol_sourcemap_url(this: $, uri: string, type?: "js" | "css"): string;
223
+ }
224
+
225
+ declare namespace $ {
226
+ function $mol_sourcemap_dataurl_decode(this: $, data: string): $mol_sourcemap_raw | undefined;
227
+ function $mol_sourcemap_dataurl_encode(this: $, map: $mol_sourcemap_raw, type?: "js" | "css"): string;
228
+ }
229
+
230
+ declare namespace $ {
231
+ function $mol_tree2_text_to_string_mapped(this: $, text: $mol_tree2, type: 'js' | 'css'): string;
232
+ function $mol_tree2_text_to_string_mapped_js(this: $, text: $mol_tree2): string;
233
+ function $mol_tree2_text_to_string_mapped_css(this: $, text: $mol_tree2): string;
234
+ }
235
+
236
+ declare namespace $ {
237
+ function $mol_guard_defined<T>(value: T): value is NonNullable<T>;
238
+ }
239
+
240
+ declare namespace $ {
241
+ function $mol_tree2_text_to_sourcemap_vis(this: $, text: $mol_tree2): string;
242
+ }
243
+
244
+ declare namespace $ {
245
+ function $mol_tree2_to_json(this: $, tree: $mol_tree2): unknown;
246
+ }
247
+
248
+ declare namespace $ {
249
+ function $mol_tree2_to_stream(tree: $mol_tree2, output: {
250
+ write(chunk: string): boolean;
251
+ once?(event: 'drain', cb: () => void): void;
252
+ }, prefix?: string): Promise<void>;
253
+ }
254
+
255
+ declare namespace $ {
256
+ function $mol_tree2_xml_from_dom(dom: Node): $mol_tree2;
257
+ }
258
+
259
+ declare namespace $ {
260
+ function $mol_html_encode(text: string): string;
261
+ }
262
+
263
+ declare namespace $ {
264
+ function $mol_tree2_xml_to_text(xml: $mol_tree2): $mol_tree2;
265
+ }
1
266
 
2
267
  export = $;
3
268
  //# sourceMappingURL=web.d.ts.map
package/web.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"sources":["../../../../mam.d.ts","../../../ambient/ambient.d.ts","../../../delegate/delegate.d.ts","../../../owning/owning.d.ts","../../../fail/fail.d.ts","../../../fail/hidden/hidden.d.ts","../../../type/writable/writable.d.ts","../../../func/name/name.d.ts","../../../key/key.d.ts","../../../object2/object2.d.ts","../../../span/span.d.ts","../../../error/syntax/syntax.d.ts","../../from/string/string.d.ts","../../to/string/string.d.ts","../../../maybe/maybe.d.ts","../../tree2.d.ts","../../../array/chunks/chunks.d.ts","../../from/json/json.d.ts","../../js/is/number/number.d.ts","../../js/to/text/text.d.ts","../../span/imprint/imprint.d.ts","../../span/reuse/reuse.d.ts","../../text/to/string/string.d.ts","../../../vlq/vlq.d.ts","../../../sourcemap/sourcemap.d.ts","../../text/to/sourcemap/sourcemap.d.ts","../../../sourcemap/url/url.d.ts","../../../sourcemap/dataurl/dataurl.d.ts","../../text/to/string/mapped/mapped.d.ts","../../../guard/defined.d.ts","../../text/to/sourcemap/vis/vis.d.ts","../../to/json/json.d.ts","../../to/stream/stream.d.ts","../../xml/from/dom/dom.d.ts","../../../html/encode/encode.d.ts","../../xml/to/text/text.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACbA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACRA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtCA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACdA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;ACNA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA","sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]}