@elementor/editor-props 3.33.0-271 → 3.33.0-272
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.mts +64 -21
- package/dist/index.d.ts +64 -21
- package/dist/index.js +324 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +322 -37
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +17 -5
- package/src/types.ts +8 -3
- package/src/utils/adjust-llm-prop-value-schema.ts +75 -0
- package/src/utils/create-prop-utils.ts +10 -1
- package/src/utils/llm-schema-to-props.ts +190 -0
- package/src/utils/prop-json-schema.ts +17 -0
- package/src/utils/props-to-llm-schema.ts +172 -0
package/dist/index.d.mts
CHANGED
|
@@ -12,11 +12,15 @@ type Dependency = {
|
|
|
12
12
|
relation: 'or' | 'and';
|
|
13
13
|
terms: (DependencyTerm | Dependency)[];
|
|
14
14
|
};
|
|
15
|
+
type BasePropTypeMeta = {
|
|
16
|
+
description?: string;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
};
|
|
15
19
|
type BasePropType<TValue> = {
|
|
16
20
|
default?: TValue | null;
|
|
17
21
|
initial_value?: TValue | null;
|
|
18
22
|
settings: Record<string, unknown>;
|
|
19
|
-
meta:
|
|
23
|
+
meta: BasePropTypeMeta;
|
|
20
24
|
dependencies?: Dependency;
|
|
21
25
|
};
|
|
22
26
|
type PlainPropType = BasePropType<PlainPropValue> & {
|
|
@@ -54,8 +58,10 @@ type UnionPropType = BasePropType<PropValue> & {
|
|
|
54
58
|
kind: 'union';
|
|
55
59
|
prop_types: Record<string, TransformablePropType>;
|
|
56
60
|
};
|
|
57
|
-
type PropType = TransformablePropType | UnionPropType;
|
|
58
|
-
type PropsSchema = Record<string, PropType
|
|
61
|
+
type PropType<T = object> = (TransformablePropType | UnionPropType) & T;
|
|
62
|
+
type PropsSchema = Record<string, PropType<{
|
|
63
|
+
key?: string;
|
|
64
|
+
}>>;
|
|
59
65
|
type MaybeArray<T> = T | T[];
|
|
60
66
|
type TransformablePropValue$1<Type extends string, Value = unknown> = {
|
|
61
67
|
$$type: Type;
|
|
@@ -70,6 +76,28 @@ type PropValue = PlainPropValue | TransformablePropValue$1<string>;
|
|
|
70
76
|
type PropKey = string;
|
|
71
77
|
type Props = Record<PropKey, PropValue>;
|
|
72
78
|
|
|
79
|
+
type JsonSchema7 = {
|
|
80
|
+
type?: string | string[];
|
|
81
|
+
properties?: Record<string, JsonSchema7>;
|
|
82
|
+
items?: JsonSchema7;
|
|
83
|
+
enum?: unknown[];
|
|
84
|
+
anyOf?: JsonSchema7[];
|
|
85
|
+
oneOf?: JsonSchema7[];
|
|
86
|
+
allOf?: JsonSchema7[];
|
|
87
|
+
required?: string[];
|
|
88
|
+
description?: string;
|
|
89
|
+
default?: unknown;
|
|
90
|
+
if?: JsonSchema7;
|
|
91
|
+
then?: JsonSchema7;
|
|
92
|
+
else?: JsonSchema7;
|
|
93
|
+
key?: string;
|
|
94
|
+
[key: string]: unknown;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
declare function jsonSchemaToPropType(schema: JsonSchema7, key?: string): PropType;
|
|
98
|
+
|
|
99
|
+
declare function propTypeToJsonSchema(propType: PropType, key?: string): JsonSchema7;
|
|
100
|
+
|
|
73
101
|
type Updater<T> = (prev?: T) => T;
|
|
74
102
|
type CreateOptions = {
|
|
75
103
|
base?: unknown;
|
|
@@ -90,6 +118,7 @@ type PropTypeUtil<TKey extends string, TValue extends PropValue> = ReturnType<ty
|
|
|
90
118
|
*
|
|
91
119
|
* ```
|
|
92
120
|
*/
|
|
121
|
+
declare function getPropSchemaFromCache(key: string): PropTypeUtil<string, PropValue> | undefined;
|
|
93
122
|
declare function createPropUtils<TKey extends string, TValue extends PropValue>(key: TKey, valueSchema: ZodType<TValue>): {
|
|
94
123
|
extract: (prop: unknown) => TValue | null;
|
|
95
124
|
isValid: (prop: unknown) => prop is TransformablePropValue$1<TKey, TValue>;
|
|
@@ -102,15 +131,23 @@ declare function createPropUtils<TKey extends string, TValue extends PropValue>(
|
|
|
102
131
|
$$type: z.ZodLiteral<TKey>;
|
|
103
132
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
104
133
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
105
|
-
}, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
134
|
+
}, "strict", z.ZodTypeAny, { [k in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
135
|
+
$$type: z.ZodLiteral<TKey>;
|
|
136
|
+
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
137
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
138
|
+
}>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
139
|
+
$$type: z.ZodLiteral<TKey>;
|
|
140
|
+
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
141
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
142
|
+
}>, any>[k]; }, { [k_1 in keyof z.baseObjectInputType<{
|
|
106
143
|
$$type: z.ZodLiteral<TKey>;
|
|
107
144
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
108
145
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
109
|
-
}
|
|
146
|
+
}>]: z.baseObjectInputType<{
|
|
110
147
|
$$type: z.ZodLiteral<TKey>;
|
|
111
148
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
112
149
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
-
}>
|
|
150
|
+
}>[k_1]; }>;
|
|
114
151
|
key: TKey;
|
|
115
152
|
};
|
|
116
153
|
declare function createArrayPropUtils<TKey extends string, TValue extends PropValue>(key: TKey, valueSchema: ZodType<TValue>, overrideKey?: string): {
|
|
@@ -6065,17 +6102,9 @@ declare const hueRotateFilterPropTypeUtil: {
|
|
|
6065
6102
|
key: "hue-rotate";
|
|
6066
6103
|
};
|
|
6067
6104
|
|
|
6068
|
-
declare
|
|
6069
|
-
|
|
6070
|
-
declare
|
|
6071
|
-
isMet: true;
|
|
6072
|
-
} | {
|
|
6073
|
-
isMet: false;
|
|
6074
|
-
failingDependencies: DependencyTerm[];
|
|
6075
|
-
};
|
|
6076
|
-
declare function evaluateTerm(term: DependencyTerm, actualValue: unknown): boolean;
|
|
6077
|
-
declare function extractValue(path: string[], elementValues: PropValue): TransformablePropValue$1<PropKey> | null;
|
|
6078
|
-
declare function isDependency(term: DependencyTerm | Dependency): term is Dependency;
|
|
6105
|
+
declare const filterEmptyValues: <TValue extends PropValue>(value: TValue) => TValue | null;
|
|
6106
|
+
type Nullish = null | undefined | '';
|
|
6107
|
+
declare const isEmpty: (value: PropValue) => value is Nullish;
|
|
6079
6108
|
|
|
6080
6109
|
declare const transformableSchema: z.ZodObject<{
|
|
6081
6110
|
$$type: z.ZodString;
|
|
@@ -6093,8 +6122,22 @@ declare const transformableSchema: z.ZodObject<{
|
|
|
6093
6122
|
type TransformablePropValue = z.infer<typeof transformableSchema>;
|
|
6094
6123
|
declare const isTransformable: (value: unknown) => value is TransformablePropValue;
|
|
6095
6124
|
|
|
6096
|
-
declare
|
|
6097
|
-
|
|
6098
|
-
declare
|
|
6125
|
+
declare function mergeProps(current: Props, updates: Props): Props;
|
|
6126
|
+
|
|
6127
|
+
declare function isDependencyMet(dependency: Dependency | undefined, values: PropValue): {
|
|
6128
|
+
isMet: true;
|
|
6129
|
+
} | {
|
|
6130
|
+
isMet: false;
|
|
6131
|
+
failingDependencies: DependencyTerm[];
|
|
6132
|
+
};
|
|
6133
|
+
declare function evaluateTerm(term: DependencyTerm, actualValue: unknown): boolean;
|
|
6134
|
+
declare function extractValue(path: string[], elementValues: PropValue): TransformablePropValue$1<PropKey> | null;
|
|
6135
|
+
declare function isDependency(term: DependencyTerm | Dependency): term is Dependency;
|
|
6136
|
+
|
|
6137
|
+
declare const Schema: {
|
|
6138
|
+
jsonSchemaToPropType: typeof jsonSchemaToPropType;
|
|
6139
|
+
propTypeToJsonSchema: typeof propTypeToJsonSchema;
|
|
6140
|
+
adjustLlmPropValueSchema: (value: Readonly<PropValue>, forceKey?: string) => PropValue;
|
|
6141
|
+
};
|
|
6099
6142
|
|
|
6100
|
-
export { type AnyTransformable, type ArrayPropType, type ArrayPropValue, type BackdropFilterItemPropValue, type BackdropFilterPropValue, 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, DateTimePropTypeUtil, type DateTimePropValue, type Dependency, type DependencyOperator, type DependencyTerm, type DimensionsPropValue, type DropShadowFilterPropValue, type FilterItemPropValue, type FilterPropValue, type FlexPropValue, type GradientColorStopPropValue, type HtmlPropValue, type ImageAttachmentIdPropValue, type ImagePropValue, type ImageSrcPropValue, type KeyValuePropValue, type LayoutDirectionPropValue, type LinkPropValue, type MoveTransformPropValue, type NumberPropValue, type ObjectPropType, type ObjectPropValue, type PerspectiveOriginPropValue, type PlainPropType, type PlainPropValue, type PositionPropTypeValue, type PropKey, type PropType, type PropTypeKey, type PropTypeUtil, type PropValue, type Props, type PropsSchema, type QueryPropValue, type RotateTransformPropValue, type ScaleTransformPropValue, type SelectionSizePropValue, type ShadowPropValue, type SizePropValue, type SkewTransformPropValue, type StringPropValue, type StrokePropValue, type TransformFunctionsItemPropValue, type TransformFunctionsPropValue, type TransformOriginPropValue, type TransformPropValue, type TransformablePropType, type TransformablePropValue$1 as TransformablePropValue, type UnionPropType, type UrlPropValue, backdropFilterPropTypeUtil, backgroundColorOverlayPropTypeUtil, backgroundGradientOverlayPropTypeUtil, backgroundImageOverlayPropTypeUtil, backgroundImagePositionOffsetPropTypeUtil, backgroundImageSizeScalePropTypeUtil, backgroundOverlayItem, backgroundOverlayPropTypeUtil, backgroundPropTypeUtil, blurFilterPropTypeUtil, booleanPropTypeUtil, borderRadiusPropTypeUtil, borderWidthPropTypeUtil, boxShadowPropTypeUtil, classesPropTypeUtil, colorPropTypeUtil, colorStopPropTypeUtil, colorToneFilterPropTypeUtil, createArrayPropUtils, createPropUtils, cssFilterFunctionPropUtil, dimensionsPropTypeUtil, dropShadowFilterPropTypeUtil, evaluateTerm, extractValue, filterEmptyValues, filterPropTypeUtil, flexPropTypeUtil, gradientColorStopPropTypeUtil, htmlPropTypeUtil, hueRotateFilterPropTypeUtil, imageAttachmentIdPropType, imagePropTypeUtil, imageSrcPropTypeUtil, intensityFilterPropTypeUtil, isDependency, isDependencyMet, isEmpty, isTransformable, keyValuePropTypeUtil, layoutDirectionPropTypeUtil, linkPropTypeUtil, mergeProps, moveTransformPropTypeUtil, numberPropTypeUtil, perspectiveOriginPropTypeUtil, positionPropTypeUtil, queryPropTypeUtil, rotateTransformPropTypeUtil, scaleTransformPropTypeUtil, selectionSizePropTypeUtil, shadowPropTypeUtil, sizePropTypeUtil, skewTransformPropTypeUtil, stringPropTypeUtil, strokePropTypeUtil, transformFunctionsPropTypeUtil, transformOriginPropTypeUtil, transformPropTypeUtil, urlPropTypeUtil };
|
|
6143
|
+
export { type AnyTransformable, type ArrayPropType, type ArrayPropValue, type BackdropFilterItemPropValue, type BackdropFilterPropValue, 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, DateTimePropTypeUtil, type DateTimePropValue, type Dependency, type DependencyOperator, type DependencyTerm, type DimensionsPropValue, type DropShadowFilterPropValue, type FilterItemPropValue, type FilterPropValue, type FlexPropValue, type GradientColorStopPropValue, type HtmlPropValue, type ImageAttachmentIdPropValue, type ImagePropValue, type ImageSrcPropValue, type JsonSchema7, type KeyValuePropValue, type LayoutDirectionPropValue, type LinkPropValue, type MoveTransformPropValue, type NumberPropValue, type ObjectPropType, type ObjectPropValue, type PerspectiveOriginPropValue, type PlainPropType, type PlainPropValue, type PositionPropTypeValue, type PropKey, type PropType, type PropTypeKey, type PropTypeUtil, type PropValue, type Props, type PropsSchema, type QueryPropValue, type RotateTransformPropValue, type ScaleTransformPropValue, Schema, type SelectionSizePropValue, type ShadowPropValue, type SizePropValue, type SkewTransformPropValue, type StringPropValue, type StrokePropValue, type TransformFunctionsItemPropValue, type TransformFunctionsPropValue, type TransformOriginPropValue, type TransformPropValue, type TransformablePropType, type TransformablePropValue$1 as TransformablePropValue, type UnionPropType, type UrlPropValue, backdropFilterPropTypeUtil, backgroundColorOverlayPropTypeUtil, backgroundGradientOverlayPropTypeUtil, backgroundImageOverlayPropTypeUtil, backgroundImagePositionOffsetPropTypeUtil, backgroundImageSizeScalePropTypeUtil, backgroundOverlayItem, backgroundOverlayPropTypeUtil, backgroundPropTypeUtil, blurFilterPropTypeUtil, booleanPropTypeUtil, borderRadiusPropTypeUtil, borderWidthPropTypeUtil, boxShadowPropTypeUtil, classesPropTypeUtil, colorPropTypeUtil, colorStopPropTypeUtil, colorToneFilterPropTypeUtil, createArrayPropUtils, createPropUtils, cssFilterFunctionPropUtil, dimensionsPropTypeUtil, dropShadowFilterPropTypeUtil, evaluateTerm, extractValue, filterEmptyValues, filterPropTypeUtil, flexPropTypeUtil, getPropSchemaFromCache, gradientColorStopPropTypeUtil, htmlPropTypeUtil, hueRotateFilterPropTypeUtil, imageAttachmentIdPropType, imagePropTypeUtil, imageSrcPropTypeUtil, intensityFilterPropTypeUtil, isDependency, isDependencyMet, isEmpty, isTransformable, keyValuePropTypeUtil, layoutDirectionPropTypeUtil, linkPropTypeUtil, mergeProps, moveTransformPropTypeUtil, numberPropTypeUtil, perspectiveOriginPropTypeUtil, positionPropTypeUtil, queryPropTypeUtil, rotateTransformPropTypeUtil, scaleTransformPropTypeUtil, selectionSizePropTypeUtil, shadowPropTypeUtil, sizePropTypeUtil, skewTransformPropTypeUtil, stringPropTypeUtil, strokePropTypeUtil, transformFunctionsPropTypeUtil, transformOriginPropTypeUtil, transformPropTypeUtil, urlPropTypeUtil };
|
package/dist/index.d.ts
CHANGED
|
@@ -12,11 +12,15 @@ type Dependency = {
|
|
|
12
12
|
relation: 'or' | 'and';
|
|
13
13
|
terms: (DependencyTerm | Dependency)[];
|
|
14
14
|
};
|
|
15
|
+
type BasePropTypeMeta = {
|
|
16
|
+
description?: string;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
};
|
|
15
19
|
type BasePropType<TValue> = {
|
|
16
20
|
default?: TValue | null;
|
|
17
21
|
initial_value?: TValue | null;
|
|
18
22
|
settings: Record<string, unknown>;
|
|
19
|
-
meta:
|
|
23
|
+
meta: BasePropTypeMeta;
|
|
20
24
|
dependencies?: Dependency;
|
|
21
25
|
};
|
|
22
26
|
type PlainPropType = BasePropType<PlainPropValue> & {
|
|
@@ -54,8 +58,10 @@ type UnionPropType = BasePropType<PropValue> & {
|
|
|
54
58
|
kind: 'union';
|
|
55
59
|
prop_types: Record<string, TransformablePropType>;
|
|
56
60
|
};
|
|
57
|
-
type PropType = TransformablePropType | UnionPropType;
|
|
58
|
-
type PropsSchema = Record<string, PropType
|
|
61
|
+
type PropType<T = object> = (TransformablePropType | UnionPropType) & T;
|
|
62
|
+
type PropsSchema = Record<string, PropType<{
|
|
63
|
+
key?: string;
|
|
64
|
+
}>>;
|
|
59
65
|
type MaybeArray<T> = T | T[];
|
|
60
66
|
type TransformablePropValue$1<Type extends string, Value = unknown> = {
|
|
61
67
|
$$type: Type;
|
|
@@ -70,6 +76,28 @@ type PropValue = PlainPropValue | TransformablePropValue$1<string>;
|
|
|
70
76
|
type PropKey = string;
|
|
71
77
|
type Props = Record<PropKey, PropValue>;
|
|
72
78
|
|
|
79
|
+
type JsonSchema7 = {
|
|
80
|
+
type?: string | string[];
|
|
81
|
+
properties?: Record<string, JsonSchema7>;
|
|
82
|
+
items?: JsonSchema7;
|
|
83
|
+
enum?: unknown[];
|
|
84
|
+
anyOf?: JsonSchema7[];
|
|
85
|
+
oneOf?: JsonSchema7[];
|
|
86
|
+
allOf?: JsonSchema7[];
|
|
87
|
+
required?: string[];
|
|
88
|
+
description?: string;
|
|
89
|
+
default?: unknown;
|
|
90
|
+
if?: JsonSchema7;
|
|
91
|
+
then?: JsonSchema7;
|
|
92
|
+
else?: JsonSchema7;
|
|
93
|
+
key?: string;
|
|
94
|
+
[key: string]: unknown;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
declare function jsonSchemaToPropType(schema: JsonSchema7, key?: string): PropType;
|
|
98
|
+
|
|
99
|
+
declare function propTypeToJsonSchema(propType: PropType, key?: string): JsonSchema7;
|
|
100
|
+
|
|
73
101
|
type Updater<T> = (prev?: T) => T;
|
|
74
102
|
type CreateOptions = {
|
|
75
103
|
base?: unknown;
|
|
@@ -90,6 +118,7 @@ type PropTypeUtil<TKey extends string, TValue extends PropValue> = ReturnType<ty
|
|
|
90
118
|
*
|
|
91
119
|
* ```
|
|
92
120
|
*/
|
|
121
|
+
declare function getPropSchemaFromCache(key: string): PropTypeUtil<string, PropValue> | undefined;
|
|
93
122
|
declare function createPropUtils<TKey extends string, TValue extends PropValue>(key: TKey, valueSchema: ZodType<TValue>): {
|
|
94
123
|
extract: (prop: unknown) => TValue | null;
|
|
95
124
|
isValid: (prop: unknown) => prop is TransformablePropValue$1<TKey, TValue>;
|
|
@@ -102,15 +131,23 @@ declare function createPropUtils<TKey extends string, TValue extends PropValue>(
|
|
|
102
131
|
$$type: z.ZodLiteral<TKey>;
|
|
103
132
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
104
133
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
105
|
-
}, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
134
|
+
}, "strict", z.ZodTypeAny, { [k in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
135
|
+
$$type: z.ZodLiteral<TKey>;
|
|
136
|
+
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
137
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
138
|
+
}>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
139
|
+
$$type: z.ZodLiteral<TKey>;
|
|
140
|
+
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
141
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
142
|
+
}>, any>[k]; }, { [k_1 in keyof z.baseObjectInputType<{
|
|
106
143
|
$$type: z.ZodLiteral<TKey>;
|
|
107
144
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
108
145
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
109
|
-
}
|
|
146
|
+
}>]: z.baseObjectInputType<{
|
|
110
147
|
$$type: z.ZodLiteral<TKey>;
|
|
111
148
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
112
149
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
-
}>
|
|
150
|
+
}>[k_1]; }>;
|
|
114
151
|
key: TKey;
|
|
115
152
|
};
|
|
116
153
|
declare function createArrayPropUtils<TKey extends string, TValue extends PropValue>(key: TKey, valueSchema: ZodType<TValue>, overrideKey?: string): {
|
|
@@ -6065,17 +6102,9 @@ declare const hueRotateFilterPropTypeUtil: {
|
|
|
6065
6102
|
key: "hue-rotate";
|
|
6066
6103
|
};
|
|
6067
6104
|
|
|
6068
|
-
declare
|
|
6069
|
-
|
|
6070
|
-
declare
|
|
6071
|
-
isMet: true;
|
|
6072
|
-
} | {
|
|
6073
|
-
isMet: false;
|
|
6074
|
-
failingDependencies: DependencyTerm[];
|
|
6075
|
-
};
|
|
6076
|
-
declare function evaluateTerm(term: DependencyTerm, actualValue: unknown): boolean;
|
|
6077
|
-
declare function extractValue(path: string[], elementValues: PropValue): TransformablePropValue$1<PropKey> | null;
|
|
6078
|
-
declare function isDependency(term: DependencyTerm | Dependency): term is Dependency;
|
|
6105
|
+
declare const filterEmptyValues: <TValue extends PropValue>(value: TValue) => TValue | null;
|
|
6106
|
+
type Nullish = null | undefined | '';
|
|
6107
|
+
declare const isEmpty: (value: PropValue) => value is Nullish;
|
|
6079
6108
|
|
|
6080
6109
|
declare const transformableSchema: z.ZodObject<{
|
|
6081
6110
|
$$type: z.ZodString;
|
|
@@ -6093,8 +6122,22 @@ declare const transformableSchema: z.ZodObject<{
|
|
|
6093
6122
|
type TransformablePropValue = z.infer<typeof transformableSchema>;
|
|
6094
6123
|
declare const isTransformable: (value: unknown) => value is TransformablePropValue;
|
|
6095
6124
|
|
|
6096
|
-
declare
|
|
6097
|
-
|
|
6098
|
-
declare
|
|
6125
|
+
declare function mergeProps(current: Props, updates: Props): Props;
|
|
6126
|
+
|
|
6127
|
+
declare function isDependencyMet(dependency: Dependency | undefined, values: PropValue): {
|
|
6128
|
+
isMet: true;
|
|
6129
|
+
} | {
|
|
6130
|
+
isMet: false;
|
|
6131
|
+
failingDependencies: DependencyTerm[];
|
|
6132
|
+
};
|
|
6133
|
+
declare function evaluateTerm(term: DependencyTerm, actualValue: unknown): boolean;
|
|
6134
|
+
declare function extractValue(path: string[], elementValues: PropValue): TransformablePropValue$1<PropKey> | null;
|
|
6135
|
+
declare function isDependency(term: DependencyTerm | Dependency): term is Dependency;
|
|
6136
|
+
|
|
6137
|
+
declare const Schema: {
|
|
6138
|
+
jsonSchemaToPropType: typeof jsonSchemaToPropType;
|
|
6139
|
+
propTypeToJsonSchema: typeof propTypeToJsonSchema;
|
|
6140
|
+
adjustLlmPropValueSchema: (value: Readonly<PropValue>, forceKey?: string) => PropValue;
|
|
6141
|
+
};
|
|
6099
6142
|
|
|
6100
|
-
export { type AnyTransformable, type ArrayPropType, type ArrayPropValue, type BackdropFilterItemPropValue, type BackdropFilterPropValue, 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, DateTimePropTypeUtil, type DateTimePropValue, type Dependency, type DependencyOperator, type DependencyTerm, type DimensionsPropValue, type DropShadowFilterPropValue, type FilterItemPropValue, type FilterPropValue, type FlexPropValue, type GradientColorStopPropValue, type HtmlPropValue, type ImageAttachmentIdPropValue, type ImagePropValue, type ImageSrcPropValue, type KeyValuePropValue, type LayoutDirectionPropValue, type LinkPropValue, type MoveTransformPropValue, type NumberPropValue, type ObjectPropType, type ObjectPropValue, type PerspectiveOriginPropValue, type PlainPropType, type PlainPropValue, type PositionPropTypeValue, type PropKey, type PropType, type PropTypeKey, type PropTypeUtil, type PropValue, type Props, type PropsSchema, type QueryPropValue, type RotateTransformPropValue, type ScaleTransformPropValue, type SelectionSizePropValue, type ShadowPropValue, type SizePropValue, type SkewTransformPropValue, type StringPropValue, type StrokePropValue, type TransformFunctionsItemPropValue, type TransformFunctionsPropValue, type TransformOriginPropValue, type TransformPropValue, type TransformablePropType, type TransformablePropValue$1 as TransformablePropValue, type UnionPropType, type UrlPropValue, backdropFilterPropTypeUtil, backgroundColorOverlayPropTypeUtil, backgroundGradientOverlayPropTypeUtil, backgroundImageOverlayPropTypeUtil, backgroundImagePositionOffsetPropTypeUtil, backgroundImageSizeScalePropTypeUtil, backgroundOverlayItem, backgroundOverlayPropTypeUtil, backgroundPropTypeUtil, blurFilterPropTypeUtil, booleanPropTypeUtil, borderRadiusPropTypeUtil, borderWidthPropTypeUtil, boxShadowPropTypeUtil, classesPropTypeUtil, colorPropTypeUtil, colorStopPropTypeUtil, colorToneFilterPropTypeUtil, createArrayPropUtils, createPropUtils, cssFilterFunctionPropUtil, dimensionsPropTypeUtil, dropShadowFilterPropTypeUtil, evaluateTerm, extractValue, filterEmptyValues, filterPropTypeUtil, flexPropTypeUtil, gradientColorStopPropTypeUtil, htmlPropTypeUtil, hueRotateFilterPropTypeUtil, imageAttachmentIdPropType, imagePropTypeUtil, imageSrcPropTypeUtil, intensityFilterPropTypeUtil, isDependency, isDependencyMet, isEmpty, isTransformable, keyValuePropTypeUtil, layoutDirectionPropTypeUtil, linkPropTypeUtil, mergeProps, moveTransformPropTypeUtil, numberPropTypeUtil, perspectiveOriginPropTypeUtil, positionPropTypeUtil, queryPropTypeUtil, rotateTransformPropTypeUtil, scaleTransformPropTypeUtil, selectionSizePropTypeUtil, shadowPropTypeUtil, sizePropTypeUtil, skewTransformPropTypeUtil, stringPropTypeUtil, strokePropTypeUtil, transformFunctionsPropTypeUtil, transformOriginPropTypeUtil, transformPropTypeUtil, urlPropTypeUtil };
|
|
6143
|
+
export { type AnyTransformable, type ArrayPropType, type ArrayPropValue, type BackdropFilterItemPropValue, type BackdropFilterPropValue, 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, DateTimePropTypeUtil, type DateTimePropValue, type Dependency, type DependencyOperator, type DependencyTerm, type DimensionsPropValue, type DropShadowFilterPropValue, type FilterItemPropValue, type FilterPropValue, type FlexPropValue, type GradientColorStopPropValue, type HtmlPropValue, type ImageAttachmentIdPropValue, type ImagePropValue, type ImageSrcPropValue, type JsonSchema7, type KeyValuePropValue, type LayoutDirectionPropValue, type LinkPropValue, type MoveTransformPropValue, type NumberPropValue, type ObjectPropType, type ObjectPropValue, type PerspectiveOriginPropValue, type PlainPropType, type PlainPropValue, type PositionPropTypeValue, type PropKey, type PropType, type PropTypeKey, type PropTypeUtil, type PropValue, type Props, type PropsSchema, type QueryPropValue, type RotateTransformPropValue, type ScaleTransformPropValue, Schema, type SelectionSizePropValue, type ShadowPropValue, type SizePropValue, type SkewTransformPropValue, type StringPropValue, type StrokePropValue, type TransformFunctionsItemPropValue, type TransformFunctionsPropValue, type TransformOriginPropValue, type TransformPropValue, type TransformablePropType, type TransformablePropValue$1 as TransformablePropValue, type UnionPropType, type UrlPropValue, backdropFilterPropTypeUtil, backgroundColorOverlayPropTypeUtil, backgroundGradientOverlayPropTypeUtil, backgroundImageOverlayPropTypeUtil, backgroundImagePositionOffsetPropTypeUtil, backgroundImageSizeScalePropTypeUtil, backgroundOverlayItem, backgroundOverlayPropTypeUtil, backgroundPropTypeUtil, blurFilterPropTypeUtil, booleanPropTypeUtil, borderRadiusPropTypeUtil, borderWidthPropTypeUtil, boxShadowPropTypeUtil, classesPropTypeUtil, colorPropTypeUtil, colorStopPropTypeUtil, colorToneFilterPropTypeUtil, createArrayPropUtils, createPropUtils, cssFilterFunctionPropUtil, dimensionsPropTypeUtil, dropShadowFilterPropTypeUtil, evaluateTerm, extractValue, filterEmptyValues, filterPropTypeUtil, flexPropTypeUtil, getPropSchemaFromCache, gradientColorStopPropTypeUtil, htmlPropTypeUtil, hueRotateFilterPropTypeUtil, imageAttachmentIdPropType, imagePropTypeUtil, imageSrcPropTypeUtil, intensityFilterPropTypeUtil, isDependency, isDependencyMet, isEmpty, isTransformable, keyValuePropTypeUtil, layoutDirectionPropTypeUtil, linkPropTypeUtil, mergeProps, moveTransformPropTypeUtil, numberPropTypeUtil, perspectiveOriginPropTypeUtil, positionPropTypeUtil, queryPropTypeUtil, rotateTransformPropTypeUtil, scaleTransformPropTypeUtil, selectionSizePropTypeUtil, shadowPropTypeUtil, sizePropTypeUtil, skewTransformPropTypeUtil, stringPropTypeUtil, strokePropTypeUtil, transformFunctionsPropTypeUtil, transformOriginPropTypeUtil, transformPropTypeUtil, urlPropTypeUtil };
|