llm-testrunner-components 1.2.3 → 1.3.0

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 (110) hide show
  1. package/README.md +9 -5
  2. package/dist/cjs/{app-chips_4.cjs.entry.js → app-chips_5.cjs.entry.js} +38 -6
  3. package/dist/cjs/app-chips_5.cjs.entry.js.map +1 -0
  4. package/dist/cjs/index.cjs.js +499 -68
  5. package/dist/cjs/index.cjs.js.map +1 -1
  6. package/dist/cjs/llm-testrunner.cjs.js +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/collection/collection-manifest.json +1 -0
  9. package/dist/collection/components/llm-test-runner/llm-test-runner.import-export.test.js +22 -12
  10. package/dist/collection/components/llm-test-runner/llm-test-runner.import-export.test.js.map +1 -1
  11. package/dist/collection/components/llm-test-runner/llm-test-runner.js +59 -15
  12. package/dist/collection/components/llm-test-runner/llm-test-runner.js.map +1 -1
  13. package/dist/collection/components/llm-test-runner/test-cases/chat-history.css +101 -0
  14. package/dist/collection/components/llm-test-runner/test-cases/chat-history.js +105 -0
  15. package/dist/collection/components/llm-test-runner/test-cases/chat-history.js.map +1 -0
  16. package/dist/collection/components/llm-test-runner/test-cases/expected-outcome-renderer.js +45 -5
  17. package/dist/collection/components/llm-test-runner/test-cases/expected-outcome-renderer.js.map +1 -1
  18. package/dist/collection/components/llm-test-runner/test-cases/llm-test-case-row.css +21 -0
  19. package/dist/collection/components/llm-test-runner/test-cases/llm-test-case-row.js +12 -2
  20. package/dist/collection/components/llm-test-runner/test-cases/llm-test-case-row.js.map +1 -1
  21. package/dist/collection/components/llm-test-runner/test-cases/llm-test-cases.js +2 -2
  22. package/dist/collection/components/llm-test-runner/test-cases/llm-test-cases.js.map +1 -1
  23. package/dist/collection/components/llm-test-runner/test-cases/output/response-output.js +1 -1
  24. package/dist/collection/components/llm-test-runner/test-cases/output/response-output.js.map +1 -1
  25. package/dist/collection/index.js.map +1 -1
  26. package/dist/collection/lib/evaluation/actual-value-resolver.js +52 -0
  27. package/dist/collection/lib/evaluation/actual-value-resolver.js.map +1 -0
  28. package/dist/collection/lib/evaluation/evaluation-engine.js +1 -1
  29. package/dist/collection/lib/evaluation/evaluation-engine.js.map +1 -1
  30. package/dist/collection/lib/evaluation/evaluation-service.js +55 -17
  31. package/dist/collection/lib/evaluation/evaluation-service.js.map +1 -1
  32. package/dist/collection/lib/evaluation/types.js.map +1 -1
  33. package/dist/collection/lib/form/components/app-chips.js +1 -1
  34. package/dist/collection/lib/form/components/app-select.js +1 -1
  35. package/dist/collection/lib/form/components/app-textarea.js +2 -2
  36. package/dist/collection/lib/import-export/test-suite-exporter.js +4 -0
  37. package/dist/collection/lib/import-export/test-suite-exporter.js.map +1 -1
  38. package/dist/collection/lib/import-export/test-suite-importer.js +7 -1
  39. package/dist/collection/lib/import-export/test-suite-importer.js.map +1 -1
  40. package/dist/collection/lib/test-cases/test-case-factory.js +7 -0
  41. package/dist/collection/lib/test-cases/test-case-factory.js.map +1 -1
  42. package/dist/collection/lib/test-cases/test-case-mutations.js +58 -23
  43. package/dist/collection/lib/test-cases/test-case-mutations.js.map +1 -1
  44. package/dist/collection/schemas/expected-outcome.js +39 -0
  45. package/dist/collection/schemas/expected-outcome.js.map +1 -1
  46. package/dist/collection/schemas/model-response.js +7 -0
  47. package/dist/collection/schemas/model-response.js.map +1 -0
  48. package/dist/collection/schemas/test-case.js +8 -1
  49. package/dist/collection/schemas/test-case.js.map +1 -1
  50. package/dist/collection/types/expected-outcome.js.map +1 -1
  51. package/dist/collection/types/llm-test-runner.js.map +1 -1
  52. package/dist/collection/types/test-case.js.map +1 -1
  53. package/dist/components/app-chips.js +1 -1
  54. package/dist/components/app-select.js +1 -1
  55. package/dist/components/app-textarea.js +1 -1
  56. package/dist/components/chat-history.d.ts +11 -0
  57. package/dist/components/chat-history.js +2 -0
  58. package/dist/components/chat-history.js.map +1 -0
  59. package/dist/components/index.js +1 -1
  60. package/dist/components/llm-test-runner.js +1 -1
  61. package/dist/components/{p-CVtKFBJl.js → p-D2qDAxFN.js} +2 -2
  62. package/dist/components/{p-Dv7cB5FU.js → p-D4dHUFN9.js} +2 -2
  63. package/dist/components/{p-CE5-1jfZ.js → p-eN2dLrsr.js} +2 -2
  64. package/dist/components/p-kmtfMXcQ.js +2 -0
  65. package/dist/components/p-kmtfMXcQ.js.map +1 -0
  66. package/dist/components/{p-BcygfrMf.js → p-wzA48RFK.js} +3 -3
  67. package/dist/components/p-wzA48RFK.js.map +1 -0
  68. package/dist/esm/{app-chips_4.entry.js → app-chips_5.entry.js} +38 -7
  69. package/dist/esm/app-chips_5.entry.js.map +1 -0
  70. package/dist/esm/index.js +499 -68
  71. package/dist/esm/index.js.map +1 -1
  72. package/dist/esm/llm-testrunner.js +1 -1
  73. package/dist/esm/loader.js +1 -1
  74. package/dist/llm-testrunner/index.esm.js +2 -2
  75. package/dist/llm-testrunner/index.esm.js.map +1 -1
  76. package/dist/llm-testrunner/llm-testrunner.esm.js +1 -1
  77. package/dist/llm-testrunner/p-5bf1fc78.entry.js +2 -0
  78. package/dist/llm-testrunner/p-5bf1fc78.entry.js.map +1 -0
  79. package/dist/react/components.d.ts +6 -1
  80. package/dist/react/components.d.ts.map +1 -1
  81. package/dist/react/components.js +9 -0
  82. package/dist/types/components/llm-test-runner/llm-test-runner.d.ts +4 -4
  83. package/dist/types/components/llm-test-runner/test-cases/chat-history.d.ts +14 -0
  84. package/dist/types/components/llm-test-runner/test-cases/expected-outcome-renderer.d.ts +1 -0
  85. package/dist/types/components/llm-test-runner/test-cases/llm-test-case-row.d.ts +6 -0
  86. package/dist/types/components/llm-test-runner/test-cases/llm-test-cases.d.ts +3 -0
  87. package/dist/types/components/llm-test-runner/test-cases/output/response-output.d.ts +2 -1
  88. package/dist/types/components.d.ts +55 -2
  89. package/dist/types/index.d.ts +1 -1
  90. package/dist/types/lib/evaluation/actual-value-resolver.d.ts +9 -0
  91. package/dist/types/lib/evaluation/evaluation-service.d.ts +2 -2
  92. package/dist/types/lib/evaluation/types.d.ts +1 -1
  93. package/dist/types/lib/import-export/test-suite-exporter.d.ts +4 -0
  94. package/dist/types/lib/import-export/test-suite-importer.d.ts +1 -1
  95. package/dist/types/lib/test-cases/test-case-mutations.d.ts +10 -1
  96. package/dist/types/schemas/expected-outcome.d.ts +116 -0
  97. package/dist/types/schemas/model-response.d.ts +7 -0
  98. package/dist/types/schemas/test-case.d.ts +93 -1
  99. package/dist/types/types/expected-outcome.d.ts +1 -1
  100. package/dist/types/types/llm-test-runner.d.ts +6 -3
  101. package/dist/types/types/test-case.d.ts +1 -1
  102. package/package.json +1 -1
  103. package/dist/cjs/app-chips_4.cjs.entry.js.map +0 -1
  104. package/dist/components/p-BcygfrMf.js.map +0 -1
  105. package/dist/esm/app-chips_4.entry.js.map +0 -1
  106. package/dist/llm-testrunner/p-5df053b4.entry.js +0 -2
  107. package/dist/llm-testrunner/p-5df053b4.entry.js.map +0 -1
  108. /package/dist/components/{p-CVtKFBJl.js.map → p-D2qDAxFN.js.map} +0 -0
  109. /package/dist/components/{p-Dv7cB5FU.js.map → p-D4dHUFN9.js.map} +0 -0
  110. /package/dist/components/{p-CE5-1jfZ.js.map → p-eN2dLrsr.js.map} +0 -0
@@ -1,17 +1,41 @@
1
1
  import { z } from 'zod';
2
2
  import { EvaluationApproach } from '../lib/evaluation/constants';
3
+ import type { ModelResponsePayload } from './model-response';
4
+ export declare const evaluationSourceExtractorSchema: z.ZodCustom<(payload: ModelResponsePayload) => string | Promise<string>, (payload: ModelResponsePayload) => string | Promise<string>>;
5
+ export declare const evaluationSourceExtractorsSchema: z.ZodRecord<z.ZodString, z.ZodCustom<(payload: ModelResponsePayload) => string | Promise<string>, (payload: ModelResponsePayload) => string | Promise<string>>>;
6
+ export declare const evaluationSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7
+ type: z.ZodLiteral<"text">;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ type: z.ZodLiteral<"custom">;
10
+ extractorId: z.ZodString;
11
+ }, z.core.$strip>], "type">;
3
12
  export declare const expectedOutcomeModeSchema: z.ZodEnum<{
4
13
  static: "static";
5
14
  dynamic: "dynamic";
6
15
  }>;
7
16
  export type ExpectedOutcomeMode = z.infer<typeof expectedOutcomeModeSchema>;
17
+ export type EvaluationSource = z.infer<typeof evaluationSourceSchema>;
18
+ export type EvaluationSourceExtractor = z.infer<typeof evaluationSourceExtractorSchema>;
19
+ export type EvaluationSourceExtractors = z.infer<typeof evaluationSourceExtractorsSchema>;
8
20
  declare const defaultExpectedOutcomeBaseSchema: z.ZodObject<{
9
21
  label: z.ZodString;
10
22
  placeholder: z.ZodOptional<z.ZodString>;
23
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
24
+ type: z.ZodLiteral<"text">;
25
+ }, z.core.$strip>, z.ZodObject<{
26
+ type: z.ZodLiteral<"custom">;
27
+ extractorId: z.ZodString;
28
+ }, z.core.$strip>], "type">>;
11
29
  }, z.core.$strip>;
12
30
  export declare const expectedOutcomeSchemaFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
13
31
  label: z.ZodString;
14
32
  placeholder: z.ZodOptional<z.ZodString>;
33
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
34
+ type: z.ZodLiteral<"text">;
35
+ }, z.core.$strip>, z.ZodObject<{
36
+ type: z.ZodLiteral<"custom">;
37
+ extractorId: z.ZodString;
38
+ }, z.core.$strip>], "type">>;
15
39
  type: z.ZodLiteral<"text">;
16
40
  evaluationParameters: z.ZodOptional<z.ZodObject<{
17
41
  approach: z.ZodEnum<typeof EvaluationApproach>;
@@ -20,6 +44,12 @@ export declare const expectedOutcomeSchemaFieldSchema: z.ZodDiscriminatedUnion<[
20
44
  }, z.core.$strip>, z.ZodObject<{
21
45
  label: z.ZodString;
22
46
  placeholder: z.ZodOptional<z.ZodString>;
47
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
48
+ type: z.ZodLiteral<"text">;
49
+ }, z.core.$strip>, z.ZodObject<{
50
+ type: z.ZodLiteral<"custom">;
51
+ extractorId: z.ZodString;
52
+ }, z.core.$strip>], "type">>;
23
53
  type: z.ZodLiteral<"textarea">;
24
54
  rows: z.ZodOptional<z.ZodNumber>;
25
55
  evaluationParameters: z.ZodOptional<z.ZodObject<{
@@ -29,6 +59,12 @@ export declare const expectedOutcomeSchemaFieldSchema: z.ZodDiscriminatedUnion<[
29
59
  }, z.core.$strip>, z.ZodObject<{
30
60
  label: z.ZodString;
31
61
  placeholder: z.ZodOptional<z.ZodString>;
62
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
63
+ type: z.ZodLiteral<"text">;
64
+ }, z.core.$strip>, z.ZodObject<{
65
+ type: z.ZodLiteral<"custom">;
66
+ extractorId: z.ZodString;
67
+ }, z.core.$strip>], "type">>;
32
68
  type: z.ZodLiteral<"chips-input">;
33
69
  evaluationParameters: z.ZodOptional<z.ZodObject<{
34
70
  approach: z.ZodEnum<typeof EvaluationApproach>;
@@ -37,6 +73,12 @@ export declare const expectedOutcomeSchemaFieldSchema: z.ZodDiscriminatedUnion<[
37
73
  }, z.core.$strip>, z.ZodObject<{
38
74
  label: z.ZodString;
39
75
  placeholder: z.ZodOptional<z.ZodString>;
76
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
77
+ type: z.ZodLiteral<"text">;
78
+ }, z.core.$strip>, z.ZodObject<{
79
+ type: z.ZodLiteral<"custom">;
80
+ extractorId: z.ZodString;
81
+ }, z.core.$strip>], "type">>;
40
82
  type: z.ZodLiteral<"select">;
41
83
  options: z.ZodArray<z.ZodString>;
42
84
  evaluationParameters: z.ZodOptional<z.ZodObject<{
@@ -47,6 +89,12 @@ export declare const expectedOutcomeSchemaFieldSchema: z.ZodDiscriminatedUnion<[
47
89
  export declare const expectedOutcomeSchemaSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
48
90
  label: z.ZodString;
49
91
  placeholder: z.ZodOptional<z.ZodString>;
92
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
93
+ type: z.ZodLiteral<"text">;
94
+ }, z.core.$strip>, z.ZodObject<{
95
+ type: z.ZodLiteral<"custom">;
96
+ extractorId: z.ZodString;
97
+ }, z.core.$strip>], "type">>;
50
98
  type: z.ZodLiteral<"text">;
51
99
  evaluationParameters: z.ZodOptional<z.ZodObject<{
52
100
  approach: z.ZodEnum<typeof EvaluationApproach>;
@@ -55,6 +103,12 @@ export declare const expectedOutcomeSchemaSchema: z.ZodArray<z.ZodDiscriminatedU
55
103
  }, z.core.$strip>, z.ZodObject<{
56
104
  label: z.ZodString;
57
105
  placeholder: z.ZodOptional<z.ZodString>;
106
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
107
+ type: z.ZodLiteral<"text">;
108
+ }, z.core.$strip>, z.ZodObject<{
109
+ type: z.ZodLiteral<"custom">;
110
+ extractorId: z.ZodString;
111
+ }, z.core.$strip>], "type">>;
58
112
  type: z.ZodLiteral<"textarea">;
59
113
  rows: z.ZodOptional<z.ZodNumber>;
60
114
  evaluationParameters: z.ZodOptional<z.ZodObject<{
@@ -64,6 +118,12 @@ export declare const expectedOutcomeSchemaSchema: z.ZodArray<z.ZodDiscriminatedU
64
118
  }, z.core.$strip>, z.ZodObject<{
65
119
  label: z.ZodString;
66
120
  placeholder: z.ZodOptional<z.ZodString>;
121
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
122
+ type: z.ZodLiteral<"text">;
123
+ }, z.core.$strip>, z.ZodObject<{
124
+ type: z.ZodLiteral<"custom">;
125
+ extractorId: z.ZodString;
126
+ }, z.core.$strip>], "type">>;
67
127
  type: z.ZodLiteral<"chips-input">;
68
128
  evaluationParameters: z.ZodOptional<z.ZodObject<{
69
129
  approach: z.ZodEnum<typeof EvaluationApproach>;
@@ -72,6 +132,12 @@ export declare const expectedOutcomeSchemaSchema: z.ZodArray<z.ZodDiscriminatedU
72
132
  }, z.core.$strip>, z.ZodObject<{
73
133
  label: z.ZodString;
74
134
  placeholder: z.ZodOptional<z.ZodString>;
135
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
136
+ type: z.ZodLiteral<"text">;
137
+ }, z.core.$strip>, z.ZodObject<{
138
+ type: z.ZodLiteral<"custom">;
139
+ extractorId: z.ZodString;
140
+ }, z.core.$strip>], "type">>;
75
141
  type: z.ZodLiteral<"select">;
76
142
  options: z.ZodArray<z.ZodString>;
77
143
  evaluationParameters: z.ZodOptional<z.ZodObject<{
@@ -82,6 +148,12 @@ export declare const expectedOutcomeSchemaSchema: z.ZodArray<z.ZodDiscriminatedU
82
148
  export declare const expectedOutcomeFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
83
149
  label: z.ZodString;
84
150
  placeholder: z.ZodOptional<z.ZodString>;
151
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
152
+ type: z.ZodLiteral<"text">;
153
+ }, z.core.$strip>, z.ZodObject<{
154
+ type: z.ZodLiteral<"custom">;
155
+ extractorId: z.ZodString;
156
+ }, z.core.$strip>], "type">>;
85
157
  type: z.ZodLiteral<"text">;
86
158
  evaluationParameters: z.ZodOptional<z.ZodObject<{
87
159
  approach: z.ZodEnum<typeof EvaluationApproach>;
@@ -91,6 +163,12 @@ export declare const expectedOutcomeFieldSchema: z.ZodDiscriminatedUnion<[z.ZodO
91
163
  }, z.core.$strip>, z.ZodObject<{
92
164
  label: z.ZodString;
93
165
  placeholder: z.ZodOptional<z.ZodString>;
166
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
167
+ type: z.ZodLiteral<"text">;
168
+ }, z.core.$strip>, z.ZodObject<{
169
+ type: z.ZodLiteral<"custom">;
170
+ extractorId: z.ZodString;
171
+ }, z.core.$strip>], "type">>;
94
172
  type: z.ZodLiteral<"textarea">;
95
173
  rows: z.ZodOptional<z.ZodNumber>;
96
174
  evaluationParameters: z.ZodOptional<z.ZodObject<{
@@ -106,6 +184,12 @@ export declare const expectedOutcomeFieldSchema: z.ZodDiscriminatedUnion<[z.ZodO
106
184
  }, z.core.$strip>, z.ZodObject<{
107
185
  label: z.ZodString;
108
186
  placeholder: z.ZodOptional<z.ZodString>;
187
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
188
+ type: z.ZodLiteral<"text">;
189
+ }, z.core.$strip>, z.ZodObject<{
190
+ type: z.ZodLiteral<"custom">;
191
+ extractorId: z.ZodString;
192
+ }, z.core.$strip>], "type">>;
109
193
  type: z.ZodLiteral<"chips-input">;
110
194
  evaluationParameters: z.ZodOptional<z.ZodObject<{
111
195
  approach: z.ZodEnum<typeof EvaluationApproach>;
@@ -115,6 +199,12 @@ export declare const expectedOutcomeFieldSchema: z.ZodDiscriminatedUnion<[z.ZodO
115
199
  }, z.core.$strip>, z.ZodObject<{
116
200
  label: z.ZodString;
117
201
  placeholder: z.ZodOptional<z.ZodString>;
202
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
203
+ type: z.ZodLiteral<"text">;
204
+ }, z.core.$strip>, z.ZodObject<{
205
+ type: z.ZodLiteral<"custom">;
206
+ extractorId: z.ZodString;
207
+ }, z.core.$strip>], "type">>;
118
208
  type: z.ZodLiteral<"select">;
119
209
  options: z.ZodArray<z.ZodString>;
120
210
  evaluationParameters: z.ZodOptional<z.ZodObject<{
@@ -126,6 +216,12 @@ export declare const expectedOutcomeFieldSchema: z.ZodDiscriminatedUnion<[z.ZodO
126
216
  export declare const expectedOutcomeArraySchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
127
217
  label: z.ZodString;
128
218
  placeholder: z.ZodOptional<z.ZodString>;
219
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
220
+ type: z.ZodLiteral<"text">;
221
+ }, z.core.$strip>, z.ZodObject<{
222
+ type: z.ZodLiteral<"custom">;
223
+ extractorId: z.ZodString;
224
+ }, z.core.$strip>], "type">>;
129
225
  type: z.ZodLiteral<"text">;
130
226
  evaluationParameters: z.ZodOptional<z.ZodObject<{
131
227
  approach: z.ZodEnum<typeof EvaluationApproach>;
@@ -135,6 +231,12 @@ export declare const expectedOutcomeArraySchema: z.ZodArray<z.ZodDiscriminatedUn
135
231
  }, z.core.$strip>, z.ZodObject<{
136
232
  label: z.ZodString;
137
233
  placeholder: z.ZodOptional<z.ZodString>;
234
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
235
+ type: z.ZodLiteral<"text">;
236
+ }, z.core.$strip>, z.ZodObject<{
237
+ type: z.ZodLiteral<"custom">;
238
+ extractorId: z.ZodString;
239
+ }, z.core.$strip>], "type">>;
138
240
  type: z.ZodLiteral<"textarea">;
139
241
  rows: z.ZodOptional<z.ZodNumber>;
140
242
  evaluationParameters: z.ZodOptional<z.ZodObject<{
@@ -150,6 +252,12 @@ export declare const expectedOutcomeArraySchema: z.ZodArray<z.ZodDiscriminatedUn
150
252
  }, z.core.$strip>, z.ZodObject<{
151
253
  label: z.ZodString;
152
254
  placeholder: z.ZodOptional<z.ZodString>;
255
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
256
+ type: z.ZodLiteral<"text">;
257
+ }, z.core.$strip>, z.ZodObject<{
258
+ type: z.ZodLiteral<"custom">;
259
+ extractorId: z.ZodString;
260
+ }, z.core.$strip>], "type">>;
153
261
  type: z.ZodLiteral<"chips-input">;
154
262
  evaluationParameters: z.ZodOptional<z.ZodObject<{
155
263
  approach: z.ZodEnum<typeof EvaluationApproach>;
@@ -159,6 +267,12 @@ export declare const expectedOutcomeArraySchema: z.ZodArray<z.ZodDiscriminatedUn
159
267
  }, z.core.$strip>, z.ZodObject<{
160
268
  label: z.ZodString;
161
269
  placeholder: z.ZodOptional<z.ZodString>;
270
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
271
+ type: z.ZodLiteral<"text">;
272
+ }, z.core.$strip>, z.ZodObject<{
273
+ type: z.ZodLiteral<"custom">;
274
+ extractorId: z.ZodString;
275
+ }, z.core.$strip>], "type">>;
162
276
  type: z.ZodLiteral<"select">;
163
277
  options: z.ZodArray<z.ZodString>;
164
278
  evaluationParameters: z.ZodOptional<z.ZodObject<{
@@ -198,4 +312,6 @@ export type SelectExpectedOutcomeField = Extract<ExpectedOutcomeField, {
198
312
  }>;
199
313
  export declare function validateExpectedOutcomeSchema(schema: unknown): asserts schema is ExpectedOutcomeSchema;
200
314
  export declare function validateExpectedOutcomeArray(expectedOutcome: unknown): asserts expectedOutcome is ExpectedOutcomeField[];
315
+ export declare function validateExpectedOutcomeArrayWithExtractors(expectedOutcome: unknown, allowedExtractorIds: string[]): asserts expectedOutcome is ExpectedOutcomeField[];
316
+ export declare function getExtractorIds(extractors?: EvaluationSourceExtractors): string[];
201
317
  export {};
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export declare const modelResponseMetadataSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3
+ export declare const modelResponsePayloadSchema: z.ZodObject<{
4
+ text: z.ZodOptional<z.ZodString>;
5
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
6
+ }, z.core.$strip>;
7
+ export type ModelResponsePayload = z.infer<typeof modelResponsePayloadSchema>;
@@ -1,11 +1,21 @@
1
1
  import { z } from 'zod';
2
2
  import type { EvaluationResult } from '../lib/evaluation/types';
3
+ export declare const testCaseChatHistorySchema: z.ZodObject<{
4
+ enabled: z.ZodBoolean;
5
+ value: z.ZodString;
6
+ }, z.core.$strip>;
3
7
  export declare const testCaseInputSchema: z.ZodObject<{
4
8
  id: z.ZodString;
5
9
  question: z.ZodString;
6
10
  expectedOutcome: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
7
11
  label: z.ZodString;
8
12
  placeholder: z.ZodOptional<z.ZodString>;
13
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
14
+ type: z.ZodLiteral<"text">;
15
+ }, z.core.$strip>, z.ZodObject<{
16
+ type: z.ZodLiteral<"custom">;
17
+ extractorId: z.ZodString;
18
+ }, z.core.$strip>], "type">>;
9
19
  type: z.ZodLiteral<"text">;
10
20
  evaluationParameters: z.ZodOptional<z.ZodObject<{
11
21
  approach: z.ZodEnum<typeof import("../lib/evaluation/constants").EvaluationApproach>;
@@ -15,6 +25,12 @@ export declare const testCaseInputSchema: z.ZodObject<{
15
25
  }, z.core.$strip>, z.ZodObject<{
16
26
  label: z.ZodString;
17
27
  placeholder: z.ZodOptional<z.ZodString>;
28
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
29
+ type: z.ZodLiteral<"text">;
30
+ }, z.core.$strip>, z.ZodObject<{
31
+ type: z.ZodLiteral<"custom">;
32
+ extractorId: z.ZodString;
33
+ }, z.core.$strip>], "type">>;
18
34
  type: z.ZodLiteral<"textarea">;
19
35
  rows: z.ZodOptional<z.ZodNumber>;
20
36
  evaluationParameters: z.ZodOptional<z.ZodObject<{
@@ -30,6 +46,12 @@ export declare const testCaseInputSchema: z.ZodObject<{
30
46
  }, z.core.$strip>, z.ZodObject<{
31
47
  label: z.ZodString;
32
48
  placeholder: z.ZodOptional<z.ZodString>;
49
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
50
+ type: z.ZodLiteral<"text">;
51
+ }, z.core.$strip>, z.ZodObject<{
52
+ type: z.ZodLiteral<"custom">;
53
+ extractorId: z.ZodString;
54
+ }, z.core.$strip>], "type">>;
33
55
  type: z.ZodLiteral<"chips-input">;
34
56
  evaluationParameters: z.ZodOptional<z.ZodObject<{
35
57
  approach: z.ZodEnum<typeof import("../lib/evaluation/constants").EvaluationApproach>;
@@ -39,6 +61,12 @@ export declare const testCaseInputSchema: z.ZodObject<{
39
61
  }, z.core.$strip>, z.ZodObject<{
40
62
  label: z.ZodString;
41
63
  placeholder: z.ZodOptional<z.ZodString>;
64
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
65
+ type: z.ZodLiteral<"text">;
66
+ }, z.core.$strip>, z.ZodObject<{
67
+ type: z.ZodLiteral<"custom">;
68
+ extractorId: z.ZodString;
69
+ }, z.core.$strip>], "type">>;
42
70
  type: z.ZodLiteral<"select">;
43
71
  options: z.ZodArray<z.ZodString>;
44
72
  evaluationParameters: z.ZodOptional<z.ZodObject<{
@@ -47,6 +75,10 @@ export declare const testCaseInputSchema: z.ZodObject<{
47
75
  }, z.core.$strip>>;
48
76
  value: z.ZodString;
49
77
  }, z.core.$strip>], "type">>;
78
+ chatHistory: z.ZodOptional<z.ZodObject<{
79
+ enabled: z.ZodBoolean;
80
+ value: z.ZodString;
81
+ }, z.core.$strip>>;
50
82
  }, z.core.$strip>;
51
83
  export declare const testCaseInputArraySchema: z.ZodArray<z.ZodObject<{
52
84
  id: z.ZodString;
@@ -54,6 +86,12 @@ export declare const testCaseInputArraySchema: z.ZodArray<z.ZodObject<{
54
86
  expectedOutcome: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
55
87
  label: z.ZodString;
56
88
  placeholder: z.ZodOptional<z.ZodString>;
89
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
90
+ type: z.ZodLiteral<"text">;
91
+ }, z.core.$strip>, z.ZodObject<{
92
+ type: z.ZodLiteral<"custom">;
93
+ extractorId: z.ZodString;
94
+ }, z.core.$strip>], "type">>;
57
95
  type: z.ZodLiteral<"text">;
58
96
  evaluationParameters: z.ZodOptional<z.ZodObject<{
59
97
  approach: z.ZodEnum<typeof import("../lib/evaluation/constants").EvaluationApproach>;
@@ -63,6 +101,12 @@ export declare const testCaseInputArraySchema: z.ZodArray<z.ZodObject<{
63
101
  }, z.core.$strip>, z.ZodObject<{
64
102
  label: z.ZodString;
65
103
  placeholder: z.ZodOptional<z.ZodString>;
104
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
105
+ type: z.ZodLiteral<"text">;
106
+ }, z.core.$strip>, z.ZodObject<{
107
+ type: z.ZodLiteral<"custom">;
108
+ extractorId: z.ZodString;
109
+ }, z.core.$strip>], "type">>;
66
110
  type: z.ZodLiteral<"textarea">;
67
111
  rows: z.ZodOptional<z.ZodNumber>;
68
112
  evaluationParameters: z.ZodOptional<z.ZodObject<{
@@ -78,6 +122,12 @@ export declare const testCaseInputArraySchema: z.ZodArray<z.ZodObject<{
78
122
  }, z.core.$strip>, z.ZodObject<{
79
123
  label: z.ZodString;
80
124
  placeholder: z.ZodOptional<z.ZodString>;
125
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
126
+ type: z.ZodLiteral<"text">;
127
+ }, z.core.$strip>, z.ZodObject<{
128
+ type: z.ZodLiteral<"custom">;
129
+ extractorId: z.ZodString;
130
+ }, z.core.$strip>], "type">>;
81
131
  type: z.ZodLiteral<"chips-input">;
82
132
  evaluationParameters: z.ZodOptional<z.ZodObject<{
83
133
  approach: z.ZodEnum<typeof import("../lib/evaluation/constants").EvaluationApproach>;
@@ -87,6 +137,12 @@ export declare const testCaseInputArraySchema: z.ZodArray<z.ZodObject<{
87
137
  }, z.core.$strip>, z.ZodObject<{
88
138
  label: z.ZodString;
89
139
  placeholder: z.ZodOptional<z.ZodString>;
140
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
141
+ type: z.ZodLiteral<"text">;
142
+ }, z.core.$strip>, z.ZodObject<{
143
+ type: z.ZodLiteral<"custom">;
144
+ extractorId: z.ZodString;
145
+ }, z.core.$strip>], "type">>;
90
146
  type: z.ZodLiteral<"select">;
91
147
  options: z.ZodArray<z.ZodString>;
92
148
  evaluationParameters: z.ZodOptional<z.ZodObject<{
@@ -95,6 +151,10 @@ export declare const testCaseInputArraySchema: z.ZodArray<z.ZodObject<{
95
151
  }, z.core.$strip>>;
96
152
  value: z.ZodString;
97
153
  }, z.core.$strip>], "type">>;
154
+ chatHistory: z.ZodOptional<z.ZodObject<{
155
+ enabled: z.ZodBoolean;
156
+ value: z.ZodString;
157
+ }, z.core.$strip>>;
98
158
  }, z.core.$strip>>;
99
159
  export declare const testCaseSchema: z.ZodObject<{
100
160
  id: z.ZodString;
@@ -102,6 +162,12 @@ export declare const testCaseSchema: z.ZodObject<{
102
162
  expectedOutcome: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
103
163
  label: z.ZodString;
104
164
  placeholder: z.ZodOptional<z.ZodString>;
165
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
166
+ type: z.ZodLiteral<"text">;
167
+ }, z.core.$strip>, z.ZodObject<{
168
+ type: z.ZodLiteral<"custom">;
169
+ extractorId: z.ZodString;
170
+ }, z.core.$strip>], "type">>;
105
171
  type: z.ZodLiteral<"text">;
106
172
  evaluationParameters: z.ZodOptional<z.ZodObject<{
107
173
  approach: z.ZodEnum<typeof import("../lib/evaluation/constants").EvaluationApproach>;
@@ -111,6 +177,12 @@ export declare const testCaseSchema: z.ZodObject<{
111
177
  }, z.core.$strip>, z.ZodObject<{
112
178
  label: z.ZodString;
113
179
  placeholder: z.ZodOptional<z.ZodString>;
180
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
181
+ type: z.ZodLiteral<"text">;
182
+ }, z.core.$strip>, z.ZodObject<{
183
+ type: z.ZodLiteral<"custom">;
184
+ extractorId: z.ZodString;
185
+ }, z.core.$strip>], "type">>;
114
186
  type: z.ZodLiteral<"textarea">;
115
187
  rows: z.ZodOptional<z.ZodNumber>;
116
188
  evaluationParameters: z.ZodOptional<z.ZodObject<{
@@ -126,6 +198,12 @@ export declare const testCaseSchema: z.ZodObject<{
126
198
  }, z.core.$strip>, z.ZodObject<{
127
199
  label: z.ZodString;
128
200
  placeholder: z.ZodOptional<z.ZodString>;
201
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
202
+ type: z.ZodLiteral<"text">;
203
+ }, z.core.$strip>, z.ZodObject<{
204
+ type: z.ZodLiteral<"custom">;
205
+ extractorId: z.ZodString;
206
+ }, z.core.$strip>], "type">>;
129
207
  type: z.ZodLiteral<"chips-input">;
130
208
  evaluationParameters: z.ZodOptional<z.ZodObject<{
131
209
  approach: z.ZodEnum<typeof import("../lib/evaluation/constants").EvaluationApproach>;
@@ -135,6 +213,12 @@ export declare const testCaseSchema: z.ZodObject<{
135
213
  }, z.core.$strip>, z.ZodObject<{
136
214
  label: z.ZodString;
137
215
  placeholder: z.ZodOptional<z.ZodString>;
216
+ evaluationSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
217
+ type: z.ZodLiteral<"text">;
218
+ }, z.core.$strip>, z.ZodObject<{
219
+ type: z.ZodLiteral<"custom">;
220
+ extractorId: z.ZodString;
221
+ }, z.core.$strip>], "type">>;
138
222
  type: z.ZodLiteral<"select">;
139
223
  options: z.ZodArray<z.ZodString>;
140
224
  evaluationParameters: z.ZodOptional<z.ZodObject<{
@@ -143,12 +227,20 @@ export declare const testCaseSchema: z.ZodObject<{
143
227
  }, z.core.$strip>>;
144
228
  value: z.ZodString;
145
229
  }, z.core.$strip>], "type">>;
146
- output: z.ZodOptional<z.ZodString>;
230
+ output: z.ZodOptional<z.ZodObject<{
231
+ text: z.ZodOptional<z.ZodString>;
232
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
233
+ }, z.core.$strip>>;
234
+ chatHistory: z.ZodObject<{
235
+ enabled: z.ZodBoolean;
236
+ value: z.ZodString;
237
+ }, z.core.$strip>;
147
238
  isRunning: z.ZodOptional<z.ZodBoolean>;
148
239
  error: z.ZodOptional<z.ZodString>;
149
240
  evaluationResult: z.ZodOptional<z.ZodCustom<EvaluationResult, EvaluationResult>>;
150
241
  responseTime: z.ZodOptional<z.ZodNumber>;
151
242
  }, z.core.$strip>;
243
+ export type TestCaseChatHistory = z.infer<typeof testCaseChatHistorySchema>;
152
244
  export type TestCaseInput = z.input<typeof testCaseInputSchema>;
153
245
  export type TestCase = z.input<typeof testCaseSchema>;
154
246
  export declare function validateTestCaseInput(data: unknown): asserts data is TestCaseInput;
@@ -1 +1 @@
1
- export type { ExpectedOutcomeMode, ExpectedOutcomeSchemaField, ExpectedOutcomeSchema, ExpectedOutcomeField, ExpectedOutcomeFieldType, ExpectedOutcomeBase, TextExpectedOutcomeSchemaField, TextareaExpectedOutcomeSchemaField, ChipsExpectedOutcomeSchemaField, SelectExpectedOutcomeSchemaField, TextExpectedOutcomeField, TextareaExpectedOutcomeField, ChipsExpectedOutcomeField, SelectExpectedOutcomeField, } from '../schemas/expected-outcome';
1
+ export type { EvaluationSource, EvaluationSourceExtractor, EvaluationSourceExtractors, ExpectedOutcomeMode, ExpectedOutcomeSchemaField, ExpectedOutcomeSchema, ExpectedOutcomeField, ExpectedOutcomeFieldType, ExpectedOutcomeBase, TextExpectedOutcomeSchemaField, TextareaExpectedOutcomeSchemaField, ChipsExpectedOutcomeSchemaField, SelectExpectedOutcomeSchemaField, TextExpectedOutcomeField, TextareaExpectedOutcomeField, ChipsExpectedOutcomeField, SelectExpectedOutcomeField, } from '../schemas/expected-outcome';
@@ -1,9 +1,12 @@
1
1
  import type { TestCase } from './test-case';
2
- export type { ExpectedOutcomeMode, ExpectedOutcomeFieldType, ExpectedOutcomeBase, ExpectedOutcomeSchema, ExpectedOutcomeSchemaField, ExpectedOutcomeField, TextExpectedOutcomeSchemaField, TextareaExpectedOutcomeSchemaField, ChipsExpectedOutcomeSchemaField, SelectExpectedOutcomeSchemaField, TextExpectedOutcomeField, TextareaExpectedOutcomeField, ChipsExpectedOutcomeField, SelectExpectedOutcomeField, } from './expected-outcome';
3
- export type { TestCase, TestCaseInput, } from './test-case';
2
+ import type { ModelResponsePayload } from '../schemas/model-response';
3
+ export type { EvaluationSource, EvaluationSourceExtractor, EvaluationSourceExtractors, ExpectedOutcomeMode, ExpectedOutcomeFieldType, ExpectedOutcomeBase, ExpectedOutcomeSchema, ExpectedOutcomeSchemaField, ExpectedOutcomeField, TextExpectedOutcomeSchemaField, TextareaExpectedOutcomeSchemaField, ChipsExpectedOutcomeSchemaField, SelectExpectedOutcomeSchemaField, TextExpectedOutcomeField, TextareaExpectedOutcomeField, ChipsExpectedOutcomeField, SelectExpectedOutcomeField, } from './expected-outcome';
4
+ export type { ModelResponsePayload, } from '../schemas/model-response';
5
+ export type { TestCaseChatHistory, TestCase, TestCaseInput, } from './test-case';
4
6
  export interface LLMRequestPayload {
5
7
  prompt: string;
6
- resolve: (result: string) => void;
8
+ resolve: (result: ModelResponsePayload) => void;
9
+ chatHistory?: string;
7
10
  reject: (err: Error | unknown) => void;
8
11
  }
9
12
  export interface SavePayload {
@@ -1 +1 @@
1
- export type { TestCaseInput, TestCase, } from '../schemas/test-case';
1
+ export type { TestCaseChatHistory, TestCaseInput, TestCase, } from '../schemas/test-case';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llm-testrunner-components",
3
- "version": "1.2.3",
3
+ "version": "1.3.0",
4
4
  "description": "A Stencil web component library for LLM test runner functionality",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1 +0,0 @@
1
- {"file":"app-chips_4.cjs.entry.js","mappings":";;;;;AAAA,MAAM,WAAW,GAAG,MAAM,CAAC,iuDAAiuD,CAAC;;MCQhvD,QAAQ,GAAA,MAAA;;;;;;IACX,KAAK,GAAa,EAAE;AACpB,IAAA,MAAM;AAEL,IAAA,OAAO;AAEP,IAAA,UAAU;AAEX,IAAA,WAAW,CAAC,GAAW,EAAA;AAC7B,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;AAChB,YAAA,KAAK,EAAE,GAAG;AACX,S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AK,CACF,CACT,EAEDA,SAAA,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,GACM,YAAY,EAChB,KAAK,EAAC,kBAAkB,EACxB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,IAAI,CAAC,YAAY,EAAA,CAChB,EAEX,CAAC,CAAC,QAAQ,IAAIA,SAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,WAAW,EAAA,EAAE,CAAC,CAAC,QAAQ,CAAK,CAChD;;;;;;;;;;","names":["h"],"sources":["src/lib/form/components/app-chips.css?tag=app-chips&encapsulation=shadow","src/lib/form/components/app-chips.tsx","src/lib/form/components/app-select.css?tag=app-select&encapsulation=shadow","src/lib/form/components/app-select.tsx","src/lib/form/components/app-textarea.css?tag=app-textarea&encapsulation=shadow","src/lib/form/components/app-textarea.tsx"],"sourcesContent":[".app-chips {\n margin-bottom: var(--spacing-4);\n}\n\n.app-chips__label {\n display: block;\n margin-bottom: var(--spacing-2);\n font-weight: var(--font-weight-medium);\n color: var(--foreground);\n font-size: var(--font-size-sm);\n}\n\n.app-chips__container {\n display: flex;\n flex-wrap: wrap;\n gap: var(--spacing-2);\n align-items: center;\n}\n\n.app-chips__chip {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-2);\n padding: var(--spacing-1) var(--spacing-2);\n font-size: var(--font-size-xs);\n font-weight: var(--font-weight-medium);\n border-radius: var(--radius-md);\n background: var(--accent);\n border: var(--border-width) solid var(--border);\n}\n\n/* Keyword-style chip override (non-URL chips) */\n.app-chips__chip:not(:has(a)) {\n background: var(--info);\n color: var(--info-foreground);\n border: none;\n border-radius: var(--radius-2xl);\n}\n\n.app-chips__link {\n color: var(--info);\n text-decoration: none;\n max-width: 200px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.app-chips__link:hover {\n text-decoration: underline;\n}\n\n.app-chips__remove {\n background: none;\n border: none;\n cursor: pointer;\n font-size: var(--font-size-xs);\n padding: 0;\n width: var(--spacing-4);\n height: var(--spacing-4);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--radius-full);\n color: var(--muted-foreground);\n opacity: var(--opacity-muted);\n}\n\n.app-chips__chip:not(:has(a)) .app-chips__remove {\n color: var(--info-foreground);\n opacity: var(--opacity-hover);\n}\n\n.app-chips__remove:hover {\n opacity: 1;\n background: var(--muted);\n}\n\n.app-chips__chip:not(:has(a)) .app-chips__remove:hover {\n background: rgba(255, 255, 255, 0.2);\n}\n\n.app-chips__input {\n border: var(--border-width) solid var(--input);\n border-radius: var(--radius-md);\n padding: var(--spacing-2);\n font-size: var(--font-size-xs);\n outline: none;\n min-width: 120px;\n background: var(--background);\n color: var(--foreground);\n}\n\n.app-chips__input:focus {\n border-color: var(--ring);\n box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);\n}\n","import { Component, Prop, h, Event, EventEmitter } from '@stencil/core';\nimport { ChipsConfig } from '../schema';\n\n@Component({\n tag: 'app-chips',\n styleUrl: 'app-chips.css',\n shadow: true,\n})\nexport class AppChips {\n @Prop() value: string[] = [];\n @Prop() config: ChipsConfig;\n\n @Event() addChip: EventEmitter<{ value: string }>;\n\n @Event() removeChip: EventEmitter<{ value: string }>;\n\n private emitAddChip(val: string) {\n this.addChip.emit({\n value: val,\n });\n }\n\n private emitRemoveChip(value: string) {\n this.removeChip.emit({\n value,\n });\n }\n\n private hasDuplicateChip(value: string): boolean {\n const normalized = value.trim().toLowerCase();\n return this.value.some(chip => chip.trim().toLowerCase() === normalized);\n }\n\n render() {\n const c = this.config;\n\n const allowedAttrs = {\n placeholder: c.placeholder,\n required: c.required,\n disabled: c.disabled,\n readOnly: c.readOnly,\n id: c.name,\n name: c.name,\n autocomplete: c.autocomplete,\n };\n\n return (\n <div class=\"app-chips\">\n {c.label && (\n <label class=\"app-chips__label\" htmlFor={c.name}>\n {c.label}\n </label>\n )}\n\n <div class=\"app-chips__container\">\n {this.value.map((chip) => (\n <span class=\"app-chips__chip\" key={chip}>\n {c.type === 'url' ? (\n <a\n href={chip}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"app-chips__link\"\n >\n {chip}\n </a>\n ) : (\n chip\n )}\n\n <button\n class=\"app-chips__remove\"\n type=\"button\"\n onClick={() => this.emitRemoveChip(chip)}\n >\n ×\n </button>\n </span>\n ))}\n\n <input\n class=\"app-chips__input\"\n type={c.type || 'text'}\n {...allowedAttrs}\n onKeyDown={(e: KeyboardEvent) => {\n if (e.key === 'Enter') {\n const input = e.target as HTMLInputElement;\n const val = input.value.trim();\n if (!val) return;\n if (this.hasDuplicateChip(val)) {\n input.value = '';\n return;\n }\n\n this.emitAddChip(val);\n input.value = '';\n }\n }}\n />\n </div>\n </div>\n );\n }\n}\n",".app-select {\n margin-bottom: var(--spacing-4);\n}\n\n.app-select__label {\n display: block;\n margin-bottom: var(--spacing-2);\n font-weight: var(--font-weight-medium);\n color: var(--foreground);\n font-size: var(--font-size-sm);\n}\n\n.app-select__select {\n border: var(--border-width) solid var(--input);\n border-radius: var(--radius-md);\n font-size: var(--font-size-sm);\n font-weight: var(--font-weight-medium);\n padding: var(--spacing-1) var(--spacing-2);\n outline: none;\n background: var(--background);\n width: 145px;\n color: var(--foreground);\n}\n\n.app-select__select:focus {\n border-color: var(--ring);\n box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);\n}\n","import { Component, Event, EventEmitter, Prop, h } from '@stencil/core';\nimport { SelectConfig } from '../schema';\n\n@Component({\n tag: 'app-select',\n styleUrl: 'app-select.css',\n shadow: true,\n})\nexport class AppSelect {\n @Prop() value: string;\n @Prop() config: SelectConfig;\n @Event() valueChange: EventEmitter<{ value: string }>;\n\n render() {\n const c = this.config;\n const allowedAttrs = {\n id: c.name,\n name: c.name,\n disabled: c.disabled,\n required: c.required,\n readOnly: c.readOnly,\n placeholder: c.placeholder,\n autocomplete: c.autocomplete,\n };\n return (\n <div class=\"app-select\">\n {c.label && (\n <label class=\"app-select__label\" htmlFor={c.name}>\n {c.label}\n </label>\n )}\n\n <div>\n <select\n {...allowedAttrs}\n class=\"app-select__select\"\n onInput={(e: Event) => {\n const raw = (e.target as HTMLSelectElement).value;\n const matched = c.optionList.find(opt => String(opt) === raw);\n this.valueChange.emit({\n value: matched !== undefined ? matched : raw,\n });\n }}\n >\n {c.optionList?.map(option => (\n <option\n value={String(option)}\n key={String(option)}\n selected={this.value === option}\n >\n {String(option)}\n </option>\n ))}\n </select>\n </div>\n </div>\n );\n }\n}\n",".textarea-wrapper {\n margin-bottom: var(--spacing-4);\n}\n\n.textarea-label {\n display: block;\n margin-bottom: var(--spacing-2);\n font-weight: var(--font-weight-medium);\n color: var(--foreground);\n font-size: var(--font-size-sm);\n}\n\n.textarea-element {\n width: 95%;\n box-sizing: border-box;\n padding: var(--spacing-3);\n border: 2px solid var(--input);\n border-radius: var(--radius);\n font-size: var(--font-size-sm);\n resize: vertical;\n outline: none;\n transition: border-color 0.2s ease;\n font-family: inherit;\n background: var(--background);\n color: var(--foreground);\n}\n\n.textarea-element:focus {\n border-color: var(--ring);\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n}\n\n.textarea-wrapper--read-only .textarea-label {\n color: var(--muted-foreground);\n}\n\n.textarea-element:read-only {\n background: var(--muted);\n color: var(--muted-foreground);\n border-color: var(--border);\n cursor: not-allowed;\n resize: none;\n}\n\n.textarea-element:read-only:focus {\n border-color: var(--border);\n box-shadow: none;\n}\n\n.help-text {\n margin-top: var(--spacing-1);\n font-size: var(--font-size-xs);\n color: var(--muted-foreground, #6b7280);\n line-height: 1.4;\n}\n","import { Component, Event, EventEmitter, Prop, h } from '@stencil/core';\nimport { TextAreaConfig } from '../schema';\n\n@Component({\n tag: 'app-textarea',\n styleUrl: 'app-textarea.css',\n shadow: true,\n})\nexport class AppTextarea {\n @Prop() value: string;\n @Prop() config: TextAreaConfig;\n\n @Event() valueChange: EventEmitter<{ value: string }>;\n\n private handleChange = (e: Event) => {\n const target = e.target as HTMLTextAreaElement;\n\n this.valueChange.emit({\n value: target.value,\n });\n };\n\n render() {\n const c = this.config;\n\n const allowedAttrs = {\n placeholder: c.placeholder,\n required: c.required,\n disabled: c.disabled,\n readOnly: c.readOnly,\n rows: c.rows,\n id: c.name,\n name: c.name,\n autocomplete: c.autocomplete,\n };\n\n return (\n <div\n class={{\n 'textarea-wrapper': true,\n 'textarea-wrapper--read-only': !!c.readOnly,\n }}\n >\n {c.label && (\n <label class=\"textarea-label\" htmlFor={c.name}>\n {c.label}\n </label>\n )}\n\n <textarea\n {...allowedAttrs}\n class=\"textarea-element\"\n value={this.value}\n onInput={this.handleChange}\n ></textarea>\n\n {c.helpText && <p class=\"help-text\">{c.helpText}</p>}\n </div>\n );\n }\n}\n"],"version":3}