@samva/markup 0.8.0 → 0.10.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.
- package/AGENTS.md +107 -46
- package/CHANGELOG.md +345 -0
- package/README.md +188 -52
- package/dist/{brand-DcoVkh_S.d.ts → assets-BIsyMQ92.d.ts} +41 -11
- package/dist/{email/brand.js → brand-C0MKTwmX.js} +64 -4
- package/dist/{theme-css.d.ts → brand.d.ts} +12 -3
- package/dist/brand.js +4 -0
- package/dist/channel-specs-C2feJwuP.d.ts +13 -0
- package/dist/compiler.d.ts +88 -115
- package/dist/compiler.js +750 -171
- package/dist/components-BZCqegS8.js +1864 -0
- package/dist/diagnostic-model-DJtqbETd.js +38 -0
- package/dist/{diagnostics-OcQKQYSY.d.ts → diagnostic-model-DxthUZBT.d.ts} +3 -21
- package/dist/{diagnostics-BMYtBCQk.d.ts → diagnostics-B-Gym34R.d.ts} +8 -4
- package/dist/{email/diagnostics.js → diagnostics-CnKFefKz.js} +4 -3
- package/dist/diagnostics.d.ts +410 -2
- package/dist/diagnostics.js +402 -52
- package/dist/edit.d.ts +234 -0
- package/dist/edit.js +947 -0
- package/dist/email/jsx-dev-runtime.d.ts +2 -2
- package/dist/email/jsx-dev-runtime.js +1 -2
- package/dist/email/jsx-runtime.d.ts +1 -1
- package/dist/email/jsx-runtime.js +1 -85
- package/dist/{email/components.d.ts → email.d.ts} +22 -11
- package/dist/email.js +2 -0
- package/dist/fmt.d.ts +32 -0
- package/dist/fmt.js +174 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/{render-vAv_4r9v.js → ir-CLhlklKV.js} +96 -279
- package/dist/jsx-runtime-CBlexoeR.js +98 -0
- package/dist/{elements-BzjjnoCS.d.ts → jsx-runtime-ylIOnaSf.d.ts} +76 -76
- package/dist/profile-pWGtWZXF.js +3803 -0
- package/dist/render-BPonDpCl.d.ts +539 -0
- package/dist/render-BQmfh94k.js +257 -0
- package/dist/render.d.ts +35 -0
- package/dist/render.js +49 -0
- package/dist/sms.d.ts +16 -0
- package/dist/sms.js +12 -0
- package/dist/source-locations-C8wCsiAy.d.ts +23 -0
- package/dist/template-DMPwxMSq.d.ts +65 -0
- package/dist/template-zLUjcwfF.js +42 -0
- package/dist/{theme-css-hFqcPSar.js → theme-css-JtRCm1fb.js} +2 -2
- package/dist/whatsapp.d.ts +57 -0
- package/dist/whatsapp.js +22 -0
- package/generated/contract.json +1788 -0
- package/generated/reference.md +360 -0
- package/package.json +46 -239
- package/samva-brand.d.ts +4 -4
- package/skills/sml/SKILL.md +123 -0
- package/dist/ast-BrDtApwS.d.ts +0 -107
- package/dist/ast.d.ts +0 -2
- package/dist/ast.js +0 -124
- package/dist/candidate.d.ts +0 -29
- package/dist/candidate.js +0 -88
- package/dist/catalog-CKuOooB8.d.ts +0 -354
- package/dist/checks-D73Xizbw.js +0 -59366
- package/dist/checks.d.ts +0 -33
- package/dist/checks.js +0 -2
- package/dist/classes.d.ts +0 -26
- package/dist/classes.js +0 -184
- package/dist/compile-sms.d.ts +0 -28
- package/dist/compile-sms.js +0 -44
- package/dist/compile-whatsapp.d.ts +0 -56
- package/dist/compile-whatsapp.js +0 -186
- package/dist/compile.d.ts +0 -18
- package/dist/compile.js +0 -29
- package/dist/components.d.ts +0 -289
- package/dist/components.js +0 -106
- package/dist/conditionals.d.ts +0 -10
- package/dist/conditionals.js +0 -74
- package/dist/corpus-CPPfgAHN.d.ts +0 -106
- package/dist/css-CS2jLID6.d.ts +0 -109
- package/dist/email/assets.d.ts +0 -40
- package/dist/email/assets.js +0 -63
- package/dist/email/brand-footer.d.ts +0 -34
- package/dist/email/brand-footer.js +0 -62
- package/dist/email/brand.d.ts +0 -2
- package/dist/email/components.js +0 -240
- package/dist/email/diagnostics.d.ts +0 -2
- package/dist/email/elements.d.ts +0 -2
- package/dist/email/elements.js +0 -299
- package/dist/email/html.d.ts +0 -2
- package/dist/email/html.js +0 -278
- package/dist/email/render.d.ts +0 -50
- package/dist/email/render.js +0 -3
- package/dist/email/selection.d.ts +0 -2
- package/dist/email/selection.js +0 -91
- package/dist/email/source-edit.d.ts +0 -67
- package/dist/email/source-edit.js +0 -185
- package/dist/email/stylesheets.d.ts +0 -15
- package/dist/email/stylesheets.js +0 -48
- package/dist/email/text.d.ts +0 -7
- package/dist/email/text.js +0 -100
- package/dist/emit.d.ts +0 -51
- package/dist/emit.js +0 -151
- package/dist/html-Bl9BAdqc.d.ts +0 -42
- package/dist/interpolate.d.ts +0 -24
- package/dist/interpolate.js +0 -43
- package/dist/jsx-dev-runtime.d.ts +0 -11
- package/dist/jsx-dev-runtime.js +0 -15
- package/dist/jsx-runtime-I-1nCtl2.d.ts +0 -57
- package/dist/jsx-runtime.d.ts +0 -2
- package/dist/jsx-runtime.js +0 -121
- package/dist/lexer.d.ts +0 -60
- package/dist/lexer.js +0 -281
- package/dist/model.d.ts +0 -24
- package/dist/model.js +0 -77
- package/dist/ops-BvwqHl7V.js +0 -630
- package/dist/ops.d.ts +0 -114
- package/dist/ops.js +0 -2
- package/dist/parser-t29cHLVL.d.ts +0 -396
- package/dist/parser.d.ts +0 -2
- package/dist/parser.js +0 -859
- package/dist/predicate-BI6uRRM-.js +0 -549
- package/dist/predicate-M-05Nd7R.d.ts +0 -56
- package/dist/predicate.d.ts +0 -2
- package/dist/predicate.js +0 -2
- package/dist/printer.d.ts +0 -6
- package/dist/printer.js +0 -122
- package/dist/registry-Dcp6QEK_.d.ts +0 -73
- package/dist/registry.d.ts +0 -2
- package/dist/registry.js +0 -646
- package/dist/render-template.d.ts +0 -45
- package/dist/render-template.js +0 -76
- package/dist/selection-CCArx9lU.d.ts +0 -91
- package/dist/showcase-egkusQBf.d.ts +0 -415
- package/dist/sms-segments-y4FpPilJ.d.ts +0 -13
- package/dist/sms-segments.d.ts +0 -2
- package/dist/sms-segments.js +0 -46
- package/dist/source-locations-DrCM82Ym.d.ts +0 -67
- package/dist/source-locations.d.ts +0 -2
- package/dist/source-locations.js +0 -102
- package/dist/starters/category-mapping.d.ts +0 -13
- package/dist/starters/category-mapping.js +0 -49
- package/dist/starters/corpus.d.ts +0 -2
- package/dist/starters/corpus.js +0 -194
- package/dist/starters/library.d.ts +0 -18
- package/dist/starters/library.js +0 -692
- package/dist/starters/public-gallery.d.ts +0 -266
- package/dist/starters/public-gallery.js +0 -916
- package/dist/starters/public-handoff.d.ts +0 -164
- package/dist/starters/public-handoff.js +0 -361
- package/dist/starters/public-preview-artifacts.d.ts +0 -43
- package/dist/starters/public-preview-artifacts.js +0 -104
- package/dist/starters/public-preview.d.ts +0 -61
- package/dist/starters/public-preview.js +0 -83
- package/dist/starters/showcase.d.ts +0 -2
- package/dist/starters/showcase.js +0 -335
- package/dist/starters/sources.d.ts +0 -45
- package/dist/starters/sources.js +0 -7762
- package/dist/starters/theme.d.ts +0 -45
- package/dist/starters/theme.js +0 -77
- package/dist/starters.d.ts +0 -2
- package/dist/starters.js +0 -874
- package/dist/tailwind-BYq7Lo6u.js +0 -727
- package/dist/template-DWftqh4x.d.ts +0 -60
- package/dist/template.d.ts +0 -2
- package/dist/template.js +0 -37
- package/dist/theme-css.js +0 -2
- package/dist/tsx-source-instrumentation.d.ts +0 -30
- package/dist/tsx-source-instrumentation.js +0 -115
- package/dist/tsx-tracer.d.ts +0 -112
- package/dist/tsx-tracer.js +0 -985
- package/dist/variables-J_L3qxRa.d.ts +0 -77
- package/dist/variables.d.ts +0 -2
- package/dist/variables.js +0 -141
- package/dist/version-BITr58kk.js +0 -96
- package/generated/sml-agent-contract.json +0 -709
- package/generated/sml-email-agent-contract.json +0 -615
- package/generated/sml-email-language-reference.md +0 -94
- 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.
|