@pobuca/email-builder 1.3.2 → 1.4.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.
@@ -1289,6 +1289,1283 @@
1289
1289
  return PBEmail;
1290
1290
  }(Defaults));
1291
1291
 
1292
+ /* This file is generated by tools/generate-email-template-schema.js. */
1293
+ /* tslint:disable */
1294
+ var GENERATED_EMAIL_TEMPLATE_SCHEMA = {
1295
+ "description": "The complete AI-generation contract consumed by the Pobuca Email Builder.",
1296
+ "type": "object",
1297
+ "properties": {
1298
+ "general": {
1299
+ "$ref": "#/definitions/IGeneralOptions"
1300
+ },
1301
+ "structures": {
1302
+ "type": "array",
1303
+ "items": {
1304
+ "$ref": "#/definitions/IStructure"
1305
+ }
1306
+ },
1307
+ "customFonts": {
1308
+ "type": "array",
1309
+ "items": {
1310
+ "$ref": "#/definitions/ICustomFont"
1311
+ }
1312
+ }
1313
+ },
1314
+ "additionalProperties": false,
1315
+ "definitions": {
1316
+ "IGeneralOptions": {
1317
+ "description": "Builder{@linkIPBEmail}general options interface.",
1318
+ "type": "object",
1319
+ "properties": {
1320
+ "width": {
1321
+ "$ref": "#/definitions/IWidthHeight"
1322
+ },
1323
+ "background": {
1324
+ "$ref": "#/definitions/IBackground"
1325
+ },
1326
+ "padding": {
1327
+ "$ref": "#/definitions/IPadding"
1328
+ },
1329
+ "direction": {
1330
+ "$ref": "#/definitions/TDirection"
1331
+ },
1332
+ "name": {
1333
+ "type": "string"
1334
+ },
1335
+ "previewText": {
1336
+ "type": "string"
1337
+ },
1338
+ "global": {
1339
+ "type": "object",
1340
+ "properties": {
1341
+ "fonts": {
1342
+ "type": "array",
1343
+ "items": {
1344
+ "type": "string"
1345
+ }
1346
+ },
1347
+ "padding": {
1348
+ "$ref": "#/definitions/IPadding"
1349
+ }
1350
+ },
1351
+ "additionalProperties": false,
1352
+ "required": [
1353
+ "fonts",
1354
+ "padding"
1355
+ ]
1356
+ }
1357
+ },
1358
+ "additionalProperties": false,
1359
+ "required": [
1360
+ "width",
1361
+ "background",
1362
+ "padding",
1363
+ "direction",
1364
+ "name",
1365
+ "previewText",
1366
+ "global"
1367
+ ]
1368
+ },
1369
+ "IWidthHeight": {
1370
+ "description": "Builder Width and Height styles interface.",
1371
+ "type": "object",
1372
+ "properties": {
1373
+ "value": {
1374
+ "type": "number"
1375
+ },
1376
+ "unit": {
1377
+ "$ref": "#/definitions/TUnits",
1378
+ "description": "Width and Height unit type."
1379
+ },
1380
+ "auto": {
1381
+ "type": "boolean"
1382
+ },
1383
+ "units": {
1384
+ "type": "array",
1385
+ "items": {
1386
+ "$ref": "#/definitions/TUnits",
1387
+ "description": "Builder units types."
1388
+ },
1389
+ "uniqueItems": true
1390
+ }
1391
+ },
1392
+ "additionalProperties": false,
1393
+ "required": [
1394
+ "value",
1395
+ "unit",
1396
+ "auto",
1397
+ "units"
1398
+ ]
1399
+ },
1400
+ "TUnits": {
1401
+ "description": "Builder units types.",
1402
+ "enum": [
1403
+ "%",
1404
+ "contain",
1405
+ "cover",
1406
+ "px"
1407
+ ],
1408
+ "type": "string"
1409
+ },
1410
+ "IBackground": {
1411
+ "description": "Builder background styles interface.",
1412
+ "type": "object",
1413
+ "properties": {
1414
+ "color": {
1415
+ "type": "string"
1416
+ },
1417
+ "url": {
1418
+ "type": "string"
1419
+ },
1420
+ "repeat": {
1421
+ "$ref": "#/definitions/TBackgroundRepeat"
1422
+ },
1423
+ "size": {
1424
+ "$ref": "#/definitions/IWidthHeight"
1425
+ }
1426
+ },
1427
+ "additionalProperties": false,
1428
+ "required": [
1429
+ "color",
1430
+ "url",
1431
+ "repeat",
1432
+ "size"
1433
+ ]
1434
+ },
1435
+ "TBackgroundRepeat": {
1436
+ "description": "Builder background-repeat types.",
1437
+ "enum": [
1438
+ "no-repeat",
1439
+ "repeat",
1440
+ "repeat-x",
1441
+ "repeat-y"
1442
+ ],
1443
+ "type": "string"
1444
+ },
1445
+ "IPadding": {
1446
+ "description": "Builder padding styles interface.",
1447
+ "type": "object",
1448
+ "properties": {
1449
+ "top": {
1450
+ "type": "number"
1451
+ },
1452
+ "right": {
1453
+ "type": "number"
1454
+ },
1455
+ "bottom": {
1456
+ "type": "number"
1457
+ },
1458
+ "left": {
1459
+ "type": "number"
1460
+ }
1461
+ },
1462
+ "additionalProperties": false,
1463
+ "required": [
1464
+ "top",
1465
+ "right",
1466
+ "bottom",
1467
+ "left"
1468
+ ]
1469
+ },
1470
+ "TDirection": {
1471
+ "description": "Builder direction types.",
1472
+ "enum": [
1473
+ "ltr",
1474
+ "rtl"
1475
+ ],
1476
+ "type": "string"
1477
+ },
1478
+ "IStructure": {
1479
+ "description": "Builder structure interface.",
1480
+ "type": "object",
1481
+ "properties": {
1482
+ "type": {
1483
+ "$ref": "#/definitions/TStructureTypes"
1484
+ },
1485
+ "id": {
1486
+ "type": "number"
1487
+ },
1488
+ "isModule": {
1489
+ "description": "If it's module, it can't be edited within email body.",
1490
+ "type": "boolean"
1491
+ },
1492
+ "options": {
1493
+ "$ref": "#/definitions/IStructureOptions"
1494
+ },
1495
+ "elements": {
1496
+ "type": "array",
1497
+ "items": {
1498
+ "type": "array",
1499
+ "items": {
1500
+ "oneOf": [
1501
+ {
1502
+ "$ref": "#/definitions/TextBlock"
1503
+ },
1504
+ {
1505
+ "$ref": "#/definitions/ImageBlock"
1506
+ },
1507
+ {
1508
+ "$ref": "#/definitions/VideoBlock"
1509
+ },
1510
+ {
1511
+ "$ref": "#/definitions/ButtonBlock"
1512
+ },
1513
+ {
1514
+ "$ref": "#/definitions/DividerBlock"
1515
+ },
1516
+ {
1517
+ "$ref": "#/definitions/SpacerBlock"
1518
+ },
1519
+ {
1520
+ "$ref": "#/definitions/SocialBlock"
1521
+ }
1522
+ ]
1523
+ }
1524
+ }
1525
+ },
1526
+ "columns": {
1527
+ "type": "number"
1528
+ }
1529
+ },
1530
+ "additionalProperties": false,
1531
+ "required": [
1532
+ "type",
1533
+ "id",
1534
+ "isModule",
1535
+ "options",
1536
+ "elements",
1537
+ "columns"
1538
+ ],
1539
+ "allOf": [
1540
+ {
1541
+ "oneOf": [
1542
+ {
1543
+ "properties": {
1544
+ "type": {
1545
+ "const": "cols_1"
1546
+ },
1547
+ "columns": {
1548
+ "const": 1
1549
+ },
1550
+ "elements": {
1551
+ "minItems": 1,
1552
+ "maxItems": 1
1553
+ },
1554
+ "options": {
1555
+ "properties": {
1556
+ "columns": {
1557
+ "minItems": 1,
1558
+ "maxItems": 1
1559
+ },
1560
+ "columnsWidth": {
1561
+ "minItems": 1,
1562
+ "maxItems": 1
1563
+ }
1564
+ }
1565
+ }
1566
+ }
1567
+ },
1568
+ {
1569
+ "properties": {
1570
+ "type": {
1571
+ "const": "cols_2"
1572
+ },
1573
+ "columns": {
1574
+ "const": 2
1575
+ },
1576
+ "elements": {
1577
+ "minItems": 2,
1578
+ "maxItems": 2
1579
+ },
1580
+ "options": {
1581
+ "properties": {
1582
+ "columns": {
1583
+ "minItems": 2,
1584
+ "maxItems": 2
1585
+ },
1586
+ "columnsWidth": {
1587
+ "minItems": 2,
1588
+ "maxItems": 2
1589
+ }
1590
+ }
1591
+ }
1592
+ }
1593
+ },
1594
+ {
1595
+ "properties": {
1596
+ "type": {
1597
+ "const": "cols_3"
1598
+ },
1599
+ "columns": {
1600
+ "const": 3
1601
+ },
1602
+ "elements": {
1603
+ "minItems": 3,
1604
+ "maxItems": 3
1605
+ },
1606
+ "options": {
1607
+ "properties": {
1608
+ "columns": {
1609
+ "minItems": 3,
1610
+ "maxItems": 3
1611
+ },
1612
+ "columnsWidth": {
1613
+ "minItems": 3,
1614
+ "maxItems": 3
1615
+ }
1616
+ }
1617
+ }
1618
+ }
1619
+ },
1620
+ {
1621
+ "properties": {
1622
+ "type": {
1623
+ "const": "cols_4"
1624
+ },
1625
+ "columns": {
1626
+ "const": 4
1627
+ },
1628
+ "elements": {
1629
+ "minItems": 4,
1630
+ "maxItems": 4
1631
+ },
1632
+ "options": {
1633
+ "properties": {
1634
+ "columns": {
1635
+ "minItems": 4,
1636
+ "maxItems": 4
1637
+ },
1638
+ "columnsWidth": {
1639
+ "minItems": 4,
1640
+ "maxItems": 4
1641
+ }
1642
+ }
1643
+ }
1644
+ }
1645
+ },
1646
+ {
1647
+ "properties": {
1648
+ "type": {
1649
+ "const": "cols_12"
1650
+ },
1651
+ "columns": {
1652
+ "const": 2
1653
+ },
1654
+ "elements": {
1655
+ "minItems": 2,
1656
+ "maxItems": 2
1657
+ },
1658
+ "options": {
1659
+ "properties": {
1660
+ "columns": {
1661
+ "minItems": 2,
1662
+ "maxItems": 2
1663
+ },
1664
+ "columnsWidth": {
1665
+ "minItems": 2,
1666
+ "maxItems": 2
1667
+ }
1668
+ }
1669
+ }
1670
+ }
1671
+ },
1672
+ {
1673
+ "properties": {
1674
+ "type": {
1675
+ "const": "cols_21"
1676
+ },
1677
+ "columns": {
1678
+ "const": 2
1679
+ },
1680
+ "elements": {
1681
+ "minItems": 2,
1682
+ "maxItems": 2
1683
+ },
1684
+ "options": {
1685
+ "properties": {
1686
+ "columns": {
1687
+ "minItems": 2,
1688
+ "maxItems": 2
1689
+ },
1690
+ "columnsWidth": {
1691
+ "minItems": 2,
1692
+ "maxItems": 2
1693
+ }
1694
+ }
1695
+ }
1696
+ }
1697
+ }
1698
+ ]
1699
+ }
1700
+ ]
1701
+ },
1702
+ "TStructureTypes": {
1703
+ "description": "Builder structure types.",
1704
+ "enum": [
1705
+ "cols_1",
1706
+ "cols_12",
1707
+ "cols_2",
1708
+ "cols_21",
1709
+ "cols_3",
1710
+ "cols_4"
1711
+ ],
1712
+ "type": "string"
1713
+ },
1714
+ "IStructureOptions": {
1715
+ "description": "Builder structure styles interface.",
1716
+ "type": "object",
1717
+ "properties": {
1718
+ "border": {
1719
+ "$ref": "#/definitions/IBorder"
1720
+ },
1721
+ "background": {
1722
+ "$ref": "#/definitions/IBackground"
1723
+ },
1724
+ "padding": {
1725
+ "$ref": "#/definitions/IPadding"
1726
+ },
1727
+ "margin": {
1728
+ "$ref": "#/definitions/IMargin"
1729
+ },
1730
+ "disableResponsive": {
1731
+ "description": "Disable responsive for entire structure",
1732
+ "type": "boolean"
1733
+ },
1734
+ "fullWidth": {
1735
+ "description": "Mame section full width",
1736
+ "type": "boolean"
1737
+ },
1738
+ "gaps": {
1739
+ "description": "Mind the GAPS! Gaps between structure's columns.",
1740
+ "type": "array",
1741
+ "items": [
1742
+ {
1743
+ "type": "number"
1744
+ },
1745
+ {
1746
+ "type": "number"
1747
+ }
1748
+ ],
1749
+ "minItems": 2,
1750
+ "maxItems": 2
1751
+ },
1752
+ "columnsWidth": {
1753
+ "type": "array",
1754
+ "items": {
1755
+ "type": "number",
1756
+ "exclusiveMinimum": 0
1757
+ }
1758
+ },
1759
+ "columns": {
1760
+ "type": "array",
1761
+ "items": {
1762
+ "$ref": "#/definitions/IStructureColumnOptions"
1763
+ }
1764
+ }
1765
+ },
1766
+ "additionalProperties": false,
1767
+ "required": [
1768
+ "border",
1769
+ "background",
1770
+ "padding",
1771
+ "margin",
1772
+ "disableResponsive",
1773
+ "fullWidth",
1774
+ "gaps",
1775
+ "columnsWidth",
1776
+ "columns"
1777
+ ]
1778
+ },
1779
+ "IBorder": {
1780
+ "description": "Builder border styles interface.",
1781
+ "type": "object",
1782
+ "properties": {
1783
+ "color": {
1784
+ "type": "string"
1785
+ },
1786
+ "style": {
1787
+ "description": "Border style.",
1788
+ "enum": [
1789
+ "dashed",
1790
+ "dotted",
1791
+ "double",
1792
+ "groove",
1793
+ "solid"
1794
+ ],
1795
+ "type": "string"
1796
+ },
1797
+ "width": {
1798
+ "description": "Border width",
1799
+ "type": "number"
1800
+ },
1801
+ "radius": {
1802
+ "description": "Border radius",
1803
+ "type": "number"
1804
+ }
1805
+ },
1806
+ "additionalProperties": false,
1807
+ "required": [
1808
+ "color",
1809
+ "style",
1810
+ "width",
1811
+ "radius"
1812
+ ]
1813
+ },
1814
+ "IMargin": {
1815
+ "description": "Builder margin styles interface.",
1816
+ "type": "object",
1817
+ "properties": {
1818
+ "top": {
1819
+ "type": "number"
1820
+ },
1821
+ "bottom": {
1822
+ "type": "number"
1823
+ }
1824
+ },
1825
+ "additionalProperties": false,
1826
+ "required": [
1827
+ "top",
1828
+ "bottom"
1829
+ ]
1830
+ },
1831
+ "IStructureColumnOptions": {
1832
+ "description": "Builder structure columns' styles interface.",
1833
+ "type": "object",
1834
+ "properties": {
1835
+ "background": {
1836
+ "$ref": "#/definitions/IBackground"
1837
+ },
1838
+ "border": {
1839
+ "$ref": "#/definitions/IBorder"
1840
+ },
1841
+ "verticalAlign": {
1842
+ "$ref": "#/definitions/TVerticalAlign"
1843
+ }
1844
+ },
1845
+ "additionalProperties": false,
1846
+ "required": [
1847
+ "background",
1848
+ "border",
1849
+ "verticalAlign"
1850
+ ]
1851
+ },
1852
+ "TVerticalAlign": {
1853
+ "description": "Builder vertical align types.",
1854
+ "enum": [
1855
+ "bottom",
1856
+ "middle",
1857
+ "top"
1858
+ ],
1859
+ "type": "string"
1860
+ },
1861
+ "TextBlock": {
1862
+ "type": "object",
1863
+ "properties": {
1864
+ "type": {
1865
+ "type": "string",
1866
+ "enum": [
1867
+ "text"
1868
+ ]
1869
+ },
1870
+ "icon": {
1871
+ "type": "string",
1872
+ "enum": [
1873
+ "text_format"
1874
+ ]
1875
+ },
1876
+ "options": {
1877
+ "$ref": "#/definitions/ITextBlockOptions"
1878
+ },
1879
+ "title": {
1880
+ "type": "string"
1881
+ },
1882
+ "innerText": {
1883
+ "type": "string"
1884
+ },
1885
+ "state": {
1886
+ "$ref": "#/definitions/IBlockState"
1887
+ }
1888
+ },
1889
+ "additionalProperties": false,
1890
+ "required": [
1891
+ "type",
1892
+ "icon",
1893
+ "options",
1894
+ "title",
1895
+ "innerText",
1896
+ "state"
1897
+ ]
1898
+ },
1899
+ "ITextBlockOptions": {
1900
+ "description": "Builder{@linkTextElementComponent}options interface.",
1901
+ "type": "object",
1902
+ "properties": {
1903
+ "color": {
1904
+ "type": "string"
1905
+ },
1906
+ "font": {
1907
+ "$ref": "#/definitions/IFont"
1908
+ },
1909
+ "lineHeight": {
1910
+ "$ref": "#/definitions/ILineHeight"
1911
+ },
1912
+ "padding": {
1913
+ "$ref": "#/definitions/IPadding"
1914
+ }
1915
+ },
1916
+ "additionalProperties": false,
1917
+ "required": [
1918
+ "color",
1919
+ "font",
1920
+ "lineHeight",
1921
+ "padding"
1922
+ ]
1923
+ },
1924
+ "IFont": {
1925
+ "description": "Builder font styles interface.",
1926
+ "type": "object",
1927
+ "properties": {
1928
+ "family": {
1929
+ "type": "string"
1930
+ },
1931
+ "fallback": {
1932
+ "type": "string"
1933
+ },
1934
+ "size": {
1935
+ "type": "number"
1936
+ },
1937
+ "style": {
1938
+ "$ref": "#/definitions/TFontStyle"
1939
+ },
1940
+ "weight": {
1941
+ "description": "Builder font weight types.",
1942
+ "anyOf": [
1943
+ {
1944
+ "enum": [
1945
+ "bold",
1946
+ "bolder",
1947
+ "inherit",
1948
+ "initial",
1949
+ "light",
1950
+ "normal"
1951
+ ],
1952
+ "type": "string"
1953
+ },
1954
+ {
1955
+ "type": "number"
1956
+ }
1957
+ ]
1958
+ }
1959
+ },
1960
+ "additionalProperties": false,
1961
+ "required": [
1962
+ "family",
1963
+ "fallback",
1964
+ "size",
1965
+ "style",
1966
+ "weight"
1967
+ ]
1968
+ },
1969
+ "TFontStyle": {
1970
+ "description": "Builder font style types.",
1971
+ "enum": [
1972
+ "italic",
1973
+ "normal",
1974
+ "oblique"
1975
+ ],
1976
+ "type": "string"
1977
+ },
1978
+ "ILineHeight": {
1979
+ "description": "Builder line-height styles interface.",
1980
+ "type": "object",
1981
+ "properties": {
1982
+ "value": {
1983
+ "type": "number"
1984
+ },
1985
+ "unit": {
1986
+ "$ref": "#/definitions/TLineHeight"
1987
+ }
1988
+ },
1989
+ "additionalProperties": false,
1990
+ "required": [
1991
+ "value",
1992
+ "unit"
1993
+ ]
1994
+ },
1995
+ "TLineHeight": {
1996
+ "description": "Builder Line-height types.",
1997
+ "enum": [
1998
+ "%",
1999
+ "none",
2000
+ "px"
2001
+ ],
2002
+ "type": "string"
2003
+ },
2004
+ "IBlockState": {
2005
+ "description": "Builder block state interface. If `disabled: true` it can't be dragged from left sidebar.",
2006
+ "type": "object",
2007
+ "properties": {
2008
+ "disabled": {
2009
+ "type": "boolean"
2010
+ },
2011
+ "message": {
2012
+ "description": "Show a message in case it's disabled.",
2013
+ "type": "string"
2014
+ }
2015
+ },
2016
+ "additionalProperties": false,
2017
+ "required": [
2018
+ "disabled",
2019
+ "message"
2020
+ ]
2021
+ },
2022
+ "ImageBlock": {
2023
+ "type": "object",
2024
+ "properties": {
2025
+ "type": {
2026
+ "type": "string",
2027
+ "enum": [
2028
+ "image"
2029
+ ]
2030
+ },
2031
+ "icon": {
2032
+ "type": "string",
2033
+ "enum": [
2034
+ "image"
2035
+ ]
2036
+ },
2037
+ "options": {
2038
+ "$ref": "#/definitions/IImageBLockOptions"
2039
+ },
2040
+ "title": {
2041
+ "type": "string"
2042
+ },
2043
+ "src": {
2044
+ "type": "string"
2045
+ },
2046
+ "state": {
2047
+ "$ref": "#/definitions/IBlockState"
2048
+ }
2049
+ },
2050
+ "additionalProperties": false,
2051
+ "required": [
2052
+ "type",
2053
+ "icon",
2054
+ "options",
2055
+ "title",
2056
+ "src",
2057
+ "state"
2058
+ ]
2059
+ },
2060
+ "IImageBLockOptions": {
2061
+ "description": "Builder{@linkImageComponent}options interface.",
2062
+ "type": "object",
2063
+ "properties": {
2064
+ "border": {
2065
+ "$ref": "#/definitions/IBorder"
2066
+ },
2067
+ "width": {
2068
+ "$ref": "#/definitions/IWidthHeight"
2069
+ },
2070
+ "height": {
2071
+ "$ref": "#/definitions/IWidthHeight"
2072
+ },
2073
+ "link": {
2074
+ "$ref": "#/definitions/ILink"
2075
+ },
2076
+ "align": {
2077
+ "$ref": "#/definitions/TAlign"
2078
+ },
2079
+ "title": {
2080
+ "type": "string"
2081
+ },
2082
+ "padding": {
2083
+ "$ref": "#/definitions/IPadding"
2084
+ }
2085
+ },
2086
+ "additionalProperties": false,
2087
+ "required": [
2088
+ "border",
2089
+ "width",
2090
+ "height",
2091
+ "link",
2092
+ "align",
2093
+ "title",
2094
+ "padding"
2095
+ ]
2096
+ },
2097
+ "ILink": {
2098
+ "description": "Builder link styles interface.",
2099
+ "type": "object",
2100
+ "properties": {
2101
+ "href": {
2102
+ "type": "string"
2103
+ },
2104
+ "target": {
2105
+ "$ref": "#/definitions/TLinkTarget"
2106
+ }
2107
+ },
2108
+ "additionalProperties": false,
2109
+ "required": [
2110
+ "href",
2111
+ "target"
2112
+ ]
2113
+ },
2114
+ "TLinkTarget": {
2115
+ "description": "Builder Link target.",
2116
+ "enum": [
2117
+ "_blank",
2118
+ "_parent",
2119
+ "_self",
2120
+ "_top"
2121
+ ],
2122
+ "type": "string"
2123
+ },
2124
+ "TAlign": {
2125
+ "description": "Builder align types.",
2126
+ "enum": [
2127
+ "center",
2128
+ "left",
2129
+ "right"
2130
+ ],
2131
+ "type": "string"
2132
+ },
2133
+ "VideoBlock": {
2134
+ "type": "object",
2135
+ "properties": {
2136
+ "type": {
2137
+ "type": "string",
2138
+ "enum": [
2139
+ "video"
2140
+ ]
2141
+ },
2142
+ "icon": {
2143
+ "type": "string",
2144
+ "enum": [
2145
+ "videocam"
2146
+ ]
2147
+ },
2148
+ "options": {
2149
+ "$ref": "#/definitions/IVideoBlockOptions"
2150
+ },
2151
+ "title": {
2152
+ "type": "string"
2153
+ },
2154
+ "src": {
2155
+ "type": "string"
2156
+ },
2157
+ "posterSrc": {
2158
+ "type": "string"
2159
+ },
2160
+ "state": {
2161
+ "$ref": "#/definitions/IBlockState"
2162
+ }
2163
+ },
2164
+ "additionalProperties": false,
2165
+ "required": [
2166
+ "type",
2167
+ "icon",
2168
+ "options",
2169
+ "title",
2170
+ "src",
2171
+ "posterSrc",
2172
+ "state"
2173
+ ]
2174
+ },
2175
+ "IVideoBlockOptions": {
2176
+ "description": "Builder{@linkVideoComponent}options interface.",
2177
+ "type": "object",
2178
+ "properties": {
2179
+ "border": {
2180
+ "$ref": "#/definitions/IBorder"
2181
+ },
2182
+ "width": {
2183
+ "$ref": "#/definitions/IWidthHeight"
2184
+ },
2185
+ "height": {
2186
+ "$ref": "#/definitions/IWidthHeight"
2187
+ },
2188
+ "link": {
2189
+ "$ref": "#/definitions/ILink"
2190
+ },
2191
+ "align": {
2192
+ "$ref": "#/definitions/TAlign"
2193
+ },
2194
+ "title": {
2195
+ "type": "string"
2196
+ },
2197
+ "padding": {
2198
+ "$ref": "#/definitions/IPadding"
2199
+ }
2200
+ },
2201
+ "additionalProperties": false,
2202
+ "required": [
2203
+ "border",
2204
+ "width",
2205
+ "height",
2206
+ "link",
2207
+ "align",
2208
+ "title",
2209
+ "padding"
2210
+ ]
2211
+ },
2212
+ "ButtonBlock": {
2213
+ "type": "object",
2214
+ "properties": {
2215
+ "type": {
2216
+ "type": "string",
2217
+ "enum": [
2218
+ "button"
2219
+ ]
2220
+ },
2221
+ "icon": {
2222
+ "type": "string",
2223
+ "enum": [
2224
+ "radio_button_checked"
2225
+ ]
2226
+ },
2227
+ "options": {
2228
+ "$ref": "#/definitions/IButtonBlockOptions"
2229
+ },
2230
+ "title": {
2231
+ "type": "string"
2232
+ },
2233
+ "innerText": {
2234
+ "type": "string"
2235
+ },
2236
+ "state": {
2237
+ "$ref": "#/definitions/IBlockState"
2238
+ }
2239
+ },
2240
+ "additionalProperties": false,
2241
+ "required": [
2242
+ "type",
2243
+ "icon",
2244
+ "options",
2245
+ "title",
2246
+ "innerText",
2247
+ "state"
2248
+ ]
2249
+ },
2250
+ "IButtonBlockOptions": {
2251
+ "description": "Builder{@linkButtonComponent}options interface.",
2252
+ "type": "object",
2253
+ "properties": {
2254
+ "backgroundColor": {
2255
+ "type": "string"
2256
+ },
2257
+ "border": {
2258
+ "$ref": "#/definitions/IBorder"
2259
+ },
2260
+ "color": {
2261
+ "type": "string"
2262
+ },
2263
+ "font": {
2264
+ "$ref": "#/definitions/IFont"
2265
+ },
2266
+ "align": {
2267
+ "$ref": "#/definitions/TAlign"
2268
+ },
2269
+ "fullWidth": {
2270
+ "type": "boolean"
2271
+ },
2272
+ "lineHeight": {
2273
+ "$ref": "#/definitions/ILineHeight"
2274
+ },
2275
+ "link": {
2276
+ "$ref": "#/definitions/ILink"
2277
+ },
2278
+ "innerPadding": {
2279
+ "$ref": "#/definitions/IPadding"
2280
+ },
2281
+ "padding": {
2282
+ "$ref": "#/definitions/IPadding"
2283
+ }
2284
+ },
2285
+ "additionalProperties": false,
2286
+ "required": [
2287
+ "backgroundColor",
2288
+ "border",
2289
+ "color",
2290
+ "font",
2291
+ "align",
2292
+ "fullWidth",
2293
+ "lineHeight",
2294
+ "link",
2295
+ "innerPadding",
2296
+ "padding"
2297
+ ]
2298
+ },
2299
+ "DividerBlock": {
2300
+ "type": "object",
2301
+ "properties": {
2302
+ "type": {
2303
+ "type": "string",
2304
+ "enum": [
2305
+ "divider"
2306
+ ]
2307
+ },
2308
+ "icon": {
2309
+ "type": "string",
2310
+ "enum": [
2311
+ "remove"
2312
+ ]
2313
+ },
2314
+ "options": {
2315
+ "$ref": "#/definitions/IDividerBlockOptions"
2316
+ },
2317
+ "title": {
2318
+ "type": "string"
2319
+ },
2320
+ "state": {
2321
+ "$ref": "#/definitions/IBlockState"
2322
+ }
2323
+ },
2324
+ "additionalProperties": false,
2325
+ "required": [
2326
+ "type",
2327
+ "icon",
2328
+ "options",
2329
+ "title",
2330
+ "state"
2331
+ ]
2332
+ },
2333
+ "IDividerBlockOptions": {
2334
+ "description": "Builder{@linkDividerComponent}options interface.",
2335
+ "type": "object",
2336
+ "properties": {
2337
+ "border": {
2338
+ "$ref": "#/definitions/IBorder"
2339
+ },
2340
+ "padding": {
2341
+ "$ref": "#/definitions/IPadding"
2342
+ }
2343
+ },
2344
+ "additionalProperties": false,
2345
+ "required": [
2346
+ "border",
2347
+ "padding"
2348
+ ]
2349
+ },
2350
+ "SpacerBlock": {
2351
+ "type": "object",
2352
+ "properties": {
2353
+ "type": {
2354
+ "type": "string",
2355
+ "enum": [
2356
+ "spacer"
2357
+ ]
2358
+ },
2359
+ "icon": {
2360
+ "type": "string",
2361
+ "enum": [
2362
+ "vertical_align_center"
2363
+ ]
2364
+ },
2365
+ "title": {
2366
+ "type": "string"
2367
+ },
2368
+ "options": {
2369
+ "$ref": "#/definitions/ISpacerBlockOptions"
2370
+ },
2371
+ "state": {
2372
+ "$ref": "#/definitions/IBlockState"
2373
+ }
2374
+ },
2375
+ "additionalProperties": false,
2376
+ "required": [
2377
+ "type",
2378
+ "icon",
2379
+ "title",
2380
+ "options",
2381
+ "state"
2382
+ ]
2383
+ },
2384
+ "ISpacerBlockOptions": {
2385
+ "description": "Builder{@linkSpacerComponent}options interface.",
2386
+ "type": "object",
2387
+ "properties": {
2388
+ "height": {
2389
+ "$ref": "#/definitions/IWidthHeight"
2390
+ },
2391
+ "width": {
2392
+ "$ref": "#/definitions/IWidthHeight"
2393
+ }
2394
+ },
2395
+ "additionalProperties": false,
2396
+ "required": [
2397
+ "height",
2398
+ "width"
2399
+ ]
2400
+ },
2401
+ "SocialBlock": {
2402
+ "type": "object",
2403
+ "properties": {
2404
+ "type": {
2405
+ "type": "string",
2406
+ "enum": [
2407
+ "social"
2408
+ ]
2409
+ },
2410
+ "icon": {
2411
+ "type": "string",
2412
+ "enum": [
2413
+ "share"
2414
+ ]
2415
+ },
2416
+ "title": {
2417
+ "type": "string"
2418
+ },
2419
+ "options": {
2420
+ "$ref": "#/definitions/ISocialBlockOptions"
2421
+ },
2422
+ "networks": {
2423
+ "type": "array",
2424
+ "items": {
2425
+ "$ref": "#/definitions/ISocialNetwork"
2426
+ }
2427
+ },
2428
+ "state": {
2429
+ "$ref": "#/definitions/IBlockState"
2430
+ }
2431
+ },
2432
+ "additionalProperties": false,
2433
+ "required": [
2434
+ "type",
2435
+ "icon",
2436
+ "title",
2437
+ "options",
2438
+ "networks",
2439
+ "state"
2440
+ ]
2441
+ },
2442
+ "ISocialBlockOptions": {
2443
+ "description": "Builder{@linkSocialComponent}options interface.",
2444
+ "type": "object",
2445
+ "properties": {
2446
+ "align": {
2447
+ "$ref": "#/definitions/TAlign"
2448
+ },
2449
+ "mode": {
2450
+ "enum": [
2451
+ "horizontal",
2452
+ "vertical"
2453
+ ],
2454
+ "type": "string"
2455
+ },
2456
+ "font": {
2457
+ "$ref": "#/definitions/IFont"
2458
+ },
2459
+ "iconSize": {
2460
+ "$ref": "#/definitions/ILineHeight"
2461
+ },
2462
+ "lineHeight": {
2463
+ "$ref": "#/definitions/ILineHeight"
2464
+ },
2465
+ "color": {
2466
+ "type": "string"
2467
+ },
2468
+ "innerPadding": {
2469
+ "$ref": "#/definitions/IPadding"
2470
+ },
2471
+ "padding": {
2472
+ "$ref": "#/definitions/IPadding"
2473
+ }
2474
+ },
2475
+ "additionalProperties": false,
2476
+ "required": [
2477
+ "align",
2478
+ "mode",
2479
+ "font",
2480
+ "iconSize",
2481
+ "lineHeight",
2482
+ "color",
2483
+ "innerPadding",
2484
+ "padding"
2485
+ ]
2486
+ },
2487
+ "ISocialNetwork": {
2488
+ "description": "Builder{@linkSocialComponent}network options interface.",
2489
+ "type": "object",
2490
+ "properties": {
2491
+ "href": {
2492
+ "type": "string"
2493
+ },
2494
+ "label": {
2495
+ "type": "string"
2496
+ },
2497
+ "name": {
2498
+ "enum": [
2499
+ "dribbble",
2500
+ "facebook",
2501
+ "github",
2502
+ "instagram",
2503
+ "linkedin",
2504
+ "medium",
2505
+ "pinterest",
2506
+ "snapchat",
2507
+ "soundcloud",
2508
+ "tiktok",
2509
+ "tumblr",
2510
+ "twitter",
2511
+ "vimeo",
2512
+ "web",
2513
+ "xing",
2514
+ "youtube"
2515
+ ],
2516
+ "type": "string"
2517
+ },
2518
+ "padding": {
2519
+ "$ref": "#/definitions/IPadding"
2520
+ }
2521
+ },
2522
+ "additionalProperties": false,
2523
+ "required": [
2524
+ "href",
2525
+ "label",
2526
+ "name",
2527
+ "padding"
2528
+ ]
2529
+ },
2530
+ "ICustomFont": {
2531
+ "description": "Custom font interface",
2532
+ "type": "object",
2533
+ "properties": {
2534
+ "family": {
2535
+ "type": "string"
2536
+ },
2537
+ "url": {
2538
+ "type": "string"
2539
+ }
2540
+ },
2541
+ "additionalProperties": false,
2542
+ "required": [
2543
+ "family",
2544
+ "url"
2545
+ ]
2546
+ }
2547
+ },
2548
+ "$schema": "http://json-schema.org/draft-07/schema#",
2549
+ "title": "Pobuca Email Template",
2550
+ "required": [
2551
+ "general",
2552
+ "structures",
2553
+ "customFonts"
2554
+ ]
2555
+ };
2556
+
2557
+ /*
2558
+ * Copyright (c) 2024 Pobuca.
2559
+ * All rights reserved.
2560
+ */
2561
+ /**
2562
+ * Complete JSON Schema for AI-generated Pobuca email templates.
2563
+ *
2564
+ * Run `npm run generate:email-schema` after changing the email model. Library
2565
+ * builds run that command automatically.
2566
+ */
2567
+ var PB_EMAIL_TEMPLATE_SCHEMA = GENERATED_EMAIL_TEMPLATE_SCHEMA;
2568
+
1292
2569
  /*
1293
2570
  * Copyright (c) 2024 Pobuca.
1294
2571
  * All rights reserved.
@@ -2974,8 +4251,12 @@
2974
4251
  PbEmailBuilderComponent.prototype.saveEmail = function () {
2975
4252
  var _this = this;
2976
4253
  return this.emailObjectStore.currentEmailHasChanges$
2977
- .pipe(operators.exhaustMap(function (hasChanges) {
2978
- return rxjs.iif(function () { return hasChanges; }, _this.ngb.createHTMLTemplate$(), _this.userInterfaceService.notify('No changes were detected to be save!').afterDismissed());
4254
+ .pipe(operators.withLatestFrom(this.emailObjectStore.templateAsObservable$), operators.exhaustMap(function (_c) {
4255
+ var _d = __read(_c, 2), hasChanges = _d[0], currentHtml = _d[1];
4256
+ if (hasChanges || !currentHtml) {
4257
+ return _this.ngb.createHTMLTemplate$();
4258
+ }
4259
+ return _this.userInterfaceService.notify('No changes were detected to be saved!').afterDismissed();
2979
4260
  }), operators.take(1))
2980
4261
  .subscribe();
2981
4262
  };
@@ -5276,6 +6557,7 @@
5276
6557
  exports.PB_DEFAULT_GOOGLE_FONTS = PB_DEFAULT_GOOGLE_FONTS;
5277
6558
  exports.PB_DEFAULT_SOCIAL_NETWORKS = PB_DEFAULT_SOCIAL_NETWORKS;
5278
6559
  exports.PB_DEFAULT_STRUCTURES = PB_DEFAULT_STRUCTURES;
6560
+ exports.PB_EMAIL_TEMPLATE_SCHEMA = PB_EMAIL_TEMPLATE_SCHEMA;
5279
6561
  exports.PB_FALLBACK_FONTS = PB_FALLBACK_FONTS;
5280
6562
  exports.PB_GOOGLE_FONTS = PB_GOOGLE_FONTS;
5281
6563
  exports.PB_SOCIAL_NETWORKS = PB_SOCIAL_NETWORKS;