@adaas/are-html 0.0.4 → 0.0.5

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 (42) hide show
  1. package/dist/browser/index.d.mts +11 -3
  2. package/dist/browser/index.mjs +42 -15
  3. package/dist/browser/index.mjs.map +1 -1
  4. package/dist/node/engine/AreHTML.compiler.js +10 -0
  5. package/dist/node/engine/AreHTML.compiler.js.map +1 -1
  6. package/dist/node/engine/AreHTML.compiler.mjs +10 -0
  7. package/dist/node/engine/AreHTML.compiler.mjs.map +1 -1
  8. package/dist/node/engine/AreHTML.constants.d.mts +10 -1
  9. package/dist/node/engine/AreHTML.constants.d.ts +10 -1
  10. package/dist/node/engine/AreHTML.constants.js +21 -0
  11. package/dist/node/engine/AreHTML.constants.js.map +1 -1
  12. package/dist/node/engine/AreHTML.constants.mjs +20 -1
  13. package/dist/node/engine/AreHTML.constants.mjs.map +1 -1
  14. package/dist/node/engine/AreHTML.engine.js +8 -0
  15. package/dist/node/engine/AreHTML.engine.js.map +1 -1
  16. package/dist/node/engine/AreHTML.engine.mjs +8 -0
  17. package/dist/node/engine/AreHTML.engine.mjs.map +1 -1
  18. package/dist/node/engine/AreHTML.interpreter.js +1 -0
  19. package/dist/node/engine/AreHTML.interpreter.js.map +1 -1
  20. package/dist/node/engine/AreHTML.interpreter.mjs +1 -0
  21. package/dist/node/engine/AreHTML.interpreter.mjs.map +1 -1
  22. package/dist/node/engine/AreHTML.lifecycle.d.mts +1 -2
  23. package/dist/node/engine/AreHTML.lifecycle.d.ts +1 -2
  24. package/dist/node/engine/AreHTML.lifecycle.js +2 -11
  25. package/dist/node/engine/AreHTML.lifecycle.js.map +1 -1
  26. package/dist/node/engine/AreHTML.lifecycle.mjs +2 -11
  27. package/dist/node/engine/AreHTML.lifecycle.mjs.map +1 -1
  28. package/dist/node/index.d.mts +1 -1
  29. package/dist/node/index.d.ts +1 -1
  30. package/dist/node/lib/AreRoot/AreRoot.component.js +2 -3
  31. package/dist/node/lib/AreRoot/AreRoot.component.js.map +1 -1
  32. package/dist/node/lib/AreRoot/AreRoot.component.mjs +2 -3
  33. package/dist/node/lib/AreRoot/AreRoot.component.mjs.map +1 -1
  34. package/examples/dashboard/dist/index.html +1 -1
  35. package/examples/dashboard/dist/{mpioi5ab-8c3oa9.js → mpm5e2oi-ghokyu.js} +8 -8
  36. package/package.json +1 -1
  37. package/src/engine/AreHTML.compiler.ts +19 -1
  38. package/src/engine/AreHTML.constants.ts +16 -0
  39. package/src/engine/AreHTML.engine.ts +10 -0
  40. package/src/engine/AreHTML.interpreter.ts +3 -0
  41. package/src/engine/AreHTML.lifecycle.ts +13 -12
  42. package/src/lib/AreRoot/AreRoot.component.ts +5 -6
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/engine/AreHTML.lifecycle.ts"],"names":["AreHTMLLifecycle","AreLifecycle","AreScene","AreDirectiveFeatures","A_FormatterHelper","AreComponentNode","A_Caller","A_Scope","AreHTMLEngineContext","A_Logger","AreRootNode","AreSignalsContext","AreText","AreInterpolation","A_Feature","AreAttributeFeatures","AreDirectiveAttribute","A_Frame"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkBaA,wBAAA,GAAN,+BAA+BC,gBAAA,CAAa;AAAA,EAG/C,aAAA,CACwB,IAAA,EACD,KAAA,EACa,OAAA,EACZ,WACjB,IAAA,EACC;AACJ,IAAA,KAAA,CAAM,KAAK,IAAA,EAAM,KAAA,EAAO,OAAA,EAAS,MAAA,EAAQ,GAAG,IAAI,CAAA;AAAA,EACpD;AAAA,EAIA,SACwB,IAAA,EACD,KAAA,EACa,OAAA,EACH,cAAA,EACT,WACjB,IAAA,EACC;AACJ,IAAA,cAAA,EAAgB,UAAU,IAAI,CAAA;AAC9B,IAAA,KAAA,CAAM,KAAK,IAAA,EAAM,KAAA,EAAO,OAAA,EAAS,MAAA,EAAQ,GAAG,IAAI,CAAA;AAAA,EACpD;AAAA,EAIA,QAAA,CACwB,IAAA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,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACYjB,wBAAA,CAAA","file":"AreHTML.lifecycle.js","sourcesContent":["import { A_Caller, A_Feature, A_FormatterHelper, A_Inject, A_Scope } from \"@adaas/a-concept\";\nimport { AreLifecycle, AreScene, AreAttributeFeatures, AreSignalsContext } from \"@adaas/are\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { AreComponentNode } from \"@adaas/are-html/nodes/AreComponent\";\nimport { AreRootNode } from \"@adaas/are-html/nodes/AreRoot\";\nimport { AreInterpolation } from \"@adaas/are-html/nodes/AreInterpolation\";\nimport { AreText } from \"@adaas/are-html/nodes/AreText\";\nimport { AreDirectiveAttribute } from \"@adaas/are-html/attributes/AreDirective.attribute\";\nimport { AreDirectiveFeatures } from \"@adaas/are-html/directive/AreDirective.constants\";\nimport { AreHTMLEngineContext } from \"./AreHTML.context\";\nimport { AreHTMLNode } from \"../lib/AreHTMLNode/AreHTMLNode\";\nimport { A_Frame } from \"@adaas/a-frame/core\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'HTML-specific lifecycle handler extending AreLifecycle. Wires DOM-aware init hooks for component nodes, root nodes, interpolations, text nodes, and directive attributes to the ARE rendering pipeline, connecting each entity to its HTML engine context and priming the scene for subsequent compilation and interpretation.'\n})\nexport class AreHTMLLifecycle extends AreLifecycle {\n\n @AreLifecycle.Init(AreComponentNode)\n initComponent(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n super.init(node, scope, context, logger, ...args);\n }\n\n\n @AreLifecycle.Init(AreRootNode)\n initRoot(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n signalsContext?.subscribe(node);\n super.init(node, scope, context, logger, ...args);\n }\n\n\n @AreLifecycle.Init(AreText)\n initText(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n const scene = new AreScene(node.aseid);\n\n scope.register(scene);\n }\n\n\n @AreLifecycle.Init(AreInterpolation)\n initInterpolation(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n const scene = new AreScene(node.aseid);\n\n scope.register(scene);\n }\n\n\n\n\n @A_Feature.Extend({\n name: AreAttributeFeatures.Update,\n scope: [AreDirectiveAttribute],\n })\n updateDirectiveAttribute(\n @A_Inject(A_Caller) directive: AreDirectiveAttribute,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(A_Feature) feature: A_Feature,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ) {\n /**\n * 3. If the attribute is a directive, then we should find a component that is responsible for\n * the directive compiling logic, and call it. \n * In case component is not found we just want to log a warning, \n * since the directive may be handled by some parent component or simply is a mistake in the template.\n */\n if (directive.component) {\n feature.chain(directive.component, AreDirectiveFeatures.Update, directive.owner.scope);\n } else {\n logger?.warning(`Directive handler component not found for directive: ${directive.name}. Make sure to create a component named \"AreDirective${A_FormatterHelper.toPascalCase(directive.name)}\" to handle this directive.`);\n }\n }\n\n}"]}
1
+ {"version":3,"sources":["../../../src/engine/AreHTML.lifecycle.ts"],"names":["AreHTMLLifecycle","AreLifecycle","AreScene","AreDirectiveFeatures","A_FormatterHelper","AreComponentNode","AreRootNode","A_Caller","A_Scope","AreHTMLEngineContext","AreSignalsContext","A_Logger","AreText","AreInterpolation","A_Feature","AreAttributeFeatures","AreDirectiveAttribute","A_Frame"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkBaA,wBAAA,GAAN,+BAA+BC,gBAAA,CAAa;AAAA,EAI/C,cACwB,IAAA,EACD,KAAA,EACa,OAAA,EACH,cAAA,EACT,WACjB,IAAA,EACC;AACJ,IAAA,cAAA,EAAgB,UAAU,IAAI,CAAA;AAC9B,IAAA,KAAA,CAAM,KAAK,IAAA,EAAM,KAAA,EAAO,OAAA,EAAS,MAAA,EAAQ,GAAG,IAAI,CAAA;AAAA,EACpD;AAAA,EAgBA,QAAA,CACwB,IAAA,EACD,KAAA,EACa,OAAA,EACZ,WACjB,IAAA,EACC;AACJ,IAAA,MAAM,KAAA,GAAQ,IAAIC,YAAA,CAAS,IAAA,CAAK,KAAK,CAAA;AAErC,IAAA,KAAA,CAAM,SAAS,KAAK,CAAA;AAAA,EACxB;AAAA,EAIA,iBAAA,CACwB,IAAA,EACD,KAAA,EACa,OAAA,EACZ,WACjB,IAAA,EACC;AACJ,IAAA,MAAM,KAAA,GAAQ,IAAIA,YAAA,CAAS,IAAA,CAAK,KAAK,CAAA;AAErC,IAAA,KAAA,CAAM,SAAS,KAAK,CAAA;AAAA,EACxB;AAAA,EASA,wBAAA,CACwB,SAAA,EACD,KAAA,EACE,OAAA,EACD,WACjB,IAAA,EACL;AAOE,IAAA,IAAI,UAAU,SAAA,EAAW;AACrB,MAAA,OAAA,CAAQ,MAAM,SAAA,CAAU,SAAA,EAAWC,4CAAqB,MAAA,EAAQ,SAAA,CAAU,MAAM,KAAK,CAAA;AAAA,IACzF,CAAA,MAAO;AACH,MAAA,MAAA,EAAQ,OAAA,CAAQ,CAAA,qDAAA,EAAwD,SAAA,CAAU,IAAI,CAAA,qDAAA,EAAwDC,2BAAkB,YAAA,CAAa,SAAA,CAAU,IAAI,CAAC,CAAA,2BAAA,C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,EAChB,qCAASM,kBAAS,CAAA,CAAA;AAAA,EAClB,qCAASH,gBAAQ,CAAA;AAAA,CAAA,EAnEbX,wBAAA,CA+DT,SAAA,EAAA,0BAAA,EAAA,CAAA,CAAA;AA/DSA,wBAAA,GAAN,eAAA,CAAA;AAAA,EAJNiB,aAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACYjB,wBAAA,CAAA","file":"AreHTML.lifecycle.js","sourcesContent":["import { A_Caller, A_Feature, A_FormatterHelper, A_Inject, A_Scope } from \"@adaas/a-concept\";\nimport { AreLifecycle, AreScene, AreAttributeFeatures, AreSignalsContext } from \"@adaas/are\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { AreComponentNode } from \"@adaas/are-html/nodes/AreComponent\";\nimport { AreRootNode } from \"@adaas/are-html/nodes/AreRoot\";\nimport { AreInterpolation } from \"@adaas/are-html/nodes/AreInterpolation\";\nimport { AreText } from \"@adaas/are-html/nodes/AreText\";\nimport { AreDirectiveAttribute } from \"@adaas/are-html/attributes/AreDirective.attribute\";\nimport { AreDirectiveFeatures } from \"@adaas/are-html/directive/AreDirective.constants\";\nimport { AreHTMLEngineContext } from \"./AreHTML.context\";\nimport { AreHTMLNode } from \"../lib/AreHTMLNode/AreHTMLNode\";\nimport { A_Frame } from \"@adaas/a-frame/core\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'HTML-specific lifecycle handler extending AreLifecycle. Wires DOM-aware init hooks for component nodes, root nodes, interpolations, text nodes, and directive attributes to the ARE rendering pipeline, connecting each entity to its HTML engine context and priming the scene for subsequent compilation and interpretation.'\n})\nexport class AreHTMLLifecycle extends AreLifecycle {\n\n @AreLifecycle.Init(AreComponentNode)\n @AreLifecycle.Init(AreRootNode)\n initComponent(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n signalsContext?.subscribe(node);\n super.init(node, scope, context, logger, ...args);\n }\n\n\n // initRoot(\n // @A_Inject(A_Caller) node: AreHTMLNode,\n // @A_Inject(A_Scope) scope: A_Scope,\n // @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n // @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n // @A_Inject(A_Logger) logger?: A_Logger,\n // ...args: any[]\n // ): void {\n // super.init(node, scope, context, logger, ...args);\n // }\n\n\n @AreLifecycle.Init(AreText)\n initText(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n const scene = new AreScene(node.aseid);\n\n scope.register(scene);\n }\n\n\n @AreLifecycle.Init(AreInterpolation)\n initInterpolation(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n const scene = new AreScene(node.aseid);\n\n scope.register(scene);\n }\n\n\n\n\n @A_Feature.Extend({\n name: AreAttributeFeatures.Update,\n scope: [AreDirectiveAttribute],\n })\n updateDirectiveAttribute(\n @A_Inject(A_Caller) directive: AreDirectiveAttribute,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(A_Feature) feature: A_Feature,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ) {\n /**\n * 3. If the attribute is a directive, then we should find a component that is responsible for\n * the directive compiling logic, and call it. \n * In case component is not found we just want to log a warning, \n * since the directive may be handled by some parent component or simply is a mistake in the template.\n */\n if (directive.component) {\n feature.chain(directive.component, AreDirectiveFeatures.Update, directive.owner.scope);\n } else {\n logger?.warning(`Directive handler component not found for directive: ${directive.name}. Make sure to create a component named \"AreDirective${A_FormatterHelper.toPascalCase(directive.name)}\" to handle this directive.`);\n }\n }\n\n}"]}
@@ -12,10 +12,7 @@ import { AreHTMLEngineContext } from './AreHTML.context';
12
12
  import { A_Frame } from '@adaas/a-frame/core';
13
13
 
14
14
  let AreHTMLLifecycle = class extends AreLifecycle {
15
- initComponent(node, scope, context, logger, ...args) {
16
- super.init(node, scope, context, logger, ...args);
17
- }
18
- initRoot(node, scope, context, signalsContext, logger, ...args) {
15
+ initComponent(node, scope, context, signalsContext, logger, ...args) {
19
16
  signalsContext?.subscribe(node);
20
17
  super.init(node, scope, context, logger, ...args);
21
18
  }
@@ -37,19 +34,13 @@ let AreHTMLLifecycle = class extends AreLifecycle {
37
34
  };
38
35
  __decorateClass([
39
36
  AreLifecycle.Init(AreComponentNode),
40
- __decorateParam(0, A_Inject(A_Caller)),
41
- __decorateParam(1, A_Inject(A_Scope)),
42
- __decorateParam(2, A_Inject(AreHTMLEngineContext)),
43
- __decorateParam(3, A_Inject(A_Logger))
44
- ], AreHTMLLifecycle.prototype, "initComponent", 1);
45
- __decorateClass([
46
37
  AreLifecycle.Init(AreRootNode),
47
38
  __decorateParam(0, A_Inject(A_Caller)),
48
39
  __decorateParam(1, A_Inject(A_Scope)),
49
40
  __decorateParam(2, A_Inject(AreHTMLEngineContext)),
50
41
  __decorateParam(3, A_Inject(AreSignalsContext)),
51
42
  __decorateParam(4, A_Inject(A_Logger))
52
- ], AreHTMLLifecycle.prototype, "initRoot", 1);
43
+ ], AreHTMLLifecycle.prototype, "initComponent", 1);
53
44
  __decorateClass([
54
45
  AreLifecycle.Init(AreText),
55
46
  __decorateParam(0, A_Inject(A_Caller)),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/engine/AreHTML.lifecycle.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAkBO,IAAM,gBAAA,GAAN,cAA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EAJC,UAAU,MAAA,CAAO;AAAA,IACd,MAAM,oBAAA,CAAqB,MAAA;AAAA,IAC3B,KAAA,EAAO,CAAC,qBAAqB;AAAA,GAChC,CAAA;AAAA,EAEI,4BAAS,QAAQ,CAAA,CAAA;AAAA,EACjB,4BAAS,OAAO,CAAA,CAAA;AAAA,EAChB,4BAAS,SAAS,CAAA,CAAA;AAAA,EAClB,4BAAS,QAAQ,CAAA;AAAA,CAAA,EAlEb,gBAAA,CA8DT,SAAA,EAAA,0BAAA,EAAA,CAAA,CAAA;AA9DS,gBAAA,GAAN,eAAA,CAAA;AAAA,EAJN,QAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACY,gBAAA,CAAA","file":"AreHTML.lifecycle.mjs","sourcesContent":["import { A_Caller, A_Feature, A_FormatterHelper, A_Inject, A_Scope } from \"@adaas/a-concept\";\nimport { AreLifecycle, AreScene, AreAttributeFeatures, AreSignalsContext } from \"@adaas/are\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { AreComponentNode } from \"@adaas/are-html/nodes/AreComponent\";\nimport { AreRootNode } from \"@adaas/are-html/nodes/AreRoot\";\nimport { AreInterpolation } from \"@adaas/are-html/nodes/AreInterpolation\";\nimport { AreText } from \"@adaas/are-html/nodes/AreText\";\nimport { AreDirectiveAttribute } from \"@adaas/are-html/attributes/AreDirective.attribute\";\nimport { AreDirectiveFeatures } from \"@adaas/are-html/directive/AreDirective.constants\";\nimport { AreHTMLEngineContext } from \"./AreHTML.context\";\nimport { AreHTMLNode } from \"../lib/AreHTMLNode/AreHTMLNode\";\nimport { A_Frame } from \"@adaas/a-frame/core\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'HTML-specific lifecycle handler extending AreLifecycle. Wires DOM-aware init hooks for component nodes, root nodes, interpolations, text nodes, and directive attributes to the ARE rendering pipeline, connecting each entity to its HTML engine context and priming the scene for subsequent compilation and interpretation.'\n})\nexport class AreHTMLLifecycle extends AreLifecycle {\n\n @AreLifecycle.Init(AreComponentNode)\n initComponent(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n super.init(node, scope, context, logger, ...args);\n }\n\n\n @AreLifecycle.Init(AreRootNode)\n initRoot(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n signalsContext?.subscribe(node);\n super.init(node, scope, context, logger, ...args);\n }\n\n\n @AreLifecycle.Init(AreText)\n initText(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n const scene = new AreScene(node.aseid);\n\n scope.register(scene);\n }\n\n\n @AreLifecycle.Init(AreInterpolation)\n initInterpolation(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n const scene = new AreScene(node.aseid);\n\n scope.register(scene);\n }\n\n\n\n\n @A_Feature.Extend({\n name: AreAttributeFeatures.Update,\n scope: [AreDirectiveAttribute],\n })\n updateDirectiveAttribute(\n @A_Inject(A_Caller) directive: AreDirectiveAttribute,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(A_Feature) feature: A_Feature,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ) {\n /**\n * 3. If the attribute is a directive, then we should find a component that is responsible for\n * the directive compiling logic, and call it. \n * In case component is not found we just want to log a warning, \n * since the directive may be handled by some parent component or simply is a mistake in the template.\n */\n if (directive.component) {\n feature.chain(directive.component, AreDirectiveFeatures.Update, directive.owner.scope);\n } else {\n logger?.warning(`Directive handler component not found for directive: ${directive.name}. Make sure to create a component named \"AreDirective${A_FormatterHelper.toPascalCase(directive.name)}\" to handle this directive.`);\n }\n }\n\n}"]}
1
+ {"version":3,"sources":["../../../src/engine/AreHTML.lifecycle.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAkBO,IAAM,gBAAA,GAAN,cAA+B,YAAA,CAAa;AAAA,EAI/C,cACwB,IAAA,EACD,KAAA,EACa,OAAA,EACH,cAAA,EACT,WACjB,IAAA,EACC;AACJ,IAAA,cAAA,EAAgB,UAAU,IAAI,CAAA;AAC9B,IAAA,KAAA,CAAM,KAAK,IAAA,EAAM,KAAA,EAAO,OAAA,EAAS,MAAA,EAAQ,GAAG,IAAI,CAAA;AAAA,EACpD;AAAA,EAgBA,QAAA,CACwB,IAAA,EACD,KAAA,EACa,OAAA,EACZ,WACjB,IAAA,EACC;AACJ,IAAA,MAAM,KAAA,GAAQ,IAAI,QAAA,CAAS,IAAA,CAAK,KAAK,CAAA;AAErC,IAAA,KAAA,CAAM,SAAS,KAAK,CAAA;AAAA,EACxB;AAAA,EAIA,iBAAA,CACwB,IAAA,EACD,KAAA,EACa,OAAA,EACZ,WACjB,IAAA,EACC;AACJ,IAAA,MAAM,KAAA,GAAQ,IAAI,QAAA,CAAS,IAAA,CAAK,KAAK,CAAA;AAErC,IAAA,KAAA,CAAM,SAAS,KAAK,CAAA;AAAA,EACxB;AAAA,EASA,wBAAA,CACwB,SAAA,EACD,KAAA,EACE,OAAA,EACD,WACjB,IAAA,EACL;AAOE,IAAA,IAAI,UAAU,SAAA,EAAW;AACrB,MAAA,OAAA,CAAQ,MAAM,SAAA,CAAU,SAAA,EAAW,qBAAqB,MAAA,EAA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AAAA,IACd,MAAM,oBAAA,CAAqB,MAAA;AAAA,IAC3B,KAAA,EAAO,CAAC,qBAAqB;AAAA,GAChC,CAAA;AAAA,EAEI,4BAAS,QAAQ,CAAA,CAAA;AAAA,EACjB,4BAAS,OAAO,CAAA,CAAA;AAAA,EAChB,4BAAS,SAAS,CAAA,CAAA;AAAA,EAClB,4BAAS,QAAQ,CAAA;AAAA,CAAA,EAnEb,gBAAA,CA+DT,SAAA,EAAA,0BAAA,EAAA,CAAA,CAAA;AA/DS,gBAAA,GAAN,eAAA,CAAA;AAAA,EAJN,QAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACY,gBAAA,CAAA","file":"AreHTML.lifecycle.mjs","sourcesContent":["import { A_Caller, A_Feature, A_FormatterHelper, A_Inject, A_Scope } from \"@adaas/a-concept\";\nimport { AreLifecycle, AreScene, AreAttributeFeatures, AreSignalsContext } from \"@adaas/are\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { AreComponentNode } from \"@adaas/are-html/nodes/AreComponent\";\nimport { AreRootNode } from \"@adaas/are-html/nodes/AreRoot\";\nimport { AreInterpolation } from \"@adaas/are-html/nodes/AreInterpolation\";\nimport { AreText } from \"@adaas/are-html/nodes/AreText\";\nimport { AreDirectiveAttribute } from \"@adaas/are-html/attributes/AreDirective.attribute\";\nimport { AreDirectiveFeatures } from \"@adaas/are-html/directive/AreDirective.constants\";\nimport { AreHTMLEngineContext } from \"./AreHTML.context\";\nimport { AreHTMLNode } from \"../lib/AreHTMLNode/AreHTMLNode\";\nimport { A_Frame } from \"@adaas/a-frame/core\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'HTML-specific lifecycle handler extending AreLifecycle. Wires DOM-aware init hooks for component nodes, root nodes, interpolations, text nodes, and directive attributes to the ARE rendering pipeline, connecting each entity to its HTML engine context and priming the scene for subsequent compilation and interpretation.'\n})\nexport class AreHTMLLifecycle extends AreLifecycle {\n\n @AreLifecycle.Init(AreComponentNode)\n @AreLifecycle.Init(AreRootNode)\n initComponent(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n signalsContext?.subscribe(node);\n super.init(node, scope, context, logger, ...args);\n }\n\n\n // initRoot(\n // @A_Inject(A_Caller) node: AreHTMLNode,\n // @A_Inject(A_Scope) scope: A_Scope,\n // @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n // @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n // @A_Inject(A_Logger) logger?: A_Logger,\n // ...args: any[]\n // ): void {\n // super.init(node, scope, context, logger, ...args);\n // }\n\n\n @AreLifecycle.Init(AreText)\n initText(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n const scene = new AreScene(node.aseid);\n\n scope.register(scene);\n }\n\n\n @AreLifecycle.Init(AreInterpolation)\n initInterpolation(\n @A_Inject(A_Caller) node: AreHTMLNode,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ): void {\n const scene = new AreScene(node.aseid);\n\n scope.register(scene);\n }\n\n\n\n\n @A_Feature.Extend({\n name: AreAttributeFeatures.Update,\n scope: [AreDirectiveAttribute],\n })\n updateDirectiveAttribute(\n @A_Inject(A_Caller) directive: AreDirectiveAttribute,\n @A_Inject(A_Scope) scope: A_Scope,\n @A_Inject(A_Feature) feature: A_Feature,\n @A_Inject(A_Logger) logger?: A_Logger,\n ...args: any[]\n ) {\n /**\n * 3. If the attribute is a directive, then we should find a component that is responsible for\n * the directive compiling logic, and call it. \n * In case component is not found we just want to log a warning, \n * since the directive may be handled by some parent component or simply is a mistake in the template.\n */\n if (directive.component) {\n feature.chain(directive.component, AreDirectiveFeatures.Update, directive.owner.scope);\n } else {\n logger?.warning(`Directive handler component not found for directive: ${directive.name}. Make sure to create a component named \"AreDirective${A_FormatterHelper.toPascalCase(directive.name)}\" to handle this directive.`);\n }\n }\n\n}"]}
@@ -15,7 +15,7 @@ export { AreInterpolation } from './nodes/AreInterpolation.mjs';
15
15
  export { AreRootNode } from './nodes/AreRoot.mjs';
16
16
  export { AreText } from './nodes/AreText.mjs';
17
17
  export { AreRoute } from './signals/AreRoute.signal.mjs';
18
- export { BOOLEAN_ATTRIBUTES, IDL_FORM_PROPERTIES, LISTENER_OPTION_MODIFIERS, ParsedEventName, isBooleanAttribute, isIDLFormProperty, normalizeClassValue, normalizeStyleValue, parseEventName, toDOMString } from './engine/AreHTML.constants.mjs';
18
+ export { BOOLEAN_ATTRIBUTES, IDL_FORM_PROPERTIES, LISTENER_OPTION_MODIFIERS, ParsedEventName, VOID_ELEMENTS, isBooleanAttribute, isIDLFormProperty, isVoidElement, normalizeClassValue, normalizeStyleValue, parseEventName, toDOMString } from './engine/AreHTML.constants.mjs';
19
19
  export { AreHTMLEngineContext } from './engine/AreHTML.context.mjs';
20
20
  export { AreHTMLContextConstructor } from './engine/AreHTML.types.mjs';
21
21
  export { AreHTMLCompiler } from './engine/AreHTML.compiler.mjs';
@@ -15,7 +15,7 @@ export { AreInterpolation } from './nodes/AreInterpolation.js';
15
15
  export { AreRootNode } from './nodes/AreRoot.js';
16
16
  export { AreText } from './nodes/AreText.js';
17
17
  export { AreRoute } from './signals/AreRoute.signal.js';
18
- export { BOOLEAN_ATTRIBUTES, IDL_FORM_PROPERTIES, LISTENER_OPTION_MODIFIERS, ParsedEventName, isBooleanAttribute, isIDLFormProperty, normalizeClassValue, normalizeStyleValue, parseEventName, toDOMString } from './engine/AreHTML.constants.js';
18
+ export { BOOLEAN_ATTRIBUTES, IDL_FORM_PROPERTIES, LISTENER_OPTION_MODIFIERS, ParsedEventName, VOID_ELEMENTS, isBooleanAttribute, isIDLFormProperty, isVoidElement, normalizeClassValue, normalizeStyleValue, parseEventName, toDOMString } from './engine/AreHTML.constants.js';
19
19
  export { AreHTMLEngineContext } from './engine/AreHTML.context.js';
20
20
  export { AreHTMLContextConstructor } from './engine/AreHTML.types.js';
21
21
  export { AreHTMLCompiler } from './engine/AreHTML.compiler.js';
@@ -46,8 +46,8 @@ exports.AreRoot = class AreRoot extends are.Are {
46
46
  }
47
47
  }
48
48
  if (!componentName) {
49
- const defaultAttr = root.attributes.find((attr) => attr.name === "default");
50
- componentName = defaultAttr?.content;
49
+ const defaultMatch = root.markup?.match(/\bdefault=["']([^"']*)["']/);
50
+ componentName = defaultMatch?.[1];
51
51
  }
52
52
  if (!componentName) {
53
53
  logger.warning('AreRoot: No component found for initial render. Please ensure a route condition or "default" attribute is set.');
@@ -56,7 +56,6 @@ exports.AreRoot = class AreRoot extends are.Are {
56
56
  root.setContent(`<${componentName}></${componentName}>`);
57
57
  }
58
58
  async onSignal(root, vector, store, logger, signalsContext) {
59
- console.log("Received signal vector in AreRoot:", root, vector);
60
59
  const rootId = root.id;
61
60
  if (signalsContext && !signalsContext.hasRoot(rootId)) {
62
61
  return;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/AreRoot/AreRoot.component.ts"],"names":["AreRoot","Are","AreRoute","A_SignalVector","A_Context","AreSignals","A_FormatterHelper","A_Caller","A_Logger","AreSignalsContext","AreStore","A_Frame"],"mappings":";;;;;;;;;;;;;;;;;;;AAWaA,eAAA,GAAN,sBAAsBC,OAAA,CAAI;AAAA,EAA1B,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AAEH,IAAA,IAAA,CAAA,KAAA,GAA2C;AAAA,MACvC,OAAA,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AAAA,GAChB;AAAA,CAAA,EACYX,eAAA,CAAA","file":"AreRoot.component.js","sourcesContent":["import { A_Caller, A_Context, A_FormatterHelper, A_Inject, } from \"@adaas/a-concept\";\nimport { A_Frame } from \"@adaas/a-frame/core\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { A_SignalVector } from \"@adaas/a-utils/a-signal\";\nimport { Are, ArePropDefinition, AreStore, AreNode, AreSignals, AreSignalsMeta, AreSignalsContext, AreRoute } from \"@adaas/are\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'The AreRoot component serves as the foundational entry point for the A-Concept Rendering Engine (ARE). It is responsible for initializing the rendering process, managing the root node of the component tree, and handling signal-based rendering logic. The AreRoot component processes incoming signals to determine which child components to render, allowing for dynamic and responsive UI updates based on application state and user interactions.'\n})\nexport class AreRoot extends Are {\n\n props: Record<string, ArePropDefinition> = {\n default: {\n type: 'string',\n default: '',\n }\n }\n\n\n @Are.Template\n async template(\n @A_Inject(A_Caller) root: AreNode,\n @A_Inject(A_Logger) logger: A_Logger,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n ) {\n\n const rootId = root.id;\n\n // No routing config for this root — leave the existing template content intact\n if (signalsContext && !signalsContext.hasRoot(rootId)) {\n return;\n }\n\n const currentRoute = AreRoute.default();\n\n let componentName: string | undefined;\n\n if (currentRoute) {\n const initialVector = new A_SignalVector([currentRoute]);\n\n // 1. Lookup via AreSignalsContext (per root-id conditions)\n let renderTarget = signalsContext?.findComponentByVector(rootId, initialVector);\n\n // 2. Fall back to global AreSignalsMeta\n if (!renderTarget) {\n const signalsMeta = A_Context.meta<AreSignalsMeta>(AreSignals);\n renderTarget = signalsMeta?.findComponentByVector(initialVector);\n }\n\n if (renderTarget?.name) {\n componentName = A_FormatterHelper.toKebabCase(renderTarget.name);\n }\n }\n\n // 3. Fall back to the 'default' attribute on the node directly\n // (store props are not yet compiled at template phase)\n if (!componentName) {\n const defaultAttr = root.attributes.find(attr => attr.name === 'default');\n componentName = defaultAttr?.content;\n }\n\n if (!componentName) {\n logger.warning('AreRoot: No component found for initial render. Please ensure a route condition or \"default\" attribute is set.');\n return;\n }\n\n root.setContent(`<${componentName}></${componentName}>`);\n }\n\n\n @Are.Signal\n async onSignal(\n @A_Inject(A_Caller) root: AreNode,\n @A_Inject(A_SignalVector) vector: A_SignalVector,\n @A_Inject(AreStore) store: AreStore<{ default: string }>,\n @A_Inject(A_Logger) logger: A_Logger,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n ) {\n console.log('Received signal vector in AreRoot:', root, vector);\n\n const rootId = root.id;\n // No routing config for this root — signals do not affect its content\n if (signalsContext && !signalsContext.hasRoot(rootId)) {\n return;\n }\n\n // 1. Try root-specific lookup via AreSignalsContext (keyed by the are-root's id attribute)\n let renderTarget = signalsContext?.findComponentByVector(rootId, vector);\n\n // 2. Fall back to global AreSignalsMeta lookup\n if (!renderTarget) {\n const signalsMeta = A_Context.meta<AreSignalsMeta>(AreSignals);\n renderTarget = signalsMeta?.findComponentByVector(vector);\n }\n\n const componentName = renderTarget?.name\n ? A_FormatterHelper.toKebabCase(renderTarget.name)\n : store.get('default');\n\n if (!componentName) {\n logger.warning('No component found for rendering in AreRoot. Please ensure that the signal vector matches at least one component or that a default component name is provided in the store.');\n return;\n }\n\n root.setContent(`<${componentName}></${componentName}>`);\n\n for (let i = 0; i < root.children.length; i++) {\n const child = root.children[i];\n child.unmount();\n child.destroy();\n root.removeChild(child);\n }\n\n\n root.tokenize();\n\n for (let i = 0; i < root.children.length; i++) {\n const child = root.children[i];\n child.init();\n\n const res = child.load();\n if (res instanceof Promise) {\n await res;\n }\n child.transform();\n\n child.compile();\n child.mount();\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../../src/lib/AreRoot/AreRoot.component.ts"],"names":["AreRoot","Are","AreRoute","A_SignalVector","A_Context","AreSignals","A_FormatterHelper","A_Caller","A_Logger","AreSignalsContext","AreStore","A_Frame"],"mappings":";;;;;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,EAJNW,aAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACYX,eAAA,CAAA","file":"AreRoot.component.js","sourcesContent":["import { A_Caller, A_Context, A_FormatterHelper, A_Inject, } from \"@adaas/a-concept\";\nimport { A_Frame } from \"@adaas/a-frame/core\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { A_SignalVector } from \"@adaas/a-utils/a-signal\";\nimport { Are, ArePropDefinition, AreStore, AreNode, AreSignals, AreSignalsMeta, AreSignalsContext, AreRoute } from \"@adaas/are\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'The AreRoot component serves as the foundational entry point for the A-Concept Rendering Engine (ARE). It is responsible for initializing the rendering process, managing the root node of the component tree, and handling signal-based rendering logic. The AreRoot component processes incoming signals to determine which child components to render, allowing for dynamic and responsive UI updates based on application state and user interactions.'\n})\nexport class AreRoot extends Are {\n\n props: Record<string, ArePropDefinition> = {\n default: {\n type: 'string',\n default: '',\n }\n }\n\n\n @Are.Template\n async template(\n @A_Inject(A_Caller) root: AreNode,\n @A_Inject(A_Logger) logger: A_Logger,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n ) {\n\n const rootId = root.id;\n\n // No routing config for this root — leave the existing template content intact\n if (signalsContext && !signalsContext.hasRoot(rootId)) {\n return;\n }\n\n const currentRoute = AreRoute.default();\n\n let componentName: string | undefined;\n\n if (currentRoute) {\n const initialVector = new A_SignalVector([currentRoute]);\n\n // 1. Lookup via AreSignalsContext (per root-id conditions)\n let renderTarget = signalsContext?.findComponentByVector(rootId, initialVector);\n\n // 2. Fall back to global AreSignalsMeta\n if (!renderTarget) {\n const signalsMeta = A_Context.meta<AreSignalsMeta>(AreSignals);\n renderTarget = signalsMeta?.findComponentByVector(initialVector);\n }\n\n if (renderTarget?.name) {\n componentName = A_FormatterHelper.toKebabCase(renderTarget.name);\n }\n }\n\n // 3. Fall back to the 'default' attribute on the node directly.\n // Note: root.attributes is NOT populated at this stage because tokenize()\n // runs after template() in the lifecycle. Read from raw markup instead.\n if (!componentName) {\n const defaultMatch = root.markup?.match(/\\bdefault=[\"']([^\"']*)[\"']/);\n componentName = defaultMatch?.[1];\n }\n\n if (!componentName) {\n logger.warning('AreRoot: No component found for initial render. Please ensure a route condition or \"default\" attribute is set.');\n return;\n }\n\n root.setContent(`<${componentName}></${componentName}>`);\n }\n\n\n @Are.Signal\n async onSignal(\n @A_Inject(A_Caller) root: AreNode,\n @A_Inject(A_SignalVector) vector: A_SignalVector,\n @A_Inject(AreStore) store: AreStore<{ default: string }>,\n @A_Inject(A_Logger) logger: A_Logger,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n ) {\n const rootId = root.id;\n // No routing config for this root — signals do not affect its content\n if (signalsContext && !signalsContext.hasRoot(rootId)) {\n return;\n }\n\n // 1. Try root-specific lookup via AreSignalsContext (keyed by the are-root's id attribute)\n let renderTarget = signalsContext?.findComponentByVector(rootId, vector);\n\n // 2. Fall back to global AreSignalsMeta lookup\n if (!renderTarget) {\n const signalsMeta = A_Context.meta<AreSignalsMeta>(AreSignals);\n renderTarget = signalsMeta?.findComponentByVector(vector);\n }\n\n const componentName = renderTarget?.name\n ? A_FormatterHelper.toKebabCase(renderTarget.name)\n : store.get('default');\n\n if (!componentName) {\n logger.warning('No component found for rendering in AreRoot. Please ensure that the signal vector matches at least one component or that a default component name is provided in the store.');\n return;\n }\n\n root.setContent(`<${componentName}></${componentName}>`);\n\n for (let i = 0; i < root.children.length; i++) {\n const child = root.children[i];\n child.unmount();\n child.destroy();\n root.removeChild(child);\n }\n\n\n root.tokenize();\n\n for (let i = 0; i < root.children.length; i++) {\n const child = root.children[i];\n child.init();\n\n const res = child.load();\n if (res instanceof Promise) {\n await res;\n }\n child.transform();\n\n child.compile();\n child.mount();\n }\n }\n}\n"]}
@@ -34,8 +34,8 @@ let AreRoot = class extends Are {
34
34
  }
35
35
  }
36
36
  if (!componentName) {
37
- const defaultAttr = root.attributes.find((attr) => attr.name === "default");
38
- componentName = defaultAttr?.content;
37
+ const defaultMatch = root.markup?.match(/\bdefault=["']([^"']*)["']/);
38
+ componentName = defaultMatch?.[1];
39
39
  }
40
40
  if (!componentName) {
41
41
  logger.warning('AreRoot: No component found for initial render. Please ensure a route condition or "default" attribute is set.');
@@ -44,7 +44,6 @@ let AreRoot = class extends Are {
44
44
  root.setContent(`<${componentName}></${componentName}>`);
45
45
  }
46
46
  async onSignal(root, vector, store, logger, signalsContext) {
47
- console.log("Received signal vector in AreRoot:", root, vector);
48
47
  const rootId = root.id;
49
48
  if (signalsContext && !signalsContext.hasRoot(rootId)) {
50
49
  return;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/AreRoot/AreRoot.component.ts"],"names":[],"mappings":";;;;;;;AAWO,IAAM,OAAA,GAAN,cAAsB,GAAA,CAAI;AAAA,EAA1B,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AAEH,IAAA,IAAA,CAAA,KAAA,GAA2C;AAAA,MACvC,OAAA,EAAS;AAAA,QACL,IAAA,EAAM,QAAA;AAAA,QACN,OAAA,EAAS;AAAA;AACb,KACJ;AAAA,EAAA;AAAA,EAIA,MAAM,QAAA,CACkB,IAAA,EACA,MAAA,EACS,cAAA,EAC/B;AAEE,IAAA,MAAM,SAAS,IAAA,CAAK,EAAA;AAGpB,IAAA,IAAI,cAAA,IAAkB,CAAC,cAAA,CAAe,OAAA,CAAQ,MAAM,CAAA,EAAG;AACnD,MAAA;AAAA,IACJ;AAEA,IAAA,MAAM,YAAA,GAAe,SAAS,OAAA,EAAQ;AAEtC,IAAA,IAAI,aAAA;AAEJ,IAAA,IAAI,YAAA,EAAc;AACd,MAAA,MAAM,aAAA,GAAgB,IAAI,cAAA,CAAe,CAAC,YAAY,CAAC,CAAA;AAGvD,MAAA,IAAI,YAAA,GAAe,cAAA,EAAgB,qBAAA,CAAsB,M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B;AAAA,EACJ;AACJ;AA9GU,eAAA,CAAA;AAAA,EADL,GAAA,CAAI,QAAA;AAAA,EAEA,4BAAS,QAAQ,CAAA,CAAA;AAAA,EACjB,4BAAS,QAAQ,CAAA,CAAA;AAAA,EACjB,4BAAS,iBAAiB,CAAA;AAAA,CAAA,EAdtB,OAAA,CAWH,SAAA,EAAA,UAAA,EAAA,CAAA,CAAA;AAmDA,eAAA,CAAA;AAAA,EADL,GAAA,CAAI,MAAA;AAAA,EAEA,4BAAS,QAAQ,CAAA,CAAA;AAAA,EACjB,4BAAS,cAAc,CAAA,CAAA;AAAA,EACvB,4BAAS,QAAQ,CAAA,CAAA;AAAA,EACjB,4BAAS,QAAQ,CAAA,CAAA;AAAA,EACjB,4BAAS,iBAAiB,CAAA;AAAA,CAAA,EAnEtB,OAAA,CA8DH,SAAA,EAAA,UAAA,EAAA,CAAA,CAAA;AA9DG,OAAA,GAAN,eAAA,CAAA;AAAA,EAJN,QAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACY,OAAA,CAAA","file":"AreRoot.component.mjs","sourcesContent":["import { A_Caller, A_Context, A_FormatterHelper, A_Inject, } from \"@adaas/a-concept\";\nimport { A_Frame } from \"@adaas/a-frame/core\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { A_SignalVector } from \"@adaas/a-utils/a-signal\";\nimport { Are, ArePropDefinition, AreStore, AreNode, AreSignals, AreSignalsMeta, AreSignalsContext, AreRoute } from \"@adaas/are\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'The AreRoot component serves as the foundational entry point for the A-Concept Rendering Engine (ARE). It is responsible for initializing the rendering process, managing the root node of the component tree, and handling signal-based rendering logic. The AreRoot component processes incoming signals to determine which child components to render, allowing for dynamic and responsive UI updates based on application state and user interactions.'\n})\nexport class AreRoot extends Are {\n\n props: Record<string, ArePropDefinition> = {\n default: {\n type: 'string',\n default: '',\n }\n }\n\n\n @Are.Template\n async template(\n @A_Inject(A_Caller) root: AreNode,\n @A_Inject(A_Logger) logger: A_Logger,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n ) {\n\n const rootId = root.id;\n\n // No routing config for this root — leave the existing template content intact\n if (signalsContext && !signalsContext.hasRoot(rootId)) {\n return;\n }\n\n const currentRoute = AreRoute.default();\n\n let componentName: string | undefined;\n\n if (currentRoute) {\n const initialVector = new A_SignalVector([currentRoute]);\n\n // 1. Lookup via AreSignalsContext (per root-id conditions)\n let renderTarget = signalsContext?.findComponentByVector(rootId, initialVector);\n\n // 2. Fall back to global AreSignalsMeta\n if (!renderTarget) {\n const signalsMeta = A_Context.meta<AreSignalsMeta>(AreSignals);\n renderTarget = signalsMeta?.findComponentByVector(initialVector);\n }\n\n if (renderTarget?.name) {\n componentName = A_FormatterHelper.toKebabCase(renderTarget.name);\n }\n }\n\n // 3. Fall back to the 'default' attribute on the node directly\n // (store props are not yet compiled at template phase)\n if (!componentName) {\n const defaultAttr = root.attributes.find(attr => attr.name === 'default');\n componentName = defaultAttr?.content;\n }\n\n if (!componentName) {\n logger.warning('AreRoot: No component found for initial render. Please ensure a route condition or \"default\" attribute is set.');\n return;\n }\n\n root.setContent(`<${componentName}></${componentName}>`);\n }\n\n\n @Are.Signal\n async onSignal(\n @A_Inject(A_Caller) root: AreNode,\n @A_Inject(A_SignalVector) vector: A_SignalVector,\n @A_Inject(AreStore) store: AreStore<{ default: string }>,\n @A_Inject(A_Logger) logger: A_Logger,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n ) {\n console.log('Received signal vector in AreRoot:', root, vector);\n\n const rootId = root.id;\n // No routing config for this root — signals do not affect its content\n if (signalsContext && !signalsContext.hasRoot(rootId)) {\n return;\n }\n\n // 1. Try root-specific lookup via AreSignalsContext (keyed by the are-root's id attribute)\n let renderTarget = signalsContext?.findComponentByVector(rootId, vector);\n\n // 2. Fall back to global AreSignalsMeta lookup\n if (!renderTarget) {\n const signalsMeta = A_Context.meta<AreSignalsMeta>(AreSignals);\n renderTarget = signalsMeta?.findComponentByVector(vector);\n }\n\n const componentName = renderTarget?.name\n ? A_FormatterHelper.toKebabCase(renderTarget.name)\n : store.get('default');\n\n if (!componentName) {\n logger.warning('No component found for rendering in AreRoot. Please ensure that the signal vector matches at least one component or that a default component name is provided in the store.');\n return;\n }\n\n root.setContent(`<${componentName}></${componentName}>`);\n\n for (let i = 0; i < root.children.length; i++) {\n const child = root.children[i];\n child.unmount();\n child.destroy();\n root.removeChild(child);\n }\n\n\n root.tokenize();\n\n for (let i = 0; i < root.children.length; i++) {\n const child = root.children[i];\n child.init();\n\n const res = child.load();\n if (res instanceof Promise) {\n await res;\n }\n child.transform();\n\n child.compile();\n child.mount();\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../../src/lib/AreRoot/AreRoot.component.ts"],"names":[],"mappings":";;;;;;;AAWO,IAAM,OAAA,GAAN,cAAsB,GAAA,CAAI;AAAA,EAA1B,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AAEH,IAAA,IAAA,CAAA,KAAA,GAA2C;AAAA,MACvC,OAAA,EAAS;AAAA,QACL,IAAA,EAAM,QAAA;AAAA,QACN,OAAA,EAAS;AAAA;AACb,KACJ;AAAA,EAAA;AAAA,EAIA,MAAM,QAAA,CACkB,IAAA,EACA,MAAA,EACS,cAAA,EAC/B;AAEE,IAAA,MAAM,SAAS,IAAA,CAAK,EAAA;AAGpB,IAAA,IAAI,cAAA,IAAkB,CAAC,cAAA,CAAe,OAAA,CAAQ,MAAM,CAAA,EAAG;AACnD,MAAA;AAAA,IACJ;AAEA,IAAA,MAAM,YAAA,GAAe,SAAS,OAAA,EAAQ;AAEtC,IAAA,IAAI,aAAA;AAEJ,IAAA,IAAI,YAAA,EAAc;AACd,MAAA,MAAM,aAAA,GAAgB,IAAI,cAAA,CAAe,CAAC,YAAY,CAAC,CAAA;AAGvD,MA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L,GAAA,CAAI,QAAA;AAAA,EAEA,4BAAS,QAAQ,CAAA,CAAA;AAAA,EACjB,4BAAS,QAAQ,CAAA,CAAA;AAAA,EACjB,4BAAS,iBAAiB,CAAA;AAAA,CAAA,EAdtB,OAAA,CAWH,SAAA,EAAA,UAAA,EAAA,CAAA,CAAA;AAoDA,eAAA,CAAA;AAAA,EADL,GAAA,CAAI,MAAA;AAAA,EAEA,4BAAS,QAAQ,CAAA,CAAA;AAAA,EACjB,4BAAS,cAAc,CAAA,CAAA;AAAA,EACvB,4BAAS,QAAQ,CAAA,CAAA;AAAA,EACjB,4BAAS,QAAQ,CAAA,CAAA;AAAA,EACjB,4BAAS,iBAAiB,CAAA;AAAA,CAAA,EApEtB,OAAA,CA+DH,SAAA,EAAA,UAAA,EAAA,CAAA,CAAA;AA/DG,OAAA,GAAN,eAAA,CAAA;AAAA,EAJN,QAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACY,OAAA,CAAA","file":"AreRoot.component.mjs","sourcesContent":["import { A_Caller, A_Context, A_FormatterHelper, A_Inject, } from \"@adaas/a-concept\";\nimport { A_Frame } from \"@adaas/a-frame/core\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { A_SignalVector } from \"@adaas/a-utils/a-signal\";\nimport { Are, ArePropDefinition, AreStore, AreNode, AreSignals, AreSignalsMeta, AreSignalsContext, AreRoute } from \"@adaas/are\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'The AreRoot component serves as the foundational entry point for the A-Concept Rendering Engine (ARE). It is responsible for initializing the rendering process, managing the root node of the component tree, and handling signal-based rendering logic. The AreRoot component processes incoming signals to determine which child components to render, allowing for dynamic and responsive UI updates based on application state and user interactions.'\n})\nexport class AreRoot extends Are {\n\n props: Record<string, ArePropDefinition> = {\n default: {\n type: 'string',\n default: '',\n }\n }\n\n\n @Are.Template\n async template(\n @A_Inject(A_Caller) root: AreNode,\n @A_Inject(A_Logger) logger: A_Logger,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n ) {\n\n const rootId = root.id;\n\n // No routing config for this root — leave the existing template content intact\n if (signalsContext && !signalsContext.hasRoot(rootId)) {\n return;\n }\n\n const currentRoute = AreRoute.default();\n\n let componentName: string | undefined;\n\n if (currentRoute) {\n const initialVector = new A_SignalVector([currentRoute]);\n\n // 1. Lookup via AreSignalsContext (per root-id conditions)\n let renderTarget = signalsContext?.findComponentByVector(rootId, initialVector);\n\n // 2. Fall back to global AreSignalsMeta\n if (!renderTarget) {\n const signalsMeta = A_Context.meta<AreSignalsMeta>(AreSignals);\n renderTarget = signalsMeta?.findComponentByVector(initialVector);\n }\n\n if (renderTarget?.name) {\n componentName = A_FormatterHelper.toKebabCase(renderTarget.name);\n }\n }\n\n // 3. Fall back to the 'default' attribute on the node directly.\n // Note: root.attributes is NOT populated at this stage because tokenize()\n // runs after template() in the lifecycle. Read from raw markup instead.\n if (!componentName) {\n const defaultMatch = root.markup?.match(/\\bdefault=[\"']([^\"']*)[\"']/);\n componentName = defaultMatch?.[1];\n }\n\n if (!componentName) {\n logger.warning('AreRoot: No component found for initial render. Please ensure a route condition or \"default\" attribute is set.');\n return;\n }\n\n root.setContent(`<${componentName}></${componentName}>`);\n }\n\n\n @Are.Signal\n async onSignal(\n @A_Inject(A_Caller) root: AreNode,\n @A_Inject(A_SignalVector) vector: A_SignalVector,\n @A_Inject(AreStore) store: AreStore<{ default: string }>,\n @A_Inject(A_Logger) logger: A_Logger,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n ) {\n const rootId = root.id;\n // No routing config for this root — signals do not affect its content\n if (signalsContext && !signalsContext.hasRoot(rootId)) {\n return;\n }\n\n // 1. Try root-specific lookup via AreSignalsContext (keyed by the are-root's id attribute)\n let renderTarget = signalsContext?.findComponentByVector(rootId, vector);\n\n // 2. Fall back to global AreSignalsMeta lookup\n if (!renderTarget) {\n const signalsMeta = A_Context.meta<AreSignalsMeta>(AreSignals);\n renderTarget = signalsMeta?.findComponentByVector(vector);\n }\n\n const componentName = renderTarget?.name\n ? A_FormatterHelper.toKebabCase(renderTarget.name)\n : store.get('default');\n\n if (!componentName) {\n logger.warning('No component found for rendering in AreRoot. Please ensure that the signal vector matches at least one component or that a default component name is provided in the store.');\n return;\n }\n\n root.setContent(`<${componentName}></${componentName}>`);\n\n for (let i = 0; i < root.children.length; i++) {\n const child = root.children[i];\n child.unmount();\n child.destroy();\n root.removeChild(child);\n }\n\n\n root.tokenize();\n\n for (let i = 0; i < root.children.length; i++) {\n const child = root.children[i];\n child.init();\n\n const res = child.load();\n if (res instanceof Promise) {\n await res;\n }\n child.transform();\n\n child.compile();\n child.mount();\n }\n }\n}\n"]}
@@ -16,7 +16,7 @@
16
16
  <dashboard-app></dashboard-app>
17
17
  </are-root>
18
18
 
19
- <script type="module" src="./mpioi5ab-8c3oa9.js"></script>
19
+ <script type="module" src="./mpm5e2oi-ghokyu.js"></script>
20
20
  </body>
21
21
 
22
22
  </html>
@@ -10846,7 +10846,7 @@ AreEngine = __decorateClass3([
10846
10846
  })
10847
10847
  ], AreEngine);
10848
10848
  var _a144;
10849
- var AreRouteWatcher = (_a144 = class extends v {
10849
+ var AreWatcher = (_a144 = class extends v {
10850
10850
  /**
10851
10851
  * Initialize the watcher. This method is called once when the watcher is first created. Use this to set up any necessary state or start observing changes.
10852
10852
  */
@@ -10859,16 +10859,16 @@ var AreRouteWatcher = (_a144 = class extends v {
10859
10859
  }
10860
10860
  destroy() {
10861
10861
  }
10862
- }, __name(_a144, "AreRouteWatcher"), _a144);
10862
+ }, __name(_a144, "AreWatcher"), _a144);
10863
10863
  __decorateClass3([
10864
10864
  Ce.Stop()
10865
- ], AreRouteWatcher.prototype, "destroy", 1);
10866
- AreRouteWatcher = __decorateClass3([
10865
+ ], AreWatcher.prototype, "destroy", 1);
10866
+ AreWatcher = __decorateClass3([
10867
10867
  A3.Define({
10868
10868
  namespace: "A-ARE",
10869
10869
  description: "Abstract base component that observes external changes and emits A_Signals to drive reactive updates within the ARE pipeline. Subclasses override init() to set up initial state and watch() to begin observing \u2014 for example, polling a data source, listening to DOM events, or subscribing to a store \u2014 and call the appropriate signal methods to notify the engine when a re-render is needed."
10870
10870
  })
10871
- ], AreRouteWatcher);
10871
+ ], AreWatcher);
10872
10872
  var _a145;
10873
10873
  var _a146;
10874
10874
  var AreContainer = (_a146 = class extends A_Service {
@@ -10907,7 +10907,7 @@ __decorateClass3([
10907
10907
  __decorateParam3(1, ke(AreContext)),
10908
10908
  __decorateParam3(2, F.All()),
10909
10909
  __decorateParam3(2, F.Flat()),
10910
- __decorateParam3(2, ke(AreRouteWatcher)),
10910
+ __decorateParam3(2, ke(AreWatcher)),
10911
10911
  __decorateParam3(3, ke(A_Logger))
10912
10912
  ], AreContainer.prototype, _a145, 1);
10913
10913
  var _a147;
@@ -13537,8 +13537,8 @@ var AreRoot = class extends Are {
13537
13537
  }
13538
13538
  }
13539
13539
  if (!componentName) {
13540
- const defaultAttr = root.attributes.find((attr) => attr.name === "default");
13541
- componentName = defaultAttr?.content;
13540
+ const defaultMatch = root.markup?.match(/\bdefault=["']([^"']*)["']/);
13541
+ componentName = defaultMatch?.[1];
13542
13542
  }
13543
13543
  if (!componentName) {
13544
13544
  logger.warning('AreRoot: No component found for initial render. Please ensure a route condition or "default" attribute is set.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaas/are-html",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "A-Concept Rendering Engine (ARE) is a powerful rendering engine designed to work seamlessly with the A-Concept framework. This library provides an HTML engine implementation of ARE, enabling developers to create dynamic and interactive user interfaces for web applications using standard HTML syntax.",
5
5
  "keywords": [
6
6
  "a-concept",
@@ -101,8 +101,26 @@ export class AreHTMLCompiler extends AreCompiler {
101
101
  title: 'Scene Host Not Found',
102
102
  description: `No host found for the scene with id: ${scene.id}. Please ensure that the scene is properly initialized and has a host before compiling binding attributes.`
103
103
  });
104
+
105
+ const content = attribute.content;
106
+
107
+ /**
108
+ * If the attribute value contains {{ }} interpolations, transform them into
109
+ * a JS string-concatenation expression so the interpreter can evaluate them.
110
+ * e.g. "color:{{expr}}" → '"color:"+(expr)+""'
111
+ */
112
+ if (content.includes('{{')) {
113
+ const transformed = '"' + content.replace(/\{\{([^}]+)\}\}/g, '"+($1)+"') + '"';
114
+ scene.plan(new AddAttributeInstruction(scene.host, {
115
+ name: attribute.name,
116
+ content: transformed,
117
+ evaluate: true,
118
+ }));
119
+ return;
120
+ }
121
+
104
122
  /**
105
- * Default case when attribute was not able to be identified as a binding, directive, or event, we just want to add it as a regular attribute to the node. This is the most basic case for attributes that don't have any special behavior or processing logic, and it ensures that they are still rendered on the node even if they don't have any dynamic functionality.
123
+ * Default case: regular static attribute rendered as-is.
106
124
  */
107
125
  scene.plan(new AddAttributeInstruction(scene.host, {
108
126
  name: attribute.name,
@@ -1,3 +1,19 @@
1
+ /**
2
+ * Void HTML elements that cannot have children and must not have a closing tag.
3
+ * Per the HTML5 spec these are treated as self-closing even when written as
4
+ * `<input>` (without the trailing slash `/>`).
5
+ *
6
+ * Reference: https://html.spec.whatwg.org/multipage/syntax.html#void-elements
7
+ */
8
+ export const VOID_ELEMENTS = new Set<string>([
9
+ 'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input',
10
+ 'link', 'meta', 'param', 'source', 'track', 'wbr',
11
+ ]);
12
+
13
+ export function isVoidElement(tagName: string): boolean {
14
+ return VOID_ELEMENTS.has(tagName.toLowerCase());
15
+ }
16
+
1
17
  /**
2
18
  * Boolean HTML attributes whose presence (regardless of value) implies "true",
3
19
  * and whose absence implies "false". Setting these via `setAttribute(name, value)`
@@ -13,6 +13,7 @@ import { AreRootNode } from "@adaas/are-html/nodes/AreRoot";
13
13
  import { AreHTMLLifecycle } from "@adaas/are-html/lifecycle";
14
14
  import { AreHTMLTransformer } from "@adaas/are-html/transformer";
15
15
  import { AreHTMLCompiler } from "./AreHTML.compiler";
16
+ import { isVoidElement } from "./AreHTML.constants";
16
17
 
17
18
 
18
19
 
@@ -152,6 +153,15 @@ export class AreHTMLEngine extends AreEngine {
152
153
  return match
153
154
  }
154
155
 
156
+ // HTML5 void elements: <input>, <br>, <img>, etc. — treat as self-closing
157
+ if (isVoidElement(tagName)) {
158
+ const raw = source.slice(tagStart, openingTagEnd + 1)
159
+ const content = source.slice(tagStart + tagNameMatch[0].length, openingTagEnd)
160
+ const match = build(raw, content, tagStart, '>')
161
+ match.payload = { entity: tagName, selfClose: true, id }
162
+ return match
163
+ }
164
+
155
165
  // find matching closing tag respecting nesting
156
166
  const closingTag = `</${tagName}>`
157
167
  let level = 0
@@ -337,6 +337,9 @@ export class AreHTMLInterpreter extends AreInterpreter {
337
337
  event.set('args', effectiveArgs);
338
338
  event.set('element', element);
339
339
  event.set('instruction', mutation);
340
+ // Expose the raw DOM event under the conventional 'native' key so that
341
+ // event handlers can do: event.get('native')?.target as HTMLInputElement
342
+ if (liveEvent) event.set('native', liveEvent as any);
340
343
  mutation.owner.emit(event);
341
344
  };
342
345
  handlerScope[`$${handler}`] = handlerFn;
@@ -19,19 +19,8 @@ import { A_Frame } from "@adaas/a-frame/core";
19
19
  export class AreHTMLLifecycle extends AreLifecycle {
20
20
 
21
21
  @AreLifecycle.Init(AreComponentNode)
22
- initComponent(
23
- @A_Inject(A_Caller) node: AreHTMLNode,
24
- @A_Inject(A_Scope) scope: A_Scope,
25
- @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,
26
- @A_Inject(A_Logger) logger?: A_Logger,
27
- ...args: any[]
28
- ): void {
29
- super.init(node, scope, context, logger, ...args);
30
- }
31
-
32
-
33
22
  @AreLifecycle.Init(AreRootNode)
34
- initRoot(
23
+ initComponent(
35
24
  @A_Inject(A_Caller) node: AreHTMLNode,
36
25
  @A_Inject(A_Scope) scope: A_Scope,
37
26
  @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,
@@ -44,6 +33,18 @@ export class AreHTMLLifecycle extends AreLifecycle {
44
33
  }
45
34
 
46
35
 
36
+ // initRoot(
37
+ // @A_Inject(A_Caller) node: AreHTMLNode,
38
+ // @A_Inject(A_Scope) scope: A_Scope,
39
+ // @A_Inject(AreHTMLEngineContext) context: AreHTMLEngineContext,
40
+ // @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,
41
+ // @A_Inject(A_Logger) logger?: A_Logger,
42
+ // ...args: any[]
43
+ // ): void {
44
+ // super.init(node, scope, context, logger, ...args);
45
+ // }
46
+
47
+
47
48
  @AreLifecycle.Init(AreText)
48
49
  initText(
49
50
  @A_Inject(A_Caller) node: AreHTMLNode,
@@ -54,11 +54,12 @@ export class AreRoot extends Are {
54
54
  }
55
55
  }
56
56
 
57
- // 3. Fall back to the 'default' attribute on the node directly
58
- // (store props are not yet compiled at template phase)
57
+ // 3. Fall back to the 'default' attribute on the node directly.
58
+ // Note: root.attributes is NOT populated at this stage because tokenize()
59
+ // runs after template() in the lifecycle. Read from raw markup instead.
59
60
  if (!componentName) {
60
- const defaultAttr = root.attributes.find(attr => attr.name === 'default');
61
- componentName = defaultAttr?.content;
61
+ const defaultMatch = root.markup?.match(/\bdefault=["']([^"']*)["']/);
62
+ componentName = defaultMatch?.[1];
62
63
  }
63
64
 
64
65
  if (!componentName) {
@@ -78,8 +79,6 @@ export class AreRoot extends Are {
78
79
  @A_Inject(A_Logger) logger: A_Logger,
79
80
  @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,
80
81
  ) {
81
- console.log('Received signal vector in AreRoot:', root, vector);
82
-
83
82
  const rootId = root.id;
84
83
  // No routing config for this root — signals do not affect its content
85
84
  if (signalsContext && !signalsContext.hasRoot(rootId)) {