@samva/markup 0.7.0 → 0.9.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 (176) hide show
  1. package/AGENTS.md +104 -37
  2. package/README.md +188 -52
  3. package/dist/assets-C5duwTya.d.ts +40 -0
  4. package/dist/brand-B-0bN_Ir.d.ts +88 -0
  5. package/dist/{render-aaJBnsXK.js → cascade-t6kxlgEI.js} +130 -160
  6. package/dist/channel-edit.d.ts +121 -0
  7. package/dist/channel-edit.js +609 -0
  8. package/dist/channel-specs-B6M_HlaV.js +29 -0
  9. package/dist/channel-specs-C2feJwuP.d.ts +13 -0
  10. package/dist/compatibility-DbISoFIq.js +589 -0
  11. package/dist/compiler.d.ts +19 -249
  12. package/dist/compiler.js +10 -1408
  13. package/dist/{css-COcFOT1y.d.ts → css-BVQKICKC.d.ts} +30 -4
  14. package/dist/diagnostic-codes.d.ts +403 -0
  15. package/dist/diagnostic-codes.js +399 -0
  16. package/dist/{diagnostics-BMYtBCQk.d.ts → diagnostics-B-Gym34R.d.ts} +8 -4
  17. package/dist/diagnostics.d.ts +31 -2
  18. package/dist/diagnostics.js +1 -19
  19. package/dist/{elements-BzjjnoCS.d.ts → elements-cqldpaJt.d.ts} +3 -3
  20. package/dist/email/assets.d.ts +2 -0
  21. package/dist/email/assets.js +63 -0
  22. package/dist/email/brand-footer.d.ts +34 -0
  23. package/dist/email/brand-footer.js +63 -0
  24. package/dist/email/brand.d.ts +2 -0
  25. package/dist/email/brand.js +148 -0
  26. package/dist/email/components.d.ts +21 -10
  27. package/dist/email/components.js +46 -11
  28. package/dist/email/diagnostics.d.ts +2 -2
  29. package/dist/email/diagnostics.js +2 -1
  30. package/dist/email/elements.d.ts +1 -1
  31. package/dist/email/html.d.ts +2 -42
  32. package/dist/email/html.js +56 -2
  33. package/dist/email/jsx-dev-runtime.d.ts +2 -2
  34. package/dist/email/jsx-runtime.d.ts +1 -1
  35. package/dist/email/render.d.ts +10 -13
  36. package/dist/email/render.js +163 -6
  37. package/dist/email/text.d.ts +1 -1
  38. package/dist/fmt.d.ts +32 -0
  39. package/dist/fmt.js +174 -0
  40. package/dist/html-BJepOwZ4.d.ts +56 -0
  41. package/dist/index.d.ts +2 -0
  42. package/dist/index.js +2 -0
  43. package/dist/ir-aaqNE987.d.ts +252 -0
  44. package/dist/ir.d.ts +2 -0
  45. package/dist/ir.js +7 -0
  46. package/dist/preview-Ekdg1dXG.d.ts +100 -0
  47. package/dist/preview.d.ts +2 -0
  48. package/dist/preview.js +160 -0
  49. package/dist/profile-BH-OtdDA.js +3670 -0
  50. package/dist/render-ir.d.ts +19 -0
  51. package/dist/render-ir.js +826 -0
  52. package/dist/sms-segments.d.ts +13 -2
  53. package/dist/sms.d.ts +16 -0
  54. package/dist/sms.js +12 -0
  55. package/dist/{email/source-edit.d.ts → source-edit.d.ts} +55 -6
  56. package/dist/source-edit.js +343 -0
  57. package/dist/source-locations-C8wCsiAy.d.ts +23 -0
  58. package/dist/source-locations.d.ts +2 -2
  59. package/dist/source-locations.js +3 -89
  60. package/dist/static.d.ts +57 -0
  61. package/dist/static.js +69 -0
  62. package/dist/tailwind-CMYpZf1v.js +614 -0
  63. package/dist/template-_QE_rQND.d.ts +65 -0
  64. package/dist/template.d.ts +2 -2
  65. package/dist/template.js +15 -10
  66. package/dist/theme-css-hFqcPSar.js +587 -0
  67. package/dist/theme-css.d.ts +57 -16
  68. package/dist/theme-css.js +2 -509
  69. package/dist/theme-imports-lvBw3AD1.js +109 -0
  70. package/dist/transform-Ct2OMkFN.d.ts +153 -0
  71. package/dist/unsubscribe-link-CoesnQDU.js +26 -0
  72. package/dist/whatsapp.d.ts +57 -0
  73. package/dist/whatsapp.js +22 -0
  74. package/generated/contract.json +1782 -0
  75. package/generated/reference.md +353 -0
  76. package/package.json +56 -154
  77. package/samva-brand.d.ts +14 -0
  78. package/skills/sml/SKILL.md +123 -0
  79. package/dist/ast-BrDtApwS.d.ts +0 -107
  80. package/dist/ast.d.ts +0 -2
  81. package/dist/ast.js +0 -124
  82. package/dist/candidate.d.ts +0 -29
  83. package/dist/candidate.js +0 -88
  84. package/dist/catalog-60eaYC7b.d.ts +0 -356
  85. package/dist/checks-DBweSIPN.js +0 -58954
  86. package/dist/checks.d.ts +0 -33
  87. package/dist/checks.js +0 -2
  88. package/dist/classes.d.ts +0 -27
  89. package/dist/classes.js +0 -184
  90. package/dist/compile-sms.d.ts +0 -28
  91. package/dist/compile-sms.js +0 -44
  92. package/dist/compile-whatsapp.d.ts +0 -56
  93. package/dist/compile-whatsapp.js +0 -186
  94. package/dist/compile.d.ts +0 -18
  95. package/dist/compile.js +0 -29
  96. package/dist/components.d.ts +0 -289
  97. package/dist/components.js +0 -106
  98. package/dist/conditionals.d.ts +0 -10
  99. package/dist/conditionals.js +0 -74
  100. package/dist/corpus-BjYMqOoY.d.ts +0 -106
  101. package/dist/diagnostics-OcQKQYSY.d.ts +0 -49
  102. package/dist/email/selection.d.ts +0 -91
  103. package/dist/email/selection.js +0 -91
  104. package/dist/email/source-edit.js +0 -185
  105. package/dist/email/stylesheets.d.ts +0 -15
  106. package/dist/email/stylesheets.js +0 -45
  107. package/dist/emit.d.ts +0 -51
  108. package/dist/emit.js +0 -151
  109. package/dist/footer.d.ts +0 -66
  110. package/dist/footer.js +0 -93
  111. package/dist/interpolate.d.ts +0 -24
  112. package/dist/interpolate.js +0 -43
  113. package/dist/jsx-dev-runtime.d.ts +0 -11
  114. package/dist/jsx-dev-runtime.js +0 -15
  115. package/dist/jsx-runtime-I-1nCtl2.d.ts +0 -57
  116. package/dist/jsx-runtime.d.ts +0 -2
  117. package/dist/jsx-runtime.js +0 -121
  118. package/dist/lexer.d.ts +0 -60
  119. package/dist/lexer.js +0 -281
  120. package/dist/model.d.ts +0 -24
  121. package/dist/model.js +0 -77
  122. package/dist/ops-2aiiYO7m.js +0 -630
  123. package/dist/ops.d.ts +0 -114
  124. package/dist/ops.js +0 -2
  125. package/dist/parser-t29cHLVL.d.ts +0 -396
  126. package/dist/parser.d.ts +0 -2
  127. package/dist/parser.js +0 -859
  128. package/dist/predicate-BI6uRRM-.js +0 -549
  129. package/dist/predicate-M-05Nd7R.d.ts +0 -56
  130. package/dist/predicate.d.ts +0 -2
  131. package/dist/predicate.js +0 -2
  132. package/dist/presets/category-mapping.d.ts +0 -13
  133. package/dist/presets/category-mapping.js +0 -49
  134. package/dist/presets/corpus.d.ts +0 -2
  135. package/dist/presets/corpus.js +0 -194
  136. package/dist/presets/public-gallery.d.ts +0 -266
  137. package/dist/presets/public-gallery.js +0 -916
  138. package/dist/presets/public-handoff.d.ts +0 -164
  139. package/dist/presets/public-handoff.js +0 -361
  140. package/dist/presets/public-preview-artifacts.d.ts +0 -43
  141. package/dist/presets/public-preview-artifacts.js +0 -104
  142. package/dist/presets/public-preview.d.ts +0 -61
  143. package/dist/presets/public-preview.js +0 -83
  144. package/dist/presets/showcase.d.ts +0 -2
  145. package/dist/presets/showcase.js +0 -627
  146. package/dist/presets/sources.d.ts +0 -38
  147. package/dist/presets/sources.js +0 -6083
  148. package/dist/presets.d.ts +0 -2
  149. package/dist/presets.js +0 -881
  150. package/dist/printer.d.ts +0 -6
  151. package/dist/printer.js +0 -122
  152. package/dist/registry.d.ts +0 -42
  153. package/dist/registry.js +0 -646
  154. package/dist/render-template.d.ts +0 -45
  155. package/dist/render-template.js +0 -76
  156. package/dist/showcase-DGZAWn4Z.d.ts +0 -456
  157. package/dist/sms-segments-y4FpPilJ.d.ts +0 -13
  158. package/dist/source-locations-DrCM82Ym.d.ts +0 -67
  159. package/dist/template-DWftqh4x.d.ts +0 -60
  160. package/dist/theme-6ApjjiBo.d.ts +0 -116
  161. package/dist/theme.d.ts +0 -2
  162. package/dist/theme.js +0 -118
  163. package/dist/tokens.d.ts +0 -6
  164. package/dist/tokens.js +0 -417
  165. package/dist/tsx-source-instrumentation.d.ts +0 -30
  166. package/dist/tsx-source-instrumentation.js +0 -115
  167. package/dist/tsx-tracer.d.ts +0 -112
  168. package/dist/tsx-tracer.js +0 -985
  169. package/dist/variables-J_L3qxRa.d.ts +0 -77
  170. package/dist/variables.d.ts +0 -2
  171. package/dist/variables.js +0 -141
  172. package/dist/version-BITr58kk.js +0 -96
  173. package/generated/sml-agent-contract.json +0 -709
  174. package/generated/sml-email-agent-contract.json +0 -615
  175. package/generated/sml-email-language-reference.md +0 -94
  176. package/generated/sml-language-reference.md +0 -195
@@ -1,615 +0,0 @@
1
- {
2
- "version": 2,
3
- "channel": "email",
4
- "authoring": {
5
- "extension": ".tsx",
6
- "jsxImportSource": "@samva/markup/email",
7
- "definition": "defineEmail",
8
- "definitionImport": "@samva/markup/template",
9
- "fields": ["id", "schema", "fixtures", "render", "runtime?"],
10
- "identity": "Stable project-unique id; helper modules are excluded from the catalog.",
11
- "namePattern": "^[A-Za-z0-9_][A-Za-z0-9._-]*$",
12
- "schema": "Standard JSON Schema v1 converter; portable JSON Schema 2020-12 input, without coercion or inserted defaults.",
13
- "render": "Synchronous TypeScript over actual validated JSON; returns subject, optional preheader, body and optional text.",
14
- "controlFlow": "Ordinary functions, imports, conditions and array mapping."
15
- },
16
- "components": {
17
- "import": "@samva/markup/email/components",
18
- "names": [
19
- "Button",
20
- "Column",
21
- "Columns",
22
- "Divider",
23
- "Email",
24
- "Image",
25
- "Link",
26
- "Section",
27
- "Spacer"
28
- ]
29
- },
30
- "elements": {
31
- "html": {
32
- "content": "flow",
33
- "layout": "document",
34
- "attributes": {
35
- "xmlns": {
36
- "type": "string"
37
- },
38
- "xmlns:o": {
39
- "type": "string"
40
- },
41
- "xmlns:v": {
42
- "type": "string"
43
- },
44
- "xmlns:w": {
45
- "type": "string"
46
- }
47
- },
48
- "childElements": ["head", "body"]
49
- },
50
- "head": {
51
- "content": "flow",
52
- "layout": "metadata",
53
- "attributes": {},
54
- "childElements": ["title", "meta", "style"]
55
- },
56
- "title": {
57
- "content": "text",
58
- "layout": "metadata",
59
- "attributes": {}
60
- },
61
- "style": {
62
- "content": "raw",
63
- "layout": "metadata",
64
- "attributes": {
65
- "type": {
66
- "type": "string"
67
- }
68
- }
69
- },
70
- "meta": {
71
- "content": "void",
72
- "layout": "metadata",
73
- "attributes": {
74
- "name": {
75
- "type": "string"
76
- },
77
- "content": {
78
- "type": "string"
79
- },
80
- "charset": {
81
- "type": "string"
82
- },
83
- "http-equiv": {
84
- "type": "string"
85
- }
86
- }
87
- },
88
- "body": {
89
- "content": "flow",
90
- "layout": "block",
91
- "attributes": {
92
- "bgcolor": {
93
- "type": "string"
94
- }
95
- }
96
- },
97
- "div": {
98
- "content": "flow",
99
- "layout": "block",
100
- "attributes": {
101
- "align": {
102
- "type": "string",
103
- "values": ["left", "center", "right"]
104
- }
105
- }
106
- },
107
- "section": {
108
- "content": "flow",
109
- "layout": "block",
110
- "attributes": {
111
- "align": {
112
- "type": "string",
113
- "values": ["left", "center", "right"]
114
- }
115
- }
116
- },
117
- "article": {
118
- "content": "flow",
119
- "layout": "block",
120
- "attributes": {
121
- "align": {
122
- "type": "string",
123
- "values": ["left", "center", "right"]
124
- }
125
- }
126
- },
127
- "header": {
128
- "content": "flow",
129
- "layout": "block",
130
- "attributes": {
131
- "align": {
132
- "type": "string",
133
- "values": ["left", "center", "right"]
134
- }
135
- }
136
- },
137
- "footer": {
138
- "content": "flow",
139
- "layout": "block",
140
- "attributes": {
141
- "align": {
142
- "type": "string",
143
- "values": ["left", "center", "right"]
144
- }
145
- }
146
- },
147
- "main": {
148
- "content": "flow",
149
- "layout": "block",
150
- "attributes": {
151
- "align": {
152
- "type": "string",
153
- "values": ["left", "center", "right"]
154
- }
155
- }
156
- },
157
- "center": {
158
- "content": "flow",
159
- "layout": "block",
160
- "attributes": {}
161
- },
162
- "p": {
163
- "content": "flow",
164
- "layout": "block",
165
- "attributes": {
166
- "align": {
167
- "type": "string",
168
- "values": ["left", "center", "right"]
169
- }
170
- }
171
- },
172
- "blockquote": {
173
- "content": "flow",
174
- "layout": "block",
175
- "attributes": {
176
- "align": {
177
- "type": "string",
178
- "values": ["left", "center", "right"]
179
- }
180
- }
181
- },
182
- "pre": {
183
- "content": "flow",
184
- "layout": "preformatted",
185
- "attributes": {}
186
- },
187
- "h1": {
188
- "content": "flow",
189
- "layout": "block",
190
- "attributes": {
191
- "align": {
192
- "type": "string",
193
- "values": ["left", "center", "right"]
194
- }
195
- }
196
- },
197
- "h2": {
198
- "content": "flow",
199
- "layout": "block",
200
- "attributes": {
201
- "align": {
202
- "type": "string",
203
- "values": ["left", "center", "right"]
204
- }
205
- }
206
- },
207
- "h3": {
208
- "content": "flow",
209
- "layout": "block",
210
- "attributes": {
211
- "align": {
212
- "type": "string",
213
- "values": ["left", "center", "right"]
214
- }
215
- }
216
- },
217
- "h4": {
218
- "content": "flow",
219
- "layout": "block",
220
- "attributes": {
221
- "align": {
222
- "type": "string",
223
- "values": ["left", "center", "right"]
224
- }
225
- }
226
- },
227
- "h5": {
228
- "content": "flow",
229
- "layout": "block",
230
- "attributes": {
231
- "align": {
232
- "type": "string",
233
- "values": ["left", "center", "right"]
234
- }
235
- }
236
- },
237
- "h6": {
238
- "content": "flow",
239
- "layout": "block",
240
- "attributes": {
241
- "align": {
242
- "type": "string",
243
- "values": ["left", "center", "right"]
244
- }
245
- }
246
- },
247
- "span": {
248
- "content": "flow",
249
- "layout": "inline",
250
- "attributes": {}
251
- },
252
- "strong": {
253
- "content": "flow",
254
- "layout": "inline",
255
- "attributes": {}
256
- },
257
- "b": {
258
- "content": "flow",
259
- "layout": "inline",
260
- "attributes": {}
261
- },
262
- "em": {
263
- "content": "flow",
264
- "layout": "inline",
265
- "attributes": {}
266
- },
267
- "i": {
268
- "content": "flow",
269
- "layout": "inline",
270
- "attributes": {}
271
- },
272
- "u": {
273
- "content": "flow",
274
- "layout": "inline",
275
- "attributes": {}
276
- },
277
- "s": {
278
- "content": "flow",
279
- "layout": "inline",
280
- "attributes": {}
281
- },
282
- "small": {
283
- "content": "flow",
284
- "layout": "inline",
285
- "attributes": {}
286
- },
287
- "code": {
288
- "content": "flow",
289
- "layout": "inline",
290
- "attributes": {}
291
- },
292
- "a": {
293
- "content": "flow",
294
- "layout": "link",
295
- "attributes": {
296
- "href": {
297
- "type": "url",
298
- "required": true
299
- },
300
- "target": {
301
- "type": "string"
302
- },
303
- "rel": {
304
- "type": "string"
305
- },
306
- "name": {
307
- "type": "string"
308
- }
309
- }
310
- },
311
- "img": {
312
- "content": "void",
313
- "layout": "image",
314
- "attributes": {
315
- "src": {
316
- "type": "url",
317
- "required": true
318
- },
319
- "alt": {
320
- "type": "string",
321
- "required": true
322
- },
323
- "width": {
324
- "type": "measure"
325
- },
326
- "height": {
327
- "type": "measure"
328
- },
329
- "border": {
330
- "type": "measure"
331
- },
332
- "align": {
333
- "type": "string",
334
- "values": ["left", "center", "right"]
335
- }
336
- }
337
- },
338
- "table": {
339
- "content": "flow",
340
- "layout": "table",
341
- "attributes": {
342
- "width": {
343
- "type": "measure"
344
- },
345
- "height": {
346
- "type": "measure"
347
- },
348
- "border": {
349
- "type": "measure"
350
- },
351
- "cellpadding": {
352
- "type": "measure"
353
- },
354
- "cellspacing": {
355
- "type": "measure"
356
- },
357
- "align": {
358
- "type": "string",
359
- "values": ["left", "center", "right"]
360
- },
361
- "bgcolor": {
362
- "type": "string"
363
- }
364
- },
365
- "childElements": ["caption", "colgroup", "thead", "tbody", "tfoot", "tr"]
366
- },
367
- "caption": {
368
- "content": "flow",
369
- "layout": "block",
370
- "attributes": {
371
- "align": {
372
- "type": "string",
373
- "values": ["left", "center", "right"]
374
- }
375
- }
376
- },
377
- "colgroup": {
378
- "content": "flow",
379
- "layout": "table-section",
380
- "attributes": {
381
- "span": {
382
- "type": "number"
383
- },
384
- "width": {
385
- "type": "measure"
386
- }
387
- },
388
- "childElements": ["col"]
389
- },
390
- "col": {
391
- "content": "void",
392
- "layout": "table-section",
393
- "attributes": {
394
- "span": {
395
- "type": "number"
396
- },
397
- "width": {
398
- "type": "measure"
399
- }
400
- }
401
- },
402
- "thead": {
403
- "content": "flow",
404
- "layout": "table-section",
405
- "attributes": {
406
- "align": {
407
- "type": "string",
408
- "values": ["left", "center", "right"]
409
- },
410
- "valign": {
411
- "type": "string",
412
- "values": ["top", "middle", "bottom"]
413
- },
414
- "bgcolor": {
415
- "type": "string"
416
- }
417
- },
418
- "childElements": ["tr"]
419
- },
420
- "tbody": {
421
- "content": "flow",
422
- "layout": "table-section",
423
- "attributes": {
424
- "align": {
425
- "type": "string",
426
- "values": ["left", "center", "right"]
427
- },
428
- "valign": {
429
- "type": "string",
430
- "values": ["top", "middle", "bottom"]
431
- },
432
- "bgcolor": {
433
- "type": "string"
434
- }
435
- },
436
- "childElements": ["tr"]
437
- },
438
- "tfoot": {
439
- "content": "flow",
440
- "layout": "table-section",
441
- "attributes": {
442
- "align": {
443
- "type": "string",
444
- "values": ["left", "center", "right"]
445
- },
446
- "valign": {
447
- "type": "string",
448
- "values": ["top", "middle", "bottom"]
449
- },
450
- "bgcolor": {
451
- "type": "string"
452
- }
453
- },
454
- "childElements": ["tr"]
455
- },
456
- "tr": {
457
- "content": "flow",
458
- "layout": "row",
459
- "attributes": {
460
- "align": {
461
- "type": "string",
462
- "values": ["left", "center", "right"]
463
- },
464
- "valign": {
465
- "type": "string",
466
- "values": ["top", "middle", "bottom"]
467
- },
468
- "bgcolor": {
469
- "type": "string"
470
- },
471
- "height": {
472
- "type": "measure"
473
- }
474
- },
475
- "childElements": ["td", "th"]
476
- },
477
- "td": {
478
- "content": "flow",
479
- "layout": "cell",
480
- "attributes": {
481
- "align": {
482
- "type": "string",
483
- "values": ["left", "center", "right"]
484
- },
485
- "valign": {
486
- "type": "string",
487
- "values": ["top", "middle", "bottom"]
488
- },
489
- "width": {
490
- "type": "measure"
491
- },
492
- "height": {
493
- "type": "measure"
494
- },
495
- "bgcolor": {
496
- "type": "string"
497
- },
498
- "colspan": {
499
- "type": "number"
500
- },
501
- "rowspan": {
502
- "type": "number"
503
- }
504
- }
505
- },
506
- "th": {
507
- "content": "flow",
508
- "layout": "cell",
509
- "attributes": {
510
- "align": {
511
- "type": "string",
512
- "values": ["left", "center", "right"]
513
- },
514
- "valign": {
515
- "type": "string",
516
- "values": ["top", "middle", "bottom"]
517
- },
518
- "width": {
519
- "type": "measure"
520
- },
521
- "height": {
522
- "type": "measure"
523
- },
524
- "bgcolor": {
525
- "type": "string"
526
- },
527
- "colspan": {
528
- "type": "number"
529
- },
530
- "rowspan": {
531
- "type": "number"
532
- }
533
- }
534
- },
535
- "ul": {
536
- "content": "flow",
537
- "layout": "list",
538
- "attributes": {},
539
- "childElements": ["li"]
540
- },
541
- "ol": {
542
- "content": "flow",
543
- "layout": "list",
544
- "attributes": {
545
- "start": {
546
- "type": "number"
547
- },
548
- "type": {
549
- "type": "string"
550
- }
551
- },
552
- "childElements": ["li"]
553
- },
554
- "li": {
555
- "content": "flow",
556
- "layout": "list-item",
557
- "attributes": {}
558
- },
559
- "br": {
560
- "content": "void",
561
- "layout": "break",
562
- "attributes": {}
563
- },
564
- "hr": {
565
- "content": "void",
566
- "layout": "rule",
567
- "attributes": {
568
- "width": {
569
- "type": "measure"
570
- },
571
- "size": {
572
- "type": "number"
573
- },
574
- "align": {
575
- "type": "string",
576
- "values": ["left", "center", "right"]
577
- }
578
- }
579
- }
580
- },
581
- "globalAttributes": {
582
- "id": {
583
- "type": "string"
584
- },
585
- "title": {
586
- "type": "string"
587
- },
588
- "lang": {
589
- "type": "string"
590
- },
591
- "dir": {
592
- "type": "string",
593
- "values": ["ltr", "rtl", "auto"]
594
- },
595
- "role": {
596
- "type": "string"
597
- }
598
- },
599
- "styles": {
600
- "css": "Imported CSS follows cascade and specificity; applicable declarations inline and supported media/head rules remain.",
601
- "tailwind": "Uses the Tailwind compiler and discoverable source classes; dynamic classes may produce diagnostics.",
602
- "layout": "Use email layout primitives for table and Outlook fallbacks; no general flex/grid conversion."
603
- },
604
- "assets": "Imported assets are content-addressed. Delivery needs their actual HTTPS serving base; local export may use relative URLs. External HTTPS references are not fetched.",
605
- "execution": "Isolated hosted rendering has no I/O. Clock and entropy require declared fixed runtime values; locale is en-US and timezone UTC.",
606
- "publication": "Hosted builds consume Bun text lockfile v2 or npm lockfile v3. Exact immutable publication is the default send pin; contract-latest is explicit and resolves at acceptance.",
607
- "qualityBar": [
608
- "Validate all declared fixtures and inspect structured diagnostics and source origins.",
609
- "Repair fatal compile/render failures before delivery.",
610
- "Check representative empty, nested, repeated and conditional inputs.",
611
- "Inspect HTML and text, light/dark styling and responsive layouts.",
612
- "Distinguish static compatibility findings and browser previews from actual inbox evidence.",
613
- "Keep source canonical; source edits and fixture data edits are separate operations."
614
- ]
615
- }
@@ -1,94 +0,0 @@
1
- # Executable email authoring reference
2
-
3
- Email entries default-export `defineEmail({ id, schema, fixtures, render })` from
4
- `@samva/markup/template`. Set `jsxImportSource: "@samva/markup/email"`.
5
- The schema accepts a Standard JSON Schema v1 converter, such as Effect's
6
- `Schema.toStandardJSONSchemaV1` or Zod 4. Render receives actual validated JSON.
7
- Return subject, optional preheader, body and optional text; omitted text is derived.
8
-
9
- Use ordinary synchronous TypeScript helpers, conditions and mapped arrays. Template identity is
10
- stable and unique within the project. Helper modules are excluded from the template catalog.
11
- Declare fixtures for each meaningful input shape; fixtures do not prove every possible branch.
12
-
13
- ## Email components
14
-
15
- Import from `@samva/markup/email/components`: `Button`, `Column`, `Columns`, `Divider`, `Email`, `Image`, `Link`, `Section`, `Spacer`.
16
- Use supported ordinary HTML for content. Email primitives generate layout tables and Outlook
17
- fallbacks while preserving authoring origins. Scripts, event handlers and unsafe URLs fail.
18
- Strings are escaped content, never interpreted as markup.
19
-
20
- ## HTML elements
21
-
22
- - `html`: flow content; attributes: `xmlns`, `xmlns:o`, `xmlns:v`, `xmlns:w`.
23
- - `head`: flow content; attributes: global attributes only.
24
- - `title`: text content; attributes: global attributes only.
25
- - `style`: raw content; attributes: `type`.
26
- - `meta`: void content; attributes: `name`, `content`, `charset`, `http-equiv`.
27
- - `body`: flow content; attributes: `bgcolor`.
28
- - `div`: flow content; attributes: `align`.
29
- - `section`: flow content; attributes: `align`.
30
- - `article`: flow content; attributes: `align`.
31
- - `header`: flow content; attributes: `align`.
32
- - `footer`: flow content; attributes: `align`.
33
- - `main`: flow content; attributes: `align`.
34
- - `center`: flow content; attributes: global attributes only.
35
- - `p`: flow content; attributes: `align`.
36
- - `blockquote`: flow content; attributes: `align`.
37
- - `pre`: flow content; attributes: global attributes only.
38
- - `h1`: flow content; attributes: `align`.
39
- - `h2`: flow content; attributes: `align`.
40
- - `h3`: flow content; attributes: `align`.
41
- - `h4`: flow content; attributes: `align`.
42
- - `h5`: flow content; attributes: `align`.
43
- - `h6`: flow content; attributes: `align`.
44
- - `span`: flow content; attributes: global attributes only.
45
- - `strong`: flow content; attributes: global attributes only.
46
- - `b`: flow content; attributes: global attributes only.
47
- - `em`: flow content; attributes: global attributes only.
48
- - `i`: flow content; attributes: global attributes only.
49
- - `u`: flow content; attributes: global attributes only.
50
- - `s`: flow content; attributes: global attributes only.
51
- - `small`: flow content; attributes: global attributes only.
52
- - `code`: flow content; attributes: global attributes only.
53
- - `a`: flow content; attributes: `href`, `target`, `rel`, `name`.
54
- - `img`: void content; attributes: `src`, `alt`, `width`, `height`, `border`, `align`.
55
- - `table`: flow content; attributes: `width`, `height`, `border`, `cellpadding`, `cellspacing`, `align`, `bgcolor`.
56
- - `caption`: flow content; attributes: `align`.
57
- - `colgroup`: flow content; attributes: `span`, `width`.
58
- - `col`: void content; attributes: `span`, `width`.
59
- - `thead`: flow content; attributes: `align`, `valign`, `bgcolor`.
60
- - `tbody`: flow content; attributes: `align`, `valign`, `bgcolor`.
61
- - `tfoot`: flow content; attributes: `align`, `valign`, `bgcolor`.
62
- - `tr`: flow content; attributes: `align`, `valign`, `bgcolor`, `height`.
63
- - `td`: flow content; attributes: `align`, `valign`, `width`, `height`, `bgcolor`, `colspan`, `rowspan`.
64
- - `th`: flow content; attributes: `align`, `valign`, `width`, `height`, `bgcolor`, `colspan`, `rowspan`.
65
- - `ul`: flow content; attributes: global attributes only.
66
- - `ol`: flow content; attributes: `start`, `type`.
67
- - `li`: flow content; attributes: global attributes only.
68
- - `br`: void content; attributes: global attributes only.
69
- - `hr`: void content; attributes: `width`, `size`, `align`.
70
-
71
- Global attributes: `id`, `title`, `lang`, `dir`, `role`.
72
-
73
- ## CSS and assets
74
-
75
- Imported CSS follows cascade and specificity; applicable declarations inline and supported media/head rules remain.
76
- Uses the Tailwind compiler and discoverable source classes; dynamic classes may produce diagnostics.
77
- Use email layout primitives for table and Outlook fallbacks; no general flex/grid conversion.
78
- Imported assets are content-addressed. Delivery needs their actual HTTPS serving base; local export may use relative URLs. External HTTPS references are not fetched.
79
-
80
- ## Execution and publication
81
-
82
- Isolated hosted rendering has no I/O. Clock and entropy require declared fixed runtime values; locale is en-US and timezone UTC.
83
- Hosted builds consume Bun text lockfile v2 or npm lockfile v3. Exact immutable publication is the default send pin; contract-latest is explicit and resolves at acceptance.
84
- Local preview, build and export do not require Samva credentials. Build executes named fixtures;
85
- export writes template/fixture HTML and text plus assets and a catalog manifest.
86
-
87
- ## Quality bar
88
-
89
- - Validate all declared fixtures and inspect structured diagnostics and source origins.
90
- - Repair fatal compile/render failures before delivery.
91
- - Check representative empty, nested, repeated and conditional inputs.
92
- - Inspect HTML and text, light/dark styling and responsive layouts.
93
- - Distinguish static compatibility findings and browser previews from actual inbox evidence.
94
- - Keep source canonical; source edits and fixture data edits are separate operations.