@elementor/editor-props 0.12.1 → 0.14.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 +13 -0
- package/dist/index.d.mts +605 -14
- package/dist/index.d.ts +605 -14
- package/dist/index.js +45 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/prop-types/index.ts +2 -0
- package/src/prop-types/key-value.ts +14 -0
- package/src/prop-types/position.ts +14 -0
- package/src/prop-types/size.ts +17 -4
- package/src/types.ts +15 -0
- package/src/utils/create-prop-utils.ts +7 -0
package/dist/index.d.mts
CHANGED
|
@@ -10,6 +10,22 @@ type PlainPropType = BasePropType<PlainPropValue> & {
|
|
|
10
10
|
kind: 'plain';
|
|
11
11
|
key: PropTypeKey;
|
|
12
12
|
};
|
|
13
|
+
type BackgroundOverlayPropType = TransformablePropType & {
|
|
14
|
+
$$type: 'background-image-overlay';
|
|
15
|
+
value: TransformablePropType & {
|
|
16
|
+
image: BackgroundOverlayImagePropType;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
type BackgroundOverlayImagePropType = TransformablePropType & {
|
|
20
|
+
$$type: 'image';
|
|
21
|
+
value: {
|
|
22
|
+
src: TransformablePropValue$1<'dynamic', {
|
|
23
|
+
name: string;
|
|
24
|
+
settings?: Record<string, unknown>;
|
|
25
|
+
}>;
|
|
26
|
+
size?: TransformablePropValue$1<'size', string>;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
13
29
|
type ArrayPropType = BasePropType<ArrayPropValue> & {
|
|
14
30
|
kind: 'array';
|
|
15
31
|
key: PropTypeKey;
|
|
@@ -92,6 +108,37 @@ declare function createPropUtils<TKey extends string, TValue extends PropValue>(
|
|
|
92
108
|
}>[k_1]; } : never>;
|
|
93
109
|
key: TKey;
|
|
94
110
|
};
|
|
111
|
+
declare function createArrayPropUtils<TKey extends string, TValue extends PropValue>(key: TKey, valueSchema: ZodType<TValue>): {
|
|
112
|
+
extract: (prop: unknown) => TValue[] | null;
|
|
113
|
+
isValid: (prop: unknown) => prop is TransformablePropValue$1<`${TKey}-array`, TValue[]>;
|
|
114
|
+
create: {
|
|
115
|
+
(value: TValue[]): TransformablePropValue$1<`${TKey}-array`, TValue[]>;
|
|
116
|
+
(value: TValue[], createOptions?: CreateOptions): TransformablePropValue$1<`${TKey}-array`, TValue[]>;
|
|
117
|
+
(value: Updater<TValue[]>, createOptions: CreateOptions): TransformablePropValue$1<`${TKey}-array`, TValue[]>;
|
|
118
|
+
};
|
|
119
|
+
schema: z.ZodObject<{
|
|
120
|
+
$$type: z.ZodLiteral<`${TKey}-array`>;
|
|
121
|
+
value: z.ZodType<TValue[], z.ZodTypeDef, TValue[]>;
|
|
122
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
+
}, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
124
|
+
$$type: z.ZodLiteral<`${TKey}-array`>;
|
|
125
|
+
value: z.ZodType<TValue[], z.ZodTypeDef, TValue[]>;
|
|
126
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
+
}>, any> extends infer T ? { [k in keyof T]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
128
|
+
$$type: z.ZodLiteral<`${TKey}-array`>;
|
|
129
|
+
value: z.ZodType<TValue[], z.ZodTypeDef, TValue[]>;
|
|
130
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
131
|
+
}>, any>[k]; } : never, z.baseObjectInputType<{
|
|
132
|
+
$$type: z.ZodLiteral<`${TKey}-array`>;
|
|
133
|
+
value: z.ZodType<TValue[], z.ZodTypeDef, TValue[]>;
|
|
134
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
+
}> extends infer T_1 ? { [k_1 in keyof T_1]: z.baseObjectInputType<{
|
|
136
|
+
$$type: z.ZodLiteral<`${TKey}-array`>;
|
|
137
|
+
value: z.ZodType<TValue[], z.ZodTypeDef, TValue[]>;
|
|
138
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
139
|
+
}>[k_1]; } : never>;
|
|
140
|
+
key: `${TKey}-array`;
|
|
141
|
+
};
|
|
95
142
|
|
|
96
143
|
declare const boxShadowPropTypeUtil: {
|
|
97
144
|
extract: (prop: unknown) => {
|
|
@@ -494,61 +541,61 @@ type ColorPropValue = z.infer<typeof colorPropTypeUtil.schema>;
|
|
|
494
541
|
|
|
495
542
|
declare const imagePropTypeUtil: {
|
|
496
543
|
extract: (prop: unknown) => {
|
|
497
|
-
src?: any;
|
|
498
544
|
size?: any;
|
|
545
|
+
src?: any;
|
|
499
546
|
} | null;
|
|
500
547
|
isValid: (prop: unknown) => prop is TransformablePropValue$1<"image", {
|
|
501
|
-
src?: any;
|
|
502
548
|
size?: any;
|
|
549
|
+
src?: any;
|
|
503
550
|
}>;
|
|
504
551
|
create: {
|
|
505
552
|
(value: {
|
|
506
|
-
src?: any;
|
|
507
553
|
size?: any;
|
|
508
|
-
}): TransformablePropValue$1<"image", {
|
|
509
554
|
src?: any;
|
|
555
|
+
}): TransformablePropValue$1<"image", {
|
|
510
556
|
size?: any;
|
|
557
|
+
src?: any;
|
|
511
558
|
}>;
|
|
512
559
|
(value: {
|
|
513
|
-
src?: any;
|
|
514
560
|
size?: any;
|
|
515
|
-
}, createOptions?: CreateOptions): TransformablePropValue$1<"image", {
|
|
516
561
|
src?: any;
|
|
562
|
+
}, createOptions?: CreateOptions): TransformablePropValue$1<"image", {
|
|
517
563
|
size?: any;
|
|
564
|
+
src?: any;
|
|
518
565
|
}>;
|
|
519
566
|
(value: (prev?: {
|
|
520
|
-
src?: any;
|
|
521
567
|
size?: any;
|
|
522
|
-
} | undefined) => {
|
|
523
568
|
src?: any;
|
|
569
|
+
} | undefined) => {
|
|
524
570
|
size?: any;
|
|
525
|
-
}, createOptions: CreateOptions): TransformablePropValue$1<"image", {
|
|
526
571
|
src?: any;
|
|
572
|
+
}, createOptions: CreateOptions): TransformablePropValue$1<"image", {
|
|
527
573
|
size?: any;
|
|
574
|
+
src?: any;
|
|
528
575
|
}>;
|
|
529
576
|
};
|
|
530
577
|
schema: z.ZodObject<{
|
|
531
578
|
$$type: z.ZodLiteral<"image">;
|
|
532
579
|
value: z.ZodType<{
|
|
533
|
-
src?: any;
|
|
534
580
|
size?: any;
|
|
535
|
-
}, z.ZodTypeDef, {
|
|
536
581
|
src?: any;
|
|
582
|
+
}, z.ZodTypeDef, {
|
|
537
583
|
size?: any;
|
|
584
|
+
src?: any;
|
|
538
585
|
}>;
|
|
539
586
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
540
587
|
}, "strict", z.ZodTypeAny, {
|
|
541
588
|
$$type: "image";
|
|
542
589
|
value: {
|
|
543
|
-
src?: any;
|
|
544
590
|
size?: any;
|
|
591
|
+
src?: any;
|
|
545
592
|
};
|
|
546
593
|
disabled?: boolean | undefined;
|
|
547
594
|
}, {
|
|
548
595
|
$$type: "image";
|
|
549
596
|
value: {
|
|
550
|
-
src?: any;
|
|
551
597
|
size?: any;
|
|
598
|
+
src?: any;
|
|
552
599
|
};
|
|
553
600
|
disabled?: boolean | undefined;
|
|
554
601
|
}>;
|
|
@@ -919,35 +966,89 @@ declare const sizePropTypeUtil: {
|
|
|
919
966
|
extract: (prop: unknown) => {
|
|
920
967
|
size: number;
|
|
921
968
|
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
969
|
+
} | {
|
|
970
|
+
size: "";
|
|
971
|
+
unit: "auto";
|
|
972
|
+
} | {
|
|
973
|
+
size: string;
|
|
974
|
+
unit: "custom";
|
|
922
975
|
} | null;
|
|
923
976
|
isValid: (prop: unknown) => prop is TransformablePropValue$1<"size", {
|
|
924
977
|
size: number;
|
|
925
978
|
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
979
|
+
} | {
|
|
980
|
+
size: "";
|
|
981
|
+
unit: "auto";
|
|
982
|
+
} | {
|
|
983
|
+
size: string;
|
|
984
|
+
unit: "custom";
|
|
926
985
|
}>;
|
|
927
986
|
create: {
|
|
928
987
|
(value: {
|
|
929
988
|
size: number;
|
|
930
989
|
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
990
|
+
} | {
|
|
991
|
+
size: "";
|
|
992
|
+
unit: "auto";
|
|
993
|
+
} | {
|
|
994
|
+
size: string;
|
|
995
|
+
unit: "custom";
|
|
931
996
|
}): TransformablePropValue$1<"size", {
|
|
932
997
|
size: number;
|
|
933
998
|
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
999
|
+
} | {
|
|
1000
|
+
size: "";
|
|
1001
|
+
unit: "auto";
|
|
1002
|
+
} | {
|
|
1003
|
+
size: string;
|
|
1004
|
+
unit: "custom";
|
|
934
1005
|
}>;
|
|
935
1006
|
(value: {
|
|
936
1007
|
size: number;
|
|
937
1008
|
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
1009
|
+
} | {
|
|
1010
|
+
size: "";
|
|
1011
|
+
unit: "auto";
|
|
1012
|
+
} | {
|
|
1013
|
+
size: string;
|
|
1014
|
+
unit: "custom";
|
|
938
1015
|
}, createOptions?: CreateOptions): TransformablePropValue$1<"size", {
|
|
939
1016
|
size: number;
|
|
940
1017
|
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
1018
|
+
} | {
|
|
1019
|
+
size: "";
|
|
1020
|
+
unit: "auto";
|
|
1021
|
+
} | {
|
|
1022
|
+
size: string;
|
|
1023
|
+
unit: "custom";
|
|
941
1024
|
}>;
|
|
942
1025
|
(value: (prev?: {
|
|
943
1026
|
size: number;
|
|
944
1027
|
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
1028
|
+
} | {
|
|
1029
|
+
size: "";
|
|
1030
|
+
unit: "auto";
|
|
1031
|
+
} | {
|
|
1032
|
+
size: string;
|
|
1033
|
+
unit: "custom";
|
|
945
1034
|
} | undefined) => {
|
|
946
1035
|
size: number;
|
|
947
1036
|
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
1037
|
+
} | {
|
|
1038
|
+
size: "";
|
|
1039
|
+
unit: "auto";
|
|
1040
|
+
} | {
|
|
1041
|
+
size: string;
|
|
1042
|
+
unit: "custom";
|
|
948
1043
|
}, createOptions: CreateOptions): TransformablePropValue$1<"size", {
|
|
949
1044
|
size: number;
|
|
950
1045
|
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
1046
|
+
} | {
|
|
1047
|
+
size: "";
|
|
1048
|
+
unit: "auto";
|
|
1049
|
+
} | {
|
|
1050
|
+
size: string;
|
|
1051
|
+
unit: "custom";
|
|
951
1052
|
}>;
|
|
952
1053
|
};
|
|
953
1054
|
schema: z.ZodObject<{
|
|
@@ -955,9 +1056,21 @@ declare const sizePropTypeUtil: {
|
|
|
955
1056
|
value: z.ZodType<{
|
|
956
1057
|
size: number;
|
|
957
1058
|
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
1059
|
+
} | {
|
|
1060
|
+
size: "";
|
|
1061
|
+
unit: "auto";
|
|
1062
|
+
} | {
|
|
1063
|
+
size: string;
|
|
1064
|
+
unit: "custom";
|
|
958
1065
|
}, z.ZodTypeDef, {
|
|
959
1066
|
size: number;
|
|
960
1067
|
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
1068
|
+
} | {
|
|
1069
|
+
size: "";
|
|
1070
|
+
unit: "auto";
|
|
1071
|
+
} | {
|
|
1072
|
+
size: string;
|
|
1073
|
+
unit: "custom";
|
|
961
1074
|
}>;
|
|
962
1075
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
963
1076
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -965,6 +1078,12 @@ declare const sizePropTypeUtil: {
|
|
|
965
1078
|
value: {
|
|
966
1079
|
size: number;
|
|
967
1080
|
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
1081
|
+
} | {
|
|
1082
|
+
size: "";
|
|
1083
|
+
unit: "auto";
|
|
1084
|
+
} | {
|
|
1085
|
+
size: string;
|
|
1086
|
+
unit: "custom";
|
|
968
1087
|
};
|
|
969
1088
|
disabled?: boolean | undefined;
|
|
970
1089
|
}, {
|
|
@@ -972,6 +1091,12 @@ declare const sizePropTypeUtil: {
|
|
|
972
1091
|
value: {
|
|
973
1092
|
size: number;
|
|
974
1093
|
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
1094
|
+
} | {
|
|
1095
|
+
size: "";
|
|
1096
|
+
unit: "auto";
|
|
1097
|
+
} | {
|
|
1098
|
+
size: string;
|
|
1099
|
+
unit: "custom";
|
|
975
1100
|
};
|
|
976
1101
|
disabled?: boolean | undefined;
|
|
977
1102
|
}>;
|
|
@@ -1847,6 +1972,472 @@ declare const gradientColorStopPropTypeUtil: {
|
|
|
1847
1972
|
};
|
|
1848
1973
|
type GradientColorStopPropValue = z.infer<typeof gradientColorStopPropTypeUtil.schema>;
|
|
1849
1974
|
|
|
1975
|
+
declare const keyValuePropTypeUtil: {
|
|
1976
|
+
extract: (prop: unknown) => {
|
|
1977
|
+
value?: any;
|
|
1978
|
+
key?: any;
|
|
1979
|
+
} | null;
|
|
1980
|
+
isValid: (prop: unknown) => prop is TransformablePropValue$1<"keyValue", {
|
|
1981
|
+
value?: any;
|
|
1982
|
+
key?: any;
|
|
1983
|
+
}>;
|
|
1984
|
+
create: {
|
|
1985
|
+
(value: {
|
|
1986
|
+
value?: any;
|
|
1987
|
+
key?: any;
|
|
1988
|
+
}): TransformablePropValue$1<"keyValue", {
|
|
1989
|
+
value?: any;
|
|
1990
|
+
key?: any;
|
|
1991
|
+
}>;
|
|
1992
|
+
(value: {
|
|
1993
|
+
value?: any;
|
|
1994
|
+
key?: any;
|
|
1995
|
+
}, createOptions?: CreateOptions): TransformablePropValue$1<"keyValue", {
|
|
1996
|
+
value?: any;
|
|
1997
|
+
key?: any;
|
|
1998
|
+
}>;
|
|
1999
|
+
(value: (prev?: {
|
|
2000
|
+
value?: any;
|
|
2001
|
+
key?: any;
|
|
2002
|
+
} | undefined) => {
|
|
2003
|
+
value?: any;
|
|
2004
|
+
key?: any;
|
|
2005
|
+
}, createOptions: CreateOptions): TransformablePropValue$1<"keyValue", {
|
|
2006
|
+
value?: any;
|
|
2007
|
+
key?: any;
|
|
2008
|
+
}>;
|
|
2009
|
+
};
|
|
2010
|
+
schema: z.ZodObject<{
|
|
2011
|
+
$$type: z.ZodLiteral<"keyValue">;
|
|
2012
|
+
value: z.ZodType<{
|
|
2013
|
+
value?: any;
|
|
2014
|
+
key?: any;
|
|
2015
|
+
}, z.ZodTypeDef, {
|
|
2016
|
+
value?: any;
|
|
2017
|
+
key?: any;
|
|
2018
|
+
}>;
|
|
2019
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
2020
|
+
}, "strict", z.ZodTypeAny, {
|
|
2021
|
+
$$type: "keyValue";
|
|
2022
|
+
value: {
|
|
2023
|
+
value?: any;
|
|
2024
|
+
key?: any;
|
|
2025
|
+
};
|
|
2026
|
+
disabled?: boolean | undefined;
|
|
2027
|
+
}, {
|
|
2028
|
+
$$type: "keyValue";
|
|
2029
|
+
value: {
|
|
2030
|
+
value?: any;
|
|
2031
|
+
key?: any;
|
|
2032
|
+
};
|
|
2033
|
+
disabled?: boolean | undefined;
|
|
2034
|
+
}>;
|
|
2035
|
+
key: "keyValue";
|
|
2036
|
+
};
|
|
2037
|
+
type KeyValuePropValue = z.infer<typeof keyValuePropTypeUtil.schema>;
|
|
2038
|
+
|
|
2039
|
+
declare const positionPropTypeUtil: {
|
|
2040
|
+
extract: (prop: unknown) => {
|
|
2041
|
+
x: {
|
|
2042
|
+
$$type: "size";
|
|
2043
|
+
value: {
|
|
2044
|
+
size: number;
|
|
2045
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2046
|
+
} | {
|
|
2047
|
+
size: "";
|
|
2048
|
+
unit: "auto";
|
|
2049
|
+
} | {
|
|
2050
|
+
size: string;
|
|
2051
|
+
unit: "custom";
|
|
2052
|
+
};
|
|
2053
|
+
disabled?: boolean | undefined;
|
|
2054
|
+
} | null;
|
|
2055
|
+
y: {
|
|
2056
|
+
$$type: "size";
|
|
2057
|
+
value: {
|
|
2058
|
+
size: number;
|
|
2059
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2060
|
+
} | {
|
|
2061
|
+
size: "";
|
|
2062
|
+
unit: "auto";
|
|
2063
|
+
} | {
|
|
2064
|
+
size: string;
|
|
2065
|
+
unit: "custom";
|
|
2066
|
+
};
|
|
2067
|
+
disabled?: boolean | undefined;
|
|
2068
|
+
} | null;
|
|
2069
|
+
} | null;
|
|
2070
|
+
isValid: (prop: unknown) => prop is TransformablePropValue$1<"object-position", {
|
|
2071
|
+
x: {
|
|
2072
|
+
$$type: "size";
|
|
2073
|
+
value: {
|
|
2074
|
+
size: number;
|
|
2075
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2076
|
+
} | {
|
|
2077
|
+
size: "";
|
|
2078
|
+
unit: "auto";
|
|
2079
|
+
} | {
|
|
2080
|
+
size: string;
|
|
2081
|
+
unit: "custom";
|
|
2082
|
+
};
|
|
2083
|
+
disabled?: boolean | undefined;
|
|
2084
|
+
} | null;
|
|
2085
|
+
y: {
|
|
2086
|
+
$$type: "size";
|
|
2087
|
+
value: {
|
|
2088
|
+
size: number;
|
|
2089
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2090
|
+
} | {
|
|
2091
|
+
size: "";
|
|
2092
|
+
unit: "auto";
|
|
2093
|
+
} | {
|
|
2094
|
+
size: string;
|
|
2095
|
+
unit: "custom";
|
|
2096
|
+
};
|
|
2097
|
+
disabled?: boolean | undefined;
|
|
2098
|
+
} | null;
|
|
2099
|
+
}>;
|
|
2100
|
+
create: {
|
|
2101
|
+
(value: {
|
|
2102
|
+
x: {
|
|
2103
|
+
$$type: "size";
|
|
2104
|
+
value: {
|
|
2105
|
+
size: number;
|
|
2106
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2107
|
+
} | {
|
|
2108
|
+
size: "";
|
|
2109
|
+
unit: "auto";
|
|
2110
|
+
} | {
|
|
2111
|
+
size: string;
|
|
2112
|
+
unit: "custom";
|
|
2113
|
+
};
|
|
2114
|
+
disabled?: boolean | undefined;
|
|
2115
|
+
} | null;
|
|
2116
|
+
y: {
|
|
2117
|
+
$$type: "size";
|
|
2118
|
+
value: {
|
|
2119
|
+
size: number;
|
|
2120
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2121
|
+
} | {
|
|
2122
|
+
size: "";
|
|
2123
|
+
unit: "auto";
|
|
2124
|
+
} | {
|
|
2125
|
+
size: string;
|
|
2126
|
+
unit: "custom";
|
|
2127
|
+
};
|
|
2128
|
+
disabled?: boolean | undefined;
|
|
2129
|
+
} | null;
|
|
2130
|
+
}): TransformablePropValue$1<"object-position", {
|
|
2131
|
+
x: {
|
|
2132
|
+
$$type: "size";
|
|
2133
|
+
value: {
|
|
2134
|
+
size: number;
|
|
2135
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2136
|
+
} | {
|
|
2137
|
+
size: "";
|
|
2138
|
+
unit: "auto";
|
|
2139
|
+
} | {
|
|
2140
|
+
size: string;
|
|
2141
|
+
unit: "custom";
|
|
2142
|
+
};
|
|
2143
|
+
disabled?: boolean | undefined;
|
|
2144
|
+
} | null;
|
|
2145
|
+
y: {
|
|
2146
|
+
$$type: "size";
|
|
2147
|
+
value: {
|
|
2148
|
+
size: number;
|
|
2149
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2150
|
+
} | {
|
|
2151
|
+
size: "";
|
|
2152
|
+
unit: "auto";
|
|
2153
|
+
} | {
|
|
2154
|
+
size: string;
|
|
2155
|
+
unit: "custom";
|
|
2156
|
+
};
|
|
2157
|
+
disabled?: boolean | undefined;
|
|
2158
|
+
} | null;
|
|
2159
|
+
}>;
|
|
2160
|
+
(value: {
|
|
2161
|
+
x: {
|
|
2162
|
+
$$type: "size";
|
|
2163
|
+
value: {
|
|
2164
|
+
size: number;
|
|
2165
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2166
|
+
} | {
|
|
2167
|
+
size: "";
|
|
2168
|
+
unit: "auto";
|
|
2169
|
+
} | {
|
|
2170
|
+
size: string;
|
|
2171
|
+
unit: "custom";
|
|
2172
|
+
};
|
|
2173
|
+
disabled?: boolean | undefined;
|
|
2174
|
+
} | null;
|
|
2175
|
+
y: {
|
|
2176
|
+
$$type: "size";
|
|
2177
|
+
value: {
|
|
2178
|
+
size: number;
|
|
2179
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2180
|
+
} | {
|
|
2181
|
+
size: "";
|
|
2182
|
+
unit: "auto";
|
|
2183
|
+
} | {
|
|
2184
|
+
size: string;
|
|
2185
|
+
unit: "custom";
|
|
2186
|
+
};
|
|
2187
|
+
disabled?: boolean | undefined;
|
|
2188
|
+
} | null;
|
|
2189
|
+
}, createOptions?: CreateOptions): TransformablePropValue$1<"object-position", {
|
|
2190
|
+
x: {
|
|
2191
|
+
$$type: "size";
|
|
2192
|
+
value: {
|
|
2193
|
+
size: number;
|
|
2194
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2195
|
+
} | {
|
|
2196
|
+
size: "";
|
|
2197
|
+
unit: "auto";
|
|
2198
|
+
} | {
|
|
2199
|
+
size: string;
|
|
2200
|
+
unit: "custom";
|
|
2201
|
+
};
|
|
2202
|
+
disabled?: boolean | undefined;
|
|
2203
|
+
} | null;
|
|
2204
|
+
y: {
|
|
2205
|
+
$$type: "size";
|
|
2206
|
+
value: {
|
|
2207
|
+
size: number;
|
|
2208
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2209
|
+
} | {
|
|
2210
|
+
size: "";
|
|
2211
|
+
unit: "auto";
|
|
2212
|
+
} | {
|
|
2213
|
+
size: string;
|
|
2214
|
+
unit: "custom";
|
|
2215
|
+
};
|
|
2216
|
+
disabled?: boolean | undefined;
|
|
2217
|
+
} | null;
|
|
2218
|
+
}>;
|
|
2219
|
+
(value: (prev?: {
|
|
2220
|
+
x: {
|
|
2221
|
+
$$type: "size";
|
|
2222
|
+
value: {
|
|
2223
|
+
size: number;
|
|
2224
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2225
|
+
} | {
|
|
2226
|
+
size: "";
|
|
2227
|
+
unit: "auto";
|
|
2228
|
+
} | {
|
|
2229
|
+
size: string;
|
|
2230
|
+
unit: "custom";
|
|
2231
|
+
};
|
|
2232
|
+
disabled?: boolean | undefined;
|
|
2233
|
+
} | null;
|
|
2234
|
+
y: {
|
|
2235
|
+
$$type: "size";
|
|
2236
|
+
value: {
|
|
2237
|
+
size: number;
|
|
2238
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2239
|
+
} | {
|
|
2240
|
+
size: "";
|
|
2241
|
+
unit: "auto";
|
|
2242
|
+
} | {
|
|
2243
|
+
size: string;
|
|
2244
|
+
unit: "custom";
|
|
2245
|
+
};
|
|
2246
|
+
disabled?: boolean | undefined;
|
|
2247
|
+
} | null;
|
|
2248
|
+
} | undefined) => {
|
|
2249
|
+
x: {
|
|
2250
|
+
$$type: "size";
|
|
2251
|
+
value: {
|
|
2252
|
+
size: number;
|
|
2253
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2254
|
+
} | {
|
|
2255
|
+
size: "";
|
|
2256
|
+
unit: "auto";
|
|
2257
|
+
} | {
|
|
2258
|
+
size: string;
|
|
2259
|
+
unit: "custom";
|
|
2260
|
+
};
|
|
2261
|
+
disabled?: boolean | undefined;
|
|
2262
|
+
} | null;
|
|
2263
|
+
y: {
|
|
2264
|
+
$$type: "size";
|
|
2265
|
+
value: {
|
|
2266
|
+
size: number;
|
|
2267
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2268
|
+
} | {
|
|
2269
|
+
size: "";
|
|
2270
|
+
unit: "auto";
|
|
2271
|
+
} | {
|
|
2272
|
+
size: string;
|
|
2273
|
+
unit: "custom";
|
|
2274
|
+
};
|
|
2275
|
+
disabled?: boolean | undefined;
|
|
2276
|
+
} | null;
|
|
2277
|
+
}, createOptions: CreateOptions): TransformablePropValue$1<"object-position", {
|
|
2278
|
+
x: {
|
|
2279
|
+
$$type: "size";
|
|
2280
|
+
value: {
|
|
2281
|
+
size: number;
|
|
2282
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2283
|
+
} | {
|
|
2284
|
+
size: "";
|
|
2285
|
+
unit: "auto";
|
|
2286
|
+
} | {
|
|
2287
|
+
size: string;
|
|
2288
|
+
unit: "custom";
|
|
2289
|
+
};
|
|
2290
|
+
disabled?: boolean | undefined;
|
|
2291
|
+
} | null;
|
|
2292
|
+
y: {
|
|
2293
|
+
$$type: "size";
|
|
2294
|
+
value: {
|
|
2295
|
+
size: number;
|
|
2296
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2297
|
+
} | {
|
|
2298
|
+
size: "";
|
|
2299
|
+
unit: "auto";
|
|
2300
|
+
} | {
|
|
2301
|
+
size: string;
|
|
2302
|
+
unit: "custom";
|
|
2303
|
+
};
|
|
2304
|
+
disabled?: boolean | undefined;
|
|
2305
|
+
} | null;
|
|
2306
|
+
}>;
|
|
2307
|
+
};
|
|
2308
|
+
schema: z.ZodObject<{
|
|
2309
|
+
$$type: z.ZodLiteral<"object-position">;
|
|
2310
|
+
value: z.ZodType<{
|
|
2311
|
+
x: {
|
|
2312
|
+
$$type: "size";
|
|
2313
|
+
value: {
|
|
2314
|
+
size: number;
|
|
2315
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2316
|
+
} | {
|
|
2317
|
+
size: "";
|
|
2318
|
+
unit: "auto";
|
|
2319
|
+
} | {
|
|
2320
|
+
size: string;
|
|
2321
|
+
unit: "custom";
|
|
2322
|
+
};
|
|
2323
|
+
disabled?: boolean | undefined;
|
|
2324
|
+
} | null;
|
|
2325
|
+
y: {
|
|
2326
|
+
$$type: "size";
|
|
2327
|
+
value: {
|
|
2328
|
+
size: number;
|
|
2329
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2330
|
+
} | {
|
|
2331
|
+
size: "";
|
|
2332
|
+
unit: "auto";
|
|
2333
|
+
} | {
|
|
2334
|
+
size: string;
|
|
2335
|
+
unit: "custom";
|
|
2336
|
+
};
|
|
2337
|
+
disabled?: boolean | undefined;
|
|
2338
|
+
} | null;
|
|
2339
|
+
}, z.ZodTypeDef, {
|
|
2340
|
+
x: {
|
|
2341
|
+
$$type: "size";
|
|
2342
|
+
value: {
|
|
2343
|
+
size: number;
|
|
2344
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2345
|
+
} | {
|
|
2346
|
+
size: "";
|
|
2347
|
+
unit: "auto";
|
|
2348
|
+
} | {
|
|
2349
|
+
size: string;
|
|
2350
|
+
unit: "custom";
|
|
2351
|
+
};
|
|
2352
|
+
disabled?: boolean | undefined;
|
|
2353
|
+
} | null;
|
|
2354
|
+
y: {
|
|
2355
|
+
$$type: "size";
|
|
2356
|
+
value: {
|
|
2357
|
+
size: number;
|
|
2358
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2359
|
+
} | {
|
|
2360
|
+
size: "";
|
|
2361
|
+
unit: "auto";
|
|
2362
|
+
} | {
|
|
2363
|
+
size: string;
|
|
2364
|
+
unit: "custom";
|
|
2365
|
+
};
|
|
2366
|
+
disabled?: boolean | undefined;
|
|
2367
|
+
} | null;
|
|
2368
|
+
}>;
|
|
2369
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
2370
|
+
}, "strict", z.ZodTypeAny, {
|
|
2371
|
+
$$type: "object-position";
|
|
2372
|
+
value: {
|
|
2373
|
+
x: {
|
|
2374
|
+
$$type: "size";
|
|
2375
|
+
value: {
|
|
2376
|
+
size: number;
|
|
2377
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2378
|
+
} | {
|
|
2379
|
+
size: "";
|
|
2380
|
+
unit: "auto";
|
|
2381
|
+
} | {
|
|
2382
|
+
size: string;
|
|
2383
|
+
unit: "custom";
|
|
2384
|
+
};
|
|
2385
|
+
disabled?: boolean | undefined;
|
|
2386
|
+
} | null;
|
|
2387
|
+
y: {
|
|
2388
|
+
$$type: "size";
|
|
2389
|
+
value: {
|
|
2390
|
+
size: number;
|
|
2391
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2392
|
+
} | {
|
|
2393
|
+
size: "";
|
|
2394
|
+
unit: "auto";
|
|
2395
|
+
} | {
|
|
2396
|
+
size: string;
|
|
2397
|
+
unit: "custom";
|
|
2398
|
+
};
|
|
2399
|
+
disabled?: boolean | undefined;
|
|
2400
|
+
} | null;
|
|
2401
|
+
};
|
|
2402
|
+
disabled?: boolean | undefined;
|
|
2403
|
+
}, {
|
|
2404
|
+
$$type: "object-position";
|
|
2405
|
+
value: {
|
|
2406
|
+
x: {
|
|
2407
|
+
$$type: "size";
|
|
2408
|
+
value: {
|
|
2409
|
+
size: number;
|
|
2410
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2411
|
+
} | {
|
|
2412
|
+
size: "";
|
|
2413
|
+
unit: "auto";
|
|
2414
|
+
} | {
|
|
2415
|
+
size: string;
|
|
2416
|
+
unit: "custom";
|
|
2417
|
+
};
|
|
2418
|
+
disabled?: boolean | undefined;
|
|
2419
|
+
} | null;
|
|
2420
|
+
y: {
|
|
2421
|
+
$$type: "size";
|
|
2422
|
+
value: {
|
|
2423
|
+
size: number;
|
|
2424
|
+
unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
|
|
2425
|
+
} | {
|
|
2426
|
+
size: "";
|
|
2427
|
+
unit: "auto";
|
|
2428
|
+
} | {
|
|
2429
|
+
size: string;
|
|
2430
|
+
unit: "custom";
|
|
2431
|
+
};
|
|
2432
|
+
disabled?: boolean | undefined;
|
|
2433
|
+
} | null;
|
|
2434
|
+
};
|
|
2435
|
+
disabled?: boolean | undefined;
|
|
2436
|
+
}>;
|
|
2437
|
+
key: "object-position";
|
|
2438
|
+
};
|
|
2439
|
+
type PositionPropTypeValue = z.infer<typeof positionPropTypeUtil.schema>;
|
|
2440
|
+
|
|
1850
2441
|
declare function mergeProps(current: Props, updates: Props): Props;
|
|
1851
2442
|
|
|
1852
2443
|
declare const transformableSchema: z.ZodObject<{
|
|
@@ -1869,4 +2460,4 @@ declare const filterEmptyValues: <TValue extends PropValue>(value: TValue) => TV
|
|
|
1869
2460
|
type Nullish = null | undefined | '';
|
|
1870
2461
|
declare const isEmpty: (value: PropValue) => value is Nullish;
|
|
1871
2462
|
|
|
1872
|
-
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 PropTypeKey, 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, filterEmptyValues, gradientColorStopPropTypeUtil, imageAttachmentIdPropType, imagePropTypeUtil, imageSrcPropTypeUtil, isEmpty, isTransformable, layoutDirectionPropTypeUtil, linkPropTypeUtil, mergeProps, numberPropTypeUtil, shadowPropTypeUtil, sizePropTypeUtil, stringPropTypeUtil, strokePropTypeUtil, urlPropTypeUtil };
|
|
2463
|
+
export { type AnyTransformable, type ArrayPropType, type ArrayPropValue, type BackgroundColorOverlayPropValue, type BackgroundGradientOverlayPropValue, type BackgroundImageOverlayPropValue, type BackgroundImagePositionOffsetPropValue, type BackgroundImageSizeScalePropValue, type BackgroundOverlayImagePropType, type BackgroundOverlayItemPropValue, type BackgroundOverlayPropType, 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 KeyValuePropValue, type LayoutDirectionPropValue, type LinkPropValue, type NumberPropValue, type ObjectPropType, type ObjectPropValue, type PlainPropType, type PlainPropValue, type PositionPropTypeValue, type PropKey, type PropType, type PropTypeKey, 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, createArrayPropUtils, createPropUtils, dimensionsPropTypeUtil, filterEmptyValues, gradientColorStopPropTypeUtil, imageAttachmentIdPropType, imagePropTypeUtil, imageSrcPropTypeUtil, isEmpty, isTransformable, keyValuePropTypeUtil, layoutDirectionPropTypeUtil, linkPropTypeUtil, mergeProps, numberPropTypeUtil, positionPropTypeUtil, shadowPropTypeUtil, sizePropTypeUtil, stringPropTypeUtil, strokePropTypeUtil, urlPropTypeUtil };
|