@elementor/editor-props 0.9.4 → 0.11.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/dist/index.d.ts CHANGED
@@ -441,6 +441,7 @@ declare const borderWidthPropTypeUtil: {
441
441
  };
442
442
  type BorderWidthPropValue = z.infer<typeof borderWidthPropTypeUtil.schema>;
443
443
 
444
+ declare const CLASSES_PROP_KEY = "classes";
444
445
  declare const classesPropTypeUtil: {
445
446
  extract: (prop: unknown) => string[] | null;
446
447
  isValid: (prop: unknown) => prop is TransformablePropValue$1<"classes", string[]>;
@@ -1299,15 +1300,15 @@ type BackgroundPropValue = z.infer<typeof backgroundPropTypeUtil.schema>;
1299
1300
 
1300
1301
  declare const backgroundOverlayItem: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
1301
1302
  $$type: z.ZodLiteral<"background-color-overlay">;
1302
- value: z.ZodType<string, z.ZodTypeDef, string>;
1303
+ value: z.ZodType<any, z.ZodTypeDef, any>;
1303
1304
  disabled: z.ZodOptional<z.ZodBoolean>;
1304
1305
  }, "strict", z.ZodTypeAny, {
1305
1306
  $$type: "background-color-overlay";
1306
- value: string;
1307
+ value?: any;
1307
1308
  disabled?: boolean | undefined;
1308
1309
  }, {
1309
1310
  $$type: "background-color-overlay";
1310
- value: string;
1311
+ value?: any;
1311
1312
  disabled?: boolean | undefined;
1312
1313
  }>, z.ZodObject<{
1313
1314
  $$type: z.ZodLiteral<"background-gradient-overlay">;
@@ -1337,7 +1338,7 @@ declare const backgroundOverlayItem: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
1337
1338
  declare const backgroundOverlayPropTypeUtil: {
1338
1339
  extract: (prop: unknown) => ({
1339
1340
  $$type: "background-color-overlay";
1340
- value: string;
1341
+ value?: any;
1341
1342
  disabled?: boolean | undefined;
1342
1343
  } | {
1343
1344
  $$type: "background-gradient-overlay";
@@ -1350,7 +1351,7 @@ declare const backgroundOverlayPropTypeUtil: {
1350
1351
  })[] | null;
1351
1352
  isValid: (prop: unknown) => prop is TransformablePropValue$1<"background-overlay", ({
1352
1353
  $$type: "background-color-overlay";
1353
- value: string;
1354
+ value?: any;
1354
1355
  disabled?: boolean | undefined;
1355
1356
  } | {
1356
1357
  $$type: "background-gradient-overlay";
@@ -1364,7 +1365,7 @@ declare const backgroundOverlayPropTypeUtil: {
1364
1365
  create: {
1365
1366
  (value: ({
1366
1367
  $$type: "background-color-overlay";
1367
- value: string;
1368
+ value?: any;
1368
1369
  disabled?: boolean | undefined;
1369
1370
  } | {
1370
1371
  $$type: "background-gradient-overlay";
@@ -1376,7 +1377,7 @@ declare const backgroundOverlayPropTypeUtil: {
1376
1377
  disabled?: boolean | undefined;
1377
1378
  })[]): TransformablePropValue$1<"background-overlay", ({
1378
1379
  $$type: "background-color-overlay";
1379
- value: string;
1380
+ value?: any;
1380
1381
  disabled?: boolean | undefined;
1381
1382
  } | {
1382
1383
  $$type: "background-gradient-overlay";
@@ -1389,7 +1390,7 @@ declare const backgroundOverlayPropTypeUtil: {
1389
1390
  })[]>;
1390
1391
  (value: ({
1391
1392
  $$type: "background-color-overlay";
1392
- value: string;
1393
+ value?: any;
1393
1394
  disabled?: boolean | undefined;
1394
1395
  } | {
1395
1396
  $$type: "background-gradient-overlay";
@@ -1401,7 +1402,7 @@ declare const backgroundOverlayPropTypeUtil: {
1401
1402
  disabled?: boolean | undefined;
1402
1403
  })[], createOptions?: CreateOptions): TransformablePropValue$1<"background-overlay", ({
1403
1404
  $$type: "background-color-overlay";
1404
- value: string;
1405
+ value?: any;
1405
1406
  disabled?: boolean | undefined;
1406
1407
  } | {
1407
1408
  $$type: "background-gradient-overlay";
@@ -1414,7 +1415,7 @@ declare const backgroundOverlayPropTypeUtil: {
1414
1415
  })[]>;
1415
1416
  (value: (prev?: ({
1416
1417
  $$type: "background-color-overlay";
1417
- value: string;
1418
+ value?: any;
1418
1419
  disabled?: boolean | undefined;
1419
1420
  } | {
1420
1421
  $$type: "background-gradient-overlay";
@@ -1426,7 +1427,7 @@ declare const backgroundOverlayPropTypeUtil: {
1426
1427
  disabled?: boolean | undefined;
1427
1428
  })[] | undefined) => ({
1428
1429
  $$type: "background-color-overlay";
1429
- value: string;
1430
+ value?: any;
1430
1431
  disabled?: boolean | undefined;
1431
1432
  } | {
1432
1433
  $$type: "background-gradient-overlay";
@@ -1438,7 +1439,7 @@ declare const backgroundOverlayPropTypeUtil: {
1438
1439
  disabled?: boolean | undefined;
1439
1440
  })[], createOptions: CreateOptions): TransformablePropValue$1<"background-overlay", ({
1440
1441
  $$type: "background-color-overlay";
1441
- value: string;
1442
+ value?: any;
1442
1443
  disabled?: boolean | undefined;
1443
1444
  } | {
1444
1445
  $$type: "background-gradient-overlay";
@@ -1454,7 +1455,7 @@ declare const backgroundOverlayPropTypeUtil: {
1454
1455
  $$type: z.ZodLiteral<"background-overlay">;
1455
1456
  value: z.ZodType<({
1456
1457
  $$type: "background-color-overlay";
1457
- value: string;
1458
+ value?: any;
1458
1459
  disabled?: boolean | undefined;
1459
1460
  } | {
1460
1461
  $$type: "background-gradient-overlay";
@@ -1466,7 +1467,7 @@ declare const backgroundOverlayPropTypeUtil: {
1466
1467
  disabled?: boolean | undefined;
1467
1468
  })[], z.ZodTypeDef, ({
1468
1469
  $$type: "background-color-overlay";
1469
- value: string;
1470
+ value?: any;
1470
1471
  disabled?: boolean | undefined;
1471
1472
  } | {
1472
1473
  $$type: "background-gradient-overlay";
@@ -1482,7 +1483,7 @@ declare const backgroundOverlayPropTypeUtil: {
1482
1483
  $$type: "background-overlay";
1483
1484
  value: ({
1484
1485
  $$type: "background-color-overlay";
1485
- value: string;
1486
+ value?: any;
1486
1487
  disabled?: boolean | undefined;
1487
1488
  } | {
1488
1489
  $$type: "background-gradient-overlay";
@@ -1498,7 +1499,7 @@ declare const backgroundOverlayPropTypeUtil: {
1498
1499
  $$type: "background-overlay";
1499
1500
  value: ({
1500
1501
  $$type: "background-color-overlay";
1501
- value: string;
1502
+ value?: any;
1502
1503
  disabled?: boolean | undefined;
1503
1504
  } | {
1504
1505
  $$type: "background-gradient-overlay";
@@ -1517,24 +1518,24 @@ type BackgroundOverlayPropValue = z.infer<typeof backgroundOverlayPropTypeUtil.s
1517
1518
  type BackgroundOverlayItemPropValue = z.infer<typeof backgroundOverlayItem>;
1518
1519
 
1519
1520
  declare const backgroundColorOverlayPropTypeUtil: {
1520
- extract: (prop: unknown) => string | null;
1521
- isValid: (prop: unknown) => prop is TransformablePropValue$1<"background-color-overlay", string>;
1521
+ extract: (prop: unknown) => any;
1522
+ isValid: (prop: unknown) => prop is TransformablePropValue$1<"background-color-overlay", any>;
1522
1523
  create: {
1523
- (value: string): TransformablePropValue$1<"background-color-overlay", string>;
1524
- (value: string, createOptions?: CreateOptions): TransformablePropValue$1<"background-color-overlay", string>;
1525
- (value: (prev?: string | undefined) => string, createOptions: CreateOptions): TransformablePropValue$1<"background-color-overlay", string>;
1524
+ (value: any): TransformablePropValue$1<"background-color-overlay", any>;
1525
+ (value: any, createOptions?: CreateOptions): TransformablePropValue$1<"background-color-overlay", any>;
1526
+ (value: (prev?: any) => any, createOptions: CreateOptions): TransformablePropValue$1<"background-color-overlay", any>;
1526
1527
  };
1527
1528
  schema: z.ZodObject<{
1528
1529
  $$type: z.ZodLiteral<"background-color-overlay">;
1529
- value: z.ZodType<string, z.ZodTypeDef, string>;
1530
+ value: z.ZodType<any, z.ZodTypeDef, any>;
1530
1531
  disabled: z.ZodOptional<z.ZodBoolean>;
1531
1532
  }, "strict", z.ZodTypeAny, {
1532
1533
  $$type: "background-color-overlay";
1533
- value: string;
1534
+ value?: any;
1534
1535
  disabled?: boolean | undefined;
1535
1536
  }, {
1536
1537
  $$type: "background-color-overlay";
1537
- value: string;
1538
+ value?: any;
1538
1539
  disabled?: boolean | undefined;
1539
1540
  }>;
1540
1541
  key: "background-color-overlay";
@@ -1566,6 +1567,31 @@ declare const backgroundImageOverlayPropTypeUtil: {
1566
1567
  };
1567
1568
  type BackgroundImageOverlayPropValue = z.infer<typeof backgroundImageOverlayPropTypeUtil.schema>;
1568
1569
 
1570
+ declare const backgroundGradientOverlayPropTypeUtil: {
1571
+ extract: (prop: unknown) => any;
1572
+ isValid: (prop: unknown) => prop is TransformablePropValue$1<"background-gradient-overlay", any>;
1573
+ create: {
1574
+ (value: any): TransformablePropValue$1<"background-gradient-overlay", any>;
1575
+ (value: any, createOptions?: CreateOptions): TransformablePropValue$1<"background-gradient-overlay", any>;
1576
+ (value: (prev?: any) => any, createOptions: CreateOptions): TransformablePropValue$1<"background-gradient-overlay", any>;
1577
+ };
1578
+ schema: z.ZodObject<{
1579
+ $$type: z.ZodLiteral<"background-gradient-overlay">;
1580
+ value: z.ZodType<any, z.ZodTypeDef, any>;
1581
+ disabled: z.ZodOptional<z.ZodBoolean>;
1582
+ }, "strict", z.ZodTypeAny, {
1583
+ $$type: "background-gradient-overlay";
1584
+ value?: any;
1585
+ disabled?: boolean | undefined;
1586
+ }, {
1587
+ $$type: "background-gradient-overlay";
1588
+ value?: any;
1589
+ disabled?: boolean | undefined;
1590
+ }>;
1591
+ key: "background-gradient-overlay";
1592
+ };
1593
+ type BackgroundGradientOverlayPropValue = z.infer<typeof backgroundGradientOverlayPropTypeUtil.schema>;
1594
+
1569
1595
  declare const backgroundImagePositionOffsetPropTypeUtil: {
1570
1596
  extract: (prop: unknown) => any;
1571
1597
  isValid: (prop: unknown) => prop is TransformablePropValue$1<"background-image-position-offset", any>;
@@ -1641,6 +1667,186 @@ declare const booleanPropTypeUtil: {
1641
1667
  };
1642
1668
  type BooleanPropValue = z.infer<typeof booleanPropTypeUtil.schema>;
1643
1669
 
1670
+ declare const colorStopPropTypeUtil: {
1671
+ extract: (prop: unknown) => {
1672
+ color?: any;
1673
+ offset?: any;
1674
+ } | null;
1675
+ isValid: (prop: unknown) => prop is TransformablePropValue$1<"color-stop", {
1676
+ color?: any;
1677
+ offset?: any;
1678
+ }>;
1679
+ create: {
1680
+ (value: {
1681
+ color?: any;
1682
+ offset?: any;
1683
+ }): TransformablePropValue$1<"color-stop", {
1684
+ color?: any;
1685
+ offset?: any;
1686
+ }>;
1687
+ (value: {
1688
+ color?: any;
1689
+ offset?: any;
1690
+ }, createOptions?: CreateOptions): TransformablePropValue$1<"color-stop", {
1691
+ color?: any;
1692
+ offset?: any;
1693
+ }>;
1694
+ (value: (prev?: {
1695
+ color?: any;
1696
+ offset?: any;
1697
+ } | undefined) => {
1698
+ color?: any;
1699
+ offset?: any;
1700
+ }, createOptions: CreateOptions): TransformablePropValue$1<"color-stop", {
1701
+ color?: any;
1702
+ offset?: any;
1703
+ }>;
1704
+ };
1705
+ schema: z.ZodObject<{
1706
+ $$type: z.ZodLiteral<"color-stop">;
1707
+ value: z.ZodType<{
1708
+ color?: any;
1709
+ offset?: any;
1710
+ }, z.ZodTypeDef, {
1711
+ color?: any;
1712
+ offset?: any;
1713
+ }>;
1714
+ disabled: z.ZodOptional<z.ZodBoolean>;
1715
+ }, "strict", z.ZodTypeAny, {
1716
+ $$type: "color-stop";
1717
+ value: {
1718
+ color?: any;
1719
+ offset?: any;
1720
+ };
1721
+ disabled?: boolean | undefined;
1722
+ }, {
1723
+ $$type: "color-stop";
1724
+ value: {
1725
+ color?: any;
1726
+ offset?: any;
1727
+ };
1728
+ disabled?: boolean | undefined;
1729
+ }>;
1730
+ key: "color-stop";
1731
+ };
1732
+ type ColorStopPropValue = z.infer<typeof colorStopPropTypeUtil.schema>;
1733
+
1734
+ declare const gradientColorStopPropTypeUtil: {
1735
+ extract: (prop: unknown) => {
1736
+ $$type: "color-stop";
1737
+ value: {
1738
+ color?: any;
1739
+ offset?: any;
1740
+ };
1741
+ disabled?: boolean | undefined;
1742
+ }[] | null;
1743
+ isValid: (prop: unknown) => prop is TransformablePropValue$1<"gradient-color-stop", {
1744
+ $$type: "color-stop";
1745
+ value: {
1746
+ color?: any;
1747
+ offset?: any;
1748
+ };
1749
+ disabled?: boolean | undefined;
1750
+ }[]>;
1751
+ create: {
1752
+ (value: {
1753
+ $$type: "color-stop";
1754
+ value: {
1755
+ color?: any;
1756
+ offset?: any;
1757
+ };
1758
+ disabled?: boolean | undefined;
1759
+ }[]): TransformablePropValue$1<"gradient-color-stop", {
1760
+ $$type: "color-stop";
1761
+ value: {
1762
+ color?: any;
1763
+ offset?: any;
1764
+ };
1765
+ disabled?: boolean | undefined;
1766
+ }[]>;
1767
+ (value: {
1768
+ $$type: "color-stop";
1769
+ value: {
1770
+ color?: any;
1771
+ offset?: any;
1772
+ };
1773
+ disabled?: boolean | undefined;
1774
+ }[], createOptions?: CreateOptions): TransformablePropValue$1<"gradient-color-stop", {
1775
+ $$type: "color-stop";
1776
+ value: {
1777
+ color?: any;
1778
+ offset?: any;
1779
+ };
1780
+ disabled?: boolean | undefined;
1781
+ }[]>;
1782
+ (value: (prev?: {
1783
+ $$type: "color-stop";
1784
+ value: {
1785
+ color?: any;
1786
+ offset?: any;
1787
+ };
1788
+ disabled?: boolean | undefined;
1789
+ }[] | undefined) => {
1790
+ $$type: "color-stop";
1791
+ value: {
1792
+ color?: any;
1793
+ offset?: any;
1794
+ };
1795
+ disabled?: boolean | undefined;
1796
+ }[], createOptions: CreateOptions): TransformablePropValue$1<"gradient-color-stop", {
1797
+ $$type: "color-stop";
1798
+ value: {
1799
+ color?: any;
1800
+ offset?: any;
1801
+ };
1802
+ disabled?: boolean | undefined;
1803
+ }[]>;
1804
+ };
1805
+ schema: z.ZodObject<{
1806
+ $$type: z.ZodLiteral<"gradient-color-stop">;
1807
+ value: z.ZodType<{
1808
+ $$type: "color-stop";
1809
+ value: {
1810
+ color?: any;
1811
+ offset?: any;
1812
+ };
1813
+ disabled?: boolean | undefined;
1814
+ }[], z.ZodTypeDef, {
1815
+ $$type: "color-stop";
1816
+ value: {
1817
+ color?: any;
1818
+ offset?: any;
1819
+ };
1820
+ disabled?: boolean | undefined;
1821
+ }[]>;
1822
+ disabled: z.ZodOptional<z.ZodBoolean>;
1823
+ }, "strict", z.ZodTypeAny, {
1824
+ $$type: "gradient-color-stop";
1825
+ value: {
1826
+ $$type: "color-stop";
1827
+ value: {
1828
+ color?: any;
1829
+ offset?: any;
1830
+ };
1831
+ disabled?: boolean | undefined;
1832
+ }[];
1833
+ disabled?: boolean | undefined;
1834
+ }, {
1835
+ $$type: "gradient-color-stop";
1836
+ value: {
1837
+ $$type: "color-stop";
1838
+ value: {
1839
+ color?: any;
1840
+ offset?: any;
1841
+ };
1842
+ disabled?: boolean | undefined;
1843
+ }[];
1844
+ disabled?: boolean | undefined;
1845
+ }>;
1846
+ key: "gradient-color-stop";
1847
+ };
1848
+ type GradientColorStopPropValue = z.infer<typeof gradientColorStopPropTypeUtil.schema>;
1849
+
1644
1850
  declare function mergeProps(current: Props, updates: Props): Props;
1645
1851
 
1646
1852
  declare const transformableSchema: z.ZodObject<{
@@ -1659,4 +1865,4 @@ declare const transformableSchema: z.ZodObject<{
1659
1865
  type TransformablePropValue = z.infer<typeof transformableSchema>;
1660
1866
  declare const isTransformable: (value: unknown) => value is TransformablePropValue;
1661
1867
 
1662
- export { type AnyTransformable, type ArrayPropType, type ArrayPropValue, type BackgroundColorOverlayPropValue, type BackgroundImageOverlayPropValue, type BackgroundImagePositionOffsetPropValue, type BackgroundImageSizeScalePropValue, type BackgroundOverlayItemPropValue, type BackgroundOverlayPropValue, type BackgroundPropValue, type BooleanPropValue, type BorderRadiusPropValue, type BorderWidthPropValue, type BoxShadowPropValue, type ClassesPropValue, type ColorPropValue, type CreateOptions, type DimensionsPropValue, type ImageAttachmentIdPropValue, type ImagePropValue, type ImageSrcPropValue, type LayoutDirectionPropValue, type LinkPropValue, type NumberPropValue, type ObjectPropType, type ObjectPropValue, type PlainPropType, type PlainPropValue, type PropKey, type PropType, type PropTypeUtil, type PropValue, type Props, type PropsSchema, type ShadowPropValue, type SizePropValue, type StringPropValue, type StrokePropValue, type TransformablePropType, type TransformablePropValue$1 as TransformablePropValue, type UnionPropType, type UrlPropValue, backgroundColorOverlayPropTypeUtil, backgroundImageOverlayPropTypeUtil, backgroundImagePositionOffsetPropTypeUtil, backgroundImageSizeScalePropTypeUtil, backgroundOverlayPropTypeUtil, backgroundPropTypeUtil, booleanPropTypeUtil, borderRadiusPropTypeUtil, borderWidthPropTypeUtil, boxShadowPropTypeUtil, classesPropTypeUtil, colorPropTypeUtil, createPropUtils, dimensionsPropTypeUtil, imageAttachmentIdPropType, imagePropTypeUtil, imageSrcPropTypeUtil, isTransformable, layoutDirectionPropTypeUtil, linkPropTypeUtil, mergeProps, numberPropTypeUtil, shadowPropTypeUtil, sizePropTypeUtil, stringPropTypeUtil, strokePropTypeUtil, urlPropTypeUtil };
1868
+ export { type AnyTransformable, type ArrayPropType, type ArrayPropValue, type BackgroundColorOverlayPropValue, type BackgroundGradientOverlayPropValue, type BackgroundImageOverlayPropValue, type BackgroundImagePositionOffsetPropValue, type BackgroundImageSizeScalePropValue, type BackgroundOverlayItemPropValue, type BackgroundOverlayPropValue, type BackgroundPropValue, type BooleanPropValue, type BorderRadiusPropValue, type BorderWidthPropValue, type BoxShadowPropValue, CLASSES_PROP_KEY, type ClassesPropValue, type ColorPropValue, type ColorStopPropValue, type CreateOptions, type DimensionsPropValue, type GradientColorStopPropValue, type ImageAttachmentIdPropValue, type ImagePropValue, type ImageSrcPropValue, type LayoutDirectionPropValue, type LinkPropValue, type NumberPropValue, type ObjectPropType, type ObjectPropValue, type PlainPropType, type PlainPropValue, type PropKey, type PropType, type PropTypeUtil, type PropValue, type Props, type PropsSchema, type ShadowPropValue, type SizePropValue, type StringPropValue, type StrokePropValue, type TransformablePropType, type TransformablePropValue$1 as TransformablePropValue, type UnionPropType, type UrlPropValue, backgroundColorOverlayPropTypeUtil, backgroundGradientOverlayPropTypeUtil, backgroundImageOverlayPropTypeUtil, backgroundImagePositionOffsetPropTypeUtil, backgroundImageSizeScalePropTypeUtil, backgroundOverlayPropTypeUtil, backgroundPropTypeUtil, booleanPropTypeUtil, borderRadiusPropTypeUtil, borderWidthPropTypeUtil, boxShadowPropTypeUtil, classesPropTypeUtil, colorPropTypeUtil, colorStopPropTypeUtil, createPropUtils, dimensionsPropTypeUtil, gradientColorStopPropTypeUtil, imageAttachmentIdPropType, imagePropTypeUtil, imageSrcPropTypeUtil, isTransformable, layoutDirectionPropTypeUtil, linkPropTypeUtil, mergeProps, numberPropTypeUtil, shadowPropTypeUtil, sizePropTypeUtil, stringPropTypeUtil, strokePropTypeUtil, urlPropTypeUtil };
package/dist/index.js CHANGED
@@ -20,7 +20,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ CLASSES_PROP_KEY: () => CLASSES_PROP_KEY,
23
24
  backgroundColorOverlayPropTypeUtil: () => backgroundColorOverlayPropTypeUtil,
25
+ backgroundGradientOverlayPropTypeUtil: () => backgroundGradientOverlayPropTypeUtil,
24
26
  backgroundImageOverlayPropTypeUtil: () => backgroundImageOverlayPropTypeUtil,
25
27
  backgroundImagePositionOffsetPropTypeUtil: () => backgroundImagePositionOffsetPropTypeUtil,
26
28
  backgroundImageSizeScalePropTypeUtil: () => backgroundImageSizeScalePropTypeUtil,
@@ -32,8 +34,10 @@ __export(index_exports, {
32
34
  boxShadowPropTypeUtil: () => boxShadowPropTypeUtil,
33
35
  classesPropTypeUtil: () => classesPropTypeUtil,
34
36
  colorPropTypeUtil: () => colorPropTypeUtil,
37
+ colorStopPropTypeUtil: () => colorStopPropTypeUtil,
35
38
  createPropUtils: () => createPropUtils,
36
39
  dimensionsPropTypeUtil: () => dimensionsPropTypeUtil,
40
+ gradientColorStopPropTypeUtil: () => gradientColorStopPropTypeUtil,
37
41
  imageAttachmentIdPropType: () => imageAttachmentIdPropType,
38
42
  imagePropTypeUtil: () => imagePropTypeUtil,
39
43
  imageSrcPropTypeUtil: () => imageSrcPropTypeUtil,
@@ -147,7 +151,11 @@ var borderWidthPropTypeUtil = createPropUtils(
147
151
 
148
152
  // src/prop-types/classes.ts
149
153
  var import_schema7 = require("@elementor/schema");
150
- var classesPropTypeUtil = createPropUtils("classes", import_schema7.z.array(import_schema7.z.string().regex(/^[a-z][a-z-_0-9]*$/i)));
154
+ var CLASSES_PROP_KEY = "classes";
155
+ var classesPropTypeUtil = createPropUtils(
156
+ CLASSES_PROP_KEY,
157
+ import_schema7.z.array(import_schema7.z.string().regex(/^[a-z][a-z-_0-9]*$/i))
158
+ );
151
159
 
152
160
  // src/prop-types/color.ts
153
161
  var import_schema8 = require("@elementor/schema");
@@ -258,11 +266,10 @@ var backgroundPropTypeUtil = createPropUtils(
258
266
  );
259
267
 
260
268
  // src/prop-types/background-prop-types/background-overlay.ts
261
- var import_schema22 = require("@elementor/schema");
269
+ var import_schema21 = require("@elementor/schema");
262
270
 
263
271
  // src/prop-types/background-prop-types/background-color-overlay.ts
264
- var import_schema21 = require("@elementor/schema");
265
- var backgroundColorOverlayPropTypeUtil = createPropUtils("background-color-overlay", import_schema21.z.string());
272
+ var backgroundColorOverlayPropTypeUtil = createPropUtils("background-color-overlay", unknownChildrenSchema);
266
273
 
267
274
  // src/prop-types/background-prop-types/background-gradient-overlay.ts
268
275
  var backgroundGradientOverlayPropTypeUtil = createPropUtils(
@@ -275,7 +282,7 @@ var backgroundImageOverlayPropTypeUtil = createPropUtils("background-image-overl
275
282
 
276
283
  // src/prop-types/background-prop-types/background-overlay.ts
277
284
  var backgroundOverlayItem = backgroundColorOverlayPropTypeUtil.schema.or(backgroundGradientOverlayPropTypeUtil.schema).or(backgroundImageOverlayPropTypeUtil.schema);
278
- var backgroundOverlayPropTypeUtil = createPropUtils("background-overlay", import_schema22.z.array(backgroundOverlayItem));
285
+ var backgroundOverlayPropTypeUtil = createPropUtils("background-overlay", import_schema21.z.array(backgroundOverlayItem));
279
286
 
280
287
  // src/prop-types/background-prop-types/background-image-position-offset.ts
281
288
  var backgroundImagePositionOffsetPropTypeUtil = createPropUtils(
@@ -290,8 +297,25 @@ var backgroundImageSizeScalePropTypeUtil = createPropUtils(
290
297
  );
291
298
 
292
299
  // src/prop-types/boolean.ts
300
+ var import_schema22 = require("@elementor/schema");
301
+ var booleanPropTypeUtil = createPropUtils("boolean", import_schema22.z.boolean().nullable());
302
+
303
+ // src/prop-types/color-stop.ts
293
304
  var import_schema23 = require("@elementor/schema");
294
- var booleanPropTypeUtil = createPropUtils("boolean", import_schema23.z.boolean().nullable());
305
+ var colorStopPropTypeUtil = createPropUtils(
306
+ "color-stop",
307
+ import_schema23.z.strictObject({
308
+ color: unknownChildrenSchema,
309
+ offset: unknownChildrenSchema
310
+ })
311
+ );
312
+
313
+ // src/prop-types/gradient-color-stop.ts
314
+ var import_schema24 = require("@elementor/schema");
315
+ var gradientColorStopPropTypeUtil = createPropUtils(
316
+ "gradient-color-stop",
317
+ import_schema24.z.array(colorStopPropTypeUtil.schema)
318
+ );
295
319
 
296
320
  // src/utils/merge-props.ts
297
321
  function mergeProps(current, updates) {
@@ -307,18 +331,20 @@ function mergeProps(current, updates) {
307
331
  }
308
332
 
309
333
  // src/utils/is-transformable.ts
310
- var import_schema24 = require("@elementor/schema");
311
- var transformableSchema = import_schema24.z.object({
312
- $$type: import_schema24.z.string(),
313
- value: import_schema24.z.any(),
314
- disabled: import_schema24.z.boolean().optional()
334
+ var import_schema25 = require("@elementor/schema");
335
+ var transformableSchema = import_schema25.z.object({
336
+ $$type: import_schema25.z.string(),
337
+ value: import_schema25.z.any(),
338
+ disabled: import_schema25.z.boolean().optional()
315
339
  });
316
340
  var isTransformable = (value) => {
317
341
  return transformableSchema.safeParse(value).success;
318
342
  };
319
343
  // Annotate the CommonJS export names for ESM import in node:
320
344
  0 && (module.exports = {
345
+ CLASSES_PROP_KEY,
321
346
  backgroundColorOverlayPropTypeUtil,
347
+ backgroundGradientOverlayPropTypeUtil,
322
348
  backgroundImageOverlayPropTypeUtil,
323
349
  backgroundImagePositionOffsetPropTypeUtil,
324
350
  backgroundImageSizeScalePropTypeUtil,
@@ -330,8 +356,10 @@ var isTransformable = (value) => {
330
356
  boxShadowPropTypeUtil,
331
357
  classesPropTypeUtil,
332
358
  colorPropTypeUtil,
359
+ colorStopPropTypeUtil,
333
360
  createPropUtils,
334
361
  dimensionsPropTypeUtil,
362
+ gradientColorStopPropTypeUtil,
335
363
  imageAttachmentIdPropType,
336
364
  imagePropTypeUtil,
337
365
  imageSrcPropTypeUtil,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/prop-types/box-shadow.ts","../src/utils/create-prop-utils.ts","../src/prop-types/shadow.ts","../src/prop-types/utils.ts","../src/prop-types/border-radius.ts","../src/prop-types/border-width.ts","../src/prop-types/classes.ts","../src/prop-types/color.ts","../src/prop-types/image.ts","../src/prop-types/image-attachment-id.ts","../src/prop-types/image-src.ts","../src/prop-types/dimensions.ts","../src/prop-types/number.ts","../src/prop-types/size.ts","../src/prop-types/string.ts","../src/prop-types/stroke.ts","../src/prop-types/url.ts","../src/prop-types/layout-direction.ts","../src/prop-types/link.ts","../src/prop-types/background-prop-types/background.ts","../src/prop-types/background-prop-types/background-overlay.ts","../src/prop-types/background-prop-types/background-color-overlay.ts","../src/prop-types/background-prop-types/background-gradient-overlay.ts","../src/prop-types/background-prop-types/background-image-overlay.ts","../src/prop-types/background-prop-types/background-image-position-offset.ts","../src/prop-types/background-prop-types/background-image-size-scale.ts","../src/prop-types/boolean.ts","../src/utils/merge-props.ts","../src/utils/is-transformable.ts"],"sourcesContent":["// types\nexport * from './types';\nexport { type PropTypeUtil, type CreateOptions } from './utils/create-prop-utils';\n\n// prop types\nexport * from './prop-types';\n\n// utils\nexport { mergeProps } from './utils/merge-props';\nexport { createPropUtils } from './utils/create-prop-utils';\nexport { isTransformable } from './utils/is-transformable';\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { shadowPropTypeUtil } from './shadow';\n\nexport const boxShadowPropTypeUtil = createPropUtils( 'box-shadow', z.array( shadowPropTypeUtil.schema ) );\n\nexport type BoxShadowPropValue = z.infer< typeof boxShadowPropTypeUtil.schema >;\n","import { z, type ZodType } from '@elementor/schema';\n\nimport { type PropValue, type TransformablePropValue } from '../types';\n\ntype Updater< T > = ( prev?: T ) => T;\n\nexport type CreateOptions = {\n\tbase?: unknown;\n\tdisabled?: boolean;\n};\n\nexport type PropTypeUtil< TKey extends string, TValue extends PropValue > = ReturnType<\n\ttypeof createPropUtils< TKey, TValue >\n>;\n\n/**\n * Usage example:\n *\n * ```ts\n * const elementsPropUtils = createPropUtils( 'elements', z.array( z.string() ) );\n *\n * elementsPropUtils.isValid( element.props?.children );\n * elementsPropUtils.create( [ 'a', 'b' ] );\n * elementsPropUtils.create( ( prev = [] ) => [ ...prev, 'c' ], { base: element.props?.children } );\n * elementsPropUtils.create( ( prev = [] ) => [ ...prev, 'c' ], { disabled: true } );\n * elementsPropUtils.extract( element.props?.children );\n *\n * ```\n */\n\nexport function createPropUtils< TKey extends string, TValue extends PropValue >(\n\tkey: TKey,\n\tvalueSchema: ZodType< TValue >\n) {\n\tconst schema = z.strictObject( {\n\t\t$$type: z.literal( key ),\n\t\tvalue: valueSchema,\n\t\tdisabled: z.boolean().optional(),\n\t} );\n\n\ttype Prop = TransformablePropValue< TKey, TValue >;\n\n\tfunction isValid( prop: unknown ): prop is Prop {\n\t\treturn schema.safeParse( prop ).success;\n\t}\n\n\tfunction create( value: TValue ): Prop;\n\tfunction create( value: TValue, createOptions?: CreateOptions ): Prop;\n\tfunction create( value: Updater< TValue >, createOptions: CreateOptions ): Prop;\n\tfunction create( value: TValue | Updater< TValue >, createOptions?: CreateOptions ): Prop {\n\t\tconst fn = ( typeof value === 'function' ? value : () => value ) as Updater< TValue >;\n\n\t\tconst { base, disabled } = createOptions || {};\n\n\t\tif ( ! base ) {\n\t\t\treturn {\n\t\t\t\t$$type: key,\n\t\t\t\tvalue: fn(),\n\t\t\t\t...( disabled && { disabled } ),\n\t\t\t};\n\t\t}\n\n\t\tif ( ! isValid( base ) ) {\n\t\t\tthrow new Error( `Cannot create prop based on invalid value: ${ JSON.stringify( base ) }` );\n\t\t}\n\n\t\treturn {\n\t\t\t$$type: key,\n\t\t\tvalue: fn( base.value ),\n\t\t\t...( disabled && { disabled } ),\n\t\t};\n\t}\n\n\tfunction extract( prop: unknown ): TValue | null {\n\t\tif ( ! isValid( prop ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn prop.value;\n\t}\n\n\treturn {\n\t\textract,\n\t\tisValid,\n\t\tcreate,\n\t\tschema,\n\t\tkey: key as TKey,\n\t};\n}\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const shadowPropTypeUtil = createPropUtils(\n\t'shadow',\n\tz.strictObject( {\n\t\tposition: unknownChildrenSchema,\n\t\thOffset: unknownChildrenSchema,\n\t\tvOffset: unknownChildrenSchema,\n\t\tblur: unknownChildrenSchema,\n\t\tspread: unknownChildrenSchema,\n\t\tcolor: unknownChildrenSchema,\n\t} )\n);\n\nexport type ShadowPropValue = z.infer< typeof shadowPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nexport const unknownChildrenSchema = z.any().nullable();\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const borderRadiusPropTypeUtil = createPropUtils(\n\t'border-radius',\n\tz.strictObject( {\n\t\t'start-start': unknownChildrenSchema,\n\t\t'start-end': unknownChildrenSchema,\n\t\t'end-start': unknownChildrenSchema,\n\t\t'end-end': unknownChildrenSchema,\n\t} )\n);\n\nexport type BorderRadiusPropValue = z.infer< typeof borderRadiusPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const borderWidthPropTypeUtil = createPropUtils(\n\t'border-width',\n\tz.strictObject( {\n\t\t'block-start': unknownChildrenSchema,\n\t\t'block-end': unknownChildrenSchema,\n\t\t'inline-start': unknownChildrenSchema,\n\t\t'inline-end': unknownChildrenSchema,\n\t} )\n);\n\nexport type BorderWidthPropValue = z.infer< typeof borderWidthPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const classesPropTypeUtil = createPropUtils( 'classes', z.array( z.string().regex( /^[a-z][a-z-_0-9]*$/i ) ) );\n\nexport type ClassesPropValue = z.infer< typeof classesPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const colorPropTypeUtil = createPropUtils( 'color', z.string() );\n\nexport type ColorPropValue = z.infer< typeof colorPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const imagePropTypeUtil = createPropUtils(\n\t'image',\n\tz.strictObject( {\n\t\tsrc: unknownChildrenSchema,\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n\nexport type ImagePropValue = z.infer< typeof imagePropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const imageAttachmentIdPropType = createPropUtils( 'image-attachment-id', z.number() );\n\nexport type ImageAttachmentIdPropValue = z.infer< typeof imageAttachmentIdPropType.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const imageSrcPropTypeUtil = createPropUtils(\n\t'image-src',\n\tz\n\t\t.strictObject( {\n\t\t\tid: unknownChildrenSchema,\n\t\t\turl: z.null(),\n\t\t} )\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tid: z.null(),\n\t\t\t\turl: unknownChildrenSchema,\n\t\t\t} )\n\t\t)\n);\n\nexport type ImageSrcPropValue = z.infer< typeof imageSrcPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const dimensionsPropTypeUtil = createPropUtils(\n\t'dimensions',\n\tz.strictObject( {\n\t\t'block-start': unknownChildrenSchema,\n\t\t'block-end': unknownChildrenSchema,\n\t\t'inline-start': unknownChildrenSchema,\n\t\t'inline-end': unknownChildrenSchema,\n\t} )\n);\n\nexport type DimensionsPropValue = z.infer< typeof dimensionsPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const numberPropTypeUtil = createPropUtils( 'number', z.number().nullable() );\n\nexport type NumberPropValue = z.infer< typeof numberPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const sizePropTypeUtil = createPropUtils(\n\t'size',\n\tz.strictObject( {\n\t\tunit: z.enum( [ 'px', 'em', 'rem', '%', 'vw', 'vh' ] ),\n\t\tsize: z.number(),\n\t} )\n);\n\nexport type SizePropValue = z.infer< typeof sizePropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const stringPropTypeUtil = createPropUtils( 'string', z.string().nullable() );\n\nexport type StringPropValue = z.infer< typeof stringPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const strokePropTypeUtil = createPropUtils(\n\t'stroke',\n\tz.strictObject( {\n\t\tcolor: unknownChildrenSchema,\n\t\twidth: unknownChildrenSchema,\n\t} )\n);\n\nexport type StrokePropValue = z.infer< typeof strokePropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const urlPropTypeUtil = createPropUtils( 'url', z.string().nullable() );\n\nexport type UrlPropValue = z.infer< typeof urlPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const layoutDirectionPropTypeUtil = createPropUtils(\n\t'layout-direction',\n\tz.object( {\n\t\trow: z.any(),\n\t\tcolumn: z.any(),\n\t} )\n);\n\nexport type LayoutDirectionPropValue = z.infer< typeof layoutDirectionPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const linkPropTypeUtil = createPropUtils(\n\t'link',\n\tz.strictObject( {\n\t\tdestination: unknownChildrenSchema,\n\t\tlabel: unknownChildrenSchema,\n\t\tisTargetBlank: unknownChildrenSchema,\n\t} )\n);\n\nexport type LinkPropValue = z.infer< typeof linkPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const backgroundPropTypeUtil = createPropUtils(\n\t'background',\n\tz.strictObject( {\n\t\tcolor: unknownChildrenSchema,\n\t\t'background-overlay': unknownChildrenSchema,\n\t} )\n);\n\nexport type BackgroundPropValue = z.infer< typeof backgroundPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { backgroundColorOverlayPropTypeUtil } from './background-color-overlay';\nimport { backgroundGradientOverlayPropTypeUtil } from './background-gradient-overlay';\nimport { backgroundImageOverlayPropTypeUtil } from './background-image-overlay';\n\nconst backgroundOverlayItem = backgroundColorOverlayPropTypeUtil.schema\n\t.or( backgroundGradientOverlayPropTypeUtil.schema )\n\t.or( backgroundImageOverlayPropTypeUtil.schema );\n\nexport const backgroundOverlayPropTypeUtil = createPropUtils( 'background-overlay', z.array( backgroundOverlayItem ) );\n\nexport type BackgroundOverlayPropValue = z.infer< typeof backgroundOverlayPropTypeUtil.schema >;\nexport type BackgroundOverlayItemPropValue = z.infer< typeof backgroundOverlayItem >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\n\nexport const backgroundColorOverlayPropTypeUtil = createPropUtils( 'background-color-overlay', z.string() );\n\nexport type BackgroundColorOverlayPropValue = z.infer< typeof backgroundColorOverlayPropTypeUtil.schema >;\n","import { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const backgroundGradientOverlayPropTypeUtil = createPropUtils(\n\t'background-gradient-overlay',\n\tunknownChildrenSchema\n);\n","import { type z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const backgroundImageOverlayPropTypeUtil = createPropUtils( 'background-image-overlay', unknownChildrenSchema );\n\nexport type BackgroundImageOverlayPropValue = z.infer< typeof backgroundImageOverlayPropTypeUtil.schema >;\n","import { type z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const backgroundImagePositionOffsetPropTypeUtil = createPropUtils(\n\t'background-image-position-offset',\n\tunknownChildrenSchema\n);\n\nexport type BackgroundImagePositionOffsetPropValue = z.infer< typeof backgroundImagePositionOffsetPropTypeUtil.schema >;\n","import { type z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const backgroundImageSizeScalePropTypeUtil = createPropUtils(\n\t'background-image-size-scale',\n\tunknownChildrenSchema\n);\n\nexport type BackgroundImageSizeScalePropValue = z.infer< typeof backgroundImageSizeScalePropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const booleanPropTypeUtil = createPropUtils( 'boolean', z.boolean().nullable() );\n\nexport type BooleanPropValue = z.infer< typeof booleanPropTypeUtil.schema >;\n","import type { Props } from '../types';\n\nexport function mergeProps( current: Props, updates: Props ) {\n\tconst props = structuredClone( current );\n\n\tObject.entries( updates ).forEach( ( [ key, value ] ) => {\n\t\tif ( value === null || value === undefined ) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n\t\t\tdelete props[ key ];\n\t\t} else {\n\t\t\tprops[ key ] = value;\n\t\t}\n\t} );\n\n\treturn props;\n}\n","import { z } from '@elementor/schema';\n\nconst transformableSchema = z.object( {\n\t$$type: z.string(),\n\tvalue: z.any(),\n\tdisabled: z.boolean().optional(),\n} );\n\ntype TransformablePropValue = z.infer< typeof transformableSchema >;\n\nexport const isTransformable = ( value: unknown ): value is TransformablePropValue => {\n\treturn transformableSchema.safeParse( value ).success;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,iBAAkB;;;ACAlB,oBAAgC;AA8BzB,SAAS,gBACf,KACA,aACC;AACD,QAAM,SAAS,gBAAE,aAAc;AAAA,IAC9B,QAAQ,gBAAE,QAAS,GAAI;AAAA,IACvB,OAAO;AAAA,IACP,UAAU,gBAAE,QAAQ,EAAE,SAAS;AAAA,EAChC,CAAE;AAIF,WAAS,QAAS,MAA8B;AAC/C,WAAO,OAAO,UAAW,IAAK,EAAE;AAAA,EACjC;AAKA,WAAS,OAAQ,OAAmC,eAAsC;AACzF,UAAM,KAAO,OAAO,UAAU,aAAa,QAAQ,MAAM;AAEzD,UAAM,EAAE,MAAM,SAAS,IAAI,iBAAiB,CAAC;AAE7C,QAAK,CAAE,MAAO;AACb,aAAO;AAAA,QACN,QAAQ;AAAA,QACR,OAAO,GAAG;AAAA,QACV,GAAK,YAAY,EAAE,SAAS;AAAA,MAC7B;AAAA,IACD;AAEA,QAAK,CAAE,QAAS,IAAK,GAAI;AACxB,YAAM,IAAI,MAAO,8CAA+C,KAAK,UAAW,IAAK,CAAE,EAAG;AAAA,IAC3F;AAEA,WAAO;AAAA,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AO;AACN,YAAO,GAAI,IAAI;AAAA,IAChB;AAAA,EACD,CAAE;AAEF,SAAO;AACR;;;ACfA,IAAAC,kBAAkB;AAElB,IAAM,sBAAsB,kBAAE,OAAQ;AAAA,EACrC,QAAQ,kBAAE,OAAO;AAAA,EACjB,OAAO,kBAAE,IAAI;AAAA,EACb,UAAU,kBAAE,QAAQ,EAAE,SAAS;AAChC,CAAE;AAIK,IAAM,kBAAkB,CAAE,UAAqD;AACrF,SAAO,oBAAoB,UAAW,KAAM,EAAE;AAC/C;","names":["import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/prop-types/box-shadow.ts","../src/utils/create-prop-utils.ts","../src/prop-types/shadow.ts","../src/prop-types/utils.ts","../src/prop-types/border-radius.ts","../src/prop-types/border-width.ts","../src/prop-types/classes.ts","../src/prop-types/color.ts","../src/prop-types/image.ts","../src/prop-types/image-attachment-id.ts","../src/prop-types/image-src.ts","../src/prop-types/dimensions.ts","../src/prop-types/number.ts","../src/prop-types/size.ts","../src/prop-types/string.ts","../src/prop-types/stroke.ts","../src/prop-types/url.ts","../src/prop-types/layout-direction.ts","../src/prop-types/link.ts","../src/prop-types/background-prop-types/background.ts","../src/prop-types/background-prop-types/background-overlay.ts","../src/prop-types/background-prop-types/background-color-overlay.ts","../src/prop-types/background-prop-types/background-gradient-overlay.ts","../src/prop-types/background-prop-types/background-image-overlay.ts","../src/prop-types/background-prop-types/background-image-position-offset.ts","../src/prop-types/background-prop-types/background-image-size-scale.ts","../src/prop-types/boolean.ts","../src/prop-types/color-stop.ts","../src/prop-types/gradient-color-stop.ts","../src/utils/merge-props.ts","../src/utils/is-transformable.ts"],"sourcesContent":["// types\nexport * from './types';\nexport { type PropTypeUtil, type CreateOptions } from './utils/create-prop-utils';\n\n// prop types\nexport * from './prop-types';\n\n// utils\nexport { mergeProps } from './utils/merge-props';\nexport { createPropUtils } from './utils/create-prop-utils';\nexport { isTransformable } from './utils/is-transformable';\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { shadowPropTypeUtil } from './shadow';\n\nexport const boxShadowPropTypeUtil = createPropUtils( 'box-shadow', z.array( shadowPropTypeUtil.schema ) );\n\nexport type BoxShadowPropValue = z.infer< typeof boxShadowPropTypeUtil.schema >;\n","import { z, type ZodType } from '@elementor/schema';\n\nimport { type PropValue, type TransformablePropValue } from '../types';\n\ntype Updater< T > = ( prev?: T ) => T;\n\nexport type CreateOptions = {\n\tbase?: unknown;\n\tdisabled?: boolean;\n};\n\nexport type PropTypeUtil< TKey extends string, TValue extends PropValue > = ReturnType<\n\ttypeof createPropUtils< TKey, TValue >\n>;\n\n/**\n * Usage example:\n *\n * ```ts\n * const elementsPropUtils = createPropUtils( 'elements', z.array( z.string() ) );\n *\n * elementsPropUtils.isValid( element.props?.children );\n * elementsPropUtils.create( [ 'a', 'b' ] );\n * elementsPropUtils.create( ( prev = [] ) => [ ...prev, 'c' ], { base: element.props?.children } );\n * elementsPropUtils.create( ( prev = [] ) => [ ...prev, 'c' ], { disabled: true } );\n * elementsPropUtils.extract( element.props?.children );\n *\n * ```\n */\n\nexport function createPropUtils< TKey extends string, TValue extends PropValue >(\n\tkey: TKey,\n\tvalueSchema: ZodType< TValue >\n) {\n\tconst schema = z.strictObject( {\n\t\t$$type: z.literal( key ),\n\t\tvalue: valueSchema,\n\t\tdisabled: z.boolean().optional(),\n\t} );\n\n\ttype Prop = TransformablePropValue< TKey, TValue >;\n\n\tfunction isValid( prop: unknown ): prop is Prop {\n\t\treturn schema.safeParse( prop ).success;\n\t}\n\n\tfunction create( value: TValue ): Prop;\n\tfunction create( value: TValue, createOptions?: CreateOptions ): Prop;\n\tfunction create( value: Updater< TValue >, createOptions: CreateOptions ): Prop;\n\tfunction create( value: TValue | Updater< TValue >, createOptions?: CreateOptions ): Prop {\n\t\tconst fn = ( typeof value === 'function' ? value : () => value ) as Updater< TValue >;\n\n\t\tconst { base, disabled } = createOptions || {};\n\n\t\tif ( ! base ) {\n\t\t\treturn {\n\t\t\t\t$$type: key,\n\t\t\t\tvalue: fn(),\n\t\t\t\t...( disabled && { disabled } ),\n\t\t\t};\n\t\t}\n\n\t\tif ( ! isValid( base ) ) {\n\t\t\tthrow new Error( `Cannot create prop based on invalid value: ${ JSON.stringify( base ) }` );\n\t\t}\n\n\t\treturn {\n\t\t\t$$type: key,\n\t\t\tvalue: fn( base.value ),\n\t\t\t...( disabled && { disabled } ),\n\t\t};\n\t}\n\n\tfunction extract( prop: unknown ): TValue | null {\n\t\tif ( ! isValid( prop ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn prop.value;\n\t}\n\n\treturn {\n\t\textract,\n\t\tisValid,\n\t\tcreate,\n\t\tschema,\n\t\tkey: key as TKey,\n\t};\n}\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const shadowPropTypeUtil = createPropUtils(\n\t'shadow',\n\tz.strictObject( {\n\t\tposition: unknownChildrenSchema,\n\t\thOffset: unknownChildrenSchema,\n\t\tvOffset: unknownChildrenSchema,\n\t\tblur: unknownChildrenSchema,\n\t\tspread: unknownChildrenSchema,\n\t\tcolor: unknownChildrenSchema,\n\t} )\n);\n\nexport type ShadowPropValue = z.infer< typeof shadowPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nexport const unknownChildrenSchema = z.any().nullable();\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const borderRadiusPropTypeUtil = createPropUtils(\n\t'border-radius',\n\tz.strictObject( {\n\t\t'start-start': unknownChildrenSchema,\n\t\t'start-end': unknownChildrenSchema,\n\t\t'end-start': unknownChildrenSchema,\n\t\t'end-end': unknownChildrenSchema,\n\t} )\n);\n\nexport type BorderRadiusPropValue = z.infer< typeof borderRadiusPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const borderWidthPropTypeUtil = createPropUtils(\n\t'border-width',\n\tz.strictObject( {\n\t\t'block-start': unknownChildrenSchema,\n\t\t'block-end': unknownChildrenSchema,\n\t\t'inline-start': unknownChildrenSchema,\n\t\t'inline-end': unknownChildrenSchema,\n\t} )\n);\n\nexport type BorderWidthPropValue = z.infer< typeof borderWidthPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const CLASSES_PROP_KEY = 'classes';\n\nexport const classesPropTypeUtil = createPropUtils(\n\tCLASSES_PROP_KEY,\n\tz.array( z.string().regex( /^[a-z][a-z-_0-9]*$/i ) )\n);\n\nexport type ClassesPropValue = z.infer< typeof classesPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const colorPropTypeUtil = createPropUtils( 'color', z.string() );\n\nexport type ColorPropValue = z.infer< typeof colorPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const imagePropTypeUtil = createPropUtils(\n\t'image',\n\tz.strictObject( {\n\t\tsrc: unknownChildrenSchema,\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n\nexport type ImagePropValue = z.infer< typeof imagePropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const imageAttachmentIdPropType = createPropUtils( 'image-attachment-id', z.number() );\n\nexport type ImageAttachmentIdPropValue = z.infer< typeof imageAttachmentIdPropType.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const imageSrcPropTypeUtil = createPropUtils(\n\t'image-src',\n\tz\n\t\t.strictObject( {\n\t\t\tid: unknownChildrenSchema,\n\t\t\turl: z.null(),\n\t\t} )\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tid: z.null(),\n\t\t\t\turl: unknownChildrenSchema,\n\t\t\t} )\n\t\t)\n);\n\nexport type ImageSrcPropValue = z.infer< typeof imageSrcPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const dimensionsPropTypeUtil = createPropUtils(\n\t'dimensions',\n\tz.strictObject( {\n\t\t'block-start': unknownChildrenSchema,\n\t\t'block-end': unknownChildrenSchema,\n\t\t'inline-start': unknownChildrenSchema,\n\t\t'inline-end': unknownChildrenSchema,\n\t} )\n);\n\nexport type DimensionsPropValue = z.infer< typeof dimensionsPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const numberPropTypeUtil = createPropUtils( 'number', z.number().nullable() );\n\nexport type NumberPropValue = z.infer< typeof numberPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const sizePropTypeUtil = createPropUtils(\n\t'size',\n\tz.strictObject( {\n\t\tunit: z.enum( [ 'px', 'em', 'rem', '%', 'vw', 'vh' ] ),\n\t\tsize: z.number(),\n\t} )\n);\n\nexport type SizePropValue = z.infer< typeof sizePropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const stringPropTypeUtil = createPropUtils( 'string', z.string().nullable() );\n\nexport type StringPropValue = z.infer< typeof stringPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const strokePropTypeUtil = createPropUtils(\n\t'stroke',\n\tz.strictObject( {\n\t\tcolor: unknownChildrenSchema,\n\t\twidth: unknownChildrenSchema,\n\t} )\n);\n\nexport type StrokePropValue = z.infer< typeof strokePropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const urlPropTypeUtil = createPropUtils( 'url', z.string().nullable() );\n\nexport type UrlPropValue = z.infer< typeof urlPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const layoutDirectionPropTypeUtil = createPropUtils(\n\t'layout-direction',\n\tz.object( {\n\t\trow: z.any(),\n\t\tcolumn: z.any(),\n\t} )\n);\n\nexport type LayoutDirectionPropValue = z.infer< typeof layoutDirectionPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const linkPropTypeUtil = createPropUtils(\n\t'link',\n\tz.strictObject( {\n\t\tdestination: unknownChildrenSchema,\n\t\tlabel: unknownChildrenSchema,\n\t\tisTargetBlank: unknownChildrenSchema,\n\t} )\n);\n\nexport type LinkPropValue = z.infer< typeof linkPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const backgroundPropTypeUtil = createPropUtils(\n\t'background',\n\tz.strictObject( {\n\t\tcolor: unknownChildrenSchema,\n\t\t'background-overlay': unknownChildrenSchema,\n\t} )\n);\n\nexport type BackgroundPropValue = z.infer< typeof backgroundPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { backgroundColorOverlayPropTypeUtil } from './background-color-overlay';\nimport { backgroundGradientOverlayPropTypeUtil } from './background-gradient-overlay';\nimport { backgroundImageOverlayPropTypeUtil } from './background-image-overlay';\n\nconst backgroundOverlayItem = backgroundColorOverlayPropTypeUtil.schema\n\t.or( backgroundGradientOverlayPropTypeUtil.schema )\n\t.or( backgroundImageOverlayPropTypeUtil.schema );\n\nexport const backgroundOverlayPropTypeUtil = createPropUtils( 'background-overlay', z.array( backgroundOverlayItem ) );\n\nexport type BackgroundOverlayPropValue = z.infer< typeof backgroundOverlayPropTypeUtil.schema >;\nexport type BackgroundOverlayItemPropValue = z.infer< typeof backgroundOverlayItem >;\n","import { type z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const backgroundColorOverlayPropTypeUtil = createPropUtils( 'background-color-overlay', unknownChildrenSchema );\n\nexport type BackgroundColorOverlayPropValue = z.infer< typeof backgroundColorOverlayPropTypeUtil.schema >;\n","import type { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const backgroundGradientOverlayPropTypeUtil = createPropUtils(\n\t'background-gradient-overlay',\n\tunknownChildrenSchema\n);\n\nexport type BackgroundGradientOverlayPropValue = z.infer< typeof backgroundGradientOverlayPropTypeUtil.schema >;\n","import { type z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const backgroundImageOverlayPropTypeUtil = createPropUtils( 'background-image-overlay', unknownChildrenSchema );\n\nexport type BackgroundImageOverlayPropValue = z.infer< typeof backgroundImageOverlayPropTypeUtil.schema >;\n","import { type z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const backgroundImagePositionOffsetPropTypeUtil = createPropUtils(\n\t'background-image-position-offset',\n\tunknownChildrenSchema\n);\n\nexport type BackgroundImagePositionOffsetPropValue = z.infer< typeof backgroundImagePositionOffsetPropTypeUtil.schema >;\n","import { type z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const backgroundImageSizeScalePropTypeUtil = createPropUtils(\n\t'background-image-size-scale',\n\tunknownChildrenSchema\n);\n\nexport type BackgroundImageSizeScalePropValue = z.infer< typeof backgroundImageSizeScalePropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const booleanPropTypeUtil = createPropUtils( 'boolean', z.boolean().nullable() );\n\nexport type BooleanPropValue = z.infer< typeof booleanPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const colorStopPropTypeUtil = createPropUtils(\n\t'color-stop',\n\tz.strictObject( {\n\t\tcolor: unknownChildrenSchema,\n\t\toffset: unknownChildrenSchema,\n\t} )\n);\n\nexport type ColorStopPropValue = z.infer< typeof colorStopPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { colorStopPropTypeUtil } from './color-stop';\n\nexport const gradientColorStopPropTypeUtil = createPropUtils(\n\t'gradient-color-stop',\n\tz.array( colorStopPropTypeUtil.schema )\n);\n\nexport type GradientColorStopPropValue = z.infer< typeof gradientColorStopPropTypeUtil.schema >;\n","import type { Props } from '../types';\n\nexport function mergeProps( current: Props, updates: Props ) {\n\tconst props = structuredClone( current );\n\n\tObject.entries( updates ).forEach( ( [ key, value ] ) => {\n\t\tif ( value === null || value === undefined ) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n\t\t\tdelete props[ key ];\n\t\t} else {\n\t\t\tprops[ key ] = value;\n\t\t}\n\t} );\n\n\treturn props;\n}\n","import { z } from '@elementor/schema';\n\nconst transformableSchema = z.object( {\n\t$$type: z.string(),\n\tvalue: z.any(),\n\tdisabled: z.boolean().optional(),\n} );\n\ntype TransformablePropValue = z.infer< typeof transformableSchema >;\n\nexport const isTransformable = ( value: unknown ): value is TransformablePropValue => {\n\treturn transformableSchema.safePar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,EACD,CAAE;AAEF,SAAO;AACR;;;ACfA,IAAAC,kBAAkB;AAElB,IAAM,sBAAsB,kBAAE,OAAQ;AAAA,EACrC,QAAQ,kBAAE,OAAO;AAAA,EACjB,OAAO,kBAAE,IAAI;AAAA,EACb,UAAU,kBAAE,QAAQ,EAAE,SAAS;AAChC,CAAE;AAIK,IAAM,kBAAkB,CAAE,UAAqD;AACrF,SAAO,oBAAoB,UAAW,KAAM,EAAE;AAC/C;","names":["import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema","import_schema"]}