@adaas/are-html 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 (365) hide show
  1. package/.conf/tsconfig.base.json +87 -0
  2. package/.conf/tsconfig.browser.json +34 -0
  3. package/.conf/tsconfig.node.json +35 -0
  4. package/.nvmrc +1 -0
  5. package/LICENSE +13 -0
  6. package/README.md +678 -0
  7. package/dist/browser/index.d.mts +521 -0
  8. package/dist/browser/index.mjs +1782 -0
  9. package/dist/browser/index.mjs.map +1 -0
  10. package/dist/node/AreBinding.attribute-C6JasbJL.d.ts +110 -0
  11. package/dist/node/AreBinding.attribute-C6qrxN8K.d.mts +110 -0
  12. package/dist/node/attributes/AreBinding.attribute.d.mts +4 -0
  13. package/dist/node/attributes/AreBinding.attribute.d.ts +4 -0
  14. package/dist/node/attributes/AreBinding.attribute.js +15 -0
  15. package/dist/node/attributes/AreBinding.attribute.js.map +1 -0
  16. package/dist/node/attributes/AreBinding.attribute.mjs +14 -0
  17. package/dist/node/attributes/AreBinding.attribute.mjs.map +1 -0
  18. package/dist/node/attributes/AreDirective.attribute.d.mts +4 -0
  19. package/dist/node/attributes/AreDirective.attribute.d.ts +4 -0
  20. package/dist/node/attributes/AreDirective.attribute.js +20 -0
  21. package/dist/node/attributes/AreDirective.attribute.js.map +1 -0
  22. package/dist/node/attributes/AreDirective.attribute.mjs +19 -0
  23. package/dist/node/attributes/AreDirective.attribute.mjs.map +1 -0
  24. package/dist/node/attributes/AreEvent.attribute.d.mts +4 -0
  25. package/dist/node/attributes/AreEvent.attribute.d.ts +4 -0
  26. package/dist/node/attributes/AreEvent.attribute.js +10 -0
  27. package/dist/node/attributes/AreEvent.attribute.js.map +1 -0
  28. package/dist/node/attributes/AreEvent.attribute.mjs +9 -0
  29. package/dist/node/attributes/AreEvent.attribute.mjs.map +1 -0
  30. package/dist/node/attributes/AreStatic.attribute.d.mts +4 -0
  31. package/dist/node/attributes/AreStatic.attribute.d.ts +4 -0
  32. package/dist/node/attributes/AreStatic.attribute.js +10 -0
  33. package/dist/node/attributes/AreStatic.attribute.js.map +1 -0
  34. package/dist/node/attributes/AreStatic.attribute.mjs +9 -0
  35. package/dist/node/attributes/AreStatic.attribute.mjs.map +1 -0
  36. package/dist/node/chunk-EQQGB2QZ.mjs +15 -0
  37. package/dist/node/chunk-EQQGB2QZ.mjs.map +1 -0
  38. package/dist/node/directives/AreComponent.directive.d.mts +2 -0
  39. package/dist/node/directives/AreComponent.directive.d.ts +2 -0
  40. package/dist/node/directives/AreComponent.directive.js +4 -0
  41. package/dist/node/directives/AreComponent.directive.js.map +1 -0
  42. package/dist/node/directives/AreComponent.directive.mjs +3 -0
  43. package/dist/node/directives/AreComponent.directive.mjs.map +1 -0
  44. package/dist/node/directives/AreDirectiveFor.directive.d.mts +41 -0
  45. package/dist/node/directives/AreDirectiveFor.directive.d.ts +41 -0
  46. package/dist/node/directives/AreDirectiveFor.directive.js +206 -0
  47. package/dist/node/directives/AreDirectiveFor.directive.js.map +1 -0
  48. package/dist/node/directives/AreDirectiveFor.directive.mjs +196 -0
  49. package/dist/node/directives/AreDirectiveFor.directive.mjs.map +1 -0
  50. package/dist/node/directives/AreDirectiveIf.directive.d.mts +15 -0
  51. package/dist/node/directives/AreDirectiveIf.directive.d.ts +15 -0
  52. package/dist/node/directives/AreDirectiveIf.directive.js +91 -0
  53. package/dist/node/directives/AreDirectiveIf.directive.js.map +1 -0
  54. package/dist/node/directives/AreDirectiveIf.directive.mjs +81 -0
  55. package/dist/node/directives/AreDirectiveIf.directive.mjs.map +1 -0
  56. package/dist/node/engine/AreHTML.compiler.d.mts +27 -0
  57. package/dist/node/engine/AreHTML.compiler.d.ts +27 -0
  58. package/dist/node/engine/AreHTML.compiler.js +150 -0
  59. package/dist/node/engine/AreHTML.compiler.js.map +1 -0
  60. package/dist/node/engine/AreHTML.compiler.mjs +140 -0
  61. package/dist/node/engine/AreHTML.compiler.mjs.map +1 -0
  62. package/dist/node/engine/AreHTML.constants.d.mts +2 -0
  63. package/dist/node/engine/AreHTML.constants.d.ts +2 -0
  64. package/dist/node/engine/AreHTML.constants.js +4 -0
  65. package/dist/node/engine/AreHTML.constants.js.map +1 -0
  66. package/dist/node/engine/AreHTML.constants.mjs +3 -0
  67. package/dist/node/engine/AreHTML.constants.mjs.map +1 -0
  68. package/dist/node/engine/AreHTML.context.d.mts +108 -0
  69. package/dist/node/engine/AreHTML.context.d.ts +108 -0
  70. package/dist/node/engine/AreHTML.context.js +155 -0
  71. package/dist/node/engine/AreHTML.context.js.map +1 -0
  72. package/dist/node/engine/AreHTML.context.mjs +154 -0
  73. package/dist/node/engine/AreHTML.context.mjs.map +1 -0
  74. package/dist/node/engine/AreHTML.engine.d.mts +21 -0
  75. package/dist/node/engine/AreHTML.engine.d.ts +21 -0
  76. package/dist/node/engine/AreHTML.engine.js +191 -0
  77. package/dist/node/engine/AreHTML.engine.js.map +1 -0
  78. package/dist/node/engine/AreHTML.engine.mjs +181 -0
  79. package/dist/node/engine/AreHTML.engine.mjs.map +1 -0
  80. package/dist/node/engine/AreHTML.interpreter.d.mts +28 -0
  81. package/dist/node/engine/AreHTML.interpreter.d.ts +28 -0
  82. package/dist/node/engine/AreHTML.interpreter.js +340 -0
  83. package/dist/node/engine/AreHTML.interpreter.js.map +1 -0
  84. package/dist/node/engine/AreHTML.interpreter.mjs +330 -0
  85. package/dist/node/engine/AreHTML.interpreter.mjs.map +1 -0
  86. package/dist/node/engine/AreHTML.lifecycle.d.mts +17 -0
  87. package/dist/node/engine/AreHTML.lifecycle.d.ts +17 -0
  88. package/dist/node/engine/AreHTML.lifecycle.js +91 -0
  89. package/dist/node/engine/AreHTML.lifecycle.js.map +1 -0
  90. package/dist/node/engine/AreHTML.lifecycle.mjs +79 -0
  91. package/dist/node/engine/AreHTML.lifecycle.mjs.map +1 -0
  92. package/dist/node/engine/AreHTML.tokenizer.d.mts +13 -0
  93. package/dist/node/engine/AreHTML.tokenizer.d.ts +13 -0
  94. package/dist/node/engine/AreHTML.tokenizer.js +83 -0
  95. package/dist/node/engine/AreHTML.tokenizer.js.map +1 -0
  96. package/dist/node/engine/AreHTML.tokenizer.mjs +71 -0
  97. package/dist/node/engine/AreHTML.tokenizer.mjs.map +1 -0
  98. package/dist/node/engine/AreHTML.transformer.d.mts +11 -0
  99. package/dist/node/engine/AreHTML.transformer.d.ts +11 -0
  100. package/dist/node/engine/AreHTML.transformer.js +44 -0
  101. package/dist/node/engine/AreHTML.transformer.js.map +1 -0
  102. package/dist/node/engine/AreHTML.transformer.mjs +32 -0
  103. package/dist/node/engine/AreHTML.transformer.mjs.map +1 -0
  104. package/dist/node/engine/AreHTML.types.d.mts +6 -0
  105. package/dist/node/engine/AreHTML.types.d.ts +6 -0
  106. package/dist/node/engine/AreHTML.types.js +4 -0
  107. package/dist/node/engine/AreHTML.types.js.map +1 -0
  108. package/dist/node/engine/AreHTML.types.mjs +3 -0
  109. package/dist/node/engine/AreHTML.types.mjs.map +1 -0
  110. package/dist/node/index.d.mts +39 -0
  111. package/dist/node/index.d.ts +39 -0
  112. package/dist/node/index.js +294 -0
  113. package/dist/node/index.js.map +1 -0
  114. package/dist/node/index.mjs +43 -0
  115. package/dist/node/index.mjs.map +1 -0
  116. package/dist/node/instructions/AddAttribute.instruction.d.mts +9 -0
  117. package/dist/node/instructions/AddAttribute.instruction.d.ts +9 -0
  118. package/dist/node/instructions/AddAttribute.instruction.js +32 -0
  119. package/dist/node/instructions/AddAttribute.instruction.js.map +1 -0
  120. package/dist/node/instructions/AddAttribute.instruction.mjs +25 -0
  121. package/dist/node/instructions/AddAttribute.instruction.mjs.map +1 -0
  122. package/dist/node/instructions/AddComment.instruction.d.mts +9 -0
  123. package/dist/node/instructions/AddComment.instruction.d.ts +9 -0
  124. package/dist/node/instructions/AddComment.instruction.js +35 -0
  125. package/dist/node/instructions/AddComment.instruction.js.map +1 -0
  126. package/dist/node/instructions/AddComment.instruction.mjs +28 -0
  127. package/dist/node/instructions/AddComment.instruction.mjs.map +1 -0
  128. package/dist/node/instructions/AddElement.instruction.d.mts +8 -0
  129. package/dist/node/instructions/AddElement.instruction.d.ts +8 -0
  130. package/dist/node/instructions/AddElement.instruction.js +32 -0
  131. package/dist/node/instructions/AddElement.instruction.js.map +1 -0
  132. package/dist/node/instructions/AddElement.instruction.mjs +25 -0
  133. package/dist/node/instructions/AddElement.instruction.mjs.map +1 -0
  134. package/dist/node/instructions/AddInterpolation.instruction.d.mts +8 -0
  135. package/dist/node/instructions/AddInterpolation.instruction.d.ts +8 -0
  136. package/dist/node/instructions/AddInterpolation.instruction.js +32 -0
  137. package/dist/node/instructions/AddInterpolation.instruction.js.map +1 -0
  138. package/dist/node/instructions/AddInterpolation.instruction.mjs +25 -0
  139. package/dist/node/instructions/AddInterpolation.instruction.mjs.map +1 -0
  140. package/dist/node/instructions/AddListener.instruction.d.mts +8 -0
  141. package/dist/node/instructions/AddListener.instruction.d.ts +8 -0
  142. package/dist/node/instructions/AddListener.instruction.js +32 -0
  143. package/dist/node/instructions/AddListener.instruction.js.map +1 -0
  144. package/dist/node/instructions/AddListener.instruction.mjs +25 -0
  145. package/dist/node/instructions/AddListener.instruction.mjs.map +1 -0
  146. package/dist/node/instructions/AddStyle.instruction.d.mts +8 -0
  147. package/dist/node/instructions/AddStyle.instruction.d.ts +8 -0
  148. package/dist/node/instructions/AddStyle.instruction.js +32 -0
  149. package/dist/node/instructions/AddStyle.instruction.js.map +1 -0
  150. package/dist/node/instructions/AddStyle.instruction.mjs +25 -0
  151. package/dist/node/instructions/AddStyle.instruction.mjs.map +1 -0
  152. package/dist/node/instructions/AddText.instruction.d.mts +8 -0
  153. package/dist/node/instructions/AddText.instruction.d.ts +8 -0
  154. package/dist/node/instructions/AddText.instruction.js +32 -0
  155. package/dist/node/instructions/AddText.instruction.js.map +1 -0
  156. package/dist/node/instructions/AddText.instruction.mjs +25 -0
  157. package/dist/node/instructions/AddText.instruction.mjs.map +1 -0
  158. package/dist/node/instructions/AreHTML.instructions.constants.d.mts +11 -0
  159. package/dist/node/instructions/AreHTML.instructions.constants.d.ts +11 -0
  160. package/dist/node/instructions/AreHTML.instructions.constants.js +15 -0
  161. package/dist/node/instructions/AreHTML.instructions.constants.js.map +1 -0
  162. package/dist/node/instructions/AreHTML.instructions.constants.mjs +15 -0
  163. package/dist/node/instructions/AreHTML.instructions.constants.mjs.map +1 -0
  164. package/dist/node/instructions/AreHTML.instructions.types.d.mts +46 -0
  165. package/dist/node/instructions/AreHTML.instructions.types.d.ts +46 -0
  166. package/dist/node/instructions/AreHTML.instructions.types.js +4 -0
  167. package/dist/node/instructions/AreHTML.instructions.types.js.map +1 -0
  168. package/dist/node/instructions/AreHTML.instructions.types.mjs +3 -0
  169. package/dist/node/instructions/AreHTML.instructions.types.mjs.map +1 -0
  170. package/dist/node/lib/AreDirective/AreDirective.component.d.mts +4 -0
  171. package/dist/node/lib/AreDirective/AreDirective.component.d.ts +4 -0
  172. package/dist/node/lib/AreDirective/AreDirective.component.js +117 -0
  173. package/dist/node/lib/AreDirective/AreDirective.component.js.map +1 -0
  174. package/dist/node/lib/AreDirective/AreDirective.component.mjs +107 -0
  175. package/dist/node/lib/AreDirective/AreDirective.component.mjs.map +1 -0
  176. package/dist/node/lib/AreDirective/AreDirective.constants.d.mts +16 -0
  177. package/dist/node/lib/AreDirective/AreDirective.constants.d.ts +16 -0
  178. package/dist/node/lib/AreDirective/AreDirective.constants.js +20 -0
  179. package/dist/node/lib/AreDirective/AreDirective.constants.js.map +1 -0
  180. package/dist/node/lib/AreDirective/AreDirective.constants.mjs +20 -0
  181. package/dist/node/lib/AreDirective/AreDirective.constants.mjs.map +1 -0
  182. package/dist/node/lib/AreDirective/AreDirective.context.d.mts +9 -0
  183. package/dist/node/lib/AreDirective/AreDirective.context.d.ts +9 -0
  184. package/dist/node/lib/AreDirective/AreDirective.context.js +14 -0
  185. package/dist/node/lib/AreDirective/AreDirective.context.js.map +1 -0
  186. package/dist/node/lib/AreDirective/AreDirective.context.mjs +13 -0
  187. package/dist/node/lib/AreDirective/AreDirective.context.mjs.map +1 -0
  188. package/dist/node/lib/AreDirective/AreDirective.meta.d.mts +7 -0
  189. package/dist/node/lib/AreDirective/AreDirective.meta.d.ts +7 -0
  190. package/dist/node/lib/AreDirective/AreDirective.meta.js +14 -0
  191. package/dist/node/lib/AreDirective/AreDirective.meta.js.map +1 -0
  192. package/dist/node/lib/AreDirective/AreDirective.meta.mjs +13 -0
  193. package/dist/node/lib/AreDirective/AreDirective.meta.mjs.map +1 -0
  194. package/dist/node/lib/AreDirective/AreDirective.types.d.mts +17 -0
  195. package/dist/node/lib/AreDirective/AreDirective.types.d.ts +17 -0
  196. package/dist/node/lib/AreDirective/AreDirective.types.js +4 -0
  197. package/dist/node/lib/AreDirective/AreDirective.types.js.map +1 -0
  198. package/dist/node/lib/AreDirective/AreDirective.types.mjs +3 -0
  199. package/dist/node/lib/AreDirective/AreDirective.types.mjs.map +1 -0
  200. package/dist/node/lib/AreHTML/AreHTML.tokenizer.d.mts +13 -0
  201. package/dist/node/lib/AreHTML/AreHTML.tokenizer.d.ts +13 -0
  202. package/dist/node/lib/AreHTML/AreHTML.tokenizer.js +82 -0
  203. package/dist/node/lib/AreHTML/AreHTML.tokenizer.js.map +1 -0
  204. package/dist/node/lib/AreHTML/AreHTML.tokenizer.mjs +70 -0
  205. package/dist/node/lib/AreHTML/AreHTML.tokenizer.mjs.map +1 -0
  206. package/dist/node/lib/AreHTMLAttribute/AreHTML.attribute.d.mts +4 -0
  207. package/dist/node/lib/AreHTMLAttribute/AreHTML.attribute.d.ts +4 -0
  208. package/dist/node/lib/AreHTMLAttribute/AreHTML.attribute.js +13 -0
  209. package/dist/node/lib/AreHTMLAttribute/AreHTML.attribute.js.map +1 -0
  210. package/dist/node/lib/AreHTMLAttribute/AreHTML.attribute.mjs +12 -0
  211. package/dist/node/lib/AreHTMLAttribute/AreHTML.attribute.mjs.map +1 -0
  212. package/dist/node/lib/AreHTMLNode/AreHTMLNode.d.mts +4 -0
  213. package/dist/node/lib/AreHTMLNode/AreHTMLNode.d.ts +4 -0
  214. package/dist/node/lib/AreHTMLNode/AreHTMLNode.js +82 -0
  215. package/dist/node/lib/AreHTMLNode/AreHTMLNode.js.map +1 -0
  216. package/dist/node/lib/AreHTMLNode/AreHTMLNode.mjs +75 -0
  217. package/dist/node/lib/AreHTMLNode/AreHTMLNode.mjs.map +1 -0
  218. package/dist/node/lib/AreRoot/AreRoot.component.d.mts +13 -0
  219. package/dist/node/lib/AreRoot/AreRoot.component.d.ts +13 -0
  220. package/dist/node/lib/AreRoot/AreRoot.component.js +117 -0
  221. package/dist/node/lib/AreRoot/AreRoot.component.js.map +1 -0
  222. package/dist/node/lib/AreRoot/AreRoot.component.mjs +107 -0
  223. package/dist/node/lib/AreRoot/AreRoot.component.mjs.map +1 -0
  224. package/dist/node/lib/AreStyle/AreStyle.context.d.mts +8 -0
  225. package/dist/node/lib/AreStyle/AreStyle.context.d.ts +8 -0
  226. package/dist/node/lib/AreStyle/AreStyle.context.js +16 -0
  227. package/dist/node/lib/AreStyle/AreStyle.context.js.map +1 -0
  228. package/dist/node/lib/AreStyle/AreStyle.context.mjs +15 -0
  229. package/dist/node/lib/AreStyle/AreStyle.context.mjs.map +1 -0
  230. package/dist/node/lib/AreStyle/AreStyle.types.d.mts +2 -0
  231. package/dist/node/lib/AreStyle/AreStyle.types.d.ts +2 -0
  232. package/dist/node/lib/AreStyle/AreStyle.types.js +4 -0
  233. package/dist/node/lib/AreStyle/AreStyle.types.js.map +1 -0
  234. package/dist/node/lib/AreStyle/AreStyle.types.mjs +3 -0
  235. package/dist/node/lib/AreStyle/AreStyle.types.mjs.map +1 -0
  236. package/dist/node/lib/AreWatcher/AreWatcher.component.d.mts +18 -0
  237. package/dist/node/lib/AreWatcher/AreWatcher.component.d.ts +18 -0
  238. package/dist/node/lib/AreWatcher/AreWatcher.component.js +78 -0
  239. package/dist/node/lib/AreWatcher/AreWatcher.component.js.map +1 -0
  240. package/dist/node/lib/AreWatcher/AreWatcher.component.mjs +71 -0
  241. package/dist/node/lib/AreWatcher/AreWatcher.component.mjs.map +1 -0
  242. package/dist/node/nodes/AreComment.d.mts +10 -0
  243. package/dist/node/nodes/AreComment.d.ts +10 -0
  244. package/dist/node/nodes/AreComment.js +19 -0
  245. package/dist/node/nodes/AreComment.js.map +1 -0
  246. package/dist/node/nodes/AreComment.mjs +18 -0
  247. package/dist/node/nodes/AreComment.mjs.map +1 -0
  248. package/dist/node/nodes/AreComponent.d.mts +17 -0
  249. package/dist/node/nodes/AreComponent.d.ts +17 -0
  250. package/dist/node/nodes/AreComponent.js +35 -0
  251. package/dist/node/nodes/AreComponent.js.map +1 -0
  252. package/dist/node/nodes/AreComponent.mjs +28 -0
  253. package/dist/node/nodes/AreComponent.mjs.map +1 -0
  254. package/dist/node/nodes/AreInterpolation.d.mts +10 -0
  255. package/dist/node/nodes/AreInterpolation.d.ts +10 -0
  256. package/dist/node/nodes/AreInterpolation.js +19 -0
  257. package/dist/node/nodes/AreInterpolation.js.map +1 -0
  258. package/dist/node/nodes/AreInterpolation.mjs +18 -0
  259. package/dist/node/nodes/AreInterpolation.mjs.map +1 -0
  260. package/dist/node/nodes/AreRoot.d.mts +21 -0
  261. package/dist/node/nodes/AreRoot.d.ts +21 -0
  262. package/dist/node/nodes/AreRoot.js +41 -0
  263. package/dist/node/nodes/AreRoot.js.map +1 -0
  264. package/dist/node/nodes/AreRoot.mjs +34 -0
  265. package/dist/node/nodes/AreRoot.mjs.map +1 -0
  266. package/dist/node/nodes/AreText.d.mts +10 -0
  267. package/dist/node/nodes/AreText.d.ts +10 -0
  268. package/dist/node/nodes/AreText.js +19 -0
  269. package/dist/node/nodes/AreText.js.map +1 -0
  270. package/dist/node/nodes/AreText.mjs +18 -0
  271. package/dist/node/nodes/AreText.mjs.map +1 -0
  272. package/dist/node/signals/AreRoute.signal.d.mts +12 -0
  273. package/dist/node/signals/AreRoute.signal.d.ts +12 -0
  274. package/dist/node/signals/AreRoute.signal.js +25 -0
  275. package/dist/node/signals/AreRoute.signal.js.map +1 -0
  276. package/dist/node/signals/AreRoute.signal.mjs +24 -0
  277. package/dist/node/signals/AreRoute.signal.mjs.map +1 -0
  278. package/docs/a-logo-docs.png +0 -0
  279. package/examples/dashboard/concept.ts +60 -0
  280. package/examples/dashboard/containers/UI.container.ts +233 -0
  281. package/examples/dashboard/dist/index.html +22 -0
  282. package/examples/dashboard/dist/mnzfypsd-6zjt7w.js +11454 -0
  283. package/examples/dashboard/dist/styles.css +792 -0
  284. package/examples/dashboard/public/index.html +22 -0
  285. package/examples/dashboard/public/styles.css +792 -0
  286. package/examples/dashboard/src/components/DashboardApp.component.ts +31 -0
  287. package/examples/dashboard/src/components/DashboardHeader.component.ts +40 -0
  288. package/examples/dashboard/src/components/DashboardLogo.component.ts +29 -0
  289. package/examples/dashboard/src/components/DashboardMain.component.ts +57 -0
  290. package/examples/dashboard/src/components/DashboardMenu.component.ts +94 -0
  291. package/examples/dashboard/src/components/DashboardNav.component.ts +28 -0
  292. package/examples/dashboard/src/components/DashboardNavItem.component.ts +32 -0
  293. package/examples/dashboard/src/components/DashboardSidebar.component.ts +43 -0
  294. package/examples/dashboard/src/components/DashboardStatCard.component.ts +71 -0
  295. package/examples/dashboard/src/components/DashboardStats.component.ts +28 -0
  296. package/examples/dashboard/src/components/DashboardTable.component.ts +138 -0
  297. package/examples/dashboard/src/components/DashboardUserCard.component.ts +39 -0
  298. package/examples/dashboard/src/concept.ts +93 -0
  299. package/examples/jumpstart/concept.ts +60 -0
  300. package/examples/jumpstart/containers/UI.container.ts +233 -0
  301. package/examples/jumpstart/dist/index.html +104 -0
  302. package/examples/jumpstart/dist/mnpl1g4i-nobz9g.js +10882 -0
  303. package/examples/jumpstart/dist/static/css/main.css +40 -0
  304. package/examples/jumpstart/dist/static/img/test.png +0 -0
  305. package/examples/jumpstart/public/index.html +104 -0
  306. package/examples/jumpstart/public/static/css/main.css +40 -0
  307. package/examples/jumpstart/public/static/img/test.png +0 -0
  308. package/examples/jumpstart/src/components/A-Btn.component.ts +150 -0
  309. package/examples/jumpstart/src/components/A-Input.component.ts +78 -0
  310. package/examples/jumpstart/src/components/A-Navigation.component.ts +167 -0
  311. package/examples/jumpstart/src/components/List.component.ts +138 -0
  312. package/examples/jumpstart/src/components/PromptTextArea.component.ts +359 -0
  313. package/examples/jumpstart/src/components/SignInComponent.component.ts +127 -0
  314. package/examples/jumpstart/src/concept.ts +105 -0
  315. package/jest.config.ts +61 -0
  316. package/package.json +110 -0
  317. package/src/attributes/AreBinding.attribute.ts +19 -0
  318. package/src/attributes/AreDirective.attribute.ts +26 -0
  319. package/src/attributes/AreEvent.attribute.ts +5 -0
  320. package/src/attributes/AreStatic.attribute.ts +6 -0
  321. package/src/directives/AreComponent.directive.ts +0 -0
  322. package/src/directives/AreDirectiveFor.directive.ts +322 -0
  323. package/src/directives/AreDirectiveIf.directive.ts +130 -0
  324. package/src/engine/AreHTML.compiler.ts +226 -0
  325. package/src/engine/AreHTML.constants.ts +2 -0
  326. package/src/engine/AreHTML.context.ts +196 -0
  327. package/src/engine/AreHTML.engine.ts +210 -0
  328. package/src/engine/AreHTML.interpreter.ts +466 -0
  329. package/src/engine/AreHTML.lifecycle.ts +96 -0
  330. package/src/engine/AreHTML.tokenizer.ts +90 -0
  331. package/src/engine/AreHTML.transformer.ts +37 -0
  332. package/src/engine/AreHTML.types.ts +6 -0
  333. package/src/index.ts +80 -0
  334. package/src/instructions/AddAttribute.instruction.ts +25 -0
  335. package/src/instructions/AddComment.instruction.ts +27 -0
  336. package/src/instructions/AddElement.instruction.ts +22 -0
  337. package/src/instructions/AddInterpolation.instruction.ts +24 -0
  338. package/src/instructions/AddListener.instruction.ts +24 -0
  339. package/src/instructions/AddStyle.instruction.ts +24 -0
  340. package/src/instructions/AddText.instruction.ts +21 -0
  341. package/src/instructions/AreHTML.instructions.constants.ts +11 -0
  342. package/src/instructions/AreHTML.instructions.types.ts +51 -0
  343. package/src/lib/AreDirective/AreDirective.component.ts +124 -0
  344. package/src/lib/AreDirective/AreDirective.constants.ts +16 -0
  345. package/src/lib/AreDirective/AreDirective.context.ts +16 -0
  346. package/src/lib/AreDirective/AreDirective.meta.ts +9 -0
  347. package/src/lib/AreDirective/AreDirective.types.ts +14 -0
  348. package/src/lib/AreHTML/AreHTML.tokenizer.ts +86 -0
  349. package/src/lib/AreHTMLAttribute/AreHTML.attribute.ts +13 -0
  350. package/src/lib/AreHTMLNode/AreHTMLNode.ts +84 -0
  351. package/src/lib/AreRoot/AreRoot.component.ts +134 -0
  352. package/src/lib/AreStyle/AreStyle.context.ts +20 -0
  353. package/src/lib/AreStyle/AreStyle.types.ts +0 -0
  354. package/src/lib/AreWatcher/AreWatcher.component.ts +84 -0
  355. package/src/nodes/AreComment.ts +17 -0
  356. package/src/nodes/AreComponent.ts +25 -0
  357. package/src/nodes/AreInterpolation.ts +16 -0
  358. package/src/nodes/AreRoot.ts +29 -0
  359. package/src/nodes/AreText.ts +17 -0
  360. package/src/signals/AreRoute.signal.ts +27 -0
  361. package/tests/AreTokenizer.test.ts +260 -0
  362. package/tests/jest.setup.ts +30 -0
  363. package/tsconfig.json +60 -0
  364. package/tslint.json +98 -0
  365. package/tsup.config.ts +108 -0
@@ -0,0 +1,82 @@
1
+ 'use strict';
2
+
3
+ var aConcept = require('@adaas/a-concept');
4
+ var are = require('@adaas/are');
5
+ var AreComponent = require('../../nodes/AreComponent');
6
+ var aLogger = require('@adaas/a-utils/a-logger');
7
+ var AreRoot = require('../../nodes/AreRoot');
8
+ var AreDirective_attribute = require('../../attributes/AreDirective.attribute');
9
+ var AreEvent_attribute = require('../../attributes/AreEvent.attribute');
10
+ var AreBinding_attribute = require('../../attributes/AreBinding.attribute');
11
+ var AreStatic_attribute = require('../../attributes/AreStatic.attribute');
12
+
13
+ var __defProp = Object.defineProperty;
14
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
15
+ var __decorateClass = (decorators, target, key, kind) => {
16
+ var result = __getOwnPropDesc(target, key) ;
17
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
18
+ if (decorator = decorators[i])
19
+ result = (decorator(target, key, result) ) || result;
20
+ if (result) __defProp(target, key, result);
21
+ return result;
22
+ };
23
+ var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
24
+ class AreHTMLTokenizer extends are.AreTokenizer {
25
+ constructor() {
26
+ super(...arguments);
27
+ this.ATTR_PATTERN = /([$:@]?[\w-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>/"'=]+)))?/g;
28
+ }
29
+ tokenize(node, context, logger) {
30
+ super.tokenize(node, context, logger);
31
+ context.startPerformance("attributeExtraction");
32
+ const attributes = this.extractAttributes(node.markup);
33
+ for (const attr of attributes) {
34
+ node.scope.register(attr);
35
+ }
36
+ context.endPerformance("attributeExtraction");
37
+ }
38
+ extractAttributes(markup) {
39
+ const withoutTag = markup.replace(/^<[a-zA-Z][a-zA-Z0-9-]*\s*/, "");
40
+ let inSingle = false;
41
+ let inDouble = false;
42
+ let endIdx = withoutTag.length;
43
+ for (let i = 0; i < withoutTag.length; i++) {
44
+ const ch = withoutTag[i];
45
+ if (ch === '"' && !inSingle) inDouble = !inDouble;
46
+ else if (ch === "'" && !inDouble) inSingle = !inSingle;
47
+ else if (ch === ">" && !inSingle && !inDouble) {
48
+ endIdx = i;
49
+ break;
50
+ }
51
+ }
52
+ const attrString = withoutTag.slice(0, endIdx).replace(/\s*\/?\s*$/, "").trim();
53
+ const results = [];
54
+ for (const match of attrString.matchAll(this.ATTR_PATTERN)) {
55
+ const raw = match[0];
56
+ const full = match[1];
57
+ const value = match[2] ?? match[3] ?? match[4] ?? "true";
58
+ const prefix = full[0];
59
+ const isSpecial = prefix === ":" || prefix === "@" || prefix === "$";
60
+ const name = isSpecial ? full.slice(1) : full;
61
+ const meta = { name, content: value, raw, prefix: isSpecial ? prefix : "" };
62
+ if (prefix === ":") results.push(new AreBinding_attribute.AreBindingAttribute(meta));
63
+ else if (prefix === "@") results.push(new AreEvent_attribute.AreEventAttribute(meta));
64
+ else if (prefix === "$") results.push(new AreDirective_attribute.AreDirectiveAttribute(meta));
65
+ else results.push(new AreStatic_attribute.AreStaticAttribute(meta));
66
+ }
67
+ return results;
68
+ }
69
+ }
70
+ __decorateClass([
71
+ aConcept.A_Feature.Extend({
72
+ name: are.AreNodeFeatures.onTokenize,
73
+ scope: [AreComponent.AreComponentNode, AreRoot.AreRootNode]
74
+ }),
75
+ __decorateParam(0, aConcept.A_Inject(aConcept.A_Caller)),
76
+ __decorateParam(1, aConcept.A_Inject(are.AreContext)),
77
+ __decorateParam(2, aConcept.A_Inject(aLogger.A_Logger))
78
+ ], AreHTMLTokenizer.prototype, "tokenize");
79
+
80
+ exports.AreHTMLTokenizer = AreHTMLTokenizer;
81
+ //# sourceMappingURL=AreHTML.tokenizer.js.map
82
+ //# sourceMappingURL=AreHTML.tokenizer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/lib/AreHTML/AreHTML.tokenizer.ts"],"names":["AreTokenizer","AreBindingAttribute","AreEventAttribute","AreDirectiveAttribute","AreStaticAttribute","A_Feature","AreNodeFeatures","AreComponentNode","AreRootNode","A_Caller","AreContext","A_Logger"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAYO,MAAM,yBAAyBA,gBAAA,CAAa;AAAA,EAA5C,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AAEH,IAAA,IAAA,CAAA,YAAA,GAAe,kEAAA;AAAA,EAAA;AAAA,EAOf,QAAA,CACwB,IAAA,EACE,OAAA,EACF,MAAA,EAChB;AAEJ,IAAA,KAAA,CAAM,QAAA,CAAS,IAAA,EAAM,OAAA,EAAS,MAAM,CAAA;AAEpC,IAAA,OAAA,CAAQ,iBAAiB,qBAAqB,CAAA;AAE9C,IAAA,MAAM,UAAA,GAAa,IAAA,CAAK,iBAAA,CAAkB,IAAA,CAAK,MAAM,CAAA;AAErD,IAAA,KAAA,MAAW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eFeatures, AreNode, AreTokenizer, AreAttribute_Init, AreContext } from \"@adaas/are\";\nimport { AreComponentNode } from \"../../nodes/AreComponent\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { AreRootNode } from \"../../nodes/AreRoot\";\nimport { AreHTMLAttribute } from \"../AreHTMLAttribute/AreHTML.attribute\";\nimport { AreDirectiveAttribute } from \"../../attributes/AreDirective.attribute\";\nimport { AreEventAttribute } from \"../../attributes/AreEvent.attribute\";\nimport { AreBindingAttribute } from \"../../attributes/AreBinding.attribute\";\nimport { AreStaticAttribute } from \"../../attributes/AreStatic.attribute\";\n\n\nexport class AreHTMLTokenizer extends AreTokenizer {\n\n ATTR_PATTERN = /([$:@]?[\\w-]+)(?:\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)'|([^\\s>/\"'=]+)))?/g\n\n\n @A_Feature.Extend({\n name: AreNodeFeatures.onTokenize,\n scope: [AreComponentNode, AreRootNode]\n })\n tokenize(\n @A_Inject(A_Caller) node: AreNode,\n @A_Inject(AreContext) context: AreContext,\n @A_Inject(A_Logger) logger?: A_Logger\n ): void {\n\n super.tokenize(node, context, logger);\n\n context.startPerformance('attributeExtraction');\n\n const attributes = this.extractAttributes(node.markup);\n\n for (const attr of attributes) {\n node.scope.register(attr);\n }\n\n context.endPerformance('attributeExtraction');\n }\n\n\n\n extractAttributes(markup: string): AreHTMLAttribute[] {\n // Strip the tag name, then remove the closing > that is NOT inside quotes\n const withoutTag = markup.replace(/^<[a-zA-Z][a-zA-Z0-9-]*\\s*/, '')\n\n // Walk the string to find the closing > that isn't inside a quoted value\n let inSingle = false\n let inDouble = false\n let endIdx = withoutTag.length\n\n for (let i = 0; i < withoutTag.length; i++) {\n const ch = withoutTag[i]\n if (ch === '\"' && !inSingle) inDouble = !inDouble\n else if (ch === \"'\" && !inDouble) inSingle = !inSingle\n else if (ch === '>' && !inSingle && !inDouble) {\n endIdx = i\n break\n }\n }\n\n const attrString = withoutTag.slice(0, endIdx).replace(/\\s*\\/?\\s*$/, '').trim()\n\n const results: AreHTMLAttribute[] = []\n\n for (const match of attrString.matchAll(this.ATTR_PATTERN)) {\n const raw = match[0]\n const full = match[1] // e.g. ':class', '@click', '$for', 'id'\n const value = match[2] ?? match[3] ?? match[4] ?? 'true'\n\n const prefix = full[0]\n const isSpecial = prefix === ':' || prefix === '@' || prefix === '$'\n const name = isSpecial ? full.slice(1) : full\n\n const meta: AreAttribute_Init = { name, content: value, raw, prefix: isSpecial ? prefix : '' }\n\n if (prefix === ':') results.push(new AreBindingAttribute(meta))\n else if (prefix === '@') results.push(new AreEventAttribute(meta))\n else if (prefix === '$') results.push(new AreDirectiveAttribute(meta))\n else results.push(new AreStaticAttribute(meta))\n }\n\n return results\n }\n\n}"]}
@@ -0,0 +1,70 @@
1
+ import { __decorateClass, __decorateParam } from '../../chunk-EQQGB2QZ.mjs';
2
+ import { A_Feature, A_Inject, A_Caller } from '@adaas/a-concept';
3
+ import { AreNodeFeatures, AreContext, AreTokenizer } from '@adaas/are';
4
+ import { AreComponentNode } from '../../nodes/AreComponent';
5
+ import { A_Logger } from '@adaas/a-utils/a-logger';
6
+ import { AreRootNode } from '../../nodes/AreRoot';
7
+ import { AreDirectiveAttribute } from '../../attributes/AreDirective.attribute';
8
+ import { AreEventAttribute } from '../../attributes/AreEvent.attribute';
9
+ import { AreBindingAttribute } from '../../attributes/AreBinding.attribute';
10
+ import { AreStaticAttribute } from '../../attributes/AreStatic.attribute';
11
+
12
+ class AreHTMLTokenizer extends AreTokenizer {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.ATTR_PATTERN = /([$:@]?[\w-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>/"'=]+)))?/g;
16
+ }
17
+ tokenize(node, context, logger) {
18
+ super.tokenize(node, context, logger);
19
+ context.startPerformance("attributeExtraction");
20
+ const attributes = this.extractAttributes(node.markup);
21
+ for (const attr of attributes) {
22
+ node.scope.register(attr);
23
+ }
24
+ context.endPerformance("attributeExtraction");
25
+ }
26
+ extractAttributes(markup) {
27
+ const withoutTag = markup.replace(/^<[a-zA-Z][a-zA-Z0-9-]*\s*/, "");
28
+ let inSingle = false;
29
+ let inDouble = false;
30
+ let endIdx = withoutTag.length;
31
+ for (let i = 0; i < withoutTag.length; i++) {
32
+ const ch = withoutTag[i];
33
+ if (ch === '"' && !inSingle) inDouble = !inDouble;
34
+ else if (ch === "'" && !inDouble) inSingle = !inSingle;
35
+ else if (ch === ">" && !inSingle && !inDouble) {
36
+ endIdx = i;
37
+ break;
38
+ }
39
+ }
40
+ const attrString = withoutTag.slice(0, endIdx).replace(/\s*\/?\s*$/, "").trim();
41
+ const results = [];
42
+ for (const match of attrString.matchAll(this.ATTR_PATTERN)) {
43
+ const raw = match[0];
44
+ const full = match[1];
45
+ const value = match[2] ?? match[3] ?? match[4] ?? "true";
46
+ const prefix = full[0];
47
+ const isSpecial = prefix === ":" || prefix === "@" || prefix === "$";
48
+ const name = isSpecial ? full.slice(1) : full;
49
+ const meta = { name, content: value, raw, prefix: isSpecial ? prefix : "" };
50
+ if (prefix === ":") results.push(new AreBindingAttribute(meta));
51
+ else if (prefix === "@") results.push(new AreEventAttribute(meta));
52
+ else if (prefix === "$") results.push(new AreDirectiveAttribute(meta));
53
+ else results.push(new AreStaticAttribute(meta));
54
+ }
55
+ return results;
56
+ }
57
+ }
58
+ __decorateClass([
59
+ A_Feature.Extend({
60
+ name: AreNodeFeatures.onTokenize,
61
+ scope: [AreComponentNode, AreRootNode]
62
+ }),
63
+ __decorateParam(0, A_Inject(A_Caller)),
64
+ __decorateParam(1, A_Inject(AreContext)),
65
+ __decorateParam(2, A_Inject(A_Logger))
66
+ ], AreHTMLTokenizer.prototype, "tokenize", 1);
67
+
68
+ export { AreHTMLTokenizer };
69
+ //# sourceMappingURL=AreHTML.tokenizer.mjs.map
70
+ //# sourceMappingURL=AreHTML.tokenizer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/lib/AreHTML/AreHT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,CAAC,CAAA;AAAA,IAClD;AAEA,IAAA,OAAO,OAAA;AAAA,EACX;AAEJ;AAhEI,eAAA,CAAA;AAAA,EAJC,UAAU,MAAA,CAAO;AAAA,IACd,MAAM,eAAA,CAAgB,UAAA;AAAA,IACtB,KAAA,EAAO,CAAC,gBAAA,EAAkB,WAAW;AAAA,GACxC,CAAA;AAAA,EAEI,4BAAS,QAAQ,CAAA,CAAA;AAAA,EACjB,4BAAS,UAAU,CAAA,CAAA;AAAA,EACnB,4BAAS,QAAQ,CAAA;AAAA,CAAA,EAZb,gBAAA,CAST,SAAA,EAAA,UAAA,EAAA,CAAA,CAAA","file":"AreHTML.tokenizer.mjs","sourcesContent":["import { A_Caller, A_Feature, A_Inject } from \"@adaas/a-concept\";\nimport { AreNodeFeatures, AreNode, AreTokenizer, AreAttribute_Init, AreContext } from \"@adaas/are\";\nimport { AreComponentNode } from \"../../nodes/AreComponent\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { AreRootNode } from \"../../nodes/AreRoot\";\nimport { AreHTMLAttribute } from \"../AreHTMLAttribute/AreHTML.attribute\";\nimport { AreDirectiveAttribute } from \"../../attributes/AreDirective.attribute\";\nimport { AreEventAttribute } from \"../../attributes/AreEvent.attribute\";\nimport { AreBindingAttribute } from \"../../attributes/AreBinding.attribute\";\nimport { AreStaticAttribute } from \"../../attributes/AreStatic.attribute\";\n\n\nexport class AreHTMLTokenizer extends AreTokenizer {\n\n ATTR_PATTERN = /([$:@]?[\\w-]+)(?:\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)'|([^\\s>/\"'=]+)))?/g\n\n\n @A_Feature.Extend({\n name: AreNodeFeatures.onTokenize,\n scope: [AreComponentNode, AreRootNode]\n })\n tokenize(\n @A_Inject(A_Caller) node: AreNode,\n @A_Inject(AreContext) context: AreContext,\n @A_Inject(A_Logger) logger?: A_Logger\n ): void {\n\n super.tokenize(node, context, logger);\n\n context.startPerformance('attributeExtraction');\n\n const attributes = this.extractAttributes(node.markup);\n\n for (const attr of attributes) {\n node.scope.register(attr);\n }\n\n context.endPerformance('attributeExtraction');\n }\n\n\n\n extractAttributes(markup: string): AreHTMLAttribute[] {\n // Strip the tag name, then remove the closing > that is NOT inside quotes\n const withoutTag = markup.replace(/^<[a-zA-Z][a-zA-Z0-9-]*\\s*/, '')\n\n // Walk the string to find the closing > that isn't inside a quoted value\n let inSingle = false\n let inDouble = false\n let endIdx = withoutTag.length\n\n for (let i = 0; i < withoutTag.length; i++) {\n const ch = withoutTag[i]\n if (ch === '\"' && !inSingle) inDouble = !inDouble\n else if (ch === \"'\" && !inDouble) inSingle = !inSingle\n else if (ch === '>' && !inSingle && !inDouble) {\n endIdx = i\n break\n }\n }\n\n const attrString = withoutTag.slice(0, endIdx).replace(/\\s*\\/?\\s*$/, '').trim()\n\n const results: AreHTMLAttribute[] = []\n\n for (const match of attrString.matchAll(this.ATTR_PATTERN)) {\n const raw = match[0]\n const full = match[1] // e.g. ':class', '@click', '$for', 'id'\n const value = match[2] ?? match[3] ?? match[4] ?? 'true'\n\n const prefix = full[0]\n const isSpecial = prefix === ':' || prefix === '@' || prefix === '$'\n const name = isSpecial ? full.slice(1) : full\n\n const meta: AreAttribute_Init = { name, content: value, raw, prefix: isSpecial ? prefix : '' }\n\n if (prefix === ':') results.push(new AreBindingAttribute(meta))\n else if (prefix === '@') results.push(new AreEventAttribute(meta))\n else if (prefix === '$') results.push(new AreDirectiveAttribute(meta))\n else results.push(new AreStaticAttribute(meta))\n }\n\n return results\n }\n\n}"]}
@@ -0,0 +1,4 @@
1
+ import '@adaas/are';
2
+ export { d as AreHTMLAttribute } from '../../AreBinding.attribute-C6qrxN8K.mjs';
3
+ import '@adaas/a-concept';
4
+ import '../AreStyle/AreStyle.context.mjs';
@@ -0,0 +1,4 @@
1
+ import '@adaas/are';
2
+ export { d as AreHTMLAttribute } from '../../AreBinding.attribute-C6JasbJL.js';
3
+ import '@adaas/a-concept';
4
+ import '../AreStyle/AreStyle.context.js';
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var are = require('@adaas/are');
4
+
5
+ class AreHTMLAttribute extends are.AreAttribute {
6
+ get owner() {
7
+ return this.scope.issuer();
8
+ }
9
+ }
10
+
11
+ exports.AreHTMLAttribute = AreHTMLAttribute;
12
+ //# sourceMappingURL=AreHTML.attribute.js.map
13
+ //# sourceMappingURL=AreHTML.attribute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/lib/AreHTMLAttribute/AreHTML.attribute.ts"],"names":["AreAttribute"],"mappings":";;;;AAMO,MAAM,yBAAyBA,gBAAA,CAAa;AAAA,EAE/C,IAAI,KAAA,GAAqB;AACrB,IAAA,OAAO,IAAA,CAAK,MAAM,MAAA,EAAO;AAAA,EAC7B;AAEJ","file":"AreHTML.attribute.js","sourcesContent":["import { AreAttribute } from \"@adaas/are\";\nimport { AreHTMLNode } from \"../AreHTMLNode/AreHTMLNode\";\n\n\n\n\nexport class AreHTMLAttribute extends AreAttribute {\n\n get owner(): AreHTMLNode {\n return this.scope.issuer() as AreHTMLNode;\n }\n\n}"]}
@@ -0,0 +1,12 @@
1
+ import '../../chunk-EQQGB2QZ.mjs';
2
+ import { AreAttribute } from '@adaas/are';
3
+
4
+ class AreHTMLAttribute extends AreAttribute {
5
+ get owner() {
6
+ return this.scope.issuer();
7
+ }
8
+ }
9
+
10
+ export { AreHTMLAttribute };
11
+ //# sourceMappingURL=AreHTML.attribute.mjs.map
12
+ //# sourceMappingURL=AreHTML.attribute.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/lib/AreHTMLAttribute/AreHTML.attribute.ts"],"names":[],"mappings":";;;AAMO,MAAM,yBAAyB,YAAA,CAAa;AAAA,EAE/C,IAAI,KAAA,GAAqB;AACrB,IAAA,OAAO,IAAA,CAAK,MAAM,MAAA,EAAO;AAAA,EAC7B;AAEJ","file":"AreHTML.attribute.mjs","sourcesContent":["import { AreAttribute } from \"@adaas/are\";\nimport { AreHTMLNode } from \"../AreHTMLNode/AreHTMLNode\";\n\n\n\n\nexport class AreHTMLAttribute extends AreAttribute {\n\n get owner(): AreHTMLNode {\n return this.scope.issuer() as AreHTMLNode;\n }\n\n}"]}
@@ -0,0 +1,4 @@
1
+ import '@adaas/are';
2
+ export { e as AreHTMLNode } from '../../AreBinding.attribute-C6qrxN8K.mjs';
3
+ import '../AreStyle/AreStyle.context.mjs';
4
+ import '@adaas/a-concept';
@@ -0,0 +1,4 @@
1
+ import '@adaas/are';
2
+ export { e as AreHTMLNode } from '../../AreBinding.attribute-C6JasbJL.js';
3
+ import '../AreStyle/AreStyle.context.js';
4
+ import '@adaas/a-concept';
@@ -0,0 +1,82 @@
1
+ 'use strict';
2
+
3
+ var aConcept = require('@adaas/a-concept');
4
+ var aFrame = require('@adaas/a-frame');
5
+ var are = require('@adaas/are');
6
+ var AreBinding_attribute = require('@adaas/are-html/attributes/AreBinding.attribute');
7
+ var AreDirective_attribute = require('@adaas/are-html/attributes/AreDirective.attribute');
8
+ var AreEvent_attribute = require('@adaas/are-html/attributes/AreEvent.attribute');
9
+ var AreStatic_attribute = require('@adaas/are-html/attributes/AreStatic.attribute');
10
+ var AreStyle_context = require('@adaas/are-html/style/AreStyle.context');
11
+
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __decorateClass = (decorators, target, key, kind) => {
14
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
15
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
16
+ if (decorator = decorators[i])
17
+ result = (decorator(result)) || result;
18
+ return result;
19
+ };
20
+ exports.AreHTMLNode = class AreHTMLNode extends are.AreNode {
21
+ /**
22
+ * Actual node type.
23
+ * By default it's a tag name
24
+ */
25
+ get tag() {
26
+ return this.aseid.entity;
27
+ }
28
+ /**
29
+ * The static attributes defined for the node, which are typically used to represent static properties or characteristics of the node that do not change based on the context or state. These attributes are usually defined in the template and are not reactive.
30
+ *
31
+ * Example: For a node defined as `<div class="static-class">`, the static attribute would be `class="static-class"`.
32
+ */
33
+ get staticAttributes() {
34
+ return this.scope.resolveFlatAll(AreStatic_attribute.AreStaticAttribute);
35
+ }
36
+ /**
37
+ * The binding attributes defined for the node, which are typically used to represent dynamic properties or characteristics of the node that can change based on the context or state. These attributes are usually defined in the template with a specific syntax (e.g., `:prop="value"` or `v-bind:prop="value"`) and are reactive, meaning that they will update automatically when the underlying data changes.
38
+ *
39
+ * Example: For a node defined as `<div :class="dynamicClass">`, the binding attribute would be `:class="dynamicClass"`.
40
+ */
41
+ get bindings() {
42
+ return this.scope.resolveFlatAll(AreBinding_attribute.AreBindingAttribute);
43
+ }
44
+ /**
45
+ * The directive attributes defined for the node, which are typically used to represent special instructions or behaviors that should be applied to the node. These attributes are usually defined in the template with a specific syntax (e.g., `v-if="condition"` or `v-for="item in list"`) and are processed by the rendering engine to apply the corresponding logic or behavior to the node.
46
+ *
47
+ * Example: For a node defined as `<div v-if="isVisible">`, the directive attribute would be `v-if="isVisible"`.
48
+ */
49
+ get directives() {
50
+ const directives = this.scope.resolveFlatAll(AreDirective_attribute.AreDirectiveAttribute);
51
+ return directives.filter((d) => d.component).sort((a, b) => {
52
+ const aMeta = aConcept.A_Context.meta(a.component);
53
+ const bMeta = aConcept.A_Context.meta(b.component);
54
+ const aPriority = aMeta.priority ?? 0;
55
+ const bPriority = bMeta.priority ?? 0;
56
+ return bPriority - aPriority;
57
+ });
58
+ }
59
+ /**
60
+ * The event attributes defined for the node, which are typically used to represent event listeners or handlers that should be attached to the node. These attributes are usually defined in the template with a specific syntax (e.g., `@click="handleClick"` or `v-on:click="handleClick"`) and are processed by the rendering engine to attach the corresponding event listeners to the node.
61
+ *
62
+ * Example: For a node defined as `<button @click="handleClick">`, the event attribute would be `@click="handleClick"`.
63
+ */
64
+ get events() {
65
+ return this.scope.resolveFlatAll(AreEvent_attribute.AreEventAttribute);
66
+ }
67
+ /**
68
+ * The styles defined for the node, which can include inline styles or styles defined in a separate stylesheet that are applied to the node. These styles can be used to control the visual appearance of the node and can be defined using standard CSS syntax.
69
+ */
70
+ get styles() {
71
+ return this.scope.resolveFlat(AreStyle_context.AreStyle);
72
+ }
73
+ };
74
+ exports.AreHTMLNode = __decorateClass([
75
+ aFrame.A_Frame.Entity({
76
+ namespace: "A-ARE",
77
+ name: "AreHTMLNode",
78
+ description: "AreHTMLNode represents a node in the HTML structure. It extends the base AreNode and includes properties and methods specific to HTML nodes, such as handling attributes, directives, events, and styles."
79
+ })
80
+ ], exports.AreHTMLNode);
81
+ //# sourceMappingURL=AreHTMLNode.js.map
82
+ //# sourceMappingURL=AreHTMLNode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/lib/AreHTMLNode/AreHTMLNode.ts"],"names":["AreHTMLNode","AreNode","AreStaticAttribute","AreBindingAttribute","AreDirectiveAttribute","A_Context","AreEventAttribute","AreStyle","A_Frame"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBaA,mBAAA,GAAN,0BAA0BC,WAAA,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrC,IAAI,GAAA,GAAc;AACd,IAAA,OAAO,KAAK,KAAA,CAAM,MAAA;AAAA,EACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,gBAAA,GAAyC;AACzC,IAAA,OAAO,IAAA,CAAK,KAAA,CAAM,cAAA,CAAmCC,sCAAkB,CAAA;AAAA,EAC3E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,QAAA,GAAkC;AAClC,IAAA,OAAO,IAAA,CAAK,KAAA,CAAM,cAAA,CAAoCC,wCAAmB,CAAA;AAAA,EAC7E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,UAAA,GAAsC;AAItC,IAAA,MAAM,UAAA,GAAa,IAAA,CAAK,KAAA,CAAM,cAAA,CAAsCC,4CAAqB,CAAA;AAOzF,IAAA,OAAO,UAAA,CAAW,OAAO,CAAA,CAAA,KAAK,CAAA,CAAE,SAAS,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,EAAG,CAAA,KAAM;AACtD,MAAA,MAAM,KAAA,GAAQC,kBAAA,CAAU,IAAA,CAAqC,CAAA,CAAE,SAAU,CAAA;AACzE,MAAA,MAAM,KAAA,GAAQA,kBAAA,CAAU,IAAA,CAAqC,CAAA,CAAE,SAAU,CAAA;AAEzE,MAAA,MAAM,SAAA,GAAY,MAAM,QAAA,IAAY,CAAA;AACpC,MAAA,MAAM,SAAA,GAAY,MAAM,QAAA,IAAY,CAAA;AAEpC,MAAA,OAAO,SAAA,GAAY,SAAA;AAAA,IACvB,CAAC,CAAA;AAAA,EACL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,MAAA,GAA8B;AAC9B,IAAA,OAAO,IAAA,CAAK,KAAA,CAAM,cAAA,CAAkCC,oCAAiB,CAAA;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA,EAIA,IAAI,MAAA,GAAmB;AACnB,IAAA,OAAO,IAAA,CAAK,KAAA,CAAM,WAAA,CAAsBC,yBAAQ,CAAA;AAAA,EACpD;AAEJ;AAjEaP,mBAAA,GAAN,eAAA,CAAA;AAAA,EALNQ,eAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,OAAA;AAAA,IACX,IAAA,EAAM,aAAA;AAAA,IACN,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACYR,mBAAA,CAAA","file":"AreHTMLNode.js","sourcesContent":["import { A_Context, } from \"@adaas/a-concept\";\nimport { A_Frame } from \"@adaas/a-frame\";\nimport { AreNode} from \"@adaas/are\";\nimport { AreBindingAttribute } from \"@adaas/are-html/attributes/AreBinding.attribute\";\nimport { AreDirectiveAttribute } from \"@adaas/are-html/attributes/AreDirective.attribute\";\nimport { AreEventAttribute } from \"@adaas/are-html/attributes/AreEvent.attribute\";\nimport { AreStaticAttribute } from \"@adaas/are-html/attributes/AreStatic.attribute\";\nimport { AreStyle } from \"@adaas/are-html/style/AreStyle.context\";\nimport { AreDirective } from \"@adaas/are-html/directive/AreDirective.component\";\nimport { AreDirectiveMeta } from \"@adaas/are-html/directive/AreDirective.meta\";\n\n\n\n@A_Frame.Entity({\n namespace: 'A-ARE',\n name: 'AreHTMLNode',\n description: 'AreHTMLNode represents a node in the HTML structure. It extends the base AreNode and includes properties and methods specific to HTML nodes, such as handling attributes, directives, events, and styles.'\n})\nexport class AreHTMLNode extends AreNode {\n /**\n * Actual node type. \n * By default it's a tag name\n */\n get tag(): string {\n return this.aseid.entity;\n }\n /**\n * The static attributes defined for the node, which are typically used to represent static properties or characteristics of the node that do not change based on the context or state. These attributes are usually defined in the template and are not reactive.\n * \n * Example: For a node defined as `<div class=\"static-class\">`, the static attribute would be `class=\"static-class\"`.\n */\n get staticAttributes(): AreStaticAttribute[] {\n return this.scope.resolveFlatAll<AreStaticAttribute>(AreStaticAttribute);\n }\n /**\n * The binding attributes defined for the node, which are typically used to represent dynamic properties or characteristics of the node that can change based on the context or state. These attributes are usually defined in the template with a specific syntax (e.g., `:prop=\"value\"` or `v-bind:prop=\"value\"`) and are reactive, meaning that they will update automatically when the underlying data changes.\n * \n * Example: For a node defined as `<div :class=\"dynamicClass\">`, the binding attribute would be `:class=\"dynamicClass\"`.\n */\n get bindings(): AreBindingAttribute[] {\n return this.scope.resolveFlatAll<AreBindingAttribute>(AreBindingAttribute);\n }\n /**\n * The directive attributes defined for the node, which are typically used to represent special instructions or behaviors that should be applied to the node. These attributes are usually defined in the template with a specific syntax (e.g., `v-if=\"condition\"` or `v-for=\"item in list\"`) and are processed by the rendering engine to apply the corresponding logic or behavior to the node.\n * \n * Example: For a node defined as `<div v-if=\"isVisible\">`, the directive attribute would be `v-if=\"isVisible\"`.\n */\n get directives(): AreDirectiveAttribute[] {\n /**\n * 1. get all registered directives for the node\n */\n const directives = this.scope.resolveFlatAll<AreDirectiveAttribute>(AreDirectiveAttribute)!;\n /**\n * 2. Order them in the way that defined in the meta\n * \n * Each meta has a prioprity of order that may impact the way how directives are compiled and rendered. For example, a directive with higher priority may need to be compiled before other directives to ensure that its logic is applied correctly before other directives are processed. By ordering the directives based on their defined priority in the meta, we can ensure that the compilation and rendering process follows the intended logic and behavior as defined by the directive implementations.\n */\n\n return directives.filter(d => d.component).sort((a, b) => {\n const aMeta = A_Context.meta<AreDirectiveMeta, AreDirective>(a.component!);\n const bMeta = A_Context.meta<AreDirectiveMeta, AreDirective>(b.component!);\n\n const aPriority = aMeta.priority ?? 0;\n const bPriority = bMeta.priority ?? 0;\n\n return bPriority - aPriority;\n });\n }\n /**\n * The event attributes defined for the node, which are typically used to represent event listeners or handlers that should be attached to the node. These attributes are usually defined in the template with a specific syntax (e.g., `@click=\"handleClick\"` or `v-on:click=\"handleClick\"`) and are processed by the rendering engine to attach the corresponding event listeners to the node.\n * \n * Example: For a node defined as `<button @click=\"handleClick\">`, the event attribute would be `@click=\"handleClick\"`.\n */\n get events(): AreEventAttribute[] {\n return this.scope.resolveFlatAll<AreEventAttribute>(AreEventAttribute)!;\n }\n /**\n * The styles defined for the node, which can include inline styles or styles defined in a separate stylesheet that are applied to the node. These styles can be used to control the visual appearance of the node and can be defined using standard CSS syntax.\n */\n get styles(): AreStyle {\n return this.scope.resolveFlat<AreStyle>(AreStyle)!;\n }\n\n}"]}
@@ -0,0 +1,75 @@
1
+ import { __decorateClass } from '../../chunk-EQQGB2QZ.mjs';
2
+ import { A_Context } from '@adaas/a-concept';
3
+ import { A_Frame } from '@adaas/a-frame';
4
+ import { AreNode } from '@adaas/are';
5
+ import { AreBindingAttribute } from '@adaas/are-html/attributes/AreBinding.attribute';
6
+ import { AreDirectiveAttribute } from '@adaas/are-html/attributes/AreDirective.attribute';
7
+ import { AreEventAttribute } from '@adaas/are-html/attributes/AreEvent.attribute';
8
+ import { AreStaticAttribute } from '@adaas/are-html/attributes/AreStatic.attribute';
9
+ import { AreStyle } from '@adaas/are-html/style/AreStyle.context';
10
+
11
+ let AreHTMLNode = class extends AreNode {
12
+ /**
13
+ * Actual node type.
14
+ * By default it's a tag name
15
+ */
16
+ get tag() {
17
+ return this.aseid.entity;
18
+ }
19
+ /**
20
+ * The static attributes defined for the node, which are typically used to represent static properties or characteristics of the node that do not change based on the context or state. These attributes are usually defined in the template and are not reactive.
21
+ *
22
+ * Example: For a node defined as `<div class="static-class">`, the static attribute would be `class="static-class"`.
23
+ */
24
+ get staticAttributes() {
25
+ return this.scope.resolveFlatAll(AreStaticAttribute);
26
+ }
27
+ /**
28
+ * The binding attributes defined for the node, which are typically used to represent dynamic properties or characteristics of the node that can change based on the context or state. These attributes are usually defined in the template with a specific syntax (e.g., `:prop="value"` or `v-bind:prop="value"`) and are reactive, meaning that they will update automatically when the underlying data changes.
29
+ *
30
+ * Example: For a node defined as `<div :class="dynamicClass">`, the binding attribute would be `:class="dynamicClass"`.
31
+ */
32
+ get bindings() {
33
+ return this.scope.resolveFlatAll(AreBindingAttribute);
34
+ }
35
+ /**
36
+ * The directive attributes defined for the node, which are typically used to represent special instructions or behaviors that should be applied to the node. These attributes are usually defined in the template with a specific syntax (e.g., `v-if="condition"` or `v-for="item in list"`) and are processed by the rendering engine to apply the corresponding logic or behavior to the node.
37
+ *
38
+ * Example: For a node defined as `<div v-if="isVisible">`, the directive attribute would be `v-if="isVisible"`.
39
+ */
40
+ get directives() {
41
+ const directives = this.scope.resolveFlatAll(AreDirectiveAttribute);
42
+ return directives.filter((d) => d.component).sort((a, b) => {
43
+ const aMeta = A_Context.meta(a.component);
44
+ const bMeta = A_Context.meta(b.component);
45
+ const aPriority = aMeta.priority ?? 0;
46
+ const bPriority = bMeta.priority ?? 0;
47
+ return bPriority - aPriority;
48
+ });
49
+ }
50
+ /**
51
+ * The event attributes defined for the node, which are typically used to represent event listeners or handlers that should be attached to the node. These attributes are usually defined in the template with a specific syntax (e.g., `@click="handleClick"` or `v-on:click="handleClick"`) and are processed by the rendering engine to attach the corresponding event listeners to the node.
52
+ *
53
+ * Example: For a node defined as `<button @click="handleClick">`, the event attribute would be `@click="handleClick"`.
54
+ */
55
+ get events() {
56
+ return this.scope.resolveFlatAll(AreEventAttribute);
57
+ }
58
+ /**
59
+ * The styles defined for the node, which can include inline styles or styles defined in a separate stylesheet that are applied to the node. These styles can be used to control the visual appearance of the node and can be defined using standard CSS syntax.
60
+ */
61
+ get styles() {
62
+ return this.scope.resolveFlat(AreStyle);
63
+ }
64
+ };
65
+ AreHTMLNode = __decorateClass([
66
+ A_Frame.Entity({
67
+ namespace: "A-ARE",
68
+ name: "AreHTMLNode",
69
+ description: "AreHTMLNode represents a node in the HTML structure. It extends the base AreNode and includes properties and methods specific to HTML nodes, such as handling attributes, directives, events, and styles."
70
+ })
71
+ ], AreHTMLNode);
72
+
73
+ export { AreHTMLNode };
74
+ //# sourceMappingURL=AreHTMLNode.mjs.map
75
+ //# sourceMappingURL=AreHTMLNode.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/lib/AreHTMLNode/AreHTMLNode.ts"],"names":[],"mappings":";;;;;;;;;;AAkBO,IAAM,WAAA,GAAN,cAA0B,OAAA,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrC,IAAI,GAAA,GAAc;AACd,IAAA,OAAO,KAAK,KAAA,CAAM,MAAA;AAAA,EACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,gBAAA,GAAyC;AACzC,IAAA,OAAO,IAAA,CAAK,KAAA,CAAM,cAAA,CAAmC,kBAAkB,CAAA;AAAA,EAC3E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,QAAA,GAAkC;AAClC,IAAA,OAAO,IAAA,CAAK,KAAA,CAAM,cAAA,CAAoC,mBAAmB,CAAA;AAAA,EAC7E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,UAAA,GAAsC;AAItC,IAAA,MAAM,UAAA,GAAa,IAAA,CAAK,KAAA,CAAM,cAAA,CAAsC,qBAAqB,CAAA;AAOzF,IAAA,OAAO,UAAA,CAAW,OAAO,CAAA,CAAA,KAAK,CAAA,CAAE,SAAS,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,EAAG,CAAA,KAAM;AACtD,MAAA,MAAM,KAAA,GAAQ,SAAA,CAAU,IAAA,CAAqC,CAAA,CAAE,SAAU,CAAA;AACzE,MAAA,MAAM,KAAA,GAAQ,SAAA,CAAU,IAAA,CAAqC,CAAA,CAAE,SAAU,CAAA;AAEzE,MAAA,MAAM,SAAA,GAAY,MAAM,QAAA,IAAY,CAAA;AACpC,MAAA,MAAM,SAAA,GAAY,MAAM,QAAA,IAAY,CAAA;AAEpC,MAAA,OAAO,SAAA,GAAY,SAAA;AAAA,IACvB,CAAC,CAAA;AAAA,EACL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,MAAA,GAA8B;AAC9B,IAAA,OAAO,IAAA,CAAK,KAAA,CAAM,cAAA,CAAkC,iBAAiB,CAAA;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA,EAIA,IAAI,MAAA,GAAmB;AACnB,IAAA,OAAO,IAAA,CAAK,KAAA,CAAM,WAAA,CAAsB,QAAQ,CAAA;AAAA,EACpD;AAEJ;AAjEa,WAAA,GAAN,eAAA,CAAA;AAAA,EALN,QAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,OAAA;AAAA,IACX,IAAA,EAAM,aAAA;AAAA,IACN,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACY,WAAA,CAAA","file":"AreHTMLNode.mjs","sourcesContent":["import { A_Context, } from \"@adaas/a-concept\";\nimport { A_Frame } from \"@adaas/a-frame\";\nimport { AreNode} from \"@adaas/are\";\nimport { AreBindingAttribute } from \"@adaas/are-html/attributes/AreBinding.attribute\";\nimport { AreDirectiveAttribute } from \"@adaas/are-html/attributes/AreDirective.attribute\";\nimport { AreEventAttribute } from \"@adaas/are-html/attributes/AreEvent.attribute\";\nimport { AreStaticAttribute } from \"@adaas/are-html/attributes/AreStatic.attribute\";\nimport { AreStyle } from \"@adaas/are-html/style/AreStyle.context\";\nimport { AreDirective } from \"@adaas/are-html/directive/AreDirective.component\";\nimport { AreDirectiveMeta } from \"@adaas/are-html/directive/AreDirective.meta\";\n\n\n\n@A_Frame.Entity({\n namespace: 'A-ARE',\n name: 'AreHTMLNode',\n description: 'AreHTMLNode represents a node in the HTML structure. It extends the base AreNode and includes properties and methods specific to HTML nodes, such as handling attributes, directives, events, and styles.'\n})\nexport class AreHTMLNode extends AreNode {\n /**\n * Actual node type. \n * By default it's a tag name\n */\n get tag(): string {\n return this.aseid.entity;\n }\n /**\n * The static attributes defined for the node, which are typically used to represent static properties or characteristics of the node that do not change based on the context or state. These attributes are usually defined in the template and are not reactive.\n * \n * Example: For a node defined as `<div class=\"static-class\">`, the static attribute would be `class=\"static-class\"`.\n */\n get staticAttributes(): AreStaticAttribute[] {\n return this.scope.resolveFlatAll<AreStaticAttribute>(AreStaticAttribute);\n }\n /**\n * The binding attributes defined for the node, which are typically used to represent dynamic properties or characteristics of the node that can change based on the context or state. These attributes are usually defined in the template with a specific syntax (e.g., `:prop=\"value\"` or `v-bind:prop=\"value\"`) and are reactive, meaning that they will update automatically when the underlying data changes.\n * \n * Example: For a node defined as `<div :class=\"dynamicClass\">`, the binding attribute would be `:class=\"dynamicClass\"`.\n */\n get bindings(): AreBindingAttribute[] {\n return this.scope.resolveFlatAll<AreBindingAttribute>(AreBindingAttribute);\n }\n /**\n * The directive attributes defined for the node, which are typically used to represent special instructions or behaviors that should be applied to the node. These attributes are usually defined in the template with a specific syntax (e.g., `v-if=\"condition\"` or `v-for=\"item in list\"`) and are processed by the rendering engine to apply the corresponding logic or behavior to the node.\n * \n * Example: For a node defined as `<div v-if=\"isVisible\">`, the directive attribute would be `v-if=\"isVisible\"`.\n */\n get directives(): AreDirectiveAttribute[] {\n /**\n * 1. get all registered directives for the node\n */\n const directives = this.scope.resolveFlatAll<AreDirectiveAttribute>(AreDirectiveAttribute)!;\n /**\n * 2. Order them in the way that defined in the meta\n * \n * Each meta has a prioprity of order that may impact the way how directives are compiled and rendered. For example, a directive with higher priority may need to be compiled before other directives to ensure that its logic is applied correctly before other directives are processed. By ordering the directives based on their defined priority in the meta, we can ensure that the compilation and rendering process follows the intended logic and behavior as defined by the directive implementations.\n */\n\n return directives.filter(d => d.component).sort((a, b) => {\n const aMeta = A_Context.meta<AreDirectiveMeta, AreDirective>(a.component!);\n const bMeta = A_Context.meta<AreDirectiveMeta, AreDirective>(b.component!);\n\n const aPriority = aMeta.priority ?? 0;\n const bPriority = bMeta.priority ?? 0;\n\n return bPriority - aPriority;\n });\n }\n /**\n * The event attributes defined for the node, which are typically used to represent event listeners or handlers that should be attached to the node. These attributes are usually defined in the template with a specific syntax (e.g., `@click=\"handleClick\"` or `v-on:click=\"handleClick\"`) and are processed by the rendering engine to attach the corresponding event listeners to the node.\n * \n * Example: For a node defined as `<button @click=\"handleClick\">`, the event attribute would be `@click=\"handleClick\"`.\n */\n get events(): AreEventAttribute[] {\n return this.scope.resolveFlatAll<AreEventAttribute>(AreEventAttribute)!;\n }\n /**\n * The styles defined for the node, which can include inline styles or styles defined in a separate stylesheet that are applied to the node. These styles can be used to control the visual appearance of the node and can be defined using standard CSS syntax.\n */\n get styles(): AreStyle {\n return this.scope.resolveFlat<AreStyle>(AreStyle)!;\n }\n\n}"]}
@@ -0,0 +1,13 @@
1
+ import { A_Logger } from '@adaas/a-utils/a-logger';
2
+ import { A_SignalVector } from '@adaas/a-utils/a-signal';
3
+ import { Are, ArePropDefinition, AreNode, AreSignalsContext, AreStore } from '@adaas/are';
4
+
5
+ declare class AreRoot extends Are {
6
+ props: Record<string, ArePropDefinition>;
7
+ template(root: AreNode, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
8
+ onSignal(root: AreNode, vector: A_SignalVector, store: AreStore<{
9
+ default: string;
10
+ }>, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
11
+ }
12
+
13
+ export { AreRoot };
@@ -0,0 +1,13 @@
1
+ import { A_Logger } from '@adaas/a-utils/a-logger';
2
+ import { A_SignalVector } from '@adaas/a-utils/a-signal';
3
+ import { Are, ArePropDefinition, AreNode, AreSignalsContext, AreStore } from '@adaas/are';
4
+
5
+ declare class AreRoot extends Are {
6
+ props: Record<string, ArePropDefinition>;
7
+ template(root: AreNode, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
8
+ onSignal(root: AreNode, vector: A_SignalVector, store: AreStore<{
9
+ default: string;
10
+ }>, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
11
+ }
12
+
13
+ export { AreRoot };
@@ -0,0 +1,117 @@
1
+ 'use strict';
2
+
3
+ var aConcept = require('@adaas/a-concept');
4
+ var aFrame = require('@adaas/a-frame');
5
+ var aLogger = require('@adaas/a-utils/a-logger');
6
+ var aSignal = require('@adaas/a-utils/a-signal');
7
+ var are = require('@adaas/are');
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
+ exports.AreRoot = class AreRoot extends are.Are {
21
+ constructor() {
22
+ super(...arguments);
23
+ this.props = {
24
+ default: {
25
+ type: "string",
26
+ default: ""
27
+ }
28
+ };
29
+ }
30
+ async template(root, logger, signalsContext) {
31
+ const rootId = root.id;
32
+ if (signalsContext && !signalsContext.hasRoot(rootId)) {
33
+ return;
34
+ }
35
+ const currentRoute = are.AreRoute.default();
36
+ let componentName;
37
+ if (currentRoute) {
38
+ const initialVector = new aSignal.A_SignalVector([currentRoute]);
39
+ let renderTarget = signalsContext?.findComponentByVector(rootId, initialVector);
40
+ if (!renderTarget) {
41
+ const signalsMeta = aConcept.A_Context.meta(are.AreSignals);
42
+ renderTarget = signalsMeta?.findComponentByVector(initialVector);
43
+ }
44
+ if (renderTarget?.name) {
45
+ componentName = aConcept.A_FormatterHelper.toKebabCase(renderTarget.name);
46
+ }
47
+ }
48
+ if (!componentName) {
49
+ const defaultAttr = root.attributes.find((attr) => attr.name === "default");
50
+ componentName = defaultAttr?.content;
51
+ }
52
+ if (!componentName) {
53
+ logger.warning('AreRoot: No component found for initial render. Please ensure a route condition or "default" attribute is set.');
54
+ return;
55
+ }
56
+ root.setContent(`<${componentName}></${componentName}>`);
57
+ }
58
+ async onSignal(root, vector, store, logger, signalsContext) {
59
+ console.log("Received signal vector in AreRoot:", root, vector);
60
+ const rootId = root.id;
61
+ if (signalsContext && !signalsContext.hasRoot(rootId)) {
62
+ return;
63
+ }
64
+ let renderTarget = signalsContext?.findComponentByVector(rootId, vector);
65
+ if (!renderTarget) {
66
+ const signalsMeta = aConcept.A_Context.meta(are.AreSignals);
67
+ renderTarget = signalsMeta?.findComponentByVector(vector);
68
+ }
69
+ const componentName = renderTarget?.name ? aConcept.A_FormatterHelper.toKebabCase(renderTarget.name) : store.get("default");
70
+ if (!componentName) {
71
+ logger.warning("No component found for rendering in AreRoot. Please ensure that the signal vector matches at least one component or that a default component name is provided in the store.");
72
+ return;
73
+ }
74
+ root.setContent(`<${componentName}></${componentName}>`);
75
+ for (let i = 0; i < root.children.length; i++) {
76
+ const child = root.children[i];
77
+ child.unmount();
78
+ child.destroy();
79
+ root.removeChild(child);
80
+ }
81
+ root.tokenize();
82
+ for (let i = 0; i < root.children.length; i++) {
83
+ const child = root.children[i];
84
+ child.init();
85
+ const res = child.load();
86
+ if (res instanceof Promise) {
87
+ await res;
88
+ }
89
+ child.transform();
90
+ child.compile();
91
+ child.mount();
92
+ }
93
+ }
94
+ };
95
+ __decorateClass([
96
+ are.Are.Template,
97
+ __decorateParam(0, aConcept.A_Inject(aConcept.A_Caller)),
98
+ __decorateParam(1, aConcept.A_Inject(aLogger.A_Logger)),
99
+ __decorateParam(2, aConcept.A_Inject(are.AreSignalsContext))
100
+ ], exports.AreRoot.prototype, "template", 1);
101
+ __decorateClass([
102
+ are.Are.Signal,
103
+ __decorateParam(0, aConcept.A_Inject(aConcept.A_Caller)),
104
+ __decorateParam(1, aConcept.A_Inject(aSignal.A_SignalVector)),
105
+ __decorateParam(2, aConcept.A_Inject(are.AreStore)),
106
+ __decorateParam(3, aConcept.A_Inject(aLogger.A_Logger)),
107
+ __decorateParam(4, aConcept.A_Inject(are.AreSignalsContext))
108
+ ], exports.AreRoot.prototype, "onSignal", 1);
109
+ exports.AreRoot = __decorateClass([
110
+ aFrame.A_Frame.Component({
111
+ namespace: "A-ARE",
112
+ name: "AreRoot",
113
+ description: "The AreRoot component serves as the foundational entry point for the A-Concept Rendering Engine (ARE). It is responsible for initializing the rendering process, managing the root node of the component tree, and handling signal-based rendering logic. The AreRoot component processes incoming signals to determine which child components to render, allowing for dynamic and responsive UI updates based on application state and user interactions."
114
+ })
115
+ ], exports.AreRoot);
116
+ //# sourceMappingURL=AreRoot.component.js.map
117
+ //# sourceMappingURL=AreRoot.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/lib/AreRoot/AreRoot.component.ts"],"names":["AreRoot","Are","AreRoute","A_SignalVector","A_Context","AreSignals","A_FormatterHelper","A_Caller","A_Logger","AreSignalsContext","AreStore","A_Frame"],"mappings":";;;;;;;;;;;;;;;;;;;AAYaA,eAAA,GAAN,sBAAsBC,OAAA,CAAI;AAAA,EAA1B,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AAEH,IAAA,IAAA,CAAA,KAAA,GAA2C;AAAA,MACvC,OAAA,EAAS;AAAA,QACL,IAAA,EAAM,QAAA;AAAA,QACN,OAAA,EAAS;AAAA;AACb,KACJ;AAAA,EAAA;AAAA,EAIA,MAAM,QAAA,CACkB,I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elper, A_Inject, } from \"@adaas/a-concept\";\nimport { A_Frame } from \"@adaas/a-frame\";\nimport { A_Logger } from \"@adaas/a-utils/a-logger\";\nimport { A_SignalVector } from \"@adaas/a-utils/a-signal\";\nimport { Are, ArePropDefinition, AreStore, AreNode, AreSignals, AreSignalsMeta, AreSignalsContext, AreRoute } from \"@adaas/are\";\n\n\n@A_Frame.Component({\n namespace: 'A-ARE',\n name: 'AreRoot',\n description: 'The AreRoot component serves as the foundational entry point for the A-Concept Rendering Engine (ARE). It is responsible for initializing the rendering process, managing the root node of the component tree, and handling signal-based rendering logic. The AreRoot component processes incoming signals to determine which child components to render, allowing for dynamic and responsive UI updates based on application state and user interactions.'\n})\nexport class AreRoot extends Are {\n\n props: Record<string, ArePropDefinition> = {\n default: {\n type: 'string',\n default: '',\n }\n }\n\n\n @Are.Template\n async template(\n @A_Inject(A_Caller) root: AreNode,\n @A_Inject(A_Logger) logger: A_Logger,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n ) {\n\n const rootId = root.id;\n\n // No routing config for this root — leave the existing template content intact\n if (signalsContext && !signalsContext.hasRoot(rootId)) {\n return;\n }\n\n const currentRoute = AreRoute.default();\n\n let componentName: string | undefined;\n\n if (currentRoute) {\n const initialVector = new A_SignalVector([currentRoute]);\n\n // 1. Lookup via AreSignalsContext (per root-id conditions)\n let renderTarget = signalsContext?.findComponentByVector(rootId, initialVector);\n\n // 2. Fall back to global AreSignalsMeta\n if (!renderTarget) {\n const signalsMeta = A_Context.meta<AreSignalsMeta>(AreSignals);\n renderTarget = signalsMeta?.findComponentByVector(initialVector);\n }\n\n if (renderTarget?.name) {\n componentName = A_FormatterHelper.toKebabCase(renderTarget.name);\n }\n }\n\n // 3. Fall back to the 'default' attribute on the node directly\n // (store props are not yet compiled at template phase)\n if (!componentName) {\n const defaultAttr = root.attributes.find(attr => attr.name === 'default');\n componentName = defaultAttr?.content;\n }\n\n if (!componentName) {\n logger.warning('AreRoot: No component found for initial render. Please ensure a route condition or \"default\" attribute is set.');\n return;\n }\n\n root.setContent(`<${componentName}></${componentName}>`);\n }\n\n\n @Are.Signal\n async onSignal(\n @A_Inject(A_Caller) root: AreNode,\n @A_Inject(A_SignalVector) vector: A_SignalVector,\n @A_Inject(AreStore) store: AreStore<{ default: string }>,\n @A_Inject(A_Logger) logger: A_Logger,\n @A_Inject(AreSignalsContext) signalsContext?: AreSignalsContext,\n ) {\n console.log('Received signal vector in AreRoot:', root, vector);\n\n const rootId = root.id;\n // No routing config for this root — signals do not affect its content\n if (signalsContext && !signalsContext.hasRoot(rootId)) {\n return;\n }\n\n // 1. Try root-specific lookup via AreSignalsContext (keyed by the are-root's id attribute)\n let renderTarget = signalsContext?.findComponentByVector(rootId, vector);\n\n // 2. Fall back to global AreSignalsMeta lookup\n if (!renderTarget) {\n const signalsMeta = A_Context.meta<AreSignalsMeta>(AreSignals);\n renderTarget = signalsMeta?.findComponentByVector(vector);\n }\n\n const componentName = renderTarget?.name\n ? A_FormatterHelper.toKebabCase(renderTarget.name)\n : store.get('default');\n\n if (!componentName) {\n logger.warning('No component found for rendering in AreRoot. Please ensure that the signal vector matches at least one component or that a default component name is provided in the store.');\n return;\n }\n\n root.setContent(`<${componentName}></${componentName}>`);\n\n for (let i = 0; i < root.children.length; i++) {\n const child = root.children[i];\n child.unmount();\n child.destroy();\n root.removeChild(child);\n }\n\n\n root.tokenize();\n\n for (let i = 0; i < root.children.length; i++) {\n const child = root.children[i];\n child.init();\n\n const res = child.load();\n if (res instanceof Promise) {\n await res;\n }\n child.transform();\n\n child.compile();\n child.mount();\n }\n }\n}\n"]}