eslint-plugin-templ 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,10 @@
4
4
  * These schemas define the runtime validation and TypeScript types for the JSON
5
5
  * output from templ-ast-to-json. They serve as the source of truth for the
6
6
  * "from" types in the conversion to ESLint AST.
7
+ *
8
+ * Every type that sits behind a Go interface has a `type` discriminator field
9
+ * set to the Go struct name (e.g. "Element", "ConstantAttribute"). This is
10
+ * injected at serialization time via reflection in the Go code.
7
11
  */
8
12
  import { z } from "zod";
9
13
  /**
@@ -46,24 +50,28 @@ export declare const TemplExpressionSchema: z.ZodObject<{
46
50
  }, z.core.$strip>;
47
51
  }, z.core.$strip>;
48
52
  }, z.core.$strip>;
49
- export declare const TemplAttributeSchema: z.ZodObject<{
50
- Key: z.ZodObject<{
51
- Name: z.ZodString;
52
- NameRange: z.ZodObject<{
53
- From: z.ZodObject<{
54
- Index: z.ZodNumber;
55
- Line: z.ZodNumber;
56
- Col: z.ZodNumber;
57
- }, z.core.$strip>;
58
- To: z.ZodObject<{
59
- Index: z.ZodNumber;
60
- Line: z.ZodNumber;
61
- Col: z.ZodNumber;
62
- }, z.core.$strip>;
53
+ export type TemplPosition = z.infer<typeof TemplPositionSchema>;
54
+ export type TemplRange = z.infer<typeof TemplRangeSchema>;
55
+ export type TemplExpression = z.infer<typeof TemplExpressionSchema>;
56
+ export declare const TemplConstantAttributeKeySchema: z.ZodObject<{
57
+ type: z.ZodLiteral<"ConstantAttributeKey">;
58
+ Name: z.ZodString;
59
+ NameRange: z.ZodObject<{
60
+ From: z.ZodObject<{
61
+ Index: z.ZodNumber;
62
+ Line: z.ZodNumber;
63
+ Col: z.ZodNumber;
64
+ }, z.core.$strip>;
65
+ To: z.ZodObject<{
66
+ Index: z.ZodNumber;
67
+ Line: z.ZodNumber;
68
+ Col: z.ZodNumber;
63
69
  }, z.core.$strip>;
64
70
  }, z.core.$strip>;
65
- Value: z.ZodOptional<z.ZodString>;
66
- Expression: z.ZodOptional<z.ZodObject<{
71
+ }, z.core.$strip>;
72
+ export declare const TemplExpressionAttributeKeySchema: z.ZodObject<{
73
+ type: z.ZodLiteral<"ExpressionAttributeKey">;
74
+ Expression: z.ZodObject<{
67
75
  Value: z.ZodString;
68
76
  Range: z.ZodObject<{
69
77
  From: z.ZodObject<{
@@ -77,11 +85,12 @@ export declare const TemplAttributeSchema: z.ZodObject<{
77
85
  Col: z.ZodNumber;
78
86
  }, z.core.$strip>;
79
87
  }, z.core.$strip>;
80
- }, z.core.$strip>>;
81
- SingleQuote: z.ZodOptional<z.ZodBoolean>;
88
+ }, z.core.$strip>;
82
89
  }, z.core.$strip>;
83
- export declare const TemplStringExpressionSchema: z.ZodObject<{
84
- Range: z.ZodObject<{
90
+ export declare const TemplAttributeKeySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
91
+ type: z.ZodLiteral<"ConstantAttributeKey">;
92
+ Name: z.ZodString;
93
+ NameRange: z.ZodObject<{
85
94
  From: z.ZodObject<{
86
95
  Index: z.ZodNumber;
87
96
  Line: z.ZodNumber;
@@ -93,10 +102,8 @@ export declare const TemplStringExpressionSchema: z.ZodObject<{
93
102
  Col: z.ZodNumber;
94
103
  }, z.core.$strip>;
95
104
  }, z.core.$strip>;
96
- Value: z.ZodString;
97
- TrailingSpace: z.ZodString;
98
- }, z.core.$strip>;
99
- export declare const TemplGoExpressionSchema: z.ZodObject<{
105
+ }, z.core.$strip>, z.ZodObject<{
106
+ type: z.ZodLiteral<"ExpressionAttributeKey">;
100
107
  Expression: z.ZodObject<{
101
108
  Value: z.ZodString;
102
109
  Range: z.ZodObject<{
@@ -112,12 +119,16 @@ export declare const TemplGoExpressionSchema: z.ZodObject<{
112
119
  }, z.core.$strip>;
113
120
  }, z.core.$strip>;
114
121
  }, z.core.$strip>;
115
- TrailingSpace: z.ZodString;
116
- }, z.core.$strip>;
117
- export declare const TemplCallExpressionSchema: z.ZodObject<{
118
- Expression: z.ZodObject<{
119
- Value: z.ZodString;
120
- Range: z.ZodObject<{
122
+ }, z.core.$strip>], "type">;
123
+ export type TemplConstantAttributeKey = z.infer<typeof TemplConstantAttributeKeySchema>;
124
+ export type TemplExpressionAttributeKey = z.infer<typeof TemplExpressionAttributeKeySchema>;
125
+ export type TemplAttributeKey = z.infer<typeof TemplAttributeKeySchema>;
126
+ declare const TemplBooleanAttributeSchema: z.ZodObject<{
127
+ type: z.ZodLiteral<"BoolConstantAttribute">;
128
+ Key: z.ZodDiscriminatedUnion<[z.ZodObject<{
129
+ type: z.ZodLiteral<"ConstantAttributeKey">;
130
+ Name: z.ZodString;
131
+ NameRange: z.ZodObject<{
121
132
  From: z.ZodObject<{
122
133
  Index: z.ZodNumber;
123
134
  Line: z.ZodNumber;
@@ -129,8 +140,24 @@ export declare const TemplCallExpressionSchema: z.ZodObject<{
129
140
  Col: z.ZodNumber;
130
141
  }, z.core.$strip>;
131
142
  }, z.core.$strip>;
132
- }, z.core.$strip>;
133
- Children: z.ZodNull;
143
+ }, z.core.$strip>, z.ZodObject<{
144
+ type: z.ZodLiteral<"ExpressionAttributeKey">;
145
+ Expression: z.ZodObject<{
146
+ Value: z.ZodString;
147
+ Range: z.ZodObject<{
148
+ From: z.ZodObject<{
149
+ Index: z.ZodNumber;
150
+ Line: z.ZodNumber;
151
+ Col: z.ZodNumber;
152
+ }, z.core.$strip>;
153
+ To: z.ZodObject<{
154
+ Index: z.ZodNumber;
155
+ Line: z.ZodNumber;
156
+ Col: z.ZodNumber;
157
+ }, z.core.$strip>;
158
+ }, z.core.$strip>;
159
+ }, z.core.$strip>;
160
+ }, z.core.$strip>], "type">;
134
161
  Range: z.ZodObject<{
135
162
  From: z.ZodObject<{
136
163
  Index: z.ZodNumber;
@@ -144,31 +171,44 @@ export declare const TemplCallExpressionSchema: z.ZodObject<{
144
171
  }, z.core.$strip>;
145
172
  }, z.core.$strip>;
146
173
  }, z.core.$strip>;
147
- export declare const TemplWhitespaceSchema: z.ZodObject<{
148
- Value: z.ZodString;
149
- }, z.core.$strip>;
150
- export declare const TemplTextSchema: z.ZodObject<{
151
- Range: z.ZodObject<{
152
- From: z.ZodObject<{
153
- Index: z.ZodNumber;
154
- Line: z.ZodNumber;
155
- Col: z.ZodNumber;
174
+ declare const TemplValueAttributeSchema: z.ZodObject<{
175
+ type: z.ZodLiteral<"ConstantAttribute">;
176
+ Key: z.ZodDiscriminatedUnion<[z.ZodObject<{
177
+ type: z.ZodLiteral<"ConstantAttributeKey">;
178
+ Name: z.ZodString;
179
+ NameRange: z.ZodObject<{
180
+ From: z.ZodObject<{
181
+ Index: z.ZodNumber;
182
+ Line: z.ZodNumber;
183
+ Col: z.ZodNumber;
184
+ }, z.core.$strip>;
185
+ To: z.ZodObject<{
186
+ Index: z.ZodNumber;
187
+ Line: z.ZodNumber;
188
+ Col: z.ZodNumber;
189
+ }, z.core.$strip>;
156
190
  }, z.core.$strip>;
157
- To: z.ZodObject<{
158
- Index: z.ZodNumber;
159
- Line: z.ZodNumber;
160
- Col: z.ZodNumber;
191
+ }, z.core.$strip>, z.ZodObject<{
192
+ type: z.ZodLiteral<"ExpressionAttributeKey">;
193
+ Expression: z.ZodObject<{
194
+ Value: z.ZodString;
195
+ Range: z.ZodObject<{
196
+ From: z.ZodObject<{
197
+ Index: z.ZodNumber;
198
+ Line: z.ZodNumber;
199
+ Col: z.ZodNumber;
200
+ }, z.core.$strip>;
201
+ To: z.ZodObject<{
202
+ Index: z.ZodNumber;
203
+ Line: z.ZodNumber;
204
+ Col: z.ZodNumber;
205
+ }, z.core.$strip>;
206
+ }, z.core.$strip>;
161
207
  }, z.core.$strip>;
162
- }, z.core.$strip>;
208
+ }, z.core.$strip>], "type">;
163
209
  Value: z.ZodString;
164
- TrailingSpace: z.ZodString;
165
- }, z.core.$strip>;
166
- export declare const TemplDocTypeSchema: z.ZodObject<{
167
- Value: z.ZodString;
168
- }, z.core.$strip>;
169
- export declare const TemplHTMLCommentSchema: z.ZodObject<{
170
- Contents: z.ZodString;
171
- Range: z.ZodObject<{
210
+ SingleQuote: z.ZodBoolean;
211
+ ValueRange: z.ZodObject<{
172
212
  From: z.ZodObject<{
173
213
  Index: z.ZodNumber;
174
214
  Line: z.ZodNumber;
@@ -180,10 +220,6 @@ export declare const TemplHTMLCommentSchema: z.ZodObject<{
180
220
  Col: z.ZodNumber;
181
221
  }, z.core.$strip>;
182
222
  }, z.core.$strip>;
183
- }, z.core.$strip>;
184
- export declare const TemplGoCommentSchema: z.ZodObject<{
185
- Contents: z.ZodString;
186
- Multiline: z.ZodBoolean;
187
223
  Range: z.ZodObject<{
188
224
  From: z.ZodObject<{
189
225
  Index: z.ZodNumber;
@@ -197,10 +233,12 @@ export declare const TemplGoCommentSchema: z.ZodObject<{
197
233
  }, z.core.$strip>;
198
234
  }, z.core.$strip>;
199
235
  }, z.core.$strip>;
200
- export declare const TemplGoCodeSchema: z.ZodObject<{
201
- Expression: z.ZodObject<{
202
- Value: z.ZodString;
203
- Range: z.ZodObject<{
236
+ declare const TemplExpressionAttributeNodeSchema: z.ZodObject<{
237
+ type: z.ZodLiteral<"ExpressionAttribute">;
238
+ Key: z.ZodDiscriminatedUnion<[z.ZodObject<{
239
+ type: z.ZodLiteral<"ConstantAttributeKey">;
240
+ Name: z.ZodString;
241
+ NameRange: z.ZodObject<{
204
242
  From: z.ZodObject<{
205
243
  Index: z.ZodNumber;
206
244
  Line: z.ZodNumber;
@@ -212,18 +250,8 @@ export declare const TemplGoCodeSchema: z.ZodObject<{
212
250
  Col: z.ZodNumber;
213
251
  }, z.core.$strip>;
214
252
  }, z.core.$strip>;
215
- }, z.core.$strip>;
216
- TrailingSpace: z.ZodString;
217
- Multiline: z.ZodBoolean;
218
- }, z.core.$strip>;
219
- export declare const TemplChildrenExpressionSchema: z.ZodObject<{}, z.core.$strip>;
220
- export declare const TemplConstantCSSPropertySchema: z.ZodObject<{
221
- Name: z.ZodString;
222
- Value: z.ZodString;
223
- }, z.core.$strip>;
224
- export declare const TemplExpressionCSSPropertySchema: z.ZodObject<{
225
- Name: z.ZodString;
226
- Value: z.ZodObject<{
253
+ }, z.core.$strip>, z.ZodObject<{
254
+ type: z.ZodLiteral<"ExpressionAttributeKey">;
227
255
  Expression: z.ZodObject<{
228
256
  Value: z.ZodString;
229
257
  Range: z.ZodObject<{
@@ -239,15 +267,67 @@ export declare const TemplExpressionCSSPropertySchema: z.ZodObject<{
239
267
  }, z.core.$strip>;
240
268
  }, z.core.$strip>;
241
269
  }, z.core.$strip>;
242
- TrailingSpace: z.ZodString;
270
+ }, z.core.$strip>], "type">;
271
+ Expression: z.ZodObject<{
272
+ Value: z.ZodString;
273
+ Range: z.ZodObject<{
274
+ From: z.ZodObject<{
275
+ Index: z.ZodNumber;
276
+ Line: z.ZodNumber;
277
+ Col: z.ZodNumber;
278
+ }, z.core.$strip>;
279
+ To: z.ZodObject<{
280
+ Index: z.ZodNumber;
281
+ Line: z.ZodNumber;
282
+ Col: z.ZodNumber;
283
+ }, z.core.$strip>;
284
+ }, z.core.$strip>;
285
+ }, z.core.$strip>;
286
+ SingleQuote: z.ZodOptional<z.ZodBoolean>;
287
+ AttributeStartRange: z.ZodObject<{
288
+ From: z.ZodObject<{
289
+ Index: z.ZodNumber;
290
+ Line: z.ZodNumber;
291
+ Col: z.ZodNumber;
292
+ }, z.core.$strip>;
293
+ To: z.ZodObject<{
294
+ Index: z.ZodNumber;
295
+ Line: z.ZodNumber;
296
+ Col: z.ZodNumber;
297
+ }, z.core.$strip>;
298
+ }, z.core.$strip>;
299
+ Range: z.ZodObject<{
300
+ From: z.ZodObject<{
301
+ Index: z.ZodNumber;
302
+ Line: z.ZodNumber;
303
+ Col: z.ZodNumber;
304
+ }, z.core.$strip>;
305
+ To: z.ZodObject<{
306
+ Index: z.ZodNumber;
307
+ Line: z.ZodNumber;
308
+ Col: z.ZodNumber;
309
+ }, z.core.$strip>;
243
310
  }, z.core.$strip>;
244
311
  }, z.core.$strip>;
245
- export declare const TemplCSSPropertySchema: z.ZodUnion<readonly [z.ZodObject<{
246
- Name: z.ZodString;
247
- Value: z.ZodString;
248
- }, z.core.$strip>, z.ZodObject<{
249
- Name: z.ZodString;
250
- Value: z.ZodObject<{
312
+ declare const TemplBooleanExpressionAttributeSchema: z.ZodObject<{
313
+ type: z.ZodLiteral<"BoolExpressionAttribute">;
314
+ Key: z.ZodDiscriminatedUnion<[z.ZodObject<{
315
+ type: z.ZodLiteral<"ConstantAttributeKey">;
316
+ Name: z.ZodString;
317
+ NameRange: z.ZodObject<{
318
+ From: z.ZodObject<{
319
+ Index: z.ZodNumber;
320
+ Line: z.ZodNumber;
321
+ Col: z.ZodNumber;
322
+ }, z.core.$strip>;
323
+ To: z.ZodObject<{
324
+ Index: z.ZodNumber;
325
+ Line: z.ZodNumber;
326
+ Col: z.ZodNumber;
327
+ }, z.core.$strip>;
328
+ }, z.core.$strip>;
329
+ }, z.core.$strip>, z.ZodObject<{
330
+ type: z.ZodLiteral<"ExpressionAttributeKey">;
251
331
  Expression: z.ZodObject<{
252
332
  Value: z.ZodString;
253
333
  Range: z.ZodObject<{
@@ -263,10 +343,22 @@ export declare const TemplCSSPropertySchema: z.ZodUnion<readonly [z.ZodObject<{
263
343
  }, z.core.$strip>;
264
344
  }, z.core.$strip>;
265
345
  }, z.core.$strip>;
266
- TrailingSpace: z.ZodString;
346
+ }, z.core.$strip>], "type">;
347
+ Expression: z.ZodObject<{
348
+ Value: z.ZodString;
349
+ Range: z.ZodObject<{
350
+ From: z.ZodObject<{
351
+ Index: z.ZodNumber;
352
+ Line: z.ZodNumber;
353
+ Col: z.ZodNumber;
354
+ }, z.core.$strip>;
355
+ To: z.ZodObject<{
356
+ Index: z.ZodNumber;
357
+ Line: z.ZodNumber;
358
+ Col: z.ZodNumber;
359
+ }, z.core.$strip>;
360
+ }, z.core.$strip>;
267
361
  }, z.core.$strip>;
268
- }, z.core.$strip>]>;
269
- export declare const TemplCSSTemplateSchema: z.ZodObject<{
270
362
  Range: z.ZodObject<{
271
363
  From: z.ZodObject<{
272
364
  Index: z.ZodNumber;
@@ -279,7 +371,9 @@ export declare const TemplCSSTemplateSchema: z.ZodObject<{
279
371
  Col: z.ZodNumber;
280
372
  }, z.core.$strip>;
281
373
  }, z.core.$strip>;
282
- Name: z.ZodString;
374
+ }, z.core.$strip>;
375
+ declare const TemplSpreadAttributesSchema: z.ZodObject<{
376
+ type: z.ZodLiteral<"SpreadAttributes">;
283
377
  Expression: z.ZodObject<{
284
378
  Value: z.ZodString;
285
379
  Range: z.ZodObject<{
@@ -295,32 +389,6 @@ export declare const TemplCSSTemplateSchema: z.ZodObject<{
295
389
  }, z.core.$strip>;
296
390
  }, z.core.$strip>;
297
391
  }, z.core.$strip>;
298
- Properties: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
299
- Name: z.ZodString;
300
- Value: z.ZodString;
301
- }, z.core.$strip>, z.ZodObject<{
302
- Name: z.ZodString;
303
- Value: z.ZodObject<{
304
- Expression: z.ZodObject<{
305
- Value: z.ZodString;
306
- Range: z.ZodObject<{
307
- From: z.ZodObject<{
308
- Index: z.ZodNumber;
309
- Line: z.ZodNumber;
310
- Col: z.ZodNumber;
311
- }, z.core.$strip>;
312
- To: z.ZodObject<{
313
- Index: z.ZodNumber;
314
- Line: z.ZodNumber;
315
- Col: z.ZodNumber;
316
- }, z.core.$strip>;
317
- }, z.core.$strip>;
318
- }, z.core.$strip>;
319
- TrailingSpace: z.ZodString;
320
- }, z.core.$strip>;
321
- }, z.core.$strip>]>>;
322
- }, z.core.$strip>;
323
- export declare const TemplScriptTemplateSchema: z.ZodObject<{
324
392
  Range: z.ZodObject<{
325
393
  From: z.ZodObject<{
326
394
  Index: z.ZodNumber;
@@ -333,7 +401,22 @@ export declare const TemplScriptTemplateSchema: z.ZodObject<{
333
401
  Col: z.ZodNumber;
334
402
  }, z.core.$strip>;
335
403
  }, z.core.$strip>;
336
- Name: z.ZodObject<{
404
+ }, z.core.$strip>;
405
+ export type TemplBooleanAttribute = z.infer<typeof TemplBooleanAttributeSchema>;
406
+ export type TemplValueAttribute = z.infer<typeof TemplValueAttributeSchema>;
407
+ export type TemplExpressionAttributeNode = z.infer<typeof TemplExpressionAttributeNodeSchema>;
408
+ export type TemplBooleanExpressionAttribute = z.infer<typeof TemplBooleanExpressionAttributeSchema>;
409
+ export type TemplSpreadAttribute = z.infer<typeof TemplSpreadAttributesSchema>;
410
+ export interface TemplConditionalAttribute {
411
+ type: "ConditionalAttribute";
412
+ Expression: TemplExpression;
413
+ Then: TemplAttribute[];
414
+ Else: TemplAttribute[] | null;
415
+ Range: TemplRange;
416
+ }
417
+ export declare const TemplConditionalAttributeSchema: z.ZodObject<{
418
+ type: z.ZodLiteral<"ConditionalAttribute">;
419
+ Expression: z.ZodObject<{
337
420
  Value: z.ZodString;
338
421
  Range: z.ZodObject<{
339
422
  From: z.ZodObject<{
@@ -348,7 +431,25 @@ export declare const TemplScriptTemplateSchema: z.ZodObject<{
348
431
  }, z.core.$strip>;
349
432
  }, z.core.$strip>;
350
433
  }, z.core.$strip>;
351
- Parameters: z.ZodObject<{
434
+ Then: z.ZodArray<z.ZodType<TemplAttribute, unknown, z.core.$ZodTypeInternals<TemplAttribute, unknown>>>;
435
+ Else: z.ZodNullable<z.ZodArray<z.ZodType<TemplAttribute, unknown, z.core.$ZodTypeInternals<TemplAttribute, unknown>>>>;
436
+ Range: z.ZodObject<{
437
+ From: z.ZodObject<{
438
+ Index: z.ZodNumber;
439
+ Line: z.ZodNumber;
440
+ Col: z.ZodNumber;
441
+ }, z.core.$strip>;
442
+ To: z.ZodObject<{
443
+ Index: z.ZodNumber;
444
+ Line: z.ZodNumber;
445
+ Col: z.ZodNumber;
446
+ }, z.core.$strip>;
447
+ }, z.core.$strip>;
448
+ }, z.core.$strip>;
449
+ export type TemplAttribute = TemplBooleanAttribute | TemplValueAttribute | TemplExpressionAttributeNode | TemplBooleanExpressionAttribute | TemplSpreadAttribute | TemplConditionalAttribute;
450
+ export declare const TemplAttributeSchema: z.ZodType<TemplAttribute>;
451
+ export declare const TemplStringExpressionSchema: z.ZodObject<{
452
+ Expression: z.ZodObject<{
352
453
  Value: z.ZodString;
353
454
  Range: z.ZodObject<{
354
455
  From: z.ZodObject<{
@@ -363,9 +464,43 @@ export declare const TemplScriptTemplateSchema: z.ZodObject<{
363
464
  }, z.core.$strip>;
364
465
  }, z.core.$strip>;
365
466
  }, z.core.$strip>;
467
+ TrailingSpace: z.ZodString;
468
+ type: z.ZodLiteral<"StringExpression">;
469
+ }, z.core.$strip>;
470
+ export declare const TemplWhitespaceSchema: z.ZodObject<{
471
+ type: z.ZodLiteral<"Whitespace">;
472
+ Range: z.ZodObject<{
473
+ From: z.ZodObject<{
474
+ Index: z.ZodNumber;
475
+ Line: z.ZodNumber;
476
+ Col: z.ZodNumber;
477
+ }, z.core.$strip>;
478
+ To: z.ZodObject<{
479
+ Index: z.ZodNumber;
480
+ Line: z.ZodNumber;
481
+ Col: z.ZodNumber;
482
+ }, z.core.$strip>;
483
+ }, z.core.$strip>;
366
484
  Value: z.ZodString;
367
485
  }, z.core.$strip>;
368
- export declare const TemplFileGoExpressionSchema: z.ZodObject<{
486
+ export declare const TemplTextSchema: z.ZodObject<{
487
+ type: z.ZodLiteral<"Text">;
488
+ Range: z.ZodObject<{
489
+ From: z.ZodObject<{
490
+ Index: z.ZodNumber;
491
+ Line: z.ZodNumber;
492
+ Col: z.ZodNumber;
493
+ }, z.core.$strip>;
494
+ To: z.ZodObject<{
495
+ Index: z.ZodNumber;
496
+ Line: z.ZodNumber;
497
+ Col: z.ZodNumber;
498
+ }, z.core.$strip>;
499
+ }, z.core.$strip>;
500
+ Value: z.ZodString;
501
+ TrailingSpace: z.ZodString;
502
+ }, z.core.$strip>;
503
+ export declare const TemplGoCodeSchema: z.ZodObject<{
369
504
  Expression: z.ZodObject<{
370
505
  Value: z.ZodString;
371
506
  Range: z.ZodObject<{
@@ -381,44 +516,237 @@ export declare const TemplFileGoExpressionSchema: z.ZodObject<{
381
516
  }, z.core.$strip>;
382
517
  }, z.core.$strip>;
383
518
  }, z.core.$strip>;
384
- BeforePackage: z.ZodBoolean;
519
+ TrailingSpace: z.ZodString;
520
+ Multiline: z.ZodBoolean;
521
+ type: z.ZodLiteral<"GoCode">;
522
+ }, z.core.$strip>;
523
+ export declare const TemplCallExpressionSchema: z.ZodObject<{
524
+ type: z.ZodLiteral<"CallTemplateExpression">;
525
+ Expression: z.ZodObject<{
526
+ Value: z.ZodString;
527
+ Range: z.ZodObject<{
528
+ From: z.ZodObject<{
529
+ Index: z.ZodNumber;
530
+ Line: z.ZodNumber;
531
+ Col: z.ZodNumber;
532
+ }, z.core.$strip>;
533
+ To: z.ZodObject<{
534
+ Index: z.ZodNumber;
535
+ Line: z.ZodNumber;
536
+ Col: z.ZodNumber;
537
+ }, z.core.$strip>;
538
+ }, z.core.$strip>;
539
+ }, z.core.$strip>;
540
+ Range: z.ZodObject<{
541
+ From: z.ZodObject<{
542
+ Index: z.ZodNumber;
543
+ Line: z.ZodNumber;
544
+ Col: z.ZodNumber;
545
+ }, z.core.$strip>;
546
+ To: z.ZodObject<{
547
+ Index: z.ZodNumber;
548
+ Line: z.ZodNumber;
549
+ Col: z.ZodNumber;
550
+ }, z.core.$strip>;
551
+ }, z.core.$strip>;
552
+ }, z.core.$strip>;
553
+ export declare const TemplDocTypeSchema: z.ZodObject<{
554
+ type: z.ZodLiteral<"DocType">;
555
+ Range: z.ZodObject<{
556
+ From: z.ZodObject<{
557
+ Index: z.ZodNumber;
558
+ Line: z.ZodNumber;
559
+ Col: z.ZodNumber;
560
+ }, z.core.$strip>;
561
+ To: z.ZodObject<{
562
+ Index: z.ZodNumber;
563
+ Line: z.ZodNumber;
564
+ Col: z.ZodNumber;
565
+ }, z.core.$strip>;
566
+ }, z.core.$strip>;
567
+ Value: z.ZodString;
568
+ OpenRange: z.ZodObject<{
569
+ From: z.ZodObject<{
570
+ Index: z.ZodNumber;
571
+ Line: z.ZodNumber;
572
+ Col: z.ZodNumber;
573
+ }, z.core.$strip>;
574
+ To: z.ZodObject<{
575
+ Index: z.ZodNumber;
576
+ Line: z.ZodNumber;
577
+ Col: z.ZodNumber;
578
+ }, z.core.$strip>;
579
+ }, z.core.$strip>;
580
+ ValueRange: z.ZodObject<{
581
+ From: z.ZodObject<{
582
+ Index: z.ZodNumber;
583
+ Line: z.ZodNumber;
584
+ Col: z.ZodNumber;
585
+ }, z.core.$strip>;
586
+ To: z.ZodObject<{
587
+ Index: z.ZodNumber;
588
+ Line: z.ZodNumber;
589
+ Col: z.ZodNumber;
590
+ }, z.core.$strip>;
591
+ }, z.core.$strip>;
592
+ CloseRange: z.ZodObject<{
593
+ From: z.ZodObject<{
594
+ Index: z.ZodNumber;
595
+ Line: z.ZodNumber;
596
+ Col: z.ZodNumber;
597
+ }, z.core.$strip>;
598
+ To: z.ZodObject<{
599
+ Index: z.ZodNumber;
600
+ Line: z.ZodNumber;
601
+ Col: z.ZodNumber;
602
+ }, z.core.$strip>;
603
+ }, z.core.$strip>;
604
+ }, z.core.$strip>;
605
+ export declare const TemplHTMLCommentSchema: z.ZodObject<{
606
+ type: z.ZodLiteral<"HTMLComment">;
607
+ Contents: z.ZodString;
608
+ Range: z.ZodObject<{
609
+ From: z.ZodObject<{
610
+ Index: z.ZodNumber;
611
+ Line: z.ZodNumber;
612
+ Col: z.ZodNumber;
613
+ }, z.core.$strip>;
614
+ To: z.ZodObject<{
615
+ Index: z.ZodNumber;
616
+ Line: z.ZodNumber;
617
+ Col: z.ZodNumber;
618
+ }, z.core.$strip>;
619
+ }, z.core.$strip>;
620
+ }, z.core.$strip>;
621
+ export declare const TemplGoCommentSchema: z.ZodObject<{
622
+ type: z.ZodLiteral<"GoComment">;
623
+ Contents: z.ZodString;
624
+ Multiline: z.ZodBoolean;
625
+ Range: z.ZodObject<{
626
+ From: z.ZodObject<{
627
+ Index: z.ZodNumber;
628
+ Line: z.ZodNumber;
629
+ Col: z.ZodNumber;
630
+ }, z.core.$strip>;
631
+ To: z.ZodObject<{
632
+ Index: z.ZodNumber;
633
+ Line: z.ZodNumber;
634
+ Col: z.ZodNumber;
635
+ }, z.core.$strip>;
636
+ }, z.core.$strip>;
637
+ }, z.core.$strip>;
638
+ export declare const TemplChildrenExpressionSchema: z.ZodObject<{
639
+ type: z.ZodLiteral<"ChildrenExpression">;
640
+ Range: z.ZodObject<{
641
+ From: z.ZodObject<{
642
+ Index: z.ZodNumber;
643
+ Line: z.ZodNumber;
644
+ Col: z.ZodNumber;
645
+ }, z.core.$strip>;
646
+ To: z.ZodObject<{
647
+ Index: z.ZodNumber;
648
+ Line: z.ZodNumber;
649
+ Col: z.ZodNumber;
650
+ }, z.core.$strip>;
651
+ }, z.core.$strip>;
652
+ }, z.core.$strip>;
653
+ export declare const TemplFallthroughSchema: z.ZodObject<{
654
+ type: z.ZodLiteral<"Fallthrough">;
655
+ Range: z.ZodObject<{
656
+ From: z.ZodObject<{
657
+ Index: z.ZodNumber;
658
+ Line: z.ZodNumber;
659
+ Col: z.ZodNumber;
660
+ }, z.core.$strip>;
661
+ To: z.ZodObject<{
662
+ Index: z.ZodNumber;
663
+ Line: z.ZodNumber;
664
+ Col: z.ZodNumber;
665
+ }, z.core.$strip>;
666
+ }, z.core.$strip>;
385
667
  }, z.core.$strip>;
386
668
  /**
387
669
  * Inferred TypeScript types from Zod schemas
388
- *
389
- * Note: For recursive types (TemplChild, TemplElementNode), we define explicit
390
- * TypeScript interfaces instead of using z.infer to enable better type narrowing
391
- * and discriminated unions.
392
670
  */
393
- export type TemplPosition = z.infer<typeof TemplPositionSchema>;
394
- export type TemplRange = z.infer<typeof TemplRangeSchema>;
395
- export type TemplExpression = z.infer<typeof TemplExpressionSchema>;
396
- export type TemplAttribute = z.infer<typeof TemplAttributeSchema>;
397
671
  export type TemplStringExpression = z.infer<typeof TemplStringExpressionSchema>;
398
- export type TemplGoExpression = z.infer<typeof TemplGoExpressionSchema>;
399
- export type TemplCallExpression = z.infer<typeof TemplCallExpressionSchema>;
400
672
  export type TemplWhitespace = z.infer<typeof TemplWhitespaceSchema>;
401
673
  export type TemplText = z.infer<typeof TemplTextSchema>;
674
+ export type TemplGoCode = z.infer<typeof TemplGoCodeSchema>;
675
+ export type TemplCallExpression = z.infer<typeof TemplCallExpressionSchema>;
402
676
  export type TemplDocType = z.infer<typeof TemplDocTypeSchema>;
403
677
  export type TemplHTMLComment = z.infer<typeof TemplHTMLCommentSchema>;
404
678
  export type TemplGoComment = z.infer<typeof TemplGoCommentSchema>;
405
- export type TemplGoCode = z.infer<typeof TemplGoCodeSchema>;
406
679
  export type TemplChildrenExpression = z.infer<typeof TemplChildrenExpressionSchema>;
680
+ export type TemplFallthrough = z.infer<typeof TemplFallthroughSchema>;
681
+ export declare const TemplConstantCSSPropertySchema: z.ZodObject<{
682
+ type: z.ZodLiteral<"ConstantCSSProperty">;
683
+ Name: z.ZodString;
684
+ Value: z.ZodString;
685
+ }, z.core.$strip>;
686
+ export declare const TemplExpressionCSSPropertySchema: z.ZodObject<{
687
+ type: z.ZodLiteral<"ExpressionCSSProperty">;
688
+ Name: z.ZodString;
689
+ Value: z.ZodObject<{
690
+ Expression: z.ZodObject<{
691
+ Value: z.ZodString;
692
+ Range: z.ZodObject<{
693
+ From: z.ZodObject<{
694
+ Index: z.ZodNumber;
695
+ Line: z.ZodNumber;
696
+ Col: z.ZodNumber;
697
+ }, z.core.$strip>;
698
+ To: z.ZodObject<{
699
+ Index: z.ZodNumber;
700
+ Line: z.ZodNumber;
701
+ Col: z.ZodNumber;
702
+ }, z.core.$strip>;
703
+ }, z.core.$strip>;
704
+ }, z.core.$strip>;
705
+ TrailingSpace: z.ZodString;
706
+ }, z.core.$strip>;
707
+ }, z.core.$strip>;
708
+ export declare const TemplCSSPropertySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
709
+ type: z.ZodLiteral<"ConstantCSSProperty">;
710
+ Name: z.ZodString;
711
+ Value: z.ZodString;
712
+ }, z.core.$strip>, z.ZodObject<{
713
+ type: z.ZodLiteral<"ExpressionCSSProperty">;
714
+ Name: z.ZodString;
715
+ Value: z.ZodObject<{
716
+ Expression: z.ZodObject<{
717
+ Value: z.ZodString;
718
+ Range: z.ZodObject<{
719
+ From: z.ZodObject<{
720
+ Index: z.ZodNumber;
721
+ Line: z.ZodNumber;
722
+ Col: z.ZodNumber;
723
+ }, z.core.$strip>;
724
+ To: z.ZodObject<{
725
+ Index: z.ZodNumber;
726
+ Line: z.ZodNumber;
727
+ Col: z.ZodNumber;
728
+ }, z.core.$strip>;
729
+ }, z.core.$strip>;
730
+ }, z.core.$strip>;
731
+ TrailingSpace: z.ZodString;
732
+ }, z.core.$strip>;
733
+ }, z.core.$strip>], "type">;
407
734
  export type TemplConstantCSSProperty = z.infer<typeof TemplConstantCSSPropertySchema>;
408
735
  export type TemplExpressionCSSProperty = z.infer<typeof TemplExpressionCSSPropertySchema>;
409
736
  export type TemplCSSProperty = z.infer<typeof TemplCSSPropertySchema>;
410
- export type TemplCSSTemplate = z.infer<typeof TemplCSSTemplateSchema>;
411
- export type TemplScriptTemplate = z.infer<typeof TemplScriptTemplateSchema>;
412
- export type TemplFileGoExpression = z.infer<typeof TemplFileGoExpressionSchema>;
413
737
  export interface TemplElementNode {
738
+ type: "Element";
414
739
  Name: string;
415
740
  Attributes: TemplAttribute[] | null;
416
741
  IndentAttrs: boolean;
417
- Children: TemplChild[];
742
+ Children: TemplChild[] | null;
418
743
  IndentChildren: boolean;
419
744
  TrailingSpace: string;
420
745
  NameRange: TemplRange;
746
+ OpenTagRange: TemplRange;
421
747
  Range: TemplRange;
748
+ CloseTagRange: TemplRange | null;
749
+ SelfClosing: boolean;
422
750
  }
423
751
  export interface TemplElseIfExpression {
424
752
  Expression: TemplExpression;
@@ -426,6 +754,7 @@ export interface TemplElseIfExpression {
426
754
  Range: TemplRange;
427
755
  }
428
756
  export interface TemplIfExpression {
757
+ type: "IfExpression";
429
758
  Expression: TemplExpression;
430
759
  Then: TemplChild[];
431
760
  ElseIfs: TemplElseIfExpression[] | null;
@@ -437,49 +766,179 @@ export interface TemplCaseExpression {
437
766
  Children: TemplChild[];
438
767
  }
439
768
  export interface TemplSwitchExpression {
769
+ type: "SwitchExpression";
440
770
  Expression: TemplExpression;
441
771
  Cases: TemplCaseExpression[];
442
772
  Range: TemplRange;
443
773
  }
444
774
  export interface TemplForExpression {
775
+ type: "ForExpression";
445
776
  Expression: TemplExpression;
446
777
  Children: TemplChild[];
447
778
  Range: TemplRange;
448
779
  }
449
780
  export interface TemplElementExpression {
781
+ type: "TemplElementExpression";
450
782
  Expression: TemplExpression;
451
783
  Children: TemplChild[] | null;
452
784
  Range: TemplRange;
453
785
  }
454
- export interface TemplScriptContents {
455
- Value: string | null;
456
- GoCode: TemplGoCode | null;
457
- InsideStringLiteral: boolean;
458
- }
459
786
  export interface TemplScriptElement {
787
+ type: "ScriptElement";
460
788
  Attributes: TemplAttribute[] | null;
461
- Contents: TemplScriptContents[];
789
+ Contents: TemplScriptContents[] | null;
790
+ OpenTagRange: TemplRange;
791
+ CloseTagRange: TemplRange;
462
792
  Range: TemplRange;
463
793
  }
464
794
  export interface TemplRawElement {
795
+ type: "RawElement";
465
796
  Name: string;
466
797
  Attributes: TemplAttribute[] | null;
467
798
  Contents: string;
799
+ NameRange: TemplRange;
800
+ OpenTagRange: TemplRange;
801
+ CloseTagRange: TemplRange;
468
802
  Range: TemplRange;
469
803
  }
470
- export type TemplChild = TemplStringExpression | TemplGoExpression | TemplGoCode | TemplCallExpression | TemplElementExpression | TemplElementNode | TemplWhitespace | TemplText | TemplDocType | TemplHTMLComment | TemplGoComment | TemplIfExpression | TemplForExpression | TemplSwitchExpression | TemplChildrenExpression | TemplScriptElement | TemplRawElement;
471
- export declare const TemplElementNodeSchema: z.ZodType<TemplElementNode>;
472
- export declare const TemplElseIfExpressionSchema: z.ZodType<TemplElseIfExpression>;
473
- export declare const TemplIfExpressionSchema: z.ZodType<TemplIfExpression>;
474
- export declare const TemplCaseExpressionSchema: z.ZodType<TemplCaseExpression>;
475
- export declare const TemplSwitchExpressionSchema: z.ZodType<TemplSwitchExpression>;
476
- export declare const TemplForExpressionSchema: z.ZodType<TemplForExpression>;
477
- export declare const TemplElementExpressionSchema: z.ZodType<TemplElementExpression>;
478
- export declare const TemplScriptContentsSchema: z.ZodType<TemplScriptContents>;
479
- export declare const TemplScriptElementSchema: z.ZodType<TemplScriptElement>;
480
- export declare const TemplRawElementSchema: z.ZodType<TemplRawElement>;
481
- export declare const TemplChildSchema: z.ZodType<TemplChild>;
482
- export declare const TemplHTMLTemplateSchema: z.ZodObject<{
804
+ export type TemplChild = TemplStringExpression | TemplGoCode | TemplCallExpression | TemplElementExpression | TemplElementNode | TemplWhitespace | TemplText | TemplDocType | TemplHTMLComment | TemplGoComment | TemplIfExpression | TemplForExpression | TemplSwitchExpression | TemplFallthrough | TemplChildrenExpression | TemplScriptElement | TemplRawElement;
805
+ export declare const TemplElementNodeSchema: z.ZodObject<{
806
+ type: z.ZodLiteral<"Element">;
807
+ Name: z.ZodString;
808
+ Attributes: z.ZodNullable<z.ZodArray<z.ZodType<TemplAttribute, unknown, z.core.$ZodTypeInternals<TemplAttribute, unknown>>>>;
809
+ IndentAttrs: z.ZodBoolean;
810
+ Children: z.ZodNullable<z.ZodArray<z.ZodType<TemplChild, unknown, z.core.$ZodTypeInternals<TemplChild, unknown>>>>;
811
+ IndentChildren: z.ZodBoolean;
812
+ TrailingSpace: z.ZodString;
813
+ NameRange: z.ZodObject<{
814
+ From: z.ZodObject<{
815
+ Index: z.ZodNumber;
816
+ Line: z.ZodNumber;
817
+ Col: z.ZodNumber;
818
+ }, z.core.$strip>;
819
+ To: z.ZodObject<{
820
+ Index: z.ZodNumber;
821
+ Line: z.ZodNumber;
822
+ Col: z.ZodNumber;
823
+ }, z.core.$strip>;
824
+ }, z.core.$strip>;
825
+ OpenTagRange: z.ZodObject<{
826
+ From: z.ZodObject<{
827
+ Index: z.ZodNumber;
828
+ Line: z.ZodNumber;
829
+ Col: z.ZodNumber;
830
+ }, z.core.$strip>;
831
+ To: z.ZodObject<{
832
+ Index: z.ZodNumber;
833
+ Line: z.ZodNumber;
834
+ Col: z.ZodNumber;
835
+ }, z.core.$strip>;
836
+ }, z.core.$strip>;
837
+ Range: z.ZodObject<{
838
+ From: z.ZodObject<{
839
+ Index: z.ZodNumber;
840
+ Line: z.ZodNumber;
841
+ Col: z.ZodNumber;
842
+ }, z.core.$strip>;
843
+ To: z.ZodObject<{
844
+ Index: z.ZodNumber;
845
+ Line: z.ZodNumber;
846
+ Col: z.ZodNumber;
847
+ }, z.core.$strip>;
848
+ }, z.core.$strip>;
849
+ CloseTagRange: z.ZodNullable<z.ZodObject<{
850
+ From: z.ZodObject<{
851
+ Index: z.ZodNumber;
852
+ Line: z.ZodNumber;
853
+ Col: z.ZodNumber;
854
+ }, z.core.$strip>;
855
+ To: z.ZodObject<{
856
+ Index: z.ZodNumber;
857
+ Line: z.ZodNumber;
858
+ Col: z.ZodNumber;
859
+ }, z.core.$strip>;
860
+ }, z.core.$strip>>;
861
+ SelfClosing: z.ZodBoolean;
862
+ }, z.core.$strip>;
863
+ export declare const TemplElseIfExpressionSchema: z.ZodObject<{
864
+ Expression: z.ZodObject<{
865
+ Value: z.ZodString;
866
+ Range: z.ZodObject<{
867
+ From: z.ZodObject<{
868
+ Index: z.ZodNumber;
869
+ Line: z.ZodNumber;
870
+ Col: z.ZodNumber;
871
+ }, z.core.$strip>;
872
+ To: z.ZodObject<{
873
+ Index: z.ZodNumber;
874
+ Line: z.ZodNumber;
875
+ Col: z.ZodNumber;
876
+ }, z.core.$strip>;
877
+ }, z.core.$strip>;
878
+ }, z.core.$strip>;
879
+ Then: z.ZodArray<z.ZodType<TemplChild, unknown, z.core.$ZodTypeInternals<TemplChild, unknown>>>;
880
+ Range: z.ZodObject<{
881
+ From: z.ZodObject<{
882
+ Index: z.ZodNumber;
883
+ Line: z.ZodNumber;
884
+ Col: z.ZodNumber;
885
+ }, z.core.$strip>;
886
+ To: z.ZodObject<{
887
+ Index: z.ZodNumber;
888
+ Line: z.ZodNumber;
889
+ Col: z.ZodNumber;
890
+ }, z.core.$strip>;
891
+ }, z.core.$strip>;
892
+ }, z.core.$strip>;
893
+ export declare const TemplIfExpressionSchema: z.ZodObject<{
894
+ type: z.ZodLiteral<"IfExpression">;
895
+ Expression: z.ZodObject<{
896
+ Value: z.ZodString;
897
+ Range: z.ZodObject<{
898
+ From: z.ZodObject<{
899
+ Index: z.ZodNumber;
900
+ Line: z.ZodNumber;
901
+ Col: z.ZodNumber;
902
+ }, z.core.$strip>;
903
+ To: z.ZodObject<{
904
+ Index: z.ZodNumber;
905
+ Line: z.ZodNumber;
906
+ Col: z.ZodNumber;
907
+ }, z.core.$strip>;
908
+ }, z.core.$strip>;
909
+ }, z.core.$strip>;
910
+ Then: z.ZodArray<z.ZodType<TemplChild, unknown, z.core.$ZodTypeInternals<TemplChild, unknown>>>;
911
+ ElseIfs: z.ZodNullable<z.ZodArray<z.ZodObject<{
912
+ Expression: z.ZodObject<{
913
+ Value: z.ZodString;
914
+ Range: z.ZodObject<{
915
+ From: z.ZodObject<{
916
+ Index: z.ZodNumber;
917
+ Line: z.ZodNumber;
918
+ Col: z.ZodNumber;
919
+ }, z.core.$strip>;
920
+ To: z.ZodObject<{
921
+ Index: z.ZodNumber;
922
+ Line: z.ZodNumber;
923
+ Col: z.ZodNumber;
924
+ }, z.core.$strip>;
925
+ }, z.core.$strip>;
926
+ }, z.core.$strip>;
927
+ Then: z.ZodArray<z.ZodType<TemplChild, unknown, z.core.$ZodTypeInternals<TemplChild, unknown>>>;
928
+ Range: z.ZodObject<{
929
+ From: z.ZodObject<{
930
+ Index: z.ZodNumber;
931
+ Line: z.ZodNumber;
932
+ Col: z.ZodNumber;
933
+ }, z.core.$strip>;
934
+ To: z.ZodObject<{
935
+ Index: z.ZodNumber;
936
+ Line: z.ZodNumber;
937
+ Col: z.ZodNumber;
938
+ }, z.core.$strip>;
939
+ }, z.core.$strip>;
940
+ }, z.core.$strip>>>;
941
+ Else: z.ZodNullable<z.ZodArray<z.ZodType<TemplChild, unknown, z.core.$ZodTypeInternals<TemplChild, unknown>>>>;
483
942
  Range: z.ZodObject<{
484
943
  From: z.ZodObject<{
485
944
  Index: z.ZodNumber;
@@ -492,6 +951,8 @@ export declare const TemplHTMLTemplateSchema: z.ZodObject<{
492
951
  Col: z.ZodNumber;
493
952
  }, z.core.$strip>;
494
953
  }, z.core.$strip>;
954
+ }, z.core.$strip>;
955
+ export declare const TemplCaseExpressionSchema: z.ZodObject<{
495
956
  Expression: z.ZodObject<{
496
957
  Value: z.ZodString;
497
958
  Range: z.ZodObject<{
@@ -509,7 +970,41 @@ export declare const TemplHTMLTemplateSchema: z.ZodObject<{
509
970
  }, z.core.$strip>;
510
971
  Children: z.ZodArray<z.ZodType<TemplChild, unknown, z.core.$ZodTypeInternals<TemplChild, unknown>>>;
511
972
  }, z.core.$strip>;
512
- export declare const TemplFileNodeSchema: z.ZodUnion<readonly [z.ZodObject<{
973
+ export declare const TemplSwitchExpressionSchema: z.ZodObject<{
974
+ type: z.ZodLiteral<"SwitchExpression">;
975
+ Expression: z.ZodObject<{
976
+ Value: z.ZodString;
977
+ Range: z.ZodObject<{
978
+ From: z.ZodObject<{
979
+ Index: z.ZodNumber;
980
+ Line: z.ZodNumber;
981
+ Col: z.ZodNumber;
982
+ }, z.core.$strip>;
983
+ To: z.ZodObject<{
984
+ Index: z.ZodNumber;
985
+ Line: z.ZodNumber;
986
+ Col: z.ZodNumber;
987
+ }, z.core.$strip>;
988
+ }, z.core.$strip>;
989
+ }, z.core.$strip>;
990
+ Cases: z.ZodArray<z.ZodObject<{
991
+ Expression: z.ZodObject<{
992
+ Value: z.ZodString;
993
+ Range: z.ZodObject<{
994
+ From: z.ZodObject<{
995
+ Index: z.ZodNumber;
996
+ Line: z.ZodNumber;
997
+ Col: z.ZodNumber;
998
+ }, z.core.$strip>;
999
+ To: z.ZodObject<{
1000
+ Index: z.ZodNumber;
1001
+ Line: z.ZodNumber;
1002
+ Col: z.ZodNumber;
1003
+ }, z.core.$strip>;
1004
+ }, z.core.$strip>;
1005
+ }, z.core.$strip>;
1006
+ Children: z.ZodArray<z.ZodType<TemplChild, unknown, z.core.$ZodTypeInternals<TemplChild, unknown>>>;
1007
+ }, z.core.$strip>>;
513
1008
  Range: z.ZodObject<{
514
1009
  From: z.ZodObject<{
515
1010
  Index: z.ZodNumber;
@@ -522,6 +1017,9 @@ export declare const TemplFileNodeSchema: z.ZodUnion<readonly [z.ZodObject<{
522
1017
  Col: z.ZodNumber;
523
1018
  }, z.core.$strip>;
524
1019
  }, z.core.$strip>;
1020
+ }, z.core.$strip>;
1021
+ export declare const TemplForExpressionSchema: z.ZodObject<{
1022
+ type: z.ZodLiteral<"ForExpression">;
525
1023
  Expression: z.ZodObject<{
526
1024
  Value: z.ZodString;
527
1025
  Range: z.ZodObject<{
@@ -538,7 +1036,6 @@ export declare const TemplFileNodeSchema: z.ZodUnion<readonly [z.ZodObject<{
538
1036
  }, z.core.$strip>;
539
1037
  }, z.core.$strip>;
540
1038
  Children: z.ZodArray<z.ZodType<TemplChild, unknown, z.core.$ZodTypeInternals<TemplChild, unknown>>>;
541
- }, z.core.$strip>, z.ZodObject<{
542
1039
  Range: z.ZodObject<{
543
1040
  From: z.ZodObject<{
544
1041
  Index: z.ZodNumber;
@@ -551,7 +1048,9 @@ export declare const TemplFileNodeSchema: z.ZodUnion<readonly [z.ZodObject<{
551
1048
  Col: z.ZodNumber;
552
1049
  }, z.core.$strip>;
553
1050
  }, z.core.$strip>;
554
- Name: z.ZodString;
1051
+ }, z.core.$strip>;
1052
+ export declare const TemplElementExpressionSchema: z.ZodObject<{
1053
+ type: z.ZodLiteral<"TemplElementExpression">;
555
1054
  Expression: z.ZodObject<{
556
1055
  Value: z.ZodString;
557
1056
  Range: z.ZodObject<{
@@ -567,12 +1066,50 @@ export declare const TemplFileNodeSchema: z.ZodUnion<readonly [z.ZodObject<{
567
1066
  }, z.core.$strip>;
568
1067
  }, z.core.$strip>;
569
1068
  }, z.core.$strip>;
570
- Properties: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
571
- Name: z.ZodString;
572
- Value: z.ZodString;
573
- }, z.core.$strip>, z.ZodObject<{
574
- Name: z.ZodString;
575
- Value: z.ZodObject<{
1069
+ Children: z.ZodNullable<z.ZodArray<z.ZodType<TemplChild, unknown, z.core.$ZodTypeInternals<TemplChild, unknown>>>>;
1070
+ Range: z.ZodObject<{
1071
+ From: z.ZodObject<{
1072
+ Index: z.ZodNumber;
1073
+ Line: z.ZodNumber;
1074
+ Col: z.ZodNumber;
1075
+ }, z.core.$strip>;
1076
+ To: z.ZodObject<{
1077
+ Index: z.ZodNumber;
1078
+ Line: z.ZodNumber;
1079
+ Col: z.ZodNumber;
1080
+ }, z.core.$strip>;
1081
+ }, z.core.$strip>;
1082
+ }, z.core.$strip>;
1083
+ export declare const TemplScriptContentsSchema: z.ZodObject<{
1084
+ Value: z.ZodNullable<z.ZodString>;
1085
+ GoCode: z.ZodNullable<z.ZodObject<{
1086
+ Expression: z.ZodObject<{
1087
+ Value: z.ZodString;
1088
+ Range: z.ZodObject<{
1089
+ From: z.ZodObject<{
1090
+ Index: z.ZodNumber;
1091
+ Line: z.ZodNumber;
1092
+ Col: z.ZodNumber;
1093
+ }, z.core.$strip>;
1094
+ To: z.ZodObject<{
1095
+ Index: z.ZodNumber;
1096
+ Line: z.ZodNumber;
1097
+ Col: z.ZodNumber;
1098
+ }, z.core.$strip>;
1099
+ }, z.core.$strip>;
1100
+ }, z.core.$strip>;
1101
+ TrailingSpace: z.ZodString;
1102
+ Multiline: z.ZodBoolean;
1103
+ }, z.core.$strip>>;
1104
+ InsideStringLiteral: z.ZodBoolean;
1105
+ }, z.core.$strip>;
1106
+ export type TemplScriptContents = z.infer<typeof TemplScriptContentsSchema>;
1107
+ export declare const TemplScriptElementSchema: z.ZodObject<{
1108
+ type: z.ZodLiteral<"ScriptElement">;
1109
+ Attributes: z.ZodNullable<z.ZodArray<z.ZodType<TemplAttribute, unknown, z.core.$ZodTypeInternals<TemplAttribute, unknown>>>>;
1110
+ Contents: z.ZodNullable<z.ZodArray<z.ZodObject<{
1111
+ Value: z.ZodNullable<z.ZodString>;
1112
+ GoCode: z.ZodNullable<z.ZodObject<{
576
1113
  Expression: z.ZodObject<{
577
1114
  Value: z.ZodString;
578
1115
  Range: z.ZodObject<{
@@ -589,10 +1126,23 @@ export declare const TemplFileNodeSchema: z.ZodUnion<readonly [z.ZodObject<{
589
1126
  }, z.core.$strip>;
590
1127
  }, z.core.$strip>;
591
1128
  TrailingSpace: z.ZodString;
1129
+ Multiline: z.ZodBoolean;
1130
+ }, z.core.$strip>>;
1131
+ InsideStringLiteral: z.ZodBoolean;
1132
+ }, z.core.$strip>>>;
1133
+ OpenTagRange: z.ZodObject<{
1134
+ From: z.ZodObject<{
1135
+ Index: z.ZodNumber;
1136
+ Line: z.ZodNumber;
1137
+ Col: z.ZodNumber;
592
1138
  }, z.core.$strip>;
593
- }, z.core.$strip>]>>;
594
- }, z.core.$strip>, z.ZodObject<{
595
- Range: z.ZodObject<{
1139
+ To: z.ZodObject<{
1140
+ Index: z.ZodNumber;
1141
+ Line: z.ZodNumber;
1142
+ Col: z.ZodNumber;
1143
+ }, z.core.$strip>;
1144
+ }, z.core.$strip>;
1145
+ CloseTagRange: z.ZodObject<{
596
1146
  From: z.ZodObject<{
597
1147
  Index: z.ZodNumber;
598
1148
  Line: z.ZodNumber;
@@ -604,57 +1154,49 @@ export declare const TemplFileNodeSchema: z.ZodUnion<readonly [z.ZodObject<{
604
1154
  Col: z.ZodNumber;
605
1155
  }, z.core.$strip>;
606
1156
  }, z.core.$strip>;
607
- Name: z.ZodObject<{
608
- Value: z.ZodString;
609
- Range: z.ZodObject<{
610
- From: z.ZodObject<{
611
- Index: z.ZodNumber;
612
- Line: z.ZodNumber;
613
- Col: z.ZodNumber;
614
- }, z.core.$strip>;
615
- To: z.ZodObject<{
616
- Index: z.ZodNumber;
617
- Line: z.ZodNumber;
618
- Col: z.ZodNumber;
619
- }, z.core.$strip>;
1157
+ Range: z.ZodObject<{
1158
+ From: z.ZodObject<{
1159
+ Index: z.ZodNumber;
1160
+ Line: z.ZodNumber;
1161
+ Col: z.ZodNumber;
1162
+ }, z.core.$strip>;
1163
+ To: z.ZodObject<{
1164
+ Index: z.ZodNumber;
1165
+ Line: z.ZodNumber;
1166
+ Col: z.ZodNumber;
620
1167
  }, z.core.$strip>;
621
1168
  }, z.core.$strip>;
622
- Parameters: z.ZodObject<{
623
- Value: z.ZodString;
624
- Range: z.ZodObject<{
625
- From: z.ZodObject<{
626
- Index: z.ZodNumber;
627
- Line: z.ZodNumber;
628
- Col: z.ZodNumber;
629
- }, z.core.$strip>;
630
- To: z.ZodObject<{
631
- Index: z.ZodNumber;
632
- Line: z.ZodNumber;
633
- Col: z.ZodNumber;
634
- }, z.core.$strip>;
1169
+ }, z.core.$strip>;
1170
+ export declare const TemplRawElementSchema: z.ZodObject<{
1171
+ type: z.ZodLiteral<"RawElement">;
1172
+ Name: z.ZodString;
1173
+ Attributes: z.ZodNullable<z.ZodArray<z.ZodType<TemplAttribute, unknown, z.core.$ZodTypeInternals<TemplAttribute, unknown>>>>;
1174
+ Contents: z.ZodString;
1175
+ NameRange: z.ZodObject<{
1176
+ From: z.ZodObject<{
1177
+ Index: z.ZodNumber;
1178
+ Line: z.ZodNumber;
1179
+ Col: z.ZodNumber;
1180
+ }, z.core.$strip>;
1181
+ To: z.ZodObject<{
1182
+ Index: z.ZodNumber;
1183
+ Line: z.ZodNumber;
1184
+ Col: z.ZodNumber;
635
1185
  }, z.core.$strip>;
636
1186
  }, z.core.$strip>;
637
- Value: z.ZodString;
638
- }, z.core.$strip>, z.ZodObject<{
639
- Expression: z.ZodObject<{
640
- Value: z.ZodString;
641
- Range: z.ZodObject<{
642
- From: z.ZodObject<{
643
- Index: z.ZodNumber;
644
- Line: z.ZodNumber;
645
- Col: z.ZodNumber;
646
- }, z.core.$strip>;
647
- To: z.ZodObject<{
648
- Index: z.ZodNumber;
649
- Line: z.ZodNumber;
650
- Col: z.ZodNumber;
651
- }, z.core.$strip>;
1187
+ OpenTagRange: z.ZodObject<{
1188
+ From: z.ZodObject<{
1189
+ Index: z.ZodNumber;
1190
+ Line: z.ZodNumber;
1191
+ Col: z.ZodNumber;
1192
+ }, z.core.$strip>;
1193
+ To: z.ZodObject<{
1194
+ Index: z.ZodNumber;
1195
+ Line: z.ZodNumber;
1196
+ Col: z.ZodNumber;
652
1197
  }, z.core.$strip>;
653
1198
  }, z.core.$strip>;
654
- BeforePackage: z.ZodBoolean;
655
- }, z.core.$strip>]>;
656
- export declare const TemplASTSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
657
- Range: z.ZodObject<{
1199
+ CloseTagRange: z.ZodObject<{
658
1200
  From: z.ZodObject<{
659
1201
  Index: z.ZodNumber;
660
1202
  Line: z.ZodNumber;
@@ -666,23 +1208,22 @@ export declare const TemplASTSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodObject
666
1208
  Col: z.ZodNumber;
667
1209
  }, z.core.$strip>;
668
1210
  }, z.core.$strip>;
669
- Expression: z.ZodObject<{
670
- Value: z.ZodString;
671
- Range: z.ZodObject<{
672
- From: z.ZodObject<{
673
- Index: z.ZodNumber;
674
- Line: z.ZodNumber;
675
- Col: z.ZodNumber;
676
- }, z.core.$strip>;
677
- To: z.ZodObject<{
678
- Index: z.ZodNumber;
679
- Line: z.ZodNumber;
680
- Col: z.ZodNumber;
681
- }, z.core.$strip>;
1211
+ Range: z.ZodObject<{
1212
+ From: z.ZodObject<{
1213
+ Index: z.ZodNumber;
1214
+ Line: z.ZodNumber;
1215
+ Col: z.ZodNumber;
1216
+ }, z.core.$strip>;
1217
+ To: z.ZodObject<{
1218
+ Index: z.ZodNumber;
1219
+ Line: z.ZodNumber;
1220
+ Col: z.ZodNumber;
682
1221
  }, z.core.$strip>;
683
1222
  }, z.core.$strip>;
684
- Children: z.ZodArray<z.ZodType<TemplChild, unknown, z.core.$ZodTypeInternals<TemplChild, unknown>>>;
685
- }, z.core.$strip>, z.ZodObject<{
1223
+ }, z.core.$strip>;
1224
+ export declare const TemplChildSchema: z.ZodType<TemplChild>;
1225
+ export declare const TemplCSSTemplateSchema: z.ZodObject<{
1226
+ type: z.ZodLiteral<"CSSTemplate">;
686
1227
  Range: z.ZodObject<{
687
1228
  From: z.ZodObject<{
688
1229
  Index: z.ZodNumber;
@@ -711,10 +1252,12 @@ export declare const TemplASTSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodObject
711
1252
  }, z.core.$strip>;
712
1253
  }, z.core.$strip>;
713
1254
  }, z.core.$strip>;
714
- Properties: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1255
+ Properties: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1256
+ type: z.ZodLiteral<"ConstantCSSProperty">;
715
1257
  Name: z.ZodString;
716
1258
  Value: z.ZodString;
717
1259
  }, z.core.$strip>, z.ZodObject<{
1260
+ type: z.ZodLiteral<"ExpressionCSSProperty">;
718
1261
  Name: z.ZodString;
719
1262
  Value: z.ZodObject<{
720
1263
  Expression: z.ZodObject<{
@@ -734,8 +1277,10 @@ export declare const TemplASTSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodObject
734
1277
  }, z.core.$strip>;
735
1278
  TrailingSpace: z.ZodString;
736
1279
  }, z.core.$strip>;
737
- }, z.core.$strip>]>>;
738
- }, z.core.$strip>, z.ZodObject<{
1280
+ }, z.core.$strip>], "type">>;
1281
+ }, z.core.$strip>;
1282
+ export declare const TemplScriptTemplateSchema: z.ZodObject<{
1283
+ type: z.ZodLiteral<"ScriptTemplate">;
739
1284
  Range: z.ZodObject<{
740
1285
  From: z.ZodObject<{
741
1286
  Index: z.ZodNumber;
@@ -779,7 +1324,9 @@ export declare const TemplASTSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodObject
779
1324
  }, z.core.$strip>;
780
1325
  }, z.core.$strip>;
781
1326
  Value: z.ZodString;
782
- }, z.core.$strip>, z.ZodObject<{
1327
+ }, z.core.$strip>;
1328
+ export declare const TemplFileGoExpressionSchema: z.ZodObject<{
1329
+ type: z.ZodLiteral<"TemplateFileGoExpression">;
783
1330
  Expression: z.ZodObject<{
784
1331
  Value: z.ZodString;
785
1332
  Range: z.ZodObject<{
@@ -796,9 +1343,50 @@ export declare const TemplASTSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodObject
796
1343
  }, z.core.$strip>;
797
1344
  }, z.core.$strip>;
798
1345
  BeforePackage: z.ZodBoolean;
799
- }, z.core.$strip>]>>;
800
- export type TemplHTMLTemplate = z.infer<typeof TemplHTMLTemplateSchema>;
801
- export type TemplFileNode = z.infer<typeof TemplFileNodeSchema>;
802
- export type TemplAST = z.infer<typeof TemplASTSchema>;
803
- export type TemplComponentNode = TemplHTMLTemplate;
1346
+ }, z.core.$strip>;
1347
+ export declare const TemplHTMLTemplateSchema: z.ZodObject<{
1348
+ type: z.ZodLiteral<"HTMLTemplate">;
1349
+ Range: z.ZodObject<{
1350
+ From: z.ZodObject<{
1351
+ Index: z.ZodNumber;
1352
+ Line: z.ZodNumber;
1353
+ Col: z.ZodNumber;
1354
+ }, z.core.$strip>;
1355
+ To: z.ZodObject<{
1356
+ Index: z.ZodNumber;
1357
+ Line: z.ZodNumber;
1358
+ Col: z.ZodNumber;
1359
+ }, z.core.$strip>;
1360
+ }, z.core.$strip>;
1361
+ Expression: z.ZodObject<{
1362
+ Value: z.ZodString;
1363
+ Range: z.ZodObject<{
1364
+ From: z.ZodObject<{
1365
+ Index: z.ZodNumber;
1366
+ Line: z.ZodNumber;
1367
+ Col: z.ZodNumber;
1368
+ }, z.core.$strip>;
1369
+ To: z.ZodObject<{
1370
+ Index: z.ZodNumber;
1371
+ Line: z.ZodNumber;
1372
+ Col: z.ZodNumber;
1373
+ }, z.core.$strip>;
1374
+ }, z.core.$strip>;
1375
+ }, z.core.$strip>;
1376
+ Children: z.ZodArray<z.ZodType<TemplChild, unknown, z.core.$ZodTypeInternals<TemplChild, unknown>>>;
1377
+ }, z.core.$strip>;
1378
+ export interface TemplHTMLTemplate {
1379
+ type: "HTMLTemplate";
1380
+ Range: TemplRange;
1381
+ Expression: TemplExpression;
1382
+ Children: TemplChild[];
1383
+ }
1384
+ export type TemplCSSTemplate = z.infer<typeof TemplCSSTemplateSchema>;
1385
+ export type TemplScriptTemplate = z.infer<typeof TemplScriptTemplateSchema>;
1386
+ export type TemplFileGoExpression = z.infer<typeof TemplFileGoExpressionSchema>;
1387
+ export type TemplFileNode = TemplHTMLTemplate | TemplCSSTemplate | TemplScriptTemplate | TemplFileGoExpression;
1388
+ export declare const TemplFileNodeSchema: z.ZodType<TemplFileNode>;
1389
+ export declare const TemplASTSchema: z.ZodArray<z.ZodType<TemplFileNode, unknown, z.core.$ZodTypeInternals<TemplFileNode, unknown>>>;
1390
+ export type TemplAST = TemplFileNode[];
1391
+ export {};
804
1392
  //# sourceMappingURL=templ-ast.d.ts.map