structured-outputs 0.1.0-beta.2 → 0.1.0-beta.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (391) hide show
  1. package/README.md +77 -6
  2. package/esm/ResponseFormat.d.ts +18 -11
  3. package/esm/ResponseFormat.d.ts.map +1 -1
  4. package/esm/ResponseFormat.js +57 -5
  5. package/esm/ResponseFormat.js.map +1 -1
  6. package/esm/Tool.d.ts +13 -0
  7. package/esm/Tool.d.ts.map +1 -0
  8. package/esm/Tool.js +17 -0
  9. package/esm/Tool.js.map +1 -0
  10. package/esm/_dnt.polyfills.d.ts +12 -0
  11. package/esm/_dnt.polyfills.d.ts.map +1 -0
  12. package/esm/_dnt.polyfills.js +16 -0
  13. package/esm/_dnt.polyfills.js.map +1 -0
  14. package/esm/deps/jsr.io/@std/collections/1.0.9/_utils.d.ts +6 -0
  15. package/esm/deps/jsr.io/@std/collections/1.0.9/_utils.d.ts.map +1 -0
  16. package/esm/deps/jsr.io/@std/collections/1.0.9/_utils.js +19 -0
  17. package/esm/deps/jsr.io/@std/collections/1.0.9/_utils.js.map +1 -0
  18. package/esm/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.d.ts +41 -0
  19. package/esm/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.d.ts.map +1 -0
  20. package/esm/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.js +51 -0
  21. package/esm/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.js.map +1 -0
  22. package/esm/deps/jsr.io/@std/collections/1.0.9/associate_by.d.ts +37 -0
  23. package/esm/deps/jsr.io/@std/collections/1.0.9/associate_by.d.ts.map +1 -0
  24. package/esm/deps/jsr.io/@std/collections/1.0.9/associate_by.js +45 -0
  25. package/esm/deps/jsr.io/@std/collections/1.0.9/associate_by.js.map +1 -0
  26. package/esm/deps/jsr.io/@std/collections/1.0.9/associate_with.d.ts +33 -0
  27. package/esm/deps/jsr.io/@std/collections/1.0.9/associate_with.d.ts.map +1 -0
  28. package/esm/deps/jsr.io/@std/collections/1.0.9/associate_with.js +41 -0
  29. package/esm/deps/jsr.io/@std/collections/1.0.9/associate_with.js.map +1 -0
  30. package/esm/deps/jsr.io/@std/collections/1.0.9/chunk.d.ts +38 -0
  31. package/esm/deps/jsr.io/@std/collections/1.0.9/chunk.d.ts.map +1 -0
  32. package/esm/deps/jsr.io/@std/collections/1.0.9/chunk.js +51 -0
  33. package/esm/deps/jsr.io/@std/collections/1.0.9/chunk.js.map +1 -0
  34. package/esm/deps/jsr.io/@std/collections/1.0.9/deep_merge.d.ts +322 -0
  35. package/esm/deps/jsr.io/@std/collections/1.0.9/deep_merge.d.ts.map +1 -0
  36. package/esm/deps/jsr.io/@std/collections/1.0.9/deep_merge.js +96 -0
  37. package/esm/deps/jsr.io/@std/collections/1.0.9/deep_merge.js.map +1 -0
  38. package/esm/deps/jsr.io/@std/collections/1.0.9/distinct.d.ts +23 -0
  39. package/esm/deps/jsr.io/@std/collections/1.0.9/distinct.d.ts.map +1 -0
  40. package/esm/deps/jsr.io/@std/collections/1.0.9/distinct.js +28 -0
  41. package/esm/deps/jsr.io/@std/collections/1.0.9/distinct.js.map +1 -0
  42. package/esm/deps/jsr.io/@std/collections/1.0.9/distinct_by.d.ts +26 -0
  43. package/esm/deps/jsr.io/@std/collections/1.0.9/distinct_by.d.ts.map +1 -0
  44. package/esm/deps/jsr.io/@std/collections/1.0.9/distinct_by.js +39 -0
  45. package/esm/deps/jsr.io/@std/collections/1.0.9/distinct_by.js.map +1 -0
  46. package/esm/deps/jsr.io/@std/collections/1.0.9/drop_last_while.d.ts +26 -0
  47. package/esm/deps/jsr.io/@std/collections/1.0.9/drop_last_while.d.ts.map +1 -0
  48. package/esm/deps/jsr.io/@std/collections/1.0.9/drop_last_while.js +33 -0
  49. package/esm/deps/jsr.io/@std/collections/1.0.9/drop_last_while.js.map +1 -0
  50. package/esm/deps/jsr.io/@std/collections/1.0.9/drop_while.d.ts +25 -0
  51. package/esm/deps/jsr.io/@std/collections/1.0.9/drop_while.d.ts.map +1 -0
  52. package/esm/deps/jsr.io/@std/collections/1.0.9/drop_while.js +34 -0
  53. package/esm/deps/jsr.io/@std/collections/1.0.9/drop_while.js.map +1 -0
  54. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_entries.d.ts +32 -0
  55. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_entries.d.ts.map +1 -0
  56. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_entries.js +43 -0
  57. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_entries.js.map +1 -0
  58. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_keys.d.ts +36 -0
  59. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_keys.d.ts.map +1 -0
  60. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_keys.js +46 -0
  61. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_keys.js.map +1 -0
  62. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_values.d.ts +35 -0
  63. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_values.d.ts.map +1 -0
  64. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_values.js +46 -0
  65. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_values.js.map +1 -0
  66. package/esm/deps/jsr.io/@std/collections/1.0.9/find_single.d.ts +31 -0
  67. package/esm/deps/jsr.io/@std/collections/1.0.9/find_single.d.ts.map +1 -0
  68. package/esm/deps/jsr.io/@std/collections/1.0.9/find_single.js +45 -0
  69. package/esm/deps/jsr.io/@std/collections/1.0.9/find_single.js.map +1 -0
  70. package/esm/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.d.ts +32 -0
  71. package/esm/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.d.ts.map +1 -0
  72. package/esm/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.js +42 -0
  73. package/esm/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.js.map +1 -0
  74. package/esm/deps/jsr.io/@std/collections/1.0.9/includes_value.d.ts +29 -0
  75. package/esm/deps/jsr.io/@std/collections/1.0.9/includes_value.d.ts.map +1 -0
  76. package/esm/deps/jsr.io/@std/collections/1.0.9/includes_value.js +39 -0
  77. package/esm/deps/jsr.io/@std/collections/1.0.9/includes_value.js.map +1 -0
  78. package/esm/deps/jsr.io/@std/collections/1.0.9/intersect.d.ts +25 -0
  79. package/esm/deps/jsr.io/@std/collections/1.0.9/intersect.d.ts.map +1 -0
  80. package/esm/deps/jsr.io/@std/collections/1.0.9/intersect.js +36 -0
  81. package/esm/deps/jsr.io/@std/collections/1.0.9/intersect.js.map +1 -0
  82. package/esm/deps/jsr.io/@std/collections/1.0.9/invert.d.ts +29 -0
  83. package/esm/deps/jsr.io/@std/collections/1.0.9/invert.d.ts.map +1 -0
  84. package/esm/deps/jsr.io/@std/collections/1.0.9/invert.js +29 -0
  85. package/esm/deps/jsr.io/@std/collections/1.0.9/invert.js.map +1 -0
  86. package/esm/deps/jsr.io/@std/collections/1.0.9/invert_by.d.ts +34 -0
  87. package/esm/deps/jsr.io/@std/collections/1.0.9/invert_by.d.ts.map +1 -0
  88. package/esm/deps/jsr.io/@std/collections/1.0.9/invert_by.js +46 -0
  89. package/esm/deps/jsr.io/@std/collections/1.0.9/invert_by.js.map +1 -0
  90. package/esm/deps/jsr.io/@std/collections/1.0.9/join_to_string.d.ts +75 -0
  91. package/esm/deps/jsr.io/@std/collections/1.0.9/join_to_string.d.ts.map +1 -0
  92. package/esm/deps/jsr.io/@std/collections/1.0.9/join_to_string.js +59 -0
  93. package/esm/deps/jsr.io/@std/collections/1.0.9/join_to_string.js.map +1 -0
  94. package/esm/deps/jsr.io/@std/collections/1.0.9/map_entries.d.ts +37 -0
  95. package/esm/deps/jsr.io/@std/collections/1.0.9/map_entries.d.ts.map +1 -0
  96. package/esm/deps/jsr.io/@std/collections/1.0.9/map_entries.js +47 -0
  97. package/esm/deps/jsr.io/@std/collections/1.0.9/map_entries.js.map +1 -0
  98. package/esm/deps/jsr.io/@std/collections/1.0.9/map_keys.d.ts +33 -0
  99. package/esm/deps/jsr.io/@std/collections/1.0.9/map_keys.d.ts.map +1 -0
  100. package/esm/deps/jsr.io/@std/collections/1.0.9/map_keys.js +42 -0
  101. package/esm/deps/jsr.io/@std/collections/1.0.9/map_keys.js.map +1 -0
  102. package/esm/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.d.ts +32 -0
  103. package/esm/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.d.ts.map +1 -0
  104. package/esm/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.js +43 -0
  105. package/esm/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.js.map +1 -0
  106. package/esm/deps/jsr.io/@std/collections/1.0.9/map_values.d.ts +71 -0
  107. package/esm/deps/jsr.io/@std/collections/1.0.9/map_values.d.ts.map +1 -0
  108. package/esm/deps/jsr.io/@std/collections/1.0.9/map_values.js +13 -0
  109. package/esm/deps/jsr.io/@std/collections/1.0.9/map_values.js.map +1 -0
  110. package/esm/deps/jsr.io/@std/collections/1.0.9/max_by.d.ts +117 -0
  111. package/esm/deps/jsr.io/@std/collections/1.0.9/max_by.d.ts.map +1 -0
  112. package/esm/deps/jsr.io/@std/collections/1.0.9/max_by.js +15 -0
  113. package/esm/deps/jsr.io/@std/collections/1.0.9/max_by.js.map +1 -0
  114. package/esm/deps/jsr.io/@std/collections/1.0.9/max_of.d.ts +61 -0
  115. package/esm/deps/jsr.io/@std/collections/1.0.9/max_of.d.ts.map +1 -0
  116. package/esm/deps/jsr.io/@std/collections/1.0.9/max_of.js +17 -0
  117. package/esm/deps/jsr.io/@std/collections/1.0.9/max_of.js.map +1 -0
  118. package/esm/deps/jsr.io/@std/collections/1.0.9/max_with.d.ts +29 -0
  119. package/esm/deps/jsr.io/@std/collections/1.0.9/max_with.d.ts.map +1 -0
  120. package/esm/deps/jsr.io/@std/collections/1.0.9/max_with.js +41 -0
  121. package/esm/deps/jsr.io/@std/collections/1.0.9/max_with.js.map +1 -0
  122. package/esm/deps/jsr.io/@std/collections/1.0.9/min_by.d.ts +115 -0
  123. package/esm/deps/jsr.io/@std/collections/1.0.9/min_by.d.ts.map +1 -0
  124. package/esm/deps/jsr.io/@std/collections/1.0.9/min_by.js +15 -0
  125. package/esm/deps/jsr.io/@std/collections/1.0.9/min_by.js.map +1 -0
  126. package/esm/deps/jsr.io/@std/collections/1.0.9/min_of.d.ts +61 -0
  127. package/esm/deps/jsr.io/@std/collections/1.0.9/min_of.d.ts.map +1 -0
  128. package/esm/deps/jsr.io/@std/collections/1.0.9/min_of.js +17 -0
  129. package/esm/deps/jsr.io/@std/collections/1.0.9/min_of.js.map +1 -0
  130. package/esm/deps/jsr.io/@std/collections/1.0.9/min_with.d.ts +25 -0
  131. package/esm/deps/jsr.io/@std/collections/1.0.9/min_with.d.ts.map +1 -0
  132. package/esm/deps/jsr.io/@std/collections/1.0.9/min_with.js +37 -0
  133. package/esm/deps/jsr.io/@std/collections/1.0.9/min_with.js.map +1 -0
  134. package/esm/deps/jsr.io/@std/collections/1.0.9/mod.d.ts +73 -0
  135. package/esm/deps/jsr.io/@std/collections/1.0.9/mod.d.ts.map +1 -0
  136. package/esm/deps/jsr.io/@std/collections/1.0.9/mod.js +75 -0
  137. package/esm/deps/jsr.io/@std/collections/1.0.9/mod.js.map +1 -0
  138. package/esm/deps/jsr.io/@std/collections/1.0.9/omit.d.ts +24 -0
  139. package/esm/deps/jsr.io/@std/collections/1.0.9/omit.d.ts.map +1 -0
  140. package/esm/deps/jsr.io/@std/collections/1.0.9/omit.js +29 -0
  141. package/esm/deps/jsr.io/@std/collections/1.0.9/omit.js.map +1 -0
  142. package/esm/deps/jsr.io/@std/collections/1.0.9/partition.d.ts +60 -0
  143. package/esm/deps/jsr.io/@std/collections/1.0.9/partition.d.ts.map +1 -0
  144. package/esm/deps/jsr.io/@std/collections/1.0.9/partition.js +16 -0
  145. package/esm/deps/jsr.io/@std/collections/1.0.9/partition.js.map +1 -0
  146. package/esm/deps/jsr.io/@std/collections/1.0.9/partition_entries.d.ts +39 -0
  147. package/esm/deps/jsr.io/@std/collections/1.0.9/partition_entries.d.ts.map +1 -0
  148. package/esm/deps/jsr.io/@std/collections/1.0.9/partition_entries.js +54 -0
  149. package/esm/deps/jsr.io/@std/collections/1.0.9/partition_entries.js.map +1 -0
  150. package/esm/deps/jsr.io/@std/collections/1.0.9/permutations.d.ts +27 -0
  151. package/esm/deps/jsr.io/@std/collections/1.0.9/permutations.d.ts.map +1 -0
  152. package/esm/deps/jsr.io/@std/collections/1.0.9/permutations.js +58 -0
  153. package/esm/deps/jsr.io/@std/collections/1.0.9/permutations.js.map +1 -0
  154. package/esm/deps/jsr.io/@std/collections/1.0.9/pick.d.ts +25 -0
  155. package/esm/deps/jsr.io/@std/collections/1.0.9/pick.d.ts.map +1 -0
  156. package/esm/deps/jsr.io/@std/collections/1.0.9/pick.js +33 -0
  157. package/esm/deps/jsr.io/@std/collections/1.0.9/pick.js.map +1 -0
  158. package/esm/deps/jsr.io/@std/collections/1.0.9/reduce_groups.d.ts +35 -0
  159. package/esm/deps/jsr.io/@std/collections/1.0.9/reduce_groups.d.ts.map +1 -0
  160. package/esm/deps/jsr.io/@std/collections/1.0.9/reduce_groups.js +40 -0
  161. package/esm/deps/jsr.io/@std/collections/1.0.9/reduce_groups.js.map +1 -0
  162. package/esm/deps/jsr.io/@std/collections/1.0.9/running_reduce.d.ts +27 -0
  163. package/esm/deps/jsr.io/@std/collections/1.0.9/running_reduce.d.ts.map +1 -0
  164. package/esm/deps/jsr.io/@std/collections/1.0.9/running_reduce.js +32 -0
  165. package/esm/deps/jsr.io/@std/collections/1.0.9/running_reduce.js.map +1 -0
  166. package/esm/deps/jsr.io/@std/collections/1.0.9/sample.d.ts +24 -0
  167. package/esm/deps/jsr.io/@std/collections/1.0.9/sample.d.ts.map +1 -0
  168. package/esm/deps/jsr.io/@std/collections/1.0.9/sample.js +35 -0
  169. package/esm/deps/jsr.io/@std/collections/1.0.9/sample.js.map +1 -0
  170. package/esm/deps/jsr.io/@std/collections/1.0.9/sliding_windows.d.ts +66 -0
  171. package/esm/deps/jsr.io/@std/collections/1.0.9/sliding_windows.d.ts.map +1 -0
  172. package/esm/deps/jsr.io/@std/collections/1.0.9/sliding_windows.js +57 -0
  173. package/esm/deps/jsr.io/@std/collections/1.0.9/sliding_windows.js.map +1 -0
  174. package/esm/deps/jsr.io/@std/collections/1.0.9/sort_by.d.ts +161 -0
  175. package/esm/deps/jsr.io/@std/collections/1.0.9/sort_by.d.ts.map +1 -0
  176. package/esm/deps/jsr.io/@std/collections/1.0.9/sort_by.js +30 -0
  177. package/esm/deps/jsr.io/@std/collections/1.0.9/sort_by.js.map +1 -0
  178. package/esm/deps/jsr.io/@std/collections/1.0.9/sum_of.d.ts +29 -0
  179. package/esm/deps/jsr.io/@std/collections/1.0.9/sum_of.d.ts.map +1 -0
  180. package/esm/deps/jsr.io/@std/collections/1.0.9/sum_of.js +37 -0
  181. package/esm/deps/jsr.io/@std/collections/1.0.9/sum_of.js.map +1 -0
  182. package/esm/deps/jsr.io/@std/collections/1.0.9/take_last_while.d.ts +27 -0
  183. package/esm/deps/jsr.io/@std/collections/1.0.9/take_last_while.d.ts.map +1 -0
  184. package/esm/deps/jsr.io/@std/collections/1.0.9/take_last_while.js +34 -0
  185. package/esm/deps/jsr.io/@std/collections/1.0.9/take_last_while.js.map +1 -0
  186. package/esm/deps/jsr.io/@std/collections/1.0.9/take_while.d.ts +30 -0
  187. package/esm/deps/jsr.io/@std/collections/1.0.9/take_while.d.ts.map +1 -0
  188. package/esm/deps/jsr.io/@std/collections/1.0.9/take_while.js +39 -0
  189. package/esm/deps/jsr.io/@std/collections/1.0.9/take_while.js.map +1 -0
  190. package/esm/deps/jsr.io/@std/collections/1.0.9/union.d.ts +24 -0
  191. package/esm/deps/jsr.io/@std/collections/1.0.9/union.d.ts.map +1 -0
  192. package/esm/deps/jsr.io/@std/collections/1.0.9/union.js +34 -0
  193. package/esm/deps/jsr.io/@std/collections/1.0.9/union.js.map +1 -0
  194. package/esm/deps/jsr.io/@std/collections/1.0.9/unzip.d.ts +32 -0
  195. package/esm/deps/jsr.io/@std/collections/1.0.9/unzip.d.ts.map +1 -0
  196. package/esm/deps/jsr.io/@std/collections/1.0.9/unzip.js +46 -0
  197. package/esm/deps/jsr.io/@std/collections/1.0.9/unzip.js.map +1 -0
  198. package/esm/deps/jsr.io/@std/collections/1.0.9/without_all.d.ts +23 -0
  199. package/esm/deps/jsr.io/@std/collections/1.0.9/without_all.d.ts.map +1 -0
  200. package/esm/deps/jsr.io/@std/collections/1.0.9/without_all.js +28 -0
  201. package/esm/deps/jsr.io/@std/collections/1.0.9/without_all.js.map +1 -0
  202. package/esm/deps/jsr.io/@std/collections/1.0.9/zip.d.ts +34 -0
  203. package/esm/deps/jsr.io/@std/collections/1.0.9/zip.d.ts.map +1 -0
  204. package/esm/deps/jsr.io/@std/collections/1.0.9/zip.js +43 -0
  205. package/esm/deps/jsr.io/@std/collections/1.0.9/zip.js.map +1 -0
  206. package/esm/mod.d.ts +3 -14
  207. package/esm/mod.d.ts.map +1 -1
  208. package/esm/mod.js +3 -10
  209. package/esm/mod.js.map +1 -1
  210. package/esm/oai.d.ts +5 -0
  211. package/esm/oai.d.ts.map +1 -0
  212. package/esm/oai.js +2 -0
  213. package/esm/oai.js.map +1 -0
  214. package/esm/types/Ref.d.ts +4 -0
  215. package/esm/types/Ref.d.ts.map +1 -0
  216. package/esm/types/Ref.js +11 -0
  217. package/esm/types/Ref.js.map +1 -0
  218. package/esm/types/RootTy.d.ts +8 -0
  219. package/esm/types/RootTy.d.ts.map +1 -0
  220. package/esm/types/RootTy.js +19 -0
  221. package/esm/types/RootTy.js.map +1 -0
  222. package/esm/types/Ty.d.ts +27 -0
  223. package/esm/types/Ty.d.ts.map +1 -0
  224. package/esm/types/Ty.js +17 -0
  225. package/esm/types/Ty.js.map +1 -0
  226. package/esm/types/array.d.ts +3 -0
  227. package/esm/types/array.d.ts.map +1 -0
  228. package/esm/types/array.js +9 -0
  229. package/esm/types/array.js.map +1 -0
  230. package/esm/types/constant.d.ts +3 -0
  231. package/esm/types/constant.d.ts.map +1 -0
  232. package/esm/types/constant.js +8 -0
  233. package/esm/types/constant.js.map +1 -0
  234. package/esm/types/constantUnion.d.ts +3 -0
  235. package/esm/types/constantUnion.d.ts.map +1 -0
  236. package/esm/types/constantUnion.js +25 -0
  237. package/esm/types/constantUnion.js.map +1 -0
  238. package/esm/types/leaves.d.ts +6 -0
  239. package/esm/types/leaves.d.ts.map +1 -0
  240. package/esm/types/leaves.js +18 -0
  241. package/esm/types/leaves.js.map +1 -0
  242. package/esm/types/mod.d.ts +11 -0
  243. package/esm/types/mod.d.ts.map +1 -0
  244. package/esm/types/mod.js +11 -0
  245. package/esm/types/mod.js.map +1 -0
  246. package/esm/types/object.d.ts +6 -0
  247. package/esm/types/object.d.ts.map +1 -0
  248. package/esm/{object.js → types/object.js} +4 -4
  249. package/esm/types/object.js.map +1 -0
  250. package/esm/types/std/Option.d.ts +7 -0
  251. package/esm/types/std/Option.d.ts.map +1 -0
  252. package/esm/types/std/Option.js +9 -0
  253. package/esm/types/std/Option.js.map +1 -0
  254. package/esm/types/std/Wrapper.d.ts +7 -0
  255. package/esm/types/std/Wrapper.d.ts.map +1 -0
  256. package/esm/types/std/Wrapper.js +5 -0
  257. package/esm/types/std/Wrapper.js.map +1 -0
  258. package/esm/types/std/mod.d.ts +3 -0
  259. package/esm/types/std/mod.d.ts.map +1 -0
  260. package/esm/types/std/mod.js +3 -0
  261. package/esm/types/std/mod.js.map +1 -0
  262. package/esm/types/taggedUnion.d.ts +8 -0
  263. package/esm/types/taggedUnion.d.ts.map +1 -0
  264. package/esm/types/taggedUnion.js +20 -0
  265. package/esm/types/taggedUnion.js.map +1 -0
  266. package/esm/util/phantoms.d.ts +2 -0
  267. package/esm/util/phantoms.d.ts.map +1 -0
  268. package/esm/util/phantoms.js +4 -0
  269. package/esm/util/phantoms.js.map +1 -0
  270. package/esm/util/recombineTaggedTemplateArgs.d.ts +2 -0
  271. package/esm/util/recombineTaggedTemplateArgs.d.ts.map +1 -0
  272. package/esm/util/recombineTaggedTemplateArgs.js +4 -0
  273. package/esm/util/recombineTaggedTemplateArgs.js.map +1 -0
  274. package/package.json +7 -9
  275. package/src/ResponseFormat.ts +80 -22
  276. package/src/Tool.ts +38 -0
  277. package/src/_dnt.polyfills.ts +27 -0
  278. package/src/deps/jsr.io/@std/collections/1.0.9/_utils.ts +26 -0
  279. package/src/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.ts +62 -0
  280. package/src/deps/jsr.io/@std/collections/1.0.9/associate_by.ts +50 -0
  281. package/src/deps/jsr.io/@std/collections/1.0.9/associate_with.ts +46 -0
  282. package/src/deps/jsr.io/@std/collections/1.0.9/chunk.ts +56 -0
  283. package/src/deps/jsr.io/@std/collections/1.0.9/deep_merge.ts +578 -0
  284. package/src/deps/jsr.io/@std/collections/1.0.9/distinct.ts +29 -0
  285. package/src/deps/jsr.io/@std/collections/1.0.9/distinct_by.ts +42 -0
  286. package/src/deps/jsr.io/@std/collections/1.0.9/drop_last_while.ts +36 -0
  287. package/src/deps/jsr.io/@std/collections/1.0.9/drop_while.ts +39 -0
  288. package/src/deps/jsr.io/@std/collections/1.0.9/filter_entries.ts +48 -0
  289. package/src/deps/jsr.io/@std/collections/1.0.9/filter_keys.ts +51 -0
  290. package/src/deps/jsr.io/@std/collections/1.0.9/filter_values.ts +51 -0
  291. package/src/deps/jsr.io/@std/collections/1.0.9/find_single.ts +48 -0
  292. package/src/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.ts +47 -0
  293. package/src/deps/jsr.io/@std/collections/1.0.9/includes_value.ts +45 -0
  294. package/src/deps/jsr.io/@std/collections/1.0.9/intersect.ts +35 -0
  295. package/src/deps/jsr.io/@std/collections/1.0.9/invert.ts +38 -0
  296. package/src/deps/jsr.io/@std/collections/1.0.9/invert_by.ts +56 -0
  297. package/src/deps/jsr.io/@std/collections/1.0.9/join_to_string.ts +109 -0
  298. package/src/deps/jsr.io/@std/collections/1.0.9/map_entries.ts +53 -0
  299. package/src/deps/jsr.io/@std/collections/1.0.9/map_keys.ts +47 -0
  300. package/src/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.ts +49 -0
  301. package/src/deps/jsr.io/@std/collections/1.0.9/map_values.ts +96 -0
  302. package/src/deps/jsr.io/@std/collections/1.0.9/max_by.ts +153 -0
  303. package/src/deps/jsr.io/@std/collections/1.0.9/max_of.ts +90 -0
  304. package/src/deps/jsr.io/@std/collections/1.0.9/max_with.ts +46 -0
  305. package/src/deps/jsr.io/@std/collections/1.0.9/min_by.ts +151 -0
  306. package/src/deps/jsr.io/@std/collections/1.0.9/min_of.ts +90 -0
  307. package/src/deps/jsr.io/@std/collections/1.0.9/min_with.ts +42 -0
  308. package/src/deps/jsr.io/@std/collections/1.0.9/mod.ts +76 -0
  309. package/src/deps/jsr.io/@std/collections/1.0.9/omit.ts +34 -0
  310. package/src/deps/jsr.io/@std/collections/1.0.9/partition.ts +85 -0
  311. package/src/deps/jsr.io/@std/collections/1.0.9/partition_entries.ts +58 -0
  312. package/src/deps/jsr.io/@std/collections/1.0.9/permutations.ts +66 -0
  313. package/src/deps/jsr.io/@std/collections/1.0.9/pick.ts +34 -0
  314. package/src/deps/jsr.io/@std/collections/1.0.9/reduce_groups.ts +45 -0
  315. package/src/deps/jsr.io/@std/collections/1.0.9/running_reduce.ts +38 -0
  316. package/src/deps/jsr.io/@std/collections/1.0.9/sample.ts +36 -0
  317. package/src/deps/jsr.io/@std/collections/1.0.9/sliding_windows.ts +86 -0
  318. package/src/deps/jsr.io/@std/collections/1.0.9/sort_by.ts +219 -0
  319. package/src/deps/jsr.io/@std/collections/1.0.9/sum_of.ts +42 -0
  320. package/src/deps/jsr.io/@std/collections/1.0.9/take_last_while.ts +37 -0
  321. package/src/deps/jsr.io/@std/collections/1.0.9/take_while.ts +44 -0
  322. package/src/deps/jsr.io/@std/collections/1.0.9/union.ts +36 -0
  323. package/src/deps/jsr.io/@std/collections/1.0.9/unzip.ts +50 -0
  324. package/src/deps/jsr.io/@std/collections/1.0.9/without_all.ts +28 -0
  325. package/src/deps/jsr.io/@std/collections/1.0.9/zip.ts +49 -0
  326. package/src/mod.ts +3 -18
  327. package/src/oai.ts +5 -0
  328. package/src/types/Ref.ts +16 -0
  329. package/src/types/RootTy.ts +40 -0
  330. package/src/types/Ty.ts +57 -0
  331. package/src/types/array.ts +9 -0
  332. package/src/types/constant.ts +8 -0
  333. package/src/types/constantUnion.ts +27 -0
  334. package/src/types/leaves.ts +21 -0
  335. package/src/types/mod.ts +10 -0
  336. package/src/types/object.ts +15 -0
  337. package/src/types/std/Option.ts +15 -0
  338. package/src/types/std/Wrapper.ts +8 -0
  339. package/src/types/std/mod.ts +2 -0
  340. package/src/types/taggedUnion.ts +28 -0
  341. package/src/util/phantoms.ts +3 -0
  342. package/src/util/recombineTaggedTemplateArgs.ts +6 -0
  343. package/esm/F.d.ts +0 -13
  344. package/esm/F.d.ts.map +0 -1
  345. package/esm/F.js +0 -10
  346. package/esm/F.js.map +0 -1
  347. package/esm/_base.d.ts +0 -13
  348. package/esm/_base.d.ts.map +0 -1
  349. package/esm/_base.js +0 -40
  350. package/esm/_base.js.map +0 -1
  351. package/esm/array.d.ts +0 -4
  352. package/esm/array.d.ts.map +0 -1
  353. package/esm/array.js +0 -9
  354. package/esm/array.js.map +0 -1
  355. package/esm/common.d.ts +0 -6
  356. package/esm/common.d.ts.map +0 -1
  357. package/esm/common.js +0 -2
  358. package/esm/common.js.map +0 -1
  359. package/esm/literal.d.ts +0 -4
  360. package/esm/literal.d.ts.map +0 -1
  361. package/esm/literal.js +0 -8
  362. package/esm/literal.js.map +0 -1
  363. package/esm/number.d.ts +0 -4
  364. package/esm/number.d.ts.map +0 -1
  365. package/esm/number.js +0 -8
  366. package/esm/number.js.map +0 -1
  367. package/esm/object.d.ts +0 -7
  368. package/esm/object.d.ts.map +0 -1
  369. package/esm/object.js.map +0 -1
  370. package/esm/schema.d.ts +0 -4
  371. package/esm/schema.d.ts.map +0 -1
  372. package/esm/schema.js +0 -9
  373. package/esm/schema.js.map +0 -1
  374. package/esm/string.d.ts +0 -4
  375. package/esm/string.d.ts.map +0 -1
  376. package/esm/string.js +0 -8
  377. package/esm/string.js.map +0 -1
  378. package/esm/union.d.ts +0 -6
  379. package/esm/union.d.ts.map +0 -1
  380. package/esm/union.js +0 -8
  381. package/esm/union.js.map +0 -1
  382. package/src/F.ts +0 -27
  383. package/src/_base.ts +0 -25
  384. package/src/array.ts +0 -11
  385. package/src/common.ts +0 -6
  386. package/src/literal.ts +0 -10
  387. package/src/number.ts +0 -10
  388. package/src/object.ts +0 -17
  389. package/src/schema.ts +0 -10
  390. package/src/string.ts +0 -10
  391. package/src/union.ts +0 -12
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Returns all elements in the given collection until the first element that
3
+ * does not match the given predicate.
4
+ *
5
+ * Note: If you want to process any iterable, use the new version of
6
+ * `takeWhile` from `@std/collections/unstable-take-while`.
7
+ *
8
+ * @typeParam T The type of the array elements.
9
+ *
10
+ * @param array The array to take elements from.
11
+ * @param predicate The predicate function to determine if an element should be
12
+ * included.
13
+ *
14
+ * @returns A new array containing all elements until the first element that
15
+ * does not match the predicate.
16
+ *
17
+ * @example Basic usage
18
+ * ```ts
19
+ * import { takeWhile } from "@std/collections/take-while";
20
+ * import { assertEquals } from "@std/assert";
21
+ *
22
+ * const numbers = [1, 2, 3, 4, 5, 6];
23
+ *
24
+ * const result = takeWhile(numbers, (number) => number < 4);
25
+ *
26
+ * assertEquals(result, [1, 2, 3]);
27
+ * ```
28
+ */
29
+ export declare function takeWhile<T>(array: readonly T[], predicate: (el: T) => boolean): T[];
30
+ //# sourceMappingURL=take_while.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"take_while.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/take_while.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,OAAO,GAC5B,CAAC,EAAE,CASL"}
@@ -0,0 +1,39 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ /**
4
+ * Returns all elements in the given collection until the first element that
5
+ * does not match the given predicate.
6
+ *
7
+ * Note: If you want to process any iterable, use the new version of
8
+ * `takeWhile` from `@std/collections/unstable-take-while`.
9
+ *
10
+ * @typeParam T The type of the array elements.
11
+ *
12
+ * @param array The array to take elements from.
13
+ * @param predicate The predicate function to determine if an element should be
14
+ * included.
15
+ *
16
+ * @returns A new array containing all elements until the first element that
17
+ * does not match the predicate.
18
+ *
19
+ * @example Basic usage
20
+ * ```ts
21
+ * import { takeWhile } from "@std/collections/take-while";
22
+ * import { assertEquals } from "@std/assert";
23
+ *
24
+ * const numbers = [1, 2, 3, 4, 5, 6];
25
+ *
26
+ * const result = takeWhile(numbers, (number) => number < 4);
27
+ *
28
+ * assertEquals(result, [1, 2, 3]);
29
+ * ```
30
+ */
31
+ export function takeWhile(array, predicate) {
32
+ let offset = 0;
33
+ const length = array.length;
34
+ while (length > offset && predicate(array[offset])) {
35
+ offset++;
36
+ }
37
+ return array.slice(0, offset);
38
+ }
39
+ //# sourceMappingURL=take_while.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"take_while.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/take_while.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,SAAS,CACvB,KAAmB,EACnB,SAA6B;IAE7B,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAE5B,OAAO,MAAM,GAAG,MAAM,IAAI,SAAS,CAAC,KAAK,CAAC,MAAM,CAAM,CAAC,EAAE,CAAC;QACxD,MAAM,EAAE,CAAC;IACX,CAAC;IAED,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAChC,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Returns all distinct elements that appear in any of the given arrays.
3
+ *
4
+ * @typeParam T The type of the array elements.
5
+ *
6
+ * @param arrays The arrays to get the union of.
7
+ *
8
+ * @returns A new array containing all distinct elements from the given arrays.
9
+ *
10
+ * @example Basic usage
11
+ * ```ts
12
+ * import { union } from "@std/collections/union";
13
+ * import { assertEquals } from "@std/assert";
14
+ *
15
+ * const soupIngredients = ["Pepper", "Carrots", "Leek"];
16
+ * const saladIngredients = ["Carrots", "Radicchio", "Pepper"];
17
+ *
18
+ * const shoppingList = union(soupIngredients, saladIngredients);
19
+ *
20
+ * assertEquals(shoppingList, ["Pepper", "Carrots", "Leek", "Radicchio"]);
21
+ * ```
22
+ */
23
+ export declare function union<T>(...arrays: Iterable<T>[]): T[];
24
+ //# sourceMappingURL=union.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"union.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/union.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAUtD"}
@@ -0,0 +1,34 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ /**
4
+ * Returns all distinct elements that appear in any of the given arrays.
5
+ *
6
+ * @typeParam T The type of the array elements.
7
+ *
8
+ * @param arrays The arrays to get the union of.
9
+ *
10
+ * @returns A new array containing all distinct elements from the given arrays.
11
+ *
12
+ * @example Basic usage
13
+ * ```ts
14
+ * import { union } from "@std/collections/union";
15
+ * import { assertEquals } from "@std/assert";
16
+ *
17
+ * const soupIngredients = ["Pepper", "Carrots", "Leek"];
18
+ * const saladIngredients = ["Carrots", "Radicchio", "Pepper"];
19
+ *
20
+ * const shoppingList = union(soupIngredients, saladIngredients);
21
+ *
22
+ * assertEquals(shoppingList, ["Pepper", "Carrots", "Leek", "Radicchio"]);
23
+ * ```
24
+ */
25
+ export function union(...arrays) {
26
+ const set = new Set();
27
+ for (const array of arrays) {
28
+ for (const element of array) {
29
+ set.add(element);
30
+ }
31
+ }
32
+ return Array.from(set);
33
+ }
34
+ //# sourceMappingURL=union.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"union.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/union.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AAErC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,KAAK,CAAI,GAAG,MAAqB;IAC/C,MAAM,GAAG,GAAG,IAAI,GAAG,EAAK,CAAC;IAEzB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,KAAK,MAAM,OAAO,IAAI,KAAK,EAAE,CAAC;YAC5B,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Builds two separate arrays from the given array of 2-tuples, with the first
3
+ * returned array holding all first tuple elements and the second one holding
4
+ * all the second elements.
5
+ *
6
+ * @typeParam T The type of the first tuple elements.
7
+ * @typeParam U The type of the second tuple elements.
8
+ *
9
+ * @param pairs The array of 2-tuples to unzip.
10
+ *
11
+ * @returns A tuple containing two arrays, the first one holding all first tuple
12
+ * elements and the second one holding all second elements.
13
+ *
14
+ * @example Basic usage
15
+ * ```ts
16
+ * import { unzip } from "@std/collections/unzip";
17
+ * import { assertEquals } from "@std/assert";
18
+ *
19
+ * const parents = [
20
+ * ["Maria", "Jeff"],
21
+ * ["Anna", "Kim"],
22
+ * ["John", "Leroy"],
23
+ * ] as [string, string][];
24
+ *
25
+ * const [moms, dads] = unzip(parents);
26
+ *
27
+ * assertEquals(moms, ["Maria", "Anna", "John"]);
28
+ * assertEquals(dads, ["Jeff", "Kim", "Leroy"]);
29
+ * ```
30
+ */
31
+ export declare function unzip<T, U>(pairs: readonly [T, U][]): [T[], U[]];
32
+ //# sourceMappingURL=unzip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unzip.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/unzip.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAgBhE"}
@@ -0,0 +1,46 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ /**
4
+ * Builds two separate arrays from the given array of 2-tuples, with the first
5
+ * returned array holding all first tuple elements and the second one holding
6
+ * all the second elements.
7
+ *
8
+ * @typeParam T The type of the first tuple elements.
9
+ * @typeParam U The type of the second tuple elements.
10
+ *
11
+ * @param pairs The array of 2-tuples to unzip.
12
+ *
13
+ * @returns A tuple containing two arrays, the first one holding all first tuple
14
+ * elements and the second one holding all second elements.
15
+ *
16
+ * @example Basic usage
17
+ * ```ts
18
+ * import { unzip } from "@std/collections/unzip";
19
+ * import { assertEquals } from "@std/assert";
20
+ *
21
+ * const parents = [
22
+ * ["Maria", "Jeff"],
23
+ * ["Anna", "Kim"],
24
+ * ["John", "Leroy"],
25
+ * ] as [string, string][];
26
+ *
27
+ * const [moms, dads] = unzip(parents);
28
+ *
29
+ * assertEquals(moms, ["Maria", "Anna", "John"]);
30
+ * assertEquals(dads, ["Jeff", "Kim", "Leroy"]);
31
+ * ```
32
+ */
33
+ export function unzip(pairs) {
34
+ const { length } = pairs;
35
+ const result = [
36
+ new Array(length),
37
+ new Array(length),
38
+ ];
39
+ for (let i = 0; i < length; ++i) {
40
+ const pair = pairs[i];
41
+ result[0][i] = pair[0];
42
+ result[1][i] = pair[1];
43
+ }
44
+ return result;
45
+ }
46
+ //# sourceMappingURL=unzip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unzip.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/unzip.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,KAAK,CAAO,KAAwB;IAClD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAEzB,MAAM,MAAM,GAAe;QACzB,IAAI,KAAK,CAAI,MAAM,CAAC;QACpB,IAAI,KAAK,CAAI,MAAM,CAAC;KACrB,CAAC;IAEF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAW,CAAC;QAEhC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Returns an array excluding all given values.
3
+ *
4
+ * @typeParam T The type of the array elements.
5
+ *
6
+ * @param array The array to exclude values from.
7
+ * @param values The values to exclude from the array.
8
+ *
9
+ * @returns A new array containing all elements from the given array except the
10
+ * ones that are in the values array.
11
+ *
12
+ * @example Basic usage
13
+ * ```ts
14
+ * import { withoutAll } from "@std/collections/without-all";
15
+ * import { assertEquals } from "@std/assert";
16
+ *
17
+ * const withoutList = withoutAll([2, 1, 2, 3], [1, 2]);
18
+ *
19
+ * assertEquals(withoutList, [3]);
20
+ * ```
21
+ */
22
+ export declare function withoutAll<T>(array: readonly T[], values: readonly T[]): T[];
23
+ //# sourceMappingURL=without_all.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"without_all.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/without_all.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,EAAE,CAG5E"}
@@ -0,0 +1,28 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ /**
4
+ * Returns an array excluding all given values.
5
+ *
6
+ * @typeParam T The type of the array elements.
7
+ *
8
+ * @param array The array to exclude values from.
9
+ * @param values The values to exclude from the array.
10
+ *
11
+ * @returns A new array containing all elements from the given array except the
12
+ * ones that are in the values array.
13
+ *
14
+ * @example Basic usage
15
+ * ```ts
16
+ * import { withoutAll } from "@std/collections/without-all";
17
+ * import { assertEquals } from "@std/assert";
18
+ *
19
+ * const withoutList = withoutAll([2, 1, 2, 3], [1, 2]);
20
+ *
21
+ * assertEquals(withoutList, [3]);
22
+ * ```
23
+ */
24
+ export function withoutAll(array, values) {
25
+ const toExclude = new Set(values);
26
+ return array.filter((it) => !toExclude.has(it));
27
+ }
28
+ //# sourceMappingURL=without_all.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"without_all.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/without_all.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AAErC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,UAAU,CAAI,KAAmB,EAAE,MAAoB;IACrE,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAClC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;AAClD,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Builds N-tuples of elements from the given N arrays with matching indices,
3
+ * stopping when the smallest array's end is reached.
4
+ *
5
+ * @typeParam T the type of the tuples produced by this function.
6
+ *
7
+ * @param arrays The arrays to zip.
8
+ *
9
+ * @returns A new array containing N-tuples of elements from the given arrays.
10
+ *
11
+ * @example Basic usage
12
+ * ```ts
13
+ * import { zip } from "@std/collections/zip";
14
+ * import { assertEquals } from "@std/assert";
15
+ *
16
+ * const numbers = [1, 2, 3, 4];
17
+ * const letters = ["a", "b", "c", "d"];
18
+ * const pairs = zip(numbers, letters);
19
+ *
20
+ * assertEquals(
21
+ * pairs,
22
+ * [
23
+ * [1, "a"],
24
+ * [2, "b"],
25
+ * [3, "c"],
26
+ * [4, "d"],
27
+ * ],
28
+ * );
29
+ * ```
30
+ */
31
+ export declare function zip<T extends unknown[]>(...arrays: {
32
+ [K in keyof T]: ReadonlyArray<T[K]>;
33
+ }): T[];
34
+ //# sourceMappingURL=zip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zip.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/zip.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EAAE,EACrC,GAAG,MAAM,EAAE;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACjD,CAAC,EAAE,CAWL"}
@@ -0,0 +1,43 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { minOf } from "./min_of.js";
4
+ /**
5
+ * Builds N-tuples of elements from the given N arrays with matching indices,
6
+ * stopping when the smallest array's end is reached.
7
+ *
8
+ * @typeParam T the type of the tuples produced by this function.
9
+ *
10
+ * @param arrays The arrays to zip.
11
+ *
12
+ * @returns A new array containing N-tuples of elements from the given arrays.
13
+ *
14
+ * @example Basic usage
15
+ * ```ts
16
+ * import { zip } from "@std/collections/zip";
17
+ * import { assertEquals } from "@std/assert";
18
+ *
19
+ * const numbers = [1, 2, 3, 4];
20
+ * const letters = ["a", "b", "c", "d"];
21
+ * const pairs = zip(numbers, letters);
22
+ *
23
+ * assertEquals(
24
+ * pairs,
25
+ * [
26
+ * [1, "a"],
27
+ * [2, "b"],
28
+ * [3, "c"],
29
+ * [4, "d"],
30
+ * ],
31
+ * );
32
+ * ```
33
+ */
34
+ export function zip(...arrays) {
35
+ const minLength = minOf(arrays, (element) => element.length) ?? 0;
36
+ const result = new Array(minLength);
37
+ for (let i = 0; i < minLength; i += 1) {
38
+ const arr = arrays.map((it) => it[i]);
39
+ result[i] = arr;
40
+ }
41
+ return result;
42
+ }
43
+ //# sourceMappingURL=zip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zip.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/zip.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,GAAG,CACjB,GAAG,MAA+C;IAElD,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAElE,MAAM,MAAM,GAAQ,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;IAEzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QACtC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACtC,MAAM,CAAC,CAAC,CAAC,GAAG,GAAQ,CAAC;IACvB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/esm/mod.d.ts CHANGED
@@ -1,16 +1,5 @@
1
- import type { ArrayTy } from "./array.js";
2
- import type { NumberTy } from "./number.js";
3
- import type { ObjectTy } from "./object.js";
4
- import type { StringTy } from "./string.js";
5
- export type RootTy = NumberTy | StringTy | ObjectTy | ArrayTy;
6
- export * from "./array.js";
7
- export * from "./common.js";
8
- export * from "./F.js";
9
- export * from "./literal.js";
10
- export * from "./number.js";
11
- export * from "./object.js";
1
+ import "./_dnt.polyfills.js";
2
+ export * as T from "./types/mod.js";
12
3
  export * from "./ResponseFormat.js";
13
- export * from "./schema.js";
14
- export * from "./string.js";
15
- export * from "./union.js";
4
+ export * from "./Tool.js";
16
5
  //# sourceMappingURL=mod.d.ts.map
package/esm/mod.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;AAI7D,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA"}
package/esm/mod.js CHANGED
@@ -1,12 +1,5 @@
1
- // moderate --exclude _base.ts code_critique.ts
2
- export * from "./array.js";
3
- export * from "./common.js";
4
- export * from "./F.js";
5
- export * from "./literal.js";
6
- export * from "./number.js";
7
- export * from "./object.js";
1
+ import "./_dnt.polyfills.js";
2
+ export * as T from "./types/mod.js";
8
3
  export * from "./ResponseFormat.js";
9
- export * from "./schema.js";
10
- export * from "./string.js";
11
- export * from "./union.js";
4
+ export * from "./Tool.js";
12
5
  //# sourceMappingURL=mod.js.map
package/esm/mod.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mod.js","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAOA,+CAA+C;AAE/C,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"mod.js","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA"}
package/esm/oai.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import type Openai from "openai";
2
+ export type JsonSchema = Openai.ResponseFormatJSONSchema["json_schema"];
3
+ export type ChatCompletion = Openai.Chat.ChatCompletion;
4
+ export type ChatCompletionChoice = Openai.Chat.Completions.ChatCompletion.Choice;
5
+ //# sourceMappingURL=oai.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oai.d.ts","sourceRoot":"","sources":["../src/oai.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAA;AAEhC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,aAAa,CAAC,CAAA;AACvE,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAA;AACvD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,MAAM,CAAA"}
package/esm/oai.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=oai.js.map
package/esm/oai.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oai.js","sourceRoot":"","sources":["../src/oai.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { Applied, Schema, Ty } from "./Ty.js";
2
+ export type Ref = (ty: Ty) => Schema;
3
+ export declare function Ref(applied: Applied): Ref;
4
+ //# sourceMappingURL=Ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Ref.d.ts","sourceRoot":"","sources":["../../src/types/Ref.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAGlD,MAAM,MAAM,GAAG,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK,MAAM,CAAA;AAEpC,wBAAgB,GAAG,CAAC,OAAO,EAAE,OAAO,GAAG,GAAG,CAUzC"}
@@ -0,0 +1,11 @@
1
+ import { recombineTaggedTemplateArgs } from "../util/recombineTaggedTemplateArgs.js";
2
+ export function Ref(applied) {
3
+ return (ty) => {
4
+ applied = { ...applied, ...ty.applied };
5
+ const description = ty.descriptions
6
+ .map(({ template, placeheld }) => recombineTaggedTemplateArgs(template, placeheld.map((k) => applied[k])))
7
+ .join(" ");
8
+ return ty.toSchema(description, Ref(applied));
9
+ };
10
+ }
11
+ //# sourceMappingURL=Ref.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Ref.js","sourceRoot":"","sources":["../../src/types/Ref.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAA;AAIpF,MAAM,UAAU,GAAG,CAAC,OAAgB;IAClC,OAAO,CAAC,EAAE,EAAE,EAAE;QACZ,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAA;QACvC,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY;aAChC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,CAC/B,2BAA2B,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAE,CAAC,CAAC,CACzE;aACA,IAAI,CAAC,GAAG,CAAC,CAAA;QACZ,OAAO,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;IAC/C,CAAC,CAAA;AACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Applied, Description, Schema, ToSchema, Ty } from "./Ty.js";
2
+ export declare function RootTy<T, P extends string = never>(toSchema: ToSchema, descriptions?: Array<Description>, applied?: Applied): RootTy<T, P>;
3
+ export interface RootTy<T = any, P extends string = string> extends Ty<T, P> {
4
+ <P2 extends Array<string>>(template: TemplateStringsArray, ...placeheld: P2): RootTy<T, P | P2[number]>;
5
+ apply: <A extends Partial<Record<P, number | string>>>(values: A) => RootTy<T, Exclude<P, keyof A>>;
6
+ schema(this: RootTy<T, never>): Schema;
7
+ }
8
+ //# sourceMappingURL=RootTy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RootTy.d.ts","sourceRoot":"","sources":["../../src/types/RootTy.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAEzE,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,KAAK,EAChD,QAAQ,EAAE,QAAQ,EAClB,YAAY,GAAE,KAAK,CAAC,WAAW,CAAM,EACrC,OAAO,GAAE,OAAY,GACpB,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAoBd;AAED,MAAM,WAAW,MAAM,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAC1E,CAAC,EAAE,SAAS,KAAK,CAAC,MAAM,CAAC,EACvB,QAAQ,EAAE,oBAAoB,EAC9B,GAAG,SAAS,EAAE,EAAE,GACf,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,KAAK,EAAE,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,EACnD,MAAM,EAAE,CAAC,KACN,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;IACnC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,MAAM,CAAA;CACvC"}
@@ -0,0 +1,19 @@
1
+ import { phantoms } from "../util/phantoms.js";
2
+ import { Ref } from "./Ref.js";
3
+ export function RootTy(toSchema, descriptions = [], applied = {}) {
4
+ return Object.assign((template, ...placeheld) => RootTy(toSchema, [{ template, placeheld }, ...descriptions], applied), phantoms(), {
5
+ toSchema,
6
+ descriptions,
7
+ applied,
8
+ apply: (values) => {
9
+ return RootTy(toSchema, descriptions, { ...applied, ...values });
10
+ },
11
+ schema() {
12
+ return Ref({})(this);
13
+ },
14
+ isRoot() {
15
+ return true;
16
+ },
17
+ });
18
+ }
19
+ //# sourceMappingURL=RootTy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RootTy.js","sourceRoot":"","sources":["../../src/types/RootTy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAG9B,MAAM,UAAU,MAAM,CACpB,QAAkB,EAClB,eAAmC,EAAE,EACrC,UAAmB,EAAE;IAErB,OAAO,MAAM,CAAC,MAAM,CAClB,CAA2B,QAA8B,EAAE,GAAG,SAAa,EAAE,EAAE,CAC7E,MAAM,CAAoB,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,GAAG,YAAY,CAAC,EAAE,OAAO,CAAC,EAC1F,QAAQ,EAA4B,EACpC;QACE,QAAQ;QACR,YAAY;QACZ,OAAO;QACP,KAAK,EAAE,CAAgD,MAAS,EAAE,EAAE;YAClE,OAAO,MAAM,CAAyB,QAAQ,EAAE,YAAY,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC,CAAA;QAC1F,CAAC;QACD,MAAM;YACJ,OAAO,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAA;QACtB,CAAC;QACD,MAAM;YACJ,OAAO,IAAI,CAAA;QACb,CAAC;KACF,CACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { Ref } from "./Ref.js";
2
+ import type { RootTy } from "./RootTy.js";
3
+ export declare function Ty<T, P extends string = never>(toSchema: ToSchema, descriptions?: Array<Description>, applied?: Applied): Ty<T, P>;
4
+ export interface Ty<T = any, P extends string = string> {
5
+ <P2 extends Array<string>>(template: TemplateStringsArray, ...placeheld: P2): Ty<T, P | P2[number]>;
6
+ [Ty.T]: T;
7
+ [Ty.P]: P;
8
+ toSchema: ToSchema;
9
+ descriptions: Array<Description>;
10
+ applied: Applied;
11
+ apply: <A extends Partial<Record<P, number | string>>>(values: A) => Ty<T, Exclude<P, keyof A>>;
12
+ isRoot(): this is RootTy;
13
+ }
14
+ export declare namespace Ty {
15
+ type T = typeof T;
16
+ const T: unique symbol;
17
+ type P = typeof P;
18
+ const P: unique symbol;
19
+ }
20
+ export type ToSchema = (description: string | undefined, ref: Ref) => Schema;
21
+ export type Schema = Record<string, unknown>;
22
+ export interface Description {
23
+ template: TemplateStringsArray;
24
+ placeheld: Array<string>;
25
+ }
26
+ export type Applied = Record<string, number | string>;
27
+ //# sourceMappingURL=Ty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Ty.d.ts","sourceRoot":"","sources":["../../src/types/Ty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,wBAAgB,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,KAAK,EAC5C,QAAQ,EAAE,QAAQ,EAClB,YAAY,GAAE,KAAK,CAAC,WAAW,CAAM,EACrC,OAAO,GAAE,OAAY,GACpB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAiBV;AAED,MAAM,WAAW,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM;IACpD,CAAC,EAAE,SAAS,KAAK,CAAC,MAAM,CAAC,EACvB,QAAQ,EAAE,oBAAoB,EAC9B,GAAG,SAAS,EAAE,EAAE,GACf,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IACxB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACT,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACT,QAAQ,EAAE,QAAQ,CAAA;IAClB,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;IAC/F,MAAM,IAAI,IAAI,IAAI,MAAM,CAAA;CACzB;AAED,yBAAiB,EAAE,CAAC;IAClB,KAAY,CAAC,GAAG,OAAO,CAAC,CAAA;IACT,MAAM,CAAC,EAAE,OAAO,MAAM,CAAA;IACrC,KAAY,CAAC,GAAG,OAAO,CAAC,CAAA;IACT,MAAM,CAAC,EAAE,OAAO,MAAM,CAAA;CACtC;AAED,MAAM,MAAM,QAAQ,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,MAAM,CAAA;AAC5E,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE5C,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,oBAAoB,CAAA;IAC9B,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CACzB;AAED,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { phantoms } from "../util/phantoms.js";
2
+ export function Ty(toSchema, descriptions = [], applied = {}) {
3
+ return Object.assign((template, ...placeheld) => Ty(toSchema, [{ template, placeheld }, ...descriptions], applied), phantoms(), {
4
+ toSchema,
5
+ descriptions,
6
+ applied,
7
+ apply: (values) => {
8
+ return Ty(toSchema, descriptions, { ...applied, ...values });
9
+ },
10
+ isRoot() {
11
+ return false;
12
+ },
13
+ });
14
+ }
15
+ (function (Ty) {
16
+ })(Ty || (Ty = {}));
17
+ //# sourceMappingURL=Ty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Ty.js","sourceRoot":"","sources":["../../src/types/Ty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAG9C,MAAM,UAAU,EAAE,CAChB,QAAkB,EAClB,eAAmC,EAAE,EACrC,UAAmB,EAAE;IAErB,OAAO,MAAM,CAAC,MAAM,CAClB,CAA2B,QAA8B,EAAE,GAAG,SAAa,EAAE,EAAE,CAC7E,EAAE,CAAoB,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,GAAG,YAAY,CAAC,EAAE,OAAO,CAAC,EACtF,QAAQ,EAA4B,EACpC;QACE,QAAQ;QACR,YAAY;QACZ,OAAO;QACP,KAAK,EAAE,CAAgD,MAAS,EAAE,EAAE;YAClE,OAAO,EAAE,CAAyB,QAAQ,EAAE,YAAY,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC,CAAA;QACtF,CAAC;QACD,MAAM;YACJ,OAAO,KAAK,CAAA;QACd,CAAC;KACF,CACF,CAAA;AACH,CAAC;AAgBD,WAAiB,EAAE;AAKnB,CAAC,EALgB,EAAE,KAAF,EAAE,QAKlB"}
@@ -0,0 +1,3 @@
1
+ import { Ty } from "./Ty.js";
2
+ export declare function array<E extends Ty>(element: E): Ty<Array<E[Ty.T]>, E[Ty.P]>;
3
+ //# sourceMappingURL=array.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/types/array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,wBAAgB,KAAK,CAAC,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAM3E"}
@@ -0,0 +1,9 @@
1
+ import { Ty } from "./Ty.js";
2
+ export function array(element) {
3
+ return Ty((description, ref) => ({
4
+ type: "array",
5
+ description,
6
+ items: ref(element),
7
+ }));
8
+ }
9
+ //# sourceMappingURL=array.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array.js","sourceRoot":"","sources":["../../src/types/array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,MAAM,UAAU,KAAK,CAAe,OAAU;IAC5C,OAAO,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;QAC/B,IAAI,EAAE,OAAO;QACb,WAAW;QACX,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC;KACpB,CAAC,CAAC,CAAA;AACL,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Ty } from "./Ty.js";
2
+ export declare function constant<V extends number | string>(value: V): Ty<V, never>;
3
+ //# sourceMappingURL=constant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../src/types/constant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,CAK1E"}
@@ -0,0 +1,8 @@
1
+ import { Ty } from "./Ty.js";
2
+ export function constant(value) {
3
+ return Ty((description) => ({
4
+ const: value,
5
+ description,
6
+ }));
7
+ }
8
+ //# sourceMappingURL=constant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constant.js","sourceRoot":"","sources":["../../src/types/constant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,MAAM,UAAU,QAAQ,CAA4B,KAAQ;IAC1D,OAAO,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAC1B,KAAK,EAAE,KAAK;QACZ,WAAW;KACZ,CAAC,CAAC,CAAA;AACL,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Ty } from "./Ty.js";
2
+ export declare function constantUnion<M extends Array<number | string>>(...members: M): Ty<M[number], never>;
3
+ //# sourceMappingURL=constantUnion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constantUnion.d.ts","sourceRoot":"","sources":["../../src/types/constantUnion.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,EAC5D,GAAG,OAAO,EAAE,CAAC,GACZ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,CAqBtB"}