llm-testrunner-components 1.0.6 → 1.0.9

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 (266) hide show
  1. package/README.md +101 -100
  2. package/dist/cjs/app-chips_5.cjs.entry.js +158 -0
  3. package/dist/cjs/app-chips_5.cjs.entry.js.map +1 -0
  4. package/dist/cjs/app-globals-Chb-oJtg.js +34 -0
  5. package/dist/cjs/app-globals-Chb-oJtg.js.map +1 -0
  6. package/dist/cjs/index-By1scwl6.js +25542 -0
  7. package/dist/cjs/index-By1scwl6.js.map +1 -0
  8. package/dist/cjs/index-CgmLNwZO.js +21460 -0
  9. package/dist/cjs/index-CgmLNwZO.js.map +1 -0
  10. package/dist/cjs/index.cjs.js +5 -483
  11. package/dist/cjs/index.cjs.js.map +1 -1
  12. package/dist/cjs/llm-testrunner.cjs.js +6 -4
  13. package/dist/cjs/llm-testrunner.cjs.js.map +1 -1
  14. package/dist/cjs/loader.cjs.js +5 -3
  15. package/dist/collection/collection-manifest.json +8 -3
  16. package/dist/collection/components/error-message/error-message.css +34 -0
  17. package/dist/collection/components/error-message/error-message.js +2 -2
  18. package/dist/collection/components/error-message/error-message.js.map +1 -1
  19. package/dist/collection/components/llm-test-runner/header/llm-test-runner-header.css +60 -0
  20. package/dist/collection/components/llm-test-runner/header/llm-test-runner-header.js +18 -0
  21. package/dist/collection/components/llm-test-runner/header/llm-test-runner-header.js.map +1 -0
  22. package/dist/collection/components/llm-test-runner/llm-test-runner.css +17 -657
  23. package/dist/collection/components/llm-test-runner/llm-test-runner.import-export.test.js +253 -0
  24. package/dist/collection/components/llm-test-runner/llm-test-runner.import-export.test.js.map +1 -0
  25. package/dist/collection/components/llm-test-runner/llm-test-runner.js +191 -200
  26. package/dist/collection/components/llm-test-runner/llm-test-runner.js.map +1 -1
  27. package/dist/collection/components/llm-test-runner/test-cases/actions/row-actions.css +28 -0
  28. package/dist/collection/components/llm-test-runner/test-cases/actions/row-actions.js +6 -0
  29. package/dist/collection/components/llm-test-runner/test-cases/actions/row-actions.js.map +1 -0
  30. package/dist/collection/components/llm-test-runner/test-cases/evaluation/evaluation-summary.css +67 -0
  31. package/dist/collection/components/llm-test-runner/test-cases/evaluation/evaluation-summary.js +5 -0
  32. package/dist/collection/components/llm-test-runner/test-cases/evaluation/evaluation-summary.js.map +1 -0
  33. package/dist/collection/components/llm-test-runner/test-cases/llm-test-case-row.css +42 -0
  34. package/dist/collection/components/llm-test-runner/test-cases/llm-test-case-row.js +39 -0
  35. package/dist/collection/components/llm-test-runner/test-cases/llm-test-case-row.js.map +1 -0
  36. package/dist/collection/components/llm-test-runner/test-cases/llm-test-cases.css +39 -0
  37. package/dist/collection/components/llm-test-runner/test-cases/llm-test-cases.js +7 -0
  38. package/dist/collection/components/llm-test-runner/test-cases/llm-test-cases.js.map +1 -0
  39. package/dist/collection/components/llm-test-runner/test-cases/output/response-output.css +51 -0
  40. package/dist/collection/components/llm-test-runner/test-cases/output/response-output.js +5 -0
  41. package/dist/collection/components/llm-test-runner/test-cases/output/response-output.js.map +1 -0
  42. package/dist/collection/global/env.js +3 -1
  43. package/dist/collection/global/env.js.map +1 -1
  44. package/dist/collection/index.js.map +1 -1
  45. package/dist/collection/lib/evaluation/constants.js +14 -0
  46. package/dist/collection/lib/evaluation/constants.js.map +1 -0
  47. package/dist/collection/lib/evaluation/evaluation-engine.js +45 -45
  48. package/dist/collection/lib/evaluation/evaluation-engine.js.map +1 -1
  49. package/dist/collection/lib/evaluation/evaluation-service.js +33 -0
  50. package/dist/collection/lib/evaluation/evaluation-service.js.map +1 -0
  51. package/dist/collection/lib/evaluation/evaluators/bleu/bleu-evaluator.js +116 -0
  52. package/dist/collection/lib/evaluation/evaluators/bleu/bleu-evaluator.js.map +1 -0
  53. package/dist/collection/lib/evaluation/evaluators/bleu/tests/bleu.test.js +352 -0
  54. package/dist/collection/lib/evaluation/evaluators/bleu/tests/bleu.test.js.map +1 -0
  55. package/dist/collection/lib/evaluation/evaluators/exact/exact.js +44 -0
  56. package/dist/collection/lib/evaluation/evaluators/exact/exact.js.map +1 -0
  57. package/dist/collection/lib/evaluation/evaluators/rouge1-evaluator.js +88 -0
  58. package/dist/collection/lib/evaluation/evaluators/rouge1-evaluator.js.map +1 -0
  59. package/dist/collection/lib/evaluation/evaluators/rougeL-evaluator.js +82 -0
  60. package/dist/collection/lib/evaluation/evaluators/rougeL-evaluator.js.map +1 -0
  61. package/dist/collection/lib/evaluation/evaluators/rougeL-evaluator.test.js +326 -0
  62. package/dist/collection/lib/evaluation/evaluators/rougeL-evaluator.test.js.map +1 -0
  63. package/dist/collection/lib/evaluation/evaluators/semantic/SemanticEvaluator.js +69 -0
  64. package/dist/collection/lib/evaluation/evaluators/semantic/SemanticEvaluator.js.map +1 -0
  65. package/dist/collection/lib/evaluation/evaluators/semantic/evaluate-keywords.js +56 -0
  66. package/dist/collection/lib/evaluation/evaluators/semantic/evaluate-keywords.js.map +1 -0
  67. package/dist/collection/lib/evaluation/evaluators/semantic/index.js +7 -0
  68. package/dist/collection/lib/evaluation/evaluators/semantic/index.js.map +1 -0
  69. package/dist/collection/lib/evaluation/evaluators/semantic/model-loader.js +19 -0
  70. package/dist/collection/lib/evaluation/evaluators/semantic/model-loader.js.map +1 -0
  71. package/dist/collection/lib/evaluation/evaluators/semantic/similarity-utils.js +16 -0
  72. package/dist/collection/lib/evaluation/evaluators/semantic/similarity-utils.js.map +1 -0
  73. package/dist/collection/lib/evaluation/evaluators/semantic/tests/evaluate-keywords.test.js +65 -0
  74. package/dist/collection/lib/evaluation/evaluators/semantic/tests/evaluate-keywords.test.js.map +1 -0
  75. package/dist/collection/lib/evaluation/evaluators/semantic/text-utils.js +5 -0
  76. package/dist/collection/lib/evaluation/evaluators/semantic/text-utils.js.map +1 -0
  77. package/dist/collection/lib/evaluation/index.js.map +1 -1
  78. package/dist/collection/lib/evaluation/rouge1-evaluator.test.js +117 -0
  79. package/dist/collection/lib/evaluation/rouge1-evaluator.test.js.map +1 -0
  80. package/dist/collection/lib/evaluation/types.js.map +1 -1
  81. package/dist/collection/lib/file/file-download.js +18 -0
  82. package/dist/collection/lib/file/file-download.js.map +1 -0
  83. package/dist/collection/lib/file/file-reader.js +14 -0
  84. package/dist/collection/lib/file/file-reader.js.map +1 -0
  85. package/dist/collection/lib/form/components/app-chips.css +97 -0
  86. package/dist/collection/lib/form/components/app-chips.js +155 -0
  87. package/dist/collection/lib/form/components/app-chips.js.map +1 -0
  88. package/dist/collection/lib/form/components/app-select.css +28 -0
  89. package/dist/collection/lib/form/components/app-select.js +101 -0
  90. package/dist/collection/lib/form/components/app-select.js.map +1 -0
  91. package/dist/collection/lib/form/components/app-textarea.css +38 -0
  92. package/dist/collection/lib/form/components/app-textarea.js +126 -0
  93. package/dist/collection/lib/form/components/app-textarea.js.map +1 -0
  94. package/dist/collection/lib/form/form-builder.js +171 -0
  95. package/dist/collection/lib/form/form-builder.js.map +1 -0
  96. package/dist/collection/lib/form/schema/base-input-field-config.js +2 -0
  97. package/dist/collection/lib/form/schema/base-input-field-config.js.map +1 -0
  98. package/dist/collection/lib/form/schema/form-control-config.js +2 -0
  99. package/dist/collection/lib/form/schema/form-control-config.js.map +1 -0
  100. package/dist/collection/lib/form/schema/index.js +8 -0
  101. package/dist/collection/lib/form/schema/index.js.map +1 -0
  102. package/dist/collection/lib/import-export/test-results-csv.js +65 -0
  103. package/dist/collection/lib/import-export/test-results-csv.js.map +1 -0
  104. package/dist/collection/lib/import-export/test-suite-exporter.js +15 -0
  105. package/dist/collection/lib/import-export/test-suite-exporter.js.map +1 -0
  106. package/dist/collection/lib/import-export/test-suite-importer.js +44 -0
  107. package/dist/collection/lib/import-export/test-suite-importer.js.map +1 -0
  108. package/dist/collection/lib/rate-limited-fetcher/rate-limited-fetcher.js +6 -6
  109. package/dist/collection/lib/rate-limited-fetcher/rate-limited-fetcher.js.map +1 -1
  110. package/dist/collection/lib/test-cases/test-case-factory.js +56 -0
  111. package/dist/collection/lib/test-cases/test-case-factory.js.map +1 -0
  112. package/dist/collection/lib/test-cases/test-case-mutations.js +16 -0
  113. package/dist/collection/lib/test-cases/test-case-mutations.js.map +1 -0
  114. package/dist/collection/lib/ui/button/button.css +113 -0
  115. package/dist/collection/lib/ui/button/button.js +21 -0
  116. package/dist/collection/lib/ui/button/button.js.map +1 -0
  117. package/dist/collection/lib/ui/button/index.js +2 -0
  118. package/dist/collection/lib/ui/button/index.js.map +1 -0
  119. package/dist/collection/lib/ui/icon-button/icon-button.css +77 -0
  120. package/dist/collection/lib/ui/icon-button/icon-button.js +19 -0
  121. package/dist/collection/lib/ui/icon-button/icon-button.js.map +1 -0
  122. package/dist/collection/lib/ui/icon-button/index.js +2 -0
  123. package/dist/collection/lib/ui/icon-button/index.js.map +1 -0
  124. package/dist/collection/services/adapters.js +2 -0
  125. package/dist/collection/services/adapters.js.map +1 -0
  126. package/dist/collection/services/models/gemini.js +17 -0
  127. package/dist/collection/services/models/gemini.js.map +1 -0
  128. package/dist/collection/styles/tokens.css +180 -0
  129. package/dist/collection/types/evaluation.js +2 -0
  130. package/dist/collection/types/evaluation.js.map +1 -0
  131. package/dist/collection/types/llm-test-runner.js +2 -0
  132. package/dist/collection/types/llm-test-runner.js.map +1 -0
  133. package/dist/components/app-chips.d.ts +11 -0
  134. package/dist/components/app-chips.js +2 -0
  135. package/dist/components/app-chips.js.map +1 -0
  136. package/dist/components/app-select.d.ts +11 -0
  137. package/dist/components/app-select.js +2 -0
  138. package/dist/components/app-select.js.map +1 -0
  139. package/dist/components/app-textarea.d.ts +11 -0
  140. package/dist/components/app-textarea.js +2 -0
  141. package/dist/components/app-textarea.js.map +1 -0
  142. package/dist/components/form-builder.d.ts +11 -0
  143. package/dist/components/form-builder.js +2 -0
  144. package/dist/components/form-builder.js.map +1 -0
  145. package/dist/components/index.d.ts +2 -0
  146. package/dist/components/index.js +1 -13
  147. package/dist/components/index.js.map +1 -1
  148. package/dist/components/llm-test-runner.js +1 -8
  149. package/dist/components/llm-test-runner.js.map +1 -1
  150. package/dist/components/p--2rdv_J9.js +2 -0
  151. package/dist/components/p--2rdv_J9.js.map +1 -0
  152. package/dist/components/p-B7J48VNq.js +2 -0
  153. package/dist/components/p-B7J48VNq.js.map +1 -0
  154. package/dist/components/p-BCB1rjPS.js +7 -0
  155. package/dist/components/p-BCB1rjPS.js.map +1 -0
  156. package/dist/components/p-BQhb2H_a.js +2 -0
  157. package/dist/components/p-BQhb2H_a.js.map +1 -0
  158. package/dist/components/p-D9BrlHdP.js +297 -0
  159. package/dist/components/p-D9BrlHdP.js.map +1 -0
  160. package/dist/components/p-DtCkZ1g2.js +2 -0
  161. package/dist/components/p-DtCkZ1g2.js.map +1 -0
  162. package/dist/esm/app-chips_5.entry.js +153 -0
  163. package/dist/esm/app-chips_5.entry.js.map +1 -0
  164. package/dist/esm/app-globals-DbR5vV7d.js +32 -0
  165. package/dist/esm/app-globals-DbR5vV7d.js.map +1 -0
  166. package/dist/esm/index-Bvg6mh1M.js +25539 -0
  167. package/dist/esm/index-Bvg6mh1M.js.map +1 -0
  168. package/dist/esm/index-DxzhGhec.js +21450 -0
  169. package/dist/esm/index-DxzhGhec.js.map +1 -0
  170. package/dist/esm/index.js +4 -486
  171. package/dist/esm/index.js.map +1 -1
  172. package/dist/esm/llm-testrunner.js +7 -5
  173. package/dist/esm/llm-testrunner.js.map +1 -1
  174. package/dist/esm/loader.js +6 -4
  175. package/dist/llm-testrunner/index.esm.js +1 -1
  176. package/dist/llm-testrunner/index.esm.js.map +1 -1
  177. package/dist/llm-testrunner/llm-testrunner.esm.js +1 -1
  178. package/dist/llm-testrunner/llm-testrunner.esm.js.map +1 -1
  179. package/dist/llm-testrunner/p-3f04b0fb.entry.js +2 -0
  180. package/dist/llm-testrunner/p-3f04b0fb.entry.js.map +1 -0
  181. package/dist/llm-testrunner/p-DFds8y01.js +7 -0
  182. package/dist/llm-testrunner/p-DFds8y01.js.map +1 -0
  183. package/dist/llm-testrunner/p-DxzhGhec.js +298 -0
  184. package/dist/llm-testrunner/p-DxzhGhec.js.map +1 -0
  185. package/dist/llm-testrunner/p-GQwFOmwJ.js +2 -0
  186. package/dist/llm-testrunner/p-GQwFOmwJ.js.map +1 -0
  187. package/dist/react/components.d.ts +32 -2
  188. package/dist/react/components.d.ts.map +1 -1
  189. package/dist/react/components.js +44 -2
  190. package/dist/types/components/llm-test-runner/header/llm-test-runner-header.d.ts +14 -0
  191. package/dist/types/components/llm-test-runner/llm-test-runner.d.ts +13 -29
  192. package/dist/types/components/llm-test-runner/llm-test-runner.import-export.test.d.ts +1 -0
  193. package/dist/types/components/llm-test-runner/test-cases/actions/row-actions.d.ts +8 -0
  194. package/dist/types/components/llm-test-runner/test-cases/evaluation/evaluation-summary.d.ts +7 -0
  195. package/dist/types/components/llm-test-runner/test-cases/llm-test-case-row.d.ts +25 -0
  196. package/dist/types/components/llm-test-runner/test-cases/llm-test-cases.d.ts +26 -0
  197. package/dist/types/components/llm-test-runner/test-cases/output/response-output.d.ts +6 -0
  198. package/dist/types/components.d.ts +199 -4
  199. package/dist/types/global/env.d.ts +2 -0
  200. package/dist/types/index.d.ts +1 -1
  201. package/dist/types/lib/evaluation/constants.d.ts +11 -0
  202. package/dist/types/lib/evaluation/evaluation-engine.d.ts +0 -4
  203. package/dist/types/lib/evaluation/evaluation-service.d.ts +15 -0
  204. package/dist/types/lib/evaluation/evaluators/bleu/bleu-evaluator.d.ts +18 -0
  205. package/dist/types/lib/evaluation/evaluators/bleu/tests/bleu.test.d.ts +1 -0
  206. package/dist/types/lib/evaluation/evaluators/exact/exact.d.ts +2 -0
  207. package/dist/types/lib/evaluation/evaluators/rouge1-evaluator.d.ts +17 -0
  208. package/dist/types/lib/evaluation/evaluators/rougeL-evaluator.d.ts +2 -0
  209. package/dist/types/lib/evaluation/evaluators/rougeL-evaluator.test.d.ts +1 -0
  210. package/dist/types/lib/evaluation/evaluators/semantic/SemanticEvaluator.d.ts +6 -0
  211. package/dist/types/lib/evaluation/evaluators/semantic/evaluate-keywords.d.ts +7 -0
  212. package/dist/types/lib/evaluation/evaluators/semantic/index.d.ts +2 -0
  213. package/dist/types/lib/evaluation/evaluators/semantic/model-loader.d.ts +1 -0
  214. package/dist/types/lib/evaluation/evaluators/semantic/similarity-utils.d.ts +1 -0
  215. package/dist/types/lib/evaluation/evaluators/semantic/tests/evaluate-keywords.test.d.ts +1 -0
  216. package/dist/types/lib/evaluation/evaluators/semantic/text-utils.d.ts +1 -0
  217. package/dist/types/lib/evaluation/index.d.ts +2 -2
  218. package/dist/types/lib/evaluation/rouge1-evaluator.test.d.ts +1 -0
  219. package/dist/types/lib/evaluation/types.d.ts +19 -7
  220. package/dist/types/lib/file/file-download.d.ts +7 -0
  221. package/dist/types/lib/file/file-reader.d.ts +6 -0
  222. package/dist/types/lib/form/components/app-chips.d.ts +20 -0
  223. package/dist/types/lib/form/components/app-select.d.ts +7 -0
  224. package/dist/types/lib/form/components/app-textarea.d.ts +14 -0
  225. package/dist/types/lib/form/form-builder.d.ts +24 -0
  226. package/dist/types/lib/form/schema/base-input-field-config.d.ts +37 -0
  227. package/dist/types/lib/form/schema/form-control-config.d.ts +13 -0
  228. package/dist/types/lib/form/schema/index.d.ts +9 -0
  229. package/dist/types/lib/import-export/test-results-csv.d.ts +13 -0
  230. package/dist/types/lib/import-export/test-suite-exporter.d.ts +16 -0
  231. package/dist/types/lib/import-export/test-suite-importer.d.ts +12 -0
  232. package/dist/types/lib/rate-limited-fetcher/rate-limited-fetcher.d.ts +1 -1
  233. package/dist/types/lib/test-cases/test-case-factory.d.ts +12 -0
  234. package/dist/types/lib/test-cases/test-case-mutations.d.ts +9 -0
  235. package/dist/types/lib/ui/button/button.d.ts +13 -0
  236. package/dist/types/lib/ui/button/index.d.ts +2 -0
  237. package/dist/types/lib/ui/icon-button/icon-button.d.ts +11 -0
  238. package/dist/types/lib/ui/icon-button/index.d.ts +2 -0
  239. package/dist/types/services/adapters.d.ts +3 -0
  240. package/dist/types/services/models/gemini.d.ts +11 -0
  241. package/dist/types/stencil-public-runtime.d.ts +110 -6
  242. package/dist/types/types/evaluation.d.ts +9 -0
  243. package/dist/types/types/llm-test-runner.d.ts +22 -0
  244. package/package.json +30 -6
  245. package/dist/cjs/app-globals-CbbEbofA.js +0 -14
  246. package/dist/cjs/app-globals-CbbEbofA.js.map +0 -1
  247. package/dist/cjs/index-D-FySkoV.js +0 -1470
  248. package/dist/cjs/index-D-FySkoV.js.map +0 -1
  249. package/dist/cjs/llm-test-runner.cjs.entry.js +0 -9
  250. package/dist/cjs/llm-test-runner.entry.cjs.js.map +0 -1
  251. package/dist/components/p-CYUbsbxt.js +0 -1770
  252. package/dist/components/p-CYUbsbxt.js.map +0 -1
  253. package/dist/esm/app-globals-BOQOUavG.js +0 -12
  254. package/dist/esm/app-globals-BOQOUavG.js.map +0 -1
  255. package/dist/esm/index-cncubhtM.js +0 -1463
  256. package/dist/esm/index-cncubhtM.js.map +0 -1
  257. package/dist/esm/llm-test-runner.entry.js +0 -3
  258. package/dist/esm/llm-test-runner.entry.js.map +0 -1
  259. package/dist/llm-testrunner/llm-test-runner.entry.esm.js.map +0 -1
  260. package/dist/llm-testrunner/loader.esm.js.map +0 -1
  261. package/dist/llm-testrunner/p-BOQOUavG.js +0 -2
  262. package/dist/llm-testrunner/p-BOQOUavG.js.map +0 -1
  263. package/dist/llm-testrunner/p-cncubhtM.js +0 -3
  264. package/dist/llm-testrunner/p-cncubhtM.js.map +0 -1
  265. package/dist/llm-testrunner/p-f68fd660.entry.js +0 -2
  266. package/dist/llm-testrunner/p-f68fd660.entry.js.map +0 -1
@@ -1,14 +1,14 @@
1
1
  export class RateLimitedFetcher {
2
2
  queue = [];
3
3
  delay; // delay in milliseconds
4
- intervalId;
4
+ timer;
5
5
  constructor(delayMs) {
6
6
  this.delay = delayMs;
7
7
  }
8
8
  startQueue() {
9
- if (this.intervalId)
9
+ if (this.timer)
10
10
  return;
11
- this.intervalId = setInterval(() => {
11
+ this.timer = setInterval(() => {
12
12
  const task = this.queue.shift();
13
13
  if (task)
14
14
  task();
@@ -26,9 +26,9 @@ export class RateLimitedFetcher {
26
26
  });
27
27
  }
28
28
  stop() {
29
- if (this.intervalId) {
30
- clearInterval(this.intervalId);
31
- this.intervalId = undefined;
29
+ if (this.timer) {
30
+ clearInterval(this.timer);
31
+ this.timer = undefined;
32
32
  }
33
33
  }
34
34
  async runAll(tasks) {
@@ -1 +1 @@
1
- {"version":3,"file":"rate-limited-fetcher.js","sourceRoot":"","sources":["../../../src/lib/rate-limited-fetcher/rate-limited-fetcher.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,kBAAkB;IACrB,KAAK,GAAmB,EAAE,CAAC;IAC3B,KAAK,CAAS,CAAC,wBAAwB;IACvC,UAAU,CAAO;IAEzB,YAAY,OAAe;QACzB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;IACvB,CAAC;IAEO,UAAU;QAChB,IAAI,IAAI,CAAC,UAAU;YAAE,OAAO;QAC5B,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;YACjC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAChC,IAAI,IAAI;gBAAE,IAAI,EAAE,CAAC;YACjB,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC5B,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,CAAC;QACH,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;IAEM,QAAQ,CAAI,IAAsB;QACvC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;gBACnB,IAAI,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACrC,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,UAAU,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,IAAI;QACT,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC/B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC9B,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,MAAM,CAAI,KAA8B;QACnD,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QACxD,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;CACF","sourcesContent":["export class RateLimitedFetcher {\n private queue: (() => void)[] = [];\n private delay: number; // delay in milliseconds\n private intervalId?: any;\n\n constructor(delayMs: number) {\n this.delay = delayMs;\n }\n\n private startQueue() {\n if (this.intervalId) return;\n this.intervalId = setInterval(() => {\n const task = this.queue.shift();\n if (task) task();\n if (this.queue.length === 0) {\n this.stop();\n }\n }, this.delay);\n }\n\n public schedule<T>(task: () => Promise<T>): Promise<T> {\n return new Promise((resolve, reject) => {\n this.queue.push(() => {\n task().then(resolve).catch(reject);\n });\n this.startQueue(); \n });\n }\n\n public stop() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n this.intervalId = undefined;\n }\n }\n\n public async runAll<T>(tasks: Array<() => Promise<T>>): Promise<T[]> {\n const promises = tasks.map(task => this.schedule(task));\n return Promise.all(promises);\n }\n}\n"]}
1
+ {"version":3,"file":"rate-limited-fetcher.js","sourceRoot":"","sources":["../../../src/lib/rate-limited-fetcher/rate-limited-fetcher.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,kBAAkB;IACrB,KAAK,GAAmB,EAAE,CAAC;IAC3B,KAAK,CAAS,CAAC,wBAAwB;IACvC,KAAK,CAAkC;IAE/C,YAAY,OAAe;QACzB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;IACvB,CAAC;IAEO,UAAU;QAChB,IAAI,IAAI,CAAC,KAAK;YAAE,OAAO;QACvB,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;YAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAChC,IAAI,IAAI;gBAAE,IAAI,EAAE,CAAC;YACjB,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC5B,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,CAAC;QACH,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;IAEM,QAAQ,CAAI,IAAsB;QACvC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;gBACnB,IAAI,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACrC,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,UAAU,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,IAAI;QACT,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC1B,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACzB,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,MAAM,CAAI,KAA8B;QACnD,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QACxD,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;CACF","sourcesContent":["export class RateLimitedFetcher {\n private queue: (() => void)[] = [];\n private delay: number; // delay in milliseconds\n private timer?: ReturnType<typeof setInterval>;\n\n constructor(delayMs: number) {\n this.delay = delayMs;\n }\n\n private startQueue() {\n if (this.timer) return;\n this.timer = setInterval(() => {\n const task = this.queue.shift();\n if (task) task();\n if (this.queue.length === 0) {\n this.stop();\n }\n }, this.delay);\n }\n\n public schedule<T>(task: () => Promise<T>): Promise<T> {\n return new Promise((resolve, reject) => {\n this.queue.push(() => {\n task().then(resolve).catch(reject);\n });\n this.startQueue();\n });\n }\n\n public stop() {\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = undefined;\n }\n }\n\n public async runAll<T>(tasks: Array<() => Promise<T>>): Promise<T[]> {\n const promises = tasks.map(task => this.schedule(task));\n return Promise.all(promises);\n }\n}\n"]}
@@ -0,0 +1,56 @@
1
+ import { v4 as uuidv4 } from "uuid";
2
+ import { EvaluationApproach } from "../evaluation/constants";
3
+ /**
4
+ * Creates a new test case with default values
5
+ * @returns A new TestCase object with a unique ID
6
+ */
7
+ export function createTestCase() {
8
+ return {
9
+ id: uuidv4(),
10
+ question: '',
11
+ expectedOutcome: '',
12
+ evaluationParameters: {
13
+ approach: EvaluationApproach.EXACT,
14
+ },
15
+ isRunning: false,
16
+ };
17
+ }
18
+ // Type guard to safely check if value is a record
19
+ function isRecord(value) {
20
+ return typeof value === 'object' && value !== null;
21
+ }
22
+ // Type guard for evaluation approach
23
+ function isValidApproach(value) {
24
+ return (typeof value === 'string' &&
25
+ ['exact', 'semantic', 'rouge-1', 'rouge-L'].includes(value));
26
+ }
27
+ /**
28
+ * Creates a test case from imported data with defaults
29
+ * @param data - Partial test case data from import
30
+ * @returns A new TestCase object with defaults applied
31
+ */
32
+ export function createTestCaseFromImport(data) {
33
+ if (!isRecord(data)) {
34
+ return createTestCase();
35
+ }
36
+ const evaluationParameters = isRecord(data.evaluationParameters)
37
+ ? data.evaluationParameters
38
+ : undefined;
39
+ const approach = evaluationParameters && isValidApproach(evaluationParameters.approach)
40
+ ? evaluationParameters.approach
41
+ : EvaluationApproach.EXACT;
42
+ const threshold = evaluationParameters && typeof evaluationParameters.threshold === 'number'
43
+ ? evaluationParameters.threshold
44
+ : 0.6;
45
+ return {
46
+ id: uuidv4(),
47
+ question: typeof data.question === 'string' ? data.question : '',
48
+ expectedOutcome: typeof data.expectedOutcome === 'string' ? data.expectedOutcome : '',
49
+ evaluationParameters: {
50
+ approach,
51
+ threshold,
52
+ },
53
+ isRunning: false,
54
+ };
55
+ }
56
+ //# sourceMappingURL=test-case-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-case-factory.js","sourceRoot":"","sources":["../../../src/lib/test-cases/test-case-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D;;;GAGG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO;QACL,EAAE,EAAE,MAAM,EAAE;QACZ,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,EAAE;QACnB,oBAAoB,EAAE;YACpB,QAAQ,EAAE,kBAAkB,CAAC,KAAK;SACnC;QACD,SAAS,EAAE,KAAK;KACjB,CAAC;AACJ,CAAC;AAED,kDAAkD;AAClD,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACrD,CAAC;AAED,qCAAqC;AACrC,SAAS,eAAe,CAAC,KAAc;IACrC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAC5D,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAAa;IACpD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,OAAO,cAAc,EAAE,CAAC;IAC1B,CAAC;IAED,MAAM,oBAAoB,GAAG,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC;QAC9D,CAAC,CAAC,IAAI,CAAC,oBAAoB;QAC3B,CAAC,CAAC,SAAS,CAAC;IAEd,MAAM,QAAQ,GACZ,oBAAoB,IAAI,eAAe,CAAC,oBAAoB,CAAC,QAAQ,CAAC;QACpE,CAAC,CAAC,oBAAoB,CAAC,QAAQ;QAC/B,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC;IAE/B,MAAM,SAAS,GACb,oBAAoB,IAAI,OAAO,oBAAoB,CAAC,SAAS,KAAK,QAAQ;QACxE,CAAC,CAAC,oBAAoB,CAAC,SAAS;QAChC,CAAC,CAAC,GAAG,CAAC;IAEV,OAAO;QACL,EAAE,EAAE,MAAM,EAAE;QACZ,QAAQ,EAAE,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;QAChE,eAAe,EAAE,OAAO,IAAI,CAAC,eAAe,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE;QAErF,oBAAoB,EAAE;YACpB,QAAQ;YACR,SAAS;SACV;QACD,SAAS,EAAE,KAAK;KACjB,CAAC;AACJ,CAAC","sourcesContent":["import { v4 as uuidv4 } from 'uuid';\nimport { TestCase } from '../../types/llm-test-runner';\nimport { EvaluationApproach } from '../evaluation/constants';\n\n/**\n * Creates a new test case with default values\n * @returns A new TestCase object with a unique ID\n */\nexport function createTestCase(): TestCase {\n return {\n id: uuidv4(),\n question: '',\n expectedOutcome: '',\n evaluationParameters: {\n approach: EvaluationApproach.EXACT,\n },\n isRunning: false,\n };\n}\n\n// Type guard to safely check if value is a record\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\n// Type guard for evaluation approach\nfunction isValidApproach(value: unknown): value is EvaluationApproach {\n return (\n typeof value === 'string' &&\n ['exact', 'semantic', 'rouge-1', 'rouge-L'].includes(value)\n );\n}\n\n/**\n * Creates a test case from imported data with defaults\n * @param data - Partial test case data from import\n * @returns A new TestCase object with defaults applied\n */\nexport function createTestCaseFromImport(data: unknown): TestCase {\n if (!isRecord(data)) {\n return createTestCase();\n }\n\n const evaluationParameters = isRecord(data.evaluationParameters)\n ? data.evaluationParameters\n : undefined;\n\n const approach =\n evaluationParameters && isValidApproach(evaluationParameters.approach)\n ? evaluationParameters.approach\n : EvaluationApproach.EXACT;\n\n const threshold =\n evaluationParameters && typeof evaluationParameters.threshold === 'number'\n ? evaluationParameters.threshold\n : 0.6;\n\n return {\n id: uuidv4(),\n question: typeof data.question === 'string' ? data.question : '',\n expectedOutcome: typeof data.expectedOutcome === 'string' ? data.expectedOutcome : '',\n\n evaluationParameters: {\n approach,\n threshold,\n },\n isRunning: false,\n };\n}\n"]}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Updates the evaluation approach for a test case
3
+ * @param testCase - The test case to update
4
+ * @param approach - The new evaluation approach
5
+ * @returns Updated test case with the new evaluation approach
6
+ */
7
+ export function updateApproach(testCase, approach) {
8
+ return {
9
+ ...testCase,
10
+ evaluationParameters: {
11
+ ...testCase.evaluationParameters,
12
+ approach: approach,
13
+ },
14
+ };
15
+ }
16
+ //# sourceMappingURL=test-case-mutations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-case-mutations.js","sourceRoot":"","sources":["../../../src/lib/test-cases/test-case-mutations.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAC5B,QAAkB,EAClB,QAA4B;IAE5B,OAAO;QACL,GAAG,QAAQ;QACX,oBAAoB,EAAE;YACpB,GAAG,QAAQ,CAAC,oBAAoB;YAChC,QAAQ,EAAE,QAAQ;SACnB;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { TestCase } from '../../types/llm-test-runner';\nimport { EvaluationApproach } from '../evaluation/constants';\n\n/**\n * Updates the evaluation approach for a test case\n * @param testCase - The test case to update\n * @param approach - The new evaluation approach\n * @returns Updated test case with the new evaluation approach\n */\nexport function updateApproach(\n testCase: TestCase,\n approach: EvaluationApproach,\n): TestCase {\n return {\n ...testCase,\n evaluationParameters: {\n ...testCase.evaluationParameters,\n approach: approach,\n },\n };\n}\n"]}
@@ -0,0 +1,113 @@
1
+ /* Button Base Styles */
2
+ .ui-button {
3
+ display: inline-flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ gap: var(--spacing-2);
7
+ border-radius: var(--radius);
8
+ font-size: var(--font-size-sm);
9
+ font-weight: var(--font-weight-medium);
10
+ cursor: pointer;
11
+ transition: all 0.2s ease;
12
+ border: var(--border-width) solid transparent;
13
+ outline: none;
14
+ position: relative;
15
+ white-space: nowrap;
16
+ }
17
+
18
+ .ui-button .icon {
19
+ display: inline-flex;
20
+ align-items: center;
21
+ justify-content: center;
22
+ font-size: var(--font-size-base);
23
+ line-height: var(--line-height-none);
24
+ }
25
+
26
+ .ui-button:focus-visible {
27
+ outline: 2px solid var(--ring);
28
+ outline-offset: 2px;
29
+ }
30
+
31
+ .ui-button--disabled,
32
+ .ui-button:disabled {
33
+ opacity: var(--opacity-disabled);
34
+ cursor: not-allowed;
35
+ pointer-events: none;
36
+ }
37
+
38
+ .ui-button--loading {
39
+ opacity: var(--opacity-muted);
40
+ cursor: wait;
41
+ }
42
+
43
+ /* Size Variants */
44
+ .ui-button--sm {
45
+ padding: calc(var(--spacing) * 1.5) var(--spacing-3);
46
+ font-size: var(--font-size-xs);
47
+ }
48
+
49
+ .ui-button--sm .icon {
50
+ font-size: var(--font-size-sm);
51
+ }
52
+
53
+ .ui-button--md {
54
+ padding: var(--spacing-2) var(--spacing-4);
55
+ font-size: var(--font-size-sm);
56
+ }
57
+
58
+ .ui-button--md .icon {
59
+ font-size: var(--font-size-base);
60
+ }
61
+
62
+ .ui-button--lg {
63
+ padding: calc(var(--spacing) * 2.5) var(--spacing-5);
64
+ font-size: var(--font-size-base);
65
+ }
66
+
67
+ .ui-button--lg .icon {
68
+ font-size: var(--font-size-lg);
69
+ }
70
+
71
+ /* Color Variants */
72
+ .ui-button--primary {
73
+ background: var(--primary);
74
+ color: var(--primary-foreground);
75
+ }
76
+
77
+ .ui-button--primary:hover:not(:disabled):not(.ui-button--loading) {
78
+ opacity: 0.9;
79
+ transform: translateY(-1px);
80
+ box-shadow: var(--shadow-sm);
81
+ }
82
+
83
+ .ui-button--secondary {
84
+ background: var(--secondary);
85
+ color: var(--secondary-foreground);
86
+ }
87
+
88
+ .ui-button--secondary:hover:not(:disabled):not(.ui-button--loading) {
89
+ opacity: var(--opacity-hover);
90
+ transform: translateY(-1px);
91
+ }
92
+
93
+ .ui-button--outline {
94
+ background: transparent;
95
+ border-color: var(--border);
96
+ color: var(--foreground);
97
+ }
98
+
99
+ .ui-button--outline:hover:not(:disabled):not(.ui-button--loading) {
100
+ background: var(--accent);
101
+ transform: translateY(-1px);
102
+ }
103
+
104
+ .ui-button--destructive {
105
+ background: var(--destructive);
106
+ color: var(--destructive-foreground);
107
+ }
108
+
109
+ .ui-button--destructive:hover:not(:disabled):not(.ui-button--loading) {
110
+ opacity: 0.9;
111
+ transform: translateY(-1px);
112
+ }
113
+
@@ -0,0 +1,21 @@
1
+ import { h } from "@stencil/core";
2
+ export const Button = (props, children) => {
3
+ const { variant = 'primary', size = 'md', disabled = false, loading = false, onClick, type = 'button', 'class': className = '', icon, 'aria-label': ariaLabel, } = props;
4
+ const baseClass = 'ui-button';
5
+ const variantClass = `ui-button--${variant}`;
6
+ const sizeClass = `ui-button--${size}`;
7
+ const loadingClass = loading ? 'ui-button--loading' : '';
8
+ const disabledClass = disabled ? 'ui-button--disabled' : '';
9
+ const classes = [
10
+ baseClass,
11
+ variantClass,
12
+ sizeClass,
13
+ loadingClass,
14
+ disabledClass,
15
+ className,
16
+ ]
17
+ .filter(Boolean)
18
+ .join(' ');
19
+ return (h("button", { type: type, class: classes, disabled: disabled || loading, onClick: onClick, "aria-busy": loading, "aria-label": ariaLabel }, icon && h("span", { class: "icon" }, icon), children));
20
+ };
21
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../src/lib/ui/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAcvD,MAAM,CAAC,MAAM,MAAM,GAAqC,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;IAC1E,MAAM,EACJ,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,IAAI,EACX,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,OAAO,EACP,IAAI,GAAG,QAAQ,EACf,OAAO,EAAE,SAAS,GAAG,EAAE,EACvB,IAAI,EACJ,YAAY,EAAE,SAAS,GACxB,GAAG,KAAK,CAAC;IAEV,MAAM,SAAS,GAAG,WAAW,CAAC;IAC9B,MAAM,YAAY,GAAG,cAAc,OAAO,EAAE,CAAC;IAC7C,MAAM,SAAS,GAAG,cAAc,IAAI,EAAE,CAAC;IACvC,MAAM,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC;IACzD,MAAM,aAAa,GAAG,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC;IAE5D,MAAM,OAAO,GAAG;QACd,SAAS;QACT,YAAY;QACZ,SAAS;QACT,YAAY;QACZ,aAAa;QACb,SAAS;KACV;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IAEb,OAAO,CACL,cACE,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,QAAQ,IAAI,OAAO,EAC7B,OAAO,EAAE,OAAO,eACL,OAAO,gBACN,SAAS;QAEpB,IAAI,IAAI,YAAM,KAAK,EAAC,MAAM,IAAE,IAAI,CAAQ;QACxC,QAAQ,CACF,CACV,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { h, FunctionalComponent } from '@stencil/core';\n\nexport interface ButtonProps {\n 'variant'?: 'primary' | 'secondary' | 'outline' | 'destructive';\n 'size'?: 'sm' | 'md' | 'lg';\n 'disabled'?: boolean;\n 'loading'?: boolean;\n 'onClick'?: (event: MouseEvent) => void;\n 'type'?: 'button' | 'submit' | 'reset';\n 'class'?: string;\n 'icon'?: string;\n 'aria-label'?: string;\n}\n\nexport const Button: FunctionalComponent<ButtonProps> = (props, children) => {\n const {\n variant = 'primary',\n size = 'md',\n disabled = false,\n loading = false,\n onClick,\n type = 'button',\n 'class': className = '',\n icon,\n 'aria-label': ariaLabel,\n } = props;\n\n const baseClass = 'ui-button';\n const variantClass = `ui-button--${variant}`;\n const sizeClass = `ui-button--${size}`;\n const loadingClass = loading ? 'ui-button--loading' : '';\n const disabledClass = disabled ? 'ui-button--disabled' : '';\n\n const classes = [\n baseClass,\n variantClass,\n sizeClass,\n loadingClass,\n disabledClass,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <button\n type={type}\n class={classes}\n disabled={disabled || loading}\n onClick={onClick}\n aria-busy={loading}\n aria-label={ariaLabel}\n >\n {icon && <span class=\"icon\">{icon}</span>}\n {children}\n </button>\n );\n};\n"]}
@@ -0,0 +1,2 @@
1
+ export { Button } from './button';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/ui/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export { Button } from './button';\nexport type { ButtonProps } from './button';\n\n"]}
@@ -0,0 +1,77 @@
1
+ /* Icon Button Base Styles */
2
+ .ui-icon-button {
3
+ display: inline-flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ padding: var(--spacing-2);
7
+ min-width: var(--spacing-10);
8
+ height: var(--spacing-10);
9
+ border-radius: var(--radius);
10
+ font-size: var(--font-size-base);
11
+ cursor: pointer;
12
+ transition: all 0.2s ease;
13
+ border: var(--border-width) solid transparent;
14
+ outline: none;
15
+ position: relative;
16
+ }
17
+
18
+ .ui-icon-button:focus-visible {
19
+ outline: 2px solid var(--ring);
20
+ outline-offset: 2px;
21
+ }
22
+
23
+ .ui-icon-button--disabled,
24
+ .ui-icon-button:disabled {
25
+ opacity: var(--opacity-disabled);
26
+ cursor: not-allowed;
27
+ pointer-events: none;
28
+ }
29
+
30
+ .ui-icon-button--loading {
31
+ opacity: var(--opacity-muted);
32
+ cursor: wait;
33
+ }
34
+
35
+ /* Color Variants */
36
+ .ui-icon-button--primary {
37
+ background: var(--primary);
38
+ color: var(--primary-foreground);
39
+ }
40
+
41
+ .ui-icon-button--primary:hover:not(:disabled):not(.ui-icon-button--loading) {
42
+ opacity: 0.9;
43
+ transform: translateY(-1px);
44
+ box-shadow: var(--shadow-sm);
45
+ }
46
+
47
+ .ui-icon-button--secondary {
48
+ background: var(--secondary);
49
+ color: var(--secondary-foreground);
50
+ }
51
+
52
+ .ui-icon-button--secondary:hover:not(:disabled):not(.ui-icon-button--loading) {
53
+ opacity: var(--opacity-hover);
54
+ transform: translateY(-1px);
55
+ }
56
+
57
+ .ui-icon-button--outline {
58
+ background: transparent;
59
+ border-color: var(--border);
60
+ color: var(--foreground);
61
+ }
62
+
63
+ .ui-icon-button--outline:hover:not(:disabled):not(.ui-icon-button--loading) {
64
+ background: var(--accent);
65
+ transform: translateY(-1px);
66
+ }
67
+
68
+ .ui-icon-button--destructive {
69
+ background: var(--destructive);
70
+ color: var(--destructive-foreground);
71
+ }
72
+
73
+ .ui-icon-button--destructive:hover:not(:disabled):not(.ui-icon-button--loading) {
74
+ opacity: 0.9;
75
+ transform: translateY(-1px);
76
+ }
77
+
@@ -0,0 +1,19 @@
1
+ import { h } from "@stencil/core";
2
+ export const IconButton = (props, children) => {
3
+ const { variant = 'primary', disabled = false, loading = false, onClick, type = 'button', title, class: className = '', } = props;
4
+ const baseClass = 'ui-icon-button';
5
+ const variantClass = `ui-icon-button--${variant}`;
6
+ const loadingClass = loading ? 'ui-icon-button--loading' : '';
7
+ const disabledClass = disabled ? 'ui-icon-button--disabled' : '';
8
+ const classes = [
9
+ baseClass,
10
+ variantClass,
11
+ loadingClass,
12
+ disabledClass,
13
+ className,
14
+ ]
15
+ .filter(Boolean)
16
+ .join(' ');
17
+ return (h("button", { type: type, class: classes, disabled: disabled || loading, onClick: onClick, title: title, "aria-busy": loading, "aria-label": title }, children));
18
+ };
19
+ //# sourceMappingURL=icon-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-button.js","sourceRoot":"","sources":["../../../../src/lib/ui/icon-button/icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAYvD,MAAM,CAAC,MAAM,UAAU,GAAyC,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;IAClF,MAAM,EACJ,OAAO,GAAG,SAAS,EACnB,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,OAAO,EACP,IAAI,GAAG,QAAQ,EACf,KAAK,EACL,KAAK,EAAE,SAAS,GAAG,EAAE,GACtB,GAAG,KAAK,CAAC;IAEV,MAAM,SAAS,GAAG,gBAAgB,CAAC;IACnC,MAAM,YAAY,GAAG,mBAAmB,OAAO,EAAE,CAAC;IAClD,MAAM,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9D,MAAM,aAAa,GAAG,QAAQ,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE,CAAC;IAEjE,MAAM,OAAO,GAAG;QACd,SAAS;QACT,YAAY;QACZ,YAAY;QACZ,aAAa;QACb,SAAS;KACV;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IAEb,OAAO,CACL,cACE,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,QAAQ,IAAI,OAAO,EAC7B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,eACD,OAAO,gBACN,KAAK,IAEhB,QAAQ,CACF,CACV,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { h, FunctionalComponent } from '@stencil/core';\n\nexport interface IconButtonProps {\n variant?: 'primary' | 'secondary' | 'outline' | 'destructive';\n disabled?: boolean;\n loading?: boolean;\n onClick?: (event: MouseEvent) => void;\n type?: 'button' | 'submit' | 'reset';\n title?: string;\n class?: string;\n}\n\nexport const IconButton: FunctionalComponent<IconButtonProps> = (props, children) => {\n const {\n variant = 'primary',\n disabled = false,\n loading = false,\n onClick,\n type = 'button',\n title,\n class: className = '',\n } = props;\n\n const baseClass = 'ui-icon-button';\n const variantClass = `ui-icon-button--${variant}`;\n const loadingClass = loading ? 'ui-icon-button--loading' : '';\n const disabledClass = disabled ? 'ui-icon-button--disabled' : '';\n\n const classes = [\n baseClass,\n variantClass,\n loadingClass,\n disabledClass,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <button\n type={type}\n class={classes}\n disabled={disabled || loading}\n onClick={onClick}\n title={title}\n aria-busy={loading}\n aria-label={title}\n >\n {children}\n </button>\n );\n};\n\n"]}
@@ -0,0 +1,2 @@
1
+ export { IconButton } from './icon-button';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/ui/icon-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { IconButton } from './icon-button';\nexport type { IconButtonProps } from './icon-button';\n\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=adapters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapters.js","sourceRoot":"","sources":["../../src/services/adapters.ts"],"names":[],"mappings":"","sourcesContent":["export interface LlmAdapter {\n invoke: Awaited<unknown>;\n}\n"]}
@@ -0,0 +1,17 @@
1
+ import { GoogleGenAI } from "@google/genai";
2
+ export class GeminiAdapter {
3
+ sdk;
4
+ constructor(key) {
5
+ this.sdk = new GoogleGenAI({
6
+ apiKey: key,
7
+ });
8
+ }
9
+ async invoke(text) {
10
+ const response = await this.sdk.models.generateContent({
11
+ model: "gemini-3-flash-preview" /* GeminiModels.Gemini3Flash__Preview */,
12
+ contents: text,
13
+ });
14
+ return response.text;
15
+ }
16
+ }
17
+ //# sourceMappingURL=gemini.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini.js","sourceRoot":"","sources":["../../../src/services/models/gemini.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAU5C,MAAM,OAAO,aAAa;IACP,GAAG,CAAC;IAErB,YAAY,GAAW;QACrB,IAAI,CAAC,GAAG,GAAG,IAAI,WAAW,CAAC;YACzB,MAAM,EAAE,GAAG;SACZ,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAY;QACvB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,eAAe,CAAC;YACrD,KAAK,mEAAoC;YACzC,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF","sourcesContent":["import { GoogleGenAI } from '@google/genai';\n\nimport type { LlmAdapter } from '../adapters';\n\nexport const enum GeminiModels {\n Gemini3Pro__Preview = 'gemini-3-pro-preview',\n Gemini3ProImage__Preview = 'gemini-3-pro-image-preview',\n Gemini3Flash__Preview = 'gemini-3-flash-preview',\n}\n\nexport class GeminiAdapter implements LlmAdapter {\n private readonly sdk;\n\n constructor(key: string) {\n this.sdk = new GoogleGenAI({\n apiKey: key,\n });\n }\n\n async invoke(text: string) {\n const response = await this.sdk.models.generateContent({\n model: GeminiModels.Gemini3Flash__Preview,\n contents: text,\n });\n\n return response.text;\n }\n}\n"]}
@@ -0,0 +1,180 @@
1
+ /* Design Tokens - ShadCN-inspired naming */
2
+ /* Using :host for Shadow DOM compatibility */
3
+ :host {
4
+ /* Spacing - Base unit for calculations (similar to Tailwind) */
5
+ --spacing: 0.25rem; /* 4px base unit */
6
+ --spacing-1: calc(var(--spacing) * 1); /* 4px */
7
+ --spacing-2: calc(var(--spacing) * 2); /* 8px */
8
+ --spacing-3: calc(var(--spacing) * 3); /* 12px */
9
+ --spacing-4: calc(var(--spacing) * 4); /* 16px */
10
+ --spacing-5: calc(var(--spacing) * 5); /* 20px */
11
+ --spacing-6: calc(var(--spacing) * 6); /* 24px */
12
+ --spacing-8: calc(var(--spacing) * 8); /* 32px */
13
+ --spacing-10: calc(var(--spacing) * 10); /* 40px */
14
+ --spacing-12: calc(var(--spacing) * 12); /* 48px */
15
+ --spacing-16: calc(var(--spacing) * 16); /* 64px */
16
+ --spacing-20: calc(var(--spacing) * 20); /* 80px */
17
+ --spacing-24: calc(var(--spacing) * 24); /* 96px */
18
+
19
+ /* Border Radius */
20
+ --radius-none: 0;
21
+ --radius-sm: 0.125rem; /* 2px */
22
+ --radius-md: 0.375rem; /* 6px */
23
+ --radius-lg: 0.5rem; /* 8px */
24
+ --radius-xl: 0.75rem; /* 12px */
25
+ --radius-2xl: 1rem; /* 16px */
26
+ --radius-3xl: 1.5rem; /* 24px */
27
+ --radius-full: 9999px;
28
+ --radius: var(--radius-lg); /* Default radius */
29
+
30
+ /* Font Sizes */
31
+ --font-size-xs: 0.75rem; /* 12px */
32
+ --font-size-sm: 0.875rem; /* 14px */
33
+ --font-size-base: 1rem; /* 16px */
34
+ --font-size-lg: 1.125rem; /* 18px */
35
+ --font-size-xl: 1.25rem; /* 20px */
36
+ --font-size-2xl: 1.5rem; /* 24px */
37
+ --font-size-3xl: 1.875rem; /* 30px */
38
+ --font-size-4xl: 2.25rem; /* 36px */
39
+
40
+ /* Font Weights - Only commonly used weights */
41
+ --font-weight-normal: 400;
42
+ --font-weight-medium: 500;
43
+ --font-weight-semibold: 600;
44
+ --font-weight-bold: 700;
45
+
46
+ /* Line Heights */
47
+ --line-height-none: 1;
48
+ --line-height-tight: 1.25;
49
+ --line-height-snug: 1.375;
50
+ --line-height-normal: 1.5;
51
+ --line-height-relaxed: 1.625;
52
+ --line-height-loose: 2;
53
+
54
+ /* Letter Spacing - Only essential values */
55
+ --letter-spacing-tight: -0.025em;
56
+ --letter-spacing-normal: 0;
57
+ --letter-spacing-wide: 0.05em;
58
+
59
+ /* Shadows */
60
+ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
61
+ --shadow-md:
62
+ 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
63
+ --shadow-lg:
64
+ 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
65
+ --shadow-xl:
66
+ 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
67
+ --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
68
+
69
+ /* Border Width - Single default value */
70
+ --border-width: 1px;
71
+
72
+ /* Z-Index - Semantic layering */
73
+ --z-base: 0;
74
+ --z-dropdown: 1000;
75
+ --z-sticky: 1100;
76
+ --z-modal: 1200;
77
+ --z-popover: 1300;
78
+ --z-tooltip: 1400;
79
+
80
+ /* Opacity - Common values only */
81
+ --opacity-disabled: 0.5;
82
+ --opacity-hover: 0.8;
83
+ --opacity-muted: 0.6;
84
+
85
+ /* Max Widths - Common container sizes */
86
+ --max-w-sm: 24rem; /* 384px */
87
+ --max-w-md: 28rem; /* 448px */
88
+ --max-w-lg: 32rem; /* 512px */
89
+ --max-w-xl: 42rem; /* 672px */
90
+ --max-w-2xl: 48rem; /* 768px */
91
+ --max-w-full: 100%;
92
+
93
+ /* Breakpoints (for use in media queries) */
94
+ --breakpoint-sm: 640px;
95
+ --breakpoint-md: 768px;
96
+ --breakpoint-lg: 1024px;
97
+ --breakpoint-xl: 1280px;
98
+ --breakpoint-2xl: 1536px;
99
+
100
+ /* Colors - Light theme */
101
+ --background: #ffffff;
102
+ --foreground: #0a0a0a;
103
+
104
+ --card: #ffffff;
105
+ --card-foreground: #0a0a0a;
106
+
107
+ --popover: #ffffff;
108
+ --popover-foreground: #0a0a0a;
109
+
110
+ --primary: #0a0a0a;
111
+ --primary-foreground: #fafafa;
112
+
113
+ --secondary: #f4f4f5;
114
+ --secondary-foreground: #0a0a0a;
115
+
116
+ --muted: #f4f4f5;
117
+ --muted-foreground: #71717a;
118
+
119
+ --accent: #f4f4f5;
120
+ --accent-foreground: #0a0a0a;
121
+
122
+ --destructive: #ef4444;
123
+ --destructive-foreground: #fafafa;
124
+
125
+ --border: #e4e4e7;
126
+ --input: #e4e4e7;
127
+ --ring: #3b82f6;
128
+
129
+ /* Success colors */
130
+ --success: #10b981;
131
+ --success-foreground: #fafafa;
132
+
133
+ /* Warning colors */
134
+ --warning: #f59e0b;
135
+ --warning-foreground: #fafafa;
136
+
137
+ /* Info colors */
138
+ --info: #3b82f6;
139
+ --info-foreground: #fafafa;
140
+ }
141
+
142
+ /* Dark theme support - apply data-theme="dark" to the host element */
143
+ :host([data-theme='dark']) {
144
+ --background: #0a0a0a;
145
+ --foreground: #fafafa;
146
+
147
+ --card: #171717;
148
+ --card-foreground: #fafafa;
149
+
150
+ --popover: #171717;
151
+ --popover-foreground: #fafafa;
152
+
153
+ --primary: #fafafa;
154
+ --primary-foreground: #0a0a0a;
155
+
156
+ --secondary: #27272a;
157
+ --secondary-foreground: #fafafa;
158
+
159
+ --muted: #27272a;
160
+ --muted-foreground: #a1a1aa;
161
+
162
+ --accent: #27272a;
163
+ --accent-foreground: #fafafa;
164
+
165
+ --destructive: #dc2626;
166
+ --destructive-foreground: #fafafa;
167
+
168
+ --border: #27272a;
169
+ --input: #27272a;
170
+ --ring: #3b82f6;
171
+
172
+ --success: #059669;
173
+ --success-foreground: #fafafa;
174
+
175
+ --warning: #d97706;
176
+ --warning-foreground: #fafafa;
177
+
178
+ --info: #2563eb;
179
+ --info-foreground: #fafafa;
180
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=evaluation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluation.js","sourceRoot":"","sources":["../../src/types/evaluation.ts"],"names":[],"mappings":"","sourcesContent":["import { EvaluationApproach } from '../lib/evaluation/constants'; \n\nexport interface EvaluationParameters {\n approach: EvaluationApproach;\n threshold?: number;\n}\n\nexport interface EvaluationApproachResult {\n score: number; // 0-1\n approachUsed: EvaluationApproach;\n}"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=llm-test-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm-test-runner.js","sourceRoot":"","sources":["../../src/types/llm-test-runner.ts"],"names":[],"mappings":"","sourcesContent":["import { EvaluationParameters } from './evaluation';\nimport { EvaluationResult } from '../lib/evaluation/types';\n\nexport interface TestCase {\n id: string;\n question: string;\n expectedOutcome: string;\n evaluationParameters?: EvaluationParameters;\n output?: string;\n isRunning?: boolean;\n error?: string;\n evaluationResult?: EvaluationResult;\n responseTime?: number; // Time taken by the callback to execute in milliseconds\n}\n\nexport interface LLMRequestPayload {\n prompt: string;\n resolve: (result: string) => void;\n reject: (err: Error | unknown) => void;\n}\n\nexport interface SavePayload {\n timestamp: string;\n testCases: TestCase[];\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface AppChips extends Components.AppChips, HTMLElement {}
4
+ export const AppChips: {
5
+ prototype: AppChips;
6
+ new (): AppChips;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,2 @@
1
+ import{A as o,d as s}from"./p-BQhb2H_a.js";const t=o;const a=s;export{t as AppChips,a as defineCustomElement};
2
+ //# sourceMappingURL=app-chips.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":[],"mappings":"","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface AppSelect extends Components.AppSelect, HTMLElement {}
4
+ export const AppSelect: {
5
+ prototype: AppSelect;
6
+ new (): AppSelect;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,2 @@
1
+ import{A as o,d as s}from"./p-B7J48VNq.js";const t=o;const p=s;export{t as AppSelect,p as defineCustomElement};
2
+ //# sourceMappingURL=app-select.js.map