@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.
Files changed (109) hide show
  1. package/.conf/tsconfig.base.json +1 -0
  2. package/.conf/tsconfig.browser.json +1 -0
  3. package/.conf/tsconfig.node.json +1 -0
  4. package/dist/browser/index.d.mts +206 -7
  5. package/dist/browser/index.mjs +527 -65
  6. package/dist/browser/index.mjs.map +1 -1
  7. package/dist/node/directives/AreDirectiveFor.directive.d.mts +44 -1
  8. package/dist/node/directives/AreDirectiveFor.directive.d.ts +44 -1
  9. package/dist/node/directives/AreDirectiveFor.directive.js +102 -6
  10. package/dist/node/directives/AreDirectiveFor.directive.js.map +1 -1
  11. package/dist/node/directives/AreDirectiveFor.directive.mjs +102 -6
  12. package/dist/node/directives/AreDirectiveFor.directive.mjs.map +1 -1
  13. package/dist/node/directives/AreDirectiveShow.directive.d.mts +32 -0
  14. package/dist/node/directives/AreDirectiveShow.directive.d.ts +32 -0
  15. package/dist/node/directives/AreDirectiveShow.directive.js +81 -0
  16. package/dist/node/directives/AreDirectiveShow.directive.js.map +1 -0
  17. package/dist/node/directives/AreDirectiveShow.directive.mjs +71 -0
  18. package/dist/node/directives/AreDirectiveShow.directive.mjs.map +1 -0
  19. package/dist/node/engine/AreHTML.engine.d.mts +2 -1
  20. package/dist/node/engine/AreHTML.engine.d.ts +2 -1
  21. package/dist/node/engine/AreHTML.engine.js +8 -2
  22. package/dist/node/engine/AreHTML.engine.js.map +1 -1
  23. package/dist/node/engine/AreHTML.engine.mjs +8 -2
  24. package/dist/node/engine/AreHTML.engine.mjs.map +1 -1
  25. package/dist/node/engine/AreHTML.interpreter.d.mts +3 -0
  26. package/dist/node/engine/AreHTML.interpreter.d.ts +3 -0
  27. package/dist/node/engine/AreHTML.interpreter.js +29 -0
  28. package/dist/node/engine/AreHTML.interpreter.js.map +1 -1
  29. package/dist/node/engine/AreHTML.interpreter.mjs +29 -0
  30. package/dist/node/engine/AreHTML.interpreter.mjs.map +1 -1
  31. package/dist/node/engine/AreHTML.lifecycle.d.mts +8 -1
  32. package/dist/node/engine/AreHTML.lifecycle.d.ts +8 -1
  33. package/dist/node/engine/AreHTML.lifecycle.js +46 -3
  34. package/dist/node/engine/AreHTML.lifecycle.js.map +1 -1
  35. package/dist/node/engine/AreHTML.lifecycle.mjs +46 -3
  36. package/dist/node/engine/AreHTML.lifecycle.mjs.map +1 -1
  37. package/dist/node/helpers/AreScheduler.helper.d.mts +39 -0
  38. package/dist/node/helpers/AreScheduler.helper.d.ts +39 -0
  39. package/dist/node/helpers/AreScheduler.helper.js +40 -0
  40. package/dist/node/helpers/AreScheduler.helper.js.map +1 -0
  41. package/dist/node/helpers/AreScheduler.helper.mjs +40 -0
  42. package/dist/node/helpers/AreScheduler.helper.mjs.map +1 -0
  43. package/dist/node/index.d.mts +4 -1
  44. package/dist/node/index.d.ts +4 -1
  45. package/dist/node/index.js +21 -0
  46. package/dist/node/index.mjs +3 -0
  47. package/dist/node/instructions/AreHTML.instructions.constants.d.mts +1 -0
  48. package/dist/node/instructions/AreHTML.instructions.constants.d.ts +1 -0
  49. package/dist/node/instructions/AreHTML.instructions.constants.js +2 -1
  50. package/dist/node/instructions/AreHTML.instructions.constants.js.map +1 -1
  51. package/dist/node/instructions/AreHTML.instructions.constants.mjs +2 -1
  52. package/dist/node/instructions/AreHTML.instructions.constants.mjs.map +1 -1
  53. package/dist/node/instructions/AreHTML.instructions.types.d.mts +9 -1
  54. package/dist/node/instructions/AreHTML.instructions.types.d.ts +9 -1
  55. package/dist/node/instructions/HideElement.instruction.d.mts +13 -0
  56. package/dist/node/instructions/HideElement.instruction.d.ts +13 -0
  57. package/dist/node/instructions/HideElement.instruction.js +31 -0
  58. package/dist/node/instructions/HideElement.instruction.js.map +1 -0
  59. package/dist/node/instructions/HideElement.instruction.mjs +24 -0
  60. package/dist/node/instructions/HideElement.instruction.mjs.map +1 -0
  61. package/dist/node/lib/AreRoot/AreRoot.component.d.mts +57 -3
  62. package/dist/node/lib/AreRoot/AreRoot.component.d.ts +57 -3
  63. package/dist/node/lib/AreRoot/AreRoot.component.js +138 -49
  64. package/dist/node/lib/AreRoot/AreRoot.component.js.map +1 -1
  65. package/dist/node/lib/AreRoot/AreRoot.component.mjs +140 -51
  66. package/dist/node/lib/AreRoot/AreRoot.component.mjs.map +1 -1
  67. package/dist/node/lib/AreRoot/AreRootCache.context.d.mts +58 -0
  68. package/dist/node/lib/AreRoot/AreRootCache.context.d.ts +58 -0
  69. package/dist/node/lib/AreRoot/AreRootCache.context.js +106 -0
  70. package/dist/node/lib/AreRoot/AreRootCache.context.js.map +1 -0
  71. package/dist/node/lib/AreRoot/AreRootCache.context.mjs +99 -0
  72. package/dist/node/lib/AreRoot/AreRootCache.context.mjs.map +1 -0
  73. package/examples/dashboard/dist/index.html +1 -1
  74. package/examples/dashboard/dist/{mq19zxz4-mnlgmd.js → mqh9ryml-xat335.js} +1922 -1316
  75. package/examples/dashboard/src/concept.ts +3 -2
  76. package/examples/for-perf/concept.ts +45 -0
  77. package/examples/for-perf/containers/UI.container.ts +161 -0
  78. package/examples/for-perf/dist/index.html +270 -0
  79. package/examples/for-perf/dist/mqh9ryde-m243t8.js +15223 -0
  80. package/examples/for-perf/dist/mqh9ryfo-6a8d0o.js +15223 -0
  81. package/examples/for-perf/dist/mqh9ryfq-4pf5cv.js +15223 -0
  82. package/examples/for-perf/public/index.html +270 -0
  83. package/examples/for-perf/src/components/PerfApp.component.ts +37 -0
  84. package/examples/for-perf/src/components/PerfControls.component.ts +34 -0
  85. package/examples/for-perf/src/components/PerfGrid.component.ts +225 -0
  86. package/examples/for-perf/src/components/PerfHeader.component.ts +34 -0
  87. package/examples/for-perf/src/components/PerfStats.component.ts +43 -0
  88. package/examples/for-perf/src/concept.ts +94 -0
  89. package/examples/jumpstart/dist/index.html +1 -1
  90. package/examples/jumpstart/dist/{mq1a0fv0-ccgtz6.js → mq7mgf58-vbf07e.js} +895 -521
  91. package/examples/signal-routing/dist/index.html +1 -1
  92. package/examples/signal-routing/dist/{mq1bzrik-4lec86.js → mqh9ryc9-dkcbkx.js} +2024 -1300
  93. package/examples/signal-routing/src/components/SettingsPage.component.ts +39 -0
  94. package/examples/signal-routing/src/concept.ts +2 -0
  95. package/jest.config.ts +1 -0
  96. package/package.json +10 -9
  97. package/src/directives/AreDirectiveFor.directive.ts +185 -12
  98. package/src/directives/AreDirectiveShow.directive.ts +127 -0
  99. package/src/engine/AreHTML.engine.ts +11 -1
  100. package/src/engine/AreHTML.interpreter.ts +50 -0
  101. package/src/engine/AreHTML.lifecycle.ts +83 -6
  102. package/src/helpers/AreScheduler.helper.ts +61 -0
  103. package/src/index.ts +3 -0
  104. package/src/instructions/AreHTML.instructions.constants.ts +1 -0
  105. package/src/instructions/AreHTML.instructions.types.ts +9 -0
  106. package/src/instructions/HideElement.instruction.ts +29 -0
  107. package/src/lib/AreRoot/AreRoot.component.ts +205 -72
  108. package/src/lib/AreRoot/AreRootCache.context.ts +133 -0
  109. package/tsconfig.json +1 -0
@@ -0,0 +1,39 @@
1
+ /**
2
+ * AreSchedulerHelper
3
+ *
4
+ * Cooperative time-slicing primitives shared by the chunked (async) render
5
+ * paths — the initial whole-page mount walk and the `$for` directive. Both need
6
+ * the SAME two capabilities:
7
+ * 1. a high-resolution clock to measure how long the current chunk has run, and
8
+ * 2. a zero-delay macrotask scheduler to yield to the browser between chunks
9
+ * so it can paint and process input before resuming work.
10
+ *
11
+ * Keeping these in one helper avoids duplicating the `MessageChannel` plumbing
12
+ * across directives/lifecycle and gives a single place to tune the strategy.
13
+ */
14
+ declare class AreSchedulerHelper {
15
+ /**
16
+ * Lazily-created `MessageChannel` used to post zero-delay macrotasks.
17
+ * Created on first use so non-DOM environments (tests / SSR) that never
18
+ * schedule a chunk pay nothing.
19
+ */
20
+ private static _channel?;
21
+ /** FIFO queue of callbacks waiting for their posted macrotask to fire. */
22
+ private static readonly _queue;
23
+ /**
24
+ * High-resolution wall-clock time in milliseconds. Uses `performance.now()`
25
+ * when available (monotonic, sub-millisecond), falling back to `Date.now()`.
26
+ */
27
+ static now(): number;
28
+ /**
29
+ * Schedule `fn` to run on the next macrotask.
30
+ *
31
+ * `MessageChannel` yields a true macrotask without the ~4ms clamp that nested
32
+ * `setTimeout(0)` calls incur, so the browser can paint between chunks with
33
+ * minimal scheduling overhead. Falls back to `setTimeout` in non-DOM
34
+ * environments (e.g. tests / SSR).
35
+ */
36
+ static scheduleMacrotask(fn: () => void): void;
37
+ }
38
+
39
+ export { AreSchedulerHelper };
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ class AreSchedulerHelper {
4
+ /**
5
+ * High-resolution wall-clock time in milliseconds. Uses `performance.now()`
6
+ * when available (monotonic, sub-millisecond), falling back to `Date.now()`.
7
+ */
8
+ static now() {
9
+ return typeof performance !== "undefined" && typeof performance.now === "function" ? performance.now() : Date.now();
10
+ }
11
+ /**
12
+ * Schedule `fn` to run on the next macrotask.
13
+ *
14
+ * `MessageChannel` yields a true macrotask without the ~4ms clamp that nested
15
+ * `setTimeout(0)` calls incur, so the browser can paint between chunks with
16
+ * minimal scheduling overhead. Falls back to `setTimeout` in non-DOM
17
+ * environments (e.g. tests / SSR).
18
+ */
19
+ static scheduleMacrotask(fn) {
20
+ if (typeof MessageChannel === "undefined") {
21
+ setTimeout(fn, 0);
22
+ return;
23
+ }
24
+ if (!this._channel) {
25
+ this._channel = new MessageChannel();
26
+ this._channel.port1.onmessage = () => {
27
+ const next = this._queue.shift();
28
+ if (next) next();
29
+ };
30
+ }
31
+ this._queue.push(fn);
32
+ this._channel.port2.postMessage(null);
33
+ }
34
+ }
35
+ /** FIFO queue of callbacks waiting for their posted macrotask to fire. */
36
+ AreSchedulerHelper._queue = [];
37
+
38
+ exports.AreSchedulerHelper = AreSchedulerHelper;
39
+ //# sourceMappingURL=AreScheduler.helper.js.map
40
+ //# sourceMappingURL=AreScheduler.helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/helpers/AreScheduler.helper.ts"],"names":[],"mappings":";;AAaO,MAAM,kBAAA,CAAmB;AAAA;AAAA;AAAA;AAAA;AAAA,EAgB5B,OAAO,GAAA,GAAc;AACjB,IAAA,OAAQ,OAAO,WAAA,KAAgB,WAAA,IAAe,OAAO,WAAA,CAAY,GAAA,KAAQ,UAAA,GACnE,WAAA,CAAY,GAAA,EAAI,GAChB,IAAA,CAAK,GAAA,EAAI;AAAA,EACnB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,OAAO,kBAAkB,EAAA,EAAsB;AAC3C,IAAA,IAAI,OAAO,mBAAmB,WAAA,EAAa;AACvC,MAAA,UAAA,CAAW,IAAI,CAAC,CAAA;AAChB,MAAA;AAAA,IACJ;AAEA,IAAA,IAAI,CAAC,KAAK,QAAA,EAAU;AAChB,MAAA,IAAA,CAAK,QAAA,GAAW,IAAI,cAAA,EAAe;AACnC,MAAA,IAAA,CAAK,QAAA,CAAS,KAAA,CAAM,SAAA,GAAY,MAAM;AAClC,QAAA,MAAM,IAAA,GAAO,IAAA,CAAK,MAAA,CAAO,KAAA,EAAM;AAC/B,QAAA,IAAI,MAAM,IAAA,EAAK;AAAA,MACnB,CAAA;AAAA,IACJ;AAEA,IAAA,IAAA,CAAK,MAAA,CAAO,KAAK,EAAE,CAAA;AACnB,IAAA,IAAA,CAAK,QAAA,CAAS,KAAA,CAAM,WAAA,CAAY,IAAI,CAAA;AAAA,EACxC;AACJ;AAAA;AA/Ca,kBAAA,CAUe,SAA4B,EAAC","file":"AreScheduler.helper.js","sourcesContent":["/**\n * AreSchedulerHelper\n *\n * Cooperative time-slicing primitives shared by the chunked (async) render\n * paths — the initial whole-page mount walk and the `$for` directive. Both need\n * the SAME two capabilities:\n * 1. a high-resolution clock to measure how long the current chunk has run, and\n * 2. a zero-delay macrotask scheduler to yield to the browser between chunks\n * so it can paint and process input before resuming work.\n *\n * Keeping these in one helper avoids duplicating the `MessageChannel` plumbing\n * across directives/lifecycle and gives a single place to tune the strategy.\n */\nexport class AreSchedulerHelper {\n\n /**\n * Lazily-created `MessageChannel` used to post zero-delay macrotasks.\n * Created on first use so non-DOM environments (tests / SSR) that never\n * schedule a chunk pay nothing.\n */\n private static _channel?: MessageChannel;\n\n /** FIFO queue of callbacks waiting for their posted macrotask to fire. */\n private static readonly _queue: Array<() => void> = [];\n\n /**\n * High-resolution wall-clock time in milliseconds. Uses `performance.now()`\n * when available (monotonic, sub-millisecond), falling back to `Date.now()`.\n */\n static now(): number {\n return (typeof performance !== 'undefined' && typeof performance.now === 'function')\n ? performance.now()\n : Date.now();\n }\n\n /**\n * Schedule `fn` to run on the next macrotask.\n *\n * `MessageChannel` yields a true macrotask without the ~4ms clamp that nested\n * `setTimeout(0)` calls incur, so the browser can paint between chunks with\n * minimal scheduling overhead. Falls back to `setTimeout` in non-DOM\n * environments (e.g. tests / SSR).\n */\n static scheduleMacrotask(fn: () => void): void {\n if (typeof MessageChannel === 'undefined') {\n setTimeout(fn, 0);\n return;\n }\n\n if (!this._channel) {\n this._channel = new MessageChannel();\n this._channel.port1.onmessage = () => {\n const next = this._queue.shift();\n if (next) next();\n };\n }\n\n this._queue.push(fn);\n this._channel.port2.postMessage(null);\n }\n}\n"]}
@@ -0,0 +1,40 @@
1
+ import '../chunk-EQQGB2QZ.mjs';
2
+
3
+ class AreSchedulerHelper {
4
+ /**
5
+ * High-resolution wall-clock time in milliseconds. Uses `performance.now()`
6
+ * when available (monotonic, sub-millisecond), falling back to `Date.now()`.
7
+ */
8
+ static now() {
9
+ return typeof performance !== "undefined" && typeof performance.now === "function" ? performance.now() : Date.now();
10
+ }
11
+ /**
12
+ * Schedule `fn` to run on the next macrotask.
13
+ *
14
+ * `MessageChannel` yields a true macrotask without the ~4ms clamp that nested
15
+ * `setTimeout(0)` calls incur, so the browser can paint between chunks with
16
+ * minimal scheduling overhead. Falls back to `setTimeout` in non-DOM
17
+ * environments (e.g. tests / SSR).
18
+ */
19
+ static scheduleMacrotask(fn) {
20
+ if (typeof MessageChannel === "undefined") {
21
+ setTimeout(fn, 0);
22
+ return;
23
+ }
24
+ if (!this._channel) {
25
+ this._channel = new MessageChannel();
26
+ this._channel.port1.onmessage = () => {
27
+ const next = this._queue.shift();
28
+ if (next) next();
29
+ };
30
+ }
31
+ this._queue.push(fn);
32
+ this._channel.port2.postMessage(null);
33
+ }
34
+ }
35
+ /** FIFO queue of callbacks waiting for their posted macrotask to fire. */
36
+ AreSchedulerHelper._queue = [];
37
+
38
+ export { AreSchedulerHelper };
39
+ //# sourceMappingURL=AreScheduler.helper.mjs.map
40
+ //# sourceMappingURL=AreScheduler.helper.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/helpers/AreScheduler.helper.ts"],"names":[],"mappings":";;AAaO,MAAM,kBAAA,CAAmB;AAAA;AAAA;AAAA;AAAA;AAAA,EAgB5B,OAAO,GAAA,GAAc;AACjB,IAAA,OAAQ,OAAO,WAAA,KAAgB,WAAA,IAAe,OAAO,WAAA,CAAY,GAAA,KAAQ,UAAA,GACnE,WAAA,CAAY,GAAA,EAAI,GAChB,IAAA,CAAK,GAAA,EAAI;AAAA,EACnB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,OAAO,kBAAkB,EAAA,EAAsB;AAC3C,IAAA,IAAI,OAAO,mBAAmB,WAAA,EAAa;AACvC,MAAA,UAAA,CAAW,IAAI,CAAC,CAAA;AAChB,MAAA;AAAA,IACJ;AAEA,IAAA,IAAI,CAAC,KAAK,QAAA,EAAU;AAChB,MAAA,IAAA,CAAK,QAAA,GAAW,IAAI,cAAA,EAAe;AACnC,MAAA,IAAA,CAAK,QAAA,CAAS,KAAA,CAAM,SAAA,GAAY,MAAM;AAClC,QAAA,MAAM,IAAA,GAAO,IAAA,CAAK,MAAA,CAAO,KAAA,EAAM;AAC/B,QAAA,IAAI,MAAM,IAAA,EAAK;AAAA,MACnB,CAAA;AAAA,IACJ;AAEA,IAAA,IAAA,CAAK,MAAA,CAAO,KAAK,EAAE,CAAA;AACnB,IAAA,IAAA,CAAK,QAAA,CAAS,KAAA,CAAM,WAAA,CAAY,IAAI,CAAA;AAAA,EACxC;AACJ;AAAA;AA/Ca,kBAAA,CAUe,SAA4B,EAAC","file":"AreScheduler.helper.mjs","sourcesContent":["/**\n * AreSchedulerHelper\n *\n * Cooperative time-slicing primitives shared by the chunked (async) render\n * paths — the initial whole-page mount walk and the `$for` directive. Both need\n * the SAME two capabilities:\n * 1. a high-resolution clock to measure how long the current chunk has run, and\n * 2. a zero-delay macrotask scheduler to yield to the browser between chunks\n * so it can paint and process input before resuming work.\n *\n * Keeping these in one helper avoids duplicating the `MessageChannel` plumbing\n * across directives/lifecycle and gives a single place to tune the strategy.\n */\nexport class AreSchedulerHelper {\n\n /**\n * Lazily-created `MessageChannel` used to post zero-delay macrotasks.\n * Created on first use so non-DOM environments (tests / SSR) that never\n * schedule a chunk pay nothing.\n */\n private static _channel?: MessageChannel;\n\n /** FIFO queue of callbacks waiting for their posted macrotask to fire. */\n private static readonly _queue: Array<() => void> = [];\n\n /**\n * High-resolution wall-clock time in milliseconds. Uses `performance.now()`\n * when available (monotonic, sub-millisecond), falling back to `Date.now()`.\n */\n static now(): number {\n return (typeof performance !== 'undefined' && typeof performance.now === 'function')\n ? performance.now()\n : Date.now();\n }\n\n /**\n * Schedule `fn` to run on the next macrotask.\n *\n * `MessageChannel` yields a true macrotask without the ~4ms clamp that nested\n * `setTimeout(0)` calls incur, so the browser can paint between chunks with\n * minimal scheduling overhead. Falls back to `setTimeout` in non-DOM\n * environments (e.g. tests / SSR).\n */\n static scheduleMacrotask(fn: () => void): void {\n if (typeof MessageChannel === 'undefined') {\n setTimeout(fn, 0);\n return;\n }\n\n if (!this._channel) {\n this._channel = new MessageChannel();\n this._channel.port1.onmessage = () => {\n const next = this._queue.shift();\n if (next) next();\n };\n }\n\n this._queue.push(fn);\n this._channel.port2.postMessage(null);\n }\n}\n"]}
@@ -1,14 +1,16 @@
1
1
  export { A as AreBindingAttribute, a as AreDirective, b as AreDirectiveAttribute, c as AreEventAttribute, d as AreHTMLAttribute, e as AreHTMLNode, f as AreStaticAttribute } from './AreBinding.attribute-doUvtOjc.mjs';
2
2
  export { AreDirectiveFor } from './directives/AreDirectiveFor.directive.mjs';
3
3
  export { AreDirectiveIf } from './directives/AreDirectiveIf.directive.mjs';
4
+ export { AreDirectiveShow } from './directives/AreDirectiveShow.directive.mjs';
4
5
  export { AddAttributeInstruction } from './instructions/AddAttribute.instruction.mjs';
5
6
  export { AddElementInstruction } from './instructions/AddElement.instruction.mjs';
6
7
  export { AddInterpolationInstruction } from './instructions/AddInterpolation.instruction.mjs';
7
8
  export { AddListenerInstruction } from './instructions/AddListener.instruction.mjs';
8
9
  export { AddStyleInstruction } from './instructions/AddStyle.instruction.mjs';
9
10
  export { AddTextInstruction } from './instructions/AddText.instruction.mjs';
11
+ export { HideElementInstruction } from './instructions/HideElement.instruction.mjs';
10
12
  export { AreHTMLInstructions } from './instructions/AreHTML.instructions.constants.mjs';
11
- export { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload } from './instructions/AreHTML.instructions.types.mjs';
13
+ export { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload, AreHtmlHideInstructionPayload } from './instructions/AreHTML.instructions.types.mjs';
12
14
  export { AreComment } from './nodes/AreComment.mjs';
13
15
  export { AreComponentNode } from './nodes/AreComponent.mjs';
14
16
  export { AreInterpolation } from './nodes/AreInterpolation.mjs';
@@ -29,6 +31,7 @@ export { AreDirectiveContext } from './lib/AreDirective/AreDirective.context.mjs
29
31
  export { AreDirectiveMeta } from './lib/AreDirective/AreDirective.meta.mjs';
30
32
  export { AreDirectiveOrderDecoratorParameters } from './lib/AreDirective/AreDirective.types.mjs';
31
33
  export { AreRoot } from './lib/AreRoot/AreRoot.component.mjs';
34
+ export { AreRootCache, AreRootCacheEntry } from './lib/AreRoot/AreRootCache.context.mjs';
32
35
  export { AreStyle } from './lib/AreStyle/AreStyle.context.mjs';
33
36
  export { AreRouteWatcher } from './lib/AreRouteWatcher/AreRouteWatcher.component.mjs';
34
37
  import '@adaas/are';
@@ -1,14 +1,16 @@
1
1
  export { A as AreBindingAttribute, a as AreDirective, b as AreDirectiveAttribute, c as AreEventAttribute, d as AreHTMLAttribute, e as AreHTMLNode, f as AreStaticAttribute } from './AreBinding.attribute-Bm5LlOyE.js';
2
2
  export { AreDirectiveFor } from './directives/AreDirectiveFor.directive.js';
3
3
  export { AreDirectiveIf } from './directives/AreDirectiveIf.directive.js';
4
+ export { AreDirectiveShow } from './directives/AreDirectiveShow.directive.js';
4
5
  export { AddAttributeInstruction } from './instructions/AddAttribute.instruction.js';
5
6
  export { AddElementInstruction } from './instructions/AddElement.instruction.js';
6
7
  export { AddInterpolationInstruction } from './instructions/AddInterpolation.instruction.js';
7
8
  export { AddListenerInstruction } from './instructions/AddListener.instruction.js';
8
9
  export { AddStyleInstruction } from './instructions/AddStyle.instruction.js';
9
10
  export { AddTextInstruction } from './instructions/AddText.instruction.js';
11
+ export { HideElementInstruction } from './instructions/HideElement.instruction.js';
10
12
  export { AreHTMLInstructions } from './instructions/AreHTML.instructions.constants.js';
11
- export { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload } from './instructions/AreHTML.instructions.types.js';
13
+ export { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload, AreHtmlHideInstructionPayload } from './instructions/AreHTML.instructions.types.js';
12
14
  export { AreComment } from './nodes/AreComment.js';
13
15
  export { AreComponentNode } from './nodes/AreComponent.js';
14
16
  export { AreInterpolation } from './nodes/AreInterpolation.js';
@@ -29,6 +31,7 @@ export { AreDirectiveContext } from './lib/AreDirective/AreDirective.context.js'
29
31
  export { AreDirectiveMeta } from './lib/AreDirective/AreDirective.meta.js';
30
32
  export { AreDirectiveOrderDecoratorParameters } from './lib/AreDirective/AreDirective.types.js';
31
33
  export { AreRoot } from './lib/AreRoot/AreRoot.component.js';
34
+ export { AreRootCache, AreRootCacheEntry } from './lib/AreRoot/AreRootCache.context.js';
32
35
  export { AreStyle } from './lib/AreStyle/AreStyle.context.js';
33
36
  export { AreRouteWatcher } from './lib/AreRouteWatcher/AreRouteWatcher.component.js';
34
37
  import '@adaas/are';
@@ -7,12 +7,14 @@ var AreStatic_attribute = require('./attributes/AreStatic.attribute');
7
7
  var AreComponent_directive = require('./directives/AreComponent.directive');
8
8
  var AreDirectiveFor_directive = require('./directives/AreDirectiveFor.directive');
9
9
  var AreDirectiveIf_directive = require('./directives/AreDirectiveIf.directive');
10
+ var AreDirectiveShow_directive = require('./directives/AreDirectiveShow.directive');
10
11
  var AddAttribute_instruction = require('./instructions/AddAttribute.instruction');
11
12
  var AddElement_instruction = require('./instructions/AddElement.instruction');
12
13
  var AddInterpolation_instruction = require('./instructions/AddInterpolation.instruction');
13
14
  var AddListener_instruction = require('./instructions/AddListener.instruction');
14
15
  var AddStyle_instruction = require('./instructions/AddStyle.instruction');
15
16
  var AddText_instruction = require('./instructions/AddText.instruction');
17
+ var HideElement_instruction = require('./instructions/HideElement.instruction');
16
18
  var AreHTML_instructions_constants = require('./instructions/AreHTML.instructions.constants');
17
19
  var AreHTML_instructions_types = require('./instructions/AreHTML.instructions.types');
18
20
  var AreComment = require('./nodes/AreComment');
@@ -38,6 +40,7 @@ var AreDirective_context = require('./lib/AreDirective/AreDirective.context');
38
40
  var AreDirective_meta = require('./lib/AreDirective/AreDirective.meta');
39
41
  var AreDirective_types = require('./lib/AreDirective/AreDirective.types');
40
42
  var AreRoot_component = require('./lib/AreRoot/AreRoot.component');
43
+ var AreRootCache_context = require('./lib/AreRoot/AreRootCache.context');
41
44
  var AreStyle_context = require('./lib/AreStyle/AreStyle.context');
42
45
  var AreStyle_types = require('./lib/AreStyle/AreStyle.types');
43
46
  var AreRouteWatcher_component = require('./lib/AreRouteWatcher/AreRouteWatcher.component');
@@ -86,6 +89,12 @@ Object.keys(AreDirectiveIf_directive).forEach(function (k) {
86
89
  get: function () { return AreDirectiveIf_directive[k]; }
87
90
  });
88
91
  });
92
+ Object.keys(AreDirectiveShow_directive).forEach(function (k) {
93
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
94
+ enumerable: true,
95
+ get: function () { return AreDirectiveShow_directive[k]; }
96
+ });
97
+ });
89
98
  Object.keys(AddAttribute_instruction).forEach(function (k) {
90
99
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
91
100
  enumerable: true,
@@ -122,6 +131,12 @@ Object.keys(AddText_instruction).forEach(function (k) {
122
131
  get: function () { return AddText_instruction[k]; }
123
132
  });
124
133
  });
134
+ Object.keys(HideElement_instruction).forEach(function (k) {
135
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
136
+ enumerable: true,
137
+ get: function () { return HideElement_instruction[k]; }
138
+ });
139
+ });
125
140
  Object.keys(AreHTML_instructions_constants).forEach(function (k) {
126
141
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
127
142
  enumerable: true,
@@ -272,6 +287,12 @@ Object.keys(AreRoot_component).forEach(function (k) {
272
287
  get: function () { return AreRoot_component[k]; }
273
288
  });
274
289
  });
290
+ Object.keys(AreRootCache_context).forEach(function (k) {
291
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
292
+ enumerable: true,
293
+ get: function () { return AreRootCache_context[k]; }
294
+ });
295
+ });
275
296
  Object.keys(AreStyle_context).forEach(function (k) {
276
297
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
277
298
  enumerable: true,
@@ -5,12 +5,14 @@ export * from './attributes/AreStatic.attribute';
5
5
  export * from './directives/AreComponent.directive';
6
6
  export * from './directives/AreDirectiveFor.directive';
7
7
  export * from './directives/AreDirectiveIf.directive';
8
+ export * from './directives/AreDirectiveShow.directive';
8
9
  export * from './instructions/AddAttribute.instruction';
9
10
  export * from './instructions/AddElement.instruction';
10
11
  export * from './instructions/AddInterpolation.instruction';
11
12
  export * from './instructions/AddListener.instruction';
12
13
  export * from './instructions/AddStyle.instruction';
13
14
  export * from './instructions/AddText.instruction';
15
+ export * from './instructions/HideElement.instruction';
14
16
  export * from './instructions/AreHTML.instructions.constants';
15
17
  export * from './instructions/AreHTML.instructions.types';
16
18
  export * from './nodes/AreComment';
@@ -36,6 +38,7 @@ export * from './lib/AreDirective/AreDirective.context';
36
38
  export * from './lib/AreDirective/AreDirective.meta';
37
39
  export * from './lib/AreDirective/AreDirective.types';
38
40
  export * from './lib/AreRoot/AreRoot.component';
41
+ export * from './lib/AreRoot/AreRootCache.context';
39
42
  export * from './lib/AreStyle/AreStyle.context';
40
43
  export * from './lib/AreStyle/AreStyle.types';
41
44
  export * from './lib/AreRouteWatcher/AreRouteWatcher.component';
@@ -6,6 +6,7 @@ declare const AreHTMLInstructions: {
6
6
  readonly AddListener: "_AreHTML_AddListener";
7
7
  readonly AddInterpolation: "_AreHTML_AddInterpolation";
8
8
  readonly AddComment: "_AreHTML_AddComment";
9
+ readonly HideElement: "_AreHTML_HideElement";
9
10
  };
10
11
 
11
12
  export { AreHTMLInstructions };
@@ -6,6 +6,7 @@ declare const AreHTMLInstructions: {
6
6
  readonly AddListener: "_AreHTML_AddListener";
7
7
  readonly AddInterpolation: "_AreHTML_AddInterpolation";
8
8
  readonly AddComment: "_AreHTML_AddComment";
9
+ readonly HideElement: "_AreHTML_HideElement";
9
10
  };
10
11
 
11
12
  export { AreHTMLInstructions };
@@ -7,7 +7,8 @@ const AreHTMLInstructions = {
7
7
  AddStyle: "_AreHTML_AddStyle",
8
8
  AddListener: "_AreHTML_AddListener",
9
9
  AddInterpolation: "_AreHTML_AddInterpolation",
10
- AddComment: "_AreHTML_AddComment"
10
+ AddComment: "_AreHTML_AddComment",
11
+ HideElement: "_AreHTML_HideElement"
11
12
  };
12
13
 
13
14
  exports.AreHTMLInstructions = AreHTMLInstructions;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/instructions/AreHTML.instructions.constants.ts"],"names":[],"mappings":";;AAEO,MAAM,mBAAA,GAAsB;AAAA,EAC/B,UAAA,EAAY,qBAAA;AAAA,EACZ,OAAA,EAAS,kBAAA;AAAA,EACT,YAAA,EAAc,uBAAA;AAAA,EACd,QAAA,EAAU,mBAAA;AAAA,EACV,WAAA,EAAa,sBAAA;AAAA,EACb,gBAAA,EAAkB,2BAAA;AAAA,EAClB,UAAA,EAAY;AAChB","file":"AreHTML.instructions.constants.js","sourcesContent":["\n\nexport const AreHTMLInstructions = {\n AddElement: '_AreHTML_AddElement',\n AddText: '_AreHTML_AddText',\n AddAttribute: '_AreHTML_AddAttribute',\n AddStyle: '_AreHTML_AddStyle',\n AddListener: '_AreHTML_AddListener',\n AddInterpolation: '_AreHTML_AddInterpolation',\n AddComment: '_AreHTML_AddComment',\n} as const"]}
1
+ {"version":3,"sources":["../../../src/instructions/AreHTML.instructions.constants.ts"],"names":[],"mappings":";;AAEO,MAAM,mBAAA,GAAsB;AAAA,EAC/B,UAAA,EAAY,qBAAA;AAAA,EACZ,OAAA,EAAS,kBAAA;AAAA,EACT,YAAA,EAAc,uBAAA;AAAA,EACd,QAAA,EAAU,mBAAA;AAAA,EACV,WAAA,EAAa,sBAAA;AAAA,EACb,gBAAA,EAAkB,2BAAA;AAAA,EAClB,UAAA,EAAY,qBAAA;AAAA,EACZ,WAAA,EAAa;AACjB","file":"AreHTML.instructions.constants.js","sourcesContent":["\n\nexport const AreHTMLInstructions = {\n AddElement: '_AreHTML_AddElement',\n AddText: '_AreHTML_AddText',\n AddAttribute: '_AreHTML_AddAttribute',\n AddStyle: '_AreHTML_AddStyle',\n AddListener: '_AreHTML_AddListener',\n AddInterpolation: '_AreHTML_AddInterpolation',\n AddComment: '_AreHTML_AddComment',\n HideElement: '_AreHTML_HideElement',\n} as const"]}
@@ -7,7 +7,8 @@ const AreHTMLInstructions = {
7
7
  AddStyle: "_AreHTML_AddStyle",
8
8
  AddListener: "_AreHTML_AddListener",
9
9
  AddInterpolation: "_AreHTML_AddInterpolation",
10
- AddComment: "_AreHTML_AddComment"
10
+ AddComment: "_AreHTML_AddComment",
11
+ HideElement: "_AreHTML_HideElement"
11
12
  };
12
13
 
13
14
  export { AreHTMLInstructions };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/instructions/AreHTML.instructions.constants.ts"],"names":[],"mappings":";;AAEO,MAAM,mBAAA,GAAsB;AAAA,EAC/B,UAAA,EAAY,qBAAA;AAAA,EACZ,OAAA,EAAS,kBAAA;AAAA,EACT,YAAA,EAAc,uBAAA;AAAA,EACd,QAAA,EAAU,mBAAA;AAAA,EACV,WAAA,EAAa,sBAAA;AAAA,EACb,gBAAA,EAAkB,2BAAA;AAAA,EAClB,UAAA,EAAY;AAChB","file":"AreHTML.instructions.constants.mjs","sourcesContent":["\n\nexport const AreHTMLInstructions = {\n AddElement: '_AreHTML_AddElement',\n AddText: '_AreHTML_AddText',\n AddAttribute: '_AreHTML_AddAttribute',\n AddStyle: '_AreHTML_AddStyle',\n AddListener: '_AreHTML_AddListener',\n AddInterpolation: '_AreHTML_AddInterpolation',\n AddComment: '_AreHTML_AddComment',\n} as const"]}
1
+ {"version":3,"sources":["../../../src/instructions/AreHTML.instructions.constants.ts"],"names":[],"mappings":";;AAEO,MAAM,mBAAA,GAAsB;AAAA,EAC/B,UAAA,EAAY,qBAAA;AAAA,EACZ,OAAA,EAAS,kBAAA;AAAA,EACT,YAAA,EAAc,uBAAA;AAAA,EACd,QAAA,EAAU,mBAAA;AAAA,EACV,WAAA,EAAa,sBAAA;AAAA,EACb,gBAAA,EAAkB,2BAAA;AAAA,EAClB,UAAA,EAAY,qBAAA;AAAA,EACZ,WAAA,EAAa;AACjB","file":"AreHTML.instructions.constants.mjs","sourcesContent":["\n\nexport const AreHTMLInstructions = {\n AddElement: '_AreHTML_AddElement',\n AddText: '_AreHTML_AddText',\n AddAttribute: '_AreHTML_AddAttribute',\n AddStyle: '_AreHTML_AddStyle',\n AddListener: '_AreHTML_AddListener',\n AddInterpolation: '_AreHTML_AddInterpolation',\n AddComment: '_AreHTML_AddComment',\n HideElement: '_AreHTML_HideElement',\n} as const"]}
@@ -28,6 +28,14 @@ type AreHtmlAddStyleInstructionPayload = {
28
28
  /** Full CSS string to inject as a <style> block scoped to the component. Applied to the document head and reverted on unmount. */
29
29
  styles: string;
30
30
  };
31
+ type AreHtmlHideInstructionPayload = {
32
+ /**
33
+ * Optional explicit display value to restore when the element becomes
34
+ * visible again. When omitted, the interpreter caches and restores the
35
+ * element's own prior inline `display` value (Vue `v-show` semantics).
36
+ */
37
+ display?: string;
38
+ };
31
39
  type AreHtmlAddListenerInstructionPayload = {
32
40
  /** DOM event name (e.g. "click", "input", "submit") */
33
41
  name: string;
@@ -41,4 +49,4 @@ type AreHtmlAddInterpolationInstructionPayload = {
41
49
  content: (...args: any[]) => string;
42
50
  };
43
51
 
44
- export type { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload };
52
+ export type { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload, AreHtmlHideInstructionPayload };
@@ -28,6 +28,14 @@ type AreHtmlAddStyleInstructionPayload = {
28
28
  /** Full CSS string to inject as a <style> block scoped to the component. Applied to the document head and reverted on unmount. */
29
29
  styles: string;
30
30
  };
31
+ type AreHtmlHideInstructionPayload = {
32
+ /**
33
+ * Optional explicit display value to restore when the element becomes
34
+ * visible again. When omitted, the interpreter caches and restores the
35
+ * element's own prior inline `display` value (Vue `v-show` semantics).
36
+ */
37
+ display?: string;
38
+ };
31
39
  type AreHtmlAddListenerInstructionPayload = {
32
40
  /** DOM event name (e.g. "click", "input", "submit") */
33
41
  name: string;
@@ -41,4 +49,4 @@ type AreHtmlAddInterpolationInstructionPayload = {
41
49
  content: (...args: any[]) => string;
42
50
  };
43
51
 
44
- export type { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload };
52
+ export type { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload, AreHtmlHideInstructionPayload };
@@ -0,0 +1,13 @@
1
+ import { AreMutation, AreDeclaration, AreInstructionSerialized } from '@adaas/are';
2
+ import { AreHtmlHideInstructionPayload } from './AreHTML.instructions.types.mjs';
3
+
4
+ declare class HideElementInstruction extends AreMutation<AreHtmlHideInstructionPayload> {
5
+ /**
6
+ * Caches the element's inline `display` value captured at apply time so it
7
+ * can be restored verbatim on revert (mirrors Vue `v-show`).
8
+ */
9
+ cache?: string;
10
+ constructor(parent: AreDeclaration, props: AreHtmlHideInstructionPayload | AreInstructionSerialized<AreHtmlHideInstructionPayload>);
11
+ }
12
+
13
+ export { HideElementInstruction };
@@ -0,0 +1,13 @@
1
+ import { AreMutation, AreDeclaration, AreInstructionSerialized } from '@adaas/are';
2
+ import { AreHtmlHideInstructionPayload } from './AreHTML.instructions.types.js';
3
+
4
+ declare class HideElementInstruction extends AreMutation<AreHtmlHideInstructionPayload> {
5
+ /**
6
+ * Caches the element's inline `display` value captured at apply time so it
7
+ * can be restored verbatim on revert (mirrors Vue `v-show`).
8
+ */
9
+ cache?: string;
10
+ constructor(parent: AreDeclaration, props: AreHtmlHideInstructionPayload | AreInstructionSerialized<AreHtmlHideInstructionPayload>);
11
+ }
12
+
13
+ export { HideElementInstruction };
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ var core = require('@adaas/a-frame/core');
4
+ var are = require('@adaas/are');
5
+ var AreHTML_instructions_constants = require('./AreHTML.instructions.constants');
6
+
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __decorateClass = (decorators, target, key, kind) => {
9
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
10
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11
+ if (decorator = decorators[i])
12
+ result = (decorator(result)) || result;
13
+ return result;
14
+ };
15
+ exports.HideElementInstruction = class HideElementInstruction extends are.AreMutation {
16
+ constructor(parent, props) {
17
+ if ("aseid" in props) {
18
+ super(props);
19
+ } else {
20
+ super(AreHTML_instructions_constants.AreHTMLInstructions.HideElement, parent, props);
21
+ }
22
+ }
23
+ };
24
+ exports.HideElementInstruction = __decorateClass([
25
+ core.A_Frame.Define({
26
+ namespace: "a-are-html",
27
+ description: 'Toggles the visibility of an existing element by setting its inline display to "none" on apply and restoring the previous inline display on revert. Used by the $show directive to hide/show an element without unmounting it, preserving its subtree, listeners and scene state.'
28
+ })
29
+ ], exports.HideElementInstruction);
30
+ //# sourceMappingURL=HideElement.instruction.js.map
31
+ //# sourceMappingURL=HideElement.instruction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/instructions/HideElement.instruction.ts"],"names":["HideElementInstruction","AreMutation","AreHTMLInstructions","A_Frame"],"mappings":";;;;;;;;;;;;;;AAUaA,8BAAA,GAAN,qCAAqCC,eAAA,CAA2C;AAAA,EAQnF,WAAA,CACI,QACA,KAAA,EACF;AACE,IAAA,IAAI,WAAW,KAAA,EAAO;AAClB,MAAA,KAAA,CAAM,KAAgE,CAAA;AAAA,IAC1E,CAAA,MAAO;AACH,MAAA,KAAA,CAAMC,kDAAA,CAAoB,WAAA,EAAa,MAAA,EAAQ,KAAK,CAAA;AAAA,IACxD;AAAA,EACJ;AACJ;AAlBaF,8BAAA,GAAN,eAAA,CAAA;AAAA,EAJNG,aAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACYH,8BAAA,CAAA","file":"HideElement.instruction.js","sourcesContent":["import { A_Frame } from \"@adaas/a-frame/core\"\nimport { AreDeclaration, AreMutation, AreInstructionSerialized } from \"@adaas/are\";\nimport { AreHtmlHideInstructionPayload } from \"./AreHTML.instructions.types\";\nimport { AreHTMLInstructions } from \"./AreHTML.instructions.constants\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'Toggles the visibility of an existing element by setting its inline display to \"none\" on apply and restoring the previous inline display on revert. Used by the $show directive to hide/show an element without unmounting it, preserving its subtree, listeners and scene state.'\n})\nexport class HideElementInstruction extends AreMutation<AreHtmlHideInstructionPayload> {\n\n /**\n * Caches the element's inline `display` value captured at apply time so it\n * can be restored verbatim on revert (mirrors Vue `v-show`).\n */\n cache?: string;\n\n constructor(\n parent: AreDeclaration,\n props: AreHtmlHideInstructionPayload | AreInstructionSerialized<AreHtmlHideInstructionPayload>\n ) {\n if ('aseid' in props) {\n super(props as AreInstructionSerialized<AreHtmlHideInstructionPayload>);\n } else {\n super(AreHTMLInstructions.HideElement, parent, props);\n }\n }\n}\n"]}
@@ -0,0 +1,24 @@
1
+ import { __decorateClass } from '../chunk-EQQGB2QZ.mjs';
2
+ import { A_Frame } from '@adaas/a-frame/core';
3
+ import { AreMutation } from '@adaas/are';
4
+ import { AreHTMLInstructions } from './AreHTML.instructions.constants';
5
+
6
+ let HideElementInstruction = class extends AreMutation {
7
+ constructor(parent, props) {
8
+ if ("aseid" in props) {
9
+ super(props);
10
+ } else {
11
+ super(AreHTMLInstructions.HideElement, parent, props);
12
+ }
13
+ }
14
+ };
15
+ HideElementInstruction = __decorateClass([
16
+ A_Frame.Define({
17
+ namespace: "a-are-html",
18
+ description: 'Toggles the visibility of an existing element by setting its inline display to "none" on apply and restoring the previous inline display on revert. Used by the $show directive to hide/show an element without unmounting it, preserving its subtree, listeners and scene state.'
19
+ })
20
+ ], HideElementInstruction);
21
+
22
+ export { HideElementInstruction };
23
+ //# sourceMappingURL=HideElement.instruction.mjs.map
24
+ //# sourceMappingURL=HideElement.instruction.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/instructions/HideElement.instruction.ts"],"names":[],"mappings":";;;;;AAUO,IAAM,sBAAA,GAAN,cAAqC,WAAA,CAA2C;AAAA,EAQnF,WAAA,CACI,QACA,KAAA,EACF;AACE,IAAA,IAAI,WAAW,KAAA,EAAO;AAClB,MAAA,KAAA,CAAM,KAAgE,CAAA;AAAA,IAC1E,CAAA,MAAO;AACH,MAAA,KAAA,CAAM,mBAAA,CAAoB,WAAA,EAAa,MAAA,EAAQ,KAAK,CAAA;AAAA,IACxD;AAAA,EACJ;AACJ;AAlBa,sBAAA,GAAN,eAAA,CAAA;AAAA,EAJN,QAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACY,sBAAA,CAAA","file":"HideElement.instruction.mjs","sourcesContent":["import { A_Frame } from \"@adaas/a-frame/core\"\nimport { AreDeclaration, AreMutation, AreInstructionSerialized } from \"@adaas/are\";\nimport { AreHtmlHideInstructionPayload } from \"./AreHTML.instructions.types\";\nimport { AreHTMLInstructions } from \"./AreHTML.instructions.constants\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'Toggles the visibility of an existing element by setting its inline display to \"none\" on apply and restoring the previous inline display on revert. Used by the $show directive to hide/show an element without unmounting it, preserving its subtree, listeners and scene state.'\n})\nexport class HideElementInstruction extends AreMutation<AreHtmlHideInstructionPayload> {\n\n /**\n * Caches the element's inline `display` value captured at apply time so it\n * can be restored verbatim on revert (mirrors Vue `v-show`).\n */\n cache?: string;\n\n constructor(\n parent: AreDeclaration,\n props: AreHtmlHideInstructionPayload | AreInstructionSerialized<AreHtmlHideInstructionPayload>\n ) {\n if ('aseid' in props) {\n super(props as AreInstructionSerialized<AreHtmlHideInstructionPayload>);\n } else {\n super(AreHTMLInstructions.HideElement, parent, props);\n }\n }\n}\n"]}
@@ -1,10 +1,64 @@
1
+ import { A_TYPES__Ctor } from '@adaas/a-concept';
1
2
  import { A_Logger } from '@adaas/a-utils/a-logger';
2
- import { A_SignalVector } from '@adaas/a-utils/a-signal';
3
+ import { A_SignalState, A_SignalVector } from '@adaas/a-utils/a-signal';
3
4
  import { Are, AreNode, AreSignalsContext } from '@adaas/are';
5
+ import { AreRootCache, AreRootCacheEntry } from './AreRootCache.context.mjs';
4
6
 
5
7
  declare class AreRoot extends Are {
6
- template(root: AreNode, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
7
- onSignal(root: AreNode, vector: A_SignalVector, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
8
+ template(root: AreNode, logger: A_Logger, signalsContext?: AreSignalsContext, signalState?: A_SignalState): Promise<void>;
9
+ onSignal(root: AreNode, vector: A_SignalVector, logger: A_Logger, signalsContext?: AreSignalsContext, cache?: AreRootCache): Promise<void>;
10
+ /**
11
+ * Resolves the component a vector should render for the given root, mirroring
12
+ * the priority used everywhere in the routing system:
13
+ * 1. Root-specific conditions registered on AreSignalsContext.
14
+ * 2. The global AreSignalsMeta map, restricted to this outlet's pool.
15
+ *
16
+ * Passing the pool *into* the meta lookup is critical: without it, the first
17
+ * globally matching component wins and may belong to a different outlet
18
+ * (e.g. AisRequirementsPanel for the meta-outlet matching
19
+ * AisEditorCursorScope) — the pool check would then reject it and the outlet
20
+ * would fall back to its default, hiding a valid in-pool match (e.g.
21
+ * AisDiagramTab matching AisSetPrimaryDisplay).
22
+ *
23
+ * Returns `undefined` when nothing matches — callers decide whether to use a
24
+ * configured default, body content, or clear the outlet.
25
+ */
26
+ protected matchComponent(rootId: string, vector: A_SignalVector | undefined, signalsContext?: AreSignalsContext): A_TYPES__Ctor<Are> | undefined;
27
+ /**
28
+ * Builds the vector used for the INITIAL render. It is seeded from the
29
+ * accumulated signal state (every signal dispatched on the bus so far) so a
30
+ * freshly-mounted outlet reflects the live application state immediately,
31
+ * not just on the next signal tick. The current URL route is appended when
32
+ * no AreRoute is already present in the state, so route-driven outlets still
33
+ * resolve on the very first paint (before AreRouteWatcher has dispatched).
34
+ */
35
+ protected buildInitialVector(signalState?: A_SignalState): A_SignalVector;
36
+ /**
37
+ * Detach a displayed child subtree from the outlet and stash it in the cache
38
+ * for fast re-injection later. The subtree is unmounted (its scene plan is
39
+ * preserved) and deregistered from the root scope, but NOT destroyed. The
40
+ * nodes that were subscribed to the signal bus are unsubscribed while cached
41
+ * so the detached DOM never reacts to signals, and recorded so they can be
42
+ * re-subscribed verbatim on restore.
43
+ *
44
+ * When no cache is available, or the LRU evicts an entry, the affected
45
+ * subtree is fully destroyed.
46
+ */
47
+ protected stashChild(root: AreNode, child: AreNode, signalsContext: AreSignalsContext | undefined, cache: AreRootCache | undefined): void;
48
+ /**
49
+ * Re-attach a cached subtree to the outlet and re-mount it from its preserved
50
+ * scene plan, re-subscribing exactly the nodes that were subscribed before it
51
+ * was cached.
52
+ */
53
+ protected restoreChild(root: AreNode, entry: AreRootCacheEntry, signalsContext: AreSignalsContext | undefined): void;
54
+ /**
55
+ * Walk a subtree and collect the nodes currently registered as signal
56
+ * subscribers. Mirrors the subscription performed at init time in
57
+ * AreHTMLLifecycle (component nodes and root nodes) without depending on the
58
+ * concrete node classes — it simply intersects the subtree with the live
59
+ * subscriber registry.
60
+ */
61
+ protected collectSubscribers(node: AreNode, signalsContext: AreSignalsContext): AreNode[];
8
62
  }
9
63
 
10
64
  export { AreRoot };
@@ -1,10 +1,64 @@
1
+ import { A_TYPES__Ctor } from '@adaas/a-concept';
1
2
  import { A_Logger } from '@adaas/a-utils/a-logger';
2
- import { A_SignalVector } from '@adaas/a-utils/a-signal';
3
+ import { A_SignalState, A_SignalVector } from '@adaas/a-utils/a-signal';
3
4
  import { Are, AreNode, AreSignalsContext } from '@adaas/are';
5
+ import { AreRootCache, AreRootCacheEntry } from './AreRootCache.context.js';
4
6
 
5
7
  declare class AreRoot extends Are {
6
- template(root: AreNode, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
7
- onSignal(root: AreNode, vector: A_SignalVector, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
8
+ template(root: AreNode, logger: A_Logger, signalsContext?: AreSignalsContext, signalState?: A_SignalState): Promise<void>;
9
+ onSignal(root: AreNode, vector: A_SignalVector, logger: A_Logger, signalsContext?: AreSignalsContext, cache?: AreRootCache): Promise<void>;
10
+ /**
11
+ * Resolves the component a vector should render for the given root, mirroring
12
+ * the priority used everywhere in the routing system:
13
+ * 1. Root-specific conditions registered on AreSignalsContext.
14
+ * 2. The global AreSignalsMeta map, restricted to this outlet's pool.
15
+ *
16
+ * Passing the pool *into* the meta lookup is critical: without it, the first
17
+ * globally matching component wins and may belong to a different outlet
18
+ * (e.g. AisRequirementsPanel for the meta-outlet matching
19
+ * AisEditorCursorScope) — the pool check would then reject it and the outlet
20
+ * would fall back to its default, hiding a valid in-pool match (e.g.
21
+ * AisDiagramTab matching AisSetPrimaryDisplay).
22
+ *
23
+ * Returns `undefined` when nothing matches — callers decide whether to use a
24
+ * configured default, body content, or clear the outlet.
25
+ */
26
+ protected matchComponent(rootId: string, vector: A_SignalVector | undefined, signalsContext?: AreSignalsContext): A_TYPES__Ctor<Are> | undefined;
27
+ /**
28
+ * Builds the vector used for the INITIAL render. It is seeded from the
29
+ * accumulated signal state (every signal dispatched on the bus so far) so a
30
+ * freshly-mounted outlet reflects the live application state immediately,
31
+ * not just on the next signal tick. The current URL route is appended when
32
+ * no AreRoute is already present in the state, so route-driven outlets still
33
+ * resolve on the very first paint (before AreRouteWatcher has dispatched).
34
+ */
35
+ protected buildInitialVector(signalState?: A_SignalState): A_SignalVector;
36
+ /**
37
+ * Detach a displayed child subtree from the outlet and stash it in the cache
38
+ * for fast re-injection later. The subtree is unmounted (its scene plan is
39
+ * preserved) and deregistered from the root scope, but NOT destroyed. The
40
+ * nodes that were subscribed to the signal bus are unsubscribed while cached
41
+ * so the detached DOM never reacts to signals, and recorded so they can be
42
+ * re-subscribed verbatim on restore.
43
+ *
44
+ * When no cache is available, or the LRU evicts an entry, the affected
45
+ * subtree is fully destroyed.
46
+ */
47
+ protected stashChild(root: AreNode, child: AreNode, signalsContext: AreSignalsContext | undefined, cache: AreRootCache | undefined): void;
48
+ /**
49
+ * Re-attach a cached subtree to the outlet and re-mount it from its preserved
50
+ * scene plan, re-subscribing exactly the nodes that were subscribed before it
51
+ * was cached.
52
+ */
53
+ protected restoreChild(root: AreNode, entry: AreRootCacheEntry, signalsContext: AreSignalsContext | undefined): void;
54
+ /**
55
+ * Walk a subtree and collect the nodes currently registered as signal
56
+ * subscribers. Mirrors the subscription performed at init time in
57
+ * AreHTMLLifecycle (component nodes and root nodes) without depending on the
58
+ * concrete node classes — it simply intersects the subtree with the live
59
+ * subscriber registry.
60
+ */
61
+ protected collectSubscribers(node: AreNode, signalsContext: AreSignalsContext): AreNode[];
8
62
  }
9
63
 
10
64
  export { AreRoot };