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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (565) hide show
  1. package/README.md +77 -6
  2. package/esm/ResponseFormat.js +33 -5
  3. package/esm/ResponseFormat.js.map +1 -1
  4. package/esm/Tool.js +17 -0
  5. package/esm/Tool.js.map +1 -0
  6. package/esm/_dnt.polyfills.js +16 -0
  7. package/esm/_dnt.polyfills.js.map +1 -0
  8. package/esm/_dnt.shims.js +58 -0
  9. package/esm/_dnt.shims.js.map +1 -0
  10. package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.js +47 -0
  11. package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.js.map +1 -0
  12. package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.js +47 -0
  13. package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.js.map +1 -0
  14. package/esm/deps/jsr.io/@std/assert/1.0.8/assert.js +23 -0
  15. package/esm/deps/jsr.io/@std/assert/1.0.8/assert.js.map +1 -0
  16. package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.js +31 -0
  17. package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.js.map +1 -0
  18. package/esm/deps/jsr.io/@std/assert/1.0.8/equal.js +184 -0
  19. package/esm/deps/jsr.io/@std/assert/1.0.8/equal.js.map +1 -0
  20. package/esm/deps/jsr.io/@std/assert/1.0.8/equals.js +46 -0
  21. package/esm/deps/jsr.io/@std/assert/1.0.8/equals.js.map +1 -0
  22. package/esm/deps/jsr.io/@std/assert/1.0.8/exists.js +28 -0
  23. package/esm/deps/jsr.io/@std/assert/1.0.8/exists.js.map +1 -0
  24. package/esm/deps/jsr.io/@std/assert/1.0.8/fail.js +21 -0
  25. package/esm/deps/jsr.io/@std/assert/1.0.8/fail.js.map +1 -0
  26. package/esm/deps/jsr.io/@std/assert/1.0.8/false.js +23 -0
  27. package/esm/deps/jsr.io/@std/assert/1.0.8/false.js.map +1 -0
  28. package/esm/deps/jsr.io/@std/assert/1.0.8/greater.js +30 -0
  29. package/esm/deps/jsr.io/@std/assert/1.0.8/greater.js.map +1 -0
  30. package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js +30 -0
  31. package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js.map +1 -0
  32. package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.js +53 -0
  33. package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.js.map +1 -0
  34. package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.js +54 -0
  35. package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.js.map +1 -0
  36. package/esm/deps/jsr.io/@std/assert/1.0.8/less.js +29 -0
  37. package/esm/deps/jsr.io/@std/assert/1.0.8/less.js.map +1 -0
  38. package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js +30 -0
  39. package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js.map +1 -0
  40. package/esm/deps/jsr.io/@std/assert/1.0.8/match.js +27 -0
  41. package/esm/deps/jsr.io/@std/assert/1.0.8/match.js.map +1 -0
  42. package/esm/deps/jsr.io/@std/assert/1.0.8/mod.js +46 -0
  43. package/esm/deps/jsr.io/@std/assert/1.0.8/mod.js.map +1 -0
  44. package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.js +33 -0
  45. package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.js.map +1 -0
  46. package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js +30 -0
  47. package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js.map +1 -0
  48. package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.js +27 -0
  49. package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.js.map +1 -0
  50. package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js +33 -0
  51. package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js.map +1 -0
  52. package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.js +160 -0
  53. package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.js.map +1 -0
  54. package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.js +54 -0
  55. package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.js.map +1 -0
  56. package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.js +58 -0
  57. package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.js.map +1 -0
  58. package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.js +27 -0
  59. package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.js.map +1 -0
  60. package/esm/deps/jsr.io/@std/assert/1.0.8/throws.js +45 -0
  61. package/esm/deps/jsr.io/@std/assert/1.0.8/throws.js.map +1 -0
  62. package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.js +21 -0
  63. package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.js.map +1 -0
  64. package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.js +21 -0
  65. package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.js.map +1 -0
  66. package/esm/deps/jsr.io/@std/collections/1.0.9/_utils.js +19 -0
  67. package/esm/deps/jsr.io/@std/collections/1.0.9/_utils.js.map +1 -0
  68. package/esm/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.js +51 -0
  69. package/esm/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.js.map +1 -0
  70. package/esm/deps/jsr.io/@std/collections/1.0.9/associate_by.js +45 -0
  71. package/esm/deps/jsr.io/@std/collections/1.0.9/associate_by.js.map +1 -0
  72. package/esm/deps/jsr.io/@std/collections/1.0.9/associate_with.js +41 -0
  73. package/esm/deps/jsr.io/@std/collections/1.0.9/associate_with.js.map +1 -0
  74. package/esm/deps/jsr.io/@std/collections/1.0.9/chunk.js +51 -0
  75. package/esm/deps/jsr.io/@std/collections/1.0.9/chunk.js.map +1 -0
  76. package/esm/deps/jsr.io/@std/collections/1.0.9/deep_merge.js +96 -0
  77. package/esm/deps/jsr.io/@std/collections/1.0.9/deep_merge.js.map +1 -0
  78. package/esm/deps/jsr.io/@std/collections/1.0.9/distinct.js +28 -0
  79. package/esm/deps/jsr.io/@std/collections/1.0.9/distinct.js.map +1 -0
  80. package/esm/deps/jsr.io/@std/collections/1.0.9/distinct_by.js +39 -0
  81. package/esm/deps/jsr.io/@std/collections/1.0.9/distinct_by.js.map +1 -0
  82. package/esm/deps/jsr.io/@std/collections/1.0.9/drop_last_while.js +33 -0
  83. package/esm/deps/jsr.io/@std/collections/1.0.9/drop_last_while.js.map +1 -0
  84. package/esm/deps/jsr.io/@std/collections/1.0.9/drop_while.js +34 -0
  85. package/esm/deps/jsr.io/@std/collections/1.0.9/drop_while.js.map +1 -0
  86. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_entries.js +43 -0
  87. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_entries.js.map +1 -0
  88. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_keys.js +46 -0
  89. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_keys.js.map +1 -0
  90. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_values.js +46 -0
  91. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_values.js.map +1 -0
  92. package/esm/deps/jsr.io/@std/collections/1.0.9/find_single.js +45 -0
  93. package/esm/deps/jsr.io/@std/collections/1.0.9/find_single.js.map +1 -0
  94. package/esm/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.js +42 -0
  95. package/esm/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.js.map +1 -0
  96. package/esm/deps/jsr.io/@std/collections/1.0.9/includes_value.js +39 -0
  97. package/esm/deps/jsr.io/@std/collections/1.0.9/includes_value.js.map +1 -0
  98. package/esm/deps/jsr.io/@std/collections/1.0.9/intersect.js +36 -0
  99. package/esm/deps/jsr.io/@std/collections/1.0.9/intersect.js.map +1 -0
  100. package/esm/deps/jsr.io/@std/collections/1.0.9/invert.js +29 -0
  101. package/esm/deps/jsr.io/@std/collections/1.0.9/invert.js.map +1 -0
  102. package/esm/deps/jsr.io/@std/collections/1.0.9/invert_by.js +46 -0
  103. package/esm/deps/jsr.io/@std/collections/1.0.9/invert_by.js.map +1 -0
  104. package/esm/deps/jsr.io/@std/collections/1.0.9/join_to_string.js +59 -0
  105. package/esm/deps/jsr.io/@std/collections/1.0.9/join_to_string.js.map +1 -0
  106. package/esm/deps/jsr.io/@std/collections/1.0.9/map_entries.js +47 -0
  107. package/esm/deps/jsr.io/@std/collections/1.0.9/map_entries.js.map +1 -0
  108. package/esm/deps/jsr.io/@std/collections/1.0.9/map_keys.js +42 -0
  109. package/esm/deps/jsr.io/@std/collections/1.0.9/map_keys.js.map +1 -0
  110. package/esm/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.js +43 -0
  111. package/esm/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.js.map +1 -0
  112. package/esm/deps/jsr.io/@std/collections/1.0.9/map_values.js +13 -0
  113. package/esm/deps/jsr.io/@std/collections/1.0.9/map_values.js.map +1 -0
  114. package/esm/deps/jsr.io/@std/collections/1.0.9/max_by.js +15 -0
  115. package/esm/deps/jsr.io/@std/collections/1.0.9/max_by.js.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.js +41 -0
  119. package/esm/deps/jsr.io/@std/collections/1.0.9/max_with.js.map +1 -0
  120. package/esm/deps/jsr.io/@std/collections/1.0.9/min_by.js +15 -0
  121. package/esm/deps/jsr.io/@std/collections/1.0.9/min_by.js.map +1 -0
  122. package/esm/deps/jsr.io/@std/collections/1.0.9/min_of.js +17 -0
  123. package/esm/deps/jsr.io/@std/collections/1.0.9/min_of.js.map +1 -0
  124. package/esm/deps/jsr.io/@std/collections/1.0.9/min_with.js +37 -0
  125. package/esm/deps/jsr.io/@std/collections/1.0.9/min_with.js.map +1 -0
  126. package/esm/deps/jsr.io/@std/collections/1.0.9/mod.js +75 -0
  127. package/esm/deps/jsr.io/@std/collections/1.0.9/mod.js.map +1 -0
  128. package/esm/deps/jsr.io/@std/collections/1.0.9/omit.js +29 -0
  129. package/esm/deps/jsr.io/@std/collections/1.0.9/omit.js.map +1 -0
  130. package/esm/deps/jsr.io/@std/collections/1.0.9/partition.js +16 -0
  131. package/esm/deps/jsr.io/@std/collections/1.0.9/partition.js.map +1 -0
  132. package/esm/deps/jsr.io/@std/collections/1.0.9/partition_entries.js +54 -0
  133. package/esm/deps/jsr.io/@std/collections/1.0.9/partition_entries.js.map +1 -0
  134. package/esm/deps/jsr.io/@std/collections/1.0.9/permutations.js +58 -0
  135. package/esm/deps/jsr.io/@std/collections/1.0.9/permutations.js.map +1 -0
  136. package/esm/deps/jsr.io/@std/collections/1.0.9/pick.js +33 -0
  137. package/esm/deps/jsr.io/@std/collections/1.0.9/pick.js.map +1 -0
  138. package/esm/deps/jsr.io/@std/collections/1.0.9/reduce_groups.js +40 -0
  139. package/esm/deps/jsr.io/@std/collections/1.0.9/reduce_groups.js.map +1 -0
  140. package/esm/deps/jsr.io/@std/collections/1.0.9/running_reduce.js +32 -0
  141. package/esm/deps/jsr.io/@std/collections/1.0.9/running_reduce.js.map +1 -0
  142. package/esm/deps/jsr.io/@std/collections/1.0.9/sample.js +35 -0
  143. package/esm/deps/jsr.io/@std/collections/1.0.9/sample.js.map +1 -0
  144. package/esm/deps/jsr.io/@std/collections/1.0.9/sliding_windows.js +57 -0
  145. package/esm/deps/jsr.io/@std/collections/1.0.9/sliding_windows.js.map +1 -0
  146. package/esm/deps/jsr.io/@std/collections/1.0.9/sort_by.js +30 -0
  147. package/esm/deps/jsr.io/@std/collections/1.0.9/sort_by.js.map +1 -0
  148. package/esm/deps/jsr.io/@std/collections/1.0.9/sum_of.js +37 -0
  149. package/esm/deps/jsr.io/@std/collections/1.0.9/sum_of.js.map +1 -0
  150. package/esm/deps/jsr.io/@std/collections/1.0.9/take_last_while.js +34 -0
  151. package/esm/deps/jsr.io/@std/collections/1.0.9/take_last_while.js.map +1 -0
  152. package/esm/deps/jsr.io/@std/collections/1.0.9/take_while.js +39 -0
  153. package/esm/deps/jsr.io/@std/collections/1.0.9/take_while.js.map +1 -0
  154. package/esm/deps/jsr.io/@std/collections/1.0.9/union.js +34 -0
  155. package/esm/deps/jsr.io/@std/collections/1.0.9/union.js.map +1 -0
  156. package/esm/deps/jsr.io/@std/collections/1.0.9/unzip.js +46 -0
  157. package/esm/deps/jsr.io/@std/collections/1.0.9/unzip.js.map +1 -0
  158. package/esm/deps/jsr.io/@std/collections/1.0.9/without_all.js +28 -0
  159. package/esm/deps/jsr.io/@std/collections/1.0.9/without_all.js.map +1 -0
  160. package/esm/deps/jsr.io/@std/collections/1.0.9/zip.js +43 -0
  161. package/esm/deps/jsr.io/@std/collections/1.0.9/zip.js.map +1 -0
  162. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js +111 -0
  163. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js.map +1 -0
  164. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js +277 -0
  165. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js.map +1 -0
  166. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js +180 -0
  167. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js.map +1 -0
  168. package/esm/deps/jsr.io/@std/internal/1.0.5/format.js +38 -0
  169. package/esm/deps/jsr.io/@std/internal/1.0.5/format.js.map +1 -0
  170. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js +208 -0
  171. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js.map +1 -0
  172. package/esm/deps/jsr.io/@std/internal/1.0.5/types.js +3 -0
  173. package/esm/deps/jsr.io/@std/internal/1.0.5/types.js.map +1 -0
  174. package/esm/mod.js +3 -10
  175. package/esm/mod.js.map +1 -1
  176. package/esm/types/Ref.js +11 -0
  177. package/esm/types/Ref.js.map +1 -0
  178. package/esm/types/RootTy.js +19 -0
  179. package/esm/types/RootTy.js.map +1 -0
  180. package/esm/types/Ty.js +17 -0
  181. package/esm/types/Ty.js.map +1 -0
  182. package/esm/types/array.js +9 -0
  183. package/esm/types/array.js.map +1 -0
  184. package/esm/types/constant.js +8 -0
  185. package/esm/types/constant.js.map +1 -0
  186. package/esm/types/constantUnion.js +25 -0
  187. package/esm/types/constantUnion.js.map +1 -0
  188. package/esm/types/leaves.js +18 -0
  189. package/esm/types/leaves.js.map +1 -0
  190. package/esm/types/mod.js +11 -0
  191. package/esm/types/mod.js.map +1 -0
  192. package/esm/{object.js → types/object.js} +4 -4
  193. package/esm/types/object.js.map +1 -0
  194. package/esm/types/std/Option.js +9 -0
  195. package/esm/types/std/Option.js.map +1 -0
  196. package/esm/types/std/Wrapper.js +5 -0
  197. package/esm/types/std/Wrapper.js.map +1 -0
  198. package/esm/types/std/mod.js +3 -0
  199. package/esm/types/std/mod.js.map +1 -0
  200. package/esm/types/taggedUnion.js +20 -0
  201. package/esm/types/taggedUnion.js.map +1 -0
  202. package/esm/util/phantoms.js +4 -0
  203. package/esm/util/phantoms.js.map +1 -0
  204. package/esm/util/recombineTaggedTemplateArgs.js +4 -0
  205. package/esm/util/recombineTaggedTemplateArgs.js.map +1 -0
  206. package/package.json +10 -7
  207. package/src/ResponseFormat.ts +76 -25
  208. package/src/Tool.ts +38 -0
  209. package/src/_dnt.polyfills.ts +27 -0
  210. package/src/_dnt.shims.ts +60 -0
  211. package/src/deps/jsr.io/@std/assert/1.0.8/almost_equals.ts +55 -0
  212. package/src/deps/jsr.io/@std/assert/1.0.8/array_includes.ts +57 -0
  213. package/src/deps/jsr.io/@std/assert/1.0.8/assert.ts +23 -0
  214. package/src/deps/jsr.io/@std/assert/1.0.8/assertion_error.ts +31 -0
  215. package/src/deps/jsr.io/@std/assert/1.0.8/equal.ts +210 -0
  216. package/src/deps/jsr.io/@std/assert/1.0.8/equals.ts +52 -0
  217. package/src/deps/jsr.io/@std/assert/1.0.8/exists.ts +31 -0
  218. package/src/deps/jsr.io/@std/assert/1.0.8/fail.ts +21 -0
  219. package/src/deps/jsr.io/@std/assert/1.0.8/false.ts +26 -0
  220. package/src/deps/jsr.io/@std/assert/1.0.8/greater.ts +30 -0
  221. package/src/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.ts +36 -0
  222. package/src/deps/jsr.io/@std/assert/1.0.8/instance_of.ts +64 -0
  223. package/src/deps/jsr.io/@std/assert/1.0.8/is_error.ts +65 -0
  224. package/src/deps/jsr.io/@std/assert/1.0.8/less.ts +29 -0
  225. package/src/deps/jsr.io/@std/assert/1.0.8/less_or_equal.ts +36 -0
  226. package/src/deps/jsr.io/@std/assert/1.0.8/match.ts +30 -0
  227. package/src/deps/jsr.io/@std/assert/1.0.8/mod.ts +47 -0
  228. package/src/deps/jsr.io/@std/assert/1.0.8/not_equals.ts +36 -0
  229. package/src/deps/jsr.io/@std/assert/1.0.8/not_instance_of.ts +33 -0
  230. package/src/deps/jsr.io/@std/assert/1.0.8/not_match.ts +30 -0
  231. package/src/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.ts +42 -0
  232. package/src/deps/jsr.io/@std/assert/1.0.8/object_match.ts +202 -0
  233. package/src/deps/jsr.io/@std/assert/1.0.8/rejects.ts +123 -0
  234. package/src/deps/jsr.io/@std/assert/1.0.8/strict_equals.ts +67 -0
  235. package/src/deps/jsr.io/@std/assert/1.0.8/string_includes.ts +30 -0
  236. package/src/deps/jsr.io/@std/assert/1.0.8/throws.ts +111 -0
  237. package/src/deps/jsr.io/@std/assert/1.0.8/unimplemented.ts +21 -0
  238. package/src/deps/jsr.io/@std/assert/1.0.8/unreachable.ts +21 -0
  239. package/src/deps/jsr.io/@std/collections/1.0.9/_utils.ts +26 -0
  240. package/src/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.ts +62 -0
  241. package/src/deps/jsr.io/@std/collections/1.0.9/associate_by.ts +50 -0
  242. package/src/deps/jsr.io/@std/collections/1.0.9/associate_with.ts +46 -0
  243. package/src/deps/jsr.io/@std/collections/1.0.9/chunk.ts +56 -0
  244. package/src/deps/jsr.io/@std/collections/1.0.9/deep_merge.ts +578 -0
  245. package/src/deps/jsr.io/@std/collections/1.0.9/distinct.ts +29 -0
  246. package/src/deps/jsr.io/@std/collections/1.0.9/distinct_by.ts +42 -0
  247. package/src/deps/jsr.io/@std/collections/1.0.9/drop_last_while.ts +36 -0
  248. package/src/deps/jsr.io/@std/collections/1.0.9/drop_while.ts +39 -0
  249. package/src/deps/jsr.io/@std/collections/1.0.9/filter_entries.ts +48 -0
  250. package/src/deps/jsr.io/@std/collections/1.0.9/filter_keys.ts +51 -0
  251. package/src/deps/jsr.io/@std/collections/1.0.9/filter_values.ts +51 -0
  252. package/src/deps/jsr.io/@std/collections/1.0.9/find_single.ts +48 -0
  253. package/src/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.ts +47 -0
  254. package/src/deps/jsr.io/@std/collections/1.0.9/includes_value.ts +45 -0
  255. package/src/deps/jsr.io/@std/collections/1.0.9/intersect.ts +35 -0
  256. package/src/deps/jsr.io/@std/collections/1.0.9/invert.ts +38 -0
  257. package/src/deps/jsr.io/@std/collections/1.0.9/invert_by.ts +56 -0
  258. package/src/deps/jsr.io/@std/collections/1.0.9/join_to_string.ts +109 -0
  259. package/src/deps/jsr.io/@std/collections/1.0.9/map_entries.ts +53 -0
  260. package/src/deps/jsr.io/@std/collections/1.0.9/map_keys.ts +47 -0
  261. package/src/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.ts +49 -0
  262. package/src/deps/jsr.io/@std/collections/1.0.9/map_values.ts +96 -0
  263. package/src/deps/jsr.io/@std/collections/1.0.9/max_by.ts +153 -0
  264. package/src/deps/jsr.io/@std/collections/1.0.9/max_of.ts +90 -0
  265. package/src/deps/jsr.io/@std/collections/1.0.9/max_with.ts +46 -0
  266. package/src/deps/jsr.io/@std/collections/1.0.9/min_by.ts +151 -0
  267. package/src/deps/jsr.io/@std/collections/1.0.9/min_of.ts +90 -0
  268. package/src/deps/jsr.io/@std/collections/1.0.9/min_with.ts +42 -0
  269. package/src/deps/jsr.io/@std/collections/1.0.9/mod.ts +76 -0
  270. package/src/deps/jsr.io/@std/collections/1.0.9/omit.ts +34 -0
  271. package/src/deps/jsr.io/@std/collections/1.0.9/partition.ts +85 -0
  272. package/src/deps/jsr.io/@std/collections/1.0.9/partition_entries.ts +58 -0
  273. package/src/deps/jsr.io/@std/collections/1.0.9/permutations.ts +66 -0
  274. package/src/deps/jsr.io/@std/collections/1.0.9/pick.ts +34 -0
  275. package/src/deps/jsr.io/@std/collections/1.0.9/reduce_groups.ts +45 -0
  276. package/src/deps/jsr.io/@std/collections/1.0.9/running_reduce.ts +38 -0
  277. package/src/deps/jsr.io/@std/collections/1.0.9/sample.ts +36 -0
  278. package/src/deps/jsr.io/@std/collections/1.0.9/sliding_windows.ts +86 -0
  279. package/src/deps/jsr.io/@std/collections/1.0.9/sort_by.ts +219 -0
  280. package/src/deps/jsr.io/@std/collections/1.0.9/sum_of.ts +42 -0
  281. package/src/deps/jsr.io/@std/collections/1.0.9/take_last_while.ts +37 -0
  282. package/src/deps/jsr.io/@std/collections/1.0.9/take_while.ts +44 -0
  283. package/src/deps/jsr.io/@std/collections/1.0.9/union.ts +36 -0
  284. package/src/deps/jsr.io/@std/collections/1.0.9/unzip.ts +50 -0
  285. package/src/deps/jsr.io/@std/collections/1.0.9/without_all.ts +28 -0
  286. package/src/deps/jsr.io/@std/collections/1.0.9/zip.ts +49 -0
  287. package/src/deps/jsr.io/@std/internal/1.0.5/build_message.ts +134 -0
  288. package/src/deps/jsr.io/@std/internal/1.0.5/diff.ts +317 -0
  289. package/src/deps/jsr.io/@std/internal/1.0.5/diff_str.ts +204 -0
  290. package/src/deps/jsr.io/@std/internal/1.0.5/format.ts +39 -0
  291. package/src/deps/jsr.io/@std/internal/1.0.5/styles.ts +233 -0
  292. package/src/deps/jsr.io/@std/internal/1.0.5/types.ts +18 -0
  293. package/src/mod.ts +3 -18
  294. package/src/types/Ref.ts +16 -0
  295. package/src/types/RootTy.ts +40 -0
  296. package/src/types/Ty.ts +57 -0
  297. package/src/types/array.ts +9 -0
  298. package/src/types/constant.ts +8 -0
  299. package/src/types/constantUnion.ts +27 -0
  300. package/src/types/leaves.ts +21 -0
  301. package/src/types/mod.ts +10 -0
  302. package/src/types/object.ts +15 -0
  303. package/src/types/std/Option.ts +15 -0
  304. package/src/types/std/Wrapper.ts +8 -0
  305. package/src/types/std/mod.ts +2 -0
  306. package/src/types/taggedUnion.ts +28 -0
  307. package/src/util/phantoms.ts +3 -0
  308. package/src/util/recombineTaggedTemplateArgs.ts +6 -0
  309. package/types/ResponseFormat.d.ts +26 -0
  310. package/types/ResponseFormat.d.ts.map +1 -0
  311. package/types/Tool.d.ts +13 -0
  312. package/types/Tool.d.ts.map +1 -0
  313. package/types/_dnt.polyfills.d.ts +12 -0
  314. package/types/_dnt.polyfills.d.ts.map +1 -0
  315. package/types/_dnt.shims.d.ts +2 -0
  316. package/types/_dnt.shims.d.ts.map +1 -0
  317. package/types/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts +29 -0
  318. package/types/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts.map +1 -0
  319. package/types/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts +24 -0
  320. package/types/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts.map +1 -0
  321. package/types/deps/jsr.io/@std/assert/1.0.8/assert.d.ts +16 -0
  322. package/types/deps/jsr.io/@std/assert/1.0.8/assert.d.ts.map +1 -0
  323. package/types/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts +26 -0
  324. package/types/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts.map +1 -0
  325. package/types/deps/jsr.io/@std/assert/1.0.8/equal.d.ts +17 -0
  326. package/types/deps/jsr.io/@std/assert/1.0.8/equal.d.ts.map +1 -0
  327. package/types/deps/jsr.io/@std/assert/1.0.8/equals.d.ts +22 -0
  328. package/types/deps/jsr.io/@std/assert/1.0.8/equals.d.ts.map +1 -0
  329. package/types/deps/jsr.io/@std/assert/1.0.8/exists.d.ts +18 -0
  330. package/types/deps/jsr.io/@std/assert/1.0.8/exists.d.ts.map +1 -0
  331. package/types/deps/jsr.io/@std/assert/1.0.8/fail.d.ts +15 -0
  332. package/types/deps/jsr.io/@std/assert/1.0.8/fail.d.ts.map +1 -0
  333. package/types/deps/jsr.io/@std/assert/1.0.8/false.d.ts +18 -0
  334. package/types/deps/jsr.io/@std/assert/1.0.8/false.d.ts.map +1 -0
  335. package/types/deps/jsr.io/@std/assert/1.0.8/greater.d.ts +20 -0
  336. package/types/deps/jsr.io/@std/assert/1.0.8/greater.d.ts.map +1 -0
  337. package/types/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts +20 -0
  338. package/types/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts.map +1 -0
  339. package/types/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts +23 -0
  340. package/types/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts.map +1 -0
  341. package/types/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts +25 -0
  342. package/types/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts.map +1 -0
  343. package/types/deps/jsr.io/@std/assert/1.0.8/less.d.ts +19 -0
  344. package/types/deps/jsr.io/@std/assert/1.0.8/less.d.ts.map +1 -0
  345. package/types/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts +20 -0
  346. package/types/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts.map +1 -0
  347. package/types/deps/jsr.io/@std/assert/1.0.8/match.d.ts +18 -0
  348. package/types/deps/jsr.io/@std/assert/1.0.8/match.d.ts.map +1 -0
  349. package/types/deps/jsr.io/@std/assert/1.0.8/mod.d.ts +44 -0
  350. package/types/deps/jsr.io/@std/assert/1.0.8/mod.d.ts.map +1 -0
  351. package/types/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts +21 -0
  352. package/types/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts.map +1 -0
  353. package/types/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts +20 -0
  354. package/types/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts.map +1 -0
  355. package/types/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts +18 -0
  356. package/types/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts.map +1 -0
  357. package/types/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts +23 -0
  358. package/types/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts.map +1 -0
  359. package/types/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts +28 -0
  360. package/types/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts.map +1 -0
  361. package/types/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts +42 -0
  362. package/types/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts.map +1 -0
  363. package/types/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts +24 -0
  364. package/types/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts.map +1 -0
  365. package/types/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts +18 -0
  366. package/types/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts.map +1 -0
  367. package/types/deps/jsr.io/@std/assert/1.0.8/throws.d.ts +45 -0
  368. package/types/deps/jsr.io/@std/assert/1.0.8/throws.d.ts.map +1 -0
  369. package/types/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts +15 -0
  370. package/types/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts.map +1 -0
  371. package/types/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts +15 -0
  372. package/types/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts.map +1 -0
  373. package/types/deps/jsr.io/@std/collections/1.0.9/_utils.d.ts +6 -0
  374. package/types/deps/jsr.io/@std/collections/1.0.9/_utils.d.ts.map +1 -0
  375. package/types/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.d.ts +41 -0
  376. package/types/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.d.ts.map +1 -0
  377. package/types/deps/jsr.io/@std/collections/1.0.9/associate_by.d.ts +37 -0
  378. package/types/deps/jsr.io/@std/collections/1.0.9/associate_by.d.ts.map +1 -0
  379. package/types/deps/jsr.io/@std/collections/1.0.9/associate_with.d.ts +33 -0
  380. package/types/deps/jsr.io/@std/collections/1.0.9/associate_with.d.ts.map +1 -0
  381. package/types/deps/jsr.io/@std/collections/1.0.9/chunk.d.ts +38 -0
  382. package/types/deps/jsr.io/@std/collections/1.0.9/chunk.d.ts.map +1 -0
  383. package/types/deps/jsr.io/@std/collections/1.0.9/deep_merge.d.ts +322 -0
  384. package/types/deps/jsr.io/@std/collections/1.0.9/deep_merge.d.ts.map +1 -0
  385. package/types/deps/jsr.io/@std/collections/1.0.9/distinct.d.ts +23 -0
  386. package/types/deps/jsr.io/@std/collections/1.0.9/distinct.d.ts.map +1 -0
  387. package/types/deps/jsr.io/@std/collections/1.0.9/distinct_by.d.ts +26 -0
  388. package/types/deps/jsr.io/@std/collections/1.0.9/distinct_by.d.ts.map +1 -0
  389. package/types/deps/jsr.io/@std/collections/1.0.9/drop_last_while.d.ts +26 -0
  390. package/types/deps/jsr.io/@std/collections/1.0.9/drop_last_while.d.ts.map +1 -0
  391. package/types/deps/jsr.io/@std/collections/1.0.9/drop_while.d.ts +25 -0
  392. package/types/deps/jsr.io/@std/collections/1.0.9/drop_while.d.ts.map +1 -0
  393. package/types/deps/jsr.io/@std/collections/1.0.9/filter_entries.d.ts +32 -0
  394. package/types/deps/jsr.io/@std/collections/1.0.9/filter_entries.d.ts.map +1 -0
  395. package/types/deps/jsr.io/@std/collections/1.0.9/filter_keys.d.ts +36 -0
  396. package/types/deps/jsr.io/@std/collections/1.0.9/filter_keys.d.ts.map +1 -0
  397. package/types/deps/jsr.io/@std/collections/1.0.9/filter_values.d.ts +35 -0
  398. package/types/deps/jsr.io/@std/collections/1.0.9/filter_values.d.ts.map +1 -0
  399. package/types/deps/jsr.io/@std/collections/1.0.9/find_single.d.ts +31 -0
  400. package/types/deps/jsr.io/@std/collections/1.0.9/find_single.d.ts.map +1 -0
  401. package/types/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.d.ts +32 -0
  402. package/types/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.d.ts.map +1 -0
  403. package/types/deps/jsr.io/@std/collections/1.0.9/includes_value.d.ts +29 -0
  404. package/types/deps/jsr.io/@std/collections/1.0.9/includes_value.d.ts.map +1 -0
  405. package/types/deps/jsr.io/@std/collections/1.0.9/intersect.d.ts +25 -0
  406. package/types/deps/jsr.io/@std/collections/1.0.9/intersect.d.ts.map +1 -0
  407. package/types/deps/jsr.io/@std/collections/1.0.9/invert.d.ts +29 -0
  408. package/types/deps/jsr.io/@std/collections/1.0.9/invert.d.ts.map +1 -0
  409. package/types/deps/jsr.io/@std/collections/1.0.9/invert_by.d.ts +34 -0
  410. package/types/deps/jsr.io/@std/collections/1.0.9/invert_by.d.ts.map +1 -0
  411. package/types/deps/jsr.io/@std/collections/1.0.9/join_to_string.d.ts +75 -0
  412. package/types/deps/jsr.io/@std/collections/1.0.9/join_to_string.d.ts.map +1 -0
  413. package/types/deps/jsr.io/@std/collections/1.0.9/map_entries.d.ts +37 -0
  414. package/types/deps/jsr.io/@std/collections/1.0.9/map_entries.d.ts.map +1 -0
  415. package/types/deps/jsr.io/@std/collections/1.0.9/map_keys.d.ts +33 -0
  416. package/types/deps/jsr.io/@std/collections/1.0.9/map_keys.d.ts.map +1 -0
  417. package/types/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.d.ts +32 -0
  418. package/types/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.d.ts.map +1 -0
  419. package/types/deps/jsr.io/@std/collections/1.0.9/map_values.d.ts +71 -0
  420. package/types/deps/jsr.io/@std/collections/1.0.9/map_values.d.ts.map +1 -0
  421. package/types/deps/jsr.io/@std/collections/1.0.9/max_by.d.ts +117 -0
  422. package/types/deps/jsr.io/@std/collections/1.0.9/max_by.d.ts.map +1 -0
  423. package/types/deps/jsr.io/@std/collections/1.0.9/max_of.d.ts +61 -0
  424. package/types/deps/jsr.io/@std/collections/1.0.9/max_of.d.ts.map +1 -0
  425. package/types/deps/jsr.io/@std/collections/1.0.9/max_with.d.ts +29 -0
  426. package/types/deps/jsr.io/@std/collections/1.0.9/max_with.d.ts.map +1 -0
  427. package/types/deps/jsr.io/@std/collections/1.0.9/min_by.d.ts +115 -0
  428. package/types/deps/jsr.io/@std/collections/1.0.9/min_by.d.ts.map +1 -0
  429. package/types/deps/jsr.io/@std/collections/1.0.9/min_of.d.ts +61 -0
  430. package/types/deps/jsr.io/@std/collections/1.0.9/min_of.d.ts.map +1 -0
  431. package/types/deps/jsr.io/@std/collections/1.0.9/min_with.d.ts +25 -0
  432. package/types/deps/jsr.io/@std/collections/1.0.9/min_with.d.ts.map +1 -0
  433. package/types/deps/jsr.io/@std/collections/1.0.9/mod.d.ts +73 -0
  434. package/types/deps/jsr.io/@std/collections/1.0.9/mod.d.ts.map +1 -0
  435. package/types/deps/jsr.io/@std/collections/1.0.9/omit.d.ts +24 -0
  436. package/types/deps/jsr.io/@std/collections/1.0.9/omit.d.ts.map +1 -0
  437. package/types/deps/jsr.io/@std/collections/1.0.9/partition.d.ts +60 -0
  438. package/types/deps/jsr.io/@std/collections/1.0.9/partition.d.ts.map +1 -0
  439. package/types/deps/jsr.io/@std/collections/1.0.9/partition_entries.d.ts +39 -0
  440. package/types/deps/jsr.io/@std/collections/1.0.9/partition_entries.d.ts.map +1 -0
  441. package/types/deps/jsr.io/@std/collections/1.0.9/permutations.d.ts +27 -0
  442. package/types/deps/jsr.io/@std/collections/1.0.9/permutations.d.ts.map +1 -0
  443. package/types/deps/jsr.io/@std/collections/1.0.9/pick.d.ts +25 -0
  444. package/types/deps/jsr.io/@std/collections/1.0.9/pick.d.ts.map +1 -0
  445. package/types/deps/jsr.io/@std/collections/1.0.9/reduce_groups.d.ts +35 -0
  446. package/types/deps/jsr.io/@std/collections/1.0.9/reduce_groups.d.ts.map +1 -0
  447. package/types/deps/jsr.io/@std/collections/1.0.9/running_reduce.d.ts +27 -0
  448. package/types/deps/jsr.io/@std/collections/1.0.9/running_reduce.d.ts.map +1 -0
  449. package/types/deps/jsr.io/@std/collections/1.0.9/sample.d.ts +24 -0
  450. package/types/deps/jsr.io/@std/collections/1.0.9/sample.d.ts.map +1 -0
  451. package/types/deps/jsr.io/@std/collections/1.0.9/sliding_windows.d.ts +66 -0
  452. package/types/deps/jsr.io/@std/collections/1.0.9/sliding_windows.d.ts.map +1 -0
  453. package/types/deps/jsr.io/@std/collections/1.0.9/sort_by.d.ts +161 -0
  454. package/types/deps/jsr.io/@std/collections/1.0.9/sort_by.d.ts.map +1 -0
  455. package/types/deps/jsr.io/@std/collections/1.0.9/sum_of.d.ts +29 -0
  456. package/types/deps/jsr.io/@std/collections/1.0.9/sum_of.d.ts.map +1 -0
  457. package/types/deps/jsr.io/@std/collections/1.0.9/take_last_while.d.ts +27 -0
  458. package/types/deps/jsr.io/@std/collections/1.0.9/take_last_while.d.ts.map +1 -0
  459. package/types/deps/jsr.io/@std/collections/1.0.9/take_while.d.ts +30 -0
  460. package/types/deps/jsr.io/@std/collections/1.0.9/take_while.d.ts.map +1 -0
  461. package/types/deps/jsr.io/@std/collections/1.0.9/union.d.ts +24 -0
  462. package/types/deps/jsr.io/@std/collections/1.0.9/union.d.ts.map +1 -0
  463. package/types/deps/jsr.io/@std/collections/1.0.9/unzip.d.ts +32 -0
  464. package/types/deps/jsr.io/@std/collections/1.0.9/unzip.d.ts.map +1 -0
  465. package/types/deps/jsr.io/@std/collections/1.0.9/without_all.d.ts +23 -0
  466. package/types/deps/jsr.io/@std/collections/1.0.9/without_all.d.ts.map +1 -0
  467. package/types/deps/jsr.io/@std/collections/1.0.9/zip.d.ts +34 -0
  468. package/types/deps/jsr.io/@std/collections/1.0.9/zip.d.ts.map +1 -0
  469. package/types/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +82 -0
  470. package/types/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +1 -0
  471. package/types/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +140 -0
  472. package/types/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +1 -0
  473. package/types/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +99 -0
  474. package/types/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +1 -0
  475. package/types/deps/jsr.io/@std/internal/1.0.5/format.d.ts +2 -0
  476. package/types/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +1 -0
  477. package/types/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +159 -0
  478. package/types/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +1 -0
  479. package/types/deps/jsr.io/@std/internal/1.0.5/types.d.ts +16 -0
  480. package/types/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +1 -0
  481. package/types/mod.d.ts +5 -0
  482. package/types/mod.d.ts.map +1 -0
  483. package/types/types/Ref.d.ts +4 -0
  484. package/types/types/Ref.d.ts.map +1 -0
  485. package/types/types/RootTy.d.ts +8 -0
  486. package/types/types/RootTy.d.ts.map +1 -0
  487. package/types/types/Ty.d.ts +27 -0
  488. package/types/types/Ty.d.ts.map +1 -0
  489. package/types/types/array.d.ts +3 -0
  490. package/types/types/array.d.ts.map +1 -0
  491. package/types/types/constant.d.ts +3 -0
  492. package/types/types/constant.d.ts.map +1 -0
  493. package/types/types/constantUnion.d.ts +3 -0
  494. package/types/types/constantUnion.d.ts.map +1 -0
  495. package/types/types/leaves.d.ts +6 -0
  496. package/types/types/leaves.d.ts.map +1 -0
  497. package/types/types/mod.d.ts +11 -0
  498. package/types/types/mod.d.ts.map +1 -0
  499. package/types/types/object.d.ts +6 -0
  500. package/types/types/object.d.ts.map +1 -0
  501. package/types/types/std/Option.d.ts +7 -0
  502. package/types/types/std/Option.d.ts.map +1 -0
  503. package/types/types/std/Wrapper.d.ts +7 -0
  504. package/types/types/std/Wrapper.d.ts.map +1 -0
  505. package/types/types/std/mod.d.ts +3 -0
  506. package/types/types/std/mod.d.ts.map +1 -0
  507. package/types/types/taggedUnion.d.ts +8 -0
  508. package/types/types/taggedUnion.d.ts.map +1 -0
  509. package/types/util/phantoms.d.ts +2 -0
  510. package/types/util/phantoms.d.ts.map +1 -0
  511. package/types/util/recombineTaggedTemplateArgs.d.ts +2 -0
  512. package/types/util/recombineTaggedTemplateArgs.d.ts.map +1 -0
  513. package/esm/F.d.ts +0 -13
  514. package/esm/F.d.ts.map +0 -1
  515. package/esm/F.js +0 -10
  516. package/esm/F.js.map +0 -1
  517. package/esm/ResponseFormat.d.ts +0 -14
  518. package/esm/ResponseFormat.d.ts.map +0 -1
  519. package/esm/_base.d.ts +0 -13
  520. package/esm/_base.d.ts.map +0 -1
  521. package/esm/_base.js +0 -40
  522. package/esm/_base.js.map +0 -1
  523. package/esm/array.d.ts +0 -4
  524. package/esm/array.d.ts.map +0 -1
  525. package/esm/array.js +0 -9
  526. package/esm/array.js.map +0 -1
  527. package/esm/common.d.ts +0 -6
  528. package/esm/common.d.ts.map +0 -1
  529. package/esm/common.js +0 -2
  530. package/esm/common.js.map +0 -1
  531. package/esm/literal.d.ts +0 -4
  532. package/esm/literal.d.ts.map +0 -1
  533. package/esm/literal.js +0 -8
  534. package/esm/literal.js.map +0 -1
  535. package/esm/mod.d.ts +0 -16
  536. package/esm/mod.d.ts.map +0 -1
  537. package/esm/number.d.ts +0 -4
  538. package/esm/number.d.ts.map +0 -1
  539. package/esm/number.js +0 -8
  540. package/esm/number.js.map +0 -1
  541. package/esm/object.d.ts +0 -7
  542. package/esm/object.d.ts.map +0 -1
  543. package/esm/object.js.map +0 -1
  544. package/esm/schema.d.ts +0 -4
  545. package/esm/schema.d.ts.map +0 -1
  546. package/esm/schema.js +0 -9
  547. package/esm/schema.js.map +0 -1
  548. package/esm/string.d.ts +0 -4
  549. package/esm/string.d.ts.map +0 -1
  550. package/esm/string.js +0 -8
  551. package/esm/string.js.map +0 -1
  552. package/esm/union.d.ts +0 -6
  553. package/esm/union.d.ts.map +0 -1
  554. package/esm/union.js +0 -8
  555. package/esm/union.js.map +0 -1
  556. package/src/F.ts +0 -27
  557. package/src/_base.ts +0 -25
  558. package/src/array.ts +0 -11
  559. package/src/common.ts +0 -6
  560. package/src/literal.ts +0 -10
  561. package/src/number.ts +0 -10
  562. package/src/object.ts +0 -17
  563. package/src/schema.ts +0 -10
  564. package/src/string.ts +0 -10
  565. package/src/union.ts +0 -12
@@ -0,0 +1,208 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ // A module to print ANSI terminal colors. Inspired by chalk, kleur, and colors
4
+ // on npm.
5
+ // This code is vendored from `fmt/colors.ts`.
6
+ // deno-lint-ignore no-explicit-any
7
+ import * as dntShim from "../../../../../_dnt.shims.js";
8
+ const { Deno } = dntShim.dntGlobalThis;
9
+ const noColor = typeof Deno?.noColor === "boolean"
10
+ ? Deno.noColor
11
+ : false;
12
+ const enabled = !noColor;
13
+ function code(open, close) {
14
+ return {
15
+ open: `\x1b[${open.join(";")}m`,
16
+ close: `\x1b[${close}m`,
17
+ regexp: new RegExp(`\\x1b\\[${close}m`, "g"),
18
+ };
19
+ }
20
+ function run(str, code) {
21
+ return enabled
22
+ ? `${code.open}${str.replace(code.regexp, code.open)}${code.close}`
23
+ : str;
24
+ }
25
+ /**
26
+ * Sets the style of text to be printed to bold.
27
+ *
28
+ * Disable by setting the `NO_COLOR` environmental variable.
29
+ *
30
+ * @param str Text to make bold
31
+ *
32
+ * @returns Bold text for printing
33
+ *
34
+ * @example Usage
35
+ * ```ts no-assert
36
+ * import { bold } from "@std/internal/styles";
37
+ *
38
+ * console.log(bold("Hello, world!")); // Prints "Hello, world!" in bold
39
+ * ```
40
+ */
41
+ export function bold(str) {
42
+ return run(str, code([1], 22));
43
+ }
44
+ /**
45
+ * Sets the color of text to be printed to red.
46
+ *
47
+ * Disable by setting the `NO_COLOR` environmental variable.
48
+ *
49
+ * @param str Text to make red
50
+ *
51
+ * @returns Red text for printing
52
+ *
53
+ * @example Usage
54
+ * ```ts no-assert
55
+ * import { red } from "@std/internal/styles";
56
+ *
57
+ * console.log(red("Hello, world!")); // Prints "Hello, world!" in red
58
+ * ```
59
+ */
60
+ export function red(str) {
61
+ return run(str, code([31], 39));
62
+ }
63
+ /**
64
+ * Sets the color of text to be printed to green.
65
+ *
66
+ * Disable by setting the `NO_COLOR` environmental variable.
67
+ *
68
+ * @param str Text to make green
69
+ *
70
+ * @returns Green text for print
71
+ *
72
+ * @example Usage
73
+ * ```ts no-assert
74
+ * import { green } from "@std/internal/styles";
75
+ *
76
+ * console.log(green("Hello, world!")); // Prints "Hello, world!" in green
77
+ * ```
78
+ */
79
+ export function green(str) {
80
+ return run(str, code([32], 39));
81
+ }
82
+ /**
83
+ * Sets the color of text to be printed to yellow.
84
+ *
85
+ * Disable by setting the `NO_COLOR` environmental variable.
86
+ *
87
+ * @param str Text to make yellow
88
+ *
89
+ * @returns Yellow text for print
90
+ *
91
+ * @example Usage
92
+ * ```ts no-assert
93
+ * import { yellow } from "@std/internal/styles";
94
+ *
95
+ * console.log(yellow("Hello, world!")); // Prints "Hello, world!" in yellow
96
+ * ```
97
+ */
98
+ export function yellow(str) {
99
+ return run(str, code([33], 39));
100
+ }
101
+ /**
102
+ * Sets the color of text to be printed to white.
103
+ *
104
+ * @param str Text to make white
105
+ *
106
+ * @returns White text for print
107
+ *
108
+ * @example Usage
109
+ * ```ts no-assert
110
+ * import { white } from "@std/internal/styles";
111
+ *
112
+ * console.log(white("Hello, world!")); // Prints "Hello, world!" in white
113
+ * ```
114
+ */
115
+ export function white(str) {
116
+ return run(str, code([37], 39));
117
+ }
118
+ /**
119
+ * Sets the color of text to be printed to gray.
120
+ *
121
+ * @param str Text to make gray
122
+ *
123
+ * @returns Gray text for print
124
+ *
125
+ * @example Usage
126
+ * ```ts no-assert
127
+ * import { gray } from "@std/internal/styles";
128
+ *
129
+ * console.log(gray("Hello, world!")); // Prints "Hello, world!" in gray
130
+ * ```
131
+ */
132
+ export function gray(str) {
133
+ return brightBlack(str);
134
+ }
135
+ /**
136
+ * Sets the color of text to be printed to bright-black.
137
+ *
138
+ * @param str Text to make bright-black
139
+ *
140
+ * @returns Bright-black text for print
141
+ *
142
+ * @example Usage
143
+ * ```ts no-assert
144
+ * import { brightBlack } from "@std/internal/styles";
145
+ *
146
+ * console.log(brightBlack("Hello, world!")); // Prints "Hello, world!" in bright-black
147
+ * ```
148
+ */
149
+ export function brightBlack(str) {
150
+ return run(str, code([90], 39));
151
+ }
152
+ /**
153
+ * Sets the background color of text to be printed to red.
154
+ *
155
+ * @param str Text to make its background red
156
+ *
157
+ * @returns Red background text for print
158
+ *
159
+ * @example Usage
160
+ * ```ts no-assert
161
+ * import { bgRed } from "@std/internal/styles";
162
+ *
163
+ * console.log(bgRed("Hello, world!")); // Prints "Hello, world!" with red background
164
+ * ```
165
+ */
166
+ export function bgRed(str) {
167
+ return run(str, code([41], 49));
168
+ }
169
+ /**
170
+ * Sets the background color of text to be printed to green.
171
+ *
172
+ * @param str Text to make its background green
173
+ *
174
+ * @returns Green background text for print
175
+ *
176
+ * @example Usage
177
+ * ```ts no-assert
178
+ * import { bgGreen } from "@std/internal/styles";
179
+ *
180
+ * console.log(bgGreen("Hello, world!")); // Prints "Hello, world!" with green background
181
+ * ```
182
+ */
183
+ export function bgGreen(str) {
184
+ return run(str, code([42], 49));
185
+ }
186
+ // https://github.com/chalk/ansi-regex/blob/02fa893d619d3da85411acc8fd4e2eea0e95a9d9/index.js
187
+ const ANSI_PATTERN = new RegExp([
188
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
189
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TXZcf-nq-uy=><~]))",
190
+ ].join("|"), "g");
191
+ /**
192
+ * Remove ANSI escape codes from the string.
193
+ *
194
+ * @param string Text to remove ANSI escape codes from
195
+ *
196
+ * @returns Text without ANSI escape codes
197
+ *
198
+ * @example Usage
199
+ * ```ts no-assert
200
+ * import { red, stripAnsiCode } from "@std/internal/styles";
201
+ *
202
+ * console.log(stripAnsiCode(red("Hello, world!"))); // Prints "Hello, world!"
203
+ * ```
204
+ */
205
+ export function stripAnsiCode(string) {
206
+ return string.replace(ANSI_PATTERN, "");
207
+ }
208
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.5/styles.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,+EAA+E;AAC/E,UAAU;AAEV,8CAA8C;AAE9C,mCAAmC;AACnC,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AAExD,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,aAAoB,CAAC;AAC9C,MAAM,OAAO,GAAG,OAAO,IAAI,EAAE,OAAO,KAAK,SAAS;IAChD,CAAC,CAAC,IAAI,CAAC,OAAkB;IACzB,CAAC,CAAC,KAAK,CAAC;AAQV,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC;AAEzB,SAAS,IAAI,CAAC,IAAc,EAAE,KAAa;IACzC,OAAO;QACL,IAAI,EAAE,QAAQ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG;QAC/B,KAAK,EAAE,QAAQ,KAAK,GAAG;QACvB,MAAM,EAAE,IAAI,MAAM,CAAC,WAAW,KAAK,GAAG,EAAE,GAAG,CAAC;KAC7C,CAAC;AACJ,CAAC;AAED,SAAS,GAAG,CAAC,GAAW,EAAE,IAAU;IAClC,OAAO,OAAO;QACZ,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE;QACnE,CAAC,CAAC,GAAG,CAAC;AACV,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,IAAI,CAAC,GAAW;IAC9B,OAAO,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AACjC,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,GAAG,CAAC,GAAW;IAC7B,OAAO,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAClC,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,KAAK,CAAC,GAAW;IAC/B,OAAO,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAClC,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,MAAM,CAAC,GAAW;IAChC,OAAO,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAClC,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,KAAK,CAAC,GAAW;IAC/B,OAAO,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAClC,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,IAAI,CAAC,GAAW;IAC9B,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,OAAO,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAClC,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,KAAK,CAAC,GAAW;IAC/B,OAAO,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAClC,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,OAAO,CAAC,GAAW;IACjC,OAAO,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAClC,CAAC;AAED,6FAA6F;AAC7F,MAAM,YAAY,GAAG,IAAI,MAAM,CAC7B;IACE,8HAA8H;IAC9H,2DAA2D;CAC5D,CAAC,IAAI,CAAC,GAAG,CAAC,EACX,GAAG,CACJ,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,aAAa,CAAC,MAAc;IAC1C,OAAO,MAAM,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,3 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ export {};
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.5/types.ts"],"names":[],"mappings":"AAAA,0EAA0E"}
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"}
@@ -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,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,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,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,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,25 @@
1
+ import { partition } from "../deps/jsr.io/@std/collections/1.0.9/mod.js";
2
+ import { Ty } from "./Ty.js";
3
+ export function constantUnion(...members) {
4
+ const [strings, numbers] = partition(members, (v) => typeof v === "string");
5
+ return Ty((description) => {
6
+ return {
7
+ anyOf: [
8
+ ...strings.length
9
+ ? [{
10
+ type: "string",
11
+ enum: strings,
12
+ }]
13
+ : [],
14
+ ...numbers.length
15
+ ? [{
16
+ type: "number",
17
+ enum: numbers,
18
+ }]
19
+ : [],
20
+ ],
21
+ description,
22
+ };
23
+ });
24
+ }
25
+ //# sourceMappingURL=constantUnion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constantUnion.js","sourceRoot":"","sources":["../../src/types/constantUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8CAA8C,CAAA;AACxE,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,MAAM,UAAU,aAAa,CAC3B,GAAG,OAAU;IAEb,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAA;IAC3E,OAAO,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE;QACxB,OAAO;YACL,KAAK,EAAE;gBACL,GAAG,OAAO,CAAC,MAAM;oBACf,CAAC,CAAC,CAAC;4BACD,IAAI,EAAE,QAAQ;4BACd,IAAI,EAAE,OAAO;yBACd,CAAC;oBACF,CAAC,CAAC,EAAE;gBACN,GAAG,OAAO,CAAC,MAAM;oBACf,CAAC,CAAC,CAAC;4BACD,IAAI,EAAE,QAAQ;4BACd,IAAI,EAAE,OAAO;yBACd,CAAC;oBACF,CAAC,CAAC,EAAE;aACP;YACD,WAAW;SACZ,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { Ty } from "./Ty.js";
2
+ export const none = Ty((description) => ({
3
+ type: "null",
4
+ description,
5
+ }));
6
+ export const boolean = Ty((description) => ({
7
+ type: "boolean",
8
+ description,
9
+ }));
10
+ export const number = Ty((description) => ({
11
+ type: "number",
12
+ description,
13
+ }));
14
+ export const string = Ty((description) => ({
15
+ type: "string",
16
+ description,
17
+ }));
18
+ //# sourceMappingURL=leaves.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leaves.js","sourceRoot":"","sources":["../../src/types/leaves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,MAAM,CAAC,MAAM,IAAI,GAAoB,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACxD,IAAI,EAAE,MAAM;IACZ,WAAW;CACZ,CAAC,CAAC,CAAA;AAEH,MAAM,CAAC,MAAM,OAAO,GAAuB,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAC9D,IAAI,EAAE,SAAS;IACf,WAAW;CACZ,CAAC,CAAC,CAAA;AAEH,MAAM,CAAC,MAAM,MAAM,GAAsB,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAC5D,IAAI,EAAE,QAAQ;IACd,WAAW;CACZ,CAAC,CAAC,CAAA;AAEH,MAAM,CAAC,MAAM,MAAM,GAAsB,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAC5D,IAAI,EAAE,QAAQ;IACd,WAAW;CACZ,CAAC,CAAC,CAAA"}
@@ -0,0 +1,11 @@
1
+ export * from "./array.js";
2
+ export * from "./leaves.js";
3
+ export * from "./constant.js";
4
+ export * from "./constantUnion.js";
5
+ export * from "./std/mod.js";
6
+ export * from "./object.js";
7
+ export * from "./Ref.js";
8
+ export * from "./taggedUnion.js";
9
+ export * from "./Ty.js";
10
+ export * from "./RootTy.js";
11
+ //# sourceMappingURL=mod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.js","sourceRoot":"","sources":["../../src/types/mod.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA"}
@@ -1,9 +1,9 @@
1
- import { make } from "./_base.js";
2
- export function object(description, fields) {
3
- return make((ctx) => ({
1
+ import { RootTy } from "./RootTy.js";
2
+ export function object(fields) {
3
+ return RootTy((description, ref) => ({
4
4
  type: "object",
5
5
  description,
6
- properties: Object.fromEntries(Object.entries(fields).map(([k, v]) => [k, ctx.ref(v)])),
6
+ properties: Object.fromEntries(Object.entries(fields).map(([k, v]) => [k, ref(v)])),
7
7
  additionalProperties: false,
8
8
  required: Object.keys(fields),
9
9
  }));
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.js","sourceRoot":"","sources":["../../src/types/object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGpC,MAAM,UAAU,MAAM,CAA+B,MAAS;IAI5D,OAAO,MAAM,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;QACnC,IAAI,EAAE,QAAQ;QACd,WAAW;QACX,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACnF,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;KAC9B,CAAC,CAAC,CAAA;AACL,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { none } from "../leaves.js";
2
+ import { taggedUnion } from "../taggedUnion.js";
3
+ export function option(Some) {
4
+ return taggedUnion({
5
+ Some,
6
+ None: none,
7
+ }) `An option of specified \`some\` type.`;
8
+ }
9
+ //# sourceMappingURL=Option.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Option.js","sourceRoot":"","sources":["../../../src/types/std/Option.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAG/C,MAAM,UAAU,MAAM,CAAe,IAAO;IAM1C,OAAO,WAAW,CAAC;QACjB,IAAI;QACJ,IAAI,EAAE,IAAI;KACX,CAAC,CAAA,uCAAuC,CAAA;AAC3C,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { object } from "../object.js";
2
+ export function Wrapper(value) {
3
+ return object({ value });
4
+ }
5
+ //# sourceMappingURL=Wrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Wrapper.js","sourceRoot":"","sources":["../../../src/types/std/Wrapper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAIrC,MAAM,UAAU,OAAO,CAAe,KAAQ;IAC5C,OAAO,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;AAC1B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./Option.js";
2
+ export * from "./Wrapper.js";
3
+ //# sourceMappingURL=mod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.js","sourceRoot":"","sources":["../../../src/types/std/mod.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
@@ -0,0 +1,20 @@
1
+ import { Ty } from "./Ty.js";
2
+ export function taggedUnion(members) {
3
+ return Ty((description, ref) => ({
4
+ description,
5
+ discriminator: "type",
6
+ anyOf: Object.entries(members).map(([k, v]) => ({
7
+ type: "object",
8
+ properties: {
9
+ type: {
10
+ type: "string",
11
+ const: k,
12
+ },
13
+ value: ref(v),
14
+ },
15
+ required: ["type", "value"],
16
+ additionalProperties: false,
17
+ })),
18
+ }));
19
+ }
20
+ //# sourceMappingURL=taggedUnion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taggedUnion.js","sourceRoot":"","sources":["../../src/types/taggedUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,MAAM,UAAU,WAAW,CAA+B,OAAU;IASlE,OAAO,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;QAC/B,WAAW;QACX,aAAa,EAAE,MAAM;QACrB,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC9C,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,CAAC;iBACT;gBACD,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;aACd;YACD,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;YAC3B,oBAAoB,EAAE,KAAK;SAC5B,CAAC,CAAC;KACJ,CAAC,CAAC,CAAA;AACL,CAAC"}
@@ -0,0 +1,4 @@
1
+ export function phantoms() {
2
+ return {};
3
+ }
4
+ //# sourceMappingURL=phantoms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phantoms.js","sourceRoot":"","sources":["../../src/util/phantoms.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,QAAQ;IACtB,OAAO,EAAO,CAAA;AAChB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export function recombineTaggedTemplateArgs(strings, values) {
2
+ return strings.reduce((acc, cur, i) => `${acc}${cur}${values[i] ?? ""}`, "");
3
+ }
4
+ //# sourceMappingURL=recombineTaggedTemplateArgs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recombineTaggedTemplateArgs.js","sourceRoot":"","sources":["../../src/util/recombineTaggedTemplateArgs.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,2BAA2B,CACzC,OAA6B,EAC7B,MAA8B;IAE9B,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;AAC9E,CAAC"}
package/package.json CHANGED
@@ -1,20 +1,23 @@
1
1
  {
2
2
  "name": "structured-outputs",
3
- "version": "0.1.0-beta.2",
4
- "description": "Lightweight virtual types for OpenAI structured outputs.",
3
+ "version": "0.1.0-beta.20",
4
+ "description": "Compose OpenAI structured output schemas.",
5
5
  "repository": "github:harrysolovay/structured-outputs.git",
6
6
  "license": "Apache-2.0",
7
+ "main": "./esm/mod.js",
7
8
  "module": "./esm/mod.js",
9
+ "types": "./types/mod.d.ts",
8
10
  "exports": {
9
11
  ".": {
10
- "import": "./esm/mod.js"
12
+ "import": {
13
+ "types": "./types/mod.d.ts",
14
+ "default": "./esm/mod.js"
15
+ }
11
16
  }
12
17
  },
13
18
  "dependencies": {
14
- "tslib": "^2.6.2"
15
- },
16
- "devDependencies": {
17
- "@types/node": "^20.9.0"
19
+ "tslib": "^2.6.2",
20
+ "openai": "^4.68.1"
18
21
  },
19
22
  "_generatedBy": "dnt@dev"
20
23
  }
@@ -1,31 +1,82 @@
1
- import type { Ty } from "./_base.js"
2
- import type { ValidRootKey } from "./common.js"
3
- import { schema } from "./schema.js"
1
+ import { assert } from "./deps/jsr.io/@std/assert/1.0.8/mod.js"
2
+ import type Openai from "openai"
3
+ import type { ResponseFormatJSONSchema } from "openai/resources/index.js"
4
+ import type { RootTy } from "./types/mod.js"
5
+ import { recombineTaggedTemplateArgs } from "./util/recombineTaggedTemplateArgs.js"
4
6
 
5
- export type ResponseFormat = {
6
- type: "json_schema"
7
- /** The desired return type in JSON Schema. */
8
- json_schema: {
9
- name: string
10
- description: string
11
- schema: Record<string, unknown>
12
- strict: true
13
- }
7
+ export function ResponseFormat<T>(name: string, ty: RootTy<T, never>): ResponseFormat<T> {
8
+ return ResponseFormat_(name, ty)
14
9
  }
15
10
 
16
- export function ResponseFormat<M extends Record<string, Ty>>(
11
+ function ResponseFormat_<T>(
17
12
  name: string,
18
- description: string,
19
- models: M,
20
- rootKey: ValidRootKey<M>,
21
- ): ResponseFormat {
22
- return {
23
- type: "json_schema",
24
- json_schema: {
25
- name,
26
- description,
27
- schema: schema(models, rootKey),
28
- strict: true,
13
+ ty: RootTy<T, never>,
14
+ description?: string,
15
+ ): ResponseFormat<T> {
16
+ return Object.assign(
17
+ (template: TemplateStringsArray, ...quasis: Array<string>) =>
18
+ ResponseFormat_(
19
+ name,
20
+ ty,
21
+ description ? `${description} ${recombineTaggedTemplateArgs(template, quasis)}` : undefined,
22
+ ),
23
+ {
24
+ type: "json_schema" as const,
25
+ json_schema: {
26
+ name,
27
+ description,
28
+ schema: ty.schema(),
29
+ strict: true,
30
+ },
31
+ parse(completion: ChatCompletion): TypedChatCompletion<T> {
32
+ return {
33
+ ...completion,
34
+ choices: completion.choices.map((choice) => ({
35
+ ...choice,
36
+ message: {
37
+ ...choice.message,
38
+ content: choice.message.content ? JSON.parse(choice.message.content) : null,
39
+ },
40
+ })),
41
+ }
42
+ },
43
+ parseFirstOrThrow(completion: ChatCompletion): T {
44
+ const { choices: [firstChoice], usage } = completion
45
+ assert(firstChoice)
46
+ const { finish_reason, message } = firstChoice
47
+ const { content, refusal } = message
48
+ assert(content, JSON.stringify({ finish_reason, refusal, usage }))
49
+ return JSON.parse(content)
50
+ },
51
+ toJSON() {
52
+ const { type, json_schema } = this
53
+ return { type, json_schema }
54
+ },
29
55
  },
30
- }
56
+ )
31
57
  }
58
+
59
+ export interface ResponseFormat<T> {
60
+ (template: TemplateStringsArray, ...quasis: Array<string>): ResponseFormat<T>
61
+ type: "json_schema"
62
+ /** The desired return type in JSON Schema. */
63
+ json_schema: ResponseFormatJSONSchema.JSONSchema
64
+ /** Parse inner responses into a typed object. */
65
+ parse(completion: ChatCompletion): TypedChatCompletion<T>
66
+ /** Parse and return the first inner response into a typed object. */
67
+ parseFirstOrThrow(completion: ChatCompletion): T
68
+ }
69
+
70
+ export type TypedChatCompletion<T> = Omit<ChatCompletion, "choices"> & {
71
+ choices: Array<
72
+ Omit<ChatCompletionChoice, "message"> & {
73
+ message: Omit<ChatCompletionMessage, "content"> & {
74
+ content: T
75
+ }
76
+ }
77
+ >
78
+ }
79
+
80
+ type ChatCompletion = Openai.Chat.ChatCompletion
81
+ type ChatCompletionChoice = Openai.Chat.ChatCompletion.Choice
82
+ type ChatCompletionMessage = Openai.Chat.Completions.ChatCompletionMessage