@elementor/editor-props 3.35.0-337 → 3.35.0-339

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 CHANGED
@@ -6151,6 +6151,10 @@ declare function evaluateTerm(term: DependencyTerm, actualValue: unknown): boole
6151
6151
  declare function extractValue(path: string[], elementValues: PropValue, nestedPath?: string[]): TransformablePropValue$1<PropKey> | null;
6152
6152
  declare function isDependency(term: DependencyTerm | Dependency): term is Dependency;
6153
6153
 
6154
+ declare const PROP_TYPE_COMPATIBILITY_MAP: Record<string, string[]>;
6155
+ declare function getCompatibleTypeKeys(propType: PropType): string[];
6156
+ declare function migratePropValue(value: PropValue, propType: PropType): PropValue;
6157
+
6154
6158
  declare const Schema: {
6155
6159
  jsonSchemaToPropType: typeof jsonSchemaToPropType;
6156
6160
  propTypeToJsonSchema: typeof propTypeToJsonSchema;
@@ -6160,4 +6164,4 @@ declare const Schema: {
6160
6164
  configurableKeys: typeof configurableKeys;
6161
6165
  };
6162
6166
 
6163
- 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 };
6167
+ 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, PROP_TYPE_COMPATIBILITY_MAP, 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, getCompatibleTypeKeys, getPropSchemaFromCache, gradientColorStopPropTypeUtil, htmlPropTypeUtil, hueRotateFilterPropTypeUtil, imageAttachmentIdPropType, imagePropTypeUtil, imageSrcPropTypeUtil, intensityFilterPropTypeUtil, isDependency, isDependencyMet, isEmpty, isTransformable, keyValuePropTypeUtil, layoutDirectionPropTypeUtil, linkPropTypeUtil, mergeProps, migratePropValue, moveTransformPropTypeUtil, numberPropTypeUtil, perspectiveOriginPropTypeUtil, positionPropTypeUtil, queryPropTypeUtil, rotateTransformPropTypeUtil, scaleTransformPropTypeUtil, selectionSizePropTypeUtil, shadowPropTypeUtil, sizePropTypeUtil, skewTransformPropTypeUtil, stringPropTypeUtil, strokePropTypeUtil, transformFunctionsPropTypeUtil, transformOriginPropTypeUtil, transformPropTypeUtil, urlPropTypeUtil };
package/dist/index.d.ts CHANGED
@@ -6151,6 +6151,10 @@ declare function evaluateTerm(term: DependencyTerm, actualValue: unknown): boole
6151
6151
  declare function extractValue(path: string[], elementValues: PropValue, nestedPath?: string[]): TransformablePropValue$1<PropKey> | null;
6152
6152
  declare function isDependency(term: DependencyTerm | Dependency): term is Dependency;
6153
6153
 
6154
+ declare const PROP_TYPE_COMPATIBILITY_MAP: Record<string, string[]>;
6155
+ declare function getCompatibleTypeKeys(propType: PropType): string[];
6156
+ declare function migratePropValue(value: PropValue, propType: PropType): PropValue;
6157
+
6154
6158
  declare const Schema: {
6155
6159
  jsonSchemaToPropType: typeof jsonSchemaToPropType;
6156
6160
  propTypeToJsonSchema: typeof propTypeToJsonSchema;
@@ -6160,4 +6164,4 @@ declare const Schema: {
6160
6164
  configurableKeys: typeof configurableKeys;
6161
6165
  };
6162
6166
 
6163
- 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 };
6167
+ 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, PROP_TYPE_COMPATIBILITY_MAP, 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, getCompatibleTypeKeys, getPropSchemaFromCache, gradientColorStopPropTypeUtil, htmlPropTypeUtil, hueRotateFilterPropTypeUtil, imageAttachmentIdPropType, imagePropTypeUtil, imageSrcPropTypeUtil, intensityFilterPropTypeUtil, isDependency, isDependencyMet, isEmpty, isTransformable, keyValuePropTypeUtil, layoutDirectionPropTypeUtil, linkPropTypeUtil, mergeProps, migratePropValue, moveTransformPropTypeUtil, numberPropTypeUtil, perspectiveOriginPropTypeUtil, positionPropTypeUtil, queryPropTypeUtil, rotateTransformPropTypeUtil, scaleTransformPropTypeUtil, selectionSizePropTypeUtil, shadowPropTypeUtil, sizePropTypeUtil, skewTransformPropTypeUtil, stringPropTypeUtil, strokePropTypeUtil, transformFunctionsPropTypeUtil, transformOriginPropTypeUtil, transformPropTypeUtil, urlPropTypeUtil };
package/dist/index.js CHANGED
@@ -22,6 +22,7 @@ var index_exports = {};
22
22
  __export(index_exports, {
23
23
  CLASSES_PROP_KEY: () => CLASSES_PROP_KEY,
24
24
  DateTimePropTypeUtil: () => DateTimePropTypeUtil,
25
+ PROP_TYPE_COMPATIBILITY_MAP: () => PROP_TYPE_COMPATIBILITY_MAP,
25
26
  Schema: () => Schema,
26
27
  backdropFilterPropTypeUtil: () => backdropFilterPropTypeUtil,
27
28
  backgroundColorOverlayPropTypeUtil: () => backgroundColorOverlayPropTypeUtil,
@@ -51,6 +52,7 @@ __export(index_exports, {
51
52
  filterEmptyValues: () => filterEmptyValues,
52
53
  filterPropTypeUtil: () => filterPropTypeUtil,
53
54
  flexPropTypeUtil: () => flexPropTypeUtil,
55
+ getCompatibleTypeKeys: () => getCompatibleTypeKeys,
54
56
  getPropSchemaFromCache: () => getPropSchemaFromCache,
55
57
  gradientColorStopPropTypeUtil: () => gradientColorStopPropTypeUtil,
56
58
  htmlPropTypeUtil: () => htmlPropTypeUtil,
@@ -67,6 +69,7 @@ __export(index_exports, {
67
69
  layoutDirectionPropTypeUtil: () => layoutDirectionPropTypeUtil,
68
70
  linkPropTypeUtil: () => linkPropTypeUtil,
69
71
  mergeProps: () => mergeProps,
72
+ migratePropValue: () => migratePropValue,
70
73
  moveTransformPropTypeUtil: () => moveTransformPropTypeUtil,
71
74
  numberPropTypeUtil: () => numberPropTypeUtil,
72
75
  perspectiveOriginPropTypeUtil: () => perspectiveOriginPropTypeUtil,
@@ -1037,6 +1040,50 @@ function isDependency(term) {
1037
1040
  return "terms" in term;
1038
1041
  }
1039
1042
 
1043
+ // src/utils/prop-type-compatibility.ts
1044
+ var PROP_TYPE_COMPATIBILITY_MAP = {
1045
+ html: ["string"],
1046
+ string: ["html"]
1047
+ };
1048
+ function getCompatibleTypeKeys(propType) {
1049
+ if (propType.kind === "union") {
1050
+ return [];
1051
+ }
1052
+ const compatibleKeys = propType.meta?.compatibleTypeKeys;
1053
+ if (Array.isArray(compatibleKeys)) {
1054
+ return compatibleKeys;
1055
+ }
1056
+ return PROP_TYPE_COMPATIBILITY_MAP[propType.key] ?? [];
1057
+ }
1058
+ function migratePropValue(value, propType) {
1059
+ if (!isTransformable(value)) {
1060
+ return value;
1061
+ }
1062
+ if (propType.kind === "union") {
1063
+ const propTypes = propType.prop_types;
1064
+ for (const unionPropType of Object.values(propTypes)) {
1065
+ const expectedKey = unionPropType.key;
1066
+ if (value.$$type === expectedKey) {
1067
+ return value;
1068
+ }
1069
+ const compatibleKeys = getCompatibleTypeKeys(unionPropType);
1070
+ if (compatibleKeys.includes(value.$$type)) {
1071
+ return { ...value, $$type: expectedKey };
1072
+ }
1073
+ }
1074
+ } else {
1075
+ const expectedKey = propType.key;
1076
+ if (value.$$type === expectedKey) {
1077
+ return value;
1078
+ }
1079
+ const compatibleKeys = getCompatibleTypeKeys(propType);
1080
+ if (compatibleKeys.includes(value.$$type)) {
1081
+ return { ...value, $$type: expectedKey };
1082
+ }
1083
+ }
1084
+ return value;
1085
+ }
1086
+
1040
1087
  // src/index.ts
1041
1088
  var Schema = {
1042
1089
  jsonSchemaToPropType,
@@ -1050,6 +1097,7 @@ var Schema = {
1050
1097
  0 && (module.exports = {
1051
1098
  CLASSES_PROP_KEY,
1052
1099
  DateTimePropTypeUtil,
1100
+ PROP_TYPE_COMPATIBILITY_MAP,
1053
1101
  Schema,
1054
1102
  backdropFilterPropTypeUtil,
1055
1103
  backgroundColorOverlayPropTypeUtil,
@@ -1079,6 +1127,7 @@ var Schema = {
1079
1127
  filterEmptyValues,
1080
1128
  filterPropTypeUtil,
1081
1129
  flexPropTypeUtil,
1130
+ getCompatibleTypeKeys,
1082
1131
  getPropSchemaFromCache,
1083
1132
  gradientColorStopPropTypeUtil,
1084
1133
  htmlPropTypeUtil,
@@ -1095,6 +1144,7 @@ var Schema = {
1095
1144
  layoutDirectionPropTypeUtil,
1096
1145
  linkPropTypeUtil,
1097
1146
  mergeProps,
1147
+ migratePropValue,
1098
1148
  moveTransformPropTypeUtil,
1099
1149
  numberPropTypeUtil,
1100
1150
  perspectiveOriginPropTypeUtil,
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/flex.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/selection-size.ts","../src/prop-types/key-value.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/prop-types/date-time.ts","../src/prop-types/position.ts","../src/prop-types/query.ts","../src/prop-types/html.ts","../src/prop-types/filter-prop-types/filter.ts","../src/prop-types/filter-prop-types/drop-shadow-filter.ts","../src/prop-types/filter-prop-types/filter-functions/blur-filter.ts","../src/prop-types/filter-prop-types/filter-functions/color-tone-filter.ts","../src/prop-types/filter-prop-types/filter-functions/hue-rotate-filter.ts","../src/prop-types/filter-prop-types/filter-functions/intensity-filter.ts","../src/prop-types/transform-prop-types/transform.ts","../src/prop-types/transform-prop-types/transform-functions.ts","../src/prop-types/transform-prop-types/transform-functions/move-transform.ts","../src/prop-types/transform-prop-types/types.ts","../src/prop-types/transform-prop-types/transform-functions/rotate-transform.ts","../src/prop-types/transform-prop-types/transform-functions/scale-transform.ts","../src/prop-types/transform-prop-types/transform-functions/skew-transform.ts","../src/prop-types/transform-prop-types/transform-origin.ts","../src/prop-types/transform-prop-types/perspective-origin.ts","../src/prop-types/filter-prop-types/backdrop-filter.ts","../src/utils/adjust-llm-prop-value-schema.ts","../src/utils/llm-schema-to-props.ts","../src/utils/props-to-llm-schema.ts","../src/utils/is-transformable.ts","../src/utils/filter-empty-values.ts","../src/utils/merge-props.ts","../src/utils/prop-dependency-utils.ts"],"sourcesContent":["import { adjustLlmPropValueSchema } from './utils/adjust-llm-prop-value-schema';\nimport { jsonSchemaToPropType } from './utils/llm-schema-to-props';\nimport {\n\tconfigurableKeys,\n\tisPropKeyConfigurable,\n\tnonConfigurablePropKeys,\n\tpropTypeToJsonSchema,\n} from './utils/props-to-llm-schema';\n\nexport { type JsonSchema7 } from './utils/prop-json-schema';\n\n// types\nexport * from './types';\nexport { type CreateOptions, type PropTypeUtil } from './utils/create-prop-utils';\n\n// prop types\nexport * from './prop-types';\n\n// utils\nexport { createArrayPropUtils, createPropUtils, getPropSchemaFromCache } from './utils/create-prop-utils';\nexport { filterEmptyValues, isEmpty } from './utils/filter-empty-values';\nexport { isTransformable } from './utils/is-transformable';\nexport { mergeProps } from './utils/merge-props';\nexport { evaluateTerm, extractValue, isDependency, isDependencyMet } from './utils/prop-dependency-utils';\n\nexport const Schema = {\n\tjsonSchemaToPropType,\n\tpropTypeToJsonSchema,\n\tadjustLlmPropValueSchema,\n\tisPropKeyConfigurable,\n\tnonConfigurablePropKeys,\n\tconfigurableKeys,\n};\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\nconst SCHEMA_CACHE = new Map< string, unknown >();\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 getPropSchemaFromCache( key: string ) {\n\treturn SCHEMA_CACHE.get( key ) as PropTypeUtil< string, PropValue > | undefined;\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\tconst propUtil = {\n\t\textract,\n\t\tisValid,\n\t\tcreate,\n\t\tschema,\n\t\tkey: key as TKey,\n\t};\n\n\tSCHEMA_CACHE.set( key, propUtil );\n\treturn propUtil;\n}\n\nexport function createArrayPropUtils< TKey extends string, TValue extends PropValue >(\n\tkey: TKey,\n\tvalueSchema: ZodType< TValue >,\n\toverrideKey?: string\n) {\n\treturn createPropUtils( overrideKey || `${ key }-array`, z.array( valueSchema ) );\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 flexPropTypeUtil = createPropUtils(\n\t'flex',\n\tz.strictObject( {\n\t\tflexGrow: unknownChildrenSchema,\n\t\tflexShrink: unknownChildrenSchema,\n\t\tflexBasis: unknownChildrenSchema,\n\t} )\n);\n\nexport type FlexPropValue = z.infer< typeof flexPropTypeUtil.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\n\t\t.strictObject( {\n\t\t\tunit: z.enum( [ 'px', 'em', 'rem', '%', 'vw', 'vh' ] ),\n\t\t\tsize: z.number(),\n\t\t} )\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tunit: z.enum( [ 'deg', 'rad', 'grad', 'turn' ] ),\n\t\t\t\tsize: z.number(),\n\t\t\t} )\n\t\t)\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tunit: z.enum( [ 's', 'ms' ] ),\n\t\t\t\tsize: z.number(),\n\t\t\t} )\n\t\t)\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tunit: z.literal( 'auto' ),\n\t\t\t\tsize: z.literal( '' ),\n\t\t\t} )\n\t\t)\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tunit: z.literal( 'custom' ),\n\t\t\t\tsize: z.string(),\n\t\t\t} )\n\t\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\tisTargetBlank: unknownChildrenSchema,\n\t\ttag: 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 { keyValuePropTypeUtil } from './key-value';\nimport { stringPropTypeUtil } from './string';\nimport { unknownChildrenSchema } from './utils';\n\nexport const selectionSizePropTypeUtil = createPropUtils(\n\t'selection-size',\n\tz.strictObject( {\n\t\tselection: z.union( [ keyValuePropTypeUtil.schema, stringPropTypeUtil.schema ] ),\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n\nexport type SelectionSizePropValue = z.infer< typeof selectionSizePropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const keyValuePropTypeUtil = createPropUtils(\n\t'key-value',\n\tz.strictObject( {\n\t\tkey: unknownChildrenSchema,\n\t\tvalue: unknownChildrenSchema,\n\t} )\n);\n\nexport type KeyValuePropValue = z.infer< typeof keyValuePropTypeUtil.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\tclip: 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\nexport const 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 { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const DateTimePropTypeUtil = createPropUtils(\n\t'date-time',\n\tz.strictObject( {\n\t\tdate: unknownChildrenSchema,\n\t\ttime: unknownChildrenSchema,\n\t} )\n);\n\nexport type DateTimePropValue = z.infer< typeof DateTimePropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const positionPropTypeUtil = createPropUtils(\n\t'object-position',\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t} )\n);\n\nexport type PositionPropTypeValue = z.infer< typeof positionPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const queryPropTypeUtil = createPropUtils(\n\t'query',\n\tz.strictObject( {\n\t\tid: unknownChildrenSchema,\n\t\tlabel: unknownChildrenSchema,\n\t} )\n);\n\nexport type QueryPropValue = z.infer< typeof queryPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const htmlPropTypeUtil = createPropUtils( 'html', z.string().nullable() );\n\nexport type HtmlPropValue = z.infer< typeof htmlPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { stringPropTypeUtil } from '../string';\nimport { dropShadowFilterPropTypeUtil } from './drop-shadow-filter';\nimport { blurFilterPropTypeUtil } from './filter-functions/blur-filter';\nimport { colorToneFilterPropTypeUtil } from './filter-functions/color-tone-filter';\nimport { hueRotateFilterPropTypeUtil } from './filter-functions/hue-rotate-filter';\nimport { intensityFilterPropTypeUtil } from './filter-functions/intensity-filter';\n\nexport const cssFilterFunctionPropUtil = createPropUtils(\n\t'css-filter-func',\n\tz.object( {\n\t\tfunc: stringPropTypeUtil.schema,\n\t\targs: z.union( [\n\t\t\tblurFilterPropTypeUtil.schema,\n\t\t\tintensityFilterPropTypeUtil.schema,\n\t\t\tcolorToneFilterPropTypeUtil.schema,\n\t\t\thueRotateFilterPropTypeUtil.schema,\n\t\t\tdropShadowFilterPropTypeUtil.schema,\n\t\t] ),\n\t} )\n);\n\nexport const filterPropTypeUtil = createPropUtils( 'filter', z.array( cssFilterFunctionPropUtil.schema ) );\n\nexport type FilterItemPropValue = z.infer< typeof cssFilterFunctionPropUtil.schema >;\n\nexport type FilterPropValue = z.infer< typeof filterPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const dropShadowFilterPropTypeUtil = createPropUtils(\n\t'drop-shadow',\n\tz.object( {\n\t\txAxis: unknownChildrenSchema,\n\t\tyAxis: unknownChildrenSchema,\n\t\tblur: unknownChildrenSchema,\n\t\tcolor: unknownChildrenSchema,\n\t} )\n);\n\nexport type DropShadowFilterPropValue = z.infer< typeof dropShadowFilterPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\n\nexport const blurFilterPropTypeUtil = createPropUtils(\n\t'blur',\n\tz.strictObject( {\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\n\nexport const colorToneFilterPropTypeUtil = createPropUtils(\n\t'color-tone',\n\tz.strictObject( {\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\n\nexport const hueRotateFilterPropTypeUtil = createPropUtils(\n\t'hue-rotate',\n\tz.strictObject( {\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\n\nexport const intensityFilterPropTypeUtil = createPropUtils(\n\t'intensity',\n\tz.strictObject( {\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const transformPropTypeUtil = createPropUtils(\n\t'transform',\n\tz.strictObject( {\n\t\t'transform-functions': unknownChildrenSchema,\n\t\t'transform-origin': unknownChildrenSchema,\n\t\tperspective: unknownChildrenSchema,\n\t\t'perspective-origin': unknownChildrenSchema,\n\t} )\n);\n\nexport type TransformPropValue = z.infer< typeof transformPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { moveTransformPropTypeUtil } from './transform-functions/move-transform';\nimport { rotateTransformPropTypeUtil } from './transform-functions/rotate-transform';\nimport { scaleTransformPropTypeUtil } from './transform-functions/scale-transform';\nimport { skewTransformPropTypeUtil } from './transform-functions/skew-transform';\n\nconst filterTypes = moveTransformPropTypeUtil.schema\n\t.or( scaleTransformPropTypeUtil.schema )\n\t.or( rotateTransformPropTypeUtil.schema )\n\t.or( skewTransformPropTypeUtil.schema );\n\nexport const transformFunctionsPropTypeUtil = createPropUtils( 'transform-functions', z.array( filterTypes ) );\n\nexport type TransformFunctionsPropValue = z.infer< typeof transformFunctionsPropTypeUtil.schema >;\n\nexport type TransformFunctionsItemPropValue = z.infer< typeof filterTypes >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\nimport { TransformFunctionKeys } from '../types';\n\nexport const moveTransformPropTypeUtil = createPropUtils(\n\tTransformFunctionKeys.move,\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t\tz: unknownChildrenSchema,\n\t} )\n);\n\nexport type MoveTransformPropValue = z.infer< typeof moveTransformPropTypeUtil.schema >;\n","type TransformFunctions = 'transform-move' | 'transform-scale' | 'transform-rotate' | 'transform-skew';\n\nexport const TransformFunctionKeys: Record< string, TransformFunctions > = {\n\tmove: 'transform-move',\n\tscale: 'transform-scale',\n\trotate: 'transform-rotate',\n\tskew: 'transform-skew',\n};\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\nimport { TransformFunctionKeys } from '../types';\n\nexport const rotateTransformPropTypeUtil = createPropUtils(\n\tTransformFunctionKeys.rotate,\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t\tz: unknownChildrenSchema,\n\t} )\n);\n\nexport type RotateTransformPropValue = z.infer< typeof rotateTransformPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { numberPropTypeUtil } from '../../number';\nimport { TransformFunctionKeys } from '../types';\n\nexport const scaleTransformPropTypeUtil = createPropUtils(\n\tTransformFunctionKeys.scale,\n\tz.strictObject( {\n\t\tx: numberPropTypeUtil.schema.nullable(),\n\t\ty: numberPropTypeUtil.schema.nullable(),\n\t\tz: numberPropTypeUtil.schema.nullable(),\n\t} )\n);\n\nexport type ScaleTransformPropValue = z.infer< typeof scaleTransformPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\nimport { TransformFunctionKeys } from '../types';\n\nexport const skewTransformPropTypeUtil = createPropUtils(\n\tTransformFunctionKeys.skew,\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t} )\n);\n\nexport type SkewTransformPropValue = z.infer< typeof skewTransformPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const transformOriginPropTypeUtil = createPropUtils(\n\t'transform-origin',\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t\tz: unknownChildrenSchema,\n\t} )\n);\n\nexport type TransformOriginPropValue = z.infer< typeof transformOriginPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const perspectiveOriginPropTypeUtil = createPropUtils(\n\t'perspective-origin',\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t} )\n);\n\nexport type PerspectiveOriginPropValue = z.infer< typeof perspectiveOriginPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { cssFilterFunctionPropUtil } from './filter';\n\nexport const backdropFilterPropTypeUtil = createPropUtils(\n\t'backdrop-filter',\n\tz.array( cssFilterFunctionPropUtil.schema )\n);\n\nexport type BackdropFilterPropValue = z.infer< typeof backdropFilterPropTypeUtil.schema >;\n\nexport type BackdropFilterItemPropValue = z.infer< typeof cssFilterFunctionPropUtil.schema >;\n","import { numberPropTypeUtil, type NumberPropValue, stringPropTypeUtil, type StringPropValue } from '../prop-types';\nimport { type ObjectPropValue, type PropValue, type TransformablePropValue } from '../types';\n\nconst ensureNotNull = ( v: unknown, fallback: unknown ) => ( v === null ? fallback : v );\n\nexport const adjustLlmPropValueSchema = ( value: Readonly< PropValue >, forceKey?: string ): PropValue => {\n\tconst clone = structuredClone( value );\n\n\tif ( typeof clone === 'string' ) {\n\t\treturn stringPropTypeUtil.create( clone );\n\t}\n\tif ( typeof clone === 'number' ) {\n\t\treturn numberPropTypeUtil.create( clone );\n\t}\n\t// Check for transformable types\n\tif ( clone && typeof clone === 'object' ) {\n\t\tif ( Array.isArray( clone ) ) {\n\t\t\treturn clone.map( ( item ) => adjustLlmPropValueSchema( item, forceKey ) ) as PropValue;\n\t\t}\n\t\tconst transformablePropValue = clone as TransformablePropValue< string >;\n\t\tif ( forceKey ) {\n\t\t\ttransformablePropValue.$$type = forceKey;\n\t\t}\n\n\t\tif ( ! transformablePropValue.$$type ) {\n\t\t\tthrow new Error( 'Missing $$type in property: ' + JSON.stringify( transformablePropValue ) );\n\t\t}\n\n\t\tif ( ! ( 'value' in transformablePropValue ) ) {\n\t\t\tthrow new Error( 'Missing value property in PropValue: ' + JSON.stringify( transformablePropValue ) );\n\t\t}\n\n\t\t// fix by type\n\t\tswitch ( transformablePropValue.$$type ) {\n\t\t\tcase 'size': {\n\t\t\t\tconst { value: rawSizePropValue } = transformablePropValue as TransformablePropValue<\n\t\t\t\t\tstring,\n\t\t\t\t\t{ size: StringPropValue | NumberPropValue; unit: StringPropValue }\n\t\t\t\t>;\n\t\t\t\tconst unit =\n\t\t\t\t\ttypeof rawSizePropValue.unit === 'string'\n\t\t\t\t\t\t? rawSizePropValue.unit\n\t\t\t\t\t\t: ensureNotNull( stringPropTypeUtil.extract( rawSizePropValue.unit ), 'px' );\n\t\t\t\tconst size =\n\t\t\t\t\ttypeof rawSizePropValue.size === 'string' || typeof rawSizePropValue.size === 'number'\n\t\t\t\t\t\t? rawSizePropValue.size\n\t\t\t\t\t\t: ensureNotNull(\n\t\t\t\t\t\t\t\tstringPropTypeUtil.extract( rawSizePropValue.size ),\n\t\t\t\t\t\t\t\tnumberPropTypeUtil.extract( rawSizePropValue.size )\n\t\t\t\t\t\t );\n\t\t\t\treturn {\n\t\t\t\t\t$$type: 'size',\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\tunit,\n\t\t\t\t\t\tsize,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( typeof transformablePropValue.value === 'object' ) {\n\t\t\tif ( Array.isArray( transformablePropValue.value ) ) {\n\t\t\t\ttransformablePropValue.value = adjustLlmPropValueSchema(\n\t\t\t\t\ttransformablePropValue.value,\n\t\t\t\t\tundefined\n\t\t\t\t) as PropValue[];\n\t\t\t} else {\n\t\t\t\tconst { value: objectValue } = transformablePropValue as ObjectPropValue;\n\t\t\t\tconst clonedObject = clone as ObjectPropValue;\n\t\t\t\tclonedObject.value = {} as Record< string, PropValue >;\n\t\t\t\tObject.keys( objectValue ).forEach( ( key ) => {\n\t\t\t\t\tconst childProp = ( objectValue as Record< string, unknown > )[ key ];\n\t\t\t\t\t( clonedObject.value as Record< string, unknown > )[ key ] = adjustLlmPropValueSchema(\n\t\t\t\t\t\tchildProp as PropValue,\n\t\t\t\t\t\tundefined\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\treturn clone;\n};\n","import { type PropsSchema, type PropType } from '../types';\nimport { type JsonSchema7 } from './prop-json-schema';\n\nexport function jsonSchemaToPropType( schema: JsonSchema7, key = < string >schema.key ): PropType {\n\tconst meta: Record< string, unknown > = {};\n\n\tif ( schema.description ) {\n\t\tmeta.description = schema.description;\n\t}\n\n\t// Handle union types (anyOf)\n\tif ( schema.anyOf && Array.isArray( schema.anyOf ) ) {\n\t\treturn convertJsonSchemaToUnionPropType( schema, meta );\n\t}\n\n\t// Handle object types\n\tif ( schema.type === 'object' && schema.properties ) {\n\t\treturn convertJsonSchemaToObjectPropType( schema, meta, key );\n\t}\n\n\t// Handle array types\n\tif ( schema.type === 'array' && schema.items ) {\n\t\treturn convertJsonSchemaToArrayPropType( schema, meta, key );\n\t}\n\n\t// Handle plain types (string, number, boolean)\n\treturn convertJsonSchemaToPlainPropType( schema, meta, key );\n}\n\nfunction convertJsonSchemaToPlainPropType(\n\tschema: JsonSchema7,\n\tmeta: Record< string, unknown >,\n\tkey = < string >schema.key\n): PropType {\n\tconst settings: Record< string, unknown > = {};\n\n\t// Determine the key based on type\n\tlet propKey = key || 'string';\n\n\tif ( schema.type === 'number' ) {\n\t\tpropKey = 'number';\n\t} else if ( schema.type === 'boolean' ) {\n\t\tpropKey = 'boolean';\n\t} else if ( schema.type === 'string' ) {\n\t\tpropKey = 'string';\n\t}\n\n\t// Handle enum values\n\tif ( Array.isArray( schema.enum ) ) {\n\t\tsettings.enum = schema.enum;\n\t}\n\n\treturn {\n\t\tkind: 'plain',\n\t\tkey: propKey,\n\t\tsettings,\n\t\tmeta,\n\t} as PropType;\n}\n\n/**\n * Converts a JSON Schema anyOf to a union PropType\n * @param schema\n * @param meta\n */\nfunction convertJsonSchemaToUnionPropType( schema: JsonSchema7, meta: Record< string, unknown > ): PropType {\n\tconst propTypes: Record< string, PropType > = {};\n\n\tif ( ! schema.anyOf || ! Array.isArray( schema.anyOf ) ) {\n\t\tthrow new Error( 'Invalid anyOf schema' );\n\t}\n\n\t// Process each variant in the anyOf array\n\tfor ( const variantSchema of schema.anyOf ) {\n\t\t// Each variant should be an object with $$type and value properties\n\t\tif (\n\t\t\tvariantSchema.type === 'object' &&\n\t\t\tvariantSchema.properties &&\n\t\t\tvariantSchema.properties.$$type &&\n\t\t\tvariantSchema.properties.value\n\t\t) {\n\t\t\tconst typeProperty = variantSchema.properties.$$type;\n\n\t\t\t// Extract the type key from the enum\n\t\t\tlet typeKey: string;\n\t\t\tif ( typeProperty.enum && Array.isArray( typeProperty.enum ) && typeProperty.enum.length > 0 ) {\n\t\t\t\ttypeKey = typeProperty.enum[ 0 ] as string;\n\t\t\t} else {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Convert the value schema to a PropType\n\t\t\tconst valuePropType = convertJsonSchemaToPropType( variantSchema.properties.value );\n\t\t\tpropTypes[ typeKey ] = valuePropType;\n\t\t}\n\t}\n\n\treturn {\n\t\tkind: 'union',\n\t\tprop_types: propTypes,\n\t\tsettings: {},\n\t\tmeta,\n\t} as PropType;\n}\n\nfunction convertJsonSchemaToObjectPropType(\n\tschema: JsonSchema7,\n\tmeta: Record< string, unknown >,\n\tkey = < string >schema.key\n): PropType {\n\tconst shape: Record< string, PropType > = {};\n\n\tif ( ! schema.properties ) {\n\t\treturn {\n\t\t\tkind: 'object',\n\t\t\tkey,\n\t\t\tshape: {},\n\t\t\tsettings: {},\n\t\t\tmeta,\n\t\t} as PropType;\n\t}\n\n\tconst requiredFields = Array.isArray( schema.required ) ? schema.required : [];\n\n\t// Convert each property\n\tfor ( const [ propKey, propSchema ] of Object.entries( schema.properties ) ) {\n\t\tconst subPropType = convertJsonSchemaToPropType( propSchema, key );\n\n\t\t// Mark as required if it's in the required array\n\t\tif ( requiredFields.includes( propKey ) ) {\n\t\t\tsubPropType.settings = {\n\t\t\t\t...subPropType.settings,\n\t\t\t\trequired: true,\n\t\t\t};\n\t\t}\n\n\t\tshape[ propKey ] = subPropType;\n\t}\n\n\treturn {\n\t\tkind: 'object',\n\t\tkey: key || 'object',\n\t\tshape,\n\t\tsettings: {},\n\t\tmeta,\n\t} as PropType;\n}\n\nfunction convertJsonSchemaToArrayPropType(\n\tschema: JsonSchema7,\n\tmeta: Record< string, unknown >,\n\tkey = < string >schema.key\n): PropType {\n\tif ( ! schema.items ) {\n\t\tthrow new Error( 'Array schema must have items property' );\n\t}\n\n\tconst itemPropType = convertJsonSchemaToPropType( schema.items );\n\n\treturn {\n\t\tkind: 'array',\n\t\tkey: key || 'array',\n\t\titem_prop_type: itemPropType,\n\t\tsettings: {},\n\t\tmeta,\n\t} as PropType;\n}\n\nfunction convertJsonSchemaToPropType( schema: JsonSchema7, key?: string ): PropType {\n\treturn jsonSchemaToPropType( schema, key );\n}\n\n/**\n * Converts a complete JSON Schema object back to a PropsSchema\n *\n * @param jsonSchema The JSON Schema to convert\n */\nexport function jsonSchemaToPropsSchema( jsonSchema: JsonSchema7 ): PropsSchema {\n\tconst propsSchema: PropsSchema = {};\n\n\tif ( jsonSchema.type !== 'object' || ! jsonSchema.properties ) {\n\t\tthrow new Error( 'Root schema must be an object with properties' );\n\t}\n\n\tfor ( const [ key, propSchema ] of Object.entries( jsonSchema.properties ) ) {\n\t\tpropsSchema[ key ] = convertJsonSchemaToPropType( propSchema, key );\n\t}\n\n\treturn propsSchema;\n}\n","import { type PropsSchema, type PropType } from '../types';\nimport { type JsonSchema7 } from './prop-json-schema';\n\nexport function propTypeToJsonSchema( propType: PropType ): JsonSchema7 {\n\tconst description = propType.meta?.description;\n\n\tconst schema: JsonSchema7 = {};\n\n\tif ( description ) {\n\t\tschema.description = description;\n\t}\n\n\t// Handle different kinds of prop types\n\tswitch ( propType.kind ) {\n\t\tcase 'plain':\n\t\t\treturn convertPlainPropType( propType, schema );\n\t\tcase 'union':\n\t\t\treturn convertUnionPropType( propType, schema );\n\t\tcase 'object':\n\t\t\treturn convertObjectPropType( propType, schema );\n\t\tcase 'array':\n\t\t\treturn convertArrayPropType( propType, schema );\n\t\tdefault:\n\t\t\treturn convertPlainPropType( propType, schema );\n\t}\n\n\treturn schema;\n}\n\nfunction convertPlainPropType( propType: PropType & { kind: 'plain' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = { ...baseSchema };\n\n\t// Determine type based on key\n\tconst key = propType.key.toLowerCase();\n\n\tswitch ( key ) {\n\t\tcase 'number':\n\t\t\tschema.type = 'number';\n\t\t\tbreak;\n\t\tcase 'boolean':\n\t\t\tschema.type = 'boolean';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tschema.type = 'string';\n\t}\n\n\t// Handle enum from settings\n\tif ( Array.isArray( propType.settings?.enum ) ) {\n\t\tschema.enum = propType.settings.enum;\n\t}\n\n\treturn schema;\n}\n\n/**\n * Converts a union prop type to JSON Schema ( электричество anyOf)\n *\n * @param propType The union prop type to convert\n * @param baseSchema Base schema to extend\n */\nfunction convertUnionPropType( propType: PropType & { kind: 'union' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = structuredClone( baseSchema );\n\n\tconst propTypes = propType.prop_types || {};\n\tconst schemas: JsonSchema7[] = [];\n\n\t// Convert each prop type in the union\n\tfor ( const [ typeKey, subPropType ] of Object.entries( propTypes ) ) {\n\t\tconst subSchema = convertPropTypeToJsonSchema( subPropType );\n\n\t\tschemas.push( {\n\t\t\ttype: 'object',\n\t\t\trequired: [ '$$type', 'value' ],\n\t\t\tproperties: {\n\t\t\t\t$$type: {\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tconst: typeKey,\n\t\t\t\t\tdescription: subPropType.meta?.description,\n\t\t\t\t\t$comment: `Discriminator for union type variant: ${ typeKey }`,\n\t\t\t\t},\n\t\t\t\tvalue: subSchema,\n\t\t\t},\n\t\t} );\n\t}\n\n\tif ( schemas.length > 0 ) {\n\t\tschema.anyOf = schemas;\n\t}\n\n\tconst propTypeDescription = propType.meta?.description;\n\tif ( propTypeDescription ) {\n\t\tschema.description = propTypeDescription;\n\t}\n\treturn schema;\n}\n\nfunction convertObjectPropType( propType: PropType & { kind: 'object' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = structuredClone( baseSchema );\n\n\tschema.type = 'object';\n\tschema.properties = {};\n\n\tconst required: string[] = [];\n\n\tconst shape = propType.shape || {};\n\n\t// Convert each property in the object shape\n\tfor ( const [ key, subPropType ] of Object.entries( shape ) ) {\n\t\tconst propSchema = convertPropTypeToJsonSchema( subPropType );\n\n\t\t// Check if this property is required\n\t\tif ( subPropType.settings?.required === true ) {\n\t\t\trequired.push( key );\n\t\t}\n\n\t\tschema.properties[ key ] = propSchema;\n\t}\n\n\t// Add required array if there are required fields\n\tif ( required.length > 0 ) {\n\t\tschema.required = required;\n\t}\n\n\treturn schema;\n}\n\nfunction convertArrayPropType( propType: PropType & { kind: 'array' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = structuredClone( baseSchema );\n\n\tschema.type = 'array';\n\n\tconst itemPropType = propType.item_prop_type;\n\n\tif ( itemPropType ) {\n\t\tschema.items = convertPropTypeToJsonSchema( itemPropType );\n\t}\n\n\treturn schema;\n}\n\nfunction convertPropTypeToJsonSchema( propType: PropType ): JsonSchema7 {\n\treturn propTypeToJsonSchema( propType );\n}\n\nexport function propsSchemaToJsonSchema( schema: PropsSchema ): JsonSchema7 {\n\tconst jsonSchema: JsonSchema7 = {\n\t\ttype: 'object',\n\t\tproperties: {},\n\t};\n\n\tfor ( const [ key, propType ] of Object.entries( schema ) ) {\n\t\t// Skip internal properties\n\t\tif ( ! isPropKeyConfigurable( key ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst propSchema = convertPropTypeToJsonSchema( propType );\n\t\tif ( jsonSchema.properties ) {\n\t\t\tjsonSchema.properties[ key ] = propSchema;\n\t\t}\n\n\t\t// Handle required fields at root level if needed\n\t\t// (typically props are optional unless specified)\n\t}\n\n\treturn jsonSchema;\n}\n\nexport const nonConfigurablePropKeys = [ '_cssid', 'classes', 'attributes' ] as readonly string[];\n\nexport function isPropKeyConfigurable( propKey: string ): boolean {\n\treturn ! nonConfigurablePropKeys.includes( propKey );\n}\n\nexport function configurableKeys( schema: PropsSchema ): string[] {\n\treturn Object.keys( schema ).filter( isPropKeyConfigurable );\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","import { type PropValue } from '../types';\nimport { isTransformable } from '../utils/is-transformable';\n\nexport const filterEmptyValues = < TValue extends PropValue >( value: TValue ): TValue | null => {\n\tif ( isEmpty( value ) ) {\n\t\treturn null;\n\t}\n\n\tif ( Array.isArray( value ) ) {\n\t\treturn value.map( filterEmptyValues ).filter( ( item ) => ! isEmpty( item ) ) as TValue;\n\t}\n\n\tif ( typeof value === 'object' ) {\n\t\treturn Object.fromEntries(\n\t\t\tObject.entries( value )\n\t\t\t\t.map( ( [ key, val ] ) => [ key, filterEmptyValues( val ) ] )\n\t\t\t\t.filter( ( [ , val ] ) => ! isEmpty( val ) )\n\t\t);\n\t}\n\n\treturn value;\n};\n\ntype Nullish = null | undefined | '';\n\nexport const isEmpty = ( value: PropValue ): value is Nullish => {\n\tif ( value && isTransformable( value ) ) {\n\t\treturn isEmpty( value.value );\n\t}\n\n\treturn isNullish( value ) || isNullishArray( value ) || isNullishObject( value );\n};\n\nconst isNullish = ( value: PropValue ): value is Nullish => value === null || value === undefined || value === '';\n\nconst isNullishArray = ( value: NonNullable< PropValue > ): value is Nullish[] =>\n\tArray.isArray( value ) && value.every( isEmpty );\n\nconst isNullishObject = ( value: NonNullable< PropValue > ): value is Record< string, Nullish > => {\n\treturn typeof value === 'object' && isNullishArray( Object.values( value ) );\n};\n","import type { Props } from '../types';\n\nexport function mergeProps( current: Props, updates: Props ) {\n\t// edge case, the server returns an array instead of an object when empty props because of PHP array / object conversion\n\tlet props: Props = {};\n\n\tif ( ! Array.isArray( current ) ) {\n\t\tprops = structuredClone( current );\n\t}\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 {\n\ttype Dependency,\n\ttype DependencyTerm,\n\ttype PropKey,\n\ttype PropValue,\n\ttype TransformablePropValue,\n} from '../types';\nimport { isTransformable } from './is-transformable';\n\ntype ParsedTerm = DependencyTerm;\n\ntype Relation = Dependency[ 'relation' ];\n\nexport function isDependencyMet(\n\tdependency: Dependency | undefined,\n\tvalues: PropValue\n): { isMet: true } | { isMet: false; failingDependencies: ( DependencyTerm | Dependency )[] } {\n\tif ( ! dependency?.terms.length ) {\n\t\treturn { isMet: true };\n\t}\n\n\tconst { relation, terms } = dependency;\n\tconst method = getRelationMethod( relation );\n\n\tconst failingDependencies: ( DependencyTerm | Dependency )[] = [];\n\tconst isMet = terms[ method ]( ( term: ParsedTerm | Dependency ) => {\n\t\tconst isNestedDependency = isDependency( term );\n\t\tconst result = isNestedDependency\n\t\t\t? isDependencyMet( term, values ).isMet\n\t\t\t: evaluateTerm( term, extractValue( term.path, values, term.nestedPath )?.value );\n\n\t\tif ( ! result ) {\n\t\t\tfailingDependencies.push( term );\n\t\t}\n\n\t\treturn result;\n\t} );\n\n\treturn { isMet, failingDependencies };\n}\n\nexport function evaluateTerm( term: DependencyTerm, actualValue: unknown ) {\n\tconst { value: valueToCompare, operator } = term;\n\n\tswitch ( operator ) {\n\t\tcase 'eq':\n\t\tcase 'ne':\n\t\t\treturn ( actualValue === valueToCompare ) === ( 'eq' === operator );\n\n\t\tcase 'gt':\n\t\tcase 'lte':\n\t\t\tif ( ! isNumber( actualValue ) || ! isNumber( valueToCompare ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn Number( actualValue ) > Number( valueToCompare ) === ( 'gt' === operator );\n\n\t\tcase 'lt':\n\t\tcase 'gte':\n\t\t\tif ( ! isNumber( actualValue ) || ! isNumber( valueToCompare ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn Number( actualValue ) < Number( valueToCompare ) === ( 'lt' === operator );\n\t\tcase 'in':\n\t\tcase 'nin':\n\t\t\tif ( ! Array.isArray( valueToCompare ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn valueToCompare.includes( actualValue as never ) === ( 'in' === operator );\n\n\t\tcase 'contains':\n\t\tcase 'ncontains':\n\t\t\tif (\n\t\t\t\t( 'string' !== typeof actualValue || 'string' !== typeof valueToCompare ) &&\n\t\t\t\t! Array.isArray( actualValue )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn ( 'contains' === operator ) === actualValue.includes( valueToCompare as never );\n\n\t\tcase 'exists':\n\t\tcase 'not_exist':\n\t\t\tconst evaluation = !! actualValue || 0 === actualValue || false === actualValue;\n\n\t\t\treturn ( 'exists' === operator ) === evaluation;\n\n\t\tdefault:\n\t\t\treturn true;\n\t}\n}\n\nfunction isNumber( value: unknown ): value is number {\n\treturn typeof value === 'number' && ! isNaN( value );\n}\n\nfunction getRelationMethod( relation: Relation ) {\n\tswitch ( relation ) {\n\t\tcase 'or':\n\t\t\treturn 'some';\n\n\t\tcase 'and':\n\t\t\treturn 'every';\n\n\t\tdefault:\n\t\t\tthrow new Error( `Relation not supported ${ relation }` );\n\t}\n}\n\nexport function extractValue(\n\tpath: string[],\n\telementValues: PropValue,\n\tnestedPath: string[] = []\n): TransformablePropValue< PropKey > | null {\n\tconst extractedValue = path.reduce( ( acc, key, index ) => {\n\t\tconst value = acc?.[ key as keyof typeof acc ] as PropValue | null;\n\n\t\treturn index !== path.length - 1 && isTransformable( value ) ? value.value ?? null : value;\n\t}, elementValues ) as TransformablePropValue< PropKey >;\n\n\tif ( ! nestedPath?.length ) {\n\t\treturn extractedValue;\n\t}\n\n\tconst nestedValue = nestedPath.reduce(\n\t\t( acc: Record< string, unknown >, key ) => acc?.[ key ] as Record< string, unknown >,\n\t\textractedValue?.value as Record< string, unknown >\n\t);\n\n\treturn {\n\t\t$$type: 'unknown',\n\t\tvalue: nestedValue,\n\t};\n}\n\nexport function isDependency( term: DependencyTerm | Dependency ): term is Dependency {\n\treturn 'terms' in term;\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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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;AAAA,MACR;AAEA,aAAS,eAAe,aAAe,YAAY,SAAU,cAAwB;AAAA,IAEtF,KAAK;AAAA,IACL,KAAK;AACJ,YAAM,aAAa,CAAC,CAAE,eAAe,MAAM,eAAe,UAAU;AAEpE,aAAS,aAAa,aAAe;AAAA,IAEtC;AACC,aAAO;AAAA,EACT;AACD;AAEA,SAAS,SAAU,OAAkC;AACpD,SAAO,OAAO,UAAU,YAAY,CAAE,MAAO,KAAM;AACpD;AAEA,SAAS,kBAAmB,UAAqB;AAChD,UAAS,UAAW;AAAA,IACnB,KAAK;AACJ,aAAO;AAAA,IAER,KAAK;AACJ,aAAO;AAAA,IAER;AACC,YAAM,IAAI,MAAO,0BAA2B,QAAS,EAAG;AAAA,EAC1D;AACD;AAEO,SAAS,aACf,MACA,eACA,aAAuB,CAAC,GACmB;AAC3C,QAAM,iBAAiB,KAAK,OAAQ,CAAE,KAAK,KAAK,UAAW;AAC1D,UAAM,QAAQ,MAAO,GAAwB;AAE7C,WAAO,UAAU,KAAK,SAAS,KAAK,gBAAiB,KAAM,IAAI,MAAM,SAAS,OAAO;AAAA,EACtF,GAAG,aAAc;AAEjB,MAAK,CAAE,YAAY,QAAS;AAC3B,WAAO;AAAA,EACR;AAEA,QAAM,cAAc,WAAW;AAAA,IAC9B,CAAE,KAAgC,QAAS,MAAO,GAAI;AAAA,IACtD,gBAAgB;AAAA,EACjB;AAEA,SAAO;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA,EACR;AACD;AAEO,SAAS,aAAc,MAAwD;AACrF,SAAO,WAAW;AACnB;;;A3DlHO,IAAM,SAAS;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;","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","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/flex.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/selection-size.ts","../src/prop-types/key-value.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/prop-types/date-time.ts","../src/prop-types/position.ts","../src/prop-types/query.ts","../src/prop-types/html.ts","../src/prop-types/filter-prop-types/filter.ts","../src/prop-types/filter-prop-types/drop-shadow-filter.ts","../src/prop-types/filter-prop-types/filter-functions/blur-filter.ts","../src/prop-types/filter-prop-types/filter-functions/color-tone-filter.ts","../src/prop-types/filter-prop-types/filter-functions/hue-rotate-filter.ts","../src/prop-types/filter-prop-types/filter-functions/intensity-filter.ts","../src/prop-types/transform-prop-types/transform.ts","../src/prop-types/transform-prop-types/transform-functions.ts","../src/prop-types/transform-prop-types/transform-functions/move-transform.ts","../src/prop-types/transform-prop-types/types.ts","../src/prop-types/transform-prop-types/transform-functions/rotate-transform.ts","../src/prop-types/transform-prop-types/transform-functions/scale-transform.ts","../src/prop-types/transform-prop-types/transform-functions/skew-transform.ts","../src/prop-types/transform-prop-types/transform-origin.ts","../src/prop-types/transform-prop-types/perspective-origin.ts","../src/prop-types/filter-prop-types/backdrop-filter.ts","../src/utils/adjust-llm-prop-value-schema.ts","../src/utils/llm-schema-to-props.ts","../src/utils/props-to-llm-schema.ts","../src/utils/is-transformable.ts","../src/utils/filter-empty-values.ts","../src/utils/merge-props.ts","../src/utils/prop-dependency-utils.ts","../src/utils/prop-type-compatibility.ts"],"sourcesContent":["import { adjustLlmPropValueSchema } from './utils/adjust-llm-prop-value-schema';\nimport { jsonSchemaToPropType } from './utils/llm-schema-to-props';\nimport {\n\tconfigurableKeys,\n\tisPropKeyConfigurable,\n\tnonConfigurablePropKeys,\n\tpropTypeToJsonSchema,\n} from './utils/props-to-llm-schema';\n\nexport { type JsonSchema7 } from './utils/prop-json-schema';\n\n// types\nexport * from './types';\nexport { type CreateOptions, type PropTypeUtil } from './utils/create-prop-utils';\n\n// prop types\nexport * from './prop-types';\n\n// utils\nexport { createArrayPropUtils, createPropUtils, getPropSchemaFromCache } from './utils/create-prop-utils';\nexport { filterEmptyValues, isEmpty } from './utils/filter-empty-values';\nexport { isTransformable } from './utils/is-transformable';\nexport { mergeProps } from './utils/merge-props';\nexport { evaluateTerm, extractValue, isDependency, isDependencyMet } from './utils/prop-dependency-utils';\n\n// constants\nexport { getCompatibleTypeKeys, migratePropValue, PROP_TYPE_COMPATIBILITY_MAP } from './utils/prop-type-compatibility';\n\nexport const Schema = {\n\tjsonSchemaToPropType,\n\tpropTypeToJsonSchema,\n\tadjustLlmPropValueSchema,\n\tisPropKeyConfigurable,\n\tnonConfigurablePropKeys,\n\tconfigurableKeys,\n};\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\nconst SCHEMA_CACHE = new Map< string, unknown >();\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 getPropSchemaFromCache( key: string ) {\n\treturn SCHEMA_CACHE.get( key ) as PropTypeUtil< string, PropValue > | undefined;\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\tconst propUtil = {\n\t\textract,\n\t\tisValid,\n\t\tcreate,\n\t\tschema,\n\t\tkey: key as TKey,\n\t};\n\n\tSCHEMA_CACHE.set( key, propUtil );\n\treturn propUtil;\n}\n\nexport function createArrayPropUtils< TKey extends string, TValue extends PropValue >(\n\tkey: TKey,\n\tvalueSchema: ZodType< TValue >,\n\toverrideKey?: string\n) {\n\treturn createPropUtils( overrideKey || `${ key }-array`, z.array( valueSchema ) );\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 flexPropTypeUtil = createPropUtils(\n\t'flex',\n\tz.strictObject( {\n\t\tflexGrow: unknownChildrenSchema,\n\t\tflexShrink: unknownChildrenSchema,\n\t\tflexBasis: unknownChildrenSchema,\n\t} )\n);\n\nexport type FlexPropValue = z.infer< typeof flexPropTypeUtil.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\n\t\t.strictObject( {\n\t\t\tunit: z.enum( [ 'px', 'em', 'rem', '%', 'vw', 'vh' ] ),\n\t\t\tsize: z.number(),\n\t\t} )\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tunit: z.enum( [ 'deg', 'rad', 'grad', 'turn' ] ),\n\t\t\t\tsize: z.number(),\n\t\t\t} )\n\t\t)\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tunit: z.enum( [ 's', 'ms' ] ),\n\t\t\t\tsize: z.number(),\n\t\t\t} )\n\t\t)\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tunit: z.literal( 'auto' ),\n\t\t\t\tsize: z.literal( '' ),\n\t\t\t} )\n\t\t)\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tunit: z.literal( 'custom' ),\n\t\t\t\tsize: z.string(),\n\t\t\t} )\n\t\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\tisTargetBlank: unknownChildrenSchema,\n\t\ttag: 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 { keyValuePropTypeUtil } from './key-value';\nimport { stringPropTypeUtil } from './string';\nimport { unknownChildrenSchema } from './utils';\n\nexport const selectionSizePropTypeUtil = createPropUtils(\n\t'selection-size',\n\tz.strictObject( {\n\t\tselection: z.union( [ keyValuePropTypeUtil.schema, stringPropTypeUtil.schema ] ),\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n\nexport type SelectionSizePropValue = z.infer< typeof selectionSizePropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const keyValuePropTypeUtil = createPropUtils(\n\t'key-value',\n\tz.strictObject( {\n\t\tkey: unknownChildrenSchema,\n\t\tvalue: unknownChildrenSchema,\n\t} )\n);\n\nexport type KeyValuePropValue = z.infer< typeof keyValuePropTypeUtil.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\tclip: 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\nexport const 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 { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const DateTimePropTypeUtil = createPropUtils(\n\t'date-time',\n\tz.strictObject( {\n\t\tdate: unknownChildrenSchema,\n\t\ttime: unknownChildrenSchema,\n\t} )\n);\n\nexport type DateTimePropValue = z.infer< typeof DateTimePropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const positionPropTypeUtil = createPropUtils(\n\t'object-position',\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t} )\n);\n\nexport type PositionPropTypeValue = z.infer< typeof positionPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const queryPropTypeUtil = createPropUtils(\n\t'query',\n\tz.strictObject( {\n\t\tid: unknownChildrenSchema,\n\t\tlabel: unknownChildrenSchema,\n\t} )\n);\n\nexport type QueryPropValue = z.infer< typeof queryPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const htmlPropTypeUtil = createPropUtils( 'html', z.string().nullable() );\n\nexport type HtmlPropValue = z.infer< typeof htmlPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { stringPropTypeUtil } from '../string';\nimport { dropShadowFilterPropTypeUtil } from './drop-shadow-filter';\nimport { blurFilterPropTypeUtil } from './filter-functions/blur-filter';\nimport { colorToneFilterPropTypeUtil } from './filter-functions/color-tone-filter';\nimport { hueRotateFilterPropTypeUtil } from './filter-functions/hue-rotate-filter';\nimport { intensityFilterPropTypeUtil } from './filter-functions/intensity-filter';\n\nexport const cssFilterFunctionPropUtil = createPropUtils(\n\t'css-filter-func',\n\tz.object( {\n\t\tfunc: stringPropTypeUtil.schema,\n\t\targs: z.union( [\n\t\t\tblurFilterPropTypeUtil.schema,\n\t\t\tintensityFilterPropTypeUtil.schema,\n\t\t\tcolorToneFilterPropTypeUtil.schema,\n\t\t\thueRotateFilterPropTypeUtil.schema,\n\t\t\tdropShadowFilterPropTypeUtil.schema,\n\t\t] ),\n\t} )\n);\n\nexport const filterPropTypeUtil = createPropUtils( 'filter', z.array( cssFilterFunctionPropUtil.schema ) );\n\nexport type FilterItemPropValue = z.infer< typeof cssFilterFunctionPropUtil.schema >;\n\nexport type FilterPropValue = z.infer< typeof filterPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const dropShadowFilterPropTypeUtil = createPropUtils(\n\t'drop-shadow',\n\tz.object( {\n\t\txAxis: unknownChildrenSchema,\n\t\tyAxis: unknownChildrenSchema,\n\t\tblur: unknownChildrenSchema,\n\t\tcolor: unknownChildrenSchema,\n\t} )\n);\n\nexport type DropShadowFilterPropValue = z.infer< typeof dropShadowFilterPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\n\nexport const blurFilterPropTypeUtil = createPropUtils(\n\t'blur',\n\tz.strictObject( {\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\n\nexport const colorToneFilterPropTypeUtil = createPropUtils(\n\t'color-tone',\n\tz.strictObject( {\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\n\nexport const hueRotateFilterPropTypeUtil = createPropUtils(\n\t'hue-rotate',\n\tz.strictObject( {\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\n\nexport const intensityFilterPropTypeUtil = createPropUtils(\n\t'intensity',\n\tz.strictObject( {\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const transformPropTypeUtil = createPropUtils(\n\t'transform',\n\tz.strictObject( {\n\t\t'transform-functions': unknownChildrenSchema,\n\t\t'transform-origin': unknownChildrenSchema,\n\t\tperspective: unknownChildrenSchema,\n\t\t'perspective-origin': unknownChildrenSchema,\n\t} )\n);\n\nexport type TransformPropValue = z.infer< typeof transformPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { moveTransformPropTypeUtil } from './transform-functions/move-transform';\nimport { rotateTransformPropTypeUtil } from './transform-functions/rotate-transform';\nimport { scaleTransformPropTypeUtil } from './transform-functions/scale-transform';\nimport { skewTransformPropTypeUtil } from './transform-functions/skew-transform';\n\nconst filterTypes = moveTransformPropTypeUtil.schema\n\t.or( scaleTransformPropTypeUtil.schema )\n\t.or( rotateTransformPropTypeUtil.schema )\n\t.or( skewTransformPropTypeUtil.schema );\n\nexport const transformFunctionsPropTypeUtil = createPropUtils( 'transform-functions', z.array( filterTypes ) );\n\nexport type TransformFunctionsPropValue = z.infer< typeof transformFunctionsPropTypeUtil.schema >;\n\nexport type TransformFunctionsItemPropValue = z.infer< typeof filterTypes >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\nimport { TransformFunctionKeys } from '../types';\n\nexport const moveTransformPropTypeUtil = createPropUtils(\n\tTransformFunctionKeys.move,\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t\tz: unknownChildrenSchema,\n\t} )\n);\n\nexport type MoveTransformPropValue = z.infer< typeof moveTransformPropTypeUtil.schema >;\n","type TransformFunctions = 'transform-move' | 'transform-scale' | 'transform-rotate' | 'transform-skew';\n\nexport const TransformFunctionKeys: Record< string, TransformFunctions > = {\n\tmove: 'transform-move',\n\tscale: 'transform-scale',\n\trotate: 'transform-rotate',\n\tskew: 'transform-skew',\n};\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\nimport { TransformFunctionKeys } from '../types';\n\nexport const rotateTransformPropTypeUtil = createPropUtils(\n\tTransformFunctionKeys.rotate,\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t\tz: unknownChildrenSchema,\n\t} )\n);\n\nexport type RotateTransformPropValue = z.infer< typeof rotateTransformPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { numberPropTypeUtil } from '../../number';\nimport { TransformFunctionKeys } from '../types';\n\nexport const scaleTransformPropTypeUtil = createPropUtils(\n\tTransformFunctionKeys.scale,\n\tz.strictObject( {\n\t\tx: numberPropTypeUtil.schema.nullable(),\n\t\ty: numberPropTypeUtil.schema.nullable(),\n\t\tz: numberPropTypeUtil.schema.nullable(),\n\t} )\n);\n\nexport type ScaleTransformPropValue = z.infer< typeof scaleTransformPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\nimport { TransformFunctionKeys } from '../types';\n\nexport const skewTransformPropTypeUtil = createPropUtils(\n\tTransformFunctionKeys.skew,\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t} )\n);\n\nexport type SkewTransformPropValue = z.infer< typeof skewTransformPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const transformOriginPropTypeUtil = createPropUtils(\n\t'transform-origin',\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t\tz: unknownChildrenSchema,\n\t} )\n);\n\nexport type TransformOriginPropValue = z.infer< typeof transformOriginPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const perspectiveOriginPropTypeUtil = createPropUtils(\n\t'perspective-origin',\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t} )\n);\n\nexport type PerspectiveOriginPropValue = z.infer< typeof perspectiveOriginPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { cssFilterFunctionPropUtil } from './filter';\n\nexport const backdropFilterPropTypeUtil = createPropUtils(\n\t'backdrop-filter',\n\tz.array( cssFilterFunctionPropUtil.schema )\n);\n\nexport type BackdropFilterPropValue = z.infer< typeof backdropFilterPropTypeUtil.schema >;\n\nexport type BackdropFilterItemPropValue = z.infer< typeof cssFilterFunctionPropUtil.schema >;\n","import { numberPropTypeUtil, type NumberPropValue, stringPropTypeUtil, type StringPropValue } from '../prop-types';\nimport { type ObjectPropValue, type PropValue, type TransformablePropValue } from '../types';\n\nconst ensureNotNull = ( v: unknown, fallback: unknown ) => ( v === null ? fallback : v );\n\nexport const adjustLlmPropValueSchema = ( value: Readonly< PropValue >, forceKey?: string ): PropValue => {\n\tconst clone = structuredClone( value );\n\n\tif ( typeof clone === 'string' ) {\n\t\treturn stringPropTypeUtil.create( clone );\n\t}\n\tif ( typeof clone === 'number' ) {\n\t\treturn numberPropTypeUtil.create( clone );\n\t}\n\t// Check for transformable types\n\tif ( clone && typeof clone === 'object' ) {\n\t\tif ( Array.isArray( clone ) ) {\n\t\t\treturn clone.map( ( item ) => adjustLlmPropValueSchema( item, forceKey ) ) as PropValue;\n\t\t}\n\t\tconst transformablePropValue = clone as TransformablePropValue< string >;\n\t\tif ( forceKey ) {\n\t\t\ttransformablePropValue.$$type = forceKey;\n\t\t}\n\n\t\tif ( ! transformablePropValue.$$type ) {\n\t\t\tthrow new Error( 'Missing $$type in property: ' + JSON.stringify( transformablePropValue ) );\n\t\t}\n\n\t\tif ( ! ( 'value' in transformablePropValue ) ) {\n\t\t\tthrow new Error( 'Missing value property in PropValue: ' + JSON.stringify( transformablePropValue ) );\n\t\t}\n\n\t\t// fix by type\n\t\tswitch ( transformablePropValue.$$type ) {\n\t\t\tcase 'size': {\n\t\t\t\tconst { value: rawSizePropValue } = transformablePropValue as TransformablePropValue<\n\t\t\t\t\tstring,\n\t\t\t\t\t{ size: StringPropValue | NumberPropValue; unit: StringPropValue }\n\t\t\t\t>;\n\t\t\t\tconst unit =\n\t\t\t\t\ttypeof rawSizePropValue.unit === 'string'\n\t\t\t\t\t\t? rawSizePropValue.unit\n\t\t\t\t\t\t: ensureNotNull( stringPropTypeUtil.extract( rawSizePropValue.unit ), 'px' );\n\t\t\t\tconst size =\n\t\t\t\t\ttypeof rawSizePropValue.size === 'string' || typeof rawSizePropValue.size === 'number'\n\t\t\t\t\t\t? rawSizePropValue.size\n\t\t\t\t\t\t: ensureNotNull(\n\t\t\t\t\t\t\t\tstringPropTypeUtil.extract( rawSizePropValue.size ),\n\t\t\t\t\t\t\t\tnumberPropTypeUtil.extract( rawSizePropValue.size )\n\t\t\t\t\t\t );\n\t\t\t\treturn {\n\t\t\t\t\t$$type: 'size',\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\tunit,\n\t\t\t\t\t\tsize,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( typeof transformablePropValue.value === 'object' ) {\n\t\t\tif ( Array.isArray( transformablePropValue.value ) ) {\n\t\t\t\ttransformablePropValue.value = adjustLlmPropValueSchema(\n\t\t\t\t\ttransformablePropValue.value,\n\t\t\t\t\tundefined\n\t\t\t\t) as PropValue[];\n\t\t\t} else {\n\t\t\t\tconst { value: objectValue } = transformablePropValue as ObjectPropValue;\n\t\t\t\tconst clonedObject = clone as ObjectPropValue;\n\t\t\t\tclonedObject.value = {} as Record< string, PropValue >;\n\t\t\t\tObject.keys( objectValue ).forEach( ( key ) => {\n\t\t\t\t\tconst childProp = ( objectValue as Record< string, unknown > )[ key ];\n\t\t\t\t\t( clonedObject.value as Record< string, unknown > )[ key ] = adjustLlmPropValueSchema(\n\t\t\t\t\t\tchildProp as PropValue,\n\t\t\t\t\t\tundefined\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\treturn clone;\n};\n","import { type PropsSchema, type PropType } from '../types';\nimport { type JsonSchema7 } from './prop-json-schema';\n\nexport function jsonSchemaToPropType( schema: JsonSchema7, key = < string >schema.key ): PropType {\n\tconst meta: Record< string, unknown > = {};\n\n\tif ( schema.description ) {\n\t\tmeta.description = schema.description;\n\t}\n\n\t// Handle union types (anyOf)\n\tif ( schema.anyOf && Array.isArray( schema.anyOf ) ) {\n\t\treturn convertJsonSchemaToUnionPropType( schema, meta );\n\t}\n\n\t// Handle object types\n\tif ( schema.type === 'object' && schema.properties ) {\n\t\treturn convertJsonSchemaToObjectPropType( schema, meta, key );\n\t}\n\n\t// Handle array types\n\tif ( schema.type === 'array' && schema.items ) {\n\t\treturn convertJsonSchemaToArrayPropType( schema, meta, key );\n\t}\n\n\t// Handle plain types (string, number, boolean)\n\treturn convertJsonSchemaToPlainPropType( schema, meta, key );\n}\n\nfunction convertJsonSchemaToPlainPropType(\n\tschema: JsonSchema7,\n\tmeta: Record< string, unknown >,\n\tkey = < string >schema.key\n): PropType {\n\tconst settings: Record< string, unknown > = {};\n\n\t// Determine the key based on type\n\tlet propKey = key || 'string';\n\n\tif ( schema.type === 'number' ) {\n\t\tpropKey = 'number';\n\t} else if ( schema.type === 'boolean' ) {\n\t\tpropKey = 'boolean';\n\t} else if ( schema.type === 'string' ) {\n\t\tpropKey = 'string';\n\t}\n\n\t// Handle enum values\n\tif ( Array.isArray( schema.enum ) ) {\n\t\tsettings.enum = schema.enum;\n\t}\n\n\treturn {\n\t\tkind: 'plain',\n\t\tkey: propKey,\n\t\tsettings,\n\t\tmeta,\n\t} as PropType;\n}\n\n/**\n * Converts a JSON Schema anyOf to a union PropType\n * @param schema\n * @param meta\n */\nfunction convertJsonSchemaToUnionPropType( schema: JsonSchema7, meta: Record< string, unknown > ): PropType {\n\tconst propTypes: Record< string, PropType > = {};\n\n\tif ( ! schema.anyOf || ! Array.isArray( schema.anyOf ) ) {\n\t\tthrow new Error( 'Invalid anyOf schema' );\n\t}\n\n\t// Process each variant in the anyOf array\n\tfor ( const variantSchema of schema.anyOf ) {\n\t\t// Each variant should be an object with $$type and value properties\n\t\tif (\n\t\t\tvariantSchema.type === 'object' &&\n\t\t\tvariantSchema.properties &&\n\t\t\tvariantSchema.properties.$$type &&\n\t\t\tvariantSchema.properties.value\n\t\t) {\n\t\t\tconst typeProperty = variantSchema.properties.$$type;\n\n\t\t\t// Extract the type key from the enum\n\t\t\tlet typeKey: string;\n\t\t\tif ( typeProperty.enum && Array.isArray( typeProperty.enum ) && typeProperty.enum.length > 0 ) {\n\t\t\t\ttypeKey = typeProperty.enum[ 0 ] as string;\n\t\t\t} else {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Convert the value schema to a PropType\n\t\t\tconst valuePropType = convertJsonSchemaToPropType( variantSchema.properties.value );\n\t\t\tpropTypes[ typeKey ] = valuePropType;\n\t\t}\n\t}\n\n\treturn {\n\t\tkind: 'union',\n\t\tprop_types: propTypes,\n\t\tsettings: {},\n\t\tmeta,\n\t} as PropType;\n}\n\nfunction convertJsonSchemaToObjectPropType(\n\tschema: JsonSchema7,\n\tmeta: Record< string, unknown >,\n\tkey = < string >schema.key\n): PropType {\n\tconst shape: Record< string, PropType > = {};\n\n\tif ( ! schema.properties ) {\n\t\treturn {\n\t\t\tkind: 'object',\n\t\t\tkey,\n\t\t\tshape: {},\n\t\t\tsettings: {},\n\t\t\tmeta,\n\t\t} as PropType;\n\t}\n\n\tconst requiredFields = Array.isArray( schema.required ) ? schema.required : [];\n\n\t// Convert each property\n\tfor ( const [ propKey, propSchema ] of Object.entries( schema.properties ) ) {\n\t\tconst subPropType = convertJsonSchemaToPropType( propSchema, key );\n\n\t\t// Mark as required if it's in the required array\n\t\tif ( requiredFields.includes( propKey ) ) {\n\t\t\tsubPropType.settings = {\n\t\t\t\t...subPropType.settings,\n\t\t\t\trequired: true,\n\t\t\t};\n\t\t}\n\n\t\tshape[ propKey ] = subPropType;\n\t}\n\n\treturn {\n\t\tkind: 'object',\n\t\tkey: key || 'object',\n\t\tshape,\n\t\tsettings: {},\n\t\tmeta,\n\t} as PropType;\n}\n\nfunction convertJsonSchemaToArrayPropType(\n\tschema: JsonSchema7,\n\tmeta: Record< string, unknown >,\n\tkey = < string >schema.key\n): PropType {\n\tif ( ! schema.items ) {\n\t\tthrow new Error( 'Array schema must have items property' );\n\t}\n\n\tconst itemPropType = convertJsonSchemaToPropType( schema.items );\n\n\treturn {\n\t\tkind: 'array',\n\t\tkey: key || 'array',\n\t\titem_prop_type: itemPropType,\n\t\tsettings: {},\n\t\tmeta,\n\t} as PropType;\n}\n\nfunction convertJsonSchemaToPropType( schema: JsonSchema7, key?: string ): PropType {\n\treturn jsonSchemaToPropType( schema, key );\n}\n\n/**\n * Converts a complete JSON Schema object back to a PropsSchema\n *\n * @param jsonSchema The JSON Schema to convert\n */\nexport function jsonSchemaToPropsSchema( jsonSchema: JsonSchema7 ): PropsSchema {\n\tconst propsSchema: PropsSchema = {};\n\n\tif ( jsonSchema.type !== 'object' || ! jsonSchema.properties ) {\n\t\tthrow new Error( 'Root schema must be an object with properties' );\n\t}\n\n\tfor ( const [ key, propSchema ] of Object.entries( jsonSchema.properties ) ) {\n\t\tpropsSchema[ key ] = convertJsonSchemaToPropType( propSchema, key );\n\t}\n\n\treturn propsSchema;\n}\n","import { type PropsSchema, type PropType } from '../types';\nimport { type JsonSchema7 } from './prop-json-schema';\n\nexport function propTypeToJsonSchema( propType: PropType ): JsonSchema7 {\n\tconst description = propType.meta?.description;\n\n\tconst schema: JsonSchema7 = {};\n\n\tif ( description ) {\n\t\tschema.description = description;\n\t}\n\n\t// Handle different kinds of prop types\n\tswitch ( propType.kind ) {\n\t\tcase 'plain':\n\t\t\treturn convertPlainPropType( propType, schema );\n\t\tcase 'union':\n\t\t\treturn convertUnionPropType( propType, schema );\n\t\tcase 'object':\n\t\t\treturn convertObjectPropType( propType, schema );\n\t\tcase 'array':\n\t\t\treturn convertArrayPropType( propType, schema );\n\t\tdefault:\n\t\t\treturn convertPlainPropType( propType, schema );\n\t}\n\n\treturn schema;\n}\n\nfunction convertPlainPropType( propType: PropType & { kind: 'plain' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = { ...baseSchema };\n\n\t// Determine type based on key\n\tconst key = propType.key.toLowerCase();\n\n\tswitch ( key ) {\n\t\tcase 'number':\n\t\t\tschema.type = 'number';\n\t\t\tbreak;\n\t\tcase 'boolean':\n\t\t\tschema.type = 'boolean';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tschema.type = 'string';\n\t}\n\n\t// Handle enum from settings\n\tif ( Array.isArray( propType.settings?.enum ) ) {\n\t\tschema.enum = propType.settings.enum;\n\t}\n\n\treturn schema;\n}\n\n/**\n * Converts a union prop type to JSON Schema ( электричество anyOf)\n *\n * @param propType The union prop type to convert\n * @param baseSchema Base schema to extend\n */\nfunction convertUnionPropType( propType: PropType & { kind: 'union' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = structuredClone( baseSchema );\n\n\tconst propTypes = propType.prop_types || {};\n\tconst schemas: JsonSchema7[] = [];\n\n\t// Convert each prop type in the union\n\tfor ( const [ typeKey, subPropType ] of Object.entries( propTypes ) ) {\n\t\tconst subSchema = convertPropTypeToJsonSchema( subPropType );\n\n\t\tschemas.push( {\n\t\t\ttype: 'object',\n\t\t\trequired: [ '$$type', 'value' ],\n\t\t\tproperties: {\n\t\t\t\t$$type: {\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tconst: typeKey,\n\t\t\t\t\tdescription: subPropType.meta?.description,\n\t\t\t\t\t$comment: `Discriminator for union type variant: ${ typeKey }`,\n\t\t\t\t},\n\t\t\t\tvalue: subSchema,\n\t\t\t},\n\t\t} );\n\t}\n\n\tif ( schemas.length > 0 ) {\n\t\tschema.anyOf = schemas;\n\t}\n\n\tconst propTypeDescription = propType.meta?.description;\n\tif ( propTypeDescription ) {\n\t\tschema.description = propTypeDescription;\n\t}\n\treturn schema;\n}\n\nfunction convertObjectPropType( propType: PropType & { kind: 'object' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = structuredClone( baseSchema );\n\n\tschema.type = 'object';\n\tschema.properties = {};\n\n\tconst required: string[] = [];\n\n\tconst shape = propType.shape || {};\n\n\t// Convert each property in the object shape\n\tfor ( const [ key, subPropType ] of Object.entries( shape ) ) {\n\t\tconst propSchema = convertPropTypeToJsonSchema( subPropType );\n\n\t\t// Check if this property is required\n\t\tif ( subPropType.settings?.required === true ) {\n\t\t\trequired.push( key );\n\t\t}\n\n\t\tschema.properties[ key ] = propSchema;\n\t}\n\n\t// Add required array if there are required fields\n\tif ( required.length > 0 ) {\n\t\tschema.required = required;\n\t}\n\n\treturn schema;\n}\n\nfunction convertArrayPropType( propType: PropType & { kind: 'array' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = structuredClone( baseSchema );\n\n\tschema.type = 'array';\n\n\tconst itemPropType = propType.item_prop_type;\n\n\tif ( itemPropType ) {\n\t\tschema.items = convertPropTypeToJsonSchema( itemPropType );\n\t}\n\n\treturn schema;\n}\n\nfunction convertPropTypeToJsonSchema( propType: PropType ): JsonSchema7 {\n\treturn propTypeToJsonSchema( propType );\n}\n\nexport function propsSchemaToJsonSchema( schema: PropsSchema ): JsonSchema7 {\n\tconst jsonSchema: JsonSchema7 = {\n\t\ttype: 'object',\n\t\tproperties: {},\n\t};\n\n\tfor ( const [ key, propType ] of Object.entries( schema ) ) {\n\t\t// Skip internal properties\n\t\tif ( ! isPropKeyConfigurable( key ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst propSchema = convertPropTypeToJsonSchema( propType );\n\t\tif ( jsonSchema.properties ) {\n\t\t\tjsonSchema.properties[ key ] = propSchema;\n\t\t}\n\n\t\t// Handle required fields at root level if needed\n\t\t// (typically props are optional unless specified)\n\t}\n\n\treturn jsonSchema;\n}\n\nexport const nonConfigurablePropKeys = [ '_cssid', 'classes', 'attributes' ] as readonly string[];\n\nexport function isPropKeyConfigurable( propKey: string ): boolean {\n\treturn ! nonConfigurablePropKeys.includes( propKey );\n}\n\nexport function configurableKeys( schema: PropsSchema ): string[] {\n\treturn Object.keys( schema ).filter( isPropKeyConfigurable );\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","import { type PropValue } from '../types';\nimport { isTransformable } from '../utils/is-transformable';\n\nexport const filterEmptyValues = < TValue extends PropValue >( value: TValue ): TValue | null => {\n\tif ( isEmpty( value ) ) {\n\t\treturn null;\n\t}\n\n\tif ( Array.isArray( value ) ) {\n\t\treturn value.map( filterEmptyValues ).filter( ( item ) => ! isEmpty( item ) ) as TValue;\n\t}\n\n\tif ( typeof value === 'object' ) {\n\t\treturn Object.fromEntries(\n\t\t\tObject.entries( value )\n\t\t\t\t.map( ( [ key, val ] ) => [ key, filterEmptyValues( val ) ] )\n\t\t\t\t.filter( ( [ , val ] ) => ! isEmpty( val ) )\n\t\t);\n\t}\n\n\treturn value;\n};\n\ntype Nullish = null | undefined | '';\n\nexport const isEmpty = ( value: PropValue ): value is Nullish => {\n\tif ( value && isTransformable( value ) ) {\n\t\treturn isEmpty( value.value );\n\t}\n\n\treturn isNullish( value ) || isNullishArray( value ) || isNullishObject( value );\n};\n\nconst isNullish = ( value: PropValue ): value is Nullish => value === null || value === undefined || value === '';\n\nconst isNullishArray = ( value: NonNullable< PropValue > ): value is Nullish[] =>\n\tArray.isArray( value ) && value.every( isEmpty );\n\nconst isNullishObject = ( value: NonNullable< PropValue > ): value is Record< string, Nullish > => {\n\treturn typeof value === 'object' && isNullishArray( Object.values( value ) );\n};\n","import type { Props } from '../types';\n\nexport function mergeProps( current: Props, updates: Props ) {\n\t// edge case, the server returns an array instead of an object when empty props because of PHP array / object conversion\n\tlet props: Props = {};\n\n\tif ( ! Array.isArray( current ) ) {\n\t\tprops = structuredClone( current );\n\t}\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 {\n\ttype Dependency,\n\ttype DependencyTerm,\n\ttype PropKey,\n\ttype PropValue,\n\ttype TransformablePropValue,\n} from '../types';\nimport { isTransformable } from './is-transformable';\n\ntype ParsedTerm = DependencyTerm;\n\ntype Relation = Dependency[ 'relation' ];\n\nexport function isDependencyMet(\n\tdependency: Dependency | undefined,\n\tvalues: PropValue\n): { isMet: true } | { isMet: false; failingDependencies: ( DependencyTerm | Dependency )[] } {\n\tif ( ! dependency?.terms.length ) {\n\t\treturn { isMet: true };\n\t}\n\n\tconst { relation, terms } = dependency;\n\tconst method = getRelationMethod( relation );\n\n\tconst failingDependencies: ( DependencyTerm | Dependency )[] = [];\n\tconst isMet = terms[ method ]( ( term: ParsedTerm | Dependency ) => {\n\t\tconst isNestedDependency = isDependency( term );\n\t\tconst result = isNestedDependency\n\t\t\t? isDependencyMet( term, values ).isMet\n\t\t\t: evaluateTerm( term, extractValue( term.path, values, term.nestedPath )?.value );\n\n\t\tif ( ! result ) {\n\t\t\tfailingDependencies.push( term );\n\t\t}\n\n\t\treturn result;\n\t} );\n\n\treturn { isMet, failingDependencies };\n}\n\nexport function evaluateTerm( term: DependencyTerm, actualValue: unknown ) {\n\tconst { value: valueToCompare, operator } = term;\n\n\tswitch ( operator ) {\n\t\tcase 'eq':\n\t\tcase 'ne':\n\t\t\treturn ( actualValue === valueToCompare ) === ( 'eq' === operator );\n\n\t\tcase 'gt':\n\t\tcase 'lte':\n\t\t\tif ( ! isNumber( actualValue ) || ! isNumber( valueToCompare ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn Number( actualValue ) > Number( valueToCompare ) === ( 'gt' === operator );\n\n\t\tcase 'lt':\n\t\tcase 'gte':\n\t\t\tif ( ! isNumber( actualValue ) || ! isNumber( valueToCompare ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn Number( actualValue ) < Number( valueToCompare ) === ( 'lt' === operator );\n\t\tcase 'in':\n\t\tcase 'nin':\n\t\t\tif ( ! Array.isArray( valueToCompare ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn valueToCompare.includes( actualValue as never ) === ( 'in' === operator );\n\n\t\tcase 'contains':\n\t\tcase 'ncontains':\n\t\t\tif (\n\t\t\t\t( 'string' !== typeof actualValue || 'string' !== typeof valueToCompare ) &&\n\t\t\t\t! Array.isArray( actualValue )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn ( 'contains' === operator ) === actualValue.includes( valueToCompare as never );\n\n\t\tcase 'exists':\n\t\tcase 'not_exist':\n\t\t\tconst evaluation = !! actualValue || 0 === actualValue || false === actualValue;\n\n\t\t\treturn ( 'exists' === operator ) === evaluation;\n\n\t\tdefault:\n\t\t\treturn true;\n\t}\n}\n\nfunction isNumber( value: unknown ): value is number {\n\treturn typeof value === 'number' && ! isNaN( value );\n}\n\nfunction getRelationMethod( relation: Relation ) {\n\tswitch ( relation ) {\n\t\tcase 'or':\n\t\t\treturn 'some';\n\n\t\tcase 'and':\n\t\t\treturn 'every';\n\n\t\tdefault:\n\t\t\tthrow new Error( `Relation not supported ${ relation }` );\n\t}\n}\n\nexport function extractValue(\n\tpath: string[],\n\telementValues: PropValue,\n\tnestedPath: string[] = []\n): TransformablePropValue< PropKey > | null {\n\tconst extractedValue = path.reduce( ( acc, key, index ) => {\n\t\tconst value = acc?.[ key as keyof typeof acc ] as PropValue | null;\n\n\t\treturn index !== path.length - 1 && isTransformable( value ) ? value.value ?? null : value;\n\t}, elementValues ) as TransformablePropValue< PropKey >;\n\n\tif ( ! nestedPath?.length ) {\n\t\treturn extractedValue;\n\t}\n\n\tconst nestedValue = nestedPath.reduce(\n\t\t( acc: Record< string, unknown >, key ) => acc?.[ key ] as Record< string, unknown >,\n\t\textractedValue?.value as Record< string, unknown >\n\t);\n\n\treturn {\n\t\t$$type: 'unknown',\n\t\tvalue: nestedValue,\n\t};\n}\n\nexport function isDependency( term: DependencyTerm | Dependency ): term is Dependency {\n\treturn 'terms' in term;\n}\n","import { type PropType, type PropValue } from '../types';\nimport { isTransformable } from './is-transformable';\n\nexport const PROP_TYPE_COMPATIBILITY_MAP: Record< string, string[] > = {\n\thtml: [ 'string' ],\n\tstring: [ 'html' ],\n};\n\nexport function getCompatibleTypeKeys( propType: PropType ): string[] {\n\tif ( propType.kind === 'union' ) {\n\t\treturn [];\n\t}\n\n\tconst compatibleKeys = propType.meta?.compatibleTypeKeys as string[] | undefined;\n\n\tif ( Array.isArray( compatibleKeys ) ) {\n\t\treturn compatibleKeys;\n\t}\n\n\treturn PROP_TYPE_COMPATIBILITY_MAP[ propType.key ] ?? [];\n}\n\nexport function migratePropValue( value: PropValue, propType: PropType ): PropValue {\n\tif ( ! isTransformable( value ) ) {\n\t\treturn value;\n\t}\n\n\tif ( propType.kind === 'union' ) {\n\t\tconst propTypes = propType.prop_types;\n\n\t\tfor ( const unionPropType of Object.values( propTypes ) ) {\n\t\t\tconst expectedKey = unionPropType.key;\n\n\t\t\tif ( value.$$type === expectedKey ) {\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\tconst compatibleKeys = getCompatibleTypeKeys( unionPropType );\n\n\t\t\tif ( compatibleKeys.includes( value.$$type ) ) {\n\t\t\t\treturn { ...value, $$type: expectedKey };\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst expectedKey = propType.key;\n\n\t\tif ( value.$$type === expectedKey ) {\n\t\t\treturn value;\n\t\t}\n\n\t\tconst compatibleKeys = getCompatibleTypeKeys( propType );\n\n\t\tif ( compatibleKeys.includes( value.$$type ) ) {\n\t\t\treturn { ...value, $$type: expectedKey };\n\t\t}\n\t}\n\n\treturn value;\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;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,iBAAkB;;;ACAlB,oBAAgC;AAWhC,IAAM,eAAe,oBAAI,IAAuB;AAqBzC,SAAS,uBAAwB,KAAc;AACrD,SAAO,aAAa,IAAK,GAAI;AAC9B;AAEO,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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,MAAO,GAAI;AAC9C,aAAO,EAAE,GAAG,OAAO,QAAQ,YAAY;AAAA,IACxC;AAAA,EACD;AAEA,SAAO;AACR;;;A5D9BO,IAAM,SAAS;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;","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","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"]}
package/dist/index.mjs CHANGED
@@ -948,6 +948,50 @@ function isDependency(term) {
948
948
  return "terms" in term;
949
949
  }
950
950
 
951
+ // src/utils/prop-type-compatibility.ts
952
+ var PROP_TYPE_COMPATIBILITY_MAP = {
953
+ html: ["string"],
954
+ string: ["html"]
955
+ };
956
+ function getCompatibleTypeKeys(propType) {
957
+ if (propType.kind === "union") {
958
+ return [];
959
+ }
960
+ const compatibleKeys = propType.meta?.compatibleTypeKeys;
961
+ if (Array.isArray(compatibleKeys)) {
962
+ return compatibleKeys;
963
+ }
964
+ return PROP_TYPE_COMPATIBILITY_MAP[propType.key] ?? [];
965
+ }
966
+ function migratePropValue(value, propType) {
967
+ if (!isTransformable(value)) {
968
+ return value;
969
+ }
970
+ if (propType.kind === "union") {
971
+ const propTypes = propType.prop_types;
972
+ for (const unionPropType of Object.values(propTypes)) {
973
+ const expectedKey = unionPropType.key;
974
+ if (value.$$type === expectedKey) {
975
+ return value;
976
+ }
977
+ const compatibleKeys = getCompatibleTypeKeys(unionPropType);
978
+ if (compatibleKeys.includes(value.$$type)) {
979
+ return { ...value, $$type: expectedKey };
980
+ }
981
+ }
982
+ } else {
983
+ const expectedKey = propType.key;
984
+ if (value.$$type === expectedKey) {
985
+ return value;
986
+ }
987
+ const compatibleKeys = getCompatibleTypeKeys(propType);
988
+ if (compatibleKeys.includes(value.$$type)) {
989
+ return { ...value, $$type: expectedKey };
990
+ }
991
+ }
992
+ return value;
993
+ }
994
+
951
995
  // src/index.ts
952
996
  var Schema = {
953
997
  jsonSchemaToPropType,
@@ -960,6 +1004,7 @@ var Schema = {
960
1004
  export {
961
1005
  CLASSES_PROP_KEY,
962
1006
  DateTimePropTypeUtil,
1007
+ PROP_TYPE_COMPATIBILITY_MAP,
963
1008
  Schema,
964
1009
  backdropFilterPropTypeUtil,
965
1010
  backgroundColorOverlayPropTypeUtil,
@@ -989,6 +1034,7 @@ export {
989
1034
  filterEmptyValues,
990
1035
  filterPropTypeUtil,
991
1036
  flexPropTypeUtil,
1037
+ getCompatibleTypeKeys,
992
1038
  getPropSchemaFromCache,
993
1039
  gradientColorStopPropTypeUtil,
994
1040
  htmlPropTypeUtil,
@@ -1005,6 +1051,7 @@ export {
1005
1051
  layoutDirectionPropTypeUtil,
1006
1052
  linkPropTypeUtil,
1007
1053
  mergeProps,
1054
+ migratePropValue,
1008
1055
  moveTransformPropTypeUtil,
1009
1056
  numberPropTypeUtil,
1010
1057
  perspectiveOriginPropTypeUtil,
@@ -1 +1 @@
1
- {"version":3,"sources":["../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/flex.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/selection-size.ts","../src/prop-types/key-value.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/prop-types/date-time.ts","../src/prop-types/position.ts","../src/prop-types/query.ts","../src/prop-types/html.ts","../src/prop-types/filter-prop-types/filter.ts","../src/prop-types/filter-prop-types/drop-shadow-filter.ts","../src/prop-types/filter-prop-types/filter-functions/blur-filter.ts","../src/prop-types/filter-prop-types/filter-functions/color-tone-filter.ts","../src/prop-types/filter-prop-types/filter-functions/hue-rotate-filter.ts","../src/prop-types/filter-prop-types/filter-functions/intensity-filter.ts","../src/prop-types/transform-prop-types/transform.ts","../src/prop-types/transform-prop-types/transform-functions.ts","../src/prop-types/transform-prop-types/transform-functions/move-transform.ts","../src/prop-types/transform-prop-types/types.ts","../src/prop-types/transform-prop-types/transform-functions/rotate-transform.ts","../src/prop-types/transform-prop-types/transform-functions/scale-transform.ts","../src/prop-types/transform-prop-types/transform-functions/skew-transform.ts","../src/prop-types/transform-prop-types/transform-origin.ts","../src/prop-types/transform-prop-types/perspective-origin.ts","../src/prop-types/filter-prop-types/backdrop-filter.ts","../src/utils/adjust-llm-prop-value-schema.ts","../src/utils/llm-schema-to-props.ts","../src/utils/props-to-llm-schema.ts","../src/utils/is-transformable.ts","../src/utils/filter-empty-values.ts","../src/utils/merge-props.ts","../src/utils/prop-dependency-utils.ts","../src/index.ts"],"sourcesContent":["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\nconst SCHEMA_CACHE = new Map< string, unknown >();\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 getPropSchemaFromCache( key: string ) {\n\treturn SCHEMA_CACHE.get( key ) as PropTypeUtil< string, PropValue > | undefined;\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\tconst propUtil = {\n\t\textract,\n\t\tisValid,\n\t\tcreate,\n\t\tschema,\n\t\tkey: key as TKey,\n\t};\n\n\tSCHEMA_CACHE.set( key, propUtil );\n\treturn propUtil;\n}\n\nexport function createArrayPropUtils< TKey extends string, TValue extends PropValue >(\n\tkey: TKey,\n\tvalueSchema: ZodType< TValue >,\n\toverrideKey?: string\n) {\n\treturn createPropUtils( overrideKey || `${ key }-array`, z.array( valueSchema ) );\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 flexPropTypeUtil = createPropUtils(\n\t'flex',\n\tz.strictObject( {\n\t\tflexGrow: unknownChildrenSchema,\n\t\tflexShrink: unknownChildrenSchema,\n\t\tflexBasis: unknownChildrenSchema,\n\t} )\n);\n\nexport type FlexPropValue = z.infer< typeof flexPropTypeUtil.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\n\t\t.strictObject( {\n\t\t\tunit: z.enum( [ 'px', 'em', 'rem', '%', 'vw', 'vh' ] ),\n\t\t\tsize: z.number(),\n\t\t} )\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tunit: z.enum( [ 'deg', 'rad', 'grad', 'turn' ] ),\n\t\t\t\tsize: z.number(),\n\t\t\t} )\n\t\t)\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tunit: z.enum( [ 's', 'ms' ] ),\n\t\t\t\tsize: z.number(),\n\t\t\t} )\n\t\t)\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tunit: z.literal( 'auto' ),\n\t\t\t\tsize: z.literal( '' ),\n\t\t\t} )\n\t\t)\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tunit: z.literal( 'custom' ),\n\t\t\t\tsize: z.string(),\n\t\t\t} )\n\t\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\tisTargetBlank: unknownChildrenSchema,\n\t\ttag: 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 { keyValuePropTypeUtil } from './key-value';\nimport { stringPropTypeUtil } from './string';\nimport { unknownChildrenSchema } from './utils';\n\nexport const selectionSizePropTypeUtil = createPropUtils(\n\t'selection-size',\n\tz.strictObject( {\n\t\tselection: z.union( [ keyValuePropTypeUtil.schema, stringPropTypeUtil.schema ] ),\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n\nexport type SelectionSizePropValue = z.infer< typeof selectionSizePropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const keyValuePropTypeUtil = createPropUtils(\n\t'key-value',\n\tz.strictObject( {\n\t\tkey: unknownChildrenSchema,\n\t\tvalue: unknownChildrenSchema,\n\t} )\n);\n\nexport type KeyValuePropValue = z.infer< typeof keyValuePropTypeUtil.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\tclip: 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\nexport const 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 { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const DateTimePropTypeUtil = createPropUtils(\n\t'date-time',\n\tz.strictObject( {\n\t\tdate: unknownChildrenSchema,\n\t\ttime: unknownChildrenSchema,\n\t} )\n);\n\nexport type DateTimePropValue = z.infer< typeof DateTimePropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const positionPropTypeUtil = createPropUtils(\n\t'object-position',\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t} )\n);\n\nexport type PositionPropTypeValue = z.infer< typeof positionPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const queryPropTypeUtil = createPropUtils(\n\t'query',\n\tz.strictObject( {\n\t\tid: unknownChildrenSchema,\n\t\tlabel: unknownChildrenSchema,\n\t} )\n);\n\nexport type QueryPropValue = z.infer< typeof queryPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const htmlPropTypeUtil = createPropUtils( 'html', z.string().nullable() );\n\nexport type HtmlPropValue = z.infer< typeof htmlPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { stringPropTypeUtil } from '../string';\nimport { dropShadowFilterPropTypeUtil } from './drop-shadow-filter';\nimport { blurFilterPropTypeUtil } from './filter-functions/blur-filter';\nimport { colorToneFilterPropTypeUtil } from './filter-functions/color-tone-filter';\nimport { hueRotateFilterPropTypeUtil } from './filter-functions/hue-rotate-filter';\nimport { intensityFilterPropTypeUtil } from './filter-functions/intensity-filter';\n\nexport const cssFilterFunctionPropUtil = createPropUtils(\n\t'css-filter-func',\n\tz.object( {\n\t\tfunc: stringPropTypeUtil.schema,\n\t\targs: z.union( [\n\t\t\tblurFilterPropTypeUtil.schema,\n\t\t\tintensityFilterPropTypeUtil.schema,\n\t\t\tcolorToneFilterPropTypeUtil.schema,\n\t\t\thueRotateFilterPropTypeUtil.schema,\n\t\t\tdropShadowFilterPropTypeUtil.schema,\n\t\t] ),\n\t} )\n);\n\nexport const filterPropTypeUtil = createPropUtils( 'filter', z.array( cssFilterFunctionPropUtil.schema ) );\n\nexport type FilterItemPropValue = z.infer< typeof cssFilterFunctionPropUtil.schema >;\n\nexport type FilterPropValue = z.infer< typeof filterPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const dropShadowFilterPropTypeUtil = createPropUtils(\n\t'drop-shadow',\n\tz.object( {\n\t\txAxis: unknownChildrenSchema,\n\t\tyAxis: unknownChildrenSchema,\n\t\tblur: unknownChildrenSchema,\n\t\tcolor: unknownChildrenSchema,\n\t} )\n);\n\nexport type DropShadowFilterPropValue = z.infer< typeof dropShadowFilterPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\n\nexport const blurFilterPropTypeUtil = createPropUtils(\n\t'blur',\n\tz.strictObject( {\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\n\nexport const colorToneFilterPropTypeUtil = createPropUtils(\n\t'color-tone',\n\tz.strictObject( {\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\n\nexport const hueRotateFilterPropTypeUtil = createPropUtils(\n\t'hue-rotate',\n\tz.strictObject( {\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\n\nexport const intensityFilterPropTypeUtil = createPropUtils(\n\t'intensity',\n\tz.strictObject( {\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const transformPropTypeUtil = createPropUtils(\n\t'transform',\n\tz.strictObject( {\n\t\t'transform-functions': unknownChildrenSchema,\n\t\t'transform-origin': unknownChildrenSchema,\n\t\tperspective: unknownChildrenSchema,\n\t\t'perspective-origin': unknownChildrenSchema,\n\t} )\n);\n\nexport type TransformPropValue = z.infer< typeof transformPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { moveTransformPropTypeUtil } from './transform-functions/move-transform';\nimport { rotateTransformPropTypeUtil } from './transform-functions/rotate-transform';\nimport { scaleTransformPropTypeUtil } from './transform-functions/scale-transform';\nimport { skewTransformPropTypeUtil } from './transform-functions/skew-transform';\n\nconst filterTypes = moveTransformPropTypeUtil.schema\n\t.or( scaleTransformPropTypeUtil.schema )\n\t.or( rotateTransformPropTypeUtil.schema )\n\t.or( skewTransformPropTypeUtil.schema );\n\nexport const transformFunctionsPropTypeUtil = createPropUtils( 'transform-functions', z.array( filterTypes ) );\n\nexport type TransformFunctionsPropValue = z.infer< typeof transformFunctionsPropTypeUtil.schema >;\n\nexport type TransformFunctionsItemPropValue = z.infer< typeof filterTypes >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\nimport { TransformFunctionKeys } from '../types';\n\nexport const moveTransformPropTypeUtil = createPropUtils(\n\tTransformFunctionKeys.move,\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t\tz: unknownChildrenSchema,\n\t} )\n);\n\nexport type MoveTransformPropValue = z.infer< typeof moveTransformPropTypeUtil.schema >;\n","type TransformFunctions = 'transform-move' | 'transform-scale' | 'transform-rotate' | 'transform-skew';\n\nexport const TransformFunctionKeys: Record< string, TransformFunctions > = {\n\tmove: 'transform-move',\n\tscale: 'transform-scale',\n\trotate: 'transform-rotate',\n\tskew: 'transform-skew',\n};\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\nimport { TransformFunctionKeys } from '../types';\n\nexport const rotateTransformPropTypeUtil = createPropUtils(\n\tTransformFunctionKeys.rotate,\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t\tz: unknownChildrenSchema,\n\t} )\n);\n\nexport type RotateTransformPropValue = z.infer< typeof rotateTransformPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { numberPropTypeUtil } from '../../number';\nimport { TransformFunctionKeys } from '../types';\n\nexport const scaleTransformPropTypeUtil = createPropUtils(\n\tTransformFunctionKeys.scale,\n\tz.strictObject( {\n\t\tx: numberPropTypeUtil.schema.nullable(),\n\t\ty: numberPropTypeUtil.schema.nullable(),\n\t\tz: numberPropTypeUtil.schema.nullable(),\n\t} )\n);\n\nexport type ScaleTransformPropValue = z.infer< typeof scaleTransformPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\nimport { TransformFunctionKeys } from '../types';\n\nexport const skewTransformPropTypeUtil = createPropUtils(\n\tTransformFunctionKeys.skew,\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t} )\n);\n\nexport type SkewTransformPropValue = z.infer< typeof skewTransformPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const transformOriginPropTypeUtil = createPropUtils(\n\t'transform-origin',\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t\tz: unknownChildrenSchema,\n\t} )\n);\n\nexport type TransformOriginPropValue = z.infer< typeof transformOriginPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const perspectiveOriginPropTypeUtil = createPropUtils(\n\t'perspective-origin',\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t} )\n);\n\nexport type PerspectiveOriginPropValue = z.infer< typeof perspectiveOriginPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { cssFilterFunctionPropUtil } from './filter';\n\nexport const backdropFilterPropTypeUtil = createPropUtils(\n\t'backdrop-filter',\n\tz.array( cssFilterFunctionPropUtil.schema )\n);\n\nexport type BackdropFilterPropValue = z.infer< typeof backdropFilterPropTypeUtil.schema >;\n\nexport type BackdropFilterItemPropValue = z.infer< typeof cssFilterFunctionPropUtil.schema >;\n","import { numberPropTypeUtil, type NumberPropValue, stringPropTypeUtil, type StringPropValue } from '../prop-types';\nimport { type ObjectPropValue, type PropValue, type TransformablePropValue } from '../types';\n\nconst ensureNotNull = ( v: unknown, fallback: unknown ) => ( v === null ? fallback : v );\n\nexport const adjustLlmPropValueSchema = ( value: Readonly< PropValue >, forceKey?: string ): PropValue => {\n\tconst clone = structuredClone( value );\n\n\tif ( typeof clone === 'string' ) {\n\t\treturn stringPropTypeUtil.create( clone );\n\t}\n\tif ( typeof clone === 'number' ) {\n\t\treturn numberPropTypeUtil.create( clone );\n\t}\n\t// Check for transformable types\n\tif ( clone && typeof clone === 'object' ) {\n\t\tif ( Array.isArray( clone ) ) {\n\t\t\treturn clone.map( ( item ) => adjustLlmPropValueSchema( item, forceKey ) ) as PropValue;\n\t\t}\n\t\tconst transformablePropValue = clone as TransformablePropValue< string >;\n\t\tif ( forceKey ) {\n\t\t\ttransformablePropValue.$$type = forceKey;\n\t\t}\n\n\t\tif ( ! transformablePropValue.$$type ) {\n\t\t\tthrow new Error( 'Missing $$type in property: ' + JSON.stringify( transformablePropValue ) );\n\t\t}\n\n\t\tif ( ! ( 'value' in transformablePropValue ) ) {\n\t\t\tthrow new Error( 'Missing value property in PropValue: ' + JSON.stringify( transformablePropValue ) );\n\t\t}\n\n\t\t// fix by type\n\t\tswitch ( transformablePropValue.$$type ) {\n\t\t\tcase 'size': {\n\t\t\t\tconst { value: rawSizePropValue } = transformablePropValue as TransformablePropValue<\n\t\t\t\t\tstring,\n\t\t\t\t\t{ size: StringPropValue | NumberPropValue; unit: StringPropValue }\n\t\t\t\t>;\n\t\t\t\tconst unit =\n\t\t\t\t\ttypeof rawSizePropValue.unit === 'string'\n\t\t\t\t\t\t? rawSizePropValue.unit\n\t\t\t\t\t\t: ensureNotNull( stringPropTypeUtil.extract( rawSizePropValue.unit ), 'px' );\n\t\t\t\tconst size =\n\t\t\t\t\ttypeof rawSizePropValue.size === 'string' || typeof rawSizePropValue.size === 'number'\n\t\t\t\t\t\t? rawSizePropValue.size\n\t\t\t\t\t\t: ensureNotNull(\n\t\t\t\t\t\t\t\tstringPropTypeUtil.extract( rawSizePropValue.size ),\n\t\t\t\t\t\t\t\tnumberPropTypeUtil.extract( rawSizePropValue.size )\n\t\t\t\t\t\t );\n\t\t\t\treturn {\n\t\t\t\t\t$$type: 'size',\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\tunit,\n\t\t\t\t\t\tsize,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( typeof transformablePropValue.value === 'object' ) {\n\t\t\tif ( Array.isArray( transformablePropValue.value ) ) {\n\t\t\t\ttransformablePropValue.value = adjustLlmPropValueSchema(\n\t\t\t\t\ttransformablePropValue.value,\n\t\t\t\t\tundefined\n\t\t\t\t) as PropValue[];\n\t\t\t} else {\n\t\t\t\tconst { value: objectValue } = transformablePropValue as ObjectPropValue;\n\t\t\t\tconst clonedObject = clone as ObjectPropValue;\n\t\t\t\tclonedObject.value = {} as Record< string, PropValue >;\n\t\t\t\tObject.keys( objectValue ).forEach( ( key ) => {\n\t\t\t\t\tconst childProp = ( objectValue as Record< string, unknown > )[ key ];\n\t\t\t\t\t( clonedObject.value as Record< string, unknown > )[ key ] = adjustLlmPropValueSchema(\n\t\t\t\t\t\tchildProp as PropValue,\n\t\t\t\t\t\tundefined\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\treturn clone;\n};\n","import { type PropsSchema, type PropType } from '../types';\nimport { type JsonSchema7 } from './prop-json-schema';\n\nexport function jsonSchemaToPropType( schema: JsonSchema7, key = < string >schema.key ): PropType {\n\tconst meta: Record< string, unknown > = {};\n\n\tif ( schema.description ) {\n\t\tmeta.description = schema.description;\n\t}\n\n\t// Handle union types (anyOf)\n\tif ( schema.anyOf && Array.isArray( schema.anyOf ) ) {\n\t\treturn convertJsonSchemaToUnionPropType( schema, meta );\n\t}\n\n\t// Handle object types\n\tif ( schema.type === 'object' && schema.properties ) {\n\t\treturn convertJsonSchemaToObjectPropType( schema, meta, key );\n\t}\n\n\t// Handle array types\n\tif ( schema.type === 'array' && schema.items ) {\n\t\treturn convertJsonSchemaToArrayPropType( schema, meta, key );\n\t}\n\n\t// Handle plain types (string, number, boolean)\n\treturn convertJsonSchemaToPlainPropType( schema, meta, key );\n}\n\nfunction convertJsonSchemaToPlainPropType(\n\tschema: JsonSchema7,\n\tmeta: Record< string, unknown >,\n\tkey = < string >schema.key\n): PropType {\n\tconst settings: Record< string, unknown > = {};\n\n\t// Determine the key based on type\n\tlet propKey = key || 'string';\n\n\tif ( schema.type === 'number' ) {\n\t\tpropKey = 'number';\n\t} else if ( schema.type === 'boolean' ) {\n\t\tpropKey = 'boolean';\n\t} else if ( schema.type === 'string' ) {\n\t\tpropKey = 'string';\n\t}\n\n\t// Handle enum values\n\tif ( Array.isArray( schema.enum ) ) {\n\t\tsettings.enum = schema.enum;\n\t}\n\n\treturn {\n\t\tkind: 'plain',\n\t\tkey: propKey,\n\t\tsettings,\n\t\tmeta,\n\t} as PropType;\n}\n\n/**\n * Converts a JSON Schema anyOf to a union PropType\n * @param schema\n * @param meta\n */\nfunction convertJsonSchemaToUnionPropType( schema: JsonSchema7, meta: Record< string, unknown > ): PropType {\n\tconst propTypes: Record< string, PropType > = {};\n\n\tif ( ! schema.anyOf || ! Array.isArray( schema.anyOf ) ) {\n\t\tthrow new Error( 'Invalid anyOf schema' );\n\t}\n\n\t// Process each variant in the anyOf array\n\tfor ( const variantSchema of schema.anyOf ) {\n\t\t// Each variant should be an object with $$type and value properties\n\t\tif (\n\t\t\tvariantSchema.type === 'object' &&\n\t\t\tvariantSchema.properties &&\n\t\t\tvariantSchema.properties.$$type &&\n\t\t\tvariantSchema.properties.value\n\t\t) {\n\t\t\tconst typeProperty = variantSchema.properties.$$type;\n\n\t\t\t// Extract the type key from the enum\n\t\t\tlet typeKey: string;\n\t\t\tif ( typeProperty.enum && Array.isArray( typeProperty.enum ) && typeProperty.enum.length > 0 ) {\n\t\t\t\ttypeKey = typeProperty.enum[ 0 ] as string;\n\t\t\t} else {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Convert the value schema to a PropType\n\t\t\tconst valuePropType = convertJsonSchemaToPropType( variantSchema.properties.value );\n\t\t\tpropTypes[ typeKey ] = valuePropType;\n\t\t}\n\t}\n\n\treturn {\n\t\tkind: 'union',\n\t\tprop_types: propTypes,\n\t\tsettings: {},\n\t\tmeta,\n\t} as PropType;\n}\n\nfunction convertJsonSchemaToObjectPropType(\n\tschema: JsonSchema7,\n\tmeta: Record< string, unknown >,\n\tkey = < string >schema.key\n): PropType {\n\tconst shape: Record< string, PropType > = {};\n\n\tif ( ! schema.properties ) {\n\t\treturn {\n\t\t\tkind: 'object',\n\t\t\tkey,\n\t\t\tshape: {},\n\t\t\tsettings: {},\n\t\t\tmeta,\n\t\t} as PropType;\n\t}\n\n\tconst requiredFields = Array.isArray( schema.required ) ? schema.required : [];\n\n\t// Convert each property\n\tfor ( const [ propKey, propSchema ] of Object.entries( schema.properties ) ) {\n\t\tconst subPropType = convertJsonSchemaToPropType( propSchema, key );\n\n\t\t// Mark as required if it's in the required array\n\t\tif ( requiredFields.includes( propKey ) ) {\n\t\t\tsubPropType.settings = {\n\t\t\t\t...subPropType.settings,\n\t\t\t\trequired: true,\n\t\t\t};\n\t\t}\n\n\t\tshape[ propKey ] = subPropType;\n\t}\n\n\treturn {\n\t\tkind: 'object',\n\t\tkey: key || 'object',\n\t\tshape,\n\t\tsettings: {},\n\t\tmeta,\n\t} as PropType;\n}\n\nfunction convertJsonSchemaToArrayPropType(\n\tschema: JsonSchema7,\n\tmeta: Record< string, unknown >,\n\tkey = < string >schema.key\n): PropType {\n\tif ( ! schema.items ) {\n\t\tthrow new Error( 'Array schema must have items property' );\n\t}\n\n\tconst itemPropType = convertJsonSchemaToPropType( schema.items );\n\n\treturn {\n\t\tkind: 'array',\n\t\tkey: key || 'array',\n\t\titem_prop_type: itemPropType,\n\t\tsettings: {},\n\t\tmeta,\n\t} as PropType;\n}\n\nfunction convertJsonSchemaToPropType( schema: JsonSchema7, key?: string ): PropType {\n\treturn jsonSchemaToPropType( schema, key );\n}\n\n/**\n * Converts a complete JSON Schema object back to a PropsSchema\n *\n * @param jsonSchema The JSON Schema to convert\n */\nexport function jsonSchemaToPropsSchema( jsonSchema: JsonSchema7 ): PropsSchema {\n\tconst propsSchema: PropsSchema = {};\n\n\tif ( jsonSchema.type !== 'object' || ! jsonSchema.properties ) {\n\t\tthrow new Error( 'Root schema must be an object with properties' );\n\t}\n\n\tfor ( const [ key, propSchema ] of Object.entries( jsonSchema.properties ) ) {\n\t\tpropsSchema[ key ] = convertJsonSchemaToPropType( propSchema, key );\n\t}\n\n\treturn propsSchema;\n}\n","import { type PropsSchema, type PropType } from '../types';\nimport { type JsonSchema7 } from './prop-json-schema';\n\nexport function propTypeToJsonSchema( propType: PropType ): JsonSchema7 {\n\tconst description = propType.meta?.description;\n\n\tconst schema: JsonSchema7 = {};\n\n\tif ( description ) {\n\t\tschema.description = description;\n\t}\n\n\t// Handle different kinds of prop types\n\tswitch ( propType.kind ) {\n\t\tcase 'plain':\n\t\t\treturn convertPlainPropType( propType, schema );\n\t\tcase 'union':\n\t\t\treturn convertUnionPropType( propType, schema );\n\t\tcase 'object':\n\t\t\treturn convertObjectPropType( propType, schema );\n\t\tcase 'array':\n\t\t\treturn convertArrayPropType( propType, schema );\n\t\tdefault:\n\t\t\treturn convertPlainPropType( propType, schema );\n\t}\n\n\treturn schema;\n}\n\nfunction convertPlainPropType( propType: PropType & { kind: 'plain' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = { ...baseSchema };\n\n\t// Determine type based on key\n\tconst key = propType.key.toLowerCase();\n\n\tswitch ( key ) {\n\t\tcase 'number':\n\t\t\tschema.type = 'number';\n\t\t\tbreak;\n\t\tcase 'boolean':\n\t\t\tschema.type = 'boolean';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tschema.type = 'string';\n\t}\n\n\t// Handle enum from settings\n\tif ( Array.isArray( propType.settings?.enum ) ) {\n\t\tschema.enum = propType.settings.enum;\n\t}\n\n\treturn schema;\n}\n\n/**\n * Converts a union prop type to JSON Schema ( электричество anyOf)\n *\n * @param propType The union prop type to convert\n * @param baseSchema Base schema to extend\n */\nfunction convertUnionPropType( propType: PropType & { kind: 'union' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = structuredClone( baseSchema );\n\n\tconst propTypes = propType.prop_types || {};\n\tconst schemas: JsonSchema7[] = [];\n\n\t// Convert each prop type in the union\n\tfor ( const [ typeKey, subPropType ] of Object.entries( propTypes ) ) {\n\t\tconst subSchema = convertPropTypeToJsonSchema( subPropType );\n\n\t\tschemas.push( {\n\t\t\ttype: 'object',\n\t\t\trequired: [ '$$type', 'value' ],\n\t\t\tproperties: {\n\t\t\t\t$$type: {\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tconst: typeKey,\n\t\t\t\t\tdescription: subPropType.meta?.description,\n\t\t\t\t\t$comment: `Discriminator for union type variant: ${ typeKey }`,\n\t\t\t\t},\n\t\t\t\tvalue: subSchema,\n\t\t\t},\n\t\t} );\n\t}\n\n\tif ( schemas.length > 0 ) {\n\t\tschema.anyOf = schemas;\n\t}\n\n\tconst propTypeDescription = propType.meta?.description;\n\tif ( propTypeDescription ) {\n\t\tschema.description = propTypeDescription;\n\t}\n\treturn schema;\n}\n\nfunction convertObjectPropType( propType: PropType & { kind: 'object' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = structuredClone( baseSchema );\n\n\tschema.type = 'object';\n\tschema.properties = {};\n\n\tconst required: string[] = [];\n\n\tconst shape = propType.shape || {};\n\n\t// Convert each property in the object shape\n\tfor ( const [ key, subPropType ] of Object.entries( shape ) ) {\n\t\tconst propSchema = convertPropTypeToJsonSchema( subPropType );\n\n\t\t// Check if this property is required\n\t\tif ( subPropType.settings?.required === true ) {\n\t\t\trequired.push( key );\n\t\t}\n\n\t\tschema.properties[ key ] = propSchema;\n\t}\n\n\t// Add required array if there are required fields\n\tif ( required.length > 0 ) {\n\t\tschema.required = required;\n\t}\n\n\treturn schema;\n}\n\nfunction convertArrayPropType( propType: PropType & { kind: 'array' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = structuredClone( baseSchema );\n\n\tschema.type = 'array';\n\n\tconst itemPropType = propType.item_prop_type;\n\n\tif ( itemPropType ) {\n\t\tschema.items = convertPropTypeToJsonSchema( itemPropType );\n\t}\n\n\treturn schema;\n}\n\nfunction convertPropTypeToJsonSchema( propType: PropType ): JsonSchema7 {\n\treturn propTypeToJsonSchema( propType );\n}\n\nexport function propsSchemaToJsonSchema( schema: PropsSchema ): JsonSchema7 {\n\tconst jsonSchema: JsonSchema7 = {\n\t\ttype: 'object',\n\t\tproperties: {},\n\t};\n\n\tfor ( const [ key, propType ] of Object.entries( schema ) ) {\n\t\t// Skip internal properties\n\t\tif ( ! isPropKeyConfigurable( key ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst propSchema = convertPropTypeToJsonSchema( propType );\n\t\tif ( jsonSchema.properties ) {\n\t\t\tjsonSchema.properties[ key ] = propSchema;\n\t\t}\n\n\t\t// Handle required fields at root level if needed\n\t\t// (typically props are optional unless specified)\n\t}\n\n\treturn jsonSchema;\n}\n\nexport const nonConfigurablePropKeys = [ '_cssid', 'classes', 'attributes' ] as readonly string[];\n\nexport function isPropKeyConfigurable( propKey: string ): boolean {\n\treturn ! nonConfigurablePropKeys.includes( propKey );\n}\n\nexport function configurableKeys( schema: PropsSchema ): string[] {\n\treturn Object.keys( schema ).filter( isPropKeyConfigurable );\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","import { type PropValue } from '../types';\nimport { isTransformable } from '../utils/is-transformable';\n\nexport const filterEmptyValues = < TValue extends PropValue >( value: TValue ): TValue | null => {\n\tif ( isEmpty( value ) ) {\n\t\treturn null;\n\t}\n\n\tif ( Array.isArray( value ) ) {\n\t\treturn value.map( filterEmptyValues ).filter( ( item ) => ! isEmpty( item ) ) as TValue;\n\t}\n\n\tif ( typeof value === 'object' ) {\n\t\treturn Object.fromEntries(\n\t\t\tObject.entries( value )\n\t\t\t\t.map( ( [ key, val ] ) => [ key, filterEmptyValues( val ) ] )\n\t\t\t\t.filter( ( [ , val ] ) => ! isEmpty( val ) )\n\t\t);\n\t}\n\n\treturn value;\n};\n\ntype Nullish = null | undefined | '';\n\nexport const isEmpty = ( value: PropValue ): value is Nullish => {\n\tif ( value && isTransformable( value ) ) {\n\t\treturn isEmpty( value.value );\n\t}\n\n\treturn isNullish( value ) || isNullishArray( value ) || isNullishObject( value );\n};\n\nconst isNullish = ( value: PropValue ): value is Nullish => value === null || value === undefined || value === '';\n\nconst isNullishArray = ( value: NonNullable< PropValue > ): value is Nullish[] =>\n\tArray.isArray( value ) && value.every( isEmpty );\n\nconst isNullishObject = ( value: NonNullable< PropValue > ): value is Record< string, Nullish > => {\n\treturn typeof value === 'object' && isNullishArray( Object.values( value ) );\n};\n","import type { Props } from '../types';\n\nexport function mergeProps( current: Props, updates: Props ) {\n\t// edge case, the server returns an array instead of an object when empty props because of PHP array / object conversion\n\tlet props: Props = {};\n\n\tif ( ! Array.isArray( current ) ) {\n\t\tprops = structuredClone( current );\n\t}\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 {\n\ttype Dependency,\n\ttype DependencyTerm,\n\ttype PropKey,\n\ttype PropValue,\n\ttype TransformablePropValue,\n} from '../types';\nimport { isTransformable } from './is-transformable';\n\ntype ParsedTerm = DependencyTerm;\n\ntype Relation = Dependency[ 'relation' ];\n\nexport function isDependencyMet(\n\tdependency: Dependency | undefined,\n\tvalues: PropValue\n): { isMet: true } | { isMet: false; failingDependencies: ( DependencyTerm | Dependency )[] } {\n\tif ( ! dependency?.terms.length ) {\n\t\treturn { isMet: true };\n\t}\n\n\tconst { relation, terms } = dependency;\n\tconst method = getRelationMethod( relation );\n\n\tconst failingDependencies: ( DependencyTerm | Dependency )[] = [];\n\tconst isMet = terms[ method ]( ( term: ParsedTerm | Dependency ) => {\n\t\tconst isNestedDependency = isDependency( term );\n\t\tconst result = isNestedDependency\n\t\t\t? isDependencyMet( term, values ).isMet\n\t\t\t: evaluateTerm( term, extractValue( term.path, values, term.nestedPath )?.value );\n\n\t\tif ( ! result ) {\n\t\t\tfailingDependencies.push( term );\n\t\t}\n\n\t\treturn result;\n\t} );\n\n\treturn { isMet, failingDependencies };\n}\n\nexport function evaluateTerm( term: DependencyTerm, actualValue: unknown ) {\n\tconst { value: valueToCompare, operator } = term;\n\n\tswitch ( operator ) {\n\t\tcase 'eq':\n\t\tcase 'ne':\n\t\t\treturn ( actualValue === valueToCompare ) === ( 'eq' === operator );\n\n\t\tcase 'gt':\n\t\tcase 'lte':\n\t\t\tif ( ! isNumber( actualValue ) || ! isNumber( valueToCompare ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn Number( actualValue ) > Number( valueToCompare ) === ( 'gt' === operator );\n\n\t\tcase 'lt':\n\t\tcase 'gte':\n\t\t\tif ( ! isNumber( actualValue ) || ! isNumber( valueToCompare ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn Number( actualValue ) < Number( valueToCompare ) === ( 'lt' === operator );\n\t\tcase 'in':\n\t\tcase 'nin':\n\t\t\tif ( ! Array.isArray( valueToCompare ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn valueToCompare.includes( actualValue as never ) === ( 'in' === operator );\n\n\t\tcase 'contains':\n\t\tcase 'ncontains':\n\t\t\tif (\n\t\t\t\t( 'string' !== typeof actualValue || 'string' !== typeof valueToCompare ) &&\n\t\t\t\t! Array.isArray( actualValue )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn ( 'contains' === operator ) === actualValue.includes( valueToCompare as never );\n\n\t\tcase 'exists':\n\t\tcase 'not_exist':\n\t\t\tconst evaluation = !! actualValue || 0 === actualValue || false === actualValue;\n\n\t\t\treturn ( 'exists' === operator ) === evaluation;\n\n\t\tdefault:\n\t\t\treturn true;\n\t}\n}\n\nfunction isNumber( value: unknown ): value is number {\n\treturn typeof value === 'number' && ! isNaN( value );\n}\n\nfunction getRelationMethod( relation: Relation ) {\n\tswitch ( relation ) {\n\t\tcase 'or':\n\t\t\treturn 'some';\n\n\t\tcase 'and':\n\t\t\treturn 'every';\n\n\t\tdefault:\n\t\t\tthrow new Error( `Relation not supported ${ relation }` );\n\t}\n}\n\nexport function extractValue(\n\tpath: string[],\n\telementValues: PropValue,\n\tnestedPath: string[] = []\n): TransformablePropValue< PropKey > | null {\n\tconst extractedValue = path.reduce( ( acc, key, index ) => {\n\t\tconst value = acc?.[ key as keyof typeof acc ] as PropValue | null;\n\n\t\treturn index !== path.length - 1 && isTransformable( value ) ? value.value ?? null : value;\n\t}, elementValues ) as TransformablePropValue< PropKey >;\n\n\tif ( ! nestedPath?.length ) {\n\t\treturn extractedValue;\n\t}\n\n\tconst nestedValue = nestedPath.reduce(\n\t\t( acc: Record< string, unknown >, key ) => acc?.[ key ] as Record< string, unknown >,\n\t\textractedValue?.value as Record< string, unknown >\n\t);\n\n\treturn {\n\t\t$$type: 'unknown',\n\t\tvalue: nestedValue,\n\t};\n}\n\nexport function isDependency( term: DependencyTerm | Dependency ): term is Dependency {\n\treturn 'terms' in term;\n}\n","import { adjustLlmPropValueSchema } from './utils/adjust-llm-prop-value-schema';\nimport { jsonSchemaToPropType } from './utils/llm-schema-to-props';\nimport {\n\tconfigurableKeys,\n\tisPropKeyConfigurable,\n\tnonConfigurablePropKeys,\n\tpropTypeToJsonSchema,\n} from './utils/props-to-llm-schema';\n\nexport { type JsonSchema7 } from './utils/prop-json-schema';\n\n// types\nexport * from './types';\nexport { type CreateOptions, type PropTypeUtil } from './utils/create-prop-utils';\n\n// prop types\nexport * from './prop-types';\n\n// utils\nexport { createArrayPropUtils, createPropUtils, getPropSchemaFromCache } from './utils/create-prop-utils';\nexport { filterEmptyValues, isEmpty } from './utils/filter-empty-values';\nexport { isTransformable } from './utils/is-transformable';\nexport { mergeProps } from './utils/merge-props';\nexport { evaluateTerm, extractValue, isDependency, isDependencyMet } from './utils/prop-dependency-utils';\n\nexport const Schema = {\n\tjsonSchemaToPropType,\n\tpropTypeToJsonSchema,\n\tadjustLlmPropValueSchema,\n\tisPropKeyConfigurable,\n\tnonConfigurablePropKeys,\n\tconfigurableKeys,\n};\n"],"mappings":";AAAA,SAAS,KAAAA,UAAS;;;ACAlB,SAAS,SAAuB;AAWhC,IAAM,eAAe,oBAAI,IAAuB;AAqBzC,SAAS,uBAAwB,KAAc;AACrD,SAAO,aAAa,IAAK,GAAI;AAC9B;AAEO,SAAS,gBAC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,aAAa,aAAe;AAAA,IAEtC;AACC,aAAO;AAAA,EACT;AACD;AAEA,SAAS,SAAU,OAAkC;AACpD,SAAO,OAAO,UAAU,YAAY,CAAE,MAAO,KAAM;AACpD;AAEA,SAAS,kBAAmB,UAAqB;AAChD,UAAS,UAAW;AAAA,IACnB,KAAK;AACJ,aAAO;AAAA,IAER,KAAK;AACJ,aAAO;AAAA,IAER;AACC,YAAM,IAAI,MAAO,0BAA2B,QAAS,EAAG;AAAA,EAC1D;AACD;AAEO,SAAS,aACf,MACA,eACA,aAAuB,CAAC,GACmB;AAC3C,QAAM,iBAAiB,KAAK,OAAQ,CAAE,KAAK,KAAK,UAAW;AAC1D,UAAM,QAAQ,MAAO,GAAwB;AAE7C,WAAO,UAAU,KAAK,SAAS,KAAK,gBAAiB,KAAM,IAAI,MAAM,SAAS,OAAO;AAAA,EACtF,GAAG,aAAc;AAEjB,MAAK,CAAE,YAAY,QAAS;AAC3B,WAAO;AAAA,EACR;AAEA,QAAM,cAAc,WAAW;AAAA,IAC9B,CAAE,KAAgC,QAAS,MAAO,GAAI;AAAA,IACtD,gBAAgB;AAAA,EACjB;AAEA,SAAO;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA,EACR;AACD;AAEO,SAAS,aAAc,MAAwD;AACrF,SAAO,WAAW;AACnB;;;AClHO,IAAM,SAAS;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;","names":["z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z"]}
1
+ {"version":3,"sources":["../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/flex.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/selection-size.ts","../src/prop-types/key-value.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/prop-types/date-time.ts","../src/prop-types/position.ts","../src/prop-types/query.ts","../src/prop-types/html.ts","../src/prop-types/filter-prop-types/filter.ts","../src/prop-types/filter-prop-types/drop-shadow-filter.ts","../src/prop-types/filter-prop-types/filter-functions/blur-filter.ts","../src/prop-types/filter-prop-types/filter-functions/color-tone-filter.ts","../src/prop-types/filter-prop-types/filter-functions/hue-rotate-filter.ts","../src/prop-types/filter-prop-types/filter-functions/intensity-filter.ts","../src/prop-types/transform-prop-types/transform.ts","../src/prop-types/transform-prop-types/transform-functions.ts","../src/prop-types/transform-prop-types/transform-functions/move-transform.ts","../src/prop-types/transform-prop-types/types.ts","../src/prop-types/transform-prop-types/transform-functions/rotate-transform.ts","../src/prop-types/transform-prop-types/transform-functions/scale-transform.ts","../src/prop-types/transform-prop-types/transform-functions/skew-transform.ts","../src/prop-types/transform-prop-types/transform-origin.ts","../src/prop-types/transform-prop-types/perspective-origin.ts","../src/prop-types/filter-prop-types/backdrop-filter.ts","../src/utils/adjust-llm-prop-value-schema.ts","../src/utils/llm-schema-to-props.ts","../src/utils/props-to-llm-schema.ts","../src/utils/is-transformable.ts","../src/utils/filter-empty-values.ts","../src/utils/merge-props.ts","../src/utils/prop-dependency-utils.ts","../src/utils/prop-type-compatibility.ts","../src/index.ts"],"sourcesContent":["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\nconst SCHEMA_CACHE = new Map< string, unknown >();\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 getPropSchemaFromCache( key: string ) {\n\treturn SCHEMA_CACHE.get( key ) as PropTypeUtil< string, PropValue > | undefined;\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\tconst propUtil = {\n\t\textract,\n\t\tisValid,\n\t\tcreate,\n\t\tschema,\n\t\tkey: key as TKey,\n\t};\n\n\tSCHEMA_CACHE.set( key, propUtil );\n\treturn propUtil;\n}\n\nexport function createArrayPropUtils< TKey extends string, TValue extends PropValue >(\n\tkey: TKey,\n\tvalueSchema: ZodType< TValue >,\n\toverrideKey?: string\n) {\n\treturn createPropUtils( overrideKey || `${ key }-array`, z.array( valueSchema ) );\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 flexPropTypeUtil = createPropUtils(\n\t'flex',\n\tz.strictObject( {\n\t\tflexGrow: unknownChildrenSchema,\n\t\tflexShrink: unknownChildrenSchema,\n\t\tflexBasis: unknownChildrenSchema,\n\t} )\n);\n\nexport type FlexPropValue = z.infer< typeof flexPropTypeUtil.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\n\t\t.strictObject( {\n\t\t\tunit: z.enum( [ 'px', 'em', 'rem', '%', 'vw', 'vh' ] ),\n\t\t\tsize: z.number(),\n\t\t} )\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tunit: z.enum( [ 'deg', 'rad', 'grad', 'turn' ] ),\n\t\t\t\tsize: z.number(),\n\t\t\t} )\n\t\t)\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tunit: z.enum( [ 's', 'ms' ] ),\n\t\t\t\tsize: z.number(),\n\t\t\t} )\n\t\t)\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tunit: z.literal( 'auto' ),\n\t\t\t\tsize: z.literal( '' ),\n\t\t\t} )\n\t\t)\n\t\t.or(\n\t\t\tz.strictObject( {\n\t\t\t\tunit: z.literal( 'custom' ),\n\t\t\t\tsize: z.string(),\n\t\t\t} )\n\t\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\tisTargetBlank: unknownChildrenSchema,\n\t\ttag: 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 { keyValuePropTypeUtil } from './key-value';\nimport { stringPropTypeUtil } from './string';\nimport { unknownChildrenSchema } from './utils';\n\nexport const selectionSizePropTypeUtil = createPropUtils(\n\t'selection-size',\n\tz.strictObject( {\n\t\tselection: z.union( [ keyValuePropTypeUtil.schema, stringPropTypeUtil.schema ] ),\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n\nexport type SelectionSizePropValue = z.infer< typeof selectionSizePropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const keyValuePropTypeUtil = createPropUtils(\n\t'key-value',\n\tz.strictObject( {\n\t\tkey: unknownChildrenSchema,\n\t\tvalue: unknownChildrenSchema,\n\t} )\n);\n\nexport type KeyValuePropValue = z.infer< typeof keyValuePropTypeUtil.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\tclip: 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\nexport const 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 { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const DateTimePropTypeUtil = createPropUtils(\n\t'date-time',\n\tz.strictObject( {\n\t\tdate: unknownChildrenSchema,\n\t\ttime: unknownChildrenSchema,\n\t} )\n);\n\nexport type DateTimePropValue = z.infer< typeof DateTimePropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const positionPropTypeUtil = createPropUtils(\n\t'object-position',\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t} )\n);\n\nexport type PositionPropTypeValue = z.infer< typeof positionPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\nimport { unknownChildrenSchema } from './utils';\n\nexport const queryPropTypeUtil = createPropUtils(\n\t'query',\n\tz.strictObject( {\n\t\tid: unknownChildrenSchema,\n\t\tlabel: unknownChildrenSchema,\n\t} )\n);\n\nexport type QueryPropValue = z.infer< typeof queryPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../utils/create-prop-utils';\n\nexport const htmlPropTypeUtil = createPropUtils( 'html', z.string().nullable() );\n\nexport type HtmlPropValue = z.infer< typeof htmlPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { stringPropTypeUtil } from '../string';\nimport { dropShadowFilterPropTypeUtil } from './drop-shadow-filter';\nimport { blurFilterPropTypeUtil } from './filter-functions/blur-filter';\nimport { colorToneFilterPropTypeUtil } from './filter-functions/color-tone-filter';\nimport { hueRotateFilterPropTypeUtil } from './filter-functions/hue-rotate-filter';\nimport { intensityFilterPropTypeUtil } from './filter-functions/intensity-filter';\n\nexport const cssFilterFunctionPropUtil = createPropUtils(\n\t'css-filter-func',\n\tz.object( {\n\t\tfunc: stringPropTypeUtil.schema,\n\t\targs: z.union( [\n\t\t\tblurFilterPropTypeUtil.schema,\n\t\t\tintensityFilterPropTypeUtil.schema,\n\t\t\tcolorToneFilterPropTypeUtil.schema,\n\t\t\thueRotateFilterPropTypeUtil.schema,\n\t\t\tdropShadowFilterPropTypeUtil.schema,\n\t\t] ),\n\t} )\n);\n\nexport const filterPropTypeUtil = createPropUtils( 'filter', z.array( cssFilterFunctionPropUtil.schema ) );\n\nexport type FilterItemPropValue = z.infer< typeof cssFilterFunctionPropUtil.schema >;\n\nexport type FilterPropValue = z.infer< typeof filterPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const dropShadowFilterPropTypeUtil = createPropUtils(\n\t'drop-shadow',\n\tz.object( {\n\t\txAxis: unknownChildrenSchema,\n\t\tyAxis: unknownChildrenSchema,\n\t\tblur: unknownChildrenSchema,\n\t\tcolor: unknownChildrenSchema,\n\t} )\n);\n\nexport type DropShadowFilterPropValue = z.infer< typeof dropShadowFilterPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\n\nexport const blurFilterPropTypeUtil = createPropUtils(\n\t'blur',\n\tz.strictObject( {\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\n\nexport const colorToneFilterPropTypeUtil = createPropUtils(\n\t'color-tone',\n\tz.strictObject( {\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\n\nexport const hueRotateFilterPropTypeUtil = createPropUtils(\n\t'hue-rotate',\n\tz.strictObject( {\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\n\nexport const intensityFilterPropTypeUtil = createPropUtils(\n\t'intensity',\n\tz.strictObject( {\n\t\tsize: unknownChildrenSchema,\n\t} )\n);\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const transformPropTypeUtil = createPropUtils(\n\t'transform',\n\tz.strictObject( {\n\t\t'transform-functions': unknownChildrenSchema,\n\t\t'transform-origin': unknownChildrenSchema,\n\t\tperspective: unknownChildrenSchema,\n\t\t'perspective-origin': unknownChildrenSchema,\n\t} )\n);\n\nexport type TransformPropValue = z.infer< typeof transformPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { moveTransformPropTypeUtil } from './transform-functions/move-transform';\nimport { rotateTransformPropTypeUtil } from './transform-functions/rotate-transform';\nimport { scaleTransformPropTypeUtil } from './transform-functions/scale-transform';\nimport { skewTransformPropTypeUtil } from './transform-functions/skew-transform';\n\nconst filterTypes = moveTransformPropTypeUtil.schema\n\t.or( scaleTransformPropTypeUtil.schema )\n\t.or( rotateTransformPropTypeUtil.schema )\n\t.or( skewTransformPropTypeUtil.schema );\n\nexport const transformFunctionsPropTypeUtil = createPropUtils( 'transform-functions', z.array( filterTypes ) );\n\nexport type TransformFunctionsPropValue = z.infer< typeof transformFunctionsPropTypeUtil.schema >;\n\nexport type TransformFunctionsItemPropValue = z.infer< typeof filterTypes >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\nimport { TransformFunctionKeys } from '../types';\n\nexport const moveTransformPropTypeUtil = createPropUtils(\n\tTransformFunctionKeys.move,\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t\tz: unknownChildrenSchema,\n\t} )\n);\n\nexport type MoveTransformPropValue = z.infer< typeof moveTransformPropTypeUtil.schema >;\n","type TransformFunctions = 'transform-move' | 'transform-scale' | 'transform-rotate' | 'transform-skew';\n\nexport const TransformFunctionKeys: Record< string, TransformFunctions > = {\n\tmove: 'transform-move',\n\tscale: 'transform-scale',\n\trotate: 'transform-rotate',\n\tskew: 'transform-skew',\n};\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\nimport { TransformFunctionKeys } from '../types';\n\nexport const rotateTransformPropTypeUtil = createPropUtils(\n\tTransformFunctionKeys.rotate,\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t\tz: unknownChildrenSchema,\n\t} )\n);\n\nexport type RotateTransformPropValue = z.infer< typeof rotateTransformPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { numberPropTypeUtil } from '../../number';\nimport { TransformFunctionKeys } from '../types';\n\nexport const scaleTransformPropTypeUtil = createPropUtils(\n\tTransformFunctionKeys.scale,\n\tz.strictObject( {\n\t\tx: numberPropTypeUtil.schema.nullable(),\n\t\ty: numberPropTypeUtil.schema.nullable(),\n\t\tz: numberPropTypeUtil.schema.nullable(),\n\t} )\n);\n\nexport type ScaleTransformPropValue = z.infer< typeof scaleTransformPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../../utils';\nimport { TransformFunctionKeys } from '../types';\n\nexport const skewTransformPropTypeUtil = createPropUtils(\n\tTransformFunctionKeys.skew,\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t} )\n);\n\nexport type SkewTransformPropValue = z.infer< typeof skewTransformPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const transformOriginPropTypeUtil = createPropUtils(\n\t'transform-origin',\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t\tz: unknownChildrenSchema,\n\t} )\n);\n\nexport type TransformOriginPropValue = z.infer< typeof transformOriginPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { unknownChildrenSchema } from '../utils';\n\nexport const perspectiveOriginPropTypeUtil = createPropUtils(\n\t'perspective-origin',\n\tz.strictObject( {\n\t\tx: unknownChildrenSchema,\n\t\ty: unknownChildrenSchema,\n\t} )\n);\n\nexport type PerspectiveOriginPropValue = z.infer< typeof perspectiveOriginPropTypeUtil.schema >;\n","import { z } from '@elementor/schema';\n\nimport { createPropUtils } from '../../utils/create-prop-utils';\nimport { cssFilterFunctionPropUtil } from './filter';\n\nexport const backdropFilterPropTypeUtil = createPropUtils(\n\t'backdrop-filter',\n\tz.array( cssFilterFunctionPropUtil.schema )\n);\n\nexport type BackdropFilterPropValue = z.infer< typeof backdropFilterPropTypeUtil.schema >;\n\nexport type BackdropFilterItemPropValue = z.infer< typeof cssFilterFunctionPropUtil.schema >;\n","import { numberPropTypeUtil, type NumberPropValue, stringPropTypeUtil, type StringPropValue } from '../prop-types';\nimport { type ObjectPropValue, type PropValue, type TransformablePropValue } from '../types';\n\nconst ensureNotNull = ( v: unknown, fallback: unknown ) => ( v === null ? fallback : v );\n\nexport const adjustLlmPropValueSchema = ( value: Readonly< PropValue >, forceKey?: string ): PropValue => {\n\tconst clone = structuredClone( value );\n\n\tif ( typeof clone === 'string' ) {\n\t\treturn stringPropTypeUtil.create( clone );\n\t}\n\tif ( typeof clone === 'number' ) {\n\t\treturn numberPropTypeUtil.create( clone );\n\t}\n\t// Check for transformable types\n\tif ( clone && typeof clone === 'object' ) {\n\t\tif ( Array.isArray( clone ) ) {\n\t\t\treturn clone.map( ( item ) => adjustLlmPropValueSchema( item, forceKey ) ) as PropValue;\n\t\t}\n\t\tconst transformablePropValue = clone as TransformablePropValue< string >;\n\t\tif ( forceKey ) {\n\t\t\ttransformablePropValue.$$type = forceKey;\n\t\t}\n\n\t\tif ( ! transformablePropValue.$$type ) {\n\t\t\tthrow new Error( 'Missing $$type in property: ' + JSON.stringify( transformablePropValue ) );\n\t\t}\n\n\t\tif ( ! ( 'value' in transformablePropValue ) ) {\n\t\t\tthrow new Error( 'Missing value property in PropValue: ' + JSON.stringify( transformablePropValue ) );\n\t\t}\n\n\t\t// fix by type\n\t\tswitch ( transformablePropValue.$$type ) {\n\t\t\tcase 'size': {\n\t\t\t\tconst { value: rawSizePropValue } = transformablePropValue as TransformablePropValue<\n\t\t\t\t\tstring,\n\t\t\t\t\t{ size: StringPropValue | NumberPropValue; unit: StringPropValue }\n\t\t\t\t>;\n\t\t\t\tconst unit =\n\t\t\t\t\ttypeof rawSizePropValue.unit === 'string'\n\t\t\t\t\t\t? rawSizePropValue.unit\n\t\t\t\t\t\t: ensureNotNull( stringPropTypeUtil.extract( rawSizePropValue.unit ), 'px' );\n\t\t\t\tconst size =\n\t\t\t\t\ttypeof rawSizePropValue.size === 'string' || typeof rawSizePropValue.size === 'number'\n\t\t\t\t\t\t? rawSizePropValue.size\n\t\t\t\t\t\t: ensureNotNull(\n\t\t\t\t\t\t\t\tstringPropTypeUtil.extract( rawSizePropValue.size ),\n\t\t\t\t\t\t\t\tnumberPropTypeUtil.extract( rawSizePropValue.size )\n\t\t\t\t\t\t );\n\t\t\t\treturn {\n\t\t\t\t\t$$type: 'size',\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\tunit,\n\t\t\t\t\t\tsize,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( typeof transformablePropValue.value === 'object' ) {\n\t\t\tif ( Array.isArray( transformablePropValue.value ) ) {\n\t\t\t\ttransformablePropValue.value = adjustLlmPropValueSchema(\n\t\t\t\t\ttransformablePropValue.value,\n\t\t\t\t\tundefined\n\t\t\t\t) as PropValue[];\n\t\t\t} else {\n\t\t\t\tconst { value: objectValue } = transformablePropValue as ObjectPropValue;\n\t\t\t\tconst clonedObject = clone as ObjectPropValue;\n\t\t\t\tclonedObject.value = {} as Record< string, PropValue >;\n\t\t\t\tObject.keys( objectValue ).forEach( ( key ) => {\n\t\t\t\t\tconst childProp = ( objectValue as Record< string, unknown > )[ key ];\n\t\t\t\t\t( clonedObject.value as Record< string, unknown > )[ key ] = adjustLlmPropValueSchema(\n\t\t\t\t\t\tchildProp as PropValue,\n\t\t\t\t\t\tundefined\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\treturn clone;\n};\n","import { type PropsSchema, type PropType } from '../types';\nimport { type JsonSchema7 } from './prop-json-schema';\n\nexport function jsonSchemaToPropType( schema: JsonSchema7, key = < string >schema.key ): PropType {\n\tconst meta: Record< string, unknown > = {};\n\n\tif ( schema.description ) {\n\t\tmeta.description = schema.description;\n\t}\n\n\t// Handle union types (anyOf)\n\tif ( schema.anyOf && Array.isArray( schema.anyOf ) ) {\n\t\treturn convertJsonSchemaToUnionPropType( schema, meta );\n\t}\n\n\t// Handle object types\n\tif ( schema.type === 'object' && schema.properties ) {\n\t\treturn convertJsonSchemaToObjectPropType( schema, meta, key );\n\t}\n\n\t// Handle array types\n\tif ( schema.type === 'array' && schema.items ) {\n\t\treturn convertJsonSchemaToArrayPropType( schema, meta, key );\n\t}\n\n\t// Handle plain types (string, number, boolean)\n\treturn convertJsonSchemaToPlainPropType( schema, meta, key );\n}\n\nfunction convertJsonSchemaToPlainPropType(\n\tschema: JsonSchema7,\n\tmeta: Record< string, unknown >,\n\tkey = < string >schema.key\n): PropType {\n\tconst settings: Record< string, unknown > = {};\n\n\t// Determine the key based on type\n\tlet propKey = key || 'string';\n\n\tif ( schema.type === 'number' ) {\n\t\tpropKey = 'number';\n\t} else if ( schema.type === 'boolean' ) {\n\t\tpropKey = 'boolean';\n\t} else if ( schema.type === 'string' ) {\n\t\tpropKey = 'string';\n\t}\n\n\t// Handle enum values\n\tif ( Array.isArray( schema.enum ) ) {\n\t\tsettings.enum = schema.enum;\n\t}\n\n\treturn {\n\t\tkind: 'plain',\n\t\tkey: propKey,\n\t\tsettings,\n\t\tmeta,\n\t} as PropType;\n}\n\n/**\n * Converts a JSON Schema anyOf to a union PropType\n * @param schema\n * @param meta\n */\nfunction convertJsonSchemaToUnionPropType( schema: JsonSchema7, meta: Record< string, unknown > ): PropType {\n\tconst propTypes: Record< string, PropType > = {};\n\n\tif ( ! schema.anyOf || ! Array.isArray( schema.anyOf ) ) {\n\t\tthrow new Error( 'Invalid anyOf schema' );\n\t}\n\n\t// Process each variant in the anyOf array\n\tfor ( const variantSchema of schema.anyOf ) {\n\t\t// Each variant should be an object with $$type and value properties\n\t\tif (\n\t\t\tvariantSchema.type === 'object' &&\n\t\t\tvariantSchema.properties &&\n\t\t\tvariantSchema.properties.$$type &&\n\t\t\tvariantSchema.properties.value\n\t\t) {\n\t\t\tconst typeProperty = variantSchema.properties.$$type;\n\n\t\t\t// Extract the type key from the enum\n\t\t\tlet typeKey: string;\n\t\t\tif ( typeProperty.enum && Array.isArray( typeProperty.enum ) && typeProperty.enum.length > 0 ) {\n\t\t\t\ttypeKey = typeProperty.enum[ 0 ] as string;\n\t\t\t} else {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Convert the value schema to a PropType\n\t\t\tconst valuePropType = convertJsonSchemaToPropType( variantSchema.properties.value );\n\t\t\tpropTypes[ typeKey ] = valuePropType;\n\t\t}\n\t}\n\n\treturn {\n\t\tkind: 'union',\n\t\tprop_types: propTypes,\n\t\tsettings: {},\n\t\tmeta,\n\t} as PropType;\n}\n\nfunction convertJsonSchemaToObjectPropType(\n\tschema: JsonSchema7,\n\tmeta: Record< string, unknown >,\n\tkey = < string >schema.key\n): PropType {\n\tconst shape: Record< string, PropType > = {};\n\n\tif ( ! schema.properties ) {\n\t\treturn {\n\t\t\tkind: 'object',\n\t\t\tkey,\n\t\t\tshape: {},\n\t\t\tsettings: {},\n\t\t\tmeta,\n\t\t} as PropType;\n\t}\n\n\tconst requiredFields = Array.isArray( schema.required ) ? schema.required : [];\n\n\t// Convert each property\n\tfor ( const [ propKey, propSchema ] of Object.entries( schema.properties ) ) {\n\t\tconst subPropType = convertJsonSchemaToPropType( propSchema, key );\n\n\t\t// Mark as required if it's in the required array\n\t\tif ( requiredFields.includes( propKey ) ) {\n\t\t\tsubPropType.settings = {\n\t\t\t\t...subPropType.settings,\n\t\t\t\trequired: true,\n\t\t\t};\n\t\t}\n\n\t\tshape[ propKey ] = subPropType;\n\t}\n\n\treturn {\n\t\tkind: 'object',\n\t\tkey: key || 'object',\n\t\tshape,\n\t\tsettings: {},\n\t\tmeta,\n\t} as PropType;\n}\n\nfunction convertJsonSchemaToArrayPropType(\n\tschema: JsonSchema7,\n\tmeta: Record< string, unknown >,\n\tkey = < string >schema.key\n): PropType {\n\tif ( ! schema.items ) {\n\t\tthrow new Error( 'Array schema must have items property' );\n\t}\n\n\tconst itemPropType = convertJsonSchemaToPropType( schema.items );\n\n\treturn {\n\t\tkind: 'array',\n\t\tkey: key || 'array',\n\t\titem_prop_type: itemPropType,\n\t\tsettings: {},\n\t\tmeta,\n\t} as PropType;\n}\n\nfunction convertJsonSchemaToPropType( schema: JsonSchema7, key?: string ): PropType {\n\treturn jsonSchemaToPropType( schema, key );\n}\n\n/**\n * Converts a complete JSON Schema object back to a PropsSchema\n *\n * @param jsonSchema The JSON Schema to convert\n */\nexport function jsonSchemaToPropsSchema( jsonSchema: JsonSchema7 ): PropsSchema {\n\tconst propsSchema: PropsSchema = {};\n\n\tif ( jsonSchema.type !== 'object' || ! jsonSchema.properties ) {\n\t\tthrow new Error( 'Root schema must be an object with properties' );\n\t}\n\n\tfor ( const [ key, propSchema ] of Object.entries( jsonSchema.properties ) ) {\n\t\tpropsSchema[ key ] = convertJsonSchemaToPropType( propSchema, key );\n\t}\n\n\treturn propsSchema;\n}\n","import { type PropsSchema, type PropType } from '../types';\nimport { type JsonSchema7 } from './prop-json-schema';\n\nexport function propTypeToJsonSchema( propType: PropType ): JsonSchema7 {\n\tconst description = propType.meta?.description;\n\n\tconst schema: JsonSchema7 = {};\n\n\tif ( description ) {\n\t\tschema.description = description;\n\t}\n\n\t// Handle different kinds of prop types\n\tswitch ( propType.kind ) {\n\t\tcase 'plain':\n\t\t\treturn convertPlainPropType( propType, schema );\n\t\tcase 'union':\n\t\t\treturn convertUnionPropType( propType, schema );\n\t\tcase 'object':\n\t\t\treturn convertObjectPropType( propType, schema );\n\t\tcase 'array':\n\t\t\treturn convertArrayPropType( propType, schema );\n\t\tdefault:\n\t\t\treturn convertPlainPropType( propType, schema );\n\t}\n\n\treturn schema;\n}\n\nfunction convertPlainPropType( propType: PropType & { kind: 'plain' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = { ...baseSchema };\n\n\t// Determine type based on key\n\tconst key = propType.key.toLowerCase();\n\n\tswitch ( key ) {\n\t\tcase 'number':\n\t\t\tschema.type = 'number';\n\t\t\tbreak;\n\t\tcase 'boolean':\n\t\t\tschema.type = 'boolean';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tschema.type = 'string';\n\t}\n\n\t// Handle enum from settings\n\tif ( Array.isArray( propType.settings?.enum ) ) {\n\t\tschema.enum = propType.settings.enum;\n\t}\n\n\treturn schema;\n}\n\n/**\n * Converts a union prop type to JSON Schema ( электричество anyOf)\n *\n * @param propType The union prop type to convert\n * @param baseSchema Base schema to extend\n */\nfunction convertUnionPropType( propType: PropType & { kind: 'union' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = structuredClone( baseSchema );\n\n\tconst propTypes = propType.prop_types || {};\n\tconst schemas: JsonSchema7[] = [];\n\n\t// Convert each prop type in the union\n\tfor ( const [ typeKey, subPropType ] of Object.entries( propTypes ) ) {\n\t\tconst subSchema = convertPropTypeToJsonSchema( subPropType );\n\n\t\tschemas.push( {\n\t\t\ttype: 'object',\n\t\t\trequired: [ '$$type', 'value' ],\n\t\t\tproperties: {\n\t\t\t\t$$type: {\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tconst: typeKey,\n\t\t\t\t\tdescription: subPropType.meta?.description,\n\t\t\t\t\t$comment: `Discriminator for union type variant: ${ typeKey }`,\n\t\t\t\t},\n\t\t\t\tvalue: subSchema,\n\t\t\t},\n\t\t} );\n\t}\n\n\tif ( schemas.length > 0 ) {\n\t\tschema.anyOf = schemas;\n\t}\n\n\tconst propTypeDescription = propType.meta?.description;\n\tif ( propTypeDescription ) {\n\t\tschema.description = propTypeDescription;\n\t}\n\treturn schema;\n}\n\nfunction convertObjectPropType( propType: PropType & { kind: 'object' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = structuredClone( baseSchema );\n\n\tschema.type = 'object';\n\tschema.properties = {};\n\n\tconst required: string[] = [];\n\n\tconst shape = propType.shape || {};\n\n\t// Convert each property in the object shape\n\tfor ( const [ key, subPropType ] of Object.entries( shape ) ) {\n\t\tconst propSchema = convertPropTypeToJsonSchema( subPropType );\n\n\t\t// Check if this property is required\n\t\tif ( subPropType.settings?.required === true ) {\n\t\t\trequired.push( key );\n\t\t}\n\n\t\tschema.properties[ key ] = propSchema;\n\t}\n\n\t// Add required array if there are required fields\n\tif ( required.length > 0 ) {\n\t\tschema.required = required;\n\t}\n\n\treturn schema;\n}\n\nfunction convertArrayPropType( propType: PropType & { kind: 'array' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = structuredClone( baseSchema );\n\n\tschema.type = 'array';\n\n\tconst itemPropType = propType.item_prop_type;\n\n\tif ( itemPropType ) {\n\t\tschema.items = convertPropTypeToJsonSchema( itemPropType );\n\t}\n\n\treturn schema;\n}\n\nfunction convertPropTypeToJsonSchema( propType: PropType ): JsonSchema7 {\n\treturn propTypeToJsonSchema( propType );\n}\n\nexport function propsSchemaToJsonSchema( schema: PropsSchema ): JsonSchema7 {\n\tconst jsonSchema: JsonSchema7 = {\n\t\ttype: 'object',\n\t\tproperties: {},\n\t};\n\n\tfor ( const [ key, propType ] of Object.entries( schema ) ) {\n\t\t// Skip internal properties\n\t\tif ( ! isPropKeyConfigurable( key ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst propSchema = convertPropTypeToJsonSchema( propType );\n\t\tif ( jsonSchema.properties ) {\n\t\t\tjsonSchema.properties[ key ] = propSchema;\n\t\t}\n\n\t\t// Handle required fields at root level if needed\n\t\t// (typically props are optional unless specified)\n\t}\n\n\treturn jsonSchema;\n}\n\nexport const nonConfigurablePropKeys = [ '_cssid', 'classes', 'attributes' ] as readonly string[];\n\nexport function isPropKeyConfigurable( propKey: string ): boolean {\n\treturn ! nonConfigurablePropKeys.includes( propKey );\n}\n\nexport function configurableKeys( schema: PropsSchema ): string[] {\n\treturn Object.keys( schema ).filter( isPropKeyConfigurable );\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","import { type PropValue } from '../types';\nimport { isTransformable } from '../utils/is-transformable';\n\nexport const filterEmptyValues = < TValue extends PropValue >( value: TValue ): TValue | null => {\n\tif ( isEmpty( value ) ) {\n\t\treturn null;\n\t}\n\n\tif ( Array.isArray( value ) ) {\n\t\treturn value.map( filterEmptyValues ).filter( ( item ) => ! isEmpty( item ) ) as TValue;\n\t}\n\n\tif ( typeof value === 'object' ) {\n\t\treturn Object.fromEntries(\n\t\t\tObject.entries( value )\n\t\t\t\t.map( ( [ key, val ] ) => [ key, filterEmptyValues( val ) ] )\n\t\t\t\t.filter( ( [ , val ] ) => ! isEmpty( val ) )\n\t\t);\n\t}\n\n\treturn value;\n};\n\ntype Nullish = null | undefined | '';\n\nexport const isEmpty = ( value: PropValue ): value is Nullish => {\n\tif ( value && isTransformable( value ) ) {\n\t\treturn isEmpty( value.value );\n\t}\n\n\treturn isNullish( value ) || isNullishArray( value ) || isNullishObject( value );\n};\n\nconst isNullish = ( value: PropValue ): value is Nullish => value === null || value === undefined || value === '';\n\nconst isNullishArray = ( value: NonNullable< PropValue > ): value is Nullish[] =>\n\tArray.isArray( value ) && value.every( isEmpty );\n\nconst isNullishObject = ( value: NonNullable< PropValue > ): value is Record< string, Nullish > => {\n\treturn typeof value === 'object' && isNullishArray( Object.values( value ) );\n};\n","import type { Props } from '../types';\n\nexport function mergeProps( current: Props, updates: Props ) {\n\t// edge case, the server returns an array instead of an object when empty props because of PHP array / object conversion\n\tlet props: Props = {};\n\n\tif ( ! Array.isArray( current ) ) {\n\t\tprops = structuredClone( current );\n\t}\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 {\n\ttype Dependency,\n\ttype DependencyTerm,\n\ttype PropKey,\n\ttype PropValue,\n\ttype TransformablePropValue,\n} from '../types';\nimport { isTransformable } from './is-transformable';\n\ntype ParsedTerm = DependencyTerm;\n\ntype Relation = Dependency[ 'relation' ];\n\nexport function isDependencyMet(\n\tdependency: Dependency | undefined,\n\tvalues: PropValue\n): { isMet: true } | { isMet: false; failingDependencies: ( DependencyTerm | Dependency )[] } {\n\tif ( ! dependency?.terms.length ) {\n\t\treturn { isMet: true };\n\t}\n\n\tconst { relation, terms } = dependency;\n\tconst method = getRelationMethod( relation );\n\n\tconst failingDependencies: ( DependencyTerm | Dependency )[] = [];\n\tconst isMet = terms[ method ]( ( term: ParsedTerm | Dependency ) => {\n\t\tconst isNestedDependency = isDependency( term );\n\t\tconst result = isNestedDependency\n\t\t\t? isDependencyMet( term, values ).isMet\n\t\t\t: evaluateTerm( term, extractValue( term.path, values, term.nestedPath )?.value );\n\n\t\tif ( ! result ) {\n\t\t\tfailingDependencies.push( term );\n\t\t}\n\n\t\treturn result;\n\t} );\n\n\treturn { isMet, failingDependencies };\n}\n\nexport function evaluateTerm( term: DependencyTerm, actualValue: unknown ) {\n\tconst { value: valueToCompare, operator } = term;\n\n\tswitch ( operator ) {\n\t\tcase 'eq':\n\t\tcase 'ne':\n\t\t\treturn ( actualValue === valueToCompare ) === ( 'eq' === operator );\n\n\t\tcase 'gt':\n\t\tcase 'lte':\n\t\t\tif ( ! isNumber( actualValue ) || ! isNumber( valueToCompare ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn Number( actualValue ) > Number( valueToCompare ) === ( 'gt' === operator );\n\n\t\tcase 'lt':\n\t\tcase 'gte':\n\t\t\tif ( ! isNumber( actualValue ) || ! isNumber( valueToCompare ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn Number( actualValue ) < Number( valueToCompare ) === ( 'lt' === operator );\n\t\tcase 'in':\n\t\tcase 'nin':\n\t\t\tif ( ! Array.isArray( valueToCompare ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn valueToCompare.includes( actualValue as never ) === ( 'in' === operator );\n\n\t\tcase 'contains':\n\t\tcase 'ncontains':\n\t\t\tif (\n\t\t\t\t( 'string' !== typeof actualValue || 'string' !== typeof valueToCompare ) &&\n\t\t\t\t! Array.isArray( actualValue )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn ( 'contains' === operator ) === actualValue.includes( valueToCompare as never );\n\n\t\tcase 'exists':\n\t\tcase 'not_exist':\n\t\t\tconst evaluation = !! actualValue || 0 === actualValue || false === actualValue;\n\n\t\t\treturn ( 'exists' === operator ) === evaluation;\n\n\t\tdefault:\n\t\t\treturn true;\n\t}\n}\n\nfunction isNumber( value: unknown ): value is number {\n\treturn typeof value === 'number' && ! isNaN( value );\n}\n\nfunction getRelationMethod( relation: Relation ) {\n\tswitch ( relation ) {\n\t\tcase 'or':\n\t\t\treturn 'some';\n\n\t\tcase 'and':\n\t\t\treturn 'every';\n\n\t\tdefault:\n\t\t\tthrow new Error( `Relation not supported ${ relation }` );\n\t}\n}\n\nexport function extractValue(\n\tpath: string[],\n\telementValues: PropValue,\n\tnestedPath: string[] = []\n): TransformablePropValue< PropKey > | null {\n\tconst extractedValue = path.reduce( ( acc, key, index ) => {\n\t\tconst value = acc?.[ key as keyof typeof acc ] as PropValue | null;\n\n\t\treturn index !== path.length - 1 && isTransformable( value ) ? value.value ?? null : value;\n\t}, elementValues ) as TransformablePropValue< PropKey >;\n\n\tif ( ! nestedPath?.length ) {\n\t\treturn extractedValue;\n\t}\n\n\tconst nestedValue = nestedPath.reduce(\n\t\t( acc: Record< string, unknown >, key ) => acc?.[ key ] as Record< string, unknown >,\n\t\textractedValue?.value as Record< string, unknown >\n\t);\n\n\treturn {\n\t\t$$type: 'unknown',\n\t\tvalue: nestedValue,\n\t};\n}\n\nexport function isDependency( term: DependencyTerm | Dependency ): term is Dependency {\n\treturn 'terms' in term;\n}\n","import { type PropType, type PropValue } from '../types';\nimport { isTransformable } from './is-transformable';\n\nexport const PROP_TYPE_COMPATIBILITY_MAP: Record< string, string[] > = {\n\thtml: [ 'string' ],\n\tstring: [ 'html' ],\n};\n\nexport function getCompatibleTypeKeys( propType: PropType ): string[] {\n\tif ( propType.kind === 'union' ) {\n\t\treturn [];\n\t}\n\n\tconst compatibleKeys = propType.meta?.compatibleTypeKeys as string[] | undefined;\n\n\tif ( Array.isArray( compatibleKeys ) ) {\n\t\treturn compatibleKeys;\n\t}\n\n\treturn PROP_TYPE_COMPATIBILITY_MAP[ propType.key ] ?? [];\n}\n\nexport function migratePropValue( value: PropValue, propType: PropType ): PropValue {\n\tif ( ! isTransformable( value ) ) {\n\t\treturn value;\n\t}\n\n\tif ( propType.kind === 'union' ) {\n\t\tconst propTypes = propType.prop_types;\n\n\t\tfor ( const unionPropType of Object.values( propTypes ) ) {\n\t\t\tconst expectedKey = unionPropType.key;\n\n\t\t\tif ( value.$$type === expectedKey ) {\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\tconst compatibleKeys = getCompatibleTypeKeys( unionPropType );\n\n\t\t\tif ( compatibleKeys.includes( value.$$type ) ) {\n\t\t\t\treturn { ...value, $$type: expectedKey };\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst expectedKey = propType.key;\n\n\t\tif ( value.$$type === expectedKey ) {\n\t\t\treturn value;\n\t\t}\n\n\t\tconst compatibleKeys = getCompatibleTypeKeys( propType );\n\n\t\tif ( compatibleKeys.includes( value.$$type ) ) {\n\t\t\treturn { ...value, $$type: expectedKey };\n\t\t}\n\t}\n\n\treturn value;\n}\n","import { adjustLlmPropValueSchema } from './utils/adjust-llm-prop-value-schema';\nimport { jsonSchemaToPropType } from './utils/llm-schema-to-props';\nimport {\n\tconfigurableKeys,\n\tisPropKeyConfigurable,\n\tnonConfigurablePropKeys,\n\tpropTypeToJsonSchema,\n} from './utils/props-to-llm-schema';\n\nexport { type JsonSchema7 } from './utils/prop-json-schema';\n\n// types\nexport * from './types';\nexport { type CreateOptions, type PropTypeUtil } from './utils/create-prop-utils';\n\n// prop types\nexport * from './prop-types';\n\n// utils\nexport { createArrayPropUtils, createPropUtils, getPropSchemaFromCache } from './utils/create-prop-utils';\nexport { filterEmptyValues, isEmpty } from './utils/filter-empty-values';\nexport { isTransformable } from './utils/is-transformable';\nexport { mergeProps } from './utils/merge-props';\nexport { evaluateTerm, extractValue, isDependency, isDependencyMet } from './utils/prop-dependency-utils';\n\n// constants\nexport { getCompatibleTypeKeys, migratePropValue, PROP_TYPE_COMPATIBILITY_MAP } from './utils/prop-type-compatibility';\n\nexport const Schema = {\n\tjsonSchemaToPropType,\n\tpropTypeToJsonSchema,\n\tadjustLlmPropValueSch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AEA,QAAM,iBAAiB,SAAS,MAAM;AAEtC,MAAK,MAAM,QAAS,cAAe,GAAI;AACtC,WAAO;AAAA,EACR;AAEA,SAAO,4BAA6B,SAAS,GAAI,KAAK,CAAC;AACxD;AAEO,SAAS,iBAAkB,OAAkB,UAAgC;AACnF,MAAK,CAAE,gBAAiB,KAAM,GAAI;AACjC,WAAO;AAAA,EACR;AAEA,MAAK,SAAS,SAAS,SAAU;AAChC,UAAM,YAAY,SAAS;AAE3B,eAAY,iBAAiB,OAAO,OAAQ,SAAU,GAAI;AACzD,YAAM,cAAc,cAAc;AAElC,UAAK,MAAM,WAAW,aAAc;AACnC,eAAO;AAAA,MACR;AAEA,YAAM,iBAAiB,sBAAuB,aAAc;AAE5D,UAAK,eAAe,SAAU,MAAM,MAAO,GAAI;AAC9C,eAAO,EAAE,GAAG,OAAO,QAAQ,YAAY;AAAA,MACxC;AAAA,IACD;AAAA,EACD,OAAO;AACN,UAAM,cAAc,SAAS;AAE7B,QAAK,MAAM,WAAW,aAAc;AACnC,aAAO;AAAA,IACR;AAEA,UAAM,iBAAiB,sBAAuB,QAAS;AAEvD,QAAK,eAAe,SAAU,MAAM,MAAO,GAAI;AAC9C,aAAO,EAAE,GAAG,OAAO,QAAQ,YAAY;AAAA,IACxC;AAAA,EACD;AAEA,SAAO;AACR;;;AC9BO,IAAM,SAAS;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;","names":["z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elementor/editor-props",
3
3
  "description": "This package contains the props model for the Elementor editor",
4
- "version": "3.35.0-337",
4
+ "version": "3.35.0-339",
5
5
  "private": false,
6
6
  "author": "Elementor Team",
7
7
  "homepage": "https://elementor.com/",
@@ -40,7 +40,7 @@
40
40
  "dev": "tsup --config=../../tsup.dev.ts"
41
41
  },
42
42
  "dependencies": {
43
- "@elementor/schema": "3.35.0-337"
43
+ "@elementor/schema": "3.35.0-339"
44
44
  },
45
45
  "devDependencies": {
46
46
  "tsup": "^8.3.5"
package/src/index.ts CHANGED
@@ -23,6 +23,9 @@ export { isTransformable } from './utils/is-transformable';
23
23
  export { mergeProps } from './utils/merge-props';
24
24
  export { evaluateTerm, extractValue, isDependency, isDependencyMet } from './utils/prop-dependency-utils';
25
25
 
26
+ // constants
27
+ export { getCompatibleTypeKeys, migratePropValue, PROP_TYPE_COMPATIBILITY_MAP } from './utils/prop-type-compatibility';
28
+
26
29
  export const Schema = {
27
30
  jsonSchemaToPropType,
28
31
  propTypeToJsonSchema,
@@ -0,0 +1,59 @@
1
+ import { type PropType, type PropValue } from '../types';
2
+ import { isTransformable } from './is-transformable';
3
+
4
+ export const PROP_TYPE_COMPATIBILITY_MAP: Record< string, string[] > = {
5
+ html: [ 'string' ],
6
+ string: [ 'html' ],
7
+ };
8
+
9
+ export function getCompatibleTypeKeys( propType: PropType ): string[] {
10
+ if ( propType.kind === 'union' ) {
11
+ return [];
12
+ }
13
+
14
+ const compatibleKeys = propType.meta?.compatibleTypeKeys as string[] | undefined;
15
+
16
+ if ( Array.isArray( compatibleKeys ) ) {
17
+ return compatibleKeys;
18
+ }
19
+
20
+ return PROP_TYPE_COMPATIBILITY_MAP[ propType.key ] ?? [];
21
+ }
22
+
23
+ export function migratePropValue( value: PropValue, propType: PropType ): PropValue {
24
+ if ( ! isTransformable( value ) ) {
25
+ return value;
26
+ }
27
+
28
+ if ( propType.kind === 'union' ) {
29
+ const propTypes = propType.prop_types;
30
+
31
+ for ( const unionPropType of Object.values( propTypes ) ) {
32
+ const expectedKey = unionPropType.key;
33
+
34
+ if ( value.$$type === expectedKey ) {
35
+ return value;
36
+ }
37
+
38
+ const compatibleKeys = getCompatibleTypeKeys( unionPropType );
39
+
40
+ if ( compatibleKeys.includes( value.$$type ) ) {
41
+ return { ...value, $$type: expectedKey };
42
+ }
43
+ }
44
+ } else {
45
+ const expectedKey = propType.key;
46
+
47
+ if ( value.$$type === expectedKey ) {
48
+ return value;
49
+ }
50
+
51
+ const compatibleKeys = getCompatibleTypeKeys( propType );
52
+
53
+ if ( compatibleKeys.includes( value.$$type ) ) {
54
+ return { ...value, $$type: expectedKey };
55
+ }
56
+ }
57
+
58
+ return value;
59
+ }