-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlib_core_renderer_listManager.js.html
More file actions
633 lines (573 loc) · 32.2 KB
/
Copy pathlib_core_renderer_listManager.js.html
File metadata and controls
633 lines (573 loc) · 32.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: lib/core/renderer/listManager.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: lib/core/renderer/listManager.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>import { DomPatcher } from './domPatch.js';
import { logger } from '../runtime/AvenxLogger.js';
import { AvenxErrorCodes, formatMessage } from '../runtime/AvenxError.js';
/**
* Handles efficient rendering of lists by managing DOM fragments and performing keyed diffing.
*/
export class ListManager {
/** @type {WeakMap<HTMLTemplateElement, {listRef: Array, items: Array}>} */
#listCache = new WeakMap();
/** @type {WeakMap<HTMLTemplateElement, Array<Element>>} */
#nodePool = new WeakMap();
/**
* @param {DynamicEvaluator} evaluator - The expression evaluator.
* @param {TemplateRenderer} renderer - The template renderer.
* @param {EventBinder} [eventBinder] - The event binder to unbind removed elements.
* @param {string} [componentName] - The component name.
*/
constructor(evaluator, renderer, eventBinder, componentName) {
this.evaluator = evaluator;
this.renderer = renderer;
this.eventBinder = eventBinder;
this.componentName = componentName;
this.patcher = new DomPatcher();
if (typeof document !== 'undefined' && typeof document.createElement === 'function') {
this.parserDiv = document.createElement('div');
}
}
/**
* Processes all template-based lists within a root element.
* @param {Element} root - The root element to search in.
* @param {object} scope - The evaluation scope.
* @param {object} state - The component state.
* @param {object} [app] - The application context.
*/
process(root, scope, state, app) {
const templates = root.querySelectorAll('template[data-ax-for]');
templates.forEach((template) => {
let parent = template.parentNode;
let insideSlot = false;
while (parent) {
if (parent.nodeName === 'SLOT' && parent.hasAttribute && parent.hasAttribute('data-avenx-transcluded')) {
insideSlot = true;
break;
}
parent = parent.parentNode;
}
if (!insideSlot) {
this.#updateList(template, scope, state, app);
}
});
}
/**
* Updates a specific list based on its template and current state.
* @param {HTMLTemplateElement} template - The list template.
* @param {object} scope - The evaluation scope.
* @param {object} state - The component state.
* @param {object} [app] - The application context.
* @private
*/
#updateList(template, scope, state, app) {
const listExpr = template.getAttribute('data-ax-for');
const itemVar = template.getAttribute('data-ax-as');
const keyExpr = template.getAttribute('data-ax-key');
let list;
try {
list = this.evaluator.evaluateExpression(listExpr, scope, state);
} catch (e) {
logger.warn(
formatMessage(AvenxErrorCodes.RENDER_LIST_EVALUATION_FAILED, listExpr, e.message || e, this.componentName || 'AnonymousComponent')
);
return;
}
if (!Array.isArray(list)) {
list = [];
}
const cached = this.#listCache.get(template);
if (
cached &&
cached.listRef === list &&
cached.items.length === list.length &&
cached.items.every((item, i) => item === list[i])
) {
return;
}
const rawItems = list.map((item, index) => {
const itemScope = { ...scope, [itemVar]: item, index };
let key = index;
if (keyExpr) {
try {
key = this.evaluator.evaluateExpression(keyExpr, itemScope, state);
} catch (e) {
logger.warn(
`[AVX_W19] Failed to evaluate key expression "${keyExpr}" in component <${this.componentName || 'AnonymousComponent'}>: ${e.message || e}`
);
}
}
return { item, key: String(key), itemScope, index };
});
const keyCounts = {};
for (const entry of rawItems) {
keyCounts[entry.key] = (keyCounts[entry.key] || 0) + 1;
}
const warnedKeys = new Set();
const nextItems = rawItems.map((entry) => {
let finalKey = entry.key;
if (keyCounts[entry.key] > 1) {
if (!warnedKeys.has(entry.key)) {
logger.warn(
formatMessage(AvenxErrorCodes.RENDER_LIST_DUPLICATE_KEY, entry.key, listExpr)
);
warnedKeys.add(entry.key);
}
finalKey = `${entry.key}_${entry.index}`;
}
return { item: entry.item, key: finalKey, itemScope: entry.itemScope };
});
// 1. Double-ended list diffing: common prefix and common suffix matching
const currentItemsMap = this.#getCurrentItems(template);
const oldChildren = Array.from(currentItemsMap.values());
const itemTemplate = template.innerHTML.replace(/{%/g, '{{').replace(/%}/g, '}}');
let i = 0;
let e1 = oldChildren.length - 1;
let e2 = nextItems.length - 1;
// 1.1 Sync Head (Common Prefix)
while (i <= e1 && i <= e2) {
const oldChild = oldChildren[i];
const nextItem = nextItems[i];
const oldKey = oldChild.getAttribute('data-ax-key-val');
if (oldKey === nextItem.key) {
this.#createOrPatchItem(nextItem, oldChild, itemTemplate, scope, state, app, template);
i++;
} else {
break;
}
}
// 1.2 Sync Tail (Common Suffix)
while (i <= e1 && i <= e2) {
const oldChild = oldChildren[e1];
const nextItem = nextItems[e2];
const oldKey = oldChild.getAttribute('data-ax-key-val');
if (oldKey === nextItem.key) {
this.#createOrPatchItem(nextItem, oldChild, itemTemplate, scope, state, app, template);
e1--;
e2--;
} else {
break;
}
}
// 1.3 Additions only (common prefix/suffix covered all old items)
if (i > e1) {
if (i <= e2) {
const anchor = e2 + 1 < nextItems.length ? currentItemsMap.get(nextItems[e2 + 1].key) : null;
let lastEl = i > 0 ? currentItemsMap.get(nextItems[i - 1].key) : template;
for (let k = i; k <= e2; k++) {
const newEl = this.#createOrPatchItem(nextItems[k], null, itemTemplate, scope, state, app, template);
if (anchor) {
this.#insertNodeBefore(newEl, anchor, lastEl);
} else {
this.#insertNodeAfter(newEl, lastEl);
}
lastEl = newEl;
}
}
}
// 1.4 Deletions only (common prefix/suffix covered all new items)
else if (i > e2) {
while (i <= e1) {
this.#removeItem(oldChildren[i], template, app);
i++;
}
}
// 1.5 General case (unknown sequence in middle): use LIS algorithm to minimize moves
else {
const s1 = i;
const s2 = i;
const toBePatched = e2 - s2 + 1;
const newIndexToOldIndexMap = new Array(toBePatched).fill(0);
const keyToNewIndexMap = new Map();
for (let k = s2; k <= e2; k++) {
keyToNewIndexMap.set(nextItems[k].key, k);
}
let patchedCount = 0;
let moved = false;
let maxNewIndexSoFar = 0;
const patchedElements = new Map();
for (let k = s1; k <= e1; k++) {
const prevChild = oldChildren[k];
const prevKey = prevChild.getAttribute('data-ax-key-val');
if (patchedCount >= toBePatched) {
this.#removeItem(prevChild, template, app);
continue;
}
const newIndex = keyToNewIndexMap.get(prevKey);
if (newIndex === undefined) {
this.#removeItem(prevChild, template, app);
} else {
newIndexToOldIndexMap[newIndex - s2] = k + 1;
if (newIndex >= maxNewIndexSoFar) {
maxNewIndexSoFar = newIndex;
} else {
moved = true;
}
const nextItem = nextItems[newIndex];
const patchedEl = this.#createOrPatchItem(
nextItem,
prevChild,
itemTemplate,
scope,
state,
app,
template
);
patchedElements.set(nextItem.key, patchedEl);
patchedCount++;
}
}
const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : [];
let j = increasingNewIndexSequence.length - 1;
for (let k = toBePatched - 1; k >= 0; k--) {
const nextIndex = s2 + k;
const nextItem = nextItems[nextIndex];
const anchor =
nextIndex + 1 < nextItems.length
? currentItemsMap.get(nextItems[nextIndex + 1].key) || patchedElements.get(nextItems[nextIndex + 1].key)
: null;
const lastEl =
nextIndex > 0
? currentItemsMap.get(nextItems[nextIndex - 1].key) || patchedElements.get(nextItems[nextIndex - 1].key)
: template;
if (newIndexToOldIndexMap[k] === 0) {
const newEl = this.#createOrPatchItem(nextItem, null, itemTemplate, scope, state, app, template);
patchedElements.set(nextItem.key, newEl);
if (anchor) {
this.#insertNodeBefore(newEl, anchor, lastEl);
} else {
this.#insertNodeAfter(newEl, lastEl);
}
} else if (moved) {
if (j < 0 || k !== increasingNewIndexSequence[j]) {
const el = patchedElements.get(nextItem.key);
if (anchor) {
this.#insertNodeBefore(el, anchor, lastEl);
} else {
this.#insertNodeAfter(el, lastEl);
}
} else {
j--;
}
}
}
}
this.#listCache.set(template, {
listRef: list,
items: [...list],
});
}
/**
* Helper to create a new item element or patch an existing element in-place.
* @param {object} nextItem - Next item metadata object.
* @param {Element|null} existingElement - Existing DOM element to patch.
* @param {string} itemTemplate - Rendered template HTML string.
* @param {object} scope - Evaluation scope.
* @param {object} state - Component state.
* @param {object} [app] - Application context.
* @param {HTMLTemplateElement} template - List template.
* @returns {Element} The created or patched element.
* @private
*/
#createOrPatchItem(nextItem, existingElement, itemTemplate, scope, state, app, template) {
const { key, itemScope } = nextItem;
const resolver = (expr) => this.evaluator.evaluateExpression(expr, itemScope, state);
const html = this.renderer.render(itemTemplate, resolver).trim();
let newElement = null;
if (this.parserDiv) {
this.parserDiv.innerHTML = html;
newElement = this.parserDiv.firstElementChild;
} else if (typeof document !== 'undefined' && typeof document.createElement === 'function') {
const temp = document.createElement('div');
temp.innerHTML = html;
newElement = temp.firstElementChild;
}
if (newElement) {
newElement = this.patcher.cleanElement(newElement);
newElement.setAttribute('data-ax-list-item', '');
newElement.setAttribute('data-ax-key-val', key);
}
let element = existingElement;
if (element) {
if (newElement) {
let needsPatch = element.outerHTML !== newElement.outerHTML;
if (!needsPatch && hasDirectivesHelper(element)) {
needsPatch = true;
}
if (needsPatch) {
this.patcher.patchElement(element, newElement, resolver, app);
}
}
} else {
const pool = this.#nodePool.get(template);
const recycledElement = pool ? pool.pop() : null;
if (recycledElement && newElement) {
this.patcher.patchElement(recycledElement, newElement, resolver, app);
element = recycledElement;
this.patcher.triggerEnter(element, resolver);
} else if (newElement) {
element = newElement;
this.patcher.applyDirectives(element, resolver, app);
this.patcher.triggerEnter(element, resolver);
}
}
if (this.parserDiv) {
this.parserDiv.innerHTML = '';
}
return element;
}
/**
* Helper to remove a list item element and recycle it into the node pool.
* @param {Element} element - Element to remove.
* @param {HTMLTemplateElement} template - List template.
* @param {object} [app] - Application context.
* @private
*/
#removeItem(element, template, app) {
if (this.eventBinder) {
this.eventBinder.unbind(element);
}
this.patcher.triggerLeave(element, null, () => {
this.#resetNodeState(element);
element.remove();
let pool = this.#nodePool.get(template);
if (!pool) {
pool = [];
this.#nodePool.set(template, pool);
}
pool.push(element);
}, app);
}
/**
* Helper to insert a DOM node after a target element.
* @param {Element} node - Node to insert.
* @param {Element} target - Target element to insert after.
* @private
*/
#insertNodeAfter(node, target) {
if (!node || !target) return;
if (typeof target.after === 'function') {
target.after(node);
} else if (target.parentNode) {
if (target.nextSibling && typeof target.parentNode.insertBefore === 'function') {
target.parentNode.insertBefore(node, target.nextSibling);
} else if (typeof target.parentNode.appendChild === 'function') {
target.parentNode.appendChild(node);
}
}
}
/**
* Helper to insert a DOM node before an anchor node, or after a fallback element.
* @param {Element} node - Node to insert.
* @param {Element|null} anchor - Anchor node to insert before.
* @param {Element} fallbackLast - Fallback element to insert after if anchor is missing.
* @private
*/
#insertNodeBefore(node, anchor, fallbackLast) {
if (!node) return;
if (anchor && anchor.parentNode) {
if (typeof anchor.parentNode.insertBefore === 'function') {
anchor.parentNode.insertBefore(node, anchor);
return;
}
if (typeof anchor.before === 'function') {
anchor.before(node);
return;
}
if (anchor.previousElementSibling && typeof anchor.previousElementSibling.after === 'function') {
anchor.previousElementSibling.after(node);
return;
}
}
if (fallbackLast && typeof fallbackLast.after === 'function') {
fallbackLast.after(node);
}
}
/**
* Resets element state like focus, selection, and inputs.
* @param {Element} element - The element to reset.
* @private
*/
#resetNodeState(element) {
if (typeof document !== 'undefined' && document.activeElement &&
(element === document.activeElement || element.contains(document.activeElement))) {
if (typeof document.activeElement.blur === 'function') {
document.activeElement.blur();
}
}
if (typeof window !== 'undefined' && window.getSelection) {
const selection = window.getSelection();
if (selection && selection.rangeCount > 0) {
try {
const range = selection.getRangeAt(0);
if (element.contains(range.commonAncestorContainer)) {
selection.removeAllRanges();
}
} catch {
// Ignore
}
}
}
const inputs = [];
['input', 'textarea', 'select'].forEach((tag) => {
const found = element.querySelectorAll(tag);
if (found && found.forEach) {
found.forEach((el) => inputs.push(el));
}
});
inputs.forEach((input) => {
if (input.tagName === 'INPUT') {
const type = input.getAttribute('type');
if (type === 'checkbox' || type === 'radio') {
input.checked = false;
} else {
input.value = '';
if (typeof input.setSelectionRange === 'function') {
try {
input.setSelectionRange(0, 0);
} catch {
// Ignore
}
}
}
} else if (input.tagName === 'TEXTAREA') {
input.value = '';
if (typeof input.setSelectionRange === 'function') {
try {
input.setSelectionRange(0, 0);
} catch {
// Ignore
}
}
} else if (input.tagName === 'SELECT') {
input.selectedIndex = -1;
}
});
}
/**
* Retrieves currently rendered items for a template by scanning subsequent siblings.
* @param {HTMLTemplateElement} template - The template.
* @returns {Map<string, Element>}
* @private
*/
#getCurrentItems(template) {
const items = new Map();
let current = template.nextElementSibling;
while (current && current.hasAttribute('data-ax-list-item')) {
if (!current._isLeaving) {
const key = current.getAttribute('data-ax-key-val');
items.set(key, current);
}
current = current.nextElementSibling;
}
return items;
}
}
/**
* Helper to check if an element or its descendants have custom directives.
* @param {Element} el
* @returns {boolean}
*/
function hasDirectivesHelper(el) {
if (!el || el.nodeType !== 1) return false;
const checkAttrs = (node) => {
if (!node.attributes) return false;
for (const attr of node.attributes) {
const name = attr.name;
if (
name.startsWith('data-ax-') &&
name !== 'data-ax-static' &&
name !== 'data-ax-list-item' &&
name !== 'data-ax-key-val'
) {
return true;
}
}
return false;
};
if (checkAttrs(el)) return true;
if (typeof el.querySelectorAll === 'function') {
const descendants = el.querySelectorAll('*');
for (const desc of descendants) {
if (checkAttrs(desc)) return true;
}
}
return false;
}
/**
* Calculates the Longest Increasing Subsequence (LIS) of an array of numbers.
* Returns an array of indices of the LIS in `arr`.
* Uses binary search + parent tracking for O(N log N) complexity.
* @param {number[]} arr
* @returns {number[]} Array of indices in arr that form the LIS.
*/
function getSequence(arr) {
const p = arr.slice();
const result = [0];
let i, j, u, v, c;
const len = arr.length;
for (i = 0; i < len; i++) {
const arrI = arr[i];
if (arrI !== 0) {
j = result[result.length - 1];
if (arr[j] < arrI) {
p[i] = j;
result.push(i);
continue;
}
u = 0;
v = result.length - 1;
while (u < v) {
c = (u + v) >> 1;
if (arr[result[c]] < arrI) {
u = c + 1;
} else {
v = c;
}
}
if (arrI < arr[result[u]]) {
if (u > 0) {
p[i] = result[u - 1];
}
result[u] = i;
}
}
}
u = result.length;
v = result[u - 1];
while (u-- > 0) {
result[u] = v;
v = p[v];
}
return result;
}
</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-lib_core_index.html">lib/core/index</a></li></ul><h3>Classes</h3><ul><li><a href="AvenxApp.html">AvenxApp</a></li><li><a href="AvenxBridge.html">AvenxBridge</a></li><li><a href="AvenxCLI.html">AvenxCLI</a></li><li><a href="AvenxCompiler.html">AvenxCompiler</a></li><li><a href="AvenxComponent.html">AvenxComponent</a></li><li><a href="AvenxError.html">AvenxError</a></li><li><a href="AvenxGuard.html">AvenxGuard</a></li><li><a href="AvenxLogger.html">AvenxLogger</a></li><li><a href="AvenxMock.html">AvenxMock</a></li><li><a href="AvenxPage.html">AvenxPage</a></li><li><a href="AvenxRouter.html">AvenxRouter</a></li><li><a href="AvenxSandbox.html">AvenxSandbox</a></li><li><a href="AvenxWatcher.html">AvenxWatcher</a></li><li><a href="BrowserNavigationDelegate.html">BrowserNavigationDelegate</a></li><li><a href="BuildError.html">BuildError</a></li><li><a href="CompilerError.html">CompilerError</a></li><li><a href="ComponentParser.html">ComponentParser</a></li><li><a href="ComputedRegistry.html">ComputedRegistry</a></li><li><a href="DeferManager.html">DeferManager</a></li><li><a href="DomPatcher.html">DomPatcher</a></li><li><a href="DynamicEvaluator.html">DynamicEvaluator</a></li><li><a href="EventBinder.html">EventBinder</a></li><li><a href="EventExecutor.html">EventExecutor</a></li><li><a href="ExpressionParser.html">ExpressionParser</a></li><li><a href="HTMLNode.html">HTMLNode</a></li><li><a href="HtmlDiff.html">HtmlDiff</a></li><li><a href="HtmlEscaper.html">HtmlEscaper</a></li><li><a href="LifecycleManager.html">LifecycleManager</a></li><li><a href="ListManager.html">ListManager</a></li><li><a href="LruCache.html">LruCache</a></li><li><a href="MemoryNavigationDelegate.html">MemoryNavigationDelegate</a></li><li><a href="NavigationDelegate.html">NavigationDelegate</a></li><li><a href="ProxyHandlerFactory.html">ProxyHandlerFactory</a></li><li><a href="Resource.html">Resource</a></li><li><a href="RouteMatcher.html">RouteMatcher</a></li><li><a href="SafeHtml.html">SafeHtml</a></li><li><a href="Sanitizer.html">Sanitizer</a></li><li><a href="StateFactory.html">StateFactory</a></li><li><a href="StyleCompilerError.html">StyleCompilerError</a></li><li><a href="StyleMountManager.html">StyleMountManager</a></li><li><a href="StyleProcessor.html">StyleProcessor</a></li><li><a href="TemplateRenderer.html">TemplateRenderer</a></li><li><a href="TemplateValidationError.html">TemplateValidationError</a></li><li><a href="VirtualList.html">VirtualList</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ALLOWED_GLOBALS">ALLOWED_GLOBALS</a></li><li><a href="global.html#AvenxErrorCodes">AvenxErrorCodes</a></li><li><a href="global.html#AvenxErrorMessages">AvenxErrorMessages</a></li><li><a href="global.html#BOOLEAN_ATTRIBUTES">BOOLEAN_ATTRIBUTES</a></li><li><a href="global.html#DEFAULT_ALLOWED_ATTRIBUTES">DEFAULT_ALLOWED_ATTRIBUTES</a></li><li><a href="global.html#DEFAULT_ALLOWED_TAGS">DEFAULT_ALLOWED_TAGS</a></li><li><a href="global.html#DEFAULT_VOID_TAGS">DEFAULT_VOID_TAGS</a></li><li><a href="global.html#INVALID_URL_PROTOCOL">INVALID_URL_PROTOCOL</a></li><li><a href="global.html#STRIP_CONTENT_TAGS">STRIP_CONTENT_TAGS</a></li><li><a href="global.html#URL_ATTRIBUTES">URL_ATTRIBUTES</a></li><li><a href="global.html#VOID_ELEMENTS">VOID_ELEMENTS</a></li><li><a href="global.html#abortIfGeneratedPathExists">abortIfGeneratedPathExists</a></li><li><a href="global.html#activeWatcher">activeWatcher</a></li><li><a href="global.html#applyCustomHeaders">applyCustomHeaders</a></li><li><a href="global.html#attachRequestLogger">attachRequestLogger</a></li><li><a href="global.html#belongsToComponent">belongsToComponent</a></li><li><a href="global.html#blue">blue</a></li><li><a href="global.html#bold">bold</a></li><li><a href="global.html#buildProject">buildProject</a></li><li><a href="global.html#buildVoidTagsSet">buildVoidTagsSet</a></li><li><a href="global.html#checkGitStatus">checkGitStatus</a></li><li><a href="global.html#checkProject">checkProject</a></li><li><a href="global.html#classTokensEqual">classTokensEqual</a></li><li><a href="global.html#cleanProject">cleanProject</a></li><li><a href="global.html#cleanupParentMap">cleanupParentMap</a></li><li><a href="global.html#collectUnknownKeys">collectUnknownKeys</a></li><li><a href="global.html#compareVersions">compareVersions</a></li><li><a href="global.html#componentNameFromFile">componentNameFromFile</a></li><li><a href="global.html#configCache">configCache</a></li><li><a href="global.html#consoleTransport">consoleTransport</a></li><li><a href="global.html#containsSlot">containsSlot</a></li><li><a href="global.html#createDeepMockProxy">createDeepMockProxy</a></li><li><a href="global.html#createNavigationDelegate">createNavigationDelegate</a></li><li><a href="global.html#createSeverityFormatter">createSeverityFormatter</a></li><li><a href="global.html#cyan">cyan</a></li><li><a href="global.html#defaultFormatter">defaultFormatter</a></li><li><a href="global.html#depMap">depMap</a></li><li><a href="global.html#destroyBridge">destroyBridge</a></li><li><a href="global.html#destroyComponent">destroyComponent</a></li><li><a href="global.html#destroyGuard">destroyGuard</a></li><li><a href="global.html#destroyPage">destroyPage</a></li><li><a href="global.html#detectColorSupport">detectColorSupport</a></li><li><a href="global.html#dim">dim</a></li><li><a href="global.html#encodeMapping">encodeMapping</a></li><li><a href="global.html#encodeVLQ">encodeVLQ</a></li><li><a href="global.html#escapeAttrValue">escapeAttrValue</a></li><li><a href="global.html#escapeText">escapeText</a></li><li><a href="global.html#extractLintableTemplate">extractLintableTemplate</a></li><li><a href="global.html#extractRoutesMap">extractRoutesMap</a></li><li><a href="global.html#fail">fail</a></li><li><a href="global.html#findInvalidComponentTags">findInvalidComponentTags</a></li><li><a href="global.html#findProjectRoot">findProjectRoot</a></li><li><a href="global.html#findRegisteredComponents">findRegisteredComponents</a></li><li><a href="global.html#fireEvent">fireEvent</a></li><li><a href="global.html#flushJobs">flushJobs</a></li><li><a href="global.html#formatContextTag">formatContextTag</a></li><li><a href="global.html#formatMessage">formatMessage</a></li><li><a href="global.html#formatRequestLog">formatRequestLog</a></li><li><a href="global.html#formatStatusCode">formatStatusCode</a></li><li><a href="global.html#formatValue">formatValue</a></li><li><a href="global.html#generateBridge">generateBridge</a></li><li><a href="global.html#generateComponent">generateComponent</a></li><li><a href="global.html#generateGuard">generateGuard</a></li><li><a href="global.html#generatePage">generatePage</a></li><li><a href="global.html#get">get</a></li><li><a href="global.html#getAllFiles">getAllFiles</a></li><li><a href="global.html#getClosestKey">getClosestKey</a></li><li><a href="global.html#getComponentProfilingInfo">getComponentProfilingInfo</a></li><li><a href="global.html#getCustomVoidTags">getCustomVoidTags</a></li><li><a href="global.html#getFieldName">getFieldName</a></li><li><a href="global.html#getHTML">getHTML</a></li><li><a href="global.html#getInitialHtml">getInitialHtml</a></li><li><a href="global.html#getInspectorData">getInspectorData</a></li><li><a href="global.html#getInspectorHtml">getInspectorHtml</a></li><li><a href="global.html#getLineAndColumn">getLineAndColumn</a></li><li><a href="global.html#getOwnPropertyDescriptor">getOwnPropertyDescriptor</a></li><li><a href="global.html#getPropertyPath">getPropertyPath</a></li><li><a href="global.html#getPrototypeOf">getPrototypeOf</a></li><li><a href="global.html#getSequence">getSequence</a></li><li><a href="global.html#getTimestamp">getTimestamp</a></li><li><a href="global.html#getTransitionDuration">getTransitionDuration</a></li><li><a href="global.html#gray">gray</a></li><li><a href="global.html#green">green</a></li><li><a href="global.html#has">has</a></li><li><a href="global.html#hasDirectivesHelper">hasDirectivesHelper</a></li><li><a href="global.html#html">html</a></li><li><a href="global.html#initInspector">initInspector</a></li><li><a href="global.html#initProject">initProject</a></li><li><a href="global.html#interpolateEnv">interpolateEnv</a></li><li><a href="global.html#isBooleanAttribute">isBooleanAttribute</a></li><li><a href="global.html#isColorEnabled">isColorEnabled</a></li><li><a href="global.html#isComponentUsed">isComponentUsed</a></li><li><a href="global.html#isDebugReactivityEnabled">isDebugReactivityEnabled</a></li><li><a href="global.html#isReactiveTarget">isReactiveTarget</a></li><li><a href="global.html#isRestrictedGlobal">isRestrictedGlobal</a></li><li><a href="global.html#isSafeUrl">isSafeUrl</a></li><li><a href="global.html#isStaticNode">isStaticNode</a></li><li><a href="global.html#levenshtein">levenshtein</a></li><li><a href="global.html#listenWithPortFallback">listenWithPortFallback</a></li><li><a href="global.html#loadAvenxConfig">loadAvenxConfig</a></li><li><a href="global.html#loadConfig">loadConfig</a></li><li><a href="global.html#loadEnv">loadEnv</a></li><li><a href="global.html#mask">mask</a></li><li><a href="global.html#mountTestComponent">mountTestComponent</a></li><li><a href="global.html#nextTick">nextTick</a></li><li><a href="global.html#openBrowser">openBrowser</a></li><li><a href="global.html#parentMap">parentMap</a></li><li><a href="global.html#parseAttributes">parseAttributes</a></li><li><a href="global.html#parseDiagnostic">parseDiagnostic</a></li><li><a href="global.html#parseEnv">parseEnv</a></li><li><a href="global.html#parseHTML">parseHTML</a></li><li><a href="global.html#parseName">parseName</a></li><li><a href="global.html#parseValidationRules">parseValidationRules</a></li><li><a href="global.html#popWatcher">popWatcher</a></li><li><a href="global.html#printCheck">printCheck</a></li><li><a href="global.html#printHelp">printHelp</a></li><li><a href="global.html#processBindDirectives">processBindDirectives</a></li><li><a href="global.html#profile">profile</a></li><li><a href="global.html#promptQuestion">promptQuestion</a></li><li><a href="global.html#pushWatcher">pushWatcher</a></li><li><a href="global.html#queueFlush">queueFlush</a></li><li><a href="global.html#queueFlushCallback">queueFlushCallback</a></li><li><a href="global.html#queueJob">queueJob</a></li><li><a href="global.html#readTemplate">readTemplate</a></li><li><a href="global.html#red">red</a></li><li><a href="global.html#registerInMainApp">registerInMainApp</a></li><li><a href="global.html#replaceEnvVariables">replaceEnvVariables</a></li><li><a href="global.html#reportWarning">reportWarning</a></li><li><a href="global.html#resolveComponentsDir">resolveComponentsDir</a></li><li><a href="global.html#resolveDoctorRoot">resolveDoctorRoot</a></li><li><a href="global.html#resolvePathAlias">resolvePathAlias</a></li><li><a href="global.html#runCheckPass">runCheckPass</a></li><li><a href="global.html#runDoctor">runDoctor</a></li><li><a href="global.html#runInspect">runInspect</a></li><li><a href="global.html#runWizard">runWizard</a></li><li><a href="global.html#scopeCustomProperties">scopeCustomProperties</a></li><li><a href="global.html#scopeSelectorList">scopeSelectorList</a></li><li><a href="global.html#serializeHTML">serializeHTML</a></li><li><a href="global.html#serializeSafe">serializeSafe</a></li><li><a href="global.html#serveProject">serveProject</a></li><li><a href="global.html#set">set</a></li><li><a href="global.html#setColorEnabled">setColorEnabled</a></li><li><a href="global.html#setDebugReactivity">setDebugReactivity</a></li><li><a href="global.html#stripAnsi">stripAnsi</a></li><li><a href="global.html#stripCssComments">stripCssComments</a></li><li><a href="global.html#style">style</a></li><li><a href="global.html#styleMountManager">styleMountManager</a></li><li><a href="global.html#toKebabCase">toKebabCase</a></li><li><a href="global.html#toPascalCase">toPascalCase</a></li><li><a href="global.html#track">track</a></li><li><a href="global.html#transformDeepSelectors">transformDeepSelectors</a></li><li><a href="global.html#traverse">traverse</a></li><li><a href="global.html#trigger">trigger</a></li><li><a href="global.html#unescapeTemplate">unescapeTemplate</a></li><li><a href="global.html#unregisterFromMainApp">unregisterFromMainApp</a></li><li><a href="global.html#unwrap">unwrap</a></li><li><a href="global.html#updateValidationState">updateValidationState</a></li><li><a href="global.html#validateValue">validateValue</a></li><li><a href="global.html#warnSanitized">warnSanitized</a></li><li><a href="global.html#warnSanitizedAttribute">warnSanitizedAttribute</a></li><li><a href="global.html#warnSanitizedTag">warnSanitizedTag</a></li><li><a href="global.html#watchProject">watchProject</a></li><li><a href="global.html#watcherStack">watcherStack</a></li><li><a href="global.html#wrapValue">wrapValue</a></li><li><a href="global.html#yellow">yellow</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Sun Aug 16 2026 21:34:06 GMT+0000 (Coordinated Universal Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>