@demlik/tea 0.12.0 → 0.14.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 (368) 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-25LBDCBC.js → chunk-6IQPODUF.js} +2 -2
  5. package/dist/{chunk-25LBDCBC.js.map → chunk-6IQPODUF.js.map} +1 -1
  6. package/dist/chunk-AQ6ZIMEA.js +421 -0
  7. package/dist/chunk-AQ6ZIMEA.js.map +1 -0
  8. package/dist/{chunk-MUUROGIH.js → chunk-BLJ2JQSH.js} +62 -12
  9. package/dist/chunk-BLJ2JQSH.js.map +1 -0
  10. package/dist/{chunk-7SVIRMC6.js → chunk-F2US5BW6.js} +25 -5
  11. package/dist/chunk-F2US5BW6.js.map +1 -0
  12. package/dist/{batch-window/index.js → chunk-F7FMAWLA.js} +4 -8
  13. package/dist/chunk-F7FMAWLA.js.map +1 -0
  14. package/dist/{chunk-7V4EVLZA.js → chunk-HUKZQX6U.js} +20 -16
  15. package/dist/chunk-HUKZQX6U.js.map +1 -0
  16. package/dist/{chunk-EWJP3YYP.js → chunk-HWVW4AXC.js} +3 -3
  17. package/dist/chunk-HWVW4AXC.js.map +1 -0
  18. package/dist/{chunk-WLGO64WC.js → chunk-HYDWG35Q.js} +23 -6
  19. package/dist/chunk-HYDWG35Q.js.map +1 -0
  20. package/dist/{chunk-I5OV65MS.js → chunk-I5MQMJDW.js} +57 -7
  21. package/dist/chunk-I5MQMJDW.js.map +1 -0
  22. package/dist/{chunk-J6527VRQ.js → chunk-LFZUK6J2.js} +3 -3
  23. package/dist/chunk-LFZUK6J2.js.map +1 -0
  24. package/dist/{chunk-ZVJZ72HY.js → chunk-LYLTKJWM.js} +25 -11
  25. package/dist/chunk-LYLTKJWM.js.map +1 -0
  26. package/dist/{chunk-D736QUGF.js → chunk-MYXFNWAJ.js} +4 -5
  27. package/dist/chunk-MYXFNWAJ.js.map +1 -0
  28. package/dist/{chunk-K575PT4S.js → chunk-PR6TB3BL.js} +15 -4
  29. package/dist/chunk-PR6TB3BL.js.map +1 -0
  30. package/dist/chunk-RQULHGYH.js +1804 -0
  31. package/dist/chunk-RQULHGYH.js.map +1 -0
  32. package/dist/{chunk-FV3Z5MBE.js → chunk-TXN2KFHF.js} +14 -4
  33. package/dist/chunk-TXN2KFHF.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-Z2L3LSNV.js +1470 -0
  37. package/dist/chunk-Z2L3LSNV.js.map +1 -0
  38. package/dist/core-CTzMJ82M.d.ts +562 -0
  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 +48 -31
  43. package/dist/do/index.js +36 -25
  44. package/dist/do/index.js.map +1 -1
  45. package/dist/{durable-effects-D8SqU_if.d.ts → durable-effects-B0-qGQDy.d.ts} +2 -2
  46. package/dist/extension/index.d.ts +301 -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 +1295 -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/{batch-window/index.d.ts → index-4vZzljCD.d.ts} +7 -11
  55. package/dist/{fan-out/index.d.ts → index-6A7dB8f6.d.ts} +7 -8
  56. package/dist/index-B5BZ-_cT.d.ts +616 -0
  57. package/dist/index-Bc40JWVl.d.ts +131 -0
  58. package/dist/{debounce/index.d.ts → index-DHSUmQTR.d.ts} +7 -7
  59. package/dist/index-DJWIER_3.d.ts +69 -0
  60. package/dist/{snapshot/index.d.ts → index-DMCeMPMJ.d.ts} +15 -77
  61. package/dist/{monitored-run/index.d.ts → index-NjrT3fL2.d.ts} +37 -12
  62. package/dist/{recorder/index.d.ts → index-TvRb1KVf.d.ts} +4 -6
  63. package/dist/{deadline/index.d.ts → index-q0hXFeZ0.d.ts} +155 -8
  64. package/dist/index.d.ts +719 -6
  65. package/dist/index.js +1 -2
  66. package/dist/jev/index.d.ts +634 -0
  67. package/dist/jev/index.js +433 -0
  68. package/dist/jev/index.js.map +1 -0
  69. package/dist/machine-CdIcN2Xm.d.ts +1773 -0
  70. package/dist/machine-viz/index.d.ts +2 -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 +19 -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 +130 -4
  77. package/dist/node/index.js +222 -10
  78. package/dist/node/index.js.map +1 -1
  79. package/dist/{paginator → paginate}/index.d.ts +151 -6
  80. package/dist/paginate/index.js +7 -0
  81. package/dist/parity/index.d.ts +5 -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 +248 -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 -4
  88. package/dist/persistence/index.js +6 -0
  89. package/dist/react/index.d.ts +4 -3
  90. package/dist/react/index.js +1 -2
  91. package/dist/react/index.js.map +1 -1
  92. package/dist/resilience/index.d.ts +743 -0
  93. package/dist/resilience/index.js +657 -0
  94. package/dist/resilience/index.js.map +1 -0
  95. package/dist/retry-backoff/index.d.ts +3 -2
  96. package/dist/retry-backoff/index.js +1 -1
  97. package/dist/runtime-types-LWDoi943.d.ts +998 -0
  98. package/dist/testing/index.d.ts +3 -2
  99. package/dist/testing/index.js +1 -2
  100. package/dist/testing/index.js.map +1 -1
  101. package/dist/{throttled-input → timing}/index.d.ts +144 -12
  102. package/dist/{throttled-input → timing}/index.js +57 -12
  103. package/dist/timing/index.js.map +1 -0
  104. package/dist/{types-D7u9DkH7.d.ts → types-DP3f5NIl.d.ts} +1 -1
  105. package/dist/work-queue/index.d.ts +131 -54
  106. package/dist/work-queue/index.js +3 -2
  107. package/dist/work-queue/index.js.map +1 -1
  108. package/package.json +50 -216
  109. package/dist/authed-call/index.d.ts +0 -119
  110. package/dist/authed-call/index.js +0 -134
  111. package/dist/authed-call/index.js.map +0 -1
  112. package/dist/await-terminal/index.d.ts +0 -100
  113. package/dist/await-terminal/index.js +0 -76
  114. package/dist/await-terminal/index.js.map +0 -1
  115. package/dist/batch-window/index.js.map +0 -1
  116. package/dist/cache/index.d.ts +0 -151
  117. package/dist/cache/index.js +0 -8
  118. package/dist/chart/index.d.ts +0 -217
  119. package/dist/chart/index.js +0 -16
  120. package/dist/chart/index.js.map +0 -1
  121. package/dist/chart/inspect/index.d.ts +0 -85
  122. package/dist/chart/inspect/index.js +0 -5
  123. package/dist/chart/inspect/react.d.ts +0 -112
  124. package/dist/chart/inspect/react.js +0 -11
  125. package/dist/chart/inspect/react.js.map +0 -1
  126. package/dist/chart/inspect/styles.css +0 -286
  127. package/dist/chart/lane/index.d.ts +0 -361
  128. package/dist/chart/lane/index.js +0 -9
  129. package/dist/chart/lane/index.js.map +0 -1
  130. package/dist/chart/lane/react.d.ts +0 -83
  131. package/dist/chart/lane/react.js +0 -559
  132. package/dist/chart/lane/react.js.map +0 -1
  133. package/dist/chart/lane/server.d.ts +0 -148
  134. package/dist/chart/lane/server.js +0 -209
  135. package/dist/chart/lane/server.js.map +0 -1
  136. package/dist/chart/lane/styles.css +0 -498
  137. package/dist/chart/lane/viewer/assets/abnfDiagram-N423BO3Z-C729LI31.js +0 -1
  138. package/dist/chart/lane/viewer/assets/architectureDiagram-T3A2C74G-C729LI31.js +0 -1
  139. package/dist/chart/lane/viewer/assets/blockDiagram-VBNYF7ZC-C729LI31.js +0 -1
  140. package/dist/chart/lane/viewer/assets/c4Diagram-5PPSVZJV-C729LI31.js +0 -1
  141. package/dist/chart/lane/viewer/assets/chunk-2GRJ4B5K-HdDf8SI3.js +0 -1
  142. package/dist/chart/lane/viewer/assets/chunk-5RXB4S5H-CcNtpUd7.js +0 -231
  143. package/dist/chart/lane/viewer/assets/chunk-5VM5RSS4-BP4fRS_5.js +0 -15
  144. package/dist/chart/lane/viewer/assets/chunk-KBJHAD2P-DZOw7xU6.js +0 -1
  145. package/dist/chart/lane/viewer/assets/chunk-NSK5VX7P-CBCyTZMs.js +0 -128
  146. package/dist/chart/lane/viewer/assets/classDiagram-JCYQIIEL-C729LI31.js +0 -1
  147. package/dist/chart/lane/viewer/assets/classDiagram-v2-OCEON4UE-D4uAiFr8.js +0 -206
  148. package/dist/chart/lane/viewer/assets/cose-bilkent-JH36ORCC-DOwCrGXH.js +0 -1
  149. package/dist/chart/lane/viewer/assets/cynefinDiagram-MW4NZA55-C729LI31.js +0 -1
  150. package/dist/chart/lane/viewer/assets/dagre-K_PewWfS.js +0 -1
  151. package/dist/chart/lane/viewer/assets/dagre-VZM6K2ZE-831qZcA8.js +0 -4
  152. package/dist/chart/lane/viewer/assets/diagram-7IWD3JNH-C729LI31.js +0 -1
  153. package/dist/chart/lane/viewer/assets/diagram-B4RE2ZJO-C729LI31.js +0 -1
  154. package/dist/chart/lane/viewer/assets/diagram-LBJQPF4R-C729LI31.js +0 -1
  155. package/dist/chart/lane/viewer/assets/diagram-Q27KOJAE-C729LI31.js +0 -1
  156. package/dist/chart/lane/viewer/assets/diagram-UB23O5K3-C729LI31.js +0 -1
  157. package/dist/chart/lane/viewer/assets/ebnfDiagram-BXEA7PRR-C729LI31.js +0 -1
  158. package/dist/chart/lane/viewer/assets/erDiagram-JOGREHBK-C729LI31.js +0 -1
  159. package/dist/chart/lane/viewer/assets/flowDiagram-UKHOOZJN-C729LI31.js +0 -1
  160. package/dist/chart/lane/viewer/assets/ganttDiagram-PKOTCBZU-C729LI31.js +0 -1
  161. package/dist/chart/lane/viewer/assets/gitGraphDiagram-DS77QQ5N-C729LI31.js +0 -1
  162. package/dist/chart/lane/viewer/assets/index-9SkH5NA3.css +0 -1
  163. package/dist/chart/lane/viewer/assets/index-Bgt4sXpW.js +0 -195
  164. package/dist/chart/lane/viewer/assets/infoDiagram-6WML65LV-C729LI31.js +0 -1
  165. package/dist/chart/lane/viewer/assets/ishikawaDiagram-WSZJBQD7-C729LI31.js +0 -1
  166. package/dist/chart/lane/viewer/assets/journeyDiagram-NVQOT4AX-C729LI31.js +0 -1
  167. package/dist/chart/lane/viewer/assets/kanban-definition-27J2QSJJ-G7PaPzy-.js +0 -89
  168. package/dist/chart/lane/viewer/assets/katex-DOwCrGXH.js +0 -1
  169. package/dist/chart/lane/viewer/assets/mindmap-definition-FAOFIHXS-CGj9nrVk.js +0 -96
  170. package/dist/chart/lane/viewer/assets/path-fybaL0A-.js +0 -1
  171. package/dist/chart/lane/viewer/assets/pegDiagram-VL7TDLO6-C729LI31.js +0 -1
  172. package/dist/chart/lane/viewer/assets/pieDiagram-7S7Q4E2Y-C729LI31.js +0 -1
  173. package/dist/chart/lane/viewer/assets/quadrantDiagram-CIZ2JOQS-C729LI31.js +0 -1
  174. package/dist/chart/lane/viewer/assets/railroadDiagram-AXF67PYL-C729LI31.js +0 -1
  175. package/dist/chart/lane/viewer/assets/requirementDiagram-LRYGKXZP-C729LI31.js +0 -1
  176. package/dist/chart/lane/viewer/assets/sankeyDiagram-W5VNT64P-C729LI31.js +0 -1
  177. package/dist/chart/lane/viewer/assets/sequenceDiagram-SI44F4Z6-C729LI31.js +0 -1
  178. package/dist/chart/lane/viewer/assets/stateDiagram-OKZ733FA-B_88AzBS.js +0 -1
  179. package/dist/chart/lane/viewer/assets/stateDiagram-v2-UEYNNEHI-CR5gcgq6.js +0 -1
  180. package/dist/chart/lane/viewer/assets/swimlanes-SLNWSIFB-B4xK-rwg.js +0 -1
  181. package/dist/chart/lane/viewer/assets/swimlanesDiagram-ULZ7WXOC-C729LI31.js +0 -1
  182. package/dist/chart/lane/viewer/assets/timeline-definition-Z64GVDOM-CCv52MfY.js +0 -120
  183. package/dist/chart/lane/viewer/assets/vennDiagram-T6HMQDX7-C729LI31.js +0 -1
  184. package/dist/chart/lane/viewer/assets/wardleyDiagram-T6FBY63Y-C729LI31.js +0 -1
  185. package/dist/chart/lane/viewer/assets/xychartDiagram-ELKLHX3M-C729LI31.js +0 -1
  186. package/dist/chart/lane/viewer/index.html +0 -15
  187. package/dist/chart/report/index.d.ts +0 -116
  188. package/dist/chart/report/index.js +0 -32
  189. package/dist/chart/report/index.js.map +0 -1
  190. package/dist/chunk-2YFLOCWX.js +0 -15
  191. package/dist/chunk-2YFLOCWX.js.map +0 -1
  192. package/dist/chunk-3JU6657S.js +0 -372
  193. package/dist/chunk-3JU6657S.js.map +0 -1
  194. package/dist/chunk-4KTWLPL5.js +0 -33
  195. package/dist/chunk-4KTWLPL5.js.map +0 -1
  196. package/dist/chunk-5EHLEUTL.js +0 -686
  197. package/dist/chunk-5EHLEUTL.js.map +0 -1
  198. package/dist/chunk-5KJKJOFC.js +0 -758
  199. package/dist/chunk-5KJKJOFC.js.map +0 -1
  200. package/dist/chunk-7SVIRMC6.js.map +0 -1
  201. package/dist/chunk-7V4EVLZA.js.map +0 -1
  202. package/dist/chunk-A56OR5RF.js +0 -184
  203. package/dist/chunk-A56OR5RF.js.map +0 -1
  204. package/dist/chunk-AZZLE7XR.js +0 -62
  205. package/dist/chunk-AZZLE7XR.js.map +0 -1
  206. package/dist/chunk-B5VXOFMZ.js +0 -266
  207. package/dist/chunk-B5VXOFMZ.js.map +0 -1
  208. package/dist/chunk-BYQUGDD3.js +0 -16
  209. package/dist/chunk-BYQUGDD3.js.map +0 -1
  210. package/dist/chunk-D736QUGF.js.map +0 -1
  211. package/dist/chunk-E6GEDSF4.js +0 -307
  212. package/dist/chunk-E6GEDSF4.js.map +0 -1
  213. package/dist/chunk-EUF7XOEE.js +0 -223
  214. package/dist/chunk-EUF7XOEE.js.map +0 -1
  215. package/dist/chunk-EWJP3YYP.js.map +0 -1
  216. package/dist/chunk-FV3Z5MBE.js.map +0 -1
  217. package/dist/chunk-HCEVHFJ7.js +0 -54
  218. package/dist/chunk-HCEVHFJ7.js.map +0 -1
  219. package/dist/chunk-I5OV65MS.js.map +0 -1
  220. package/dist/chunk-J6527VRQ.js.map +0 -1
  221. package/dist/chunk-JELSZN25.js +0 -47
  222. package/dist/chunk-JELSZN25.js.map +0 -1
  223. package/dist/chunk-JER5O7PQ.js +0 -416
  224. package/dist/chunk-JER5O7PQ.js.map +0 -1
  225. package/dist/chunk-JGVL3WPL.js +0 -26
  226. package/dist/chunk-JGVL3WPL.js.map +0 -1
  227. package/dist/chunk-JP5D6GSL.js +0 -71
  228. package/dist/chunk-JP5D6GSL.js.map +0 -1
  229. package/dist/chunk-K575PT4S.js.map +0 -1
  230. package/dist/chunk-MU6MCIAC.js +0 -15
  231. package/dist/chunk-MU6MCIAC.js.map +0 -1
  232. package/dist/chunk-MUUROGIH.js.map +0 -1
  233. package/dist/chunk-ND3DH6KM.js +0 -88
  234. package/dist/chunk-ND3DH6KM.js.map +0 -1
  235. package/dist/chunk-Q2UM7BXU.js.map +0 -1
  236. package/dist/chunk-S2EGRPCM.js +0 -47
  237. package/dist/chunk-S2EGRPCM.js.map +0 -1
  238. package/dist/chunk-SINXE47Y.js +0 -55
  239. package/dist/chunk-SINXE47Y.js.map +0 -1
  240. package/dist/chunk-SUST46KO.js +0 -53
  241. package/dist/chunk-SUST46KO.js.map +0 -1
  242. package/dist/chunk-TP5UPGLY.js +0 -61
  243. package/dist/chunk-TP5UPGLY.js.map +0 -1
  244. package/dist/chunk-UF4MZSLT.js +0 -53
  245. package/dist/chunk-UF4MZSLT.js.map +0 -1
  246. package/dist/chunk-UOC2PL46.js +0 -13
  247. package/dist/chunk-UOC2PL46.js.map +0 -1
  248. package/dist/chunk-WLGO64WC.js.map +0 -1
  249. package/dist/chunk-WRAA7GVZ.js +0 -209
  250. package/dist/chunk-WRAA7GVZ.js.map +0 -1
  251. package/dist/chunk-ZCL7SCBK.js +0 -685
  252. package/dist/chunk-ZCL7SCBK.js.map +0 -1
  253. package/dist/chunk-ZD6PNZBK.js +0 -457
  254. package/dist/chunk-ZD6PNZBK.js.map +0 -1
  255. package/dist/chunk-ZF6WDK2D.js +0 -519
  256. package/dist/chunk-ZF6WDK2D.js.map +0 -1
  257. package/dist/chunk-ZJ5AOYBH.js +0 -8
  258. package/dist/chunk-ZJ5AOYBH.js.map +0 -1
  259. package/dist/chunk-ZVJZ72HY.js.map +0 -1
  260. package/dist/circuit-breaker/index.d.ts +0 -197
  261. package/dist/circuit-breaker/index.js +0 -3
  262. package/dist/circuit-breaker/index.js.map +0 -1
  263. package/dist/core-Bjc0bS8j.d.ts +0 -326
  264. package/dist/deadline/index.js +0 -6
  265. package/dist/deadline/index.js.map +0 -1
  266. package/dist/debounce/index.js +0 -3
  267. package/dist/debounce/index.js.map +0 -1
  268. package/dist/extension/react.d.ts +0 -121
  269. package/dist/extension/react.js +0 -75
  270. package/dist/extension/react.js.map +0 -1
  271. package/dist/extension/subs/index.d.ts +0 -44
  272. package/dist/extension/subs/index.js +0 -80
  273. package/dist/extension/subs/index.js.map +0 -1
  274. package/dist/extension/test-utils.d.ts +0 -128
  275. package/dist/extension/test-utils.js +0 -277
  276. package/dist/extension/test-utils.js.map +0 -1
  277. package/dist/fan-out/index.js +0 -5
  278. package/dist/fan-out/index.js.map +0 -1
  279. package/dist/fold-Blbhru48.d.ts +0 -435
  280. package/dist/graph-CcjWZVrd.d.ts +0 -923
  281. package/dist/idempotency/adapter.d.ts +0 -62
  282. package/dist/idempotency/adapter.js +0 -4
  283. package/dist/idempotency/adapter.js.map +0 -1
  284. package/dist/idempotent-intake/index.d.ts +0 -187
  285. package/dist/idempotent-intake/index.js +0 -7
  286. package/dist/idempotent-intake/index.js.map +0 -1
  287. package/dist/llm-call/index.d.ts +0 -310
  288. package/dist/llm-call/index.js +0 -16
  289. package/dist/llm-call/index.js.map +0 -1
  290. package/dist/machine-0OmPvsy_.d.ts +0 -804
  291. package/dist/monitored-run/index.js +0 -10
  292. package/dist/monitored-run/index.js.map +0 -1
  293. package/dist/paginated-walk/index.d.ts +0 -234
  294. package/dist/paginated-walk/index.js +0 -16
  295. package/dist/paginated-walk/index.js.map +0 -1
  296. package/dist/paginator/index.js +0 -3
  297. package/dist/paginator/index.js.map +0 -1
  298. package/dist/pbt/arbitraries/index.d.ts +0 -135
  299. package/dist/pbt/arbitraries/index.js +0 -3
  300. package/dist/pbt/arbitraries/index.js.map +0 -1
  301. package/dist/pbt/runners/index.d.ts +0 -117
  302. package/dist/pbt/runners/index.js +0 -5
  303. package/dist/pbt/runners/index.js.map +0 -1
  304. package/dist/poller/index.d.ts +0 -351
  305. package/dist/poller/index.js +0 -115
  306. package/dist/poller/index.js.map +0 -1
  307. package/dist/prediction/index.d.ts +0 -130
  308. package/dist/prediction/index.js +0 -4
  309. package/dist/prediction/index.js.map +0 -1
  310. package/dist/protocol-B5YmJr0d.d.ts +0 -45
  311. package/dist/pure/index.d.ts +0 -2
  312. package/dist/pure/index.js +0 -4
  313. package/dist/pure/index.js.map +0 -1
  314. package/dist/rate-limit/index.d.ts +0 -115
  315. package/dist/rate-limit/index.js +0 -3
  316. package/dist/rate-limit/index.js.map +0 -1
  317. package/dist/reconciler/index.d.ts +0 -192
  318. package/dist/reconciler/index.js +0 -164
  319. package/dist/reconciler/index.js.map +0 -1
  320. package/dist/recorder/index.js +0 -3
  321. package/dist/recorder/index.js.map +0 -1
  322. package/dist/reducer-BqyoVyBG.d.ts +0 -447
  323. package/dist/resilient-call/index.d.ts +0 -319
  324. package/dist/resilient-call/index.js +0 -14
  325. package/dist/resilient-call/index.js.map +0 -1
  326. package/dist/retry-to-success/index.d.ts +0 -109
  327. package/dist/retry-to-success/index.js +0 -37
  328. package/dist/retry-to-success/index.js.map +0 -1
  329. package/dist/run-BVeqJDBF.d.ts +0 -713
  330. package/dist/runtime-types-Bxc637bp.d.ts +0 -502
  331. package/dist/saga/index.d.ts +0 -240
  332. package/dist/saga/index.js +0 -150
  333. package/dist/saga/index.js.map +0 -1
  334. package/dist/samples-DCt6nF8H.d.ts +0 -59
  335. package/dist/snapshot/index.js +0 -5
  336. package/dist/snapshot/index.js.map +0 -1
  337. package/dist/subs/index.d.ts +0 -471
  338. package/dist/subs/index.js +0 -7
  339. package/dist/subs/index.js.map +0 -1
  340. package/dist/throttle/index.d.ts +0 -134
  341. package/dist/throttle/index.js +0 -3
  342. package/dist/throttle/index.js.map +0 -1
  343. package/dist/throttled-input/index.js.map +0 -1
  344. package/dist/token-refresh/index.d.ts +0 -215
  345. package/dist/token-refresh/index.js +0 -6
  346. package/dist/token-refresh/index.js.map +0 -1
  347. package/dist/trace-replay/index.js +0 -6
  348. package/dist/trace-replay/index.js.map +0 -1
  349. package/dist/with-deadline/index.d.ts +0 -196
  350. package/dist/with-deadline/index.js +0 -111
  351. package/dist/with-deadline/index.js.map +0 -1
  352. package/dist/with-resilience/index.d.ts +0 -224
  353. package/dist/with-resilience/index.js +0 -240
  354. package/dist/with-resilience/index.js.map +0 -1
  355. package/dist/with-telemetry/index.d.ts +0 -149
  356. package/dist/with-telemetry/index.js +0 -70
  357. package/dist/with-telemetry/index.js.map +0 -1
  358. package/dist/work-queue/adapter.d.ts +0 -83
  359. package/dist/work-queue/adapter.js +0 -4
  360. package/dist/work-queue/adapter.js.map +0 -1
  361. package/dist/work-queue/ops.d.ts +0 -70
  362. package/dist/work-queue/ops.js +0 -3
  363. package/dist/work-queue/ops.js.map +0 -1
  364. package/dist/workflow/index.d.ts +0 -484
  365. package/dist/workflow/index.js +0 -244
  366. package/dist/workflow/index.js.map +0 -1
  367. /package/dist/{cache → paginate}/index.js.map +0 -0
  368. /package/dist/{chart/inspect → persistence}/index.js.map +0 -0
@@ -1,83 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as Samples } from '../../samples-DCt6nF8H.js';
3
- import { I as ImportedLane, L as LogEntry } from '../../fold-Blbhru48.js';
4
- import { L as LaneTaskId, a as LaneTaskChart, b as LaneHandsOf } from '../../run-BVeqJDBF.js';
5
- import '../../graph-CcjWZVrd.js';
6
- import '../../core-Bjc0bS8j.js';
7
- import '../index.js';
8
-
9
- /**
10
- * Everything `<LaneView>` needs, and it is the two files a fabrika lane IS.
11
- *
12
- * There is no prop for the phases, the tasks, the states, the standings, the
13
- * terminal or what anything is waiting on: every one of those is derived from
14
- * these two, and a prop restating one would be the fact said twice.
15
- */
16
- interface LaneViewProps {
17
- /** The lane. `chartFromWorkflow(document)` or `defineLane(spec)` — either door. */
18
- readonly lane: ImportedLane;
19
- /** Its event log — `parseEventsJsonl(...)` or `parseHistoryJson(...)`. */
20
- readonly log: readonly LogEntry[];
21
- /** Heading. Cosmetic — defaults to the document's own `id`. */
22
- readonly title?: string;
23
- /** Appended to the container's class list. */
24
- readonly className?: string;
25
- }
26
- /**
27
- * One sample bag per task, each typed by THAT task's chart.
28
- *
29
- * The one thing a lane genuinely cannot derive, and the only reason it is a
30
- * prop: `ty<T>()` is `{}` at runtime, so a payload's shape is erased before any
31
- * runtime code could read it. Optional per task, because a task whose events
32
- * declare no payload has nothing to supply.
33
- *
34
- * WHAT A LANE LOSES, said here rather than found out. `defineLane` LOWERS its
35
- * charts to the runtime-typed form the fold and the drawing share, and that form
36
- * records which events a state routes and NOT which of them declare a payload.
37
- * So no control is ever reported as blocked for want of a sample: a msg is built
38
- * either way, with the sample merged in when one was given. Supply one where a
39
- * guard reads a payload field, and the guard preview reads the field you meant.
40
- */
41
- type LaneSamples<L> = {
42
- readonly [T in LaneTaskId<L>]?: Samples<LaneTaskChart<L, T>>;
43
- };
44
- /**
45
- * Everything `<LiveLaneView>` needs — the lane, and the hands `runLane` demands.
46
- *
47
- * `hands` is not a restatement of the lane: it is the code the lane deliberately
48
- * does not own (each region's `parts`, and where each instance BOOTS, which an
49
- * emitted epic decides per sub-issue). It is the same bag `runLane` takes, so
50
- * an author passes the one they already built.
51
- */
52
- interface LiveLaneViewProps<L, H, Ctx> {
53
- readonly lane: L;
54
- /** The parts and boot state per task — the same bag `runLane` demands. */
55
- readonly hands: H;
56
- /** One payload sample per event that declares one, per task. */
57
- readonly samples?: LaneSamples<L>;
58
- /** The runtime ctx. Omit for a lane whose regions read nothing from one. */
59
- readonly ctx?: Ctx;
60
- readonly title?: string;
61
- readonly className?: string;
62
- }
63
- /**
64
- * A lane that has already run, looked at: the REPLAY source.
65
- *
66
- * The scrubber folds a prefix of the real log, which is not an approximation of
67
- * the state at step k but the definition of it (`fold.ts`), so dragging it
68
- * backwards shows exactly what the driver would have printed at that moment.
69
- * Nothing is dispatchable and every control says why.
70
- */
71
- declare function LaneView(props: LaneViewProps): react_jsx_runtime.JSX.Element;
72
- /**
73
- * The same page over a lane that is RUNNING — the LIVE source.
74
- *
75
- * It owns a runtime for its lifetime (`runLane`'s `init`/`update`, built into a
76
- * `Machine` here rather than asked for, so the drawing and the runtime provably
77
- * come from the same lane) and records it, so the scrubber time-travels by the
78
- * same pure `replay` `<ChartInspector>`'s does: `init` + `update` only, never
79
- * `interpret`, so dragging backwards cannot re-fire an effect.
80
- */
81
- 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;
82
-
83
- export { type LaneSamples, LaneView, type LaneViewProps, LiveLaneView, type LiveLaneViewProps };
@@ -1,559 +0,0 @@
1
- import { useInspectorRuntime } from '../../chunk-JER5O7PQ.js';
2
- import { replayFeed, runLane, liveFeed, laneView } from '../../chunk-ZCL7SCBK.js';
3
- import '../../chunk-ZD6PNZBK.js';
4
- import '../../chunk-5KJKJOFC.js';
5
- import '../../chunk-E6GEDSF4.js';
6
- import '../../chunk-UOC2PL46.js';
7
- import '../../chunk-MUUROGIH.js';
8
- import '../../chunk-WRAA7GVZ.js';
9
- import '../../chunk-EWJP3YYP.js';
10
- import { replay } from '../../chunk-5EHLEUTL.js';
11
- import '../../chunk-B5VXOFMZ.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