@logixjs/core 0.0.1 → 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 (398) hide show
  1. package/LICENSE +201 -0
  2. package/dist/{Action-mqVvtEHt.d.ts → Action-DYl88bwj.d.ts} +1 -1
  3. package/dist/{Action-BkRHy2vg.d.cts → Action-DkxsI_DK.d.cts} +1 -1
  4. package/dist/Action.cjs.map +1 -1
  5. package/dist/Action.d.cts +1 -1
  6. package/dist/Action.d.ts +1 -1
  7. package/dist/Action.js +2 -2
  8. package/dist/{Actions-AsQ07yTP.d.cts → Actions-Dicm7jdc.d.cts} +2 -2
  9. package/dist/{Actions-AsQ07yTP.d.ts → Actions-Dicm7jdc.d.ts} +2 -2
  10. package/dist/Actions.cjs.map +1 -1
  11. package/dist/Actions.d.cts +1 -1
  12. package/dist/Actions.d.ts +1 -1
  13. package/dist/Actions.js +1 -1
  14. package/dist/{Bound-BN1DQ_lM.d.ts → Bound-1OJLzVIS.d.ts} +2 -2
  15. package/dist/{Bound-BPIfH9SS.d.cts → Bound-BMLrtQ1V.d.cts} +2 -2
  16. package/dist/Bound.cjs +1737 -399
  17. package/dist/Bound.cjs.map +1 -1
  18. package/dist/Bound.d.cts +5 -5
  19. package/dist/Bound.d.ts +5 -5
  20. package/dist/Bound.js +19 -17
  21. package/dist/{Debug-B5q5Bkzx.d.ts → Debug-DKrWP5H1.d.ts} +40 -22
  22. package/dist/{Debug-Bq8Sqjcr.d.cts → Debug-hIT44XsY.d.cts} +40 -22
  23. package/dist/Debug.cjs +1348 -318
  24. package/dist/Debug.cjs.map +1 -1
  25. package/dist/Debug.d.cts +12 -11
  26. package/dist/Debug.d.ts +12 -11
  27. package/dist/Debug.js +20 -11
  28. package/dist/EffectOp.cjs +15 -6
  29. package/dist/EffectOp.cjs.map +1 -1
  30. package/dist/EffectOp.js +3 -3
  31. package/dist/Env.cjs +772 -6
  32. package/dist/Env.cjs.map +1 -1
  33. package/dist/Env.js +5 -2
  34. package/dist/ExternalStore-DqJKKRJ4.d.ts +61 -0
  35. package/dist/ExternalStore-JC-gAgEI.d.cts +61 -0
  36. package/dist/ExternalStore.cjs +774 -0
  37. package/dist/ExternalStore.cjs.map +1 -0
  38. package/dist/ExternalStore.d.cts +8 -0
  39. package/dist/ExternalStore.d.ts +8 -0
  40. package/dist/ExternalStore.js +19 -0
  41. package/dist/ExternalStore.js.map +1 -0
  42. package/dist/{Flow-BhpjE22E.d.ts → Flow-CZmXRDqp.d.cts} +13 -4
  43. package/dist/{Flow-1fZT8MpX.d.cts → Flow-DIVDxz7R.d.ts} +13 -4
  44. package/dist/Flow.cjs +765 -148
  45. package/dist/Flow.cjs.map +1 -1
  46. package/dist/Flow.d.cts +6 -6
  47. package/dist/Flow.d.ts +6 -6
  48. package/dist/Flow.js +9 -8
  49. package/dist/{Handle-D_cLW1Z3.d.ts → Handle-Bo6cAFut.d.ts} +1 -1
  50. package/dist/{Handle-D8D1zPb_.d.cts → Handle-CfDvSqN7.d.cts} +1 -1
  51. package/dist/Handle.d.cts +5 -5
  52. package/dist/Handle.d.ts +5 -5
  53. package/dist/{Kernel-8kC-jOda.d.cts → Kernel-CuXBF9S_.d.cts} +16 -7
  54. package/dist/{Kernel-CnGE1Fyk.d.ts → Kernel-D9guNwRL.d.ts} +16 -7
  55. package/dist/Kernel.cjs +814 -26
  56. package/dist/Kernel.cjs.map +1 -1
  57. package/dist/Kernel.d.cts +13 -12
  58. package/dist/Kernel.d.ts +13 -12
  59. package/dist/Kernel.js +7 -4
  60. package/dist/{Link-Db7975nU.d.ts → Link-CUM0yUCH.d.ts} +10 -3
  61. package/dist/{Link-fX8x1eCK.d.cts → Link-NAfR6uGD.d.cts} +10 -3
  62. package/dist/Link.cjs +1294 -121
  63. package/dist/Link.cjs.map +1 -1
  64. package/dist/Link.d.cts +5 -5
  65. package/dist/Link.d.ts +5 -5
  66. package/dist/Link.js +37 -29
  67. package/dist/{Logic-DRh4sDZj.d.cts → Logic-09VQpIj3.d.cts} +7 -4
  68. package/dist/{Logic-BRjEMr-W.d.ts → Logic-DKg7ghGy.d.ts} +7 -4
  69. package/dist/Logic.cjs +2 -1
  70. package/dist/Logic.cjs.map +1 -1
  71. package/dist/Logic.d.cts +5 -5
  72. package/dist/Logic.d.ts +5 -5
  73. package/dist/Logic.js +1 -1
  74. package/dist/{MatchBuilder-CJk5oCkR.d.cts → MatchBuilder-CsW5jgrL.d.ts} +1 -1
  75. package/dist/{MatchBuilder-0QOc-nlU.d.ts → MatchBuilder-Dksk07F4.d.cts} +1 -1
  76. package/dist/MatchBuilder.cjs +2 -2
  77. package/dist/MatchBuilder.cjs.map +1 -1
  78. package/dist/MatchBuilder.d.cts +6 -6
  79. package/dist/MatchBuilder.d.ts +6 -6
  80. package/dist/MatchBuilder.js +2 -2
  81. package/dist/Middleware-D8tUDLv_.d.cts +100 -0
  82. package/dist/Middleware-DS7CbTTN.d.ts +100 -0
  83. package/dist/Middleware.cjs +678 -58
  84. package/dist/Middleware.cjs.map +1 -1
  85. package/dist/Middleware.d.cts +2 -86
  86. package/dist/Middleware.d.ts +2 -86
  87. package/dist/Middleware.js +15 -12
  88. package/dist/{Module-DnzluX2J.d.ts → Module-B_Cntyms.d.ts} +54 -25
  89. package/dist/{Module-B_0xRDMR.d.cts → Module-CmNOVXzf.d.cts} +54 -25
  90. package/dist/Module.cjs +9331 -3317
  91. package/dist/Module.cjs.map +1 -1
  92. package/dist/Module.d.cts +7 -6
  93. package/dist/Module.d.ts +7 -6
  94. package/dist/Module.js +39 -31
  95. package/dist/ModuleTag-CGho_InD.d.ts +113 -0
  96. package/dist/ModuleTag-CITb8L_G.d.cts +113 -0
  97. package/dist/ModuleTag.cjs +7248 -2847
  98. package/dist/ModuleTag.cjs.map +1 -1
  99. package/dist/ModuleTag.d.cts +6 -6
  100. package/dist/ModuleTag.d.ts +6 -6
  101. package/dist/ModuleTag.js +35 -29
  102. package/dist/Observability-Bdhnx2Dv.d.ts +385 -0
  103. package/dist/Observability-DXGAFBIT.d.cts +385 -0
  104. package/dist/Observability.cjs +5093 -1556
  105. package/dist/Observability.cjs.map +1 -1
  106. package/dist/Observability.d.cts +6 -7
  107. package/dist/Observability.d.ts +6 -7
  108. package/dist/Observability.js +28 -23
  109. package/dist/{Platform-CHX8o-U4.d.ts → Platform-B4s8tg6C.d.cts} +4 -5
  110. package/dist/{Platform-C49Pv956.d.cts → Platform-BV_0MW7g.d.cts} +5 -2
  111. package/dist/{Platform-C49Pv956.d.ts → Platform-BV_0MW7g.d.ts} +5 -2
  112. package/dist/{Platform-CVlv0xLQ.d.cts → Platform-W0Mefy_e.d.ts} +4 -5
  113. package/dist/Platform.cjs +2 -1
  114. package/dist/Platform.cjs.map +1 -1
  115. package/dist/Platform.d.cts +2 -3
  116. package/dist/Platform.d.ts +2 -3
  117. package/dist/Platform.js +2 -2
  118. package/dist/{Process-CM9xbMdP.d.ts → Process-CO8G7HO9.d.cts} +30 -5
  119. package/dist/{Process-mL8fHDSB.d.cts → Process-Cyf6VNDR.d.ts} +30 -5
  120. package/dist/Process.cjs +1288 -120
  121. package/dist/Process.cjs.map +1 -1
  122. package/dist/Process.d.cts +6 -6
  123. package/dist/Process.d.ts +6 -6
  124. package/dist/Process.js +34 -26
  125. package/dist/ReadQuery-C_or5nLC.d.ts +128 -0
  126. package/dist/ReadQuery-DXLzCE0E.d.cts +614 -0
  127. package/dist/ReadQuery-DXLzCE0E.d.ts +614 -0
  128. package/dist/ReadQuery-Yve1lmUo.d.cts +128 -0
  129. package/dist/ReadQuery.cjs +290 -5
  130. package/dist/ReadQuery.cjs.map +1 -1
  131. package/dist/ReadQuery.d.cts +3 -2
  132. package/dist/ReadQuery.d.ts +3 -2
  133. package/dist/ReadQuery.js +23 -5
  134. package/dist/{Reflection-CQnKwPXj.d.ts → Reflection-B2Xi1e4Q.d.ts} +89 -7
  135. package/dist/{Reflection-Kabo1mlU.d.cts → Reflection-DNB4V4_e.d.cts} +89 -7
  136. package/dist/Reflection.cjs +3227 -1617
  137. package/dist/Reflection.cjs.map +1 -1
  138. package/dist/Reflection.d.cts +17 -15
  139. package/dist/Reflection.d.ts +17 -15
  140. package/dist/Reflection.js +33 -25
  141. package/dist/{Resource-Dy1xD_DG.d.cts → Resource-pKvQQ4x5.d.cts} +3 -3
  142. package/dist/{Resource-Dy1xD_DG.d.ts → Resource-pKvQQ4x5.d.ts} +3 -3
  143. package/dist/Resource.cjs +781 -15
  144. package/dist/Resource.cjs.map +1 -1
  145. package/dist/Resource.d.cts +1 -1
  146. package/dist/Resource.d.ts +1 -1
  147. package/dist/Resource.js +6 -3
  148. package/dist/{Root-7ADUMk4t.d.cts → Root-CCVuFHB6.d.cts} +3 -3
  149. package/dist/{Root-7ADUMk4t.d.ts → Root-CCVuFHB6.d.ts} +3 -3
  150. package/dist/Root.cjs +786 -20
  151. package/dist/Root.cjs.map +1 -1
  152. package/dist/Root.d.cts +2 -2
  153. package/dist/Root.d.ts +2 -2
  154. package/dist/Root.js +7 -3
  155. package/dist/{Runtime-CtyzZG4i.d.ts → Runtime-CRmvwK4I.d.ts} +70 -14
  156. package/dist/{Runtime-B-aL-f29.d.cts → Runtime-C_wJM9mN.d.cts} +70 -14
  157. package/dist/Runtime.cjs +4942 -1601
  158. package/dist/Runtime.cjs.map +1 -1
  159. package/dist/Runtime.d.cts +17 -15
  160. package/dist/Runtime.d.ts +17 -15
  161. package/dist/Runtime.js +44 -32
  162. package/dist/{ScopeRegistry-D1owDNSm.d.cts → ScopeRegistry-BhYzqWri.d.cts} +6 -6
  163. package/dist/{ScopeRegistry-D1owDNSm.d.ts → ScopeRegistry-BhYzqWri.d.ts} +6 -6
  164. package/dist/ScopeRegistry.cjs +776 -10
  165. package/dist/ScopeRegistry.cjs.map +1 -1
  166. package/dist/ScopeRegistry.d.cts +1 -1
  167. package/dist/ScopeRegistry.d.ts +1 -1
  168. package/dist/ScopeRegistry.js +6 -3
  169. package/dist/{State-CU50R26M.d.cts → State-rNFsFPTl.d.cts} +2 -2
  170. package/dist/{State-CU50R26M.d.ts → State-rNFsFPTl.d.ts} +2 -2
  171. package/dist/State.cjs.map +1 -1
  172. package/dist/State.d.cts +1 -1
  173. package/dist/State.d.ts +1 -1
  174. package/dist/State.js +1 -1
  175. package/dist/{StateTrait-BGsZghTz.d.ts → StateTrait-CijdwNb6.d.ts} +25 -8
  176. package/dist/{StateTrait-OWhbj12c.d.cts → StateTrait-Dltto6PU.d.cts} +25 -8
  177. package/dist/StateTrait.cjs +1890 -528
  178. package/dist/StateTrait.cjs.map +1 -1
  179. package/dist/StateTrait.d.cts +9 -7
  180. package/dist/StateTrait.d.ts +9 -7
  181. package/dist/StateTrait.js +18 -14
  182. package/dist/{TraitLifecycle-CwV5WPFX.d.cts → TraitLifecycle-BKzDqzLu.d.cts} +2 -2
  183. package/dist/{TraitLifecycle-LdIWmKlg.d.ts → TraitLifecycle-Cvo94uDB.d.ts} +2 -2
  184. package/dist/TraitLifecycle.cjs +630 -67
  185. package/dist/TraitLifecycle.cjs.map +1 -1
  186. package/dist/TraitLifecycle.d.cts +6 -6
  187. package/dist/TraitLifecycle.d.ts +6 -6
  188. package/dist/TraitLifecycle.js +8 -7
  189. package/dist/Workflow-C_OWr4dV.d.ts +415 -0
  190. package/dist/Workflow-DmydkHO8.d.cts +415 -0
  191. package/dist/Workflow.cjs +3150 -0
  192. package/dist/Workflow.cjs.map +1 -0
  193. package/dist/Workflow.d.cts +7 -0
  194. package/dist/Workflow.d.ts +7 -0
  195. package/dist/Workflow.js +58 -0
  196. package/dist/Workflow.js.map +1 -0
  197. package/dist/{action-DiMDD_0v.d.cts → action-BQxjPFEw.d.cts} +5 -5
  198. package/dist/{action-DiMDD_0v.d.ts → action-BQxjPFEw.d.ts} +5 -5
  199. package/dist/chunk-2XRLXDWR.js +276 -0
  200. package/dist/chunk-2XRLXDWR.js.map +1 -0
  201. package/dist/chunk-3L6QGFMM.js +701 -0
  202. package/dist/chunk-3L6QGFMM.js.map +1 -0
  203. package/dist/{chunk-GMPEOUP2.js → chunk-4MZ7BT3R.js} +2 -2
  204. package/dist/chunk-4MZ7BT3R.js.map +1 -0
  205. package/dist/{chunk-3IYZ5IGG.js → chunk-5WKUGEBY.js} +2 -2
  206. package/dist/{chunk-3RMKLXHX.js → chunk-63ZQ5RIN.js} +2 -2
  207. package/dist/{chunk-M3WTHJHJ.js → chunk-67DIEA53.js} +385 -148
  208. package/dist/chunk-67DIEA53.js.map +1 -0
  209. package/dist/{chunk-YS3AZQ2G.js → chunk-6HFAW2MH.js} +1 -1
  210. package/dist/chunk-6HFAW2MH.js.map +1 -0
  211. package/dist/{chunk-EY4NZKDR.js → chunk-6Y2TKCNY.js} +2 -2
  212. package/dist/{chunk-76WT3HOR.js → chunk-6YZOXFPQ.js} +25 -24
  213. package/dist/chunk-6YZOXFPQ.js.map +1 -0
  214. package/dist/{chunk-G5ZBFPNU.js → chunk-A2RQOJC7.js} +2 -2
  215. package/dist/{chunk-AUIR5O6W.js → chunk-AFSB6NKM.js} +13 -19
  216. package/dist/chunk-AFSB6NKM.js.map +1 -0
  217. package/dist/{chunk-JCXGZRMU.js → chunk-AO4JEOKD.js} +22 -23
  218. package/dist/chunk-AO4JEOKD.js.map +1 -0
  219. package/dist/{chunk-TAAPQVZN.js → chunk-AYELIQXR.js} +2 -2
  220. package/dist/{chunk-QMM6O4CD.js → chunk-BLHZW7DG.js} +15 -3
  221. package/dist/{chunk-QMM6O4CD.js.map → chunk-BLHZW7DG.js.map} +1 -1
  222. package/dist/{chunk-TQOBJYDP.js → chunk-CD4N74YC.js} +1 -1
  223. package/dist/chunk-CD4N74YC.js.map +1 -0
  224. package/dist/{chunk-ANLBCBDC.js → chunk-CGE2HBTH.js} +11 -11
  225. package/dist/chunk-CGE2HBTH.js.map +1 -0
  226. package/dist/{chunk-OFADUJWJ.js → chunk-CYYSQMLO.js} +5 -5
  227. package/dist/chunk-CYYSQMLO.js.map +1 -0
  228. package/dist/{chunk-66ALHVEX.js → chunk-EB46EYI7.js} +3 -3
  229. package/dist/{chunk-NZJKFF45.js → chunk-EKCDHWRK.js} +4 -4
  230. package/dist/chunk-EKCDHWRK.js.map +1 -0
  231. package/dist/{chunk-BABLDP24.js → chunk-EPQFNJU3.js} +152 -7
  232. package/dist/chunk-EPQFNJU3.js.map +1 -0
  233. package/dist/{chunk-OGWBVHB3.js → chunk-ESR6HGOY.js} +73 -14
  234. package/dist/chunk-ESR6HGOY.js.map +1 -0
  235. package/dist/{chunk-NBD3KUOZ.js → chunk-F6RP62H3.js} +150 -98
  236. package/dist/chunk-F6RP62H3.js.map +1 -0
  237. package/dist/chunk-FBYW3QDI.js +252 -0
  238. package/dist/chunk-FBYW3QDI.js.map +1 -0
  239. package/dist/{chunk-IPF7E66P.js → chunk-FYAODKVP.js} +2 -2
  240. package/dist/chunk-GNEN7NKO.js +908 -0
  241. package/dist/chunk-GNEN7NKO.js.map +1 -0
  242. package/dist/chunk-GWSM4KLB.js +763 -0
  243. package/dist/chunk-GWSM4KLB.js.map +1 -0
  244. package/dist/{chunk-4SO6JMZL.js → chunk-HDMXCUZL.js} +1 -1
  245. package/dist/chunk-HDMXCUZL.js.map +1 -0
  246. package/dist/{chunk-ZFY7U2FR.js → chunk-HJM5Y5NU.js} +43 -3
  247. package/dist/chunk-HJM5Y5NU.js.map +1 -0
  248. package/dist/{chunk-ZGDVUPTM.js → chunk-IOZ3VKPK.js} +129 -68
  249. package/dist/chunk-IOZ3VKPK.js.map +1 -0
  250. package/dist/{chunk-PYOE4VSI.js → chunk-IVXSVHO4.js} +303 -247
  251. package/dist/chunk-IVXSVHO4.js.map +1 -0
  252. package/dist/chunk-J3CWXIPV.js +242 -0
  253. package/dist/chunk-J3CWXIPV.js.map +1 -0
  254. package/dist/chunk-K6JQW266.js +42 -0
  255. package/dist/chunk-K6JQW266.js.map +1 -0
  256. package/dist/chunk-KMZYQF6Q.js +202 -0
  257. package/dist/chunk-KMZYQF6Q.js.map +1 -0
  258. package/dist/{chunk-JWOYLO27.js → chunk-LPPZDFTD.js} +22 -12
  259. package/dist/chunk-LPPZDFTD.js.map +1 -0
  260. package/dist/{chunk-PAYXCY6A.js → chunk-MYB2B5WX.js} +997 -576
  261. package/dist/chunk-MYB2B5WX.js.map +1 -0
  262. package/dist/chunk-MYKNINNN.js +228 -0
  263. package/dist/chunk-MYKNINNN.js.map +1 -0
  264. package/dist/chunk-NSQIRMVF.js +27 -0
  265. package/dist/{chunk-QCHIQWAJ.js.map → chunk-NSQIRMVF.js.map} +1 -1
  266. package/dist/chunk-NUDBM4MM.js +30 -0
  267. package/dist/chunk-NUDBM4MM.js.map +1 -0
  268. package/dist/chunk-NZMWWDAY.js +23 -0
  269. package/dist/chunk-NZMWWDAY.js.map +1 -0
  270. package/dist/{chunk-RNFE3ML2.js → chunk-OCUV2Y25.js} +4 -3
  271. package/dist/chunk-OCUV2Y25.js.map +1 -0
  272. package/dist/chunk-P4ZJOQA7.js +271 -0
  273. package/dist/chunk-P4ZJOQA7.js.map +1 -0
  274. package/dist/chunk-P6C5EZ3D.js +342 -0
  275. package/dist/chunk-P6C5EZ3D.js.map +1 -0
  276. package/dist/{chunk-CW6T36TN.js → chunk-PBD7BJUN.js} +62 -4
  277. package/dist/chunk-PBD7BJUN.js.map +1 -0
  278. package/dist/chunk-PBIUCQY3.js +696 -0
  279. package/dist/chunk-PBIUCQY3.js.map +1 -0
  280. package/dist/chunk-PD6YECQH.js +845 -0
  281. package/dist/chunk-PD6YECQH.js.map +1 -0
  282. package/dist/{chunk-M7IYCTJV.js → chunk-R4LFQGP3.js} +2 -2
  283. package/dist/chunk-RHJIGDUE.js +21 -0
  284. package/dist/chunk-RHJIGDUE.js.map +1 -0
  285. package/dist/{chunk-KP7MUZNX.js → chunk-RLXO27MW.js} +30 -8
  286. package/dist/chunk-RLXO27MW.js.map +1 -0
  287. package/dist/{chunk-DFNM3WX2.js → chunk-S44BEV4B.js} +168 -45
  288. package/dist/chunk-S44BEV4B.js.map +1 -0
  289. package/dist/chunk-S4S5N4BJ.js +1461 -0
  290. package/dist/chunk-S4S5N4BJ.js.map +1 -0
  291. package/dist/{chunk-BZ2SHDN2.js → chunk-SGTRAXXX.js} +3 -3
  292. package/dist/chunk-SGTRAXXX.js.map +1 -0
  293. package/dist/{chunk-M2RGJPXX.js → chunk-SJAE5PB5.js} +3 -3
  294. package/dist/{chunk-JGIWG6SR.js → chunk-SNPNHU3H.js} +3937 -1776
  295. package/dist/chunk-SNPNHU3H.js.map +1 -0
  296. package/dist/{chunk-IHVBV5C2.js → chunk-SOOBFXRR.js} +94 -71
  297. package/dist/chunk-SOOBFXRR.js.map +1 -0
  298. package/dist/{chunk-ZDTRWK5F.js → chunk-TAHFWKS6.js} +2 -2
  299. package/dist/chunk-UEFFTVPY.js +9 -0
  300. package/dist/chunk-UEFFTVPY.js.map +1 -0
  301. package/dist/{chunk-24VULZ7A.js → chunk-UR5BXLBP.js} +3 -3
  302. package/dist/chunk-UR5BXLBP.js.map +1 -0
  303. package/dist/{chunk-DMBALCE2.js → chunk-V2SBGVDO.js} +471 -186
  304. package/dist/chunk-V2SBGVDO.js.map +1 -0
  305. package/dist/chunk-VJLWD47W.js +23 -0
  306. package/dist/chunk-VJLWD47W.js.map +1 -0
  307. package/dist/{chunk-4CQAV7YB.js → chunk-W647DX5Z.js} +2 -2
  308. package/dist/{chunk-THATMZXD.js → chunk-WFIIU3YZ.js} +2 -2
  309. package/dist/{chunk-THATMZXD.js.map → chunk-WFIIU3YZ.js.map} +1 -1
  310. package/dist/chunk-YZDJMAKL.js +82 -0
  311. package/dist/chunk-YZDJMAKL.js.map +1 -0
  312. package/dist/{chunk-3TMODYZV.js → chunk-Z5XH6VHY.js} +5 -5
  313. package/dist/chunk-Z5XH6VHY.js.map +1 -0
  314. package/dist/{chunk-BE3HW4FY.js → chunk-ZBBMZMA6.js} +377 -170
  315. package/dist/chunk-ZBBMZMA6.js.map +1 -0
  316. package/dist/index.cjs +21224 -11714
  317. package/dist/index.cjs.map +1 -1
  318. package/dist/index.d.cts +195 -49
  319. package/dist/index.d.ts +195 -49
  320. package/dist/index.js +150 -74
  321. package/dist/index.js.map +1 -1
  322. package/dist/{ir-BMP7yxJJ.d.cts → ir-BSosEwc8.d.cts} +1 -1
  323. package/dist/{ir-DUOz6H-5.d.ts → ir-D-uqwL_4.d.ts} +1 -1
  324. package/dist/{module-B8CBqIZ_.d.cts → module-Ds4tarcI.d.cts} +230 -140
  325. package/dist/{module-k7m3txak.d.ts → module-Zd1Gn-Nj.d.ts} +230 -140
  326. package/package.json +20 -4
  327. package/dist/ModuleTag-C8FHY_sY.d.ts +0 -93
  328. package/dist/ModuleTag-EGbgBMpZ.d.cts +0 -93
  329. package/dist/Observability-COqEvp2C.d.cts +0 -713
  330. package/dist/Observability-cY4kLn0S.d.ts +0 -713
  331. package/dist/ReadQuery-BlMwhe-F.d.ts +0 -30
  332. package/dist/ReadQuery-CL5XlXts.d.cts +0 -30
  333. package/dist/ReadQuery-SinbStGF.d.cts +0 -38
  334. package/dist/ReadQuery-SinbStGF.d.ts +0 -38
  335. package/dist/chunk-24VULZ7A.js.map +0 -1
  336. package/dist/chunk-3QMIVH35.js +0 -43
  337. package/dist/chunk-3QMIVH35.js.map +0 -1
  338. package/dist/chunk-3TMODYZV.js.map +0 -1
  339. package/dist/chunk-4SO6JMZL.js.map +0 -1
  340. package/dist/chunk-76WT3HOR.js.map +0 -1
  341. package/dist/chunk-ANLBCBDC.js.map +0 -1
  342. package/dist/chunk-AUIR5O6W.js.map +0 -1
  343. package/dist/chunk-BABLDP24.js.map +0 -1
  344. package/dist/chunk-BE3HW4FY.js.map +0 -1
  345. package/dist/chunk-BZ2SHDN2.js.map +0 -1
  346. package/dist/chunk-CW6T36TN.js.map +0 -1
  347. package/dist/chunk-DFNM3WX2.js.map +0 -1
  348. package/dist/chunk-DMBALCE2.js.map +0 -1
  349. package/dist/chunk-EGK3KN7B.js +0 -406
  350. package/dist/chunk-EGK3KN7B.js.map +0 -1
  351. package/dist/chunk-GMPEOUP2.js.map +0 -1
  352. package/dist/chunk-IHVBV5C2.js.map +0 -1
  353. package/dist/chunk-JCXGZRMU.js.map +0 -1
  354. package/dist/chunk-JGIWG6SR.js.map +0 -1
  355. package/dist/chunk-JWOYLO27.js.map +0 -1
  356. package/dist/chunk-KIXAU3GM.js +0 -137
  357. package/dist/chunk-KIXAU3GM.js.map +0 -1
  358. package/dist/chunk-KL5ACTCT.js +0 -8
  359. package/dist/chunk-KL5ACTCT.js.map +0 -1
  360. package/dist/chunk-KP7MUZNX.js.map +0 -1
  361. package/dist/chunk-M3BFQ7HK.js +0 -13
  362. package/dist/chunk-M3BFQ7HK.js.map +0 -1
  363. package/dist/chunk-M3WTHJHJ.js.map +0 -1
  364. package/dist/chunk-NBD3KUOZ.js.map +0 -1
  365. package/dist/chunk-NQZ2OSGR.js +0 -151
  366. package/dist/chunk-NQZ2OSGR.js.map +0 -1
  367. package/dist/chunk-NZJKFF45.js.map +0 -1
  368. package/dist/chunk-OFADUJWJ.js.map +0 -1
  369. package/dist/chunk-OGWBVHB3.js.map +0 -1
  370. package/dist/chunk-PAYXCY6A.js.map +0 -1
  371. package/dist/chunk-PYOE4VSI.js.map +0 -1
  372. package/dist/chunk-QCHIQWAJ.js +0 -21
  373. package/dist/chunk-RNFE3ML2.js.map +0 -1
  374. package/dist/chunk-TKZ7MEIA.js +0 -27
  375. package/dist/chunk-TKZ7MEIA.js.map +0 -1
  376. package/dist/chunk-TQOBJYDP.js.map +0 -1
  377. package/dist/chunk-VZB726PE.js +0 -93
  378. package/dist/chunk-VZB726PE.js.map +0 -1
  379. package/dist/chunk-W3TEWHLO.js +0 -568
  380. package/dist/chunk-W3TEWHLO.js.map +0 -1
  381. package/dist/chunk-YS3AZQ2G.js.map +0 -1
  382. package/dist/chunk-ZFLHVFUC.js +0 -192
  383. package/dist/chunk-ZFLHVFUC.js.map +0 -1
  384. package/dist/chunk-ZFY7U2FR.js.map +0 -1
  385. package/dist/chunk-ZGDVUPTM.js.map +0 -1
  386. package/dist/protocol-g_1897M2.d.cts +0 -127
  387. package/dist/protocol-g_1897M2.d.ts +0 -127
  388. /package/dist/{chunk-3IYZ5IGG.js.map → chunk-5WKUGEBY.js.map} +0 -0
  389. /package/dist/{chunk-3RMKLXHX.js.map → chunk-63ZQ5RIN.js.map} +0 -0
  390. /package/dist/{chunk-EY4NZKDR.js.map → chunk-6Y2TKCNY.js.map} +0 -0
  391. /package/dist/{chunk-G5ZBFPNU.js.map → chunk-A2RQOJC7.js.map} +0 -0
  392. /package/dist/{chunk-TAAPQVZN.js.map → chunk-AYELIQXR.js.map} +0 -0
  393. /package/dist/{chunk-66ALHVEX.js.map → chunk-EB46EYI7.js.map} +0 -0
  394. /package/dist/{chunk-IPF7E66P.js.map → chunk-FYAODKVP.js.map} +0 -0
  395. /package/dist/{chunk-M7IYCTJV.js.map → chunk-R4LFQGP3.js.map} +0 -0
  396. /package/dist/{chunk-M2RGJPXX.js.map → chunk-SJAE5PB5.js.map} +0 -0
  397. /package/dist/{chunk-ZDTRWK5F.js.map → chunk-TAHFWKS6.js.map} +0 -0
  398. /package/dist/{chunk-4CQAV7YB.js.map → chunk-W647DX5Z.js.map} +0 -0
@@ -26,10 +26,753 @@ __export(ScopeRegistry_exports, {
26
26
  layer: () => layer
27
27
  });
28
28
  module.exports = __toCommonJS(ScopeRegistry_exports);
29
- var import_effect2 = require("effect");
29
+ var import_effect10 = require("effect");
30
30
 
31
31
  // src/internal/runtime/core/env.ts
32
+ var import_effect9 = require("effect");
33
+
34
+ // src/internal/runtime/core/HostScheduler.ts
35
+ var noopCancel = () => {
36
+ };
37
+ var safeNowMs = () => {
38
+ const perf = globalThis.performance;
39
+ if (perf && typeof perf.now === "function") {
40
+ try {
41
+ const v = perf.now();
42
+ if (typeof v === "number" && Number.isFinite(v)) return v;
43
+ } catch {
44
+ }
45
+ }
46
+ return Date.now();
47
+ };
48
+ var safeQueueMicrotask = (cb) => {
49
+ const qm = globalThis.queueMicrotask;
50
+ if (typeof qm === "function") {
51
+ try {
52
+ qm(cb);
53
+ return;
54
+ } catch {
55
+ }
56
+ }
57
+ try {
58
+ Promise.resolve().then(cb);
59
+ } catch {
60
+ setTimeout(cb, 0);
61
+ }
62
+ };
63
+ var safeSetTimeout = (ms, cb) => {
64
+ const id = setTimeout(cb, ms);
65
+ return () => {
66
+ try {
67
+ clearTimeout(id);
68
+ } catch {
69
+ }
70
+ };
71
+ };
72
+ var makeMessageChannelMacrotask = () => {
73
+ const MC = globalThis.MessageChannel;
74
+ if (typeof MC !== "function") return void 0;
75
+ let channel;
76
+ try {
77
+ channel = new MC();
78
+ } catch {
79
+ return void 0;
80
+ }
81
+ const queue = [];
82
+ let scheduled = false;
83
+ const flush = () => {
84
+ scheduled = false;
85
+ const tasks = queue.splice(0, queue.length);
86
+ for (const t of tasks) {
87
+ if (t.canceled) continue;
88
+ try {
89
+ t.cb();
90
+ } catch {
91
+ }
92
+ }
93
+ };
94
+ try {
95
+ channel.port1.onmessage = flush;
96
+ } catch {
97
+ return void 0;
98
+ }
99
+ const schedule = (cb) => {
100
+ const task = { canceled: false, cb };
101
+ queue.push(task);
102
+ if (!scheduled) {
103
+ scheduled = true;
104
+ try {
105
+ channel.port2.postMessage(void 0);
106
+ } catch {
107
+ scheduled = false;
108
+ return safeSetTimeout(0, cb);
109
+ }
110
+ }
111
+ return () => {
112
+ task.canceled = true;
113
+ };
114
+ };
115
+ return schedule;
116
+ };
117
+ var makeSetImmediateMacrotask = () => {
118
+ const si = globalThis.setImmediate;
119
+ const ci = globalThis.clearImmediate;
120
+ if (typeof si !== "function") return void 0;
121
+ return (cb) => {
122
+ let id;
123
+ try {
124
+ id = si(cb);
125
+ } catch {
126
+ return safeSetTimeout(0, cb);
127
+ }
128
+ return () => {
129
+ if (typeof ci !== "function") return;
130
+ try {
131
+ ci(id);
132
+ } catch {
133
+ }
134
+ };
135
+ };
136
+ };
137
+ var makeRaf = () => {
138
+ const raf = globalThis.requestAnimationFrame;
139
+ const cancel = globalThis.cancelAnimationFrame;
140
+ if (typeof raf !== "function") return void 0;
141
+ return (cb) => {
142
+ let id;
143
+ try {
144
+ id = raf(cb);
145
+ } catch {
146
+ return noopCancel;
147
+ }
148
+ return () => {
149
+ if (typeof cancel !== "function") return;
150
+ try {
151
+ cancel(id);
152
+ } catch {
153
+ }
154
+ };
155
+ };
156
+ };
157
+ var makeDefaultHostScheduler = () => {
158
+ const macrotask = makeSetImmediateMacrotask() ?? makeMessageChannelMacrotask() ?? ((cb) => safeSetTimeout(0, cb));
159
+ const raf = makeRaf();
160
+ return {
161
+ nowMs: safeNowMs,
162
+ scheduleMicrotask: safeQueueMicrotask,
163
+ scheduleMacrotask: macrotask,
164
+ scheduleAnimationFrame: (cb) => raf?.(cb) ?? macrotask(cb),
165
+ scheduleTimeout: safeSetTimeout
166
+ };
167
+ };
168
+ var globalHostScheduler;
169
+ var getGlobalHostScheduler = () => {
170
+ globalHostScheduler ?? (globalHostScheduler = makeDefaultHostScheduler());
171
+ return globalHostScheduler;
172
+ };
173
+
174
+ // src/internal/runtime/core/RuntimeStore.ts
175
+ var parseTopicKey = (topicKey) => {
176
+ const idx = topicKey.indexOf("::");
177
+ if (idx <= 0) return void 0;
178
+ const moduleId = topicKey.slice(0, idx);
179
+ const rest = topicKey.slice(idx + 2);
180
+ if (rest.length === 0) return void 0;
181
+ const idx2 = rest.indexOf("::");
182
+ if (idx2 < 0) {
183
+ return { kind: "module", moduleInstanceKey: `${moduleId}::${rest}` };
184
+ }
185
+ const instanceId = rest.slice(0, idx2);
186
+ const suffix = rest.slice(idx2 + 2);
187
+ if (suffix.startsWith("rq:")) {
188
+ const selectorId = suffix.slice("rq:".length);
189
+ if (selectorId.length === 0) return void 0;
190
+ return {
191
+ kind: "readQuery",
192
+ moduleInstanceKey: `${moduleId}::${instanceId}`,
193
+ selectorId
194
+ };
195
+ }
196
+ return { kind: "module", moduleInstanceKey: `${moduleId}::${instanceId}` };
197
+ };
198
+ var EMPTY_LISTENER_SNAPSHOT = [];
199
+ var NO_CHANGED_TOPIC_LISTENERS = [];
200
+ var makeRuntimeStore = () => {
201
+ let tickSeq = 0;
202
+ const moduleStates = /* @__PURE__ */ new Map();
203
+ const topicVersions = /* @__PURE__ */ new Map();
204
+ const topicPriorities = /* @__PURE__ */ new Map();
205
+ const listenersByTopic = /* @__PURE__ */ new Map();
206
+ const subscriberCountByModule = /* @__PURE__ */ new Map();
207
+ const getTopicVersion = (topicKey) => topicVersions.get(topicKey) ?? 0;
208
+ const getTopicPriority = (topicKey) => topicPriorities.get(topicKey) ?? "normal";
209
+ const commitTopicBump = (topicKey, priority) => {
210
+ const prev = topicVersions.get(topicKey) ?? 0;
211
+ topicVersions.set(topicKey, prev + 1);
212
+ topicPriorities.set(topicKey, priority);
213
+ };
214
+ const refreshTopicSnapshot = (state) => {
215
+ state.snapshot = Array.from(state.listeners);
216
+ };
217
+ const subscribeTopic = (topicKey, listener) => {
218
+ const info = parseTopicKey(topicKey);
219
+ const existing = listenersByTopic.get(topicKey);
220
+ const state = existing ?? { listeners: /* @__PURE__ */ new Set(), snapshot: EMPTY_LISTENER_SNAPSHOT };
221
+ const alreadyHas = state.listeners.has(listener);
222
+ if (!alreadyHas) {
223
+ state.listeners.add(listener);
224
+ refreshTopicSnapshot(state);
225
+ }
226
+ if (!existing) {
227
+ listenersByTopic.set(topicKey, state);
228
+ }
229
+ if (!alreadyHas && info) {
230
+ const prev = subscriberCountByModule.get(info.moduleInstanceKey) ?? 0;
231
+ subscriberCountByModule.set(info.moduleInstanceKey, prev + 1);
232
+ }
233
+ return () => {
234
+ const currentState = listenersByTopic.get(topicKey);
235
+ if (!currentState) return;
236
+ const deleted = currentState.listeners.delete(listener);
237
+ if (deleted && info) {
238
+ const prev = subscriberCountByModule.get(info.moduleInstanceKey) ?? 0;
239
+ const next = prev - 1;
240
+ if (next <= 0) {
241
+ subscriberCountByModule.delete(info.moduleInstanceKey);
242
+ } else {
243
+ subscriberCountByModule.set(info.moduleInstanceKey, next);
244
+ }
245
+ }
246
+ if (currentState.listeners.size === 0) {
247
+ listenersByTopic.delete(topicKey);
248
+ } else if (deleted) {
249
+ refreshTopicSnapshot(currentState);
250
+ }
251
+ };
252
+ };
253
+ const getTopicSubscriberCount = (topicKey) => listenersByTopic.get(topicKey)?.listeners.size ?? 0;
254
+ const getModuleSubscriberCount = (moduleInstanceKey) => subscriberCountByModule.get(moduleInstanceKey) ?? 0;
255
+ const registerModuleInstance = (args) => {
256
+ moduleStates.set(args.moduleInstanceKey, args.initialState);
257
+ if (!topicVersions.has(args.moduleInstanceKey)) {
258
+ topicVersions.set(args.moduleInstanceKey, 0);
259
+ topicPriorities.set(args.moduleInstanceKey, "normal");
260
+ }
261
+ };
262
+ const unregisterModuleInstance = (moduleInstanceKey) => {
263
+ moduleStates.delete(moduleInstanceKey);
264
+ };
265
+ const commitTick = (args) => {
266
+ tickSeq = args.tickSeq;
267
+ for (const [key, commit] of args.accepted.modules) {
268
+ moduleStates.set(key, commit.state);
269
+ }
270
+ if (args.accepted.dirtyTopics.size === 0) {
271
+ return {
272
+ changedTopicListeners: NO_CHANGED_TOPIC_LISTENERS
273
+ };
274
+ }
275
+ if (args.onListener) {
276
+ let firstTopicListeners;
277
+ let secondTopicListeners;
278
+ let restTopicListeners;
279
+ for (const [topicKey, priority] of args.accepted.dirtyTopics) {
280
+ commitTopicBump(topicKey, priority);
281
+ const listeners = listenersByTopic.get(topicKey)?.snapshot ?? EMPTY_LISTENER_SNAPSHOT;
282
+ if (listeners.length === 0) {
283
+ continue;
284
+ }
285
+ if (!firstTopicListeners) {
286
+ firstTopicListeners = listeners;
287
+ continue;
288
+ }
289
+ if (!secondTopicListeners) {
290
+ secondTopicListeners = listeners;
291
+ continue;
292
+ }
293
+ if (!restTopicListeners) {
294
+ restTopicListeners = [];
295
+ }
296
+ restTopicListeners.push(listeners);
297
+ }
298
+ if (firstTopicListeners) {
299
+ for (const listener of firstTopicListeners) {
300
+ try {
301
+ args.onListener(listener);
302
+ } catch {
303
+ }
304
+ }
305
+ }
306
+ if (secondTopicListeners) {
307
+ for (const listener of secondTopicListeners) {
308
+ try {
309
+ args.onListener(listener);
310
+ } catch {
311
+ }
312
+ }
313
+ }
314
+ if (restTopicListeners) {
315
+ for (const listeners of restTopicListeners) {
316
+ for (const listener of listeners) {
317
+ try {
318
+ args.onListener(listener);
319
+ } catch {
320
+ }
321
+ }
322
+ }
323
+ }
324
+ return {
325
+ changedTopicListeners: NO_CHANGED_TOPIC_LISTENERS
326
+ };
327
+ }
328
+ let singleTopicListeners;
329
+ let flattenedTopicListeners;
330
+ for (const [topicKey, priority] of args.accepted.dirtyTopics) {
331
+ commitTopicBump(topicKey, priority);
332
+ const listeners = listenersByTopic.get(topicKey)?.snapshot ?? EMPTY_LISTENER_SNAPSHOT;
333
+ if (listeners.length === 0) {
334
+ continue;
335
+ }
336
+ if (flattenedTopicListeners) {
337
+ for (const listener of listeners) {
338
+ flattenedTopicListeners.push(listener);
339
+ }
340
+ continue;
341
+ }
342
+ if (!singleTopicListeners) {
343
+ singleTopicListeners = listeners;
344
+ continue;
345
+ }
346
+ flattenedTopicListeners = Array.from(singleTopicListeners);
347
+ for (const listener of listeners) {
348
+ flattenedTopicListeners.push(listener);
349
+ }
350
+ }
351
+ return {
352
+ changedTopicListeners: flattenedTopicListeners ?? singleTopicListeners ?? NO_CHANGED_TOPIC_LISTENERS
353
+ };
354
+ };
355
+ const getModuleState = (moduleInstanceKey) => moduleStates.get(moduleInstanceKey);
356
+ const dispose = () => {
357
+ moduleStates.clear();
358
+ topicVersions.clear();
359
+ topicPriorities.clear();
360
+ listenersByTopic.clear();
361
+ subscriberCountByModule.clear();
362
+ };
363
+ return {
364
+ getTickSeq: () => tickSeq,
365
+ getModuleState,
366
+ getTopicVersion,
367
+ getTopicPriority,
368
+ subscribeTopic,
369
+ getTopicSubscriberCount,
370
+ getModuleSubscriberCount,
371
+ registerModuleInstance,
372
+ unregisterModuleInstance,
373
+ commitTick,
374
+ dispose
375
+ };
376
+ };
377
+
378
+ // src/internal/runtime/core/TickScheduler.ts
379
+ var import_effect7 = require("effect");
380
+
381
+ // src/internal/runtime/core/DebugSink.record.ts
382
+ var import_effect3 = require("effect");
383
+
384
+ // src/internal/observability/jsonValue.ts
385
+ var defaultOptions = {
386
+ maxDepth: 6,
387
+ maxObjectKeys: 32,
388
+ maxArrayLength: 32,
389
+ maxStringLength: 256,
390
+ maxJsonBytes: 4 * 1024,
391
+ oversizedPreviewBytes: 256
392
+ };
393
+
394
+ // src/internal/runtime/core/errorSummary.ts
32
395
  var import_effect = require("effect");
396
+
397
+ // src/internal/runtime/core/EffectOpCore.ts
398
+ var import_effect2 = require("effect");
399
+ var currentLinkId = import_effect2.ServiceMap.Reference("@logixjs/core/CurrentLinkId", {
400
+ defaultValue: () => void 0
401
+ });
402
+ var EffectOpMiddlewareTag = class extends import_effect2.ServiceMap.Service()("Logix/EffectOpMiddleware") {
403
+ };
404
+
405
+ // src/internal/runtime/core/DebugSink.record.ts
406
+ var currentDebugSinks = import_effect3.ServiceMap.Reference("@logixjs/core/Debug.currentDebugSinks", {
407
+ defaultValue: () => []
408
+ });
409
+ var currentRuntimeLabel = import_effect3.ServiceMap.Reference("@logixjs/core/Debug.currentRuntimeLabel", {
410
+ defaultValue: () => void 0
411
+ });
412
+ var currentTxnId = import_effect3.ServiceMap.Reference("@logixjs/core/Debug.currentTxnId", {
413
+ defaultValue: () => void 0
414
+ });
415
+ var currentOpSeq = import_effect3.ServiceMap.Reference("@logixjs/core/Debug.currentOpSeq", {
416
+ defaultValue: () => void 0
417
+ });
418
+ var currentDiagnosticsLevel = import_effect3.ServiceMap.Reference("@logixjs/core/Debug.currentDiagnosticsLevel", {
419
+ defaultValue: () => "off"
420
+ });
421
+ var currentDiagnosticsMaterialization = import_effect3.ServiceMap.Reference(
422
+ "@logixjs/core/Debug.currentDiagnosticsMaterialization",
423
+ {
424
+ defaultValue: () => "eager"
425
+ }
426
+ );
427
+ var currentTraceMode = import_effect3.ServiceMap.Reference("@logixjs/core/Debug.currentTraceMode", {
428
+ defaultValue: () => "on"
429
+ });
430
+ var currentTraitConvergeDiagnosticsSampling = import_effect3.ServiceMap.Reference(
431
+ "@logixjs/core/Debug.currentTraitConvergeDiagnosticsSampling",
432
+ {
433
+ defaultValue: () => ({
434
+ sampleEveryN: 32,
435
+ topK: 3
436
+ })
437
+ }
438
+ );
439
+ var browserLifecycleSeen = /* @__PURE__ */ new Set();
440
+ var browserDiagnosticSeen = /* @__PURE__ */ new Set();
441
+ var lifecycleErrorLog = (event) => {
442
+ const moduleId = event.moduleId ?? "unknown";
443
+ const causePretty = (() => {
444
+ try {
445
+ return import_effect3.Cause.pretty(event.cause);
446
+ } catch {
447
+ try {
448
+ return JSON.stringify(event.cause, null, 2);
449
+ } catch {
450
+ return String(event.cause);
451
+ }
452
+ }
453
+ })();
454
+ const message = `[Logix][module=${moduleId}] lifecycle:error
455
+ ${causePretty}`;
456
+ return import_effect3.Effect.logError(message).pipe(
457
+ import_effect3.Effect.annotateLogs({
458
+ "logix.moduleId": moduleId,
459
+ "logix.event": "lifecycle:error",
460
+ "logix.cause": causePretty
461
+ })
462
+ );
463
+ };
464
+ var diagnosticLog = (event) => {
465
+ const moduleId = event.moduleId ?? "unknown";
466
+ const header = `[Logix][module=${moduleId}] diagnostic(${event.severity})`;
467
+ const detail = `code=${event.code} message=${event.message}${event.actionTag ? ` action=${event.actionTag}` : ""}${event.hint ? `
468
+ hint: ${event.hint}` : ""}`;
469
+ const msg = `${header}
470
+ ${detail}`;
471
+ const base = event.severity === "warning" ? import_effect3.Effect.logWarning(msg) : event.severity === "info" ? import_effect3.Effect.logInfo(msg) : import_effect3.Effect.logError(msg);
472
+ const annotations = {
473
+ "logix.moduleId": moduleId,
474
+ "logix.event": `diagnostic(${event.severity})`,
475
+ "logix.diagnostic.code": event.code,
476
+ "logix.diagnostic.message": event.message
477
+ };
478
+ if (event.hint) {
479
+ annotations["logix.diagnostic.hint"] = event.hint;
480
+ }
481
+ if (event.actionTag) {
482
+ annotations["logix.diagnostic.actionTag"] = event.actionTag;
483
+ }
484
+ return base.pipe(import_effect3.Effect.annotateLogs(annotations));
485
+ };
486
+ var noopLayer = import_effect3.Layer.succeed(currentDebugSinks, []);
487
+ var errorOnlySink = {
488
+ record: (event) => event.type === "lifecycle:error" ? lifecycleErrorLog(event) : event.type === "diagnostic" && event.severity !== "info" ? diagnosticLog(event) : import_effect3.Effect.void
489
+ };
490
+ var errorOnlyLayer = import_effect3.Layer.succeed(currentDebugSinks, [errorOnlySink]);
491
+ var consoleSink = {
492
+ record: (event) => event.type === "lifecycle:error" ? lifecycleErrorLog(event) : event.type === "diagnostic" ? diagnosticLog(event) : import_effect3.Effect.logDebug({ debugEvent: event })
493
+ };
494
+ var consoleLayer = import_effect3.Layer.succeed(currentDebugSinks, [consoleSink]);
495
+ var isBrowser = typeof window !== "undefined" && typeof document !== "undefined";
496
+ var renderBrowserConsoleEvent = (event) => {
497
+ if (typeof event.type === "string" && event.type.startsWith("trace:")) {
498
+ const moduleId = event.moduleId ?? "unknown";
499
+ const type = event.type;
500
+ return import_effect3.Effect.sync(() => {
501
+ console.groupCollapsed(
502
+ "%c[Logix]%c trace %c" + moduleId + "%c " + String(type),
503
+ "color:#6b7280;font-weight:bold",
504
+ // tag
505
+ "color:#3b82f6",
506
+ // label
507
+ "color:#9ca3af",
508
+ // module id
509
+ "color:#6b7280"
510
+ // type
511
+ );
512
+ console.log(event);
513
+ console.groupEnd();
514
+ });
515
+ }
516
+ if (event.type === "lifecycle:error") {
517
+ const moduleId = event.moduleId ?? "unknown";
518
+ const causePretty = (() => {
519
+ try {
520
+ return import_effect3.Cause.pretty(event.cause);
521
+ } catch {
522
+ try {
523
+ return JSON.stringify(event.cause, null, 2);
524
+ } catch {
525
+ return String(event.cause);
526
+ }
527
+ }
528
+ })();
529
+ const key = `${moduleId}|${causePretty}`;
530
+ if (browserLifecycleSeen.has(key)) {
531
+ return import_effect3.Effect.void;
532
+ }
533
+ browserLifecycleSeen.add(key);
534
+ return import_effect3.Effect.sync(() => {
535
+ console.groupCollapsed(
536
+ "%c[Logix]%c lifecycle:error %c" + moduleId,
537
+ "color:#ef4444;font-weight:bold",
538
+ // tag
539
+ "color:#ef4444",
540
+ // label
541
+ "color:#9ca3af"
542
+ // module id
543
+ );
544
+ console.error(causePretty);
545
+ console.groupEnd();
546
+ });
547
+ }
548
+ if (event.type === "diagnostic") {
549
+ const moduleId = event.moduleId ?? "unknown";
550
+ const detail = `code=${event.code} message=${event.message}${event.actionTag ? ` action=${event.actionTag}` : ""}${event.hint ? `
551
+ hint: ${event.hint}` : ""}`;
552
+ const color = event.severity === "warning" ? "color:#d97706" : event.severity === "info" ? "color:#3b82f6" : "color:#ef4444";
553
+ const label = event.severity === "warning" ? "diagnostic(warning)" : event.severity === "info" ? "diagnostic(info)" : "diagnostic(error)";
554
+ const key = `${moduleId}|${event.code}|${event.message}`;
555
+ if (browserDiagnosticSeen.has(key)) {
556
+ return import_effect3.Effect.void;
557
+ }
558
+ browserDiagnosticSeen.add(key);
559
+ return import_effect3.Effect.sync(() => {
560
+ console.groupCollapsed(
561
+ "%c[Logix]%c " + label + "%c module=" + moduleId,
562
+ "color:#6b7280;font-weight:bold",
563
+ color,
564
+ "color:#9ca3af"
565
+ );
566
+ if (event.severity === "warning") {
567
+ console.warn(detail);
568
+ } else if (event.severity === "info") {
569
+ console.info(detail);
570
+ } else {
571
+ console.error(detail);
572
+ }
573
+ console.groupEnd();
574
+ });
575
+ }
576
+ return import_effect3.Effect.void;
577
+ };
578
+ var browserConsoleSink = {
579
+ record: (event) => {
580
+ if (!isBrowser) {
581
+ return event.type === "lifecycle:error" ? lifecycleErrorLog(event) : event.type === "diagnostic" ? diagnosticLog(event) : import_effect3.Effect.logDebug({ debugEvent: event });
582
+ }
583
+ return renderBrowserConsoleEvent(event);
584
+ }
585
+ };
586
+ var browserConsoleLayer = import_effect3.Layer.succeed(currentDebugSinks, [browserConsoleSink]);
587
+ var browserDiagnosticConsoleSink = {
588
+ record: (event) => {
589
+ if (!isBrowser) {
590
+ return event.type === "lifecycle:error" ? lifecycleErrorLog(event) : event.type === "diagnostic" && event.severity !== "info" ? diagnosticLog(event) : import_effect3.Effect.void;
591
+ }
592
+ return event.type === "lifecycle:error" || event.type === "diagnostic" && event.severity !== "info" ? renderBrowserConsoleEvent(event) : import_effect3.Effect.void;
593
+ }
594
+ };
595
+ var browserDiagnosticConsoleLayer = import_effect3.Layer.succeed(currentDebugSinks, [browserDiagnosticConsoleSink]);
596
+ var browserPrettyLoggerLayer = import_effect3.Layer.effect(
597
+ import_effect3.Logger.CurrentLoggers,
598
+ import_effect3.Effect.gen(function* () {
599
+ const current = yield* import_effect3.Effect.service(import_effect3.Logger.CurrentLoggers);
600
+ return new Set(
601
+ [...current].filter((logger) => logger !== import_effect3.Logger.defaultLogger).concat(import_effect3.Logger.consolePretty({ mode: "browser", colors: true }))
602
+ );
603
+ })
604
+ );
605
+
606
+ // src/internal/runtime/core/TaskRunner.ts
607
+ var import_effect6 = require("effect");
608
+
609
+ // src/internal/runtime/core/ModeRunner.ts
610
+ var import_effect5 = require("effect");
611
+
612
+ // src/internal/runtime/core/LatestFiberSlot.ts
613
+ var import_effect4 = require("effect");
614
+
615
+ // src/internal/runtime/core/TaskRunner.ts
616
+ var inSyncTransactionFiber = import_effect6.ServiceMap.Reference("@logixjs/core/TaskRunner.inSyncTransactionFiber", {
617
+ defaultValue: () => false
618
+ });
619
+ var forceSourceRefresh = import_effect6.ServiceMap.Reference("@logixjs/core/TaskRunner.forceSourceRefresh", {
620
+ defaultValue: () => false
621
+ });
622
+
623
+ // src/internal/runtime/core/DeclarativeLinkRuntime.ts
624
+ var import_effect8 = require("effect");
625
+ var makeDeclarativeLinkRuntime = () => {
626
+ const moduleAsSourceById = /* @__PURE__ */ new Map();
627
+ const moduleAsSourceIdsBySource = /* @__PURE__ */ new Map();
628
+ const declarativeById = /* @__PURE__ */ new Map();
629
+ const declarativeReadNodesBySource = /* @__PURE__ */ new Map();
630
+ const registerModuleAsSourceLink = (link) => {
631
+ const stored = {
632
+ ...link,
633
+ hasValue: false,
634
+ lastValue: void 0
635
+ };
636
+ moduleAsSourceById.set(link.id, stored);
637
+ const set = moduleAsSourceIdsBySource.get(link.sourceModuleInstanceKey) ?? /* @__PURE__ */ new Set();
638
+ set.add(link.id);
639
+ moduleAsSourceIdsBySource.set(link.sourceModuleInstanceKey, set);
640
+ return () => {
641
+ moduleAsSourceById.delete(link.id);
642
+ const current = moduleAsSourceIdsBySource.get(link.sourceModuleInstanceKey);
643
+ if (!current) return;
644
+ current.delete(link.id);
645
+ if (current.size === 0) {
646
+ moduleAsSourceIdsBySource.delete(link.sourceModuleInstanceKey);
647
+ }
648
+ };
649
+ };
650
+ const registerDeclarativeLink = (link) => {
651
+ const readNodeById = /* @__PURE__ */ new Map();
652
+ for (const n of link.readNodes) {
653
+ readNodeById.set(n.nodeId, n);
654
+ }
655
+ const dispatchNodeById = /* @__PURE__ */ new Map();
656
+ for (const n of link.dispatchNodes) {
657
+ dispatchNodeById.set(n.nodeId, n);
658
+ }
659
+ const incomingByDispatch = /* @__PURE__ */ new Map();
660
+ for (const e of link.ir.edges) {
661
+ const to = e.to;
662
+ const isDispatch = dispatchNodeById.has(to);
663
+ if (!isDispatch) continue;
664
+ incomingByDispatch.set(to, (incomingByDispatch.get(to) ?? 0) + 1);
665
+ const count = incomingByDispatch.get(to) ?? 0;
666
+ if (count > 1) {
667
+ throw new Error(
668
+ `[DeclarativeLinkRuntime] Invalid DeclarativeLinkIR: dispatch node has multiple incoming edges (linkId=${link.linkId}, nodeId=${to}).`
669
+ );
670
+ }
671
+ }
672
+ const dispatchTargetsByReadNode = /* @__PURE__ */ new Map();
673
+ for (const e of link.ir.edges) {
674
+ const from = e.from;
675
+ const to = e.to;
676
+ if (!readNodeById.has(from)) continue;
677
+ if (!dispatchNodeById.has(to)) continue;
678
+ const list = dispatchTargetsByReadNode.get(from) ?? [];
679
+ list.push(to);
680
+ dispatchTargetsByReadNode.set(from, list);
681
+ }
682
+ const stored = {
683
+ ...link,
684
+ readNodeById,
685
+ dispatchNodeById,
686
+ dispatchTargetsByReadNode,
687
+ readNodeState: /* @__PURE__ */ new Map()
688
+ };
689
+ declarativeById.set(link.linkId, stored);
690
+ for (const n of link.readNodes) {
691
+ const list = declarativeReadNodesBySource.get(n.moduleInstanceKey) ?? [];
692
+ list.push({ linkId: link.linkId, nodeId: n.nodeId });
693
+ declarativeReadNodesBySource.set(n.moduleInstanceKey, list);
694
+ }
695
+ return () => {
696
+ declarativeById.delete(link.linkId);
697
+ for (const n of link.readNodes) {
698
+ const list = declarativeReadNodesBySource.get(n.moduleInstanceKey);
699
+ if (!list) continue;
700
+ const next = list.filter((x) => !(x.linkId === link.linkId && x.nodeId === n.nodeId));
701
+ if (next.length === 0) {
702
+ declarativeReadNodesBySource.delete(n.moduleInstanceKey);
703
+ } else {
704
+ declarativeReadNodesBySource.set(n.moduleInstanceKey, next);
705
+ }
706
+ }
707
+ };
708
+ };
709
+ const applyForSources = (args) => import_effect8.Effect.gen(function* () {
710
+ let scheduled = false;
711
+ for (const sourceKey of args.changedModuleInstanceKeys) {
712
+ const ids = moduleAsSourceIdsBySource.get(sourceKey);
713
+ if (!ids || ids.size === 0) continue;
714
+ const commit = args.acceptedModules.get(sourceKey);
715
+ if (!commit) continue;
716
+ for (const id of ids) {
717
+ const link = moduleAsSourceById.get(id);
718
+ if (!link) continue;
719
+ let selected;
720
+ try {
721
+ selected = link.readQuery.select(commit.state);
722
+ } catch {
723
+ continue;
724
+ }
725
+ const nextValue = link.computeValue(selected);
726
+ if (link.hasValue && link.equalsValue(link.lastValue, nextValue)) {
727
+ continue;
728
+ }
729
+ link.hasValue = true;
730
+ link.lastValue = nextValue;
731
+ scheduled = true;
732
+ yield* link.applyValue(nextValue);
733
+ }
734
+ }
735
+ for (const sourceKey of args.changedModuleInstanceKeys) {
736
+ const refs = declarativeReadNodesBySource.get(sourceKey);
737
+ if (!refs || refs.length === 0) continue;
738
+ const commit = args.acceptedModules.get(sourceKey);
739
+ if (!commit) continue;
740
+ for (const ref of refs) {
741
+ const link = declarativeById.get(ref.linkId);
742
+ if (!link) continue;
743
+ const readNode = link.readNodeById.get(ref.nodeId);
744
+ if (!readNode) continue;
745
+ let value;
746
+ try {
747
+ value = readNode.readQuery.select(commit.state);
748
+ } catch {
749
+ continue;
750
+ }
751
+ const state = link.readNodeState.get(ref.nodeId) ?? { hasValue: false, lastValue: void 0 };
752
+ const changed = !state.hasValue || !Object.is(state.lastValue, value);
753
+ if (!changed) continue;
754
+ state.hasValue = true;
755
+ state.lastValue = value;
756
+ link.readNodeState.set(ref.nodeId, state);
757
+ const targets = link.dispatchTargetsByReadNode.get(ref.nodeId) ?? [];
758
+ for (const dispatchNodeId of targets) {
759
+ const node = link.dispatchNodeById.get(dispatchNodeId);
760
+ if (!node) continue;
761
+ scheduled = true;
762
+ yield* node.dispatch(value);
763
+ }
764
+ }
765
+ }
766
+ return { scheduled };
767
+ });
768
+ return {
769
+ registerModuleAsSourceLink,
770
+ registerDeclarativeLink,
771
+ applyForSources
772
+ };
773
+ };
774
+
775
+ // src/internal/runtime/core/env.ts
33
776
  var getNodeEnv = () => {
34
777
  try {
35
778
  const env = globalThis?.process?.env;
@@ -39,26 +782,49 @@ var getNodeEnv = () => {
39
782
  }
40
783
  };
41
784
  var isDevEnv = () => getNodeEnv() !== "production";
42
- var StateTransactionConfigTagImpl = class extends import_effect.Context.Tag("@logixjs/core/StateTransactionRuntimeConfig")() {
785
+ var StateTransactionConfigTagImpl = class extends import_effect9.ServiceMap.Service()("@logixjs/core/StateTransactionRuntimeConfig") {
786
+ };
787
+ var ReadQueryStrictGateConfigTagImpl = class extends import_effect9.ServiceMap.Service()("@logixjs/core/ReadQueryStrictGateRuntimeConfig") {
788
+ };
789
+ var ReplayModeConfigTagImpl = class extends import_effect9.ServiceMap.Service()("@logixjs/core/ReplayModeConfig") {
790
+ };
791
+ var StateTransactionOverridesTagImpl = class extends import_effect9.ServiceMap.Service()("@logixjs/core/StateTransactionOverrides") {
792
+ };
793
+ var SchedulingPolicySurfaceTagImpl = class extends import_effect9.ServiceMap.Service()("@logixjs/core/SchedulingPolicySurface") {
43
794
  };
44
- var ReadQueryStrictGateConfigTagImpl = class extends import_effect.Context.Tag("@logixjs/core/ReadQueryStrictGateRuntimeConfig")() {
795
+ var SchedulingPolicySurfaceOverridesTagImpl = class extends import_effect9.ServiceMap.Service()("@logixjs/core/SchedulingPolicySurfaceOverrides") {
45
796
  };
46
- var ReplayModeConfigTagImpl = class extends import_effect.Context.Tag("@logixjs/core/ReplayModeConfig")() {
797
+ var RuntimeStoreTag = class extends import_effect9.ServiceMap.Service()("@logixjs/core/RuntimeStore") {
47
798
  };
48
- var StateTransactionOverridesTagImpl = class extends import_effect.Context.Tag("@logixjs/core/StateTransactionOverrides")() {
799
+ var runtimeStoreLayer = import_effect9.Layer.effect(
800
+ RuntimeStoreTag,
801
+ import_effect9.Effect.acquireRelease(
802
+ import_effect9.Effect.sync(() => makeRuntimeStore()),
803
+ (store) => import_effect9.Effect.sync(() => store.dispose())
804
+ )
805
+ );
806
+ var HostSchedulerTag = class extends import_effect9.ServiceMap.Service()("@logixjs/core/HostScheduler") {
49
807
  };
50
- var ConcurrencyPolicyTagImpl = class extends import_effect.Context.Tag("@logixjs/core/ConcurrencyPolicy")() {
808
+ var hostSchedulerLayer = import_effect9.Layer.succeed(
809
+ HostSchedulerTag,
810
+ getGlobalHostScheduler()
811
+ );
812
+ var DeclarativeLinkRuntimeTag = class extends import_effect9.ServiceMap.Service()("@logixjs/core/DeclarativeLinkRuntime") {
51
813
  };
52
- var ConcurrencyPolicyOverridesTagImpl = class extends import_effect.Context.Tag("@logixjs/core/ConcurrencyPolicyOverrides")() {
814
+ var declarativeLinkRuntimeLayer = import_effect9.Layer.succeed(
815
+ DeclarativeLinkRuntimeTag,
816
+ makeDeclarativeLinkRuntime()
817
+ );
818
+ var TickSchedulerTag = class extends import_effect9.ServiceMap.Service()("@logixjs/core/TickScheduler") {
53
819
  };
54
820
 
55
821
  // src/Env.ts
56
822
  var isDevEnv2 = () => isDevEnv();
57
823
 
58
824
  // src/ScopeRegistry.ts
59
- var ScopeRegistryTag = class extends import_effect2.Context.Tag("@logixjs/core/ScopeRegistry")() {
825
+ var ScopeRegistryTag = class extends import_effect10.ServiceMap.Service()("@logixjs/core/ScopeRegistry") {
60
826
  };
61
- var ScopedRuntimeTag = class extends import_effect2.Context.Tag("@logixjs/core/ScopeRegistry/ScopedRuntime")() {
827
+ var ScopedRuntimeTag = class extends import_effect10.ServiceMap.Service()("@logixjs/core/ScopeRegistry/ScopedRuntime") {
62
828
  };
63
829
  var internal = {
64
830
  ScopeRegistryTag,
@@ -141,7 +907,7 @@ var makeRegistry = () => {
141
907
  };
142
908
  return { register, get, clearToken, clearScope, clearAll };
143
909
  };
144
- var layer = () => import_effect2.Layer.succeed(ScopeRegistryTag, makeRegistry());
910
+ var layer = () => import_effect10.Layer.succeed(ScopeRegistryTag, makeRegistry());
145
911
  // Annotate the CommonJS export names for ESM import in node:
146
912
  0 && (module.exports = {
147
913
  ScopeRegistryTag,