@samva/markup 0.1.2 → 0.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 (93) hide show
  1. package/AGENTS.md +25 -5
  2. package/README.md +92 -26
  3. package/dist/{ast-DAhnAvQN.d.ts → ast-63I-VLQx.d.ts} +15 -2
  4. package/dist/ast.d.ts +2 -2
  5. package/dist/ast.js +14 -1
  6. package/dist/{checks-D-zFQt5R.js → checks-DXuERO4B.js} +36 -2
  7. package/dist/checks.d.ts +8 -1
  8. package/dist/checks.js +2 -2
  9. package/dist/compile-sms.d.ts +2 -2
  10. package/dist/compile-whatsapp.d.ts +2 -2
  11. package/dist/compile.d.ts +9 -84
  12. package/dist/compile.js +11 -920
  13. package/dist/compiler.d.ts +303 -0
  14. package/dist/compiler.js +1390 -0
  15. package/dist/components.d.ts +3 -3
  16. package/dist/corpus-qrUD5O6r.d.ts +254 -0
  17. package/dist/css-ar2lU3NC.d.ts +84 -0
  18. package/dist/diagnostics-Djd9ckLg.d.ts +90 -0
  19. package/dist/diagnostics.js +4 -1
  20. package/dist/elements-DtwKlFVH.d.ts +820 -0
  21. package/dist/email/components.d.ts +125 -0
  22. package/dist/email/components.js +210 -0
  23. package/dist/email/diagnostics.d.ts +2 -0
  24. package/dist/email/diagnostics.js +56 -0
  25. package/dist/email/elements.d.ts +2 -0
  26. package/dist/email/elements.js +299 -0
  27. package/dist/email/html.d.ts +42 -0
  28. package/dist/email/html.js +266 -0
  29. package/dist/email/jsx-dev-runtime.d.ts +26 -0
  30. package/dist/email/jsx-dev-runtime.js +12 -0
  31. package/dist/email/jsx-runtime.d.ts +2 -0
  32. package/dist/email/jsx-runtime.js +60 -0
  33. package/dist/email/render.d.ts +43 -0
  34. package/dist/email/render.js +6 -0
  35. package/dist/email/selection.d.ts +102 -0
  36. package/dist/email/selection.js +143 -0
  37. package/dist/email/source-edit.d.ts +67 -0
  38. package/dist/email/source-edit.js +185 -0
  39. package/dist/email/stylesheets.d.ts +15 -0
  40. package/dist/email/stylesheets.js +45 -0
  41. package/dist/email/text.d.ts +7 -0
  42. package/dist/email/text.js +100 -0
  43. package/dist/emit.d.ts +13 -12
  44. package/dist/emit.js +63 -63
  45. package/dist/input-schema-BIfzI63B.d.ts +23 -0
  46. package/dist/input-schema.d.ts +2 -0
  47. package/dist/input-schema.js +170 -0
  48. package/dist/jsx-dev-runtime.d.ts +4 -3
  49. package/dist/jsx-dev-runtime.js +9 -1
  50. package/dist/{jsx-runtime-eNIMY87F.d.ts → jsx-runtime-C5k_Zq0A.d.ts} +3 -3
  51. package/dist/jsx-runtime.d.ts +1 -1
  52. package/dist/jsx-runtime.js +20 -1
  53. package/dist/model.d.ts +1 -1
  54. package/dist/ops.d.ts +1 -1
  55. package/dist/ops.js +1 -1
  56. package/dist/{parser-DkQKIjDa.d.ts → parser-CGBS73Gz.d.ts} +2 -2
  57. package/dist/parser.d.ts +1 -1
  58. package/dist/presets/category-mapping.d.ts +1 -1
  59. package/dist/presets/corpus.d.ts +2 -0
  60. package/dist/presets/corpus.js +247 -0
  61. package/dist/presets/public-gallery.d.ts +290 -2
  62. package/dist/presets/public-gallery.js +428 -6
  63. package/dist/presets/public-handoff.d.ts +164 -2
  64. package/dist/presets/public-handoff.js +229 -61
  65. package/dist/presets/public-preview-artifacts.d.ts +2 -2
  66. package/dist/presets/public-preview-artifacts.js +25 -31
  67. package/dist/presets/public-preview.d.ts +65 -2
  68. package/dist/presets/public-preview.js +402 -1152
  69. package/dist/presets/sources.d.ts +35 -4
  70. package/dist/presets/sources.js +2328 -43
  71. package/dist/presets.d.ts +39 -5
  72. package/dist/presets.js +96 -0
  73. package/dist/printer.d.ts +1 -1
  74. package/dist/render-template.d.ts +5 -2
  75. package/dist/render-template.js +3 -1
  76. package/dist/render-ykQhtMs_.js +592 -0
  77. package/dist/source-locations-BCJQnIfU.d.ts +89 -0
  78. package/dist/source-locations.d.ts +2 -0
  79. package/dist/source-locations.js +125 -0
  80. package/dist/template-Dy5yOPyp.d.ts +60 -0
  81. package/dist/template.d.ts +2 -0
  82. package/dist/template.js +37 -0
  83. package/dist/tsx-source-instrumentation.d.ts +23 -0
  84. package/dist/tsx-source-instrumentation.js +97 -0
  85. package/dist/tsx-tracer.d.ts +116 -0
  86. package/dist/tsx-tracer.js +985 -0
  87. package/generated/sml-agent-contract.json +574 -782
  88. package/generated/sml-email-agent-contract.json +502 -677
  89. package/generated/sml-email-language-reference.md +94 -160
  90. package/generated/sml-language-reference.md +195 -220
  91. package/package.json +111 -9
  92. package/dist/public-gallery-D0Zv0pZE.d.ts +0 -611
  93. package/dist/public-preview-u1Z9aaGq.d.ts +0 -1168
@@ -0,0 +1,820 @@
1
+ import { i as JsxSourceLocation } from "./source-locations-BCJQnIfU.js";
2
+ import { r as EmailDiagnostic } from "./diagnostics-Djd9ckLg.js";
3
+ import { Data } from "effect";
4
+ //#region src/email/jsx-runtime.d.ts
5
+ /** Derived authoring tree; source stays canonical. Origins run from inner element to component call sites. */
6
+ type EmailNode = Data.TaggedEnum<{
7
+ Text: {
8
+ readonly value: string;
9
+ };
10
+ Element: {
11
+ readonly tag: string;
12
+ readonly props: Readonly<Record<string, unknown>>;
13
+ readonly children: readonly EmailNode[];
14
+ readonly origins: readonly JsxSourceLocation[];
15
+ /**
16
+ * True when this element is written at `origins[0]`; false when a compiler
17
+ * primitive generated it and `origins[0]` is the call site that asked for
18
+ * it. Both point at the same authoring target, but only an authored element
19
+ * can have its own props edited there.
20
+ */
21
+ readonly authored: boolean;
22
+ };
23
+ Fragment: {
24
+ readonly children: readonly EmailNode[];
25
+ };
26
+ /**
27
+ * Compatibility markup a compiler primitive emits verbatim — conditional
28
+ * comments and VML. Only the primitives in `./components` construct it;
29
+ * nothing an author passes as a string reaches this node.
30
+ */
31
+ Raw: {
32
+ readonly html: string;
33
+ readonly text: string;
34
+ readonly origins: readonly JsxSourceLocation[];
35
+ };
36
+ }>;
37
+ declare const EmailNode: {
38
+ readonly $is: <Tag extends "Element" | "Fragment" | "Raw" | "Text">(tag: Tag) => (u: unknown) => u is Extract<{
39
+ readonly _tag: "Element";
40
+ readonly tag: string;
41
+ readonly props: Readonly<Record<string, unknown>>;
42
+ readonly children: readonly EmailNode[];
43
+ readonly origins: readonly JsxSourceLocation[];
44
+ readonly authored: boolean;
45
+ }, {
46
+ readonly _tag: Tag;
47
+ }> | Extract<{
48
+ readonly _tag: "Fragment";
49
+ readonly children: readonly EmailNode[];
50
+ }, {
51
+ readonly _tag: Tag;
52
+ }> | Extract<{
53
+ readonly _tag: "Raw";
54
+ readonly html: string;
55
+ readonly text: string;
56
+ readonly origins: readonly JsxSourceLocation[];
57
+ }, {
58
+ readonly _tag: Tag;
59
+ }> | Extract<{
60
+ readonly _tag: "Text";
61
+ readonly value: string;
62
+ }, {
63
+ readonly _tag: Tag;
64
+ }>;
65
+ readonly $match: {
66
+ <Cases extends { readonly [Tag in "Element" | "Fragment" | "Raw" | "Text"]: (args: Extract<{
67
+ readonly _tag: "Element";
68
+ readonly tag: string;
69
+ readonly props: Readonly<Record<string, unknown>>;
70
+ readonly children: readonly EmailNode[];
71
+ readonly origins: readonly JsxSourceLocation[];
72
+ readonly authored: boolean;
73
+ } | {
74
+ readonly _tag: "Fragment";
75
+ readonly children: readonly EmailNode[];
76
+ } | {
77
+ readonly _tag: "Raw";
78
+ readonly html: string;
79
+ readonly text: string;
80
+ readonly origins: readonly JsxSourceLocation[];
81
+ } | {
82
+ readonly _tag: "Text";
83
+ readonly value: string;
84
+ }, {
85
+ readonly _tag: Tag;
86
+ }>) => any; }>(cases: Cases): (value: {
87
+ readonly _tag: "Element";
88
+ readonly tag: string;
89
+ readonly props: Readonly<Record<string, unknown>>;
90
+ readonly children: readonly EmailNode[];
91
+ readonly origins: readonly JsxSourceLocation[];
92
+ readonly authored: boolean;
93
+ } | {
94
+ readonly _tag: "Fragment";
95
+ readonly children: readonly EmailNode[];
96
+ } | {
97
+ readonly _tag: "Raw";
98
+ readonly html: string;
99
+ readonly text: string;
100
+ readonly origins: readonly JsxSourceLocation[];
101
+ } | {
102
+ readonly _tag: "Text";
103
+ readonly value: string;
104
+ }) => import("effect/Unify").Unify<ReturnType<Cases["Element" | "Fragment" | "Raw" | "Text"]>>;
105
+ <Cases extends { readonly [Tag in "Element" | "Fragment" | "Raw" | "Text"]: (args: Extract<{
106
+ readonly _tag: "Element";
107
+ readonly tag: string;
108
+ readonly props: Readonly<Record<string, unknown>>;
109
+ readonly children: readonly EmailNode[];
110
+ readonly origins: readonly JsxSourceLocation[];
111
+ readonly authored: boolean;
112
+ } | {
113
+ readonly _tag: "Fragment";
114
+ readonly children: readonly EmailNode[];
115
+ } | {
116
+ readonly _tag: "Raw";
117
+ readonly html: string;
118
+ readonly text: string;
119
+ readonly origins: readonly JsxSourceLocation[];
120
+ } | {
121
+ readonly _tag: "Text";
122
+ readonly value: string;
123
+ }, {
124
+ readonly _tag: Tag;
125
+ }>) => any; }>(value: {
126
+ readonly _tag: "Element";
127
+ readonly tag: string;
128
+ readonly props: Readonly<Record<string, unknown>>;
129
+ readonly children: readonly EmailNode[];
130
+ readonly origins: readonly JsxSourceLocation[];
131
+ readonly authored: boolean;
132
+ } | {
133
+ readonly _tag: "Fragment";
134
+ readonly children: readonly EmailNode[];
135
+ } | {
136
+ readonly _tag: "Raw";
137
+ readonly html: string;
138
+ readonly text: string;
139
+ readonly origins: readonly JsxSourceLocation[];
140
+ } | {
141
+ readonly _tag: "Text";
142
+ readonly value: string;
143
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Element" | "Fragment" | "Raw" | "Text"]>>;
144
+ };
145
+ readonly Element: Data.TaggedEnum.ConstructorFrom<{
146
+ readonly _tag: "Element";
147
+ readonly tag: string;
148
+ readonly props: Readonly<Record<string, unknown>>;
149
+ readonly children: readonly EmailNode[];
150
+ readonly origins: readonly JsxSourceLocation[];
151
+ readonly authored: boolean;
152
+ }, "_tag">;
153
+ readonly Fragment: Data.TaggedEnum.ConstructorFrom<{
154
+ readonly _tag: "Fragment";
155
+ readonly children: readonly EmailNode[];
156
+ }, "_tag">;
157
+ readonly Raw: Data.TaggedEnum.ConstructorFrom<{
158
+ readonly _tag: "Raw";
159
+ readonly html: string;
160
+ readonly text: string;
161
+ readonly origins: readonly JsxSourceLocation[];
162
+ }, "_tag">;
163
+ readonly Text: Data.TaggedEnum.ConstructorFrom<{
164
+ readonly _tag: "Text";
165
+ readonly value: string;
166
+ }, "_tag">;
167
+ };
168
+ type EmailChild = EmailNode | string | number | boolean | null | undefined | readonly EmailChild[];
169
+ type EmailComponent<P = never> = (props: P) => EmailChild;
170
+ declare const Fragment: unique symbol;
171
+ /** Call sites enclosing the element being built, innermost first. */
172
+ declare const currentEmailOrigins: () => readonly JsxSourceLocation[];
173
+ /** Record a finding from inside a compiler primitive, located at the authoring call site. */
174
+ declare const reportEmailDiagnostic: (diagnostic: Omit<EmailDiagnostic, "origins">) => void;
175
+ /** Take and clear the findings primitives reported during a render. */
176
+ declare const drainEmailDiagnostics: () => readonly EmailDiagnostic[];
177
+ /** Normalize actual values without interpolation or recording proxies. */
178
+ declare const normalizeChildren: (input: unknown) => EmailNode[];
179
+ /** Compatibility markup emitted by a compiler primitive, with the text it stands for. */
180
+ declare const rawMarkup: (html: string, text?: string) => EmailNode;
181
+ /** Automatic JSX factory for ordinary HTML and synchronous imported components. */
182
+ declare const jsx: (type: string | EmailComponent<Record<string, unknown>> | typeof Fragment, props: Record<string, unknown> | null) => EmailNode;
183
+ declare const jsxs: typeof jsx;
184
+ declare namespace JSX {
185
+ type Element = EmailNode;
186
+ type ElementType = string | EmailComponent | typeof Fragment;
187
+ interface ElementChildrenAttribute {
188
+ readonly children: object;
189
+ }
190
+ interface IntrinsicAttributes {
191
+ readonly key?: string | number | undefined;
192
+ }
193
+ interface IntrinsicElements extends EmailIntrinsicElements {}
194
+ }
195
+ //#endregion
196
+ //#region src/email/elements.d.ts
197
+ /** How one attribute is spelled and what values it accepts. */
198
+ interface EmailAttributeSpec {
199
+ /** `measure` accepts the pixel/percentage pair email HTML actually uses. */
200
+ readonly type: "string" | "number" | "measure" | "url";
201
+ readonly values?: readonly string[];
202
+ readonly required?: true;
203
+ }
204
+ /** What an element is for. The serializer and the plain-text derivation both read this. */
205
+ type EmailLayout = "document" | "metadata" | "block" | "inline" | "preformatted" | "table" | "table-section" | "row" | "cell" | "list" | "list-item" | "break" | "rule" | "image" | "link";
206
+ interface EmailElementSpec {
207
+ /** `raw` is CSS text emitted verbatim; only the compiler produces it. */
208
+ readonly content: "void" | "flow" | "text" | "raw";
209
+ readonly layout: EmailLayout;
210
+ readonly attributes: Readonly<Record<string, EmailAttributeSpec>>;
211
+ /** When present, only these element tags may appear as children. */
212
+ readonly childElements?: readonly string[];
213
+ }
214
+ /** Attributes every supported element accepts. `class`/`className`/`style` are handled separately. */
215
+ declare const EMAIL_GLOBAL_ATTRIBUTES: {
216
+ readonly id: {
217
+ readonly type: "string";
218
+ };
219
+ readonly title: {
220
+ readonly type: "string";
221
+ };
222
+ readonly lang: {
223
+ readonly type: "string";
224
+ };
225
+ readonly dir: {
226
+ readonly type: "string";
227
+ readonly values: readonly ["ltr", "rtl", "auto"];
228
+ };
229
+ readonly role: {
230
+ readonly type: "string";
231
+ };
232
+ };
233
+ /** The complete supported vocabulary. Anything outside it is a compile error with a source location. */
234
+ declare const EMAIL_ELEMENTS: {
235
+ readonly html: {
236
+ readonly content: "flow";
237
+ readonly layout: "document";
238
+ readonly attributes: {
239
+ readonly xmlns: {
240
+ readonly type: "string";
241
+ };
242
+ readonly "xmlns:o": {
243
+ readonly type: "string";
244
+ };
245
+ readonly "xmlns:v": {
246
+ readonly type: "string";
247
+ };
248
+ readonly "xmlns:w": {
249
+ readonly type: "string";
250
+ };
251
+ };
252
+ readonly childElements: readonly ["head", "body"];
253
+ };
254
+ readonly head: {
255
+ readonly content: "flow";
256
+ readonly layout: "metadata";
257
+ readonly attributes: {};
258
+ readonly childElements: readonly ["title", "meta", "style"];
259
+ };
260
+ readonly title: {
261
+ readonly content: "text";
262
+ readonly layout: "metadata";
263
+ readonly attributes: {};
264
+ };
265
+ readonly style: {
266
+ readonly content: "raw";
267
+ readonly layout: "metadata";
268
+ readonly attributes: {
269
+ readonly type: {
270
+ readonly type: "string";
271
+ };
272
+ };
273
+ };
274
+ readonly meta: {
275
+ readonly content: "void";
276
+ readonly layout: "metadata";
277
+ readonly attributes: {
278
+ readonly name: {
279
+ readonly type: "string";
280
+ };
281
+ readonly content: {
282
+ readonly type: "string";
283
+ };
284
+ readonly charset: {
285
+ readonly type: "string";
286
+ };
287
+ readonly "http-equiv": {
288
+ readonly type: "string";
289
+ };
290
+ };
291
+ };
292
+ readonly body: {
293
+ readonly content: "flow";
294
+ readonly layout: "block";
295
+ readonly attributes: {
296
+ readonly bgcolor: {
297
+ readonly type: "string";
298
+ };
299
+ };
300
+ };
301
+ readonly div: {
302
+ readonly content: "flow";
303
+ readonly layout: "block";
304
+ readonly attributes: {
305
+ readonly align: {
306
+ readonly type: "string";
307
+ readonly values: readonly ["left", "center", "right"];
308
+ };
309
+ };
310
+ };
311
+ readonly section: {
312
+ readonly content: "flow";
313
+ readonly layout: "block";
314
+ readonly attributes: {
315
+ readonly align: {
316
+ readonly type: "string";
317
+ readonly values: readonly ["left", "center", "right"];
318
+ };
319
+ };
320
+ };
321
+ readonly article: {
322
+ readonly content: "flow";
323
+ readonly layout: "block";
324
+ readonly attributes: {
325
+ readonly align: {
326
+ readonly type: "string";
327
+ readonly values: readonly ["left", "center", "right"];
328
+ };
329
+ };
330
+ };
331
+ readonly header: {
332
+ readonly content: "flow";
333
+ readonly layout: "block";
334
+ readonly attributes: {
335
+ readonly align: {
336
+ readonly type: "string";
337
+ readonly values: readonly ["left", "center", "right"];
338
+ };
339
+ };
340
+ };
341
+ readonly footer: {
342
+ readonly content: "flow";
343
+ readonly layout: "block";
344
+ readonly attributes: {
345
+ readonly align: {
346
+ readonly type: "string";
347
+ readonly values: readonly ["left", "center", "right"];
348
+ };
349
+ };
350
+ };
351
+ readonly main: {
352
+ readonly content: "flow";
353
+ readonly layout: "block";
354
+ readonly attributes: {
355
+ readonly align: {
356
+ readonly type: "string";
357
+ readonly values: readonly ["left", "center", "right"];
358
+ };
359
+ };
360
+ };
361
+ readonly center: {
362
+ readonly content: "flow";
363
+ readonly layout: "block";
364
+ readonly attributes: {};
365
+ };
366
+ readonly p: {
367
+ readonly content: "flow";
368
+ readonly layout: "block";
369
+ readonly attributes: {
370
+ readonly align: {
371
+ readonly type: "string";
372
+ readonly values: readonly ["left", "center", "right"];
373
+ };
374
+ };
375
+ };
376
+ readonly blockquote: {
377
+ readonly content: "flow";
378
+ readonly layout: "block";
379
+ readonly attributes: {
380
+ readonly align: {
381
+ readonly type: "string";
382
+ readonly values: readonly ["left", "center", "right"];
383
+ };
384
+ };
385
+ };
386
+ readonly pre: {
387
+ readonly content: "flow";
388
+ readonly layout: "preformatted";
389
+ readonly attributes: {};
390
+ };
391
+ readonly h1: {
392
+ readonly content: "flow";
393
+ readonly layout: "block";
394
+ readonly attributes: {
395
+ readonly align: {
396
+ readonly type: "string";
397
+ readonly values: readonly ["left", "center", "right"];
398
+ };
399
+ };
400
+ };
401
+ readonly h2: {
402
+ readonly content: "flow";
403
+ readonly layout: "block";
404
+ readonly attributes: {
405
+ readonly align: {
406
+ readonly type: "string";
407
+ readonly values: readonly ["left", "center", "right"];
408
+ };
409
+ };
410
+ };
411
+ readonly h3: {
412
+ readonly content: "flow";
413
+ readonly layout: "block";
414
+ readonly attributes: {
415
+ readonly align: {
416
+ readonly type: "string";
417
+ readonly values: readonly ["left", "center", "right"];
418
+ };
419
+ };
420
+ };
421
+ readonly h4: {
422
+ readonly content: "flow";
423
+ readonly layout: "block";
424
+ readonly attributes: {
425
+ readonly align: {
426
+ readonly type: "string";
427
+ readonly values: readonly ["left", "center", "right"];
428
+ };
429
+ };
430
+ };
431
+ readonly h5: {
432
+ readonly content: "flow";
433
+ readonly layout: "block";
434
+ readonly attributes: {
435
+ readonly align: {
436
+ readonly type: "string";
437
+ readonly values: readonly ["left", "center", "right"];
438
+ };
439
+ };
440
+ };
441
+ readonly h6: {
442
+ readonly content: "flow";
443
+ readonly layout: "block";
444
+ readonly attributes: {
445
+ readonly align: {
446
+ readonly type: "string";
447
+ readonly values: readonly ["left", "center", "right"];
448
+ };
449
+ };
450
+ };
451
+ readonly span: {
452
+ readonly content: "flow";
453
+ readonly layout: "inline";
454
+ readonly attributes: {};
455
+ };
456
+ readonly strong: {
457
+ readonly content: "flow";
458
+ readonly layout: "inline";
459
+ readonly attributes: {};
460
+ };
461
+ readonly b: {
462
+ readonly content: "flow";
463
+ readonly layout: "inline";
464
+ readonly attributes: {};
465
+ };
466
+ readonly em: {
467
+ readonly content: "flow";
468
+ readonly layout: "inline";
469
+ readonly attributes: {};
470
+ };
471
+ readonly i: {
472
+ readonly content: "flow";
473
+ readonly layout: "inline";
474
+ readonly attributes: {};
475
+ };
476
+ readonly u: {
477
+ readonly content: "flow";
478
+ readonly layout: "inline";
479
+ readonly attributes: {};
480
+ };
481
+ readonly s: {
482
+ readonly content: "flow";
483
+ readonly layout: "inline";
484
+ readonly attributes: {};
485
+ };
486
+ readonly small: {
487
+ readonly content: "flow";
488
+ readonly layout: "inline";
489
+ readonly attributes: {};
490
+ };
491
+ readonly code: {
492
+ readonly content: "flow";
493
+ readonly layout: "inline";
494
+ readonly attributes: {};
495
+ };
496
+ readonly a: {
497
+ readonly content: "flow";
498
+ readonly layout: "link";
499
+ readonly attributes: {
500
+ readonly href: {
501
+ readonly type: "url";
502
+ readonly required: true;
503
+ };
504
+ readonly target: {
505
+ readonly type: "string";
506
+ };
507
+ readonly rel: {
508
+ readonly type: "string";
509
+ };
510
+ readonly name: {
511
+ readonly type: "string";
512
+ };
513
+ };
514
+ };
515
+ readonly img: {
516
+ readonly content: "void";
517
+ readonly layout: "image";
518
+ readonly attributes: {
519
+ readonly src: {
520
+ readonly type: "url";
521
+ readonly required: true;
522
+ };
523
+ readonly alt: {
524
+ readonly type: "string";
525
+ readonly required: true;
526
+ };
527
+ readonly width: {
528
+ readonly type: "measure";
529
+ };
530
+ readonly height: {
531
+ readonly type: "measure";
532
+ };
533
+ readonly border: {
534
+ readonly type: "measure";
535
+ };
536
+ readonly align: {
537
+ readonly type: "string";
538
+ readonly values: readonly ["left", "center", "right"];
539
+ };
540
+ };
541
+ };
542
+ readonly table: {
543
+ readonly content: "flow";
544
+ readonly layout: "table";
545
+ readonly attributes: {
546
+ readonly width: {
547
+ readonly type: "measure";
548
+ };
549
+ readonly height: {
550
+ readonly type: "measure";
551
+ };
552
+ readonly border: {
553
+ readonly type: "measure";
554
+ };
555
+ readonly cellpadding: {
556
+ readonly type: "measure";
557
+ };
558
+ readonly cellspacing: {
559
+ readonly type: "measure";
560
+ };
561
+ readonly align: {
562
+ readonly type: "string";
563
+ readonly values: readonly ["left", "center", "right"];
564
+ };
565
+ readonly bgcolor: {
566
+ readonly type: "string";
567
+ };
568
+ };
569
+ readonly childElements: readonly ["caption", "colgroup", "thead", "tbody", "tfoot", "tr"];
570
+ };
571
+ readonly caption: {
572
+ readonly content: "flow";
573
+ readonly layout: "block";
574
+ readonly attributes: {
575
+ readonly align: {
576
+ readonly type: "string";
577
+ readonly values: readonly ["left", "center", "right"];
578
+ };
579
+ };
580
+ };
581
+ readonly colgroup: {
582
+ readonly content: "flow";
583
+ readonly layout: "table-section";
584
+ readonly attributes: {
585
+ readonly span: {
586
+ readonly type: "number";
587
+ };
588
+ readonly width: {
589
+ readonly type: "measure";
590
+ };
591
+ };
592
+ readonly childElements: readonly ["col"];
593
+ };
594
+ readonly col: {
595
+ readonly content: "void";
596
+ readonly layout: "table-section";
597
+ readonly attributes: {
598
+ readonly span: {
599
+ readonly type: "number";
600
+ };
601
+ readonly width: {
602
+ readonly type: "measure";
603
+ };
604
+ };
605
+ };
606
+ readonly thead: {
607
+ readonly content: "flow";
608
+ readonly layout: "table-section";
609
+ readonly attributes: {
610
+ readonly align: {
611
+ readonly type: "string";
612
+ readonly values: readonly ["left", "center", "right"];
613
+ };
614
+ readonly valign: {
615
+ readonly type: "string";
616
+ readonly values: readonly ["top", "middle", "bottom"];
617
+ };
618
+ readonly bgcolor: {
619
+ readonly type: "string";
620
+ };
621
+ };
622
+ readonly childElements: readonly ["tr"];
623
+ };
624
+ readonly tbody: {
625
+ readonly content: "flow";
626
+ readonly layout: "table-section";
627
+ readonly attributes: {
628
+ readonly align: {
629
+ readonly type: "string";
630
+ readonly values: readonly ["left", "center", "right"];
631
+ };
632
+ readonly valign: {
633
+ readonly type: "string";
634
+ readonly values: readonly ["top", "middle", "bottom"];
635
+ };
636
+ readonly bgcolor: {
637
+ readonly type: "string";
638
+ };
639
+ };
640
+ readonly childElements: readonly ["tr"];
641
+ };
642
+ readonly tfoot: {
643
+ readonly content: "flow";
644
+ readonly layout: "table-section";
645
+ readonly attributes: {
646
+ readonly align: {
647
+ readonly type: "string";
648
+ readonly values: readonly ["left", "center", "right"];
649
+ };
650
+ readonly valign: {
651
+ readonly type: "string";
652
+ readonly values: readonly ["top", "middle", "bottom"];
653
+ };
654
+ readonly bgcolor: {
655
+ readonly type: "string";
656
+ };
657
+ };
658
+ readonly childElements: readonly ["tr"];
659
+ };
660
+ readonly tr: {
661
+ readonly content: "flow";
662
+ readonly layout: "row";
663
+ readonly attributes: {
664
+ readonly align: {
665
+ readonly type: "string";
666
+ readonly values: readonly ["left", "center", "right"];
667
+ };
668
+ readonly valign: {
669
+ readonly type: "string";
670
+ readonly values: readonly ["top", "middle", "bottom"];
671
+ };
672
+ readonly bgcolor: {
673
+ readonly type: "string";
674
+ };
675
+ readonly height: {
676
+ readonly type: "measure";
677
+ };
678
+ };
679
+ readonly childElements: readonly ["td", "th"];
680
+ };
681
+ readonly td: {
682
+ readonly content: "flow";
683
+ readonly layout: "cell";
684
+ readonly attributes: {
685
+ readonly align: {
686
+ readonly type: "string";
687
+ readonly values: readonly ["left", "center", "right"];
688
+ };
689
+ readonly valign: {
690
+ readonly type: "string";
691
+ readonly values: readonly ["top", "middle", "bottom"];
692
+ };
693
+ readonly width: {
694
+ readonly type: "measure";
695
+ };
696
+ readonly height: {
697
+ readonly type: "measure";
698
+ };
699
+ readonly bgcolor: {
700
+ readonly type: "string";
701
+ };
702
+ readonly colspan: {
703
+ readonly type: "number";
704
+ };
705
+ readonly rowspan: {
706
+ readonly type: "number";
707
+ };
708
+ };
709
+ };
710
+ readonly th: {
711
+ readonly content: "flow";
712
+ readonly layout: "cell";
713
+ readonly attributes: {
714
+ readonly align: {
715
+ readonly type: "string";
716
+ readonly values: readonly ["left", "center", "right"];
717
+ };
718
+ readonly valign: {
719
+ readonly type: "string";
720
+ readonly values: readonly ["top", "middle", "bottom"];
721
+ };
722
+ readonly width: {
723
+ readonly type: "measure";
724
+ };
725
+ readonly height: {
726
+ readonly type: "measure";
727
+ };
728
+ readonly bgcolor: {
729
+ readonly type: "string";
730
+ };
731
+ readonly colspan: {
732
+ readonly type: "number";
733
+ };
734
+ readonly rowspan: {
735
+ readonly type: "number";
736
+ };
737
+ };
738
+ };
739
+ readonly ul: {
740
+ readonly content: "flow";
741
+ readonly layout: "list";
742
+ readonly attributes: {};
743
+ readonly childElements: readonly ["li"];
744
+ };
745
+ readonly ol: {
746
+ readonly content: "flow";
747
+ readonly layout: "list";
748
+ readonly attributes: {
749
+ readonly start: {
750
+ readonly type: "number";
751
+ };
752
+ readonly type: {
753
+ readonly type: "string";
754
+ };
755
+ };
756
+ readonly childElements: readonly ["li"];
757
+ };
758
+ readonly li: {
759
+ readonly content: "flow";
760
+ readonly layout: "list-item";
761
+ readonly attributes: {};
762
+ };
763
+ readonly br: {
764
+ readonly content: "void";
765
+ readonly layout: "break";
766
+ readonly attributes: {};
767
+ };
768
+ readonly hr: {
769
+ readonly content: "void";
770
+ readonly layout: "rule";
771
+ readonly attributes: {
772
+ readonly width: {
773
+ readonly type: "measure";
774
+ };
775
+ readonly size: {
776
+ readonly type: "number";
777
+ };
778
+ readonly align: {
779
+ readonly type: "string";
780
+ readonly values: readonly ["left", "center", "right"];
781
+ };
782
+ };
783
+ };
784
+ };
785
+ type EmailTag = keyof typeof EMAIL_ELEMENTS;
786
+ /** Attributes that must carry a URL; these are checked against the safe-scheme rule. */
787
+ declare const isUrlAttribute: (tag: string, attribute: string) => boolean;
788
+ /** Look up one supported element, or `undefined` when the tag is outside the vocabulary. */
789
+ declare const emailElement: (tag: string) => EmailElementSpec | undefined;
790
+ /** A declaration block. Values are CSS text; numbers are emitted verbatim. */
791
+ interface EmailStyle {
792
+ readonly [property: string]: string | number | undefined;
793
+ }
794
+ type AttributeType<Spec extends EmailAttributeSpec> = Spec extends {
795
+ readonly values: readonly string[];
796
+ } ? Spec["values"][number] : Spec["type"] extends "number" ? number : Spec["type"] extends "measure" ? number | string : string;
797
+ type AttributeProps<Attributes extends Readonly<Record<string, EmailAttributeSpec>>> = { readonly [K in keyof Attributes as Attributes[K] extends {
798
+ readonly required: true;
799
+ } ? K : never]: AttributeType<Attributes[K]>; } & { readonly [K in keyof Attributes as Attributes[K] extends {
800
+ readonly required: true;
801
+ } ? never : K]?: AttributeType<Attributes[K]> | undefined; };
802
+ /** Attributes accepted on every element, including the open `data-`/`aria-` families. */
803
+ interface EmailGlobalProps {
804
+ readonly key?: string | number | undefined;
805
+ readonly class?: string | undefined;
806
+ readonly className?: string | undefined;
807
+ readonly style?: EmailStyle | undefined;
808
+ readonly [attribute: `data-${string}`]: string | number | boolean | undefined;
809
+ readonly [attribute: `aria-${string}`]: string | number | boolean | undefined;
810
+ }
811
+ type ChildrenProp<Content extends EmailElementSpec["content"]> = Content extends "void" ? Record<never, never> : Content extends "text" | "raw" ? {
812
+ readonly children?: string | number | undefined;
813
+ } : {
814
+ readonly children?: EmailChild;
815
+ };
816
+ /** Props each supported tag accepts, derived from `EMAIL_ELEMENTS`. */
817
+ type EmailIntrinsicElements = { readonly [Tag in EmailTag]: EmailGlobalProps & AttributeProps<typeof EMAIL_GLOBAL_ATTRIBUTES> & AttributeProps<(typeof EMAIL_ELEMENTS)[Tag]["attributes"]> & ChildrenProp<(typeof EMAIL_ELEMENTS)[Tag]["content"]>; };
818
+ //#endregion
819
+ export { reportEmailDiagnostic as C, rawMarkup as S, currentEmailOrigins as _, EmailGlobalProps as a, jsxs as b, EmailStyle as c, isUrlAttribute as d, EmailChild as f, JSX as g, Fragment as h, EmailElementSpec as i, EmailTag as l, EmailNode as m, EMAIL_GLOBAL_ATTRIBUTES as n, EmailIntrinsicElements as o, EmailComponent as p, EmailAttributeSpec as r, EmailLayout as s, EMAIL_ELEMENTS as t, emailElement as u, drainEmailDiagnostics as v, normalizeChildren as x, jsx as y };
820
+ //# sourceMappingURL=elements-DtwKlFVH.d.ts.map