@demlik/tea 0.13.0 → 0.15.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 (373) hide show
  1. package/README.md +11 -9
  2. package/dist/agent/index.d.ts +638 -45
  3. package/dist/agent/index.js +9 -19
  4. package/dist/{chunk-RH5EFRVJ.js → chunk-22POWGFA.js} +31 -5
  5. package/dist/chunk-22POWGFA.js.map +1 -0
  6. package/dist/{chunk-DMYGQB4O.js → chunk-3B5X7SBB.js} +23 -6
  7. package/dist/chunk-3B5X7SBB.js.map +1 -0
  8. package/dist/chunk-66PY5WYF.js +1816 -0
  9. package/dist/chunk-66PY5WYF.js.map +1 -0
  10. package/dist/{chunk-25LBDCBC.js → chunk-6IQPODUF.js} +2 -2
  11. package/dist/{chunk-25LBDCBC.js.map → chunk-6IQPODUF.js.map} +1 -1
  12. package/dist/chunk-AYS5N6WY.js +505 -0
  13. package/dist/chunk-AYS5N6WY.js.map +1 -0
  14. package/dist/{chunk-EWJP3YYP.js → chunk-HWVW4AXC.js} +3 -3
  15. package/dist/chunk-HWVW4AXC.js.map +1 -0
  16. package/dist/{chunk-O4MVQTEJ.js → chunk-L3TND7LA.js} +20 -16
  17. package/dist/chunk-L3TND7LA.js.map +1 -0
  18. package/dist/{chunk-J6527VRQ.js → chunk-LFZUK6J2.js} +3 -3
  19. package/dist/chunk-LFZUK6J2.js.map +1 -0
  20. package/dist/{chunk-D736QUGF.js → chunk-MYXFNWAJ.js} +4 -5
  21. package/dist/chunk-MYXFNWAJ.js.map +1 -0
  22. package/dist/{chunk-K575PT4S.js → chunk-PR6TB3BL.js} +15 -4
  23. package/dist/chunk-PR6TB3BL.js.map +1 -0
  24. package/dist/{chunk-YUXP55T2.js → chunk-Q5CQTBFA.js} +57 -7
  25. package/dist/chunk-Q5CQTBFA.js.map +1 -0
  26. package/dist/{batch-window/index.js → chunk-QPEVCJ5Q.js} +4 -8
  27. package/dist/chunk-QPEVCJ5Q.js.map +1 -0
  28. package/dist/chunk-TCLBCERH.js +1480 -0
  29. package/dist/chunk-TCLBCERH.js.map +1 -0
  30. package/dist/{chunk-FV3Z5MBE.js → chunk-TXN2KFHF.js} +14 -4
  31. package/dist/chunk-TXN2KFHF.js.map +1 -0
  32. package/dist/{chunk-MUUROGIH.js → chunk-V46HSVCK.js} +62 -12
  33. package/dist/chunk-V46HSVCK.js.map +1 -0
  34. package/dist/{chunk-Q2UM7BXU.js → chunk-VBDU4JL6.js} +2 -2
  35. package/dist/chunk-VBDU4JL6.js.map +1 -0
  36. package/dist/{chunk-ZVJZ72HY.js → chunk-VTQI2NHP.js} +25 -11
  37. package/dist/chunk-VTQI2NHP.js.map +1 -0
  38. package/dist/{core-Co0LWkIA.d.ts → core-DnzqWy6u.d.ts} +72 -23
  39. package/dist/devtools/index.d.ts +2 -2
  40. package/dist/devtools/index.js +207 -2
  41. package/dist/devtools/index.js.map +1 -1
  42. package/dist/do/index.d.ts +43 -29
  43. package/dist/do/index.js +36 -25
  44. package/dist/do/index.js.map +1 -1
  45. package/dist/{durable-effects-C6uwzjb5.d.ts → durable-effects-CWzA-o2B.d.ts} +2 -2
  46. package/dist/extension/index.d.ts +300 -3
  47. package/dist/extension/index.js +596 -5
  48. package/dist/extension/index.js.map +1 -1
  49. package/dist/flow/index.d.ts +1284 -0
  50. package/dist/flow/index.js +732 -0
  51. package/dist/flow/index.js.map +1 -0
  52. package/dist/idempotency/index.d.ts +90 -116
  53. package/dist/idempotency/index.js +4 -1
  54. package/dist/index-Bc40JWVl.d.ts +131 -0
  55. package/dist/{batch-window/index.d.ts → index-C2DwkjlP.d.ts} +7 -12
  56. package/dist/index-CA_7I5g9.d.ts +806 -0
  57. package/dist/index-CSyMYDAB.d.ts +69 -0
  58. package/dist/{fan-out/index.d.ts → index-CuNO9m8i.d.ts} +7 -9
  59. package/dist/{debounce/index.d.ts → index-DHSUmQTR.d.ts} +7 -7
  60. package/dist/{recorder/index.d.ts → index-DrIRb_Ch.d.ts} +4 -7
  61. package/dist/index-HSYgG2Yt.d.ts +380 -0
  62. package/dist/{monitored-run/index.d.ts → index-KXqTRJyb.d.ts} +37 -13
  63. package/dist/{snapshot/index.d.ts → index-ZCMhnVKN.d.ts} +15 -78
  64. package/dist/index.d.ts +771 -6
  65. package/dist/index.js +1 -2
  66. package/dist/jev/index.d.ts +646 -0
  67. package/dist/jev/index.js +485 -0
  68. package/dist/jev/index.js.map +1 -0
  69. package/dist/machine-DGlPWCWI.d.ts +1781 -0
  70. package/dist/machine-viz/index.d.ts +1 -1
  71. package/dist/machine-viz/index.js +12 -5
  72. package/dist/machine-viz/index.js.map +1 -1
  73. package/dist/mem/index.d.ts +18 -3
  74. package/dist/mem/index.js +22 -2
  75. package/dist/mem/index.js.map +1 -1
  76. package/dist/node/index.d.ts +104 -6
  77. package/dist/node/index.js +132 -9
  78. package/dist/node/index.js.map +1 -1
  79. package/dist/{paginator → paginate}/index.d.ts +140 -6
  80. package/dist/paginate/index.js +7 -0
  81. package/dist/parity/index.d.ts +4 -10
  82. package/dist/parity/index.js +4 -7
  83. package/dist/parity/index.js.map +1 -1
  84. package/dist/pbt/index.d.ts +247 -5
  85. package/dist/pbt/index.js +124 -5
  86. package/dist/pbt/index.js.map +1 -1
  87. package/dist/{trace-replay → persistence}/index.d.ts +7 -5
  88. package/dist/persistence/index.js +6 -0
  89. package/dist/{protocol-B5YmJr0d.d.ts → protocol-D8VbH-VH.d.ts} +10 -1
  90. package/dist/react/index.d.ts +2 -2
  91. package/dist/react/index.js +1 -2
  92. package/dist/react/index.js.map +1 -1
  93. package/dist/resilience/index.d.ts +744 -0
  94. package/dist/resilience/index.js +657 -0
  95. package/dist/resilience/index.js.map +1 -0
  96. package/dist/retry-backoff/index.d.ts +3 -2
  97. package/dist/retry-backoff/index.js +1 -1
  98. package/dist/runtime-types-CMF13BBh.d.ts +998 -0
  99. package/dist/testing/index.d.ts +147 -3
  100. package/dist/testing/index.js +95 -3
  101. package/dist/testing/index.js.map +1 -1
  102. package/dist/{throttled-input → timing}/index.d.ts +143 -12
  103. package/dist/{throttled-input → timing}/index.js +57 -12
  104. package/dist/timing/index.js.map +1 -0
  105. package/dist/{types-XS_miRnB.d.ts → types-BseNPIhr.d.ts} +1 -1
  106. package/dist/work-queue/index.d.ts +130 -54
  107. package/dist/work-queue/index.js +3 -2
  108. package/dist/work-queue/index.js.map +1 -1
  109. package/package.json +45 -218
  110. package/dist/authed-call/index.d.ts +0 -120
  111. package/dist/authed-call/index.js +0 -134
  112. package/dist/authed-call/index.js.map +0 -1
  113. package/dist/await-terminal/index.d.ts +0 -101
  114. package/dist/await-terminal/index.js +0 -76
  115. package/dist/await-terminal/index.js.map +0 -1
  116. package/dist/batch-window/index.js.map +0 -1
  117. package/dist/cache/index.d.ts +0 -152
  118. package/dist/cache/index.js +0 -8
  119. package/dist/chart/index.d.ts +0 -218
  120. package/dist/chart/index.js +0 -16
  121. package/dist/chart/index.js.map +0 -1
  122. package/dist/chart/inspect/index.d.ts +0 -86
  123. package/dist/chart/inspect/index.js +0 -5
  124. package/dist/chart/inspect/react.d.ts +0 -113
  125. package/dist/chart/inspect/react.js +0 -11
  126. package/dist/chart/inspect/react.js.map +0 -1
  127. package/dist/chart/inspect/styles.css +0 -286
  128. package/dist/chart/lane/index.d.ts +0 -362
  129. package/dist/chart/lane/index.js +0 -9
  130. package/dist/chart/lane/index.js.map +0 -1
  131. package/dist/chart/lane/react.d.ts +0 -84
  132. package/dist/chart/lane/react.js +0 -559
  133. package/dist/chart/lane/react.js.map +0 -1
  134. package/dist/chart/lane/server.d.ts +0 -148
  135. package/dist/chart/lane/server.js +0 -209
  136. package/dist/chart/lane/server.js.map +0 -1
  137. package/dist/chart/lane/styles.css +0 -498
  138. package/dist/chart/lane/viewer/assets/abnfDiagram-N423BO3Z-C729LI31.js +0 -1
  139. package/dist/chart/lane/viewer/assets/architectureDiagram-T3A2C74G-C729LI31.js +0 -1
  140. package/dist/chart/lane/viewer/assets/blockDiagram-VBNYF7ZC-C729LI31.js +0 -1
  141. package/dist/chart/lane/viewer/assets/c4Diagram-5PPSVZJV-C729LI31.js +0 -1
  142. package/dist/chart/lane/viewer/assets/chunk-2GRJ4B5K-HdDf8SI3.js +0 -1
  143. package/dist/chart/lane/viewer/assets/chunk-5RXB4S5H-CcNtpUd7.js +0 -231
  144. package/dist/chart/lane/viewer/assets/chunk-5VM5RSS4-BP4fRS_5.js +0 -15
  145. package/dist/chart/lane/viewer/assets/chunk-KBJHAD2P-DZOw7xU6.js +0 -1
  146. package/dist/chart/lane/viewer/assets/chunk-NSK5VX7P-CBCyTZMs.js +0 -128
  147. package/dist/chart/lane/viewer/assets/classDiagram-JCYQIIEL-C729LI31.js +0 -1
  148. package/dist/chart/lane/viewer/assets/classDiagram-v2-OCEON4UE-D4uAiFr8.js +0 -206
  149. package/dist/chart/lane/viewer/assets/cose-bilkent-JH36ORCC-DOwCrGXH.js +0 -1
  150. package/dist/chart/lane/viewer/assets/cynefinDiagram-MW4NZA55-C729LI31.js +0 -1
  151. package/dist/chart/lane/viewer/assets/dagre-K_PewWfS.js +0 -1
  152. package/dist/chart/lane/viewer/assets/dagre-VZM6K2ZE-831qZcA8.js +0 -4
  153. package/dist/chart/lane/viewer/assets/diagram-7IWD3JNH-C729LI31.js +0 -1
  154. package/dist/chart/lane/viewer/assets/diagram-B4RE2ZJO-C729LI31.js +0 -1
  155. package/dist/chart/lane/viewer/assets/diagram-LBJQPF4R-C729LI31.js +0 -1
  156. package/dist/chart/lane/viewer/assets/diagram-Q27KOJAE-C729LI31.js +0 -1
  157. package/dist/chart/lane/viewer/assets/diagram-UB23O5K3-C729LI31.js +0 -1
  158. package/dist/chart/lane/viewer/assets/ebnfDiagram-BXEA7PRR-C729LI31.js +0 -1
  159. package/dist/chart/lane/viewer/assets/erDiagram-JOGREHBK-C729LI31.js +0 -1
  160. package/dist/chart/lane/viewer/assets/flowDiagram-UKHOOZJN-C729LI31.js +0 -1
  161. package/dist/chart/lane/viewer/assets/ganttDiagram-PKOTCBZU-C729LI31.js +0 -1
  162. package/dist/chart/lane/viewer/assets/gitGraphDiagram-DS77QQ5N-C729LI31.js +0 -1
  163. package/dist/chart/lane/viewer/assets/index-9SkH5NA3.css +0 -1
  164. package/dist/chart/lane/viewer/assets/index-Bgt4sXpW.js +0 -195
  165. package/dist/chart/lane/viewer/assets/infoDiagram-6WML65LV-C729LI31.js +0 -1
  166. package/dist/chart/lane/viewer/assets/ishikawaDiagram-WSZJBQD7-C729LI31.js +0 -1
  167. package/dist/chart/lane/viewer/assets/journeyDiagram-NVQOT4AX-C729LI31.js +0 -1
  168. package/dist/chart/lane/viewer/assets/kanban-definition-27J2QSJJ-G7PaPzy-.js +0 -89
  169. package/dist/chart/lane/viewer/assets/katex-DOwCrGXH.js +0 -1
  170. package/dist/chart/lane/viewer/assets/mindmap-definition-FAOFIHXS-CGj9nrVk.js +0 -96
  171. package/dist/chart/lane/viewer/assets/path-fybaL0A-.js +0 -1
  172. package/dist/chart/lane/viewer/assets/pegDiagram-VL7TDLO6-C729LI31.js +0 -1
  173. package/dist/chart/lane/viewer/assets/pieDiagram-7S7Q4E2Y-C729LI31.js +0 -1
  174. package/dist/chart/lane/viewer/assets/quadrantDiagram-CIZ2JOQS-C729LI31.js +0 -1
  175. package/dist/chart/lane/viewer/assets/railroadDiagram-AXF67PYL-C729LI31.js +0 -1
  176. package/dist/chart/lane/viewer/assets/requirementDiagram-LRYGKXZP-C729LI31.js +0 -1
  177. package/dist/chart/lane/viewer/assets/sankeyDiagram-W5VNT64P-C729LI31.js +0 -1
  178. package/dist/chart/lane/viewer/assets/sequenceDiagram-SI44F4Z6-C729LI31.js +0 -1
  179. package/dist/chart/lane/viewer/assets/stateDiagram-OKZ733FA-B_88AzBS.js +0 -1
  180. package/dist/chart/lane/viewer/assets/stateDiagram-v2-UEYNNEHI-CR5gcgq6.js +0 -1
  181. package/dist/chart/lane/viewer/assets/swimlanes-SLNWSIFB-B4xK-rwg.js +0 -1
  182. package/dist/chart/lane/viewer/assets/swimlanesDiagram-ULZ7WXOC-C729LI31.js +0 -1
  183. package/dist/chart/lane/viewer/assets/timeline-definition-Z64GVDOM-CCv52MfY.js +0 -120
  184. package/dist/chart/lane/viewer/assets/vennDiagram-T6HMQDX7-C729LI31.js +0 -1
  185. package/dist/chart/lane/viewer/assets/wardleyDiagram-T6FBY63Y-C729LI31.js +0 -1
  186. package/dist/chart/lane/viewer/assets/xychartDiagram-ELKLHX3M-C729LI31.js +0 -1
  187. package/dist/chart/lane/viewer/index.html +0 -15
  188. package/dist/chart/report/index.d.ts +0 -117
  189. package/dist/chart/report/index.js +0 -32
  190. package/dist/chart/report/index.js.map +0 -1
  191. package/dist/chunk-2YFLOCWX.js +0 -15
  192. package/dist/chunk-2YFLOCWX.js.map +0 -1
  193. package/dist/chunk-3I52QZZ5.js +0 -519
  194. package/dist/chunk-3I52QZZ5.js.map +0 -1
  195. package/dist/chunk-3ZAFFRRB.js +0 -457
  196. package/dist/chunk-3ZAFFRRB.js.map +0 -1
  197. package/dist/chunk-4EQZ76JC.js +0 -33
  198. package/dist/chunk-4EQZ76JC.js.map +0 -1
  199. package/dist/chunk-4KLG43GY.js +0 -223
  200. package/dist/chunk-4KLG43GY.js.map +0 -1
  201. package/dist/chunk-7FRZ2CT2.js +0 -424
  202. package/dist/chunk-7FRZ2CT2.js.map +0 -1
  203. package/dist/chunk-AZZLE7XR.js +0 -62
  204. package/dist/chunk-AZZLE7XR.js.map +0 -1
  205. package/dist/chunk-BYQUGDD3.js +0 -16
  206. package/dist/chunk-BYQUGDD3.js.map +0 -1
  207. package/dist/chunk-CIQG5L42.js +0 -685
  208. package/dist/chunk-CIQG5L42.js.map +0 -1
  209. package/dist/chunk-CLM6ERNO.js +0 -61
  210. package/dist/chunk-CLM6ERNO.js.map +0 -1
  211. package/dist/chunk-COS5MSTO.js +0 -88
  212. package/dist/chunk-COS5MSTO.js.map +0 -1
  213. package/dist/chunk-CRPZJVD2.js +0 -71
  214. package/dist/chunk-CRPZJVD2.js.map +0 -1
  215. package/dist/chunk-D62FDQKE.js +0 -53
  216. package/dist/chunk-D62FDQKE.js.map +0 -1
  217. package/dist/chunk-D736QUGF.js.map +0 -1
  218. package/dist/chunk-DGE4PV4A.js +0 -26
  219. package/dist/chunk-DGE4PV4A.js.map +0 -1
  220. package/dist/chunk-DMYGQB4O.js.map +0 -1
  221. package/dist/chunk-EWJP3YYP.js.map +0 -1
  222. package/dist/chunk-FV3Z5MBE.js.map +0 -1
  223. package/dist/chunk-HCEVHFJ7.js +0 -54
  224. package/dist/chunk-HCEVHFJ7.js.map +0 -1
  225. package/dist/chunk-J6527VRQ.js.map +0 -1
  226. package/dist/chunk-JELSZN25.js +0 -47
  227. package/dist/chunk-JELSZN25.js.map +0 -1
  228. package/dist/chunk-K575PT4S.js.map +0 -1
  229. package/dist/chunk-L57ZOT5K.js +0 -184
  230. package/dist/chunk-L57ZOT5K.js.map +0 -1
  231. package/dist/chunk-MU6MCIAC.js +0 -15
  232. package/dist/chunk-MU6MCIAC.js.map +0 -1
  233. package/dist/chunk-MUUROGIH.js.map +0 -1
  234. package/dist/chunk-NR7BU22N.js +0 -758
  235. package/dist/chunk-NR7BU22N.js.map +0 -1
  236. package/dist/chunk-O4MVQTEJ.js.map +0 -1
  237. package/dist/chunk-OOYD44JI.js +0 -317
  238. package/dist/chunk-OOYD44JI.js.map +0 -1
  239. package/dist/chunk-Q2UM7BXU.js.map +0 -1
  240. package/dist/chunk-RH5EFRVJ.js.map +0 -1
  241. package/dist/chunk-S2EGRPCM.js +0 -47
  242. package/dist/chunk-S2EGRPCM.js.map +0 -1
  243. package/dist/chunk-SINXE47Y.js +0 -55
  244. package/dist/chunk-SINXE47Y.js.map +0 -1
  245. package/dist/chunk-UF4MZSLT.js +0 -53
  246. package/dist/chunk-UF4MZSLT.js.map +0 -1
  247. package/dist/chunk-UOC2PL46.js +0 -13
  248. package/dist/chunk-UOC2PL46.js.map +0 -1
  249. package/dist/chunk-VYFAZN3F.js +0 -372
  250. package/dist/chunk-VYFAZN3F.js.map +0 -1
  251. package/dist/chunk-WRAA7GVZ.js +0 -209
  252. package/dist/chunk-WRAA7GVZ.js.map +0 -1
  253. package/dist/chunk-XGELA764.js +0 -163
  254. package/dist/chunk-XGELA764.js.map +0 -1
  255. package/dist/chunk-YUXP55T2.js.map +0 -1
  256. package/dist/chunk-YWIKDKHY.js +0 -307
  257. package/dist/chunk-YWIKDKHY.js.map +0 -1
  258. package/dist/chunk-ZJ5AOYBH.js +0 -8
  259. package/dist/chunk-ZJ5AOYBH.js.map +0 -1
  260. package/dist/chunk-ZSUUOEPL.js +0 -731
  261. package/dist/chunk-ZSUUOEPL.js.map +0 -1
  262. package/dist/chunk-ZVJZ72HY.js.map +0 -1
  263. package/dist/circuit-breaker/index.d.ts +0 -197
  264. package/dist/circuit-breaker/index.js +0 -3
  265. package/dist/circuit-breaker/index.js.map +0 -1
  266. package/dist/deadline/index.d.ts +0 -199
  267. package/dist/deadline/index.js +0 -6
  268. package/dist/deadline/index.js.map +0 -1
  269. package/dist/debounce/index.js +0 -3
  270. package/dist/debounce/index.js.map +0 -1
  271. package/dist/extension/react.d.ts +0 -121
  272. package/dist/extension/react.js +0 -75
  273. package/dist/extension/react.js.map +0 -1
  274. package/dist/extension/subs/index.d.ts +0 -45
  275. package/dist/extension/subs/index.js +0 -80
  276. package/dist/extension/subs/index.js.map +0 -1
  277. package/dist/extension/test-utils.d.ts +0 -128
  278. package/dist/extension/test-utils.js +0 -277
  279. package/dist/extension/test-utils.js.map +0 -1
  280. package/dist/fan-out/index.js +0 -5
  281. package/dist/fan-out/index.js.map +0 -1
  282. package/dist/fold-BJPdjc9w.d.ts +0 -435
  283. package/dist/graph-B3L5e0N1.d.ts +0 -923
  284. package/dist/idempotency/adapter.d.ts +0 -62
  285. package/dist/idempotency/adapter.js +0 -4
  286. package/dist/idempotency/adapter.js.map +0 -1
  287. package/dist/idempotent-intake/index.d.ts +0 -188
  288. package/dist/idempotent-intake/index.js +0 -7
  289. package/dist/idempotent-intake/index.js.map +0 -1
  290. package/dist/journal/index.d.ts +0 -373
  291. package/dist/journal/index.js +0 -3
  292. package/dist/journal/index.js.map +0 -1
  293. package/dist/llm-call/index.d.ts +0 -311
  294. package/dist/llm-call/index.js +0 -16
  295. package/dist/llm-call/index.js.map +0 -1
  296. package/dist/machine-BtFWQmmq.d.ts +0 -804
  297. package/dist/monitored-run/index.js +0 -10
  298. package/dist/monitored-run/index.js.map +0 -1
  299. package/dist/paginated-walk/index.d.ts +0 -235
  300. package/dist/paginated-walk/index.js +0 -16
  301. package/dist/paginated-walk/index.js.map +0 -1
  302. package/dist/paginator/index.js +0 -3
  303. package/dist/paginator/index.js.map +0 -1
  304. package/dist/pbt/arbitraries/index.d.ts +0 -136
  305. package/dist/pbt/arbitraries/index.js +0 -3
  306. package/dist/pbt/arbitraries/index.js.map +0 -1
  307. package/dist/pbt/runners/index.d.ts +0 -118
  308. package/dist/pbt/runners/index.js +0 -5
  309. package/dist/pbt/runners/index.js.map +0 -1
  310. package/dist/poller/index.d.ts +0 -352
  311. package/dist/poller/index.js +0 -115
  312. package/dist/poller/index.js.map +0 -1
  313. package/dist/prediction/index.d.ts +0 -131
  314. package/dist/prediction/index.js +0 -4
  315. package/dist/prediction/index.js.map +0 -1
  316. package/dist/pure/index.d.ts +0 -3
  317. package/dist/pure/index.js +0 -4
  318. package/dist/pure/index.js.map +0 -1
  319. package/dist/rate-limit/index.d.ts +0 -115
  320. package/dist/rate-limit/index.js +0 -3
  321. package/dist/rate-limit/index.js.map +0 -1
  322. package/dist/reconciler/index.d.ts +0 -193
  323. package/dist/reconciler/index.js +0 -164
  324. package/dist/reconciler/index.js.map +0 -1
  325. package/dist/recorder/index.js +0 -3
  326. package/dist/recorder/index.js.map +0 -1
  327. package/dist/reducer-4GNR6b8B.d.ts +0 -447
  328. package/dist/resilient-call/index.d.ts +0 -320
  329. package/dist/resilient-call/index.js +0 -14
  330. package/dist/resilient-call/index.js.map +0 -1
  331. package/dist/retry-to-success/index.d.ts +0 -109
  332. package/dist/retry-to-success/index.js +0 -37
  333. package/dist/retry-to-success/index.js.map +0 -1
  334. package/dist/run-pAcmBpah.d.ts +0 -713
  335. package/dist/runtime-types-CNLmhWif.d.ts +0 -517
  336. package/dist/saga/index.d.ts +0 -241
  337. package/dist/saga/index.js +0 -150
  338. package/dist/saga/index.js.map +0 -1
  339. package/dist/samples-B3My5oh2.d.ts +0 -59
  340. package/dist/snapshot/index.js +0 -5
  341. package/dist/snapshot/index.js.map +0 -1
  342. package/dist/subs/index.d.ts +0 -472
  343. package/dist/subs/index.js +0 -7
  344. package/dist/subs/index.js.map +0 -1
  345. package/dist/throttle/index.d.ts +0 -134
  346. package/dist/throttle/index.js +0 -3
  347. package/dist/throttle/index.js.map +0 -1
  348. package/dist/throttled-input/index.js.map +0 -1
  349. package/dist/token-refresh/index.d.ts +0 -216
  350. package/dist/token-refresh/index.js +0 -6
  351. package/dist/token-refresh/index.js.map +0 -1
  352. package/dist/trace-replay/index.js +0 -6
  353. package/dist/trace-replay/index.js.map +0 -1
  354. package/dist/with-deadline/index.d.ts +0 -197
  355. package/dist/with-deadline/index.js +0 -111
  356. package/dist/with-deadline/index.js.map +0 -1
  357. package/dist/with-resilience/index.d.ts +0 -225
  358. package/dist/with-resilience/index.js +0 -240
  359. package/dist/with-resilience/index.js.map +0 -1
  360. package/dist/with-telemetry/index.d.ts +0 -150
  361. package/dist/with-telemetry/index.js +0 -70
  362. package/dist/with-telemetry/index.js.map +0 -1
  363. package/dist/work-queue/adapter.d.ts +0 -84
  364. package/dist/work-queue/adapter.js +0 -4
  365. package/dist/work-queue/adapter.js.map +0 -1
  366. package/dist/work-queue/ops.d.ts +0 -71
  367. package/dist/work-queue/ops.js +0 -3
  368. package/dist/work-queue/ops.js.map +0 -1
  369. package/dist/workflow/index.d.ts +0 -485
  370. package/dist/workflow/index.js +0 -244
  371. package/dist/workflow/index.js.map +0 -1
  372. /package/dist/{cache → paginate}/index.js.map +0 -0
  373. /package/dist/{chart/inspect → persistence}/index.js.map +0 -0
@@ -1,84 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as Samples } from '../../samples-B3My5oh2.js';
3
- import { I as ImportedLane, L as LogEntry } from '../../fold-BJPdjc9w.js';
4
- import { L as LaneTaskId, a as LaneTaskChart, b as LaneHandsOf } from '../../run-pAcmBpah.js';
5
- import '../../graph-B3L5e0N1.js';
6
- import '../../core-Co0LWkIA.js';
7
- import 'zod';
8
- import '../index.js';
9
-
10
- /**
11
- * Everything `<LaneView>` needs, and it is the two files a fabrika lane IS.
12
- *
13
- * There is no prop for the phases, the tasks, the states, the standings, the
14
- * terminal or what anything is waiting on: every one of those is derived from
15
- * these two, and a prop restating one would be the fact said twice.
16
- */
17
- interface LaneViewProps {
18
- /** The lane. `chartFromWorkflow(document)` or `defineLane(spec)` — either door. */
19
- readonly lane: ImportedLane;
20
- /** Its event log — `parseEventsJsonl(...)` or `parseHistoryJson(...)`. */
21
- readonly log: readonly LogEntry[];
22
- /** Heading. Cosmetic — defaults to the document's own `id`. */
23
- readonly title?: string;
24
- /** Appended to the container's class list. */
25
- readonly className?: string;
26
- }
27
- /**
28
- * One sample bag per task, each typed by THAT task's chart.
29
- *
30
- * The one thing a lane genuinely cannot derive, and the only reason it is a
31
- * prop: `ty<T>()` is `{}` at runtime, so a payload's shape is erased before any
32
- * runtime code could read it. Optional per task, because a task whose events
33
- * declare no payload has nothing to supply.
34
- *
35
- * WHAT A LANE LOSES, said here rather than found out. `defineLane` LOWERS its
36
- * charts to the runtime-typed form the fold and the drawing share, and that form
37
- * records which events a state routes and NOT which of them declare a payload.
38
- * So no control is ever reported as blocked for want of a sample: a msg is built
39
- * either way, with the sample merged in when one was given. Supply one where a
40
- * guard reads a payload field, and the guard preview reads the field you meant.
41
- */
42
- type LaneSamples<L> = {
43
- readonly [T in LaneTaskId<L>]?: Samples<LaneTaskChart<L, T>>;
44
- };
45
- /**
46
- * Everything `<LiveLaneView>` needs — the lane, and the hands `runLane` demands.
47
- *
48
- * `hands` is not a restatement of the lane: it is the code the lane deliberately
49
- * does not own (each region's `parts`, and where each instance BOOTS, which an
50
- * emitted epic decides per sub-issue). It is the same bag `runLane` takes, so
51
- * an author passes the one they already built.
52
- */
53
- interface LiveLaneViewProps<L, H, Ctx> {
54
- readonly lane: L;
55
- /** The parts and boot state per task — the same bag `runLane` demands. */
56
- readonly hands: H;
57
- /** One payload sample per event that declares one, per task. */
58
- readonly samples?: LaneSamples<L>;
59
- /** The runtime ctx. Omit for a lane whose regions read nothing from one. */
60
- readonly ctx?: Ctx;
61
- readonly title?: string;
62
- readonly className?: string;
63
- }
64
- /**
65
- * A lane that has already run, looked at: the REPLAY source.
66
- *
67
- * The scrubber folds a prefix of the real log, which is not an approximation of
68
- * the state at step k but the definition of it (`fold.ts`), so dragging it
69
- * backwards shows exactly what the driver would have printed at that moment.
70
- * Nothing is dispatchable and every control says why.
71
- */
72
- declare function LaneView(props: LaneViewProps): react_jsx_runtime.JSX.Element;
73
- /**
74
- * The same page over a lane that is RUNNING — the LIVE source.
75
- *
76
- * It owns a runtime for its lifetime (`runLane`'s `init`/`update`, built into a
77
- * `Machine` here rather than asked for, so the drawing and the runtime provably
78
- * come from the same lane) and records it, so the scrubber time-travels by the
79
- * same pure `replay` `<ChartInspector>`'s does: `init` + `update` only, never
80
- * `interpret`, so dragging backwards cannot re-fire an effect.
81
- */
82
- declare function LiveLaneView<L extends ImportedLane, const H extends LaneHandsOf<L, H>, Ctx = Record<never, never>>(props: LiveLaneViewProps<L, H, Ctx>): react_jsx_runtime.JSX.Element;
83
-
84
- export { type LaneSamples, LaneView, type LaneViewProps, LiveLaneView, type LiveLaneViewProps };
@@ -1,559 +0,0 @@
1
- import { useInspectorRuntime } from '../../chunk-7FRZ2CT2.js';
2
- import { replayFeed, runLane, liveFeed, laneView } from '../../chunk-CIQG5L42.js';
3
- import '../../chunk-3ZAFFRRB.js';
4
- import '../../chunk-NR7BU22N.js';
5
- import '../../chunk-YWIKDKHY.js';
6
- import '../../chunk-UOC2PL46.js';
7
- import '../../chunk-MUUROGIH.js';
8
- import { replay } from '../../chunk-ZSUUOEPL.js';
9
- import '../../chunk-OOYD44JI.js';
10
- import '../../chunk-WRAA7GVZ.js';
11
- import '../../chunk-EWJP3YYP.js';
12
- import { useMemo, useReducer, useEffect, useRef, useState } from 'react';
13
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
14
-
15
- function LaneView(props) {
16
- const feed = useMemo(
17
- () => replayFeed(props.lane, props.log),
18
- [props.lane, props.log]
19
- );
20
- return /* @__PURE__ */ jsx(
21
- LanePanels,
22
- {
23
- feed,
24
- title: props.title,
25
- className: props.className,
26
- send: null
27
- }
28
- );
29
- }
30
- function LiveLaneView(props) {
31
- const { lane, hands, ctx } = props;
32
- const [epoch, reset] = useReducer((n) => n + 1, 0);
33
- const machine = useMemo(
34
- () => (
35
- // The one cast, at the construction boundary — `runLane` returns exactly
36
- // the `init` and `update` a `Machine` is made of, over the lane's own
37
- // derivations, and `Machine` wants them under the caller's names.
38
- { ...runLane(lane, hands) }
39
- ),
40
- [lane, hands]
41
- );
42
- const { rt, rec } = useInspectorRuntime(machine, ctx, epoch);
43
- if (rt === null) {
44
- return /* @__PURE__ */ jsx("div", { className: containerClass(props.className), children: /* @__PURE__ */ jsx("div", { className: "tea-lv-boot", children: "booting\u2026" }) });
45
- }
46
- return /* @__PURE__ */ jsx(
47
- LiveLanePanels,
48
- {
49
- lane,
50
- hands,
51
- samples: props.samples,
52
- machine,
53
- runtime: rt,
54
- rec,
55
- ctx,
56
- title: props.title,
57
- className: props.className,
58
- onReset: reset
59
- },
60
- epoch
61
- );
62
- }
63
- function LiveLanePanels({
64
- lane,
65
- hands,
66
- samples,
67
- machine,
68
- runtime,
69
- rec,
70
- ctx,
71
- title,
72
- className,
73
- onReset
74
- }) {
75
- const [, bump] = useReducer((n) => n + 1, 0);
76
- useEffect(() => runtime.subscribe(bump), [runtime]);
77
- const live = runtime.getState();
78
- const trace = safeDump(rec, live);
79
- const tape = useRef(trace);
80
- tape.current = trace;
81
- const now = useRef(live);
82
- now.current = live;
83
- const total = trace.msgs.length;
84
- const feed = useMemo(
85
- () => liveFeed(lane, {
86
- regionsAt: (n) => regionsOf(
87
- replayPrefix(machine, tape.current, ctx, n, now.current),
88
- // a fold that threw leaves the live regions as the honest answer
89
- regionsOf(now.current, {})
90
- ),
91
- msgs: tape.current.msgs,
92
- optsFor: (task) => ({
93
- ...hands[task]?.parts === void 0 ? {} : { parts: hands[task]?.parts },
94
- ...samples?.[task] === void 0 ? {} : { samples: samples[task] }
95
- })
96
- }),
97
- [lane, hands, samples, machine, ctx, total]
98
- );
99
- return /* @__PURE__ */ jsx(
100
- LanePanels,
101
- {
102
- feed,
103
- title,
104
- className,
105
- send: (msg) => runtime.dispatch(msg),
106
- onReset
107
- }
108
- );
109
- }
110
- function containerClass(extra) {
111
- return `tea-lv${extra ? ` ${extra}` : ""}`;
112
- }
113
- var Sep = () => /* @__PURE__ */ jsx("span", { className: "tea-lv-sep", children: " \xB7 " });
114
- var NO_SEND = "this view was given no way to dispatch";
115
- function endingWord(view) {
116
- if (view.terminal === null) return "still running";
117
- return view.tripped.length > 0 ? "stopped here" : "finished";
118
- }
119
- function LanePanels({
120
- feed,
121
- title,
122
- className,
123
- send,
124
- onReset
125
- }) {
126
- const [at, setAt] = useState(null);
127
- const cursor = at === null ? feed.total : Math.min(at, feed.total);
128
- const view = laneView(feed, cursor, title);
129
- const blocked = view.scrubbed ? `you are looking at step ${view.cursor} of ${view.total}. A button dispatches into the lane as it is NOW \u2014 press \u201Cnow\u201D to get them back.` : view.noDispatch?.why;
130
- const page = {
131
- dispatch: send !== null && blocked === void 0 ? { send } : { blocked: blocked ?? NO_SEND },
132
- foldControls: view.noDispatch !== void 0,
133
- ended: view.terminal !== null
134
- };
135
- return /* @__PURE__ */ jsxs("div", { className: containerClass(className), "data-source": view.source, children: [
136
- /* @__PURE__ */ jsxs("header", { className: "tea-lv-head", children: [
137
- /* @__PURE__ */ jsx("span", { className: "tea-lv-title", children: view.title }),
138
- /* @__PURE__ */ jsx(Sep, {}),
139
- /* @__PURE__ */ jsx("span", { className: "tea-lv-src", "data-source": view.source, children: view.source }),
140
- /* @__PURE__ */ jsx(Sep, {}),
141
- /* @__PURE__ */ jsxs("span", { className: "tea-lv-now", "data-lane-status": view.status, children: [
142
- view.terminal === null ? /* @__PURE__ */ jsx("span", { className: "tea-lv-phase", children: view.activePhase ?? "\u2014" }) : /* @__PURE__ */ jsx("span", { className: "tea-lv-terminal", children: view.terminal }),
143
- /* @__PURE__ */ jsx(Sep, {}),
144
- /* @__PURE__ */ jsx("span", { className: "tea-lv-status", children: endingWord(view) })
145
- ] }),
146
- view.scrubbed ? /* @__PURE__ */ jsxs(Fragment, { children: [
147
- /* @__PURE__ */ jsx(Sep, {}),
148
- /* @__PURE__ */ jsxs("span", { className: "tea-lv-warn", children: [
149
- "time-travelling \u2014 step ",
150
- view.cursor,
151
- " of ",
152
- view.total
153
- ] })
154
- ] }) : null
155
- ] }),
156
- /* @__PURE__ */ jsxs("p", { className: "tea-lv-lede", children: [
157
- view.phases.length === 1 ? /* @__PURE__ */ jsxs(Fragment, { children: [
158
- "A ",
159
- /* @__PURE__ */ jsx("b", { children: "lane" }),
160
- " is a run of phases \u2014 this one has a single phase."
161
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
162
- "A ",
163
- /* @__PURE__ */ jsx("b", { children: "lane" }),
164
- " is ",
165
- view.phases.length,
166
- " phases that run one after another."
167
- ] }),
168
- " ",
169
- "Each phase holds tasks that run ",
170
- /* @__PURE__ */ jsx("i", { children: "at the same time" }),
171
- ", and every task is one state machine \u2014 the diagram below it is that machine, with the state it is in right now lit up. A phase finishes when all of its tasks finish;",
172
- " ",
173
- view.terminal === null ? /* @__PURE__ */ jsxs(Fragment, { children: [
174
- "right now ",
175
- /* @__PURE__ */ jsx("b", { children: view.activePhase }),
176
- " is the one running."
177
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
178
- "this lane has ended, on ",
179
- /* @__PURE__ */ jsx("b", { children: view.terminal }),
180
- "."
181
- ] })
182
- ] }),
183
- "blocked" in page.dispatch ? /* @__PURE__ */ jsx("p", { className: "tea-lv-unavailable", "data-unavailable": "dispatch", children: page.dispatch.blocked }) : null,
184
- /* @__PURE__ */ jsx(StuckPanel, { view }),
185
- view.phases.map((phase) => /* @__PURE__ */ jsx(PhasePanel, { phase, page }, phase.name)),
186
- /* @__PURE__ */ jsx(
187
- TimelinePanel,
188
- {
189
- view,
190
- onScrub: setAt,
191
- onLive: () => setAt(null),
192
- onReset
193
- }
194
- )
195
- ] });
196
- }
197
- function StuckPanel({ view }) {
198
- return /* @__PURE__ */ jsxs("section", { className: "tea-lv-panel tea-lv-stuck", children: [
199
- /* @__PURE__ */ jsxs("h3", { className: "tea-lv-h", children: [
200
- "1 \xB7 is anything blocked?",
201
- /* @__PURE__ */ jsx(Sep, {}),
202
- /* @__PURE__ */ jsx("span", { className: "tea-lv-hint", children: "a task nothing can move until someone acts" })
203
- ] }),
204
- view.stuck.length === 0 ? (
205
- // Said, never left blank: "nothing is stuck" is an answer, and an empty
206
- // panel is the reader wondering whether the question was asked.
207
- /* @__PURE__ */ jsx("p", { className: "tea-lv-none", children: "nothing is stuck \u2014 every task can still move" })
208
- ) : /* @__PURE__ */ jsx("ul", { className: "tea-lv-stucklist", children: view.stuck.map((s) => /* @__PURE__ */ jsxs("li", { "data-stuck": s.reason.kind, "data-task": s.task, children: [
209
- /* @__PURE__ */ jsx("b", { children: s.task }),
210
- " ",
211
- /* @__PURE__ */ jsxs("span", { className: "tea-lv-muted", children: [
212
- "(",
213
- s.phase,
214
- ")"
215
- ] }),
216
- " ",
217
- "\u2014 ",
218
- stuckLine(s.reason)
219
- ] }, s.task)) }),
220
- view.tripped.length === 0 ? null : /* @__PURE__ */ jsxs("p", { className: "tea-lv-tripped", children: [
221
- "tripped: ",
222
- view.tripped.join(", ")
223
- ] })
224
- ] });
225
- }
226
- function stuckLine(reason) {
227
- if (reason === null) return "";
228
- switch (reason.kind) {
229
- case "tripped":
230
- return `landed on the error final \`${reason.state}\` \u2014 as finished as a shipped task, and lost`;
231
- case "dead-end":
232
- return `\`${reason.state}\` routes no event and is not a final \u2014 nobody can move it`;
233
- case "budget-spent":
234
- return `\`${reason.state}\` has spent its retry budget \u2014 the next \`${reason.event}\` is \`${reason.landsOn}\`, not a retry`;
235
- case "awaiting-world":
236
- return `\`${reason.state}\` moves only when ${reason.roles.join(" or ")} sends ${reason.events.map((e) => `\`${e}\``).join(" or ")} \u2014 no cmd or sub can arrive here`;
237
- }
238
- }
239
- function phaseCount(phase) {
240
- const n = phase.tasks.length;
241
- const tasks = `${n} task${n === 1 ? "" : "s"}`;
242
- switch (phase.standing) {
243
- case "active":
244
- return n === 1 ? `${tasks}, running` : `${tasks}, running together`;
245
- case "complete":
246
- return `${tasks}, all finished`;
247
- case "tripped":
248
- return n === 1 ? `${tasks}, stopped on an error` : `${tasks} \u2014 ${phase.tripped.length} stopped on an error`;
249
- case "waiting":
250
- return `${tasks}, not started`;
251
- }
252
- }
253
- function PhasePanel({
254
- phase,
255
- page
256
- }) {
257
- const count = phaseCount(phase);
258
- return /* @__PURE__ */ jsxs(
259
- "section",
260
- {
261
- className: `tea-lv-panel tea-lv-phase-${phase.standing}`,
262
- "data-phase": phase.name,
263
- "data-standing": phase.standing,
264
- children: [
265
- /* @__PURE__ */ jsxs("h3", { className: "tea-lv-h", children: [
266
- phase.index === 0 ? "2 \xB7 " : "",
267
- phase.name,
268
- " ",
269
- /* @__PURE__ */ jsx("span", { className: "tea-lv-standing", children: phase.standing }),
270
- /* @__PURE__ */ jsx(Sep, {}),
271
- /* @__PURE__ */ jsx("span", { className: "tea-lv-muted", children: count })
272
- ] }),
273
- /* @__PURE__ */ jsx("ul", { className: "tea-lv-chips", children: phase.tasks.map((task) => /* @__PURE__ */ jsxs(
274
- "li",
275
- {
276
- className: "tea-lv-chip",
277
- "data-task": task.task,
278
- "data-state": task.state,
279
- "data-end": String(task.endPolarity),
280
- children: [
281
- /* @__PURE__ */ jsx("b", { children: task.task }),
282
- " = ",
283
- task.state,
284
- task.endPolarity === "error" ? " (tripped)" : ""
285
- ]
286
- },
287
- task.task
288
- )) }),
289
- phase.tasks.map((task) => /* @__PURE__ */ jsx(
290
- TaskPanel,
291
- {
292
- task,
293
- expanded: phase.expanded.includes(task.task),
294
- alone: phase.tasks.length === 1,
295
- page
296
- },
297
- task.task
298
- ))
299
- ]
300
- }
301
- );
302
- }
303
- function waitingLine(task, alone, ended) {
304
- if (task.waitingOn !== null) return task.waitingOn;
305
- if (task.endPolarity !== "error") return "nothing \u2014 this task is final";
306
- const landed = `nothing \u2014 this task landed on the error final \`${task.state}\``;
307
- if (ended) return `${landed}, which is what stopped the lane`;
308
- if (alone) return `${landed}, and that trips \`${task.phase}\``;
309
- return `${landed}, and \`${task.phase}\` will trip the lane once its siblings finish`;
310
- }
311
- function TaskPanel({
312
- task,
313
- expanded,
314
- alone,
315
- page
316
- }) {
317
- const [opened, setOpened] = useState(false);
318
- const showDiagram = expanded || opened;
319
- const waiting = waitingLine(task, alone, page.ended);
320
- const body = /* @__PURE__ */ jsxs(Fragment, { children: [
321
- /* @__PURE__ */ jsxs("p", { className: "tea-lv-waiting", children: [
322
- "waiting on: ",
323
- waiting
324
- ] }),
325
- /* @__PURE__ */ jsx(Budget, { task }),
326
- page.foldControls ? /* @__PURE__ */ jsxs("details", { className: "tea-lv-accepts", children: [
327
- /* @__PURE__ */ jsxs("summary", { children: [
328
- "which events this state accepts (",
329
- task.controls.filter((c) => !c.refused).length,
330
- " of",
331
- " ",
332
- task.controls.length,
333
- ")"
334
- ] }),
335
- /* @__PURE__ */ jsx("div", { className: "tea-lv-controls", children: task.controls.map((control) => /* @__PURE__ */ jsx(
336
- Control,
337
- {
338
- control,
339
- dispatch: page.dispatch
340
- },
341
- control.event
342
- )) })
343
- ] }) : /* @__PURE__ */ jsx("div", { className: "tea-lv-controls", children: task.controls.map((control) => /* @__PURE__ */ jsx(
344
- Control,
345
- {
346
- control,
347
- dispatch: page.dispatch
348
- },
349
- control.event
350
- )) }),
351
- showDiagram ? /* @__PURE__ */ jsx("pre", { className: "mermaid tea-lv-mermaid", children: task.diagram }, task.diagram) : null
352
- ] });
353
- if (!expanded) {
354
- return (
355
- /* The chip row above already says `task = state` for every task in the
356
- phase. A collapsed disclosure that repeats it lists each task twice,
357
- adjacent — which reads as a bug and was one, found by rendering a real
358
- eight-task phase rather than by any assertion. So the summary says what
359
- the chip cannot: that there is more here, and whether it has begun. */
360
- /* @__PURE__ */ jsxs(
361
- "details",
362
- {
363
- className: "tea-lv-task tea-lv-collapsed",
364
- "data-task": task.task,
365
- onToggle: (e) => setOpened(e.currentTarget.open),
366
- children: [
367
- /* @__PURE__ */ jsxs("summary", { children: [
368
- /* @__PURE__ */ jsx("b", { children: task.task }),
369
- /* @__PURE__ */ jsx(Sep, {}),
370
- /* @__PURE__ */ jsx("span", { className: "tea-lv-muted", children: task.moved ? "details" : `still at ${task.state}` })
371
- ] }),
372
- body
373
- ]
374
- }
375
- )
376
- );
377
- }
378
- return /* @__PURE__ */ jsxs("div", { className: "tea-lv-task", "data-task": task.task, "data-expanded": "true", children: [
379
- /* @__PURE__ */ jsxs("h4", { className: "tea-lv-taskh", children: [
380
- /* @__PURE__ */ jsx("b", { children: task.task }),
381
- " \u2014 ",
382
- /* @__PURE__ */ jsx("span", { className: "tea-lv-state", children: task.state }),
383
- task.endPolarity === "error" ? /* @__PURE__ */ jsxs(Fragment, { children: [
384
- " ",
385
- /* @__PURE__ */ jsx("span", { className: "tea-lv-badge", children: "tripped" })
386
- ] }) : null,
387
- task.was === void 0 ? null : /* @__PURE__ */ jsxs("span", { className: "tea-lv-muted", children: [
388
- " \xB7 resumes to ",
389
- task.was
390
- ] })
391
- ] }),
392
- body
393
- ] });
394
- }
395
- function Budget({ task }) {
396
- if ("answerable" in task.budget) {
397
- return /* @__PURE__ */ jsxs(
398
- "p",
399
- {
400
- className: "tea-lv-unavailable",
401
- "data-unavailable": task.budget.question,
402
- title: task.budget.why,
403
- children: [
404
- "retries: not available \u2014 ",
405
- task.budget.why
406
- ]
407
- }
408
- );
409
- }
410
- if (task.budget.retries === 0) return null;
411
- return /* @__PURE__ */ jsxs("p", { className: "tea-lv-retries", "data-retries": task.budget.retries, children: [
412
- "retries: ",
413
- task.budget.retries,
414
- "/",
415
- task.budget.maxRetries,
416
- task.budget.retries >= task.budget.maxRetries ? " \u2014 spent" : ""
417
- ] });
418
- }
419
- function Control({
420
- control,
421
- dispatch
422
- }) {
423
- const unsendable = "answerable" in control.send;
424
- const msg = unsendable ? void 0 : control.send;
425
- const why = unsendable ? control.send.why : void 0;
426
- const blocked = "blocked" in dispatch ? dispatch.blocked : void 0;
427
- const sendable = msg !== void 0 && blocked === void 0;
428
- return /* @__PURE__ */ jsxs(
429
- "div",
430
- {
431
- className: `tea-lv-ev tea-lv-ev-${control.kind}`,
432
- "data-event": control.event,
433
- "data-task": control.task,
434
- "data-status": control.refused ? "refused" : "legal",
435
- "data-sendable": String(sendable),
436
- children: [
437
- /* @__PURE__ */ jsx(
438
- "button",
439
- {
440
- type: "button",
441
- className: "tea-lv-btn",
442
- disabled: !sendable,
443
- title: control.why ?? why ?? blocked ?? control.outcome,
444
- onClick: () => {
445
- if (msg !== void 0 && "send" in dispatch) dispatch.send(msg);
446
- },
447
- children: control.event
448
- }
449
- ),
450
- /* @__PURE__ */ jsx("span", { className: "tea-lv-to", children: control.refused ? control.why : control.outcome })
451
- ]
452
- }
453
- );
454
- }
455
- function TimelinePanel({
456
- view,
457
- onScrub,
458
- onLive,
459
- onReset
460
- }) {
461
- const clockless = "answerable" in view.clock;
462
- return /* @__PURE__ */ jsxs("section", { className: "tea-lv-panel tea-lv-travel", children: [
463
- /* @__PURE__ */ jsxs("h3", { className: "tea-lv-h", children: [
464
- "3 \xB7 what happened, step by step",
465
- /* @__PURE__ */ jsx(Sep, {}),
466
- /* @__PURE__ */ jsx("span", { className: "tea-lv-hint", children: "drag to rewind \u2014 everything above moves with it" })
467
- ] }),
468
- /* @__PURE__ */ jsxs("div", { className: "tea-lv-scrub", children: [
469
- /* @__PURE__ */ jsx(
470
- "input",
471
- {
472
- type: "range",
473
- min: 0,
474
- max: view.total,
475
- value: view.cursor,
476
- "aria-label": "step",
477
- onChange: (e) => onScrub(Number(e.target.value))
478
- }
479
- ),
480
- /* @__PURE__ */ jsxs("span", { className: "tea-lv-step", children: [
481
- view.cursor,
482
- " / ",
483
- view.total
484
- ] }),
485
- /* @__PURE__ */ jsx("button", { type: "button", onClick: onLive, disabled: !view.scrubbed, children: "now" }),
486
- onReset === void 0 ? null : /* @__PURE__ */ jsx("button", { type: "button", onClick: onReset, children: "reset" })
487
- ] }),
488
- clockless ? /* @__PURE__ */ jsxs(
489
- "p",
490
- {
491
- className: "tea-lv-unavailable",
492
- "data-unavailable": "clock",
493
- title: view.clock.why,
494
- children: [
495
- "when: not available \u2014 ",
496
- view.clock.why
497
- ]
498
- }
499
- ) : null,
500
- view.steps.length === 0 ? /* @__PURE__ */ jsx("p", { className: "tea-lv-none", children: "no steps yet \u2014 every task is where it booted" }) : /* @__PURE__ */ jsxs("table", { className: "tea-lv-steps", children: [
501
- /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
502
- /* @__PURE__ */ jsx("th", { children: "#" }),
503
- clockless ? null : /* @__PURE__ */ jsx("th", { children: "at" }),
504
- /* @__PURE__ */ jsx("th", { children: "task" }),
505
- /* @__PURE__ */ jsx("th", { children: "event" }),
506
- /* @__PURE__ */ jsx("th", { children: "from \u2192 to" })
507
- ] }) }),
508
- /* @__PURE__ */ jsx("tbody", { children: view.steps.map((step) => /* @__PURE__ */ jsxs(
509
- "tr",
510
- {
511
- "data-step": step.index,
512
- "data-refused": step.refused ? "true" : void 0,
513
- children: [
514
- /* @__PURE__ */ jsx("td", { children: step.index + 1 }),
515
- clockless ? null : /* @__PURE__ */ jsx("td", { children: view.clock[step.index] }),
516
- /* @__PURE__ */ jsx("td", { children: step.task }),
517
- /* @__PURE__ */ jsx("td", { children: step.event }),
518
- /* @__PURE__ */ jsx("td", { children: step.refused ? /* @__PURE__ */ jsxs(Fragment, { children: [
519
- step.from,
520
- " \u2014 refused, nothing moved"
521
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
522
- step.from,
523
- " \u2192 ",
524
- step.to
525
- ] }) })
526
- ]
527
- },
528
- step.index
529
- )) })
530
- ] })
531
- ] });
532
- }
533
- function regionsOf(state, fallback) {
534
- if (typeof state !== "object" || state === null) return fallback;
535
- const regions = state.regions;
536
- return typeof regions === "object" && regions !== null ? regions : fallback;
537
- }
538
- function safeDump(rec, live) {
539
- try {
540
- return rec.dump();
541
- } catch {
542
- return { loaded: null, msgs: [], finalState: live };
543
- }
544
- }
545
- function replayPrefix(machine, trace, ctx, n, live) {
546
- try {
547
- return replay(machine, {
548
- msgs: trace.msgs.slice(0, n),
549
- ctx,
550
- loaded: trace.loaded
551
- }).state;
552
- } catch {
553
- return live;
554
- }
555
- }
556
-
557
- export { LaneView, LiveLaneView };
558
- //# sourceMappingURL=react.js.map
559
- //# sourceMappingURL=react.js.map