@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
@@ -1,917 +1,709 @@
1
1
  {
2
- "version": "0.0.0",
3
- "qualityBar": [
4
- "valid Samva compile",
5
- "visually faithful light render",
6
- "visually faithful dark render when source has dark mode",
7
- "editor-friendly classes and semantic tokens",
8
- "no raw HTML tags",
9
- "reusable placeholders and template abstractions",
10
- "repair compile diagnostics before claiming done"
11
- ],
12
- "primitives": [
13
- {
14
- "channel": "email",
15
- "tag": "Email",
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",
16
34
  "attributes": {
17
- "lang": {
18
- "type": "string",
19
- "required": false
35
+ "xmlns": {
36
+ "type": "string"
20
37
  },
21
- "dir": {
22
- "type": "string",
23
- "required": false
38
+ "xmlns:o": {
39
+ "type": "string"
24
40
  },
25
- "width": {
26
- "type": "number",
27
- "required": false,
28
- "min": 1,
29
- "max": 10000
41
+ "xmlns:v": {
42
+ "type": "string"
30
43
  },
31
- "class": {
32
- "type": "string",
33
- "required": false
44
+ "xmlns:w": {
45
+ "type": "string"
34
46
  }
35
47
  },
36
- "children": "Subject?, Preview?, blocks",
37
- "description": "Email document root. Exactly one root per template; wraps the whole message."
48
+ "childElements": ["head", "body"]
38
49
  },
39
- {
40
- "channel": "email",
41
- "tag": "Subject",
50
+ "head": {
51
+ "content": "flow",
52
+ "layout": "metadata",
42
53
  "attributes": {},
43
- "children": "text, {{vars}}",
44
- "description": "Email subject line. Text and interpolations only; must appear before body blocks."
54
+ "childElements": ["title", "meta", "style"]
45
55
  },
46
- {
47
- "channel": "email",
48
- "tag": "Preview",
49
- "attributes": {},
50
- "children": "text, {{vars}}",
51
- "description": "Inbox preview text (hidden in the body). Text and interpolations only."
56
+ "title": {
57
+ "content": "text",
58
+ "layout": "metadata",
59
+ "attributes": {}
52
60
  },
53
- {
54
- "channel": "email",
55
- "tag": "Container",
61
+ "style": {
62
+ "content": "raw",
63
+ "layout": "metadata",
56
64
  "attributes": {
57
- "class": {
58
- "type": "string",
59
- "required": false
65
+ "type": {
66
+ "type": "string"
67
+ }
68
+ }
69
+ },
70
+ "meta": {
71
+ "content": "void",
72
+ "layout": "metadata",
73
+ "attributes": {
74
+ "name": {
75
+ "type": "string"
60
76
  },
61
- "backgroundImage": {
62
- "type": "string",
63
- "required": false
77
+ "content": {
78
+ "type": "string"
64
79
  },
65
- "backgroundPosition": {
66
- "type": "string",
67
- "required": false,
68
- "values": ["center", "top", "bottom"]
80
+ "charset": {
81
+ "type": "string"
69
82
  },
70
- "backgroundSize": {
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": {
71
102
  "type": "string",
72
- "required": false,
73
- "values": ["cover", "contain", "auto"]
103
+ "values": ["left", "center", "right"]
74
104
  }
75
- },
76
- "children": "blocks",
77
- "description": "Centered 600px max-width wrapper. Compiles to a table on the outlook-safe base."
105
+ }
78
106
  },
79
- {
80
- "channel": "email",
81
- "tag": "Section",
107
+ "section": {
108
+ "content": "flow",
109
+ "layout": "block",
82
110
  "attributes": {
83
- "class": {
111
+ "align": {
84
112
  "type": "string",
85
- "required": false
86
- },
87
- "backgroundImage": {
113
+ "values": ["left", "center", "right"]
114
+ }
115
+ }
116
+ },
117
+ "article": {
118
+ "content": "flow",
119
+ "layout": "block",
120
+ "attributes": {
121
+ "align": {
88
122
  "type": "string",
89
- "required": false
90
- },
91
- "backgroundPosition": {
123
+ "values": ["left", "center", "right"]
124
+ }
125
+ }
126
+ },
127
+ "header": {
128
+ "content": "flow",
129
+ "layout": "block",
130
+ "attributes": {
131
+ "align": {
92
132
  "type": "string",
93
- "required": false,
94
- "values": ["center", "top", "bottom"]
95
- },
96
- "backgroundSize": {
133
+ "values": ["left", "center", "right"]
134
+ }
135
+ }
136
+ },
137
+ "footer": {
138
+ "content": "flow",
139
+ "layout": "block",
140
+ "attributes": {
141
+ "align": {
97
142
  "type": "string",
98
- "required": false,
99
- "values": ["cover", "contain", "auto"]
143
+ "values": ["left", "center", "right"]
100
144
  }
101
- },
102
- "children": "blocks",
103
- "description": "Full-width band. Padding splits onto the inner cell for Outlook/Klaviyo."
145
+ }
104
146
  },
105
- {
106
- "channel": "email",
107
- "tag": "Row",
147
+ "main": {
148
+ "content": "flow",
149
+ "layout": "block",
108
150
  "attributes": {
109
- "class": {
151
+ "align": {
110
152
  "type": "string",
111
- "required": false
153
+ "values": ["left", "center", "right"]
112
154
  }
113
- },
114
- "children": "Column+",
115
- "description": "Horizontal layout. Children must be <Column>. Use instead of flex/grid."
155
+ }
156
+ },
157
+ "center": {
158
+ "content": "flow",
159
+ "layout": "block",
160
+ "attributes": {}
116
161
  },
117
- {
118
- "channel": "email",
119
- "tag": "Column",
162
+ "p": {
163
+ "content": "flow",
164
+ "layout": "block",
120
165
  "attributes": {
121
- "class": {
166
+ "align": {
122
167
  "type": "string",
123
- "required": false
124
- },
125
- "width": {
168
+ "values": ["left", "center", "right"]
169
+ }
170
+ }
171
+ },
172
+ "blockquote": {
173
+ "content": "flow",
174
+ "layout": "block",
175
+ "attributes": {
176
+ "align": {
126
177
  "type": "string",
127
- "required": false
128
- },
129
- "valign": {
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": {
130
192
  "type": "string",
131
- "required": false,
132
- "values": ["top", "middle", "bottom"]
193
+ "values": ["left", "center", "right"]
133
194
  }
134
- },
135
- "children": "blocks",
136
- "description": "A cell inside a <Row>. `width` is an HTML width (e.g. \"50%\", \"300\")."
195
+ }
137
196
  },
138
- {
139
- "channel": "email",
140
- "tag": "Heading",
197
+ "h2": {
198
+ "content": "flow",
199
+ "layout": "block",
141
200
  "attributes": {
142
- "level": {
143
- "type": "number",
144
- "required": false,
145
- "min": 1,
146
- "max": 6
147
- },
148
- "class": {
201
+ "align": {
149
202
  "type": "string",
150
- "required": false
203
+ "values": ["left", "center", "right"]
151
204
  }
152
- },
153
- "children": "text, {{vars}}, strong, em, a",
154
- "description": "Renders <h1>-<h6> by `level` (default 1)."
205
+ }
155
206
  },
156
- {
157
- "channel": "email",
158
- "tag": "Text",
207
+ "h3": {
208
+ "content": "flow",
209
+ "layout": "block",
159
210
  "attributes": {
160
- "class": {
211
+ "align": {
161
212
  "type": "string",
162
- "required": false
213
+ "values": ["left", "center", "right"]
163
214
  }
164
- },
165
- "children": "text, {{vars}}, strong, em, a",
166
- "description": "Paragraph. Ships sane font-size/line-height/margin defaults."
215
+ }
167
216
  },
168
- {
169
- "channel": "email",
170
- "tag": "Button",
217
+ "h4": {
218
+ "content": "flow",
219
+ "layout": "block",
171
220
  "attributes": {
172
- "href": {
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": {
173
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",
174
298
  "required": true
175
299
  },
176
- "class": {
177
- "type": "string",
178
- "required": false
300
+ "target": {
301
+ "type": "string"
302
+ },
303
+ "rel": {
304
+ "type": "string"
305
+ },
306
+ "name": {
307
+ "type": "string"
179
308
  }
180
- },
181
- "children": "text, {{vars}}, strong, em",
182
- "description": "Link styled as a button. Set padding via classes; the compiler injects the Outlook mso hack."
309
+ }
183
310
  },
184
- {
185
- "channel": "email",
186
- "tag": "Image",
311
+ "img": {
312
+ "content": "void",
313
+ "layout": "image",
187
314
  "attributes": {
188
315
  "src": {
189
- "type": "string",
316
+ "type": "url",
190
317
  "required": true
191
318
  },
192
319
  "alt": {
193
320
  "type": "string",
194
- "required": false
321
+ "required": true
195
322
  },
196
323
  "width": {
197
- "type": "number",
198
- "required": false,
199
- "min": 0,
200
- "max": 10000
324
+ "type": "measure"
201
325
  },
202
326
  "height": {
203
- "type": "number",
204
- "required": false,
205
- "min": 0,
206
- "max": 10000
327
+ "type": "measure"
328
+ },
329
+ "border": {
330
+ "type": "measure"
207
331
  },
208
- "class": {
332
+ "align": {
209
333
  "type": "string",
210
- "required": false
334
+ "values": ["left", "center", "right"]
211
335
  }
212
- },
213
- "children": "Source?",
214
- "description": "Responsive image. Always set `alt` for accessibility. Add a <Source scheme=\"dark\"> child to swap the asset in dark mode."
336
+ }
215
337
  },
216
- {
217
- "channel": "email",
218
- "tag": "Source",
338
+ "table": {
339
+ "content": "flow",
340
+ "layout": "table",
219
341
  "attributes": {
220
- "scheme": {
221
- "type": "string",
222
- "required": true,
223
- "values": ["dark"]
342
+ "width": {
343
+ "type": "measure"
224
344
  },
225
- "src": {
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": {
226
358
  "type": "string",
227
- "required": true
359
+ "values": ["left", "center", "right"]
360
+ },
361
+ "bgcolor": {
362
+ "type": "string"
228
363
  }
229
364
  },
230
- "children": "void",
231
- "description": "Image source variant. Inside <Image>, `scheme=\"dark\"` swaps the asset when dark-mode media queries are honored."
365
+ "childElements": ["caption", "colgroup", "thead", "tbody", "tfoot", "tr"]
232
366
  },
233
- {
234
- "channel": "email",
235
- "tag": "Divider",
367
+ "caption": {
368
+ "content": "flow",
369
+ "layout": "block",
236
370
  "attributes": {
237
- "class": {
371
+ "align": {
238
372
  "type": "string",
239
- "required": false
373
+ "values": ["left", "center", "right"]
240
374
  }
241
- },
242
- "children": "void",
243
- "description": "Horizontal rule (border-top)."
375
+ }
244
376
  },
245
- {
246
- "channel": "email",
247
- "tag": "Spacer",
377
+ "colgroup": {
378
+ "content": "flow",
379
+ "layout": "table-section",
248
380
  "attributes": {
249
- "height": {
250
- "type": "number",
251
- "required": true,
252
- "min": 1,
253
- "max": 2000
381
+ "span": {
382
+ "type": "number"
383
+ },
384
+ "width": {
385
+ "type": "measure"
254
386
  }
255
387
  },
256
- "children": "void",
257
- "description": "Vertical gap of `height` px."
388
+ "childElements": ["col"]
258
389
  },
259
- {
260
- "channel": "email",
261
- "tag": "List",
390
+ "col": {
391
+ "content": "void",
392
+ "layout": "table-section",
262
393
  "attributes": {
263
- "type": {
264
- "type": "string",
265
- "required": false,
266
- "values": ["unordered", "ordered"]
394
+ "span": {
395
+ "type": "number"
267
396
  },
268
- "class": {
269
- "type": "string",
270
- "required": false
397
+ "width": {
398
+ "type": "measure"
271
399
  }
272
- },
273
- "children": "ListItem+",
274
- "description": "Bulleted or numbered list. `type` is \"unordered\" (default) or \"ordered\". Children must be <ListItem>."
400
+ }
275
401
  },
276
- {
277
- "channel": "email",
278
- "tag": "ListItem",
402
+ "thead": {
403
+ "content": "flow",
404
+ "layout": "table-section",
279
405
  "attributes": {
280
- "class": {
406
+ "align": {
281
407
  "type": "string",
282
- "required": false
408
+ "values": ["left", "center", "right"]
409
+ },
410
+ "valign": {
411
+ "type": "string",
412
+ "values": ["top", "middle", "bottom"]
413
+ },
414
+ "bgcolor": {
415
+ "type": "string"
283
416
  }
284
417
  },
285
- "children": "text, {{vars}}, strong, em, a",
286
- "description": "A single list row. Inline content only (text, {{vars}}, strong/em/a)."
418
+ "childElements": ["tr"]
287
419
  },
288
- {
289
- "channel": "email",
290
- "tag": "If",
420
+ "tbody": {
421
+ "content": "flow",
422
+ "layout": "table-section",
291
423
  "attributes": {
292
- "test": {
424
+ "align": {
293
425
  "type": "string",
294
- "required": true
426
+ "values": ["left", "center", "right"]
427
+ },
428
+ "valign": {
429
+ "type": "string",
430
+ "values": ["top", "middle", "bottom"]
431
+ },
432
+ "bgcolor": {
433
+ "type": "string"
295
434
  }
296
435
  },
297
- "children": "blocks, Else?",
298
- "description": "Send-time conditional block. `test` is a predicate over declared variables (see \"Send-time conditionals\" below). Content: blocks, then an optional trailing <Else>."
436
+ "childElements": ["tr"]
299
437
  },
300
- {
301
- "channel": "email",
302
- "tag": "Else",
303
- "attributes": {},
304
- "children": "blocks",
305
- "description": "The false branch of an <If>. Valid only as the last direct child of <If>."
306
- },
307
- {
308
- "channel": "email",
309
- "tag": "a",
438
+ "tfoot": {
439
+ "content": "flow",
440
+ "layout": "table-section",
310
441
  "attributes": {
311
- "href": {
442
+ "align": {
312
443
  "type": "string",
313
- "required": true
444
+ "values": ["left", "center", "right"]
314
445
  },
315
- "class": {
446
+ "valign": {
316
447
  "type": "string",
317
- "required": false
448
+ "values": ["top", "middle", "bottom"]
449
+ },
450
+ "bgcolor": {
451
+ "type": "string"
318
452
  }
319
453
  },
320
- "children": "text, {{vars}}, strong, em",
321
- "description": "Inline link. It has deterministic theme-brand color and underline defaults; use safe classes to override either."
322
- },
323
- {
324
- "channel": "email",
325
- "tag": "strong",
326
- "attributes": {},
327
- "children": "text, {{vars}}, strong, em",
328
- "description": "Bold inline text."
454
+ "childElements": ["tr"]
329
455
  },
330
- {
331
- "channel": "email",
332
- "tag": "em",
333
- "attributes": {},
334
- "children": "text, {{vars}}, strong, em",
335
- "description": "Italic inline text."
336
- },
337
- {
338
- "channel": "sms",
339
- "tag": "Sms",
456
+ "tr": {
457
+ "content": "flow",
458
+ "layout": "row",
340
459
  "attributes": {
341
- "category": {
460
+ "align": {
461
+ "type": "string",
462
+ "values": ["left", "center", "right"]
463
+ },
464
+ "valign": {
342
465
  "type": "string",
343
- "required": false,
344
- "values": ["transactional", "promotional", "service_implicit"]
466
+ "values": ["top", "middle", "bottom"]
467
+ },
468
+ "bgcolor": {
469
+ "type": "string"
470
+ },
471
+ "height": {
472
+ "type": "measure"
345
473
  }
346
474
  },
347
- "children": "verbatim text, {{vars}}, If",
348
- "description": "SMS document root. The body is VERBATIM text — newlines and space runs are content. No layout tags, no classes."
475
+ "childElements": ["td", "th"]
349
476
  },
350
- {
351
- "channel": "sms",
352
- "tag": "If",
477
+ "td": {
478
+ "content": "flow",
479
+ "layout": "cell",
353
480
  "attributes": {
354
- "test": {
481
+ "align": {
355
482
  "type": "string",
356
- "required": true
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"
357
503
  }
358
- },
359
- "children": "verbatim text, {{vars}}, If, Else?",
360
- "description": "Send-time conditional inline in the body. Content is verbatim text/{{vars}}, then an optional trailing <Else>."
504
+ }
361
505
  },
362
- {
363
- "channel": "sms",
364
- "tag": "Else",
365
- "attributes": {},
366
- "children": "verbatim text, {{vars}}, If",
367
- "description": "The false branch of an <If>; must be its last child. Nothing may follow it, whitespace included."
368
- },
369
- {
370
- "channel": "whatsapp",
371
- "tag": "WhatsApp",
506
+ "th": {
507
+ "content": "flow",
508
+ "layout": "cell",
372
509
  "attributes": {
373
- "name": {
510
+ "align": {
374
511
  "type": "string",
375
- "required": false
512
+ "values": ["left", "center", "right"]
376
513
  },
377
- "language": {
514
+ "valign": {
378
515
  "type": "string",
379
- "required": false
516
+ "values": ["top", "middle", "bottom"]
380
517
  },
381
- "category": {
382
- "type": "string",
383
- "required": true,
384
- "values": ["marketing", "utility", "authentication", "service"]
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"
385
532
  }
386
- },
387
- "children": "Header?, Body, Footer?, Buttons? (in order)",
388
- "description": "WhatsApp template root. Children are Meta's template anatomy in order: Header?, Body, Footer?, Buttons?. `name`/`language` default from the template slug/locale at the API layer."
533
+ }
389
534
  },
390
- {
391
- "channel": "whatsapp",
392
- "tag": "Header",
535
+ "ul": {
536
+ "content": "flow",
537
+ "layout": "list",
538
+ "attributes": {},
539
+ "childElements": ["li"]
540
+ },
541
+ "ol": {
542
+ "content": "flow",
543
+ "layout": "list",
393
544
  "attributes": {
545
+ "start": {
546
+ "type": "number"
547
+ },
394
548
  "type": {
395
- "type": "string",
396
- "required": false,
397
- "values": ["text", "image", "video", "document"]
549
+ "type": "string"
398
550
  }
399
551
  },
400
- "children": "verbatim text, {{vars}}, If",
401
- "description": "Optional template header. `type` is \"text\" (default, ≤60 chars) or \"image\"/\"video\"/\"document\" (content is the media URL/handle)."
552
+ "childElements": ["li"]
402
553
  },
403
- {
404
- "channel": "whatsapp",
405
- "tag": "Body",
406
- "attributes": {},
407
- "children": "verbatim text, {{vars}}, If",
408
- "description": "Required template body (≤1024 chars). Verbatim text, {{vars}}, and <If> conditionals."
409
- },
410
- {
411
- "channel": "whatsapp",
412
- "tag": "Footer",
413
- "attributes": {},
414
- "children": "verbatim text, {{vars}}, If",
415
- "description": "Optional template footer (≤60 chars)."
554
+ "li": {
555
+ "content": "flow",
556
+ "layout": "list-item",
557
+ "attributes": {}
416
558
  },
417
- {
418
- "channel": "whatsapp",
419
- "tag": "Buttons",
420
- "attributes": {},
421
- "children": "Button+",
422
- "description": "Interactive buttons container. Meta limits: ≤10 total, ≤2 url, ≤1 phone."
559
+ "br": {
560
+ "content": "void",
561
+ "layout": "break",
562
+ "attributes": {}
423
563
  },
424
- {
425
- "channel": "whatsapp",
426
- "tag": "Button",
564
+ "hr": {
565
+ "content": "void",
566
+ "layout": "rule",
427
567
  "attributes": {
428
- "type": {
429
- "type": "string",
430
- "required": true,
431
- "values": ["quick-reply", "url", "phone", "copy-code"]
568
+ "width": {
569
+ "type": "measure"
432
570
  },
433
- "url": {
434
- "type": "string",
435
- "required": false
571
+ "size": {
572
+ "type": "number"
436
573
  },
437
- "phone": {
438
- "type": "string",
439
- "required": false
440
- }
441
- },
442
- "children": "verbatim text, {{vars}}, If",
443
- "description": "`type` is \"quick-reply\" (label only), \"url\" (requires `url`, ≤2), \"phone\" (requires `phone`, ≤1), or \"copy-code\" (content is the code to copy). Label text ≤25 chars."
444
- },
445
- {
446
- "channel": "whatsapp",
447
- "tag": "If",
448
- "attributes": {
449
- "test": {
574
+ "align": {
450
575
  "type": "string",
451
- "required": true
576
+ "values": ["left", "center", "right"]
452
577
  }
453
- },
454
- "children": "verbatim text, {{vars}}, If, Else?",
455
- "description": "Send-time conditional inline in a text slot. Content is verbatim text/{{vars}}, then an optional trailing <Else>."
456
- },
457
- {
458
- "channel": "whatsapp",
459
- "tag": "Else",
460
- "attributes": {},
461
- "children": "verbatim text, {{vars}}, If",
462
- "description": "The false branch of an <If>; must be its last child. Nothing may follow it, whitespace included."
578
+ }
463
579
  }
464
- ],
465
- "utilityFamilies": [
466
- {
467
- "root": "p",
468
- "syntax": "p-*",
469
- "descriptions": ["Padding on all sides (p-4 = 16px). Compiles onto table cells for Outlook."]
470
- },
471
- {
472
- "root": "px",
473
- "syntax": "px-*",
474
- "descriptions": ["Horizontal padding."]
475
- },
476
- {
477
- "root": "py",
478
- "syntax": "py-*",
479
- "descriptions": ["Vertical padding."]
480
- },
481
- {
482
- "root": "pt",
483
- "syntax": "pt-*",
484
- "descriptions": ["Top padding."]
485
- },
486
- {
487
- "root": "pr",
488
- "syntax": "pr-*",
489
- "descriptions": ["Right padding."]
490
- },
491
- {
492
- "root": "pb",
493
- "syntax": "pb-*",
494
- "descriptions": ["Bottom padding."]
495
- },
496
- {
497
- "root": "pl",
498
- "syntax": "pl-*",
499
- "descriptions": ["Left padding."]
500
- },
501
- {
502
- "root": "m",
503
- "syntax": "m-*",
504
- "descriptions": [
505
- "Margin on all sides. Warn tier — some clients strip margins. (warn: some clients strip it)"
506
- ]
507
- },
508
- {
509
- "root": "mx",
510
- "syntax": "mx-*",
511
- "descriptions": [
512
- "Horizontal margin; mx-auto centers block elements. (warn: some clients strip it)"
513
- ]
514
- },
515
- {
516
- "root": "my",
517
- "syntax": "my-*",
518
- "descriptions": ["Vertical margin. (warn: some clients strip it)"]
519
- },
520
- {
521
- "root": "mt",
522
- "syntax": "mt-*",
523
- "descriptions": ["Top margin. (warn: some clients strip it)"]
524
- },
525
- {
526
- "root": "mr",
527
- "syntax": "mr-*",
528
- "descriptions": ["Right margin. (warn: some clients strip it)"]
529
- },
530
- {
531
- "root": "mb",
532
- "syntax": "mb-*",
533
- "descriptions": ["Bottom margin. (warn: some clients strip it)"]
534
- },
535
- {
536
- "root": "ml",
537
- "syntax": "ml-*",
538
- "descriptions": ["Left margin. (warn: some clients strip it)"]
539
- },
540
- {
541
- "root": "w",
542
- "syntax": "w-*",
543
- "descriptions": ["Width from the spacing scale (w-32 = 128px), w-full, or w-[600px]/w-[50%]."]
544
- },
545
- {
546
- "root": "max-w",
547
- "syntax": "max-w-*",
548
- "descriptions": ["Max width from the container scale (max-w-lg = 512px) or max-w-[600px]."]
549
- },
550
- {
551
- "root": "h",
552
- "syntax": "h-*",
553
- "descriptions": ["Height from the spacing scale (h-12 = 48px) or h-[80px]."]
554
- },
555
- {
556
- "root": "text",
557
- "syntax": "text-*",
558
- "descriptions": [
559
- "Font size with paired line-height (text-sm = 14px/20px) or bounded px value (text-[15px] = 15px/22.5px). Put an explicit leading-* after it to override line-height.",
560
- "Text alignment: text-left, text-center, text-right, text-justify.",
561
- "Text color from the palette (text-gray-700) or text-[#374151]."
562
- ]
563
- },
564
- {
565
- "root": "leading",
566
- "syntax": "leading-*",
567
- "descriptions": [
568
- "Line height: named ratios (leading-relaxed) or spacing steps (leading-6 = 24px)."
569
- ]
570
- },
571
- {
572
- "root": "font",
573
- "syntax": "font-*",
574
- "descriptions": [
575
- "Font weight: font-normal, font-medium, font-semibold, font-bold, ...",
576
- "Font stack: font-sans, font-serif, font-mono."
577
- ]
578
- },
579
- {
580
- "root": "tracking",
581
- "syntax": "tracking-*",
582
- "descriptions": [
583
- "Letter spacing: tracking-tighter … tracking-widest (em-based; inlines fine in Outlook). Pair tracking-wide/wider with uppercase for eyebrows."
584
- ]
585
- },
586
- {
587
- "root": "uppercase",
588
- "syntax": "uppercase",
589
- "descriptions": ["Uppercase text transform."]
590
- },
591
- {
592
- "root": "underline",
593
- "syntax": "underline",
594
- "descriptions": ["Underlined text."]
595
- },
596
- {
597
- "root": "no-underline",
598
- "syntax": "no-underline",
599
- "descriptions": [
600
- "Removes the underline (links render underlined by default in most clients)."
601
- ]
602
- },
603
- {
604
- "root": "bg",
605
- "syntax": "bg-*",
606
- "descriptions": ["Background color from the palette (bg-white, bg-blue-600) or bg-[#0088cc]."]
607
- },
608
- {
609
- "root": "bg-gradient",
610
- "syntax": "bg-gradient-*",
611
- "descriptions": [
612
- "Linear gradient background for hero sections: bg-gradient-to-b/t/l/r with from-{color} and to-{color}. Modern base compiles a CSS linear-gradient (plus a solid from-color fallback); the outlook-safe base degrades to the solid from-color — Outlook for Windows never renders the gradient."
613
- ]
614
- },
615
- {
616
- "root": "from",
617
- "syntax": "from-*",
618
- "descriptions": [
619
- "Gradient start color (from-indigo-600). Doubles as the solid fallback color on clients without gradient support (Outlook for Windows)."
620
- ]
621
- },
622
- {
623
- "root": "to",
624
- "syntax": "to-*",
625
- "descriptions": ["Gradient end color (to-purple-600)."]
626
- },
627
- {
628
- "root": "border",
629
- "syntax": "border-*",
630
- "descriptions": [
631
- "Solid border width: border (1px), border-2, border-0.",
632
- "Border color from the palette (border-gray-200)."
633
- ]
634
- },
635
- {
636
- "root": "rounded",
637
- "syntax": "rounded-*",
638
- "descriptions": [
639
- "Border radius (rounded-md = 6px). Ignored by Outlook for Windows — buttons degrade to square corners."
640
- ]
641
- },
642
- {
643
- "root": "rounded-t",
644
- "syntax": "rounded-t-*",
645
- "descriptions": [
646
- "Top border radius for card/header blocks (rounded-t-lg). Degrades to square corners in Outlook for Windows."
647
- ]
648
- },
649
- {
650
- "root": "rounded-r",
651
- "syntax": "rounded-r-*",
652
- "descriptions": [
653
- "Right-side border radius (rounded-r-lg). Degrades to square corners in Outlook for Windows."
654
- ]
655
- },
656
- {
657
- "root": "rounded-b",
658
- "syntax": "rounded-b-*",
659
- "descriptions": [
660
- "Bottom border radius for card/footer blocks (rounded-b-lg). Degrades to square corners in Outlook for Windows."
661
- ]
662
- },
663
- {
664
- "root": "rounded-l",
665
- "syntax": "rounded-l-*",
666
- "descriptions": [
667
- "Left-side border radius (rounded-l-lg). Degrades to square corners in Outlook for Windows."
668
- ]
669
- },
670
- {
671
- "root": "block",
672
- "syntax": "block",
673
- "descriptions": ["display: block."]
674
- },
675
- {
676
- "root": "inline-block",
677
- "syntax": "inline-block",
678
- "descriptions": ["display: inline-block."]
679
- },
680
- {
681
- "root": "hidden",
682
- "syntax": "hidden",
683
- "descriptions": ["display: none. Pair with sm:block for mobile-only content."]
684
- }
685
- ],
686
- "forbiddenUtilities": [
687
- {
688
- "match": "flex",
689
- "message": "display:flex is unsupported in Outlook for Windows (Word engine) — use <Row>/<Column>"
690
- },
691
- {
692
- "match": "inline-flex",
693
- "message": "display:inline-flex is unsupported in Outlook for Windows — use <Row>/<Column>"
694
- },
695
- {
696
- "match": "grid",
697
- "message": "display:grid is unsupported in Outlook for Windows and Gmail — use <Row>/<Column>"
698
- },
699
- {
700
- "match": "inline-grid",
701
- "message": "display:inline-grid is unsupported in Outlook for Windows — use <Row>/<Column>"
702
- },
703
- {
704
- "match": "gap-",
705
- "message": "gap requires flex/grid, unsupported in Outlook for Windows — use padding on <Column>"
706
- },
707
- {
708
- "match": "space-",
709
- "message": "space-* margins require selectors Gmail strips — use padding or <Spacer>"
710
- },
711
- {
712
- "match": "items-",
713
- "message": "flexbox alignment is unsupported in Outlook for Windows — use <Row>/<Column>"
714
- },
715
- {
716
- "match": "justify-",
717
- "message": "flexbox alignment is unsupported in Outlook for Windows — use <Row>/<Column> and text-center"
718
- },
719
- {
720
- "match": "self-",
721
- "message": "flexbox alignment is unsupported in Outlook for Windows — use <Row>/<Column>"
722
- },
723
- {
724
- "match": "content-",
725
- "message": "flexbox alignment is unsupported in Outlook for Windows — use <Row>/<Column>"
726
- },
727
- {
728
- "match": "order-",
729
- "message": "flex order is unsupported in Outlook for Windows — reorder the source instead"
730
- },
731
- {
732
- "match": "absolute",
733
- "message": "CSS position is ignored by Gmail and Outlook — use nested <Section>s"
734
- },
735
- {
736
- "match": "relative",
737
- "message": "CSS position is ignored by Gmail and Outlook — use nested <Section>s"
738
- },
739
- {
740
- "match": "fixed",
741
- "message": "CSS position is ignored by Gmail and Outlook — use nested <Section>s"
742
- },
743
- {
744
- "match": "sticky",
745
- "message": "CSS position is ignored by Gmail and Outlook — use nested <Section>s"
746
- },
747
- {
748
- "match": "static",
749
- "message": "CSS position is ignored by Gmail and Outlook — remove it"
750
- },
751
- {
752
- "match": "inset-",
753
- "message": "position offsets are ignored by Gmail and Outlook — use padding"
754
- },
755
- {
756
- "match": "top-",
757
- "message": "position offsets are ignored by Gmail and Outlook — use padding"
758
- },
759
- {
760
- "match": "right-",
761
- "message": "position offsets are ignored by Gmail and Outlook — use padding"
762
- },
763
- {
764
- "match": "bottom-",
765
- "message": "position offsets are ignored by Gmail and Outlook — use padding"
766
- },
767
- {
768
- "match": "left-",
769
- "message": "position offsets are ignored by Gmail and Outlook — use padding"
770
- },
771
- {
772
- "match": "z-",
773
- "message": "z-index is ignored by Gmail and Outlook — remove it"
774
- },
775
- {
776
- "match": "float-",
777
- "message": "float is unreliable across email clients — use <Row>/<Column>"
778
- },
779
- {
780
- "match": "shadow",
781
- "message": "box-shadow is unsupported in Outlook for Windows and Gmail — use a border instead"
782
- },
783
- {
784
- "match": "shadow-",
785
- "message": "box-shadow is unsupported in Outlook for Windows and Gmail — use a border instead"
786
- },
787
- {
788
- "match": "opacity-",
789
- "message": "opacity is unsupported in Outlook for Windows — bake the tint into the color"
790
- },
791
- {
792
- "match": "transform",
793
- "message": "CSS transforms are unsupported in email clients — remove them"
794
- },
795
- {
796
- "match": "rotate-",
797
- "message": "CSS transforms are unsupported in email clients — remove them"
798
- },
799
- {
800
- "match": "scale-",
801
- "message": "CSS transforms are unsupported in email clients — remove them"
802
- },
803
- {
804
- "match": "translate-",
805
- "message": "CSS transforms are unsupported in email clients — remove them"
580
+ },
581
+ "globalAttributes": {
582
+ "id": {
583
+ "type": "string"
806
584
  },
807
- {
808
- "match": "skew-",
809
- "message": "CSS transforms are unsupported in email clients — remove them"
585
+ "title": {
586
+ "type": "string"
810
587
  },
811
- {
812
- "match": "transition",
813
- "message": "transitions don't run in email — remove them"
588
+ "lang": {
589
+ "type": "string"
814
590
  },
815
- {
816
- "match": "transition-",
817
- "message": "transitions don't run in email — remove them"
591
+ "dir": {
592
+ "type": "string",
593
+ "values": ["ltr", "rtl", "auto"]
818
594
  },
819
- {
820
- "match": "duration-",
821
- "message": "transitions don't run in email — remove them"
822
- },
823
- {
824
- "match": "animate-",
825
- "message": "animations don't run in email — remove them"
826
- },
827
- {
828
- "match": "blur-",
829
- "message": "CSS filters are unsupported in most email clients — remove them"
830
- },
831
- {
832
- "match": "brightness-",
833
- "message": "CSS filters are unsupported in most email clients — remove them"
834
- },
835
- {
836
- "match": "grayscale",
837
- "message": "CSS filters are unsupported in most email clients — remove them"
838
- },
839
- {
840
- "match": "grayscale-",
841
- "message": "CSS filters are unsupported in most email clients — remove them"
842
- },
843
- {
844
- "match": "truncate",
845
- "message": "text truncation is unsupported in Outlook for Windows — shorten the copy"
846
- },
847
- {
848
- "match": "line-clamp-",
849
- "message": "line clamping is unsupported in email clients — shorten the copy"
850
- },
851
- {
852
- "match": "aspect-",
853
- "message": "aspect-ratio is unsupported in Outlook and Gmail — set width/height on <Image>"
854
- },
855
- {
856
- "match": "overflow-",
857
- "message": "overflow is unreliable across email clients — restructure the layout"
858
- }
859
- ],
860
- "repairExamples": [
861
- {
862
- "from": "flex gap-4",
863
- "to": "<Row><Column>...</Column><Column>...</Column></Row>",
864
- "reason": "Email layout must use table-backed Row/Column primitives."
865
- },
866
- {
867
- "from": "md:text-lg",
868
- "to": "sm:text-lg",
869
- "reason": "Only sm: responsive enhancement is supported."
870
- },
871
- {
872
- "from": "bg-[var(--brand)]",
873
- "to": "bg-brand or bg-[#4f46e5]",
874
- "reason": "Compiled email has no CSS variables; use a token or literal hex."
875
- },
876
- {
877
- "from": "font-[650]",
878
- "to": "font-semibold",
879
- "reason": "Use the supported named font-weight utilities instead of arbitrary weights."
595
+ "role": {
596
+ "type": "string"
880
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."
881
614
  ],
882
- "recipes": [
883
- {
884
- "name": "security-notice",
885
- "structure": ["Preview", "Container", "Heading", "Text paragraphs", "Button", "Footer Text"],
886
- "guidance": "Dense, direct copy; strong contrast; explicit dark background/text classes."
887
- },
888
- {
889
- "name": "product-update",
890
- "structure": ["Preview", "Container", "Heading", "Section rows", "CTA Button", "Footer"],
891
- "guidance": "Use cards/sections, short headings, and semantic brand tokens."
892
- },
893
- {
894
- "name": "receipt-invoice",
895
- "structure": [
896
- "Preview",
897
- "Container",
898
- "Heading",
899
- "Row/Column line items",
900
- "Divider",
901
- "total row"
902
- ],
903
- "guidance": "Prefer table-backed Row/Column blocks and right-aligned totals."
904
- },
905
- {
906
- "name": "digest",
907
- "structure": [
908
- "Preview",
909
- "Container",
910
- "Heading",
911
- "repeated Section/Text/Button rows",
912
- "Footer"
913
- ],
914
- "guidance": "Keep repeated rows compact; use Divider between entries."
615
+ "structuredChannels": {
616
+ "sms": {
617
+ "Sms": {
618
+ "attributes": {
619
+ "category": {
620
+ "type": "string",
621
+ "values": ["transactional", "promotional", "service_implicit"]
622
+ }
623
+ },
624
+ "content": "verbatim"
625
+ },
626
+ "If": {
627
+ "attributes": {
628
+ "test": {
629
+ "type": "string",
630
+ "required": true
631
+ }
632
+ },
633
+ "content": "verbatim-if"
634
+ },
635
+ "Else": {
636
+ "attributes": {},
637
+ "content": "verbatim"
638
+ }
639
+ },
640
+ "whatsapp": {
641
+ "WhatsApp": {
642
+ "attributes": {
643
+ "name": {
644
+ "type": "string"
645
+ },
646
+ "language": {
647
+ "type": "string"
648
+ },
649
+ "category": {
650
+ "type": "string",
651
+ "required": true,
652
+ "values": ["marketing", "utility", "authentication", "service"]
653
+ }
654
+ },
655
+ "content": "whatsapp"
656
+ },
657
+ "Header": {
658
+ "attributes": {
659
+ "type": {
660
+ "type": "string",
661
+ "values": ["text", "image", "video", "document"]
662
+ }
663
+ },
664
+ "content": "verbatim"
665
+ },
666
+ "Body": {
667
+ "attributes": {},
668
+ "content": "verbatim"
669
+ },
670
+ "Footer": {
671
+ "attributes": {},
672
+ "content": "verbatim"
673
+ },
674
+ "Buttons": {
675
+ "attributes": {},
676
+ "content": "buttons"
677
+ },
678
+ "Button": {
679
+ "attributes": {
680
+ "type": {
681
+ "type": "string",
682
+ "required": true,
683
+ "values": ["quick-reply", "url", "phone", "copy-code"]
684
+ },
685
+ "url": {
686
+ "type": "string"
687
+ },
688
+ "phone": {
689
+ "type": "string"
690
+ }
691
+ },
692
+ "content": "verbatim"
693
+ },
694
+ "If": {
695
+ "attributes": {
696
+ "test": {
697
+ "type": "string",
698
+ "required": true
699
+ }
700
+ },
701
+ "content": "verbatim-if"
702
+ },
703
+ "Else": {
704
+ "attributes": {},
705
+ "content": "verbatim"
706
+ }
915
707
  }
916
- ]
708
+ }
917
709
  }