@dimivelev/chimera 0.78.1 → 0.78.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (985) hide show
  1. package/npm-shrinkwrap.json +12 -12
  2. package/package.json +4 -9
  3. package/node_modules/@anthropic-ai/sdk/CHANGELOG.md +0 -1677
  4. package/node_modules/@anthropic-ai/sdk/LICENSE +0 -8
  5. package/node_modules/@anthropic-ai/sdk/README.md +0 -674
  6. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts +0 -3
  7. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts.map +0 -1
  8. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts +0 -3
  9. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts.map +0 -1
  10. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js +0 -226
  11. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js.map +0 -1
  12. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs +0 -223
  13. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs.map +0 -1
  14. package/node_modules/@anthropic-ai/sdk/api-promise.d.mts +0 -2
  15. package/node_modules/@anthropic-ai/sdk/api-promise.d.mts.map +0 -1
  16. package/node_modules/@anthropic-ai/sdk/api-promise.d.ts +0 -2
  17. package/node_modules/@anthropic-ai/sdk/api-promise.d.ts.map +0 -1
  18. package/node_modules/@anthropic-ai/sdk/api-promise.js +0 -6
  19. package/node_modules/@anthropic-ai/sdk/api-promise.js.map +0 -1
  20. package/node_modules/@anthropic-ai/sdk/api-promise.mjs +0 -2
  21. package/node_modules/@anthropic-ai/sdk/api-promise.mjs.map +0 -1
  22. package/node_modules/@anthropic-ai/sdk/bin/cli +0 -53
  23. package/node_modules/@anthropic-ai/sdk/bin/migration-config.json +0 -7
  24. package/node_modules/@anthropic-ai/sdk/client.d.mts +0 -225
  25. package/node_modules/@anthropic-ai/sdk/client.d.mts.map +0 -1
  26. package/node_modules/@anthropic-ai/sdk/client.d.ts +0 -225
  27. package/node_modules/@anthropic-ai/sdk/client.d.ts.map +0 -1
  28. package/node_modules/@anthropic-ai/sdk/client.js +0 -536
  29. package/node_modules/@anthropic-ai/sdk/client.js.map +0 -1
  30. package/node_modules/@anthropic-ai/sdk/client.mjs +0 -531
  31. package/node_modules/@anthropic-ai/sdk/client.mjs.map +0 -1
  32. package/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts +0 -49
  33. package/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts.map +0 -1
  34. package/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts +0 -49
  35. package/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts.map +0 -1
  36. package/node_modules/@anthropic-ai/sdk/core/api-promise.js +0 -76
  37. package/node_modules/@anthropic-ai/sdk/core/api-promise.js.map +0 -1
  38. package/node_modules/@anthropic-ai/sdk/core/api-promise.mjs +0 -72
  39. package/node_modules/@anthropic-ai/sdk/core/api-promise.mjs.map +0 -1
  40. package/node_modules/@anthropic-ai/sdk/core/error.d.mts +0 -47
  41. package/node_modules/@anthropic-ai/sdk/core/error.d.mts.map +0 -1
  42. package/node_modules/@anthropic-ai/sdk/core/error.d.ts +0 -47
  43. package/node_modules/@anthropic-ai/sdk/core/error.d.ts.map +0 -1
  44. package/node_modules/@anthropic-ai/sdk/core/error.js +0 -114
  45. package/node_modules/@anthropic-ai/sdk/core/error.js.map +0 -1
  46. package/node_modules/@anthropic-ai/sdk/core/error.mjs +0 -98
  47. package/node_modules/@anthropic-ai/sdk/core/error.mjs.map +0 -1
  48. package/node_modules/@anthropic-ai/sdk/core/pagination.d.mts +0 -63
  49. package/node_modules/@anthropic-ai/sdk/core/pagination.d.mts.map +0 -1
  50. package/node_modules/@anthropic-ai/sdk/core/pagination.d.ts +0 -63
  51. package/node_modules/@anthropic-ai/sdk/core/pagination.d.ts.map +0 -1
  52. package/node_modules/@anthropic-ai/sdk/core/pagination.js +0 -123
  53. package/node_modules/@anthropic-ai/sdk/core/pagination.js.map +0 -1
  54. package/node_modules/@anthropic-ai/sdk/core/pagination.mjs +0 -117
  55. package/node_modules/@anthropic-ai/sdk/core/pagination.mjs.map +0 -1
  56. package/node_modules/@anthropic-ai/sdk/core/resource.d.mts +0 -6
  57. package/node_modules/@anthropic-ai/sdk/core/resource.d.mts.map +0 -1
  58. package/node_modules/@anthropic-ai/sdk/core/resource.d.ts +0 -6
  59. package/node_modules/@anthropic-ai/sdk/core/resource.d.ts.map +0 -1
  60. package/node_modules/@anthropic-ai/sdk/core/resource.js +0 -11
  61. package/node_modules/@anthropic-ai/sdk/core/resource.js.map +0 -1
  62. package/node_modules/@anthropic-ai/sdk/core/resource.mjs +0 -7
  63. package/node_modules/@anthropic-ai/sdk/core/resource.mjs.map +0 -1
  64. package/node_modules/@anthropic-ai/sdk/core/streaming.d.mts +0 -31
  65. package/node_modules/@anthropic-ai/sdk/core/streaming.d.mts.map +0 -1
  66. package/node_modules/@anthropic-ai/sdk/core/streaming.d.ts +0 -31
  67. package/node_modules/@anthropic-ai/sdk/core/streaming.d.ts.map +0 -1
  68. package/node_modules/@anthropic-ai/sdk/core/streaming.js +0 -282
  69. package/node_modules/@anthropic-ai/sdk/core/streaming.js.map +0 -1
  70. package/node_modules/@anthropic-ai/sdk/core/streaming.mjs +0 -277
  71. package/node_modules/@anthropic-ai/sdk/core/streaming.mjs.map +0 -1
  72. package/node_modules/@anthropic-ai/sdk/core/uploads.d.mts +0 -3
  73. package/node_modules/@anthropic-ai/sdk/core/uploads.d.mts.map +0 -1
  74. package/node_modules/@anthropic-ai/sdk/core/uploads.d.ts +0 -3
  75. package/node_modules/@anthropic-ai/sdk/core/uploads.d.ts.map +0 -1
  76. package/node_modules/@anthropic-ai/sdk/core/uploads.js +0 -6
  77. package/node_modules/@anthropic-ai/sdk/core/uploads.js.map +0 -1
  78. package/node_modules/@anthropic-ai/sdk/core/uploads.mjs +0 -2
  79. package/node_modules/@anthropic-ai/sdk/core/uploads.mjs.map +0 -1
  80. package/node_modules/@anthropic-ai/sdk/error.d.mts +0 -2
  81. package/node_modules/@anthropic-ai/sdk/error.d.mts.map +0 -1
  82. package/node_modules/@anthropic-ai/sdk/error.d.ts +0 -2
  83. package/node_modules/@anthropic-ai/sdk/error.d.ts.map +0 -1
  84. package/node_modules/@anthropic-ai/sdk/error.js +0 -6
  85. package/node_modules/@anthropic-ai/sdk/error.js.map +0 -1
  86. package/node_modules/@anthropic-ai/sdk/error.mjs +0 -2
  87. package/node_modules/@anthropic-ai/sdk/error.mjs.map +0 -1
  88. package/node_modules/@anthropic-ai/sdk/index.d.mts +0 -7
  89. package/node_modules/@anthropic-ai/sdk/index.d.mts.map +0 -1
  90. package/node_modules/@anthropic-ai/sdk/index.d.ts +0 -7
  91. package/node_modules/@anthropic-ai/sdk/index.d.ts.map +0 -1
  92. package/node_modules/@anthropic-ai/sdk/index.js +0 -35
  93. package/node_modules/@anthropic-ai/sdk/index.js.map +0 -1
  94. package/node_modules/@anthropic-ai/sdk/index.mjs +0 -8
  95. package/node_modules/@anthropic-ai/sdk/index.mjs.map +0 -1
  96. package/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.mts +0 -73
  97. package/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.mts.map +0 -1
  98. package/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.ts +0 -73
  99. package/node_modules/@anthropic-ai/sdk/internal/builtin-types.d.ts.map +0 -1
  100. package/node_modules/@anthropic-ai/sdk/internal/builtin-types.js +0 -4
  101. package/node_modules/@anthropic-ai/sdk/internal/builtin-types.js.map +0 -1
  102. package/node_modules/@anthropic-ai/sdk/internal/builtin-types.mjs +0 -3
  103. package/node_modules/@anthropic-ai/sdk/internal/builtin-types.mjs.map +0 -1
  104. package/node_modules/@anthropic-ai/sdk/internal/constants.d.mts +0 -5
  105. package/node_modules/@anthropic-ai/sdk/internal/constants.d.mts.map +0 -1
  106. package/node_modules/@anthropic-ai/sdk/internal/constants.d.ts +0 -5
  107. package/node_modules/@anthropic-ai/sdk/internal/constants.d.ts.map +0 -1
  108. package/node_modules/@anthropic-ai/sdk/internal/constants.js +0 -15
  109. package/node_modules/@anthropic-ai/sdk/internal/constants.js.map +0 -1
  110. package/node_modules/@anthropic-ai/sdk/internal/constants.mjs +0 -12
  111. package/node_modules/@anthropic-ai/sdk/internal/constants.mjs.map +0 -1
  112. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts +0 -10
  113. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts.map +0 -1
  114. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts +0 -10
  115. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts.map +0 -1
  116. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js +0 -39
  117. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js.map +0 -1
  118. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs +0 -35
  119. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs.map +0 -1
  120. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts +0 -17
  121. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts.map +0 -1
  122. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts +0 -17
  123. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts.map +0 -1
  124. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.js +0 -113
  125. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.js.map +0 -1
  126. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs +0 -108
  127. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs.map +0 -1
  128. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.mts +0 -15
  129. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.mts.map +0 -1
  130. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.ts +0 -15
  131. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.d.ts.map +0 -1
  132. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.js +0 -162
  133. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.js.map +0 -1
  134. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs +0 -157
  135. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs.map +0 -1
  136. package/node_modules/@anthropic-ai/sdk/internal/errors.d.mts +0 -3
  137. package/node_modules/@anthropic-ai/sdk/internal/errors.d.mts.map +0 -1
  138. package/node_modules/@anthropic-ai/sdk/internal/errors.d.ts +0 -3
  139. package/node_modules/@anthropic-ai/sdk/internal/errors.d.ts.map +0 -1
  140. package/node_modules/@anthropic-ai/sdk/internal/errors.js +0 -41
  141. package/node_modules/@anthropic-ai/sdk/internal/errors.js.map +0 -1
  142. package/node_modules/@anthropic-ai/sdk/internal/errors.mjs +0 -36
  143. package/node_modules/@anthropic-ai/sdk/internal/errors.mjs.map +0 -1
  144. package/node_modules/@anthropic-ai/sdk/internal/headers.d.mts +0 -22
  145. package/node_modules/@anthropic-ai/sdk/internal/headers.d.mts.map +0 -1
  146. package/node_modules/@anthropic-ai/sdk/internal/headers.d.ts +0 -22
  147. package/node_modules/@anthropic-ai/sdk/internal/headers.d.ts.map +0 -1
  148. package/node_modules/@anthropic-ai/sdk/internal/headers.js +0 -79
  149. package/node_modules/@anthropic-ai/sdk/internal/headers.js.map +0 -1
  150. package/node_modules/@anthropic-ai/sdk/internal/headers.mjs +0 -74
  151. package/node_modules/@anthropic-ai/sdk/internal/headers.mjs.map +0 -1
  152. package/node_modules/@anthropic-ai/sdk/internal/parse.d.mts +0 -17
  153. package/node_modules/@anthropic-ai/sdk/internal/parse.d.mts.map +0 -1
  154. package/node_modules/@anthropic-ai/sdk/internal/parse.d.ts +0 -17
  155. package/node_modules/@anthropic-ai/sdk/internal/parse.d.ts.map +0 -1
  156. package/node_modules/@anthropic-ai/sdk/internal/parse.js +0 -55
  157. package/node_modules/@anthropic-ai/sdk/internal/parse.js.map +0 -1
  158. package/node_modules/@anthropic-ai/sdk/internal/parse.mjs +0 -51
  159. package/node_modules/@anthropic-ai/sdk/internal/parse.mjs.map +0 -1
  160. package/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts +0 -34
  161. package/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts.map +0 -1
  162. package/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts +0 -34
  163. package/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts.map +0 -1
  164. package/node_modules/@anthropic-ai/sdk/internal/request-options.js +0 -14
  165. package/node_modules/@anthropic-ai/sdk/internal/request-options.js.map +0 -1
  166. package/node_modules/@anthropic-ai/sdk/internal/request-options.mjs +0 -10
  167. package/node_modules/@anthropic-ai/sdk/internal/request-options.mjs.map +0 -1
  168. package/node_modules/@anthropic-ai/sdk/internal/shim-types.d.mts +0 -28
  169. package/node_modules/@anthropic-ai/sdk/internal/shim-types.d.ts +0 -28
  170. package/node_modules/@anthropic-ai/sdk/internal/shims.d.mts +0 -20
  171. package/node_modules/@anthropic-ai/sdk/internal/shims.d.mts.map +0 -1
  172. package/node_modules/@anthropic-ai/sdk/internal/shims.d.ts +0 -20
  173. package/node_modules/@anthropic-ai/sdk/internal/shims.d.ts.map +0 -1
  174. package/node_modules/@anthropic-ai/sdk/internal/shims.js +0 -92
  175. package/node_modules/@anthropic-ai/sdk/internal/shims.js.map +0 -1
  176. package/node_modules/@anthropic-ai/sdk/internal/shims.mjs +0 -85
  177. package/node_modules/@anthropic-ai/sdk/internal/shims.mjs.map +0 -1
  178. package/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.mts +0 -8
  179. package/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.mts.map +0 -1
  180. package/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.ts +0 -8
  181. package/node_modules/@anthropic-ai/sdk/internal/stream-utils.d.ts.map +0 -1
  182. package/node_modules/@anthropic-ai/sdk/internal/stream-utils.js +0 -38
  183. package/node_modules/@anthropic-ai/sdk/internal/stream-utils.js.map +0 -1
  184. package/node_modules/@anthropic-ai/sdk/internal/stream-utils.mjs +0 -35
  185. package/node_modules/@anthropic-ai/sdk/internal/stream-utils.mjs.map +0 -1
  186. package/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts +0 -45
  187. package/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts.map +0 -1
  188. package/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts +0 -45
  189. package/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts.map +0 -1
  190. package/node_modules/@anthropic-ai/sdk/internal/to-file.js +0 -96
  191. package/node_modules/@anthropic-ai/sdk/internal/to-file.js.map +0 -1
  192. package/node_modules/@anthropic-ai/sdk/internal/to-file.mjs +0 -93
  193. package/node_modules/@anthropic-ai/sdk/internal/to-file.mjs.map +0 -1
  194. package/node_modules/@anthropic-ai/sdk/internal/tslib.js +0 -81
  195. package/node_modules/@anthropic-ai/sdk/internal/tslib.mjs +0 -17
  196. package/node_modules/@anthropic-ai/sdk/internal/types.d.mts +0 -67
  197. package/node_modules/@anthropic-ai/sdk/internal/types.d.mts.map +0 -1
  198. package/node_modules/@anthropic-ai/sdk/internal/types.d.ts +0 -67
  199. package/node_modules/@anthropic-ai/sdk/internal/types.d.ts.map +0 -1
  200. package/node_modules/@anthropic-ai/sdk/internal/types.js +0 -4
  201. package/node_modules/@anthropic-ai/sdk/internal/types.js.map +0 -1
  202. package/node_modules/@anthropic-ai/sdk/internal/types.mjs +0 -3
  203. package/node_modules/@anthropic-ai/sdk/internal/types.mjs.map +0 -1
  204. package/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts +0 -42
  205. package/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts.map +0 -1
  206. package/node_modules/@anthropic-ai/sdk/internal/uploads.d.ts +0 -42
  207. package/node_modules/@anthropic-ai/sdk/internal/uploads.d.ts.map +0 -1
  208. package/node_modules/@anthropic-ai/sdk/internal/uploads.js +0 -146
  209. package/node_modules/@anthropic-ai/sdk/internal/uploads.js.map +0 -1
  210. package/node_modules/@anthropic-ai/sdk/internal/uploads.mjs +0 -136
  211. package/node_modules/@anthropic-ai/sdk/internal/uploads.mjs.map +0 -1
  212. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts +0 -3
  213. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts.map +0 -1
  214. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts +0 -3
  215. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts.map +0 -1
  216. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.js +0 -38
  217. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.js.map +0 -1
  218. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs +0 -33
  219. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs.map +0 -1
  220. package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts +0 -4
  221. package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts.map +0 -1
  222. package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts +0 -4
  223. package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts.map +0 -1
  224. package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js +0 -31
  225. package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js.map +0 -1
  226. package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs +0 -26
  227. package/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs.map +0 -1
  228. package/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts +0 -9
  229. package/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts.map +0 -1
  230. package/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts +0 -9
  231. package/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts.map +0 -1
  232. package/node_modules/@anthropic-ai/sdk/internal/utils/env.js +0 -22
  233. package/node_modules/@anthropic-ai/sdk/internal/utils/env.js.map +0 -1
  234. package/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs +0 -18
  235. package/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs.map +0 -1
  236. package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts +0 -37
  237. package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts.map +0 -1
  238. package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts +0 -37
  239. package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts.map +0 -1
  240. package/node_modules/@anthropic-ai/sdk/internal/utils/log.js +0 -86
  241. package/node_modules/@anthropic-ai/sdk/internal/utils/log.js.map +0 -1
  242. package/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs +0 -80
  243. package/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs.map +0 -1
  244. package/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts +0 -15
  245. package/node_modules/@anthropic-ai/sdk/internal/utils/path.d.mts.map +0 -1
  246. package/node_modules/@anthropic-ai/sdk/internal/utils/path.d.ts +0 -15
  247. package/node_modules/@anthropic-ai/sdk/internal/utils/path.d.ts.map +0 -1
  248. package/node_modules/@anthropic-ai/sdk/internal/utils/path.js +0 -58
  249. package/node_modules/@anthropic-ai/sdk/internal/utils/path.js.map +0 -1
  250. package/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs +0 -53
  251. package/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs.map +0 -1
  252. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts +0 -2
  253. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts.map +0 -1
  254. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts +0 -2
  255. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts.map +0 -1
  256. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js +0 -7
  257. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js.map +0 -1
  258. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs +0 -3
  259. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs.map +0 -1
  260. package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.mts +0 -5
  261. package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.mts.map +0 -1
  262. package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.ts +0 -5
  263. package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.d.ts.map +0 -1
  264. package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js +0 -19
  265. package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.js.map +0 -1
  266. package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs +0 -15
  267. package/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs.map +0 -1
  268. package/node_modules/@anthropic-ai/sdk/internal/utils/values.d.mts +0 -16
  269. package/node_modules/@anthropic-ai/sdk/internal/utils/values.d.mts.map +0 -1
  270. package/node_modules/@anthropic-ai/sdk/internal/utils/values.d.ts +0 -16
  271. package/node_modules/@anthropic-ai/sdk/internal/utils/values.d.ts.map +0 -1
  272. package/node_modules/@anthropic-ai/sdk/internal/utils/values.js +0 -109
  273. package/node_modules/@anthropic-ai/sdk/internal/utils/values.js.map +0 -1
  274. package/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs +0 -92
  275. package/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs.map +0 -1
  276. package/node_modules/@anthropic-ai/sdk/internal/utils.d.mts +0 -7
  277. package/node_modules/@anthropic-ai/sdk/internal/utils.d.mts.map +0 -1
  278. package/node_modules/@anthropic-ai/sdk/internal/utils.d.ts +0 -7
  279. package/node_modules/@anthropic-ai/sdk/internal/utils.d.ts.map +0 -1
  280. package/node_modules/@anthropic-ai/sdk/internal/utils.js +0 -11
  281. package/node_modules/@anthropic-ai/sdk/internal/utils.js.map +0 -1
  282. package/node_modules/@anthropic-ai/sdk/internal/utils.mjs +0 -8
  283. package/node_modules/@anthropic-ai/sdk/internal/utils.mjs.map +0 -1
  284. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts +0 -114
  285. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts.map +0 -1
  286. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts +0 -114
  287. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts.map +0 -1
  288. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js +0 -553
  289. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js.map +0 -1
  290. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs +0 -549
  291. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs.map +0 -1
  292. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts +0 -114
  293. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts.map +0 -1
  294. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts +0 -114
  295. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map +0 -1
  296. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.js +0 -553
  297. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map +0 -1
  298. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs +0 -549
  299. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs.map +0 -1
  300. package/node_modules/@anthropic-ai/sdk/package.json +0 -185
  301. package/node_modules/@anthropic-ai/sdk/pagination.d.mts +0 -2
  302. package/node_modules/@anthropic-ai/sdk/pagination.d.mts.map +0 -1
  303. package/node_modules/@anthropic-ai/sdk/pagination.d.ts +0 -2
  304. package/node_modules/@anthropic-ai/sdk/pagination.d.ts.map +0 -1
  305. package/node_modules/@anthropic-ai/sdk/pagination.js +0 -6
  306. package/node_modules/@anthropic-ai/sdk/pagination.js.map +0 -1
  307. package/node_modules/@anthropic-ai/sdk/pagination.mjs +0 -2
  308. package/node_modules/@anthropic-ai/sdk/pagination.mjs.map +0 -1
  309. package/node_modules/@anthropic-ai/sdk/resource.d.mts +0 -2
  310. package/node_modules/@anthropic-ai/sdk/resource.d.mts.map +0 -1
  311. package/node_modules/@anthropic-ai/sdk/resource.d.ts +0 -2
  312. package/node_modules/@anthropic-ai/sdk/resource.d.ts.map +0 -1
  313. package/node_modules/@anthropic-ai/sdk/resource.js +0 -6
  314. package/node_modules/@anthropic-ai/sdk/resource.js.map +0 -1
  315. package/node_modules/@anthropic-ai/sdk/resource.mjs +0 -2
  316. package/node_modules/@anthropic-ai/sdk/resource.mjs.map +0 -1
  317. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts +0 -61
  318. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts.map +0 -1
  319. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts +0 -61
  320. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts.map +0 -1
  321. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.js +0 -25
  322. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.js.map +0 -1
  323. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs +0 -20
  324. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs.map +0 -1
  325. package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts +0 -151
  326. package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts.map +0 -1
  327. package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts +0 -151
  328. package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts.map +0 -1
  329. package/node_modules/@anthropic-ai/sdk/resources/beta/files.js +0 -122
  330. package/node_modules/@anthropic-ai/sdk/resources/beta/files.js.map +0 -1
  331. package/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs +0 -118
  332. package/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs.map +0 -1
  333. package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts +0 -5
  334. package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts.map +0 -1
  335. package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts +0 -5
  336. package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts.map +0 -1
  337. package/node_modules/@anthropic-ai/sdk/resources/beta/index.js +0 -13
  338. package/node_modules/@anthropic-ai/sdk/resources/beta/index.js.map +0 -1
  339. package/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs +0 -6
  340. package/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs.map +0 -1
  341. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts +0 -343
  342. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts.map +0 -1
  343. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts +0 -343
  344. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts.map +0 -1
  345. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js +0 -204
  346. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js.map +0 -1
  347. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs +0 -200
  348. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs.map +0 -1
  349. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts +0 -3
  350. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts.map +0 -1
  351. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts +0 -3
  352. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts.map +0 -1
  353. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js +0 -9
  354. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js.map +0 -1
  355. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs +0 -4
  356. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs.map +0 -1
  357. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts +0 -1561
  358. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts.map +0 -1
  359. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts +0 -1561
  360. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts.map +0 -1
  361. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js +0 -86
  362. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js.map +0 -1
  363. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs +0 -81
  364. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs.map +0 -1
  365. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts +0 -2
  366. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts.map +0 -1
  367. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts +0 -2
  368. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts.map +0 -1
  369. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.js +0 -6
  370. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.js.map +0 -1
  371. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs +0 -3
  372. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs.map +0 -1
  373. package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts +0 -74
  374. package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts.map +0 -1
  375. package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts +0 -74
  376. package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts.map +0 -1
  377. package/node_modules/@anthropic-ai/sdk/resources/beta/models.js +0 -60
  378. package/node_modules/@anthropic-ai/sdk/resources/beta/models.js.map +0 -1
  379. package/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs +0 -56
  380. package/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs.map +0 -1
  381. package/node_modules/@anthropic-ai/sdk/resources/beta.d.mts +0 -2
  382. package/node_modules/@anthropic-ai/sdk/resources/beta.d.mts.map +0 -1
  383. package/node_modules/@anthropic-ai/sdk/resources/beta.d.ts +0 -2
  384. package/node_modules/@anthropic-ai/sdk/resources/beta.d.ts.map +0 -1
  385. package/node_modules/@anthropic-ai/sdk/resources/beta.js +0 -6
  386. package/node_modules/@anthropic-ai/sdk/resources/beta.js.map +0 -1
  387. package/node_modules/@anthropic-ai/sdk/resources/beta.mjs +0 -3
  388. package/node_modules/@anthropic-ai/sdk/resources/beta.mjs.map +0 -1
  389. package/node_modules/@anthropic-ai/sdk/resources/completions.d.mts +0 -183
  390. package/node_modules/@anthropic-ai/sdk/resources/completions.d.mts.map +0 -1
  391. package/node_modules/@anthropic-ai/sdk/resources/completions.d.ts +0 -183
  392. package/node_modules/@anthropic-ai/sdk/resources/completions.d.ts.map +0 -1
  393. package/node_modules/@anthropic-ai/sdk/resources/completions.js +0 -23
  394. package/node_modules/@anthropic-ai/sdk/resources/completions.js.map +0 -1
  395. package/node_modules/@anthropic-ai/sdk/resources/completions.mjs +0 -19
  396. package/node_modules/@anthropic-ai/sdk/resources/completions.mjs.map +0 -1
  397. package/node_modules/@anthropic-ai/sdk/resources/index.d.mts +0 -6
  398. package/node_modules/@anthropic-ai/sdk/resources/index.d.mts.map +0 -1
  399. package/node_modules/@anthropic-ai/sdk/resources/index.d.ts +0 -6
  400. package/node_modules/@anthropic-ai/sdk/resources/index.d.ts.map +0 -1
  401. package/node_modules/@anthropic-ai/sdk/resources/index.js +0 -15
  402. package/node_modules/@anthropic-ai/sdk/resources/index.js.map +0 -1
  403. package/node_modules/@anthropic-ai/sdk/resources/index.mjs +0 -7
  404. package/node_modules/@anthropic-ai/sdk/resources/index.mjs.map +0 -1
  405. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts +0 -304
  406. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts.map +0 -1
  407. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts +0 -304
  408. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts.map +0 -1
  409. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.js +0 -153
  410. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.js.map +0 -1
  411. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs +0 -149
  412. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs.map +0 -1
  413. package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts +0 -3
  414. package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts.map +0 -1
  415. package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts +0 -3
  416. package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts.map +0 -1
  417. package/node_modules/@anthropic-ai/sdk/resources/messages/index.js +0 -9
  418. package/node_modules/@anthropic-ai/sdk/resources/messages/index.js.map +0 -1
  419. package/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs +0 -4
  420. package/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs.map +0 -1
  421. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts +0 -1264
  422. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts.map +0 -1
  423. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts +0 -1264
  424. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts.map +0 -1
  425. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.js +0 -72
  426. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.js.map +0 -1
  427. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs +0 -67
  428. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs.map +0 -1
  429. package/node_modules/@anthropic-ai/sdk/resources/messages.d.mts +0 -2
  430. package/node_modules/@anthropic-ai/sdk/resources/messages.d.mts.map +0 -1
  431. package/node_modules/@anthropic-ai/sdk/resources/messages.d.ts +0 -2
  432. package/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map +0 -1
  433. package/node_modules/@anthropic-ai/sdk/resources/messages.js +0 -6
  434. package/node_modules/@anthropic-ai/sdk/resources/messages.js.map +0 -1
  435. package/node_modules/@anthropic-ai/sdk/resources/messages.mjs +0 -3
  436. package/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map +0 -1
  437. package/node_modules/@anthropic-ai/sdk/resources/models.d.mts +0 -59
  438. package/node_modules/@anthropic-ai/sdk/resources/models.d.mts.map +0 -1
  439. package/node_modules/@anthropic-ai/sdk/resources/models.d.ts +0 -59
  440. package/node_modules/@anthropic-ai/sdk/resources/models.d.ts.map +0 -1
  441. package/node_modules/@anthropic-ai/sdk/resources/models.js +0 -45
  442. package/node_modules/@anthropic-ai/sdk/resources/models.js.map +0 -1
  443. package/node_modules/@anthropic-ai/sdk/resources/models.mjs +0 -41
  444. package/node_modules/@anthropic-ai/sdk/resources/models.mjs.map +0 -1
  445. package/node_modules/@anthropic-ai/sdk/resources/shared.d.mts +0 -42
  446. package/node_modules/@anthropic-ai/sdk/resources/shared.d.mts.map +0 -1
  447. package/node_modules/@anthropic-ai/sdk/resources/shared.d.ts +0 -42
  448. package/node_modules/@anthropic-ai/sdk/resources/shared.d.ts.map +0 -1
  449. package/node_modules/@anthropic-ai/sdk/resources/shared.js +0 -4
  450. package/node_modules/@anthropic-ai/sdk/resources/shared.js.map +0 -1
  451. package/node_modules/@anthropic-ai/sdk/resources/shared.mjs +0 -3
  452. package/node_modules/@anthropic-ai/sdk/resources/shared.mjs.map +0 -1
  453. package/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts +0 -2
  454. package/node_modules/@anthropic-ai/sdk/resources/top-level.d.mts.map +0 -1
  455. package/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts +0 -2
  456. package/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts.map +0 -1
  457. package/node_modules/@anthropic-ai/sdk/resources/top-level.js +0 -4
  458. package/node_modules/@anthropic-ai/sdk/resources/top-level.js.map +0 -1
  459. package/node_modules/@anthropic-ai/sdk/resources/top-level.mjs +0 -3
  460. package/node_modules/@anthropic-ai/sdk/resources/top-level.mjs.map +0 -1
  461. package/node_modules/@anthropic-ai/sdk/resources.d.mts +0 -2
  462. package/node_modules/@anthropic-ai/sdk/resources.d.mts.map +0 -1
  463. package/node_modules/@anthropic-ai/sdk/resources.d.ts +0 -2
  464. package/node_modules/@anthropic-ai/sdk/resources.d.ts.map +0 -1
  465. package/node_modules/@anthropic-ai/sdk/resources.js +0 -5
  466. package/node_modules/@anthropic-ai/sdk/resources.js.map +0 -1
  467. package/node_modules/@anthropic-ai/sdk/resources.mjs +0 -2
  468. package/node_modules/@anthropic-ai/sdk/resources.mjs.map +0 -1
  469. package/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/README.md +0 -3
  470. package/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/parser.ts +0 -264
  471. package/node_modules/@anthropic-ai/sdk/src/api-promise.ts +0 -2
  472. package/node_modules/@anthropic-ai/sdk/src/client.ts +0 -1070
  473. package/node_modules/@anthropic-ai/sdk/src/core/README.md +0 -3
  474. package/node_modules/@anthropic-ai/sdk/src/core/api-promise.ts +0 -101
  475. package/node_modules/@anthropic-ai/sdk/src/core/error.ts +0 -133
  476. package/node_modules/@anthropic-ai/sdk/src/core/pagination.ts +0 -201
  477. package/node_modules/@anthropic-ai/sdk/src/core/resource.ts +0 -11
  478. package/node_modules/@anthropic-ai/sdk/src/core/streaming.ts +0 -331
  479. package/node_modules/@anthropic-ai/sdk/src/core/uploads.ts +0 -2
  480. package/node_modules/@anthropic-ai/sdk/src/error.ts +0 -2
  481. package/node_modules/@anthropic-ai/sdk/src/index.ts +0 -23
  482. package/node_modules/@anthropic-ai/sdk/src/internal/README.md +0 -3
  483. package/node_modules/@anthropic-ai/sdk/src/internal/builtin-types.ts +0 -93
  484. package/node_modules/@anthropic-ai/sdk/src/internal/constants.ts +0 -12
  485. package/node_modules/@anthropic-ai/sdk/src/internal/decoders/jsonl.ts +0 -48
  486. package/node_modules/@anthropic-ai/sdk/src/internal/decoders/line.ts +0 -135
  487. package/node_modules/@anthropic-ai/sdk/src/internal/detect-platform.ts +0 -196
  488. package/node_modules/@anthropic-ai/sdk/src/internal/errors.ts +0 -33
  489. package/node_modules/@anthropic-ai/sdk/src/internal/headers.ts +0 -99
  490. package/node_modules/@anthropic-ai/sdk/src/internal/parse.ts +0 -84
  491. package/node_modules/@anthropic-ai/sdk/src/internal/request-options.ts +0 -39
  492. package/node_modules/@anthropic-ai/sdk/src/internal/shim-types.d.ts +0 -28
  493. package/node_modules/@anthropic-ai/sdk/src/internal/shims.ts +0 -107
  494. package/node_modules/@anthropic-ai/sdk/src/internal/stream-utils.ts +0 -32
  495. package/node_modules/@anthropic-ai/sdk/src/internal/to-file.ts +0 -159
  496. package/node_modules/@anthropic-ai/sdk/src/internal/types.ts +0 -92
  497. package/node_modules/@anthropic-ai/sdk/src/internal/uploads.ts +0 -193
  498. package/node_modules/@anthropic-ai/sdk/src/internal/utils/base64.ts +0 -40
  499. package/node_modules/@anthropic-ai/sdk/src/internal/utils/bytes.ts +0 -32
  500. package/node_modules/@anthropic-ai/sdk/src/internal/utils/env.ts +0 -18
  501. package/node_modules/@anthropic-ai/sdk/src/internal/utils/log.ts +0 -127
  502. package/node_modules/@anthropic-ai/sdk/src/internal/utils/path.ts +0 -65
  503. package/node_modules/@anthropic-ai/sdk/src/internal/utils/sleep.ts +0 -3
  504. package/node_modules/@anthropic-ai/sdk/src/internal/utils/uuid.ts +0 -17
  505. package/node_modules/@anthropic-ai/sdk/src/internal/utils/values.ts +0 -102
  506. package/node_modules/@anthropic-ai/sdk/src/internal/utils.ts +0 -8
  507. package/node_modules/@anthropic-ai/sdk/src/lib/.keep +0 -4
  508. package/node_modules/@anthropic-ai/sdk/src/lib/BetaMessageStream.ts +0 -683
  509. package/node_modules/@anthropic-ai/sdk/src/lib/MessageStream.ts +0 -684
  510. package/node_modules/@anthropic-ai/sdk/src/pagination.ts +0 -2
  511. package/node_modules/@anthropic-ai/sdk/src/resource.ts +0 -2
  512. package/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts +0 -380
  513. package/node_modules/@anthropic-ai/sdk/src/resources/beta/files.ts +0 -258
  514. package/node_modules/@anthropic-ai/sdk/src/resources/beta/index.ts +0 -148
  515. package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/batches.ts +0 -502
  516. package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/index.ts +0 -135
  517. package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/messages.ts +0 -2249
  518. package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages.ts +0 -3
  519. package/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts +0 -118
  520. package/node_modules/@anthropic-ai/sdk/src/resources/beta.ts +0 -3
  521. package/node_modules/@anthropic-ai/sdk/src/resources/completions.ts +0 -231
  522. package/node_modules/@anthropic-ai/sdk/src/resources/index.ts +0 -121
  523. package/node_modules/@anthropic-ai/sdk/src/resources/messages/batches.ts +0 -396
  524. package/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts +0 -110
  525. package/node_modules/@anthropic-ai/sdk/src/resources/messages/messages.ts +0 -1783
  526. package/node_modules/@anthropic-ai/sdk/src/resources/messages.ts +0 -3
  527. package/node_modules/@anthropic-ai/sdk/src/resources/models.ts +0 -103
  528. package/node_modules/@anthropic-ai/sdk/src/resources/shared.ts +0 -72
  529. package/node_modules/@anthropic-ai/sdk/src/resources/top-level.ts +0 -3
  530. package/node_modules/@anthropic-ai/sdk/src/resources.ts +0 -1
  531. package/node_modules/@anthropic-ai/sdk/src/streaming.ts +0 -2
  532. package/node_modules/@anthropic-ai/sdk/src/tsconfig.json +0 -11
  533. package/node_modules/@anthropic-ai/sdk/src/uploads.ts +0 -2
  534. package/node_modules/@anthropic-ai/sdk/src/version.ts +0 -1
  535. package/node_modules/@anthropic-ai/sdk/streaming.d.mts +0 -2
  536. package/node_modules/@anthropic-ai/sdk/streaming.d.mts.map +0 -1
  537. package/node_modules/@anthropic-ai/sdk/streaming.d.ts +0 -2
  538. package/node_modules/@anthropic-ai/sdk/streaming.d.ts.map +0 -1
  539. package/node_modules/@anthropic-ai/sdk/streaming.js +0 -6
  540. package/node_modules/@anthropic-ai/sdk/streaming.js.map +0 -1
  541. package/node_modules/@anthropic-ai/sdk/streaming.mjs +0 -2
  542. package/node_modules/@anthropic-ai/sdk/streaming.mjs.map +0 -1
  543. package/node_modules/@anthropic-ai/sdk/uploads.d.mts +0 -2
  544. package/node_modules/@anthropic-ai/sdk/uploads.d.mts.map +0 -1
  545. package/node_modules/@anthropic-ai/sdk/uploads.d.ts +0 -2
  546. package/node_modules/@anthropic-ai/sdk/uploads.d.ts.map +0 -1
  547. package/node_modules/@anthropic-ai/sdk/uploads.js +0 -6
  548. package/node_modules/@anthropic-ai/sdk/uploads.js.map +0 -1
  549. package/node_modules/@anthropic-ai/sdk/uploads.mjs +0 -2
  550. package/node_modules/@anthropic-ai/sdk/uploads.mjs.map +0 -1
  551. package/node_modules/@anthropic-ai/sdk/version.d.mts +0 -2
  552. package/node_modules/@anthropic-ai/sdk/version.d.mts.map +0 -1
  553. package/node_modules/@anthropic-ai/sdk/version.d.ts +0 -2
  554. package/node_modules/@anthropic-ai/sdk/version.d.ts.map +0 -1
  555. package/node_modules/@anthropic-ai/sdk/version.js +0 -5
  556. package/node_modules/@anthropic-ai/sdk/version.js.map +0 -1
  557. package/node_modules/@anthropic-ai/sdk/version.mjs +0 -2
  558. package/node_modules/@anthropic-ai/sdk/version.mjs.map +0 -1
  559. package/node_modules/@dimivelev/chimera-agent-core/dist/agent-loop.d.ts +0 -24
  560. package/node_modules/@dimivelev/chimera-agent-core/dist/agent-loop.d.ts.map +0 -1
  561. package/node_modules/@dimivelev/chimera-agent-core/dist/agent-loop.js +0 -502
  562. package/node_modules/@dimivelev/chimera-agent-core/dist/agent-loop.js.map +0 -1
  563. package/node_modules/@dimivelev/chimera-agent-core/dist/agent.d.ts +0 -118
  564. package/node_modules/@dimivelev/chimera-agent-core/dist/agent.d.ts.map +0 -1
  565. package/node_modules/@dimivelev/chimera-agent-core/dist/agent.js +0 -402
  566. package/node_modules/@dimivelev/chimera-agent-core/dist/agent.js.map +0 -1
  567. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/agent-harness.d.ts +0 -95
  568. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/agent-harness.d.ts.map +0 -1
  569. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/agent-harness.js +0 -963
  570. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/agent-harness.js.map +0 -1
  571. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/branch-summarization.d.ts +0 -53
  572. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +0 -1
  573. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/branch-summarization.js +0 -175
  574. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/branch-summarization.js.map +0 -1
  575. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/compaction.d.ts +0 -95
  576. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/compaction.d.ts.map +0 -1
  577. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/compaction.js +0 -528
  578. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/compaction.js.map +0 -1
  579. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/utils.d.ts +0 -25
  580. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/utils.d.ts.map +0 -1
  581. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/utils.js +0 -131
  582. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/compaction/utils.js.map +0 -1
  583. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/env/nodejs.d.ts +0 -51
  584. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/env/nodejs.d.ts.map +0 -1
  585. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/env/nodejs.js +0 -486
  586. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/env/nodejs.js.map +0 -1
  587. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/messages.d.ts +0 -51
  588. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/messages.d.ts.map +0 -1
  589. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/messages.js +0 -102
  590. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/messages.js.map +0 -1
  591. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/prompt-templates.d.ts +0 -48
  592. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/prompt-templates.d.ts.map +0 -1
  593. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/prompt-templates.js +0 -230
  594. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/prompt-templates.js.map +0 -1
  595. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-repo.d.ts +0 -26
  596. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-repo.d.ts.map +0 -1
  597. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-repo.js +0 -101
  598. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-repo.js.map +0 -1
  599. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-storage.d.ts +0 -33
  600. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-storage.d.ts.map +0 -1
  601. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-storage.js +0 -231
  602. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/jsonl-storage.js.map +0 -1
  603. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-repo.d.ts +0 -18
  604. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-repo.d.ts.map +0 -1
  605. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-repo.js +0 -42
  606. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-repo.js.map +0 -1
  607. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-storage.d.ts +0 -25
  608. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-storage.d.ts.map +0 -1
  609. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-storage.js +0 -114
  610. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/memory-storage.js.map +0 -1
  611. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/repo-utils.d.ts +0 -11
  612. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/repo-utils.d.ts.map +0 -1
  613. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/repo-utils.js +0 -39
  614. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/repo-utils.js.map +0 -1
  615. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/session.d.ts +0 -33
  616. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/session.d.ts.map +0 -1
  617. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/session.js +0 -210
  618. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/session.js.map +0 -1
  619. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/uuid.d.ts +0 -2
  620. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/uuid.d.ts.map +0 -1
  621. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/uuid.js +0 -50
  622. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/session/uuid.js.map +0 -1
  623. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/skills.d.ts +0 -44
  624. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/skills.d.ts.map +0 -1
  625. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/skills.js +0 -311
  626. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/skills.js.map +0 -1
  627. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/system-prompt.d.ts +0 -3
  628. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/system-prompt.d.ts.map +0 -1
  629. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/system-prompt.js +0 -30
  630. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/system-prompt.js.map +0 -1
  631. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/types.d.ts +0 -615
  632. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/types.d.ts.map +0 -1
  633. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/types.js +0 -94
  634. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/types.js.map +0 -1
  635. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/shell-output.d.ts +0 -14
  636. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/shell-output.d.ts.map +0 -1
  637. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/shell-output.js +0 -126
  638. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/shell-output.js.map +0 -1
  639. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/truncate.d.ts +0 -70
  640. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/truncate.d.ts.map +0 -1
  641. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/truncate.js +0 -290
  642. package/node_modules/@dimivelev/chimera-agent-core/dist/harness/utils/truncate.js.map +0 -1
  643. package/node_modules/@dimivelev/chimera-agent-core/dist/index.d.ts +0 -20
  644. package/node_modules/@dimivelev/chimera-agent-core/dist/index.d.ts.map +0 -1
  645. package/node_modules/@dimivelev/chimera-agent-core/dist/index.js +0 -25
  646. package/node_modules/@dimivelev/chimera-agent-core/dist/index.js.map +0 -1
  647. package/node_modules/@dimivelev/chimera-agent-core/dist/node.d.ts +0 -3
  648. package/node_modules/@dimivelev/chimera-agent-core/dist/node.d.ts.map +0 -1
  649. package/node_modules/@dimivelev/chimera-agent-core/dist/node.js +0 -3
  650. package/node_modules/@dimivelev/chimera-agent-core/dist/node.js.map +0 -1
  651. package/node_modules/@dimivelev/chimera-agent-core/dist/proxy.d.ts +0 -69
  652. package/node_modules/@dimivelev/chimera-agent-core/dist/proxy.d.ts.map +0 -1
  653. package/node_modules/@dimivelev/chimera-agent-core/dist/proxy.js +0 -278
  654. package/node_modules/@dimivelev/chimera-agent-core/dist/proxy.js.map +0 -1
  655. package/node_modules/@dimivelev/chimera-agent-core/dist/types.d.ts +0 -393
  656. package/node_modules/@dimivelev/chimera-agent-core/dist/types.d.ts.map +0 -1
  657. package/node_modules/@dimivelev/chimera-agent-core/dist/types.js +0 -2
  658. package/node_modules/@dimivelev/chimera-agent-core/dist/types.js.map +0 -1
  659. package/node_modules/@dimivelev/chimera-agent-core/package.json +0 -60
  660. package/node_modules/@dimivelev/chimera-ai/dist/api-registry.d.ts +0 -20
  661. package/node_modules/@dimivelev/chimera-ai/dist/api-registry.d.ts.map +0 -1
  662. package/node_modules/@dimivelev/chimera-ai/dist/api-registry.js +0 -44
  663. package/node_modules/@dimivelev/chimera-ai/dist/api-registry.js.map +0 -1
  664. package/node_modules/@dimivelev/chimera-ai/dist/bedrock-provider.d.ts +0 -5
  665. package/node_modules/@dimivelev/chimera-ai/dist/bedrock-provider.d.ts.map +0 -1
  666. package/node_modules/@dimivelev/chimera-ai/dist/bedrock-provider.js +0 -6
  667. package/node_modules/@dimivelev/chimera-ai/dist/bedrock-provider.js.map +0 -1
  668. package/node_modules/@dimivelev/chimera-ai/dist/cli.d.ts +0 -3
  669. package/node_modules/@dimivelev/chimera-ai/dist/cli.d.ts.map +0 -1
  670. package/node_modules/@dimivelev/chimera-ai/dist/cli.js +0 -130
  671. package/node_modules/@dimivelev/chimera-ai/dist/cli.js.map +0 -1
  672. package/node_modules/@dimivelev/chimera-ai/dist/env-api-keys.d.ts +0 -18
  673. package/node_modules/@dimivelev/chimera-ai/dist/env-api-keys.d.ts.map +0 -1
  674. package/node_modules/@dimivelev/chimera-ai/dist/env-api-keys.js +0 -178
  675. package/node_modules/@dimivelev/chimera-ai/dist/env-api-keys.js.map +0 -1
  676. package/node_modules/@dimivelev/chimera-ai/dist/image-models.d.ts +0 -10
  677. package/node_modules/@dimivelev/chimera-ai/dist/image-models.d.ts.map +0 -1
  678. package/node_modules/@dimivelev/chimera-ai/dist/image-models.generated.d.ts +0 -4
  679. package/node_modules/@dimivelev/chimera-ai/dist/image-models.generated.d.ts.map +0 -1
  680. package/node_modules/@dimivelev/chimera-ai/dist/image-models.generated.js +0 -6
  681. package/node_modules/@dimivelev/chimera-ai/dist/image-models.generated.js.map +0 -1
  682. package/node_modules/@dimivelev/chimera-ai/dist/image-models.js +0 -23
  683. package/node_modules/@dimivelev/chimera-ai/dist/image-models.js.map +0 -1
  684. package/node_modules/@dimivelev/chimera-ai/dist/images-api-registry.d.ts +0 -14
  685. package/node_modules/@dimivelev/chimera-ai/dist/images-api-registry.d.ts.map +0 -1
  686. package/node_modules/@dimivelev/chimera-ai/dist/images-api-registry.js +0 -22
  687. package/node_modules/@dimivelev/chimera-ai/dist/images-api-registry.js.map +0 -1
  688. package/node_modules/@dimivelev/chimera-ai/dist/images.d.ts +0 -4
  689. package/node_modules/@dimivelev/chimera-ai/dist/images.d.ts.map +0 -1
  690. package/node_modules/@dimivelev/chimera-ai/dist/images.js +0 -14
  691. package/node_modules/@dimivelev/chimera-ai/dist/images.js.map +0 -1
  692. package/node_modules/@dimivelev/chimera-ai/dist/index.d.ts +0 -32
  693. package/node_modules/@dimivelev/chimera-ai/dist/index.d.ts.map +0 -1
  694. package/node_modules/@dimivelev/chimera-ai/dist/index.js +0 -20
  695. package/node_modules/@dimivelev/chimera-ai/dist/index.js.map +0 -1
  696. package/node_modules/@dimivelev/chimera-ai/dist/models.d.ts +0 -18
  697. package/node_modules/@dimivelev/chimera-ai/dist/models.d.ts.map +0 -1
  698. package/node_modules/@dimivelev/chimera-ai/dist/models.generated.d.ts +0 -14714
  699. package/node_modules/@dimivelev/chimera-ai/dist/models.generated.d.ts.map +0 -1
  700. package/node_modules/@dimivelev/chimera-ai/dist/models.generated.js +0 -13379
  701. package/node_modules/@dimivelev/chimera-ai/dist/models.generated.js.map +0 -1
  702. package/node_modules/@dimivelev/chimera-ai/dist/models.js +0 -71
  703. package/node_modules/@dimivelev/chimera-ai/dist/models.js.map +0 -1
  704. package/node_modules/@dimivelev/chimera-ai/dist/oauth.d.ts +0 -2
  705. package/node_modules/@dimivelev/chimera-ai/dist/oauth.d.ts.map +0 -1
  706. package/node_modules/@dimivelev/chimera-ai/dist/oauth.js +0 -2
  707. package/node_modules/@dimivelev/chimera-ai/dist/oauth.js.map +0 -1
  708. package/node_modules/@dimivelev/chimera-ai/dist/providers/amazon-bedrock.d.ts +0 -38
  709. package/node_modules/@dimivelev/chimera-ai/dist/providers/amazon-bedrock.d.ts.map +0 -1
  710. package/node_modules/@dimivelev/chimera-ai/dist/providers/amazon-bedrock.js +0 -826
  711. package/node_modules/@dimivelev/chimera-ai/dist/providers/amazon-bedrock.js.map +0 -1
  712. package/node_modules/@dimivelev/chimera-ai/dist/providers/anthropic.d.ts +0 -71
  713. package/node_modules/@dimivelev/chimera-ai/dist/providers/anthropic.d.ts.map +0 -1
  714. package/node_modules/@dimivelev/chimera-ai/dist/providers/anthropic.js +0 -959
  715. package/node_modules/@dimivelev/chimera-ai/dist/providers/anthropic.js.map +0 -1
  716. package/node_modules/@dimivelev/chimera-ai/dist/providers/azure-openai-responses.d.ts +0 -15
  717. package/node_modules/@dimivelev/chimera-ai/dist/providers/azure-openai-responses.d.ts.map +0 -1
  718. package/node_modules/@dimivelev/chimera-ai/dist/providers/azure-openai-responses.js +0 -221
  719. package/node_modules/@dimivelev/chimera-ai/dist/providers/azure-openai-responses.js.map +0 -1
  720. package/node_modules/@dimivelev/chimera-ai/dist/providers/cloudflare.d.ts +0 -13
  721. package/node_modules/@dimivelev/chimera-ai/dist/providers/cloudflare.d.ts.map +0 -1
  722. package/node_modules/@dimivelev/chimera-ai/dist/providers/cloudflare.js +0 -26
  723. package/node_modules/@dimivelev/chimera-ai/dist/providers/cloudflare.js.map +0 -1
  724. package/node_modules/@dimivelev/chimera-ai/dist/providers/faux.d.ts +0 -56
  725. package/node_modules/@dimivelev/chimera-ai/dist/providers/faux.d.ts.map +0 -1
  726. package/node_modules/@dimivelev/chimera-ai/dist/providers/faux.js +0 -368
  727. package/node_modules/@dimivelev/chimera-ai/dist/providers/faux.js.map +0 -1
  728. package/node_modules/@dimivelev/chimera-ai/dist/providers/github-copilot-headers.d.ts +0 -8
  729. package/node_modules/@dimivelev/chimera-ai/dist/providers/github-copilot-headers.d.ts.map +0 -1
  730. package/node_modules/@dimivelev/chimera-ai/dist/providers/github-copilot-headers.js +0 -29
  731. package/node_modules/@dimivelev/chimera-ai/dist/providers/github-copilot-headers.js.map +0 -1
  732. package/node_modules/@dimivelev/chimera-ai/dist/providers/google-shared.d.ts +0 -70
  733. package/node_modules/@dimivelev/chimera-ai/dist/providers/google-shared.d.ts.map +0 -1
  734. package/node_modules/@dimivelev/chimera-ai/dist/providers/google-shared.js +0 -329
  735. package/node_modules/@dimivelev/chimera-ai/dist/providers/google-shared.js.map +0 -1
  736. package/node_modules/@dimivelev/chimera-ai/dist/providers/google-vertex.d.ts +0 -15
  737. package/node_modules/@dimivelev/chimera-ai/dist/providers/google-vertex.d.ts.map +0 -1
  738. package/node_modules/@dimivelev/chimera-ai/dist/providers/google-vertex.js +0 -442
  739. package/node_modules/@dimivelev/chimera-ai/dist/providers/google-vertex.js.map +0 -1
  740. package/node_modules/@dimivelev/chimera-ai/dist/providers/google.d.ts +0 -13
  741. package/node_modules/@dimivelev/chimera-ai/dist/providers/google.d.ts.map +0 -1
  742. package/node_modules/@dimivelev/chimera-ai/dist/providers/google.js +0 -402
  743. package/node_modules/@dimivelev/chimera-ai/dist/providers/google.js.map +0 -1
  744. package/node_modules/@dimivelev/chimera-ai/dist/providers/images/openrouter.d.ts +0 -3
  745. package/node_modules/@dimivelev/chimera-ai/dist/providers/images/openrouter.d.ts.map +0 -1
  746. package/node_modules/@dimivelev/chimera-ai/dist/providers/images/openrouter.js +0 -128
  747. package/node_modules/@dimivelev/chimera-ai/dist/providers/images/openrouter.js.map +0 -1
  748. package/node_modules/@dimivelev/chimera-ai/dist/providers/images/register-builtins.d.ts +0 -4
  749. package/node_modules/@dimivelev/chimera-ai/dist/providers/images/register-builtins.d.ts.map +0 -1
  750. package/node_modules/@dimivelev/chimera-ai/dist/providers/images/register-builtins.js +0 -34
  751. package/node_modules/@dimivelev/chimera-ai/dist/providers/images/register-builtins.js.map +0 -1
  752. package/node_modules/@dimivelev/chimera-ai/dist/providers/mistral.d.ts +0 -25
  753. package/node_modules/@dimivelev/chimera-ai/dist/providers/mistral.d.ts.map +0 -1
  754. package/node_modules/@dimivelev/chimera-ai/dist/providers/mistral.js +0 -534
  755. package/node_modules/@dimivelev/chimera-ai/dist/providers/mistral.js.map +0 -1
  756. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-codex-responses.d.ts +0 -30
  757. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-codex-responses.d.ts.map +0 -1
  758. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-codex-responses.js +0 -1171
  759. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-codex-responses.js.map +0 -1
  760. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-completions.d.ts +0 -19
  761. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-completions.d.ts.map +0 -1
  762. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-completions.js +0 -956
  763. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-completions.js.map +0 -1
  764. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-prompt-cache.d.ts +0 -3
  765. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-prompt-cache.d.ts.map +0 -1
  766. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-prompt-cache.js +0 -10
  767. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-prompt-cache.js.map +0 -1
  768. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses-shared.d.ts +0 -18
  769. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses-shared.d.ts.map +0 -1
  770. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses-shared.js +0 -495
  771. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses-shared.js.map +0 -1
  772. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses.d.ts +0 -13
  773. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses.d.ts.map +0 -1
  774. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses.js +0 -233
  775. package/node_modules/@dimivelev/chimera-ai/dist/providers/openai-responses.js.map +0 -1
  776. package/node_modules/@dimivelev/chimera-ai/dist/providers/register-builtins.d.ts +0 -35
  777. package/node_modules/@dimivelev/chimera-ai/dist/providers/register-builtins.d.ts.map +0 -1
  778. package/node_modules/@dimivelev/chimera-ai/dist/providers/register-builtins.js +0 -254
  779. package/node_modules/@dimivelev/chimera-ai/dist/providers/register-builtins.js.map +0 -1
  780. package/node_modules/@dimivelev/chimera-ai/dist/providers/simple-options.d.ts +0 -8
  781. package/node_modules/@dimivelev/chimera-ai/dist/providers/simple-options.d.ts.map +0 -1
  782. package/node_modules/@dimivelev/chimera-ai/dist/providers/simple-options.js +0 -42
  783. package/node_modules/@dimivelev/chimera-ai/dist/providers/simple-options.js.map +0 -1
  784. package/node_modules/@dimivelev/chimera-ai/dist/providers/transform-messages.d.ts +0 -8
  785. package/node_modules/@dimivelev/chimera-ai/dist/providers/transform-messages.d.ts.map +0 -1
  786. package/node_modules/@dimivelev/chimera-ai/dist/providers/transform-messages.js +0 -184
  787. package/node_modules/@dimivelev/chimera-ai/dist/providers/transform-messages.js.map +0 -1
  788. package/node_modules/@dimivelev/chimera-ai/dist/session-resources.d.ts +0 -4
  789. package/node_modules/@dimivelev/chimera-ai/dist/session-resources.d.ts.map +0 -1
  790. package/node_modules/@dimivelev/chimera-ai/dist/session-resources.js +0 -22
  791. package/node_modules/@dimivelev/chimera-ai/dist/session-resources.js.map +0 -1
  792. package/node_modules/@dimivelev/chimera-ai/dist/stream.d.ts +0 -8
  793. package/node_modules/@dimivelev/chimera-ai/dist/stream.d.ts.map +0 -1
  794. package/node_modules/@dimivelev/chimera-ai/dist/stream.js +0 -39
  795. package/node_modules/@dimivelev/chimera-ai/dist/stream.js.map +0 -1
  796. package/node_modules/@dimivelev/chimera-ai/dist/types.d.ts +0 -514
  797. package/node_modules/@dimivelev/chimera-ai/dist/types.d.ts.map +0 -1
  798. package/node_modules/@dimivelev/chimera-ai/dist/types.js +0 -2
  799. package/node_modules/@dimivelev/chimera-ai/dist/types.js.map +0 -1
  800. package/node_modules/@dimivelev/chimera-ai/dist/utils/abort-signals.d.ts +0 -6
  801. package/node_modules/@dimivelev/chimera-ai/dist/utils/abort-signals.d.ts.map +0 -1
  802. package/node_modules/@dimivelev/chimera-ai/dist/utils/abort-signals.js +0 -34
  803. package/node_modules/@dimivelev/chimera-ai/dist/utils/abort-signals.js.map +0 -1
  804. package/node_modules/@dimivelev/chimera-ai/dist/utils/diagnostics.d.ts +0 -19
  805. package/node_modules/@dimivelev/chimera-ai/dist/utils/diagnostics.d.ts.map +0 -1
  806. package/node_modules/@dimivelev/chimera-ai/dist/utils/diagnostics.js +0 -25
  807. package/node_modules/@dimivelev/chimera-ai/dist/utils/diagnostics.js.map +0 -1
  808. package/node_modules/@dimivelev/chimera-ai/dist/utils/event-stream.d.ts +0 -21
  809. package/node_modules/@dimivelev/chimera-ai/dist/utils/event-stream.d.ts.map +0 -1
  810. package/node_modules/@dimivelev/chimera-ai/dist/utils/event-stream.js +0 -81
  811. package/node_modules/@dimivelev/chimera-ai/dist/utils/event-stream.js.map +0 -1
  812. package/node_modules/@dimivelev/chimera-ai/dist/utils/hash.d.ts +0 -3
  813. package/node_modules/@dimivelev/chimera-ai/dist/utils/hash.d.ts.map +0 -1
  814. package/node_modules/@dimivelev/chimera-ai/dist/utils/hash.js +0 -14
  815. package/node_modules/@dimivelev/chimera-ai/dist/utils/hash.js.map +0 -1
  816. package/node_modules/@dimivelev/chimera-ai/dist/utils/headers.d.ts +0 -2
  817. package/node_modules/@dimivelev/chimera-ai/dist/utils/headers.d.ts.map +0 -1
  818. package/node_modules/@dimivelev/chimera-ai/dist/utils/headers.js +0 -8
  819. package/node_modules/@dimivelev/chimera-ai/dist/utils/headers.js.map +0 -1
  820. package/node_modules/@dimivelev/chimera-ai/dist/utils/json-parse.d.ts +0 -16
  821. package/node_modules/@dimivelev/chimera-ai/dist/utils/json-parse.d.ts.map +0 -1
  822. package/node_modules/@dimivelev/chimera-ai/dist/utils/json-parse.js +0 -113
  823. package/node_modules/@dimivelev/chimera-ai/dist/utils/json-parse.js.map +0 -1
  824. package/node_modules/@dimivelev/chimera-ai/dist/utils/node-http-proxy.d.ts +0 -10
  825. package/node_modules/@dimivelev/chimera-ai/dist/utils/node-http-proxy.d.ts.map +0 -1
  826. package/node_modules/@dimivelev/chimera-ai/dist/utils/node-http-proxy.js +0 -97
  827. package/node_modules/@dimivelev/chimera-ai/dist/utils/node-http-proxy.js.map +0 -1
  828. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/anthropic.d.ts +0 -25
  829. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/anthropic.d.ts.map +0 -1
  830. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/anthropic.js +0 -335
  831. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/anthropic.js.map +0 -1
  832. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/device-code.d.ts +0 -21
  833. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/device-code.d.ts.map +0 -1
  834. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/device-code.js +0 -56
  835. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/device-code.js.map +0 -1
  836. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/github-copilot.d.ts +0 -30
  837. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/github-copilot.d.ts.map +0 -1
  838. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/github-copilot.js +0 -268
  839. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/github-copilot.js.map +0 -1
  840. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/index.d.ts +0 -58
  841. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/index.d.ts.map +0 -1
  842. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/index.js +0 -122
  843. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/index.js.map +0 -1
  844. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/oauth-page.d.ts +0 -3
  845. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/oauth-page.d.ts.map +0 -1
  846. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/oauth-page.js +0 -105
  847. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/oauth-page.js.map +0 -1
  848. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/openai-codex.d.ts +0 -43
  849. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/openai-codex.d.ts.map +0 -1
  850. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/openai-codex.js +0 -485
  851. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/openai-codex.js.map +0 -1
  852. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/pkce.d.ts +0 -13
  853. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/pkce.d.ts.map +0 -1
  854. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/pkce.js +0 -31
  855. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/pkce.js.map +0 -1
  856. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/types.d.ts +0 -64
  857. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/types.d.ts.map +0 -1
  858. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/types.js +0 -2
  859. package/node_modules/@dimivelev/chimera-ai/dist/utils/oauth/types.js.map +0 -1
  860. package/node_modules/@dimivelev/chimera-ai/dist/utils/overflow.d.ts +0 -57
  861. package/node_modules/@dimivelev/chimera-ai/dist/utils/overflow.d.ts.map +0 -1
  862. package/node_modules/@dimivelev/chimera-ai/dist/utils/overflow.js +0 -154
  863. package/node_modules/@dimivelev/chimera-ai/dist/utils/overflow.js.map +0 -1
  864. package/node_modules/@dimivelev/chimera-ai/dist/utils/sanitize-unicode.d.ts +0 -22
  865. package/node_modules/@dimivelev/chimera-ai/dist/utils/sanitize-unicode.d.ts.map +0 -1
  866. package/node_modules/@dimivelev/chimera-ai/dist/utils/sanitize-unicode.js +0 -26
  867. package/node_modules/@dimivelev/chimera-ai/dist/utils/sanitize-unicode.js.map +0 -1
  868. package/node_modules/@dimivelev/chimera-ai/dist/utils/typebox-helpers.d.ts +0 -17
  869. package/node_modules/@dimivelev/chimera-ai/dist/utils/typebox-helpers.d.ts.map +0 -1
  870. package/node_modules/@dimivelev/chimera-ai/dist/utils/typebox-helpers.js +0 -21
  871. package/node_modules/@dimivelev/chimera-ai/dist/utils/typebox-helpers.js.map +0 -1
  872. package/node_modules/@dimivelev/chimera-ai/dist/utils/validation.d.ts +0 -18
  873. package/node_modules/@dimivelev/chimera-ai/dist/utils/validation.d.ts.map +0 -1
  874. package/node_modules/@dimivelev/chimera-ai/dist/utils/validation.js +0 -281
  875. package/node_modules/@dimivelev/chimera-ai/dist/utils/validation.js.map +0 -1
  876. package/node_modules/@dimivelev/chimera-ai/package.json +0 -106
  877. package/node_modules/@dimivelev/chimera-tui/dist/autocomplete.d.ts +0 -54
  878. package/node_modules/@dimivelev/chimera-tui/dist/autocomplete.d.ts.map +0 -1
  879. package/node_modules/@dimivelev/chimera-tui/dist/autocomplete.js +0 -632
  880. package/node_modules/@dimivelev/chimera-tui/dist/autocomplete.js.map +0 -1
  881. package/node_modules/@dimivelev/chimera-tui/dist/components/box.d.ts +0 -22
  882. package/node_modules/@dimivelev/chimera-tui/dist/components/box.d.ts.map +0 -1
  883. package/node_modules/@dimivelev/chimera-tui/dist/components/box.js +0 -104
  884. package/node_modules/@dimivelev/chimera-tui/dist/components/box.js.map +0 -1
  885. package/node_modules/@dimivelev/chimera-tui/dist/components/cancellable-loader.d.ts +0 -22
  886. package/node_modules/@dimivelev/chimera-tui/dist/components/cancellable-loader.d.ts.map +0 -1
  887. package/node_modules/@dimivelev/chimera-tui/dist/components/cancellable-loader.js +0 -35
  888. package/node_modules/@dimivelev/chimera-tui/dist/components/cancellable-loader.js.map +0 -1
  889. package/node_modules/@dimivelev/chimera-tui/dist/components/editor.d.ts +0 -249
  890. package/node_modules/@dimivelev/chimera-tui/dist/components/editor.d.ts.map +0 -1
  891. package/node_modules/@dimivelev/chimera-tui/dist/components/editor.js +0 -1857
  892. package/node_modules/@dimivelev/chimera-tui/dist/components/editor.js.map +0 -1
  893. package/node_modules/@dimivelev/chimera-tui/dist/components/image.d.ts +0 -28
  894. package/node_modules/@dimivelev/chimera-tui/dist/components/image.d.ts.map +0 -1
  895. package/node_modules/@dimivelev/chimera-tui/dist/components/image.js +0 -89
  896. package/node_modules/@dimivelev/chimera-tui/dist/components/image.js.map +0 -1
  897. package/node_modules/@dimivelev/chimera-tui/dist/components/input.d.ts +0 -37
  898. package/node_modules/@dimivelev/chimera-tui/dist/components/input.d.ts.map +0 -1
  899. package/node_modules/@dimivelev/chimera-tui/dist/components/input.js +0 -378
  900. package/node_modules/@dimivelev/chimera-tui/dist/components/input.js.map +0 -1
  901. package/node_modules/@dimivelev/chimera-tui/dist/components/loader.d.ts +0 -31
  902. package/node_modules/@dimivelev/chimera-tui/dist/components/loader.d.ts.map +0 -1
  903. package/node_modules/@dimivelev/chimera-tui/dist/components/loader.js +0 -69
  904. package/node_modules/@dimivelev/chimera-tui/dist/components/loader.js.map +0 -1
  905. package/node_modules/@dimivelev/chimera-tui/dist/components/markdown.d.ts +0 -96
  906. package/node_modules/@dimivelev/chimera-tui/dist/components/markdown.d.ts.map +0 -1
  907. package/node_modules/@dimivelev/chimera-tui/dist/components/markdown.js +0 -644
  908. package/node_modules/@dimivelev/chimera-tui/dist/components/markdown.js.map +0 -1
  909. package/node_modules/@dimivelev/chimera-tui/dist/components/select-list.d.ts +0 -50
  910. package/node_modules/@dimivelev/chimera-tui/dist/components/select-list.d.ts.map +0 -1
  911. package/node_modules/@dimivelev/chimera-tui/dist/components/select-list.js +0 -159
  912. package/node_modules/@dimivelev/chimera-tui/dist/components/select-list.js.map +0 -1
  913. package/node_modules/@dimivelev/chimera-tui/dist/components/settings-list.d.ts +0 -50
  914. package/node_modules/@dimivelev/chimera-tui/dist/components/settings-list.d.ts.map +0 -1
  915. package/node_modules/@dimivelev/chimera-tui/dist/components/settings-list.js +0 -185
  916. package/node_modules/@dimivelev/chimera-tui/dist/components/settings-list.js.map +0 -1
  917. package/node_modules/@dimivelev/chimera-tui/dist/components/spacer.d.ts +0 -12
  918. package/node_modules/@dimivelev/chimera-tui/dist/components/spacer.d.ts.map +0 -1
  919. package/node_modules/@dimivelev/chimera-tui/dist/components/spacer.js +0 -23
  920. package/node_modules/@dimivelev/chimera-tui/dist/components/spacer.js.map +0 -1
  921. package/node_modules/@dimivelev/chimera-tui/dist/components/text.d.ts +0 -19
  922. package/node_modules/@dimivelev/chimera-tui/dist/components/text.d.ts.map +0 -1
  923. package/node_modules/@dimivelev/chimera-tui/dist/components/text.js +0 -89
  924. package/node_modules/@dimivelev/chimera-tui/dist/components/text.js.map +0 -1
  925. package/node_modules/@dimivelev/chimera-tui/dist/components/truncated-text.d.ts +0 -13
  926. package/node_modules/@dimivelev/chimera-tui/dist/components/truncated-text.d.ts.map +0 -1
  927. package/node_modules/@dimivelev/chimera-tui/dist/components/truncated-text.js +0 -51
  928. package/node_modules/@dimivelev/chimera-tui/dist/components/truncated-text.js.map +0 -1
  929. package/node_modules/@dimivelev/chimera-tui/dist/editor-component.d.ts +0 -39
  930. package/node_modules/@dimivelev/chimera-tui/dist/editor-component.d.ts.map +0 -1
  931. package/node_modules/@dimivelev/chimera-tui/dist/editor-component.js +0 -2
  932. package/node_modules/@dimivelev/chimera-tui/dist/editor-component.js.map +0 -1
  933. package/node_modules/@dimivelev/chimera-tui/dist/fuzzy.d.ts +0 -16
  934. package/node_modules/@dimivelev/chimera-tui/dist/fuzzy.d.ts.map +0 -1
  935. package/node_modules/@dimivelev/chimera-tui/dist/fuzzy.js +0 -110
  936. package/node_modules/@dimivelev/chimera-tui/dist/fuzzy.js.map +0 -1
  937. package/node_modules/@dimivelev/chimera-tui/dist/index.d.ts +0 -23
  938. package/node_modules/@dimivelev/chimera-tui/dist/index.d.ts.map +0 -1
  939. package/node_modules/@dimivelev/chimera-tui/dist/index.js +0 -32
  940. package/node_modules/@dimivelev/chimera-tui/dist/index.js.map +0 -1
  941. package/node_modules/@dimivelev/chimera-tui/dist/keybindings.d.ts +0 -193
  942. package/node_modules/@dimivelev/chimera-tui/dist/keybindings.d.ts.map +0 -1
  943. package/node_modules/@dimivelev/chimera-tui/dist/keybindings.js +0 -174
  944. package/node_modules/@dimivelev/chimera-tui/dist/keybindings.js.map +0 -1
  945. package/node_modules/@dimivelev/chimera-tui/dist/keys.d.ts +0 -184
  946. package/node_modules/@dimivelev/chimera-tui/dist/keys.d.ts.map +0 -1
  947. package/node_modules/@dimivelev/chimera-tui/dist/keys.js +0 -1173
  948. package/node_modules/@dimivelev/chimera-tui/dist/keys.js.map +0 -1
  949. package/node_modules/@dimivelev/chimera-tui/dist/kill-ring.d.ts +0 -28
  950. package/node_modules/@dimivelev/chimera-tui/dist/kill-ring.d.ts.map +0 -1
  951. package/node_modules/@dimivelev/chimera-tui/dist/kill-ring.js +0 -44
  952. package/node_modules/@dimivelev/chimera-tui/dist/kill-ring.js.map +0 -1
  953. package/node_modules/@dimivelev/chimera-tui/dist/native-modifiers.d.ts +0 -3
  954. package/node_modules/@dimivelev/chimera-tui/dist/native-modifiers.d.ts.map +0 -1
  955. package/node_modules/@dimivelev/chimera-tui/dist/native-modifiers.js +0 -53
  956. package/node_modules/@dimivelev/chimera-tui/dist/native-modifiers.js.map +0 -1
  957. package/node_modules/@dimivelev/chimera-tui/dist/stdin-buffer.d.ts +0 -50
  958. package/node_modules/@dimivelev/chimera-tui/dist/stdin-buffer.d.ts.map +0 -1
  959. package/node_modules/@dimivelev/chimera-tui/dist/stdin-buffer.js +0 -361
  960. package/node_modules/@dimivelev/chimera-tui/dist/stdin-buffer.js.map +0 -1
  961. package/node_modules/@dimivelev/chimera-tui/dist/terminal-image.d.ts +0 -90
  962. package/node_modules/@dimivelev/chimera-tui/dist/terminal-image.d.ts.map +0 -1
  963. package/node_modules/@dimivelev/chimera-tui/dist/terminal-image.js +0 -366
  964. package/node_modules/@dimivelev/chimera-tui/dist/terminal-image.js.map +0 -1
  965. package/node_modules/@dimivelev/chimera-tui/dist/terminal.d.ts +0 -113
  966. package/node_modules/@dimivelev/chimera-tui/dist/terminal.d.ts.map +0 -1
  967. package/node_modules/@dimivelev/chimera-tui/dist/terminal.js +0 -472
  968. package/node_modules/@dimivelev/chimera-tui/dist/terminal.js.map +0 -1
  969. package/node_modules/@dimivelev/chimera-tui/dist/tui.d.ts +0 -242
  970. package/node_modules/@dimivelev/chimera-tui/dist/tui.d.ts.map +0 -1
  971. package/node_modules/@dimivelev/chimera-tui/dist/tui.js +0 -1221
  972. package/node_modules/@dimivelev/chimera-tui/dist/tui.js.map +0 -1
  973. package/node_modules/@dimivelev/chimera-tui/dist/undo-stack.d.ts +0 -17
  974. package/node_modules/@dimivelev/chimera-tui/dist/undo-stack.d.ts.map +0 -1
  975. package/node_modules/@dimivelev/chimera-tui/dist/undo-stack.js +0 -25
  976. package/node_modules/@dimivelev/chimera-tui/dist/undo-stack.js.map +0 -1
  977. package/node_modules/@dimivelev/chimera-tui/dist/utils.d.ts +0 -84
  978. package/node_modules/@dimivelev/chimera-tui/dist/utils.d.ts.map +0 -1
  979. package/node_modules/@dimivelev/chimera-tui/dist/utils.js +0 -1029
  980. package/node_modules/@dimivelev/chimera-tui/dist/utils.js.map +0 -1
  981. package/node_modules/@dimivelev/chimera-tui/dist/word-navigation.d.ts +0 -25
  982. package/node_modules/@dimivelev/chimera-tui/dist/word-navigation.d.ts.map +0 -1
  983. package/node_modules/@dimivelev/chimera-tui/dist/word-navigation.js +0 -96
  984. package/node_modules/@dimivelev/chimera-tui/dist/word-navigation.js.map +0 -1
  985. package/node_modules/@dimivelev/chimera-tui/package.json +0 -47
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown.js","sourceRoot":"","sources":["../../src/components/markdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,SAAS,EAAe,MAAM,QAAQ,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAE/E,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpF,MAAM,0BAA0B,GAAG,8DAA8D,CAAC;AAElG,MAAM,4BAA6B,SAAQ,SAAS;IAC1C,GAAG,CAAC,GAAW,EAA0B;QACjD,MAAM,KAAK,GAAG,0BAA0B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnD,IAAI,CAAC,KAAK,EAAE,CAAC;YACZ,OAAO,SAAS,CAAC;QAClB,CAAC;QAED,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,OAAO;YACN,IAAI,EAAE,KAAK;YACX,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;YACb,IAAI;YACJ,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,C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AAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YAEpE,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,YAAY,EAAE,OAAO,EAAE,EAAE,CAAC;gBACzD,MAAM,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;oBACxD,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;oBACtC,OAAO,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAAA,CACjF,CAAC,CAAC;gBACH,KAAK,CAAC,IAAI,CAAC,OAAK,QAAQ,CAAC,IAAI,CAAC,OAAK,CAAC,MAAI,CAAC,CAAC;YAC3C,CAAC;YAED,IAAI,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACtC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC3B,CAAC;QACF,CAAC;QAED,uBAAuB;QACvB,MAAM,iBAAiB,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACjE,KAAK,CAAC,IAAI,CAAC,SAAK,iBAAiB,CAAC,IAAI,CAAC,WAAK,CAAC,QAAI,CAAC,CAAC;QAEnD,IAAI,aAAa,IAAI,aAAa,KAAK,OAAO,EAAE,CAAC;YAChD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,0BAA0B;QAC3C,CAAC;QACD,OAAO,KAAK,CAAC;IAAA,CACb;CACD","sourcesContent":["import { Marked, type Token, Tokenizer, type Tokens } from \"marked\";\nimport { getCapabilities, hyperlink, isImageLine } from \"../terminal-image.ts\";\nimport type { Component } from \"../tui.ts\";\nimport { applyBackgroundToLine, visibleWidth, wrapTextWithAnsi } from \"../utils.ts\";\n\nconst STRICT_STRIKETHROUGH_REGEX = /^(~~)(?=[^\\s~])((?:\\\\.|[^\\\\])*?(?:\\\\.|[^\\s~\\\\]))\\1(?=[^~]|$)/;\n\nclass StrictStrikethroughTokenizer extends Tokenizer {\n\toverride del(src: string): Tokens.Del | undefined {\n\t\tconst match = STRICT_STRIKETHROUGH_REGEX.exec(src);\n\t\tif (!match) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst text = match[2];\n\t\treturn {\n\t\t\ttype: \"del\",\n\t\t\traw: match[0],\n\t\t\ttext,\n\t\t\ttokens: this.lexer.inlineTokens(text),\n\t\t};\n\t}\n}\n\nconst markdownParser = new Marked();\nmarkdownParser.setOptions({\n\ttokenizer: new StrictStrikethroughTokenizer(),\n});\n\n/**\n * Default text styling for markdown content.\n * Applied to all text unless overridden by markdown formatting.\n */\nexport interface DefaultTextStyle {\n\t/** Foreground color function */\n\tcolor?: (text: string) => string;\n\t/** Background color function */\n\tbgColor?: (text: string) => string;\n\t/** Bold text */\n\tbold?: boolean;\n\t/** Italic text */\n\titalic?: boolean;\n\t/** Strikethrough text */\n\tstrikethrough?: boolean;\n\t/** Underline text */\n\tunderline?: boolean;\n}\n\n/**\n * Theme functions for markdown elements.\n * Each function takes text and returns styled text with ANSI codes.\n */\nexport interface MarkdownTheme {\n\theading: (text: string) => string;\n\tlink: (text: string) => string;\n\tlinkUrl: (text: string) => string;\n\tcode: (text: string) => string;\n\tcodeBlock: (text: string) => string;\n\tcodeBlockBorder: (text: string) => string;\n\tquote: (text: string) => string;\n\tquoteBorder: (text: string) => string;\n\thr: (text: string) => string;\n\tlistBullet: (text: string) => string;\n\tbold: (text: string) => string;\n\titalic: (text: string) => string;\n\tstrikethrough: (text: string) => string;\n\tunderline: (text: string) => string;\n\thighlightCode?: (code: string, lang?: string) => string[];\n\t/** Prefix applied to each rendered code block line (default: \" \") */\n\tcodeBlockIndent?: string;\n}\n\nexport interface MarkdownOptions {\n\t/** Preserve source ordered-list markers instead of normalizing them from the list start. */\n\tpreserveOrderedListMarkers?: boolean;\n}\n\ninterface InlineStyleContext {\n\tapplyText: (text: string) => string;\n\tstylePrefix: string;\n}\n\nexport class Markdown implements Component {\n\tprivate text: string;\n\tprivate paddingX: number; // Left/right padding\n\tprivate paddingY: number; // Top/bottom padding\n\tprivate defaultTextStyle?: DefaultTextStyle;\n\tprivate theme: MarkdownTheme;\n\tprivate options: MarkdownOptions;\n\tprivate defaultStylePrefix?: string;\n\n\t// Cache for rendered output\n\tprivate cachedText?: string;\n\tprivate cachedWidth?: number;\n\tprivate cachedLines?: string[];\n\n\tconstructor(\n\t\ttext: string,\n\t\tpaddingX: number,\n\t\tpaddingY: number,\n\t\ttheme: MarkdownTheme,\n\t\tdefaultTextStyle?: DefaultTextStyle,\n\t\toptions?: MarkdownOptions,\n\t) {\n\t\tthis.text = text;\n\t\tthis.paddingX = paddingX;\n\t\tthis.paddingY = paddingY;\n\t\tthis.theme = theme;\n\t\tthis.defaultTextStyle = defaultTextStyle;\n\t\tthis.options = options ? { ...options } : {};\n\t}\n\n\tsetText(text: string): void {\n\t\tthis.text = text;\n\t\tthis.invalidate();\n\t}\n\n\tinvalidate(): void {\n\t\tthis.cachedText = undefined;\n\t\tthis.cachedWidth = undefined;\n\t\tthis.cachedLines = undefined;\n\t}\n\n\trender(width: number): string[] {\n\t\t// Check cache\n\t\tif (this.cachedLines && this.cachedText === this.text && this.cachedWidth === width) {\n\t\t\treturn this.cachedLines;\n\t\t}\n\n\t\t// Calculate available width for content (subtract horizontal padding)\n\t\tconst contentWidth = Math.max(1, width - this.paddingX * 2);\n\n\t\t// Don't render anything if there's no actual text\n\t\tif (!this.text || this.text.trim() === \"\") {\n\t\t\tconst result: string[] = [];\n\t\t\t// Update cache\n\t\t\tthis.cachedText = this.text;\n\t\t\tthis.cachedWidth = width;\n\t\t\tthis.cachedLines = result;\n\t\t\treturn result;\n\t\t}\n\n\t\t// Replace tabs with 3 spaces for consistent rendering\n\t\tconst normalizedText = this.text.replace(/\\t/g, \" \");\n\n\t\t// Parse markdown to HTML-like tokens\n\t\tconst tokens = markdownParser.lexer(normalizedText);\n\n\t\t// Convert tokens to styled terminal output\n\t\tconst renderedLines: string[] = [];\n\n\t\tfor (let i = 0; i < tokens.length; i++) {\n\t\t\tconst token = tokens[i];\n\t\t\tconst nextToken = tokens[i + 1];\n\t\t\tconst tokenLines = this.renderToken(token, contentWidth, nextToken?.type);\n\t\t\tfor (const tokenLine of tokenLines) {\n\t\t\t\trenderedLines.push(tokenLine);\n\t\t\t}\n\t\t}\n\n\t\t// Wrap lines (NO padding, NO background yet)\n\t\tconst wrappedLines: string[] = [];\n\t\tfor (const line of renderedLines) {\n\t\t\tif (isImageLine(line)) {\n\t\t\t\twrappedLines.push(line);\n\t\t\t} else {\n\t\t\t\tfor (const wrappedLine of wrapTextWithAnsi(line, contentWidth)) {\n\t\t\t\t\twrappedLines.push(wrappedLine);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add margins and background to each wrapped line\n\t\tconst leftMargin = \" \".repeat(this.paddingX);\n\t\tconst rightMargin = \" \".repeat(this.paddingX);\n\t\tconst bgFn = this.defaultTextStyle?.bgColor;\n\t\tconst contentLines: string[] = [];\n\n\t\tfor (const line of wrappedLines) {\n\t\t\tif (isImageLine(line)) {\n\t\t\t\tcontentLines.push(line);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst lineWithMargins = leftMargin + line + rightMargin;\n\n\t\t\tif (bgFn) {\n\t\t\t\tcontentLines.push(applyBackgroundToLine(lineWithMargins, width, bgFn));\n\t\t\t} else {\n\t\t\t\t// No background - just pad to width\n\t\t\t\tconst visibleLen = visibleWidth(lineWithMargins);\n\t\t\t\tconst paddingNeeded = Math.max(0, width - visibleLen);\n\t\t\t\tcontentLines.push(lineWithMargins + \" \".repeat(paddingNeeded));\n\t\t\t}\n\t\t}\n\n\t\t// Add top/bottom padding (empty lines)\n\t\tconst emptyLine = \" \".repeat(width);\n\t\tconst emptyLines: string[] = [];\n\t\tfor (let i = 0; i < this.paddingY; i++) {\n\t\t\tconst line = bgFn ? applyBackgroundToLine(emptyLine, width, bgFn) : emptyLine;\n\t\t\temptyLines.push(line);\n\t\t}\n\n\t\t// Combine top padding, content, and bottom padding\n\t\tconst result = emptyLines.concat(contentLines, emptyLines);\n\n\t\t// Update cache\n\t\tthis.cachedText = this.text;\n\t\tthis.cachedWidth = width;\n\t\tthis.cachedLines = result;\n\n\t\treturn result.length > 0 ? result : [\"\"];\n\t}\n\n\t/**\n\t * Apply default text style to a string.\n\t * This is the base styling applied to all text content.\n\t * NOTE: Background color is NOT applied here - it's applied at the padding stage\n\t * to ensure it extends to the full line width.\n\t */\n\tprivate applyDefaultStyle(text: string): string {\n\t\tif (!this.defaultTextStyle) {\n\t\t\treturn text;\n\t\t}\n\n\t\tlet styled = text;\n\n\t\t// Apply foreground color (NOT background - that's applied at padding stage)\n\t\tif (this.defaultTextStyle.color) {\n\t\t\tstyled = this.defaultTextStyle.color(styled);\n\t\t}\n\n\t\t// Apply text decorations using this.theme\n\t\tif (this.defaultTextStyle.bold) {\n\t\t\tstyled = this.theme.bold(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.italic) {\n\t\t\tstyled = this.theme.italic(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.strikethrough) {\n\t\t\tstyled = this.theme.strikethrough(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.underline) {\n\t\t\tstyled = this.theme.underline(styled);\n\t\t}\n\n\t\treturn styled;\n\t}\n\n\tprivate getDefaultStylePrefix(): string {\n\t\tif (!this.defaultTextStyle) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tif (this.defaultStylePrefix !== undefined) {\n\t\t\treturn this.defaultStylePrefix;\n\t\t}\n\n\t\tconst sentinel = \"\\u0000\";\n\t\tlet styled = sentinel;\n\n\t\tif (this.defaultTextStyle.color) {\n\t\t\tstyled = this.defaultTextStyle.color(styled);\n\t\t}\n\n\t\tif (this.defaultTextStyle.bold) {\n\t\t\tstyled = this.theme.bold(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.italic) {\n\t\t\tstyled = this.theme.italic(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.strikethrough) {\n\t\t\tstyled = this.theme.strikethrough(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.underline) {\n\t\t\tstyled = this.theme.underline(styled);\n\t\t}\n\n\t\tconst sentinelIndex = styled.indexOf(sentinel);\n\t\tthis.defaultStylePrefix = sentinelIndex >= 0 ? styled.slice(0, sentinelIndex) : \"\";\n\t\treturn this.defaultStylePrefix;\n\t}\n\n\tprivate getStylePrefix(styleFn: (text: string) => string): string {\n\t\tconst sentinel = \"\\u0000\";\n\t\tconst styled = styleFn(sentinel);\n\t\tconst sentinelIndex = styled.indexOf(sentinel);\n\t\treturn sentinelIndex >= 0 ? styled.slice(0, sentinelIndex) : \"\";\n\t}\n\n\tprivate getDefaultInlineStyleContext(): InlineStyleContext {\n\t\treturn {\n\t\t\tapplyText: (text: string) => this.applyDefaultStyle(text),\n\t\t\tstylePrefix: this.getDefaultStylePrefix(),\n\t\t};\n\t}\n\n\tprivate renderToken(\n\t\ttoken: Token,\n\t\twidth: number,\n\t\tnextTokenType?: string,\n\t\tstyleContext?: InlineStyleContext,\n\t): string[] {\n\t\tconst lines: string[] = [];\n\n\t\tswitch (token.type) {\n\t\t\tcase \"heading\": {\n\t\t\t\tconst headingLevel = token.depth;\n\t\t\t\tconst headingPrefix = `${\"#\".repeat(headingLevel)} `;\n\n\t\t\t\t// Build a heading-specific style context so inline tokens (codespan, bold, etc.)\n\t\t\t\t// restore heading styling after their own ANSI resets instead of falling back to\n\t\t\t\t// the default text style.\n\t\t\t\tlet headingStyleFn: (text: string) => string;\n\t\t\t\tif (headingLevel === 1) {\n\t\t\t\t\theadingStyleFn = (text: string) => this.theme.heading(this.theme.bold(this.theme.underline(text)));\n\t\t\t\t} else {\n\t\t\t\t\theadingStyleFn = (text: string) => this.theme.heading(this.theme.bold(text));\n\t\t\t\t}\n\n\t\t\t\tconst headingStyleContext: InlineStyleContext = {\n\t\t\t\t\tapplyText: headingStyleFn,\n\t\t\t\t\tstylePrefix: this.getStylePrefix(headingStyleFn),\n\t\t\t\t};\n\n\t\t\t\tconst headingText = this.renderInlineTokens(token.tokens || [], headingStyleContext);\n\t\t\t\tconst styledHeading = headingLevel >= 3 ? headingStyleFn(headingPrefix) + headingText : headingText;\n\t\t\t\tlines.push(styledHeading);\n\t\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\"); // Add spacing after headings (unless space token follows)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"paragraph\": {\n\t\t\t\tconst paragraphText = this.renderInlineTokens(token.tokens || [], styleContext);\n\t\t\t\tlines.push(paragraphText);\n\t\t\t\t// Don't add spacing if next token is space or list\n\t\t\t\tif (nextTokenType && nextTokenType !== \"list\" && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"text\":\n\t\t\t\tlines.push(this.renderInlineTokens([token], styleContext));\n\t\t\t\tbreak;\n\n\t\t\tcase \"code\": {\n\t\t\t\tconst indent = this.theme.codeBlockIndent ?? \" \";\n\t\t\t\tlines.push(this.theme.codeBlockBorder(`\\`\\`\\`${token.lang || \"\"}`));\n\t\t\t\tif (this.theme.highlightCode) {\n\t\t\t\t\tconst highlightedLines = this.theme.highlightCode(token.text, token.lang);\n\t\t\t\t\tfor (const hlLine of highlightedLines) {\n\t\t\t\t\t\tlines.push(`${indent}${hlLine}`);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Split code by newlines and style each line\n\t\t\t\t\tconst codeLines = token.text.split(\"\\n\");\n\t\t\t\t\tfor (const codeLine of codeLines) {\n\t\t\t\t\t\tlines.push(`${indent}${this.theme.codeBlock(codeLine)}`);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlines.push(this.theme.codeBlockBorder(\"```\"));\n\t\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\"); // Add spacing after code blocks (unless space token follows)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"list\": {\n\t\t\t\tconst listLines = this.renderList(token as Tokens.List, 0, width, styleContext);\n\t\t\t\tlines.push(...listLines);\n\t\t\t\t// Don't add spacing after lists if a space token follows\n\t\t\t\t// (the space token will handle it)\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"table\": {\n\t\t\t\tconst tableLines = this.renderTable(token as Tokens.Table, width, nextTokenType, styleContext);\n\t\t\t\tlines.push(...tableLines);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"blockquote\": {\n\t\t\t\tconst quoteStyle = (text: string) => this.theme.quote(this.theme.italic(text));\n\t\t\t\tconst quoteStylePrefix = this.getStylePrefix(quoteStyle);\n\t\t\t\tconst applyQuoteStyle = (line: string): string => {\n\t\t\t\t\tif (!quoteStylePrefix) {\n\t\t\t\t\t\treturn quoteStyle(line);\n\t\t\t\t\t}\n\t\t\t\t\tconst lineWithReappliedStyle = line.replace(/\\x1b\\[0m/g, `\\x1b[0m${quoteStylePrefix}`);\n\t\t\t\t\treturn quoteStyle(lineWithReappliedStyle);\n\t\t\t\t};\n\n\t\t\t\t// Calculate available width for quote content (subtract border \"│ \" = 2 chars)\n\t\t\t\tconst quoteContentWidth = Math.max(1, width - 2);\n\n\t\t\t\t// Blockquotes contain block-level tokens (paragraph, list, code, etc.), so render\n\t\t\t\t// children with renderToken() instead of renderInlineTokens().\n\t\t\t\t// Default message style should not apply inside blockquotes.\n\t\t\t\tconst quoteInlineStyleContext: InlineStyleContext = {\n\t\t\t\t\tapplyText: (text: string) => text,\n\t\t\t\t\tstylePrefix: quoteStylePrefix,\n\t\t\t\t};\n\t\t\t\tconst quoteTokens = token.tokens || [];\n\t\t\t\tconst renderedQuoteLines: string[] = [];\n\t\t\t\tfor (let i = 0; i < quoteTokens.length; i++) {\n\t\t\t\t\tconst quoteToken = quoteTokens[i];\n\t\t\t\t\tconst nextQuoteToken = quoteTokens[i + 1];\n\t\t\t\t\trenderedQuoteLines.push(\n\t\t\t\t\t\t...this.renderToken(quoteToken, quoteContentWidth, nextQuoteToken?.type, quoteInlineStyleContext),\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Avoid rendering an extra empty quote line before the outer blockquote spacing.\n\t\t\t\twhile (renderedQuoteLines.length > 0 && renderedQuoteLines[renderedQuoteLines.length - 1] === \"\") {\n\t\t\t\t\trenderedQuoteLines.pop();\n\t\t\t\t}\n\n\t\t\t\tfor (const quoteLine of renderedQuoteLines) {\n\t\t\t\t\tconst styledLine = applyQuoteStyle(quoteLine);\n\t\t\t\t\tconst wrappedLines = wrapTextWithAnsi(styledLine, quoteContentWidth);\n\t\t\t\t\tfor (const wrappedLine of wrappedLines) {\n\t\t\t\t\t\tlines.push(this.theme.quoteBorder(\"│ \") + wrappedLine);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\"); // Add spacing after blockquotes (unless space token follows)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"hr\":\n\t\t\t\tlines.push(this.theme.hr(\"─\".repeat(Math.min(width, 80))));\n\t\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\"); // Add spacing after horizontal rules (unless space token follows)\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"html\":\n\t\t\t\t// Render HTML as plain text (escaped for terminal)\n\t\t\t\tif (\"raw\" in token && typeof token.raw === \"string\") {\n\t\t\t\t\tlines.push(this.applyDefaultStyle(token.raw.trim()));\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"space\":\n\t\t\t\t// Space tokens represent blank lines in markdown\n\t\t\t\tlines.push(\"\");\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t// Handle any other token types as plain text\n\t\t\t\tif (\"text\" in token && typeof token.text === \"string\") {\n\t\t\t\t\tlines.push(token.text);\n\t\t\t\t}\n\t\t}\n\n\t\treturn lines;\n\t}\n\n\tprivate renderInlineTokens(tokens: Token[], styleContext?: InlineStyleContext): string {\n\t\tlet result = \"\";\n\t\tconst resolvedStyleContext = styleContext ?? this.getDefaultInlineStyleContext();\n\t\tconst { applyText, stylePrefix } = resolvedStyleContext;\n\t\tconst applyTextWithNewlines = (text: string): string => {\n\t\t\tconst segments: string[] = text.split(\"\\n\");\n\t\t\treturn segments.map((segment: string) => applyText(segment)).join(\"\\n\");\n\t\t};\n\n\t\tfor (const token of tokens) {\n\t\t\tswitch (token.type) {\n\t\t\t\tcase \"text\":\n\t\t\t\t\t// Text tokens in list items can have nested tokens for inline formatting\n\t\t\t\t\tif (token.tokens && token.tokens.length > 0) {\n\t\t\t\t\t\tresult += this.renderInlineTokens(token.tokens, resolvedStyleContext);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult += applyTextWithNewlines(token.text);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"paragraph\":\n\t\t\t\t\t// Paragraph tokens contain nested inline tokens\n\t\t\t\t\tresult += this.renderInlineTokens(token.tokens || [], resolvedStyleContext);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"strong\": {\n\t\t\t\t\tconst boldContent = this.renderInlineTokens(token.tokens || [], resolvedStyleContext);\n\t\t\t\t\tresult += this.theme.bold(boldContent) + stylePrefix;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase \"em\": {\n\t\t\t\t\tconst italicContent = this.renderInlineTokens(token.tokens || [], resolvedStyleContext);\n\t\t\t\t\tresult += this.theme.italic(italicContent) + stylePrefix;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase \"codespan\":\n\t\t\t\t\tresult += this.theme.code(token.text) + stylePrefix;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"link\": {\n\t\t\t\t\tconst linkText = this.renderInlineTokens(token.tokens || [], resolvedStyleContext);\n\t\t\t\t\tconst styledLink = this.theme.link(this.theme.underline(linkText));\n\t\t\t\t\tif (getCapabilities().hyperlinks) {\n\t\t\t\t\t\t// OSC 8: render as a clickable hyperlink. The URL is not printed inline,\n\t\t\t\t\t\t// so we always show only the link text regardless of whether it matches href.\n\t\t\t\t\t\tresult += hyperlink(styledLink, token.href) + stylePrefix;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Fallback: print URL in parentheses when text differs from href.\n\t\t\t\t\t\t// Compare raw token.text (not styled) against href for the equality check.\n\t\t\t\t\t\t// For mailto: links strip the prefix (autolinked emails use text=\"foo@bar.com\"\n\t\t\t\t\t\t// but href=\"mailto:foo@bar.com\").\n\t\t\t\t\t\tconst hrefForComparison = token.href.startsWith(\"mailto:\") ? token.href.slice(7) : token.href;\n\t\t\t\t\t\tif (token.text === token.href || token.text === hrefForComparison) {\n\t\t\t\t\t\t\tresult += styledLink + stylePrefix;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult += styledLink + this.theme.linkUrl(` (${token.href})`) + stylePrefix;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase \"br\":\n\t\t\t\t\tresult += \"\\n\";\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"del\": {\n\t\t\t\t\tconst delContent = this.renderInlineTokens(token.tokens || [], resolvedStyleContext);\n\t\t\t\t\tresult += this.theme.strikethrough(delContent) + stylePrefix;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase \"html\":\n\t\t\t\t\t// Render inline HTML as plain text\n\t\t\t\t\tif (\"raw\" in token && typeof token.raw === \"string\") {\n\t\t\t\t\t\tresult += applyTextWithNewlines(token.raw);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t// Handle any other inline token types as plain text\n\t\t\t\t\tif (\"text\" in token && typeof token.text === \"string\") {\n\t\t\t\t\t\tresult += applyTextWithNewlines(token.text);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twhile (stylePrefix && result.endsWith(stylePrefix)) {\n\t\t\tresult = result.slice(0, -stylePrefix.length);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprivate getOrderedListMarker(item: Tokens.ListItem): string | undefined {\n\t\tconst match = /^(?: {0,3})(\\d{1,9}[.)])[ \\t]+/.exec(item.raw);\n\t\treturn match ? `${match[1]} ` : undefined;\n\t}\n\n\t/**\n\t * Render a list with proper nesting support\n\t */\n\tprivate renderList(token: Tokens.List, depth: number, width: number, styleContext?: InlineStyleContext): string[] {\n\t\tconst lines: string[] = [];\n\t\tconst indent = \" \".repeat(depth);\n\t\t// Use the list's start property (defaults to 1 for ordered lists)\n\t\tconst startNumber = typeof token.start === \"number\" ? token.start : 1;\n\n\t\tfor (let i = 0; i < token.items.length; i++) {\n\t\t\tconst item = token.items[i];\n\t\t\tconst bullet = token.ordered\n\t\t\t\t? this.options.preserveOrderedListMarkers\n\t\t\t\t\t? (this.getOrderedListMarker(item) ?? `${startNumber + i}. `)\n\t\t\t\t\t: `${startNumber + i}. `\n\t\t\t\t: \"- \";\n\t\t\tconst taskMarker = item.task ? `[${item.checked ? \"x\" : \" \"}] ` : \"\";\n\t\t\tconst marker = bullet + taskMarker;\n\t\t\tconst firstPrefix = indent + this.theme.listBullet(marker);\n\t\t\tconst continuationPrefix = indent + \" \".repeat(visibleWidth(marker));\n\t\t\tconst itemWidth = Math.max(1, width - visibleWidth(firstPrefix));\n\t\t\tlet renderedAnyLine = false;\n\n\t\t\tfor (const itemToken of item.tokens) {\n\t\t\t\tif (itemToken.type === \"list\") {\n\t\t\t\t\tlines.push(...this.renderList(itemToken as Tokens.List, depth + 1, width, styleContext));\n\t\t\t\t\trenderedAnyLine = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst itemLines = this.renderToken(itemToken, itemWidth, undefined, styleContext);\n\t\t\t\tfor (const line of itemLines) {\n\t\t\t\t\tfor (const wrappedLine of wrapTextWithAnsi(line, itemWidth)) {\n\t\t\t\t\t\tconst linePrefix = renderedAnyLine ? continuationPrefix : firstPrefix;\n\t\t\t\t\t\tlines.push(linePrefix + wrappedLine);\n\t\t\t\t\t\trenderedAnyLine = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!renderedAnyLine) {\n\t\t\t\tlines.push(firstPrefix);\n\t\t\t}\n\t\t}\n\n\t\treturn lines;\n\t}\n\n\t/**\n\t * Get the visible width of the longest word in a string.\n\t */\n\tprivate getLongestWordWidth(text: string, maxWidth?: number): number {\n\t\tconst words = text.split(/\\s+/).filter((word) => word.length > 0);\n\t\tlet longest = 0;\n\t\tfor (const word of words) {\n\t\t\tlongest = Math.max(longest, visibleWidth(word));\n\t\t}\n\t\tif (maxWidth === undefined) {\n\t\t\treturn longest;\n\t\t}\n\t\treturn Math.min(longest, maxWidth);\n\t}\n\n\t/**\n\t * Wrap a table cell to fit into a column.\n\t *\n\t * Delegates to wrapTextWithAnsi() so ANSI codes + long tokens are handled\n\t * consistently with the rest of the renderer.\n\t */\n\tprivate wrapCellText(text: string, maxWidth: number): string[] {\n\t\treturn wrapTextWithAnsi(text, Math.max(1, maxWidth));\n\t}\n\n\t/**\n\t * Render a table with width-aware cell wrapping.\n\t * Cells that don't fit are wrapped to multiple lines.\n\t */\n\tprivate renderTable(\n\t\ttoken: Tokens.Table,\n\t\tavailableWidth: number,\n\t\tnextTokenType?: string,\n\t\tstyleContext?: InlineStyleContext,\n\t): string[] {\n\t\tconst lines: string[] = [];\n\t\tconst numCols = token.header.length;\n\n\t\tif (numCols === 0) {\n\t\t\treturn lines;\n\t\t}\n\n\t\t// Calculate border overhead: \"│ \" + (n-1) * \" │ \" + \" │\"\n\t\t// = 2 + (n-1) * 3 + 2 = 3n + 1\n\t\tconst borderOverhead = 3 * numCols + 1;\n\t\tconst availableForCells = availableWidth - borderOverhead;\n\t\tif (availableForCells < numCols) {\n\t\t\t// Too narrow to render a stable table. Fall back to raw markdown.\n\t\t\tconst fallbackLines = token.raw ? wrapTextWithAnsi(token.raw, availableWidth) : [];\n\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\tfallbackLines.push(\"\");\n\t\t\t}\n\t\t\treturn fallbackLines;\n\t\t}\n\n\t\tconst maxUnbrokenWordWidth = 30;\n\n\t\t// Calculate natural column widths (what each column needs without constraints)\n\t\tconst naturalWidths: number[] = [];\n\t\tconst minWordWidths: number[] = [];\n\t\tfor (let i = 0; i < numCols; i++) {\n\t\t\tconst headerText = this.renderInlineTokens(token.header[i].tokens || [], styleContext);\n\t\t\tnaturalWidths[i] = visibleWidth(headerText);\n\t\t\tminWordWidths[i] = Math.max(1, this.getLongestWordWidth(headerText, maxUnbrokenWordWidth));\n\t\t}\n\t\tfor (const row of token.rows) {\n\t\t\tfor (let i = 0; i < row.length; i++) {\n\t\t\t\tconst cellText = this.renderInlineTokens(row[i].tokens || [], styleContext);\n\t\t\t\tnaturalWidths[i] = Math.max(naturalWidths[i] || 0, visibleWidth(cellText));\n\t\t\t\tminWordWidths[i] = Math.max(\n\t\t\t\t\tminWordWidths[i] || 1,\n\t\t\t\t\tthis.getLongestWordWidth(cellText, maxUnbrokenWordWidth),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tlet minColumnWidths = minWordWidths;\n\t\tlet minCellsWidth = minColumnWidths.reduce((a, b) => a + b, 0);\n\n\t\tif (minCellsWidth > availableForCells) {\n\t\t\tminColumnWidths = new Array(numCols).fill(1);\n\t\t\tconst remaining = availableForCells - numCols;\n\n\t\t\tif (remaining > 0) {\n\t\t\t\tconst totalWeight = minWordWidths.reduce((total, width) => total + Math.max(0, width - 1), 0);\n\t\t\t\tconst growth = minWordWidths.map((width) => {\n\t\t\t\t\tconst weight = Math.max(0, width - 1);\n\t\t\t\t\treturn totalWeight > 0 ? Math.floor((weight / totalWeight) * remaining) : 0;\n\t\t\t\t});\n\n\t\t\t\tfor (let i = 0; i < numCols; i++) {\n\t\t\t\t\tminColumnWidths[i] += growth[i] ?? 0;\n\t\t\t\t}\n\n\t\t\t\tconst allocated = growth.reduce((total, width) => total + width, 0);\n\t\t\t\tlet leftover = remaining - allocated;\n\t\t\t\tfor (let i = 0; leftover > 0 && i < numCols; i++) {\n\t\t\t\t\tminColumnWidths[i]++;\n\t\t\t\t\tleftover--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tminCellsWidth = minColumnWidths.reduce((a, b) => a + b, 0);\n\t\t}\n\n\t\t// Calculate column widths that fit within available width\n\t\tconst totalNaturalWidth = naturalWidths.reduce((a, b) => a + b, 0) + borderOverhead;\n\t\tlet columnWidths: number[];\n\n\t\tif (totalNaturalWidth <= availableWidth) {\n\t\t\t// Everything fits naturally\n\t\t\tcolumnWidths = naturalWidths.map((width, index) => Math.max(width, minColumnWidths[index]));\n\t\t} else {\n\t\t\t// Need to shrink columns to fit\n\t\t\tconst totalGrowPotential = naturalWidths.reduce((total, width, index) => {\n\t\t\t\treturn total + Math.max(0, width - minColumnWidths[index]);\n\t\t\t}, 0);\n\t\t\tconst extraWidth = Math.max(0, availableForCells - minCellsWidth);\n\t\t\tcolumnWidths = minColumnWidths.map((minWidth, index) => {\n\t\t\t\tconst naturalWidth = naturalWidths[index];\n\t\t\t\tconst minWidthDelta = Math.max(0, naturalWidth - minWidth);\n\t\t\t\tlet grow = 0;\n\t\t\t\tif (totalGrowPotential > 0) {\n\t\t\t\t\tgrow = Math.floor((minWidthDelta / totalGrowPotential) * extraWidth);\n\t\t\t\t}\n\t\t\t\treturn minWidth + grow;\n\t\t\t});\n\n\t\t\t// Adjust for rounding errors - distribute remaining space\n\t\t\tconst allocated = columnWidths.reduce((a, b) => a + b, 0);\n\t\t\tlet remaining = availableForCells - allocated;\n\t\t\twhile (remaining > 0) {\n\t\t\t\tlet grew = false;\n\t\t\t\tfor (let i = 0; i < numCols && remaining > 0; i++) {\n\t\t\t\t\tif (columnWidths[i] < naturalWidths[i]) {\n\t\t\t\t\t\tcolumnWidths[i]++;\n\t\t\t\t\t\tremaining--;\n\t\t\t\t\t\tgrew = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!grew) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Render top border\n\t\tconst topBorderCells = columnWidths.map((w) => \"─\".repeat(w));\n\t\tlines.push(`┌─${topBorderCells.join(\"─┬─\")}─┐`);\n\n\t\t// Render header with wrapping\n\t\tconst headerCellLines: string[][] = token.header.map((cell, i) => {\n\t\t\tconst text = this.renderInlineTokens(cell.tokens || [], styleContext);\n\t\t\treturn this.wrapCellText(text, columnWidths[i]);\n\t\t});\n\t\tconst headerLineCount = Math.max(...headerCellLines.map((c) => c.length));\n\n\t\tfor (let lineIdx = 0; lineIdx < headerLineCount; lineIdx++) {\n\t\t\tconst rowParts = headerCellLines.map((cellLines, colIdx) => {\n\t\t\t\tconst text = cellLines[lineIdx] || \"\";\n\t\t\t\tconst padded = text + \" \".repeat(Math.max(0, columnWidths[colIdx] - visibleWidth(text)));\n\t\t\t\treturn this.theme.bold(padded);\n\t\t\t});\n\t\t\tlines.push(`│ ${rowParts.join(\" │ \")} │`);\n\t\t}\n\n\t\t// Render separator\n\t\tconst separatorCells = columnWidths.map((w) => \"─\".repeat(w));\n\t\tconst separatorLine = `├─${separatorCells.join(\"─┼─\")}─┤`;\n\t\tlines.push(separatorLine);\n\n\t\t// Render rows with wrapping\n\t\tfor (let rowIndex = 0; rowIndex < token.rows.length; rowIndex++) {\n\t\t\tconst row = token.rows[rowIndex];\n\t\t\tconst rowCellLines: string[][] = row.map((cell, i) => {\n\t\t\t\tconst text = this.renderInlineTokens(cell.tokens || [], styleContext);\n\t\t\t\treturn this.wrapCellText(text, columnWidths[i]);\n\t\t\t});\n\t\t\tconst rowLineCount = Math.max(...rowCellLines.map((c) => c.length));\n\n\t\t\tfor (let lineIdx = 0; lineIdx < rowLineCount; lineIdx++) {\n\t\t\t\tconst rowParts = rowCellLines.map((cellLines, colIdx) => {\n\t\t\t\t\tconst text = cellLines[lineIdx] || \"\";\n\t\t\t\t\treturn text + \" \".repeat(Math.max(0, columnWidths[colIdx] - visibleWidth(text)));\n\t\t\t\t});\n\t\t\t\tlines.push(`│ ${rowParts.join(\" │ \")} │`);\n\t\t\t}\n\n\t\t\tif (rowIndex < token.rows.length - 1) {\n\t\t\t\tlines.push(separatorLine);\n\t\t\t}\n\t\t}\n\n\t\t// Render bottom border\n\t\tconst bottomBorderCells = columnWidths.map((w) => \"─\".repeat(w));\n\t\tlines.push(`└─${bottomBorderCells.join(\"─┴─\")}─┘`);\n\n\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\tlines.push(\"\"); // Add spacing after table\n\t\t}\n\t\treturn lines;\n\t}\n}\n"]}
@@ -1,50 +0,0 @@
1
- import type { Component } from "../tui.ts";
2
- export interface SelectItem {
3
- value: string;
4
- label: string;
5
- description?: string;
6
- }
7
- export interface SelectListTheme {
8
- selectedPrefix: (text: string) => string;
9
- selectedText: (text: string) => string;
10
- description: (text: string) => string;
11
- scrollInfo: (text: string) => string;
12
- noMatch: (text: string) => string;
13
- }
14
- export interface SelectListTruncatePrimaryContext {
15
- text: string;
16
- maxWidth: number;
17
- columnWidth: number;
18
- item: SelectItem;
19
- isSelected: boolean;
20
- }
21
- export interface SelectListLayoutOptions {
22
- minPrimaryColumnWidth?: number;
23
- maxPrimaryColumnWidth?: number;
24
- truncatePrimary?: (context: SelectListTruncatePrimaryContext) => string;
25
- }
26
- export declare class SelectList implements Component {
27
- private items;
28
- private filteredItems;
29
- private selectedIndex;
30
- private maxVisible;
31
- private theme;
32
- private layout;
33
- onSelect?: (item: SelectItem) => void;
34
- onCancel?: () => void;
35
- onSelectionChange?: (item: SelectItem) => void;
36
- constructor(items: SelectItem[], maxVisible: number, theme: SelectListTheme, layout?: SelectListLayoutOptions);
37
- setFilter(filter: string): void;
38
- setSelectedIndex(index: number): void;
39
- invalidate(): void;
40
- render(width: number): string[];
41
- handleInput(keyData: string): void;
42
- private renderItem;
43
- private getPrimaryColumnWidth;
44
- private getPrimaryColumnBounds;
45
- private truncatePrimary;
46
- private getDisplayValue;
47
- private notifySelectionChange;
48
- getSelectedItem(): SelectItem | null;
49
- }
50
- //# sourceMappingURL=select-list.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"select-list.d.ts","sourceRoot":"","sources":["../../src/components/select-list.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAU3C,MAAM,WAAW,UAAU;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC/B,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACvC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACtC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,gCAAgC;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACvC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,gCAAgC,KAAK,MAAM,CAAC;CACxE;AAED,qBAAa,UAAW,YAAW,SAAS;IAC3C,OAAO,CAAC,KAAK,CAAoB;IACjC,OAAO,CAAC,aAAa,CAAoB;IACzC,OAAO,CAAC,aAAa,CAAa;IAClC,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,KAAK,CAAkB;IAC/B,OAAO,CAAC,MAAM,CAA0B;IAEjC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IAEtD,YAAY,KAAK,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,GAAE,uBAA4B,EAMhH;IAED,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI9B;IAED,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAEpC;IAED,UAAU,IAAI,IAAI,CAEjB;IAED,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAoC9B;IAED,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAyBjC;IAED,OAAO,CAAC,UAAU;IAuClB,OAAO,CAAC,qBAAqB;IAS7B,OAAO,CAAC,sBAAsB;IAY9B,OAAO,CAAC,eAAe;IAevB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,qBAAqB;IAO7B,eAAe,IAAI,UAAU,GAAG,IAAI,CAGnC;CACD","sourcesContent":["import { getKeybindings } from \"../keybindings.ts\";\nimport type { Component } from \"../tui.ts\";\nimport { truncateToWidth, visibleWidth } from \"../utils.ts\";\n\nconst DEFAULT_PRIMARY_COLUMN_WIDTH = 32;\nconst PRIMARY_COLUMN_GAP = 2;\nconst MIN_DESCRIPTION_WIDTH = 10;\n\nconst normalizeToSingleLine = (text: string): string => text.replace(/[\\r\\n]+/g, \" \").trim();\nconst clamp = (value: number, min: number, max: number): number => Math.max(min, Math.min(value, max));\n\nexport interface SelectItem {\n\tvalue: string;\n\tlabel: string;\n\tdescription?: string;\n}\n\nexport interface SelectListTheme {\n\tselectedPrefix: (text: string) => string;\n\tselectedText: (text: string) => string;\n\tdescription: (text: string) => string;\n\tscrollInfo: (text: string) => string;\n\tnoMatch: (text: string) => string;\n}\n\nexport interface SelectListTruncatePrimaryContext {\n\ttext: string;\n\tmaxWidth: number;\n\tcolumnWidth: number;\n\titem: SelectItem;\n\tisSelected: boolean;\n}\n\nexport interface SelectListLayoutOptions {\n\tminPrimaryColumnWidth?: number;\n\tmaxPrimaryColumnWidth?: number;\n\ttruncatePrimary?: (context: SelectListTruncatePrimaryContext) => string;\n}\n\nexport class SelectList implements Component {\n\tprivate items: SelectItem[] = [];\n\tprivate filteredItems: SelectItem[] = [];\n\tprivate selectedIndex: number = 0;\n\tprivate maxVisible: number = 5;\n\tprivate theme: SelectListTheme;\n\tprivate layout: SelectListLayoutOptions;\n\n\tpublic onSelect?: (item: SelectItem) => void;\n\tpublic onCancel?: () => void;\n\tpublic onSelectionChange?: (item: SelectItem) => void;\n\n\tconstructor(items: SelectItem[], maxVisible: number, theme: SelectListTheme, layout: SelectListLayoutOptions = {}) {\n\t\tthis.items = items;\n\t\tthis.filteredItems = items;\n\t\tthis.maxVisible = maxVisible;\n\t\tthis.theme = theme;\n\t\tthis.layout = layout;\n\t}\n\n\tsetFilter(filter: string): void {\n\t\tthis.filteredItems = this.items.filter((item) => item.value.toLowerCase().startsWith(filter.toLowerCase()));\n\t\t// Reset selection when filter changes\n\t\tthis.selectedIndex = 0;\n\t}\n\n\tsetSelectedIndex(index: number): void {\n\t\tthis.selectedIndex = Math.max(0, Math.min(index, this.filteredItems.length - 1));\n\t}\n\n\tinvalidate(): void {\n\t\t// No cached state to invalidate currently\n\t}\n\n\trender(width: number): string[] {\n\t\tconst lines: string[] = [];\n\n\t\t// If no items match filter, show message\n\t\tif (this.filteredItems.length === 0) {\n\t\t\tlines.push(this.theme.noMatch(\" No matching commands\"));\n\t\t\treturn lines;\n\t\t}\n\n\t\tconst primaryColumnWidth = this.getPrimaryColumnWidth();\n\n\t\t// Calculate visible range with scrolling\n\t\tconst startIndex = Math.max(\n\t\t\t0,\n\t\t\tMath.min(this.selectedIndex - Math.floor(this.maxVisible / 2), this.filteredItems.length - this.maxVisible),\n\t\t);\n\t\tconst endIndex = Math.min(startIndex + this.maxVisible, this.filteredItems.length);\n\n\t\t// Render visible items\n\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\tconst item = this.filteredItems[i];\n\t\t\tif (!item) continue;\n\n\t\t\tconst isSelected = i === this.selectedIndex;\n\t\t\tconst descriptionSingleLine = item.description ? normalizeToSingleLine(item.description) : undefined;\n\t\t\tlines.push(this.renderItem(item, isSelected, width, descriptionSingleLine, primaryColumnWidth));\n\t\t}\n\n\t\t// Add scroll indicators if needed\n\t\tif (startIndex > 0 || endIndex < this.filteredItems.length) {\n\t\t\tconst scrollText = ` (${this.selectedIndex + 1}/${this.filteredItems.length})`;\n\t\t\t// Truncate if too long for terminal\n\t\t\tlines.push(this.theme.scrollInfo(truncateToWidth(scrollText, width - 2, \"\")));\n\t\t}\n\n\t\treturn lines;\n\t}\n\n\thandleInput(keyData: string): void {\n\t\tconst kb = getKeybindings();\n\t\t// Up arrow - wrap to bottom when at top\n\t\tif (kb.matches(keyData, \"tui.select.up\")) {\n\t\t\tthis.selectedIndex = this.selectedIndex === 0 ? this.filteredItems.length - 1 : this.selectedIndex - 1;\n\t\t\tthis.notifySelectionChange();\n\t\t}\n\t\t// Down arrow - wrap to top when at bottom\n\t\telse if (kb.matches(keyData, \"tui.select.down\")) {\n\t\t\tthis.selectedIndex = this.selectedIndex === this.filteredItems.length - 1 ? 0 : this.selectedIndex + 1;\n\t\t\tthis.notifySelectionChange();\n\t\t}\n\t\t// Enter\n\t\telse if (kb.matches(keyData, \"tui.select.confirm\")) {\n\t\t\tconst selectedItem = this.filteredItems[this.selectedIndex];\n\t\t\tif (selectedItem && this.onSelect) {\n\t\t\t\tthis.onSelect(selectedItem);\n\t\t\t}\n\t\t}\n\t\t// Escape or Ctrl+C\n\t\telse if (kb.matches(keyData, \"tui.select.cancel\")) {\n\t\t\tif (this.onCancel) {\n\t\t\t\tthis.onCancel();\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate renderItem(\n\t\titem: SelectItem,\n\t\tisSelected: boolean,\n\t\twidth: number,\n\t\tdescriptionSingleLine: string | undefined,\n\t\tprimaryColumnWidth: number,\n\t): string {\n\t\tconst prefix = isSelected ? \"→ \" : \" \";\n\t\tconst prefixWidth = visibleWidth(prefix);\n\n\t\tif (descriptionSingleLine && width > 40) {\n\t\t\tconst effectivePrimaryColumnWidth = Math.max(1, Math.min(primaryColumnWidth, width - prefixWidth - 4));\n\t\t\tconst maxPrimaryWidth = Math.max(1, effectivePrimaryColumnWidth - PRIMARY_COLUMN_GAP);\n\t\t\tconst truncatedValue = this.truncatePrimary(item, isSelected, maxPrimaryWidth, effectivePrimaryColumnWidth);\n\t\t\tconst truncatedValueWidth = visibleWidth(truncatedValue);\n\t\t\tconst spacing = \" \".repeat(Math.max(1, effectivePrimaryColumnWidth - truncatedValueWidth));\n\t\t\tconst descriptionStart = prefixWidth + truncatedValueWidth + spacing.length;\n\t\t\tconst remainingWidth = width - descriptionStart - 2; // -2 for safety\n\n\t\t\tif (remainingWidth > MIN_DESCRIPTION_WIDTH) {\n\t\t\t\tconst truncatedDesc = truncateToWidth(descriptionSingleLine, remainingWidth, \"\");\n\t\t\t\tif (isSelected) {\n\t\t\t\t\treturn this.theme.selectedText(`${prefix}${truncatedValue}${spacing}${truncatedDesc}`);\n\t\t\t\t}\n\n\t\t\t\tconst descText = this.theme.description(spacing + truncatedDesc);\n\t\t\t\treturn prefix + truncatedValue + descText;\n\t\t\t}\n\t\t}\n\n\t\tconst maxWidth = width - prefixWidth - 2;\n\t\tconst truncatedValue = this.truncatePrimary(item, isSelected, maxWidth, maxWidth);\n\t\tif (isSelected) {\n\t\t\treturn this.theme.selectedText(`${prefix}${truncatedValue}`);\n\t\t}\n\n\t\treturn prefix + truncatedValue;\n\t}\n\n\tprivate getPrimaryColumnWidth(): number {\n\t\tconst { min, max } = this.getPrimaryColumnBounds();\n\t\tconst widestPrimary = this.filteredItems.reduce((widest, item) => {\n\t\t\treturn Math.max(widest, visibleWidth(this.getDisplayValue(item)) + PRIMARY_COLUMN_GAP);\n\t\t}, 0);\n\n\t\treturn clamp(widestPrimary, min, max);\n\t}\n\n\tprivate getPrimaryColumnBounds(): { min: number; max: number } {\n\t\tconst rawMin =\n\t\t\tthis.layout.minPrimaryColumnWidth ?? this.layout.maxPrimaryColumnWidth ?? DEFAULT_PRIMARY_COLUMN_WIDTH;\n\t\tconst rawMax =\n\t\t\tthis.layout.maxPrimaryColumnWidth ?? this.layout.minPrimaryColumnWidth ?? DEFAULT_PRIMARY_COLUMN_WIDTH;\n\n\t\treturn {\n\t\t\tmin: Math.max(1, Math.min(rawMin, rawMax)),\n\t\t\tmax: Math.max(1, Math.max(rawMin, rawMax)),\n\t\t};\n\t}\n\n\tprivate truncatePrimary(item: SelectItem, isSelected: boolean, maxWidth: number, columnWidth: number): string {\n\t\tconst displayValue = this.getDisplayValue(item);\n\t\tconst truncatedValue = this.layout.truncatePrimary\n\t\t\t? this.layout.truncatePrimary({\n\t\t\t\t\ttext: displayValue,\n\t\t\t\t\tmaxWidth,\n\t\t\t\t\tcolumnWidth,\n\t\t\t\t\titem,\n\t\t\t\t\tisSelected,\n\t\t\t\t})\n\t\t\t: truncateToWidth(displayValue, maxWidth, \"\");\n\n\t\treturn truncateToWidth(truncatedValue, maxWidth, \"\");\n\t}\n\n\tprivate getDisplayValue(item: SelectItem): string {\n\t\treturn item.label || item.value;\n\t}\n\n\tprivate notifySelectionChange(): void {\n\t\tconst selectedItem = this.filteredItems[this.selectedIndex];\n\t\tif (selectedItem && this.onSelectionChange) {\n\t\t\tthis.onSelectionChange(selectedItem);\n\t\t}\n\t}\n\n\tgetSelectedItem(): SelectItem | null {\n\t\tconst item = this.filteredItems[this.selectedIndex];\n\t\treturn item || null;\n\t}\n}\n"]}
@@ -1,159 +0,0 @@
1
- import { getKeybindings } from "../keybindings.js";
2
- import { truncateToWidth, visibleWidth } from "../utils.js";
3
- const DEFAULT_PRIMARY_COLUMN_WIDTH = 32;
4
- const PRIMARY_COLUMN_GAP = 2;
5
- const MIN_DESCRIPTION_WIDTH = 10;
6
- const normalizeToSingleLine = (text) => text.replace(/[\r\n]+/g, " ").trim();
7
- const clamp = (value, min, max) => Math.max(min, Math.min(value, max));
8
- export class SelectList {
9
- items = [];
10
- filteredItems = [];
11
- selectedIndex = 0;
12
- maxVisible = 5;
13
- theme;
14
- layout;
15
- onSelect;
16
- onCancel;
17
- onSelectionChange;
18
- constructor(items, maxVisible, theme, layout = {}) {
19
- this.items = items;
20
- this.filteredItems = items;
21
- this.maxVisible = maxVisible;
22
- this.theme = theme;
23
- this.layout = layout;
24
- }
25
- setFilter(filter) {
26
- this.filteredItems = this.items.filter((item) => item.value.toLowerCase().startsWith(filter.toLowerCase()));
27
- // Reset selection when filter changes
28
- this.selectedIndex = 0;
29
- }
30
- setSelectedIndex(index) {
31
- this.selectedIndex = Math.max(0, Math.min(index, this.filteredItems.length - 1));
32
- }
33
- invalidate() {
34
- // No cached state to invalidate currently
35
- }
36
- render(width) {
37
- const lines = [];
38
- // If no items match filter, show message
39
- if (this.filteredItems.length === 0) {
40
- lines.push(this.theme.noMatch(" No matching commands"));
41
- return lines;
42
- }
43
- const primaryColumnWidth = this.getPrimaryColumnWidth();
44
- // Calculate visible range with scrolling
45
- const startIndex = Math.max(0, Math.min(this.selectedIndex - Math.floor(this.maxVisible / 2), this.filteredItems.length - this.maxVisible));
46
- const endIndex = Math.min(startIndex + this.maxVisible, this.filteredItems.length);
47
- // Render visible items
48
- for (let i = startIndex; i < endIndex; i++) {
49
- const item = this.filteredItems[i];
50
- if (!item)
51
- continue;
52
- const isSelected = i === this.selectedIndex;
53
- const descriptionSingleLine = item.description ? normalizeToSingleLine(item.description) : undefined;
54
- lines.push(this.renderItem(item, isSelected, width, descriptionSingleLine, primaryColumnWidth));
55
- }
56
- // Add scroll indicators if needed
57
- if (startIndex > 0 || endIndex < this.filteredItems.length) {
58
- const scrollText = ` (${this.selectedIndex + 1}/${this.filteredItems.length})`;
59
- // Truncate if too long for terminal
60
- lines.push(this.theme.scrollInfo(truncateToWidth(scrollText, width - 2, "")));
61
- }
62
- return lines;
63
- }
64
- handleInput(keyData) {
65
- const kb = getKeybindings();
66
- // Up arrow - wrap to bottom when at top
67
- if (kb.matches(keyData, "tui.select.up")) {
68
- this.selectedIndex = this.selectedIndex === 0 ? this.filteredItems.length - 1 : this.selectedIndex - 1;
69
- this.notifySelectionChange();
70
- }
71
- // Down arrow - wrap to top when at bottom
72
- else if (kb.matches(keyData, "tui.select.down")) {
73
- this.selectedIndex = this.selectedIndex === this.filteredItems.length - 1 ? 0 : this.selectedIndex + 1;
74
- this.notifySelectionChange();
75
- }
76
- // Enter
77
- else if (kb.matches(keyData, "tui.select.confirm")) {
78
- const selectedItem = this.filteredItems[this.selectedIndex];
79
- if (selectedItem && this.onSelect) {
80
- this.onSelect(selectedItem);
81
- }
82
- }
83
- // Escape or Ctrl+C
84
- else if (kb.matches(keyData, "tui.select.cancel")) {
85
- if (this.onCancel) {
86
- this.onCancel();
87
- }
88
- }
89
- }
90
- renderItem(item, isSelected, width, descriptionSingleLine, primaryColumnWidth) {
91
- const prefix = isSelected ? "→ " : " ";
92
- const prefixWidth = visibleWidth(prefix);
93
- if (descriptionSingleLine && width > 40) {
94
- const effectivePrimaryColumnWidth = Math.max(1, Math.min(primaryColumnWidth, width - prefixWidth - 4));
95
- const maxPrimaryWidth = Math.max(1, effectivePrimaryColumnWidth - PRIMARY_COLUMN_GAP);
96
- const truncatedValue = this.truncatePrimary(item, isSelected, maxPrimaryWidth, effectivePrimaryColumnWidth);
97
- const truncatedValueWidth = visibleWidth(truncatedValue);
98
- const spacing = " ".repeat(Math.max(1, effectivePrimaryColumnWidth - truncatedValueWidth));
99
- const descriptionStart = prefixWidth + truncatedValueWidth + spacing.length;
100
- const remainingWidth = width - descriptionStart - 2; // -2 for safety
101
- if (remainingWidth > MIN_DESCRIPTION_WIDTH) {
102
- const truncatedDesc = truncateToWidth(descriptionSingleLine, remainingWidth, "");
103
- if (isSelected) {
104
- return this.theme.selectedText(`${prefix}${truncatedValue}${spacing}${truncatedDesc}`);
105
- }
106
- const descText = this.theme.description(spacing + truncatedDesc);
107
- return prefix + truncatedValue + descText;
108
- }
109
- }
110
- const maxWidth = width - prefixWidth - 2;
111
- const truncatedValue = this.truncatePrimary(item, isSelected, maxWidth, maxWidth);
112
- if (isSelected) {
113
- return this.theme.selectedText(`${prefix}${truncatedValue}`);
114
- }
115
- return prefix + truncatedValue;
116
- }
117
- getPrimaryColumnWidth() {
118
- const { min, max } = this.getPrimaryColumnBounds();
119
- const widestPrimary = this.filteredItems.reduce((widest, item) => {
120
- return Math.max(widest, visibleWidth(this.getDisplayValue(item)) + PRIMARY_COLUMN_GAP);
121
- }, 0);
122
- return clamp(widestPrimary, min, max);
123
- }
124
- getPrimaryColumnBounds() {
125
- const rawMin = this.layout.minPrimaryColumnWidth ?? this.layout.maxPrimaryColumnWidth ?? DEFAULT_PRIMARY_COLUMN_WIDTH;
126
- const rawMax = this.layout.maxPrimaryColumnWidth ?? this.layout.minPrimaryColumnWidth ?? DEFAULT_PRIMARY_COLUMN_WIDTH;
127
- return {
128
- min: Math.max(1, Math.min(rawMin, rawMax)),
129
- max: Math.max(1, Math.max(rawMin, rawMax)),
130
- };
131
- }
132
- truncatePrimary(item, isSelected, maxWidth, columnWidth) {
133
- const displayValue = this.getDisplayValue(item);
134
- const truncatedValue = this.layout.truncatePrimary
135
- ? this.layout.truncatePrimary({
136
- text: displayValue,
137
- maxWidth,
138
- columnWidth,
139
- item,
140
- isSelected,
141
- })
142
- : truncateToWidth(displayValue, maxWidth, "");
143
- return truncateToWidth(truncatedValue, maxWidth, "");
144
- }
145
- getDisplayValue(item) {
146
- return item.label || item.value;
147
- }
148
- notifySelectionChange() {
149
- const selectedItem = this.filteredItems[this.selectedIndex];
150
- if (selectedItem && this.onSelectionChange) {
151
- this.onSelectionChange(selectedItem);
152
- }
153
- }
154
- getSelectedItem() {
155
- const item = this.filteredItems[this.selectedIndex];
156
- return item || null;
157
- }
158
- }
159
- //# sourceMappingURL=select-list.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"select-list.js","sourceRoot":"","sources":["../../src/components/select-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE5D,MAAM,4BAA4B,GAAG,EAAE,CAAC;AACxC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC,MAAM,qBAAqB,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC7F,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;AA8BvG,MAAM,OAAO,UAAU;IACd,KAAK,GAAiB,EAAE,CAAC;IACzB,aAAa,GAAiB,EAAE,CAAC;IACjC,aAAa,GAAW,CAAC,CAAC;IAC1B,UAAU,GAA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;IAED,eAAe,GAAsB;QACpC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACpD,OAAO,IAAI,IAAI,IAAI,CAAC;IAAA,CACpB;CACD","sourcesContent":["import { getKeybindings } from \"../keybindings.ts\";\nimport type { Component } from \"../tui.ts\";\nimport { truncateToWidth, visibleWidth } from \"../utils.ts\";\n\nconst DEFAULT_PRIMARY_COLUMN_WIDTH = 32;\nconst PRIMARY_COLUMN_GAP = 2;\nconst MIN_DESCRIPTION_WIDTH = 10;\n\nconst normalizeToSingleLine = (text: string): string => text.replace(/[\\r\\n]+/g, \" \").trim();\nconst clamp = (value: number, min: number, max: number): number => Math.max(min, Math.min(value, max));\n\nexport interface SelectItem {\n\tvalue: string;\n\tlabel: string;\n\tdescription?: string;\n}\n\nexport interface SelectListTheme {\n\tselectedPrefix: (text: string) => string;\n\tselectedText: (text: string) => string;\n\tdescription: (text: string) => string;\n\tscrollInfo: (text: string) => string;\n\tnoMatch: (text: string) => string;\n}\n\nexport interface SelectListTruncatePrimaryContext {\n\ttext: string;\n\tmaxWidth: number;\n\tcolumnWidth: number;\n\titem: SelectItem;\n\tisSelected: boolean;\n}\n\nexport interface SelectListLayoutOptions {\n\tminPrimaryColumnWidth?: number;\n\tmaxPrimaryColumnWidth?: number;\n\ttruncatePrimary?: (context: SelectListTruncatePrimaryContext) => string;\n}\n\nexport class SelectList implements Component {\n\tprivate items: SelectItem[] = [];\n\tprivate filteredItems: SelectItem[] = [];\n\tprivate selectedIndex: number = 0;\n\tprivate maxVisible: number = 5;\n\tprivate theme: SelectListTheme;\n\tprivate layout: SelectListLayoutOptions;\n\n\tpublic onSelect?: (item: SelectItem) => void;\n\tpublic onCancel?: () => void;\n\tpublic onSelectionChange?: (item: SelectItem) => void;\n\n\tconstructor(items: SelectItem[], maxVisible: number, theme: SelectListTheme, layout: SelectListLayoutOptions = {}) {\n\t\tthis.items = items;\n\t\tthis.filteredItems = items;\n\t\tthis.maxVisible = maxVisible;\n\t\tthis.theme = theme;\n\t\tthis.layout = layout;\n\t}\n\n\tsetFilter(filter: string): void {\n\t\tthis.filteredItems = this.items.filter((item) => item.value.toLowerCase().startsWith(filter.toLowerCase()));\n\t\t// Reset selection when filter changes\n\t\tthis.selectedIndex = 0;\n\t}\n\n\tsetSelectedIndex(index: number): void {\n\t\tthis.selectedIndex = Math.max(0, Math.min(index, this.filteredItems.length - 1));\n\t}\n\n\tinvalidate(): void {\n\t\t// No cached state to invalidate currently\n\t}\n\n\trender(width: number): string[] {\n\t\tconst lines: string[] = [];\n\n\t\t// If no items match filter, show message\n\t\tif (this.filteredItems.length === 0) {\n\t\t\tlines.push(this.theme.noMatch(\" No matching commands\"));\n\t\t\treturn lines;\n\t\t}\n\n\t\tconst primaryColumnWidth = this.getPrimaryColumnWidth();\n\n\t\t// Calculate visible range with scrolling\n\t\tconst startIndex = Math.max(\n\t\t\t0,\n\t\t\tMath.min(this.selectedIndex - Math.floor(this.maxVisible / 2), this.filteredItems.length - this.maxVisible),\n\t\t);\n\t\tconst endIndex = Math.min(startIndex + this.maxVisible, this.filteredItems.length);\n\n\t\t// Render visible items\n\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\tconst item = this.filteredItems[i];\n\t\t\tif (!item) continue;\n\n\t\t\tconst isSelected = i === this.selectedIndex;\n\t\t\tconst descriptionSingleLine = item.description ? normalizeToSingleLine(item.description) : undefined;\n\t\t\tlines.push(this.renderItem(item, isSelected, width, descriptionSingleLine, primaryColumnWidth));\n\t\t}\n\n\t\t// Add scroll indicators if needed\n\t\tif (startIndex > 0 || endIndex < this.filteredItems.length) {\n\t\t\tconst scrollText = ` (${this.selectedIndex + 1}/${this.filteredItems.length})`;\n\t\t\t// Truncate if too long for terminal\n\t\t\tlines.push(this.theme.scrollInfo(truncateToWidth(scrollText, width - 2, \"\")));\n\t\t}\n\n\t\treturn lines;\n\t}\n\n\thandleInput(keyData: string): void {\n\t\tconst kb = getKeybindings();\n\t\t// Up arrow - wrap to bottom when at top\n\t\tif (kb.matches(keyData, \"tui.select.up\")) {\n\t\t\tthis.selectedIndex = this.selectedIndex === 0 ? this.filteredItems.length - 1 : this.selectedIndex - 1;\n\t\t\tthis.notifySelectionChange();\n\t\t}\n\t\t// Down arrow - wrap to top when at bottom\n\t\telse if (kb.matches(keyData, \"tui.select.down\")) {\n\t\t\tthis.selectedIndex = this.selectedIndex === this.filteredItems.length - 1 ? 0 : this.selectedIndex + 1;\n\t\t\tthis.notifySelectionChange();\n\t\t}\n\t\t// Enter\n\t\telse if (kb.matches(keyData, \"tui.select.confirm\")) {\n\t\t\tconst selectedItem = this.filteredItems[this.selectedIndex];\n\t\t\tif (selectedItem && this.onSelect) {\n\t\t\t\tthis.onSelect(selectedItem);\n\t\t\t}\n\t\t}\n\t\t// Escape or Ctrl+C\n\t\telse if (kb.matches(keyData, \"tui.select.cancel\")) {\n\t\t\tif (this.onCancel) {\n\t\t\t\tthis.onCancel();\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate renderItem(\n\t\titem: SelectItem,\n\t\tisSelected: boolean,\n\t\twidth: number,\n\t\tdescriptionSingleLine: string | undefined,\n\t\tprimaryColumnWidth: number,\n\t): string {\n\t\tconst prefix = isSelected ? \"→ \" : \" \";\n\t\tconst prefixWidth = visibleWidth(prefix);\n\n\t\tif (descriptionSingleLine && width > 40) {\n\t\t\tconst effectivePrimaryColumnWidth = Math.max(1, Math.min(primaryColumnWidth, width - prefixWidth - 4));\n\t\t\tconst maxPrimaryWidth = Math.max(1, effectivePrimaryColumnWidth - PRIMARY_COLUMN_GAP);\n\t\t\tconst truncatedValue = this.truncatePrimary(item, isSelected, maxPrimaryWidth, effectivePrimaryColumnWidth);\n\t\t\tconst truncatedValueWidth = visibleWidth(truncatedValue);\n\t\t\tconst spacing = \" \".repeat(Math.max(1, effectivePrimaryColumnWidth - truncatedValueWidth));\n\t\t\tconst descriptionStart = prefixWidth + truncatedValueWidth + spacing.length;\n\t\t\tconst remainingWidth = width - descriptionStart - 2; // -2 for safety\n\n\t\t\tif (remainingWidth > MIN_DESCRIPTION_WIDTH) {\n\t\t\t\tconst truncatedDesc = truncateToWidth(descriptionSingleLine, remainingWidth, \"\");\n\t\t\t\tif (isSelected) {\n\t\t\t\t\treturn this.theme.selectedText(`${prefix}${truncatedValue}${spacing}${truncatedDesc}`);\n\t\t\t\t}\n\n\t\t\t\tconst descText = this.theme.description(spacing + truncatedDesc);\n\t\t\t\treturn prefix + truncatedValue + descText;\n\t\t\t}\n\t\t}\n\n\t\tconst maxWidth = width - prefixWidth - 2;\n\t\tconst truncatedValue = this.truncatePrimary(item, isSelected, maxWidth, maxWidth);\n\t\tif (isSelected) {\n\t\t\treturn this.theme.selectedText(`${prefix}${truncatedValue}`);\n\t\t}\n\n\t\treturn prefix + truncatedValue;\n\t}\n\n\tprivate getPrimaryColumnWidth(): number {\n\t\tconst { min, max } = this.getPrimaryColumnBounds();\n\t\tconst widestPrimary = this.filteredItems.reduce((widest, item) => {\n\t\t\treturn Math.max(widest, visibleWidth(this.getDisplayValue(item)) + PRIMARY_COLUMN_GAP);\n\t\t}, 0);\n\n\t\treturn clamp(widestPrimary, min, max);\n\t}\n\n\tprivate getPrimaryColumnBounds(): { min: number; max: number } {\n\t\tconst rawMin =\n\t\t\tthis.layout.minPrimaryColumnWidth ?? this.layout.maxPrimaryColumnWidth ?? DEFAULT_PRIMARY_COLUMN_WIDTH;\n\t\tconst rawMax =\n\t\t\tthis.layout.maxPrimaryColumnWidth ?? this.layout.minPrimaryColumnWidth ?? DEFAULT_PRIMARY_COLUMN_WIDTH;\n\n\t\treturn {\n\t\t\tmin: Math.max(1, Math.min(rawMin, rawMax)),\n\t\t\tmax: Math.max(1, Math.max(rawMin, rawMax)),\n\t\t};\n\t}\n\n\tprivate truncatePrimary(item: SelectItem, isSelected: boolean, maxWidth: number, columnWidth: number): string {\n\t\tconst displayValue = this.getDisplayValue(item);\n\t\tconst truncatedValue = this.layout.truncatePrimary\n\t\t\t? this.layout.truncatePrimary({\n\t\t\t\t\ttext: displayValue,\n\t\t\t\t\tmaxWidth,\n\t\t\t\t\tcolumnWidth,\n\t\t\t\t\titem,\n\t\t\t\t\tisSelected,\n\t\t\t\t})\n\t\t\t: truncateToWidth(displayValue, maxWidth, \"\");\n\n\t\treturn truncateToWidth(truncatedValue, maxWidth, \"\");\n\t}\n\n\tprivate getDisplayValue(item: SelectItem): string {\n\t\treturn item.label || item.value;\n\t}\n\n\tprivate notifySelectionChange(): void {\n\t\tconst selectedItem = this.filteredItems[this.selectedIndex];\n\t\tif (selectedItem && this.onSelectionChange) {\n\t\t\tthis.onSelectionChange(selectedItem);\n\t\t}\n\t}\n\n\tgetSelectedItem(): SelectItem | null {\n\t\tconst item = this.filteredItems[this.selectedIndex];\n\t\treturn item || null;\n\t}\n}\n"]}
@@ -1,50 +0,0 @@
1
- import type { Component } from "../tui.ts";
2
- export interface SettingItem {
3
- /** Unique identifier for this setting */
4
- id: string;
5
- /** Display label (left side) */
6
- label: string;
7
- /** Optional description shown when selected */
8
- description?: string;
9
- /** Current value to display (right side) */
10
- currentValue: string;
11
- /** If provided, Enter/Space cycles through these values */
12
- values?: string[];
13
- /** If provided, Enter opens this submenu. Receives current value and done callback. */
14
- submenu?: (currentValue: string, done: (selectedValue?: string) => void) => Component;
15
- }
16
- export interface SettingsListTheme {
17
- label: (text: string, selected: boolean) => string;
18
- value: (text: string, selected: boolean) => string;
19
- description: (text: string) => string;
20
- cursor: string;
21
- hint: (text: string) => string;
22
- }
23
- export interface SettingsListOptions {
24
- enableSearch?: boolean;
25
- }
26
- export declare class SettingsList implements Component {
27
- private items;
28
- private filteredItems;
29
- private theme;
30
- private selectedIndex;
31
- private maxVisible;
32
- private onChange;
33
- private onCancel;
34
- private searchInput?;
35
- private searchEnabled;
36
- private submenuComponent;
37
- private submenuItemIndex;
38
- constructor(items: SettingItem[], maxVisible: number, theme: SettingsListTheme, onChange: (id: string, newValue: string) => void, onCancel: () => void, options?: SettingsListOptions);
39
- /** Update an item's currentValue */
40
- updateValue(id: string, newValue: string): void;
41
- invalidate(): void;
42
- render(width: number): string[];
43
- private renderMainList;
44
- handleInput(data: string): void;
45
- private activateItem;
46
- private closeSubmenu;
47
- private applyFilter;
48
- private addHintLine;
49
- }
50
- //# sourceMappingURL=settings-list.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings-list.d.ts","sourceRoot":"","sources":["../../src/components/settings-list.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAI3C,MAAM,WAAW,WAAW;IAC3B,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,uFAAuF;IACvF,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,KAAK,SAAS,CAAC;CACtF;AAED,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,MAAM,CAAC;IACnD,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,MAAM,CAAC;IACnD,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,qBAAa,YAAa,YAAW,SAAS;IAC7C,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,KAAK,CAAoB;IACjC,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAyC;IACzD,OAAO,CAAC,QAAQ,CAAa;IAC7B,OAAO,CAAC,WAAW,CAAC,CAAQ;IAC5B,OAAO,CAAC,aAAa,CAAU;IAG/B,OAAO,CAAC,gBAAgB,CAA0B;IAClD,OAAO,CAAC,gBAAgB,CAAuB;IAE/C,YACC,KAAK,EAAE,WAAW,EAAE,EACpB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,iBAAiB,EACxB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,EAChD,QAAQ,EAAE,MAAM,IAAI,EACpB,OAAO,GAAE,mBAAwB,EAYjC;IAED,oCAAoC;IACpC,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAK9C;IAED,UAAU,IAAI,IAAI,CAEjB;IAED,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAO9B;IAED,OAAO,CAAC,cAAc;IA8EtB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CA6B9B;IAED,OAAO,CAAC,YAAY;IAwBpB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,WAAW;CAanB","sourcesContent":["import { fuzzyFilter } from \"../fuzzy.ts\";\nimport { getKeybindings } from \"../keybindings.ts\";\nimport type { Component } from \"../tui.ts\";\nimport { truncateToWidth, visibleWidth, wrapTextWithAnsi } from \"../utils.ts\";\nimport { Input } from \"./input.ts\";\n\nexport interface SettingItem {\n\t/** Unique identifier for this setting */\n\tid: string;\n\t/** Display label (left side) */\n\tlabel: string;\n\t/** Optional description shown when selected */\n\tdescription?: string;\n\t/** Current value to display (right side) */\n\tcurrentValue: string;\n\t/** If provided, Enter/Space cycles through these values */\n\tvalues?: string[];\n\t/** If provided, Enter opens this submenu. Receives current value and done callback. */\n\tsubmenu?: (currentValue: string, done: (selectedValue?: string) => void) => Component;\n}\n\nexport interface SettingsListTheme {\n\tlabel: (text: string, selected: boolean) => string;\n\tvalue: (text: string, selected: boolean) => string;\n\tdescription: (text: string) => string;\n\tcursor: string;\n\thint: (text: string) => string;\n}\n\nexport interface SettingsListOptions {\n\tenableSearch?: boolean;\n}\n\nexport class SettingsList implements Component {\n\tprivate items: SettingItem[];\n\tprivate filteredItems: SettingItem[];\n\tprivate theme: SettingsListTheme;\n\tprivate selectedIndex = 0;\n\tprivate maxVisible: number;\n\tprivate onChange: (id: string, newValue: string) => void;\n\tprivate onCancel: () => void;\n\tprivate searchInput?: Input;\n\tprivate searchEnabled: boolean;\n\n\t// Submenu state\n\tprivate submenuComponent: Component | null = null;\n\tprivate submenuItemIndex: number | null = null;\n\n\tconstructor(\n\t\titems: SettingItem[],\n\t\tmaxVisible: number,\n\t\ttheme: SettingsListTheme,\n\t\tonChange: (id: string, newValue: string) => void,\n\t\tonCancel: () => void,\n\t\toptions: SettingsListOptions = {},\n\t) {\n\t\tthis.items = items;\n\t\tthis.filteredItems = items;\n\t\tthis.maxVisible = maxVisible;\n\t\tthis.theme = theme;\n\t\tthis.onChange = onChange;\n\t\tthis.onCancel = onCancel;\n\t\tthis.searchEnabled = options.enableSearch ?? false;\n\t\tif (this.searchEnabled) {\n\t\t\tthis.searchInput = new Input();\n\t\t}\n\t}\n\n\t/** Update an item's currentValue */\n\tupdateValue(id: string, newValue: string): void {\n\t\tconst item = this.items.find((i) => i.id === id);\n\t\tif (item) {\n\t\t\titem.currentValue = newValue;\n\t\t}\n\t}\n\n\tinvalidate(): void {\n\t\tthis.submenuComponent?.invalidate?.();\n\t}\n\n\trender(width: number): string[] {\n\t\t// If submenu is active, render it instead\n\t\tif (this.submenuComponent) {\n\t\t\treturn this.submenuComponent.render(width);\n\t\t}\n\n\t\treturn this.renderMainList(width);\n\t}\n\n\tprivate renderMainList(width: number): string[] {\n\t\tconst lines: string[] = [];\n\n\t\tif (this.searchEnabled && this.searchInput) {\n\t\t\tlines.push(...this.searchInput.render(width));\n\t\t\tlines.push(\"\");\n\t\t}\n\n\t\tif (this.items.length === 0) {\n\t\t\tlines.push(this.theme.hint(\" No settings available\"));\n\t\t\tif (this.searchEnabled) {\n\t\t\t\tthis.addHintLine(lines, width);\n\t\t\t}\n\t\t\treturn lines;\n\t\t}\n\n\t\tconst displayItems = this.searchEnabled ? this.filteredItems : this.items;\n\t\tif (displayItems.length === 0) {\n\t\t\tlines.push(truncateToWidth(this.theme.hint(\" No matching settings\"), width));\n\t\t\tthis.addHintLine(lines, width);\n\t\t\treturn lines;\n\t\t}\n\n\t\t// Calculate visible range with scrolling\n\t\tconst startIndex = Math.max(\n\t\t\t0,\n\t\t\tMath.min(this.selectedIndex - Math.floor(this.maxVisible / 2), displayItems.length - this.maxVisible),\n\t\t);\n\t\tconst endIndex = Math.min(startIndex + this.maxVisible, displayItems.length);\n\n\t\t// Calculate max label width for alignment\n\t\tconst maxLabelWidth = Math.min(30, Math.max(...this.items.map((item) => visibleWidth(item.label))));\n\n\t\t// Render visible items\n\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\tconst item = displayItems[i];\n\t\t\tif (!item) continue;\n\n\t\t\tconst isSelected = i === this.selectedIndex;\n\t\t\tconst prefix = isSelected ? this.theme.cursor : \" \";\n\t\t\tconst prefixWidth = visibleWidth(prefix);\n\n\t\t\t// Pad label to align values\n\t\t\tconst labelPadded = item.label + \" \".repeat(Math.max(0, maxLabelWidth - visibleWidth(item.label)));\n\t\t\tconst labelText = this.theme.label(labelPadded, isSelected);\n\n\t\t\t// Calculate space for value\n\t\t\tconst separator = \" \";\n\t\t\tconst usedWidth = prefixWidth + maxLabelWidth + visibleWidth(separator);\n\t\t\tconst valueMaxWidth = width - usedWidth - 2;\n\n\t\t\tconst valueText = this.theme.value(truncateToWidth(item.currentValue, valueMaxWidth, \"\"), isSelected);\n\n\t\t\tlines.push(truncateToWidth(prefix + labelText + separator + valueText, width));\n\t\t}\n\n\t\t// Add scroll indicator if needed\n\t\tif (startIndex > 0 || endIndex < displayItems.length) {\n\t\t\tconst scrollText = ` (${this.selectedIndex + 1}/${displayItems.length})`;\n\t\t\tlines.push(this.theme.hint(truncateToWidth(scrollText, width - 2, \"\")));\n\t\t}\n\n\t\t// Add description for selected item\n\t\tconst selectedItem = displayItems[this.selectedIndex];\n\t\tif (selectedItem?.description) {\n\t\t\tlines.push(\"\");\n\t\t\tconst wrappedDesc = wrapTextWithAnsi(selectedItem.description, width - 4);\n\t\t\tfor (const line of wrappedDesc) {\n\t\t\t\tlines.push(this.theme.description(` ${line}`));\n\t\t\t}\n\t\t}\n\n\t\t// Add hint\n\t\tthis.addHintLine(lines, width);\n\n\t\treturn lines;\n\t}\n\n\thandleInput(data: string): void {\n\t\t// If submenu is active, delegate all input to it\n\t\t// The submenu's onCancel (triggered by escape) will call done() which closes it\n\t\tif (this.submenuComponent) {\n\t\t\tthis.submenuComponent.handleInput?.(data);\n\t\t\treturn;\n\t\t}\n\n\t\t// Main list input handling\n\t\tconst kb = getKeybindings();\n\t\tconst displayItems = this.searchEnabled ? this.filteredItems : this.items;\n\t\tif (kb.matches(data, \"tui.select.up\")) {\n\t\t\tif (displayItems.length === 0) return;\n\t\t\tthis.selectedIndex = this.selectedIndex === 0 ? displayItems.length - 1 : this.selectedIndex - 1;\n\t\t} else if (kb.matches(data, \"tui.select.down\")) {\n\t\t\tif (displayItems.length === 0) return;\n\t\t\tthis.selectedIndex = this.selectedIndex === displayItems.length - 1 ? 0 : this.selectedIndex + 1;\n\t\t} else if (kb.matches(data, \"tui.select.confirm\") || data === \" \") {\n\t\t\tthis.activateItem();\n\t\t} else if (kb.matches(data, \"tui.select.cancel\")) {\n\t\t\tthis.onCancel();\n\t\t} else if (this.searchEnabled && this.searchInput) {\n\t\t\tconst sanitized = data.replace(/ /g, \"\");\n\t\t\tif (!sanitized) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.searchInput.handleInput(sanitized);\n\t\t\tthis.applyFilter(this.searchInput.getValue());\n\t\t}\n\t}\n\n\tprivate activateItem(): void {\n\t\tconst item = this.searchEnabled ? this.filteredItems[this.selectedIndex] : this.items[this.selectedIndex];\n\t\tif (!item) return;\n\n\t\tif (item.submenu) {\n\t\t\t// Open submenu, passing current value so it can pre-select correctly\n\t\t\tthis.submenuItemIndex = this.selectedIndex;\n\t\t\tthis.submenuComponent = item.submenu(item.currentValue, (selectedValue?: string) => {\n\t\t\t\tif (selectedValue !== undefined) {\n\t\t\t\t\titem.currentValue = selectedValue;\n\t\t\t\t\tthis.onChange(item.id, selectedValue);\n\t\t\t\t}\n\t\t\t\tthis.closeSubmenu();\n\t\t\t});\n\t\t} else if (item.values && item.values.length > 0) {\n\t\t\t// Cycle through values\n\t\t\tconst currentIndex = item.values.indexOf(item.currentValue);\n\t\t\tconst nextIndex = (currentIndex + 1) % item.values.length;\n\t\t\tconst newValue = item.values[nextIndex];\n\t\t\titem.currentValue = newValue;\n\t\t\tthis.onChange(item.id, newValue);\n\t\t}\n\t}\n\n\tprivate closeSubmenu(): void {\n\t\tthis.submenuComponent = null;\n\t\t// Restore selection to the item that opened the submenu\n\t\tif (this.submenuItemIndex !== null) {\n\t\t\tthis.selectedIndex = this.submenuItemIndex;\n\t\t\tthis.submenuItemIndex = null;\n\t\t}\n\t}\n\n\tprivate applyFilter(query: string): void {\n\t\tthis.filteredItems = fuzzyFilter(this.items, query, (item) => item.label);\n\t\tthis.selectedIndex = 0;\n\t}\n\n\tprivate addHintLine(lines: string[], width: number): void {\n\t\tlines.push(\"\");\n\t\tlines.push(\n\t\t\ttruncateToWidth(\n\t\t\t\tthis.theme.hint(\n\t\t\t\t\tthis.searchEnabled\n\t\t\t\t\t\t? \" Type to search · Enter/Space to change · Esc to cancel\"\n\t\t\t\t\t\t: \" Enter/Space to change · Esc to cancel\",\n\t\t\t\t),\n\t\t\t\twidth,\n\t\t\t),\n\t\t);\n\t}\n}\n"]}