@elementor/editor-props 0.7.1 → 0.9.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/CHANGELOG.md +18 -0
- package/dist/index.d.mts +158 -106
- package/dist/index.d.ts +158 -106
- package/dist/index.js +46 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -1
- package/src/index.ts +1 -0
- package/src/prop-types/background-prop-types/background-gradient-overlay.ts +0 -4
- package/src/prop-types/background-prop-types/background-image-position-offset.ts +11 -0
- package/src/prop-types/background-prop-types/background-image-size-scale.ts +11 -0
- package/src/prop-types/index.ts +3 -1
- package/src/prop-types/layout-direction.ts +13 -0
- package/src/prop-types/link.ts +2 -1
- package/src/utils/merge-props.ts +16 -0
- package/src/prop-types/gaps.ts +0 -14
package/dist/index.d.ts
CHANGED
|
@@ -257,7 +257,7 @@ declare const boxShadowPropTypeUtil: {
|
|
|
257
257
|
}[];
|
|
258
258
|
disabled?: boolean | undefined;
|
|
259
259
|
}>;
|
|
260
|
-
key:
|
|
260
|
+
key: "box-shadow";
|
|
261
261
|
};
|
|
262
262
|
type BoxShadowPropValue = z.infer<typeof boxShadowPropTypeUtil.schema>;
|
|
263
263
|
|
|
@@ -347,7 +347,7 @@ declare const borderRadiusPropTypeUtil: {
|
|
|
347
347
|
};
|
|
348
348
|
disabled?: boolean | undefined;
|
|
349
349
|
}>;
|
|
350
|
-
key:
|
|
350
|
+
key: "border-radius";
|
|
351
351
|
};
|
|
352
352
|
type BorderRadiusPropValue = z.infer<typeof borderRadiusPropTypeUtil.schema>;
|
|
353
353
|
|
|
@@ -437,7 +437,7 @@ declare const borderWidthPropTypeUtil: {
|
|
|
437
437
|
};
|
|
438
438
|
disabled?: boolean | undefined;
|
|
439
439
|
}>;
|
|
440
|
-
key:
|
|
440
|
+
key: "border-width";
|
|
441
441
|
};
|
|
442
442
|
type BorderWidthPropValue = z.infer<typeof borderWidthPropTypeUtil.schema>;
|
|
443
443
|
|
|
@@ -462,7 +462,7 @@ declare const classesPropTypeUtil: {
|
|
|
462
462
|
value: string[];
|
|
463
463
|
disabled?: boolean | undefined;
|
|
464
464
|
}>;
|
|
465
|
-
key:
|
|
465
|
+
key: "classes";
|
|
466
466
|
};
|
|
467
467
|
type ClassesPropValue = z.infer<typeof classesPropTypeUtil.schema>;
|
|
468
468
|
|
|
@@ -487,7 +487,7 @@ declare const colorPropTypeUtil: {
|
|
|
487
487
|
value: string;
|
|
488
488
|
disabled?: boolean | undefined;
|
|
489
489
|
}>;
|
|
490
|
-
key:
|
|
490
|
+
key: "color";
|
|
491
491
|
};
|
|
492
492
|
type ColorPropValue = z.infer<typeof colorPropTypeUtil.schema>;
|
|
493
493
|
|
|
@@ -551,7 +551,7 @@ declare const imagePropTypeUtil: {
|
|
|
551
551
|
};
|
|
552
552
|
disabled?: boolean | undefined;
|
|
553
553
|
}>;
|
|
554
|
-
key:
|
|
554
|
+
key: "image";
|
|
555
555
|
};
|
|
556
556
|
type ImagePropValue = z.infer<typeof imagePropTypeUtil.schema>;
|
|
557
557
|
|
|
@@ -576,7 +576,7 @@ declare const imageAttachmentIdPropType: {
|
|
|
576
576
|
value: number;
|
|
577
577
|
disabled?: boolean | undefined;
|
|
578
578
|
}>;
|
|
579
|
-
key:
|
|
579
|
+
key: "image-attachment-id";
|
|
580
580
|
};
|
|
581
581
|
type ImageAttachmentIdPropValue = z.infer<typeof imageAttachmentIdPropType.schema>;
|
|
582
582
|
|
|
@@ -679,7 +679,7 @@ declare const imageSrcPropTypeUtil: {
|
|
|
679
679
|
};
|
|
680
680
|
disabled?: boolean | undefined;
|
|
681
681
|
}>;
|
|
682
|
-
key:
|
|
682
|
+
key: "image-src";
|
|
683
683
|
};
|
|
684
684
|
type ImageSrcPropValue = z.infer<typeof imageSrcPropTypeUtil.schema>;
|
|
685
685
|
|
|
@@ -769,7 +769,7 @@ declare const dimensionsPropTypeUtil: {
|
|
|
769
769
|
};
|
|
770
770
|
disabled?: boolean | undefined;
|
|
771
771
|
}>;
|
|
772
|
-
key:
|
|
772
|
+
key: "dimensions";
|
|
773
773
|
};
|
|
774
774
|
type DimensionsPropValue = z.infer<typeof dimensionsPropTypeUtil.schema>;
|
|
775
775
|
|
|
@@ -794,7 +794,7 @@ declare const numberPropTypeUtil: {
|
|
|
794
794
|
value: number | null;
|
|
795
795
|
disabled?: boolean | undefined;
|
|
796
796
|
}>;
|
|
797
|
-
key:
|
|
797
|
+
key: "number";
|
|
798
798
|
};
|
|
799
799
|
type NumberPropValue = z.infer<typeof numberPropTypeUtil.schema>;
|
|
800
800
|
|
|
@@ -910,7 +910,7 @@ declare const shadowPropTypeUtil: {
|
|
|
910
910
|
};
|
|
911
911
|
disabled?: boolean | undefined;
|
|
912
912
|
}>;
|
|
913
|
-
key:
|
|
913
|
+
key: "shadow";
|
|
914
914
|
};
|
|
915
915
|
type ShadowPropValue = z.infer<typeof shadowPropTypeUtil.schema>;
|
|
916
916
|
|
|
@@ -974,7 +974,7 @@ declare const sizePropTypeUtil: {
|
|
|
974
974
|
};
|
|
975
975
|
disabled?: boolean | undefined;
|
|
976
976
|
}>;
|
|
977
|
-
key:
|
|
977
|
+
key: "size";
|
|
978
978
|
};
|
|
979
979
|
type SizePropValue = z.infer<typeof sizePropTypeUtil.schema>;
|
|
980
980
|
|
|
@@ -999,7 +999,7 @@ declare const stringPropTypeUtil: {
|
|
|
999
999
|
value: string | null;
|
|
1000
1000
|
disabled?: boolean | undefined;
|
|
1001
1001
|
}>;
|
|
1002
|
-
key:
|
|
1002
|
+
key: "string";
|
|
1003
1003
|
};
|
|
1004
1004
|
type StringPropValue = z.infer<typeof stringPropTypeUtil.schema>;
|
|
1005
1005
|
|
|
@@ -1063,7 +1063,7 @@ declare const strokePropTypeUtil: {
|
|
|
1063
1063
|
};
|
|
1064
1064
|
disabled?: boolean | undefined;
|
|
1065
1065
|
}>;
|
|
1066
|
-
key:
|
|
1066
|
+
key: "stroke";
|
|
1067
1067
|
};
|
|
1068
1068
|
type StrokePropValue = z.infer<typeof strokePropTypeUtil.schema>;
|
|
1069
1069
|
|
|
@@ -1088,150 +1088,150 @@ declare const urlPropTypeUtil: {
|
|
|
1088
1088
|
value: string | null;
|
|
1089
1089
|
disabled?: boolean | undefined;
|
|
1090
1090
|
}>;
|
|
1091
|
-
key:
|
|
1091
|
+
key: "url";
|
|
1092
1092
|
};
|
|
1093
1093
|
type UrlPropValue = z.infer<typeof urlPropTypeUtil.schema>;
|
|
1094
1094
|
|
|
1095
|
-
declare const
|
|
1095
|
+
declare const layoutDirectionPropTypeUtil: {
|
|
1096
1096
|
extract: (prop: unknown) => {
|
|
1097
|
-
|
|
1098
|
-
|
|
1097
|
+
row?: any;
|
|
1098
|
+
column?: any;
|
|
1099
1099
|
} | null;
|
|
1100
|
-
isValid: (prop: unknown) => prop is TransformablePropValue$1<"
|
|
1101
|
-
|
|
1102
|
-
|
|
1100
|
+
isValid: (prop: unknown) => prop is TransformablePropValue$1<"layout-direction", {
|
|
1101
|
+
row?: any;
|
|
1102
|
+
column?: any;
|
|
1103
1103
|
}>;
|
|
1104
1104
|
create: {
|
|
1105
1105
|
(value: {
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
}): TransformablePropValue$1<"
|
|
1109
|
-
|
|
1110
|
-
|
|
1106
|
+
row?: any;
|
|
1107
|
+
column?: any;
|
|
1108
|
+
}): TransformablePropValue$1<"layout-direction", {
|
|
1109
|
+
row?: any;
|
|
1110
|
+
column?: any;
|
|
1111
1111
|
}>;
|
|
1112
1112
|
(value: {
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
}, createOptions?: CreateOptions): TransformablePropValue$1<"
|
|
1116
|
-
|
|
1117
|
-
|
|
1113
|
+
row?: any;
|
|
1114
|
+
column?: any;
|
|
1115
|
+
}, createOptions?: CreateOptions): TransformablePropValue$1<"layout-direction", {
|
|
1116
|
+
row?: any;
|
|
1117
|
+
column?: any;
|
|
1118
1118
|
}>;
|
|
1119
1119
|
(value: (prev?: {
|
|
1120
|
-
|
|
1121
|
-
|
|
1120
|
+
row?: any;
|
|
1121
|
+
column?: any;
|
|
1122
1122
|
} | undefined) => {
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
}, createOptions: CreateOptions): TransformablePropValue$1<"
|
|
1126
|
-
|
|
1127
|
-
|
|
1123
|
+
row?: any;
|
|
1124
|
+
column?: any;
|
|
1125
|
+
}, createOptions: CreateOptions): TransformablePropValue$1<"layout-direction", {
|
|
1126
|
+
row?: any;
|
|
1127
|
+
column?: any;
|
|
1128
1128
|
}>;
|
|
1129
1129
|
};
|
|
1130
1130
|
schema: z.ZodObject<{
|
|
1131
|
-
$$type: z.ZodLiteral<"
|
|
1131
|
+
$$type: z.ZodLiteral<"layout-direction">;
|
|
1132
1132
|
value: z.ZodType<{
|
|
1133
|
-
|
|
1134
|
-
|
|
1133
|
+
row?: any;
|
|
1134
|
+
column?: any;
|
|
1135
1135
|
}, z.ZodTypeDef, {
|
|
1136
|
-
|
|
1137
|
-
|
|
1136
|
+
row?: any;
|
|
1137
|
+
column?: any;
|
|
1138
1138
|
}>;
|
|
1139
1139
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
1140
1140
|
}, "strict", z.ZodTypeAny, {
|
|
1141
|
-
$$type: "
|
|
1141
|
+
$$type: "layout-direction";
|
|
1142
1142
|
value: {
|
|
1143
|
-
|
|
1144
|
-
|
|
1143
|
+
row?: any;
|
|
1144
|
+
column?: any;
|
|
1145
1145
|
};
|
|
1146
1146
|
disabled?: boolean | undefined;
|
|
1147
1147
|
}, {
|
|
1148
|
-
$$type: "
|
|
1148
|
+
$$type: "layout-direction";
|
|
1149
1149
|
value: {
|
|
1150
|
-
|
|
1151
|
-
|
|
1150
|
+
row?: any;
|
|
1151
|
+
column?: any;
|
|
1152
1152
|
};
|
|
1153
1153
|
disabled?: boolean | undefined;
|
|
1154
1154
|
}>;
|
|
1155
|
-
key:
|
|
1155
|
+
key: "layout-direction";
|
|
1156
1156
|
};
|
|
1157
|
-
type
|
|
1157
|
+
type LayoutDirectionPropValue = z.infer<typeof layoutDirectionPropTypeUtil.schema>;
|
|
1158
1158
|
|
|
1159
|
-
declare const
|
|
1159
|
+
declare const linkPropTypeUtil: {
|
|
1160
1160
|
extract: (prop: unknown) => {
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1161
|
+
destination?: any;
|
|
1162
|
+
label?: any;
|
|
1163
|
+
isTargetBlank?: any;
|
|
1164
1164
|
} | null;
|
|
1165
|
-
isValid: (prop: unknown) => prop is TransformablePropValue$1<"
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1165
|
+
isValid: (prop: unknown) => prop is TransformablePropValue$1<"link", {
|
|
1166
|
+
destination?: any;
|
|
1167
|
+
label?: any;
|
|
1168
|
+
isTargetBlank?: any;
|
|
1169
1169
|
}>;
|
|
1170
1170
|
create: {
|
|
1171
1171
|
(value: {
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
}): TransformablePropValue$1<"
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1172
|
+
destination?: any;
|
|
1173
|
+
label?: any;
|
|
1174
|
+
isTargetBlank?: any;
|
|
1175
|
+
}): TransformablePropValue$1<"link", {
|
|
1176
|
+
destination?: any;
|
|
1177
|
+
label?: any;
|
|
1178
|
+
isTargetBlank?: any;
|
|
1179
1179
|
}>;
|
|
1180
1180
|
(value: {
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
}, createOptions?: CreateOptions): TransformablePropValue$1<"
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1181
|
+
destination?: any;
|
|
1182
|
+
label?: any;
|
|
1183
|
+
isTargetBlank?: any;
|
|
1184
|
+
}, createOptions?: CreateOptions): TransformablePropValue$1<"link", {
|
|
1185
|
+
destination?: any;
|
|
1186
|
+
label?: any;
|
|
1187
|
+
isTargetBlank?: any;
|
|
1188
1188
|
}>;
|
|
1189
1189
|
(value: (prev?: {
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1190
|
+
destination?: any;
|
|
1191
|
+
label?: any;
|
|
1192
|
+
isTargetBlank?: any;
|
|
1193
1193
|
} | undefined) => {
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
}, createOptions: CreateOptions): TransformablePropValue$1<"
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1194
|
+
destination?: any;
|
|
1195
|
+
label?: any;
|
|
1196
|
+
isTargetBlank?: any;
|
|
1197
|
+
}, createOptions: CreateOptions): TransformablePropValue$1<"link", {
|
|
1198
|
+
destination?: any;
|
|
1199
|
+
label?: any;
|
|
1200
|
+
isTargetBlank?: any;
|
|
1201
1201
|
}>;
|
|
1202
1202
|
};
|
|
1203
1203
|
schema: z.ZodObject<{
|
|
1204
|
-
$$type: z.ZodLiteral<"
|
|
1204
|
+
$$type: z.ZodLiteral<"link">;
|
|
1205
1205
|
value: z.ZodType<{
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1206
|
+
destination?: any;
|
|
1207
|
+
label?: any;
|
|
1208
|
+
isTargetBlank?: any;
|
|
1209
1209
|
}, z.ZodTypeDef, {
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1210
|
+
destination?: any;
|
|
1211
|
+
label?: any;
|
|
1212
|
+
isTargetBlank?: any;
|
|
1213
1213
|
}>;
|
|
1214
1214
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
1215
1215
|
}, "strict", z.ZodTypeAny, {
|
|
1216
|
-
$$type: "
|
|
1216
|
+
$$type: "link";
|
|
1217
1217
|
value: {
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1218
|
+
destination?: any;
|
|
1219
|
+
label?: any;
|
|
1220
|
+
isTargetBlank?: any;
|
|
1221
1221
|
};
|
|
1222
1222
|
disabled?: boolean | undefined;
|
|
1223
1223
|
}, {
|
|
1224
|
-
$$type: "
|
|
1224
|
+
$$type: "link";
|
|
1225
1225
|
value: {
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1226
|
+
destination?: any;
|
|
1227
|
+
label?: any;
|
|
1228
|
+
isTargetBlank?: any;
|
|
1229
1229
|
};
|
|
1230
1230
|
disabled?: boolean | undefined;
|
|
1231
1231
|
}>;
|
|
1232
|
-
key:
|
|
1232
|
+
key: "link";
|
|
1233
1233
|
};
|
|
1234
|
-
type
|
|
1234
|
+
type LinkPropValue = z.infer<typeof linkPropTypeUtil.schema>;
|
|
1235
1235
|
|
|
1236
1236
|
declare const backgroundPropTypeUtil: {
|
|
1237
1237
|
extract: (prop: unknown) => {
|
|
@@ -1293,7 +1293,7 @@ declare const backgroundPropTypeUtil: {
|
|
|
1293
1293
|
};
|
|
1294
1294
|
disabled?: boolean | undefined;
|
|
1295
1295
|
}>;
|
|
1296
|
-
key:
|
|
1296
|
+
key: "background";
|
|
1297
1297
|
};
|
|
1298
1298
|
type BackgroundPropValue = z.infer<typeof backgroundPropTypeUtil.schema>;
|
|
1299
1299
|
|
|
@@ -1511,7 +1511,7 @@ declare const backgroundOverlayPropTypeUtil: {
|
|
|
1511
1511
|
})[];
|
|
1512
1512
|
disabled?: boolean | undefined;
|
|
1513
1513
|
}>;
|
|
1514
|
-
key:
|
|
1514
|
+
key: "background-overlay";
|
|
1515
1515
|
};
|
|
1516
1516
|
type BackgroundOverlayPropValue = z.infer<typeof backgroundOverlayPropTypeUtil.schema>;
|
|
1517
1517
|
type BackgroundOverlayItemPropValue = z.infer<typeof backgroundOverlayItem>;
|
|
@@ -1537,7 +1537,7 @@ declare const backgroundColorOverlayPropTypeUtil: {
|
|
|
1537
1537
|
value: string;
|
|
1538
1538
|
disabled?: boolean | undefined;
|
|
1539
1539
|
}>;
|
|
1540
|
-
key:
|
|
1540
|
+
key: "background-color-overlay";
|
|
1541
1541
|
};
|
|
1542
1542
|
type BackgroundColorOverlayPropValue = z.infer<typeof backgroundColorOverlayPropTypeUtil.schema>;
|
|
1543
1543
|
|
|
@@ -1562,10 +1562,60 @@ declare const backgroundImageOverlayPropTypeUtil: {
|
|
|
1562
1562
|
value?: any;
|
|
1563
1563
|
disabled?: boolean | undefined;
|
|
1564
1564
|
}>;
|
|
1565
|
-
key:
|
|
1565
|
+
key: "background-image-overlay";
|
|
1566
1566
|
};
|
|
1567
1567
|
type BackgroundImageOverlayPropValue = z.infer<typeof backgroundImageOverlayPropTypeUtil.schema>;
|
|
1568
1568
|
|
|
1569
|
+
declare const backgroundImagePositionOffsetPropTypeUtil: {
|
|
1570
|
+
extract: (prop: unknown) => any;
|
|
1571
|
+
isValid: (prop: unknown) => prop is TransformablePropValue$1<"background-image-position-offset", any>;
|
|
1572
|
+
create: {
|
|
1573
|
+
(value: any): TransformablePropValue$1<"background-image-position-offset", any>;
|
|
1574
|
+
(value: any, createOptions?: CreateOptions): TransformablePropValue$1<"background-image-position-offset", any>;
|
|
1575
|
+
(value: (prev?: any) => any, createOptions: CreateOptions): TransformablePropValue$1<"background-image-position-offset", any>;
|
|
1576
|
+
};
|
|
1577
|
+
schema: z.ZodObject<{
|
|
1578
|
+
$$type: z.ZodLiteral<"background-image-position-offset">;
|
|
1579
|
+
value: z.ZodType<any, z.ZodTypeDef, any>;
|
|
1580
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
1581
|
+
}, "strict", z.ZodTypeAny, {
|
|
1582
|
+
$$type: "background-image-position-offset";
|
|
1583
|
+
value?: any;
|
|
1584
|
+
disabled?: boolean | undefined;
|
|
1585
|
+
}, {
|
|
1586
|
+
$$type: "background-image-position-offset";
|
|
1587
|
+
value?: any;
|
|
1588
|
+
disabled?: boolean | undefined;
|
|
1589
|
+
}>;
|
|
1590
|
+
key: "background-image-position-offset";
|
|
1591
|
+
};
|
|
1592
|
+
type BackgroundImagePositionOffsetPropValue = z.infer<typeof backgroundImagePositionOffsetPropTypeUtil.schema>;
|
|
1593
|
+
|
|
1594
|
+
declare const backgroundImageSizeScalePropTypeUtil: {
|
|
1595
|
+
extract: (prop: unknown) => any;
|
|
1596
|
+
isValid: (prop: unknown) => prop is TransformablePropValue$1<"background-image-size-scale", any>;
|
|
1597
|
+
create: {
|
|
1598
|
+
(value: any): TransformablePropValue$1<"background-image-size-scale", any>;
|
|
1599
|
+
(value: any, createOptions?: CreateOptions): TransformablePropValue$1<"background-image-size-scale", any>;
|
|
1600
|
+
(value: (prev?: any) => any, createOptions: CreateOptions): TransformablePropValue$1<"background-image-size-scale", any>;
|
|
1601
|
+
};
|
|
1602
|
+
schema: z.ZodObject<{
|
|
1603
|
+
$$type: z.ZodLiteral<"background-image-size-scale">;
|
|
1604
|
+
value: z.ZodType<any, z.ZodTypeDef, any>;
|
|
1605
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
1606
|
+
}, "strict", z.ZodTypeAny, {
|
|
1607
|
+
$$type: "background-image-size-scale";
|
|
1608
|
+
value?: any;
|
|
1609
|
+
disabled?: boolean | undefined;
|
|
1610
|
+
}, {
|
|
1611
|
+
$$type: "background-image-size-scale";
|
|
1612
|
+
value?: any;
|
|
1613
|
+
disabled?: boolean | undefined;
|
|
1614
|
+
}>;
|
|
1615
|
+
key: "background-image-size-scale";
|
|
1616
|
+
};
|
|
1617
|
+
type BackgroundImageSizeScalePropValue = z.infer<typeof backgroundImageSizeScalePropTypeUtil.schema>;
|
|
1618
|
+
|
|
1569
1619
|
declare const booleanPropTypeUtil: {
|
|
1570
1620
|
extract: (prop: unknown) => boolean | null;
|
|
1571
1621
|
isValid: (prop: unknown) => prop is TransformablePropValue$1<"boolean", boolean | null>;
|
|
@@ -1587,10 +1637,12 @@ declare const booleanPropTypeUtil: {
|
|
|
1587
1637
|
value: boolean | null;
|
|
1588
1638
|
disabled?: boolean | undefined;
|
|
1589
1639
|
}>;
|
|
1590
|
-
key:
|
|
1640
|
+
key: "boolean";
|
|
1591
1641
|
};
|
|
1592
1642
|
type BooleanPropValue = z.infer<typeof booleanPropTypeUtil.schema>;
|
|
1593
1643
|
|
|
1644
|
+
declare function mergeProps(current: Props, updates: Props): Props;
|
|
1645
|
+
|
|
1594
1646
|
declare const transformableSchema: z.ZodObject<{
|
|
1595
1647
|
$$type: z.ZodString;
|
|
1596
1648
|
value: z.ZodAny;
|
|
@@ -1607,4 +1659,4 @@ declare const transformableSchema: z.ZodObject<{
|
|
|
1607
1659
|
type TransformablePropValue = z.infer<typeof transformableSchema>;
|
|
1608
1660
|
declare const isTransformable: (value: unknown) => value is TransformablePropValue;
|
|
1609
1661
|
|
|
1610
|
-
export { type ArrayPropType, type ArrayPropValue, type BackgroundColorOverlayPropValue, type BackgroundImageOverlayPropValue, type BackgroundOverlayItemPropValue, type BackgroundOverlayPropValue, type BackgroundPropValue, type BooleanPropValue, type BorderRadiusPropValue, type BorderWidthPropValue, type BoxShadowPropValue, type ClassesPropValue, type ColorPropValue, type CreateOptions, type DimensionsPropValue, type
|
|
1662
|
+
export { 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 PlainProps, 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 };
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,8 @@ var index_exports = {};
|
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
backgroundColorOverlayPropTypeUtil: () => backgroundColorOverlayPropTypeUtil,
|
|
24
24
|
backgroundImageOverlayPropTypeUtil: () => backgroundImageOverlayPropTypeUtil,
|
|
25
|
+
backgroundImagePositionOffsetPropTypeUtil: () => backgroundImagePositionOffsetPropTypeUtil,
|
|
26
|
+
backgroundImageSizeScalePropTypeUtil: () => backgroundImageSizeScalePropTypeUtil,
|
|
25
27
|
backgroundOverlayPropTypeUtil: () => backgroundOverlayPropTypeUtil,
|
|
26
28
|
backgroundPropTypeUtil: () => backgroundPropTypeUtil,
|
|
27
29
|
booleanPropTypeUtil: () => booleanPropTypeUtil,
|
|
@@ -32,12 +34,13 @@ __export(index_exports, {
|
|
|
32
34
|
colorPropTypeUtil: () => colorPropTypeUtil,
|
|
33
35
|
createPropUtils: () => createPropUtils,
|
|
34
36
|
dimensionsPropTypeUtil: () => dimensionsPropTypeUtil,
|
|
35
|
-
gapPropTypeUtil: () => gapPropTypeUtil,
|
|
36
37
|
imageAttachmentIdPropType: () => imageAttachmentIdPropType,
|
|
37
38
|
imagePropTypeUtil: () => imagePropTypeUtil,
|
|
38
39
|
imageSrcPropTypeUtil: () => imageSrcPropTypeUtil,
|
|
39
40
|
isTransformable: () => isTransformable,
|
|
41
|
+
layoutDirectionPropTypeUtil: () => layoutDirectionPropTypeUtil,
|
|
40
42
|
linkPropTypeUtil: () => linkPropTypeUtil,
|
|
43
|
+
mergeProps: () => mergeProps,
|
|
41
44
|
numberPropTypeUtil: () => numberPropTypeUtil,
|
|
42
45
|
shadowPropTypeUtil: () => shadowPropTypeUtil,
|
|
43
46
|
sizePropTypeUtil: () => sizePropTypeUtil,
|
|
@@ -223,24 +226,24 @@ var strokePropTypeUtil = createPropUtils(
|
|
|
223
226
|
var import_schema17 = require("@elementor/schema");
|
|
224
227
|
var urlPropTypeUtil = createPropUtils("url", import_schema17.z.string().nullable());
|
|
225
228
|
|
|
226
|
-
// src/prop-types/
|
|
229
|
+
// src/prop-types/layout-direction.ts
|
|
227
230
|
var import_schema18 = require("@elementor/schema");
|
|
228
|
-
var
|
|
229
|
-
"
|
|
230
|
-
import_schema18.z.
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
var layoutDirectionPropTypeUtil = createPropUtils(
|
|
232
|
+
"layout-direction",
|
|
233
|
+
import_schema18.z.object({
|
|
234
|
+
row: import_schema18.z.any(),
|
|
235
|
+
column: import_schema18.z.any()
|
|
233
236
|
})
|
|
234
237
|
);
|
|
235
238
|
|
|
236
|
-
// src/prop-types/
|
|
239
|
+
// src/prop-types/link.ts
|
|
237
240
|
var import_schema19 = require("@elementor/schema");
|
|
238
|
-
var
|
|
239
|
-
"
|
|
240
|
-
import_schema19.z.
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
241
|
+
var linkPropTypeUtil = createPropUtils(
|
|
242
|
+
"link",
|
|
243
|
+
import_schema19.z.strictObject({
|
|
244
|
+
destination: unknownChildrenSchema,
|
|
245
|
+
label: unknownChildrenSchema,
|
|
246
|
+
isTargetBlank: unknownChildrenSchema
|
|
244
247
|
})
|
|
245
248
|
);
|
|
246
249
|
|
|
@@ -274,10 +277,35 @@ var backgroundImageOverlayPropTypeUtil = createPropUtils("background-image-overl
|
|
|
274
277
|
var backgroundOverlayItem = backgroundColorOverlayPropTypeUtil.schema.or(backgroundGradientOverlayPropTypeUtil.schema).or(backgroundImageOverlayPropTypeUtil.schema);
|
|
275
278
|
var backgroundOverlayPropTypeUtil = createPropUtils("background-overlay", import_schema22.z.array(backgroundOverlayItem));
|
|
276
279
|
|
|
280
|
+
// src/prop-types/background-prop-types/background-image-position-offset.ts
|
|
281
|
+
var backgroundImagePositionOffsetPropTypeUtil = createPropUtils(
|
|
282
|
+
"background-image-position-offset",
|
|
283
|
+
unknownChildrenSchema
|
|
284
|
+
);
|
|
285
|
+
|
|
286
|
+
// src/prop-types/background-prop-types/background-image-size-scale.ts
|
|
287
|
+
var backgroundImageSizeScalePropTypeUtil = createPropUtils(
|
|
288
|
+
"background-image-size-scale",
|
|
289
|
+
unknownChildrenSchema
|
|
290
|
+
);
|
|
291
|
+
|
|
277
292
|
// src/prop-types/boolean.ts
|
|
278
293
|
var import_schema23 = require("@elementor/schema");
|
|
279
294
|
var booleanPropTypeUtil = createPropUtils("boolean", import_schema23.z.boolean().nullable());
|
|
280
295
|
|
|
296
|
+
// src/utils/merge-props.ts
|
|
297
|
+
function mergeProps(current, updates) {
|
|
298
|
+
const props = structuredClone(current);
|
|
299
|
+
Object.entries(updates).forEach(([key, value]) => {
|
|
300
|
+
if (value === null || value === void 0) {
|
|
301
|
+
delete props[key];
|
|
302
|
+
} else {
|
|
303
|
+
props[key] = value;
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
return props;
|
|
307
|
+
}
|
|
308
|
+
|
|
281
309
|
// src/utils/is-transformable.ts
|
|
282
310
|
var import_schema24 = require("@elementor/schema");
|
|
283
311
|
var transformableSchema = import_schema24.z.object({
|
|
@@ -292,6 +320,8 @@ var isTransformable = (value) => {
|
|
|
292
320
|
0 && (module.exports = {
|
|
293
321
|
backgroundColorOverlayPropTypeUtil,
|
|
294
322
|
backgroundImageOverlayPropTypeUtil,
|
|
323
|
+
backgroundImagePositionOffsetPropTypeUtil,
|
|
324
|
+
backgroundImageSizeScalePropTypeUtil,
|
|
295
325
|
backgroundOverlayPropTypeUtil,
|
|
296
326
|
backgroundPropTypeUtil,
|
|
297
327
|
booleanPropTypeUtil,
|
|
@@ -302,12 +332,13 @@ var isTransformable = (value) => {
|
|
|
302
332
|
colorPropTypeUtil,
|
|
303
333
|
createPropUtils,
|
|
304
334
|
dimensionsPropTypeUtil,
|
|
305
|
-
gapPropTypeUtil,
|
|
306
335
|
imageAttachmentIdPropType,
|
|
307
336
|
imagePropTypeUtil,
|
|
308
337
|
imageSrcPropTypeUtil,
|
|
309
338
|
isTransformable,
|
|
339
|
+
layoutDirectionPropTypeUtil,
|
|
310
340
|
linkPropTypeUtil,
|
|
341
|
+
mergeProps,
|
|
311
342
|
numberPropTypeUtil,
|
|
312
343
|
shadowPropTypeUtil,
|
|
313
344
|
sizePropTypeUtil,
|