langgraph-ui-components 0.0.3 → 0.0.6

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 (536) hide show
  1. package/README.md +32 -0
  2. package/dist/index.es10.js +31 -16
  3. package/dist/index.es10.js.map +1 -1
  4. package/dist/index.es100.js +37 -5
  5. package/dist/index.es100.js.map +1 -1
  6. package/dist/index.es101.js +160 -67
  7. package/dist/index.es101.js.map +1 -1
  8. package/dist/index.es102.js +196 -30
  9. package/dist/index.es102.js.map +1 -1
  10. package/dist/index.es103.js +14 -5
  11. package/dist/index.es103.js.map +1 -1
  12. package/dist/index.es104.js +32 -2
  13. package/dist/index.es104.js.map +1 -1
  14. package/dist/index.es105.js +33 -10
  15. package/dist/index.es105.js.map +1 -1
  16. package/dist/index.es106.js +3110 -454
  17. package/dist/index.es106.js.map +1 -1
  18. package/dist/index.es107.js +5 -5
  19. package/dist/index.es108.js +2 -2
  20. package/dist/index.es109.js +12 -142
  21. package/dist/index.es109.js.map +1 -1
  22. package/dist/index.es11.js +146 -120
  23. package/dist/index.es11.js.map +1 -1
  24. package/dist/index.es110.js +11 -906
  25. package/dist/index.es110.js.map +1 -1
  26. package/dist/index.es111.js +483 -262
  27. package/dist/index.es111.js.map +1 -1
  28. package/dist/index.es112.js +7 -4
  29. package/dist/index.es112.js.map +1 -1
  30. package/dist/index.es113.js +2 -446
  31. package/dist/index.es113.js.map +1 -1
  32. package/dist/index.es114.js +141 -41
  33. package/dist/index.es114.js.map +1 -1
  34. package/dist/index.es115.js +904 -20
  35. package/dist/index.es115.js.map +1 -1
  36. package/dist/index.es116.js +267 -66
  37. package/dist/index.es116.js.map +1 -1
  38. package/dist/index.es117.js +3 -130
  39. package/dist/index.es117.js.map +1 -1
  40. package/dist/index.es118.js +437 -42
  41. package/dist/index.es118.js.map +1 -1
  42. package/dist/index.es119.js +46 -10
  43. package/dist/index.es119.js.map +1 -1
  44. package/dist/index.es12.js +13 -103
  45. package/dist/index.es12.js.map +1 -1
  46. package/dist/index.es120.js +22 -45
  47. package/dist/index.es120.js.map +1 -1
  48. package/dist/index.es121.js +72 -92
  49. package/dist/index.es121.js.map +1 -1
  50. package/dist/index.es122.js +126 -50
  51. package/dist/index.es122.js.map +1 -1
  52. package/dist/index.es123.js +46 -13
  53. package/dist/index.es123.js.map +1 -1
  54. package/dist/index.es124.js +9 -14
  55. package/dist/index.es124.js.map +1 -1
  56. package/dist/index.es125.js +45 -89
  57. package/dist/index.es125.js.map +1 -1
  58. package/dist/index.es126.js +99 -2
  59. package/dist/index.es126.js.map +1 -1
  60. package/dist/index.es127.js +48 -51
  61. package/dist/index.es127.js.map +1 -1
  62. package/dist/index.es128.js +14 -99
  63. package/dist/index.es128.js.map +1 -1
  64. package/dist/index.es129.js +88 -190
  65. package/dist/index.es129.js.map +1 -1
  66. package/dist/index.es13.js +126 -33
  67. package/dist/index.es13.js.map +1 -1
  68. package/dist/index.es130.js +2 -110
  69. package/dist/index.es130.js.map +1 -1
  70. package/dist/index.es131.js +163 -34
  71. package/dist/index.es131.js.map +1 -1
  72. package/dist/index.es132.js +2 -10
  73. package/dist/index.es132.js.map +1 -1
  74. package/dist/index.es133.js +55 -10
  75. package/dist/index.es133.js.map +1 -1
  76. package/dist/index.es134.js +99 -11
  77. package/dist/index.es134.js.map +1 -1
  78. package/dist/index.es135.js +181 -81
  79. package/dist/index.es135.js.map +1 -1
  80. package/dist/index.es136.js +105 -270
  81. package/dist/index.es136.js.map +1 -1
  82. package/dist/index.es137.js +35 -2
  83. package/dist/index.es137.js.map +1 -1
  84. package/dist/index.es138.js +10 -164
  85. package/dist/index.es138.js.map +1 -1
  86. package/dist/index.es139.js +11 -51
  87. package/dist/index.es139.js.map +1 -1
  88. package/dist/index.es140.js +11 -39
  89. package/dist/index.es140.js.map +1 -1
  90. package/dist/index.es141.js +89 -33
  91. package/dist/index.es141.js.map +1 -1
  92. package/dist/index.es142.js +264 -29
  93. package/dist/index.es142.js.map +1 -1
  94. package/dist/index.es143.js +2 -24
  95. package/dist/index.es143.js.map +1 -1
  96. package/dist/index.es144.js +158 -585
  97. package/dist/index.es144.js.map +1 -1
  98. package/dist/index.es145.js +44 -118
  99. package/dist/index.es145.js.map +1 -1
  100. package/dist/index.es146.js +34 -158
  101. package/dist/index.es146.js.map +1 -1
  102. package/dist/index.es147.js +35 -2
  103. package/dist/index.es147.js.map +1 -1
  104. package/dist/index.es148.js +40 -2
  105. package/dist/index.es148.js.map +1 -1
  106. package/dist/index.es149.js +24 -2
  107. package/dist/index.es149.js.map +1 -1
  108. package/dist/index.es15.js +15 -15
  109. package/dist/index.es150.js +589 -20
  110. package/dist/index.es150.js.map +1 -1
  111. package/dist/index.es151.js +125 -2
  112. package/dist/index.es151.js.map +1 -1
  113. package/dist/index.es152.js +3 -24
  114. package/dist/index.es152.js.map +1 -1
  115. package/dist/index.es153.js +2 -4
  116. package/dist/index.es153.js.map +1 -1
  117. package/dist/index.es154.js +2 -5
  118. package/dist/index.es154.js.map +1 -1
  119. package/dist/index.es155.js +22 -13
  120. package/dist/index.es155.js.map +1 -1
  121. package/dist/index.es156.js +2 -6
  122. package/dist/index.es156.js.map +1 -1
  123. package/dist/index.es157.js +25 -8
  124. package/dist/index.es157.js.map +1 -1
  125. package/dist/index.es158.js +5 -64
  126. package/dist/index.es158.js.map +1 -1
  127. package/dist/index.es159.js +12 -21
  128. package/dist/index.es159.js.map +1 -1
  129. package/dist/index.es16.js +2 -2
  130. package/dist/index.es160.js +5 -5
  131. package/dist/index.es160.js.map +1 -1
  132. package/dist/index.es161.js +8 -349
  133. package/dist/index.es161.js.map +1 -1
  134. package/dist/index.es162.js +1 -1
  135. package/dist/index.es163.js +1 -1
  136. package/dist/index.es164.js +3 -3
  137. package/dist/index.es165.js +63 -6
  138. package/dist/index.es165.js.map +1 -1
  139. package/dist/index.es166.js +21 -102
  140. package/dist/index.es166.js.map +1 -1
  141. package/dist/index.es167.js +5 -118
  142. package/dist/index.es167.js.map +1 -1
  143. package/dist/index.es168.js +330 -117
  144. package/dist/index.es168.js.map +1 -1
  145. package/dist/index.es169.js +6 -114
  146. package/dist/index.es169.js.map +1 -1
  147. package/dist/index.es17.js +2 -2
  148. package/dist/index.es170.js +103 -6
  149. package/dist/index.es170.js.map +1 -1
  150. package/dist/index.es171.js +119 -2
  151. package/dist/index.es171.js.map +1 -1
  152. package/dist/index.es172.js +134 -140
  153. package/dist/index.es172.js.map +1 -1
  154. package/dist/index.es173.js +115 -2
  155. package/dist/index.es173.js.map +1 -1
  156. package/dist/index.es174.js +6 -3737
  157. package/dist/index.es174.js.map +1 -1
  158. package/dist/index.es175.js +2 -342
  159. package/dist/index.es175.js.map +1 -1
  160. package/dist/index.es176.js +138 -105
  161. package/dist/index.es176.js.map +1 -1
  162. package/dist/index.es177.js +2 -133
  163. package/dist/index.es177.js.map +1 -1
  164. package/dist/index.es178.js +3734 -12
  165. package/dist/index.es178.js.map +1 -1
  166. package/dist/index.es179.js +326 -136
  167. package/dist/index.es179.js.map +1 -1
  168. package/dist/index.es180.js +107 -13
  169. package/dist/index.es180.js.map +1 -1
  170. package/dist/index.es181.js +131 -6
  171. package/dist/index.es181.js.map +1 -1
  172. package/dist/index.es182.js +13 -19
  173. package/dist/index.es182.js.map +1 -1
  174. package/dist/index.es183.js +139 -77
  175. package/dist/index.es183.js.map +1 -1
  176. package/dist/index.es184.js +13 -241
  177. package/dist/index.es184.js.map +1 -1
  178. package/dist/index.es185.js +8 -24
  179. package/dist/index.es185.js.map +1 -1
  180. package/dist/index.es186.js +21 -6
  181. package/dist/index.es186.js.map +1 -1
  182. package/dist/index.es187.js +90 -4
  183. package/dist/index.es187.js.map +1 -1
  184. package/dist/index.es188.js +240 -15
  185. package/dist/index.es188.js.map +1 -1
  186. package/dist/index.es189.js +24 -8
  187. package/dist/index.es189.js.map +1 -1
  188. package/dist/index.es19.js +15 -119
  189. package/dist/index.es19.js.map +1 -1
  190. package/dist/index.es190.js +5 -31
  191. package/dist/index.es190.js.map +1 -1
  192. package/dist/index.es191.js +4 -6
  193. package/dist/index.es191.js.map +1 -1
  194. package/dist/index.es192.js +17 -105
  195. package/dist/index.es192.js.map +1 -1
  196. package/dist/index.es193.js +6 -11
  197. package/dist/index.es193.js.map +1 -1
  198. package/dist/index.es194.js +32 -18
  199. package/dist/index.es194.js.map +1 -1
  200. package/dist/index.es195.js +6 -31
  201. package/dist/index.es195.js.map +1 -1
  202. package/dist/index.es196.js +106 -4
  203. package/dist/index.es196.js.map +1 -1
  204. package/dist/index.es197.js +12 -4
  205. package/dist/index.es197.js.map +1 -1
  206. package/dist/index.es198.js +17 -4
  207. package/dist/index.es198.js.map +1 -1
  208. package/dist/index.es199.js +21 -27
  209. package/dist/index.es199.js.map +1 -1
  210. package/dist/index.es2.js +25 -16
  211. package/dist/index.es2.js.map +1 -1
  212. package/dist/index.es20.js +37 -17
  213. package/dist/index.es20.js.map +1 -1
  214. package/dist/index.es200.js +3 -7
  215. package/dist/index.es200.js.map +1 -1
  216. package/dist/index.es201.js +3 -4
  217. package/dist/index.es201.js.map +1 -1
  218. package/dist/index.es202.js +5 -7
  219. package/dist/index.es202.js.map +1 -1
  220. package/dist/index.es203.js +36 -41
  221. package/dist/index.es203.js.map +1 -1
  222. package/dist/index.es204.js +5 -10
  223. package/dist/index.es204.js.map +1 -1
  224. package/dist/index.es205.js +5 -241
  225. package/dist/index.es205.js.map +1 -1
  226. package/dist/index.es206.js +5 -49
  227. package/dist/index.es206.js.map +1 -1
  228. package/dist/index.es207.js +29 -22
  229. package/dist/index.es207.js.map +1 -1
  230. package/dist/index.es208.js +10 -10
  231. package/dist/index.es208.js.map +1 -1
  232. package/dist/index.es209.js +241 -7
  233. package/dist/index.es209.js.map +1 -1
  234. package/dist/index.es21.js +27 -67
  235. package/dist/index.es21.js.map +1 -1
  236. package/dist/index.es210.js +50 -6
  237. package/dist/index.es210.js.map +1 -1
  238. package/dist/index.es211.js +30 -60
  239. package/dist/index.es211.js.map +1 -1
  240. package/dist/index.es212.js +11 -39
  241. package/dist/index.es212.js.map +1 -1
  242. package/dist/index.es213.js +7 -31
  243. package/dist/index.es213.js.map +1 -1
  244. package/dist/index.es214.js +6 -61
  245. package/dist/index.es214.js.map +1 -1
  246. package/dist/index.es215.js +58 -8
  247. package/dist/index.es215.js.map +1 -1
  248. package/dist/index.es216.js +34 -16
  249. package/dist/index.es216.js.map +1 -1
  250. package/dist/index.es217.js +31 -4
  251. package/dist/index.es217.js.map +1 -1
  252. package/dist/index.es218.js +58 -13
  253. package/dist/index.es218.js.map +1 -1
  254. package/dist/index.es219.js +14 -32
  255. package/dist/index.es219.js.map +1 -1
  256. package/dist/index.es22.js +140 -30
  257. package/dist/index.es22.js.map +1 -1
  258. package/dist/index.es220.js +23 -5
  259. package/dist/index.es220.js.map +1 -1
  260. package/dist/index.es221.js +4 -4
  261. package/dist/index.es221.js.map +1 -1
  262. package/dist/index.es222.js +16 -4
  263. package/dist/index.es222.js.map +1 -1
  264. package/dist/index.es223.js +32 -7
  265. package/dist/index.es223.js.map +1 -1
  266. package/dist/index.es224.js +4 -91
  267. package/dist/index.es224.js.map +1 -1
  268. package/dist/index.es225.js +4 -17
  269. package/dist/index.es225.js.map +1 -1
  270. package/dist/index.es226.js +5 -762
  271. package/dist/index.es226.js.map +1 -1
  272. package/dist/index.es227.js +8 -66
  273. package/dist/index.es227.js.map +1 -1
  274. package/dist/index.es228.js +83 -165
  275. package/dist/index.es228.js.map +1 -1
  276. package/dist/index.es229.js +16 -36
  277. package/dist/index.es229.js.map +1 -1
  278. package/dist/index.es23.js +17 -32
  279. package/dist/index.es23.js.map +1 -1
  280. package/dist/index.es230.js +761 -136
  281. package/dist/index.es230.js.map +1 -1
  282. package/dist/index.es231.js +66 -93
  283. package/dist/index.es231.js.map +1 -1
  284. package/dist/index.es232.js +172 -31
  285. package/dist/index.es232.js.map +1 -1
  286. package/dist/index.es233.js +129 -277
  287. package/dist/index.es233.js.map +1 -1
  288. package/dist/index.es234.js +92 -25
  289. package/dist/index.es234.js.map +1 -1
  290. package/dist/index.es235.js +31 -22
  291. package/dist/index.es235.js.map +1 -1
  292. package/dist/index.es236.js +284 -14
  293. package/dist/index.es236.js.map +1 -1
  294. package/dist/index.es237.js +24 -13
  295. package/dist/index.es237.js.map +1 -1
  296. package/dist/index.es238.js +17 -19
  297. package/dist/index.es238.js.map +1 -1
  298. package/dist/index.es239.js +12 -43
  299. package/dist/index.es239.js.map +1 -1
  300. package/dist/index.es24.js +57 -136
  301. package/dist/index.es24.js.map +1 -1
  302. package/dist/index.es240.js +14 -11
  303. package/dist/index.es240.js.map +1 -1
  304. package/dist/index.es241.js +24 -10
  305. package/dist/index.es241.js.map +1 -1
  306. package/dist/index.es242.js +45 -11
  307. package/dist/index.es242.js.map +1 -1
  308. package/dist/index.es243.js +11 -14
  309. package/dist/index.es243.js.map +1 -1
  310. package/dist/index.es244.js +10 -10
  311. package/dist/index.es244.js.map +1 -1
  312. package/dist/index.es245.js +11 -11
  313. package/dist/index.es245.js.map +1 -1
  314. package/dist/index.es246.js +14 -11
  315. package/dist/index.es246.js.map +1 -1
  316. package/dist/index.es247.js +10 -14
  317. package/dist/index.es247.js.map +1 -1
  318. package/dist/index.es248.js +11 -11
  319. package/dist/index.es248.js.map +1 -1
  320. package/dist/index.es249.js +11 -11
  321. package/dist/index.es249.js.map +1 -1
  322. package/dist/index.es25.js +298 -94
  323. package/dist/index.es25.js.map +1 -1
  324. package/dist/index.es250.js +15 -11
  325. package/dist/index.es250.js.map +1 -1
  326. package/dist/index.es251.js +11 -11
  327. package/dist/index.es251.js.map +1 -1
  328. package/dist/index.es252.js +11 -11
  329. package/dist/index.es252.js.map +1 -1
  330. package/dist/index.es253.js +10 -10
  331. package/dist/index.es253.js.map +1 -1
  332. package/dist/index.es254.js +10 -10
  333. package/dist/index.es254.js.map +1 -1
  334. package/dist/index.es255.js +10 -10
  335. package/dist/index.es255.js.map +1 -1
  336. package/dist/index.es256.js +11 -56
  337. package/dist/index.es256.js.map +1 -1
  338. package/dist/index.es257.js +11 -49
  339. package/dist/index.es257.js.map +1 -1
  340. package/dist/index.es258.js +11 -119
  341. package/dist/index.es258.js.map +1 -1
  342. package/dist/index.es259.js +56 -384
  343. package/dist/index.es259.js.map +1 -1
  344. package/dist/index.es26.js +116 -65
  345. package/dist/index.es26.js.map +1 -1
  346. package/dist/index.es260.js +47 -16
  347. package/dist/index.es260.js.map +1 -1
  348. package/dist/index.es261.js +118 -10
  349. package/dist/index.es261.js.map +1 -1
  350. package/dist/index.es262.js +379 -26
  351. package/dist/index.es262.js.map +1 -1
  352. package/dist/index.es263.js +13 -26
  353. package/dist/index.es263.js.map +1 -1
  354. package/dist/index.es264.js +10 -61
  355. package/dist/index.es264.js.map +1 -1
  356. package/dist/index.es265.js +25 -11
  357. package/dist/index.es265.js.map +1 -1
  358. package/dist/index.es266.js +25 -71
  359. package/dist/index.es266.js.map +1 -1
  360. package/dist/index.es267.js +62 -11
  361. package/dist/index.es267.js.map +1 -1
  362. package/dist/index.es268.js +17 -11
  363. package/dist/index.es268.js.map +1 -1
  364. package/dist/index.es269.js +75 -13
  365. package/dist/index.es269.js.map +1 -1
  366. package/dist/index.es27.js +91 -168
  367. package/dist/index.es27.js.map +1 -1
  368. package/dist/index.es270.js +11 -52
  369. package/dist/index.es270.js.map +1 -1
  370. package/dist/index.es271.js +11 -166
  371. package/dist/index.es271.js.map +1 -1
  372. package/dist/index.es272.js +16 -2
  373. package/dist/index.es272.js.map +1 -1
  374. package/dist/index.es273.js +51 -9
  375. package/dist/index.es273.js.map +1 -1
  376. package/dist/index.es274.js +165 -18
  377. package/dist/index.es274.js.map +1 -1
  378. package/dist/index.es275.js +36 -37
  379. package/dist/index.es275.js.map +1 -1
  380. package/dist/index.es276.js +5 -0
  381. package/dist/index.es276.js.map +1 -0
  382. package/dist/index.es277.js +14 -0
  383. package/dist/index.es277.js.map +1 -0
  384. package/dist/index.es278.js +23 -0
  385. package/dist/index.es278.js.map +1 -0
  386. package/dist/index.es279.js +42 -0
  387. package/dist/index.es279.js.map +1 -0
  388. package/dist/index.es28.js +68 -24
  389. package/dist/index.es28.js.map +1 -1
  390. package/dist/index.es29.js +178 -12
  391. package/dist/index.es29.js.map +1 -1
  392. package/dist/index.es30.js +23 -437
  393. package/dist/index.es30.js.map +1 -1
  394. package/dist/index.es31.js +13 -15
  395. package/dist/index.es31.js.map +1 -1
  396. package/dist/index.es32.js +429 -107
  397. package/dist/index.es32.js.map +1 -1
  398. package/dist/index.es33.js +112 -65
  399. package/dist/index.es33.js.map +1 -1
  400. package/dist/index.es34.js +71 -18
  401. package/dist/index.es34.js.map +1 -1
  402. package/dist/index.es35.js +17 -260
  403. package/dist/index.es35.js.map +1 -1
  404. package/dist/index.es36.js +249 -31
  405. package/dist/index.es36.js.map +1 -1
  406. package/dist/index.es37.js +27 -199
  407. package/dist/index.es37.js.map +1 -1
  408. package/dist/index.es38.js +198 -50
  409. package/dist/index.es38.js.map +1 -1
  410. package/dist/index.es39.js +45 -120
  411. package/dist/index.es39.js.map +1 -1
  412. package/dist/index.es40.js +132 -14
  413. package/dist/index.es40.js.map +1 -1
  414. package/dist/index.es41.js +19 -225
  415. package/dist/index.es41.js.map +1 -1
  416. package/dist/index.es42.js +229 -8
  417. package/dist/index.es42.js.map +1 -1
  418. package/dist/index.es43.js +7 -1190
  419. package/dist/index.es43.js.map +1 -1
  420. package/dist/index.es44.js +1191 -6
  421. package/dist/index.es44.js.map +1 -1
  422. package/dist/index.es45.js +6 -146
  423. package/dist/index.es45.js.map +1 -1
  424. package/dist/index.es46.js +147 -7
  425. package/dist/index.es46.js.map +1 -1
  426. package/dist/index.es47.js +15 -92
  427. package/dist/index.es47.js.map +1 -1
  428. package/dist/index.es49.js +5 -35
  429. package/dist/index.es49.js.map +1 -1
  430. package/dist/index.es50.js +7 -71
  431. package/dist/index.es50.js.map +1 -1
  432. package/dist/index.es51.js +89 -33
  433. package/dist/index.es51.js.map +1 -1
  434. package/dist/index.es52.js +3 -305
  435. package/dist/index.es52.js.map +1 -1
  436. package/dist/index.es53.js +36 -9
  437. package/dist/index.es53.js.map +1 -1
  438. package/dist/index.es54.js +64 -83
  439. package/dist/index.es54.js.map +1 -1
  440. package/dist/index.es55.js +36 -6
  441. package/dist/index.es55.js.map +1 -1
  442. package/dist/index.es56.js +303 -12
  443. package/dist/index.es56.js.map +1 -1
  444. package/dist/index.es57.js +9 -143
  445. package/dist/index.es57.js.map +1 -1
  446. package/dist/index.es58.js +83 -292
  447. package/dist/index.es58.js.map +1 -1
  448. package/dist/index.es59.js +6 -64
  449. package/dist/index.es59.js.map +1 -1
  450. package/dist/index.es6.js +21 -5
  451. package/dist/index.es6.js.map +1 -1
  452. package/dist/index.es60.js +12 -210
  453. package/dist/index.es60.js.map +1 -1
  454. package/dist/index.es61.js +138 -29
  455. package/dist/index.es61.js.map +1 -1
  456. package/dist/index.es62.js +299 -8
  457. package/dist/index.es62.js.map +1 -1
  458. package/dist/index.es63.js +65 -11
  459. package/dist/index.es63.js.map +1 -1
  460. package/dist/index.es64.js +201 -175
  461. package/dist/index.es64.js.map +1 -1
  462. package/dist/index.es65.js +33 -23
  463. package/dist/index.es65.js.map +1 -1
  464. package/dist/index.es66.js +8 -1399
  465. package/dist/index.es66.js.map +1 -1
  466. package/dist/index.es67.js +12 -9
  467. package/dist/index.es67.js.map +1 -1
  468. package/dist/index.es68.js +187 -8
  469. package/dist/index.es68.js.map +1 -1
  470. package/dist/index.es69.js +24 -6
  471. package/dist/index.es69.js.map +1 -1
  472. package/dist/index.es70.js +1384 -147
  473. package/dist/index.es70.js.map +1 -1
  474. package/dist/index.es71.js +9 -672
  475. package/dist/index.es71.js.map +1 -1
  476. package/dist/index.es72.js +8 -12
  477. package/dist/index.es72.js.map +1 -1
  478. package/dist/index.es73.js +6 -40
  479. package/dist/index.es73.js.map +1 -1
  480. package/dist/index.es74.js +155 -26
  481. package/dist/index.es74.js.map +1 -1
  482. package/dist/index.es75.js +657 -217
  483. package/dist/index.es75.js.map +1 -1
  484. package/dist/index.es76.js +11 -29
  485. package/dist/index.es76.js.map +1 -1
  486. package/dist/index.es77.js +37 -72
  487. package/dist/index.es77.js.map +1 -1
  488. package/dist/index.es78.js +32 -74
  489. package/dist/index.es78.js.map +1 -1
  490. package/dist/index.es79.js +226 -46
  491. package/dist/index.es79.js.map +1 -1
  492. package/dist/index.es80.js +6 -6
  493. package/dist/index.es80.js.map +1 -1
  494. package/dist/index.es81.js +71 -39
  495. package/dist/index.es81.js.map +1 -1
  496. package/dist/index.es82.js +73 -54
  497. package/dist/index.es82.js.map +1 -1
  498. package/dist/index.es83.js +52 -13
  499. package/dist/index.es83.js.map +1 -1
  500. package/dist/index.es84.js +28 -135
  501. package/dist/index.es84.js.map +1 -1
  502. package/dist/index.es85.js +42 -20
  503. package/dist/index.es85.js.map +1 -1
  504. package/dist/index.es86.js +36 -181
  505. package/dist/index.es86.js.map +1 -1
  506. package/dist/index.es87.js +5 -241
  507. package/dist/index.es87.js.map +1 -1
  508. package/dist/index.es88.js +65 -347
  509. package/dist/index.es88.js.map +1 -1
  510. package/dist/index.es89.js +31 -131
  511. package/dist/index.es89.js.map +1 -1
  512. package/dist/index.es90.js +49 -62
  513. package/dist/index.es90.js.map +1 -1
  514. package/dist/index.es91.js +13 -37
  515. package/dist/index.es91.js.map +1 -1
  516. package/dist/index.es92.js +134 -34
  517. package/dist/index.es92.js.map +1 -1
  518. package/dist/index.es93.js +20 -165
  519. package/dist/index.es93.js.map +1 -1
  520. package/dist/index.es94.js +162 -183
  521. package/dist/index.es94.js.map +1 -1
  522. package/dist/index.es95.js +240 -13
  523. package/dist/index.es95.js.map +1 -1
  524. package/dist/index.es96.js +352 -27
  525. package/dist/index.es96.js.map +1 -1
  526. package/dist/index.es97.js +130 -27
  527. package/dist/index.es97.js.map +1 -1
  528. package/dist/index.es98.js +64 -3151
  529. package/dist/index.es98.js.map +1 -1
  530. package/dist/index.es99.js +34 -34
  531. package/dist/index.es99.js.map +1 -1
  532. package/dist/langgraph-ui-components.css +107 -0
  533. package/dist/styles.css +1 -1
  534. package/package.json +8 -7
  535. package/dist/index.es48.js +0 -7
  536. package/dist/index.es48.js.map +0 -1
@@ -1,169 +1,24 @@
1
- import { clone } from "./index.es116.js";
2
- import { $ZodNever } from "./index.es117.js";
3
- import { globalRegistry } from "./index.es118.js";
4
- import { _never } from "./index.es119.js";
5
- import { parseAsync } from "./index.es120.js";
6
- function isZodSchemaV4(schema) {
7
- if (typeof schema !== "object" || schema === null) return false;
8
- const obj = schema;
9
- if (!("_zod" in obj)) return false;
10
- const zod = obj._zod;
11
- return typeof zod === "object" && zod !== null && "def" in zod;
12
- }
13
- function isZodSchemaV3(schema) {
14
- if (typeof schema !== "object" || schema === null) return false;
15
- const obj = schema;
16
- if (!("_def" in obj) || "_zod" in obj) return false;
17
- const def = obj._def;
18
- return typeof def === "object" && def != null && "typeName" in def;
19
- }
20
- function isInteropZodSchema(input) {
21
- if (!input) return false;
22
- if (typeof input !== "object") return false;
23
- if (Array.isArray(input)) return false;
24
- if (isZodSchemaV4(input) || isZodSchemaV3(input)) return true;
25
- return false;
26
- }
27
- async function interopParseAsync(schema, input) {
28
- if (isZodSchemaV4(schema)) return await parseAsync(schema, input);
29
- if (isZodSchemaV3(schema)) return await schema.parseAsync(input);
30
- throw new Error("Schema must be an instance of z3.ZodType or z4.$ZodType");
31
- }
32
- function getSchemaDescription(schema) {
33
- if (isZodSchemaV4(schema)) return globalRegistry.get(schema)?.description;
34
- if (isZodSchemaV3(schema)) return schema.description;
35
- if ("description" in schema && typeof schema.description === "string") return schema.description;
36
- return void 0;
37
- }
38
- function isSimpleStringZodSchema(schema) {
39
- if (!isInteropZodSchema(schema)) return false;
40
- if (isZodSchemaV3(schema)) {
41
- const def = schema._def;
42
- return def.typeName === "ZodString";
43
- }
44
- if (isZodSchemaV4(schema)) {
45
- const def = schema._zod.def;
46
- return def.type === "string";
47
- }
48
- return false;
49
- }
50
- function isZodObjectV4(obj) {
51
- if (!isZodSchemaV4(obj)) return false;
52
- if (typeof obj === "object" && obj !== null && "_zod" in obj && typeof obj._zod === "object" && obj._zod !== null && "def" in obj._zod && typeof obj._zod.def === "object" && obj._zod.def !== null && "type" in obj._zod.def && obj._zod.def.type === "object") return true;
53
- return false;
54
- }
55
- function isZodArrayV4(obj) {
56
- if (!isZodSchemaV4(obj)) return false;
57
- if (typeof obj === "object" && obj !== null && "_zod" in obj && typeof obj._zod === "object" && obj._zod !== null && "def" in obj._zod && typeof obj._zod.def === "object" && obj._zod.def !== null && "type" in obj._zod.def && obj._zod.def.type === "array") return true;
58
- return false;
59
- }
60
- function isZodOptionalV4(obj) {
61
- if (!isZodSchemaV4(obj)) return false;
62
- if (typeof obj === "object" && obj !== null && "_zod" in obj && typeof obj._zod === "object" && obj._zod !== null && "def" in obj._zod && typeof obj._zod.def === "object" && obj._zod.def !== null && "type" in obj._zod.def && obj._zod.def.type === "optional") return true;
63
- return false;
64
- }
65
- function isZodNullableV4(obj) {
66
- if (!isZodSchemaV4(obj)) return false;
67
- if (typeof obj === "object" && obj !== null && "_zod" in obj && typeof obj._zod === "object" && obj._zod !== null && "def" in obj._zod && typeof obj._zod.def === "object" && obj._zod.def !== null && "type" in obj._zod.def && obj._zod.def.type === "nullable") return true;
68
- return false;
69
- }
70
- function interopZodObjectStrict(schema, recursive = false) {
71
- if (isZodSchemaV3(schema)) return schema.strict();
72
- if (isZodObjectV4(schema)) {
73
- const outputShape = schema._zod.def.shape;
74
- if (recursive) for (const [key, keySchema] of Object.entries(schema._zod.def.shape)) {
75
- if (isZodObjectV4(keySchema)) {
76
- const outputSchema = interopZodObjectStrict(keySchema, recursive);
77
- outputShape[key] = outputSchema;
78
- } else if (isZodArrayV4(keySchema)) {
79
- let elementSchema = keySchema._zod.def.element;
80
- if (isZodObjectV4(elementSchema)) elementSchema = interopZodObjectStrict(elementSchema, recursive);
81
- outputShape[key] = clone(keySchema, {
82
- ...keySchema._zod.def,
83
- element: elementSchema
84
- });
85
- } else outputShape[key] = keySchema;
86
- const meta$1 = globalRegistry.get(keySchema);
87
- if (meta$1) globalRegistry.add(outputShape[key], meta$1);
88
- }
89
- const modifiedSchema = clone(schema, {
90
- ...schema._zod.def,
91
- shape: outputShape,
92
- catchall: _never($ZodNever)
93
- });
94
- const meta = globalRegistry.get(schema);
95
- if (meta) globalRegistry.add(modifiedSchema, meta);
96
- return modifiedSchema;
97
- }
98
- throw new Error("Schema must be an instance of z3.ZodObject or z4.$ZodObject");
99
- }
100
- function isZodTransformV3(schema) {
101
- return isZodSchemaV3(schema) && "typeName" in schema._def && schema._def.typeName === "ZodEffects";
102
- }
103
- function isZodTransformV4(schema) {
104
- return isZodSchemaV4(schema) && schema._zod.def.type === "pipe";
105
- }
106
- function interopZodTransformInputSchemaImpl(schema, recursive, cache) {
107
- const cached = cache.get(schema);
108
- if (cached !== void 0) return cached;
109
- if (isZodSchemaV3(schema)) {
110
- if (isZodTransformV3(schema)) return interopZodTransformInputSchemaImpl(schema._def.schema, recursive, cache);
111
- return schema;
112
- }
113
- if (isZodSchemaV4(schema)) {
114
- let outputSchema = schema;
115
- if (isZodTransformV4(schema)) outputSchema = interopZodTransformInputSchemaImpl(schema._zod.def.in, recursive, cache);
116
- if (recursive) {
117
- if (isZodObjectV4(outputSchema)) {
118
- const outputShape = {};
119
- for (const [key, keySchema] of Object.entries(outputSchema._zod.def.shape)) outputShape[key] = interopZodTransformInputSchemaImpl(keySchema, recursive, cache);
120
- outputSchema = clone(outputSchema, {
121
- ...outputSchema._zod.def,
122
- shape: outputShape
123
- });
124
- } else if (isZodArrayV4(outputSchema)) {
125
- const elementSchema = interopZodTransformInputSchemaImpl(outputSchema._zod.def.element, recursive, cache);
126
- outputSchema = clone(outputSchema, {
127
- ...outputSchema._zod.def,
128
- element: elementSchema
129
- });
130
- } else if (isZodOptionalV4(outputSchema)) {
131
- const innerSchema = interopZodTransformInputSchemaImpl(outputSchema._zod.def.innerType, recursive, cache);
132
- outputSchema = clone(outputSchema, {
133
- ...outputSchema._zod.def,
134
- innerType: innerSchema
135
- });
136
- } else if (isZodNullableV4(outputSchema)) {
137
- const innerSchema = interopZodTransformInputSchemaImpl(outputSchema._zod.def.innerType, recursive, cache);
138
- outputSchema = clone(outputSchema, {
139
- ...outputSchema._zod.def,
140
- innerType: innerSchema
141
- });
142
- }
143
- }
144
- const meta = globalRegistry.get(schema);
145
- if (meta) globalRegistry.add(outputSchema, meta);
146
- cache.set(schema, outputSchema);
147
- return outputSchema;
148
- }
149
- throw new Error("Schema must be an instance of z3.ZodType or z4.$ZodType");
150
- }
151
- function interopZodTransformInputSchema(schema, recursive = false) {
152
- const cache = /* @__PURE__ */ new WeakMap();
153
- return interopZodTransformInputSchemaImpl(schema, recursive, cache);
1
+ async function raceWithSignal(promise, signal) {
2
+ if (signal === void 0) return promise;
3
+ let listener;
4
+ return Promise.race([promise.catch((err) => {
5
+ if (!signal?.aborted) throw err;
6
+ else return void 0;
7
+ }), new Promise((_, reject) => {
8
+ listener = () => {
9
+ reject(getAbortSignalError(signal));
10
+ };
11
+ signal.addEventListener("abort", listener);
12
+ if (signal.aborted) reject(getAbortSignalError(signal));
13
+ })]).finally(() => signal.removeEventListener("abort", listener));
14
+ }
15
+ function getAbortSignalError(signal) {
16
+ if (signal?.reason instanceof Error) return signal.reason;
17
+ if (typeof signal?.reason === "string") return new Error(signal.reason);
18
+ return /* @__PURE__ */ new Error("Aborted");
154
19
  }
155
20
  export {
156
- getSchemaDescription,
157
- interopParseAsync,
158
- interopZodObjectStrict,
159
- interopZodTransformInputSchema,
160
- isInteropZodSchema,
161
- isSimpleStringZodSchema,
162
- isZodArrayV4,
163
- isZodNullableV4,
164
- isZodObjectV4,
165
- isZodOptionalV4,
166
- isZodSchemaV3,
167
- isZodSchemaV4
21
+ getAbortSignalError,
22
+ raceWithSignal
168
23
  };
169
24
  //# sourceMappingURL=index.es93.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es93.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/types/zod.js"],"sourcesContent":["import { $ZodNever, $ZodOptional, $ZodUnknown, _never, _unknown, clone, globalRegistry, parse, parseAsync, util } from \"zod/v4/core\";\n\n//#region src/utils/types/zod.ts\nfunction isZodSchemaV4(schema) {\n\tif (typeof schema !== \"object\" || schema === null) return false;\n\tconst obj = schema;\n\tif (!(\"_zod\" in obj)) return false;\n\tconst zod = obj._zod;\n\treturn typeof zod === \"object\" && zod !== null && \"def\" in zod;\n}\nfunction isZodSchemaV3(schema) {\n\tif (typeof schema !== \"object\" || schema === null) return false;\n\tconst obj = schema;\n\tif (!(\"_def\" in obj) || \"_zod\" in obj) return false;\n\tconst def = obj._def;\n\treturn typeof def === \"object\" && def != null && \"typeName\" in def;\n}\n/** Backward compatible isZodSchema for Zod 3 */\nfunction isZodSchema(schema) {\n\tif (isZodSchemaV4(schema)) console.warn(\"[WARNING] Attempting to use Zod 4 schema in a context where Zod 3 schema is expected. This may cause unexpected behavior.\");\n\treturn isZodSchemaV3(schema);\n}\n/**\n* Given either a Zod schema, or plain object, determine if the input is a Zod schema.\n*\n* @param {unknown} input\n* @returns {boolean} Whether or not the provided input is a Zod schema.\n*/\nfunction isInteropZodSchema(input) {\n\tif (!input) return false;\n\tif (typeof input !== \"object\") return false;\n\tif (Array.isArray(input)) return false;\n\tif (isZodSchemaV4(input) || isZodSchemaV3(input)) return true;\n\treturn false;\n}\nfunction isZodLiteralV3(obj) {\n\tif (typeof obj === \"object\" && obj !== null && \"_def\" in obj && typeof obj._def === \"object\" && obj._def !== null && \"typeName\" in obj._def && obj._def.typeName === \"ZodLiteral\") return true;\n\treturn false;\n}\nfunction isZodLiteralV4(obj) {\n\tif (!isZodSchemaV4(obj)) return false;\n\tif (typeof obj === \"object\" && obj !== null && \"_zod\" in obj && typeof obj._zod === \"object\" && obj._zod !== null && \"def\" in obj._zod && typeof obj._zod.def === \"object\" && obj._zod.def !== null && \"type\" in obj._zod.def && obj._zod.def.type === \"literal\") return true;\n\treturn false;\n}\n/**\n* Determines if the provided value is an InteropZodLiteral (Zod v3 or v4 literal schema).\n*\n* @param obj The value to check.\n* @returns {boolean} True if the value is a Zod v3 or v4 literal schema, false otherwise.\n*/\nfunction isInteropZodLiteral(obj) {\n\tif (isZodLiteralV3(obj)) return true;\n\tif (isZodLiteralV4(obj)) return true;\n\treturn false;\n}\n/**\n* Asynchronously parses the input using the provided Zod schema (v3 or v4) and returns a safe parse result.\n* This function handles both Zod v3 and v4 schemas, returning a result object indicating success or failure.\n*\n* @template T - The expected output type of the schema.\n* @param {InteropZodType<T>} schema - The Zod schema (v3 or v4) to use for parsing.\n* @param {unknown} input - The input value to parse.\n* @returns {Promise<InteropZodSafeParseResult<T>>} A promise that resolves to a safe parse result object.\n* @throws {Error} If the schema is not a recognized Zod v3 or v4 schema.\n*/\nasync function interopSafeParseAsync(schema, input) {\n\tif (isZodSchemaV4(schema)) try {\n\t\tconst data = await parseAsync(schema, input);\n\t\treturn {\n\t\t\tsuccess: true,\n\t\t\tdata\n\t\t};\n\t} catch (error) {\n\t\treturn {\n\t\t\tsuccess: false,\n\t\t\terror\n\t\t};\n\t}\n\tif (isZodSchemaV3(schema)) return await schema.safeParseAsync(input);\n\tthrow new Error(\"Schema must be an instance of z3.ZodType or z4.$ZodType\");\n}\n/**\n* Asynchronously parses the input using the provided Zod schema (v3 or v4) and returns the parsed value.\n* Throws an error if parsing fails or if the schema is not a recognized Zod v3 or v4 schema.\n*\n* @template T - The expected output type of the schema.\n* @param {InteropZodType<T>} schema - The Zod schema (v3 or v4) to use for parsing.\n* @param {unknown} input - The input value to parse.\n* @returns {Promise<T>} A promise that resolves to the parsed value.\n* @throws {Error} If parsing fails or the schema is not a recognized Zod v3 or v4 schema.\n*/\nasync function interopParseAsync(schema, input) {\n\tif (isZodSchemaV4(schema)) return await parseAsync(schema, input);\n\tif (isZodSchemaV3(schema)) return await schema.parseAsync(input);\n\tthrow new Error(\"Schema must be an instance of z3.ZodType or z4.$ZodType\");\n}\n/**\n* Safely parses the input using the provided Zod schema (v3 or v4) and returns a result object\n* indicating success or failure. This function is compatible with both Zod v3 and v4 schemas.\n*\n* @template T - The expected output type of the schema.\n* @param {InteropZodType<T>} schema - The Zod schema (v3 or v4) to use for parsing.\n* @param {unknown} input - The input value to parse.\n* @returns {InteropZodSafeParseResult<T>} An object with either the parsed data (on success)\n* or the error (on failure).\n* @throws {Error} If the schema is not a recognized Zod v3 or v4 schema.\n*/\nfunction interopSafeParse(schema, input) {\n\tif (isZodSchemaV4(schema)) try {\n\t\tconst data = parse(schema, input);\n\t\treturn {\n\t\t\tsuccess: true,\n\t\t\tdata\n\t\t};\n\t} catch (error) {\n\t\treturn {\n\t\t\tsuccess: false,\n\t\t\terror\n\t\t};\n\t}\n\tif (isZodSchemaV3(schema)) return schema.safeParse(input);\n\tthrow new Error(\"Schema must be an instance of z3.ZodType or z4.$ZodType\");\n}\n/**\n* Parses the input using the provided Zod schema (v3 or v4) and returns the parsed value.\n* Throws an error if parsing fails or if the schema is not a recognized Zod v3 or v4 schema.\n*\n* @template T - The expected output type of the schema.\n* @param {InteropZodType<T>} schema - The Zod schema (v3 or v4) to use for parsing.\n* @param {unknown} input - The input value to parse.\n* @returns {T} The parsed value.\n* @throws {Error} If parsing fails or the schema is not a recognized Zod v3 or v4 schema.\n*/\nfunction interopParse(schema, input) {\n\tif (isZodSchemaV4(schema)) return parse(schema, input);\n\tif (isZodSchemaV3(schema)) return schema.parse(input);\n\tthrow new Error(\"Schema must be an instance of z3.ZodType or z4.$ZodType\");\n}\n/**\n* Retrieves the description from a schema definition (v3, v4, or plain object), if available.\n*\n* @param {unknown} schema - The schema to extract the description from.\n* @returns {string | undefined} The description of the schema, or undefined if not present.\n*/\nfunction getSchemaDescription(schema) {\n\tif (isZodSchemaV4(schema)) return globalRegistry.get(schema)?.description;\n\tif (isZodSchemaV3(schema)) return schema.description;\n\tif (\"description\" in schema && typeof schema.description === \"string\") return schema.description;\n\treturn void 0;\n}\n/**\n* Determines if the provided Zod schema is \"shapeless\".\n* A shapeless schema is one that does not define any object shape,\n* such as ZodString, ZodNumber, ZodBoolean, ZodAny, etc.\n* For ZodObject, it must have no shape keys to be considered shapeless.\n* ZodRecord schemas are considered shapeless since they define dynamic\n* key-value mappings without fixed keys.\n*\n* @param schema The Zod schema to check.\n* @returns {boolean} True if the schema is shapeless, false otherwise.\n*/\nfunction isShapelessZodSchema(schema) {\n\tif (!isInteropZodSchema(schema)) return false;\n\tif (isZodSchemaV3(schema)) {\n\t\tconst def = schema._def;\n\t\tif (def.typeName === \"ZodObject\") {\n\t\t\tconst obj = schema;\n\t\t\treturn !obj.shape || Object.keys(obj.shape).length === 0;\n\t\t}\n\t\tif (def.typeName === \"ZodRecord\") return true;\n\t}\n\tif (isZodSchemaV4(schema)) {\n\t\tconst def = schema._zod.def;\n\t\tif (def.type === \"object\") {\n\t\t\tconst obj = schema;\n\t\t\treturn !obj.shape || Object.keys(obj.shape).length === 0;\n\t\t}\n\t\tif (def.type === \"record\") return true;\n\t}\n\tif (typeof schema === \"object\" && schema !== null && !(\"shape\" in schema)) return true;\n\treturn false;\n}\n/**\n* Determines if the provided Zod schema should be treated as a simple string schema\n* that maps to DynamicTool. This aligns with the type-level constraint of\n* InteropZodType<string | undefined> which only matches basic string schemas.\n* If the provided schema is just z.string(), we can make the determination that\n* the tool is just a generic string tool that doesn't require any input validation.\n*\n* This function only returns true for basic ZodString schemas, including:\n* - Basic string schemas (z.string())\n* - String schemas with validations (z.string().min(1), z.string().email(), etc.)\n*\n* This function returns false for everything else, including:\n* - String schemas with defaults (z.string().default(\"value\"))\n* - Branded string schemas (z.string().brand<\"UserId\">())\n* - String schemas with catch operations (z.string().catch(\"default\"))\n* - Optional/nullable string schemas (z.string().optional())\n* - Transformed schemas (z.string().transform() or z.object().transform())\n* - Object or record schemas, even if they're empty\n* - Any other schema type\n*\n* @param schema The Zod schema to check.\n* @returns {boolean} True if the schema is a basic ZodString, false otherwise.\n*/\nfunction isSimpleStringZodSchema(schema) {\n\tif (!isInteropZodSchema(schema)) return false;\n\tif (isZodSchemaV3(schema)) {\n\t\tconst def = schema._def;\n\t\treturn def.typeName === \"ZodString\";\n\t}\n\tif (isZodSchemaV4(schema)) {\n\t\tconst def = schema._zod.def;\n\t\treturn def.type === \"string\";\n\t}\n\treturn false;\n}\nfunction isZodObjectV3(obj) {\n\tif (typeof obj === \"object\" && obj !== null && \"_def\" in obj && typeof obj._def === \"object\" && obj._def !== null && \"typeName\" in obj._def && obj._def.typeName === \"ZodObject\") return true;\n\treturn false;\n}\nfunction isZodObjectV4(obj) {\n\tif (!isZodSchemaV4(obj)) return false;\n\tif (typeof obj === \"object\" && obj !== null && \"_zod\" in obj && typeof obj._zod === \"object\" && obj._zod !== null && \"def\" in obj._zod && typeof obj._zod.def === \"object\" && obj._zod.def !== null && \"type\" in obj._zod.def && obj._zod.def.type === \"object\") return true;\n\treturn false;\n}\nfunction isZodArrayV4(obj) {\n\tif (!isZodSchemaV4(obj)) return false;\n\tif (typeof obj === \"object\" && obj !== null && \"_zod\" in obj && typeof obj._zod === \"object\" && obj._zod !== null && \"def\" in obj._zod && typeof obj._zod.def === \"object\" && obj._zod.def !== null && \"type\" in obj._zod.def && obj._zod.def.type === \"array\") return true;\n\treturn false;\n}\nfunction isZodOptionalV4(obj) {\n\tif (!isZodSchemaV4(obj)) return false;\n\tif (typeof obj === \"object\" && obj !== null && \"_zod\" in obj && typeof obj._zod === \"object\" && obj._zod !== null && \"def\" in obj._zod && typeof obj._zod.def === \"object\" && obj._zod.def !== null && \"type\" in obj._zod.def && obj._zod.def.type === \"optional\") return true;\n\treturn false;\n}\nfunction isZodNullableV4(obj) {\n\tif (!isZodSchemaV4(obj)) return false;\n\tif (typeof obj === \"object\" && obj !== null && \"_zod\" in obj && typeof obj._zod === \"object\" && obj._zod !== null && \"def\" in obj._zod && typeof obj._zod.def === \"object\" && obj._zod.def !== null && \"type\" in obj._zod.def && obj._zod.def.type === \"nullable\") return true;\n\treturn false;\n}\n/**\n* Determines if the provided value is an InteropZodObject (Zod v3 or v4 object schema).\n*\n* @param obj The value to check.\n* @returns {boolean} True if the value is a Zod v3 or v4 object schema, false otherwise.\n*/\nfunction isInteropZodObject(obj) {\n\tif (isZodObjectV3(obj)) return true;\n\tif (isZodObjectV4(obj)) return true;\n\treturn false;\n}\n/**\n* Retrieves the shape (fields) of a Zod object schema, supporting both Zod v3 and v4.\n*\n* @template T - The type of the Zod object schema.\n* @param {T} schema - The Zod object schema instance (either v3 or v4).\n* @returns {InteropZodObjectShape<T>} The shape of the object schema.\n* @throws {Error} If the schema is not a Zod v3 or v4 object.\n*/\nfunction getInteropZodObjectShape(schema) {\n\tif (isZodSchemaV3(schema)) return schema.shape;\n\tif (isZodSchemaV4(schema)) return schema._zod.def.shape;\n\tthrow new Error(\"Schema must be an instance of z3.ZodObject or z4.$ZodObject\");\n}\n/**\n* Extends a Zod object schema with additional fields, supporting both Zod v3 and v4.\n*\n* @template T - The type of the Zod object schema.\n* @param {T} schema - The Zod object schema instance (either v3 or v4).\n* @param {InteropZodObjectShape} extension - The fields to add to the schema.\n* @returns {InteropZodObject} The extended Zod object schema.\n* @throws {Error} If the schema is not a Zod v3 or v4 object.\n*/\nfunction extendInteropZodObject(schema, extension) {\n\tif (isZodSchemaV3(schema)) return schema.extend(extension);\n\tif (isZodSchemaV4(schema)) return util.extend(schema, extension);\n\tthrow new Error(\"Schema must be an instance of z3.ZodObject or z4.$ZodObject\");\n}\n/**\n* Returns a partial version of a Zod object schema, making all fields optional.\n* Supports both Zod v3 and v4.\n*\n* @template T - The type of the Zod object schema.\n* @param {T} schema - The Zod object schema instance (either v3 or v4).\n* @returns {InteropZodObject} The partial Zod object schema.\n* @throws {Error} If the schema is not a Zod v3 or v4 object.\n*/\nfunction interopZodObjectPartial(schema) {\n\tif (isZodSchemaV3(schema)) return schema.partial();\n\tif (isZodSchemaV4(schema)) return util.partial($ZodOptional, schema, void 0);\n\tthrow new Error(\"Schema must be an instance of z3.ZodObject or z4.$ZodObject\");\n}\n/**\n* Returns a strict version of a Zod object schema, disallowing unknown keys.\n* Supports both Zod v3 and v4 object schemas. If `recursive` is true, applies strictness\n* recursively to all nested object schemas and arrays of object schemas.\n*\n* @template T - The type of the Zod object schema.\n* @param {T} schema - The Zod object schema instance (either v3 or v4).\n* @param {boolean} [recursive=false] - Whether to apply strictness recursively to nested objects/arrays.\n* @returns {InteropZodObject} The strict Zod object schema.\n* @throws {Error} If the schema is not a Zod v3 or v4 object.\n*/\nfunction interopZodObjectStrict(schema, recursive = false) {\n\tif (isZodSchemaV3(schema)) return schema.strict();\n\tif (isZodObjectV4(schema)) {\n\t\tconst outputShape = schema._zod.def.shape;\n\t\tif (recursive) for (const [key, keySchema] of Object.entries(schema._zod.def.shape)) {\n\t\t\tif (isZodObjectV4(keySchema)) {\n\t\t\t\tconst outputSchema = interopZodObjectStrict(keySchema, recursive);\n\t\t\t\toutputShape[key] = outputSchema;\n\t\t\t} else if (isZodArrayV4(keySchema)) {\n\t\t\t\tlet elementSchema = keySchema._zod.def.element;\n\t\t\t\tif (isZodObjectV4(elementSchema)) elementSchema = interopZodObjectStrict(elementSchema, recursive);\n\t\t\t\toutputShape[key] = clone(keySchema, {\n\t\t\t\t\t...keySchema._zod.def,\n\t\t\t\t\telement: elementSchema\n\t\t\t\t});\n\t\t\t} else outputShape[key] = keySchema;\n\t\t\tconst meta$1 = globalRegistry.get(keySchema);\n\t\t\tif (meta$1) globalRegistry.add(outputShape[key], meta$1);\n\t\t}\n\t\tconst modifiedSchema = clone(schema, {\n\t\t\t...schema._zod.def,\n\t\t\tshape: outputShape,\n\t\t\tcatchall: _never($ZodNever)\n\t\t});\n\t\tconst meta = globalRegistry.get(schema);\n\t\tif (meta) globalRegistry.add(modifiedSchema, meta);\n\t\treturn modifiedSchema;\n\t}\n\tthrow new Error(\"Schema must be an instance of z3.ZodObject or z4.$ZodObject\");\n}\n/**\n* Returns a passthrough version of a Zod object schema, allowing unknown keys.\n* Supports both Zod v3 and v4 object schemas. If `recursive` is true, applies passthrough\n* recursively to all nested object schemas and arrays of object schemas.\n*\n* @template T - The type of the Zod object schema.\n* @param {T} schema - The Zod object schema instance (either v3 or v4).\n* @param {boolean} [recursive=false] - Whether to apply passthrough recursively to nested objects/arrays.\n* @returns {InteropZodObject} The passthrough Zod object schema.\n* @throws {Error} If the schema is not a Zod v3 or v4 object.\n*/\nfunction interopZodObjectPassthrough(schema, recursive = false) {\n\tif (isZodObjectV3(schema)) return schema.passthrough();\n\tif (isZodObjectV4(schema)) {\n\t\tconst outputShape = schema._zod.def.shape;\n\t\tif (recursive) for (const [key, keySchema] of Object.entries(schema._zod.def.shape)) {\n\t\t\tif (isZodObjectV4(keySchema)) {\n\t\t\t\tconst outputSchema = interopZodObjectPassthrough(keySchema, recursive);\n\t\t\t\toutputShape[key] = outputSchema;\n\t\t\t} else if (isZodArrayV4(keySchema)) {\n\t\t\t\tlet elementSchema = keySchema._zod.def.element;\n\t\t\t\tif (isZodObjectV4(elementSchema)) elementSchema = interopZodObjectPassthrough(elementSchema, recursive);\n\t\t\t\toutputShape[key] = clone(keySchema, {\n\t\t\t\t\t...keySchema._zod.def,\n\t\t\t\t\telement: elementSchema\n\t\t\t\t});\n\t\t\t} else outputShape[key] = keySchema;\n\t\t\tconst meta$1 = globalRegistry.get(keySchema);\n\t\t\tif (meta$1) globalRegistry.add(outputShape[key], meta$1);\n\t\t}\n\t\tconst modifiedSchema = clone(schema, {\n\t\t\t...schema._zod.def,\n\t\t\tshape: outputShape,\n\t\t\tcatchall: _unknown($ZodUnknown)\n\t\t});\n\t\tconst meta = globalRegistry.get(schema);\n\t\tif (meta) globalRegistry.add(modifiedSchema, meta);\n\t\treturn modifiedSchema;\n\t}\n\tthrow new Error(\"Schema must be an instance of z3.ZodObject or z4.$ZodObject\");\n}\n/**\n* Returns a getter function for the default value of a Zod schema, if one is defined.\n* Supports both Zod v3 and v4 schemas. If the schema has a default value,\n* the returned function will return that value when called. If no default is defined,\n* returns undefined.\n*\n* @template T - The type of the Zod schema.\n* @param {T} schema - The Zod schema instance (either v3 or v4).\n* @returns {(() => InferInteropZodOutput<T>) | undefined} A function that returns the default value, or undefined if no default is set.\n*/\nfunction getInteropZodDefaultGetter(schema) {\n\tif (isZodSchemaV3(schema)) try {\n\t\tconst defaultValue = schema.parse(void 0);\n\t\treturn () => defaultValue;\n\t} catch {\n\t\treturn void 0;\n\t}\n\tif (isZodSchemaV4(schema)) try {\n\t\tconst defaultValue = parse(schema, void 0);\n\t\treturn () => defaultValue;\n\t} catch {\n\t\treturn void 0;\n\t}\n\treturn void 0;\n}\nfunction isZodTransformV3(schema) {\n\treturn isZodSchemaV3(schema) && \"typeName\" in schema._def && schema._def.typeName === \"ZodEffects\";\n}\nfunction isZodTransformV4(schema) {\n\treturn isZodSchemaV4(schema) && schema._zod.def.type === \"pipe\";\n}\nfunction interopZodTransformInputSchemaImpl(schema, recursive, cache) {\n\tconst cached = cache.get(schema);\n\tif (cached !== void 0) return cached;\n\tif (isZodSchemaV3(schema)) {\n\t\tif (isZodTransformV3(schema)) return interopZodTransformInputSchemaImpl(schema._def.schema, recursive, cache);\n\t\treturn schema;\n\t}\n\tif (isZodSchemaV4(schema)) {\n\t\tlet outputSchema = schema;\n\t\tif (isZodTransformV4(schema)) outputSchema = interopZodTransformInputSchemaImpl(schema._zod.def.in, recursive, cache);\n\t\tif (recursive) {\n\t\t\tif (isZodObjectV4(outputSchema)) {\n\t\t\t\tconst outputShape = {};\n\t\t\t\tfor (const [key, keySchema] of Object.entries(outputSchema._zod.def.shape)) outputShape[key] = interopZodTransformInputSchemaImpl(keySchema, recursive, cache);\n\t\t\t\toutputSchema = clone(outputSchema, {\n\t\t\t\t\t...outputSchema._zod.def,\n\t\t\t\t\tshape: outputShape\n\t\t\t\t});\n\t\t\t} else if (isZodArrayV4(outputSchema)) {\n\t\t\t\tconst elementSchema = interopZodTransformInputSchemaImpl(outputSchema._zod.def.element, recursive, cache);\n\t\t\t\toutputSchema = clone(outputSchema, {\n\t\t\t\t\t...outputSchema._zod.def,\n\t\t\t\t\telement: elementSchema\n\t\t\t\t});\n\t\t\t} else if (isZodOptionalV4(outputSchema)) {\n\t\t\t\tconst innerSchema = interopZodTransformInputSchemaImpl(outputSchema._zod.def.innerType, recursive, cache);\n\t\t\t\toutputSchema = clone(outputSchema, {\n\t\t\t\t\t...outputSchema._zod.def,\n\t\t\t\t\tinnerType: innerSchema\n\t\t\t\t});\n\t\t\t} else if (isZodNullableV4(outputSchema)) {\n\t\t\t\tconst innerSchema = interopZodTransformInputSchemaImpl(outputSchema._zod.def.innerType, recursive, cache);\n\t\t\t\toutputSchema = clone(outputSchema, {\n\t\t\t\t\t...outputSchema._zod.def,\n\t\t\t\t\tinnerType: innerSchema\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tconst meta = globalRegistry.get(schema);\n\t\tif (meta) globalRegistry.add(outputSchema, meta);\n\t\tcache.set(schema, outputSchema);\n\t\treturn outputSchema;\n\t}\n\tthrow new Error(\"Schema must be an instance of z3.ZodType or z4.$ZodType\");\n}\n/**\n* Returns the input type of a Zod transform schema, for both v3 and v4.\n* If the schema is not a transform, returns undefined. If `recursive` is true,\n* recursively processes nested object schemas and arrays of object schemas.\n*\n* @param schema - The Zod schema instance (v3 or v4)\n* @param {boolean} [recursive=false] - Whether to recursively process nested objects/arrays.\n* @returns The input Zod schema of the transform, or undefined if not a transform\n*/\nfunction interopZodTransformInputSchema(schema, recursive = false) {\n\tconst cache = /* @__PURE__ */ new WeakMap();\n\treturn interopZodTransformInputSchemaImpl(schema, recursive, cache);\n}\n/**\n* Creates a modified version of a Zod object schema where fields matching a predicate are made optional.\n* Supports both Zod v3 and v4 schemas and preserves the original schema version.\n*\n* @template T - The type of the Zod object schema.\n* @param {T} schema - The Zod object schema instance (either v3 or v4).\n* @param {(key: string, value: InteropZodType) => boolean} predicate - Function to determine which fields should be optional.\n* @returns {InteropZodObject} The modified Zod object schema.\n* @throws {Error} If the schema is not a Zod v3 or v4 object.\n*/\nfunction interopZodObjectMakeFieldsOptional(schema, predicate) {\n\tif (isZodSchemaV3(schema)) {\n\t\tconst shape = getInteropZodObjectShape(schema);\n\t\tconst modifiedShape = {};\n\t\tfor (const [key, value] of Object.entries(shape)) if (predicate(key, value)) modifiedShape[key] = value.optional();\n\t\telse modifiedShape[key] = value;\n\t\treturn schema.extend(modifiedShape);\n\t}\n\tif (isZodSchemaV4(schema)) {\n\t\tconst shape = getInteropZodObjectShape(schema);\n\t\tconst outputShape = { ...schema._zod.def.shape };\n\t\tfor (const [key, value] of Object.entries(shape)) if (predicate(key, value)) outputShape[key] = new $ZodOptional({\n\t\t\ttype: \"optional\",\n\t\t\tinnerType: value\n\t\t});\n\t\tconst modifiedSchema = clone(schema, {\n\t\t\t...schema._zod.def,\n\t\t\tshape: outputShape\n\t\t});\n\t\tconst meta = globalRegistry.get(schema);\n\t\tif (meta) globalRegistry.add(modifiedSchema, meta);\n\t\treturn modifiedSchema;\n\t}\n\tthrow new Error(\"Schema must be an instance of z3.ZodObject or z4.$ZodObject\");\n}\nfunction isInteropZodError(e) {\n\treturn e instanceof Error && (e.constructor.name === \"ZodError\" || e.constructor.name === \"$ZodError\");\n}\n\n//#endregion\nexport { extendInteropZodObject, getInteropZodDefaultGetter, getInteropZodObjectShape, getSchemaDescription, interopParse, interopParseAsync, interopSafeParse, interopSafeParseAsync, interopZodObjectMakeFieldsOptional, interopZodObjectPartial, interopZodObjectPassthrough, interopZodObjectStrict, interopZodTransformInputSchema, isInteropZodError, isInteropZodLiteral, isInteropZodObject, isInteropZodSchema, isShapelessZodSchema, isSimpleStringZodSchema, isZodArrayV4, isZodLiteralV3, isZodLiteralV4, isZodNullableV4, isZodObjectV3, isZodObjectV4, isZodOptionalV4, isZodSchema, isZodSchemaV3, isZodSchemaV4 };\n//# sourceMappingURL=zod.js.map"],"names":[],"mappings":";;;;;AAGA,SAAS,cAAc,QAAQ;AAC9B,MAAI,OAAO,WAAW,YAAY,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AAAA,UAClC,GAAG,aAAa,KAAK;AAAA,UACrB,WAAW;AAAA,QAChB,CAAK;AAAA,MACF;AAAA,IACD;AACA,UAAM,OAAO,eAAe,IAAI,MAAM;AACtC,QAAI,KAAM,gBAAe,IAAI,cAAc,IAAI;AAC/C,UAAM,IAAI,QAAQ,YAAY;AAC9B,WAAO;AAAA,EACR;AACA,QAAM,IAAI,MAAM,yDAAyD;AAC1E;AAUA,SAAS,+BAA+B,QAAQ,YAAY,OAAO;AAClE,QAAM,QAAwB,oBAAI,QAAO;AACzC,SAAO,mCAAmC,QAAQ,WAAW,KAAK;AACnE;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es93.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/signal.js"],"sourcesContent":["//#region src/utils/signal.ts\n/**\n* Race a promise with an abort signal. If the signal is aborted, the promise will\n* be rejected with the error from the signal. If the promise is rejected, the signal will be aborted.\n*\n* @param promise - The promise to race.\n* @param signal - The abort signal.\n* @returns The result of the promise.\n*/\nasync function raceWithSignal(promise, signal) {\n\tif (signal === void 0) return promise;\n\tlet listener;\n\treturn Promise.race([promise.catch((err) => {\n\t\tif (!signal?.aborted) throw err;\n\t\telse return void 0;\n\t}), new Promise((_, reject) => {\n\t\tlistener = () => {\n\t\t\treject(getAbortSignalError(signal));\n\t\t};\n\t\tsignal.addEventListener(\"abort\", listener);\n\t\tif (signal.aborted) reject(getAbortSignalError(signal));\n\t})]).finally(() => signal.removeEventListener(\"abort\", listener));\n}\n/**\n* Get the error from an abort signal. Since you can set the reason to anything,\n* we have to do some type gymnastics to get a proper error message.\n*\n* @param signal - The abort signal.\n* @returns The error from the abort signal.\n*/\nfunction getAbortSignalError(signal) {\n\tif (signal?.reason instanceof Error) return signal.reason;\n\tif (typeof signal?.reason === \"string\") return new Error(signal.reason);\n\treturn /* @__PURE__ */ new Error(\"Aborted\");\n}\n\n//#endregion\nexport { getAbortSignalError, raceWithSignal };\n//# sourceMappingURL=signal.js.map"],"names":[],"mappings":"AASA,eAAe,eAAe,SAAS,QAAQ;AAC9C,MAAI,WAAW,OAAQ,QAAO;AAC9B,MAAI;AACJ,SAAO,QAAQ,KAAK,CAAC,QAAQ,MAAM,CAAC,QAAQ;AAC3C,QAAI,CAAC,QAAQ,QAAS,OAAM;AAAA,QACvB,QAAO;AAAA,EACb,CAAC,GAAG,IAAI,QAAQ,CAAC,GAAG,WAAW;AAC9B,eAAW,MAAM;AAChB,aAAO,oBAAoB,MAAM,CAAC;AAAA,IACnC;AACA,WAAO,iBAAiB,SAAS,QAAQ;AACzC,QAAI,OAAO,QAAS,QAAO,oBAAoB,MAAM,CAAC;AAAA,EACvD,CAAC,CAAC,CAAC,EAAE,QAAQ,MAAM,OAAO,oBAAoB,SAAS,QAAQ,CAAC;AACjE;AAQA,SAAS,oBAAoB,QAAQ;AACpC,MAAI,QAAQ,kBAAkB,MAAO,QAAO,OAAO;AACnD,MAAI,OAAO,QAAQ,WAAW,SAAU,QAAO,IAAI,MAAM,OAAO,MAAM;AACtE,SAAuB,oBAAI,MAAM,SAAS;AAC3C;","x_google_ignoreList":[0]}
@@ -1,206 +1,185 @@
1
- import { __export } from "./index.es46.js";
2
- import { isRunnableInterface } from "./index.es92.js";
3
- import { drawMermaid, drawMermaidImage } from "./index.es121.js";
4
- import { toJsonSchema } from "./index.es122.js";
5
- import { validate, v4 } from "uuid";
6
- var graph_exports = {};
7
- __export(graph_exports, { Graph: () => Graph });
8
- function nodeDataStr(id, data) {
9
- if (id !== void 0 && !validate(id)) return id;
10
- else if (isRunnableInterface(data)) try {
11
- let dataStr = data.getName();
12
- dataStr = dataStr.startsWith("Runnable") ? dataStr.slice(8) : dataStr;
13
- return dataStr;
14
- } catch {
15
- return data.getName();
1
+ import { __export } from "./index.es50.js";
2
+ import { AsyncLocalStorageProviderSingleton } from "./index.es90.js";
3
+ import "./index.es91.js";
4
+ import { pickRunnableConfigKeys } from "./index.es92.js";
5
+ import { raceWithSignal } from "./index.es93.js";
6
+ var stream_exports = {};
7
+ __export(stream_exports, {
8
+ AsyncGeneratorWithSetup: () => AsyncGeneratorWithSetup,
9
+ IterableReadableStream: () => IterableReadableStream,
10
+ atee: () => atee,
11
+ concat: () => concat,
12
+ pipeGeneratorWithSetup: () => pipeGeneratorWithSetup
13
+ });
14
+ var IterableReadableStream = class IterableReadableStream2 extends ReadableStream {
15
+ reader;
16
+ ensureReader() {
17
+ if (!this.reader) this.reader = this.getReader();
16
18
  }
17
- else return data.name ?? "UnknownSchema";
18
- }
19
- function nodeDataJson(node) {
20
- if (isRunnableInterface(node.data)) return {
21
- type: "runnable",
22
- data: {
23
- id: node.data.lc_id,
24
- name: node.data.getName()
25
- }
26
- };
27
- else return {
28
- type: "schema",
29
- data: {
30
- ...toJsonSchema(node.data.schema),
31
- title: node.data.name
19
+ async next() {
20
+ this.ensureReader();
21
+ try {
22
+ const result = await this.reader.read();
23
+ if (result.done) {
24
+ this.reader.releaseLock();
25
+ return {
26
+ done: true,
27
+ value: void 0
28
+ };
29
+ } else return {
30
+ done: false,
31
+ value: result.value
32
+ };
33
+ } catch (e) {
34
+ this.reader.releaseLock();
35
+ throw e;
32
36
  }
33
- };
34
- }
35
- var Graph = class Graph2 {
36
- nodes = {};
37
- edges = [];
38
- constructor(params) {
39
- this.nodes = params?.nodes ?? this.nodes;
40
- this.edges = params?.edges ?? this.edges;
41
37
  }
42
- toJSON() {
43
- const stableNodeIds = {};
44
- Object.values(this.nodes).forEach((node, i) => {
45
- stableNodeIds[node.id] = validate(node.id) ? i : node.id;
46
- });
38
+ async return() {
39
+ this.ensureReader();
40
+ if (this.locked) {
41
+ const cancelPromise = this.reader.cancel();
42
+ this.reader.releaseLock();
43
+ await cancelPromise;
44
+ }
47
45
  return {
48
- nodes: Object.values(this.nodes).map((node) => ({
49
- id: stableNodeIds[node.id],
50
- ...nodeDataJson(node)
51
- })),
52
- edges: this.edges.map((edge) => {
53
- const item = {
54
- source: stableNodeIds[edge.source],
55
- target: stableNodeIds[edge.target]
56
- };
57
- if (typeof edge.data !== "undefined") item.data = edge.data;
58
- if (typeof edge.conditional !== "undefined") item.conditional = edge.conditional;
59
- return item;
60
- })
61
- };
62
- }
63
- addNode(data, id, metadata) {
64
- if (id !== void 0 && this.nodes[id] !== void 0) throw new Error(`Node with id ${id} already exists`);
65
- const nodeId = id ?? v4();
66
- const node = {
67
- id: nodeId,
68
- data,
69
- name: nodeDataStr(id, data),
70
- metadata
46
+ done: true,
47
+ value: void 0
71
48
  };
72
- this.nodes[nodeId] = node;
73
- return node;
74
49
  }
75
- removeNode(node) {
76
- delete this.nodes[node.id];
77
- this.edges = this.edges.filter((edge) => edge.source !== node.id && edge.target !== node.id);
50
+ async throw(e) {
51
+ this.ensureReader();
52
+ if (this.locked) {
53
+ const cancelPromise = this.reader.cancel();
54
+ this.reader.releaseLock();
55
+ await cancelPromise;
56
+ }
57
+ throw e;
78
58
  }
79
- addEdge(source, target, data, conditional) {
80
- if (this.nodes[source.id] === void 0) throw new Error(`Source node ${source.id} not in graph`);
81
- if (this.nodes[target.id] === void 0) throw new Error(`Target node ${target.id} not in graph`);
82
- const edge = {
83
- source: source.id,
84
- target: target.id,
85
- data,
86
- conditional
87
- };
88
- this.edges.push(edge);
89
- return edge;
59
+ [Symbol.asyncIterator]() {
60
+ return this;
90
61
  }
91
- firstNode() {
92
- return _firstNode(this);
62
+ async [Symbol.asyncDispose]() {
63
+ await this.return();
93
64
  }
94
- lastNode() {
95
- return _lastNode(this);
65
+ static fromReadableStream(stream) {
66
+ const reader = stream.getReader();
67
+ return new IterableReadableStream2({
68
+ start(controller) {
69
+ return pump();
70
+ function pump() {
71
+ return reader.read().then(({ done, value }) => {
72
+ if (done) {
73
+ controller.close();
74
+ return;
75
+ }
76
+ controller.enqueue(value);
77
+ return pump();
78
+ });
79
+ }
80
+ },
81
+ cancel() {
82
+ reader.releaseLock();
83
+ }
84
+ });
96
85
  }
97
- /**
98
- * Add all nodes and edges from another graph.
99
- * Note this doesn't check for duplicates, nor does it connect the graphs.
100
- */
101
- extend(graph, prefix = "") {
102
- let finalPrefix = prefix;
103
- const nodeIds = Object.values(graph.nodes).map((node) => node.id);
104
- if (nodeIds.every(validate)) finalPrefix = "";
105
- const prefixed = (id) => {
106
- return finalPrefix ? `${finalPrefix}:${id}` : id;
107
- };
108
- Object.entries(graph.nodes).forEach(([key, value]) => {
109
- this.nodes[prefixed(key)] = {
110
- ...value,
111
- id: prefixed(key)
112
- };
86
+ static fromAsyncGenerator(generator) {
87
+ return new IterableReadableStream2({
88
+ async pull(controller) {
89
+ const { value, done } = await generator.next();
90
+ if (done) controller.close();
91
+ controller.enqueue(value);
92
+ },
93
+ async cancel(reason) {
94
+ await generator.return(reason);
95
+ }
113
96
  });
114
- const newEdges = graph.edges.map((edge) => {
115
- return {
116
- ...edge,
117
- source: prefixed(edge.source),
118
- target: prefixed(edge.target)
119
- };
97
+ }
98
+ };
99
+ function atee(iter, length = 2) {
100
+ const buffers = Array.from({ length }, () => []);
101
+ return buffers.map(async function* makeIter(buffer) {
102
+ while (true) if (buffer.length === 0) {
103
+ const result = await iter.next();
104
+ for (const buffer$1 of buffers) buffer$1.push(result);
105
+ } else if (buffer[0].done) return;
106
+ else yield buffer.shift().value;
107
+ });
108
+ }
109
+ function concat(first, second) {
110
+ if (Array.isArray(first) && Array.isArray(second)) return first.concat(second);
111
+ else if (typeof first === "string" && typeof second === "string") return first + second;
112
+ else if (typeof first === "number" && typeof second === "number") return first + second;
113
+ else if ("concat" in first && typeof first.concat === "function") return first.concat(second);
114
+ else if (typeof first === "object" && typeof second === "object") {
115
+ const chunk = { ...first };
116
+ for (const [key, value] of Object.entries(second)) if (key in chunk && !Array.isArray(chunk[key])) chunk[key] = concat(chunk[key], value);
117
+ else chunk[key] = value;
118
+ return chunk;
119
+ } else throw new Error(`Cannot concat ${typeof first} and ${typeof second}`);
120
+ }
121
+ var AsyncGeneratorWithSetup = class {
122
+ generator;
123
+ setup;
124
+ config;
125
+ signal;
126
+ firstResult;
127
+ firstResultUsed = false;
128
+ constructor(params) {
129
+ this.generator = params.generator;
130
+ this.config = params.config;
131
+ this.signal = params.signal ?? this.config?.signal;
132
+ this.setup = new Promise((resolve, reject) => {
133
+ AsyncLocalStorageProviderSingleton.runWithConfig(pickRunnableConfigKeys(params.config), async () => {
134
+ this.firstResult = params.generator.next();
135
+ if (params.startSetup) this.firstResult.then(params.startSetup).then(resolve, reject);
136
+ else this.firstResult.then((_result) => resolve(void 0), reject);
137
+ }, true);
120
138
  });
121
- this.edges = [...this.edges, ...newEdges];
122
- const first = graph.firstNode();
123
- const last = graph.lastNode();
124
- return [first ? {
125
- id: prefixed(first.id),
126
- data: first.data
127
- } : void 0, last ? {
128
- id: prefixed(last.id),
129
- data: last.data
130
- } : void 0];
131
139
  }
132
- trimFirstNode() {
133
- const firstNode = this.firstNode();
134
- if (firstNode && _firstNode(this, [firstNode.id])) this.removeNode(firstNode);
140
+ async next(...args) {
141
+ this.signal?.throwIfAborted();
142
+ if (!this.firstResultUsed) {
143
+ this.firstResultUsed = true;
144
+ return this.firstResult;
145
+ }
146
+ return AsyncLocalStorageProviderSingleton.runWithConfig(pickRunnableConfigKeys(this.config), this.signal ? async () => {
147
+ return raceWithSignal(this.generator.next(...args), this.signal);
148
+ } : async () => {
149
+ return this.generator.next(...args);
150
+ }, true);
135
151
  }
136
- trimLastNode() {
137
- const lastNode = this.lastNode();
138
- if (lastNode && _lastNode(this, [lastNode.id])) this.removeNode(lastNode);
152
+ async return(value) {
153
+ return this.generator.return(value);
139
154
  }
140
- /**
141
- * Return a new graph with all nodes re-identified,
142
- * using their unique, readable names where possible.
143
- */
144
- reid() {
145
- const nodeLabels = Object.fromEntries(Object.values(this.nodes).map((node) => [node.id, node.name]));
146
- const nodeLabelCounts = /* @__PURE__ */ new Map();
147
- Object.values(nodeLabels).forEach((label) => {
148
- nodeLabelCounts.set(label, (nodeLabelCounts.get(label) || 0) + 1);
149
- });
150
- const getNodeId = (nodeId) => {
151
- const label = nodeLabels[nodeId];
152
- if (validate(nodeId) && nodeLabelCounts.get(label) === 1) return label;
153
- else return nodeId;
154
- };
155
- return new Graph2({
156
- nodes: Object.fromEntries(Object.entries(this.nodes).map(([id, node]) => [getNodeId(id), {
157
- ...node,
158
- id: getNodeId(id)
159
- }])),
160
- edges: this.edges.map((edge) => ({
161
- ...edge,
162
- source: getNodeId(edge.source),
163
- target: getNodeId(edge.target)
164
- }))
165
- });
155
+ async throw(e) {
156
+ return this.generator.throw(e);
166
157
  }
167
- drawMermaid(params) {
168
- const { withStyles, curveStyle, nodeColors = {
169
- default: "fill:#f2f0ff,line-height:1.2",
170
- first: "fill-opacity:0",
171
- last: "fill:#bfb6fc"
172
- }, wrapLabelNWords } = params ?? {};
173
- const graph = this.reid();
174
- const firstNode = graph.firstNode();
175
- const lastNode = graph.lastNode();
176
- return drawMermaid(graph.nodes, graph.edges, {
177
- firstNode: firstNode?.id,
178
- lastNode: lastNode?.id,
179
- withStyles,
180
- curveStyle,
181
- nodeColors,
182
- wrapLabelNWords
183
- });
158
+ [Symbol.asyncIterator]() {
159
+ return this;
184
160
  }
185
- async drawMermaidPng(params) {
186
- const mermaidSyntax = this.drawMermaid(params);
187
- return drawMermaidImage(mermaidSyntax, { backgroundColor: params?.backgroundColor });
161
+ async [Symbol.asyncDispose]() {
162
+ await this.return();
188
163
  }
189
164
  };
190
- function _firstNode(graph, exclude = []) {
191
- const targets = new Set(graph.edges.filter((edge) => !exclude.includes(edge.source)).map((edge) => edge.target));
192
- const found = [];
193
- for (const node of Object.values(graph.nodes)) if (!exclude.includes(node.id) && !targets.has(node.id)) found.push(node);
194
- return found.length === 1 ? found[0] : void 0;
195
- }
196
- function _lastNode(graph, exclude = []) {
197
- const sources = new Set(graph.edges.filter((edge) => !exclude.includes(edge.target)).map((edge) => edge.source));
198
- const found = [];
199
- for (const node of Object.values(graph.nodes)) if (!exclude.includes(node.id) && !sources.has(node.id)) found.push(node);
200
- return found.length === 1 ? found[0] : void 0;
165
+ async function pipeGeneratorWithSetup(to, generator, startSetup, signal, ...args) {
166
+ const gen = new AsyncGeneratorWithSetup({
167
+ generator,
168
+ startSetup,
169
+ signal
170
+ });
171
+ const setup = await gen.setup;
172
+ return {
173
+ output: to(gen, setup, ...args),
174
+ setup
175
+ };
201
176
  }
202
177
  export {
203
- Graph,
204
- graph_exports
178
+ AsyncGeneratorWithSetup,
179
+ IterableReadableStream,
180
+ atee,
181
+ concat,
182
+ pipeGeneratorWithSetup,
183
+ stream_exports
205
184
  };
206
185
  //# sourceMappingURL=index.es94.js.map