@adaas/are 0.0.2

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 (485) hide show
  1. package/.conf/tsconfig.base.json +110 -0
  2. package/.conf/tsconfig.browser.json +43 -0
  3. package/.conf/tsconfig.node.json +47 -0
  4. package/.nvmrc +1 -0
  5. package/LICENSE +22 -0
  6. package/README.md +2 -0
  7. package/dist/browser/index.d.mts +1134 -0
  8. package/dist/browser/index.mjs +2624 -0
  9. package/dist/browser/index.mjs.map +1 -0
  10. package/dist/node/chunk-EQQGB2QZ.mjs +15 -0
  11. package/dist/node/chunk-EQQGB2QZ.mjs.map +1 -0
  12. package/dist/node/engines/html/AreHTML.compiler.d.mts +114 -0
  13. package/dist/node/engines/html/AreHTML.compiler.d.ts +114 -0
  14. package/dist/node/engines/html/AreHTML.compiler.js +408 -0
  15. package/dist/node/engines/html/AreHTML.compiler.js.map +1 -0
  16. package/dist/node/engines/html/AreHTML.compiler.mjs +398 -0
  17. package/dist/node/engines/html/AreHTML.compiler.mjs.map +1 -0
  18. package/dist/node/engines/html/AreHTML.engine.d.mts +36 -0
  19. package/dist/node/engines/html/AreHTML.engine.d.ts +36 -0
  20. package/dist/node/engines/html/AreHTML.engine.js +122 -0
  21. package/dist/node/engines/html/AreHTML.engine.js.map +1 -0
  22. package/dist/node/engines/html/AreHTML.engine.mjs +112 -0
  23. package/dist/node/engines/html/AreHTML.engine.mjs.map +1 -0
  24. package/dist/node/engines/html/index.d.mts +26 -0
  25. package/dist/node/engines/html/index.d.ts +26 -0
  26. package/dist/node/engines/html/index.js +17 -0
  27. package/dist/node/engines/html/index.js.map +1 -0
  28. package/dist/node/engines/html/index.mjs +5 -0
  29. package/dist/node/engines/html/index.mjs.map +1 -0
  30. package/dist/node/engines/json/AreJSON.compiler.d.mts +21 -0
  31. package/dist/node/engines/json/AreJSON.compiler.d.ts +21 -0
  32. package/dist/node/engines/json/AreJSON.compiler.js +24 -0
  33. package/dist/node/engines/json/AreJSON.compiler.js.map +1 -0
  34. package/dist/node/engines/json/AreJSON.compiler.mjs +17 -0
  35. package/dist/node/engines/json/AreJSON.compiler.mjs.map +1 -0
  36. package/dist/node/index-BD-6iOuR.d.ts +238 -0
  37. package/dist/node/index-DMXWCL7R.d.mts +238 -0
  38. package/dist/node/index.d.mts +40 -0
  39. package/dist/node/index.d.ts +40 -0
  40. package/dist/node/index.js +105 -0
  41. package/dist/node/index.js.map +1 -0
  42. package/dist/node/index.mjs +16 -0
  43. package/dist/node/index.mjs.map +1 -0
  44. package/dist/node/lib/AreApp/AreApp.container.d.mts +22 -0
  45. package/dist/node/lib/AreApp/AreApp.container.d.ts +22 -0
  46. package/dist/node/lib/AreApp/AreApp.container.js +60 -0
  47. package/dist/node/lib/AreApp/AreApp.container.js.map +1 -0
  48. package/dist/node/lib/AreApp/AreApp.container.mjs +48 -0
  49. package/dist/node/lib/AreApp/AreApp.container.mjs.map +1 -0
  50. package/dist/node/lib/AreApp/AreApp.env.d.mts +2 -0
  51. package/dist/node/lib/AreApp/AreApp.env.d.ts +2 -0
  52. package/dist/node/lib/AreApp/AreApp.env.js +4 -0
  53. package/dist/node/lib/AreApp/AreApp.env.js.map +1 -0
  54. package/dist/node/lib/AreApp/AreApp.env.mjs +3 -0
  55. package/dist/node/lib/AreApp/AreApp.env.mjs.map +1 -0
  56. package/dist/node/lib/AreApp/AreApp.error.d.mts +6 -0
  57. package/dist/node/lib/AreApp/AreApp.error.d.ts +6 -0
  58. package/dist/node/lib/AreApp/AreApp.error.js +10 -0
  59. package/dist/node/lib/AreApp/AreApp.error.js.map +1 -0
  60. package/dist/node/lib/AreApp/AreApp.error.mjs +9 -0
  61. package/dist/node/lib/AreApp/AreApp.error.mjs.map +1 -0
  62. package/dist/node/lib/AreApp/AreApp.types.d.mts +2 -0
  63. package/dist/node/lib/AreApp/AreApp.types.d.ts +2 -0
  64. package/dist/node/lib/AreApp/AreApp.types.js +4 -0
  65. package/dist/node/lib/AreApp/AreApp.types.js.map +1 -0
  66. package/dist/node/lib/AreApp/AreApp.types.mjs +3 -0
  67. package/dist/node/lib/AreApp/AreApp.types.mjs.map +1 -0
  68. package/dist/node/lib/AreApp/index.d.mts +17 -0
  69. package/dist/node/lib/AreApp/index.d.ts +17 -0
  70. package/dist/node/lib/AreApp/index.js +24 -0
  71. package/dist/node/lib/AreApp/index.js.map +1 -0
  72. package/dist/node/lib/AreApp/index.mjs +6 -0
  73. package/dist/node/lib/AreApp/index.mjs.map +1 -0
  74. package/dist/node/lib/AreCompiler/AreCompiler.component.d.mts +238 -0
  75. package/dist/node/lib/AreCompiler/AreCompiler.component.d.ts +238 -0
  76. package/dist/node/lib/AreCompiler/AreCompiler.component.js +647 -0
  77. package/dist/node/lib/AreCompiler/AreCompiler.component.js.map +1 -0
  78. package/dist/node/lib/AreCompiler/AreCompiler.component.mjs +637 -0
  79. package/dist/node/lib/AreCompiler/AreCompiler.component.mjs.map +1 -0
  80. package/dist/node/lib/AreCompiler/AreCompiler.error.d.mts +8 -0
  81. package/dist/node/lib/AreCompiler/AreCompiler.error.d.ts +8 -0
  82. package/dist/node/lib/AreCompiler/AreCompiler.error.js +12 -0
  83. package/dist/node/lib/AreCompiler/AreCompiler.error.js.map +1 -0
  84. package/dist/node/lib/AreCompiler/AreCompiler.error.mjs +11 -0
  85. package/dist/node/lib/AreCompiler/AreCompiler.error.mjs.map +1 -0
  86. package/dist/node/lib/AreCompiler/AreCompiler.types.d.mts +2 -0
  87. package/dist/node/lib/AreCompiler/AreCompiler.types.d.ts +2 -0
  88. package/dist/node/lib/AreCompiler/AreCompiler.types.js +4 -0
  89. package/dist/node/lib/AreCompiler/AreCompiler.types.js.map +1 -0
  90. package/dist/node/lib/AreCompiler/AreCompiler.types.mjs +3 -0
  91. package/dist/node/lib/AreCompiler/AreCompiler.types.mjs.map +1 -0
  92. package/dist/node/lib/AreCompiler/index.d.mts +17 -0
  93. package/dist/node/lib/AreCompiler/index.d.ts +17 -0
  94. package/dist/node/lib/AreCompiler/index.js +24 -0
  95. package/dist/node/lib/AreCompiler/index.js.map +1 -0
  96. package/dist/node/lib/AreCompiler/index.mjs +6 -0
  97. package/dist/node/lib/AreCompiler/index.mjs.map +1 -0
  98. package/dist/node/lib/AreComponent/Are.component.d.mts +45 -0
  99. package/dist/node/lib/AreComponent/Are.component.d.ts +45 -0
  100. package/dist/node/lib/AreComponent/Are.component.js +165 -0
  101. package/dist/node/lib/AreComponent/Are.component.js.map +1 -0
  102. package/dist/node/lib/AreComponent/Are.component.mjs +156 -0
  103. package/dist/node/lib/AreComponent/Are.component.mjs.map +1 -0
  104. package/dist/node/lib/AreComponent/Are.constants.d.mts +32 -0
  105. package/dist/node/lib/AreComponent/Are.constants.d.ts +32 -0
  106. package/dist/node/lib/AreComponent/Are.constants.js +27 -0
  107. package/dist/node/lib/AreComponent/Are.constants.js.map +1 -0
  108. package/dist/node/lib/AreComponent/Are.constants.mjs +27 -0
  109. package/dist/node/lib/AreComponent/Are.constants.mjs.map +1 -0
  110. package/dist/node/lib/AreComponent/Are.context.d.mts +22 -0
  111. package/dist/node/lib/AreComponent/Are.context.d.ts +22 -0
  112. package/dist/node/lib/AreComponent/Are.context.js +45 -0
  113. package/dist/node/lib/AreComponent/Are.context.js.map +1 -0
  114. package/dist/node/lib/AreComponent/Are.context.mjs +38 -0
  115. package/dist/node/lib/AreComponent/Are.context.mjs.map +1 -0
  116. package/dist/node/lib/AreComponent/Are.types.d.mts +2 -0
  117. package/dist/node/lib/AreComponent/Are.types.d.ts +2 -0
  118. package/dist/node/lib/AreComponent/Are.types.js +4 -0
  119. package/dist/node/lib/AreComponent/Are.types.js.map +1 -0
  120. package/dist/node/lib/AreComponent/Are.types.mjs +3 -0
  121. package/dist/node/lib/AreComponent/Are.types.mjs.map +1 -0
  122. package/dist/node/lib/AreComponent/index.d.mts +11 -0
  123. package/dist/node/lib/AreComponent/index.d.ts +11 -0
  124. package/dist/node/lib/AreComponent/index.js +31 -0
  125. package/dist/node/lib/AreComponent/index.js.map +1 -0
  126. package/dist/node/lib/AreComponent/index.mjs +7 -0
  127. package/dist/node/lib/AreComponent/index.mjs.map +1 -0
  128. package/dist/node/lib/AreEvent/AreEvent.context.d.mts +8 -0
  129. package/dist/node/lib/AreEvent/AreEvent.context.d.ts +8 -0
  130. package/dist/node/lib/AreEvent/AreEvent.context.js +34 -0
  131. package/dist/node/lib/AreEvent/AreEvent.context.js.map +1 -0
  132. package/dist/node/lib/AreEvent/AreEvent.context.mjs +27 -0
  133. package/dist/node/lib/AreEvent/AreEvent.context.mjs.map +1 -0
  134. package/dist/node/lib/AreEvent/AreEvent.types.d.mts +16 -0
  135. package/dist/node/lib/AreEvent/AreEvent.types.d.ts +16 -0
  136. package/dist/node/lib/AreEvent/AreEvent.types.js +4 -0
  137. package/dist/node/lib/AreEvent/AreEvent.types.js.map +1 -0
  138. package/dist/node/lib/AreEvent/AreEvent.types.mjs +3 -0
  139. package/dist/node/lib/AreEvent/AreEvent.types.mjs.map +1 -0
  140. package/dist/node/lib/AreEvent/index.d.mts +8 -0
  141. package/dist/node/lib/AreEvent/index.d.ts +8 -0
  142. package/dist/node/lib/AreEvent/index.js +19 -0
  143. package/dist/node/lib/AreEvent/index.js.map +1 -0
  144. package/dist/node/lib/AreEvent/index.mjs +5 -0
  145. package/dist/node/lib/AreEvent/index.mjs.map +1 -0
  146. package/dist/node/lib/AreIndex/AreIndex.context.d.mts +8 -0
  147. package/dist/node/lib/AreIndex/AreIndex.context.d.ts +8 -0
  148. package/dist/node/lib/AreIndex/AreIndex.context.js +142 -0
  149. package/dist/node/lib/AreIndex/AreIndex.context.js.map +1 -0
  150. package/dist/node/lib/AreIndex/AreIndex.context.mjs +141 -0
  151. package/dist/node/lib/AreIndex/AreIndex.context.mjs.map +1 -0
  152. package/dist/node/lib/AreIndex/index.d.mts +8 -0
  153. package/dist/node/lib/AreIndex/index.d.ts +8 -0
  154. package/dist/node/lib/AreIndex/index.js +12 -0
  155. package/dist/node/lib/AreIndex/index.js.map +1 -0
  156. package/dist/node/lib/AreIndex/index.mjs +4 -0
  157. package/dist/node/lib/AreIndex/index.mjs.map +1 -0
  158. package/dist/node/lib/AreNode/AreNode.constants.d.mts +36 -0
  159. package/dist/node/lib/AreNode/AreNode.constants.d.ts +36 -0
  160. package/dist/node/lib/AreNode/AreNode.constants.js +17 -0
  161. package/dist/node/lib/AreNode/AreNode.constants.js.map +1 -0
  162. package/dist/node/lib/AreNode/AreNode.constants.mjs +17 -0
  163. package/dist/node/lib/AreNode/AreNode.constants.mjs.map +1 -0
  164. package/dist/node/lib/AreNode/AreNode.entity.d.mts +8 -0
  165. package/dist/node/lib/AreNode/AreNode.entity.d.ts +8 -0
  166. package/dist/node/lib/AreNode/AreNode.entity.js +164 -0
  167. package/dist/node/lib/AreNode/AreNode.entity.js.map +1 -0
  168. package/dist/node/lib/AreNode/AreNode.entity.mjs +157 -0
  169. package/dist/node/lib/AreNode/AreNode.entity.mjs.map +1 -0
  170. package/dist/node/lib/AreNode/AreNode.error.d.mts +2 -0
  171. package/dist/node/lib/AreNode/AreNode.error.d.ts +2 -0
  172. package/dist/node/lib/AreNode/AreNode.error.js +4 -0
  173. package/dist/node/lib/AreNode/AreNode.error.js.map +1 -0
  174. package/dist/node/lib/AreNode/AreNode.error.mjs +3 -0
  175. package/dist/node/lib/AreNode/AreNode.error.mjs.map +1 -0
  176. package/dist/node/lib/AreNode/AreNode.types.d.mts +13 -0
  177. package/dist/node/lib/AreNode/AreNode.types.d.ts +13 -0
  178. package/dist/node/lib/AreNode/AreNode.types.js +4 -0
  179. package/dist/node/lib/AreNode/AreNode.types.js.map +1 -0
  180. package/dist/node/lib/AreNode/AreNode.types.mjs +3 -0
  181. package/dist/node/lib/AreNode/AreNode.types.mjs.map +1 -0
  182. package/dist/node/lib/AreNode/index.d.mts +9 -0
  183. package/dist/node/lib/AreNode/index.d.ts +9 -0
  184. package/dist/node/lib/AreNode/index.js +26 -0
  185. package/dist/node/lib/AreNode/index.js.map +1 -0
  186. package/dist/node/lib/AreNode/index.mjs +6 -0
  187. package/dist/node/lib/AreNode/index.mjs.map +1 -0
  188. package/dist/node/lib/AreProps/AreProps.context.d.mts +9 -0
  189. package/dist/node/lib/AreProps/AreProps.context.d.ts +9 -0
  190. package/dist/node/lib/AreProps/AreProps.context.js +32 -0
  191. package/dist/node/lib/AreProps/AreProps.context.js.map +1 -0
  192. package/dist/node/lib/AreProps/AreProps.context.mjs +25 -0
  193. package/dist/node/lib/AreProps/AreProps.context.mjs.map +1 -0
  194. package/dist/node/lib/AreProps/index.d.mts +3 -0
  195. package/dist/node/lib/AreProps/index.d.ts +3 -0
  196. package/dist/node/lib/AreProps/index.js +12 -0
  197. package/dist/node/lib/AreProps/index.js.map +1 -0
  198. package/dist/node/lib/AreProps/index.mjs +4 -0
  199. package/dist/node/lib/AreProps/index.mjs.map +1 -0
  200. package/dist/node/lib/AreRoot/AreRoot.component.d.mts +18 -0
  201. package/dist/node/lib/AreRoot/AreRoot.component.d.ts +18 -0
  202. package/dist/node/lib/AreRoot/AreRoot.component.js +53 -0
  203. package/dist/node/lib/AreRoot/AreRoot.component.js.map +1 -0
  204. package/dist/node/lib/AreRoot/AreRoot.component.mjs +41 -0
  205. package/dist/node/lib/AreRoot/AreRoot.component.mjs.map +1 -0
  206. package/dist/node/lib/AreRoot/index.d.mts +11 -0
  207. package/dist/node/lib/AreRoot/index.d.ts +11 -0
  208. package/dist/node/lib/AreRoot/index.js +12 -0
  209. package/dist/node/lib/AreRoot/index.js.map +1 -0
  210. package/dist/node/lib/AreRoot/index.mjs +4 -0
  211. package/dist/node/lib/AreRoot/index.mjs.map +1 -0
  212. package/dist/node/lib/AreRouter/AreRouter.componeent.d.mts +17 -0
  213. package/dist/node/lib/AreRouter/AreRouter.componeent.d.ts +17 -0
  214. package/dist/node/lib/AreRouter/AreRouter.componeent.js +37 -0
  215. package/dist/node/lib/AreRouter/AreRouter.componeent.js.map +1 -0
  216. package/dist/node/lib/AreRouter/AreRouter.componeent.mjs +25 -0
  217. package/dist/node/lib/AreRouter/AreRouter.componeent.mjs.map +1 -0
  218. package/dist/node/lib/AreRouter/index.d.mts +12 -0
  219. package/dist/node/lib/AreRouter/index.d.ts +12 -0
  220. package/dist/node/lib/AreRouter/index.js +12 -0
  221. package/dist/node/lib/AreRouter/index.js.map +1 -0
  222. package/dist/node/lib/AreRouter/index.mjs +4 -0
  223. package/dist/node/lib/AreRouter/index.mjs.map +1 -0
  224. package/dist/node/lib/AreScene/AreScene.context.d.mts +8 -0
  225. package/dist/node/lib/AreScene/AreScene.context.d.ts +8 -0
  226. package/dist/node/lib/AreScene/AreScene.context.js +249 -0
  227. package/dist/node/lib/AreScene/AreScene.context.js.map +1 -0
  228. package/dist/node/lib/AreScene/AreScene.context.mjs +248 -0
  229. package/dist/node/lib/AreScene/AreScene.context.mjs.map +1 -0
  230. package/dist/node/lib/AreScene/AreScene.error.d.mts +14 -0
  231. package/dist/node/lib/AreScene/AreScene.error.d.ts +14 -0
  232. package/dist/node/lib/AreScene/AreScene.error.js +18 -0
  233. package/dist/node/lib/AreScene/AreScene.error.js.map +1 -0
  234. package/dist/node/lib/AreScene/AreScene.error.mjs +17 -0
  235. package/dist/node/lib/AreScene/AreScene.error.mjs.map +1 -0
  236. package/dist/node/lib/AreScene/AreScene.types.d.mts +9 -0
  237. package/dist/node/lib/AreScene/AreScene.types.d.ts +9 -0
  238. package/dist/node/lib/AreScene/AreScene.types.js +4 -0
  239. package/dist/node/lib/AreScene/AreScene.types.js.map +1 -0
  240. package/dist/node/lib/AreScene/AreScene.types.mjs +3 -0
  241. package/dist/node/lib/AreScene/AreScene.types.mjs.map +1 -0
  242. package/dist/node/lib/AreScene/index.d.mts +9 -0
  243. package/dist/node/lib/AreScene/index.d.ts +9 -0
  244. package/dist/node/lib/AreScene/index.js +24 -0
  245. package/dist/node/lib/AreScene/index.js.map +1 -0
  246. package/dist/node/lib/AreScene/index.mjs +6 -0
  247. package/dist/node/lib/AreScene/index.mjs.map +1 -0
  248. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.constants.d.mts +7 -0
  249. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.constants.d.ts +7 -0
  250. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.constants.js +12 -0
  251. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.constants.js.map +1 -0
  252. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.constants.mjs +12 -0
  253. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.constants.mjs.map +1 -0
  254. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.entity.d.mts +8 -0
  255. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.entity.d.ts +8 -0
  256. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.entity.js +95 -0
  257. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.entity.js.map +1 -0
  258. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.entity.mjs +94 -0
  259. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.entity.mjs.map +1 -0
  260. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.types.d.mts +8 -0
  261. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.types.d.ts +8 -0
  262. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.types.js +4 -0
  263. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.types.js.map +1 -0
  264. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.types.mjs +3 -0
  265. package/dist/node/lib/AreSceneInstruction/AreSceneInstruction.types.mjs.map +1 -0
  266. package/dist/node/lib/AreSceneInstruction/index.d.mts +19 -0
  267. package/dist/node/lib/AreSceneInstruction/index.d.ts +19 -0
  268. package/dist/node/lib/AreSceneInstruction/index.js +33 -0
  269. package/dist/node/lib/AreSceneInstruction/index.js.map +1 -0
  270. package/dist/node/lib/AreSceneInstruction/index.mjs +7 -0
  271. package/dist/node/lib/AreSceneInstruction/index.mjs.map +1 -0
  272. package/dist/node/lib/AreSceneInstruction/types/AddAttribute.instruction.d.mts +19 -0
  273. package/dist/node/lib/AreSceneInstruction/types/AddAttribute.instruction.d.ts +19 -0
  274. package/dist/node/lib/AreSceneInstruction/types/AddAttribute.instruction.js +27 -0
  275. package/dist/node/lib/AreSceneInstruction/types/AddAttribute.instruction.js.map +1 -0
  276. package/dist/node/lib/AreSceneInstruction/types/AddAttribute.instruction.mjs +26 -0
  277. package/dist/node/lib/AreSceneInstruction/types/AddAttribute.instruction.mjs.map +1 -0
  278. package/dist/node/lib/AreSceneInstruction/types/AddDirective.instruction.d.mts +20 -0
  279. package/dist/node/lib/AreSceneInstruction/types/AddDirective.instruction.d.ts +20 -0
  280. package/dist/node/lib/AreSceneInstruction/types/AddDirective.instruction.js +27 -0
  281. package/dist/node/lib/AreSceneInstruction/types/AddDirective.instruction.js.map +1 -0
  282. package/dist/node/lib/AreSceneInstruction/types/AddDirective.instruction.mjs +26 -0
  283. package/dist/node/lib/AreSceneInstruction/types/AddDirective.instruction.mjs.map +1 -0
  284. package/dist/node/lib/AreSceneInstruction/types/AddStyle.instruction.d.mts +17 -0
  285. package/dist/node/lib/AreSceneInstruction/types/AddStyle.instruction.d.ts +17 -0
  286. package/dist/node/lib/AreSceneInstruction/types/AddStyle.instruction.js +23 -0
  287. package/dist/node/lib/AreSceneInstruction/types/AddStyle.instruction.js.map +1 -0
  288. package/dist/node/lib/AreSceneInstruction/types/AddStyle.instruction.mjs +22 -0
  289. package/dist/node/lib/AreSceneInstruction/types/AddStyle.instruction.mjs.map +1 -0
  290. package/dist/node/lib/AreSceneInstruction/types/AddStyleProperty.instruction.d.mts +19 -0
  291. package/dist/node/lib/AreSceneInstruction/types/AddStyleProperty.instruction.d.ts +19 -0
  292. package/dist/node/lib/AreSceneInstruction/types/AddStyleProperty.instruction.js +27 -0
  293. package/dist/node/lib/AreSceneInstruction/types/AddStyleProperty.instruction.js.map +1 -0
  294. package/dist/node/lib/AreSceneInstruction/types/AddStyleProperty.instruction.mjs +26 -0
  295. package/dist/node/lib/AreSceneInstruction/types/AddStyleProperty.instruction.mjs.map +1 -0
  296. package/dist/node/lib/AreSceneInstruction/types/AttachListener.instruction.d.mts +23 -0
  297. package/dist/node/lib/AreSceneInstruction/types/AttachListener.instruction.d.ts +23 -0
  298. package/dist/node/lib/AreSceneInstruction/types/AttachListener.instruction.js +41 -0
  299. package/dist/node/lib/AreSceneInstruction/types/AttachListener.instruction.js.map +1 -0
  300. package/dist/node/lib/AreSceneInstruction/types/AttachListener.instruction.mjs +40 -0
  301. package/dist/node/lib/AreSceneInstruction/types/AttachListener.instruction.mjs.map +1 -0
  302. package/dist/node/lib/AreSceneInstruction/types/AttachRootNode.instruction.d.mts +15 -0
  303. package/dist/node/lib/AreSceneInstruction/types/AttachRootNode.instruction.d.ts +15 -0
  304. package/dist/node/lib/AreSceneInstruction/types/AttachRootNode.instruction.js +21 -0
  305. package/dist/node/lib/AreSceneInstruction/types/AttachRootNode.instruction.js.map +1 -0
  306. package/dist/node/lib/AreSceneInstruction/types/AttachRootNode.instruction.mjs +20 -0
  307. package/dist/node/lib/AreSceneInstruction/types/AttachRootNode.instruction.mjs.map +1 -0
  308. package/dist/node/lib/AreSceneInstruction/types/MountNode.instruction.d.mts +17 -0
  309. package/dist/node/lib/AreSceneInstruction/types/MountNode.instruction.d.ts +17 -0
  310. package/dist/node/lib/AreSceneInstruction/types/MountNode.instruction.js +23 -0
  311. package/dist/node/lib/AreSceneInstruction/types/MountNode.instruction.js.map +1 -0
  312. package/dist/node/lib/AreSceneInstruction/types/MountNode.instruction.mjs +22 -0
  313. package/dist/node/lib/AreSceneInstruction/types/MountNode.instruction.mjs.map +1 -0
  314. package/dist/node/lib/AreSceneInstruction/types/ReplaceInterpolation.instruction.d.mts +23 -0
  315. package/dist/node/lib/AreSceneInstruction/types/ReplaceInterpolation.instruction.d.ts +23 -0
  316. package/dist/node/lib/AreSceneInstruction/types/ReplaceInterpolation.instruction.js +34 -0
  317. package/dist/node/lib/AreSceneInstruction/types/ReplaceInterpolation.instruction.js.map +1 -0
  318. package/dist/node/lib/AreSceneInstruction/types/ReplaceInterpolation.instruction.mjs +33 -0
  319. package/dist/node/lib/AreSceneInstruction/types/ReplaceInterpolation.instruction.mjs.map +1 -0
  320. package/dist/node/lib/AreSceneInstruction/types/UnmountNode.instruction.d.mts +16 -0
  321. package/dist/node/lib/AreSceneInstruction/types/UnmountNode.instruction.d.ts +16 -0
  322. package/dist/node/lib/AreSceneInstruction/types/UnmountNode.instruction.js +20 -0
  323. package/dist/node/lib/AreSceneInstruction/types/UnmountNode.instruction.js.map +1 -0
  324. package/dist/node/lib/AreSceneInstruction/types/UnmountNode.instruction.mjs +19 -0
  325. package/dist/node/lib/AreSceneInstruction/types/UnmountNode.instruction.mjs.map +1 -0
  326. package/dist/node/lib/AreSceneInstruction/types/index.d.mts +18 -0
  327. package/dist/node/lib/AreSceneInstruction/types/index.d.ts +18 -0
  328. package/dist/node/lib/AreSceneInstruction/types/index.js +52 -0
  329. package/dist/node/lib/AreSceneInstruction/types/index.js.map +1 -0
  330. package/dist/node/lib/AreSceneInstruction/types/index.mjs +12 -0
  331. package/dist/node/lib/AreSceneInstruction/types/index.mjs.map +1 -0
  332. package/dist/node/lib/AreSlot/AreSlot.component.d.mts +8 -0
  333. package/dist/node/lib/AreSlot/AreSlot.component.d.ts +8 -0
  334. package/dist/node/lib/AreSlot/AreSlot.component.js +37 -0
  335. package/dist/node/lib/AreSlot/AreSlot.component.js.map +1 -0
  336. package/dist/node/lib/AreSlot/AreSlot.component.mjs +36 -0
  337. package/dist/node/lib/AreSlot/AreSlot.component.mjs.map +1 -0
  338. package/dist/node/lib/AreStore/AreStore.context.d.mts +10 -0
  339. package/dist/node/lib/AreStore/AreStore.context.d.ts +10 -0
  340. package/dist/node/lib/AreStore/AreStore.context.js +35 -0
  341. package/dist/node/lib/AreStore/AreStore.context.js.map +1 -0
  342. package/dist/node/lib/AreStore/AreStore.context.mjs +28 -0
  343. package/dist/node/lib/AreStore/AreStore.context.mjs.map +1 -0
  344. package/dist/node/lib/AreStore/index.d.mts +3 -0
  345. package/dist/node/lib/AreStore/index.d.ts +3 -0
  346. package/dist/node/lib/AreStore/index.js +12 -0
  347. package/dist/node/lib/AreStore/index.js.map +1 -0
  348. package/dist/node/lib/AreStore/index.mjs +4 -0
  349. package/dist/node/lib/AreStore/index.mjs.map +1 -0
  350. package/dist/node/lib/AreSyntax/AreSyntax.component.d.mts +89 -0
  351. package/dist/node/lib/AreSyntax/AreSyntax.component.d.ts +89 -0
  352. package/dist/node/lib/AreSyntax/AreSyntax.component.js +241 -0
  353. package/dist/node/lib/AreSyntax/AreSyntax.component.js.map +1 -0
  354. package/dist/node/lib/AreSyntax/AreSyntax.component.mjs +232 -0
  355. package/dist/node/lib/AreSyntax/AreSyntax.component.mjs.map +1 -0
  356. package/dist/node/lib/AreSyntax/AreSyntax.context.d.mts +80 -0
  357. package/dist/node/lib/AreSyntax/AreSyntax.context.d.ts +80 -0
  358. package/dist/node/lib/AreSyntax/AreSyntax.context.js +117 -0
  359. package/dist/node/lib/AreSyntax/AreSyntax.context.js.map +1 -0
  360. package/dist/node/lib/AreSyntax/AreSyntax.context.mjs +110 -0
  361. package/dist/node/lib/AreSyntax/AreSyntax.context.mjs.map +1 -0
  362. package/dist/node/lib/AreSyntax/AreSyntax.error.d.mts +9 -0
  363. package/dist/node/lib/AreSyntax/AreSyntax.error.d.ts +9 -0
  364. package/dist/node/lib/AreSyntax/AreSyntax.error.js +13 -0
  365. package/dist/node/lib/AreSyntax/AreSyntax.error.js.map +1 -0
  366. package/dist/node/lib/AreSyntax/AreSyntax.error.mjs +12 -0
  367. package/dist/node/lib/AreSyntax/AreSyntax.error.mjs.map +1 -0
  368. package/dist/node/lib/AreSyntax/AreSyntax.types.d.mts +132 -0
  369. package/dist/node/lib/AreSyntax/AreSyntax.types.d.ts +132 -0
  370. package/dist/node/lib/AreSyntax/AreSyntax.types.js +4 -0
  371. package/dist/node/lib/AreSyntax/AreSyntax.types.js.map +1 -0
  372. package/dist/node/lib/AreSyntax/AreSyntax.types.mjs +3 -0
  373. package/dist/node/lib/AreSyntax/AreSyntax.types.mjs.map +1 -0
  374. package/dist/node/lib/AreSyntax/index.d.mts +12 -0
  375. package/dist/node/lib/AreSyntax/index.d.ts +12 -0
  376. package/dist/node/lib/AreSyntax/index.js +29 -0
  377. package/dist/node/lib/AreSyntax/index.js.map +1 -0
  378. package/dist/node/lib/AreSyntax/index.mjs +7 -0
  379. package/dist/node/lib/AreSyntax/index.mjs.map +1 -0
  380. package/dist/node/signals/AreInit.signal.d.mts +7 -0
  381. package/dist/node/signals/AreInit.signal.d.ts +7 -0
  382. package/dist/node/signals/AreInit.signal.js +13 -0
  383. package/dist/node/signals/AreInit.signal.js.map +1 -0
  384. package/dist/node/signals/AreInit.signal.mjs +12 -0
  385. package/dist/node/signals/AreInit.signal.mjs.map +1 -0
  386. package/dist/node/signals/AreRoute.signal.d.mts +12 -0
  387. package/dist/node/signals/AreRoute.signal.d.ts +12 -0
  388. package/dist/node/signals/AreRoute.signal.js +24 -0
  389. package/dist/node/signals/AreRoute.signal.js.map +1 -0
  390. package/dist/node/signals/AreRoute.signal.mjs +23 -0
  391. package/dist/node/signals/AreRoute.signal.mjs.map +1 -0
  392. package/dist/node/signals/index.d.mts +4 -0
  393. package/dist/node/signals/index.d.ts +4 -0
  394. package/dist/node/signals/index.js +17 -0
  395. package/dist/node/signals/index.js.map +1 -0
  396. package/dist/node/signals/index.mjs +5 -0
  397. package/dist/node/signals/index.mjs.map +1 -0
  398. package/docs/a-logo-docs.png +0 -0
  399. package/examples/jumpstart/concept.ts +60 -0
  400. package/examples/jumpstart/containers/UI.container.ts +172 -0
  401. package/examples/jumpstart/dist/index.html +22 -0
  402. package/examples/jumpstart/dist/mls3rrlq-lofs95.js +129 -0
  403. package/examples/jumpstart/dist/static/css/main.css +40 -0
  404. package/examples/jumpstart/dist/static/img/test.png +0 -0
  405. package/examples/jumpstart/public/index.html +22 -0
  406. package/examples/jumpstart/public/static/css/main.css +40 -0
  407. package/examples/jumpstart/public/static/img/test.png +0 -0
  408. package/examples/jumpstart/src/components/A-Btn.component.ts +124 -0
  409. package/examples/jumpstart/src/components/A-Input.component.ts +78 -0
  410. package/examples/jumpstart/src/components/A-Navigation.component.ts +167 -0
  411. package/examples/jumpstart/src/components/SignInComponent.component.ts +127 -0
  412. package/examples/jumpstart/src/concept.ts +92 -0
  413. package/jest.config.ts +26 -0
  414. package/package.json +92 -0
  415. package/src/engines/html/AreHTML.compiler.ts +657 -0
  416. package/src/engines/html/AreHTML.engine.ts +62 -0
  417. package/src/engines/html/index.ts +2 -0
  418. package/src/engines/json/AreJSON.compiler.ts +13 -0
  419. package/src/index.ts +15 -0
  420. package/src/lib/AreApp/AreApp.container.ts +77 -0
  421. package/src/lib/AreApp/AreApp.env.ts +0 -0
  422. package/src/lib/AreApp/AreApp.error.ts +7 -0
  423. package/src/lib/AreApp/AreApp.types.ts +0 -0
  424. package/src/lib/AreApp/index.ts +4 -0
  425. package/src/lib/AreCompiler/AreCompiler.component.ts +1023 -0
  426. package/src/lib/AreCompiler/AreCompiler.error.ts +9 -0
  427. package/src/lib/AreCompiler/AreCompiler.types.ts +0 -0
  428. package/src/lib/AreCompiler/index.ts +3 -0
  429. package/src/lib/AreComponent/Are.component.ts +203 -0
  430. package/src/lib/AreComponent/Are.constants.ts +39 -0
  431. package/src/lib/AreComponent/Are.context.ts +43 -0
  432. package/src/lib/AreComponent/Are.types.ts +0 -0
  433. package/src/lib/AreComponent/index.ts +4 -0
  434. package/src/lib/AreEvent/AreEvent.context.ts +38 -0
  435. package/src/lib/AreEvent/AreEvent.types.ts +16 -0
  436. package/src/lib/AreEvent/index.ts +2 -0
  437. package/src/lib/AreIndex/AreIndex.context.ts +174 -0
  438. package/src/lib/AreIndex/index.ts +1 -0
  439. package/src/lib/AreNode/AreNode.constants.ts +37 -0
  440. package/src/lib/AreNode/AreNode.entity.ts +249 -0
  441. package/src/lib/AreNode/AreNode.error.ts +0 -0
  442. package/src/lib/AreNode/AreNode.types.ts +15 -0
  443. package/src/lib/AreNode/index.ts +4 -0
  444. package/src/lib/AreProps/AreProps.context.ts +26 -0
  445. package/src/lib/AreProps/index.ts +1 -0
  446. package/src/lib/AreRoot/AreRoot.component.ts +54 -0
  447. package/src/lib/AreRoot/index.ts +1 -0
  448. package/src/lib/AreRouter/AreRouter.componeent.ts +24 -0
  449. package/src/lib/AreRouter/index.ts +1 -0
  450. package/src/lib/AreScene/AreScene.context.ts +382 -0
  451. package/src/lib/AreScene/AreScene.error.ts +22 -0
  452. package/src/lib/AreScene/AreScene.types.ts +7 -0
  453. package/src/lib/AreScene/index.ts +3 -0
  454. package/src/lib/AreSceneInstruction/AreSceneInstruction.constants.ts +7 -0
  455. package/src/lib/AreSceneInstruction/AreSceneInstruction.entity.ts +156 -0
  456. package/src/lib/AreSceneInstruction/AreSceneInstruction.types.ts +8 -0
  457. package/src/lib/AreSceneInstruction/index.ts +4 -0
  458. package/src/lib/AreSceneInstruction/types/AddAttribute.instruction.ts +34 -0
  459. package/src/lib/AreSceneInstruction/types/AddDirective.instruction.ts +36 -0
  460. package/src/lib/AreSceneInstruction/types/AddStyle.instruction.ts +26 -0
  461. package/src/lib/AreSceneInstruction/types/AddStyleProperty.instruction.ts +32 -0
  462. package/src/lib/AreSceneInstruction/types/AttachListener.instruction.ts +57 -0
  463. package/src/lib/AreSceneInstruction/types/AttachRootNode.instruction.ts +23 -0
  464. package/src/lib/AreSceneInstruction/types/MountNode.instruction.ts +29 -0
  465. package/src/lib/AreSceneInstruction/types/ReplaceInterpolation.instruction.ts +45 -0
  466. package/src/lib/AreSceneInstruction/types/UnmountNode.instruction.ts +22 -0
  467. package/src/lib/AreSceneInstruction/types/index.ts +10 -0
  468. package/src/lib/AreSlot/AreSlot.component.ts +48 -0
  469. package/src/lib/AreStore/AreStore.context.ts +36 -0
  470. package/src/lib/AreStore/index.ts +1 -0
  471. package/src/lib/AreSyntax/AreSyntax.component.ts +378 -0
  472. package/src/lib/AreSyntax/AreSyntax.context.ts +114 -0
  473. package/src/lib/AreSyntax/AreSyntax.error.ts +11 -0
  474. package/src/lib/AreSyntax/AreSyntax.types.ts +156 -0
  475. package/src/lib/AreSyntax/index.ts +4 -0
  476. package/src/signals/AreInit.signal.ts +7 -0
  477. package/src/signals/AreRoute.signal.ts +25 -0
  478. package/src/signals/index.ts +2 -0
  479. package/tests/A-HttpChannel.test.ts +204 -0
  480. package/tests/A-HttpServerError.test.ts +204 -0
  481. package/tests/A-Request.test.ts +742 -0
  482. package/tests/A-Service.test.ts +18 -0
  483. package/tsconfig.json +68 -0
  484. package/tslint.json +98 -0
  485. package/tsup.config.ts +78 -0
@@ -0,0 +1,2624 @@
1
+ import { A_Feature, A_Dependency, A_Inject, A_TYPES__EntityFeatures, A_Caller, A_Scope, A_Error, A_Fragment, A_Context, A_Component, A_Entity, A_TypeGuards, ASEID, A_FormatterHelper } from '@adaas/a-concept';
2
+ import { A_Frame } from '@adaas/a-frame';
3
+ import { A_ExecutionContext } from '@adaas/a-utils/a-execution';
4
+ import { A_SignalBus, A_SignalBusFeatures, A_SignalVector, A_SignalState, A_Signal } from '@adaas/a-utils/a-signal';
5
+ import { A_Route } from '@adaas/a-utils/a-route';
6
+ import { A_Service, A_ServiceFeatures } from '@adaas/a-utils/a-service';
7
+ import { A_Logger } from '@adaas/a-utils/a-logger';
8
+
9
+ var __defProp = Object.defineProperty;
10
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11
+ var __decorateClass = (decorators, target, key, kind) => {
12
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
13
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
14
+ if (decorator = decorators[i])
15
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
16
+ if (kind && result) __defProp(target, key, result);
17
+ return result;
18
+ };
19
+ var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
20
+
21
+ // src/lib/AreComponent/Are.constants.ts
22
+ var AreFeatures = /* @__PURE__ */ ((AreFeatures2) => {
23
+ AreFeatures2["onBeforeLoad"] = "_Are_onBeforeLoad";
24
+ AreFeatures2["onAfterLoad"] = "_Are_onAfterLoad";
25
+ AreFeatures2["onBeforeMount"] = "_Are_onBeforeMount";
26
+ AreFeatures2["onAfterMount"] = "_Are_onAfterMount";
27
+ AreFeatures2["onBeforeUnmount"] = "_Are_onBeforeUnmount";
28
+ AreFeatures2["onAfterUnmount"] = "_Are_onAfterUnmount";
29
+ AreFeatures2["onBeforeUpdate"] = "_Are_onBeforeUpdate";
30
+ AreFeatures2["onAfterUpdate"] = "_Are_onAfterUpdate";
31
+ AreFeatures2["onBeforeDestroy"] = "_Are_onBeforeDestroy";
32
+ AreFeatures2["onAfterDestroy"] = "_Are_onAfterDestroy";
33
+ AreFeatures2["onBeforeCompile"] = "_Are_onBeforeCompile";
34
+ AreFeatures2["onAfterCompile"] = "_Are_onAfterCompile";
35
+ AreFeatures2["onBeforeRender"] = "_Are_onBeforeRender";
36
+ AreFeatures2["onAfterRender"] = "_Are_onAfterRender";
37
+ AreFeatures2["onTemplate"] = "_Are_onTemplate";
38
+ AreFeatures2["onStyles"] = "_Are_onStyles";
39
+ AreFeatures2["onData"] = "_Are_onData";
40
+ AreFeatures2["onSignal"] = "_Are_onSignal";
41
+ return AreFeatures2;
42
+ })(AreFeatures || {});
43
+ var Are = class extends A_Component {
44
+ //==================================================================================
45
+ //======================== LIFECYCLE DECORATORS ====================================
46
+ //==================================================================================
47
+ static get EventHandler() {
48
+ return (target, propertyKey, descriptor) => {
49
+ return A_Feature.Extend({
50
+ name: propertyKey,
51
+ scope: [target.constructor]
52
+ })(target, propertyKey, descriptor);
53
+ };
54
+ }
55
+ static get onBeforeLoad() {
56
+ return (target, propertyKey, descriptor) => {
57
+ return A_Feature.Extend({
58
+ name: "_Are_onBeforeLoad" /* onBeforeLoad */,
59
+ scope: [target.constructor]
60
+ })(target, propertyKey, descriptor);
61
+ };
62
+ }
63
+ static get onAfterLoad() {
64
+ return (target, propertyKey, descriptor) => {
65
+ return A_Feature.Extend({
66
+ name: "_Are_onAfterLoad" /* onAfterLoad */,
67
+ scope: [target.constructor]
68
+ })(target, propertyKey, descriptor);
69
+ };
70
+ }
71
+ static get onBeforeCompile() {
72
+ return (target, propertyKey, descriptor) => {
73
+ return A_Feature.Extend({
74
+ name: "_Are_onBeforeCompile" /* onBeforeCompile */,
75
+ scope: [target.constructor]
76
+ })(target, propertyKey, descriptor);
77
+ };
78
+ }
79
+ static get onAfterCompile() {
80
+ return (target, propertyKey, descriptor) => {
81
+ return A_Feature.Extend({
82
+ name: "_Are_onAfterCompile" /* onAfterCompile */,
83
+ scope: [target.constructor]
84
+ })(target, propertyKey, descriptor);
85
+ };
86
+ }
87
+ static get onBeforeMount() {
88
+ return (target, propertyKey, descriptor) => {
89
+ return A_Feature.Extend({
90
+ name: "_Are_onBeforeMount" /* onBeforeMount */,
91
+ scope: [target.constructor]
92
+ })(target, propertyKey, descriptor);
93
+ };
94
+ }
95
+ static get onAfterMount() {
96
+ return (target, propertyKey, descriptor) => {
97
+ return A_Feature.Extend({
98
+ name: "_Are_onAfterMount" /* onAfterMount */,
99
+ scope: [target.constructor]
100
+ })(target, propertyKey, descriptor);
101
+ };
102
+ }
103
+ static get onBeforeUnmount() {
104
+ return (target, propertyKey, descriptor) => {
105
+ return A_Feature.Extend({
106
+ name: "_Are_onBeforeUnmount" /* onBeforeUnmount */,
107
+ scope: [target.constructor]
108
+ })(target, propertyKey, descriptor);
109
+ };
110
+ }
111
+ static get onAfterUnmount() {
112
+ return (target, propertyKey, descriptor) => {
113
+ return A_Feature.Extend({
114
+ name: "_Are_onAfterUnmount" /* onAfterUnmount */,
115
+ scope: [target.constructor]
116
+ })(target, propertyKey, descriptor);
117
+ };
118
+ }
119
+ static get onBeforeUpdate() {
120
+ return (target, propertyKey, descriptor) => {
121
+ return A_Feature.Extend({
122
+ name: "_Are_onBeforeUpdate" /* onBeforeUpdate */,
123
+ scope: [target.constructor]
124
+ })(target, propertyKey, descriptor);
125
+ };
126
+ }
127
+ static get onAfterUpdate() {
128
+ return (target, propertyKey, descriptor) => {
129
+ return A_Feature.Extend({
130
+ name: "_Are_onAfterUpdate" /* onAfterUpdate */,
131
+ scope: [target.constructor]
132
+ })(target, propertyKey, descriptor);
133
+ };
134
+ }
135
+ static get Template() {
136
+ return (target, propertyKey, descriptor) => {
137
+ return A_Feature.Extend({
138
+ name: "_Are_onTemplate" /* onTemplate */,
139
+ scope: [target.constructor]
140
+ })(target, propertyKey, descriptor);
141
+ };
142
+ }
143
+ static get Styles() {
144
+ return (target, propertyKey, descriptor) => {
145
+ return A_Feature.Extend({
146
+ name: "_Are_onStyles" /* onStyles */,
147
+ scope: [target.constructor]
148
+ })(target, propertyKey, descriptor);
149
+ };
150
+ }
151
+ static get Data() {
152
+ return (target, propertyKey, descriptor) => {
153
+ return A_Feature.Extend({
154
+ name: "_Are_onData" /* onData */,
155
+ scope: [target.constructor]
156
+ })(target, propertyKey, descriptor);
157
+ };
158
+ }
159
+ static get Signal() {
160
+ return (target, propertyKey, descriptor) => {
161
+ return A_Feature.Extend({
162
+ name: "_Are_onSignal" /* onSignal */,
163
+ scope: [target.constructor]
164
+ })(target, propertyKey, descriptor);
165
+ };
166
+ }
167
+ async template(...args) {
168
+ }
169
+ async styles(...args) {
170
+ }
171
+ async data(...args) {
172
+ }
173
+ };
174
+ __decorateClass([
175
+ Are.Template
176
+ ], Are.prototype, "template", 1);
177
+ __decorateClass([
178
+ Are.Styles
179
+ ], Are.prototype, "styles", 1);
180
+ __decorateClass([
181
+ Are.Data
182
+ ], Are.prototype, "data", 1);
183
+ Are = __decorateClass([
184
+ A_Frame.Component({
185
+ namespace: "A-ARE",
186
+ name: "Are",
187
+ description: "Base component class for A-Concept Rendering Engine (ARE) components. It provides lifecycle decorators and methods for defining templates, styles, and data, facilitating the creation of dynamic and interactive UI components within the ARE framework."
188
+ })
189
+ ], Are);
190
+ var AreContext = class extends A_Fragment {
191
+ constructor(source = "") {
192
+ super({ name: "AreContext" });
193
+ this._roots = [];
194
+ this._source = source;
195
+ }
196
+ get scope() {
197
+ return A_Context.scope(this);
198
+ }
199
+ get roots() {
200
+ return this._roots;
201
+ }
202
+ get source() {
203
+ return this._source;
204
+ }
205
+ addRoot(node) {
206
+ this._roots.push(node);
207
+ this.scope.register(node);
208
+ }
209
+ removeRoot(node) {
210
+ this._roots = this._roots.filter((r) => r.aseid.toString() !== node.aseid.toString());
211
+ }
212
+ };
213
+ AreContext = __decorateClass([
214
+ A_Frame.Fragment({
215
+ namespace: "A-ARE",
216
+ name: "AreContext",
217
+ description: "Context fragment for the A-Concept Rendering Engine (ARE) framework, serving as a foundational component for managing shared state and configurations within the ARE environment. This Context uses to encapsulate global settings, resources, and utilities that can be accessed by various ARE components and entities during the rendering and interaction processes."
218
+ })
219
+ ], AreContext);
220
+ var AreSyntaxContext = class extends A_Fragment {
221
+ constructor(config = {}) {
222
+ super({ name: "AreSyntaxContext" });
223
+ this.config = config;
224
+ }
225
+ /**
226
+ * identifier of the root tag to use when compiling in browser context.
227
+ *
228
+ * @return {string} The root tag identifier.
229
+ */
230
+ get rootTag() {
231
+ return this.config.rootTag || "are-root";
232
+ }
233
+ /**
234
+ * List of standard HTML tags to recognize.
235
+ * [!] This is a set of tags that can be ignored when determining if a node is a custom component.
236
+ *
237
+ * @return {Set<string>} A set of standard HTML tag names.
238
+ */
239
+ get standardTags() {
240
+ return new Set(this.config.standardTags || []);
241
+ }
242
+ /**
243
+ * Enable or disable debug mode for syntax parsing.
244
+ * When enabled, additional debug information will be logged during parsing.
245
+ *
246
+ * @return {boolean} True if debug mode is enabled, false otherwise.
247
+ */
248
+ get debugMode() {
249
+ return this.config.debugMode || false;
250
+ }
251
+ /**
252
+ * Custom interpolation delimiters for template parsing.
253
+ * Default is ['{{', '}}'].
254
+ *
255
+ * @return {[string, string]} The opening and closing interpolation delimiters.
256
+ */
257
+ get interpolationDelimiters() {
258
+ return this.config.interpolationDelimiters || ["{{", "}}"];
259
+ }
260
+ /**
261
+ * Custom binding delimiter for data binding parsing.
262
+ * Default is ':'.
263
+ * @return {string} The binding delimiter.
264
+ */
265
+ get bindingDelimiter() {
266
+ return this.config.bindingDelimiter || ":";
267
+ }
268
+ /**
269
+ * Custom listener delimiter for event binding parsing.
270
+ * Default is '@'.
271
+ *
272
+ * @return {string} The listener delimiter.
273
+ */
274
+ get listenerDelimiter() {
275
+ return this.config.listenerDelimiter || "@";
276
+ }
277
+ /**
278
+ * Enable or disable strict mode for syntax parsing.
279
+ * When enabled, the parser will throw errors for any syntax violations.
280
+ * Default is true.
281
+ *
282
+ * @return {boolean} True if strict mode is enabled, false otherwise.
283
+ */
284
+ get strictMode() {
285
+ return this.config.strictMode !== false;
286
+ }
287
+ /**
288
+ * Enable or disable whitespace trimming in templates.
289
+ * When enabled, leading and trailing whitespace in template expressions will be trimmed.
290
+ * Default is true.
291
+ *
292
+ * @return {boolean} True if whitespace trimming is enabled, false otherwise.
293
+ */
294
+ get trimWhitespace() {
295
+ return this.config.trimWhitespace !== false;
296
+ }
297
+ /**
298
+ * Custom directive delimiter for directive parsing.
299
+ * Default is '$'.
300
+ *
301
+ * @return {string} The directive delimiter.
302
+ */
303
+ get directiveDelimiter() {
304
+ return this.config.directiveDelimiter || "$";
305
+ }
306
+ /*
307
+ * A list of custom directives to be recognized by the syntax parser.
308
+ * Each directive should be a string representing the directive name.
309
+ * Default is an empty array.
310
+ */
311
+ get customDirectives() {
312
+ return this.config.customDirectives || [];
313
+ }
314
+ };
315
+ AreSyntaxContext = __decorateClass([
316
+ A_Frame.Fragment({
317
+ namespace: "A-ARE",
318
+ name: "AreSyntaxContext",
319
+ description: "Context that defines the syntax rules and structures for the A-Concept Rendering Engine (ARE). It provides mechanisms for parsing and interpreting templates, attributes, directives, interpolations, and event listeners, enabling dynamic and interactive UI rendering within the ARE framework."
320
+ })
321
+ ], AreSyntaxContext);
322
+
323
+ // src/lib/AreNode/AreNode.constants.ts
324
+ var AreNodeFeatures = /* @__PURE__ */ ((AreNodeFeatures2) => {
325
+ AreNodeFeatures2["onBeforeRender"] = "_AreNode_onBeforeRender";
326
+ AreNodeFeatures2["onRender"] = "_AreNode_onRender";
327
+ AreNodeFeatures2["onAfterRender"] = "_AreNode_onAfterRender";
328
+ AreNodeFeatures2["onCompile"] = "_AreNode_onCompile";
329
+ AreNodeFeatures2["onEvent"] = "_AreNode_onEvent";
330
+ AreNodeFeatures2["onUpdate"] = "_AreNode_onUpdate";
331
+ AreNodeFeatures2["onMount"] = "_AreNode_onMount";
332
+ AreNodeFeatures2["onUnmount"] = "_AreNode_onUnmount";
333
+ return AreNodeFeatures2;
334
+ })(AreNodeFeatures || {});
335
+ var AreIndex = class _AreIndex extends A_Fragment {
336
+ constructor(aseid) {
337
+ super({
338
+ name: aseid instanceof ASEID ? aseid.toString() : aseid
339
+ });
340
+ /**
341
+ * Platform-agnostic element index
342
+ * Element can be DOM Element, PDF element, DOCX element, etc.
343
+ * The actual type depends on the compiler being used
344
+ */
345
+ this._index = {
346
+ ASEID_to_Path: /* @__PURE__ */ new Map(),
347
+ Path_to_ASEID: /* @__PURE__ */ new Map(),
348
+ Node_to_Path: /* @__PURE__ */ new Map(),
349
+ Path_to_Node: /* @__PURE__ */ new Map()
350
+ };
351
+ }
352
+ /**
353
+ * Unique hash representing the current state of the index
354
+ * Can be used to identify changes in the index
355
+ */
356
+ get state() {
357
+ const entries = Array.from(this._index.ASEID_to_Path.entries()).sort(([aseidA], [aseidB]) => aseidA.localeCompare(aseidB)).map(([aseid, path]) => `${aseid}:${JSON.stringify(path)}`);
358
+ return entries.join("|");
359
+ }
360
+ get scope() {
361
+ return A_Context.scope(this);
362
+ }
363
+ get parent() {
364
+ return A_Context.scope(this).parent?.resolve(_AreIndex);
365
+ }
366
+ get size() {
367
+ return this._index.ASEID_to_Path.size;
368
+ }
369
+ get nodes() {
370
+ return Array.from(this._index.Node_to_Path.keys());
371
+ }
372
+ get paths() {
373
+ return Array.from(this._index.Path_to_Node.keys());
374
+ }
375
+ get depth() {
376
+ let depth = 0;
377
+ let currentScope = this.scope;
378
+ while (currentScope) {
379
+ depth++;
380
+ currentScope = currentScope.parent;
381
+ }
382
+ return depth;
383
+ }
384
+ /**
385
+ * Adds a platform-agnostic element to the index
386
+ * @param node - AreNode to index
387
+ * @param path - Platform-specific element (DOM, PDF, DOCX, etc.)
388
+ */
389
+ add(node, path) {
390
+ this._index.ASEID_to_Path.set(node.aseid.toString(), path);
391
+ this._index.Path_to_ASEID.set(path, node.aseid.toString());
392
+ this._index.Node_to_Path.set(node, path);
393
+ this._index.Path_to_Node.set(path, node);
394
+ }
395
+ /**
396
+ * Retrieves platform-specific element by AreNode
397
+ * @param node - AreNode to look up
398
+ * @returns Platform-specific element or undefined
399
+ */
400
+ pathOf(node) {
401
+ return this._index.Node_to_Path.get(node);
402
+ }
403
+ /**
404
+ * Retrieves AreNode by platform-specific element
405
+ * @param element - Platform-specific element to look up
406
+ * @returns AreNode or undefined
407
+ */
408
+ nodeOf(path) {
409
+ return this._index.Path_to_Node.get(path);
410
+ }
411
+ /**
412
+ * Removes index entry by AreNode
413
+ * @param node - AreNode to remove from index
414
+ */
415
+ removeByNode(node) {
416
+ const path = this._index.Node_to_Path.get(node);
417
+ if (path) {
418
+ this._index.ASEID_to_Path.delete(node.aseid.toString());
419
+ this._index.Path_to_ASEID.delete(path);
420
+ this._index.Node_to_Path.delete(node);
421
+ this._index.Path_to_Node.delete(path);
422
+ }
423
+ }
424
+ replaceByNode(oldNode, newNode) {
425
+ const path = this._index.Node_to_Path.get(oldNode);
426
+ if (path) {
427
+ this._index.ASEID_to_Path.delete(oldNode.aseid.toString());
428
+ this._index.Path_to_ASEID.set(path, newNode.aseid.toString());
429
+ this._index.Node_to_Path.delete(oldNode);
430
+ this._index.Node_to_Path.set(newNode, path);
431
+ this._index.Path_to_Node.set(path, newNode);
432
+ }
433
+ }
434
+ replacePath(oldPath, newPath) {
435
+ const aseid = this._index.Path_to_ASEID.get(oldPath);
436
+ const node = this._index.Path_to_Node.get(oldPath);
437
+ if (aseid && node) {
438
+ this._index.ASEID_to_Path.set(aseid, newPath);
439
+ this._index.Path_to_ASEID.delete(oldPath);
440
+ this._index.Path_to_ASEID.set(newPath, aseid);
441
+ this._index.Node_to_Path.set(node, newPath);
442
+ this._index.Path_to_Node.delete(oldPath);
443
+ this._index.Path_to_Node.set(newPath, node);
444
+ }
445
+ }
446
+ /**
447
+ * Removes index entry by platform-specific element
448
+ * @param path - Platform-specific element to remove from index
449
+ */
450
+ removeByElement(path) {
451
+ const aseid = this._index.Path_to_ASEID.get(path);
452
+ if (aseid) {
453
+ const node = this._index.Path_to_Node.get(path);
454
+ if (node) {
455
+ this._index.ASEID_to_Path.delete(aseid);
456
+ this._index.Path_to_ASEID.delete(path);
457
+ this._index.Node_to_Path.delete(node);
458
+ this._index.Path_to_Node.delete(path);
459
+ }
460
+ }
461
+ }
462
+ clear() {
463
+ this._index.ASEID_to_Path.clear();
464
+ this._index.Path_to_ASEID.clear();
465
+ this._index.Node_to_Path.clear();
466
+ this._index.Path_to_Node.clear();
467
+ }
468
+ };
469
+ var AreProps = class extends A_ExecutionContext {
470
+ constructor(aseid) {
471
+ super(aseid.toString());
472
+ }
473
+ setMultiple(values) {
474
+ Object.entries(values).forEach(([key, value]) => {
475
+ this.set(key, value);
476
+ });
477
+ }
478
+ };
479
+ AreProps = __decorateClass([
480
+ A_Frame.Fragment({
481
+ namespace: "A-ARE",
482
+ name: "AreProps",
483
+ description: "Execution context for managing properties within the A-Concept Rendering Engine (ARE) framework, allowing for type-safe storage and retrieval of key-value pairs associated with a specific ASEID."
484
+ })
485
+ ], AreProps);
486
+ var AreStore = class extends A_ExecutionContext {
487
+ constructor(aseid) {
488
+ super(aseid.toString());
489
+ }
490
+ set(param1, param2) {
491
+ if (typeof param1 === "object") {
492
+ Object.entries(param1).forEach(([key, value]) => {
493
+ super.set(key, value);
494
+ });
495
+ } else if (param2 !== void 0) {
496
+ super.set(param1, param2);
497
+ }
498
+ return this;
499
+ }
500
+ };
501
+ AreStore = __decorateClass([
502
+ A_Frame.Fragment({
503
+ description: "Are Store uses to keep AreNode related information for interpolations, runtime data, etc. This object can be injected to manipulate with data at runtime."
504
+ })
505
+ ], AreStore);
506
+
507
+ // src/lib/AreSceneInstruction/AreSceneInstruction.constants.ts
508
+ var AreSceneInstructionFeatures = /* @__PURE__ */ ((AreSceneInstructionFeatures3) => {
509
+ AreSceneInstructionFeatures3["Init"] = "_AreSceneInstructionInit";
510
+ AreSceneInstructionFeatures3["Apply"] = "_AreSceneInstructionApply";
511
+ AreSceneInstructionFeatures3["Revert"] = "_AreSceneInstructionRevert";
512
+ return AreSceneInstructionFeatures3;
513
+ })(AreSceneInstructionFeatures || {});
514
+
515
+ // src/lib/AreSceneInstruction/AreSceneInstruction.entity.ts
516
+ var AreSceneInstruction = class extends A_Entity {
517
+ get scene() {
518
+ return A_Context.scope(this).resolve(AreScene);
519
+ }
520
+ createHash(str) {
521
+ let hashSource;
522
+ if (str instanceof Map) {
523
+ hashSource = JSON.stringify(Array.from(str.entries()));
524
+ } else if (str instanceof Set) {
525
+ hashSource = JSON.stringify(Array.from(str.values()));
526
+ } else {
527
+ switch (typeof str) {
528
+ case "string":
529
+ hashSource = str;
530
+ break;
531
+ case "undefined":
532
+ hashSource = "undefined";
533
+ break;
534
+ case "object":
535
+ if ("toJSON" in str)
536
+ hashSource = JSON.stringify(str.toJSON());
537
+ else
538
+ hashSource = JSON.stringify(str);
539
+ break;
540
+ case "number":
541
+ hashSource = str.toString();
542
+ break;
543
+ case "boolean":
544
+ hashSource = str ? "true" : "false";
545
+ break;
546
+ case "function":
547
+ hashSource = str.toString();
548
+ break;
549
+ default:
550
+ hashSource = String(str);
551
+ }
552
+ }
553
+ let hash = 0, i, chr;
554
+ for (i = 0; i < hashSource.length; i++) {
555
+ chr = hashSource.charCodeAt(i);
556
+ hash = (hash << 5) - hash + chr;
557
+ hash |= 0;
558
+ }
559
+ const hashString = hash.toString();
560
+ return hashString;
561
+ }
562
+ fromNew(newEntity) {
563
+ const identity = newEntity.id || {
564
+ name: newEntity.action,
565
+ node: newEntity.node.aseid.toString()
566
+ };
567
+ const id = this.createHash(identity);
568
+ this.aseid = this.generateASEID({
569
+ entity: A_FormatterHelper.toKebabCase(newEntity.action),
570
+ id
571
+ });
572
+ this.action = newEntity.action;
573
+ this.node = newEntity.node;
574
+ this.params = newEntity.params;
575
+ }
576
+ update(params) {
577
+ this.params = {
578
+ ...this.params,
579
+ ...params
580
+ };
581
+ }
582
+ init(scope) {
583
+ try {
584
+ this.call("_AreSceneInstructionInit" /* Init */, scope);
585
+ } catch (error) {
586
+ }
587
+ }
588
+ apply(scope) {
589
+ try {
590
+ return this.call("_AreSceneInstructionApply" /* Apply */, scope);
591
+ } catch (error) {
592
+ }
593
+ }
594
+ revert(scope) {
595
+ try {
596
+ this.call("_AreSceneInstructionRevert" /* Revert */, scope);
597
+ } catch (error) {
598
+ }
599
+ }
600
+ };
601
+
602
+ // src/lib/AreSceneInstruction/types/AddAttribute.instruction.ts
603
+ var AddAttributeInstruction = class extends AreSceneInstruction {
604
+ get name() {
605
+ return this.params.name;
606
+ }
607
+ get value() {
608
+ return this.params.value;
609
+ }
610
+ constructor(node, name, value) {
611
+ super({
612
+ id: [name, node],
613
+ action: "add-attribute",
614
+ node,
615
+ params: {
616
+ name,
617
+ value
618
+ }
619
+ });
620
+ }
621
+ };
622
+
623
+ // src/lib/AreSceneInstruction/types/AddDirective.instruction.ts
624
+ var AddDirectiveInstruction = class extends AreSceneInstruction {
625
+ get directive() {
626
+ return this.params.directive;
627
+ }
628
+ get value() {
629
+ return this.params.value;
630
+ }
631
+ constructor(node, directive, value) {
632
+ super({
633
+ id: [directive, node],
634
+ action: "directive",
635
+ node,
636
+ params: {
637
+ directive,
638
+ value
639
+ }
640
+ });
641
+ }
642
+ };
643
+
644
+ // src/lib/AreSceneInstruction/types/AddStyle.instruction.ts
645
+ var AddStyleInstruction = class extends AreSceneInstruction {
646
+ get styles() {
647
+ return this.params.styles;
648
+ }
649
+ constructor(node, styles) {
650
+ super({
651
+ id: [styles, node],
652
+ action: "add-style",
653
+ node,
654
+ params: {
655
+ styles
656
+ }
657
+ });
658
+ }
659
+ };
660
+
661
+ // src/lib/AreSceneInstruction/types/AddStyleProperty.instruction.ts
662
+ var AddStylePropertyInstruction = class extends AreSceneInstruction {
663
+ get styles() {
664
+ return this.params.property;
665
+ }
666
+ get value() {
667
+ return this.params.value;
668
+ }
669
+ constructor(node, property, value) {
670
+ super({
671
+ id: [property, node],
672
+ action: "add-style",
673
+ node,
674
+ params: {
675
+ property,
676
+ value
677
+ }
678
+ });
679
+ }
680
+ };
681
+ var AreEvent = class extends A_Fragment {
682
+ constructor(eventName, props) {
683
+ super({ name: eventName });
684
+ this._props = props;
685
+ }
686
+ get data() {
687
+ return this._props.data;
688
+ }
689
+ get event() {
690
+ return this._props.event;
691
+ }
692
+ };
693
+ AreEvent = __decorateClass([
694
+ A_Frame.Fragment({
695
+ namespace: "A-ARE",
696
+ name: "AreEvent",
697
+ description: "Event context for managing events within the A-Concept Rendering Engine (ARE) framework, encapsulating event data and associated nodes to facilitate event-driven interactions."
698
+ })
699
+ ], AreEvent);
700
+
701
+ // src/lib/AreSceneInstruction/types/AttachListener.instruction.ts
702
+ var AttachListenerInstruction = class extends AreSceneInstruction {
703
+ get listener() {
704
+ return this.params.listener;
705
+ }
706
+ get event() {
707
+ return this.params.listener.handler;
708
+ }
709
+ get target() {
710
+ return this.params.target;
711
+ }
712
+ get callback() {
713
+ return this._callback;
714
+ }
715
+ constructor(node, target, listener) {
716
+ super({
717
+ id: [node, listener.name],
718
+ action: "listener",
719
+ node,
720
+ params: {
721
+ target,
722
+ listener
723
+ }
724
+ });
725
+ this._callback = async (e) => {
726
+ const newEvent = new AreEvent(listener.handler, {
727
+ event: listener.name,
728
+ data: e
729
+ });
730
+ await this.target.emit(newEvent);
731
+ };
732
+ }
733
+ };
734
+
735
+ // src/lib/AreSceneInstruction/types/AttachRootNode.instruction.ts
736
+ var AttachRootNodeInstruction = class extends AreSceneInstruction {
737
+ get id() {
738
+ return this.node.aseid.toString();
739
+ }
740
+ constructor(node) {
741
+ super({
742
+ id: [node],
743
+ action: "attach-root-node",
744
+ node,
745
+ params: {}
746
+ });
747
+ }
748
+ };
749
+
750
+ // src/lib/AreSceneInstruction/types/MountNode.instruction.ts
751
+ var MountNodeInstruction = class extends AreSceneInstruction {
752
+ get path() {
753
+ return this.params.path;
754
+ }
755
+ constructor(node, path) {
756
+ super({
757
+ id: [node],
758
+ action: "mount-node",
759
+ node,
760
+ params: {
761
+ path
762
+ }
763
+ });
764
+ }
765
+ };
766
+
767
+ // src/lib/AreSceneInstruction/types/ReplaceInterpolation.instruction.ts
768
+ var ReplaceInterpolationInstruction = class extends AreSceneInstruction {
769
+ get placement() {
770
+ return this.params?.prevValue || this.interpolation.raw;
771
+ }
772
+ get position() {
773
+ return this.interpolation.position;
774
+ }
775
+ get interpolation() {
776
+ return this.params.interpolation;
777
+ }
778
+ get value() {
779
+ return this.params?.value || "";
780
+ }
781
+ constructor(node, interpolation, value, prevValue) {
782
+ super({
783
+ id: [node, interpolation],
784
+ action: "replace-interpolation",
785
+ node,
786
+ params: {
787
+ interpolation,
788
+ prevValue,
789
+ value
790
+ }
791
+ });
792
+ }
793
+ };
794
+
795
+ // src/lib/AreSceneInstruction/types/UnmountNode.instruction.ts
796
+ var UnmountNodeInstruction = class extends AreSceneInstruction {
797
+ constructor(node, path) {
798
+ super({
799
+ id: [node],
800
+ action: "unmount-node",
801
+ node,
802
+ params: {
803
+ path
804
+ }
805
+ });
806
+ }
807
+ };
808
+
809
+ // src/lib/AreScene/AreScene.context.ts
810
+ var AreScene = class _AreScene extends A_Fragment {
811
+ constructor(id) {
812
+ super({ name: id.toString() });
813
+ this._state = /* @__PURE__ */ new Set();
814
+ }
815
+ get id() {
816
+ return this.name;
817
+ }
818
+ /**
819
+ * Get the root scene of the current scene
820
+ */
821
+ get root() {
822
+ let currentScope = this.scope;
823
+ let rootScene = this;
824
+ while (currentScope) {
825
+ const parentScene = currentScope.parent?.resolve(this.constructor);
826
+ if (parentScene) {
827
+ rootScene = parentScene;
828
+ }
829
+ currentScope = currentScope.parent;
830
+ }
831
+ return rootScene;
832
+ }
833
+ get scope() {
834
+ return A_Context.scope(this);
835
+ }
836
+ get index() {
837
+ return A_Context.scope(this).resolveFlat(AreIndex);
838
+ }
839
+ get parent() {
840
+ return A_Context.scope(this).parent?.resolveFlat(_AreScene);
841
+ }
842
+ get children() {
843
+ return this.scope.resolveFlatAll(AreNode).map((n) => n.scope.resolveFlat(_AreScene)).filter((s) => !!s);
844
+ }
845
+ get depth() {
846
+ let depth = 0;
847
+ let currentScope = this.scope;
848
+ while (currentScope) {
849
+ if (currentScope.parent && currentScope.parent.resolve(this.constructor)) {
850
+ depth++;
851
+ }
852
+ currentScope = currentScope.parent;
853
+ }
854
+ return depth;
855
+ }
856
+ get instructions() {
857
+ return this.scope.resolveFlatAll(AreSceneInstruction) || [];
858
+ }
859
+ nodes(filter) {
860
+ const nodes = [];
861
+ for (const path of this.paths()) {
862
+ const node = this.index.nodeOf(path);
863
+ if (!node) {
864
+ continue;
865
+ }
866
+ if (filter && !filter(node)) {
867
+ continue;
868
+ }
869
+ nodes.push(node);
870
+ }
871
+ return nodes;
872
+ }
873
+ renderPlanFor(node, filter) {
874
+ const actions = [];
875
+ const order = filter?.order || [];
876
+ const filterFn = filter?.filter;
877
+ let plan = this.instructions;
878
+ plan = plan.sort((a, b) => {
879
+ const aIndex = order.findIndex((instructionType) => a instanceof instructionType);
880
+ const bIndex = order.findIndex((instructionType) => b instanceof instructionType);
881
+ return (aIndex === -1 ? order.length : aIndex) - (bIndex === -1 ? order.length : bIndex);
882
+ });
883
+ if (filterFn) {
884
+ plan = plan.filter(filterFn);
885
+ }
886
+ for (const action of plan) {
887
+ if (action.node === node) {
888
+ actions.push(action);
889
+ }
890
+ }
891
+ return actions;
892
+ }
893
+ get debugPrefix() {
894
+ return `${" - ".repeat(this.depth)}`;
895
+ }
896
+ get path() {
897
+ if (!this.parent)
898
+ return "";
899
+ else {
900
+ const ownerNode = this.parent.scope.resolve(new A_Dependency(AreNode, {
901
+ flat: true,
902
+ query: {
903
+ aseid: this.id
904
+ }
905
+ }));
906
+ const NodePath = this.parent.index.pathOf(ownerNode);
907
+ return this.parent.path ? this.parent.path + "." + NodePath : NodePath;
908
+ }
909
+ }
910
+ *paths() {
911
+ let paths = this.index.paths;
912
+ paths.sort((a, b) => {
913
+ const aParsed = a.split(".").map((part) => parseInt(part, 10));
914
+ const bParsed = b.split(".").map((part) => parseInt(part, 10));
915
+ const len = Math.min(aParsed.length, bParsed.length);
916
+ for (let i = 0; i < len; i++) {
917
+ if (aParsed[i] !== bParsed[i]) {
918
+ return aParsed[i] - bParsed[i];
919
+ }
920
+ }
921
+ return aParsed.length - bParsed.length;
922
+ });
923
+ for (const path of paths) {
924
+ yield path;
925
+ }
926
+ }
927
+ plan(instruction) {
928
+ try {
929
+ this.scope.register(instruction);
930
+ } catch (error) {
931
+ }
932
+ }
933
+ unPlan(instruction) {
934
+ const planned = this.getPlanned(instruction);
935
+ try {
936
+ if (planned)
937
+ this.scope.deregister(planned);
938
+ } catch (error) {
939
+ }
940
+ }
941
+ isAttached(node) {
942
+ return !!this.scope.resolve(new A_Dependency(AreNode, {
943
+ flat: true,
944
+ query: {
945
+ aseid: node.aseid
946
+ }
947
+ }));
948
+ }
949
+ attach(node) {
950
+ this.scope.register(node);
951
+ node.scope.inherit(this.scope);
952
+ }
953
+ sceneOf(node) {
954
+ return node.scope.resolveFlat(_AreScene);
955
+ }
956
+ propsOf(node) {
957
+ return node.scope.resolveFlat(AreProps);
958
+ }
959
+ storeOf(node) {
960
+ return node.scope.resolveFlat(AreStore);
961
+ }
962
+ isPlanned(action) {
963
+ return this.getPlanned(action) !== void 0;
964
+ }
965
+ /**
966
+ * It returns planned instruction instance from the scene
967
+ *
968
+ * [!] Only Planned instructions can be used for state checking
969
+ *
970
+ * @param instruction
971
+ * @returns
972
+ */
973
+ getPlanned(instruction) {
974
+ const planned = this.scope.resolve(new A_Dependency(AreSceneInstruction, {
975
+ flat: true,
976
+ query: {
977
+ aseid: instruction.aseid.toString()
978
+ }
979
+ }));
980
+ return planned;
981
+ }
982
+ /**
983
+ * Operation Only applicable from Plan -> State
984
+ *
985
+ * So only instructions presented in the plan can be moved to state
986
+ * State is a set of instructions that are currently applied to the scene
987
+ *
988
+ * @param instruction
989
+ */
990
+ setState(instruction) {
991
+ const planned = this.getPlanned(instruction);
992
+ if (planned) {
993
+ this._state.delete(planned.aseid.toString());
994
+ this._state.add(instruction.aseid.toString());
995
+ }
996
+ }
997
+ dropState(instruction) {
998
+ const planned = this.getPlanned(instruction);
999
+ if (planned) {
1000
+ this._state.delete(planned.aseid.toString());
1001
+ }
1002
+ }
1003
+ resetPlan(node) {
1004
+ for (const instruction of this.renderPlanFor(node)) {
1005
+ if (instruction.node === node) {
1006
+ this.unPlan(instruction);
1007
+ }
1008
+ }
1009
+ }
1010
+ resetState(node) {
1011
+ for (const instruction of this.renderPlanFor(node)) {
1012
+ if (instruction.node === node) {
1013
+ this._state.delete(instruction.aseid.toString());
1014
+ }
1015
+ }
1016
+ }
1017
+ getState(instruction) {
1018
+ const planned = this.getPlanned(instruction);
1019
+ if (!planned) {
1020
+ return void 0;
1021
+ }
1022
+ if (this._state.has(planned.aseid.toString()))
1023
+ return planned;
1024
+ else
1025
+ return void 0;
1026
+ }
1027
+ revert(instruction) {
1028
+ this._state.delete(instruction.aseid.toString());
1029
+ }
1030
+ reset() {
1031
+ this.index.clear();
1032
+ this._state.clear();
1033
+ }
1034
+ toJSON() {
1035
+ return {
1036
+ ...super.toJSON(),
1037
+ children: Object.fromEntries(
1038
+ Array.from(this.children).map((child) => [
1039
+ child.id.toString(),
1040
+ child.toJSON()
1041
+ ])
1042
+ )
1043
+ };
1044
+ }
1045
+ };
1046
+ var AreSceneError = class extends A_Error {
1047
+ };
1048
+ AreSceneError.SceneError = "AreSceneError.SceneError";
1049
+ AreSceneError.RootNotFound = "AreSceneError.RootNotFound";
1050
+ AreSceneError.UpdateFailed = "AreSceneError.UpdateFailed";
1051
+ AreSceneError.MountFailed = "AreSceneError.MountFailed";
1052
+ AreSceneError.UnmountFailed = "AreSceneError.UnmountFailed";
1053
+ AreSceneError.MountPointNotFound = "AreSceneError.MountPointNotFound";
1054
+ AreSceneError.InvalidTemplate = "AreSceneError.InvalidTemplate";
1055
+ AreSceneError.RenderFailed = "AreSceneError.RenderFailed";
1056
+ var AreNode = class extends A_Entity {
1057
+ get id() {
1058
+ return this.aseid.id;
1059
+ }
1060
+ get scope() {
1061
+ if (!this._scope) {
1062
+ this._scope = new A_Scope({
1063
+ name: `${this.aseid.id}`
1064
+ });
1065
+ }
1066
+ return this._scope;
1067
+ }
1068
+ get content() {
1069
+ return this.scope.resolveFlat(AreScene);
1070
+ }
1071
+ get type() {
1072
+ return this.aseid.entity;
1073
+ }
1074
+ get template() {
1075
+ return this._template;
1076
+ }
1077
+ get markup() {
1078
+ return this._markup;
1079
+ }
1080
+ get styles() {
1081
+ return this._styles;
1082
+ }
1083
+ fromNew(newEntity) {
1084
+ this.aseid = this.generateASEID({
1085
+ id: newEntity.id,
1086
+ entity: newEntity.component,
1087
+ scope: newEntity.scope
1088
+ });
1089
+ this._template = newEntity.template || "";
1090
+ this._markup = newEntity.markup || "";
1091
+ this._styles = newEntity.styles || "";
1092
+ }
1093
+ fromASEID(aseid) {
1094
+ super.fromASEID(aseid);
1095
+ this._template = "";
1096
+ this._markup = "";
1097
+ this._styles = "";
1098
+ }
1099
+ setTemplate(template) {
1100
+ this._template = template;
1101
+ }
1102
+ setMarkup(markup) {
1103
+ this._markup = markup;
1104
+ }
1105
+ setStyles(styles) {
1106
+ this._styles = styles;
1107
+ }
1108
+ async emit(eventOrScope) {
1109
+ this.checkScopeInheritance();
1110
+ const eventScope = A_TypeGuards.isScopeInstance(eventOrScope) ? eventOrScope.inherit(this.scope) : new A_Scope({
1111
+ name: `${eventOrScope.name}-scope`,
1112
+ fragments: [eventOrScope]
1113
+ }).inherit(this.scope);
1114
+ try {
1115
+ await this.call("_AreNode_onEvent" /* onEvent */, eventScope);
1116
+ eventScope.destroy();
1117
+ } catch (error) {
1118
+ eventScope.destroy();
1119
+ throw error;
1120
+ }
1121
+ }
1122
+ compile() {
1123
+ this.checkScopeInheritance();
1124
+ try {
1125
+ this.call("_AreNode_onCompile" /* onCompile */, this.scope);
1126
+ } catch (error) {
1127
+ throw error;
1128
+ }
1129
+ }
1130
+ render() {
1131
+ this.checkScopeInheritance();
1132
+ try {
1133
+ return this.call("_AreNode_onRender" /* onRender */, this.scope);
1134
+ } catch (error) {
1135
+ throw error;
1136
+ }
1137
+ }
1138
+ async update() {
1139
+ this.checkScopeInheritance();
1140
+ try {
1141
+ await this.call("_AreNode_onUpdate" /* onUpdate */, this.scope);
1142
+ } catch (error) {
1143
+ throw error;
1144
+ }
1145
+ }
1146
+ async reset() {
1147
+ this.scope.destroy();
1148
+ this._template = "";
1149
+ this._styles = "";
1150
+ this._scope = new A_Scope({
1151
+ name: `${this.aseid.id}`
1152
+ });
1153
+ }
1154
+ unmount() {
1155
+ this.checkScopeInheritance();
1156
+ try {
1157
+ this.call("_AreNode_onUnmount" /* onUnmount */, this.scope);
1158
+ } catch (error) {
1159
+ throw error;
1160
+ }
1161
+ }
1162
+ async load() {
1163
+ return await super.load(this.scope);
1164
+ }
1165
+ async destroy() {
1166
+ this.checkScopeInheritance();
1167
+ try {
1168
+ await super.destroy(this.scope);
1169
+ this.scope.destroy();
1170
+ } catch (error) {
1171
+ this._scope.destroy();
1172
+ throw error;
1173
+ }
1174
+ }
1175
+ //============================================================================================
1176
+ // Helpers Methods
1177
+ //============================================================================================
1178
+ /**
1179
+ * Method to ensure that the current scope is inherited from the context scope
1180
+ *
1181
+ * @throws A_Error if the scope is not inherited from the context scope
1182
+ */
1183
+ checkScopeInheritance() {
1184
+ let attachedScope;
1185
+ try {
1186
+ attachedScope = A_Context.scope(this);
1187
+ } catch (error) {
1188
+ throw new A_Error({
1189
+ title: `A_UI_Node Scope Inheritance Error`,
1190
+ description: `The A_UI_Node entity with ASEID '${this.aseid.toString()}' is not bound to any context scope. Please ensure that the entity is created within a valid context.`,
1191
+ originalError: error
1192
+ });
1193
+ }
1194
+ }
1195
+ };
1196
+ AreNode = __decorateClass([
1197
+ A_Frame.Entity({
1198
+ namespace: "A-ARE",
1199
+ name: "AreNode",
1200
+ description: "An AreNode entity represents a node within the A-Concept Rendering Engine (ARE) framework. It encapsulates template, markup, and styles, and manages its own scope for nested fragments and entities. AreNodes are responsible for handling events, compiling, rendering, updating, and lifecycle management within the ARE context."
1201
+ })
1202
+ ], AreNode);
1203
+
1204
+ // src/lib/AreSyntax/AreSyntax.component.ts
1205
+ var AreSyntax = class extends A_Component {
1206
+ get config() {
1207
+ return A_Context.scope(this).resolveFlat(AreSyntaxContext);
1208
+ }
1209
+ isRootNode(node) {
1210
+ return node.aseid.entity.toLowerCase() === this.config.rootTag;
1211
+ }
1212
+ isCustomNode(node) {
1213
+ return !this.config.standardTags.has(node.aseid.entity.toLowerCase());
1214
+ }
1215
+ extractRoots(template) {
1216
+ const rootTag = this.config.rootTag;
1217
+ const rootTagRegex = new RegExp(`<${rootTag}([\\s>])`, "gi");
1218
+ let match;
1219
+ const nodes = [];
1220
+ while ((match = rootTagRegex.exec(template)) !== null) {
1221
+ const startIndex = match.index;
1222
+ const endTag = `</${rootTag}>`;
1223
+ const endIndex = template.indexOf(endTag, startIndex);
1224
+ if (endIndex === -1) {
1225
+ throw new A_Error(`Missing closing tag for <${rootTag}> starting at index ${startIndex}`);
1226
+ }
1227
+ const attributes = this.extractAttributes(template.slice(startIndex, endIndex + endTag.length));
1228
+ let rootId = `auto-root-${startIndex}`;
1229
+ for (let i = 0; i < attributes.length; i++) {
1230
+ if (attributes[i].name === "id") {
1231
+ rootId = attributes[i].value;
1232
+ break;
1233
+ }
1234
+ }
1235
+ const markup = template.slice(startIndex, endIndex + endTag.length);
1236
+ const content = markup.slice(rootTag.length + 2, -endTag.length).trim();
1237
+ const node = new AreNode({
1238
+ id: rootId,
1239
+ scope: "are",
1240
+ component: "are-root",
1241
+ markup,
1242
+ template: content
1243
+ });
1244
+ nodes.push(node);
1245
+ }
1246
+ return nodes;
1247
+ }
1248
+ extractInterpolations(template) {
1249
+ const interpolationRegex = new RegExp(`${this.config.interpolationDelimiters[0]}\\s*([a-zA-Z0-9_.$]+)\\s*${this.config.interpolationDelimiters[1]}`, "g");
1250
+ const interpolations = [];
1251
+ let match;
1252
+ while ((match = interpolationRegex.exec(template)) !== null) {
1253
+ interpolations.push({
1254
+ raw: match[0],
1255
+ name: match[1],
1256
+ position: match.index
1257
+ });
1258
+ }
1259
+ return interpolations;
1260
+ }
1261
+ extractDirectives(template) {
1262
+ const trimmedTemplate = template.trim();
1263
+ const firstTagMatch = trimmedTemplate.match(
1264
+ /^<([a-zA-Z][^\s/>]*)(\s[^>]*?)?>/
1265
+ );
1266
+ if (!firstTagMatch) return [];
1267
+ const tag = firstTagMatch[1];
1268
+ const attributesPart = firstTagMatch[2];
1269
+ if (!attributesPart) return [];
1270
+ const directiveRegex = new RegExp(
1271
+ `\\s+(\\${this.config.directiveDelimiter}[a-zA-Z0-9_-]+)(?:\\s*=\\s*(?:"([^"]*)"|'([^']*)'))?`,
1272
+ "g"
1273
+ );
1274
+ let match;
1275
+ const directives = [];
1276
+ while ((match = directiveRegex.exec(attributesPart)) !== null) {
1277
+ const name = match[1];
1278
+ if (this.config.customDirectives && this.config.customDirectives.length > 0 && !this.config.customDirectives.includes(name)) {
1279
+ continue;
1280
+ }
1281
+ const raw = match[0];
1282
+ const value = match[2] ?? match[3];
1283
+ const tagTemplate = firstTagMatch[0];
1284
+ directives.push({
1285
+ tag,
1286
+ name,
1287
+ raw,
1288
+ value,
1289
+ template: tagTemplate
1290
+ });
1291
+ }
1292
+ return directives;
1293
+ }
1294
+ /**
1295
+ * Extracts component props from the FIRST opening tag.
1296
+ *
1297
+ * Examples:
1298
+ * label="Click"
1299
+ * :label="'Click Me'"
1300
+ *
1301
+ * Excludes:
1302
+ * @click
1303
+ * $if
1304
+ */
1305
+ extractAttributes(template) {
1306
+ const firstTagMatch = template.match(
1307
+ /^<([a-zA-Z][^\s/>]*)(\s[^>]*?)?>/
1308
+ );
1309
+ if (!firstTagMatch) return [];
1310
+ const tag = firstTagMatch[1];
1311
+ const attributesPart = firstTagMatch[2];
1312
+ if (!attributesPart) return [];
1313
+ const propRegex = new RegExp(
1314
+ `\\s+(\\${this.config.bindingDelimiter}?)([a-zA-Z][a-zA-Z0-9._-]*)\\s*=\\s*(?:"([^"]*)"|'([^']*)')`,
1315
+ "g"
1316
+ );
1317
+ let match;
1318
+ const attributes = [];
1319
+ while ((match = propRegex.exec(attributesPart)) !== null) {
1320
+ const isBinding = match[1] === this.config.bindingDelimiter;
1321
+ const name = match[2];
1322
+ if (name.startsWith(this.config.listenerDelimiter) || name.startsWith(this.config.directiveDelimiter)) {
1323
+ continue;
1324
+ }
1325
+ const raw = match[0];
1326
+ const value = match[3] ?? match[4];
1327
+ attributes.push({
1328
+ tag,
1329
+ name,
1330
+ raw,
1331
+ value: value || "",
1332
+ binding: isBinding
1333
+ });
1334
+ }
1335
+ return attributes;
1336
+ }
1337
+ /**
1338
+ * Extracts event listeners from the FIRST/TOP-LEVEL opening tag ONLY in the template.
1339
+ * Supports:
1340
+ * - @event="handler"
1341
+ * - @event='handler'
1342
+ *
1343
+ * Note: This method intentionally ignores nested elements and only processes
1344
+ * the very first opening tag in the provided template string.
1345
+ */
1346
+ extractListeners(template) {
1347
+ const trimmedTemplate = template.trim();
1348
+ const firstTagMatch = trimmedTemplate.match(
1349
+ /^<([a-zA-Z][^\s/>]*)(\s[^>]*?)?>/
1350
+ );
1351
+ if (!firstTagMatch) return [];
1352
+ const tag = firstTagMatch[1];
1353
+ const attributesPart = firstTagMatch[2];
1354
+ if (!attributesPart) return [];
1355
+ const listenerRegex = new RegExp(
1356
+ `\\s+${this.config.listenerDelimiter}([a-zA-Z0-9_:-]+)\\s*=\\s*(?:"([^"]*)"|'([^']*)')`,
1357
+ "g"
1358
+ );
1359
+ let match;
1360
+ const listeners = [];
1361
+ while ((match = listenerRegex.exec(attributesPart)) !== null) {
1362
+ const raw = match[0];
1363
+ const name = match[1];
1364
+ const handler = match[2] ?? match[3] ?? "";
1365
+ listeners.push({
1366
+ tag,
1367
+ name,
1368
+ raw,
1369
+ handler
1370
+ });
1371
+ }
1372
+ return listeners;
1373
+ }
1374
+ isBindingProp(prop) {
1375
+ return prop.raw.trim().startsWith(this.config.bindingDelimiter);
1376
+ }
1377
+ extractPropValue(prop, parentStore) {
1378
+ if (prop.value == null) {
1379
+ return void 0;
1380
+ }
1381
+ if (prop.binding) {
1382
+ const value = prop.value.trim();
1383
+ if (value.startsWith("'") && value.endsWith("'") || value.startsWith('"') && value.endsWith('"')) {
1384
+ return value.slice(1, -1);
1385
+ }
1386
+ return parentStore?.get(value);
1387
+ }
1388
+ return prop.value;
1389
+ }
1390
+ replaceInterpolation(template, interpolation, value) {
1391
+ const key = typeof interpolation === "string" ? interpolation : interpolation.name;
1392
+ return template.replace(new RegExp(`${this.config.interpolationDelimiters[0]}\\s*${key}\\s*${this.config.interpolationDelimiters[1]}`, "g"), value !== void 0 ? String(value) : "");
1393
+ }
1394
+ };
1395
+ __decorateClass([
1396
+ A_Frame.Method({
1397
+ description: "Determines if a given AreNode is a root node based on its entity type."
1398
+ })
1399
+ ], AreSyntax.prototype, "isRootNode", 1);
1400
+ __decorateClass([
1401
+ A_Frame.Method({
1402
+ description: "Determines if a given AreNode represents a custom component as opposed to a standard HTML tag."
1403
+ })
1404
+ ], AreSyntax.prototype, "isCustomNode", 1);
1405
+ __decorateClass([
1406
+ A_Frame.Method({
1407
+ description: "Extracts root AreNode elements from the document based on the configured root tag."
1408
+ })
1409
+ ], AreSyntax.prototype, "extractRoots", 1);
1410
+ __decorateClass([
1411
+ A_Frame.Method({
1412
+ description: "Extracts interpolations from a template string based on the configured interpolation delimiters."
1413
+ })
1414
+ ], AreSyntax.prototype, "extractInterpolations", 1);
1415
+ __decorateClass([
1416
+ A_Frame.Method({
1417
+ description: "Extracts custom directives from the first opening tag of a template string."
1418
+ })
1419
+ ], AreSyntax.prototype, "extractDirectives", 1);
1420
+ AreSyntax = __decorateClass([
1421
+ A_Frame.Component({
1422
+ namespace: "A-ARE",
1423
+ name: "AreSyntax",
1424
+ description: "Context component that defines the syntax rules and structures for the A-Concept Rendering Engine (ARE). It provides mechanisms for parsing and interpreting templates, attributes, directives, interpolations, and event listeners, enabling dynamic and interactive UI rendering within the ARE framework."
1425
+ })
1426
+ ], AreSyntax);
1427
+ var AreSyntaxError = class extends A_Error {
1428
+ };
1429
+ AreSyntaxError.SyntaxParseError = "Are Syntax Parse Error";
1430
+ AreSyntaxError.SyntaxNotSupportedError = "Are Syntax Not Supported Error";
1431
+ AreSyntaxError.MethodNotImplementedError = "Are Syntax Method Not Implemented Error";
1432
+ var AreInitSignal = class _AreInitSignal extends A_Signal {
1433
+ static async default() {
1434
+ return new _AreInitSignal({ data: { ready: false } });
1435
+ }
1436
+ };
1437
+ var AreRouteSignal = class _AreRouteSignal extends A_Signal {
1438
+ constructor(path) {
1439
+ super({
1440
+ data: {
1441
+ route: new A_Route(path)
1442
+ }
1443
+ });
1444
+ }
1445
+ get route() {
1446
+ return this.data.route;
1447
+ }
1448
+ static async default() {
1449
+ return new _AreRouteSignal(document.location.href);
1450
+ }
1451
+ };
1452
+ var _a, _b;
1453
+ var AreApp = class extends A_Service {
1454
+ async [_b = A_ServiceFeatures.onAfterLoad](context, logger) {
1455
+ }
1456
+ async [_a = A_ServiceFeatures.onStart](context, syntax, bus, logger) {
1457
+ for (const root of syntax.extractRoots(context.source)) {
1458
+ context.addRoot(root);
1459
+ let startTime = Date.now();
1460
+ await root.load();
1461
+ logger?.info("red", `Root <${root.aseid.id}> loaded in ${Date.now() - startTime} ms.`);
1462
+ startTime = Date.now();
1463
+ root.compile();
1464
+ logger?.info("red", `Root <${root.aseid.id}> compiled in ${Date.now() - startTime} ms.`);
1465
+ startTime = Date.now();
1466
+ root.render();
1467
+ logger?.info("red", `Root <${root.aseid.id}> rendered in ${Date.now() - startTime} ms.`);
1468
+ }
1469
+ logger?.debug("cyan", `UI Application started at <${context.roots.map((root) => root.aseid.id).join(", ")}> with ${context.roots.length} root nodes.`);
1470
+ await bus.next(new AreInitSignal());
1471
+ }
1472
+ };
1473
+ __decorateClass([
1474
+ A_Feature.Extend(),
1475
+ __decorateParam(0, A_Dependency.Required()),
1476
+ __decorateParam(0, A_Inject(AreContext)),
1477
+ __decorateParam(1, A_Inject(A_Logger))
1478
+ ], AreApp.prototype, _b, 1);
1479
+ __decorateClass([
1480
+ A_Feature.Extend(),
1481
+ __decorateParam(0, A_Dependency.Required()),
1482
+ __decorateParam(0, A_Inject(AreContext)),
1483
+ __decorateParam(1, A_Inject(AreSyntax)),
1484
+ __decorateParam(2, A_Inject(A_SignalBus)),
1485
+ __decorateParam(3, A_Inject(A_Logger))
1486
+ ], AreApp.prototype, _a, 1);
1487
+ var AreAppError = class extends A_Error {
1488
+ };
1489
+ var AreCompilerError = class extends A_Error {
1490
+ };
1491
+ AreCompilerError.RenderError = "Are Compiler Render Error";
1492
+ AreCompilerError.CompilationError = "Are Compiler Compilation Error";
1493
+
1494
+ // src/lib/AreCompiler/AreCompiler.component.ts
1495
+ var AreCompiler = class extends A_Component {
1496
+ // ==================================================================================
1497
+ // ========================= COMPONENT METHODS ======================================
1498
+ // ==================================================================================
1499
+ index(node) {
1500
+ }
1501
+ component(node) {
1502
+ let scope;
1503
+ try {
1504
+ scope = node.scope;
1505
+ } catch (error) {
1506
+ scope = A_Context.scope(this);
1507
+ }
1508
+ return scope.resolve(A_FormatterHelper.toPascalCase(node.aseid.entity));
1509
+ }
1510
+ async beforeLoad(node, scope, feature, ...args) {
1511
+ scope.resolve(A_Logger);
1512
+ const component = scope.resolveOnce(A_FormatterHelper.toPascalCase(node.aseid.entity));
1513
+ if (component)
1514
+ await feature.chain(component, "_Are_onBeforeLoad" /* onBeforeLoad */, node.scope);
1515
+ }
1516
+ async load(node, scope, syntax, feature, logger, ...args) {
1517
+ const loadTimerLabel = `Load Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()}`;
1518
+ console.time(loadTimerLabel);
1519
+ console.time(`Load: Component Resolution for <${node.aseid.entity}>`);
1520
+ const component = this.component(node);
1521
+ console.timeEnd(`Load: Component Resolution for <${node.aseid.entity}>`);
1522
+ if (!component && syntax.isCustomNode(node)) {
1523
+ logger?.warning(
1524
+ "Component Not Found",
1525
+ `No component registered for entity: ${node.aseid.entity}. Please ensure that the component is registered in the scope before rendering.`
1526
+ );
1527
+ }
1528
+ console.time(`Load: Scene/Store/Props Creation for <${node.aseid.entity}>`);
1529
+ const newNodeScene = new AreScene(node.aseid);
1530
+ const newNodeIndex = new AreIndex(node.aseid);
1531
+ const newNodeStore = new AreStore(node.aseid);
1532
+ const newNodeProps = new AreProps(node.aseid);
1533
+ scope.register(newNodeScene);
1534
+ scope.register(newNodeIndex);
1535
+ if (syntax.isCustomNode(node)) {
1536
+ scope.register(newNodeStore);
1537
+ scope.register(newNodeProps);
1538
+ }
1539
+ console.timeEnd(`Load: Scene/Store/Props Creation for <${node.aseid.entity}>`);
1540
+ if (component) {
1541
+ console.time(`Load: Component Lifecycle Chains for <${node.aseid.entity}>`);
1542
+ await feature.chain(component, "_Are_onData" /* onData */, scope);
1543
+ await feature.chain(component, "_Are_onStyles" /* onStyles */, scope);
1544
+ await feature.chain(component, "_Are_onTemplate" /* onTemplate */, scope);
1545
+ console.timeEnd(`Load: Component Lifecycle Chains for <${node.aseid.entity}>`);
1546
+ }
1547
+ console.time(`Load: Node Indexing for <${node.aseid.entity}>`);
1548
+ this.index(node);
1549
+ console.timeEnd(`Load: Node Indexing for <${node.aseid.entity}>`);
1550
+ logger?.debug(newNodeScene.debugPrefix + `Loaded component <${node.aseid.entity}> with ${this.constructor.name}`);
1551
+ console.time(`Load: Child Nodes Processing for <${node.aseid.entity}>`);
1552
+ const sceneNodes = newNodeScene.nodes();
1553
+ for (let i = 0; i < sceneNodes.length; i++) {
1554
+ const sceneNode = sceneNodes[i];
1555
+ const childTimerLabel = `Load: Child Node [${i}] <${sceneNode.aseid.entity}> for Parent <${node.aseid.entity}>`;
1556
+ console.time(childTimerLabel);
1557
+ if (!newNodeScene.isAttached(sceneNode)) {
1558
+ newNodeScene.attach(sceneNode);
1559
+ await sceneNode.load();
1560
+ }
1561
+ console.timeEnd(childTimerLabel);
1562
+ }
1563
+ console.timeEnd(`Load: Child Nodes Processing for <${node.aseid.entity}>`);
1564
+ console.timeEnd(loadTimerLabel);
1565
+ }
1566
+ async afterLoad(node, scope, scene, feature, ...args) {
1567
+ const logger = scope.resolve(A_Logger);
1568
+ logger?.debug(scene.debugPrefix + `[Load -> After] Component Trigger for <${node.aseid.entity}> with aseid :{${node.aseid.toString()}}`);
1569
+ const component = this.component(node);
1570
+ if (component)
1571
+ await feature.chain(component, "_Are_onAfterLoad" /* onAfterLoad */, node.scope);
1572
+ }
1573
+ beforeCompile(node, scope, scene, feature, ...args) {
1574
+ const logger = scope.resolve(A_Logger);
1575
+ logger?.debug(scene.debugPrefix + `[Compile -> Before] Component Trigger for <${node.aseid.entity}> with aseid :{${node.aseid.toString()}}`);
1576
+ const component = scope.resolveOnce(A_FormatterHelper.toPascalCase(node.aseid.entity));
1577
+ if (component)
1578
+ feature.chain(component, "_Are_onBeforeCompile" /* onBeforeCompile */, node.scope);
1579
+ }
1580
+ compile(node, scene, parentScene, syntax, props, store, parentStore, logger, scope) {
1581
+ const compileTimerLabel = `Compile Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()}`;
1582
+ console.time(compileTimerLabel);
1583
+ try {
1584
+ if (!syntax.isRootNode(node)) {
1585
+ logger?.debug("violet", scene.debugPrefix + `Compiling node <${node.aseid.entity}> in Scene <${parentScene.name}>`);
1586
+ console.time(`Compile: Mount Instruction Planning for <${node.aseid.entity}>`);
1587
+ const mountInstruction = new MountNodeInstruction(node, scene.path);
1588
+ if (!parentScene.isPlanned(mountInstruction)) {
1589
+ logger?.debug("red", scene.debugPrefix + `Planning Node Mount for Node <${node.type}> ASEID: <${node.aseid.entity}>`);
1590
+ parentScene.plan(mountInstruction);
1591
+ mountInstruction.init();
1592
+ }
1593
+ console.timeEnd(`Compile: Mount Instruction Planning for <${node.aseid.entity}>`);
1594
+ console.time(`Compile: Template Interpolation Processing for <${node.aseid.entity}>`);
1595
+ if (syntax.isCustomNode(node)) {
1596
+ const interpolations = syntax.extractInterpolations(node.template);
1597
+ for (let i = 0; i < interpolations.length; i++) {
1598
+ const interpolation = interpolations[i];
1599
+ console.time(`Compile: Interpolation [${i}] "${interpolation.name}" for <${node.aseid.entity}>`);
1600
+ const value = store.get(interpolation.name) || parentStore.get(interpolation.name);
1601
+ const instruction = new ReplaceInterpolationInstruction(node, interpolation, value);
1602
+ const stateInstruction = parentScene.getState(instruction);
1603
+ instruction.update({ value, prevValue: stateInstruction?.value });
1604
+ if (!parentScene.isPlanned(instruction)) {
1605
+ parentScene.plan(instruction);
1606
+ instruction.init();
1607
+ } else {
1608
+ parentScene.dropState(instruction);
1609
+ parentScene.unPlan(instruction);
1610
+ parentScene.plan(instruction);
1611
+ }
1612
+ console.timeEnd(`Compile: Interpolation [${i}] "${interpolation.name}" for <${node.aseid.entity}>`);
1613
+ }
1614
+ }
1615
+ console.timeEnd(`Compile: Template Interpolation Processing for <${node.aseid.entity}>`);
1616
+ console.time(`Compile: Attributes Processing for <${node.aseid.entity}>`);
1617
+ const attributes = syntax.extractAttributes(node.markup);
1618
+ for (let i = 0; i < attributes.length; i++) {
1619
+ const attr = attributes[i];
1620
+ console.time(`Compile: Attribute [${i}] "${attr.name}" for <${node.aseid.entity}>`);
1621
+ const name = attr.name;
1622
+ const value = (syntax.isBindingProp(attr) ? store.get(attr.value) || parentStore.get(attr.value) : attr.value) || "";
1623
+ props.set(name, value);
1624
+ parentScene.plan(new AddAttributeInstruction(node, name, value));
1625
+ console.timeEnd(`Compile: Attribute [${i}] "${attr.name}" for <${node.aseid.entity}>`);
1626
+ }
1627
+ console.timeEnd(`Compile: Attributes Processing for <${node.aseid.entity}>`);
1628
+ console.time(`Compile: Directives Processing for <${node.aseid.entity}>`);
1629
+ const directives = syntax.extractDirectives(node.markup);
1630
+ for (let i = 0; i < directives.length; i++) {
1631
+ const directive = directives[i];
1632
+ console.time(`Compile: Directive [${i}] "${directive.name}" for <${node.aseid.entity}>`);
1633
+ let directiveValue;
1634
+ if (directive.value) {
1635
+ directiveValue = store.get(directive.value) || parentStore.get(directive.value);
1636
+ }
1637
+ let instruction = new AddDirectiveInstruction(node, directive, directiveValue);
1638
+ const stateInstruction = parentScene.getState(instruction);
1639
+ if (!stateInstruction || stateInstruction.value !== directiveValue) {
1640
+ parentScene.unPlan(instruction);
1641
+ parentScene.plan(instruction);
1642
+ instruction.init();
1643
+ }
1644
+ console.timeEnd(`Compile: Directive [${i}] "${directive.name}" for <${node.aseid.entity}>`);
1645
+ }
1646
+ console.timeEnd(`Compile: Directives Processing for <${node.aseid.entity}>`);
1647
+ console.time(`Compile: Styles Processing for <${node.aseid.entity}>`);
1648
+ let styles = node.styles || "";
1649
+ const styleInterpolations = syntax.extractInterpolations(styles);
1650
+ for (let i = 0; i < styleInterpolations.length; i++) {
1651
+ const interpolation = styleInterpolations[i];
1652
+ console.time(`Compile: Style Interpolation [${i}] "${interpolation.name}" for <${node.aseid.entity}>`);
1653
+ const value = store.get(interpolation.name);
1654
+ styles = syntax.replaceInterpolation(styles, interpolation, value);
1655
+ console.timeEnd(`Compile: Style Interpolation [${i}] "${interpolation.name}" for <${node.aseid.entity}>`);
1656
+ }
1657
+ if (styles.trim()) {
1658
+ const instruction = new AddStyleInstruction(node, styles);
1659
+ if (!parentScene.isPlanned(instruction)) {
1660
+ parentScene.plan(instruction);
1661
+ instruction.init();
1662
+ }
1663
+ }
1664
+ console.timeEnd(`Compile: Styles Processing for <${node.aseid.entity}>`);
1665
+ console.time(`Compile: Listeners Processing for <${node.aseid.entity}>`);
1666
+ const listeners = syntax.extractListeners(node.markup);
1667
+ for (let i = 0; i < listeners.length; i++) {
1668
+ const listener = listeners[i];
1669
+ console.time(`Compile: Listener [${i}] "${listener.name}" for <${node.aseid.entity}>`);
1670
+ let currentScene = scene;
1671
+ let targetNode = node;
1672
+ while (!syntax.isCustomNode(targetNode) && currentScene.parent) {
1673
+ targetNode = currentScene.parent.scope.resolve(new A_Dependency(AreNode, {
1674
+ query: {
1675
+ aseid: currentScene.id
1676
+ }
1677
+ }));
1678
+ currentScene = currentScene.parent;
1679
+ }
1680
+ const instruction = new AttachListenerInstruction(node, targetNode, listener);
1681
+ if (!parentScene.isPlanned(instruction)) {
1682
+ parentScene.plan(instruction);
1683
+ instruction.init();
1684
+ }
1685
+ console.timeEnd(`Compile: Listener [${i}] "${listener.name}" for <${node.aseid.entity}>`);
1686
+ }
1687
+ console.timeEnd(`Compile: Listeners Processing for <${node.aseid.entity}>`);
1688
+ }
1689
+ console.time(`Compile: Child Nodes Compilation for <${node.aseid.entity}>`);
1690
+ const sceneNodes = scene.nodes();
1691
+ for (let i = 0; i < sceneNodes.length; i++) {
1692
+ const sceneNode = sceneNodes[i];
1693
+ const childTimerLabel = `Compile: Child Node [${i}] <${sceneNode.aseid.entity}> for Parent <${node.aseid.entity}>`;
1694
+ console.time(childTimerLabel);
1695
+ sceneNode.compile();
1696
+ console.timeEnd(childTimerLabel);
1697
+ }
1698
+ console.timeEnd(`Compile: Child Nodes Compilation for <${node.aseid.entity}>`);
1699
+ } catch (error) {
1700
+ logger?.error(error);
1701
+ }
1702
+ console.timeEnd(compileTimerLabel);
1703
+ }
1704
+ afterCompile(node, scope, scene, feature, ...args) {
1705
+ const logger = scope.resolve(A_Logger);
1706
+ const component = scope.resolveOnce(A_FormatterHelper.toPascalCase(node.aseid.entity));
1707
+ logger?.debug(scene.debugPrefix + `[Compile -> After] Component Trigger for <${node.aseid.entity}> with aseid :{${node.aseid.toString()}}`);
1708
+ if (component)
1709
+ feature.chain(component, "_Are_onAfterCompile" /* onAfterCompile */, node.scope);
1710
+ }
1711
+ async event(node, scope, event, scene, feature, ...args) {
1712
+ const logger = scope.resolve(A_Logger);
1713
+ logger?.debug(scene.debugPrefix + `Event Trigger for <${node.aseid.entity}> with aseid :{${node.aseid.toString()}} for event: ${event.name}`);
1714
+ const component = scope.resolveOnce(A_FormatterHelper.toPascalCase(node.aseid.entity));
1715
+ if (component) {
1716
+ try {
1717
+ await feature.chain(component, event.name, scope);
1718
+ } catch (error) {
1719
+ logger?.error(error);
1720
+ }
1721
+ }
1722
+ }
1723
+ beforeRender(node, scope, scene, feature, ...args) {
1724
+ const logger = scope.resolve(A_Logger);
1725
+ const component = scope.resolveOnce(A_FormatterHelper.toPascalCase(node.aseid.entity));
1726
+ logger?.debug(scene.debugPrefix + `[Render -> Before] Component Trigger for <${node.aseid.entity}> with aseid :{${node.aseid.toString()}}`);
1727
+ if (component)
1728
+ feature.chain(component, "_Are_onBeforeRender" /* onBeforeRender */, node.scope);
1729
+ }
1730
+ render(node, syntax, scene, parentScene, logger, ...args) {
1731
+ const renderTimerLabel = `Render Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()}`;
1732
+ console.time(renderTimerLabel);
1733
+ if (syntax.isRootNode(node)) {
1734
+ logger?.debug("red", scene.debugPrefix + `Rendering Root Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()}`);
1735
+ console.time(`Render: Root Node Attachment for <${node.aseid.entity}>`);
1736
+ new AttachRootNodeInstruction(node).apply(node.scope);
1737
+ console.timeEnd(`Render: Root Node Attachment for <${node.aseid.entity}>`);
1738
+ } else {
1739
+ if (!parentScene) {
1740
+ throw new AreCompilerError(
1741
+ AreCompilerError.RenderError,
1742
+ `Parent Scene not found for Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()} during render process.`
1743
+ );
1744
+ }
1745
+ logger?.debug("red", scene.debugPrefix + `Rendering Child Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()}`, parentScene);
1746
+ console.time(`Render: Mount/Unmount Instructions Processing for <${node.aseid.entity}>`);
1747
+ const mountUnmountInstructions = parentScene.renderPlanFor(node, {
1748
+ filter: (inst) => inst instanceof MountNodeInstruction || inst instanceof UnmountNodeInstruction
1749
+ });
1750
+ for (let i = 0; i < mountUnmountInstructions.length; i++) {
1751
+ const instruction = mountUnmountInstructions[i];
1752
+ const instructionTimerLabel = `Render: Mount/Unmount Instruction [${i}] "${instruction.action}" for <${node.aseid.entity}>`;
1753
+ console.time(instructionTimerLabel);
1754
+ if (parentScene.getState(instruction)) {
1755
+ logger?.debug("yellow", scene.debugPrefix + `Skipping Action '${instruction.action}' for Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()} already processed.`);
1756
+ console.timeEnd(instructionTimerLabel);
1757
+ continue;
1758
+ }
1759
+ logger?.debug("red", scene.debugPrefix + `Processing ${instruction.action} Instruction for Node <${node.aseid.entity}> `);
1760
+ instruction.apply();
1761
+ parentScene.setState(instruction);
1762
+ console.timeEnd(instructionTimerLabel);
1763
+ }
1764
+ console.timeEnd(`Render: Mount/Unmount Instructions Processing for <${node.aseid.entity}>`);
1765
+ if (!parentScene.isPlanned(new MountNodeInstruction(node, scene.path))) {
1766
+ logger?.debug("yellow", scene.debugPrefix + `No Mount Instruction found for Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()}. Skipping...`);
1767
+ console.timeEnd(renderTimerLabel);
1768
+ return;
1769
+ }
1770
+ console.time(`Render: Other Instructions Processing for <${node.aseid.entity}>`);
1771
+ const otherInstructions = parentScene.renderPlanFor(node, {
1772
+ order: [
1773
+ AddStyleInstruction,
1774
+ AttachListenerInstruction,
1775
+ AddAttributeInstruction,
1776
+ ReplaceInterpolationInstruction
1777
+ ]
1778
+ });
1779
+ for (let i = 0; i < otherInstructions.length; i++) {
1780
+ const instruction = otherInstructions[i];
1781
+ const instructionTimerLabel = `Render: Instruction [${i}] "${instruction.action}" for <${node.aseid.entity}>`;
1782
+ console.time(instructionTimerLabel);
1783
+ if (parentScene.getState(instruction)) {
1784
+ logger?.debug("yellow", scene.debugPrefix + `Skipping Action '${instruction.action}' for Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()} already processed.`);
1785
+ console.timeEnd(instructionTimerLabel);
1786
+ continue;
1787
+ }
1788
+ try {
1789
+ console.time(`Render: Execution Context Creation for Instruction [${i}] <${node.aseid.entity}>`);
1790
+ const executionContext = new A_ExecutionContext("AreBrowserCompiler: Mount Node Instruction");
1791
+ executionContext.set("content", scene);
1792
+ const applyScope = new A_Scope({ fragments: [executionContext] }).inherit(node.scope);
1793
+ console.timeEnd(`Render: Execution Context Creation for Instruction [${i}] <${node.aseid.entity}>`);
1794
+ console.time(`Render: Instruction Apply for [${i}] "${instruction.action}" <${node.aseid.entity}>`);
1795
+ instruction.apply(applyScope);
1796
+ console.timeEnd(`Render: Instruction Apply for [${i}] "${instruction.action}" <${node.aseid.entity}>`);
1797
+ applyScope.destroy();
1798
+ parentScene.setState(instruction);
1799
+ } catch (error) {
1800
+ logger?.error(error);
1801
+ }
1802
+ console.timeEnd(instructionTimerLabel);
1803
+ }
1804
+ console.timeEnd(`Render: Other Instructions Processing for <${node.aseid.entity}>`);
1805
+ }
1806
+ console.time(`Render: Child Nodes Rendering for <${node.aseid.entity}>`);
1807
+ const childNodes = scene.nodes();
1808
+ for (let i = 0; i < childNodes.length; i++) {
1809
+ const child = childNodes[i];
1810
+ const childTimerLabel = `Render: Child Node [${i}] <${child.aseid.entity}> for Parent <${node.aseid.entity}>`;
1811
+ console.time(childTimerLabel);
1812
+ console.log(scene.debugPrefix + `Rendering Child Node <${child.aseid.entity}> ASEID: ${child.aseid.toString()}`);
1813
+ child.render();
1814
+ console.timeEnd(childTimerLabel);
1815
+ }
1816
+ console.timeEnd(`Render: Child Nodes Rendering for <${node.aseid.entity}>`);
1817
+ console.timeEnd(renderTimerLabel);
1818
+ }
1819
+ afterRender(node, scope, scene, feature, ...args) {
1820
+ const logger = scope.resolve(A_Logger);
1821
+ const component = this.component(node);
1822
+ logger?.debug(scene.debugPrefix + `[Render -> After] Component Trigger for <${node.aseid.entity}> with aseid :{${node.aseid.toString()}}`);
1823
+ if (component)
1824
+ feature.chain(component, "_Are_onAfterRender" /* onAfterRender */, node.scope);
1825
+ }
1826
+ beforeUpdate(node, scope, scene, feature, ...args) {
1827
+ const logger = scope.resolve(A_Logger);
1828
+ logger?.debug(scene.debugPrefix + `[Update -> Before] Component Trigger for <${node.aseid.entity}> with aseid :{${node.aseid.toString()}}`);
1829
+ const component = this.component(node);
1830
+ if (component)
1831
+ feature.chain(component, "_Are_onBeforeUpdate" /* onBeforeUpdate */, node.scope);
1832
+ }
1833
+ update(node, scene, ...args) {
1834
+ console.time(scene.debugPrefix + `Updating Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()}`);
1835
+ console.time(`Node Compile Time for <${node.aseid.entity}> ASEID: ${node.aseid.toString()}>`);
1836
+ node.compile();
1837
+ console.timeEnd(`Node Compile Time for <${node.aseid.entity}> ASEID: ${node.aseid.toString()}>`);
1838
+ console.time(`Node Render Time for <${node.aseid.entity}> ASEID: ${node.aseid.toString()}>`);
1839
+ node.render();
1840
+ console.timeEnd(`Node Render Time for <${node.aseid.entity}> ASEID: ${node.aseid.toString()}>`);
1841
+ console.timeEnd(scene.debugPrefix + `Updating Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()}`);
1842
+ }
1843
+ afterUpdate(node, scope, scene, feature, ...args) {
1844
+ const logger = scope.resolve(A_Logger);
1845
+ logger?.debug(scene.debugPrefix + `[Update -> After] Component Trigger for <${node.aseid.entity}> with aseid :{${node.aseid.toString()}}`);
1846
+ const component = this.component(node);
1847
+ if (component)
1848
+ feature.chain(component, "_Are_onAfterUpdate" /* onAfterUpdate */, node.scope);
1849
+ }
1850
+ beforeUnmount(node, scope, scene, feature, ...args) {
1851
+ const logger = scope.resolve(A_Logger);
1852
+ logger?.debug(scene.debugPrefix + `[Unmount -> Before] Component Trigger for <${node.aseid.entity}> with aseid :{${node.aseid.toString()}}`);
1853
+ const component = this.component(node);
1854
+ if (component)
1855
+ feature.chain(component, "_Are_onBeforeUnmount" /* onBeforeUnmount */, node.scope);
1856
+ }
1857
+ unmount(node, syntax, scene, parentScene, logger) {
1858
+ try {
1859
+ logger?.debug("red", scene.debugPrefix + `Unmounting Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()}`);
1860
+ if (!syntax.isRootNode(node)) {
1861
+ if (!parentScene) {
1862
+ throw new AreCompilerError(
1863
+ AreCompilerError.RenderError,
1864
+ `Parent Scene not found for Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()} during unmount process.`
1865
+ );
1866
+ }
1867
+ for (const instruction of parentScene.renderPlanFor(node)) {
1868
+ if (instruction.node === node) {
1869
+ instruction.revert(node.scope);
1870
+ parentScene.dropState(instruction);
1871
+ parentScene.unPlan(instruction);
1872
+ }
1873
+ }
1874
+ }
1875
+ for (const child of scene.nodes()) {
1876
+ child.unmount();
1877
+ }
1878
+ } catch (error) {
1879
+ logger?.error(error);
1880
+ }
1881
+ }
1882
+ afterUnmount(node, scope, scene, feature, ...args) {
1883
+ const logger = scope.resolve(A_Logger);
1884
+ logger?.debug(scene.debugPrefix + `[Unmount -> After] Component Trigger for <${node.aseid.entity}> with aseid :{${node.aseid.toString()}}`);
1885
+ const component = this.component(node);
1886
+ if (component)
1887
+ feature.chain(component, "_Are_onAfterUnmount" /* onAfterUnmount */, node.scope);
1888
+ }
1889
+ handleSignalVector(vector, context, state, scope, logger) {
1890
+ logger?.info(`Handling Signal Vector with ${context.roots.length} root nodes.`);
1891
+ try {
1892
+ for (const root of context.roots) {
1893
+ const callScope = new A_Scope({
1894
+ fragments: [new AreEvent(
1895
+ "_Are_onSignal" /* onSignal */,
1896
+ {
1897
+ event: "SignalVectorNext",
1898
+ data: { vector }
1899
+ }
1900
+ )]
1901
+ }).import(scope, root.scope);
1902
+ console.log("Emitting signal for root node:", vector);
1903
+ root.emit(callScope);
1904
+ callScope.destroy();
1905
+ }
1906
+ } catch (error) {
1907
+ logger?.error(error);
1908
+ }
1909
+ }
1910
+ };
1911
+ __decorateClass([
1912
+ A_Feature.Extend({
1913
+ name: A_TYPES__EntityFeatures.LOAD,
1914
+ before: /.*/,
1915
+ scope: [AreNode]
1916
+ }),
1917
+ __decorateParam(0, A_Inject(A_Caller)),
1918
+ __decorateParam(1, A_Inject(A_Scope)),
1919
+ __decorateParam(2, A_Inject(A_Feature))
1920
+ ], AreCompiler.prototype, "beforeLoad", 1);
1921
+ __decorateClass([
1922
+ A_Feature.Extend({
1923
+ name: A_TYPES__EntityFeatures.LOAD,
1924
+ scope: [AreNode]
1925
+ }),
1926
+ __decorateParam(0, A_Inject(A_Caller)),
1927
+ __decorateParam(1, A_Inject(A_Scope)),
1928
+ __decorateParam(2, A_Inject(AreSyntax)),
1929
+ __decorateParam(3, A_Inject(A_Feature)),
1930
+ __decorateParam(4, A_Inject(A_Logger))
1931
+ ], AreCompiler.prototype, "load", 1);
1932
+ __decorateClass([
1933
+ A_Feature.Extend({
1934
+ name: A_TYPES__EntityFeatures.LOAD,
1935
+ after: /.*/,
1936
+ scope: [AreNode]
1937
+ }),
1938
+ __decorateParam(0, A_Inject(A_Caller)),
1939
+ __decorateParam(1, A_Inject(A_Scope)),
1940
+ __decorateParam(2, A_Inject(AreScene)),
1941
+ __decorateParam(3, A_Inject(A_Feature))
1942
+ ], AreCompiler.prototype, "afterLoad", 1);
1943
+ __decorateClass([
1944
+ A_Feature.Extend({
1945
+ name: "_AreNode_onCompile" /* onCompile */,
1946
+ before: /.*/,
1947
+ scope: [AreNode]
1948
+ }),
1949
+ __decorateParam(0, A_Inject(A_Caller)),
1950
+ __decorateParam(1, A_Inject(A_Scope)),
1951
+ __decorateParam(2, A_Inject(AreScene)),
1952
+ __decorateParam(3, A_Inject(A_Feature))
1953
+ ], AreCompiler.prototype, "beforeCompile", 1);
1954
+ __decorateClass([
1955
+ A_Feature.Extend({
1956
+ name: "_AreNode_onCompile" /* onCompile */,
1957
+ scope: [AreNode]
1958
+ }),
1959
+ __decorateParam(0, A_Inject(A_Caller)),
1960
+ __decorateParam(1, A_Dependency.Flat()),
1961
+ __decorateParam(1, A_Inject(AreScene)),
1962
+ __decorateParam(2, A_Dependency.Parent()),
1963
+ __decorateParam(2, A_Inject(AreScene)),
1964
+ __decorateParam(3, A_Inject(AreSyntax)),
1965
+ __decorateParam(4, A_Inject(AreProps)),
1966
+ __decorateParam(5, A_Inject(AreStore)),
1967
+ __decorateParam(6, A_Dependency.Parent()),
1968
+ __decorateParam(6, A_Inject(AreStore)),
1969
+ __decorateParam(7, A_Inject(A_Logger)),
1970
+ __decorateParam(8, A_Inject(A_Scope))
1971
+ ], AreCompiler.prototype, "compile", 1);
1972
+ __decorateClass([
1973
+ A_Feature.Extend({
1974
+ name: "_AreNode_onCompile" /* onCompile */,
1975
+ after: /.*/,
1976
+ scope: [AreNode]
1977
+ }),
1978
+ __decorateParam(0, A_Inject(A_Caller)),
1979
+ __decorateParam(1, A_Inject(A_Scope)),
1980
+ __decorateParam(2, A_Inject(AreScene)),
1981
+ __decorateParam(3, A_Inject(A_Feature))
1982
+ ], AreCompiler.prototype, "afterCompile", 1);
1983
+ __decorateClass([
1984
+ A_Feature.Extend({
1985
+ name: "_AreNode_onEvent" /* onEvent */,
1986
+ scope: [AreNode]
1987
+ }),
1988
+ __decorateParam(0, A_Inject(A_Caller)),
1989
+ __decorateParam(1, A_Inject(A_Scope)),
1990
+ __decorateParam(2, A_Inject(AreEvent)),
1991
+ __decorateParam(3, A_Inject(AreScene)),
1992
+ __decorateParam(4, A_Inject(A_Feature))
1993
+ ], AreCompiler.prototype, "event", 1);
1994
+ __decorateClass([
1995
+ A_Feature.Extend({
1996
+ name: "_AreNode_onBeforeRender" /* onBeforeRender */,
1997
+ before: /.*/,
1998
+ scope: [AreNode]
1999
+ }),
2000
+ __decorateParam(0, A_Inject(A_Caller)),
2001
+ __decorateParam(1, A_Inject(A_Scope)),
2002
+ __decorateParam(2, A_Inject(AreScene)),
2003
+ __decorateParam(3, A_Inject(A_Feature))
2004
+ ], AreCompiler.prototype, "beforeRender", 1);
2005
+ __decorateClass([
2006
+ A_Feature.Extend({
2007
+ name: "_AreNode_onRender" /* onRender */,
2008
+ scope: [AreNode]
2009
+ }),
2010
+ __decorateParam(0, A_Inject(A_Caller)),
2011
+ __decorateParam(1, A_Inject(AreSyntax)),
2012
+ __decorateParam(2, A_Dependency.Flat()),
2013
+ __decorateParam(2, A_Inject(AreScene)),
2014
+ __decorateParam(3, A_Dependency.Parent()),
2015
+ __decorateParam(3, A_Inject(AreScene)),
2016
+ __decorateParam(4, A_Inject(A_Logger))
2017
+ ], AreCompiler.prototype, "render", 1);
2018
+ __decorateClass([
2019
+ A_Feature.Extend({
2020
+ name: "_AreNode_onAfterRender" /* onAfterRender */,
2021
+ after: /.*/,
2022
+ scope: [AreNode]
2023
+ }),
2024
+ __decorateParam(0, A_Inject(A_Caller)),
2025
+ __decorateParam(1, A_Inject(A_Scope)),
2026
+ __decorateParam(2, A_Inject(AreScene)),
2027
+ __decorateParam(3, A_Inject(A_Feature))
2028
+ ], AreCompiler.prototype, "afterRender", 1);
2029
+ __decorateClass([
2030
+ A_Feature.Extend({
2031
+ name: "_AreNode_onUpdate" /* onUpdate */,
2032
+ before: /.*/,
2033
+ scope: [AreNode]
2034
+ }),
2035
+ __decorateParam(0, A_Inject(A_Caller)),
2036
+ __decorateParam(1, A_Inject(A_Scope)),
2037
+ __decorateParam(2, A_Inject(AreScene)),
2038
+ __decorateParam(3, A_Inject(A_Feature))
2039
+ ], AreCompiler.prototype, "beforeUpdate", 1);
2040
+ __decorateClass([
2041
+ A_Feature.Extend({
2042
+ name: "_AreNode_onUpdate" /* onUpdate */,
2043
+ scope: [AreNode]
2044
+ }),
2045
+ __decorateParam(0, A_Inject(A_Caller)),
2046
+ __decorateParam(1, A_Inject(AreScene))
2047
+ ], AreCompiler.prototype, "update", 1);
2048
+ __decorateClass([
2049
+ A_Feature.Extend({
2050
+ name: "_AreNode_onUpdate" /* onUpdate */,
2051
+ after: /.*/,
2052
+ scope: [AreNode]
2053
+ }),
2054
+ __decorateParam(0, A_Inject(A_Caller)),
2055
+ __decorateParam(1, A_Inject(A_Scope)),
2056
+ __decorateParam(2, A_Inject(AreScene)),
2057
+ __decorateParam(3, A_Inject(A_Feature))
2058
+ ], AreCompiler.prototype, "afterUpdate", 1);
2059
+ __decorateClass([
2060
+ A_Feature.Extend({
2061
+ name: "_AreNode_onUnmount" /* onUnmount */,
2062
+ before: /.*/,
2063
+ scope: [AreNode]
2064
+ }),
2065
+ __decorateParam(0, A_Inject(A_Caller)),
2066
+ __decorateParam(1, A_Inject(A_Scope)),
2067
+ __decorateParam(2, A_Inject(AreScene)),
2068
+ __decorateParam(3, A_Inject(A_Feature))
2069
+ ], AreCompiler.prototype, "beforeUnmount", 1);
2070
+ __decorateClass([
2071
+ A_Feature.Extend({
2072
+ name: "_AreNode_onUnmount" /* onUnmount */,
2073
+ scope: [AreNode]
2074
+ }),
2075
+ __decorateParam(0, A_Inject(A_Caller)),
2076
+ __decorateParam(1, A_Inject(AreSyntax)),
2077
+ __decorateParam(2, A_Dependency.Flat()),
2078
+ __decorateParam(2, A_Inject(AreScene)),
2079
+ __decorateParam(3, A_Dependency.Parent()),
2080
+ __decorateParam(3, A_Inject(AreScene)),
2081
+ __decorateParam(4, A_Inject(A_Logger))
2082
+ ], AreCompiler.prototype, "unmount", 1);
2083
+ __decorateClass([
2084
+ A_Feature.Extend({
2085
+ name: "_AreNode_onUnmount" /* onUnmount */,
2086
+ after: /.*/,
2087
+ scope: [AreNode]
2088
+ }),
2089
+ __decorateParam(0, A_Inject(A_Caller)),
2090
+ __decorateParam(1, A_Inject(A_Scope)),
2091
+ __decorateParam(2, A_Inject(AreScene)),
2092
+ __decorateParam(3, A_Inject(A_Feature))
2093
+ ], AreCompiler.prototype, "afterUnmount", 1);
2094
+ __decorateClass([
2095
+ A_Feature.Extend({
2096
+ name: A_SignalBusFeatures.onNext
2097
+ }),
2098
+ __decorateParam(0, A_Inject(A_SignalVector)),
2099
+ __decorateParam(1, A_Inject(AreContext)),
2100
+ __decorateParam(2, A_Inject(A_SignalState)),
2101
+ __decorateParam(3, A_Inject(A_Scope)),
2102
+ __decorateParam(4, A_Inject(A_Logger))
2103
+ ], AreCompiler.prototype, "handleSignalVector", 1);
2104
+ AreCompiler = __decorateClass([
2105
+ A_Frame.Component({
2106
+ namespace: "A-ARE",
2107
+ name: "AreCompiler",
2108
+ description: "AreCompiler is responsible for compiling AreNodes into their respective components, managing the compilation lifecycle, and ensuring that each node is processed according to its defined behavior within the A-Concept Rendering Engine (ARE) framework."
2109
+ })
2110
+ ], AreCompiler);
2111
+ var AreRoot = class extends Are {
2112
+ async attachListeners() {
2113
+ }
2114
+ async template(node, store) {
2115
+ }
2116
+ async onSignal(node, store, scene, vector, event) {
2117
+ console.log("Vector received :", vector);
2118
+ console.log("Node received :", node);
2119
+ }
2120
+ };
2121
+ __decorateClass([
2122
+ A_Feature.Extend({
2123
+ name: A_ServiceFeatures.onLoad
2124
+ })
2125
+ ], AreRoot.prototype, "attachListeners", 1);
2126
+ __decorateClass([
2127
+ Are.Template,
2128
+ __decorateParam(0, A_Inject(A_Caller)),
2129
+ __decorateParam(1, A_Inject(AreStore))
2130
+ ], AreRoot.prototype, "template", 1);
2131
+ __decorateClass([
2132
+ Are.Signal,
2133
+ __decorateParam(0, A_Inject(A_Caller)),
2134
+ __decorateParam(1, A_Inject(AreStore)),
2135
+ __decorateParam(2, A_Inject(AreScene)),
2136
+ __decorateParam(3, A_Inject(A_SignalVector)),
2137
+ __decorateParam(4, A_Inject(AreEvent))
2138
+ ], AreRoot.prototype, "onSignal", 1);
2139
+ var AreHTMLCompiler = class extends AreCompiler {
2140
+ constructor() {
2141
+ super(...arguments);
2142
+ this.interpolationTextNodes = /* @__PURE__ */ new Map();
2143
+ }
2144
+ getElementByPath(root, path) {
2145
+ if (path === void 0 || path.trim() === "") {
2146
+ return root;
2147
+ }
2148
+ const indices = path.split(".").map((index) => parseInt(index, 10));
2149
+ let current = root;
2150
+ for (const index of indices) {
2151
+ if (!current) {
2152
+ return void 0;
2153
+ }
2154
+ const elementChildren = Array.from(current.childNodes).filter(
2155
+ (child) => child.nodeType === Node.ELEMENT_NODE || child.nodeType === Node.DOCUMENT_NODE || child.nodeType === Node.COMMENT_NODE
2156
+ );
2157
+ if (index >= elementChildren.length) {
2158
+ return void 0;
2159
+ }
2160
+ current = elementChildren[index];
2161
+ }
2162
+ return current;
2163
+ }
2164
+ getElementByNode(node) {
2165
+ const scene = node.scope.resolveFlat(AreScene);
2166
+ const root = document.getElementById(new ASEID(scene.root.id).id);
2167
+ return this.getElementByPath(root, scene.path);
2168
+ }
2169
+ insertElementAtPath(root, path, element) {
2170
+ const parentPath = path.split(".").slice(0, -1).join(".");
2171
+ const parentElement = this.getElementByPath(root, parentPath);
2172
+ const index = parseInt(path.split(".").slice(-1)[0], 10);
2173
+ if (parentElement) {
2174
+ const children = Array.from(parentElement.children).filter((child) => child.nodeType === Node.ELEMENT_NODE);
2175
+ if (index >= children.length) {
2176
+ parentElement.appendChild(element);
2177
+ } else {
2178
+ parentElement.insertBefore(element, children[index]);
2179
+ }
2180
+ }
2181
+ }
2182
+ insertElementByNode(node, element) {
2183
+ const scene = node.scope.resolveFlat(AreScene);
2184
+ const root = document.getElementById(new ASEID(scene.root.id).id);
2185
+ this.insertElementAtPath(root, scene.path, element);
2186
+ }
2187
+ index(node) {
2188
+ const index = node.scope.resolveFlat(AreIndex);
2189
+ const scene = node.scope.resolveFlat(AreScene);
2190
+ index.clear();
2191
+ scene.reset();
2192
+ const tempDiv = document.createElement("div");
2193
+ tempDiv.innerHTML = node.template;
2194
+ const markupMap = this.createPositionBasedMarkupMap(node.template);
2195
+ this.indexElementsFromDOM(tempDiv, index, [], markupMap);
2196
+ }
2197
+ /**
2198
+ * Create a position-based mapping by parsing the original template with DOM
2199
+ * This ensures 1:1 correspondence between DOM structure and original markup
2200
+ */
2201
+ createPositionBasedMarkupMap(template) {
2202
+ const markupMap = /* @__PURE__ */ new Map();
2203
+ const originalDiv = document.createElement("div");
2204
+ originalDiv.innerHTML = template;
2205
+ this.mapDOMPositions(originalDiv, [], markupMap);
2206
+ return markupMap;
2207
+ }
2208
+ /**
2209
+ * Recursively map DOM positions to their exact original markup
2210
+ */
2211
+ mapDOMPositions(parentElement, parentPath, markupMap) {
2212
+ const children = Array.from(parentElement.children);
2213
+ for (let i = 0; i < children.length; i++) {
2214
+ const element = children[i];
2215
+ const currentPath = [...parentPath, i];
2216
+ const pathKey = currentPath.join(".");
2217
+ markupMap.set(pathKey, element.outerHTML);
2218
+ }
2219
+ }
2220
+ /**
2221
+ * Index elements using actual DOM structure with position-based markup mapping
2222
+ */
2223
+ indexElementsFromDOM(parentElement, index, parentPath, markupMap) {
2224
+ const children = Array.from(parentElement.children);
2225
+ for (let i = 0; i < children.length; i++) {
2226
+ const element = children[i];
2227
+ const currentPath = [...parentPath, i];
2228
+ const pathKey = currentPath.join(".");
2229
+ const originalMarkup = markupMap.get(pathKey);
2230
+ const areNode = new AreNode({
2231
+ scope: index.name,
2232
+ component: element.tagName.toLowerCase(),
2233
+ markup: originalMarkup || element.outerHTML,
2234
+ template: element.innerHTML
2235
+ });
2236
+ index.add(areNode, currentPath.join("."));
2237
+ }
2238
+ }
2239
+ applyAttachRootNodeInstruction(instruction, logger) {
2240
+ const node = instruction.node;
2241
+ const rootElement = document.getElementById(node.id);
2242
+ if (!rootElement) {
2243
+ logger?.warning(`Root element with id <${node.id}> not found in DOM.`);
2244
+ return;
2245
+ }
2246
+ rootElement.innerHTML = node.template;
2247
+ rootElement.setAttribute("aseid", node.aseid.toString());
2248
+ }
2249
+ applyMountNodeInstruction(instruction, context, syntax, logger) {
2250
+ try {
2251
+ const node = instruction.node;
2252
+ const scene = instruction.scene;
2253
+ if (syntax.isCustomNode(node)) {
2254
+ logger?.debug("red", scene.debugPrefix + `Mounting Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()} at path `);
2255
+ const wrapper = document.createElement("div");
2256
+ wrapper.setAttribute("aseid", node.aseid.toString());
2257
+ wrapper.innerHTML = node.template;
2258
+ const element = this.getElementByNode(node);
2259
+ if (!element) {
2260
+ this.insertElementByNode(node, wrapper);
2261
+ } else {
2262
+ element.replaceWith(wrapper);
2263
+ }
2264
+ }
2265
+ } catch (error) {
2266
+ logger?.error(error);
2267
+ }
2268
+ }
2269
+ applyUnmountNodeInstruction(instruction, context, logger) {
2270
+ const node = instruction.node;
2271
+ const scene = instruction.scene;
2272
+ const element = this.getElementByNode(node);
2273
+ logger?.debug("red", scene.debugPrefix + `Unmounting Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()}`);
2274
+ try {
2275
+ element.replaceWith(document.createComment(` Unmounted Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()} `));
2276
+ node.unmount();
2277
+ } catch (error) {
2278
+ logger?.error(error);
2279
+ }
2280
+ }
2281
+ applyAddStyleInstruction(instruction, context, logger) {
2282
+ try {
2283
+ const node = instruction.node;
2284
+ const scene = instruction.scene;
2285
+ const styles = instruction.params?.styles || "";
2286
+ logger?.debug("green", scene.debugPrefix + `Applying styles for Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()}`);
2287
+ const styleElementId = `a-style-${node.aseid.entity}`;
2288
+ let styleElement = document.querySelector(`#${styleElementId}`);
2289
+ if (!styleElement) {
2290
+ styleElement = document.createElement("style");
2291
+ styleElement.id = styleElementId;
2292
+ document.head.appendChild(styleElement);
2293
+ }
2294
+ styleElement.innerHTML = styles;
2295
+ } catch (error) {
2296
+ logger?.error(error);
2297
+ }
2298
+ }
2299
+ applyAttachListenerInstruction(instruction, context, logger) {
2300
+ const node = instruction.node;
2301
+ const scene = instruction.scene;
2302
+ context.get("content");
2303
+ const element = this.getElementByNode(instruction.node);
2304
+ context.get("mountPoint");
2305
+ logger?.debug("green", scene.debugPrefix + `Attaching listener '${instruction.listener.name}' for target <${node.aseid.entity}> ASEID: ${node.aseid.toString()}`);
2306
+ element.addEventListener(instruction.listener.name, instruction.callback);
2307
+ }
2308
+ applyAddAttributeInstruction(instruction, context, scope, logger) {
2309
+ const node = instruction.node;
2310
+ const scene = instruction.scene;
2311
+ context.get("content");
2312
+ const element = this.getElementByNode(node);
2313
+ logger?.debug("green", scene.debugPrefix + `Setting attribute '${instruction.name}'='${instruction.value}' for target <${node.aseid.entity}> ASEID: ${node.aseid.toString()}`, element);
2314
+ element.setAttribute(instruction.name, instruction.value);
2315
+ }
2316
+ revertInstruction(instruction) {
2317
+ this.interpolationTextNodes.delete(instruction.aseid.toString());
2318
+ }
2319
+ applyReplaceInterpolationInstruction(instruction, context, scope, syntax, logger) {
2320
+ const node = instruction.node;
2321
+ const scene = instruction.scene;
2322
+ const element = this.getElementByNode(node);
2323
+ logger?.debug("magenta", scene.debugPrefix + `Replacing interpolation '${instruction.interpolation.name}' with value '${instruction.value}' for target <${node.aseid.entity}>`, instruction);
2324
+ const textNode = this.interpolationTextNodes.get(instruction.aseid.toString());
2325
+ if (textNode) {
2326
+ textNode.nodeValue = instruction.value;
2327
+ } else {
2328
+ const treeTextNodesWalker = document.createTreeWalker(
2329
+ element,
2330
+ NodeFilter.SHOW_TEXT,
2331
+ {
2332
+ acceptNode: (node2) => {
2333
+ if (node2.nodeValue && node2.nodeValue.includes(instruction.interpolation.raw)) {
2334
+ return NodeFilter.FILTER_ACCEPT;
2335
+ }
2336
+ return NodeFilter.FILTER_REJECT;
2337
+ }
2338
+ }
2339
+ );
2340
+ const foundNode = treeTextNodesWalker.nextNode();
2341
+ if (foundNode) {
2342
+ const parts = foundNode.nodeValue.split(instruction.interpolation.raw);
2343
+ const parent = foundNode.parentNode;
2344
+ if (parent) {
2345
+ for (let i = 0; i < parts.length; i++) {
2346
+ const part = parts[i];
2347
+ if (part) {
2348
+ const textNodePart = document.createTextNode(part);
2349
+ parent.insertBefore(textNodePart, foundNode);
2350
+ }
2351
+ if (i < parts.length - 1) {
2352
+ const valueNode = document.createTextNode(instruction.value);
2353
+ parent.insertBefore(valueNode, foundNode);
2354
+ this.interpolationTextNodes.set(instruction.aseid.toString(), valueNode);
2355
+ }
2356
+ }
2357
+ parent.removeChild(foundNode);
2358
+ }
2359
+ }
2360
+ }
2361
+ }
2362
+ initAddDirectiveInstruction(instruction, scope, logger) {
2363
+ const node = instruction.node;
2364
+ const scene = node.scope.resolveFlat(AreScene);
2365
+ const parentScene = instruction.scene;
2366
+ logger?.debug("green", scene.debugPrefix + `Initializing directive '${instruction.directive.name}' for Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()}`, scene, parentScene);
2367
+ switch (instruction.directive.name) {
2368
+ case "$if": {
2369
+ const mountInstruction = new MountNodeInstruction(node, scene.path);
2370
+ const unmountInstruction = new UnmountNodeInstruction(node, scene.path);
2371
+ if (instruction.value) {
2372
+ parentScene.unPlan(unmountInstruction);
2373
+ parentScene.plan(mountInstruction);
2374
+ parentScene.dropState(mountInstruction);
2375
+ } else {
2376
+ parentScene.unPlan(mountInstruction);
2377
+ parentScene.plan(unmountInstruction);
2378
+ parentScene.dropState(unmountInstruction);
2379
+ }
2380
+ break;
2381
+ }
2382
+ default:
2383
+ logger?.warning(`Unknown directive '${instruction.directive.name}' for Node <${node.type}> ASEID: ${node.aseid.toString()}`);
2384
+ }
2385
+ }
2386
+ applyAddDirectiveInstruction(instruction, context, scope, logger) {
2387
+ const node = instruction.node;
2388
+ const scene = instruction.scene;
2389
+ this.getElementByNode(node);
2390
+ try {
2391
+ logger?.debug("green", scene.debugPrefix + `Applying directive '${instruction.directive.name}' for Node <${node.aseid.entity}> ASEID: ${node.aseid.toString()}`, instruction);
2392
+ } catch (error) {
2393
+ logger?.error(error);
2394
+ }
2395
+ }
2396
+ };
2397
+ __decorateClass([
2398
+ A_Frame.Method({
2399
+ description: "Get DOM element corresponding to the given path from the root element."
2400
+ })
2401
+ ], AreHTMLCompiler.prototype, "getElementByPath", 1);
2402
+ __decorateClass([
2403
+ A_Frame.Method({
2404
+ description: "Get DOM element corresponding to the given AreNode based on its scene path."
2405
+ })
2406
+ ], AreHTMLCompiler.prototype, "getElementByNode", 1);
2407
+ __decorateClass([
2408
+ A_Frame.Method({
2409
+ description: "Insert a DOM element at the specified path within the root element."
2410
+ })
2411
+ ], AreHTMLCompiler.prototype, "insertElementAtPath", 1);
2412
+ __decorateClass([
2413
+ A_Frame.Method({
2414
+ description: "Insert a DOM element corresponding to the given AreNode at its scene path."
2415
+ })
2416
+ ], AreHTMLCompiler.prototype, "insertElementByNode", 1);
2417
+ __decorateClass([
2418
+ A_Frame.Method({
2419
+ description: "Indexes the elements of the given AreNode within its scene, preserving the original markup structure."
2420
+ })
2421
+ ], AreHTMLCompiler.prototype, "index", 1);
2422
+ __decorateClass([
2423
+ A_Feature.Extend({
2424
+ name: "_AreSceneInstructionApply" /* Apply */,
2425
+ scope: [AttachRootNodeInstruction]
2426
+ }),
2427
+ __decorateParam(0, A_Inject(A_Caller)),
2428
+ __decorateParam(1, A_Inject(A_Logger))
2429
+ ], AreHTMLCompiler.prototype, "applyAttachRootNodeInstruction", 1);
2430
+ __decorateClass([
2431
+ A_Feature.Extend({
2432
+ name: "_AreSceneInstructionApply" /* Apply */,
2433
+ scope: [MountNodeInstruction]
2434
+ }),
2435
+ __decorateParam(0, A_Inject(A_Caller)),
2436
+ __decorateParam(1, A_Inject(A_ExecutionContext)),
2437
+ __decorateParam(2, A_Inject(AreSyntax)),
2438
+ __decorateParam(3, A_Inject(A_Logger))
2439
+ ], AreHTMLCompiler.prototype, "applyMountNodeInstruction", 1);
2440
+ __decorateClass([
2441
+ A_Feature.Extend({
2442
+ name: "_AreSceneInstructionApply" /* Apply */,
2443
+ scope: [UnmountNodeInstruction]
2444
+ }),
2445
+ __decorateParam(0, A_Inject(A_Caller)),
2446
+ __decorateParam(1, A_Inject(A_ExecutionContext)),
2447
+ __decorateParam(2, A_Inject(A_Logger))
2448
+ ], AreHTMLCompiler.prototype, "applyUnmountNodeInstruction", 1);
2449
+ __decorateClass([
2450
+ A_Feature.Extend({
2451
+ name: "_AreSceneInstructionApply" /* Apply */,
2452
+ scope: [AddStyleInstruction]
2453
+ }),
2454
+ __decorateParam(0, A_Inject(A_Caller)),
2455
+ __decorateParam(1, A_Inject(A_ExecutionContext)),
2456
+ __decorateParam(2, A_Inject(A_Logger))
2457
+ ], AreHTMLCompiler.prototype, "applyAddStyleInstruction", 1);
2458
+ __decorateClass([
2459
+ A_Feature.Extend({
2460
+ name: "_AreSceneInstructionApply" /* Apply */,
2461
+ scope: [AttachListenerInstruction]
2462
+ }),
2463
+ __decorateParam(0, A_Inject(A_Caller)),
2464
+ __decorateParam(1, A_Inject(A_ExecutionContext)),
2465
+ __decorateParam(2, A_Inject(A_Logger))
2466
+ ], AreHTMLCompiler.prototype, "applyAttachListenerInstruction", 1);
2467
+ __decorateClass([
2468
+ A_Feature.Extend({
2469
+ name: "_AreSceneInstructionApply" /* Apply */,
2470
+ scope: [AddAttributeInstruction]
2471
+ }),
2472
+ __decorateParam(0, A_Inject(A_Caller)),
2473
+ __decorateParam(1, A_Inject(A_ExecutionContext)),
2474
+ __decorateParam(2, A_Inject(A_Scope)),
2475
+ __decorateParam(3, A_Inject(A_Logger))
2476
+ ], AreHTMLCompiler.prototype, "applyAddAttributeInstruction", 1);
2477
+ __decorateClass([
2478
+ A_Feature.Extend({
2479
+ name: "_AreSceneInstructionRevert" /* Revert */,
2480
+ scope: [ReplaceInterpolationInstruction]
2481
+ }),
2482
+ __decorateParam(0, A_Inject(A_Caller))
2483
+ ], AreHTMLCompiler.prototype, "revertInstruction", 1);
2484
+ __decorateClass([
2485
+ A_Feature.Extend({
2486
+ name: "_AreSceneInstructionApply" /* Apply */,
2487
+ scope: [ReplaceInterpolationInstruction]
2488
+ }),
2489
+ __decorateParam(0, A_Inject(A_Caller)),
2490
+ __decorateParam(1, A_Inject(A_ExecutionContext)),
2491
+ __decorateParam(2, A_Inject(A_Scope)),
2492
+ __decorateParam(3, A_Inject(AreSyntax)),
2493
+ __decorateParam(4, A_Inject(A_Logger))
2494
+ ], AreHTMLCompiler.prototype, "applyReplaceInterpolationInstruction", 1);
2495
+ __decorateClass([
2496
+ A_Feature.Extend({
2497
+ name: "_AreSceneInstructionInit" /* Init */,
2498
+ scope: [AddDirectiveInstruction]
2499
+ }),
2500
+ __decorateParam(0, A_Inject(A_Caller)),
2501
+ __decorateParam(1, A_Inject(A_Scope)),
2502
+ __decorateParam(2, A_Inject(A_Logger))
2503
+ ], AreHTMLCompiler.prototype, "initAddDirectiveInstruction", 1);
2504
+ __decorateClass([
2505
+ A_Feature.Extend({
2506
+ name: "_AreSceneInstructionApply" /* Apply */,
2507
+ scope: [AddDirectiveInstruction]
2508
+ }),
2509
+ __decorateParam(0, A_Inject(A_Caller)),
2510
+ __decorateParam(1, A_Inject(A_ExecutionContext)),
2511
+ __decorateParam(2, A_Inject(A_Scope)),
2512
+ __decorateParam(3, A_Inject(A_Logger))
2513
+ ], AreHTMLCompiler.prototype, "applyAddDirectiveInstruction", 1);
2514
+ AreHTMLCompiler = __decorateClass([
2515
+ A_Frame.Component({
2516
+ namespace: "A-ARE",
2517
+ name: "AreHTMLCompiler",
2518
+ description: "HTML-specific compiler for A-Concept Rendering Engine (ARE) components, extending the base AreCompiler to handle HTML templates, styles, and rendering logic tailored for web environments."
2519
+ })
2520
+ ], AreHTMLCompiler);
2521
+ var AreHTMLEngine = class extends A_Component {
2522
+ async injectSyntax(container, syntax, compiler, logger) {
2523
+ if (!syntax) {
2524
+ logger?.info("cyan", "Injecting AreHTMLSyntax into container scope...");
2525
+ const htmlSyntax = new AreSyntaxContext({
2526
+ rootTag: "are-root",
2527
+ standardTags: [
2528
+ "html",
2529
+ "head",
2530
+ "body",
2531
+ "div",
2532
+ "span",
2533
+ "p",
2534
+ "a",
2535
+ "ul",
2536
+ "ol",
2537
+ "li",
2538
+ "table",
2539
+ "thead",
2540
+ "tbody",
2541
+ "tr",
2542
+ "td",
2543
+ "th",
2544
+ "form",
2545
+ "input",
2546
+ "button",
2547
+ "select",
2548
+ "option",
2549
+ "textarea",
2550
+ "label",
2551
+ "img",
2552
+ "h1",
2553
+ "h2",
2554
+ "h3",
2555
+ "h4",
2556
+ "h5",
2557
+ "h6",
2558
+ "script",
2559
+ "style",
2560
+ "link",
2561
+ "meta",
2562
+ "nav",
2563
+ "footer",
2564
+ "header",
2565
+ "section",
2566
+ "article",
2567
+ "aside",
2568
+ "main",
2569
+ "canvas",
2570
+ "video",
2571
+ "audio",
2572
+ "br",
2573
+ "hr",
2574
+ "strong",
2575
+ "em",
2576
+ "small",
2577
+ "pre",
2578
+ "code",
2579
+ "iframe",
2580
+ "details",
2581
+ "summary",
2582
+ "svg",
2583
+ "path",
2584
+ "circle",
2585
+ "rect",
2586
+ "polygon",
2587
+ "g",
2588
+ "defs"
2589
+ ],
2590
+ debugMode: true,
2591
+ interpolationDelimiters: ["{{", "}}"],
2592
+ bindingDelimiter: ":",
2593
+ listenerDelimiter: "@",
2594
+ directiveDelimiter: "$"
2595
+ });
2596
+ container.scope.register(htmlSyntax);
2597
+ }
2598
+ if (!compiler) {
2599
+ logger?.info("cyan", "Injecting AreHTMLCompiler into container scope...");
2600
+ container.scope.register(AreHTMLCompiler);
2601
+ }
2602
+ }
2603
+ };
2604
+ __decorateClass([
2605
+ A_Feature.Extend({
2606
+ name: A_ServiceFeatures.onBeforeLoad,
2607
+ before: /.*/
2608
+ }),
2609
+ __decorateParam(0, A_Inject(A_Caller)),
2610
+ __decorateParam(1, A_Inject(AreSyntaxContext)),
2611
+ __decorateParam(2, A_Inject(AreHTMLCompiler)),
2612
+ __decorateParam(3, A_Inject(A_Logger))
2613
+ ], AreHTMLEngine.prototype, "injectSyntax", 1);
2614
+ AreHTMLEngine = __decorateClass([
2615
+ A_Frame.Component({
2616
+ namespace: "A-ARE",
2617
+ name: "AreHTMLEngine",
2618
+ description: "HTML Rendering Engine for A-Concept Rendering Engine (ARE), responsible for processing and rendering HTML templates within the ARE framework."
2619
+ })
2620
+ ], AreHTMLEngine);
2621
+
2622
+ export { AddAttributeInstruction, AddDirectiveInstruction, AddStyleInstruction, AddStylePropertyInstruction, Are, AreApp, AreAppError, AreCompiler, AreCompilerError, AreContext, AreEvent, AreFeatures, AreHTMLCompiler, AreHTMLEngine, AreIndex, AreInitSignal, AreNode, AreNodeFeatures, AreProps, AreRoot, AreRouteSignal, AreScene, AreSceneError, AreSceneInstruction, AreSceneInstructionFeatures, AreStore, AreSyntax, AreSyntaxContext, AreSyntaxError, AttachListenerInstruction, AttachRootNodeInstruction, MountNodeInstruction, ReplaceInterpolationInstruction, UnmountNodeInstruction };
2623
+ //# sourceMappingURL=index.mjs.map
2624
+ //# sourceMappingURL=index.mjs.map