@saolabs/client 1.0.0

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 (383) hide show
  1. package/README.md +221 -0
  2. package/dist/index.d.ts +46 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +38 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/plugins.d.ts +38 -0
  7. package/dist/plugins.d.ts.map +1 -0
  8. package/dist/plugins.js +61 -0
  9. package/dist/plugins.js.map +1 -0
  10. package/dist/src/core/app/Application.d.ts +159 -0
  11. package/dist/src/core/app/Application.d.ts.map +1 -0
  12. package/dist/src/core/app/Application.js +338 -0
  13. package/dist/src/core/app/Application.js.map +1 -0
  14. package/dist/src/core/bootstrap/app.d.ts +4 -0
  15. package/dist/src/core/bootstrap/app.d.ts.map +1 -0
  16. package/dist/src/core/bootstrap/app.js +49 -0
  17. package/dist/src/core/bootstrap/app.js.map +1 -0
  18. package/dist/src/core/bootstrap/providers/ApiServiceProvider.d.ts +9 -0
  19. package/dist/src/core/bootstrap/providers/ApiServiceProvider.d.ts.map +1 -0
  20. package/dist/src/core/bootstrap/providers/ApiServiceProvider.js +18 -0
  21. package/dist/src/core/bootstrap/providers/ApiServiceProvider.js.map +1 -0
  22. package/dist/src/core/bootstrap/providers/CoreServiceProvider.d.ts +6 -0
  23. package/dist/src/core/bootstrap/providers/CoreServiceProvider.d.ts.map +1 -0
  24. package/dist/src/core/bootstrap/providers/CoreServiceProvider.js +21 -0
  25. package/dist/src/core/bootstrap/providers/CoreServiceProvider.js.map +1 -0
  26. package/dist/src/core/bootstrap/providers/HelperServiceProvider.d.ts +7 -0
  27. package/dist/src/core/bootstrap/providers/HelperServiceProvider.d.ts.map +1 -0
  28. package/dist/src/core/bootstrap/providers/HelperServiceProvider.js +14 -0
  29. package/dist/src/core/bootstrap/providers/HelperServiceProvider.js.map +1 -0
  30. package/dist/src/core/bootstrap/providers/RouteServiceProvider.d.ts +9 -0
  31. package/dist/src/core/bootstrap/providers/RouteServiceProvider.d.ts.map +1 -0
  32. package/dist/src/core/bootstrap/providers/RouteServiceProvider.js +18 -0
  33. package/dist/src/core/bootstrap/providers/RouteServiceProvider.js.map +1 -0
  34. package/dist/src/core/bootstrap/providers/ServiceProvider.d.ts +38 -0
  35. package/dist/src/core/bootstrap/providers/ServiceProvider.d.ts.map +1 -0
  36. package/dist/src/core/bootstrap/providers/ServiceProvider.js +41 -0
  37. package/dist/src/core/bootstrap/providers/ServiceProvider.js.map +1 -0
  38. package/dist/src/core/bootstrap/providers/ViewServiceProvider.d.ts +9 -0
  39. package/dist/src/core/bootstrap/providers/ViewServiceProvider.d.ts.map +1 -0
  40. package/dist/src/core/bootstrap/providers/ViewServiceProvider.js +18 -0
  41. package/dist/src/core/bootstrap/providers/ViewServiceProvider.js.map +1 -0
  42. package/dist/src/core/bootstrap/providers/default-providers.d.ts +14 -0
  43. package/dist/src/core/bootstrap/providers/default-providers.d.ts.map +1 -0
  44. package/dist/src/core/bootstrap/providers/default-providers.js +79 -0
  45. package/dist/src/core/bootstrap/providers/default-providers.js.map +1 -0
  46. package/dist/src/core/bootstrap/providers/index.d.ts +10 -0
  47. package/dist/src/core/bootstrap/providers/index.d.ts.map +1 -0
  48. package/dist/src/core/bootstrap/providers/index.js +9 -0
  49. package/dist/src/core/bootstrap/providers/index.js.map +1 -0
  50. package/dist/src/core/bootstrap/providers/provider-order.d.ts +19 -0
  51. package/dist/src/core/bootstrap/providers/provider-order.d.ts.map +1 -0
  52. package/dist/src/core/bootstrap/providers/provider-order.js +51 -0
  53. package/dist/src/core/bootstrap/providers/provider-order.js.map +1 -0
  54. package/dist/src/core/cache/ViewCache.d.ts +46 -0
  55. package/dist/src/core/cache/ViewCache.d.ts.map +1 -0
  56. package/dist/src/core/cache/ViewCache.js +85 -0
  57. package/dist/src/core/cache/ViewCache.js.map +1 -0
  58. package/dist/src/core/cache/index.d.ts +2 -0
  59. package/dist/src/core/cache/index.d.ts.map +1 -0
  60. package/dist/src/core/cache/index.js +2 -0
  61. package/dist/src/core/cache/index.js.map +1 -0
  62. package/dist/src/core/contracts/ApiInterface.d.ts +11 -0
  63. package/dist/src/core/contracts/ApiInterface.d.ts.map +1 -0
  64. package/dist/src/core/contracts/ApiInterface.js +2 -0
  65. package/dist/src/core/contracts/ApiInterface.js.map +1 -0
  66. package/dist/src/core/contracts/ApplicationInterface.d.ts +66 -0
  67. package/dist/src/core/contracts/ApplicationInterface.d.ts.map +1 -0
  68. package/dist/src/core/contracts/ApplicationInterface.js +3 -0
  69. package/dist/src/core/contracts/ApplicationInterface.js.map +1 -0
  70. package/dist/src/core/contracts/BlockInterface.d.ts +67 -0
  71. package/dist/src/core/contracts/BlockInterface.d.ts.map +1 -0
  72. package/dist/src/core/contracts/BlockInterface.js +2 -0
  73. package/dist/src/core/contracts/BlockInterface.js.map +1 -0
  74. package/dist/src/core/contracts/ComponentInterface.d.ts +24 -0
  75. package/dist/src/core/contracts/ComponentInterface.d.ts.map +1 -0
  76. package/dist/src/core/contracts/ComponentInterface.js +2 -0
  77. package/dist/src/core/contracts/ComponentInterface.js.map +1 -0
  78. package/dist/src/core/contracts/ElementInterface.d.ts +117 -0
  79. package/dist/src/core/contracts/ElementInterface.d.ts.map +1 -0
  80. package/dist/src/core/contracts/ElementInterface.js +2 -0
  81. package/dist/src/core/contracts/ElementInterface.js.map +1 -0
  82. package/dist/src/core/contracts/EventServiceInterface.d.ts +37 -0
  83. package/dist/src/core/contracts/EventServiceInterface.d.ts.map +1 -0
  84. package/dist/src/core/contracts/EventServiceInterface.js +3 -0
  85. package/dist/src/core/contracts/EventServiceInterface.js.map +1 -0
  86. package/dist/src/core/contracts/HelperInterface.d.ts +231 -0
  87. package/dist/src/core/contracts/HelperInterface.d.ts.map +1 -0
  88. package/dist/src/core/contracts/HelperInterface.js +3 -0
  89. package/dist/src/core/contracts/HelperInterface.js.map +1 -0
  90. package/dist/src/core/contracts/HttpServiceInterface.d.ts +38 -0
  91. package/dist/src/core/contracts/HttpServiceInterface.d.ts.map +1 -0
  92. package/dist/src/core/contracts/HttpServiceInterface.js +3 -0
  93. package/dist/src/core/contracts/HttpServiceInterface.js.map +1 -0
  94. package/dist/src/core/contracts/LoggerServiceInterface.d.ts +37 -0
  95. package/dist/src/core/contracts/LoggerServiceInterface.d.ts.map +1 -0
  96. package/dist/src/core/contracts/LoggerServiceInterface.js +3 -0
  97. package/dist/src/core/contracts/LoggerServiceInterface.js.map +1 -0
  98. package/dist/src/core/contracts/LoopContextInterface.d.ts +14 -0
  99. package/dist/src/core/contracts/LoopContextInterface.d.ts.map +1 -0
  100. package/dist/src/core/contracts/LoopContextInterface.js +3 -0
  101. package/dist/src/core/contracts/LoopContextInterface.js.map +1 -0
  102. package/dist/src/core/contracts/MarkerInterface.d.ts +55 -0
  103. package/dist/src/core/contracts/MarkerInterface.d.ts.map +1 -0
  104. package/dist/src/core/contracts/MarkerInterface.js +2 -0
  105. package/dist/src/core/contracts/MarkerInterface.js.map +1 -0
  106. package/dist/src/core/contracts/ReactiveInterface.d.ts +38 -0
  107. package/dist/src/core/contracts/ReactiveInterface.d.ts.map +1 -0
  108. package/dist/src/core/contracts/ReactiveInterface.js +2 -0
  109. package/dist/src/core/contracts/ReactiveInterface.js.map +1 -0
  110. package/dist/src/core/contracts/RouterInterface.d.ts +58 -0
  111. package/dist/src/core/contracts/RouterInterface.d.ts.map +1 -0
  112. package/dist/src/core/contracts/RouterInterface.js +2 -0
  113. package/dist/src/core/contracts/RouterInterface.js.map +1 -0
  114. package/dist/src/core/contracts/ServiceProviderInterface.d.ts +12 -0
  115. package/dist/src/core/contracts/ServiceProviderInterface.d.ts.map +1 -0
  116. package/dist/src/core/contracts/ServiceProviderInterface.js +2 -0
  117. package/dist/src/core/contracts/ServiceProviderInterface.js.map +1 -0
  118. package/dist/src/core/contracts/StorageServiceInterface.d.ts +43 -0
  119. package/dist/src/core/contracts/StorageServiceInterface.d.ts.map +1 -0
  120. package/dist/src/core/contracts/StorageServiceInterface.js +3 -0
  121. package/dist/src/core/contracts/StorageServiceInterface.js.map +1 -0
  122. package/dist/src/core/contracts/StoreServiceInterface.d.ts +45 -0
  123. package/dist/src/core/contracts/StoreServiceInterface.d.ts.map +1 -0
  124. package/dist/src/core/contracts/StoreServiceInterface.js +3 -0
  125. package/dist/src/core/contracts/StoreServiceInterface.js.map +1 -0
  126. package/dist/src/core/contracts/ViewCacheInterface.d.ts +13 -0
  127. package/dist/src/core/contracts/ViewCacheInterface.d.ts.map +1 -0
  128. package/dist/src/core/contracts/ViewCacheInterface.js +3 -0
  129. package/dist/src/core/contracts/ViewCacheInterface.js.map +1 -0
  130. package/dist/src/core/contracts/ViewControllerInterface.d.ts +115 -0
  131. package/dist/src/core/contracts/ViewControllerInterface.d.ts.map +1 -0
  132. package/dist/src/core/contracts/ViewControllerInterface.js +2 -0
  133. package/dist/src/core/contracts/ViewControllerInterface.js.map +1 -0
  134. package/dist/src/core/contracts/ViewInterface.d.ts +24 -0
  135. package/dist/src/core/contracts/ViewInterface.d.ts.map +1 -0
  136. package/dist/src/core/contracts/ViewInterface.js +2 -0
  137. package/dist/src/core/contracts/ViewInterface.js.map +1 -0
  138. package/dist/src/core/contracts/ViewManagerInterface.d.ts +44 -0
  139. package/dist/src/core/contracts/ViewManagerInterface.d.ts.map +1 -0
  140. package/dist/src/core/contracts/ViewManagerInterface.js +2 -0
  141. package/dist/src/core/contracts/ViewManagerInterface.js.map +1 -0
  142. package/dist/src/core/contracts/ViewStateInterface.d.ts +40 -0
  143. package/dist/src/core/contracts/ViewStateInterface.d.ts.map +1 -0
  144. package/dist/src/core/contracts/ViewStateInterface.js +3 -0
  145. package/dist/src/core/contracts/ViewStateInterface.js.map +1 -0
  146. package/dist/src/core/contracts/common.d.ts +28 -0
  147. package/dist/src/core/contracts/common.d.ts.map +1 -0
  148. package/dist/src/core/contracts/common.js +29 -0
  149. package/dist/src/core/contracts/common.js.map +1 -0
  150. package/dist/src/core/contracts/utils.d.ts +20 -0
  151. package/dist/src/core/contracts/utils.d.ts.map +1 -0
  152. package/dist/src/core/contracts/utils.js +4 -0
  153. package/dist/src/core/contracts/utils.js.map +1 -0
  154. package/dist/src/core/contracts/views.d.ts +23 -0
  155. package/dist/src/core/contracts/views.d.ts.map +1 -0
  156. package/dist/src/core/contracts/views.js +2 -0
  157. package/dist/src/core/contracts/views.js.map +1 -0
  158. package/dist/src/core/elements/Block.d.ts +58 -0
  159. package/dist/src/core/elements/Block.d.ts.map +1 -0
  160. package/dist/src/core/elements/Block.js +77 -0
  161. package/dist/src/core/elements/Block.js.map +1 -0
  162. package/dist/src/core/elements/BlockOutlet.d.ts +34 -0
  163. package/dist/src/core/elements/BlockOutlet.d.ts.map +1 -0
  164. package/dist/src/core/elements/BlockOutlet.js +59 -0
  165. package/dist/src/core/elements/BlockOutlet.js.map +1 -0
  166. package/dist/src/core/elements/Component.d.ts +62 -0
  167. package/dist/src/core/elements/Component.d.ts.map +1 -0
  168. package/dist/src/core/elements/Component.js +72 -0
  169. package/dist/src/core/elements/Component.js.map +1 -0
  170. package/dist/src/core/elements/ElementManager.d.ts +23 -0
  171. package/dist/src/core/elements/ElementManager.d.ts.map +1 -0
  172. package/dist/src/core/elements/ElementManager.js +33 -0
  173. package/dist/src/core/elements/ElementManager.js.map +1 -0
  174. package/dist/src/core/elements/Fragment.d.ts +51 -0
  175. package/dist/src/core/elements/Fragment.d.ts.map +1 -0
  176. package/dist/src/core/elements/Fragment.js +133 -0
  177. package/dist/src/core/elements/Fragment.js.map +1 -0
  178. package/dist/src/core/elements/Html.d.ts +52 -0
  179. package/dist/src/core/elements/Html.d.ts.map +1 -0
  180. package/dist/src/core/elements/Html.js +299 -0
  181. package/dist/src/core/elements/Html.js.map +1 -0
  182. package/dist/src/core/elements/Output.d.ts +69 -0
  183. package/dist/src/core/elements/Output.d.ts.map +1 -0
  184. package/dist/src/core/elements/Output.js +121 -0
  185. package/dist/src/core/elements/Output.js.map +1 -0
  186. package/dist/src/core/elements/Reactive.d.ts +77 -0
  187. package/dist/src/core/elements/Reactive.d.ts.map +1 -0
  188. package/dist/src/core/elements/Reactive.js +199 -0
  189. package/dist/src/core/elements/Reactive.js.map +1 -0
  190. package/dist/src/core/elements/TextElement.d.ts +46 -0
  191. package/dist/src/core/elements/TextElement.d.ts.map +1 -0
  192. package/dist/src/core/elements/TextElement.js +94 -0
  193. package/dist/src/core/elements/TextElement.js.map +1 -0
  194. package/dist/src/core/elements/Wrapper.d.ts +50 -0
  195. package/dist/src/core/elements/Wrapper.d.ts.map +1 -0
  196. package/dist/src/core/elements/Wrapper.js +96 -0
  197. package/dist/src/core/elements/Wrapper.js.map +1 -0
  198. package/dist/src/core/elements/Yield.d.ts +34 -0
  199. package/dist/src/core/elements/Yield.d.ts.map +1 -0
  200. package/dist/src/core/elements/Yield.js +56 -0
  201. package/dist/src/core/elements/Yield.js.map +1 -0
  202. package/dist/src/core/elements/helpers.d.ts +8 -0
  203. package/dist/src/core/elements/helpers.d.ts.map +1 -0
  204. package/dist/src/core/elements/helpers.js +40 -0
  205. package/dist/src/core/elements/helpers.js.map +1 -0
  206. package/dist/src/core/elements/index.d.ts +12 -0
  207. package/dist/src/core/elements/index.d.ts.map +1 -0
  208. package/dist/src/core/elements/index.js +12 -0
  209. package/dist/src/core/elements/index.js.map +1 -0
  210. package/dist/src/core/hellpers/ApiClient.d.ts +58 -0
  211. package/dist/src/core/hellpers/ApiClient.d.ts.map +1 -0
  212. package/dist/src/core/hellpers/ApiClient.js +122 -0
  213. package/dist/src/core/hellpers/ApiClient.js.map +1 -0
  214. package/dist/src/core/hellpers/app.d.ts +3 -0
  215. package/dist/src/core/hellpers/app.d.ts.map +1 -0
  216. package/dist/src/core/hellpers/app.js +53 -0
  217. package/dist/src/core/hellpers/app.js.map +1 -0
  218. package/dist/src/core/hellpers/utils.d.ts +26 -0
  219. package/dist/src/core/hellpers/utils.d.ts.map +1 -0
  220. package/dist/src/core/hellpers/utils.js +96 -0
  221. package/dist/src/core/hellpers/utils.js.map +1 -0
  222. package/dist/src/core/routers/Router.d.ts +212 -0
  223. package/dist/src/core/routers/Router.d.ts.map +1 -0
  224. package/dist/src/core/routers/Router.js +623 -0
  225. package/dist/src/core/routers/Router.js.map +1 -0
  226. package/dist/src/core/routers/index.d.ts +3 -0
  227. package/dist/src/core/routers/index.d.ts.map +1 -0
  228. package/dist/src/core/routers/index.js +2 -0
  229. package/dist/src/core/routers/index.js.map +1 -0
  230. package/dist/src/core/services/BlockManager.d.ts +63 -0
  231. package/dist/src/core/services/BlockManager.d.ts.map +1 -0
  232. package/dist/src/core/services/BlockManager.js +191 -0
  233. package/dist/src/core/services/BlockManager.js.map +1 -0
  234. package/dist/src/core/services/DomService.d.ts +9 -0
  235. package/dist/src/core/services/DomService.d.ts.map +1 -0
  236. package/dist/src/core/services/DomService.js +18 -0
  237. package/dist/src/core/services/DomService.js.map +1 -0
  238. package/dist/src/core/services/EventService.d.ts +58 -0
  239. package/dist/src/core/services/EventService.d.ts.map +1 -0
  240. package/dist/src/core/services/EventService.js +212 -0
  241. package/dist/src/core/services/EventService.js.map +1 -0
  242. package/dist/src/core/services/HelperService.d.ts +443 -0
  243. package/dist/src/core/services/HelperService.d.ts.map +1 -0
  244. package/dist/src/core/services/HelperService.js +1650 -0
  245. package/dist/src/core/services/HelperService.js.map +1 -0
  246. package/dist/src/core/services/HttpService.d.ts +63 -0
  247. package/dist/src/core/services/HttpService.d.ts.map +1 -0
  248. package/dist/src/core/services/HttpService.js +182 -0
  249. package/dist/src/core/services/HttpService.js.map +1 -0
  250. package/dist/src/core/services/LoggerService.d.ts +56 -0
  251. package/dist/src/core/services/LoggerService.d.ts.map +1 -0
  252. package/dist/src/core/services/LoggerService.js +94 -0
  253. package/dist/src/core/services/LoggerService.js.map +1 -0
  254. package/dist/src/core/services/MarkerRegistry.d.ts +94 -0
  255. package/dist/src/core/services/MarkerRegistry.d.ts.map +1 -0
  256. package/dist/src/core/services/MarkerRegistry.js +199 -0
  257. package/dist/src/core/services/MarkerRegistry.js.map +1 -0
  258. package/dist/src/core/services/MarkerService.d.ts +299 -0
  259. package/dist/src/core/services/MarkerService.d.ts.map +1 -0
  260. package/dist/src/core/services/MarkerService.js +723 -0
  261. package/dist/src/core/services/MarkerService.js.map +1 -0
  262. package/dist/src/core/services/StorageService.d.ts +69 -0
  263. package/dist/src/core/services/StorageService.d.ts.map +1 -0
  264. package/dist/src/core/services/StorageService.js +243 -0
  265. package/dist/src/core/services/StorageService.js.map +1 -0
  266. package/dist/src/core/services/StoreService.d.ts +80 -0
  267. package/dist/src/core/services/StoreService.d.ts.map +1 -0
  268. package/dist/src/core/services/StoreService.js +301 -0
  269. package/dist/src/core/services/StoreService.js.map +1 -0
  270. package/dist/src/core/services/index.d.ts +9 -0
  271. package/dist/src/core/services/index.d.ts.map +1 -0
  272. package/dist/src/core/services/index.js +9 -0
  273. package/dist/src/core/services/index.js.map +1 -0
  274. package/dist/src/core/types/utils.d.ts +29 -0
  275. package/dist/src/core/types/utils.d.ts.map +1 -0
  276. package/dist/src/core/types/utils.js +22 -0
  277. package/dist/src/core/types/utils.js.map +1 -0
  278. package/dist/src/core/view/LoopContext.d.ts +38 -0
  279. package/dist/src/core/view/LoopContext.d.ts.map +1 -0
  280. package/dist/src/core/view/LoopContext.js +100 -0
  281. package/dist/src/core/view/LoopContext.js.map +1 -0
  282. package/dist/src/core/view/Section.d.ts +41 -0
  283. package/dist/src/core/view/Section.d.ts.map +1 -0
  284. package/dist/src/core/view/Section.js +67 -0
  285. package/dist/src/core/view/Section.js.map +1 -0
  286. package/dist/src/core/view/View.d.ts +63 -0
  287. package/dist/src/core/view/View.d.ts.map +1 -0
  288. package/dist/src/core/view/View.js +85 -0
  289. package/dist/src/core/view/View.js.map +1 -0
  290. package/dist/src/core/view/ViewController.d.ts +277 -0
  291. package/dist/src/core/view/ViewController.d.ts.map +1 -0
  292. package/dist/src/core/view/ViewController.js +862 -0
  293. package/dist/src/core/view/ViewController.js.map +1 -0
  294. package/dist/src/core/view/ViewManager.d.ts +141 -0
  295. package/dist/src/core/view/ViewManager.d.ts.map +1 -0
  296. package/dist/src/core/view/ViewManager.js +565 -0
  297. package/dist/src/core/view/ViewManager.js.map +1 -0
  298. package/dist/src/core/view/ViewState.d.ts +117 -0
  299. package/dist/src/core/view/ViewState.d.ts.map +1 -0
  300. package/dist/src/core/view/ViewState.js +410 -0
  301. package/dist/src/core/view/ViewState.js.map +1 -0
  302. package/dist/src/core/view/index.d.ts +6 -0
  303. package/dist/src/core/view/index.d.ts.map +1 -0
  304. package/dist/src/core/view/index.js +6 -0
  305. package/dist/src/core/view/index.js.map +1 -0
  306. package/index.ts +62 -0
  307. package/package.json +70 -0
  308. package/plugins.ts +77 -0
  309. package/src/core/app/Application.ts +410 -0
  310. package/src/core/bootstrap/app.ts +58 -0
  311. package/src/core/bootstrap/providers/ApiServiceProvider.ts +18 -0
  312. package/src/core/bootstrap/providers/CoreServiceProvider.ts +19 -0
  313. package/src/core/bootstrap/providers/HelperServiceProvider.ts +12 -0
  314. package/src/core/bootstrap/providers/RouteServiceProvider.ts +17 -0
  315. package/src/core/bootstrap/providers/ServiceProvider.ts +51 -0
  316. package/src/core/bootstrap/providers/ViewServiceProvider.ts +17 -0
  317. package/src/core/bootstrap/providers/default-providers.ts +94 -0
  318. package/src/core/bootstrap/providers/index.ts +9 -0
  319. package/src/core/bootstrap/providers/provider-order.test.ts +67 -0
  320. package/src/core/bootstrap/providers/provider-order.ts +66 -0
  321. package/src/core/cache/ViewCache.ts +102 -0
  322. package/src/core/cache/index.ts +1 -0
  323. package/src/core/contracts/ApiInterface.ts +11 -0
  324. package/src/core/contracts/ApplicationInterface.ts +79 -0
  325. package/src/core/contracts/BlockInterface.ts +76 -0
  326. package/src/core/contracts/ComponentInterface.ts +26 -0
  327. package/src/core/contracts/ElementInterface.ts +140 -0
  328. package/src/core/contracts/EventServiceInterface.ts +47 -0
  329. package/src/core/contracts/HelperInterface.ts +256 -0
  330. package/src/core/contracts/HttpServiceInterface.ts +51 -0
  331. package/src/core/contracts/LoggerServiceInterface.ts +48 -0
  332. package/src/core/contracts/LoopContextInterface.ts +15 -0
  333. package/src/core/contracts/MarkerInterface.ts +77 -0
  334. package/src/core/contracts/ReactiveInterface.ts +45 -0
  335. package/src/core/contracts/RouterInterface.ts +65 -0
  336. package/src/core/contracts/ServiceProviderInterface.ts +12 -0
  337. package/src/core/contracts/StorageServiceInterface.ts +48 -0
  338. package/src/core/contracts/StoreServiceInterface.ts +50 -0
  339. package/src/core/contracts/ViewCacheInterface.ts +14 -0
  340. package/src/core/contracts/ViewControllerInterface.ts +135 -0
  341. package/src/core/contracts/ViewInterface.ts +31 -0
  342. package/src/core/contracts/ViewManagerInterface.ts +45 -0
  343. package/src/core/contracts/ViewStateInterface.ts +47 -0
  344. package/src/core/contracts/common.ts +27 -0
  345. package/src/core/contracts/utils.ts +23 -0
  346. package/src/core/contracts/views.ts +23 -0
  347. package/src/core/elements/Block.ts +113 -0
  348. package/src/core/elements/BlockOutlet.ts +83 -0
  349. package/src/core/elements/Component.ts +114 -0
  350. package/src/core/elements/ElementManager.ts +48 -0
  351. package/src/core/elements/Fragment.ts +168 -0
  352. package/src/core/elements/Html.ts +364 -0
  353. package/src/core/elements/Output.ts +167 -0
  354. package/src/core/elements/Reactive.ts +253 -0
  355. package/src/core/elements/TextElement.ts +110 -0
  356. package/src/core/elements/Wrapper.ts +131 -0
  357. package/src/core/elements/Yield.ts +70 -0
  358. package/src/core/elements/helpers.ts +56 -0
  359. package/src/core/elements/index.ts +26 -0
  360. package/src/core/hellpers/ApiClient.ts +145 -0
  361. package/src/core/hellpers/app.ts +57 -0
  362. package/src/core/hellpers/utils.ts +109 -0
  363. package/src/core/routers/Router.ts +765 -0
  364. package/src/core/routers/index.ts +2 -0
  365. package/src/core/services/BlockManager.ts +210 -0
  366. package/src/core/services/DomService.ts +26 -0
  367. package/src/core/services/EventService.ts +266 -0
  368. package/src/core/services/HelperService.ts +1653 -0
  369. package/src/core/services/HttpService.ts +235 -0
  370. package/src/core/services/LoggerService.ts +139 -0
  371. package/src/core/services/MarkerRegistry.ts +239 -0
  372. package/src/core/services/MarkerService.ts +923 -0
  373. package/src/core/services/StorageService.ts +268 -0
  374. package/src/core/services/StoreService.ts +338 -0
  375. package/src/core/services/index.ts +8 -0
  376. package/src/core/types/utils.ts +30 -0
  377. package/src/core/view/LoopContext.ts +109 -0
  378. package/src/core/view/Section.ts +86 -0
  379. package/src/core/view/View.ts +109 -0
  380. package/src/core/view/ViewController.ts +1002 -0
  381. package/src/core/view/ViewManager.ts +700 -0
  382. package/src/core/view/ViewState.ts +453 -0
  383. package/src/core/view/index.ts +5 -0
@@ -0,0 +1,140 @@
1
+ import type { OneObjectType } from "../types/utils";
2
+ import type { ViewControllerInterface } from "./ViewControllerInterface";
3
+ import type { ReactiveInterface } from "./ReactiveInterface";
4
+
5
+ // ─── Element Interfaces ──────────────────────────────────────────
6
+
7
+ /** Base for any renderable node in the tree */
8
+ export interface OneNodeInterface {
9
+ oneType: OneObjectType;
10
+ parent: HtmlInterface | null;
11
+ render(): void;
12
+ destroy(): void;
13
+ isOneElement: boolean;
14
+ setParentElement(parent: HtmlInterface | null): void;
15
+ [key: string]: any;
16
+
17
+ }
18
+
19
+ /** Native HTML element wrapper */
20
+ export interface HtmlInterface extends OneNodeInterface {
21
+ element: HTMLElement;
22
+ domChildren: Node[];
23
+ [key: string]: any;
24
+ }
25
+
26
+ /** Text node wrapper */
27
+ export interface TextInterface extends OneNodeInterface {
28
+ element: Text;
29
+ text: string;
30
+
31
+
32
+ domChildren: Node[];
33
+ update(newText: string): void;
34
+ }
35
+
36
+ export interface OutputInterface extends OneNodeInterface {
37
+ ctx: ViewControllerInterface;
38
+ parent: HtmlInterface | null;
39
+ stateKeys: string[];
40
+ openTag: Comment;
41
+ closeTag: Comment;
42
+ domChildren: Node[];
43
+ [key: string]: any;
44
+ }
45
+
46
+ export interface YieldInterface extends OneNodeInterface {
47
+ ctx: ViewControllerInterface;
48
+ parent: HtmlInterface | null;
49
+ name: string;
50
+ contentFactory: () => OneChildrenFactoryOutput;
51
+ setContentFactory(factory: () => OneChildrenFactoryOutput): void;
52
+ openTag: Comment;
53
+ closeTag: Comment;
54
+ domChildren: Node[];
55
+ [key: string]: any;
56
+ }
57
+
58
+ /** Fragment — renders multiple root nodes into a parent without a wrapping tag */
59
+ export interface FragmentInterface extends OneNodeInterface {
60
+ nodes: Node[];
61
+ domChildren: Node[];
62
+ [key: string]: any;
63
+
64
+ }
65
+ /** Wrapper — renders multiple root nodes into a parent without a wrapping tag */
66
+ export interface WrapperInterface extends OneNodeInterface {
67
+ nodes: Node[];
68
+ domChildren: Node[];
69
+ [key: string]: any;
70
+ }
71
+
72
+ // ─── Element Config Types ────────────────────────────────────────
73
+
74
+ export type OneElementConfig = {
75
+ attrs?: {
76
+ [key: string]: {
77
+ type: 'value' | 'binding';
78
+ value?: any;
79
+ stateKeys?: string[];
80
+ factory?: () => any;
81
+ }
82
+ },
83
+ props?: {
84
+ [key: string]: {
85
+ type: 'value' | 'binding';
86
+ value?: any;
87
+ stateKeys?: string[];
88
+ factory?: () => any;
89
+ }
90
+ },
91
+ events?: {
92
+ [key: string]: OneElementEventHandler;
93
+ },
94
+ classes?: {
95
+ [className: string]: {
96
+ type: 'static' | 'binding';
97
+ value?: boolean;
98
+ stateKeys?: string[];
99
+ factory?: () => boolean;
100
+ }
101
+ } | Array<{
102
+ type: 'static' | 'binding';
103
+ value?: string;
104
+ stateKeys?: string[];
105
+ factory?: () => boolean;
106
+ }>,
107
+ styles?: {
108
+ [prop: string]: {
109
+ type: 'value' | 'binding';
110
+ value?: string;
111
+ stateKeys?: string[];
112
+ factory?: () => string;
113
+ }
114
+ },
115
+ [key: string]: any;
116
+ }
117
+
118
+ export type HtmlElementConfig = OneElementConfig & {
119
+ ctx: ViewControllerInterface;
120
+ parentElement?: HtmlInterface | null;
121
+ parent?: HtmlInterface | null;
122
+ }
123
+
124
+ // ─── Event Handler ──────────────────────────────────────────────
125
+
126
+ export type OneElementEventHandler = Array<{
127
+ handler: string | ((event: Event) => any);
128
+ params?: (any | ((event: Event) => any[]))[];
129
+ } | ((event: Event) => any)>;
130
+
131
+ // ─── Children Types ─────────────────────────────────────────────
132
+
133
+ /** All possible rendered child node types */
134
+ export type OneElementChildren = Array<HtmlInterface | ReactiveInterface | TextInterface | FragmentInterface | HTMLElement | SVGElement | DocumentFragment | Text | Comment>;
135
+
136
+ /** What a children factory can return (before mounting) */
137
+ export type OneChildrenFactoryOutput = Array<HtmlInterface | ReactiveInterface | TextInterface | FragmentInterface | string | number | HTMLElement | SVGElement | DocumentFragment | Text | Comment>;
138
+
139
+ /** Factory function that produces children given parent element */
140
+ export type OneChildrenFactory = (parentElement: HtmlInterface | null) => OneChildrenFactoryOutput;
@@ -0,0 +1,47 @@
1
+ // ─── Event Service Interface ─────────────────────────────────────
2
+
3
+ export type EventCallback = (...args: any[]) => void;
4
+
5
+ export interface EventServiceInterface {
6
+ /**
7
+ * Subscribe to events. Returns unsubscribe function.
8
+ *
9
+ * Supports:
10
+ * - Single event: on('click', fn)
11
+ * - Multiple events: on(['click', 'hover'], fn)
12
+ * - Space-separated: on('click hover', fn)
13
+ * - Object syntax: on({ click: fn1, hover: fn2 })
14
+ */
15
+ on(event: string | string[] | Record<string, EventCallback>, callback?: EventCallback | boolean, once?: boolean): () => void;
16
+
17
+ /** Subscribe once — auto-unsubscribe after first call */
18
+ once(event: string | string[] | Record<string, EventCallback>, callback?: EventCallback): () => void;
19
+
20
+ /**
21
+ * Unsubscribe from events.
22
+ *
23
+ * - off('save') — remove all listeners for 'save'
24
+ * - off('save', fn) — remove specific listener
25
+ * - off(['save', 'update'])
26
+ * - off({ save: fn1 })
27
+ */
28
+ off(event: string | string[] | Record<string, EventCallback>, callback?: EventCallback): void;
29
+
30
+ /** Emit event with arguments */
31
+ emit(event: string, ...args: any[]): void;
32
+
33
+ /** Remove all listeners */
34
+ clear(): void;
35
+
36
+ /** Listener count for a specific event */
37
+ listenerCount(event: string): number;
38
+
39
+ /** Check if event has listeners */
40
+ hasListeners(event: string): boolean;
41
+
42
+ /** Get all registered event names */
43
+ eventNames(): string[];
44
+
45
+ /** Destroy — alias for clear */
46
+ destroy(): void;
47
+ }
@@ -0,0 +1,256 @@
1
+ // ─── Collection Proxy Interface ─────────────────────────────────
2
+
3
+ import { ApplicationInterface } from "./ApplicationInterface";
4
+
5
+ export interface CollectionProxyInterface {
6
+ all(): any[];
7
+ toArray(): any[];
8
+ count(): number;
9
+ isEmpty(): boolean;
10
+ isNotEmpty(): boolean;
11
+ first(cb?: (item: any) => boolean): any;
12
+ last(cb?: (item: any) => boolean): any;
13
+ get(index: number, defaultValue?: any): any;
14
+ map(cb: (item: any, i: number) => any): CollectionProxyInterface;
15
+ filter(cb?: (item: any, i: number) => boolean): CollectionProxyInterface;
16
+ reject(cb: (item: any) => boolean): CollectionProxyInterface;
17
+ reduce(cb: (carry: any, item: any) => any, initial?: any): any;
18
+ each(cb: (item: any, i: number) => void): CollectionProxyInterface;
19
+ pluck(key: string): CollectionProxyInterface;
20
+ where(key: string, value: any): CollectionProxyInterface;
21
+ whereIn(key: string, values: any[]): CollectionProxyInterface;
22
+ whereNotIn(key: string, values: any[]): CollectionProxyInterface;
23
+ sortBy(key: string | ((a: any) => any)): CollectionProxyInterface;
24
+ sortByDesc(key: string | ((a: any) => any)): CollectionProxyInterface;
25
+ reverse(): CollectionProxyInterface;
26
+ unique(key?: string): CollectionProxyInterface;
27
+ flatten(depth?: number): CollectionProxyInterface;
28
+ chunk(size: number): CollectionProxyInterface;
29
+ take(count: number): CollectionProxyInterface;
30
+ skip(count: number): CollectionProxyInterface;
31
+ sum(key?: string | ((item: any) => number)): number;
32
+ avg(key?: string): number;
33
+ min(key?: string): any;
34
+ max(key?: string): any;
35
+ contains(key: any, value?: any): boolean;
36
+ groupBy(key: string | ((item: any) => string)): Record<string, any[]>;
37
+ keyBy(key: string | ((item: any) => string)): Record<string, any>;
38
+ join(glue: string, finalGlue?: string): string;
39
+ push(...items: any[]): CollectionProxyInterface;
40
+ prepend(...items: any[]): CollectionProxyInterface;
41
+ pop(): any;
42
+ shift(): any;
43
+ merge(other: any[]): CollectionProxyInterface;
44
+ values(): CollectionProxyInterface;
45
+ keys(): CollectionProxyInterface;
46
+ tap(cb: (collection: CollectionProxyInterface) => void): CollectionProxyInterface;
47
+ pipe<T>(cb: (collection: CollectionProxyInterface) => T): T;
48
+ toJSON(): any[];
49
+ toString(): string;
50
+ }
51
+
52
+ // ─── Helper Interface ───────────────────────────────────────────
53
+
54
+ export interface HelperInterface {
55
+ [key: string]: any;
56
+
57
+ // ─── App / Service Container ─────────────────────────────────
58
+ app<T>(): T;
59
+ app<T>(key: string): T;
60
+ app<T>(key: string, value: any): ApplicationInterface;
61
+ make<T>(name: string, defaultValue?: T): T | undefined;
62
+
63
+ // ─── Execution ──────────────────────────────────────────────
64
+ execute<T>(fn: () => T): T;
65
+ exec(fn: Function, ...args: any[]): any;
66
+
67
+ // ─── Type Checks ────────────────────────────────────────────
68
+ isset(...values: any[]): boolean;
69
+ empty(value: any): boolean;
70
+ is_null(value: any): boolean;
71
+ is_array(value: any): boolean;
72
+ is_string(value: any): boolean;
73
+ is_numeric(value: any): boolean;
74
+ is_object(value: any): boolean;
75
+ is_bool(value: any): boolean;
76
+ is_int(value: any): boolean;
77
+ is_float(value: any): boolean;
78
+
79
+ // ─── Count / Length ─────────────────────────────────────────
80
+ count(value: any): number;
81
+ sizeof(value: any): number;
82
+
83
+ // ─── String Functions ───────────────────────────────────────
84
+ strlen(str: any): number;
85
+ substr(str: any, start: number, length?: number): string;
86
+ mb_substr(str: any, start: number, length?: number): string;
87
+ trim(str: any, chars?: string): string;
88
+ ltrim(str: any, chars?: string): string;
89
+ rtrim(str: any, chars?: string): string;
90
+ strtolower(str: any): string;
91
+ strtoupper(str: any): string;
92
+ ucfirst(str: any): string;
93
+ lcfirst(str: any): string;
94
+ ucwords(str: any, delimiters?: string): string;
95
+ str_replace(search: string | string[], replace: string | string[], subject: string): string;
96
+ str_ireplace(search: string | string[], replace: string | string[], subject: string): string;
97
+ explode(delimiter: string, str: any, limit?: number): string[];
98
+ implode(glue: string, pieces?: any[]): string;
99
+ str_repeat(str: any, times: number): string;
100
+ str_pad(input: any, length: number, padString?: string, padType?: number): string;
101
+ str_contains(haystack: any, needle: string): boolean;
102
+ str_starts_with(haystack: any, needle: string): boolean;
103
+ str_ends_with(haystack: any, needle: string): boolean;
104
+ str_word_count(str: any, format?: number): number | string[];
105
+ str_split(str: any, length?: number): string[];
106
+ substr_count(haystack: any, needle: string, offset?: number, length?: number): number;
107
+ substr_replace(str: any, replacement: string, start: number, length?: number): string;
108
+ nl2br(str: any, isXhtml?: boolean): string;
109
+ wordwrap(str: any, width?: number, breakStr?: string, cutLongWords?: boolean): string;
110
+ chunk_split(body: any, chunklen?: number, end?: string): string;
111
+ sprintf(format: string, ...args: any[]): string;
112
+ mb_strtolower(str: any): string;
113
+ mb_strtoupper(str: any): string;
114
+ mb_strlen(str: any): number;
115
+ strpos(haystack: any, needle: string, offset?: number): number | false;
116
+ strrpos(haystack: any, needle: string, offset?: number): number | false;
117
+ stripos(haystack: any, needle: string, offset?: number): number | false;
118
+ str_getcsv(str: any, separator?: string, enclosure?: string, escape?: string): string[];
119
+
120
+ // ─── HTML / Encoding ────────────────────────────────────────
121
+ htmlspecialchars(str: any, flags?: number, encoding?: string, doubleEncode?: boolean): string;
122
+ htmlspecialchars_decode(str: any): string;
123
+ escapeHtml(str: any): string;
124
+ escString(value: any): string;
125
+ strip_tags(str: any, allowedTags?: string): string;
126
+ addslashes(str: any): string;
127
+ stripslashes(str: any): string;
128
+ urlencode(str: any): string;
129
+ urldecode(str: any): string;
130
+ rawurlencode(str: any): string;
131
+ rawurldecode(str: any): string;
132
+ base64_encode(str: any): string;
133
+ base64_decode(str: any): string;
134
+ md5(str: any): string;
135
+ sha1(str: any): string;
136
+ crc32(str: any): number;
137
+
138
+ // ─── Array Functions ────────────────────────────────────────
139
+ array_push(arr: any[], ...items: any[]): number;
140
+ array_pop(arr: any[]): any;
141
+ array_shift(arr: any[]): any;
142
+ array_unshift(arr: any[], ...items: any[]): number;
143
+ array_merge(...arrays: any[]): any[] | Record<string, any>;
144
+ array_keys(arr: any): string[] | number[];
145
+ array_values(arr: any): any[];
146
+ array_reverse(arr: any[], preserveKeys?: boolean): any[];
147
+ array_unique(arr: any[]): any[];
148
+ array_slice(arr: any[], offset: number, length?: number, preserveKeys?: boolean): any[];
149
+ array_splice(arr: any[], offset: number, length?: number, ...replacement: any[]): any[];
150
+ array_map(callback: ((item: any, key?: any) => any) | null, arr: any, ...arrays: any[]): any[];
151
+ array_filter(arr: any, callback?: (value: any, key?: any) => boolean): any[];
152
+ array_reduce(arr: any[], callback: (carry: any, item: any) => any, initial?: any): any;
153
+ array_find(arr: any[], callback: (value: any, key?: any) => boolean): any;
154
+ array_find_key(arr: any[], callback: (value: any, key?: any) => boolean): number | null;
155
+ array_column(arr: any[], columnKey: string, indexKey?: string): any[] | Record<string, any>;
156
+ array_combine(keys: any[], values: any[]): Record<string, any>;
157
+ array_chunk(arr: any[], size: number, preserveKeys?: boolean): any[][];
158
+ array_pad(arr: any[], size: number, value: any): any[];
159
+ array_flip(arr: any): Record<string, any>;
160
+ array_sum(arr: any[]): number;
161
+ array_product(arr: any[]): number;
162
+ array_count_values(arr: any[]): Record<string, number>;
163
+ array_fill(startIndex: number, num: number, value: any): any[];
164
+ array_fill_keys(keys: any[], value: any): Record<string, any>;
165
+ array_intersect(arr: any[], ...arrays: any[][]): any[];
166
+ array_diff(arr: any[], ...arrays: any[][]): any[];
167
+ array_intersect_key(obj: Record<string, any>, ...objects: Record<string, any>[]): Record<string, any>;
168
+ array_diff_key(obj: Record<string, any>, ...objects: Record<string, any>[]): Record<string, any>;
169
+ array_search(needle: any, haystack: any[], strict?: boolean): number | string | false;
170
+ in_array(needle: any, haystack: any[], strict?: boolean): boolean;
171
+ array_key_exists(key: string | number, arr: any): boolean;
172
+ sort(arr: any[]): boolean;
173
+ rsort(arr: any[]): boolean;
174
+ ksort(obj: Record<string, any>): Record<string, any>;
175
+ krsort(obj: Record<string, any>): Record<string, any>;
176
+ usort(arr: any[], compareFunc: (a: any, b: any) => number): boolean;
177
+ uasort(arr: any[], compareFunc: (a: any, b: any) => number): boolean;
178
+ uksort(obj: Record<string, any>, compareFunc: (a: string, b: string) => number): Record<string, any>;
179
+ range(start: number | string, end: number | string, step?: number): (number | string)[];
180
+ compact(...names: string[]): Record<string, any>;
181
+ head(arr: any[]): any;
182
+ last(arr: any[]): any;
183
+
184
+ // ─── Math Functions ─────────────────────────────────────────
185
+ min(...values: any[]): any;
186
+ max(...values: any[]): any;
187
+ abs(n: number): number;
188
+ ceil(n: number): number;
189
+ floor(n: number): number;
190
+ round(n: number, precision?: number): number;
191
+ sqrt(n: number): number;
192
+ pow(base: number, exp: number): number;
193
+ log(n: number, base?: number): number;
194
+ log10(n: number): number;
195
+ exp(n: number): number;
196
+ fmod(x: number, y: number): number;
197
+ intdiv(a: number, b: number): number;
198
+ pi(): number;
199
+ rand(min?: number, max?: number): number;
200
+ mt_rand(min?: number, max?: number): number;
201
+ array_rand(arr: any[], num?: number): number | number[];
202
+
203
+ // ─── JSON ───────────────────────────────────────────────────
204
+ json_encode(value: any, options?: number): string;
205
+ json_decode(json: any, assoc?: boolean): any;
206
+
207
+ // ─── Number Formatting ──────────────────────────────────────
208
+ number_format(number: number | string, decimals?: number, decimalSeparator?: string, thousandsSeparator?: string): string;
209
+ formatNumber(num: number, options?: { decimals?: number; thousandsSeparator?: string; decimalSeparator?: string; prefix?: string; suffix?: string }): string;
210
+ formatCurrency(amount: number, currency?: string, locale?: string): string;
211
+
212
+ // ─── Date / Time ────────────────────────────────────────────
213
+ now(): Date;
214
+ today(): Date;
215
+ date(format: string, timestamp?: number): string;
216
+ time(): number;
217
+ strtotime(dateStr: string, baseTimestamp?: number): number | false;
218
+ mktime(hour?: number, minute?: number, second?: number, month?: number, day?: number, year?: number): number;
219
+ microtime(asFloat?: boolean): string | number;
220
+ formatDate(date: Date | string | number, format?: string): string;
221
+ diffInDays(date1: Date | string, date2?: Date | string): number;
222
+ diffInHours(date1: Date | string, date2?: Date | string): number;
223
+ diffInMinutes(date1: Date | string, date2?: Date | string): number;
224
+ diffInSeconds(date1: Date | string, date2?: Date | string): number;
225
+ addDays(date: Date | string, days: number): Date;
226
+ subDays(date: Date | string, days: number): Date;
227
+ addHours(date: Date | string, hours: number): Date;
228
+ subHours(date: Date | string, hours: number): Date;
229
+ addMinutes(date: Date | string, minutes: number): Date;
230
+ subMinutes(date: Date | string, minutes: number): Date;
231
+
232
+ // ─── Type Conversion ────────────────────────────────────────
233
+ intval(value: any, base?: number): number;
234
+ floatval(value: any): number;
235
+ strval(value: any): string;
236
+ boolval(value: any): boolean;
237
+ gettype(value: any): string;
238
+
239
+ // ─── Misc Helpers ───────────────────────────────────────────
240
+ slug(str: any, separator?: string): string;
241
+ truncate(str: any, length?: number, suffix?: string): string;
242
+ uniqid(prefix?: string, moreEntropy?: boolean): string;
243
+ collect(items?: any[]): CollectionProxyInterface;
244
+ dd(...args: any[]): never;
245
+ dump(...args: any[]): void;
246
+ var_dump(...args: any[]): void;
247
+ print_r(value: any, returnOutput?: boolean): string | void;
248
+ class_exists(name: string): boolean;
249
+ function_exists(name: string): boolean;
250
+ url(path?: string): string;
251
+ asset(path: string): string;
252
+ deepClone<T>(obj: T): T;
253
+ data_get(obj: any, path: string, defaultValue?: any): any;
254
+ data_set(obj: any, path: string, value: any): void;
255
+ old(key: string, defaultValue?: any): any;
256
+ }
@@ -0,0 +1,51 @@
1
+ // ─── HTTP Service Interface ──────────────────────────────────────
2
+
3
+ export interface HttpRequestConfig extends RequestInit {
4
+ headers?: Record<string, string>;
5
+ timeout?: number;
6
+ [key: string]: any;
7
+ }
8
+
9
+ export interface HttpResponse<T = any> {
10
+ status: boolean;
11
+ statusCode: number;
12
+ data: T;
13
+ headers: Headers;
14
+ }
15
+
16
+ export interface HttpInterceptor {
17
+ request?: (config: HttpRequestConfig) => HttpRequestConfig | Promise<HttpRequestConfig>;
18
+ response?: <T = any>(response: HttpResponse<T>) => HttpResponse<T> | Promise<HttpResponse<T>>;
19
+ error?: (error: Error) => Error | Promise<Error>;
20
+ }
21
+
22
+ export interface HttpServiceInterface {
23
+ // ─── Config ─────────────────────────────────────────────────
24
+ setBaseUrl(url: string): this;
25
+ setTimeout(ms: number): this;
26
+ setDefaultHeaders(headers: Record<string, string>): this;
27
+ setHeader(name: string, value: string): this;
28
+ removeHeader(name: string): this;
29
+
30
+ /** Add interceptor. Returns unregister function. */
31
+ addInterceptor(interceptor: HttpInterceptor): () => void;
32
+
33
+ // ─── Core Request ───────────────────────────────────────────
34
+ request<T = any>(method: string, url: string, data?: any, options?: HttpRequestConfig): Promise<HttpResponse<T>>;
35
+
36
+ // ─── Convenience ────────────────────────────────────────────
37
+ get<T = any>(url: string, params?: any, options?: HttpRequestConfig): Promise<HttpResponse<T>>;
38
+ post<T = any>(url: string, data?: any, options?: HttpRequestConfig): Promise<HttpResponse<T>>;
39
+ put<T = any>(url: string, data?: any, options?: HttpRequestConfig): Promise<HttpResponse<T>>;
40
+ patch<T = any>(url: string, data?: any, options?: HttpRequestConfig): Promise<HttpResponse<T>>;
41
+ delete<T = any>(url: string, options?: HttpRequestConfig): Promise<HttpResponse<T>>;
42
+
43
+ // ─── Cancellation ───────────────────────────────────────────
44
+ /** Cancel all pending requests */
45
+ cancelAll(): void;
46
+ /** Cancel a specific pending request */
47
+ cancel(url: string, method?: string): void;
48
+
49
+ /** Destroy — cancel all + clear interceptors */
50
+ destroy(): void;
51
+ }
@@ -0,0 +1,48 @@
1
+ // ─── Logger Service Interface ────────────────────────────────────
2
+
3
+ export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'silent';
4
+
5
+ export interface LoggerConfig {
6
+ /** Minimum log level to output (default: 'info') */
7
+ level?: LogLevel;
8
+ /** Enable/disable console output (default: true) */
9
+ enabled?: boolean;
10
+ /** Prefix for all log messages (default: '') */
11
+ prefix?: string;
12
+ /** Max history entries (0 = unlimited, default: 500) */
13
+ maxHistory?: number;
14
+ }
15
+
16
+ export interface LogEntry {
17
+ level: LogLevel;
18
+ timestamp: number;
19
+ args: any[];
20
+ }
21
+
22
+ export interface LoggerServiceInterface {
23
+ // ─── Config ─────────────────────────────────────────────────
24
+ setConfig(config: Partial<LoggerConfig>): void;
25
+ getConfig(): Readonly<Required<LoggerConfig>>;
26
+ enable(): void;
27
+ disable(): void;
28
+ setLevel(level: LogLevel): void;
29
+ setPrefix(prefix: string): void;
30
+
31
+ // ─── Log Methods ────────────────────────────────────────────
32
+ debug(...args: any[]): void;
33
+ info(...args: any[]): void;
34
+ log(...args: any[]): void;
35
+ warn(...args: any[]): void;
36
+ error(...args: any[]): void;
37
+
38
+ // ─── History ────────────────────────────────────────────────
39
+ /** Get all stored log entries */
40
+ getHistory(): readonly LogEntry[];
41
+ /** Get history filtered by level */
42
+ getHistoryByLevel(level: LogLevel): LogEntry[];
43
+ /** Clear log history */
44
+ clearHistory(): void;
45
+
46
+ // ─── Lifecycle ──────────────────────────────────────────────
47
+ destroy(): void;
48
+ }
@@ -0,0 +1,15 @@
1
+ // ─── LoopContext Interface ───────────────────────────────────────
2
+
3
+ export interface LoopContextInterface {
4
+ index: number;
5
+ iteration: number;
6
+ count: number;
7
+ remaining: number;
8
+ first: boolean;
9
+ last: boolean;
10
+ odd: boolean;
11
+ even: boolean;
12
+ depth: number;
13
+ parent: LoopContextInterface | null;
14
+ next(): void;
15
+ }
@@ -0,0 +1,77 @@
1
+
2
+
3
+ export interface MarkerRegistryRecord {
4
+ /** Full tag name: 'reactive', 'block', 'foreach', etc. */
5
+ tag: string;
6
+ /** Unique ID for this marker (e.g. 'r:m0') */
7
+ registryID: string;
8
+ /** Arbitrary metadata */
9
+ attributes: Record<string, any>;
10
+ }
11
+
12
+ export type MarkerTagName =
13
+ | 'view' | 'component' | 'layout' | 'template'
14
+ | 'block' | 'blockoutlet' | 'reactive' | 'section' | 'fragment'
15
+ | 'for' | 'forin' | 'foreach' | 'while'
16
+ | 'if' | 'switch'
17
+ | 'include' | 'yield' | 'slot'
18
+ | 'echo' | 'echoescaped'
19
+ | 'useblock' | 'extend'
20
+ | 'style' | 'script'
21
+ | (string & {}); // Allow custom tags
22
+
23
+
24
+ // ─── MarkerRegistry Service ─────────────────────────────────────
25
+
26
+
27
+ export type MarkerFilter = string | Record<string, any>;
28
+ export interface MarkerRecord {
29
+ name: string;
30
+ tagName: string;
31
+ registryID?: string | null;
32
+ attributes: Record<string, any>;
33
+ openTag: Comment;
34
+ closeTag: Comment;
35
+ children: Array<Node>;
36
+ [key: string]: any;
37
+ }
38
+ export interface MarkupAttributes {
39
+ [key: string]: string;
40
+ }
41
+
42
+ export interface MarkupQueryOptions {
43
+ multiple?: boolean;
44
+ recursive?: boolean;
45
+ }
46
+
47
+ export interface MarkupQuery {
48
+ pattern: string;
49
+ attributes?: MarkupAttributes;
50
+ options?: MarkupQueryOptions;
51
+ index?: number;
52
+ }
53
+
54
+ /**
55
+ * RegistryTag Query Options
56
+ */
57
+ export interface RegistryTagQueryOptions {
58
+ tag?: string;
59
+ id?: string;
60
+ attributes?: Record<string, any>;
61
+ multiple?: boolean;
62
+ }
63
+
64
+ /**
65
+ * RegistryTagData
66
+ */
67
+ export interface RegistryTagData {
68
+ systemPrefix: string;
69
+ tag: string;
70
+ id: string;
71
+ key: string;
72
+ attributes?: Record<string, any>;
73
+ nodes: Array<Node>;
74
+ }
75
+
76
+
77
+ export type RegistryIDOrAttributes = string | Record<string, any> | undefined;
@@ -0,0 +1,45 @@
1
+ import type { OneObjectType } from "../types/utils";
2
+ import type { ViewControllerInterface } from "./ViewControllerInterface";
3
+ import type { HtmlInterface, OneChildrenFactoryOutput, OneElementChildren, OneNodeInterface } from "./ElementInterface";
4
+
5
+ // ─── Reactive Interface ──────────────────────────────────────────
6
+
7
+ /** Reactive region bounded by comment markers — re-renders when deps change */
8
+ export interface ReactiveInterface extends OneNodeInterface {
9
+ oneType: OneObjectType;
10
+ id: string;
11
+ type: string;
12
+ ctx: ViewControllerInterface;
13
+ stateKeys: string[];
14
+ parentElement: HtmlInterface | null;
15
+ parentReactive: ReactiveInterface | null;
16
+ openTag: Comment;
17
+ closeTag: Comment;
18
+ children: OneElementChildren;
19
+ unsubscribe: () => void;
20
+ childrenFactory: ReactiveChildrenFactory;
21
+ setChildrenFactory(factory: ReactiveChildrenFactory): void;
22
+ setStateKeys(stateKeys: string[]): void;
23
+ render(): void;
24
+ destroy(): void;
25
+ isOneElement: boolean;
26
+ isOneReactive: boolean;
27
+ }
28
+
29
+ // ─── Reactive Types ──────────────────────────────────────────────
30
+
31
+ /** Function called by Reactive to produce DOM content between markers */
32
+ export type ReactiveRenderFn = (ctx: ViewControllerInterface, parentElement: HtmlInterface | null) => OneChildrenFactoryOutput;
33
+
34
+ /** Factory function for reactive children rendering */
35
+ export type ReactiveChildrenFactory = (parentReactive: ReactiveInterface, parentElement: HtmlInterface | null) => OneChildrenFactoryOutput;
36
+
37
+ /** Reactive configuration */
38
+ export type ReactiveConfig = {
39
+ type?: string;
40
+ id?: string;
41
+ stateKeys?: string[];
42
+ options?: any;
43
+ attributes?: Record<string, any>;
44
+ createdMode?: 'csr' | 'ssr';
45
+ }