@adaas/are-html 0.0.20 → 0.0.22
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/.conf/tsconfig.base.json +1 -0
- package/.conf/tsconfig.browser.json +1 -0
- package/.conf/tsconfig.node.json +1 -0
- package/dist/browser/index.d.mts +206 -7
- package/dist/browser/index.mjs +527 -65
- package/dist/browser/index.mjs.map +1 -1
- package/dist/node/directives/AreDirectiveFor.directive.d.mts +44 -1
- package/dist/node/directives/AreDirectiveFor.directive.d.ts +44 -1
- package/dist/node/directives/AreDirectiveFor.directive.js +102 -6
- package/dist/node/directives/AreDirectiveFor.directive.js.map +1 -1
- package/dist/node/directives/AreDirectiveFor.directive.mjs +102 -6
- package/dist/node/directives/AreDirectiveFor.directive.mjs.map +1 -1
- package/dist/node/directives/AreDirectiveShow.directive.d.mts +32 -0
- package/dist/node/directives/AreDirectiveShow.directive.d.ts +32 -0
- package/dist/node/directives/AreDirectiveShow.directive.js +81 -0
- package/dist/node/directives/AreDirectiveShow.directive.js.map +1 -0
- package/dist/node/directives/AreDirectiveShow.directive.mjs +71 -0
- package/dist/node/directives/AreDirectiveShow.directive.mjs.map +1 -0
- package/dist/node/engine/AreHTML.engine.d.mts +2 -1
- package/dist/node/engine/AreHTML.engine.d.ts +2 -1
- package/dist/node/engine/AreHTML.engine.js +8 -2
- package/dist/node/engine/AreHTML.engine.js.map +1 -1
- package/dist/node/engine/AreHTML.engine.mjs +8 -2
- package/dist/node/engine/AreHTML.engine.mjs.map +1 -1
- package/dist/node/engine/AreHTML.interpreter.d.mts +3 -0
- package/dist/node/engine/AreHTML.interpreter.d.ts +3 -0
- package/dist/node/engine/AreHTML.interpreter.js +29 -0
- package/dist/node/engine/AreHTML.interpreter.js.map +1 -1
- package/dist/node/engine/AreHTML.interpreter.mjs +29 -0
- package/dist/node/engine/AreHTML.interpreter.mjs.map +1 -1
- package/dist/node/engine/AreHTML.lifecycle.d.mts +8 -1
- package/dist/node/engine/AreHTML.lifecycle.d.ts +8 -1
- package/dist/node/engine/AreHTML.lifecycle.js +46 -3
- package/dist/node/engine/AreHTML.lifecycle.js.map +1 -1
- package/dist/node/engine/AreHTML.lifecycle.mjs +46 -3
- package/dist/node/engine/AreHTML.lifecycle.mjs.map +1 -1
- package/dist/node/helpers/AreScheduler.helper.d.mts +39 -0
- package/dist/node/helpers/AreScheduler.helper.d.ts +39 -0
- package/dist/node/helpers/AreScheduler.helper.js +40 -0
- package/dist/node/helpers/AreScheduler.helper.js.map +1 -0
- package/dist/node/helpers/AreScheduler.helper.mjs +40 -0
- package/dist/node/helpers/AreScheduler.helper.mjs.map +1 -0
- package/dist/node/index.d.mts +4 -1
- package/dist/node/index.d.ts +4 -1
- package/dist/node/index.js +21 -0
- package/dist/node/index.mjs +3 -0
- package/dist/node/instructions/AreHTML.instructions.constants.d.mts +1 -0
- package/dist/node/instructions/AreHTML.instructions.constants.d.ts +1 -0
- package/dist/node/instructions/AreHTML.instructions.constants.js +2 -1
- package/dist/node/instructions/AreHTML.instructions.constants.js.map +1 -1
- package/dist/node/instructions/AreHTML.instructions.constants.mjs +2 -1
- package/dist/node/instructions/AreHTML.instructions.constants.mjs.map +1 -1
- package/dist/node/instructions/AreHTML.instructions.types.d.mts +9 -1
- package/dist/node/instructions/AreHTML.instructions.types.d.ts +9 -1
- package/dist/node/instructions/HideElement.instruction.d.mts +13 -0
- package/dist/node/instructions/HideElement.instruction.d.ts +13 -0
- package/dist/node/instructions/HideElement.instruction.js +31 -0
- package/dist/node/instructions/HideElement.instruction.js.map +1 -0
- package/dist/node/instructions/HideElement.instruction.mjs +24 -0
- package/dist/node/instructions/HideElement.instruction.mjs.map +1 -0
- package/dist/node/lib/AreRoot/AreRoot.component.d.mts +57 -3
- package/dist/node/lib/AreRoot/AreRoot.component.d.ts +57 -3
- package/dist/node/lib/AreRoot/AreRoot.component.js +138 -49
- package/dist/node/lib/AreRoot/AreRoot.component.js.map +1 -1
- package/dist/node/lib/AreRoot/AreRoot.component.mjs +140 -51
- package/dist/node/lib/AreRoot/AreRoot.component.mjs.map +1 -1
- package/dist/node/lib/AreRoot/AreRootCache.context.d.mts +58 -0
- package/dist/node/lib/AreRoot/AreRootCache.context.d.ts +58 -0
- package/dist/node/lib/AreRoot/AreRootCache.context.js +106 -0
- package/dist/node/lib/AreRoot/AreRootCache.context.js.map +1 -0
- package/dist/node/lib/AreRoot/AreRootCache.context.mjs +99 -0
- package/dist/node/lib/AreRoot/AreRootCache.context.mjs.map +1 -0
- package/examples/dashboard/dist/index.html +1 -1
- package/examples/dashboard/dist/{mq19zxz4-mnlgmd.js → mqh9ryml-xat335.js} +1922 -1316
- package/examples/dashboard/src/concept.ts +3 -2
- package/examples/for-perf/concept.ts +45 -0
- package/examples/for-perf/containers/UI.container.ts +161 -0
- package/examples/for-perf/dist/index.html +270 -0
- package/examples/for-perf/dist/mqh9ryde-m243t8.js +15223 -0
- package/examples/for-perf/dist/mqh9ryfo-6a8d0o.js +15223 -0
- package/examples/for-perf/dist/mqh9ryfq-4pf5cv.js +15223 -0
- package/examples/for-perf/public/index.html +270 -0
- package/examples/for-perf/src/components/PerfApp.component.ts +37 -0
- package/examples/for-perf/src/components/PerfControls.component.ts +34 -0
- package/examples/for-perf/src/components/PerfGrid.component.ts +225 -0
- package/examples/for-perf/src/components/PerfHeader.component.ts +34 -0
- package/examples/for-perf/src/components/PerfStats.component.ts +43 -0
- package/examples/for-perf/src/concept.ts +94 -0
- package/examples/jumpstart/dist/index.html +1 -1
- package/examples/jumpstart/dist/{mq1a0fv0-ccgtz6.js → mq7mgf58-vbf07e.js} +895 -521
- package/examples/signal-routing/dist/index.html +1 -1
- package/examples/signal-routing/dist/{mq1bzrik-4lec86.js → mqh9ryc9-dkcbkx.js} +2024 -1300
- package/examples/signal-routing/src/components/SettingsPage.component.ts +39 -0
- package/examples/signal-routing/src/concept.ts +2 -0
- package/jest.config.ts +1 -0
- package/package.json +10 -9
- package/src/directives/AreDirectiveFor.directive.ts +185 -12
- package/src/directives/AreDirectiveShow.directive.ts +127 -0
- package/src/engine/AreHTML.engine.ts +11 -1
- package/src/engine/AreHTML.interpreter.ts +50 -0
- package/src/engine/AreHTML.lifecycle.ts +83 -6
- package/src/helpers/AreScheduler.helper.ts +61 -0
- package/src/index.ts +3 -0
- package/src/instructions/AreHTML.instructions.constants.ts +1 -0
- package/src/instructions/AreHTML.instructions.types.ts +9 -0
- package/src/instructions/HideElement.instruction.ts +29 -0
- package/src/lib/AreRoot/AreRoot.component.ts +205 -72
- package/src/lib/AreRoot/AreRootCache.context.ts +133 -0
- package/tsconfig.json +1 -0
package/.conf/tsconfig.base.json
CHANGED
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"@adaas/are-html/root/*": ["../src/lib/AreRoot/*"],
|
|
70
70
|
"@adaas/are-html/directives/*": ["../src/directives/*"],
|
|
71
71
|
"@adaas/are-html/style/*": ["../src/lib/AreStyle/*"],
|
|
72
|
+
"@adaas/are-html/helpers/*": ["../src/helpers/*"],
|
|
72
73
|
"@adaas/are-html/lib/*": ["../src/lib/*"],
|
|
73
74
|
},
|
|
74
75
|
/* ===============================
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"@adaas/are-html/instructions/*": ["src/instructions/*"],
|
|
14
14
|
"@adaas/are-html/watchers/*": ["src/watchers/*"],
|
|
15
15
|
"@adaas/are-html/signals/*": ["src/signals/*"],
|
|
16
|
+
"@adaas/are-html/helpers/*": ["src/helpers/*"],
|
|
16
17
|
// Custom Lib Exports
|
|
17
18
|
"@adaas/are-html/style/*": ["src/lib/AreStyle/*"],
|
|
18
19
|
"@adaas/are-html/directive/*": ["src/lib/AreDirective/*"],
|
package/.conf/tsconfig.node.json
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"@adaas/are-html/instructions/*": ["src/instructions/*"],
|
|
14
14
|
"@adaas/are-html/watchers/*": ["src/watchers/*"],
|
|
15
15
|
"@adaas/are-html/signals/*": ["src/signals/*"],
|
|
16
|
+
"@adaas/are-html/helpers/*": ["src/helpers/*"],
|
|
16
17
|
// Custom Lib Exports
|
|
17
18
|
"@adaas/are-html/style/*": ["src/lib/AreStyle/*"],
|
|
18
19
|
"@adaas/are-html/directive/*": ["src/lib/AreDirective/*"],
|
package/dist/browser/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { A_Component, A_TYPES__Ctor, A_Fragment, ASEID, A_Scope, A_Feature, A_Co
|
|
|
3
3
|
import { A_Logger } from '@adaas/a-utils/a-logger';
|
|
4
4
|
import { A_ExecutionContext } from '@adaas/a-utils/a-execution';
|
|
5
5
|
import { A_Route } from '@adaas/a-utils/a-route';
|
|
6
|
-
import { A_Signal, A_SignalVector } from '@adaas/a-utils/a-signal';
|
|
6
|
+
import { A_Signal, A_SignalState, A_SignalVector } from '@adaas/a-utils/a-signal';
|
|
7
7
|
|
|
8
8
|
declare class AreDirective extends A_Component {
|
|
9
9
|
/**
|
|
@@ -123,9 +123,52 @@ declare class AreBindingAttribute extends AreHTMLAttribute {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
declare class AreDirectiveFor extends AreDirective {
|
|
126
|
+
/**
|
|
127
|
+
* Lists whose number of NEW item nodes is at or below this threshold render
|
|
128
|
+
* fully synchronously — byte-for-byte the previous behavior. Typical UIs
|
|
129
|
+
* (menus, small tables) are therefore completely unaffected; only genuinely
|
|
130
|
+
* large lists pay the (tiny) scheduling cost to keep the main thread responsive.
|
|
131
|
+
*/
|
|
132
|
+
private static readonly SYNC_THRESHOLD;
|
|
133
|
+
/**
|
|
134
|
+
* Per-chunk time budget (ms). During a large-list render we mount item nodes
|
|
135
|
+
* until this much time has elapsed, then yield to the browser so it can paint
|
|
136
|
+
* and process input before the next chunk. ~16ms targets one animation frame.
|
|
137
|
+
*/
|
|
138
|
+
private static readonly CHUNK_BUDGET_MS;
|
|
139
|
+
/**
|
|
140
|
+
* Per-attribute serialization state. A new update() that arrives while a
|
|
141
|
+
* chunked render of the SAME `$for` is still in flight does NOT start a second
|
|
142
|
+
* concurrent pass (which could interleave mutations on the shared children
|
|
143
|
+
* list); instead it marks `pending` and the in-flight run re-runs once more
|
|
144
|
+
* with the latest data when it finishes. This guarantees the children list is
|
|
145
|
+
* only ever mutated by one pass at a time and the final state always reflects
|
|
146
|
+
* the most recent store value.
|
|
147
|
+
*/
|
|
148
|
+
private static readonly renderState;
|
|
126
149
|
transform(attribute: AreDirectiveAttribute, scope: A_Scope, store: AreStore, scene: AreScene, logger: A_Logger, ...args: any[]): void;
|
|
127
150
|
compile(attribute: AreDirectiveAttribute, store: AreStore, scene: AreScene, ...args: any[]): void;
|
|
128
|
-
update(attribute: AreDirectiveAttribute, store: AreStore, scene: AreScene, ...args: any[]): void
|
|
151
|
+
update(attribute: AreDirectiveAttribute, store: AreStore, scene: AreScene, ...args: any[]): void | Promise<void>;
|
|
152
|
+
/**
|
|
153
|
+
* Core of the `$for` update: re-diff the source array against the current
|
|
154
|
+
* children, reconcile reused/removed items, then mount the new ones (small
|
|
155
|
+
* lists synchronously, large lists time-sliced). Never called while another
|
|
156
|
+
* pass for the same `$for` is in flight (see `update`).
|
|
157
|
+
*/
|
|
158
|
+
private performUpdate;
|
|
159
|
+
/**
|
|
160
|
+
* Completes an update pass. If another update() arrived while a chunked
|
|
161
|
+
* render was streaming, run exactly one more pass now from the latest store
|
|
162
|
+
* value so the final DOM always reflects the most recent data.
|
|
163
|
+
*/
|
|
164
|
+
private finishUpdate;
|
|
165
|
+
/**
|
|
166
|
+
* Walks the node's ancestor chain (inclusive) and reports whether the
|
|
167
|
+
* whole path is currently active — i.e. the subtree is actually rendered
|
|
168
|
+
* into the DOM. A single inactive ancestor scene (e.g. a `$if` whose
|
|
169
|
+
* condition is false) means the subtree is detached.
|
|
170
|
+
*/
|
|
171
|
+
private isAttached;
|
|
129
172
|
/**
|
|
130
173
|
* Build a key-function that derives a stable identity from each item.
|
|
131
174
|
* If the user provided a `track <expr>` clause, evaluate it as a path on
|
|
@@ -193,6 +236,29 @@ declare class AreDirectiveIf extends AreDirective {
|
|
|
193
236
|
update(attribute: AreDirectiveAttribute, store: AreStore, scope: A_Scope, syntax: AreSyntax, scene: AreScene, ...args: any[]): void;
|
|
194
237
|
}
|
|
195
238
|
|
|
239
|
+
/**
|
|
240
|
+
* `$show` directive — conditionally toggles an element's visibility.
|
|
241
|
+
*
|
|
242
|
+
* Unlike `$if`, `$show` keeps the element fully mounted at all times and only
|
|
243
|
+
* flips its inline `display` (Vue `v-show` semantics). The element's subtree,
|
|
244
|
+
* event listeners and scene state are preserved across toggles, which makes it
|
|
245
|
+
* far cheaper than `$if` for things that flip on/off frequently. Use `$if` when
|
|
246
|
+
* the hidden branch is expensive and rarely shown; use `$show` when it toggles
|
|
247
|
+
* often.
|
|
248
|
+
*
|
|
249
|
+
* ⚠️ Known limitations:
|
|
250
|
+
* - Do NOT combine `$show` with `$if`/`$for` on the SAME element — they share
|
|
251
|
+
* an owner node and would fight over its host instruction. Wrap one in a
|
|
252
|
+
* parent element instead.
|
|
253
|
+
* - `$show` forces inline `display:none`, which beats stylesheet rules but will
|
|
254
|
+
* NOT override the element's own inline `:style="display:..."` binding.
|
|
255
|
+
*/
|
|
256
|
+
declare class AreDirectiveShow extends AreDirective {
|
|
257
|
+
transform(attribute: AreDirectiveAttribute, logger: A_Logger, ...args: any[]): void;
|
|
258
|
+
compile(attribute: AreDirectiveAttribute, store: AreStore, scene: AreScene, syntax: AreSyntax, directiveContext?: AreDirectiveContext, ...args: any[]): void;
|
|
259
|
+
update(attribute: AreDirectiveAttribute, store: AreStore, scene: AreScene, syntax: AreSyntax, directiveContext?: AreDirectiveContext, ...args: any[]): void;
|
|
260
|
+
}
|
|
261
|
+
|
|
196
262
|
type AreHtmlAddAttributeInstructionPayload = {
|
|
197
263
|
name: string;
|
|
198
264
|
content: string;
|
|
@@ -223,6 +289,14 @@ type AreHtmlAddStyleInstructionPayload = {
|
|
|
223
289
|
/** Full CSS string to inject as a <style> block scoped to the component. Applied to the document head and reverted on unmount. */
|
|
224
290
|
styles: string;
|
|
225
291
|
};
|
|
292
|
+
type AreHtmlHideInstructionPayload = {
|
|
293
|
+
/**
|
|
294
|
+
* Optional explicit display value to restore when the element becomes
|
|
295
|
+
* visible again. When omitted, the interpreter caches and restores the
|
|
296
|
+
* element's own prior inline `display` value (Vue `v-show` semantics).
|
|
297
|
+
*/
|
|
298
|
+
display?: string;
|
|
299
|
+
};
|
|
226
300
|
type AreHtmlAddListenerInstructionPayload = {
|
|
227
301
|
/** DOM event name (e.g. "click", "input", "submit") */
|
|
228
302
|
name: string;
|
|
@@ -261,6 +335,15 @@ declare class AddTextInstruction extends AreDeclaration<AreHtmlAddTextInstructio
|
|
|
261
335
|
constructor(props: AreHtmlAddTextInstructionPayload | AreInstructionSerialized<AreHtmlAddTextInstructionPayload>);
|
|
262
336
|
}
|
|
263
337
|
|
|
338
|
+
declare class HideElementInstruction extends AreMutation<AreHtmlHideInstructionPayload> {
|
|
339
|
+
/**
|
|
340
|
+
* Caches the element's inline `display` value captured at apply time so it
|
|
341
|
+
* can be restored verbatim on revert (mirrors Vue `v-show`).
|
|
342
|
+
*/
|
|
343
|
+
cache?: string;
|
|
344
|
+
constructor(parent: AreDeclaration, props: AreHtmlHideInstructionPayload | AreInstructionSerialized<AreHtmlHideInstructionPayload>);
|
|
345
|
+
}
|
|
346
|
+
|
|
264
347
|
declare const AreHTMLInstructions: {
|
|
265
348
|
readonly AddElement: "_AreHTML_AddElement";
|
|
266
349
|
readonly AddText: "_AreHTML_AddText";
|
|
@@ -269,6 +352,7 @@ declare const AreHTMLInstructions: {
|
|
|
269
352
|
readonly AddListener: "_AreHTML_AddListener";
|
|
270
353
|
readonly AddInterpolation: "_AreHTML_AddInterpolation";
|
|
271
354
|
readonly AddComment: "_AreHTML_AddComment";
|
|
355
|
+
readonly HideElement: "_AreHTML_HideElement";
|
|
272
356
|
};
|
|
273
357
|
|
|
274
358
|
declare class AreComment extends AreHTMLNode {
|
|
@@ -523,6 +607,60 @@ declare class AreHTMLCompiler extends AreCompiler {
|
|
|
523
607
|
compileBindingAttribute(attribute: AreBindingAttribute, scene: AreScene, parentStore: AreStore, store: AreStore, syntax: AreSyntax, ...args: any[]): void;
|
|
524
608
|
}
|
|
525
609
|
|
|
610
|
+
/**
|
|
611
|
+
* A single cached, detached component subtree for an are-root outlet.
|
|
612
|
+
*
|
|
613
|
+
* `node` is fully compiled and its scene plan is intact (it was `unmount()`ed,
|
|
614
|
+
* not destroyed), so it can be re-mounted instantly without re-tokenizing,
|
|
615
|
+
* re-loading, transforming or compiling. `subscribers` records the exact set of
|
|
616
|
+
* nodes inside the subtree that were subscribed to the signal bus at the moment
|
|
617
|
+
* of stashing — they are unsubscribed while cached (so the detached DOM never
|
|
618
|
+
* reacts to signals) and re-subscribed verbatim on restore.
|
|
619
|
+
*/
|
|
620
|
+
type AreRootCacheEntry = {
|
|
621
|
+
node: AreNode;
|
|
622
|
+
subscribers: AreNode[];
|
|
623
|
+
};
|
|
624
|
+
declare class AreRootCache extends A_Fragment {
|
|
625
|
+
/**
|
|
626
|
+
* rootId -> (component tag -> cache entry). The inner Map preserves
|
|
627
|
+
* insertion order which is used as the LRU recency order: the first key is
|
|
628
|
+
* the least-recently-used entry, the last key the most-recently-used.
|
|
629
|
+
*/
|
|
630
|
+
protected _cache: Map<string, Map<string, AreRootCacheEntry>>;
|
|
631
|
+
/**
|
|
632
|
+
* Maximum number of cached subtrees kept per root. Older entries beyond this
|
|
633
|
+
* limit are evicted (and returned to the caller so it can destroy them).
|
|
634
|
+
*/
|
|
635
|
+
protected _limit: number;
|
|
636
|
+
constructor(limit?: number);
|
|
637
|
+
/**
|
|
638
|
+
* Maximum number of cached subtrees kept per root.
|
|
639
|
+
*/
|
|
640
|
+
get limit(): number;
|
|
641
|
+
protected bucket(rootId: string): Map<string, AreRootCacheEntry>;
|
|
642
|
+
/**
|
|
643
|
+
* Whether a subtree for the given component tag is currently cached.
|
|
644
|
+
*/
|
|
645
|
+
has(rootId: string, tag: string): boolean;
|
|
646
|
+
/**
|
|
647
|
+
* Retrieve AND remove a cached subtree so it can become live again. Returns
|
|
648
|
+
* `undefined` on a cache miss.
|
|
649
|
+
*/
|
|
650
|
+
take(rootId: string, tag: string): AreRootCacheEntry | undefined;
|
|
651
|
+
/**
|
|
652
|
+
* Stash a detached subtree under the given component tag. Returns any entries
|
|
653
|
+
* that were evicted to honour the LRU limit (or replaced for the same tag) so
|
|
654
|
+
* the caller can `destroy()` them.
|
|
655
|
+
*/
|
|
656
|
+
put(rootId: string, tag: string, entry: AreRootCacheEntry): AreRootCacheEntry[];
|
|
657
|
+
/**
|
|
658
|
+
* Remove and return every cached entry for a root (e.g. on teardown) so the
|
|
659
|
+
* caller can destroy them.
|
|
660
|
+
*/
|
|
661
|
+
clear(rootId: string): AreRootCacheEntry[];
|
|
662
|
+
}
|
|
663
|
+
|
|
526
664
|
declare class AreHTMLEngine extends AreEngine {
|
|
527
665
|
get DefaultSyntax(): AreSyntax;
|
|
528
666
|
/**
|
|
@@ -530,7 +668,7 @@ declare class AreHTMLEngine extends AreEngine {
|
|
|
530
668
|
*
|
|
531
669
|
* @param container
|
|
532
670
|
*/
|
|
533
|
-
init(scope: A_Scope, signalContext?: AreSignalsContext): Promise<void>;
|
|
671
|
+
init(scope: A_Scope, signalContext?: AreSignalsContext, rootCache?: AreRootCache): Promise<void>;
|
|
534
672
|
protected rootElementMatcher(source: string, from: number, to: number, build: (raw: string, content: string, position: number, closing: string) => AreSyntaxTokenMatch): AreSyntaxTokenMatch | null;
|
|
535
673
|
protected htmlElementMatcher(source: string, from: number, to: number, build: (raw: string, content: string, position: number, closing: string) => AreSyntaxTokenMatch): AreSyntaxTokenMatch | null;
|
|
536
674
|
/**
|
|
@@ -550,6 +688,8 @@ declare class AreHTMLInterpreter extends AreInterpreter {
|
|
|
550
688
|
removeElement(declaration: AddElementInstruction, context: AreHTMLEngineContext): void;
|
|
551
689
|
addAttribute(mutation: AddAttributeInstruction, context: AreHTMLEngineContext, store: AreStore, syntax: AreSyntax, directiveContext?: AreDirectiveContext, logger?: A_Logger): void;
|
|
552
690
|
removeAttribute(mutation: AddAttributeInstruction, context: AreHTMLEngineContext): void;
|
|
691
|
+
hideElement(mutation: HideElementInstruction, context: AreHTMLEngineContext): void;
|
|
692
|
+
showElement(mutation: HideElementInstruction, context: AreHTMLEngineContext): void;
|
|
553
693
|
addEventListener(mutation: AddListenerInstruction, context: AreHTMLEngineContext, store: AreStore, syntax: AreSyntax, directiveContext?: AreDirectiveContext, logger?: A_Logger): void;
|
|
554
694
|
removeEventListener(mutation: AddListenerInstruction, context: AreHTMLEngineContext): void;
|
|
555
695
|
addText(declaration: AddTextInstruction, context: AreHTMLEngineContext, store: AreStore, syntax: AreSyntax, directiveContext?: AreDirectiveContext, logger?: A_Logger): void;
|
|
@@ -567,6 +707,13 @@ declare class AreHTMLInterpreter extends AreInterpreter {
|
|
|
567
707
|
}
|
|
568
708
|
|
|
569
709
|
declare class AreHTMLLifecycle extends AreLifecycle {
|
|
710
|
+
/**
|
|
711
|
+
* Per-chunk time budget (ms) for the time-sliced initial mount walk. While
|
|
712
|
+
* mounting a large subtree we keep applying nodes until this much wall-clock
|
|
713
|
+
* time has elapsed, then yield to the browser so it can paint and process
|
|
714
|
+
* input before the next chunk. ~16ms targets a single animation frame.
|
|
715
|
+
*/
|
|
716
|
+
private static readonly MOUNT_BUDGET_MS;
|
|
570
717
|
initComponent(node: AreHTMLNode, scope: A_Scope, context: AreHTMLEngineContext, signalsContext?: AreSignalsContext, logger?: A_Logger, ...args: any[]): void;
|
|
571
718
|
initRoot(node: AreHTMLNode, scope: A_Scope, context: AreHTMLEngineContext, signalsContext?: AreSignalsContext, logger?: A_Logger, ...args: any[]): void;
|
|
572
719
|
initText(node: AreHTMLNode, scope: A_Scope, context: AreHTMLEngineContext, logger?: A_Logger, ...args: any[]): void;
|
|
@@ -579,7 +726,7 @@ declare class AreHTMLLifecycle extends AreLifecycle {
|
|
|
579
726
|
/**
|
|
580
727
|
* Node Content
|
|
581
728
|
*/
|
|
582
|
-
scene: AreScene, logger?: A_Logger, ...args: any[]): void
|
|
729
|
+
scene: AreScene, logger?: A_Logger, ...args: any[]): void | Promise<void>;
|
|
583
730
|
updateDirectiveAttribute(directive: AreDirectiveAttribute, scope: A_Scope, feature: A_Feature, logger?: A_Logger, ...args: any[]): void;
|
|
584
731
|
}
|
|
585
732
|
|
|
@@ -624,8 +771,60 @@ type AreDirectiveOrderDecoratorParameters = {
|
|
|
624
771
|
};
|
|
625
772
|
|
|
626
773
|
declare class AreRoot extends Are {
|
|
627
|
-
template(root: AreNode, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
|
|
628
|
-
onSignal(root: AreNode, vector: A_SignalVector, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
|
|
774
|
+
template(root: AreNode, logger: A_Logger, signalsContext?: AreSignalsContext, signalState?: A_SignalState): Promise<void>;
|
|
775
|
+
onSignal(root: AreNode, vector: A_SignalVector, logger: A_Logger, signalsContext?: AreSignalsContext, cache?: AreRootCache): Promise<void>;
|
|
776
|
+
/**
|
|
777
|
+
* Resolves the component a vector should render for the given root, mirroring
|
|
778
|
+
* the priority used everywhere in the routing system:
|
|
779
|
+
* 1. Root-specific conditions registered on AreSignalsContext.
|
|
780
|
+
* 2. The global AreSignalsMeta map, restricted to this outlet's pool.
|
|
781
|
+
*
|
|
782
|
+
* Passing the pool *into* the meta lookup is critical: without it, the first
|
|
783
|
+
* globally matching component wins and may belong to a different outlet
|
|
784
|
+
* (e.g. AisRequirementsPanel for the meta-outlet matching
|
|
785
|
+
* AisEditorCursorScope) — the pool check would then reject it and the outlet
|
|
786
|
+
* would fall back to its default, hiding a valid in-pool match (e.g.
|
|
787
|
+
* AisDiagramTab matching AisSetPrimaryDisplay).
|
|
788
|
+
*
|
|
789
|
+
* Returns `undefined` when nothing matches — callers decide whether to use a
|
|
790
|
+
* configured default, body content, or clear the outlet.
|
|
791
|
+
*/
|
|
792
|
+
protected matchComponent(rootId: string, vector: A_SignalVector | undefined, signalsContext?: AreSignalsContext): A_TYPES__Ctor<Are> | undefined;
|
|
793
|
+
/**
|
|
794
|
+
* Builds the vector used for the INITIAL render. It is seeded from the
|
|
795
|
+
* accumulated signal state (every signal dispatched on the bus so far) so a
|
|
796
|
+
* freshly-mounted outlet reflects the live application state immediately,
|
|
797
|
+
* not just on the next signal tick. The current URL route is appended when
|
|
798
|
+
* no AreRoute is already present in the state, so route-driven outlets still
|
|
799
|
+
* resolve on the very first paint (before AreRouteWatcher has dispatched).
|
|
800
|
+
*/
|
|
801
|
+
protected buildInitialVector(signalState?: A_SignalState): A_SignalVector;
|
|
802
|
+
/**
|
|
803
|
+
* Detach a displayed child subtree from the outlet and stash it in the cache
|
|
804
|
+
* for fast re-injection later. The subtree is unmounted (its scene plan is
|
|
805
|
+
* preserved) and deregistered from the root scope, but NOT destroyed. The
|
|
806
|
+
* nodes that were subscribed to the signal bus are unsubscribed while cached
|
|
807
|
+
* so the detached DOM never reacts to signals, and recorded so they can be
|
|
808
|
+
* re-subscribed verbatim on restore.
|
|
809
|
+
*
|
|
810
|
+
* When no cache is available, or the LRU evicts an entry, the affected
|
|
811
|
+
* subtree is fully destroyed.
|
|
812
|
+
*/
|
|
813
|
+
protected stashChild(root: AreNode, child: AreNode, signalsContext: AreSignalsContext | undefined, cache: AreRootCache | undefined): void;
|
|
814
|
+
/**
|
|
815
|
+
* Re-attach a cached subtree to the outlet and re-mount it from its preserved
|
|
816
|
+
* scene plan, re-subscribing exactly the nodes that were subscribed before it
|
|
817
|
+
* was cached.
|
|
818
|
+
*/
|
|
819
|
+
protected restoreChild(root: AreNode, entry: AreRootCacheEntry, signalsContext: AreSignalsContext | undefined): void;
|
|
820
|
+
/**
|
|
821
|
+
* Walk a subtree and collect the nodes currently registered as signal
|
|
822
|
+
* subscribers. Mirrors the subscription performed at init time in
|
|
823
|
+
* AreHTMLLifecycle (component nodes and root nodes) without depending on the
|
|
824
|
+
* concrete node classes — it simply intersects the subtree with the live
|
|
825
|
+
* subscriber registry.
|
|
826
|
+
*/
|
|
827
|
+
protected collectSubscribers(node: AreNode, signalsContext: AreSignalsContext): AreNode[];
|
|
629
828
|
}
|
|
630
829
|
|
|
631
830
|
declare class AreRouteWatcher extends A_Component {
|
|
@@ -643,4 +842,4 @@ declare class AreRouteWatcher extends A_Component {
|
|
|
643
842
|
private notify;
|
|
644
843
|
}
|
|
645
844
|
|
|
646
|
-
export { AddAttributeInstruction, AddElementInstruction, AddInterpolationInstruction, AddListenerInstruction, AddStyleInstruction, AddTextInstruction, AreBindingAttribute, AreComment, AreComponentNode, AreDirective, AreDirectiveAttribute, AreDirectiveContext, AreDirectiveFeatures, AreDirectiveFor, AreDirectiveIf, AreDirectiveMeta, type AreDirectiveOrderDecoratorParameters, AreEventAttribute, AreHTMLAttribute, AreHTMLCompiler, type AreHTMLContextConstructor, AreHTMLEngine, AreHTMLEngineContext, AreHTMLInstructions, AreHTMLInterpreter, AreHTMLLifecycle, AreHTMLNode, AreHTMLTokenizer, AreHTMLTransformer, type AreHtmlAddAttributeInstructionPayload, type AreHtmlAddCommentInstructionPayload, type AreHtmlAddElementInstructionPayload, type AreHtmlAddInterpolationInstructionPayload, type AreHtmlAddListenerInstructionPayload, type AreHtmlAddStyleInstructionPayload, type AreHtmlAddTextInstructionPayload, AreInterpolation, AreRoot, AreRootNode, AreRoute, AreRouteWatcher, AreStaticAttribute, AreStyle, AreText, BOOLEAN_ATTRIBUTES, IDL_FORM_PROPERTIES, LISTENER_OPTION_MODIFIERS, type ParsedEventName, SVG_ATTRIBUTE_NS, SVG_NAMESPACE, VOID_ELEMENTS, isBooleanAttribute, isIDLFormProperty, isVoidElement, normalizeClassValue, normalizeStyleValue, parseEventName, toDOMString };
|
|
845
|
+
export { AddAttributeInstruction, AddElementInstruction, AddInterpolationInstruction, AddListenerInstruction, AddStyleInstruction, AddTextInstruction, AreBindingAttribute, AreComment, AreComponentNode, AreDirective, AreDirectiveAttribute, AreDirectiveContext, AreDirectiveFeatures, AreDirectiveFor, AreDirectiveIf, AreDirectiveMeta, type AreDirectiveOrderDecoratorParameters, AreDirectiveShow, AreEventAttribute, AreHTMLAttribute, AreHTMLCompiler, type AreHTMLContextConstructor, AreHTMLEngine, AreHTMLEngineContext, AreHTMLInstructions, AreHTMLInterpreter, AreHTMLLifecycle, AreHTMLNode, AreHTMLTokenizer, AreHTMLTransformer, type AreHtmlAddAttributeInstructionPayload, type AreHtmlAddCommentInstructionPayload, type AreHtmlAddElementInstructionPayload, type AreHtmlAddInterpolationInstructionPayload, type AreHtmlAddListenerInstructionPayload, type AreHtmlAddStyleInstructionPayload, type AreHtmlAddTextInstructionPayload, type AreHtmlHideInstructionPayload, AreInterpolation, AreRoot, AreRootCache, type AreRootCacheEntry, AreRootNode, AreRoute, AreRouteWatcher, AreStaticAttribute, AreStyle, AreText, BOOLEAN_ATTRIBUTES, HideElementInstruction, IDL_FORM_PROPERTIES, LISTENER_OPTION_MODIFIERS, type ParsedEventName, SVG_ATTRIBUTE_NS, SVG_NAMESPACE, VOID_ELEMENTS, isBooleanAttribute, isIDLFormProperty, isVoidElement, normalizeClassValue, normalizeStyleValue, parseEventName, toDOMString };
|