@craft-ts/core 0.7.0-beta.13

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 (682) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +58 -0
  3. package/src/index.d.ts +148 -0
  4. package/src/index.d.ts.map +1 -0
  5. package/src/index.js +150 -0
  6. package/src/index.js.map +1 -0
  7. package/src/lib/after-recomputation.d.ts +327 -0
  8. package/src/lib/after-recomputation.d.ts.map +1 -0
  9. package/src/lib/after-recomputation.js +25 -0
  10. package/src/lib/after-recomputation.js.map +1 -0
  11. package/src/lib/app-checked-di.d.ts +82 -0
  12. package/src/lib/app-checked-di.d.ts.map +1 -0
  13. package/src/lib/app-checked-di.js +1 -0
  14. package/src/lib/app-checked-di.js.map +1 -0
  15. package/src/lib/async-process.d.ts +411 -0
  16. package/src/lib/async-process.d.ts.map +1 -0
  17. package/src/lib/async-process.js +702 -0
  18. package/src/lib/async-process.js.map +1 -0
  19. package/src/lib/branded-component/branded-component.d.ts +129 -0
  20. package/src/lib/branded-component/branded-component.d.ts.map +1 -0
  21. package/src/lib/branded-component/branded-component.js +7 -0
  22. package/src/lib/branded-component/branded-component.js.map +1 -0
  23. package/src/lib/browser-boundaries.d.ts +165 -0
  24. package/src/lib/browser-boundaries.d.ts.map +1 -0
  25. package/src/lib/browser-boundaries.js +550 -0
  26. package/src/lib/browser-boundaries.js.map +1 -0
  27. package/src/lib/client-di-requirement.d.ts +28 -0
  28. package/src/lib/client-di-requirement.d.ts.map +1 -0
  29. package/src/lib/client-di-requirement.js +11 -0
  30. package/src/lib/client-di-requirement.js.map +1 -0
  31. package/src/lib/client-function-middleware.d.ts +130 -0
  32. package/src/lib/client-function-middleware.d.ts.map +1 -0
  33. package/src/lib/client-function-middleware.js +144 -0
  34. package/src/lib/client-function-middleware.js.map +1 -0
  35. package/src/lib/component-monitoring.d.ts +7 -0
  36. package/src/lib/component-monitoring.d.ts.map +1 -0
  37. package/src/lib/component-monitoring.js +28 -0
  38. package/src/lib/component-monitoring.js.map +1 -0
  39. package/src/lib/component-register.d.ts +12 -0
  40. package/src/lib/component-register.d.ts.map +1 -0
  41. package/src/lib/component-register.js +13 -0
  42. package/src/lib/component-register.js.map +1 -0
  43. package/src/lib/computed-source.d.ts +303 -0
  44. package/src/lib/computed-source.d.ts.map +1 -0
  45. package/src/lib/computed-source.js +319 -0
  46. package/src/lib/computed-source.js.map +1 -0
  47. package/src/lib/correlation-id-plugin.d.ts +3 -0
  48. package/src/lib/correlation-id-plugin.d.ts.map +1 -0
  49. package/src/lib/correlation-id-plugin.js +73 -0
  50. package/src/lib/correlation-id-plugin.js.map +1 -0
  51. package/src/lib/correlation-id.d.ts +30 -0
  52. package/src/lib/correlation-id.d.ts.map +1 -0
  53. package/src/lib/correlation-id.js +86 -0
  54. package/src/lib/correlation-id.js.map +1 -0
  55. package/src/lib/craft-a11y.d.ts +22 -0
  56. package/src/lib/craft-a11y.d.ts.map +1 -0
  57. package/src/lib/craft-a11y.js +32 -0
  58. package/src/lib/craft-a11y.js.map +1 -0
  59. package/src/lib/craft-activated-route.d.ts +21 -0
  60. package/src/lib/craft-activated-route.d.ts.map +1 -0
  61. package/src/lib/craft-activated-route.js +20 -0
  62. package/src/lib/craft-activated-route.js.map +1 -0
  63. package/src/lib/craft-app-config.d.ts +91 -0
  64. package/src/lib/craft-app-config.d.ts.map +1 -0
  65. package/src/lib/craft-app-config.js +64 -0
  66. package/src/lib/craft-app-config.js.map +1 -0
  67. package/src/lib/craft-codec.d.ts +16 -0
  68. package/src/lib/craft-codec.d.ts.map +1 -0
  69. package/src/lib/craft-codec.js +1 -0
  70. package/src/lib/craft-codec.js.map +1 -0
  71. package/src/lib/craft-computed.d.ts +31 -0
  72. package/src/lib/craft-computed.d.ts.map +1 -0
  73. package/src/lib/craft-computed.js +81 -0
  74. package/src/lib/craft-computed.js.map +1 -0
  75. package/src/lib/craft-control-flow.d.ts +14 -0
  76. package/src/lib/craft-control-flow.d.ts.map +1 -0
  77. package/src/lib/craft-control-flow.js +18 -0
  78. package/src/lib/craft-control-flow.js.map +1 -0
  79. package/src/lib/craft-effect.d.ts +13 -0
  80. package/src/lib/craft-effect.d.ts.map +1 -0
  81. package/src/lib/craft-effect.js +93 -0
  82. package/src/lib/craft-effect.js.map +1 -0
  83. package/src/lib/craft-exception.d.ts +40 -0
  84. package/src/lib/craft-exception.d.ts.map +1 -0
  85. package/src/lib/craft-exception.js +16 -0
  86. package/src/lib/craft-exception.js.map +1 -0
  87. package/src/lib/craft-gen.d.ts +123 -0
  88. package/src/lib/craft-gen.d.ts.map +1 -0
  89. package/src/lib/craft-gen.js +90 -0
  90. package/src/lib/craft-gen.js.map +1 -0
  91. package/src/lib/craft-generator-runtime.d.ts +110 -0
  92. package/src/lib/craft-generator-runtime.d.ts.map +1 -0
  93. package/src/lib/craft-generator-runtime.js +191 -0
  94. package/src/lib/craft-generator-runtime.js.map +1 -0
  95. package/src/lib/craft-guard-runtime.d.ts +70 -0
  96. package/src/lib/craft-guard-runtime.d.ts.map +1 -0
  97. package/src/lib/craft-guard-runtime.js +195 -0
  98. package/src/lib/craft-guard-runtime.js.map +1 -0
  99. package/src/lib/craft-handshake.d.ts +35 -0
  100. package/src/lib/craft-handshake.d.ts.map +1 -0
  101. package/src/lib/craft-handshake.js +34 -0
  102. package/src/lib/craft-handshake.js.map +1 -0
  103. package/src/lib/craft-http-client.d.ts +236 -0
  104. package/src/lib/craft-http-client.d.ts.map +1 -0
  105. package/src/lib/craft-http-client.js +437 -0
  106. package/src/lib/craft-http-client.js.map +1 -0
  107. package/src/lib/craft-http-trace.d.ts +12 -0
  108. package/src/lib/craft-http-trace.d.ts.map +1 -0
  109. package/src/lib/craft-http-trace.js +28 -0
  110. package/src/lib/craft-http-trace.js.map +1 -0
  111. package/src/lib/craft-lazy.d.ts +42 -0
  112. package/src/lib/craft-lazy.d.ts.map +1 -0
  113. package/src/lib/craft-lazy.js +83 -0
  114. package/src/lib/craft-lazy.js.map +1 -0
  115. package/src/lib/craft-load-retry.d.ts +76 -0
  116. package/src/lib/craft-load-retry.d.ts.map +1 -0
  117. package/src/lib/craft-load-retry.js +160 -0
  118. package/src/lib/craft-load-retry.js.map +1 -0
  119. package/src/lib/craft-machine-history.d.ts +145 -0
  120. package/src/lib/craft-machine-history.d.ts.map +1 -0
  121. package/src/lib/craft-machine-history.js +276 -0
  122. package/src/lib/craft-machine-history.js.map +1 -0
  123. package/src/lib/craft-match.d.ts +49 -0
  124. package/src/lib/craft-match.d.ts.map +1 -0
  125. package/src/lib/craft-match.js +58 -0
  126. package/src/lib/craft-match.js.map +1 -0
  127. package/src/lib/craft-method.d.ts +28 -0
  128. package/src/lib/craft-method.d.ts.map +1 -0
  129. package/src/lib/craft-method.js +45 -0
  130. package/src/lib/craft-method.js.map +1 -0
  131. package/src/lib/craft-node-directive.d.ts +32 -0
  132. package/src/lib/craft-node-directive.d.ts.map +1 -0
  133. package/src/lib/craft-node-directive.js +22 -0
  134. package/src/lib/craft-node-directive.js.map +1 -0
  135. package/src/lib/craft-pending.d.ts +115 -0
  136. package/src/lib/craft-pending.d.ts.map +1 -0
  137. package/src/lib/craft-pending.js +187 -0
  138. package/src/lib/craft-pending.js.map +1 -0
  139. package/src/lib/craft-pipe.d.ts +63 -0
  140. package/src/lib/craft-pipe.d.ts.map +1 -0
  141. package/src/lib/craft-pipe.js +57 -0
  142. package/src/lib/craft-pipe.js.map +1 -0
  143. package/src/lib/craft-platform.d.ts +50 -0
  144. package/src/lib/craft-platform.d.ts.map +1 -0
  145. package/src/lib/craft-platform.js +175 -0
  146. package/src/lib/craft-platform.js.map +1 -0
  147. package/src/lib/craft-primitive-gen.d.ts +137 -0
  148. package/src/lib/craft-primitive-gen.d.ts.map +1 -0
  149. package/src/lib/craft-primitive-gen.js +76 -0
  150. package/src/lib/craft-primitive-gen.js.map +1 -0
  151. package/src/lib/craft-primitive-registry.d.ts +113 -0
  152. package/src/lib/craft-primitive-registry.d.ts.map +1 -0
  153. package/src/lib/craft-primitive-registry.js +159 -0
  154. package/src/lib/craft-primitive-registry.js.map +1 -0
  155. package/src/lib/craft-program-operators.d.ts +101 -0
  156. package/src/lib/craft-program-operators.d.ts.map +1 -0
  157. package/src/lib/craft-program-operators.js +116 -0
  158. package/src/lib/craft-program-operators.js.map +1 -0
  159. package/src/lib/craft-program-runtime.d.ts +80 -0
  160. package/src/lib/craft-program-runtime.d.ts.map +1 -0
  161. package/src/lib/craft-program-runtime.js +166 -0
  162. package/src/lib/craft-program-runtime.js.map +1 -0
  163. package/src/lib/craft-register-for-runtime.d.ts +39 -0
  164. package/src/lib/craft-register-for-runtime.d.ts.map +1 -0
  165. package/src/lib/craft-register-for-runtime.js +96 -0
  166. package/src/lib/craft-register-for-runtime.js.map +1 -0
  167. package/src/lib/craft-register-for.d.ts +57 -0
  168. package/src/lib/craft-register-for.d.ts.map +1 -0
  169. package/src/lib/craft-register-for.js +200 -0
  170. package/src/lib/craft-register-for.js.map +1 -0
  171. package/src/lib/craft-render-identity.d.ts +19 -0
  172. package/src/lib/craft-render-identity.d.ts.map +1 -0
  173. package/src/lib/craft-render-identity.js +23 -0
  174. package/src/lib/craft-render-identity.js.map +1 -0
  175. package/src/lib/craft-replay.d.ts +5 -0
  176. package/src/lib/craft-replay.d.ts.map +1 -0
  177. package/src/lib/craft-replay.js +28 -0
  178. package/src/lib/craft-replay.js.map +1 -0
  179. package/src/lib/craft-resolve.d.ts +39 -0
  180. package/src/lib/craft-resolve.d.ts.map +1 -0
  181. package/src/lib/craft-resolve.js +9 -0
  182. package/src/lib/craft-resolve.js.map +1 -0
  183. package/src/lib/craft-resource.d.ts +11 -0
  184. package/src/lib/craft-resource.d.ts.map +1 -0
  185. package/src/lib/craft-resource.js +264 -0
  186. package/src/lib/craft-resource.js.map +1 -0
  187. package/src/lib/craft-route-exceptions.d.ts +785 -0
  188. package/src/lib/craft-route-exceptions.d.ts.map +1 -0
  189. package/src/lib/craft-route-exceptions.js +86 -0
  190. package/src/lib/craft-route-exceptions.js.map +1 -0
  191. package/src/lib/craft-route-load-error.d.ts +1145 -0
  192. package/src/lib/craft-route-load-error.d.ts.map +1 -0
  193. package/src/lib/craft-route-load-error.js +173 -0
  194. package/src/lib/craft-route-load-error.js.map +1 -0
  195. package/src/lib/craft-route-meta.d.ts +52 -0
  196. package/src/lib/craft-route-meta.d.ts.map +1 -0
  197. package/src/lib/craft-route-meta.js +16 -0
  198. package/src/lib/craft-route-meta.js.map +1 -0
  199. package/src/lib/craft-route-target.d.ts +27 -0
  200. package/src/lib/craft-route-target.d.ts.map +1 -0
  201. package/src/lib/craft-route-target.js +22 -0
  202. package/src/lib/craft-route-target.js.map +1 -0
  203. package/src/lib/craft-router-outlet.d.ts +105 -0
  204. package/src/lib/craft-router-outlet.d.ts.map +1 -0
  205. package/src/lib/craft-router-outlet.js +735 -0
  206. package/src/lib/craft-router-outlet.js.map +1 -0
  207. package/src/lib/craft-router-tokens.d.ts +49 -0
  208. package/src/lib/craft-router-tokens.d.ts.map +1 -0
  209. package/src/lib/craft-router-tokens.js +15 -0
  210. package/src/lib/craft-router-tokens.js.map +1 -0
  211. package/src/lib/craft-router-trace.d.ts +18 -0
  212. package/src/lib/craft-router-trace.d.ts.map +1 -0
  213. package/src/lib/craft-router-trace.js +54 -0
  214. package/src/lib/craft-router-trace.js.map +1 -0
  215. package/src/lib/craft-router.d.ts +248 -0
  216. package/src/lib/craft-router.d.ts.map +1 -0
  217. package/src/lib/craft-router.js +559 -0
  218. package/src/lib/craft-router.js.map +1 -0
  219. package/src/lib/craft-routes.d.ts +755 -0
  220. package/src/lib/craft-routes.d.ts.map +1 -0
  221. package/src/lib/craft-routes.js +510 -0
  222. package/src/lib/craft-routes.js.map +1 -0
  223. package/src/lib/craft-service.d.ts +1034 -0
  224. package/src/lib/craft-service.d.ts.map +1 -0
  225. package/src/lib/craft-service.js +1072 -0
  226. package/src/lib/craft-service.js.map +1 -0
  227. package/src/lib/craft-service.shared.d.ts +35 -0
  228. package/src/lib/craft-service.shared.d.ts.map +1 -0
  229. package/src/lib/craft-service.shared.js +4 -0
  230. package/src/lib/craft-service.shared.js.map +1 -0
  231. package/src/lib/craft-settled.d.ts +171 -0
  232. package/src/lib/craft-settled.d.ts.map +1 -0
  233. package/src/lib/craft-settled.js +130 -0
  234. package/src/lib/craft-settled.js.map +1 -0
  235. package/src/lib/craft-ssr.d.ts +29 -0
  236. package/src/lib/craft-ssr.d.ts.map +1 -0
  237. package/src/lib/craft-ssr.js +27 -0
  238. package/src/lib/craft-ssr.js.map +1 -0
  239. package/src/lib/craft-state-machine-runtime.d.ts +88 -0
  240. package/src/lib/craft-state-machine-runtime.d.ts.map +1 -0
  241. package/src/lib/craft-state-machine-runtime.js +167 -0
  242. package/src/lib/craft-state-machine-runtime.js.map +1 -0
  243. package/src/lib/craft-state-machine.d.ts +233 -0
  244. package/src/lib/craft-state-machine.d.ts.map +1 -0
  245. package/src/lib/craft-state-machine.js +254 -0
  246. package/src/lib/craft-state-machine.js.map +1 -0
  247. package/src/lib/craft-target-runtime.d.ts +20 -0
  248. package/src/lib/craft-target-runtime.d.ts.map +1 -0
  249. package/src/lib/craft-target-runtime.js +42 -0
  250. package/src/lib/craft-target-runtime.js.map +1 -0
  251. package/src/lib/craft-transfer-snapshot.d.ts +19 -0
  252. package/src/lib/craft-transfer-snapshot.d.ts.map +1 -0
  253. package/src/lib/craft-transfer-snapshot.js +90 -0
  254. package/src/lib/craft-transfer-snapshot.js.map +1 -0
  255. package/src/lib/craft-unique.d.ts +7 -0
  256. package/src/lib/craft-unique.d.ts.map +1 -0
  257. package/src/lib/craft-unique.js +16 -0
  258. package/src/lib/craft-unique.js.map +1 -0
  259. package/src/lib/craft-until-settled.d.ts +99 -0
  260. package/src/lib/craft-until-settled.d.ts.map +1 -0
  261. package/src/lib/craft-until-settled.js +81 -0
  262. package/src/lib/craft-until-settled.js.map +1 -0
  263. package/src/lib/craft-use.d.ts +26 -0
  264. package/src/lib/craft-use.d.ts.map +1 -0
  265. package/src/lib/craft-use.js +37 -0
  266. package/src/lib/craft-use.js.map +1 -0
  267. package/src/lib/craft-view-transition.d.ts +102 -0
  268. package/src/lib/craft-view-transition.d.ts.map +1 -0
  269. package/src/lib/craft-view-transition.js +130 -0
  270. package/src/lib/craft-view-transition.js.map +1 -0
  271. package/src/lib/dom-event-hook.d.ts +30 -0
  272. package/src/lib/dom-event-hook.d.ts.map +1 -0
  273. package/src/lib/dom-event-hook.js +16 -0
  274. package/src/lib/dom-event-hook.js.map +1 -0
  275. package/src/lib/fn-wrapper.d.ts +13 -0
  276. package/src/lib/fn-wrapper.d.ts.map +1 -0
  277. package/src/lib/fn-wrapper.js +66 -0
  278. package/src/lib/fn-wrapper.js.map +1 -0
  279. package/src/lib/form/craft-field.d.ts +155 -0
  280. package/src/lib/form/craft-field.d.ts.map +1 -0
  281. package/src/lib/form/craft-field.directive.d.ts +70 -0
  282. package/src/lib/form/craft-field.directive.d.ts.map +1 -0
  283. package/src/lib/form/craft-field.directive.js +549 -0
  284. package/src/lib/form/craft-field.directive.js.map +1 -0
  285. package/src/lib/form/craft-field.js +586 -0
  286. package/src/lib/form/craft-field.js.map +1 -0
  287. package/src/lib/form/field-exception.d.ts +62 -0
  288. package/src/lib/form/field-exception.d.ts.map +1 -0
  289. package/src/lib/form/field-exception.js +37 -0
  290. package/src/lib/form/field-exception.js.map +1 -0
  291. package/src/lib/form/field-lens.d.ts +29 -0
  292. package/src/lib/form/field-lens.d.ts.map +1 -0
  293. package/src/lib/form/field-lens.js +32 -0
  294. package/src/lib/form/field-lens.js.map +1 -0
  295. package/src/lib/form/insert-form-attributes.d.ts +69 -0
  296. package/src/lib/form/insert-form-attributes.d.ts.map +1 -0
  297. package/src/lib/form/insert-form-attributes.js +163 -0
  298. package/src/lib/form/insert-form-attributes.js.map +1 -0
  299. package/src/lib/form/insert-form-internals.d.ts +110 -0
  300. package/src/lib/form/insert-form-internals.d.ts.map +1 -0
  301. package/src/lib/form/insert-form-internals.js +276 -0
  302. package/src/lib/form/insert-form-internals.js.map +1 -0
  303. package/src/lib/form/insert-form-schema.d.ts +10 -0
  304. package/src/lib/form/insert-form-schema.d.ts.map +1 -0
  305. package/src/lib/form/insert-form-schema.js +62 -0
  306. package/src/lib/form/insert-form-schema.js.map +1 -0
  307. package/src/lib/form/insert-form-submit.d.ts +79 -0
  308. package/src/lib/form/insert-form-submit.d.ts.map +1 -0
  309. package/src/lib/form/insert-form-submit.js +126 -0
  310. package/src/lib/form/insert-form-submit.js.map +1 -0
  311. package/src/lib/form/insert-form.d.ts +39 -0
  312. package/src/lib/form/insert-form.d.ts.map +1 -0
  313. package/src/lib/form/insert-form.js +255 -0
  314. package/src/lib/form/insert-form.js.map +1 -0
  315. package/src/lib/form/insert-select-form-tree.d.ts +33 -0
  316. package/src/lib/form/insert-select-form-tree.d.ts.map +1 -0
  317. package/src/lib/form/insert-select-form-tree.js +144 -0
  318. package/src/lib/form/insert-select-form-tree.js.map +1 -0
  319. package/src/lib/form/insert-sub-form-field.d.ts +17 -0
  320. package/src/lib/form/insert-sub-form-field.d.ts.map +1 -0
  321. package/src/lib/form/insert-sub-form-field.js +41 -0
  322. package/src/lib/form/insert-sub-form-field.js.map +1 -0
  323. package/src/lib/form/make-form-tree-insert.d.ts +22 -0
  324. package/src/lib/form/make-form-tree-insert.d.ts.map +1 -0
  325. package/src/lib/form/make-form-tree-insert.js +43 -0
  326. package/src/lib/form/make-form-tree-insert.js.map +1 -0
  327. package/src/lib/form/target-form-field.d.ts +11 -0
  328. package/src/lib/form/target-form-field.d.ts.map +1 -0
  329. package/src/lib/form/target-form-field.js +1 -0
  330. package/src/lib/form/target-form-field.js.map +1 -0
  331. package/src/lib/form/validator.d.ts +174 -0
  332. package/src/lib/form/validator.d.ts.map +1 -0
  333. package/src/lib/form/validator.js +465 -0
  334. package/src/lib/form/validator.js.map +1 -0
  335. package/src/lib/from-event-to-source$.d.ts +210 -0
  336. package/src/lib/from-event-to-source$.d.ts.map +1 -0
  337. package/src/lib/from-event-to-source$.js +29 -0
  338. package/src/lib/from-event-to-source$.js.map +1 -0
  339. package/src/lib/global-persister-handler.service.d.ts +10 -0
  340. package/src/lib/global-persister-handler.service.d.ts.map +1 -0
  341. package/src/lib/global-persister-handler.service.js +40 -0
  342. package/src/lib/global-persister-handler.service.js.map +1 -0
  343. package/src/lib/host/craft-compat.d.ts +242 -0
  344. package/src/lib/host/craft-compat.d.ts.map +1 -0
  345. package/src/lib/host/craft-compat.js +444 -0
  346. package/src/lib/host/craft-compat.js.map +1 -0
  347. package/src/lib/host/craft-dom.d.ts +16 -0
  348. package/src/lib/host/craft-dom.d.ts.map +1 -0
  349. package/src/lib/host/craft-dom.js +24 -0
  350. package/src/lib/host/craft-dom.js.map +1 -0
  351. package/src/lib/host/craft-http.d.ts +22 -0
  352. package/src/lib/host/craft-http.d.ts.map +1 -0
  353. package/src/lib/host/craft-http.js +80 -0
  354. package/src/lib/host/craft-http.js.map +1 -0
  355. package/src/lib/host/craft-injector-host.d.ts +3 -0
  356. package/src/lib/host/craft-injector-host.d.ts.map +1 -0
  357. package/src/lib/host/craft-injector-host.js +2 -0
  358. package/src/lib/host/craft-injector-host.js.map +1 -0
  359. package/src/lib/host/craft-injector.d.ts +40 -0
  360. package/src/lib/host/craft-injector.d.ts.map +1 -0
  361. package/src/lib/host/craft-injector.js +318 -0
  362. package/src/lib/host/craft-injector.js.map +1 -0
  363. package/src/lib/host/craft-linked-signal.d.ts +17 -0
  364. package/src/lib/host/craft-linked-signal.d.ts.map +1 -0
  365. package/src/lib/host/craft-linked-signal.js +86 -0
  366. package/src/lib/host/craft-linked-signal.js.map +1 -0
  367. package/src/lib/host/craft-router-runtime.d.ts +61 -0
  368. package/src/lib/host/craft-router-runtime.d.ts.map +1 -0
  369. package/src/lib/host/craft-router-runtime.js +456 -0
  370. package/src/lib/host/craft-router-runtime.js.map +1 -0
  371. package/src/lib/host/craft-router-types.d.ts +84 -0
  372. package/src/lib/host/craft-router-types.d.ts.map +1 -0
  373. package/src/lib/host/craft-router-types.js +35 -0
  374. package/src/lib/host/craft-router-types.js.map +1 -0
  375. package/src/lib/host/craft-signal.d.ts +45 -0
  376. package/src/lib/host/craft-signal.d.ts.map +1 -0
  377. package/src/lib/host/craft-signal.js +161 -0
  378. package/src/lib/host/craft-signal.js.map +1 -0
  379. package/src/lib/host/craft-test-bed.d.ts +63 -0
  380. package/src/lib/host/craft-test-bed.d.ts.map +1 -0
  381. package/src/lib/host/craft-test-bed.js +114 -0
  382. package/src/lib/host/craft-test-bed.js.map +1 -0
  383. package/src/lib/host-tag.d.ts +2 -0
  384. package/src/lib/host-tag.d.ts.map +1 -0
  385. package/src/lib/host-tag.js +2 -0
  386. package/src/lib/host-tag.js.map +1 -0
  387. package/src/lib/insert-entities.d.ts +131 -0
  388. package/src/lib/insert-entities.d.ts.map +1 -0
  389. package/src/lib/insert-entities.js +159 -0
  390. package/src/lib/insert-entities.js.map +1 -0
  391. package/src/lib/insert-noop-typing-anchor.d.ts +15 -0
  392. package/src/lib/insert-noop-typing-anchor.d.ts.map +1 -0
  393. package/src/lib/insert-noop-typing-anchor.js +16 -0
  394. package/src/lib/insert-noop-typing-anchor.js.map +1 -0
  395. package/src/lib/insert-pagination-placeholder-data.d.ts +122 -0
  396. package/src/lib/insert-pagination-placeholder-data.d.ts.map +1 -0
  397. package/src/lib/insert-pagination-placeholder-data.js +244 -0
  398. package/src/lib/insert-pagination-placeholder-data.js.map +1 -0
  399. package/src/lib/insert-react-on-mutation.d.ts +261 -0
  400. package/src/lib/insert-react-on-mutation.d.ts.map +1 -0
  401. package/src/lib/insert-react-on-mutation.js +227 -0
  402. package/src/lib/insert-react-on-mutation.js.map +1 -0
  403. package/src/lib/insert-select-resource.d.ts +31 -0
  404. package/src/lib/insert-select-resource.d.ts.map +1 -0
  405. package/src/lib/insert-select-resource.js +27 -0
  406. package/src/lib/insert-select-resource.js.map +1 -0
  407. package/src/lib/insert-select.d.ts +126 -0
  408. package/src/lib/insert-select.d.ts.map +1 -0
  409. package/src/lib/insert-select.js +535 -0
  410. package/src/lib/insert-select.js.map +1 -0
  411. package/src/lib/insert-storage-persister.d.ts +27 -0
  412. package/src/lib/insert-storage-persister.d.ts.map +1 -0
  413. package/src/lib/insert-storage-persister.js +65 -0
  414. package/src/lib/insert-storage-persister.js.map +1 -0
  415. package/src/lib/insert-typed-pipes.d.ts +64 -0
  416. package/src/lib/insert-typed-pipes.d.ts.map +1 -0
  417. package/src/lib/insert-typed-pipes.js +32 -0
  418. package/src/lib/insert-typed-pipes.js.map +1 -0
  419. package/src/lib/linked-source.d.ts +8 -0
  420. package/src/lib/linked-source.d.ts.map +1 -0
  421. package/src/lib/linked-source.js +24 -0
  422. package/src/lib/linked-source.js.map +1 -0
  423. package/src/lib/local-storage-persister.d.ts +4 -0
  424. package/src/lib/local-storage-persister.d.ts.map +1 -0
  425. package/src/lib/local-storage-persister.js +342 -0
  426. package/src/lib/local-storage-persister.js.map +1 -0
  427. package/src/lib/middleware-schema-shared.d.ts +67 -0
  428. package/src/lib/middleware-schema-shared.d.ts.map +1 -0
  429. package/src/lib/middleware-schema-shared.js +34 -0
  430. package/src/lib/middleware-schema-shared.js.map +1 -0
  431. package/src/lib/mock-http-request-for-route.d.ts +173 -0
  432. package/src/lib/mock-http-request-for-route.d.ts.map +1 -0
  433. package/src/lib/mock-http-request-for-route.js +127 -0
  434. package/src/lib/mock-http-request-for-route.js.map +1 -0
  435. package/src/lib/mutation.d.ts +332 -0
  436. package/src/lib/mutation.d.ts.map +1 -0
  437. package/src/lib/mutation.js +923 -0
  438. package/src/lib/mutation.js.map +1 -0
  439. package/src/lib/on$.d.ts +26 -0
  440. package/src/lib/on$.d.ts.map +1 -0
  441. package/src/lib/on$.js +19 -0
  442. package/src/lib/on$.js.map +1 -0
  443. package/src/lib/portable-server-function.d.ts +68 -0
  444. package/src/lib/portable-server-function.d.ts.map +1 -0
  445. package/src/lib/portable-server-function.js +97 -0
  446. package/src/lib/portable-server-function.js.map +1 -0
  447. package/src/lib/preserved-resource.d.ts +4 -0
  448. package/src/lib/preserved-resource.d.ts.map +1 -0
  449. package/src/lib/preserved-resource.js +60 -0
  450. package/src/lib/preserved-resource.js.map +1 -0
  451. package/src/lib/primitive-method-runtime-context.d.ts +28 -0
  452. package/src/lib/primitive-method-runtime-context.d.ts.map +1 -0
  453. package/src/lib/primitive-method-runtime-context.js +38 -0
  454. package/src/lib/primitive-method-runtime-context.js.map +1 -0
  455. package/src/lib/primitive-resource-runtime-context.d.ts +46 -0
  456. package/src/lib/primitive-resource-runtime-context.d.ts.map +1 -0
  457. package/src/lib/primitive-resource-runtime-context.js +102 -0
  458. package/src/lib/primitive-resource-runtime-context.js.map +1 -0
  459. package/src/lib/query-params.d.ts +216 -0
  460. package/src/lib/query-params.d.ts.map +1 -0
  461. package/src/lib/query-params.js +324 -0
  462. package/src/lib/query-params.js.map +1 -0
  463. package/src/lib/query.core.d.ts +214 -0
  464. package/src/lib/query.core.d.ts.map +1 -0
  465. package/src/lib/query.core.js +210 -0
  466. package/src/lib/query.core.js.map +1 -0
  467. package/src/lib/query.d.ts +324 -0
  468. package/src/lib/query.d.ts.map +1 -0
  469. package/src/lib/query.js +971 -0
  470. package/src/lib/query.js.map +1 -0
  471. package/src/lib/reactive-read.d.ts +162 -0
  472. package/src/lib/reactive-read.d.ts.map +1 -0
  473. package/src/lib/reactive-read.js +389 -0
  474. package/src/lib/reactive-read.js.map +1 -0
  475. package/src/lib/resource-by-id.d.ts +71 -0
  476. package/src/lib/resource-by-id.d.ts.map +1 -0
  477. package/src/lib/resource-by-id.js +294 -0
  478. package/src/lib/resource-by-id.js.map +1 -0
  479. package/src/lib/resource-exception.d.ts +30 -0
  480. package/src/lib/resource-exception.d.ts.map +1 -0
  481. package/src/lib/resource-exception.js +86 -0
  482. package/src/lib/resource-exception.js.map +1 -0
  483. package/src/lib/route-checked-di.d.ts +229 -0
  484. package/src/lib/route-checked-di.d.ts.map +1 -0
  485. package/src/lib/route-checked-di.js +1 -0
  486. package/src/lib/route-checked-di.js.map +1 -0
  487. package/src/lib/schema-validation.d.ts +89 -0
  488. package/src/lib/schema-validation.d.ts.map +1 -0
  489. package/src/lib/schema-validation.js +110 -0
  490. package/src/lib/schema-validation.js.map +1 -0
  491. package/src/lib/send-context-to-ai.d.ts +20 -0
  492. package/src/lib/send-context-to-ai.d.ts.map +1 -0
  493. package/src/lib/send-context-to-ai.js +18 -0
  494. package/src/lib/send-context-to-ai.js.map +1 -0
  495. package/src/lib/send-context-to-ai.tokens.d.ts +12 -0
  496. package/src/lib/send-context-to-ai.tokens.d.ts.map +1 -0
  497. package/src/lib/send-context-to-ai.tokens.js +1 -0
  498. package/src/lib/send-context-to-ai.tokens.js.map +1 -0
  499. package/src/lib/server-function-client.d.ts +102 -0
  500. package/src/lib/server-function-client.d.ts.map +1 -0
  501. package/src/lib/server-function-client.js +106 -0
  502. package/src/lib/server-function-client.js.map +1 -0
  503. package/src/lib/server-function-contract.d.ts +42 -0
  504. package/src/lib/server-function-contract.d.ts.map +1 -0
  505. package/src/lib/server-function-contract.js +23 -0
  506. package/src/lib/server-function-contract.js.map +1 -0
  507. package/src/lib/server-function-middleware.d.ts +222 -0
  508. package/src/lib/server-function-middleware.d.ts.map +1 -0
  509. package/src/lib/server-function-middleware.js +189 -0
  510. package/src/lib/server-function-middleware.js.map +1 -0
  511. package/src/lib/server-function.d.ts +114 -0
  512. package/src/lib/server-function.d.ts.map +1 -0
  513. package/src/lib/server-function.js +80 -0
  514. package/src/lib/server-function.js.map +1 -0
  515. package/src/lib/server-layer.d.ts +185 -0
  516. package/src/lib/server-layer.d.ts.map +1 -0
  517. package/src/lib/server-layer.js +121 -0
  518. package/src/lib/server-layer.js.map +1 -0
  519. package/src/lib/server.d.ts +83 -0
  520. package/src/lib/server.d.ts.map +1 -0
  521. package/src/lib/server.js +266 -0
  522. package/src/lib/server.js.map +1 -0
  523. package/src/lib/setup-craft-service-test.d.ts +90 -0
  524. package/src/lib/setup-craft-service-test.d.ts.map +1 -0
  525. package/src/lib/setup-craft-service-test.js +193 -0
  526. package/src/lib/setup-craft-service-test.js.map +1 -0
  527. package/src/lib/setup-craft-service-testing-by-register.d.ts +245 -0
  528. package/src/lib/setup-craft-service-testing-by-register.d.ts.map +1 -0
  529. package/src/lib/setup-craft-service-testing-by-register.js +316 -0
  530. package/src/lib/setup-craft-service-testing-by-register.js.map +1 -0
  531. package/src/lib/signal-proxy.d.ts +21 -0
  532. package/src/lib/signal-proxy.d.ts.map +1 -0
  533. package/src/lib/signal-proxy.js +79 -0
  534. package/src/lib/signal-proxy.js.map +1 -0
  535. package/src/lib/signal-source.d.ts +392 -0
  536. package/src/lib/signal-source.d.ts.map +1 -0
  537. package/src/lib/signal-source.js +433 -0
  538. package/src/lib/signal-source.js.map +1 -0
  539. package/src/lib/source$.d.ts +121 -0
  540. package/src/lib/source$.d.ts.map +1 -0
  541. package/src/lib/source$.js +171 -0
  542. package/src/lib/source$.js.map +1 -0
  543. package/src/lib/source-from-event.d.ts +350 -0
  544. package/src/lib/source-from-event.d.ts.map +1 -0
  545. package/src/lib/source-from-event.js +26 -0
  546. package/src/lib/source-from-event.js.map +1 -0
  547. package/src/lib/stacked-source.d.ts +6 -0
  548. package/src/lib/stacked-source.d.ts.map +1 -0
  549. package/src/lib/stacked-source.js +29 -0
  550. package/src/lib/stacked-source.js.map +1 -0
  551. package/src/lib/standard-schema.d.ts +43 -0
  552. package/src/lib/standard-schema.d.ts.map +1 -0
  553. package/src/lib/standard-schema.js +1 -0
  554. package/src/lib/standard-schema.js.map +1 -0
  555. package/src/lib/state-method-runtime-context.d.ts +13 -0
  556. package/src/lib/state-method-runtime-context.d.ts.map +1 -0
  557. package/src/lib/state-method-runtime-context.js +11 -0
  558. package/src/lib/state-method-runtime-context.js.map +1 -0
  559. package/src/lib/state.d.ts +158 -0
  560. package/src/lib/state.d.ts.map +1 -0
  561. package/src/lib/state.js +388 -0
  562. package/src/lib/state.js.map +1 -0
  563. package/src/lib/storage-persister.service.d.ts +25 -0
  564. package/src/lib/storage-persister.service.d.ts.map +1 -0
  565. package/src/lib/storage-persister.service.js +27 -0
  566. package/src/lib/storage-persister.service.js.map +1 -0
  567. package/src/lib/take-app-snapshot.d.ts +31 -0
  568. package/src/lib/take-app-snapshot.d.ts.map +1 -0
  569. package/src/lib/take-app-snapshot.js +93 -0
  570. package/src/lib/take-app-snapshot.js.map +1 -0
  571. package/src/lib/template-trace.d.ts +37 -0
  572. package/src/lib/template-trace.d.ts.map +1 -0
  573. package/src/lib/template-trace.js +37 -0
  574. package/src/lib/template-trace.js.map +1 -0
  575. package/src/lib/temporal-runtime.d.ts +146 -0
  576. package/src/lib/temporal-runtime.d.ts.map +1 -0
  577. package/src/lib/temporal-runtime.js +375 -0
  578. package/src/lib/temporal-runtime.js.map +1 -0
  579. package/src/lib/to-source.d.ts +335 -0
  580. package/src/lib/to-source.d.ts.map +1 -0
  581. package/src/lib/to-source.js +359 -0
  582. package/src/lib/to-source.js.map +1 -0
  583. package/src/lib/util/craft-resource-ref.d.ts +29 -0
  584. package/src/lib/util/craft-resource-ref.d.ts.map +1 -0
  585. package/src/lib/util/craft-resource-ref.js +1 -0
  586. package/src/lib/util/craft-resource-ref.js.map +1 -0
  587. package/src/lib/util/craft-resource-status.d.ts +17 -0
  588. package/src/lib/util/craft-resource-status.d.ts.map +1 -0
  589. package/src/lib/util/craft-resource-status.js +14 -0
  590. package/src/lib/util/craft-resource-status.js.map +1 -0
  591. package/src/lib/util/entities-util.d.ts +340 -0
  592. package/src/lib/util/entities-util.d.ts.map +1 -0
  593. package/src/lib/util/entities-util.js +136 -0
  594. package/src/lib/util/entities-util.js.map +1 -0
  595. package/src/lib/util/explicit-effect.d.ts +42 -0
  596. package/src/lib/util/explicit-effect.d.ts.map +1 -0
  597. package/src/lib/util/explicit-effect.js +37 -0
  598. package/src/lib/util/explicit-effect.js.map +1 -0
  599. package/src/lib/util/extract-signal-props-and-methods.d.ts +20 -0
  600. package/src/lib/util/extract-signal-props-and-methods.d.ts.map +1 -0
  601. package/src/lib/util/extract-signal-props-and-methods.js +1 -0
  602. package/src/lib/util/extract-signal-props-and-methods.js.map +1 -0
  603. package/src/lib/util/method-trigger-nonce.d.ts +45 -0
  604. package/src/lib/util/method-trigger-nonce.d.ts.map +1 -0
  605. package/src/lib/util/method-trigger-nonce.js +58 -0
  606. package/src/lib/util/method-trigger-nonce.js.map +1 -0
  607. package/src/lib/util/persister.type.d.ts +37 -0
  608. package/src/lib/util/persister.type.d.ts.map +1 -0
  609. package/src/lib/util/persister.type.js +1 -0
  610. package/src/lib/util/persister.type.js.map +1 -0
  611. package/src/lib/util/persister.util.d.ts +8 -0
  612. package/src/lib/util/persister.util.d.ts.map +1 -0
  613. package/src/lib/util/persister.util.js +71 -0
  614. package/src/lib/util/persister.util.js.map +1 -0
  615. package/src/lib/util/react-on-mutation-effect.d.ts +16 -0
  616. package/src/lib/util/react-on-mutation-effect.d.ts.map +1 -0
  617. package/src/lib/util/react-on-mutation-effect.js +148 -0
  618. package/src/lib/util/react-on-mutation-effect.js.map +1 -0
  619. package/src/lib/util/resource-by-id-changes-tracker.util.d.ts +27 -0
  620. package/src/lib/util/resource-by-id-changes-tracker.util.d.ts.map +1 -0
  621. package/src/lib/util/resource-by-id-changes-tracker.util.js +97 -0
  622. package/src/lib/util/resource-by-id-changes-tracker.util.js.map +1 -0
  623. package/src/lib/util/source.type.d.ts +6 -0
  624. package/src/lib/util/source.type.d.ts.map +1 -0
  625. package/src/lib/util/source.type.js +1 -0
  626. package/src/lib/util/source.type.js.map +1 -0
  627. package/src/lib/util/types/access-type-object-property-by-dotted-path.type.d.ts +4 -0
  628. package/src/lib/util/types/access-type-object-property-by-dotted-path.type.d.ts.map +1 -0
  629. package/src/lib/util/types/access-type-object-property-by-dotted-path.type.js +1 -0
  630. package/src/lib/util/types/access-type-object-property-by-dotted-path.type.js.map +1 -0
  631. package/src/lib/util/types/boolean-or-mapper-fn-by-path-by-id.type.d.ts +27 -0
  632. package/src/lib/util/types/boolean-or-mapper-fn-by-path-by-id.type.d.ts.map +1 -0
  633. package/src/lib/util/types/boolean-or-mapper-fn-by-path-by-id.type.js +1 -0
  634. package/src/lib/util/types/boolean-or-mapper-fn-by-path-by-id.type.js.map +1 -0
  635. package/src/lib/util/types/boolean-or-mapper-fn-by-path.type.d.ts +24 -0
  636. package/src/lib/util/types/boolean-or-mapper-fn-by-path.type.d.ts.map +1 -0
  637. package/src/lib/util/types/boolean-or-mapper-fn-by-path.type.js +1 -0
  638. package/src/lib/util/types/boolean-or-mapper-fn-by-path.type.js.map +1 -0
  639. package/src/lib/util/types/brand.d.ts +7 -0
  640. package/src/lib/util/types/brand.d.ts.map +1 -0
  641. package/src/lib/util/types/brand.js +9 -0
  642. package/src/lib/util/types/brand.js.map +1 -0
  643. package/src/lib/util/types/object-deep-path-mapper.type.d.ts +13 -0
  644. package/src/lib/util/types/object-deep-path-mapper.type.d.ts.map +1 -0
  645. package/src/lib/util/types/object-deep-path-mapper.type.js +1 -0
  646. package/src/lib/util/types/object-deep-path-mapper.type.js.map +1 -0
  647. package/src/lib/util/types/resource-by-id-config.type.d.ts +115 -0
  648. package/src/lib/util/types/resource-by-id-config.type.d.ts.map +1 -0
  649. package/src/lib/util/types/resource-by-id-config.type.js +1 -0
  650. package/src/lib/util/types/resource-by-id-config.type.js.map +1 -0
  651. package/src/lib/util/types/resource-with-params-or-params-fn.type.d.ts +52 -0
  652. package/src/lib/util/types/resource-with-params-or-params-fn.type.d.ts.map +1 -0
  653. package/src/lib/util/types/resource-with-params-or-params-fn.type.js +1 -0
  654. package/src/lib/util/types/resource-with-params-or-params-fn.type.js.map +1 -0
  655. package/src/lib/util/types/shared.type.d.ts +66 -0
  656. package/src/lib/util/types/shared.type.d.ts.map +1 -0
  657. package/src/lib/util/types/shared.type.js +1 -0
  658. package/src/lib/util/types/shared.type.js.map +1 -0
  659. package/src/lib/util/types/util.d.ts +16 -0
  660. package/src/lib/util/types/util.d.ts.map +1 -0
  661. package/src/lib/util/types/util.js +60 -0
  662. package/src/lib/util/types/util.js.map +1 -0
  663. package/src/lib/util/types/util.type.d.ts +67 -0
  664. package/src/lib/util/types/util.type.d.ts.map +1 -0
  665. package/src/lib/util/types/util.type.js +5 -0
  666. package/src/lib/util/types/util.type.js.map +1 -0
  667. package/src/lib/util/update-state.util.d.ts +10 -0
  668. package/src/lib/util/update-state.util.d.ts.map +1 -0
  669. package/src/lib/util/update-state.util.js +31 -0
  670. package/src/lib/util/update-state.util.js.map +1 -0
  671. package/src/lib/util/util.d.ts +19 -0
  672. package/src/lib/util/util.d.ts.map +1 -0
  673. package/src/lib/util/util.js +50 -0
  674. package/src/lib/util/util.js.map +1 -0
  675. package/src/lib/util/util.type.d.ts +107 -0
  676. package/src/lib/util/util.type.d.ts.map +1 -0
  677. package/src/lib/util/util.type.js +9 -0
  678. package/src/lib/util/util.type.js.map +1 -0
  679. package/src/lib/yieldable.d.ts +94 -0
  680. package/src/lib/yieldable.d.ts.map +1 -0
  681. package/src/lib/yieldable.js +109 -0
  682. package/src/lib/yieldable.js.map +1 -0
@@ -0,0 +1,99 @@
1
+ import type { Signal } from './host/craft-compat';
2
+ import { type AnyCraftException, type ExtractCraftException } from './craft-exception';
3
+ import { type CraftGenExceptionMarker, type CraftPipeableProgram } from './craft-gen';
4
+ import type { CraftHttpClientError } from './craft-http-client';
5
+ import { type YieldableReactiveValue } from './reactive-read';
6
+ type ReactiveResourceValue<T> = Signal<T> | YieldableReactiveValue<T>;
7
+ /**
8
+ * The minimal shape a craft resource (`query` / `mutation` / `asyncProcess`)
9
+ * exposes that {@link craftUntilSettled} relies on: the `status`/`value` signals to
10
+ * read the settled outcome, and the `hasException`/`exceptions` signals to surface
11
+ * a loader `craftException`.
12
+ *
13
+ * `error` is the internal Angular channel: it is no longer part of the public craft
14
+ * façade type, but the raw signal remains on the ref at runtime (spread by the
15
+ * primitive's `Object.assign`). It is kept optional here so `craftUntilSettled` can
16
+ * re-throw a residual technical failure while public refs still match this shape.
17
+ */
18
+ export type ResourceLike = {
19
+ status: ReactiveResourceValue<string>;
20
+ value: ReactiveResourceValue<unknown>;
21
+ error?: Signal<Error | undefined>;
22
+ hasException: ReactiveResourceValue<boolean>;
23
+ exceptions: ReactiveResourceValue<{
24
+ list: readonly AnyCraftException[];
25
+ }>;
26
+ };
27
+ /** The union of `craftException`s a resource may carry (its loader/params exceptions). */
28
+ export type ResourceExceptionUnion<R> = R extends {
29
+ exceptions: YieldableReactiveValue<{
30
+ list: (infer Exception)[];
31
+ }>;
32
+ } ? Extract<Exception, AnyCraftException> : R extends {
33
+ exceptions: Signal<{
34
+ list: (infer Exception)[];
35
+ }>;
36
+ } ? Extract<Exception, AnyCraftException> : never;
37
+ /** The settled (non-undefined) value a resource resolves to. */
38
+ export type ResourceResolvedValue<R> = R extends {
39
+ value: YieldableReactiveValue<infer Value>;
40
+ } ? Exclude<Value, undefined> : R extends {
41
+ value: Signal<infer Value>;
42
+ } ? Exclude<Value, undefined> : unknown;
43
+ /** The descriptor a `CraftHttpClient.*` call generator returns. */
44
+ type HttpCallDescriptor<G> = G extends Generator<any, infer Descriptor, any> ? Descriptor : never;
45
+ /** The yields relayed by a `CraftHttpClient.*` call generator (its tracked request). */
46
+ type HttpCallYielded<G> = G extends Generator<infer Yielded, any, any> ? Yielded : never;
47
+ /** What the HTTP descriptor resolves to: `Success | CustomException | CraftHttpClientError`. */
48
+ type HttpResolved<G> = Awaited<HttpCallDescriptor<G>>;
49
+ /**
50
+ * The business `craftException`s an HTTP call may produce, excluding the generic
51
+ * {@link CraftHttpClientError} (which `craftUntilSettled` rethrows rather than routing
52
+ * through the guard resolvers).
53
+ */
54
+ type HttpCallException<G> = Exclude<ExtractCraftException<HttpResolved<G>>, CraftHttpClientError>;
55
+ /** The success value of an HTTP call (its resolved value with every exception stripped). */
56
+ type HttpCallSuccess<G> = Exclude<HttpResolved<G>, AnyCraftException>;
57
+ /**
58
+ * Suspends a composing route guard until a craft async operation settles, then
59
+ * returns its success value. The operation's `craftException`s flow into the
60
+ * guard's exhaustive resolvers (compiler-enforced via the yielded
61
+ * {@link CraftGenExceptionMarker}).
62
+ *
63
+ * Two forms, both `yield*`-composable across the suspension:
64
+ *
65
+ * - **Resource** — a `query` / `mutation` / `asyncProcess` ref. Settles when its
66
+ * `status` reaches `'resolved'` or `'exception'`. A loader `craftException`
67
+ * short-circuits to the resolvers; a residual technical failure rethrows;
68
+ * otherwise the resolved value is returned.
69
+ *
70
+ * ```ts
71
+ * const user = yield* craftUntilSettled(
72
+ * query({ params: () => true, loader: async () => fetchUser() }),
73
+ * );
74
+ * ```
75
+ *
76
+ * - **HTTP call** — a `CraftHttpClient.*` call generator, awaited directly (no
77
+ * resource needed). Its declared `exceptions` flow into the resolvers; the
78
+ * generic `HttpError` is rethrown.
79
+ *
80
+ * ```ts
81
+ * const user = yield* craftUntilSettled(
82
+ * CraftHttpClient.get(({ response }) => ({
83
+ * url: `/api/users/${userId}`,
84
+ * success: response<User>(),
85
+ * exceptions: [...],
86
+ * })),
87
+ * );
88
+ * ```
89
+ */
90
+ export declare function craftUntilSettled<R extends ResourceLike>(resource: R): CraftPipeableProgram<CraftGenExceptionMarker<ResourceExceptionUnion<R>>, ResourceResolvedValue<R>>;
91
+ export declare function craftUntilSettled<G extends Generator<any, any, any>>(call: G): CraftPipeableProgram<HttpCallYielded<G> | CraftGenExceptionMarker<HttpCallException<G>>, HttpCallSuccess<G>>;
92
+ /**
93
+ * Suspends a composing route guard until `signal()` is no longer `undefined`,
94
+ * then returns its (non-nullable) value. Unlike {@link craftUntilSettled} there is no
95
+ * exception channel — use it to wait on a plain readiness signal.
96
+ */
97
+ export declare function craftUntilDefined<T>(signal: Signal<T>): CraftPipeableProgram<never, NonNullable<T>>;
98
+ export {};
99
+ //# sourceMappingURL=craft-until-settled.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"craft-until-settled.d.ts","sourceRoot":"","sources":["../../../../../libs/core/src/lib/craft-until-settled.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,81 @@
1
+ import { isCraftException, } from './craft-exception';
2
+ import { CraftGenShortCircuit, ɵcreateCraftProgram, } from './craft-gen';
3
+ import { GUARD_AWAIT_REQUEST_MARKER, isGenerator, } from './craft-generator-runtime';
4
+ import { isYieldableReactiveValue, rawReactiveValue, } from './reactive-read';
5
+ function guardAwaitRequest(request) {
6
+ return {
7
+ [GUARD_AWAIT_REQUEST_MARKER]: true,
8
+ ...request,
9
+ };
10
+ }
11
+ function* craftUntilSettledResource(resource) {
12
+ const adapter = {
13
+ status: () => readResourceValue(resource.status),
14
+ value: () => readResourceValue(resource.value),
15
+ error: () => resource.error?.(),
16
+ hasException: () => readResourceValue(resource.hasException),
17
+ exceptions: () => readResourceValue(resource.exceptions),
18
+ };
19
+ yield guardAwaitRequest({
20
+ kind: 'settle',
21
+ resource: adapter,
22
+ });
23
+ if (adapter.hasException()) {
24
+ throw new CraftGenShortCircuit(adapter.exceptions().list[0]);
25
+ }
26
+ if (adapter.status() === 'exception') {
27
+ // No business `craftException` present but the status is `'exception'` — a
28
+ // residual technical failure. Rethrow the raw Angular error (internal channel).
29
+ throw resource.error?.();
30
+ }
31
+ return adapter.value();
32
+ }
33
+ function readResourceValue(value) {
34
+ return isYieldableReactiveValue(value) ? rawReactiveValue(value)() : value();
35
+ }
36
+ function* craftUntilSettledHttp(call) {
37
+ const descriptor = yield* call;
38
+ const resolved = yield guardAwaitRequest({
39
+ kind: 'promise',
40
+ value: descriptor,
41
+ });
42
+ if (isCraftException(resolved)) {
43
+ if (resolved._tag === 'HttpError' && resolved.scope === 'HttpClient') {
44
+ // Generic network/transport failure — rethrow so it surfaces as a
45
+ // navigation error rather than a resolvable business case.
46
+ throw resolved;
47
+ }
48
+ // A declared business exception — route it through the guard's resolvers.
49
+ throw new CraftGenShortCircuit(resolved);
50
+ }
51
+ return resolved;
52
+ }
53
+ export function craftUntilSettled(source) {
54
+ return ɵcreateCraftProgram(() => isGenerator(source)
55
+ ? craftUntilSettledHttp(source)
56
+ : craftUntilSettledResource(source));
57
+ }
58
+ function signalSettleAdapter(signal) {
59
+ return {
60
+ status: () => (signal() !== undefined ? 'resolved' : 'loading'),
61
+ value: () => signal(),
62
+ error: () => undefined,
63
+ hasException: () => false,
64
+ exceptions: () => ({ list: [] }),
65
+ };
66
+ }
67
+ /**
68
+ * Suspends a composing route guard until `signal()` is no longer `undefined`,
69
+ * then returns its (non-nullable) value. Unlike {@link craftUntilSettled} there is no
70
+ * exception channel — use it to wait on a plain readiness signal.
71
+ */
72
+ export function craftUntilDefined(signal) {
73
+ return ɵcreateCraftProgram(function* () {
74
+ yield guardAwaitRequest({
75
+ kind: 'settle',
76
+ resource: signalSettleAdapter(signal),
77
+ });
78
+ return signal();
79
+ });
80
+ }
81
+ //# sourceMappingURL=craft-until-settled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"craft-until-settled.js","sourceRoot":"","sources":["../../../../../libs/core/src/lib/craft-until-settled.ts"],"names":[],"mappings":"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","sourcesContent":["import type { Signal } from './host/craft-compat';\nimport {\n isCraftException,\n type AnyCraftException,\n type ExtractCraftException,\n} from './craft-exception';\nimport {\n CraftGenShortCircuit,\n ɵcreateCraftProgram,\n type CraftGenExceptionMarker,\n type CraftPipeableProgram,\n} from './craft-gen';\nimport {\n GUARD_AWAIT_REQUEST_MARKER,\n isGenerator,\n type GuardAwaitResourceLike,\n type RuntimeGuardAwaitRequest,\n} from './craft-generator-runtime';\nimport type { CraftHttpClientError } from './craft-http-client';\nimport {\n isYieldableReactiveValue,\n rawReactiveValue,\n type YieldableReactiveValue,\n} from './reactive-read';\n\ntype ReactiveResourceValue<T> = Signal<T> | YieldableReactiveValue<T>;\n\n/**\n * The minimal shape a craft resource (`query` / `mutation` / `asyncProcess`)\n * exposes that {@link craftUntilSettled} relies on: the `status`/`value` signals to\n * read the settled outcome, and the `hasException`/`exceptions` signals to surface\n * a loader `craftException`.\n *\n * `error` is the internal Angular channel: it is no longer part of the public craft\n * façade type, but the raw signal remains on the ref at runtime (spread by the\n * primitive's `Object.assign`). It is kept optional here so `craftUntilSettled` can\n * re-throw a residual technical failure while public refs still match this shape.\n */\nexport type ResourceLike = {\n status: ReactiveResourceValue<string>;\n value: ReactiveResourceValue<unknown>;\n error?: Signal<Error | undefined>;\n hasException: ReactiveResourceValue<boolean>;\n exceptions: ReactiveResourceValue<{ list: readonly AnyCraftException[] }>;\n};\n\n/** The union of `craftException`s a resource may carry (its loader/params exceptions). */\nexport type ResourceExceptionUnion<R> = R extends {\n exceptions: YieldableReactiveValue<{ list: (infer Exception)[] }>;\n}\n ? Extract<Exception, AnyCraftException>\n : R extends { exceptions: Signal<{ list: (infer Exception)[] }> }\n ? Extract<Exception, AnyCraftException>\n : never;\n\n/** The settled (non-undefined) value a resource resolves to. */\nexport type ResourceResolvedValue<R> = R extends {\n value: YieldableReactiveValue<infer Value>;\n}\n ? Exclude<Value, undefined>\n : R extends { value: Signal<infer Value> }\n ? Exclude<Value, undefined>\n : unknown;\n\n/** The descriptor a `CraftHttpClient.*` call generator returns. */\ntype HttpCallDescriptor<G> =\n G extends Generator<any, infer Descriptor, any> ? Descriptor : never;\n\n/** The yields relayed by a `CraftHttpClient.*` call generator (its tracked request). */\ntype HttpCallYielded<G> =\n G extends Generator<infer Yielded, any, any> ? Yielded : never;\n\n/** What the HTTP descriptor resolves to: `Success | CustomException | CraftHttpClientError`. */\ntype HttpResolved<G> = Awaited<HttpCallDescriptor<G>>;\n\n/**\n * The business `craftException`s an HTTP call may produce, excluding the generic\n * {@link CraftHttpClientError} (which `craftUntilSettled` rethrows rather than routing\n * through the guard resolvers).\n */\ntype HttpCallException<G> = Exclude<\n ExtractCraftException<HttpResolved<G>>,\n CraftHttpClientError\n>;\n\n/** The success value of an HTTP call (its resolved value with every exception stripped). */\ntype HttpCallSuccess<G> = Exclude<HttpResolved<G>, AnyCraftException>;\n\nfunction guardAwaitRequest(\n request:\n | { kind: 'settle'; resource: GuardAwaitResourceLike }\n | { kind: 'promise'; value: PromiseLike<unknown> },\n): RuntimeGuardAwaitRequest {\n return {\n [GUARD_AWAIT_REQUEST_MARKER]: true,\n ...request,\n } as RuntimeGuardAwaitRequest;\n}\n\nfunction* craftUntilSettledResource(\n resource: ResourceLike,\n): Generator<unknown, unknown, unknown> {\n const adapter = {\n status: () => readResourceValue(resource.status),\n value: () => readResourceValue(resource.value),\n error: () => resource.error?.(),\n hasException: () => readResourceValue(resource.hasException),\n exceptions: () => readResourceValue(resource.exceptions),\n } satisfies GuardAwaitResourceLike;\n yield guardAwaitRequest({\n kind: 'settle',\n resource: adapter,\n });\n\n if (adapter.hasException()) {\n throw new CraftGenShortCircuit(adapter.exceptions().list[0]);\n }\n\n if (adapter.status() === 'exception') {\n // No business `craftException` present but the status is `'exception'` — a\n // residual technical failure. Rethrow the raw Angular error (internal channel).\n throw resource.error?.();\n }\n\n return adapter.value();\n}\n\nfunction readResourceValue<T>(value: ReactiveResourceValue<T>): T {\n return isYieldableReactiveValue(value) ? rawReactiveValue(value)() : value();\n}\n\nfunction* craftUntilSettledHttp(\n call: Generator<unknown, unknown, unknown>,\n): Generator<unknown, unknown, unknown> {\n const descriptor = yield* call;\n const resolved = yield guardAwaitRequest({\n kind: 'promise',\n value: descriptor as PromiseLike<unknown>,\n });\n\n if (isCraftException(resolved)) {\n if (resolved._tag === 'HttpError' && resolved.scope === 'HttpClient') {\n // Generic network/transport failure — rethrow so it surfaces as a\n // navigation error rather than a resolvable business case.\n throw resolved;\n }\n\n // A declared business exception — route it through the guard's resolvers.\n throw new CraftGenShortCircuit(resolved);\n }\n\n return resolved;\n}\n\n/**\n * Suspends a composing route guard until a craft async operation settles, then\n * returns its success value. The operation's `craftException`s flow into the\n * guard's exhaustive resolvers (compiler-enforced via the yielded\n * {@link CraftGenExceptionMarker}).\n *\n * Two forms, both `yield*`-composable across the suspension:\n *\n * - **Resource** — a `query` / `mutation` / `asyncProcess` ref. Settles when its\n * `status` reaches `'resolved'` or `'exception'`. A loader `craftException`\n * short-circuits to the resolvers; a residual technical failure rethrows;\n * otherwise the resolved value is returned.\n *\n * ```ts\n * const user = yield* craftUntilSettled(\n * query({ params: () => true, loader: async () => fetchUser() }),\n * );\n * ```\n *\n * - **HTTP call** — a `CraftHttpClient.*` call generator, awaited directly (no\n * resource needed). Its declared `exceptions` flow into the resolvers; the\n * generic `HttpError` is rethrown.\n *\n * ```ts\n * const user = yield* craftUntilSettled(\n * CraftHttpClient.get(({ response }) => ({\n * url: `/api/users/${userId}`,\n * success: response<User>(),\n * exceptions: [...],\n * })),\n * );\n * ```\n */\nexport function craftUntilSettled<R extends ResourceLike>(\n resource: R,\n): CraftPipeableProgram<\n CraftGenExceptionMarker<ResourceExceptionUnion<R>>,\n ResourceResolvedValue<R>\n>;\nexport function craftUntilSettled<G extends Generator<any, any, any>>(\n call: G,\n): CraftPipeableProgram<\n HttpCallYielded<G> | CraftGenExceptionMarker<HttpCallException<G>>,\n HttpCallSuccess<G>\n>;\nexport function craftUntilSettled(\n source: ResourceLike | Generator<unknown, unknown, unknown>,\n): CraftPipeableProgram<unknown, unknown> {\n return ɵcreateCraftProgram(() =>\n isGenerator(source)\n ? craftUntilSettledHttp(source)\n : craftUntilSettledResource(source),\n ) as CraftPipeableProgram<unknown, unknown>;\n}\n\nfunction signalSettleAdapter<T>(signal: Signal<T>): GuardAwaitResourceLike {\n return {\n status: () => (signal() !== undefined ? 'resolved' : 'loading'),\n value: () => signal(),\n error: () => undefined,\n hasException: () => false,\n exceptions: () => ({ list: [] }),\n };\n}\n\n/**\n * Suspends a composing route guard until `signal()` is no longer `undefined`,\n * then returns its (non-nullable) value. Unlike {@link craftUntilSettled} there is no\n * exception channel — use it to wait on a plain readiness signal.\n */\nexport function craftUntilDefined<T>(\n signal: Signal<T>,\n): CraftPipeableProgram<never, NonNullable<T>> {\n return ɵcreateCraftProgram(function* () {\n yield guardAwaitRequest({\n kind: 'settle',\n resource: signalSettleAdapter(signal),\n });\n\n return signal();\n }) as unknown as CraftPipeableProgram<never, NonNullable<T>>;\n}\n"]}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Drives any craft generator synchronously outside a generator host and
3
+ * returns its result — the imperative counterpart of `yield*`.
4
+ *
5
+ * Its main use is consuming a craft primitive (`state`, `query`, `mutation`,
6
+ * `asyncProcess`, `queryParams`) outside a generator host. Like `yield*`, it
7
+ * resolves to the primitive reference itself:
8
+ *
9
+ * ```ts
10
+ * const users = craftUse(query('users', { loader: ... }));
11
+ * const counter = craftUse(state('counter', 0));
12
+ * ```
13
+ *
14
+ * It also accepts a `craftGen` invocation, an inline generator, or an
15
+ * argument-less generator function. Dependency yields are resolved through the
16
+ * ambient injection context when one is available; a `CraftGenShortCircuit`
17
+ * thrown by a composed `craftGen` propagates unchanged.
18
+ *
19
+ * A generator is single-use: passing the same invocation to `craftUse` twice
20
+ * (or after a `yield*`) drives an exhausted generator and returns `undefined`.
21
+ */
22
+ export declare function craftUse<Yielded, Output>(invocation: Generator<Yielded, Output, unknown>): Output;
23
+ export declare function craftUse<Yielded, Output>(invocation: Generator<Yielded, Output, unknown> | undefined): Output | undefined;
24
+ export declare function craftUse<Yielded, Output>(factory: () => Generator<Yielded, Output, unknown>): Output;
25
+ export declare function craftUse<Value>(value: Value): Value;
26
+ //# sourceMappingURL=craft-use.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"craft-use.d.ts","sourceRoot":"","sources":["../../../../../libs/core/src/lib/craft-use.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EACtC,UAAU,EAAE,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,GAC9C,MAAM,CAAC;AACV,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EACtC,UAAU,EAAE,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAC1D,MAAM,GAAG,SAAS,CAAC;AACtB,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EACtC,OAAO,EAAE,MAAM,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,GACjD,MAAM,CAAC;AACV,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { inject, Injector, runInInjectionContext } from './host/craft-compat';
2
+ import { isGenerator, runCraftGenerator } from './craft-generator-runtime';
3
+ const INVALID_YIELD_ERROR_MESSAGE = 'craftUse(...) generators can only yield craft primitives, exposed dependency helpers, or craftService dependencies.';
4
+ const ON_APP_START_ERROR_MESSAGE = 'craftUse(...) does not support onAppStart(...): it is only available inside a craftService factory.';
5
+ const GUARD_AWAIT_ERROR_MESSAGE = 'craftUse(...) does not support craftUntilSettled(...)/craftUntilDefined(...): they are only available inside route guards.';
6
+ export function craftUse(input) {
7
+ if (input === undefined)
8
+ return undefined;
9
+ if (!isGenerator(input) && typeof input !== 'function')
10
+ return input;
11
+ const iterator = isGenerator(input) ? input : input();
12
+ // Capture the ambient injector when available. Driving a trivial primitive
13
+ // generator needs none, so `craftUse` stays usable outside an injection
14
+ // context (leniency aligned with the primitives' own eager capture).
15
+ let injector;
16
+ try {
17
+ injector = inject(Injector);
18
+ }
19
+ catch {
20
+ injector = undefined;
21
+ }
22
+ // A generator may yield a dependency request whose resolver does not need
23
+ // Angular DI. Keep that valid outside an injection context while still
24
+ // giving the runtime an injector for wrapper lookup and resolver shape.
25
+ const runtimeInjector = injector ?? Injector.create({ providers: [] });
26
+ const drive = () => runCraftGenerator({
27
+ iterator,
28
+ injector: runtimeInjector,
29
+ hostScope: 'function',
30
+ invalidYieldErrorMessage: INVALID_YIELD_ERROR_MESSAGE,
31
+ multipleAppStartErrorMessage: ON_APP_START_ERROR_MESSAGE,
32
+ onAppStartNotSupportedErrorMessage: ON_APP_START_ERROR_MESSAGE,
33
+ guardAwaitNotSupportedErrorMessage: GUARD_AWAIT_ERROR_MESSAGE,
34
+ }).value;
35
+ return injector ? runInInjectionContext(injector, drive) : drive();
36
+ }
37
+ //# sourceMappingURL=craft-use.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"craft-use.js","sourceRoot":"","sources":["../../../../../libs/core/src/lib/craft-use.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE3E,MAAM,2BAA2B,GAC/B,qHAAqH,CAAC;AACxH,MAAM,0BAA0B,GAC9B,qGAAqG,CAAC;AACxG,MAAM,yBAAyB,GAC7B,4HAA4H,CAAC;AAiC/H,MAAM,UAAU,QAAQ,CACtB,KAIW;IAEX,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,UAAU;QAAE,OAAO,KAAK,CAAC;IACrE,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;IAEtD,2EAA2E;IAC3E,wEAAwE;IACxE,qEAAqE;IACrE,IAAI,QAA8B,CAAC;IACnC,IAAI,CAAC;QACH,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,QAAQ,GAAG,SAAS,CAAC;IACvB,CAAC;IAED,0EAA0E;IAC1E,uEAAuE;IACvE,wEAAwE;IACxE,MAAM,eAAe,GAAG,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;IAEvE,MAAM,KAAK,GAAG,GAAG,EAAE,CACjB,iBAAiB,CAAC;QAChB,QAAQ;QACR,QAAQ,EAAE,eAAe;QACzB,SAAS,EAAE,UAAU;QACrB,wBAAwB,EAAE,2BAA2B;QACrD,4BAA4B,EAAE,0BAA0B;QACxD,kCAAkC,EAAE,0BAA0B;QAC9D,kCAAkC,EAAE,yBAAyB;KAC9D,CAAC,CAAC,KAAK,CAAC;IAEX,OAAO,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;AACrE,CAAC","sourcesContent":["import { inject, Injector, runInInjectionContext } from './host/craft-compat';\nimport { isGenerator, runCraftGenerator } from './craft-generator-runtime';\n\nconst INVALID_YIELD_ERROR_MESSAGE =\n 'craftUse(...) generators can only yield craft primitives, exposed dependency helpers, or craftService dependencies.';\nconst ON_APP_START_ERROR_MESSAGE =\n 'craftUse(...) does not support onAppStart(...): it is only available inside a craftService factory.';\nconst GUARD_AWAIT_ERROR_MESSAGE =\n 'craftUse(...) does not support craftUntilSettled(...)/craftUntilDefined(...): they are only available inside route guards.';\n\n/**\n * Drives any craft generator synchronously outside a generator host and\n * returns its result — the imperative counterpart of `yield*`.\n *\n * Its main use is consuming a craft primitive (`state`, `query`, `mutation`,\n * `asyncProcess`, `queryParams`) outside a generator host. Like `yield*`, it\n * resolves to the primitive reference itself:\n *\n * ```ts\n * const users = craftUse(query('users', { loader: ... }));\n * const counter = craftUse(state('counter', 0));\n * ```\n *\n * It also accepts a `craftGen` invocation, an inline generator, or an\n * argument-less generator function. Dependency yields are resolved through the\n * ambient injection context when one is available; a `CraftGenShortCircuit`\n * thrown by a composed `craftGen` propagates unchanged.\n *\n * A generator is single-use: passing the same invocation to `craftUse` twice\n * (or after a `yield*`) drives an exhausted generator and returns `undefined`.\n */\nexport function craftUse<Yielded, Output>(\n invocation: Generator<Yielded, Output, unknown>,\n): Output;\nexport function craftUse<Yielded, Output>(\n invocation: Generator<Yielded, Output, unknown> | undefined,\n): Output | undefined;\nexport function craftUse<Yielded, Output>(\n factory: () => Generator<Yielded, Output, unknown>,\n): Output;\nexport function craftUse<Value>(value: Value): Value;\nexport function craftUse(\n input:\n | Generator<unknown, unknown, unknown>\n | undefined\n | (() => Generator<unknown, unknown, unknown>)\n | unknown,\n): unknown {\n if (input === undefined) return undefined;\n if (!isGenerator(input) && typeof input !== 'function') return input;\n const iterator = isGenerator(input) ? input : input();\n\n // Capture the ambient injector when available. Driving a trivial primitive\n // generator needs none, so `craftUse` stays usable outside an injection\n // context (leniency aligned with the primitives' own eager capture).\n let injector: Injector | undefined;\n try {\n injector = inject(Injector);\n } catch {\n injector = undefined;\n }\n\n // A generator may yield a dependency request whose resolver does not need\n // Angular DI. Keep that valid outside an injection context while still\n // giving the runtime an injector for wrapper lookup and resolver shape.\n const runtimeInjector = injector ?? Injector.create({ providers: [] });\n\n const drive = () =>\n runCraftGenerator({\n iterator,\n injector: runtimeInjector,\n hostScope: 'function',\n invalidYieldErrorMessage: INVALID_YIELD_ERROR_MESSAGE,\n multipleAppStartErrorMessage: ON_APP_START_ERROR_MESSAGE,\n onAppStartNotSupportedErrorMessage: ON_APP_START_ERROR_MESSAGE,\n guardAwaitNotSupportedErrorMessage: GUARD_AWAIT_ERROR_MESSAGE,\n }).value;\n\n return injector ? runInInjectionContext(injector, drive) : drive();\n}\n"]}
@@ -0,0 +1,102 @@
1
+ import { InjectionToken, type Signal } from './host/craft-compat';
2
+ import { type CraftLoadingFeature } from './craft-pending';
3
+ /**
4
+ * The marker a route stores in `withLoaderViewTransitionImage` to declare the
5
+ * shape `T` of its shared-element payload — the view-transition analogue of how
6
+ * `queryParams` declares the shape of a route's query params. `T` flows into:
7
+ * the REQUIRED `viewTransition` field on every `craftRouterLink` / `navigate`
8
+ * targeting the route (as `T | null`), and the generated, typed
9
+ * `injectXxxViewTransition(): Signal<T | null>` helper the pending skeleton (or
10
+ * target) reads.
11
+ *
12
+ * The phantom property is a plain (string-keyed, required) brand rather than a
13
+ * `unique symbol`: this marker rides along inside the route definition that the
14
+ * parent `app.routes` path registry materializes through `loadChildren`, and
15
+ * that registry sits at TypeScript's instantiation-depth ceiling — a symbol-
16
+ * keyed phantom measurably costs more there. The required key also keeps a bare
17
+ * `{}` from structurally matching the marker.
18
+ */
19
+ export interface ViewTransitionPayloadDef<T> {
20
+ readonly __craftViewTransitionPayload: T;
21
+ }
22
+ /**
23
+ * Declares the shared-element payload shape `T` for a view-transition route.
24
+ * Place it on `withLoaderViewTransitionImage` exactly like `queryParams`:
25
+ *
26
+ * ```ts
27
+ * craftRoute(':photoId', {
28
+ * withLoaderViewTransitionImage: viewTransitionPayload<{ name: string; image: string | null }>(),
29
+ * // ...
30
+ * })
31
+ * ```
32
+ *
33
+ * Returns an empty runtime marker — `T` lives purely at the type level (carried
34
+ * by the phantom {@link ViewTransitionPayloadDef} brand).
35
+ */
36
+ export declare function viewTransitionPayload<T>(): ViewTransitionPayloadDef<T>;
37
+ /**
38
+ * What a navigation transports for a view-transition route. Deliberately loose
39
+ * at the transport layer ({@link CRAFT_VIEW_TRANSITION} is a single global sink
40
+ * shared by every view-transition route): the per-route generated helpers
41
+ * narrow it to the declared `T | null`. `null` opts out of the morph explicitly.
42
+ */
43
+ export type CraftViewTransitionInput = unknown;
44
+ /**
45
+ * Key under which the view-transition payload travels in Angular's navigation
46
+ * `state` (history state). The outlet reads it from the current navigation and
47
+ * republishes it through {@link CRAFT_VIEW_TRANSITION}.
48
+ */
49
+ export declare const CRAFT_VIEW_TRANSITION_STATE_KEY = "__craftViewTransition";
50
+ /**
51
+ * The view-transition payload for the current navigation, as a signal the
52
+ * outlet writes and the skeleton/target read (via {@link
53
+ * injectCraftViewTransition}). `null` between/without view-transition
54
+ * navigations.
55
+ */
56
+ export declare const CRAFT_VIEW_TRANSITION: InjectionToken<Signal<unknown>>;
57
+ /** Reads the current navigation's view-transition payload (see {@link CRAFT_VIEW_TRANSITION}). */
58
+ export declare function injectCraftViewTransition(): Signal<CraftViewTransitionInput>;
59
+ /** Whether the outlet should drive `document.startViewTransition()` around its swaps. */
60
+ export declare const CRAFT_VIEW_TRANSITIONS_ENABLED: InjectionToken<boolean>;
61
+ /**
62
+ * Whether the outlet should skip the `'blank'` phase while view transitions are
63
+ * enabled. A blank surface between the previous page and the skeleton breaks the
64
+ * shared-element morph, so routes that declare a `withLoaderViewTransitionImage`
65
+ * payload always skip blank; this token lets `withCraftViewTransitions({ skipBlank })`
66
+ * extend that to every route.
67
+ */
68
+ export declare const CRAFT_VIEW_TRANSITION_SKIP_BLANK: InjectionToken<boolean>;
69
+ /** Runs `cb` inside a view transition. The seam tests override to capture the callback. */
70
+ export type CraftStartViewTransition = (cb: () => void) => void;
71
+ /**
72
+ * The function the outlet uses to bracket a swap in a view transition. The
73
+ * default wraps `document.startViewTransition()`, but falls back to running
74
+ * `cb` directly when the API is missing or the user prefers reduced motion.
75
+ * Overridable in tests to capture the callback deterministically.
76
+ */
77
+ export declare const CRAFT_START_VIEW_TRANSITION: InjectionToken<CraftStartViewTransition>;
78
+ /**
79
+ * Hands the {@link CraftRouterOutletController} control of the browser View
80
+ * Transitions
81
+ * API. Unlike Angular's `withViewTransitions()` — which brackets only the
82
+ * synchronous URL commit — this drives `document.startViewTransition()` around
83
+ * the outlet's *own* swaps (`previous page → skeleton → target`), so a
84
+ * shared-element morph survives a slow guard/resolve chain.
85
+ *
86
+ * Routes that declare a `withLoaderViewTransitionImage` payload (via {@link
87
+ * viewTransitionPayload}) additionally skip the `'blank'` phase (a blank surface
88
+ * would break the morph) and require every `craftRouterLink` / `navigate`
89
+ * targeting them to pass a typed `viewTransition` payload. Pass
90
+ * `{ skipBlank: true }` to extend the blank-skip to all routes.
91
+ *
92
+ * ```ts
93
+ * provideCraftRouter(
94
+ * demoRoutes.toRoutes(),
95
+ * withCraftViewTransitions(),
96
+ * )
97
+ * ```
98
+ */
99
+ export declare function withCraftViewTransitions(options?: {
100
+ skipBlank?: boolean;
101
+ }): CraftLoadingFeature;
102
+ //# sourceMappingURL=craft-view-transition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"craft-view-transition.d.ts","sourceRoot":"","sources":["../../../../../libs/core/src/lib/craft-view-transition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,cAAc,EAAU,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAuB,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEhF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACzC,QAAQ,CAAC,4BAA4B,EAAE,CAAC,CAAC;CAC1C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,KAAK,wBAAwB,CAAC,CAAC,CAAC,CAEtE;AAED;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAE/C;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,0BAA0B,CAAC;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,iCAKhC,CAAC;AAEH,kGAAkG;AAClG,wBAAgB,yBAAyB,IAAI,MAAM,CAAC,wBAAwB,CAAC,CAE5E;AAED,yFAAyF;AACzF,eAAO,MAAM,8BAA8B,yBAG1C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,yBAG5C,CAAC;AAEF,2FAA2F;AAC3F,MAAM,MAAM,wBAAwB,GAAG,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;AAMhE;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,0CAIpC,CAAC;AAuDL;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,mBAAmB,CAQtB"}
@@ -0,0 +1,130 @@
1
+ import { inject, InjectionToken, signal } from './host/craft-compat';
2
+ import { craftLoadingFeature } from './craft-pending';
3
+ /**
4
+ * Declares the shared-element payload shape `T` for a view-transition route.
5
+ * Place it on `withLoaderViewTransitionImage` exactly like `queryParams`:
6
+ *
7
+ * ```ts
8
+ * craftRoute(':photoId', {
9
+ * withLoaderViewTransitionImage: viewTransitionPayload<{ name: string; image: string | null }>(),
10
+ * // ...
11
+ * })
12
+ * ```
13
+ *
14
+ * Returns an empty runtime marker — `T` lives purely at the type level (carried
15
+ * by the phantom {@link ViewTransitionPayloadDef} brand).
16
+ */
17
+ export function viewTransitionPayload() {
18
+ return {};
19
+ }
20
+ /**
21
+ * Key under which the view-transition payload travels in Angular's navigation
22
+ * `state` (history state). The outlet reads it from the current navigation and
23
+ * republishes it through {@link CRAFT_VIEW_TRANSITION}.
24
+ */
25
+ export const CRAFT_VIEW_TRANSITION_STATE_KEY = '__craftViewTransition';
26
+ /**
27
+ * The view-transition payload for the current navigation, as a signal the
28
+ * outlet writes and the skeleton/target read (via {@link
29
+ * injectCraftViewTransition}). `null` between/without view-transition
30
+ * navigations.
31
+ */
32
+ export const CRAFT_VIEW_TRANSITION = new InjectionToken('CRAFT_VIEW_TRANSITION', {
33
+ providedIn: 'root',
34
+ factory: () => signal(null),
35
+ });
36
+ /** Reads the current navigation's view-transition payload (see {@link CRAFT_VIEW_TRANSITION}). */
37
+ export function injectCraftViewTransition() {
38
+ return inject(CRAFT_VIEW_TRANSITION);
39
+ }
40
+ /** Whether the outlet should drive `document.startViewTransition()` around its swaps. */
41
+ export const CRAFT_VIEW_TRANSITIONS_ENABLED = new InjectionToken('CRAFT_VIEW_TRANSITIONS_ENABLED', { providedIn: 'root', factory: () => false });
42
+ /**
43
+ * Whether the outlet should skip the `'blank'` phase while view transitions are
44
+ * enabled. A blank surface between the previous page and the skeleton breaks the
45
+ * shared-element morph, so routes that declare a `withLoaderViewTransitionImage`
46
+ * payload always skip blank; this token lets `withCraftViewTransitions({ skipBlank })`
47
+ * extend that to every route.
48
+ */
49
+ export const CRAFT_VIEW_TRANSITION_SKIP_BLANK = new InjectionToken('CRAFT_VIEW_TRANSITION_SKIP_BLANK', { providedIn: 'root', factory: () => false });
50
+ /**
51
+ * The function the outlet uses to bracket a swap in a view transition. The
52
+ * default wraps `document.startViewTransition()`, but falls back to running
53
+ * `cb` directly when the API is missing or the user prefers reduced motion.
54
+ * Overridable in tests to capture the callback deterministically.
55
+ */
56
+ export const CRAFT_START_VIEW_TRANSITION = new InjectionToken('CRAFT_START_VIEW_TRANSITION', {
57
+ providedIn: 'root',
58
+ factory: () => defaultStartViewTransition,
59
+ });
60
+ function defaultStartViewTransition(cb) {
61
+ const doc = typeof document !== 'undefined'
62
+ ? document
63
+ : undefined;
64
+ const prefersReducedMotion = typeof window !== 'undefined' &&
65
+ typeof window.matchMedia === 'function' &&
66
+ window.matchMedia('(prefers-reduced-motion: reduce)').matches;
67
+ if (!doc?.startViewTransition || prefersReducedMotion) {
68
+ cb();
69
+ return;
70
+ }
71
+ // Chromium can expose the API while failing to invoke the update callback
72
+ // when a transition is started during router activation. Never leave the
73
+ // outlet waiting forever for that callback: the fallback still commits the
74
+ // new DOM, while the idempotent wrapper prevents a later native callback
75
+ // from committing twice.
76
+ let callbackCalled = false;
77
+ const runOnce = () => {
78
+ if (callbackCalled) {
79
+ return;
80
+ }
81
+ callbackCalled = true;
82
+ cb();
83
+ };
84
+ const transition = doc.startViewTransition(runOnce);
85
+ for (const promise of [
86
+ transition?.ready,
87
+ transition?.updateCallbackDone,
88
+ transition?.finished,
89
+ ]) {
90
+ void promise?.catch(() => undefined);
91
+ }
92
+ queueMicrotask(() => {
93
+ if (callbackCalled) {
94
+ return;
95
+ }
96
+ runOnce();
97
+ transition?.skipTransition?.();
98
+ });
99
+ }
100
+ /**
101
+ * Hands the {@link CraftRouterOutletController} control of the browser View
102
+ * Transitions
103
+ * API. Unlike Angular's `withViewTransitions()` — which brackets only the
104
+ * synchronous URL commit — this drives `document.startViewTransition()` around
105
+ * the outlet's *own* swaps (`previous page → skeleton → target`), so a
106
+ * shared-element morph survives a slow guard/resolve chain.
107
+ *
108
+ * Routes that declare a `withLoaderViewTransitionImage` payload (via {@link
109
+ * viewTransitionPayload}) additionally skip the `'blank'` phase (a blank surface
110
+ * would break the morph) and require every `craftRouterLink` / `navigate`
111
+ * targeting them to pass a typed `viewTransition` payload. Pass
112
+ * `{ skipBlank: true }` to extend the blank-skip to all routes.
113
+ *
114
+ * ```ts
115
+ * provideCraftRouter(
116
+ * demoRoutes.toRoutes(),
117
+ * withCraftViewTransitions(),
118
+ * )
119
+ * ```
120
+ */
121
+ export function withCraftViewTransitions(options) {
122
+ return craftLoadingFeature([
123
+ { provide: CRAFT_VIEW_TRANSITIONS_ENABLED, useValue: true },
124
+ {
125
+ provide: CRAFT_VIEW_TRANSITION_SKIP_BLANK,
126
+ useValue: options?.skipBlank ?? false,
127
+ },
128
+ ]);
129
+ }
130
+ //# sourceMappingURL=craft-view-transition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"craft-view-transition.js","sourceRoot":"","sources":["../../../../../libs/core/src/lib/craft-view-transition.ts"],"names":[],"mappings":"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","sourcesContent":["import { inject, InjectionToken, signal, type Signal } from './host/craft-compat';\nimport { craftLoadingFeature, type CraftLoadingFeature } from './craft-pending';\n\n/**\n * The marker a route stores in `withLoaderViewTransitionImage` to declare the\n * shape `T` of its shared-element payload — the view-transition analogue of how\n * `queryParams` declares the shape of a route's query params. `T` flows into:\n * the REQUIRED `viewTransition` field on every `craftRouterLink` / `navigate`\n * targeting the route (as `T | null`), and the generated, typed\n * `injectXxxViewTransition(): Signal<T | null>` helper the pending skeleton (or\n * target) reads.\n *\n * The phantom property is a plain (string-keyed, required) brand rather than a\n * `unique symbol`: this marker rides along inside the route definition that the\n * parent `app.routes` path registry materializes through `loadChildren`, and\n * that registry sits at TypeScript's instantiation-depth ceiling — a symbol-\n * keyed phantom measurably costs more there. The required key also keeps a bare\n * `{}` from structurally matching the marker.\n */\nexport interface ViewTransitionPayloadDef<T> {\n readonly __craftViewTransitionPayload: T;\n}\n\n/**\n * Declares the shared-element payload shape `T` for a view-transition route.\n * Place it on `withLoaderViewTransitionImage` exactly like `queryParams`:\n *\n * ```ts\n * craftRoute(':photoId', {\n * withLoaderViewTransitionImage: viewTransitionPayload<{ name: string; image: string | null }>(),\n * // ...\n * })\n * ```\n *\n * Returns an empty runtime marker — `T` lives purely at the type level (carried\n * by the phantom {@link ViewTransitionPayloadDef} brand).\n */\nexport function viewTransitionPayload<T>(): ViewTransitionPayloadDef<T> {\n return {} as ViewTransitionPayloadDef<T>;\n}\n\n/**\n * What a navigation transports for a view-transition route. Deliberately loose\n * at the transport layer ({@link CRAFT_VIEW_TRANSITION} is a single global sink\n * shared by every view-transition route): the per-route generated helpers\n * narrow it to the declared `T | null`. `null` opts out of the morph explicitly.\n */\nexport type CraftViewTransitionInput = unknown;\n\n/**\n * Key under which the view-transition payload travels in Angular's navigation\n * `state` (history state). The outlet reads it from the current navigation and\n * republishes it through {@link CRAFT_VIEW_TRANSITION}.\n */\nexport const CRAFT_VIEW_TRANSITION_STATE_KEY = '__craftViewTransition';\n\n/**\n * The view-transition payload for the current navigation, as a signal the\n * outlet writes and the skeleton/target read (via {@link\n * injectCraftViewTransition}). `null` between/without view-transition\n * navigations.\n */\nexport const CRAFT_VIEW_TRANSITION = new InjectionToken<\n Signal<CraftViewTransitionInput>\n>('CRAFT_VIEW_TRANSITION', {\n providedIn: 'root',\n factory: () => signal<CraftViewTransitionInput>(null),\n});\n\n/** Reads the current navigation's view-transition payload (see {@link CRAFT_VIEW_TRANSITION}). */\nexport function injectCraftViewTransition(): Signal<CraftViewTransitionInput> {\n return inject(CRAFT_VIEW_TRANSITION);\n}\n\n/** Whether the outlet should drive `document.startViewTransition()` around its swaps. */\nexport const CRAFT_VIEW_TRANSITIONS_ENABLED = new InjectionToken<boolean>(\n 'CRAFT_VIEW_TRANSITIONS_ENABLED',\n { providedIn: 'root', factory: () => false },\n);\n\n/**\n * Whether the outlet should skip the `'blank'` phase while view transitions are\n * enabled. A blank surface between the previous page and the skeleton breaks the\n * shared-element morph, so routes that declare a `withLoaderViewTransitionImage`\n * payload always skip blank; this token lets `withCraftViewTransitions({ skipBlank })`\n * extend that to every route.\n */\nexport const CRAFT_VIEW_TRANSITION_SKIP_BLANK = new InjectionToken<boolean>(\n 'CRAFT_VIEW_TRANSITION_SKIP_BLANK',\n { providedIn: 'root', factory: () => false },\n);\n\n/** Runs `cb` inside a view transition. The seam tests override to capture the callback. */\nexport type CraftStartViewTransition = (cb: () => void) => void;\n\ninterface ViewTransitionDocument {\n startViewTransition?: (cb: () => void) => unknown;\n}\n\n/**\n * The function the outlet uses to bracket a swap in a view transition. The\n * default wraps `document.startViewTransition()`, but falls back to running\n * `cb` directly when the API is missing or the user prefers reduced motion.\n * Overridable in tests to capture the callback deterministically.\n */\nexport const CRAFT_START_VIEW_TRANSITION =\n new InjectionToken<CraftStartViewTransition>('CRAFT_START_VIEW_TRANSITION', {\n providedIn: 'root',\n factory: () => defaultStartViewTransition,\n });\n\nfunction defaultStartViewTransition(cb: () => void): void {\n const doc =\n typeof document !== 'undefined'\n ? (document as unknown as ViewTransitionDocument)\n : undefined;\n const prefersReducedMotion =\n typeof window !== 'undefined' &&\n typeof window.matchMedia === 'function' &&\n window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n if (!doc?.startViewTransition || prefersReducedMotion) {\n cb();\n return;\n }\n\n // Chromium can expose the API while failing to invoke the update callback\n // when a transition is started during router activation. Never leave the\n // outlet waiting forever for that callback: the fallback still commits the\n // new DOM, while the idempotent wrapper prevents a later native callback\n // from committing twice.\n let callbackCalled = false;\n const runOnce = () => {\n if (callbackCalled) {\n return;\n }\n callbackCalled = true;\n cb();\n };\n\n const transition = doc.startViewTransition(runOnce) as\n | {\n skipTransition?: () => void;\n ready?: Promise<unknown>;\n updateCallbackDone?: Promise<unknown>;\n finished?: Promise<unknown>;\n }\n | undefined;\n for (const promise of [\n transition?.ready,\n transition?.updateCallbackDone,\n transition?.finished,\n ]) {\n void promise?.catch(() => undefined);\n }\n queueMicrotask(() => {\n if (callbackCalled) {\n return;\n }\n runOnce();\n transition?.skipTransition?.();\n });\n}\n\n/**\n * Hands the {@link CraftRouterOutletController} control of the browser View\n * Transitions\n * API. Unlike Angular's `withViewTransitions()` — which brackets only the\n * synchronous URL commit — this drives `document.startViewTransition()` around\n * the outlet's *own* swaps (`previous page → skeleton → target`), so a\n * shared-element morph survives a slow guard/resolve chain.\n *\n * Routes that declare a `withLoaderViewTransitionImage` payload (via {@link\n * viewTransitionPayload}) additionally skip the `'blank'` phase (a blank surface\n * would break the morph) and require every `craftRouterLink` / `navigate`\n * targeting them to pass a typed `viewTransition` payload. Pass\n * `{ skipBlank: true }` to extend the blank-skip to all routes.\n *\n * ```ts\n * provideCraftRouter(\n * demoRoutes.toRoutes(),\n * withCraftViewTransitions(),\n * )\n * ```\n */\nexport function withCraftViewTransitions(options?: {\n skipBlank?: boolean;\n}): CraftLoadingFeature {\n return craftLoadingFeature([\n { provide: CRAFT_VIEW_TRANSITIONS_ENABLED, useValue: true },\n {\n provide: CRAFT_VIEW_TRANSITION_SKIP_BLANK,\n useValue: options?.skipBlank ?? false,\n },\n ]);\n}\n"]}
@@ -0,0 +1,30 @@
1
+ import { InjectionToken, type Provider } from './host/craft-compat';
2
+ /** Metadata describing a DOM event bound from a Craft template. */
3
+ export interface CraftDomEvent {
4
+ /** The native event received by the binding. */
5
+ readonly event: Event;
6
+ /** The normalized DOM event name, for example `click` or `mouseenter`. */
7
+ readonly eventName: string;
8
+ /** The element that owns the binding. */
9
+ readonly element: Element;
10
+ /** The element tag, normalized to lower case. */
11
+ readonly elementTag: string;
12
+ /** The optional local name passed to a named helper, for example `save`. */
13
+ readonly elementName?: string;
14
+ /** The Craft component whose template declared the element. */
15
+ readonly componentName?: string;
16
+ /** A stable descriptive key for the interaction location. */
17
+ readonly interactionName: string;
18
+ }
19
+ /**
20
+ * Cross-cutting behavior around a DOM action declared in a Craft template.
21
+ *
22
+ * Hooks compose in registration order. A hook must call `next()` to preserve
23
+ * the original template action; it may also do work before or after it.
24
+ */
25
+ export type CraftDomEventHook = (interaction: CraftDomEvent, next: () => unknown) => unknown;
26
+ /** All DOM hooks active in the current component injector. */
27
+ export declare const CRAFT_DOM_EVENT_HOOK: InjectionToken<readonly CraftDomEventHook[]>;
28
+ /** Register one composable DOM event hook. */
29
+ export declare function provideCraftDomEventHook(hook: CraftDomEventHook): Provider;
30
+ //# sourceMappingURL=dom-event-hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom-event-hook.d.ts","sourceRoot":"","sources":["../../../../../libs/core/src/lib/dom-event-hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpE,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,gDAAgD;IAChD,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,0EAA0E;IAC1E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,yCAAyC;IACzC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,iDAAiD;IACjD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,4EAA4E;IAC5E,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,+DAA+D;IAC/D,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,6DAA6D;IAC7D,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAC9B,WAAW,EAAE,aAAa,EAC1B,IAAI,EAAE,MAAM,OAAO,KAChB,OAAO,CAAC;AAEb,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB,8CAM/B,CAAC;AAEH,8CAA8C;AAC9C,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,iBAAiB,GAAG,QAAQ,CAM1E"}
@@ -0,0 +1,16 @@
1
+ import { InjectionToken } from './host/craft-compat';
2
+ /** All DOM hooks active in the current component injector. */
3
+ export const CRAFT_DOM_EVENT_HOOK = new InjectionToken('CRAFT_DOM_EVENT_HOOK', {
4
+ providedIn: 'root',
5
+ factory: () => [],
6
+ multi: true,
7
+ });
8
+ /** Register one composable DOM event hook. */
9
+ export function provideCraftDomEventHook(hook) {
10
+ return {
11
+ provide: CRAFT_DOM_EVENT_HOOK,
12
+ useValue: hook,
13
+ multi: true,
14
+ };
15
+ }
16
+ //# sourceMappingURL=dom-event-hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom-event-hook.js","sourceRoot":"","sources":["../../../../../libs/core/src/lib/dom-event-hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,qBAAqB,CAAC;AA+BpE,8DAA8D;AAC9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAEpD,sBAAsB,EAAE;IACxB,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE;IACjB,KAAK,EAAE,IAAI;CACZ,CAAC,CAAC;AAEH,8CAA8C;AAC9C,MAAM,UAAU,wBAAwB,CAAC,IAAuB;IAC9D,OAAO;QACL,OAAO,EAAE,oBAAoB;QAC7B,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;KACZ,CAAC;AACJ,CAAC","sourcesContent":["import { InjectionToken, type Provider } from './host/craft-compat';\n\n/** Metadata describing a DOM event bound from a Craft template. */\nexport interface CraftDomEvent {\n /** The native event received by the binding. */\n readonly event: Event;\n /** The normalized DOM event name, for example `click` or `mouseenter`. */\n readonly eventName: string;\n /** The element that owns the binding. */\n readonly element: Element;\n /** The element tag, normalized to lower case. */\n readonly elementTag: string;\n /** The optional local name passed to a named helper, for example `save`. */\n readonly elementName?: string;\n /** The Craft component whose template declared the element. */\n readonly componentName?: string;\n /** A stable descriptive key for the interaction location. */\n readonly interactionName: string;\n}\n\n/**\n * Cross-cutting behavior around a DOM action declared in a Craft template.\n *\n * Hooks compose in registration order. A hook must call `next()` to preserve\n * the original template action; it may also do work before or after it.\n */\nexport type CraftDomEventHook = (\n interaction: CraftDomEvent,\n next: () => unknown,\n) => unknown;\n\n/** All DOM hooks active in the current component injector. */\nexport const CRAFT_DOM_EVENT_HOOK = new InjectionToken<\n readonly CraftDomEventHook[]\n>('CRAFT_DOM_EVENT_HOOK', {\n providedIn: 'root',\n factory: () => [],\n multi: true,\n});\n\n/** Register one composable DOM event hook. */\nexport function provideCraftDomEventHook(hook: CraftDomEventHook): Provider {\n return {\n provide: CRAFT_DOM_EVENT_HOOK,\n useValue: hook,\n multi: true,\n };\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import { InjectionToken, type Provider } from './host/craft-compat';
2
+ export { isGenerator, isGeneratorFunction } from './craft-generator-runtime';
3
+ type AnyFactory = (...args: any[]) => any;
4
+ type AnyGeneratorFactory = (...args: any[]) => Generator<unknown, unknown, unknown>;
5
+ export type FnWrapper = (factory: AnyGeneratorFactory, thisArg: unknown, args: unknown[]) => Generator<unknown, unknown, unknown>;
6
+ export type FnFactoryAdapter = <F extends AnyFactory>(factory: F) => F;
7
+ export type FnWrapObserver = (factory: AnyFactory) => void;
8
+ export declare const FN_WRAPPER: InjectionToken<readonly FnWrapper[]>;
9
+ export declare const FN_WRAP_OBSERVER: InjectionToken<readonly FnWrapObserver[]>;
10
+ export declare function provideFnWrapper(_warning: string, wrapper: FnWrapper): Provider;
11
+ export declare function provideFnWrapObserver(observer: FnWrapObserver): Provider;
12
+ export declare function injectFnWrapper(): FnFactoryAdapter;
13
+ //# sourceMappingURL=fn-wrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fn-wrapper.d.ts","sourceRoot":"","sources":["../../../../../libs/core/src/lib/fn-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,cAAc,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG5E,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAE7E,KAAK,UAAU,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAC1C,KAAK,mBAAmB,GAAG,CACzB,GAAG,IAAI,EAAE,GAAG,EAAE,KACX,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAE1C,MAAM,MAAM,SAAS,GAAG,CACtB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,OAAO,EAAE,KACZ,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAE1C,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,SAAS,UAAU,EAAE,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;AACvE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,UAAU,KAAK,IAAI,CAAC;AAK3D,eAAO,MAAM,UAAU,sCAOtB,CAAC;AAEF,eAAO,MAAM,gBAAgB,2CAO5B,CAAC;AAIF,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,SAAS,GACjB,QAAQ,CAEV;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,cAAc,GAAG,QAAQ,CAExE;AAED,wBAAgB,eAAe,IAAI,gBAAgB,CAwBlD"}