@templatical/template-tools 0.41.0 → 0.42.1

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/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@templatical/template-tools",
3
3
  "description": "CLI and library for Templatical email templates — validate, render, edit, import, and live-preview",
4
- "version": "0.41.0",
4
+ "version": "0.42.1",
5
5
  "bin": {
6
6
  "templatical": "./dist/bin.js"
7
7
  },
8
8
  "bugs": "https://github.com/templatical/sdk/issues",
9
9
  "dependencies": {
10
- "@templatical/quality": "0.41.0",
11
- "@templatical/renderer": "0.41.0",
12
- "@templatical/types": "0.41.0",
10
+ "@templatical/quality": "0.42.1",
11
+ "@templatical/renderer": "0.42.1",
12
+ "@templatical/types": "0.42.1",
13
13
  "ajv": "^8.20.0"
14
14
  },
15
15
  "devDependencies": {
@@ -17,7 +17,7 @@
17
17
  "mjml": "^5.4.1",
18
18
  "ts-json-schema-generator": "^2.9.0",
19
19
  "typescript": "^6.0.3",
20
- "vitest": "^5.0.1"
20
+ "vitest": "^5.0.2"
21
21
  },
22
22
  "exports": {
23
23
  ".": {
@@ -48,14 +48,14 @@
48
48
  "license": "MIT",
49
49
  "module": "./dist/index.js",
50
50
  "peerDependencies": {
51
- "@templatical/import-beefree": "0.41.0",
52
- "@templatical/import-chamaileon": "0.41.0",
53
- "@templatical/import-easy-email-pro": "0.41.0",
54
- "@templatical/import-html": "0.41.0",
55
- "@templatical/import-mjml": "0.41.0",
56
- "@templatical/import-stripo": "0.41.0",
57
- "@templatical/import-topol": "0.41.0",
58
- "@templatical/import-unlayer": "0.41.0",
51
+ "@templatical/import-beefree": "0.42.1",
52
+ "@templatical/import-chamaileon": "0.42.1",
53
+ "@templatical/import-easy-email-pro": "0.42.1",
54
+ "@templatical/import-html": "0.42.1",
55
+ "@templatical/import-mjml": "0.42.1",
56
+ "@templatical/import-stripo": "0.42.1",
57
+ "@templatical/import-topol": "0.42.1",
58
+ "@templatical/import-unlayer": "0.42.1",
59
59
  "mjml": "^5.4.1"
60
60
  },
61
61
  "peerDependenciesMeta": {
package/schema.json CHANGED
@@ -133,8 +133,12 @@
133
133
  "description": "Whether columns stack vertically on mobile. Absent or `true` keeps MJML's default responsive behavior (columns stack below 480px). `false` renders the columns inside an `<mj-group>` so they stay side-by-side on mobile, proportionally shrunk to fit."
134
134
  },
135
135
  "borderRadius": {
136
- "type": "number",
137
- "description": "Corner radius in px. Omitted/0 = square corners."
136
+ "$ref": "#/definitions/BorderRadiusValue",
137
+ "description": "Corner radius in px — one number, or a radius per corner. Omitted/0 = square corners."
138
+ },
139
+ "border": {
140
+ "$ref": "#/definitions/BorderValue",
141
+ "description": "Border around the section box, per side. Omitted = no border; a side with width 0 is not drawn."
138
142
  },
139
143
  "wrapper": {
140
144
  "$ref": "#/definitions/SectionWrapper",
@@ -215,6 +219,97 @@
215
219
  "1-2"
216
220
  ]
217
221
  },
222
+ "BorderRadiusValue": {
223
+ "anyOf": [
224
+ {
225
+ "type": "number"
226
+ },
227
+ {
228
+ "$ref": "#/definitions/CornerRadius"
229
+ }
230
+ ],
231
+ "description": "A corner radius in px: one number for all four corners, or a radius per corner."
232
+ },
233
+ "CornerRadius": {
234
+ "type": "object",
235
+ "properties": {
236
+ "topLeft": {
237
+ "type": "number"
238
+ },
239
+ "topRight": {
240
+ "type": "number"
241
+ },
242
+ "bottomRight": {
243
+ "type": "number"
244
+ },
245
+ "bottomLeft": {
246
+ "type": "number"
247
+ }
248
+ },
249
+ "required": [
250
+ "topLeft",
251
+ "topRight",
252
+ "bottomRight",
253
+ "bottomLeft"
254
+ ],
255
+ "additionalProperties": false,
256
+ "description": "A radius per corner, in px."
257
+ },
258
+ "BorderValue": {
259
+ "type": "object",
260
+ "properties": {
261
+ "top": {
262
+ "$ref": "#/definitions/BorderSideValue"
263
+ },
264
+ "right": {
265
+ "$ref": "#/definitions/BorderSideValue"
266
+ },
267
+ "bottom": {
268
+ "$ref": "#/definitions/BorderSideValue"
269
+ },
270
+ "left": {
271
+ "$ref": "#/definitions/BorderSideValue"
272
+ }
273
+ },
274
+ "required": [
275
+ "top",
276
+ "right",
277
+ "bottom",
278
+ "left"
279
+ ],
280
+ "additionalProperties": false,
281
+ "description": "A border described per side, like `SpacingValue`. Only elements MJML can border natively carry one: sections, images and buttons."
282
+ },
283
+ "BorderSideValue": {
284
+ "type": "object",
285
+ "properties": {
286
+ "width": {
287
+ "type": "number",
288
+ "description": "Width in px. `0` means no border on this side."
289
+ },
290
+ "style": {
291
+ "$ref": "#/definitions/BorderStyle"
292
+ },
293
+ "color": {
294
+ "type": "string"
295
+ }
296
+ },
297
+ "required": [
298
+ "width",
299
+ "style",
300
+ "color"
301
+ ],
302
+ "additionalProperties": false,
303
+ "description": "One side of a border. A width of `0` leaves that side undrawn."
304
+ },
305
+ "BorderStyle": {
306
+ "type": "string",
307
+ "enum": [
308
+ "solid",
309
+ "dashed",
310
+ "dotted"
311
+ ]
312
+ },
218
313
  "SectionWrapper": {
219
314
  "type": "object",
220
315
  "properties": {
@@ -225,8 +320,8 @@
225
320
  "$ref": "#/definitions/SpacingValue"
226
321
  },
227
322
  "borderRadius": {
228
- "type": "number",
229
- "description": "Corner radius in px for the outer frame. Omitted/0 = square corners."
323
+ "$ref": "#/definitions/BorderRadiusValue",
324
+ "description": "Corner radius in px for the outer frame — one number, or a radius per corner. Omitted/0 = square corners."
230
325
  }
231
326
  },
232
327
  "additionalProperties": false,
@@ -445,8 +540,12 @@
445
540
  ]
446
541
  },
447
542
  "borderRadius": {
448
- "type": "number",
449
- "description": "Corner radius in px. Omitted/0 = square corners. A radius of at least half the rendered size rounds a square image to a circle, which is how avatar and portrait layouts are built."
543
+ "$ref": "#/definitions/BorderRadiusValue",
544
+ "description": "Corner radius in px. Omitted/0 = square corners. A radius of at least half the rendered size rounds a square image to a circle, which is how avatar and portrait layouts are built. A radius per corner is also accepted."
545
+ },
546
+ "border": {
547
+ "$ref": "#/definitions/BorderValue",
548
+ "description": "Border around the image itself, per side. Omitted = no border; a side with width 0 is not drawn."
450
549
  },
451
550
  "linkUrl": {
452
551
  "type": "string"
@@ -530,7 +629,12 @@
530
629
  "type": "string"
531
630
  },
532
631
  "borderRadius": {
533
- "type": "number"
632
+ "$ref": "#/definitions/BorderRadiusValue",
633
+ "description": "Corner radius in px — one number, or a radius per corner."
634
+ },
635
+ "border": {
636
+ "$ref": "#/definitions/BorderValue",
637
+ "description": "Border around the button itself, per side. Omitted = no border; a side with width 0 is not drawn. For an outline (\"ghost\") button, set `backgroundColor` to the keyword `\"transparent\"` (the background control stores it) and set `textColor` too — a new button is `#333333` with white text. An empty fill exports as `transparent`, because MJML paints `#414141` when the attribute is omitted."
534
638
  },
535
639
  "fontSize": {
536
640
  "type": "number"