@azerothjs/compiler 0.3.0-alpha.3 → 0.4.0-beta.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.
@@ -0,0 +1,110 @@
1
+ /**
2
+ * True for a single whitespace character (space, tab, newline, etc.).
3
+ *
4
+ * @example
5
+ * ```ts
6
+ * isWhitespace(' '); // true
7
+ * isWhitespace('x'); // false
8
+ * ```
9
+ */
10
+ export declare function isWhitespace(ch: string): boolean;
11
+ /**
12
+ * True for a character that can begin an identifier (letter, `_`, or `$`).
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * isIdentStart('h'); // true
17
+ * isIdentStart('1'); // false (digits cannot start an identifier)
18
+ * ```
19
+ */
20
+ export declare function isIdentStart(ch: string): boolean;
21
+ /**
22
+ * True for a character allowed inside an identifier (an ident-start char or a digit).
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * isIdentPart('1'); // true (digits are fine after the first char)
27
+ * isIdentPart('-'); // false
28
+ * ```
29
+ */
30
+ export declare function isIdentPart(ch: string): boolean;
31
+ /**
32
+ * Skips a `//` line comment; returns the index of the newline (or EOF).
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const src = 'a // note\nb';
37
+ * skipLineComment(src, 2); // 9 (the index of the '\n')
38
+ * ```
39
+ */
40
+ export declare function skipLineComment(src: string, i: number): number;
41
+ /**
42
+ * Skips a block comment (slash-star to star-slash); returns the index just after it.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const src = '/* hi *' + '/x';
47
+ * skipBlockComment(src, 0); // points just past the comment, at 'x'
48
+ * ```
49
+ */
50
+ export declare function skipBlockComment(src: string, i: number): number;
51
+ /**
52
+ * Skips a quoted string (`'` or `"`); `i` points at the opening quote.
53
+ * Returns the index just after the closing quote.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const src = 'x = "hi" + y';
58
+ * skipString(src, 4); // 8 (just past the closing '"')
59
+ * ```
60
+ */
61
+ export declare function skipString(src: string, i: number): number;
62
+ /**
63
+ * Skips a template literal; `i` points at the opening backtick.
64
+ * Handles `${ ... }` substitutions by recursing through `skipBalanced`
65
+ * (which itself re-enters here for nested templates).
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const src = 'tag`a${ b }c` + d';
70
+ * skipTemplate(src, 3); // 13 (just past the closing backtick)
71
+ * ```
72
+ */
73
+ export declare function skipTemplate(src: string, i: number): number;
74
+ /**
75
+ * Skips a regex literal (including trailing flags); `i` points at the leading `/`.
76
+ * Returns the index just after the last flag.
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * const src = 'x = /ab+/gi;';
81
+ * skipRegex(src, 4); // 11 (just past the 'gi' flags)
82
+ * ```
83
+ */
84
+ export declare function skipRegex(src: string, i: number): number;
85
+ /**
86
+ * Given `i` at an opening bracket (`(`, `[`, or `{`), returns the index just
87
+ * after the matching close, skipping strings, templates, comments, and nested
88
+ * brackets so braces inside them don't count.
89
+ *
90
+ * @example
91
+ * ```ts
92
+ * const src = '{ a: { b: 1 } } rest';
93
+ * skipBalanced(src, 0); // 15 (just past the matching outer '}')
94
+ * ```
95
+ */
96
+ export declare function skipBalanced(src: string, openIndex: number): number;
97
+ /**
98
+ * Finds the next `<` that begins a markup element/fragment in expression
99
+ * position, scanning from `from` and correctly skipping all non-code spans.
100
+ * Returns its index, or -1 if there is no more markup.
101
+ *
102
+ * @example
103
+ * ```ts
104
+ * findMarkupStart('return <h1>Hi</h1>;', 0); // 7 (the '<' of <h1>)
105
+ * findMarkupStart('a < b', 0); // -1 (a less-than operator, not markup)
106
+ * findMarkupStart('const s = "<p>";', 0); // -1 (the '<' is inside a string)
107
+ * ```
108
+ */
109
+ export declare function findMarkupStart(src: string, from: number): number;
110
+ //# sourceMappingURL=scanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../src/scanner.ts"],"names":[],"mappings":"AAiBA;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAGhD;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAGhD;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAG/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ/D;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAmBzD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAwB3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAqCxD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAmDnE;AA6BD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAkFjE"}
@@ -0,0 +1,333 @@
1
+ // Context-aware lexing helpers for finding markup inside arbitrary JS/TS
2
+ // without a full parser. Two jobs:
3
+ //
4
+ // 1. Skip non-code spans correctly - line/block comments, single/double
5
+ // quoted strings, template literals (with nested `${ ... }`), and regex
6
+ // literals - so a `<`, `{`, or `}` inside them is never mistaken for
7
+ // syntax.
8
+ //
9
+ // 2. Decide whether a `<` (or `/`) sits in expression position, which is
10
+ // what distinguishes markup from a less-than operator (and a regex from
11
+ // a divide). We track the previous significant token to make that call,
12
+ // the same trick hand-written JSX transforms use.
13
+ //
14
+ // These are pure functions over (src, index) -> nextIndex, shared with the
15
+ // parser (which also needs balanced-brace capture for `{...}` holes and
16
+ // `(...)`/`[...]`).
17
+ /**
18
+ * True for a single whitespace character (space, tab, newline, etc.).
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * isWhitespace(' '); // true
23
+ * isWhitespace('x'); // false
24
+ * ```
25
+ */
26
+ export function isWhitespace(ch) {
27
+ return ch === ' ' || ch === '\t' || ch === '\n' || ch === '\r' || ch === '\f' || ch === '\v';
28
+ }
29
+ /**
30
+ * True for a character that can begin an identifier (letter, `_`, or `$`).
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * isIdentStart('h'); // true
35
+ * isIdentStart('1'); // false (digits cannot start an identifier)
36
+ * ```
37
+ */
38
+ export function isIdentStart(ch) {
39
+ return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch === '_' || ch === '$';
40
+ }
41
+ /**
42
+ * True for a character allowed inside an identifier (an ident-start char or a digit).
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * isIdentPart('1'); // true (digits are fine after the first char)
47
+ * isIdentPart('-'); // false
48
+ * ```
49
+ */
50
+ export function isIdentPart(ch) {
51
+ return isIdentStart(ch) || (ch >= '0' && ch <= '9');
52
+ }
53
+ /**
54
+ * Skips a `//` line comment; returns the index of the newline (or EOF).
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * const src = 'a // note\nb';
59
+ * skipLineComment(src, 2); // 9 (the index of the '\n')
60
+ * ```
61
+ */
62
+ export function skipLineComment(src, i) {
63
+ i += 2;
64
+ while (i < src.length && src[i] !== '\n') {
65
+ i++;
66
+ }
67
+ return i;
68
+ }
69
+ /**
70
+ * Skips a block comment (slash-star to star-slash); returns the index just after it.
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * const src = '/* hi *' + '/x';
75
+ * skipBlockComment(src, 0); // points just past the comment, at 'x'
76
+ * ```
77
+ */
78
+ export function skipBlockComment(src, i) {
79
+ i += 2;
80
+ while (i < src.length && !(src[i] === '*' && src[i + 1] === '/')) {
81
+ i++;
82
+ }
83
+ return Math.min(i + 2, src.length);
84
+ }
85
+ /**
86
+ * Skips a quoted string (`'` or `"`); `i` points at the opening quote.
87
+ * Returns the index just after the closing quote.
88
+ *
89
+ * @example
90
+ * ```ts
91
+ * const src = 'x = "hi" + y';
92
+ * skipString(src, 4); // 8 (just past the closing '"')
93
+ * ```
94
+ */
95
+ export function skipString(src, i) {
96
+ const quote = src[i];
97
+ i++;
98
+ while (i < src.length) {
99
+ const ch = src[i];
100
+ if (ch === '\\') {
101
+ i += 2;
102
+ continue;
103
+ }
104
+ if (ch === quote) {
105
+ return i + 1;
106
+ }
107
+ i++;
108
+ }
109
+ return i;
110
+ }
111
+ /**
112
+ * Skips a template literal; `i` points at the opening backtick.
113
+ * Handles `${ ... }` substitutions by recursing through `skipBalanced`
114
+ * (which itself re-enters here for nested templates).
115
+ *
116
+ * @example
117
+ * ```ts
118
+ * const src = 'tag`a${ b }c` + d';
119
+ * skipTemplate(src, 3); // 13 (just past the closing backtick)
120
+ * ```
121
+ */
122
+ export function skipTemplate(src, i) {
123
+ i++; // past opening `
124
+ while (i < src.length) {
125
+ const ch = src[i];
126
+ if (ch === '\\') {
127
+ i += 2;
128
+ continue;
129
+ }
130
+ if (ch === '`') {
131
+ return i + 1;
132
+ }
133
+ if (ch === '$' && src[i + 1] === '{') {
134
+ // The substitution is balanced like any `{ ... }` block.
135
+ i = skipBalanced(src, i + 1);
136
+ continue;
137
+ }
138
+ i++;
139
+ }
140
+ return i;
141
+ }
142
+ /**
143
+ * Skips a regex literal (including trailing flags); `i` points at the leading `/`.
144
+ * Returns the index just after the last flag.
145
+ *
146
+ * @example
147
+ * ```ts
148
+ * const src = 'x = /ab+/gi;';
149
+ * skipRegex(src, 4); // 11 (just past the 'gi' flags)
150
+ * ```
151
+ */
152
+ export function skipRegex(src, i) {
153
+ i++; // past /
154
+ let inClass = false;
155
+ while (i < src.length) {
156
+ const ch = src[i];
157
+ if (ch === '\\') {
158
+ i += 2;
159
+ continue;
160
+ }
161
+ if (ch === '[') {
162
+ inClass = true;
163
+ }
164
+ else if (ch === ']') {
165
+ inClass = false;
166
+ }
167
+ else if (ch === '/' && !inClass) {
168
+ i++;
169
+ break;
170
+ }
171
+ else if (ch === '\n') {
172
+ break; // unterminated - bail rather than run away
173
+ }
174
+ i++;
175
+ }
176
+ // Trailing flags (g, i, m, ...).
177
+ while (i < src.length && isIdentPart(src[i])) {
178
+ i++;
179
+ }
180
+ return i;
181
+ }
182
+ /**
183
+ * Given `i` at an opening bracket (`(`, `[`, or `{`), returns the index just
184
+ * after the matching close, skipping strings, templates, comments, and nested
185
+ * brackets so braces inside them don't count.
186
+ *
187
+ * @example
188
+ * ```ts
189
+ * const src = '{ a: { b: 1 } } rest';
190
+ * skipBalanced(src, 0); // 15 (just past the matching outer '}')
191
+ * ```
192
+ */
193
+ export function skipBalanced(src, openIndex) {
194
+ const open = src[openIndex];
195
+ const close = open === '(' ? ')' : open === '[' ? ']' : '}';
196
+ let depth = 0;
197
+ let i = openIndex;
198
+ while (i < src.length) {
199
+ const ch = src[i];
200
+ if (ch === '/' && src[i + 1] === '/') {
201
+ i = skipLineComment(src, i);
202
+ continue;
203
+ }
204
+ if (ch === '/' && src[i + 1] === '*') {
205
+ i = skipBlockComment(src, i);
206
+ continue;
207
+ }
208
+ if (ch === '"' || ch === '\'') {
209
+ i = skipString(src, i);
210
+ continue;
211
+ }
212
+ if (ch === '`') {
213
+ i = skipTemplate(src, i);
214
+ continue;
215
+ }
216
+ if (ch === open) {
217
+ depth++;
218
+ i++;
219
+ continue;
220
+ }
221
+ if (ch === close) {
222
+ depth--;
223
+ i++;
224
+ if (depth === 0) {
225
+ return i;
226
+ }
227
+ continue;
228
+ }
229
+ i++;
230
+ }
231
+ return i; // unbalanced - caller treats as EOF
232
+ }
233
+ /** Keywords after which a `<` or `/` begins an expression (markup / regex). */
234
+ const EXPR_KEYWORDS = new Set([
235
+ 'return', 'typeof', 'instanceof', 'in', 'of', 'do', 'else',
236
+ 'yield', 'await', 'case', 'delete', 'void', 'new'
237
+ ]);
238
+ /** Punctuators after which an expression (hence markup / regex) can start. */
239
+ const EXPR_CHARS = new Set([
240
+ '', '(', '{', '[', ',', ';', ':', '?', '=', '>', '<',
241
+ '&', '|', '!', '~', '+', '-', '*', '/', '%', '^', '\n'
242
+ ]);
243
+ /**
244
+ * Whether a `<` / `/` at the current point is in expression position
245
+ * (markup / regex) rather than a binary operator. Based on the previous
246
+ * significant token: an identifier or literal that ends an expression means
247
+ * binary; a punctuator/keyword that expects an operand means expression.
248
+ */
249
+ function isExpressionPosition(prevChar, prevWord) {
250
+ if (prevWord !== '') {
251
+ return EXPR_KEYWORDS.has(prevWord);
252
+ }
253
+ return EXPR_CHARS.has(prevChar);
254
+ }
255
+ /**
256
+ * Finds the next `<` that begins a markup element/fragment in expression
257
+ * position, scanning from `from` and correctly skipping all non-code spans.
258
+ * Returns its index, or -1 if there is no more markup.
259
+ *
260
+ * @example
261
+ * ```ts
262
+ * findMarkupStart('return <h1>Hi</h1>;', 0); // 7 (the '<' of <h1>)
263
+ * findMarkupStart('a < b', 0); // -1 (a less-than operator, not markup)
264
+ * findMarkupStart('const s = "<p>";', 0); // -1 (the '<' is inside a string)
265
+ * ```
266
+ */
267
+ export function findMarkupStart(src, from) {
268
+ let i = from;
269
+ let prevChar = '';
270
+ let prevWord = '';
271
+ while (i < src.length) {
272
+ const ch = src[i];
273
+ if (ch === '/' && src[i + 1] === '/') {
274
+ i = skipLineComment(src, i);
275
+ continue;
276
+ }
277
+ if (ch === '/' && src[i + 1] === '*') {
278
+ i = skipBlockComment(src, i);
279
+ continue;
280
+ }
281
+ if (ch === '"' || ch === '\'') {
282
+ i = skipString(src, i);
283
+ prevChar = '"';
284
+ prevWord = '';
285
+ continue;
286
+ }
287
+ if (ch === '`') {
288
+ i = skipTemplate(src, i);
289
+ prevChar = '`';
290
+ prevWord = '';
291
+ continue;
292
+ }
293
+ if (ch === '/' && isExpressionPosition(prevChar, prevWord)) {
294
+ i = skipRegex(src, i);
295
+ prevChar = '/';
296
+ prevWord = '';
297
+ continue;
298
+ }
299
+ if (isWhitespace(ch)) {
300
+ if (ch === '\n') {
301
+ // A newline only matters for the very specific ASI
302
+ // cases; keep prevChar so `a\n< b` stays a compare.
303
+ }
304
+ i++;
305
+ continue;
306
+ }
307
+ if (ch === '<') {
308
+ const next = src[i + 1];
309
+ if (isExpressionPosition(prevChar, prevWord) && (next === '>' || isIdentStart(next))) {
310
+ return i;
311
+ }
312
+ prevChar = '<';
313
+ prevWord = '';
314
+ i++;
315
+ continue;
316
+ }
317
+ if (isIdentStart(ch)) {
318
+ let j = i + 1;
319
+ while (j < src.length && isIdentPart(src[j])) {
320
+ j++;
321
+ }
322
+ prevWord = src.slice(i, j);
323
+ prevChar = src[j - 1];
324
+ i = j;
325
+ continue;
326
+ }
327
+ prevChar = ch;
328
+ prevWord = '';
329
+ i++;
330
+ }
331
+ return -1;
332
+ }
333
+ //# sourceMappingURL=scanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scanner.js","sourceRoot":"","sources":["../src/scanner.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,mCAAmC;AACnC,EAAE;AACF,0EAA0E;AAC1E,6EAA6E;AAC7E,0EAA0E;AAC1E,eAAe;AACf,EAAE;AACF,2EAA2E;AAC3E,6EAA6E;AAC7E,6EAA6E;AAC7E,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,wEAAwE;AACxE,oBAAoB;AAEpB;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,EAAU;IAEnC,OAAO,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,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GAAG,CAAC,MAAM,IAAI,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAC5C,CAAC;gBACG,CAAC,EAAE,CAAC;YACR,CAAC;YACD,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC3B,QAAQ,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACtB,CAAC,GAAG,CAAC,CAAC;YACN,SAAS;QACb,CAAC;QAED,QAAQ,GAAG,EAAE,CAAC;QACd,QAAQ,GAAG,EAAE,CAAC;QACd,CAAC,EAAE,CAAC;IACR,CAAC;IAED,OAAO,CAAC,CAAC,CAAC;AACd,CAAC"}
@@ -0,0 +1,64 @@
1
+ /** A Source Map v3 object (the shape tools and Vite expect). */
2
+ export interface SourceMapV3 {
3
+ version: 3;
4
+ sources: string[];
5
+ sourcesContent: string[];
6
+ names: string[];
7
+ mappings: string;
8
+ }
9
+ /** One mapping segment: a generated column to a source position. */
10
+ export interface RawSegment {
11
+ genColumn: number;
12
+ sourceLine: number;
13
+ sourceColumn: number;
14
+ }
15
+ /**
16
+ * Encodes a signed integer as a base64 VLQ (the source-map number format).
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * vlqEncode(0); // 'A'
21
+ * vlqEncode(1); // 'C' (1 << 1 = 2 -> base64 'C')
22
+ * vlqEncode(-1); // 'D' (sign bit set -> 3 -> base64 'D')
23
+ * ```
24
+ */
25
+ export declare function vlqEncode(value: number): string;
26
+ /**
27
+ * Offsets at which each line of `text` begins (index 0 = line 0).
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * buildLineStarts('ab\ncd\n'); // [0, 3, 6]
32
+ * ```
33
+ */
34
+ export declare function buildLineStarts(text: string): number[];
35
+ /**
36
+ * Converts a byte offset to a 0-based `{ line, column }` location.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const starts = buildLineStarts('ab\ncd\n'); // [0, 3, 6]
41
+ * locationFor(4, starts); // { line: 1, column: 1 } (the 'd' on line 1)
42
+ * ```
43
+ */
44
+ export declare function locationFor(offset: number, lineStarts: number[]): {
45
+ line: number;
46
+ column: number;
47
+ };
48
+ /**
49
+ * Encodes per-line segment lists into the `mappings` string.
50
+ * `genColumn` is relative within a line (reset each line); the
51
+ * source fields are relative across the whole file, per the spec.
52
+ * A single source (index 0) is assumed.
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * encodeMappings([
57
+ * [{ genColumn: 0, sourceLine: 0, sourceColumn: 0 }], // line 0 -> source 0:0
58
+ * [{ genColumn: 0, sourceLine: 1, sourceColumn: 0 }] // line 1 -> source 1:0
59
+ * ]);
60
+ * // 'AAAA;AACA' (one ';'-separated segment per generated line)
61
+ * ```
62
+ */
63
+ export declare function encodeMappings(lines: RawSegment[][]): string;
64
+ //# sourceMappingURL=sourcemap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sourcemap.d.ts","sourceRoot":"","sources":["../src/sourcemap.ts"],"names":[],"mappings":"AAQA,gEAAgE;AAChE,MAAM,WAAW,WAAW;IAExB,OAAO,EAAE,CAAC,CAAC;IACX,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,oEAAoE;AACpE,MAAM,WAAW,UAAU;IAEvB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACxB;AAID;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAgB/C;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAWtD;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAiBlG;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,GAAG,MAAM,CAyB5D"}
@@ -0,0 +1,109 @@
1
+ // A minimal Source Map v3 generator with no dependencies. We only need
2
+ // line-level mappings, which is what stack traces use: one segment at the
3
+ // start of each generated line, pointing back into the `.azeroth` source.
4
+ //
5
+ // This is accurate because the transform leaves non-markup byte-for-byte: a
6
+ // generated line that came from verbatim source maps 1:1; a generated line
7
+ // inside a compiled markup region maps to that region's starting position.
8
+ const BASE64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
9
+ /**
10
+ * Encodes a signed integer as a base64 VLQ (the source-map number format).
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * vlqEncode(0); // 'A'
15
+ * vlqEncode(1); // 'C' (1 << 1 = 2 -> base64 'C')
16
+ * vlqEncode(-1); // 'D' (sign bit set -> 3 -> base64 'D')
17
+ * ```
18
+ */
19
+ export function vlqEncode(value) {
20
+ // Sign goes in the least-significant bit.
21
+ let vlq = value < 0 ? ((-value) << 1) | 1 : value << 1;
22
+ let out = '';
23
+ do {
24
+ let digit = vlq & 0b11111;
25
+ vlq >>>= 5;
26
+ if (vlq > 0) {
27
+ digit |= 0b100000; // continuation bit
28
+ }
29
+ out += BASE64[digit];
30
+ } while (vlq > 0);
31
+ return out;
32
+ }
33
+ /**
34
+ * Offsets at which each line of `text` begins (index 0 = line 0).
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * buildLineStarts('ab\ncd\n'); // [0, 3, 6]
39
+ * ```
40
+ */
41
+ export function buildLineStarts(text) {
42
+ const starts = [0];
43
+ for (let i = 0; i < text.length; i++) {
44
+ if (text[i] === '\n') {
45
+ starts.push(i + 1);
46
+ }
47
+ }
48
+ return starts;
49
+ }
50
+ /**
51
+ * Converts a byte offset to a 0-based `{ line, column }` location.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const starts = buildLineStarts('ab\ncd\n'); // [0, 3, 6]
56
+ * locationFor(4, starts); // { line: 1, column: 1 } (the 'd' on line 1)
57
+ * ```
58
+ */
59
+ export function locationFor(offset, lineStarts) {
60
+ let lo = 0;
61
+ let hi = lineStarts.length - 1;
62
+ while (lo < hi) {
63
+ const mid = (lo + hi + 1) >> 1;
64
+ if (lineStarts[mid] <= offset) {
65
+ lo = mid;
66
+ }
67
+ else {
68
+ hi = mid - 1;
69
+ }
70
+ }
71
+ return { line: lo, column: offset - lineStarts[lo] };
72
+ }
73
+ /**
74
+ * Encodes per-line segment lists into the `mappings` string.
75
+ * `genColumn` is relative within a line (reset each line); the
76
+ * source fields are relative across the whole file, per the spec.
77
+ * A single source (index 0) is assumed.
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * encodeMappings([
82
+ * [{ genColumn: 0, sourceLine: 0, sourceColumn: 0 }], // line 0 -> source 0:0
83
+ * [{ genColumn: 0, sourceLine: 1, sourceColumn: 0 }] // line 1 -> source 1:0
84
+ * ]);
85
+ * // 'AAAA;AACA' (one ';'-separated segment per generated line)
86
+ * ```
87
+ */
88
+ export function encodeMappings(lines) {
89
+ let prevSourceLine = 0;
90
+ let prevSourceColumn = 0;
91
+ const encodedLines = [];
92
+ for (const segments of lines) {
93
+ let prevGenColumn = 0;
94
+ const encoded = [];
95
+ for (const seg of segments) {
96
+ let chunk = vlqEncode(seg.genColumn - prevGenColumn);
97
+ prevGenColumn = seg.genColumn;
98
+ chunk += vlqEncode(0); // sourceIndex delta (always 0 - one source)
99
+ chunk += vlqEncode(seg.sourceLine - prevSourceLine);
100
+ prevSourceLine = seg.sourceLine;
101
+ chunk += vlqEncode(seg.sourceColumn - prevSourceColumn);
102
+ prevSourceColumn = seg.sourceColumn;
103
+ encoded.push(chunk);
104
+ }
105
+ encodedLines.push(encoded.join(','));
106
+ }
107
+ return encodedLines.join(';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